-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-templates-project-tsx-0f155fa91f86221dfd2e.js.map
1 lines (1 loc) · 217 KB
/
component---src-pages-templates-project-tsx-0f155fa91f86221dfd2e.js.map
1
{"version":3,"file":"component---src-pages-templates-project-tsx-0f155fa91f86221dfd2e.js","mappings":"mPAOO,MAAMA,EAAYC,IAAgD,IAA/C,SAAEC,EAAQ,QAAEC,GAA6BF,EACjE,OACEG,EAAAA,EAAAA,IAAA,UACE,aAAW,aACXC,UAAW,yKAAyKC,OAClLJ,EAAW,0BAA4B,IAEzCK,KAAK,SACLJ,QAASA,GACT,EAIOK,EAAaC,IAAoD,IAAnD,QAAEC,EAAO,QAAEP,GAAkCM,EACtE,OACEL,EAAAA,EAAAA,IAAA,UACE,aAAW,iBACXC,UAAU,mLACVF,QAASA,EACTQ,UAAWD,IAEXN,EAAAA,EAAAA,IAAA,OAAKC,UAAU,cAAcO,QAAQ,+BACnCR,EAAAA,EAAAA,IAAA,QACES,KAAK,UACLC,EAAE,kVAGC,EAIAC,EAAaC,IAAoD,IAAnD,QAAEN,EAAO,QAAEP,GAAkCa,EACtE,OACEZ,EAAAA,EAAAA,IAAA,UACE,aAAW,aACXC,UAAU,oLACVF,QAASA,EACTQ,UAAWD,IAEXN,EAAAA,EAAAA,IAAA,OAAKC,UAAU,cAAcO,QAAQ,wBACnCR,EAAAA,EAAAA,IAAA,QACES,KAAK,UACLC,EAAE,8PAGC,ECpDPG,EAAkB,WAClBC,EAAoB,aAGpBC,EAAgB,SAEhBC,EAAiB,UACjBC,EAAkB,WAGlBC,EAAoB,aAGpBC,EAAmB,YACnBC,EAAoB,aACpBC,EAAc,OACdC,EAAuB,UACvBC,EAAuB,UACvBC,EAAqB,QACrBC,EAAwB,WACxBC,EAA2B,cAC3BC,EAAqBC,GAAW,gBAAgBA,IAChDC,EAAuBF,EAAkBL,GACzCQ,EAAuBH,EAAkBJ,GACzCQ,EAAqBJ,EAAkBH,GACvCQ,EAAwBL,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EAAkBC,GAC9BnH,EAAWkH,EACX,MAAM,aACJE,EAAY,eACZC,GACEF,EACEG,EAAcF,EAAa9B,EAAgBnF,EAASoH,eACpDC,EAAaJ,EAAaE,EAAaxB,GAE7C,GADAC,EAAUsB,EAAeG,GACrBxH,EAAS4B,iBAAiBvxB,QAAU,EAAG,OAC3Co1B,EAAOM,EAAQN,KACfO,GAAY,EACZ,MAAM,WACJyB,EAAU,cACVhzB,GACEurB,EAASqG,iBACPqB,EAAY1H,EAAS6F,WACrB1W,EAAO4W,EAAQF,UAAYE,EAAQF,SAAS6B,IAAcA,EAC1D5d,EAAYkW,EAAS2H,gBAC3B3H,EAAS7sB,GAAG,cAAeqzB,GACtBT,EAAQ3F,mBACXJ,EAAS7sB,GAAG,YAAagzB,GAEvBJ,EAAQ1F,mBACVoH,EAAWja,IAAI2B,EAAM,cAAc,KACjC8W,GAAS,EACTO,GAAW,IAERT,EAAQ3F,mBACXqH,EAAWja,IAAI2B,EAAM,cAAc,KACjC8W,GAAS,EACTE,GAAY,KAIdJ,EAAQJ,gBACV8B,EAAWja,IAAI1D,EAAW,UAAW0c,GAChCT,EAAQ3F,mBACXqH,EAAWja,IAAI1D,EAAW,WAAYqc,IAG1CsB,EAAWja,IAAI/Y,EAAe,mBAAoBgyB,GAC9CV,EAAQL,aAAegB,KAAoBP,GACjD,EAyEEyB,QAxEF,WACE5H,EAAS6H,IAAI,cAAerB,GAAWqB,IAAI,YAAa1B,GACxDK,IACAR,GAAY,EACZhP,GAAU,CACZ,EAoEEI,OACA0Q,KA7BF,WACM9Q,GAASwP,GACf,EA4BEuB,MA3BF,WACM/Q,GAASI,GACf,EA0BE4Q,UAzBF,WACE,OAAOhR,CACT,EA0BF,CACAmJ,EAASoH,mBAAgBz4B,C","sources":["webpack://code-cave/./src/components/projects/carouselDotsButtonsArrows.tsx","webpack://code-cave/./node_modules/yet-another-react-lightbox/dist/types.js","webpack://code-cave/./node_modules/yet-another-react-lightbox/dist/index.js","webpack://code-cave/./node_modules/yet-another-react-lightbox/dist/plugins/captions/index.js","webpack://code-cave/./node_modules/yet-another-react-lightbox/dist/plugins/fullscreen/index.js","webpack://code-cave/./node_modules/yet-another-react-lightbox/dist/plugins/slideshow/index.js","webpack://code-cave/./node_modules/yet-another-react-lightbox/dist/plugins/zoom/index.js","webpack://code-cave/./src/components/projects/screenshotsCarousel.tsx","webpack://code-cave/./src/components/projects/projectDescriptionSection.tsx","webpack://code-cave/./src/components/projects/stackOrTeamCard.tsx","webpack://code-cave/./src/pagesTemplates/project.tsx","webpack://code-cave/./node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js"],"sourcesContent":["import React from \"react\";\n\nimport {\n IDotButtonPropType,\n IPrevNextButtonPropType,\n} from \"../../types/carousel.type\";\n\nexport const DotButton = ({ selected, onClick }: IDotButtonPropType) => {\n return (\n <button\n aria-label=\"view image\"\n className={\"bg-transparent touch-manipulation inline-flex w-12 h-12 after:rounded-sm flex items-center mx-1.5 md:mx-3 after:bg-main-10 after:w-full after:h-1.5 after:content-['']\".concat(\n selected ? \" after:bg-secondary-100\" : \"\"\n )}\n type=\"button\"\n onClick={onClick}\n />\n );\n};\n\nexport const PrevButton = ({ enabled, onClick }: IPrevNextButtonPropType) => {\n return (\n <button\n aria-label=\"previous image\"\n className=\"bg-transparent touch-manipulation flex z-10 text-main-70 absolute flex items-center justify-center top-1/2 -translate-y-1/2 w-10 md:w-16 h-10 md:h-16 left-0 disabled:opacity-30\"\n onClick={onClick}\n disabled={!enabled}\n >\n <svg className=\"w-2/3 h-2/3\" viewBox=\"137.718 -1.001 366.563 644\">\n <path\n fill=\"#f9f9f9\"\n d=\"M428.36 12.5c16.67-16.67 43.76-16.67 60.42 0 16.67 16.67 16.67 43.76 0 60.42L241.7 320c148.25 148.24 230.61 230.6 247.08 247.08 16.67 16.66 16.67 43.75 0 60.42-16.67 16.66-43.76 16.67-60.42 0-27.72-27.71-249.45-249.37-277.16-277.08a42.308 42.308 0 0 1-12.48-30.34c0-11.1 4.1-22.05 12.48-30.42C206.63 234.23 400.64 40.21 428.36 12.5z\"\n />\n </svg>\n </button>\n );\n};\n\nexport const NextButton = ({ enabled, onClick }: IPrevNextButtonPropType) => {\n return (\n <button\n aria-label=\"next image\"\n className=\"bg-transparent touch-manipulation flex z-10 text-main-70 absolute flex items-center justify-center top-1/2 -translate-y-1/2 w-10 md:w-16 h-10 md:h-16 right-0 disabled:opacity-30\"\n onClick={onClick}\n disabled={!enabled}\n >\n <svg className=\"w-2/3 h-2/3\" viewBox=\"0 0 238.003 238.003\">\n <path\n fill=\"#f9f9f9\"\n d=\"M181.776 107.719L78.705 4.648c-6.198-6.198-16.273-6.198-22.47 0s-6.198 16.273 0 22.47l91.883 91.883-91.883 91.883c-6.198 6.198-6.198 16.273 0 22.47s16.273 6.198 22.47 0l103.071-103.039a15.741 15.741 0 0 0 4.64-11.283c0-4.13-1.526-8.199-4.64-11.313z\"\n />\n </svg>\n </button>\n );\n};\n","const MODULE_CAROUSEL = \"carousel\";\nconst MODULE_CONTROLLER = \"controller\";\nconst MODULE_NAVIGATION = \"navigation\";\nconst MODULE_NO_SCROLL = \"no-scroll\";\nconst MODULE_PORTAL = \"portal\";\nconst MODULE_ROOT = \"root\";\nconst MODULE_TOOLBAR = \"toolbar\";\nconst PLUGIN_CAPTIONS = \"captions\";\nconst PLUGIN_COUNTER = \"counter\";\nconst PLUGIN_DOWNLOAD = \"download\";\nconst PLUGIN_FULLSCREEN = \"fullscreen\";\nconst PLUGIN_INLINE = \"inline\";\nconst PLUGIN_SHARE = \"share\";\nconst PLUGIN_SLIDESHOW = \"slideshow\";\nconst PLUGIN_THUMBNAILS = \"thumbnails\";\nconst PLUGIN_ZOOM = \"zoom\";\nconst SLIDE_STATUS_LOADING = \"loading\";\nconst SLIDE_STATUS_PLAYING = \"playing\";\nconst SLIDE_STATUS_ERROR = \"error\";\nconst SLIDE_STATUS_COMPLETE = \"complete\";\nconst SLIDE_STATUS_PLACEHOLDER = \"placeholder\";\nconst activeSlideStatus = (status) => `active-slide-${status}`;\nconst ACTIVE_SLIDE_LOADING = activeSlideStatus(SLIDE_STATUS_LOADING);\nconst ACTIVE_SLIDE_PLAYING = activeSlideStatus(SLIDE_STATUS_PLAYING);\nconst ACTIVE_SLIDE_ERROR = activeSlideStatus(SLIDE_STATUS_ERROR);\nconst ACTIVE_SLIDE_COMPLETE = activeSlideStatus(SLIDE_STATUS_COMPLETE);\nconst CLASS_FULLSIZE = \"fullsize\";\nconst CLASS_FLEX_CENTER = \"flex_center\";\nconst CLASS_NO_SCROLL = \"no_scroll\";\nconst CLASS_NO_SCROLL_PADDING = \"no_scroll_padding\";\nconst CLASS_SLIDE_WRAPPER = \"slide_wrapper\";\nconst CLASS_SLIDE_WRAPPER_INTERACTIVE = \"slide_wrapper_interactive\";\nconst ACTION_PREV = \"prev\";\nconst ACTION_NEXT = \"next\";\nconst ACTION_SWIPE = \"swipe\";\nconst ACTION_CLOSE = \"close\";\nconst EVENT_ON_POINTER_DOWN = \"onPointerDown\";\nconst EVENT_ON_POINTER_MOVE = \"onPointerMove\";\nconst EVENT_ON_POINTER_UP = \"onPointerUp\";\nconst EVENT_ON_POINTER_LEAVE = \"onPointerLeave\";\nconst EVENT_ON_POINTER_CANCEL = \"onPointerCancel\";\nconst EVENT_ON_KEY_DOWN = \"onKeyDown\";\nconst EVENT_ON_KEY_UP = \"onKeyUp\";\nconst EVENT_ON_WHEEL = \"onWheel\";\nconst VK_ESCAPE = \"Escape\";\nconst VK_ARROW_LEFT = \"ArrowLeft\";\nconst VK_ARROW_RIGHT = \"ArrowRight\";\nconst ELEMENT_BUTTON = \"button\";\nconst ELEMENT_ICON = \"icon\";\nconst IMAGE_FIT_CONTAIN = \"contain\";\nconst IMAGE_FIT_COVER = \"cover\";\nconst UNKNOWN_ACTION_TYPE = \"Unknown action type\";\n\nexport { ACTION_CLOSE, ACTION_NEXT, ACTION_PREV, ACTION_SWIPE, ACTIVE_SLIDE_COMPLETE, ACTIVE_SLIDE_ERROR, ACTIVE_SLIDE_LOADING, ACTIVE_SLIDE_PLAYING, CLASS_FLEX_CENTER, CLASS_FULLSIZE, CLASS_NO_SCROLL, CLASS_NO_SCROLL_PADDING, CLASS_SLIDE_WRAPPER, CLASS_SLIDE_WRAPPER_INTERACTIVE, ELEMENT_BUTTON, ELEMENT_ICON, EVENT_ON_KEY_DOWN, EVENT_ON_KEY_UP, EVENT_ON_POINTER_CANCEL, EVENT_ON_POINTER_DOWN, EVENT_ON_POINTER_LEAVE, EVENT_ON_POINTER_MOVE, EVENT_ON_POINTER_UP, EVENT_ON_WHEEL, IMAGE_FIT_CONTAIN, IMAGE_FIT_COVER, MODULE_CAROUSEL, MODULE_CONTROLLER, MODULE_NAVIGATION, MODULE_NO_SCROLL, MODULE_PORTAL, MODULE_ROOT, MODULE_TOOLBAR, PLUGIN_CAPTIONS, PLUGIN_COUNTER, PLUGIN_DOWNLOAD, PLUGIN_FULLSCREEN, PLUGIN_INLINE, PLUGIN_SHARE, PLUGIN_SLIDESHOW, PLUGIN_THUMBNAILS, PLUGIN_ZOOM, SLIDE_STATUS_COMPLETE, SLIDE_STATUS_ERROR, SLIDE_STATUS_LOADING, SLIDE_STATUS_PLACEHOLDER, SLIDE_STATUS_PLAYING, UNKNOWN_ACTION_TYPE, VK_ARROW_LEFT, VK_ARROW_RIGHT, VK_ESCAPE, activeSlideStatus };\n","'use client';\nimport * as React from 'react';\nimport { IMAGE_FIT_COVER, IMAGE_FIT_CONTAIN, ACTION_CLOSE, MODULE_CONTROLLER, UNKNOWN_ACTION_TYPE, ELEMENT_BUTTON, ELEMENT_ICON, EVENT_ON_POINTER_DOWN, EVENT_ON_POINTER_MOVE, EVENT_ON_POINTER_UP, EVENT_ON_POINTER_LEAVE, EVENT_ON_POINTER_CANCEL, EVENT_ON_KEY_DOWN, EVENT_ON_KEY_UP, EVENT_ON_WHEEL, SLIDE_STATUS_LOADING, activeSlideStatus, SLIDE_STATUS_COMPLETE, SLIDE_STATUS_ERROR, SLIDE_STATUS_PLACEHOLDER, ACTION_PREV, ACTION_NEXT, ACTION_SWIPE, MODULE_PORTAL, CLASS_FLEX_CENTER, MODULE_CAROUSEL, CLASS_SLIDE_WRAPPER, VK_ARROW_RIGHT, VK_ARROW_LEFT, VK_ESCAPE, MODULE_NAVIGATION, CLASS_NO_SCROLL, CLASS_NO_SCROLL_PADDING, MODULE_NO_SCROLL, MODULE_ROOT, MODULE_TOOLBAR } from './types.js';\nimport { createPortal } from 'react-dom';\nexport { ACTIVE_SLIDE_COMPLETE, ACTIVE_SLIDE_ERROR, ACTIVE_SLIDE_LOADING, ACTIVE_SLIDE_PLAYING, CLASS_FULLSIZE, CLASS_SLIDE_WRAPPER_INTERACTIVE, PLUGIN_CAPTIONS, PLUGIN_COUNTER, PLUGIN_DOWNLOAD, PLUGIN_FULLSCREEN, PLUGIN_INLINE, PLUGIN_SHARE, PLUGIN_SLIDESHOW, PLUGIN_THUMBNAILS, PLUGIN_ZOOM, SLIDE_STATUS_PLAYING } from './types.js';\n\nconst cssPrefix$3 = \"yarl__\";\nfunction clsx(...classes) {\n return [...classes].filter(Boolean).join(\" \");\n}\nfunction cssClass(name) {\n return `${cssPrefix$3}${name}`;\n}\nfunction cssVar(name) {\n return `--${cssPrefix$3}${name}`;\n}\nfunction composePrefix(base, prefix) {\n return `${base}${prefix ? `_${prefix}` : \"\"}`;\n}\nfunction makeComposePrefix(base) {\n return (prefix) => composePrefix(base, prefix);\n}\nfunction label(labels, defaultLabel) {\n var _a;\n return (_a = labels === null || labels === void 0 ? void 0 : labels[defaultLabel]) !== null && _a !== void 0 ? _a : defaultLabel;\n}\nfunction cleanup(...cleaners) {\n return () => {\n cleaners.forEach((cleaner) => {\n cleaner();\n });\n };\n}\nfunction makeUseContext(name, contextName, context) {\n return () => {\n const ctx = React.useContext(context);\n if (!ctx) {\n throw new Error(`${name} must be used within a ${contextName}.Provider`);\n }\n return ctx;\n };\n}\nfunction hasWindow() {\n return typeof window !== \"undefined\";\n}\nfunction round(value, decimals = 0) {\n const factor = 10 ** decimals;\n return Math.round((value + Number.EPSILON) * factor) / factor;\n}\nfunction isImageSlide(slide) {\n return slide.type === undefined || slide.type === \"image\";\n}\nfunction isImageFitCover(image, imageFit) {\n return image.imageFit === IMAGE_FIT_COVER || (image.imageFit !== IMAGE_FIT_CONTAIN && imageFit === IMAGE_FIT_COVER);\n}\nfunction parseInt(value) {\n return typeof value === \"string\" ? Number.parseInt(value, 10) : value;\n}\nfunction parseLengthPercentage(input) {\n if (typeof input === \"number\") {\n return { pixel: input };\n }\n if (typeof input === \"string\") {\n const value = parseInt(input);\n return input.endsWith(\"%\") ? { percent: value } : { pixel: value };\n }\n return { pixel: 0 };\n}\nfunction computeSlideRect(containerRect, padding) {\n const paddingValue = parseLengthPercentage(padding);\n const paddingPixels = paddingValue.percent !== undefined ? (containerRect.width / 100) * paddingValue.percent : paddingValue.pixel;\n return {\n width: Math.max(containerRect.width - 2 * paddingPixels, 0),\n height: Math.max(containerRect.height - 2 * paddingPixels, 0),\n };\n}\nfunction devicePixelRatio() {\n return (hasWindow() ? window === null || window === void 0 ? void 0 : window.devicePixelRatio : undefined) || 1;\n}\nfunction getSlideIndex(index, slidesCount) {\n return slidesCount > 0 ? ((index % slidesCount) + slidesCount) % slidesCount : 0;\n}\nfunction hasSlides(slides) {\n return slides.length > 0;\n}\nfunction getSlide(slides, index) {\n return slides[getSlideIndex(index, slides.length)];\n}\nfunction getSlideIfPresent(slides, index) {\n return hasSlides(slides) ? getSlide(slides, index) : undefined;\n}\nfunction getSlideKey(slide) {\n return isImageSlide(slide) ? slide.src : undefined;\n}\nfunction addToolbarButton(toolbar, key, button) {\n if (!button)\n return toolbar;\n const { buttons, ...restToolbar } = toolbar;\n const index = buttons.findIndex((item) => item === key);\n const buttonWithKey = React.isValidElement(button) ? React.cloneElement(button, { key }, null) : button;\n if (index >= 0) {\n const result = [...buttons];\n result.splice(index, 1, buttonWithKey);\n return { buttons: result, ...restToolbar };\n }\n return { buttons: [buttonWithKey, ...buttons], ...restToolbar };\n}\nfunction stopNavigationEventsPropagation() {\n const stopPropagation = (event) => {\n event.stopPropagation();\n };\n return { onPointerDown: stopPropagation, onKeyDown: stopPropagation, onWheel: stopPropagation };\n}\nfunction calculatePreload(carousel, slides, minimum = 0) {\n return Math.min(carousel.preload, Math.max(carousel.finite ? slides.length - 1 : Math.floor(slides.length / 2), minimum));\n}\nconst isReact19 = Number(React.version.split(\".\")[0]) >= 19;\nfunction makeInertWhen(condition) {\n const legacyValue = condition ? \"\" : undefined;\n return { inert: isReact19 ? condition : legacyValue };\n}\n\nconst LightboxDefaultProps = {\n open: false,\n close: () => { },\n index: 0,\n slides: [],\n render: {},\n plugins: [],\n toolbar: { buttons: [ACTION_CLOSE] },\n labels: {},\n animation: {\n fade: 250,\n swipe: 500,\n easing: {\n fade: \"ease\",\n swipe: \"ease-out\",\n navigation: \"ease-in-out\",\n },\n },\n carousel: {\n finite: false,\n preload: 2,\n padding: \"16px\",\n spacing: \"30%\",\n imageFit: IMAGE_FIT_CONTAIN,\n imageProps: {},\n },\n controller: {\n ref: null,\n focus: true,\n aria: false,\n touchAction: \"none\",\n closeOnPullUp: false,\n closeOnPullDown: false,\n closeOnBackdropClick: false,\n preventDefaultWheelX: true,\n preventDefaultWheelY: false,\n },\n portal: {},\n noScroll: {\n disabled: false,\n },\n on: {},\n styles: {},\n className: \"\",\n};\n\nfunction createModule(name, component) {\n return { name, component };\n}\nfunction createNode(module, children) {\n return { module, children };\n}\nfunction traverseNode(node, target, apply) {\n if (node.module.name === target) {\n return apply(node);\n }\n if (node.children) {\n return [\n createNode(node.module, node.children.flatMap((n) => { var _a; return (_a = traverseNode(n, target, apply)) !== null && _a !== void 0 ? _a : []; })),\n ];\n }\n return [node];\n}\nfunction traverse(nodes, target, apply) {\n return nodes.flatMap((node) => { var _a; return (_a = traverseNode(node, target, apply)) !== null && _a !== void 0 ? _a : []; });\n}\nfunction withPlugins(root, plugins = [], augmentations = []) {\n let config = root;\n const contains = (target) => {\n const nodes = [...config];\n while (nodes.length > 0) {\n const node = nodes.pop();\n if ((node === null || node === void 0 ? void 0 : node.module.name) === target)\n return true;\n if (node === null || node === void 0 ? void 0 : node.children)\n nodes.push(...node.children);\n }\n return false;\n };\n const addParent = (target, module) => {\n if (target === \"\") {\n config = [createNode(module, config)];\n return;\n }\n config = traverse(config, target, (node) => [createNode(module, [node])]);\n };\n const append = (target, module) => {\n config = traverse(config, target, (node) => [createNode(node.module, [createNode(module, node.children)])]);\n };\n const addChild = (target, module, precede) => {\n config = traverse(config, target, (node) => {\n var _a;\n return [\n createNode(node.module, [\n ...(precede ? [createNode(module)] : []),\n ...((_a = node.children) !== null && _a !== void 0 ? _a : []),\n ...(!precede ? [createNode(module)] : []),\n ]),\n ];\n });\n };\n const addSibling = (target, module, precede) => {\n config = traverse(config, target, (node) => [\n ...(precede ? [createNode(module)] : []),\n node,\n ...(!precede ? [createNode(module)] : []),\n ]);\n };\n const addModule = (module) => {\n append(MODULE_CONTROLLER, module);\n };\n const replace = (target, module) => {\n config = traverse(config, target, (node) => [createNode(module, node.children)]);\n };\n const remove = (target) => {\n config = traverse(config, target, (node) => node.children);\n };\n const augment = (augmentation) => {\n augmentations.push(augmentation);\n };\n plugins.forEach((plugin) => {\n plugin({\n contains,\n addParent,\n append,\n addChild,\n addSibling,\n addModule,\n replace,\n remove,\n augment,\n });\n });\n return {\n config,\n augmentation: (props) => augmentations.reduce((acc, augmentation) => augmentation(acc), props),\n };\n}\n\nconst DocumentContext = React.createContext(null);\nconst useDocumentContext = makeUseContext(\"useDocument\", \"DocumentContext\", DocumentContext);\nfunction DocumentContextProvider({ nodeRef, children }) {\n const context = React.useMemo(() => {\n const getOwnerDocument = (node) => { var _a; return ((_a = (node || nodeRef.current)) === null || _a === void 0 ? void 0 : _a.ownerDocument) || document; };\n const getOwnerWindow = (node) => { var _a; return ((_a = getOwnerDocument(node)) === null || _a === void 0 ? void 0 : _a.defaultView) || window; };\n return { getOwnerDocument, getOwnerWindow };\n }, [nodeRef]);\n return React.createElement(DocumentContext.Provider, { value: context }, children);\n}\n\nconst EventsContext = React.createContext(null);\nconst useEvents = makeUseContext(\"useEvents\", \"EventsContext\", EventsContext);\nfunction EventsProvider({ children }) {\n const [subscriptions] = React.useState({});\n React.useEffect(() => () => {\n Object.keys(subscriptions).forEach((topic) => delete subscriptions[topic]);\n }, [subscriptions]);\n const context = React.useMemo(() => {\n const unsubscribe = (topic, callback) => {\n var _a;\n (_a = subscriptions[topic]) === null || _a === void 0 ? void 0 : _a.splice(0, subscriptions[topic].length, ...subscriptions[topic].filter((cb) => cb !== callback));\n };\n const subscribe = (topic, callback) => {\n if (!subscriptions[topic]) {\n subscriptions[topic] = [];\n }\n subscriptions[topic].push(callback);\n return () => unsubscribe(topic, callback);\n };\n const publish = (...[topic, event]) => {\n var _a;\n (_a = subscriptions[topic]) === null || _a === void 0 ? void 0 : _a.forEach((callback) => callback(event));\n };\n return { publish, subscribe, unsubscribe };\n }, [subscriptions]);\n return React.createElement(EventsContext.Provider, { value: context }, children);\n}\n\nconst LightboxPropsContext = React.createContext(null);\nconst useLightboxProps = makeUseContext(\"useLightboxProps\", \"LightboxPropsContext\", LightboxPropsContext);\nfunction LightboxPropsProvider({ children, ...props }) {\n return React.createElement(LightboxPropsContext.Provider, { value: props }, children);\n}\n\nconst LightboxStateContext = React.createContext(null);\nconst useLightboxState = makeUseContext(\"useLightboxState\", \"LightboxStateContext\", LightboxStateContext);\nconst LightboxDispatchContext = React.createContext(null);\nconst useLightboxDispatch = makeUseContext(\"useLightboxDispatch\", \"LightboxDispatchContext\", LightboxDispatchContext);\nfunction reducer(state, action) {\n switch (action.type) {\n case \"swipe\": {\n const { slides } = state;\n const increment = (action === null || action === void 0 ? void 0 : action.increment) || 0;\n const globalIndex = state.globalIndex + increment;\n const currentIndex = getSlideIndex(globalIndex, slides.length);\n const currentSlide = getSlideIfPresent(slides, currentIndex);\n const animation = increment || action.duration\n ? {\n increment,\n duration: action.duration,\n easing: action.easing,\n }\n : undefined;\n return { slides, currentIndex, globalIndex, currentSlide, animation };\n }\n case \"update\":\n if (action.slides !== state.slides || action.index !== state.currentIndex) {\n return {\n slides: action.slides,\n currentIndex: action.index,\n globalIndex: action.index,\n currentSlide: getSlideIfPresent(action.slides, action.index),\n };\n }\n return state;\n default:\n throw new Error(UNKNOWN_ACTION_TYPE);\n }\n}\nfunction LightboxStateProvider({ slides, index, children }) {\n const [state, dispatch] = React.useReducer(reducer, {\n slides,\n currentIndex: index,\n globalIndex: index,\n currentSlide: getSlideIfPresent(slides, index),\n });\n React.useEffect(() => {\n dispatch({ type: \"update\", slides, index });\n }, [slides, index]);\n const context = React.useMemo(() => ({ ...state, state, dispatch }), [state, dispatch]);\n return (React.createElement(LightboxDispatchContext.Provider, { value: dispatch },\n React.createElement(LightboxStateContext.Provider, { value: context }, children)));\n}\n\nconst TimeoutsContext = React.createContext(null);\nconst useTimeouts = makeUseContext(\"useTimeouts\", \"TimeoutsContext\", TimeoutsContext);\nfunction TimeoutsProvider({ children }) {\n const [timeouts] = React.useState([]);\n React.useEffect(() => () => {\n timeouts.forEach((tid) => window.clearTimeout(tid));\n timeouts.splice(0, timeouts.length);\n }, [timeouts]);\n const context = React.useMemo(() => {\n const removeTimeout = (id) => {\n timeouts.splice(0, timeouts.length, ...timeouts.filter((tid) => tid !== id));\n };\n const setTimeout = (fn, delay) => {\n const id = window.setTimeout(() => {\n removeTimeout(id);\n fn();\n }, delay);\n timeouts.push(id);\n return id;\n };\n const clearTimeout = (id) => {\n if (id !== undefined) {\n removeTimeout(id);\n window.clearTimeout(id);\n }\n };\n return { setTimeout, clearTimeout };\n }, [timeouts]);\n return React.createElement(TimeoutsContext.Provider, { value: context }, children);\n}\n\nconst IconButton = React.forwardRef(function IconButton({ label: label$1, className, icon: Icon, renderIcon, onClick, style, ...rest }, ref) {\n const { styles, labels } = useLightboxProps();\n const buttonLabel = label(labels, label$1);\n return (React.createElement(\"button\", { ref: ref, type: \"button\", title: buttonLabel, \"aria-label\": buttonLabel, className: clsx(cssClass(ELEMENT_BUTTON), className), onClick: onClick, style: { ...style, ...styles.button }, ...rest }, renderIcon ? renderIcon() : React.createElement(Icon, { className: cssClass(ELEMENT_ICON), style: styles.icon })));\n});\n\nfunction svgIcon(name, children) {\n const icon = (props) => (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", width: \"24\", height: \"24\", \"aria-hidden\": \"true\", focusable: \"false\", ...props }, children));\n icon.displayName = name;\n return icon;\n}\nfunction createIcon(name, glyph) {\n return svgIcon(name, React.createElement(\"g\", { fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" }),\n glyph));\n}\nfunction createIconDisabled(name, glyph) {\n return svgIcon(name, React.createElement(React.Fragment, null,\n React.createElement(\"defs\", null,\n React.createElement(\"mask\", { id: \"strike\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"white\" }),\n React.createElement(\"path\", { d: \"M0 0L24 24\", stroke: \"black\", strokeWidth: 4 }))),\n React.createElement(\"path\", { d: \"M0.70707 2.121320L21.878680 23.292883\", stroke: \"currentColor\", strokeWidth: 2 }),\n React.createElement(\"g\", { fill: \"currentColor\", mask: \"url(#strike)\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" }),\n glyph)));\n}\nconst CloseIcon = createIcon(\"Close\", React.createElement(\"path\", { d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" }));\nconst PreviousIcon = createIcon(\"Previous\", React.createElement(\"path\", { d: \"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" }));\nconst NextIcon = createIcon(\"Next\", React.createElement(\"path\", { d: \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" }));\nconst LoadingIcon = createIcon(\"Loading\", React.createElement(React.Fragment, null, Array.from({ length: 8 }).map((_, index, array) => (React.createElement(\"line\", { key: index, x1: \"12\", y1: \"6.5\", x2: \"12\", y2: \"1.8\", strokeLinecap: \"round\", strokeWidth: \"2.6\", stroke: \"currentColor\", strokeOpacity: (1 / array.length) * (index + 1), transform: `rotate(${(360 / array.length) * index}, 12, 12)` })))));\nconst ErrorIcon = createIcon(\"Error\", React.createElement(\"path\", { d: \"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z\" }));\n\nconst useLayoutEffect = hasWindow() ? React.useLayoutEffect : React.useEffect;\n\nfunction useMotionPreference() {\n const [reduceMotion, setReduceMotion] = React.useState(false);\n React.useEffect(() => {\n var _a, _b;\n const mediaQuery = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, \"(prefers-reduced-motion: reduce)\");\n setReduceMotion(mediaQuery === null || mediaQuery === void 0 ? void 0 : mediaQuery.matches);\n const listener = (event) => setReduceMotion(event.matches);\n (_b = mediaQuery === null || mediaQuery === void 0 ? void 0 : mediaQuery.addEventListener) === null || _b === void 0 ? void 0 : _b.call(mediaQuery, \"change\", listener);\n return () => { var _a; return (_a = mediaQuery === null || mediaQuery === void 0 ? void 0 : mediaQuery.removeEventListener) === null || _a === void 0 ? void 0 : _a.call(mediaQuery, \"change\", listener); };\n }, []);\n return reduceMotion;\n}\n\nfunction currentTransformation(node) {\n let x = 0;\n let y = 0;\n let z = 0;\n const matrix = window.getComputedStyle(node).transform;\n const matcher = matrix.match(/matrix.*\\((.+)\\)/);\n if (matcher) {\n const values = matcher[1].split(\",\").map(parseInt);\n if (values.length === 6) {\n x = values[4];\n y = values[5];\n }\n else if (values.length === 16) {\n x = values[12];\n y = values[13];\n z = values[14];\n }\n }\n return { x, y, z };\n}\nfunction useAnimation(nodeRef, computeAnimation) {\n const snapshot = React.useRef();\n const animation = React.useRef();\n const reduceMotion = useMotionPreference();\n useLayoutEffect(() => {\n var _a, _b, _c;\n if (nodeRef.current && snapshot.current !== undefined && !reduceMotion) {\n const { keyframes, duration, easing, onfinish } = computeAnimation(snapshot.current, nodeRef.current.getBoundingClientRect(), currentTransformation(nodeRef.current)) || {};\n if (keyframes && duration) {\n (_a = animation.current) === null || _a === void 0 ? void 0 : _a.cancel();\n animation.current = undefined;\n try {\n animation.current = (_c = (_b = nodeRef.current).animate) === null || _c === void 0 ? void 0 : _c.call(_b, keyframes, { duration, easing });\n }\n catch (err) {\n console.error(err);\n }\n if (animation.current) {\n animation.current.onfinish = () => {\n animation.current = undefined;\n onfinish === null || onfinish === void 0 ? void 0 : onfinish();\n };\n }\n }\n }\n snapshot.current = undefined;\n });\n return {\n prepareAnimation: (currentSnapshot) => {\n snapshot.current = currentSnapshot;\n },\n isAnimationPlaying: () => { var _a; return ((_a = animation.current) === null || _a === void 0 ? void 0 : _a.playState) === \"running\"; },\n };\n}\n\nfunction useContainerRect() {\n const containerRef = React.useRef(null);\n const observerRef = React.useRef();\n const [containerRect, setContainerRect] = React.useState();\n const setContainerRef = React.useCallback((node) => {\n containerRef.current = node;\n if (observerRef.current) {\n observerRef.current.disconnect();\n observerRef.current = undefined;\n }\n const updateContainerRect = () => {\n if (node) {\n const styles = window.getComputedStyle(node);\n const parse = (value) => parseFloat(value) || 0;\n setContainerRect({\n width: Math.round(node.clientWidth - parse(styles.paddingLeft) - parse(styles.paddingRight)),\n height: Math.round(node.clientHeight - parse(styles.paddingTop) - parse(styles.paddingBottom)),\n });\n }\n else {\n setContainerRect(undefined);\n }\n };\n updateContainerRect();\n if (node && typeof ResizeObserver !== \"undefined\") {\n observerRef.current = new ResizeObserver(updateContainerRect);\n observerRef.current.observe(node);\n }\n }, []);\n return { setContainerRef, containerRef, containerRect };\n}\n\nfunction useDelay() {\n const timeoutId = React.useRef();\n const { setTimeout, clearTimeout } = useTimeouts();\n return React.useCallback((callback, delay) => {\n clearTimeout(timeoutId.current);\n timeoutId.current = setTimeout(callback, delay > 0 ? delay : 0);\n }, [setTimeout, clearTimeout]);\n}\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useLayoutEffect(() => {\n ref.current = fn;\n });\n return React.useCallback((...args) => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.call(ref, ...args); }, []);\n}\n\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n}\nfunction useForkRef(refA, refB) {\n return React.useMemo(() => refA == null && refB == null\n ? null\n : (refValue) => {\n setRef(refA, refValue);\n setRef(refB, refValue);\n }, [refA, refB]);\n}\n\nfunction useLoseFocus(focus, disabled = false) {\n const focused = React.useRef();\n useLayoutEffect(() => {\n if (disabled && focused.current) {\n focused.current = false;\n focus();\n }\n }, [disabled, focus]);\n const onFocus = React.useCallback(() => {\n focused.current = true;\n }, []);\n const onBlur = React.useCallback(() => {\n focused.current = false;\n }, []);\n return { onFocus, onBlur };\n}\n\nfunction useRTL() {\n const [isRTL, setIsRTL] = React.useState(false);\n useLayoutEffect(() => {\n setIsRTL(window.getComputedStyle(window.document.documentElement).direction === \"rtl\");\n }, []);\n return isRTL;\n}\n\nfunction useSensors() {\n const [subscribers] = React.useState({});\n const notifySubscribers = React.useCallback((type, event) => {\n var _a;\n (_a = subscribers[type]) === null || _a === void 0 ? void 0 : _a.forEach((listener) => {\n if (!event.isPropagationStopped())\n listener(event);\n });\n }, [subscribers]);\n const registerSensors = React.useMemo(() => ({\n onPointerDown: (event) => notifySubscribers(EVENT_ON_POINTER_DOWN, event),\n onPointerMove: (event) => notifySubscribers(EVENT_ON_POINTER_MOVE, event),\n onPointerUp: (event) => notifySubscribers(EVENT_ON_POINTER_UP, event),\n onPointerLeave: (event) => notifySubscribers(EVENT_ON_POINTER_LEAVE, event),\n onPointerCancel: (event) => notifySubscribers(EVENT_ON_POINTER_CANCEL, event),\n onKeyDown: (event) => notifySubscribers(EVENT_ON_KEY_DOWN, event),\n onKeyUp: (event) => notifySubscribers(EVENT_ON_KEY_UP, event),\n onWheel: (event) => notifySubscribers(EVENT_ON_WHEEL, event),\n }), [notifySubscribers]);\n const subscribeSensors = React.useCallback((type, callback) => {\n if (!subscribers[type]) {\n subscribers[type] = [];\n }\n subscribers[type].unshift(callback);\n return () => {\n const listeners = subscribers[type];\n if (listeners) {\n listeners.splice(0, listeners.length, ...listeners.filter((el) => el !== callback));\n }\n };\n }, [subscribers]);\n return { registerSensors, subscribeSensors };\n}\n\nfunction useThrottle(callback, delay) {\n const lastCallbackTime = React.useRef(0);\n const delayCallback = useDelay();\n const executeCallback = useEventCallback((...args) => {\n lastCallbackTime.current = Date.now();\n callback(args);\n });\n return React.useCallback((...args) => {\n delayCallback(() => {\n executeCallback(args);\n }, delay - (Date.now() - lastCallbackTime.current));\n }, [delay, executeCallback, delayCallback]);\n}\n\nconst slidePrefix = makeComposePrefix(\"slide\");\nconst slideImagePrefix = makeComposePrefix(\"slide_image\");\nfunction ImageSlide({ slide: image, offset, render, rect, imageFit, imageProps, onClick, onLoad, onError, style, }) {\n var _a, _b, _c, _d, _e, _f, _g;\n const [status, setStatus] = React.useState(SLIDE_STATUS_LOADING);\n const { publish } = useEvents();\n const { setTimeout } = useTimeouts();\n const imageRef = React.useRef(null);\n React.useEffect(() => {\n if (offset === 0) {\n publish(activeSlideStatus(status));\n }\n }, [offset, status, publish]);\n const handleLoading = useEventCallback((img) => {\n (\"decode\" in img ? img.decode() : Promise.resolve())\n .catch(() => { })\n .then(() => {\n if (!img.parentNode) {\n return;\n }\n setStatus(SLIDE_STATUS_COMPLETE);\n setTimeout(() => {\n onLoad === null || onLoad === void 0 ? void 0 : onLoad(img);\n }, 0);\n });\n });\n const setImageRef = React.useCallback((img) => {\n imageRef.current = img;\n if (img === null || img === void 0 ? void 0 : img.complete) {\n handleLoading(img);\n }\n }, [handleLoading]);\n const handleOnLoad = React.useCallback((event) => {\n handleLoading(event.currentTarget);\n }, [handleLoading]);\n const handleOnError = useEventCallback(() => {\n setStatus(SLIDE_STATUS_ERROR);\n onError === null || onError === void 0 ? void 0 : onError();\n });\n const cover = isImageFitCover(image, imageFit);\n const nonInfinite = (value, fallback) => (Number.isFinite(value) ? value : fallback);\n const maxWidth = nonInfinite(Math.max(...((_b = (_a = image.srcSet) === null || _a === void 0 ? void 0 : _a.map((x) => x.width)) !== null && _b !== void 0 ? _b : []).concat(image.width ? [image.width] : []).filter(Boolean)), ((_c = imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalWidth) || 0);\n const maxHeight = nonInfinite(Math.max(...((_e = (_d = image.srcSet) === null || _d === void 0 ? void 0 : _d.map((x) => x.height)) !== null && _e !== void 0 ? _e : []).concat(image.height ? [image.height] : []).filter(Boolean)), ((_f = imageRef.current) === null || _f === void 0 ? void 0 : _f.naturalHeight) || 0);\n const defaultStyle = maxWidth && maxHeight\n ? {\n maxWidth: `min(${maxWidth}px, 100%)`,\n maxHeight: `min(${maxHeight}px, 100%)`,\n }\n : {\n maxWidth: \"100%\",\n maxHeight: \"100%\",\n };\n const srcSet = (_g = image.srcSet) === null || _g === void 0 ? void 0 : _g.sort((a, b) => a.width - b.width).map((item) => `${item.src} ${item.width}w`).join(\", \");\n const estimateActualWidth = () => rect && !cover && image.width && image.height ? (rect.height / image.height) * image.width : Number.MAX_VALUE;\n const sizes = srcSet && rect && hasWindow() ? `${Math.round(Math.min(estimateActualWidth(), rect.width))}px` : undefined;\n const { style: imagePropsStyle, className: imagePropsClassName, ...restImageProps } = imageProps || {};\n return (React.createElement(React.Fragment, null,\n React.createElement(\"img\", { ref: setImageRef, onLoad: handleOnLoad, onError: handleOnError, onClick: onClick, draggable: false, className: clsx(cssClass(slideImagePrefix()), cover && cssClass(slideImagePrefix(\"cover\")), status !== SLIDE_STATUS_COMPLETE && cssClass(slideImagePrefix(\"loading\")), imagePropsClassName), style: { ...defaultStyle, ...style, ...imagePropsStyle }, ...restImageProps, alt: image.alt, sizes: sizes, srcSet: srcSet, src: image.src }),\n status !== SLIDE_STATUS_COMPLETE && (React.createElement(\"div\", { className: cssClass(slidePrefix(SLIDE_STATUS_PLACEHOLDER)) },\n status === SLIDE_STATUS_LOADING &&\n ((render === null || render === void 0 ? void 0 : render.iconLoading) ? (render.iconLoading()) : (React.createElement(LoadingIcon, { className: clsx(cssClass(ELEMENT_ICON), cssClass(slidePrefix(SLIDE_STATUS_LOADING))) }))),\n status === SLIDE_STATUS_ERROR &&\n ((render === null || render === void 0 ? void 0 : render.iconError) ? (render.iconError()) : (React.createElement(ErrorIcon, { className: clsx(cssClass(ELEMENT_ICON), cssClass(slidePrefix(SLIDE_STATUS_ERROR))) })))))));\n}\n\nconst LightboxRoot = React.forwardRef(function LightboxRoot({ className, children, ...rest }, ref) {\n const nodeRef = React.useRef(null);\n return (React.createElement(DocumentContextProvider, { nodeRef: nodeRef },\n React.createElement(\"div\", { ref: useForkRef(ref, nodeRef), className: clsx(cssClass(\"root\"), className), ...rest }, children)));\n});\n\nvar SwipeState;\n(function (SwipeState) {\n SwipeState[SwipeState[\"NONE\"] = 0] = \"NONE\";\n SwipeState[SwipeState[\"SWIPE\"] = 1] = \"SWIPE\";\n SwipeState[SwipeState[\"PULL\"] = 2] = \"PULL\";\n SwipeState[SwipeState[\"ANIMATION\"] = 3] = \"ANIMATION\";\n})(SwipeState || (SwipeState = {}));\n\nfunction usePointerEvents(subscribeSensors, onPointerDown, onPointerMove, onPointerUp, disabled) {\n React.useEffect(() => !disabled\n ? cleanup(subscribeSensors(EVENT_ON_POINTER_DOWN, onPointerDown), subscribeSensors(EVENT_ON_POINTER_MOVE, onPointerMove), subscribeSensors(EVENT_ON_POINTER_UP, onPointerUp), subscribeSensors(EVENT_ON_POINTER_LEAVE, onPointerUp), subscribeSensors(EVENT_ON_POINTER_CANCEL, onPointerUp))\n : () => { }, [subscribeSensors, onPointerDown, onPointerMove, onPointerUp, disabled]);\n}\n\nvar Gesture;\n(function (Gesture) {\n Gesture[Gesture[\"NONE\"] = 0] = \"NONE\";\n Gesture[Gesture[\"SWIPE\"] = 1] = \"SWIPE\";\n Gesture[Gesture[\"PULL\"] = 2] = \"PULL\";\n})(Gesture || (Gesture = {}));\nconst SWIPE_THRESHOLD = 30;\nfunction usePointerSwipe(subscribeSensors, isSwipeValid, containerWidth, swipeAnimationDuration, onSwipeStart, onSwipeProgress, onSwipeFinish, onSwipeCancel, pullUpEnabled, pullDownEnabled, onPullStart, onPullProgress, onPullFinish, onPullCancel) {\n const offset = React.useRef(0);\n const pointers = React.useRef([]);\n const activePointer = React.useRef();\n const startTime = React.useRef(0);\n const gesture = React.useRef(Gesture.NONE);\n const clearPointer = React.useCallback((event) => {\n if (activePointer.current === event.pointerId) {\n activePointer.current = undefined;\n gesture.current = Gesture.NONE;\n }\n const currentPointers = pointers.current;\n currentPointers.splice(0, currentPointers.length, ...currentPointers.filter((p) => p.pointerId !== event.pointerId));\n }, []);\n const addPointer = React.useCallback((event) => {\n clearPointer(event);\n event.persist();\n pointers.current.push(event);\n }, [clearPointer]);\n const onPointerDown = useEventCallback((event) => {\n addPointer(event);\n });\n const exceedsPullThreshold = (value, threshold) => (pullDownEnabled && value > threshold) || (pullUpEnabled && value < -threshold);\n const onPointerUp = useEventCallback((event) => {\n if (pointers.current.find((x) => x.pointerId === event.pointerId) && activePointer.current === event.pointerId) {\n const duration = Date.now() - startTime.current;\n const currentOffset = offset.current;\n if (gesture.current === Gesture.SWIPE) {\n if (Math.abs(currentOffset) > 0.3 * containerWidth ||\n (Math.abs(currentOffset) > 5 && duration < swipeAnimationDuration)) {\n onSwipeFinish(currentOffset, duration);\n }\n else {\n onSwipeCancel(currentOffset);\n }\n }\n else if (gesture.current === Gesture.PULL) {\n if (exceedsPullThreshold(currentOffset, 2 * SWIPE_THRESHOLD)) {\n onPullFinish(currentOffset, duration);\n }\n else {\n onPullCancel(currentOffset);\n }\n }\n offset.current = 0;\n gesture.current = Gesture.NONE;\n }\n clearPointer(event);\n });\n const onPointerMove = useEventCallback((event) => {\n const pointer = pointers.current.find((p) => p.pointerId === event.pointerId);\n if (pointer) {\n const isCurrentPointer = activePointer.current === event.pointerId;\n if (event.buttons === 0) {\n if (isCurrentPointer && offset.current !== 0) {\n onPointerUp(event);\n }\n else {\n clearPointer(pointer);\n }\n return;\n }\n const deltaX = event.clientX - pointer.clientX;\n const deltaY = event.clientY - pointer.clientY;\n if (activePointer.current === undefined) {\n const startGesture = (newGesture) => {\n addPointer(event);\n activePointer.current = event.pointerId;\n startTime.current = Date.now();\n gesture.current = newGesture;\n };\n if (Math.abs(deltaX) > Math.abs(deltaY) && Math.abs(deltaX) > SWIPE_THRESHOLD && isSwipeValid(deltaX)) {\n startGesture(Gesture.SWIPE);\n onSwipeStart();\n }\n else if (Math.abs(deltaY) > Math.abs(deltaX) && exceedsPullThreshold(deltaY, SWIPE_THRESHOLD)) {\n startGesture(Gesture.PULL);\n onPullStart();\n }\n }\n else if (isCurrentPointer) {\n if (gesture.current === Gesture.SWIPE) {\n offset.current = deltaX;\n onSwipeProgress(deltaX);\n }\n else if (gesture.current === Gesture.PULL) {\n offset.current = deltaY;\n onPullProgress(deltaY);\n }\n }\n }\n });\n usePointerEvents(subscribeSensors, onPointerDown, onPointerMove, onPointerUp);\n}\n\nfunction usePreventWheelDefaults({ preventDefaultWheelX, preventDefaultWheelY, }) {\n const ref = React.useRef(null);\n const listener = useEventCallback((event) => {\n const horizontal = Math.abs(event.deltaX) > Math.abs(event.deltaY);\n if ((horizontal && preventDefaultWheelX) || (!horizontal && preventDefaultWheelY) || event.ctrlKey) {\n event.preventDefault();\n }\n });\n return React.useCallback((node) => {\n var _a;\n if (node) {\n node.addEventListener(\"wheel\", listener, { passive: false });\n }\n else {\n (_a = ref.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"wheel\", listener);\n }\n ref.current = node;\n }, [listener]);\n}\n\nfunction useWheelSwipe(swipeState, subscribeSensors, isSwipeValid, containerWidth, swipeAnimationDuration, onSwipeStart, onSwipeProgress, onSwipeFinish, onSwipeCancel) {\n const offset = React.useRef(0);\n const intent = React.useRef(0);\n const intentCleanup = React.useRef();\n const resetCleanup = React.useRef();\n const wheelInertia = React.useRef(0);\n const wheelInertiaCleanup = React.useRef();\n const startTime = React.useRef(0);\n const { setTimeout, clearTimeout } = useTimeouts();\n const cancelSwipeIntentCleanup = React.useCallback(() => {\n if (intentCleanup.current) {\n clearTimeout(intentCleanup.current);\n intentCleanup.current = undefined;\n }\n }, [clearTimeout]);\n const cancelSwipeResetCleanup = React.useCallback(() => {\n if (resetCleanup.current) {\n clearTimeout(resetCleanup.current);\n resetCleanup.current = undefined;\n }\n }, [clearTimeout]);\n const handleCleanup = useEventCallback(() => {\n if (swipeState !== SwipeState.SWIPE) {\n offset.current = 0;\n startTime.current = 0;\n cancelSwipeIntentCleanup();\n cancelSwipeResetCleanup();\n }\n });\n React.useEffect(handleCleanup, [swipeState, handleCleanup]);\n const handleCancelSwipe = useEventCallback((currentSwipeOffset) => {\n resetCleanup.current = undefined;\n if (offset.current === currentSwipeOffset) {\n onSwipeCancel(offset.current);\n }\n });\n const onWheel = useEventCallback((event) => {\n if (event.ctrlKey) {\n return;\n }\n if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) {\n return;\n }\n const setWheelInertia = (inertia) => {\n wheelInertia.current = inertia;\n clearTimeout(wheelInertiaCleanup.current);\n wheelInertiaCleanup.current =\n inertia > 0\n ? setTimeout(() => {\n wheelInertia.current = 0;\n wheelInertiaCleanup.current = undefined;\n }, 300)\n : undefined;\n };\n if (swipeState === SwipeState.NONE) {\n if (Math.abs(event.deltaX) <= 1.2 * Math.abs(wheelInertia.current)) {\n setWheelInertia(event.deltaX);\n return;\n }\n if (!isSwipeValid(-event.deltaX)) {\n return;\n }\n intent.current += event.deltaX;\n cancelSwipeIntentCleanup();\n if (Math.abs(intent.current) > 30) {\n intent.current = 0;\n setWheelInertia(0);\n startTime.current = Date.now();\n onSwipeStart();\n }\n else {\n const currentSwipeIntent = intent.current;\n intentCleanup.current = setTimeout(() => {\n intentCleanup.current = undefined;\n if (currentSwipeIntent === intent.current) {\n intent.current = 0;\n }\n }, swipeAnimationDuration);\n }\n }\n else if (swipeState === SwipeState.SWIPE) {\n let newSwipeOffset = offset.current - event.deltaX;\n newSwipeOffset = Math.min(Math.abs(newSwipeOffset), containerWidth) * Math.sign(newSwipeOffset);\n offset.current = newSwipeOffset;\n onSwipeProgress(newSwipeOffset);\n cancelSwipeResetCleanup();\n if (Math.abs(newSwipeOffset) > 0.2 * containerWidth) {\n setWheelInertia(event.deltaX);\n onSwipeFinish(newSwipeOffset, Date.now() - startTime.current);\n return;\n }\n resetCleanup.current = setTimeout(() => handleCancelSwipe(newSwipeOffset), 2 * swipeAnimationDuration);\n }\n else {\n setWheelInertia(event.deltaX);\n }\n });\n React.useEffect(() => subscribeSensors(EVENT_ON_WHEEL, onWheel), [subscribeSensors, onWheel]);\n}\n\nconst cssContainerPrefix = makeComposePrefix(\"container\");\nconst ControllerContext = React.createContext(null);\nconst useController = makeUseContext(\"useController\", \"ControllerContext\", ControllerContext);\nfunction Controller({ children, ...props }) {\n var _a;\n const { carousel, animation, controller, on, styles, render } = props;\n const { closeOnPullUp, closeOnPullDown, preventDefaultWheelX, preventDefaultWheelY } = controller;\n const [toolbarWidth, setToolbarWidth] = React.useState();\n const state = useLightboxState();\n const dispatch = useLightboxDispatch();\n const [swipeState, setSwipeState] = React.useState(SwipeState.NONE);\n const swipeOffset = React.useRef(0);\n const pullOffset = React.useRef(0);\n const pullOpacity = React.useRef(1);\n const { registerSensors, subscribeSensors } = useSensors();\n const { subscribe, publish } = useEvents();\n const cleanupAnimationIncrement = useDelay();\n const cleanupSwipeOffset = useDelay();\n const cleanupPullOffset = useDelay();\n const { containerRef, setContainerRef, containerRect } = useContainerRect();\n const handleContainerRef = useForkRef(usePreventWheelDefaults({ preventDefaultWheelX, preventDefaultWheelY }), setContainerRef);\n const carouselRef = React.useRef(null);\n const setCarouselRef = useForkRef(carouselRef, undefined);\n const { getOwnerDocument } = useDocumentContext();\n const isRTL = useRTL();\n const rtl = (value) => (isRTL ? -1 : 1) * (typeof value === \"number\" ? value : 1);\n const focus = useEventCallback(() => { var _a; return (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });\n const getLightboxProps = useEventCallback(() => props);\n const getLightboxState = useEventCallback(() => state);\n const prev = React.useCallback((params) => publish(ACTION_PREV, params), [publish]);\n const next = React.useCallback((params) => publish(ACTION_NEXT, params), [publish]);\n const close = React.useCallback(() => publish(ACTION_CLOSE), [publish]);\n const isSwipeValid = (offset) => !(carousel.finite &&\n ((rtl(offset) > 0 && state.currentIndex === 0) ||\n (rtl(offset) < 0 && state.currentIndex === state.slides.length - 1)));\n const setSwipeOffset = (offset) => {\n var _a;\n swipeOffset.current = offset;\n (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty(cssVar(\"swipe_offset\"), `${Math.round(offset)}px`);\n };\n const setPullOffset = (offset) => {\n var _a, _b;\n pullOffset.current = offset;\n pullOpacity.current = (() => {\n const threshold = 60;\n const minOpacity = 0.5;\n const offsetValue = (() => {\n if (closeOnPullDown && offset > 0)\n return offset;\n if (closeOnPullUp && offset < 0)\n return -offset;\n return 0;\n })();\n return Math.min(Math.max(round(1 - (offsetValue / threshold) * (1 - minOpacity), 2), minOpacity), 1);\n })();\n (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty(cssVar(\"pull_offset\"), `${Math.round(offset)}px`);\n (_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.style.setProperty(cssVar(\"pull_opacity\"), `${pullOpacity.current}`);\n };\n const { prepareAnimation: preparePullAnimation } = useAnimation(carouselRef, (snapshot, rect, translate) => {\n if (carouselRef.current && containerRect) {\n return {\n keyframes: [\n {\n transform: `translate(0, ${snapshot.rect.y - rect.y + translate.y}px)`,\n opacity: snapshot.opacity,\n },\n { transform: \"translate(0, 0)\", opacity: 1 },\n ],\n duration: snapshot.duration,\n easing: animation.easing.fade,\n };\n }\n return undefined;\n });\n const pull = (offset, cancel) => {\n if (closeOnPullUp || closeOnPullDown) {\n setPullOffset(offset);\n let duration = 0;\n if (carouselRef.current) {\n duration = animation.fade * (cancel ? 2 : 1);\n preparePullAnimation({\n rect: carouselRef.current.getBoundingClientRect(),\n opacity: pullOpacity.current,\n duration,\n });\n }\n cleanupPullOffset(() => {\n setPullOffset(0);\n setSwipeState(SwipeState.NONE);\n }, duration);\n setSwipeState(SwipeState.ANIMATION);\n if (!cancel) {\n close();\n }\n }\n };\n const { prepareAnimation, isAnimationPlaying } = useAnimation(carouselRef, (snapshot, rect, translate) => {\n var _a;\n if (carouselRef.current && containerRect && ((_a = state.animation) === null || _a === void 0 ? void 0 : _a.duration)) {\n const parsedSpacing = parseLengthPercentage(carousel.spacing);\n const spacingValue = (parsedSpacing.percent ? (parsedSpacing.percent * containerRect.width) / 100 : parsedSpacing.pixel) || 0;\n return {\n keyframes: [\n {\n transform: `translate(${rtl(state.globalIndex - snapshot.index) * (containerRect.width + spacingValue) +\n snapshot.rect.x -\n rect.x +\n translate.x}px, 0)`,\n },\n { transform: \"translate(0, 0)\" },\n ],\n duration: state.animation.duration,\n easing: state.animation.easing,\n };\n }\n return undefined;\n });\n const swipe = useEventCallback((action) => {\n var _a, _b;\n const currentSwipeOffset = action.offset || 0;\n const swipeDuration = !currentSwipeOffset ? ((_a = animation.navigation) !== null && _a !== void 0 ? _a : animation.swipe) : animation.swipe;\n const swipeEasing = !currentSwipeOffset && !isAnimationPlaying() ? animation.easing.navigation : animation.easing.swipe;\n let { direction } = action;\n const count = (_b = action.count) !== null && _b !== void 0 ? _b : 1;\n let newSwipeState = SwipeState.ANIMATION;\n let newSwipeAnimationDuration = swipeDuration * count;\n if (!direction) {\n const containerWidth = containerRect === null || containerRect === void 0 ? void 0 : containerRect.width;\n const elapsedTime = action.duration || 0;\n const expectedTime = containerWidth\n ? (swipeDuration / containerWidth) * Math.abs(currentSwipeOffset)\n : swipeDuration;\n if (count !== 0) {\n if (elapsedTime < expectedTime) {\n newSwipeAnimationDuration =\n (newSwipeAnimationDuration / expectedTime) * Math.max(elapsedTime, expectedTime / 5);\n }\n else if (containerWidth) {\n newSwipeAnimationDuration =\n (swipeDuration / containerWidth) * (containerWidth - Math.abs(currentSwipeOffset));\n }\n direction = rtl(currentSwipeOffset) > 0 ? ACTION_PREV : ACTION_NEXT;\n }\n else {\n newSwipeAnimationDuration = swipeDuration / 2;\n }\n }\n let increment = 0;\n if (direction === ACTION_PREV) {\n if (isSwipeValid(rtl(1))) {\n increment = -count;\n }\n else {\n newSwipeState = SwipeState.NONE;\n newSwipeAnimationDuration = swipeDuration;\n }\n }\n else if (direction === ACTION_NEXT) {\n if (isSwipeValid(rtl(-1))) {\n increment = count;\n }\n else {\n newSwipeState = SwipeState.NONE;\n newSwipeAnimationDuration = swipeDuration;\n }\n }\n newSwipeAnimationDuration = Math.round(newSwipeAnimationDuration);\n cleanupSwipeOffset(() => {\n setSwipeOffset(0);\n setSwipeState(SwipeState.NONE);\n }, newSwipeAnimationDuration);\n if (carouselRef.current) {\n prepareAnimation({\n rect: carouselRef.current.getBoundingClientRect(),\n index: state.globalIndex,\n });\n }\n setSwipeState(newSwipeState);\n publish(ACTION_SWIPE, {\n type: \"swipe\",\n increment,\n duration: newSwipeAnimationDuration,\n easing: swipeEasing,\n });\n });\n React.useEffect(() => {\n var _a, _b;\n if (((_a = state.animation) === null || _a === void 0 ? void 0 : _a.increment) && ((_b = state.animation) === null || _b === void 0 ? void 0 : _b.duration)) {\n cleanupAnimationIncrement(() => dispatch({ type: \"swipe\", increment: 0 }), state.animation.duration);\n }\n }, [state.animation, dispatch, cleanupAnimationIncrement]);\n const swipeParams = [\n subscribeSensors,\n isSwipeValid,\n (containerRect === null || containerRect === void 0 ? void 0 : containerRect.width) || 0,\n animation.swipe,\n () => setSwipeState(SwipeState.SWIPE),\n (offset) => setSwipeOffset(offset),\n (offset, duration) => swipe({ offset, duration, count: 1 }),\n (offset) => swipe({ offset, count: 0 }),\n ];\n const pullParams = [\n () => {\n if (closeOnPullDown) {\n setSwipeState(SwipeState.PULL);\n }\n },\n (offset) => setPullOffset(offset),\n (offset) => pull(offset),\n (offset) => pull(offset, true),\n ];\n usePointerSwipe(...swipeParams, closeOnPullUp, closeOnPullDown, ...pullParams);\n useWheelSwipe(swipeState, ...swipeParams);\n const focusOnMount = useEventCallback(() => {\n if (controller.focus &&\n getOwnerDocument().querySelector(`.${cssClass(MODULE_PORTAL)} .${cssClass(cssContainerPrefix())}`)) {\n focus();\n }\n });\n React.useEffect(focusOnMount, [focusOnMount]);\n const onViewCallback = useEventCallback(() => {\n var _a;\n (_a = on.view) === null || _a === void 0 ? void 0 : _a.call(on, { index: state.currentIndex });\n });\n React.useEffect(onViewCallback, [state.globalIndex, onViewCallback]);\n React.useEffect(() => cleanup(subscribe(ACTION_PREV, (action) => swipe({ direction: ACTION_PREV, ...action })), subscribe(ACTION_NEXT, (action) => swipe({ direction: ACTION_NEXT, ...action })), subscribe(ACTION_SWIPE, (action) => dispatch(action))), [subscribe, swipe, dispatch]);\n const context = React.useMemo(() => ({\n prev,\n next,\n close,\n focus,\n slideRect: containerRect ? computeSlideRect(containerRect, carousel.padding) : { width: 0, height: 0 },\n containerRect: containerRect || { width: 0, height: 0 },\n subscribeSensors,\n containerRef,\n setCarouselRef,\n toolbarWidth,\n setToolbarWidth,\n }), [\n prev,\n next,\n close,\n focus,\n subscribeSensors,\n containerRect,\n containerRef,\n setCarouselRef,\n toolbarWidth,\n setToolbarWidth,\n carousel.padding,\n ]);\n React.useImperativeHandle(controller.ref, () => ({\n prev,\n next,\n close,\n focus,\n getLightboxProps,\n getLightboxState,\n }), [prev, next, close, focus, getLightboxProps, getLightboxState]);\n return (React.createElement(\"div\", { ref: handleContainerRef, className: clsx(cssClass(cssContainerPrefix()), cssClass(CLASS_FLEX_CENTER)), style: {\n ...(swipeState === SwipeState.SWIPE\n ? { [cssVar(\"swipe_offset\")]: `${Math.round(swipeOffset.current)}px` }\n : null),\n ...(swipeState === SwipeState.PULL\n ? {\n [cssVar(\"pull_offset\")]: `${Math.round(pullOffset.current)}px`,\n [cssVar(\"pull_opacity\")]: `${pullOpacity.current}`,\n }\n : null),\n ...(controller.touchAction !== \"none\" ? { [cssVar(\"controller_touch_action\")]: controller.touchAction } : null),\n ...styles.container,\n }, ...(controller.aria ? { role: \"presentation\", \"aria-live\": \"polite\" } : null), tabIndex: -1, ...registerSensors }, containerRect && (React.createElement(ControllerContext.Provider, { value: context },\n children, (_a = render.controls) === null || _a === void 0 ? void 0 :\n _a.call(render)))));\n}\nconst ControllerModule = createModule(MODULE_CONTROLLER, Controller);\n\nfunction cssPrefix$2(value) {\n return composePrefix(MODULE_CAROUSEL, value);\n}\nfunction cssSlidePrefix(value) {\n return composePrefix(\"slide\", value);\n}\nfunction CarouselSlide({ slide, offset }) {\n const containerRef = React.useRef(null);\n const { currentIndex } = useLightboxState();\n const { slideRect, close, focus } = useController();\n const { render, carousel: { imageFit, imageProps }, on: { click: onClick }, controller: { closeOnBackdropClick }, styles: { slide: style }, } = useLightboxProps();\n const { getOwnerDocument } = useDocumentContext();\n const offscreen = offset !== 0;\n React.useEffect(() => {\n var _a;\n if (offscreen && ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.contains(getOwnerDocument().activeElement))) {\n focus();\n }\n }, [offscreen, focus, getOwnerDocument]);\n const renderSlide = () => {\n var _a, _b, _c, _d;\n let rendered = (_a = render.slide) === null || _a === void 0 ? void 0 : _a.call(render, { slide, offset, rect: slideRect });\n if (!rendered && isImageSlide(slide)) {\n rendered = (React.createElement(ImageSlide, { slide: slide, offset: offset, render: render, rect: slideRect, imageFit: imageFit, imageProps: imageProps, onClick: !offscreen ? () => onClick === null || onClick === void 0 ? void 0 : onClick({ index: currentIndex }) : undefined }));\n }\n return rendered ? (React.createElement(React.Fragment, null, (_b = render.slideHeader) === null || _b === void 0 ? void 0 :\n _b.call(render, { slide }),\n ((_c = render.slideContainer) !== null && _c !== void 0 ? _c : (({ children }) => children))({ slide, children: rendered }), (_d = render.slideFooter) === null || _d === void 0 ? void 0 :\n _d.call(render, { slide }))) : null;\n };\n const handleBackdropClick = (event) => {\n const container = containerRef.current;\n const target = event.target instanceof HTMLElement ? event.target : undefined;\n if (closeOnBackdropClick &&\n target &&\n container &&\n (target === container ||\n (Array.from(container.children).find((x) => x === target) &&\n target.classList.contains(cssClass(CLASS_SLIDE_WRAPPER))))) {\n close();\n }\n };\n return (React.createElement(\"div\", { ref: containerRef, className: clsx(cssClass(cssSlidePrefix()), !offscreen && cssClass(cssSlidePrefix(\"current\")), cssClass(CLASS_FLEX_CENTER)), ...makeInertWhen(offscreen), onClick: handleBackdropClick, style: style }, renderSlide()));\n}\nfunction Placeholder() {\n const style = useLightboxProps().styles.slide;\n return React.createElement(\"div\", { className: cssClass(\"slide\"), style: style });\n}\nfunction Carousel({ carousel }) {\n const { slides, currentIndex, globalIndex } = useLightboxState();\n const { setCarouselRef } = useController();\n const spacingValue = parseLengthPercentage(carousel.spacing);\n const paddingValue = parseLengthPercentage(carousel.padding);\n const preload = calculatePreload(carousel, slides, 1);\n const items = [];\n if (hasSlides(slides)) {\n for (let index = currentIndex - preload; index <= currentIndex + preload; index += 1) {\n const slide = getSlide(slides, index);\n const key = globalIndex - currentIndex + index;\n const placeholder = carousel.finite && (index < 0 || index > slides.length - 1);\n items.push(!placeholder\n ? {\n key: [`${key}`, getSlideKey(slide)].filter(Boolean).join(\"|\"),\n offset: index - currentIndex,\n slide,\n }\n : { key });\n }\n }\n return (React.createElement(\"div\", { ref: setCarouselRef, className: clsx(cssClass(cssPrefix$2()), items.length > 0 && cssClass(cssPrefix$2(\"with_slides\"))), style: {\n [`${cssVar(cssPrefix$2(\"slides_count\"))}`]: items.length,\n [`${cssVar(cssPrefix$2(\"spacing_px\"))}`]: spacingValue.pixel || 0,\n [`${cssVar(cssPrefix$2(\"spacing_percent\"))}`]: spacingValue.percent || 0,\n [`${cssVar(cssPrefix$2(\"padding_px\"))}`]: paddingValue.pixel || 0,\n [`${cssVar(cssPrefix$2(\"padding_percent\"))}`]: paddingValue.percent || 0,\n } }, items.map(({ key, slide, offset }) => slide ? React.createElement(CarouselSlide, { key: key, slide: slide, offset: offset }) : React.createElement(Placeholder, { key: key }))));\n}\nconst CarouselModule = createModule(MODULE_CAROUSEL, Carousel);\n\nfunction useNavigationState() {\n const { carousel } = useLightboxProps();\n const { slides, currentIndex } = useLightboxState();\n const prevDisabled = slides.length === 0 || (carousel.finite && currentIndex === 0);\n const nextDisabled = slides.length === 0 || (carousel.finite && currentIndex === slides.length - 1);\n return { prevDisabled, nextDisabled };\n}\n\nfunction useKeyboardNavigation(subscribeSensors) {\n var _a;\n const isRTL = useRTL();\n const { publish } = useEvents();\n const { animation } = useLightboxProps();\n const { prevDisabled, nextDisabled } = useNavigationState();\n const throttle = ((_a = animation.navigation) !== null && _a !== void 0 ? _a : animation.swipe) / 2;\n const prev = useThrottle(() => publish(ACTION_PREV), throttle);\n const next = useThrottle(() => publish(ACTION_NEXT), throttle);\n const handleKeyDown = useEventCallback((event) => {\n switch (event.key) {\n case VK_ESCAPE:\n publish(ACTION_CLOSE);\n break;\n case VK_ARROW_LEFT:\n if (!(isRTL ? nextDisabled : prevDisabled))\n (isRTL ? next : prev)();\n break;\n case VK_ARROW_RIGHT:\n if (!(isRTL ? prevDisabled : nextDisabled))\n (isRTL ? prev : next)();\n break;\n default:\n }\n });\n React.useEffect(() => subscribeSensors(EVENT_ON_KEY_DOWN, handleKeyDown), [subscribeSensors, handleKeyDown]);\n}\n\nfunction NavigationButton({ label, icon, renderIcon, action, onClick, disabled, style }) {\n return (React.createElement(IconButton, { label: label, icon: icon, renderIcon: renderIcon, className: cssClass(`navigation_${action}`), disabled: disabled, onClick: onClick, style: style, ...useLoseFocus(useController().focus, disabled) }));\n}\nfunction Navigation({ render: { buttonPrev, buttonNext, iconPrev, iconNext }, styles }) {\n const { prev, next, subscribeSensors } = useController();\n const { prevDisabled, nextDisabled } = useNavigationState();\n useKeyboardNavigation(subscribeSensors);\n return (React.createElement(React.Fragment, null,\n buttonPrev ? (buttonPrev()) : (React.createElement(NavigationButton, { label: \"Previous\", action: ACTION_PREV, icon: PreviousIcon, renderIcon: iconPrev, style: styles.navigationPrev, disabled: prevDisabled, onClick: prev })),\n buttonNext ? (buttonNext()) : (React.createElement(NavigationButton, { label: \"Next\", action: ACTION_NEXT, icon: NextIcon, renderIcon: iconNext, style: styles.navigationNext, disabled: nextDisabled, onClick: next }))));\n}\nconst NavigationModule = createModule(MODULE_NAVIGATION, Navigation);\n\nconst noScroll = cssClass(CLASS_NO_SCROLL);\nconst noScrollPadding = cssClass(CLASS_NO_SCROLL_PADDING);\nfunction isHTMLElement(element) {\n return \"style\" in element;\n}\nfunction padScrollbar(element, padding, rtl) {\n const styles = window.getComputedStyle(element);\n const property = rtl ? \"padding-left\" : \"padding-right\";\n const computedValue = rtl ? styles.paddingLeft : styles.paddingRight;\n const originalValue = element.style.getPropertyValue(property);\n element.style.setProperty(property, `${(parseInt(computedValue) || 0) + padding}px`);\n return () => {\n if (originalValue) {\n element.style.setProperty(property, originalValue);\n }\n else {\n element.style.removeProperty(property);\n }\n };\n}\nfunction NoScroll({ noScroll: { disabled }, children }) {\n const rtl = useRTL();\n const { getOwnerDocument, getOwnerWindow } = useDocumentContext();\n React.useEffect(() => {\n if (disabled)\n return () => { };\n const cleanup = [];\n const ownerWindow = getOwnerWindow();\n const { body, documentElement } = getOwnerDocument();\n const scrollbar = Math.round(ownerWindow.innerWidth - documentElement.clientWidth);\n if (scrollbar > 0) {\n cleanup.push(padScrollbar(body, scrollbar, rtl));\n const elements = body.getElementsByTagName(\"*\");\n for (let i = 0; i < elements.length; i += 1) {\n const element = elements[i];\n if (isHTMLElement(element) &&\n ownerWindow.getComputedStyle(element).getPropertyValue(\"position\") === \"fixed\" &&\n !element.classList.contains(noScrollPadding)) {\n cleanup.push(padScrollbar(element, scrollbar, rtl));\n }\n }\n }\n body.classList.add(noScroll);\n return () => {\n body.classList.remove(noScroll);\n cleanup.forEach((clean) => clean());\n };\n }, [rtl, disabled, getOwnerDocument, getOwnerWindow]);\n return React.createElement(React.Fragment, null, children);\n}\nconst NoScrollModule = createModule(MODULE_NO_SCROLL, NoScroll);\n\nfunction cssPrefix$1(value) {\n return composePrefix(MODULE_PORTAL, value);\n}\nfunction setAttribute(element, attribute, value) {\n const previousValue = element.getAttribute(attribute);\n element.setAttribute(attribute, value);\n return () => {\n if (previousValue) {\n element.setAttribute(attribute, previousValue);\n }\n else {\n element.removeAttribute(attribute);\n }\n };\n}\nfunction Portal({ children, animation, styles, className, on, portal, close }) {\n const [mounted, setMounted] = React.useState(false);\n const [visible, setVisible] = React.useState(false);\n const cleanup = React.useRef([]);\n const restoreFocus = React.useRef(null);\n const { setTimeout } = useTimeouts();\n const { subscribe } = useEvents();\n const reduceMotion = useMotionPreference();\n const animationDuration = !reduceMotion ? animation.fade : 0;\n React.useEffect(() => {\n setMounted(true);\n return () => {\n setMounted(false);\n setVisible(false);\n };\n }, []);\n const handleCleanup = useEventCallback(() => {\n cleanup.current.forEach((clean) => clean());\n cleanup.current = [];\n });\n const handleClose = useEventCallback(() => {\n var _a;\n setVisible(false);\n handleCleanup();\n (_a = on.exiting) === null || _a === void 0 ? void 0 : _a.call(on);\n setTimeout(() => {\n var _a;\n (_a = on.exited) === null || _a === void 0 ? void 0 : _a.call(on);\n close();\n }, animationDuration);\n });\n React.useEffect(() => subscribe(ACTION_CLOSE, handleClose), [subscribe, handleClose]);\n const handleEnter = useEventCallback((node) => {\n var _a, _b, _c;\n node.scrollTop;\n setVisible(true);\n (_a = on.entering) === null || _a === void 0 ? void 0 : _a.call(on);\n const elements = (_c = (_b = node.parentNode) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : [];\n for (let i = 0; i < elements.length; i += 1) {\n const element = elements[i];\n if ([\"TEMPLATE\", \"SCRIPT\", \"STYLE\"].indexOf(element.tagName) === -1 && element !== node) {\n cleanup.current.push(setAttribute(element, \"inert\", \"\"));\n cleanup.current.push(setAttribute(element, \"aria-hidden\", \"true\"));\n }\n }\n cleanup.current.push(() => {\n var _a, _b;\n (_b = (_a = restoreFocus.current) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n setTimeout(() => {\n var _a;\n (_a = on.entered) === null || _a === void 0 ? void 0 : _a.call(on);\n }, animationDuration);\n });\n const handleRef = React.useCallback((node) => {\n if (node) {\n handleEnter(node);\n }\n else {\n handleCleanup();\n }\n }, [handleEnter, handleCleanup]);\n return mounted\n ? createPortal(React.createElement(LightboxRoot, { ref: handleRef, className: clsx(className, cssClass(cssPrefix$1()), cssClass(CLASS_NO_SCROLL_PADDING), visible && cssClass(cssPrefix$1(\"open\"))), role: \"presentation\", \"aria-live\": \"polite\", style: {\n ...(animation.fade !== LightboxDefaultProps.animation.fade\n ? { [cssVar(\"fade_animation_duration\")]: `${animationDuration}ms` }\n : null),\n ...(animation.easing.fade !== LightboxDefaultProps.animation.easing.fade\n ? { [cssVar(\"fade_animation_timing_function\")]: animation.easing.fade }\n : null),\n ...styles.root,\n }, onFocus: (event) => {\n if (!restoreFocus.current) {\n restoreFocus.current = event.relatedTarget;\n }\n } }, children), portal.root || document.body)\n : null;\n}\nconst PortalModule = createModule(MODULE_PORTAL, Portal);\n\nfunction Root({ children }) {\n return React.createElement(React.Fragment, null, children);\n}\nconst RootModule = createModule(MODULE_ROOT, Root);\n\nfunction cssPrefix(value) {\n return composePrefix(MODULE_TOOLBAR, value);\n}\nfunction Toolbar({ toolbar: { buttons }, render: { buttonClose, iconClose }, styles }) {\n const { close, setToolbarWidth } = useController();\n const { setContainerRef, containerRect } = useContainerRect();\n useLayoutEffect(() => {\n setToolbarWidth(containerRect === null || containerRect === void 0 ? void 0 : containerRect.width);\n }, [setToolbarWidth, containerRect === null || containerRect === void 0 ? void 0 : containerRect.width]);\n const renderCloseButton = () => {\n if (buttonClose)\n return buttonClose();\n return React.createElement(IconButton, { key: ACTION_CLOSE, label: \"Close\", icon: CloseIcon, renderIcon: iconClose, onClick: close });\n };\n return (React.createElement(\"div\", { ref: setContainerRef, style: styles.toolbar, className: cssClass(cssPrefix()) }, buttons === null || buttons === void 0 ? void 0 : buttons.map((button) => (button === ACTION_CLOSE ? renderCloseButton() : button))));\n}\nconst ToolbarModule = createModule(MODULE_TOOLBAR, Toolbar);\n\nfunction renderNode(node, props) {\n var _a;\n return React.createElement(node.module.component, { key: node.module.name, ...props }, (_a = node.children) === null || _a === void 0 ? void 0 : _a.map((child) => renderNode(child, props)));\n}\nfunction mergeAnimation(defaultAnimation, animation = {}) {\n const { easing: defaultAnimationEasing, ...restDefaultAnimation } = defaultAnimation;\n const { easing, ...restAnimation } = animation;\n return {\n easing: { ...defaultAnimationEasing, ...easing },\n ...restDefaultAnimation,\n ...restAnimation,\n };\n}\nfunction Lightbox({ carousel, animation, render, toolbar, controller, noScroll, on, plugins, slides, index, ...restProps }) {\n const { animation: defaultAnimation, carousel: defaultCarousel, render: defaultRender, toolbar: defaultToolbar, controller: defaultController, noScroll: defaultNoScroll, on: defaultOn, slides: defaultSlides, index: defaultIndex, plugins: defaultPlugins, ...restDefaultProps } = LightboxDefaultProps;\n const { config, augmentation } = withPlugins([\n createNode(PortalModule, [\n createNode(NoScrollModule, [\n createNode(ControllerModule, [\n createNode(CarouselModule),\n createNode(ToolbarModule),\n createNode(NavigationModule),\n ]),\n ]),\n ]),\n ], plugins || defaultPlugins);\n const props = augmentation({\n animation: mergeAnimation(defaultAnimation, animation),\n carousel: { ...defaultCarousel, ...carousel },\n render: { ...defaultRender, ...render },\n toolbar: { ...defaultToolbar, ...toolbar },\n controller: { ...defaultController, ...controller },\n noScroll: { ...defaultNoScroll, ...noScroll },\n on: { ...defaultOn, ...on },\n ...restDefaultProps,\n ...restProps,\n });\n if (!props.open)\n return null;\n return (React.createElement(LightboxPropsProvider, { ...props },\n React.createElement(LightboxStateProvider, { slides: slides || defaultSlides, index: parseInt(index || defaultIndex) },\n React.createElement(TimeoutsProvider, null,\n React.createElement(EventsProvider, null, renderNode(createNode(RootModule, config), props))))));\n}\n\nexport { ACTION_CLOSE, ACTION_NEXT, ACTION_PREV, ACTION_SWIPE, CLASS_FLEX_CENTER, CLASS_NO_SCROLL, CLASS_NO_SCROLL_PADDING, CLASS_SLIDE_WRAPPER, Carousel, CarouselModule, CloseIcon, Controller, ControllerContext, ControllerModule, DocumentContext, DocumentContextProvider, ELEMENT_BUTTON, ELEMENT_ICON, EVENT_ON_KEY_DOWN, EVENT_ON_KEY_UP, EVENT_ON_POINTER_CANCEL, EVENT_ON_POINTER_DOWN, EVENT_ON_POINTER_LEAVE, EVENT_ON_POINTER_MOVE, EVENT_ON_POINTER_UP, EVENT_ON_WHEEL, ErrorIcon, EventsContext, EventsProvider, IMAGE_FIT_CONTAIN, IMAGE_FIT_COVER, IconButton, ImageSlide, Lightbox, LightboxDefaultProps, LightboxDispatchContext, LightboxPropsContext, LightboxPropsProvider, LightboxRoot, LightboxStateContext, LightboxStateProvider, LoadingIcon, MODULE_CAROUSEL, MODULE_CONTROLLER, MODULE_NAVIGATION, MODULE_NO_SCROLL, MODULE_PORTAL, MODULE_ROOT, MODULE_TOOLBAR, Navigation, NavigationButton, NavigationModule, NextIcon, NoScroll, NoScrollModule, Portal, PortalModule, PreviousIcon, Root, RootModule, SLIDE_STATUS_COMPLETE, SLIDE_STATUS_ERROR, SLIDE_STATUS_LOADING, SLIDE_STATUS_PLACEHOLDER, SwipeState, TimeoutsContext, TimeoutsProvider, Toolbar, ToolbarModule, UNKNOWN_ACTION_TYPE, VK_ARROW_LEFT, VK_ARROW_RIGHT, VK_ESCAPE, activeSlideStatus, addToolbarButton, calculatePreload, cleanup, clsx, composePrefix, computeSlideRect, createIcon, createIconDisabled, createModule, createNode, cssClass, cssVar, Lightbox as default, devicePixelRatio, getSlide, getSlideIfPresent, getSlideIndex, getSlideKey, hasSlides, hasWindow, isImageFitCover, isImageSlide, label, makeComposePrefix, makeInertWhen, makeUseContext, parseInt, parseLengthPercentage, round, setRef, stopNavigationEventsPropagation, useAnimation, useContainerRect, useController, useDelay, useDocumentContext, useEventCallback, useEvents, useForkRef, useKeyboardNavigation, useLayoutEffect, useLightboxDispatch, useLightboxProps, useLightboxState, useLoseFocus, useMotionPreference, useNavigationState, usePointerEvents, usePointerSwipe, usePreventWheelDefaults, useRTL, useSensors, useThrottle, useTimeouts, useWheelSwipe, withPlugins };","import * as React from 'react';\nimport { cssClass, useLightboxProps, makeUseContext, useController, clsx, cssVar, createIcon, createIconDisabled, IconButton, addToolbarButton, createModule } from '../../index.js';\nimport { PLUGIN_CAPTIONS } from '../../types.js';\n\nconst cssPrefix = (className) => cssClass(`slide_${className}`);\n\nconst defaultCaptionsProps = {\n descriptionTextAlign: \"start\",\n descriptionMaxLines: 3,\n showToggle: false,\n hidden: false,\n};\nconst resolveCaptionsProps = (captions) => ({\n ...defaultCaptionsProps,\n ...captions,\n});\nfunction useCaptionsProps() {\n const { captions } = useLightboxProps();\n return resolveCaptionsProps(captions);\n}\n\nconst CaptionsContext = React.createContext(null);\nconst useCaptions = makeUseContext(\"useCaptions\", \"CaptionsContext\", CaptionsContext);\nfunction CaptionsContextProvider({ captions, children }) {\n const { ref, hidden } = resolveCaptionsProps(captions);\n const [visible, setVisible] = React.useState(!hidden);\n const context = React.useMemo(() => ({\n visible,\n show: () => setVisible(true),\n hide: () => setVisible(false),\n }), [visible]);\n React.useImperativeHandle(ref, () => context, [context]);\n return React.createElement(CaptionsContext.Provider, { value: context }, children);\n}\n\nfunction Title({ title }) {\n const { toolbarWidth } = useController();\n const { styles } = useLightboxProps();\n const { visible } = useCaptions();\n if (!visible)\n return null;\n return (React.createElement(\"div\", { style: styles.captionsTitleContainer, className: clsx(cssPrefix(\"captions_container\"), cssPrefix(\"title_container\")) },\n React.createElement(\"div\", { className: cssPrefix(\"title\"), style: {\n ...(toolbarWidth ? { [cssVar(\"toolbar_width\")]: `${toolbarWidth}px` } : null),\n ...styles.captionsTitle,\n } }, title)));\n}\n\nfunction Description({ description }) {\n const { descriptionTextAlign, descriptionMaxLines } = useCaptionsProps();\n const { styles } = useLightboxProps();\n const { visible } = useCaptions();\n if (!visible)\n return null;\n return (React.createElement(\"div\", { style: styles.captionsDescriptionContainer, className: clsx(cssPrefix(\"captions_container\"), cssPrefix(\"description_container\")) },\n React.createElement(\"div\", { className: cssPrefix(\"description\"), style: {\n ...(descriptionTextAlign !== defaultCaptionsProps.descriptionTextAlign ||\n descriptionMaxLines !== defaultCaptionsProps.descriptionMaxLines\n ? {\n [cssVar(\"slide_description_text_align\")]: descriptionTextAlign,\n [cssVar(\"slide_description_max_lines\")]: descriptionMaxLines,\n }\n : null),\n ...styles.captionsDescription,\n } }, typeof description === \"string\"\n ? description\n .split(\"\\n\")\n .flatMap((line, index) => [...(index > 0 ? [React.createElement(\"br\", { key: index })] : []), line])\n : description)));\n}\n\nconst captionsIcon = () => (React.createElement(React.Fragment, null,\n React.createElement(\"path\", { strokeWidth: 2, stroke: \"currentColor\", strokeLinejoin: \"round\", fill: \"none\", d: \"M3 5l18 0l0 14l-18 0l0-14z\" }),\n React.createElement(\"path\", { d: \"M7 15h3c.55 0 1-.45 1-1v-1H9.5v.5h-2v-3h2v.5H11v-1c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1zm7 0h3c.55 0 1-.45 1-1v-1h-1.5v.5h-2v-3h2v.5H18v-1c0-.55-.45-1-1-1h-3c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1z\" })));\nconst CaptionsVisible = createIcon(\"CaptionsVisible\", captionsIcon());\nconst CaptionsHidden = createIconDisabled(\"CaptionsVisible\", captionsIcon());\nfunction CaptionsButton() {\n const { visible, show, hide } = useCaptions();\n const { render } = useLightboxProps();\n if (render.buttonCaptions) {\n return React.createElement(React.Fragment, null, render.buttonCaptions({ visible, show, hide }));\n }\n return (React.createElement(IconButton, { label: visible ? \"Hide captions\" : \"Show captions\", icon: visible ? CaptionsVisible : CaptionsHidden, renderIcon: visible ? render.iconCaptionsVisible : render.iconCaptionsHidden, onClick: visible ? hide : show }));\n}\n\nfunction Captions({ augment, addModule }) {\n augment(({ captions: captionsProps, render: { slideFooter: renderFooter, ...restRender }, toolbar, ...restProps }) => {\n const captions = resolveCaptionsProps(captionsProps);\n return {\n render: {\n slideFooter: ({ slide }) => (React.createElement(React.Fragment, null, renderFooter === null || renderFooter === void 0 ? void 0 :\n renderFooter({ slide }),\n slide.title && React.createElement(Title, { title: slide.title }),\n slide.description && React.createElement(Description, { description: slide.description }))),\n ...restRender,\n },\n toolbar: addToolbarButton(toolbar, PLUGIN_CAPTIONS, captions.showToggle ? React.createElement(CaptionsButton, null) : null),\n captions,\n ...restProps,\n };\n });\n addModule(createModule(PLUGIN_CAPTIONS, CaptionsContextProvider));\n}\n\nexport { Captions as default };\n","import * as React from 'react';\nimport { makeUseContext, useDocumentContext, useLayoutEffect, cleanup, useEventCallback, clsx, cssClass, createIcon, useLightboxProps, IconButton, addToolbarButton, createModule } from '../../index.js';\nimport { PLUGIN_FULLSCREEN, CLASS_FULLSIZE, PLUGIN_THUMBNAILS, MODULE_CONTROLLER } from '../../types.js';\n\nconst defaultFullscreenProps = {\n auto: false,\n ref: null,\n};\nconst resolveFullscreenProps = (fullscreen) => ({\n ...defaultFullscreenProps,\n ...fullscreen,\n});\n\nconst FullscreenContext = React.createContext(null);\nconst useFullscreen = makeUseContext(\"useFullscreen\", \"FullscreenContext\", FullscreenContext);\nfunction FullscreenContextProvider({ fullscreen: fullscreenProps, on, children }) {\n const { auto, ref } = resolveFullscreenProps(fullscreenProps);\n const containerRef = React.useRef(null);\n const [disabled, setDisabled] = React.useState();\n const [fullscreen, setFullscreen] = React.useState(false);\n const wasFullscreen = React.useRef(false);\n const { getOwnerDocument } = useDocumentContext();\n useLayoutEffect(() => {\n var _a, _b, _c, _d;\n const ownerDocument = getOwnerDocument();\n setDisabled(!((_d = (_c = (_b = (_a = ownerDocument.fullscreenEnabled) !== null && _a !== void 0 ? _a : ownerDocument.webkitFullscreenEnabled) !== null && _b !== void 0 ? _b : ownerDocument.mozFullScreenEnabled) !== null && _c !== void 0 ? _c : ownerDocument.msFullscreenEnabled) !== null && _d !== void 0 ? _d : false));\n }, [getOwnerDocument]);\n const getFullscreenElement = React.useCallback(() => {\n var _a;\n const ownerDocument = getOwnerDocument();\n const fullscreenElement = ownerDocument.fullscreenElement ||\n ownerDocument.webkitFullscreenElement ||\n ownerDocument.mozFullScreenElement ||\n ownerDocument.msFullscreenElement;\n return ((_a = fullscreenElement === null || fullscreenElement === void 0 ? void 0 : fullscreenElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.fullscreenElement) || fullscreenElement;\n }, [getOwnerDocument]);\n const enter = React.useCallback(() => {\n const container = containerRef.current;\n try {\n if (container.requestFullscreen) {\n container.requestFullscreen().catch(() => { });\n }\n else if (container.webkitRequestFullscreen) {\n container.webkitRequestFullscreen();\n }\n else if (container.mozRequestFullScreen) {\n container.mozRequestFullScreen();\n }\n else if (container.msRequestFullscreen) {\n container.msRequestFullscreen();\n }\n }\n catch (err) {\n }\n }, []);\n const exit = React.useCallback(() => {\n if (!getFullscreenElement())\n return;\n const ownerDocument = getOwnerDocument();\n try {\n if (ownerDocument.exitFullscreen) {\n ownerDocument.exitFullscreen().catch(() => { });\n }\n else if (ownerDocument.webkitExitFullscreen) {\n ownerDocument.webkitExitFullscreen();\n }\n else if (ownerDocument.mozCancelFullScreen) {\n ownerDocument.mozCancelFullScreen();\n }\n else if (ownerDocument.msExitFullscreen) {\n ownerDocument.msExitFullscreen();\n }\n }\n catch (err) {\n }\n }, [getFullscreenElement, getOwnerDocument]);\n React.useEffect(() => {\n const ownerDocument = getOwnerDocument();\n const listener = () => {\n setFullscreen(getFullscreenElement() === containerRef.current);\n };\n return cleanup(...[\"fullscreenchange\", \"webkitfullscreenchange\", \"mozfullscreenchange\", \"MSFullscreenChange\"].map((event) => {\n ownerDocument.addEventListener(event, listener);\n return () => ownerDocument.removeEventListener(event, listener);\n }));\n }, [getFullscreenElement, getOwnerDocument]);\n const onEnterFullscreen = useEventCallback(() => { var _a; return (_a = on.enterFullscreen) === null || _a === void 0 ? void 0 : _a.call(on); });\n const onExitFullscreen = useEventCallback(() => { var _a; return (_a = on.exitFullscreen) === null || _a === void 0 ? void 0 : _a.call(on); });\n React.useEffect(() => {\n if (fullscreen) {\n wasFullscreen.current = true;\n }\n if (wasFullscreen.current) {\n (fullscreen ? onEnterFullscreen : onExitFullscreen)();\n }\n }, [fullscreen, onEnterFullscreen, onExitFullscreen]);\n const handleAutoFullscreen = useEventCallback(() => {\n var _a;\n (_a = (auto ? enter : null)) === null || _a === void 0 ? void 0 : _a();\n return exit;\n });\n React.useEffect(handleAutoFullscreen, [handleAutoFullscreen]);\n const context = React.useMemo(() => ({ fullscreen, disabled, enter, exit }), [fullscreen, disabled, enter, exit]);\n React.useImperativeHandle(ref, () => context, [context]);\n return (React.createElement(\"div\", { ref: containerRef, className: clsx(cssClass(PLUGIN_FULLSCREEN), cssClass(CLASS_FULLSIZE)) },\n React.createElement(FullscreenContext.Provider, { value: context }, children)));\n}\n\nconst EnterFullscreenIcon = createIcon(\"EnterFullscreen\", React.createElement(\"path\", { d: \"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\" }));\nconst ExitFullscreenIcon = createIcon(\"ExitFullscreen\", React.createElement(\"path\", { d: \"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z\" }));\nfunction FullscreenButton() {\n var _a;\n const { fullscreen, disabled, enter, exit } = useFullscreen();\n const { render } = useLightboxProps();\n if (disabled)\n return null;\n if (render.buttonFullscreen) {\n return React.createElement(React.Fragment, null, (_a = render.buttonFullscreen) === null || _a === void 0 ? void 0 : _a.call(render, { fullscreen, disabled, enter, exit }));\n }\n return (React.createElement(IconButton, { disabled: disabled, label: fullscreen ? \"Exit Fullscreen\" : \"Enter Fullscreen\", icon: fullscreen ? ExitFullscreenIcon : EnterFullscreenIcon, renderIcon: fullscreen ? render.iconExitFullscreen : render.iconEnterFullscreen, onClick: fullscreen ? exit : enter }));\n}\n\nfunction Fullscreen({ augment, contains, addParent }) {\n augment(({ fullscreen, toolbar, ...restProps }) => ({\n toolbar: addToolbarButton(toolbar, PLUGIN_FULLSCREEN, React.createElement(FullscreenButton, null)),\n fullscreen: resolveFullscreenProps(fullscreen),\n ...restProps,\n }));\n addParent(contains(PLUGIN_THUMBNAILS) ? PLUGIN_THUMBNAILS : MODULE_CONTROLLER, createModule(PLUGIN_FULLSCREEN, FullscreenContextProvider));\n}\n\nexport { Fullscreen as default };\n","import * as React from 'react';\nimport { makeUseContext, useLightboxState, useTimeouts, useEvents, useController, useEventCallback, cleanup, createIcon, useLightboxProps, useLoseFocus, IconButton, addToolbarButton, createModule } from '../../index.js';\nimport { SLIDE_STATUS_LOADING, SLIDE_STATUS_PLAYING, ACTIVE_SLIDE_LOADING, ACTIVE_SLIDE_PLAYING, ACTIVE_SLIDE_ERROR, SLIDE_STATUS_ERROR, ACTIVE_SLIDE_COMPLETE, SLIDE_STATUS_COMPLETE, PLUGIN_SLIDESHOW } from '../../types.js';\n\nconst defaultSlideshowProps = {\n autoplay: false,\n delay: 3000,\n ref: null,\n};\nconst resolveSlideshowProps = (slideshow) => ({\n ...defaultSlideshowProps,\n ...slideshow,\n});\n\nconst SlideshowContext = React.createContext(null);\nconst useSlideshow = makeUseContext(\"useSlideshow\", \"SlideshowContext\", SlideshowContext);\nfunction SlideshowContextProvider({ slideshow, carousel: { finite }, on, children }) {\n const { autoplay, delay, ref } = resolveSlideshowProps(slideshow);\n const wasPlaying = React.useRef(autoplay);\n const [playing, setPlaying] = React.useState(autoplay);\n const scheduler = React.useRef();\n const slideStatus = React.useRef();\n const { slides, currentIndex } = useLightboxState();\n const { setTimeout, clearTimeout } = useTimeouts();\n const { subscribe } = useEvents();\n const { next } = useController();\n const disabled = slides.length === 0 || (finite && currentIndex === slides.length - 1);\n const play = React.useCallback(() => {\n if (!playing && !disabled) {\n setPlaying(true);\n }\n }, [playing, disabled]);\n const pause = React.useCallback(() => {\n if (playing) {\n setPlaying(false);\n }\n }, [playing]);\n const cancelScheduler = React.useCallback(() => {\n clearTimeout(scheduler.current);\n scheduler.current = undefined;\n }, [clearTimeout]);\n const scheduleNextSlide = useEventCallback(() => {\n cancelScheduler();\n if (!playing ||\n disabled ||\n slideStatus.current === SLIDE_STATUS_LOADING ||\n slideStatus.current === SLIDE_STATUS_PLAYING) {\n return;\n }\n scheduler.current = setTimeout(() => {\n if (playing) {\n slideStatus.current = undefined;\n next();\n }\n }, delay);\n });\n React.useEffect(scheduleNextSlide, [currentIndex, playing, scheduleNextSlide]);\n React.useEffect(() => {\n if (playing && disabled) {\n setPlaying(false);\n }\n }, [currentIndex, playing, disabled]);\n const onSlideshowStart = useEventCallback(() => { var _a; return (_a = on.slideshowStart) === null || _a === void 0 ? void 0 : _a.call(on); });\n const onSlideshowStop = useEventCallback(() => { var _a; return (_a = on.slideshowStop) === null || _a === void 0 ? void 0 : _a.call(on); });\n React.useEffect(() => {\n if (playing) {\n onSlideshowStart();\n }\n else if (wasPlaying.current) {\n onSlideshowStop();\n }\n wasPlaying.current = playing;\n }, [playing, onSlideshowStart, onSlideshowStop]);\n React.useEffect(() => cleanup(cancelScheduler, subscribe(ACTIVE_SLIDE_LOADING, () => {\n slideStatus.current = SLIDE_STATUS_LOADING;\n cancelScheduler();\n }), subscribe(ACTIVE_SLIDE_PLAYING, () => {\n slideStatus.current = SLIDE_STATUS_PLAYING;\n cancelScheduler();\n }), subscribe(ACTIVE_SLIDE_ERROR, () => {\n slideStatus.current = SLIDE_STATUS_ERROR;\n scheduleNextSlide();\n }), subscribe(ACTIVE_SLIDE_COMPLETE, () => {\n slideStatus.current = SLIDE_STATUS_COMPLETE;\n scheduleNextSlide();\n })), [subscribe, cancelScheduler, scheduleNextSlide]);\n const context = React.useMemo(() => ({ playing, disabled, play, pause }), [playing, disabled, play, pause]);\n React.useImperativeHandle(ref, () => context, [context]);\n return React.createElement(SlideshowContext.Provider, { value: context }, children);\n}\n\nconst PlayIcon = createIcon(\"Play\", React.createElement(\"path\", { d: \"M8 5v14l11-7z\" }));\nconst PauseIcon = createIcon(\"Pause\", React.createElement(\"path\", { d: \"M6 19h4V5H6v14zm8-14v14h4V5h-4z\" }));\nfunction SlideshowButton() {\n const { playing, disabled, play, pause } = useSlideshow();\n const { render } = useLightboxProps();\n const focusListeners = useLoseFocus(useController().focus, disabled);\n if (render.buttonSlideshow) {\n return React.createElement(React.Fragment, null, render.buttonSlideshow({ playing, disabled, play, pause }));\n }\n return (React.createElement(IconButton, { label: playing ? \"Pause\" : \"Play\", icon: playing ? PauseIcon : PlayIcon, renderIcon: playing ? render.iconSlideshowPause : render.iconSlideshowPlay, onClick: playing ? pause : play, disabled: disabled, ...focusListeners }));\n}\n\nfunction Slideshow({ augment, addModule }) {\n augment(({ slideshow, toolbar, ...restProps }) => ({\n toolbar: addToolbarButton(toolbar, PLUGIN_SLIDESHOW, React.createElement(SlideshowButton, null)),\n slideshow: resolveSlideshowProps(slideshow),\n ...restProps,\n }));\n addModule(createModule(PLUGIN_SLIDESHOW, SlideshowContextProvider));\n}\n\nexport { Slideshow as default };\n","import * as React from 'react';\nimport { useLightboxProps, useMotionPreference, useEventCallback, useLayoutEffect, useLightboxState, isImageSlide, isImageFitCover, round, useDocumentContext, useController, usePointerEvents, cleanup, makeUseContext, createIcon, IconButton, devicePixelRatio, ImageSlide, clsx, cssClass, addToolbarButton, createModule } from '../../index.js';\nimport { EVENT_ON_KEY_DOWN, EVENT_ON_WHEEL, UNKNOWN_ACTION_TYPE, CLASS_FULLSIZE, CLASS_FLEX_CENTER, CLASS_SLIDE_WRAPPER, CLASS_SLIDE_WRAPPER_INTERACTIVE, PLUGIN_ZOOM } from '../../types.js';\n\nconst defaultZoomProps = {\n maxZoomPixelRatio: 1,\n zoomInMultiplier: 2,\n doubleTapDelay: 300,\n doubleClickDelay: 500,\n doubleClickMaxStops: 2,\n keyboardMoveDistance: 50,\n wheelZoomDistanceFactor: 100,\n pinchZoomDistanceFactor: 100,\n scrollToZoom: false,\n};\nconst resolveZoomProps = (zoom) => ({\n ...defaultZoomProps,\n ...zoom,\n});\n\nfunction useZoomAnimation(zoom, offsetX, offsetY, zoomWrapperRef) {\n const zoomAnimation = React.useRef();\n const zoomAnimationStart = React.useRef();\n const { zoom: zoomAnimationDuration } = useLightboxProps().animation;\n const reduceMotion = useMotionPreference();\n const playZoomAnimation = useEventCallback(() => {\n var _a, _b, _c;\n (_a = zoomAnimation.current) === null || _a === void 0 ? void 0 : _a.cancel();\n zoomAnimation.current = undefined;\n if (zoomAnimationStart.current && (zoomWrapperRef === null || zoomWrapperRef === void 0 ? void 0 : zoomWrapperRef.current)) {\n try {\n zoomAnimation.current = (_c = (_b = zoomWrapperRef.current).animate) === null || _c === void 0 ? void 0 : _c.call(_b, [\n { transform: zoomAnimationStart.current },\n { transform: `scale(${zoom}) translateX(${offsetX}px) translateY(${offsetY}px)` },\n ], {\n duration: !reduceMotion ? (zoomAnimationDuration !== null && zoomAnimationDuration !== void 0 ? zoomAnimationDuration : 500) : 0,\n easing: zoomAnimation.current ? \"ease-out\" : \"ease-in-out\",\n });\n }\n catch (err) {\n console.error(err);\n }\n zoomAnimationStart.current = undefined;\n if (zoomAnimation.current) {\n zoomAnimation.current.onfinish = () => {\n zoomAnimation.current = undefined;\n };\n }\n }\n });\n useLayoutEffect(playZoomAnimation, [zoom, offsetX, offsetY, playZoomAnimation]);\n return React.useCallback(() => {\n zoomAnimationStart.current = (zoomWrapperRef === null || zoomWrapperRef === void 0 ? void 0 : zoomWrapperRef.current)\n ? window.getComputedStyle(zoomWrapperRef.current).transform\n : undefined;\n }, [zoomWrapperRef]);\n}\n\nfunction useZoomCallback(zoom, disabled) {\n const { on } = useLightboxProps();\n const onZoomCallback = useEventCallback(() => {\n var _a;\n if (!disabled) {\n (_a = on.zoom) === null || _a === void 0 ? void 0 : _a.call(on, { zoom });\n }\n });\n React.useEffect(onZoomCallback, [zoom, onZoomCallback]);\n}\n\nfunction useZoomProps() {\n const { zoom } = useLightboxProps();\n return resolveZoomProps(zoom);\n}\n\nfunction useZoomImageRect(slideRect, imageDimensions) {\n var _a, _b;\n let imageRect = { width: 0, height: 0 };\n let maxImageRect = { width: 0, height: 0 };\n const { currentSlide } = useLightboxState();\n const { imageFit } = useLightboxProps().carousel;\n const { maxZoomPixelRatio } = useZoomProps();\n if (slideRect && currentSlide) {\n const slide = { ...currentSlide, ...imageDimensions };\n if (isImageSlide(slide)) {\n const cover = isImageFitCover(slide, imageFit);\n const width = Math.max(...(((_a = slide.srcSet) === null || _a === void 0 ? void 0 : _a.map((x) => x.width)) || []).concat(slide.width ? [slide.width] : []));\n const height = Math.max(...(((_b = slide.srcSet) === null || _b === void 0 ? void 0 : _b.map((x) => x.height)) || []).concat(slide.height ? [slide.height] : []));\n if (width > 0 && height > 0 && slideRect.width > 0 && slideRect.height > 0) {\n maxImageRect = cover\n ? {\n width: Math.round(Math.min(width, (slideRect.width / slideRect.height) * height)),\n height: Math.round(Math.min(height, (slideRect.height / slideRect.width) * width)),\n }\n : { width, height };\n maxImageRect = {\n width: maxImageRect.width * maxZoomPixelRatio,\n height: maxImageRect.height * maxZoomPixelRatio,\n };\n imageRect = cover\n ? {\n width: Math.min(slideRect.width, maxImageRect.width, width),\n height: Math.min(slideRect.height, maxImageRect.height, height),\n }\n : {\n width: Math.round(Math.min(slideRect.width, (slideRect.height / height) * width, width)),\n height: Math.round(Math.min(slideRect.height, (slideRect.width / width) * height, height)),\n };\n }\n }\n }\n const maxZoom = imageRect.width ? Math.max(round(maxImageRect.width / imageRect.width, 5), 1) : 1;\n return { imageRect, maxZoom };\n}\n\nfunction distance(pointerA, pointerB) {\n return ((pointerA.clientX - pointerB.clientX) ** 2 + (pointerA.clientY - pointerB.clientY) ** 2) ** 0.5;\n}\nfunction scaleZoom(value, delta, factor = 100, clamp = 2) {\n return value * Math.min(1 + Math.abs(delta / factor), clamp) ** Math.sign(delta);\n}\nfunction useZoomSensors(zoom, maxZoom, disabled, changeZoom, changeOffsets, zoomWrapperRef) {\n const activePointers = React.useRef([]);\n const lastPointerDown = React.useRef(0);\n const pinchZoomDistance = React.useRef();\n const { globalIndex } = useLightboxState();\n const { getOwnerWindow } = useDocumentContext();\n const { containerRef, subscribeSensors } = useController();\n const { keyboardMoveDistance, zoomInMultiplier, wheelZoomDistanceFactor, scrollToZoom, doubleTapDelay, doubleClickDelay, doubleClickMaxStops, pinchZoomDistanceFactor, } = useZoomProps();\n const translateCoordinates = React.useCallback((event) => {\n if (containerRef.current) {\n const { pageX, pageY } = event;\n const { scrollX, scrollY } = getOwnerWindow();\n const { left, top, width, height } = containerRef.current.getBoundingClientRect();\n return [pageX - left - scrollX - width / 2, pageY - top - scrollY - height / 2];\n }\n return [];\n }, [containerRef, getOwnerWindow]);\n const onKeyDown = useEventCallback((event) => {\n const preventDefault = () => {\n event.preventDefault();\n event.stopPropagation();\n };\n if (zoom > 1) {\n const move = (deltaX, deltaY) => {\n preventDefault();\n changeOffsets(deltaX, deltaY);\n };\n if (event.key === \"ArrowDown\") {\n move(0, keyboardMoveDistance);\n }\n else if (event.key === \"ArrowUp\") {\n move(0, -keyboardMoveDistance);\n }\n else if (event.key === \"ArrowLeft\") {\n move(-keyboardMoveDistance, 0);\n }\n else if (event.key === \"ArrowRight\") {\n move(keyboardMoveDistance, 0);\n }\n }\n const handleChangeZoom = (zoomValue) => {\n preventDefault();\n changeZoom(zoomValue);\n };\n const hasMeta = () => event.getModifierState(\"Meta\");\n if (event.key === \"+\" || (event.key === \"=\" && hasMeta())) {\n handleChangeZoom(zoom * zoomInMultiplier);\n }\n else if (event.key === \"-\" || (event.key === \"_\" && hasMeta())) {\n handleChangeZoom(zoom / zoomInMultiplier);\n }\n else if (event.key === \"0\" && hasMeta()) {\n handleChangeZoom(1);\n }\n });\n const onWheel = useEventCallback((event) => {\n if (event.ctrlKey || scrollToZoom) {\n if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) {\n event.stopPropagation();\n changeZoom(scaleZoom(zoom, -event.deltaY, wheelZoomDistanceFactor), true, ...translateCoordinates(event));\n return;\n }\n }\n if (zoom > 1) {\n event.stopPropagation();\n if (!scrollToZoom) {\n changeOffsets(event.deltaX, event.deltaY);\n }\n }\n });\n const clearPointer = React.useCallback((event) => {\n const pointers = activePointers.current;\n pointers.splice(0, pointers.length, ...pointers.filter((p) => p.pointerId !== event.pointerId));\n }, []);\n const replacePointer = React.useCallback((event) => {\n clearPointer(event);\n event.persist();\n activePointers.current.push(event);\n }, [clearPointer]);\n const onPointerDown = useEventCallback((event) => {\n var _a;\n const pointers = activePointers.current;\n if ((event.pointerType === \"mouse\" && event.buttons > 1) ||\n !((_a = zoomWrapperRef === null || zoomWrapperRef === void 0 ? void 0 : zoomWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {\n return;\n }\n if (zoom > 1) {\n event.stopPropagation();\n }\n const { timeStamp } = event;\n if (pointers.length === 0 &&\n timeStamp - lastPointerDown.current < (event.pointerType === \"touch\" ? doubleTapDelay : doubleClickDelay)) {\n lastPointerDown.current = 0;\n changeZoom(zoom !== maxZoom ? zoom * Math.max(maxZoom ** (1 / doubleClickMaxStops), zoomInMultiplier) : 1, false, ...translateCoordinates(event));\n }\n else {\n lastPointerDown.current = timeStamp;\n }\n replacePointer(event);\n if (pointers.length === 2) {\n pinchZoomDistance.current = distance(pointers[0], pointers[1]);\n }\n });\n const onPointerMove = useEventCallback((event) => {\n const pointers = activePointers.current;\n const activePointer = pointers.find((p) => p.pointerId === event.pointerId);\n if (pointers.length === 2 && pinchZoomDistance.current) {\n event.stopPropagation();\n replacePointer(event);\n const currentDistance = distance(pointers[0], pointers[1]);\n const delta = currentDistance - pinchZoomDistance.current;\n if (Math.abs(delta) > 0) {\n changeZoom(scaleZoom(zoom, delta, pinchZoomDistanceFactor), true, ...pointers\n .map((x) => translateCoordinates(x))\n .reduce((acc, coordinate) => coordinate.map((x, i) => acc[i] + x / 2)));\n pinchZoomDistance.current = currentDistance;\n }\n return;\n }\n if (zoom > 1) {\n event.stopPropagation();\n if (activePointer) {\n if (pointers.length === 1) {\n changeOffsets((activePointer.clientX - event.clientX) / zoom, (activePointer.clientY - event.clientY) / zoom);\n }\n replacePointer(event);\n }\n }\n });\n const onPointerUp = React.useCallback((event) => {\n const pointers = activePointers.current;\n if (pointers.length === 2 && pointers.find((p) => p.pointerId === event.pointerId)) {\n pinchZoomDistance.current = undefined;\n }\n clearPointer(event);\n }, [clearPointer]);\n const cleanupSensors = React.useCallback(() => {\n const pointers = activePointers.current;\n pointers.splice(0, pointers.length);\n lastPointerDown.current = 0;\n pinchZoomDistance.current = undefined;\n }, []);\n usePointerEvents(subscribeSensors, onPointerDown, onPointerMove, onPointerUp, disabled);\n React.useEffect(cleanupSensors, [globalIndex, cleanupSensors]);\n React.useEffect(() => {\n if (!disabled) {\n return cleanup(cleanupSensors, subscribeSensors(EVENT_ON_KEY_DOWN, onKeyDown), subscribeSensors(EVENT_ON_WHEEL, onWheel));\n }\n return () => { };\n }, [disabled, subscribeSensors, cleanupSensors, onKeyDown, onWheel]);\n}\n\nfunction useZoomState(imageRect, maxZoom, zoomWrapperRef) {\n const [zoom, setZoom] = React.useState(1);\n const [offsetX, setOffsetX] = React.useState(0);\n const [offsetY, setOffsetY] = React.useState(0);\n const animate = useZoomAnimation(zoom, offsetX, offsetY, zoomWrapperRef);\n const { currentSlide, globalIndex } = useLightboxState();\n const { containerRect, slideRect } = useController();\n const { zoomInMultiplier } = useZoomProps();\n const currentSource = currentSlide && isImageSlide(currentSlide) ? currentSlide.src : undefined;\n const disabled = !currentSource || !(zoomWrapperRef === null || zoomWrapperRef === void 0 ? void 0 : zoomWrapperRef.current);\n useLayoutEffect(() => {\n setZoom(1);\n setOffsetX(0);\n setOffsetY(0);\n }, [globalIndex, currentSource]);\n const changeOffsets = React.useCallback((dx, dy, targetZoom) => {\n const newZoom = targetZoom || zoom;\n const newOffsetX = offsetX - (dx || 0);\n const newOffsetY = offsetY - (dy || 0);\n const maxOffsetX = (imageRect.width * newZoom - slideRect.width) / 2 / newZoom;\n const maxOffsetY = (imageRect.height * newZoom - slideRect.height) / 2 / newZoom;\n setOffsetX(Math.min(Math.abs(newOffsetX), Math.max(maxOffsetX, 0)) * Math.sign(newOffsetX));\n setOffsetY(Math.min(Math.abs(newOffsetY), Math.max(maxOffsetY, 0)) * Math.sign(newOffsetY));\n }, [zoom, offsetX, offsetY, slideRect, imageRect.width, imageRect.height]);\n const changeZoom = React.useCallback((targetZoom, rapid, dx, dy) => {\n const newZoom = round(Math.min(Math.max(targetZoom + 0.001 < maxZoom ? targetZoom : maxZoom, 1), maxZoom), 5);\n if (newZoom === zoom)\n return;\n if (!rapid) {\n animate();\n }\n changeOffsets(dx ? dx * (1 / zoom - 1 / newZoom) : 0, dy ? dy * (1 / zoom - 1 / newZoom) : 0, newZoom);\n setZoom(newZoom);\n }, [zoom, maxZoom, changeOffsets, animate]);\n const handleControllerRectChange = useEventCallback(() => {\n if (zoom > 1) {\n if (zoom > maxZoom) {\n changeZoom(maxZoom, true);\n }\n changeOffsets();\n }\n });\n useLayoutEffect(handleControllerRectChange, [containerRect.width, containerRect.height, handleControllerRectChange]);\n const zoomIn = React.useCallback(() => changeZoom(zoom * zoomInMultiplier), [zoom, zoomInMultiplier, changeZoom]);\n const zoomOut = React.useCallback(() => changeZoom(zoom / zoomInMultiplier), [zoom, zoomInMultiplier, changeZoom]);\n return { zoom, offsetX, offsetY, disabled, changeOffsets, changeZoom, zoomIn, zoomOut };\n}\n\nconst ZoomControllerContext = React.createContext(null);\nconst useZoom = makeUseContext(\"useZoom\", \"ZoomControllerContext\", ZoomControllerContext);\nfunction ZoomContextProvider({ children }) {\n const [zoomWrapper, setZoomWrapper] = React.useState();\n const { slideRect } = useController();\n const { imageRect, maxZoom } = useZoomImageRect(slideRect, zoomWrapper === null || zoomWrapper === void 0 ? void 0 : zoomWrapper.imageDimensions);\n const { zoom, offsetX, offsetY, disabled, changeZoom, changeOffsets, zoomIn, zoomOut } = useZoomState(imageRect, maxZoom, zoomWrapper === null || zoomWrapper === void 0 ? void 0 : zoomWrapper.zoomWrapperRef);\n useZoomCallback(zoom, disabled);\n useZoomSensors(zoom, maxZoom, disabled, changeZoom, changeOffsets, zoomWrapper === null || zoomWrapper === void 0 ? void 0 : zoomWrapper.zoomWrapperRef);\n const zoomRef = React.useMemo(() => ({ zoom, maxZoom, offsetX, offsetY, disabled, zoomIn, zoomOut, changeZoom }), [zoom, maxZoom, offsetX, offsetY, disabled, zoomIn, zoomOut, changeZoom]);\n React.useImperativeHandle(useZoomProps().ref, () => zoomRef, [zoomRef]);\n const context = React.useMemo(() => ({ ...zoomRef, setZoomWrapper }), [zoomRef, setZoomWrapper]);\n return React.createElement(ZoomControllerContext.Provider, { value: context }, children);\n}\n\nconst ZoomInIcon = createIcon(\"ZoomIn\", React.createElement(React.Fragment, null,\n React.createElement(\"path\", { d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" }),\n React.createElement(\"path\", { d: \"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z\" })));\nconst ZoomOutIcon = createIcon(\"ZoomOut\", React.createElement(\"path\", { d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z\" }));\nconst ZoomButton = React.forwardRef(function ZoomButton({ zoomIn, onLoseFocus }, ref) {\n const wasEnabled = React.useRef(false);\n const wasFocused = React.useRef(false);\n const { zoom, maxZoom, zoomIn: zoomInCallback, zoomOut: zoomOutCallback, disabled: zoomDisabled } = useZoom();\n const { render } = useLightboxProps();\n const disabled = zoomDisabled || (zoomIn ? zoom >= maxZoom : zoom <= 1);\n React.useEffect(() => {\n if (disabled && wasEnabled.current && wasFocused.current) {\n onLoseFocus();\n }\n if (!disabled) {\n wasEnabled.current = true;\n }\n }, [disabled, onLoseFocus]);\n return (React.createElement(IconButton, { ref: ref, disabled: disabled, label: zoomIn ? \"Zoom in\" : \"Zoom out\", icon: zoomIn ? ZoomInIcon : ZoomOutIcon, renderIcon: zoomIn ? render.iconZoomIn : render.iconZoomOut, onClick: zoomIn ? zoomInCallback : zoomOutCallback, onFocus: () => {\n wasFocused.current = true;\n }, onBlur: () => {\n wasFocused.current = false;\n } }));\n});\n\nfunction ZoomButtonsGroup() {\n const zoomInRef = React.useRef(null);\n const zoomOutRef = React.useRef(null);\n const { focus } = useController();\n const focusSibling = React.useCallback((sibling) => {\n var _a, _b;\n if (!((_a = sibling.current) === null || _a === void 0 ? void 0 : _a.disabled)) {\n (_b = sibling.current) === null || _b === void 0 ? void 0 : _b.focus();\n }\n else {\n focus();\n }\n }, [focus]);\n const focusZoomIn = React.useCallback(() => focusSibling(zoomInRef), [focusSibling]);\n const focusZoomOut = React.useCallback(() => focusSibling(zoomOutRef), [focusSibling]);\n return (React.createElement(React.Fragment, null,\n React.createElement(ZoomButton, { zoomIn: true, ref: zoomInRef, onLoseFocus: focusZoomOut }),\n React.createElement(ZoomButton, { ref: zoomOutRef, onLoseFocus: focusZoomIn })));\n}\n\nfunction ZoomToolbarControl() {\n const { render } = useLightboxProps();\n const zoomRef = useZoom();\n if (render.buttonZoom) {\n return React.createElement(React.Fragment, null, render.buttonZoom(zoomRef));\n }\n return React.createElement(ZoomButtonsGroup, null);\n}\n\nfunction isResponsiveImageSlide(slide) {\n var _a;\n return (((_a = slide.srcSet) === null || _a === void 0 ? void 0 : _a.length) || 0) > 0;\n}\nfunction reducer({ current, preload }, { type, source }) {\n switch (type) {\n case \"fetch\":\n if (!current) {\n return { current: source };\n }\n return { current, preload: source };\n case \"done\":\n if (source === preload) {\n return { current: source };\n }\n return { current, preload };\n default:\n throw new Error(UNKNOWN_ACTION_TYPE);\n }\n}\nfunction ResponsiveImage(props) {\n var _a, _b;\n const [{ current, preload }, dispatch] = React.useReducer(reducer, {});\n const { slide: image, rect, imageFit, render, interactive } = props;\n const srcSet = image.srcSet.sort((a, b) => a.width - b.width);\n const width = (_a = image.width) !== null && _a !== void 0 ? _a : srcSet[srcSet.length - 1].width;\n const height = (_b = image.height) !== null && _b !== void 0 ? _b : srcSet[srcSet.length - 1].height;\n const cover = isImageFitCover(image, imageFit);\n const maxWidth = Math.max(...srcSet.map((x) => x.width));\n const targetWidth = Math.min((cover ? Math.max : Math.min)(rect.width, width * (rect.height / height)), maxWidth);\n const pixelDensity = devicePixelRatio();\n const handleResize = useEventCallback(() => {\n var _a;\n const targetSource = (_a = srcSet.find((x) => x.width >= targetWidth * pixelDensity)) !== null && _a !== void 0 ? _a : srcSet[srcSet.length - 1];\n if (!current || srcSet.findIndex((x) => x.src === current) < srcSet.findIndex((x) => x === targetSource)) {\n dispatch({ type: \"fetch\", source: targetSource.src });\n }\n });\n useLayoutEffect(handleResize, [rect.width, rect.height, pixelDensity, handleResize]);\n const handlePreload = useEventCallback((currentPreload) => dispatch({ type: \"done\", source: currentPreload }));\n const style = {\n WebkitTransform: !interactive ? \"translateZ(0)\" : \"initial\",\n };\n if (!cover) {\n Object.assign(style, rect.width / rect.height < width / height ? { width: \"100%\", height: \"auto\" } : { width: \"auto\", height: \"100%\" });\n }\n return (React.createElement(React.Fragment, null,\n preload && preload !== current && (React.createElement(ImageSlide, { key: \"preload\", ...props, slide: { ...image, src: preload, srcSet: undefined }, style: { position: \"absolute\", visibility: \"hidden\", ...style }, onLoad: () => handlePreload(preload), render: {\n ...render,\n iconLoading: () => null,\n iconError: () => null,\n } })),\n current && (React.createElement(ImageSlide, { key: \"current\", ...props, slide: { ...image, src: current, srcSet: undefined }, style: style }))));\n}\n\nfunction ZoomWrapper({ render, slide, offset, rect }) {\n var _a;\n const [imageDimensions, setImageDimensions] = React.useState();\n const zoomWrapperRef = React.useRef(null);\n const { zoom, maxZoom, offsetX, offsetY, setZoomWrapper } = useZoom();\n const interactive = zoom > 1;\n const { carousel, on } = useLightboxProps();\n const { currentIndex } = useLightboxState();\n useLayoutEffect(() => {\n if (offset === 0) {\n setZoomWrapper({ zoomWrapperRef, imageDimensions });\n return () => setZoomWrapper(undefined);\n }\n return () => { };\n }, [offset, imageDimensions, setZoomWrapper]);\n let rendered = (_a = render.slide) === null || _a === void 0 ? void 0 : _a.call(render, { slide, offset, rect, zoom, maxZoom });\n if (!rendered && isImageSlide(slide)) {\n const slideProps = {\n slide,\n offset,\n rect,\n render,\n imageFit: carousel.imageFit,\n imageProps: carousel.imageProps,\n onClick: offset === 0 ? () => { var _a; return (_a = on.click) === null || _a === void 0 ? void 0 : _a.call(on, { index: currentIndex }); } : undefined,\n };\n rendered = isResponsiveImageSlide(slide) ? (React.createElement(ResponsiveImage, { ...slideProps, slide: slide, interactive: interactive, rect: offset === 0 ? { width: rect.width * zoom, height: rect.height * zoom } : rect })) : (React.createElement(ImageSlide, { onLoad: (img) => setImageDimensions({ width: img.naturalWidth, height: img.naturalHeight }), ...slideProps }));\n }\n if (!rendered)\n return null;\n return (React.createElement(\"div\", { ref: zoomWrapperRef, className: clsx(cssClass(CLASS_FULLSIZE), cssClass(CLASS_FLEX_CENTER), cssClass(CLASS_SLIDE_WRAPPER), interactive && cssClass(CLASS_SLIDE_WRAPPER_INTERACTIVE)), style: offset === 0 ? { transform: `scale(${zoom}) translateX(${offsetX}px) translateY(${offsetY}px)` } : undefined }, rendered));\n}\n\nconst Zoom = ({ augment, addModule }) => {\n augment(({ zoom: zoomProps, toolbar, render, controller, ...restProps }) => {\n const zoom = resolveZoomProps(zoomProps);\n return {\n zoom,\n toolbar: addToolbarButton(toolbar, PLUGIN_ZOOM, React.createElement(ZoomToolbarControl, null)),\n render: {\n ...render,\n slide: (props) => { var _a; return isImageSlide(props.slide) ? React.createElement(ZoomWrapper, { render: render, ...props }) : (_a = render.slide) === null || _a === void 0 ? void 0 : _a.call(render, props); },\n },\n controller: { ...controller, preventDefaultWheelY: zoom.scrollToZoom },\n ...restProps,\n };\n });\n addModule(createModule(PLUGIN_ZOOM, ZoomContextProvider));\n};\n\nexport { Zoom as default };\n","import React, { useState, useEffect, useCallback, useMemo } from \"react\";\nimport { GatsbyImage, getImage } from \"gatsby-plugin-image\";\n\nimport useEmblaCarousel from \"embla-carousel-react\";\nimport Autoplay from \"embla-carousel-autoplay\";\n\nimport { IScreenshot } from \"../../types/project.type\";\nimport { EmblaCarouselType } from \"embla-carousel\";\n\nimport { DotButton, PrevButton, NextButton } from \"./carouselDotsButtonsArrows\";\nimport Lightbox, { SlideImage } from \"yet-another-react-lightbox\";\nimport Captions from \"yet-another-react-lightbox/plugins/captions\";\nimport Fullscreen from \"yet-another-react-lightbox/plugins/fullscreen\";\nimport Slideshow from \"yet-another-react-lightbox/plugins/slideshow\";\nimport Zoom from \"yet-another-react-lightbox/plugins/zoom\";\nimport \"yet-another-react-lightbox/styles.css\";\nimport \"yet-another-react-lightbox/plugins/captions.css\";\nimport \"yet-another-react-lightbox/plugins/thumbnails.css\";\n\nconst ScreenshotsCarousel = ({\n screenshots,\n}: {\n screenshots: IScreenshot[];\n}) => {\n const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true }, [\n Autoplay({\n stopOnInteraction: false,\n stopOnMouseEnter: true,\n }),\n ]);\n const [prevBtnEnabled, setPrevBtnEnabled] = useState(false);\n const [nextBtnEnabled, setNextBtnEnabled] = useState(false);\n const [selectedIndex, setSelectedIndex] = useState(0);\n const [scrollSnaps, setScrollSnaps] = useState<number[]>([]);\n const [openLightbox, setOpenLightbox] = useState(false);\n\n const imageSlides: SlideImage[] = useMemo(() => {\n return screenshots.map(screenshot => {\n const img = getImage(screenshot.childImageSharp);\n\n return {\n src: screenshot.publicURL,\n width: img?.width,\n height: img?.height,\n }\n });\n }, [screenshots]);\n \n const scrollPrev = useCallback(\n () => emblaApi && emblaApi.scrollPrev(),\n [emblaApi]\n );\n const scrollNext = useCallback(\n () => emblaApi && emblaApi.scrollNext(),\n [emblaApi]\n );\n const scrollTo = useCallback(\n (index: number) => emblaApi && emblaApi.scrollTo(index),\n [emblaApi]\n );\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList());\n }, []);\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap());\n setPrevBtnEnabled(emblaApi.canScrollPrev());\n setNextBtnEnabled(emblaApi.canScrollNext());\n }, []);\n\n useEffect(() => {\n if (!emblaApi) return;\n\n onInit(emblaApi);\n onSelect(emblaApi);\n emblaApi.on(\"reInit\", onInit);\n emblaApi.on(\"reInit\", onSelect);\n emblaApi.on(\"select\", onSelect);\n }, [emblaApi, onInit, onSelect]);\n\n return (\n <>\n <div className=\"h-full overflow-hidden relative\" ref={emblaRef}>\n <div className=\"h-full flex items-center \">\n {screenshots.map(({ id, childImageSharp }) => {\n const img = getImage(childImageSharp);\n console.log(imageSlides)\n return (\n <div\n key={id}\n onClick={() => setOpenLightbox(true)}\n className=\"h-full shrink-0 min-w-0 basis-full px-12 md:px-20 pt-2.5 pb-8 md:py-8 cursor-pointer flex items-center justify-center\"\n >\n {img ? (\n <GatsbyImage\n image={img}\n alt=\"logo\"\n className=\"object-contain rounded-xl max-h-[424px]\"\n />\n ) : null}\n </div>\n );\n })}\n </div>\n <PrevButton onClick={scrollPrev} enabled={prevBtnEnabled} />\n <NextButton onClick={scrollNext} enabled={nextBtnEnabled} />\n\n <div className=\"z-10 absolute bottom-1 left-0 right-0 flex justify-center items-center\">\n {scrollSnaps.map((_, index) => (\n <DotButton\n key={index}\n selected={index === selectedIndex}\n onClick={() => scrollTo(index)}\n />\n ))}\n </div>\n </div>\n <Lightbox \n open={openLightbox}\n close={() => setOpenLightbox(false)}\n slides={imageSlides}\n zoom={{\n scrollToZoom: true,\n maxZoomPixelRatio: 4,\n zoomInMultiplier: 1.5,\n }}\n plugins={[Captions, Fullscreen, Slideshow, Zoom]}\n />\n </>\n );\n};\n\nexport default ScreenshotsCarousel;\n","import React, { HTMLAttributes } from \"react\";\n\ninterface IProjectDescriptionSectionProps\n extends HTMLAttributes<HTMLDivElement> {\n title: string;\n className?: string;\n text?: string;\n textAttr?: HTMLAttributes<HTMLParagraphElement>;\n}\n\nconst ProjectDescriptionSection = ({\n title,\n text,\n className,\n children,\n textAttr,\n ...attr\n}: React.PropsWithChildren<IProjectDescriptionSectionProps>) => {\n return (\n <section {...attr} className=\"w-full\">\n <h2 className=\"text-[24px] md:text-4xl text-secondary-100 uppercase w-full max-w-[320px] mb-2\">\n {title}\n </h2>\n {!!textAttr?.dangerouslySetInnerHTML ? (\n <div\n {...textAttr}\n className={`text-base md:text-lg w-full max-w-[544px] float-right ${className}`}\n />\n ) : (\n <p\n {...textAttr}\n className={`text-base md:text-lg w-full max-w-[544px] float-right ${className}`}\n >\n {children ? children : text}\n </p>\n )}\n </section>\n );\n};\n\nexport default ProjectDescriptionSection;\n","import React from \"react\";\n\ninterface IStackOrTeamCardProps\n extends React.HTMLAttributes<HTMLParagraphElement> {\n text: string;\n}\n\nconst StackOrTeamCard = ({ text, ...attr }: IStackOrTeamCardProps) => {\n return (\n <span\n {...attr}\n className=\"bg-main-70 px-5 h-10 md:h-16 whitespace-nowrap text-sm md:text-lg font-medium rounded-lg flex items-center\"\n >\n {text}\n </span>\n );\n};\n\nexport default StackOrTeamCard;\n","import React from \"react\";\nimport { HeadFC, PageProps, graphql } from \"gatsby\";\nimport { GatsbyImage, getImage } from \"gatsby-plugin-image\";\n\nimport {\n IProjectQueryResult,\n IProjectsPageContext,\n} from \"../types/project.type\";\n\nimport ContentContainer from \"../components/common/contentContainer\";\nimport ScreenshotsCarousel from \"../components/projects/screenshotsCarousel\";\nimport { HeadSeo, LocalBusinessMetadata } from \"../components/common/metadata\";\nimport ProjectDescriptionSection from \"../components/projects/projectDescriptionSection\";\nimport StackOrTeamCard from \"../components/projects/stackOrTeamCard\";\n\nconst Project = ({\n data: {\n markdownRemark: { frontmatter, html },\n },\n pageContext: { markupData, lang },\n}: PageProps<IProjectQueryResult, IProjectsPageContext>) => {\n const {\n title,\n description,\n challenge,\n clientDescription,\n team,\n screenshots,\n stack,\n } = frontmatter;\n const logo = getImage(frontmatter.logo);\n\n return (\n <div\n itemScope\n itemType=\"https://schema.org/CreativeWork\"\n className=\"flex bg-main-100\"\n >\n <ContentContainer\n maxWidthClass=\"max-w-4.5xl\"\n className=\"flex-col text-secondary-70 py-6 md:py-16 lg:!px-0 gap-7 sm:gap-5 md:gap-8\"\n >\n <div className=\"flex flex-col flex-col-reverse items-center md:items-start md:flex-row justify-between gap-x-16 gap-y-2.5 pb-10 gradient-border border-b border-solid\">\n <div className=\"flex-1 w-full md:max-w-[528px]\">\n <h1\n itemProp=\"name\"\n className=\"w-full text-[24px] md:text-4xl font-semibold text-secondary-100 mb-5 uppercase\"\n >\n {title}\n </h1>\n <p itemProp=\"description\" className=\"w-full text-base font-light\">\n {description}\n </p>\n </div>\n\n {logo ? (\n <div className=\"w-28 md:w-48 h-28 md:h-48 flex items-center justify-center\">\n <GatsbyImage\n image={logo}\n imgStyle={{ objectFit: `contain` }}\n alt=\"logo\"\n itemProp=\"image\"\n className=\"max-h-full max-w-full\"\n />\n </div>\n ) : null}\n </div>\n\n <ProjectDescriptionSection\n title={markupData.clientSectionTitle}\n text={clientDescription}\n itemProp=\"sourceOrganization\"\n itemScope\n itemType=\"https://schema.org/Organization\"\n textAttr={{\n itemProp: \"description\",\n }}\n />\n\n <ProjectDescriptionSection\n title={markupData.challengeSectionTitle}\n text={challenge}\n textAttr={{\n itemProp: \"about\",\n }}\n />\n\n {html ? (\n <ProjectDescriptionSection\n title={markupData.solutionSectionTitle}\n text={challenge}\n className=\"project-solution\"\n textAttr={{\n itemProp: \"text\",\n dangerouslySetInnerHTML: { __html: html },\n }}\n />\n ) : null}\n\n {team?.length ? (\n <ProjectDescriptionSection\n title={markupData.teamSectionTitle}\n className=\"flex gap-2.5 flex-wrap pt-2 md:pt-0\"\n >\n {team.map((member) => (\n <StackOrTeamCard\n key={member}\n id={member}\n text={member}\n itemProp=\"contributor\"\n />\n ))}\n </ProjectDescriptionSection>\n ) : null}\n\n {stack?.length ? (\n <ProjectDescriptionSection\n title={markupData.techSectionTitle}\n className=\"flex gap-2.5 flex-wrap pt-2 md:pt-0\"\n >\n {stack.map((tech) => (\n <StackOrTeamCard\n key={tech}\n id={tech}\n text={tech}\n itemProp=\"keywords\"\n />\n ))}\n </ProjectDescriptionSection>\n ) : null}\n\n {screenshots?.length ? (\n <section className=\"w-full mb-8\">\n <h2 className=\"text-[24px] md:text-4xl text-secondary-100 uppercase w-full max-w-[320px]\">\n {markupData.resultSectionTitle}\n </h2>\n <ScreenshotsCarousel screenshots={screenshots} />\n </section>\n ) : null}\n <LocalBusinessMetadata itemProp=\"author\" lang={lang} />\n </ContentContainer>\n </div>\n );\n};\n\nexport default Project;\n\nexport const Head: HeadFC<IProjectQueryResult, IProjectsPageContext> = ({\n data: {\n markdownRemark: {\n frontmatter: { title, description, cover },\n },\n },\n pageContext: { markupData, site, lang },\n location,\n}) => {\n const coverImg = getImage(cover);\n\n return (\n <HeadSeo\n title={`${markupData.head} | ${title.toUpperCase()}`}\n siteUrl={site.siteUrl}\n description={`${description.split(\" \").slice(0, 22).join(\" \")}...`}\n path={location.pathname}\n img={coverImg?.images.fallback?.src}\n lang={lang}\n />\n );\n};\n\nexport const query = graphql`\n query ($id: String) {\n markdownRemark(id: { eq: $id }) {\n id\n html\n frontmatter {\n stack\n title\n description\n challenge\n clientDescription\n logo {\n childImageSharp {\n gatsbyImageData(\n formats: [AUTO, WEBP, AVIF]\n placeholder: BLURRED\n width: 180\n )\n }\n }\n cover {\n childImageSharp {\n gatsbyImageData(\n formats: [AUTO, WEBP, AVIF]\n placeholder: BLURRED\n height: 400\n )\n }\n }\n team\n screenshots {\n id\n publicURL\n childImageSharp {\n gatsbyImageData(\n formats: [AUTO, WEBP, AVIF]\n placeholder: BLURRED\n height: 424\n )\n }\n }\n }\n }\n }\n`;\n","const defaultOptions = {\n active: true,\n breakpoints: {},\n delay: 4000,\n jump: false,\n playOnInit: true,\n stopOnFocusIn: true,\n stopOnInteraction: true,\n stopOnMouseEnter: false,\n stopOnLastSnap: false,\n rootNode: null\n};\n\nfunction Autoplay(userOptions = {}) {\n let options;\n let emblaApi;\n let destroyed;\n let playing = false;\n let resume = true;\n let jump = false;\n let timer = 0;\n function init(emblaApiInstance, optionsHandler) {\n emblaApi = emblaApiInstance;\n const {\n mergeOptions,\n optionsAtMedia\n } = optionsHandler;\n const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions);\n const allOptions = mergeOptions(optionsBase, userOptions);\n options = optionsAtMedia(allOptions);\n if (emblaApi.scrollSnapList().length <= 1) return;\n jump = options.jump;\n destroyed = false;\n const {\n eventStore,\n ownerDocument\n } = emblaApi.internalEngine();\n const emblaRoot = emblaApi.rootNode();\n const root = options.rootNode && options.rootNode(emblaRoot) || emblaRoot;\n const container = emblaApi.containerNode();\n emblaApi.on('pointerDown', stopTimer);\n if (!options.stopOnInteraction) {\n emblaApi.on('pointerUp', startTimer);\n }\n if (options.stopOnMouseEnter) {\n eventStore.add(root, 'mouseenter', () => {\n resume = false;\n stopTimer();\n });\n if (!options.stopOnInteraction) {\n eventStore.add(root, 'mouseleave', () => {\n resume = true;\n startTimer();\n });\n }\n }\n if (options.stopOnFocusIn) {\n eventStore.add(container, 'focusin', stopTimer);\n if (!options.stopOnInteraction) {\n eventStore.add(container, 'focusout', startTimer);\n }\n }\n eventStore.add(ownerDocument, 'visibilitychange', visibilityChange);\n if (options.playOnInit && !documentIsHidden()) startTimer();\n }\n function destroy() {\n emblaApi.off('pointerDown', stopTimer).off('pointerUp', startTimer);\n stopTimer();\n destroyed = true;\n playing = false;\n }\n function startTimer() {\n if (destroyed) return;\n if (!resume) return;\n if (!playing) emblaApi.emit('autoplay:play');\n const {\n ownerWindow\n } = emblaApi.internalEngine();\n ownerWindow.clearInterval(timer);\n timer = ownerWindow.setInterval(next, options.delay);\n playing = true;\n }\n function stopTimer() {\n if (destroyed) return;\n if (playing) emblaApi.emit('autoplay:stop');\n const {\n ownerWindow\n } = emblaApi.internalEngine();\n ownerWindow.clearInterval(timer);\n timer = 0;\n playing = false;\n }\n function visibilityChange() {\n if (documentIsHidden()) {\n resume = playing;\n return stopTimer();\n }\n if (resume) startTimer();\n }\n function documentIsHidden() {\n const {\n ownerDocument\n } = emblaApi.internalEngine();\n return ownerDocument.visibilityState === 'hidden';\n }\n function play(jumpOverride) {\n if (typeof jumpOverride !== 'undefined') jump = jumpOverride;\n resume = true;\n startTimer();\n }\n function stop() {\n if (playing) stopTimer();\n }\n function reset() {\n if (playing) play();\n }\n function isPlaying() {\n return playing;\n }\n function next() {\n const {\n index\n } = emblaApi.internalEngine();\n const nextIndex = index.clone().add(1).get();\n const lastIndex = emblaApi.scrollSnapList().length - 1;\n const kill = options.stopOnLastSnap && nextIndex === lastIndex;\n if (kill) stopTimer();\n if (emblaApi.canScrollNext()) {\n emblaApi.scrollNext(jump);\n } else {\n emblaApi.scrollTo(0, jump);\n }\n }\n const self = {\n name: 'autoplay',\n options: userOptions,\n init,\n destroy,\n play,\n stop,\n reset,\n isPlaying\n };\n return self;\n}\nAutoplay.globalOptions = undefined;\n\nexport { Autoplay as default };\n//# sourceMappingURL=embla-carousel-autoplay.esm.js.map\n"],"names":["DotButton","_ref","selected","onClick","___EmotionJSX","className","concat","type","PrevButton","_ref2","enabled","disabled","viewBox","fill","d","NextButton","_ref3","MODULE_CAROUSEL","MODULE_CONTROLLER","MODULE_PORTAL","MODULE_TOOLBAR","PLUGIN_CAPTIONS","PLUGIN_FULLSCREEN","PLUGIN_SLIDESHOW","PLUGIN_THUMBNAILS","PLUGIN_ZOOM","SLIDE_STATUS_LOADING","SLIDE_STATUS_PLAYING","SLIDE_STATUS_ERROR","SLIDE_STATUS_COMPLETE","SLIDE_STATUS_PLACEHOLDER","activeSlideStatus","status","ACTIVE_SLIDE_LOADING","ACTIVE_SLIDE_PLAYING","ACTIVE_SLIDE_ERROR","ACTIVE_SLIDE_COMPLETE","CLASS_FULLSIZE","CLASS_FLEX_CENTER","CLASS_NO_SCROLL_PADDING","CLASS_SLIDE_WRAPPER","ACTION_PREV","ACTION_NEXT","ACTION_SWIPE","ACTION_CLOSE","EVENT_ON_POINTER_DOWN","EVENT_ON_POINTER_MOVE","EVENT_ON_POINTER_UP","EVENT_ON_POINTER_LEAVE","EVENT_ON_POINTER_CANCEL","EVENT_ON_KEY_DOWN","EVENT_ON_KEY_UP","EVENT_ON_WHEEL","VK_ESCAPE","VK_ARROW_LEFT","VK_ARROW_RIGHT","ELEMENT_ICON","IMAGE_FIT_CONTAIN","IMAGE_FIT_COVER","UNKNOWN_ACTION_TYPE","cssPrefix$3","clsx","classes","filter","Boolean","join","cssClass","name","cssVar","composePrefix","base","prefix","makeComposePrefix","cleanup","cleaners","forEach","cleaner","makeUseContext","contextName","context","ctx","Error","hasWindow","window","round","value","decimals","factor","Math","Number","EPSILON","isImageSlide","slide","undefined","isImageFitCover","image","imageFit","parseInt","parseLengthPercentage","input","pixel","endsWith","percent","computeSlideRect","containerRect","padding","paddingValue","paddingPixels","width","max","height","getSlideIndex","index","slidesCount","hasSlides","slides","length","getSlide","getSlideIfPresent","getSlideKey","src","addToolbarButton","toolbar","key","button","buttons","restToolbar","findIndex","item","buttonWithKey","result","splice","isReact19","split","LightboxDefaultProps","open","close","render","plugins","labels","animation","fade","swipe","easing","navigation","carousel","finite","preload","spacing","imageProps","controller","ref","focus","aria","touchAction","closeOnPullUp","closeOnPullDown","closeOnBackdropClick","preventDefaultWheelX","preventDefaultWheelY","portal","noScroll","on","styles","createModule","component","createNode","module","children","traverseNode","node","target","apply","flatMap","n","_a","traverse","nodes","DocumentContext","useDocumentContext","DocumentContextProvider","nodeRef","getOwnerDocument","current","ownerDocument","document","getOwnerWindow","defaultView","Provider","EventsContext","useEvents","EventsProvider","subscriptions","Object","keys","topic","unsubscribe","callback","cb","publish","event","subscribe","push","LightboxPropsContext","useLightboxProps","LightboxPropsProvider","props","LightboxStateContext","useLightboxState","LightboxDispatchContext","useLightboxDispatch","reducer","state","action","increment","globalIndex","currentIndex","currentSlide","duration","LightboxStateProvider","dispatch","TimeoutsContext","useTimeouts","TimeoutsProvider","timeouts","tid","clearTimeout","removeTimeout","id","setTimeout","fn","delay","IconButton","label","label$1","icon","Icon","renderIcon","style","rest","buttonLabel","defaultLabel","title","svgIcon","xmlns","focusable","displayName","createIcon","glyph","CloseIcon","PreviousIcon","NextIcon","LoadingIcon","Array","from","map","_","array","x1","y1","x2","y2","strokeLinecap","strokeWidth","stroke","strokeOpacity","transform","ErrorIcon","useLayoutEffect","useMotionPreference","reduceMotion","setReduceMotion","_b","mediaQuery","matchMedia","call","matches","listener","addEventListener","removeEventListener","useAnimation","computeAnimation","snapshot","_c","keyframes","onfinish","getBoundingClientRect","x","y","z","matcher","getComputedStyle","match","values","currentTransformation","cancel","animate","err","console","error","prepareAnimation","currentSnapshot","isAnimationPlaying","playState","useContainerRect","containerRef","observerRef","setContainerRect","setContainerRef","disconnect","updateContainerRect","parse","parseFloat","clientWidth","paddingLeft","paddingRight","clientHeight","paddingTop","paddingBottom","ResizeObserver","observe","useDelay","timeoutId","useEventCallback","args","setRef","useForkRef","refA","refB","refValue","useLoseFocus","focused","onFocus","onBlur","useRTL","isRTL","setIsRTL","documentElement","direction","useThrottle","lastCallbackTime","delayCallback","executeCallback","Date","now","slidePrefix","slideImagePrefix","ImageSlide","offset","rect","onLoad","onError","_d","_e","_f","_g","setStatus","imageRef","handleLoading","img","decode","Promise","resolve","catch","then","parentNode","setImageRef","complete","handleOnLoad","currentTarget","handleOnError","cover","nonInfinite","fallback","isFinite","maxWidth","srcSet","naturalWidth","maxHeight","naturalHeight","defaultStyle","sort","a","b","sizes","min","MAX_VALUE","imagePropsStyle","imagePropsClassName","restImageProps","draggable","alt","iconLoading","iconError","LightboxRoot","SwipeState","Gesture","usePointerEvents","subscribeSensors","onPointerDown","onPointerMove","onPointerUp","SWIPE_THRESHOLD","cssContainerPrefix","ControllerContext","useController","ControllerModule","toolbarWidth","setToolbarWidth","swipeState","setSwipeState","NONE","swipeOffset","pullOffset","pullOpacity","registerSensors","subscribers","notifySubscribers","isPropagationStopped","onPointerLeave","onPointerCancel","onKeyDown","onKeyUp","onWheel","unshift","listeners","el","useSensors","cleanupAnimationIncrement","cleanupSwipeOffset","cleanupPullOffset","handleContainerRef","horizontal","abs","deltaX","deltaY","ctrlKey","preventDefault","passive","usePreventWheelDefaults","carouselRef","setCarouselRef","rtl","getLightboxProps","getLightboxState","prev","params","next","isSwipeValid","setSwipeOffset","setProperty","setPullOffset","offsetValue","preparePullAnimation","translate","opacity","pull","ANIMATION","parsedSpacing","spacingValue","currentSwipeOffset","swipeDuration","swipeEasing","count","newSwipeState","newSwipeAnimationDuration","containerWidth","elapsedTime","expectedTime","swipeParams","SWIPE","pullParams","PULL","swipeAnimationDuration","onSwipeStart","onSwipeProgress","onSwipeFinish","onSwipeCancel","pullUpEnabled","pullDownEnabled","onPullStart","onPullProgress","onPullFinish","onPullCancel","pointers","activePointer","startTime","gesture","clearPointer","pointerId","currentPointers","p","addPointer","persist","exceedsPullThreshold","threshold","find","currentOffset","pointer","isCurrentPointer","clientX","clientY","startGesture","newGesture","usePointerSwipe","intent","intentCleanup","resetCleanup","wheelInertia","wheelInertiaCleanup","cancelSwipeIntentCleanup","cancelSwipeResetCleanup","handleCleanup","handleCancelSwipe","setWheelInertia","inertia","currentSwipeIntent","newSwipeOffset","sign","useWheelSwipe","focusOnMount","querySelector","onViewCallback","view","slideRect","container","role","tabIndex","controls","cssPrefix$2","cssSlidePrefix","CarouselSlide","click","offscreen","contains","activeElement","condition","inert","HTMLElement","classList","rendered","slideHeader","slideContainer","slideFooter","renderSlide","Placeholder","CarouselModule","minimum","floor","calculatePreload","items","placeholder","useNavigationState","prevDisabled","nextDisabled","NavigationButton","NavigationModule","buttonPrev","buttonNext","iconPrev","iconNext","throttle","handleKeyDown","useKeyboardNavigation","navigationPrev","navigationNext","noScrollPadding","isHTMLElement","element","padScrollbar","property","computedValue","originalValue","getPropertyValue","removeProperty","NoScrollModule","ownerWindow","body","scrollbar","innerWidth","elements","getElementsByTagName","i","add","remove","clean","cssPrefix$1","setAttribute","attribute","previousValue","getAttribute","removeAttribute","PortalModule","mounted","setMounted","visible","setVisible","restoreFocus","animationDuration","handleClose","exiting","exited","handleEnter","scrollTop","entering","indexOf","tagName","entered","handleRef","createPortal","root","relatedTarget","RootModule","ToolbarModule","buttonClose","iconClose","renderNode","child","mergeAnimation","defaultAnimation","defaultAnimationEasing","restDefaultAnimation","restAnimation","Lightbox","restProps","defaultCarousel","defaultRender","defaultToolbar","defaultController","defaultNoScroll","defaultOn","defaultSlides","defaultIndex","defaultPlugins","restDefaultProps","config","augmentation","augmentations","pop","addParent","append","addChild","precede","addSibling","addModule","replace","augment","plugin","reduce","acc","withPlugins","defaultCaptionsProps","descriptionTextAlign","descriptionMaxLines","showToggle","hidden","resolveCaptionsProps","captions","CaptionsContext","useCaptions","CaptionsContextProvider","show","hide","Title","captionsTitleContainer","captionsTitle","Description","description","useCaptionsProps","captionsDescriptionContainer","captionsDescription","line","captionsIcon","strokeLinejoin","CaptionsVisible","CaptionsHidden","mask","CaptionsButton","buttonCaptions","iconCaptionsVisible","iconCaptionsHidden","Captions","captionsProps","renderFooter","restRender","defaultFullscreenProps","auto","resolveFullscreenProps","fullscreen","FullscreenContext","useFullscreen","FullscreenContextProvider","fullscreenProps","setDisabled","setFullscreen","wasFullscreen","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","getFullscreenElement","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","shadowRoot","enter","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exit","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","onEnterFullscreen","enterFullscreen","onExitFullscreen","handleAutoFullscreen","EnterFullscreenIcon","ExitFullscreenIcon","FullscreenButton","buttonFullscreen","iconExitFullscreen","iconEnterFullscreen","Fullscreen","defaultSlideshowProps","autoplay","resolveSlideshowProps","slideshow","SlideshowContext","useSlideshow","SlideshowContextProvider","wasPlaying","playing","setPlaying","scheduler","slideStatus","play","pause","cancelScheduler","scheduleNextSlide","onSlideshowStart","slideshowStart","onSlideshowStop","slideshowStop","PlayIcon","PauseIcon","SlideshowButton","focusListeners","buttonSlideshow","iconSlideshowPause","iconSlideshowPlay","Slideshow","defaultZoomProps","maxZoomPixelRatio","zoomInMultiplier","doubleTapDelay","doubleClickDelay","doubleClickMaxStops","keyboardMoveDistance","wheelZoomDistanceFactor","pinchZoomDistanceFactor","scrollToZoom","resolveZoomProps","zoom","useZoomProps","distance","pointerA","pointerB","scaleZoom","delta","clamp","useZoomState","imageRect","maxZoom","zoomWrapperRef","setZoom","offsetX","setOffsetX","offsetY","setOffsetY","zoomAnimation","zoomAnimationStart","zoomAnimationDuration","playZoomAnimation","useZoomAnimation","currentSource","changeOffsets","dx","dy","targetZoom","newZoom","newOffsetX","newOffsetY","maxOffsetX","maxOffsetY","changeZoom","rapid","handleControllerRectChange","zoomIn","zoomOut","ZoomControllerContext","useZoom","ZoomContextProvider","zoomWrapper","setZoomWrapper","imageDimensions","maxImageRect","useZoomImageRect","onZoomCallback","useZoomCallback","activePointers","lastPointerDown","pinchZoomDistance","translateCoordinates","pageX","pageY","scrollX","scrollY","left","top","stopPropagation","move","handleChangeZoom","zoomValue","hasMeta","getModifierState","replacePointer","pointerType","timeStamp","currentDistance","coordinate","cleanupSensors","useZoomSensors","zoomRef","ZoomInIcon","ZoomOutIcon","ZoomButton","onLoseFocus","wasEnabled","wasFocused","zoomInCallback","zoomOutCallback","zoomDisabled","iconZoomIn","iconZoomOut","ZoomButtonsGroup","zoomInRef","zoomOutRef","focusSibling","sibling","focusZoomIn","focusZoomOut","ZoomToolbarControl","buttonZoom","source","ResponsiveImage","interactive","targetWidth","pixelDensity","devicePixelRatio","handleResize","targetSource","handlePreload","currentPreload","WebkitTransform","assign","position","visibility","ZoomWrapper","setImageDimensions","slideProps","isResponsiveImageSlide","Zoom","zoomProps","screenshots","emblaRef","emblaApi","useEmblaCarousel","loop","Autoplay","stopOnInteraction","stopOnMouseEnter","prevBtnEnabled","setPrevBtnEnabled","useState","nextBtnEnabled","setNextBtnEnabled","selectedIndex","setSelectedIndex","scrollSnaps","setScrollSnaps","openLightbox","setOpenLightbox","imageSlides","useMemo","screenshot","getImage","childImageSharp","publicURL","scrollPrev","useCallback","scrollNext","scrollTo","onInit","scrollSnapList","onSelect","selectedScrollSnap","canScrollPrev","canScrollNext","useEffect","React","GatsbyImage","text","textAttr","attr","_extends","dangerouslySetInnerHTML","data","markdownRemark","frontmatter","html","pageContext","markupData","lang","challenge","clientDescription","team","stack","logo","itemScope","itemType","ContentContainer","maxWidthClass","itemProp","imgStyle","objectFit","ProjectDescriptionSection","clientSectionTitle","challengeSectionTitle","solutionSectionTitle","__html","teamSectionTitle","member","StackOrTeamCard","techSectionTitle","tech","resultSectionTitle","ScreenshotsCarousel","LocalBusinessMetadata","Head","_coverImg$images$fall","site","location","coverImg","HeadSeo","head","toUpperCase","siteUrl","slice","path","pathname","images","defaultOptions","active","breakpoints","jump","playOnInit","stopOnFocusIn","stopOnLastSnap","rootNode","userOptions","options","destroyed","resume","timer","startTimer","emit","internalEngine","clearInterval","setInterval","stopTimer","visibilityChange","documentIsHidden","visibilityState","jumpOverride","nextIndex","clone","get","lastIndex","init","emblaApiInstance","optionsHandler","mergeOptions","optionsAtMedia","optionsBase","globalOptions","allOptions","eventStore","emblaRoot","containerNode","destroy","off","stop","reset","isPlaying"],"sourceRoot":""}