{"version":3,"file":"static/chunks/8213-273d7fdebf04828c.js","mappings":"4JAMe,SAASA,IACtB,IAAMC,EAAQC,CAAAA,EAAAA,EAAAA,CAAAA,CAAcA,CAACC,EAAAA,CAAYA,EAMzC,OAAOF,CAAK,CAACG,EAAAA,CAAQA,CAAC,EAAIH,CAC5B,iYCdA,iBACA,eACA,eACA,cACA,WACA,SACA,YAKA,WAIA,SACA,YAEA,UACA,aACA,gBACA,qBAAsD,EAAO,EAC7D,KACA,EANA,WAOA,KACA,KACA,iBACA,gBACA,cACA,sBACA,kBACA,8BACA,SACA,SACA,UACA,UACA,kBACA,kBACA,gBACA,mBACA,oBACA,cACA,YACA,YACA,WACA,cACA,eACA,WACA,SACA,YACA,UACA,uEClDe,cACf,IACA,QACA,OACA,QACA,CAAI,SACJ,+DAGS,OAAY,iCAFrB,CAGA,kRCirBA,EAcA,mCApsBA,eACA,iBACA,sCACA,CACA,cACA,SAAc,EAAY,EAAE,EAAK,EAEjC,cACA,WAAgB,EAAY,EAAE,EAAK,EAEnC,gBACA,SAAc,EAAK,EAAE,MAAa,EAAO,KAAO,EAEhD,cACA,gBACA,CAKA,iBACA,WACA,cACA,GACA,CAAS,CACT,CACA,CACA,kBACA,WACA,MAAoB,YAAgB,IACpC,MACA,eAA+B,GAAM,wBAAwB,EAAY,YAEzE,QACA,CACA,CACA,aACA,gCACA,CACA,kBACA,YACA,yCACA,CACA,cACA,wCACA,CACA,gBACA,oBAA8B,IAAe,eAAwB,IAAiB,MAAiB,IAAe,CAEtH,cACA,gDACA,CACA,cACA,sBACA,OAAiB,SAEjB,uBACA,WACA,wBAAuC,WAAiB,CAAI,QAC5D,CACA,OAAa,QACb,CASA,aACA,iEACA,CAOA,oBANA,EAOA,SANA,CADA,EAOA,UANA,GAMA,EANA,SAMA,CAEA,gBACA,SANA,SAMA,aACA,CAIA,kBACA,MACA,SACA,YAAY,QAA0B,EACtC,wBACA,EAA0B,gBAAoB,IAAW,cAAkB,QAAW,EAAK,SAC3F,S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aAAiB,OAAe,GAAY,OAC9D,kBACA,6BACA,6CACA,OACA,KACA,aACA,2EAAyH,cAAmB,IAC5I,EACA,OACA,OACA,aACA,UAUA,sBANA,QACA,EACA,OACA,GACA,CAHA,EAJA,GASA,MARA,IAQA,GAEA,0EAAwH,cAAmB,KAC3I,2EAAyH,UAAoB,EAC7I,EACA,CAAY,qBAAyC,eACrD,gBACA,OACA,WACA,CACA,0BAAmD,iBAAuC,KAC1F,kBACqB,CACrB,CAAsB,sCAA0C,CAChE,CACA,oBACA,qBAIA,CAAK,EACL,WACA,SACA,MACA,OACA,aACA,iBACA,IACA,uCACA,kBACA,UACA,CAAiB,GAEjB,OACA,MACA,SACA,CAAa,IACb,eACA,GACA,IAEA,CACA,EACA,kBAAY,0BAAuC,eACnD,MACA,yEACA,mBACA,+CACA,OACA,WACA,CACA,uBAAgD,qCAChD,SACA,IACA,IAAwC,QACnB,CACrB,CAAsB,4BAA8B,CACpD,CACA,8BACA,0BAEA,CAEA,CAAK,EACL,UACA,QACA,kBACA,0DACA,6CACA,WAAc,GAAY,EAC1B,qCACA,cACA,MACA,OACA,6BACA,gBACA,IACA,gBACA,CACA,QACA,IACA,EACA,oBAEA,GACA,GACA,qBAEA,SAA0D,IAAW,CAAG,IAAW,EAGnF,KAEA,CACA,OACA,KAA0B,IAAW,CACrC,SACA,MAGA,SACA,KAGA,IAA+B,IAAW,GAC1C,UACA,KAGA,SACA,MAIA,OACA,MACA,SACA,CAAS,CAJT,iBAKA,WACA,IACA,uCACA,oBACa,EAEb,KACA,EAAgB,IAAY,EAC5B,aACA,YACA,WACA,QACA,CAAS,CACT,CAAK,EACD,WAAe,MACnB,QACA,iHACA,SAAuD,yBAA6B,uBAEpF,CAAK,oBACL,QACA,EACA,GACA,4BACA,QACA,eACA,SACA,WAAsC,4BAA4B,EAClE,cAA4B,UAAkB,EAC9C,CACA,IACA,KACA,GACA,SAEA,CAAS,CACT,SACA,SACA,YACA,EAzaA,sCACA,MAAmB,QAAY,IAC/B,EAAqB,QAAY,KACjC,EAA0B,QAAY,GACtC,EAAsB,QAAY,IAClC,EAAoB,QAAY,SAChC,EAAyB,aAAiB,KAC1C,0BACA,iBACA,kBAEA,gBACA,8DACA,CAAK,KACL,EAAuB,aAAiB,KACxC,KACA,YACA,iBACA,CAAK,MACL,SACA,IACA,CAAK,EACL,yBACA,SACA,0EACA,2BACA,YACA,oBACA,kBACA,mBACA,OAGA,KAGA,qBACA,QACA,OAGA,MAGA,YACA,iBAEA,IACA,CAAK,EA4CL,OA3CA,OACA,mDACA,MACA,8BACA,kBACA,iBACA,KAGA,KAEA,MACA,CACA,0BACA,sBACA,uBACA,UACA,KACA,sBACA,qBACA,WACA,CACA,sCAxEA,IAwEA,MACA,WACA,KAEA,6BA5EA,MA6EA,UACA,IAEA,MACA,IACA,qBACA,YACA,MAEA,qBACA,YACA,MAGA,CACA,CAAK,EACL,EACA,KA6UA,cAvTA,4BACA,MAAmB,QAAY,IAC/B,EAAmB,QAAY,IAC/B,EAA0B,QAAY,GACtC,EAAyB,QAAY,GACrC,EAAyB,QAAY,IACrC,EAAgC,QAAY,GAC5C,EAAsB,QAAY,IAClC,YAAY,kBAA2B,IACvC,EAAqC,aAAiB,MACtD,YACA,aACA,iBAEA,CAAK,MACL,EAAoC,aAAiB,MACrD,YACA,aACA,iBAEA,CAAK,MACL,UACA,cACA,YACA,YACA,IACA,IAEA,CAAK,EACD,WAAe,UACnB,aACA,iBACA,eACA,YAEA,CAAK,EACL,SACA,cAGA,sCAFA,OAKA,UACA,YACA,aACA,UACA,IACA,OACA,YACA,gBACA,CAAqB,MACrB,MACA,EACA,eACA,gDACA,YACA,MACA,CACA,iBACA,OAIA,GAFA,oBACA,IACA,uBACA,YACA,KACA,qBACA,QAEA,CACA,gBACA,iBACA,iBACA,eACA,aAEA,CAAiB,GACjB,CACA,MACA,gBACA,yBAKA,GAJA,uCACA,YACA,KACA,IACA,kBACA,YACA,0BACA,MACA,CACA,yBACA,MAEA,WAEA,CAAK,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A,4CACA,GACA,CAAS,GACT,CAAK,EACD,WAAe,OAAiB,GAAY,WAChD,aACA,SACA,aACA,MACA,6CACA,wFACA,YAAwB,WAAqB,MAC7C,WACA,+DACA,iCACA,2CAEA,CACA,oBACA,OACA,kFACA,CAAS,EACT,OACA,KACA,4CACA,CAAS,GACT,CAAK,EACL,EAAsB,aAAiB,KACvC,EACA,KAGA,GAEA,CAAK,QACL,SACU,kBAAY,CAAC,eAAmB,KAAiB,sBA7E3D,EAAyB,IAAa,CADtC,SA8E2D,EAA6E,IAAuB,QA9E/J,EA8E+J,OA7E/J,IAAyB,GAAa,MA6EyH,gDAC/J,6BACA,CAAwB,kCAAwC,EAAkB,KAClF,KACA,2CACA,CAAwB,qDACxB,KACA,UACa,aACb,WACA,2BAEA,EAAe,2BACf,IACA,GAMA,KAAgC,IAAW,CAH3C,mBAAgB,EAAU,EAC1B,OAAW,eAAmB,CAAC,UAAc,QAC7C,GAmBA,KAAmC,IAAc,CAbjD,UAAmB,iBAAW,EAAS,qBAAY,cAAwB,UAAU,EACrF,UAAY,qBAAyB,KACrC,iBAAY,mBAAiC,KAC7C,QACA,yBACA,CAAK,6BACL,UACA,EACA,IACe,eAAmB,IAAe,IAAK,GAAY,6CAA0E,EAE5I,OAAY,eAAmB,QAAU,kCAbzC,EAAyB,IAAc,CADvC,QAcyC,CAA+E,6BAAwF,GAAY,QAC5N,GAgBA,sBAAoB,8FAAsG,EAC1H,IAAY,wGAA4Q,EACxR,QAAY,kBAAuB,SA1zCnC,aACA,QACA,MACA,aACA,kBACA,cACA,sCACA,SACA,6BACA,qBACA,CACA,QACA,EACA,UACA,WACA,WACA,MACA,CACA,sBACA,EACA,UACA,2CACA,EACA,YACA,YACA,MACA,OACA,eACA,eACA,0CACA,YACA,EACA,CACS,CACT,EACA,YACA,eACA,YACA,KACA,YACA,CACA,EACA,MACA,EAAe,IAAiB,GAChC,EACA,UACA,6BACA,EACA,MACA,sBACA,EACA,MACA,SACA,EAcA,OAbA,cACA,GACA,WACA,YACA,SACA,WACA,aACA,YACA,UACA,SACA,SACA,CAAS,CACT,CAAK,EACL,CACA,SACA,uCACA,CACA,EAmvCmC,CACnC,MACA,MACA,MACA,MACA,MACA,MACA,EACA,EACA,EACA,OACA,KACA,mBAvBA,MAAwD,EACxD,IAAY,eAA0D,EACtE,QAAY,QAA2B,EACvC,OACA,QAAkB,UAAsC,CACxD,KACA,IACA,CACA,EAeA,KACA,UAAoB,UAAiC,CACrD,QAAkB,UAA6B,CAC/C,SAAmB,UAA+B,CAClD,YAAsB,UAAqC,CAC3D,UAAoB,UAAiC,CACrD,IAAc,UAAqB,CACnC,KACA,KACK,SACL,OAEY,eAAmB,IAA0B,KAAU,CAC3D,eAAmB,IAA0B,0BAAyE,CAClH,eAAmB,QACf,eAAmB,QA1CnC,gBACA,MACA,OAAW,eAAmB,qBAA0B,uBAAiC,2DACzF,EAuCmC,eAJnC,IAKA,8DC9gDO,MAA2B,OAAW,GAI7C,EAHA,cACA,MAAS,OAAsB,GAC/B,MACuB,wDCGvB,MAJA,iBACA,MAAuB,KAGR,OAHwB,CAAC,GAAY,EACpD,UAJA,gBAIA,GAJA,OAIA,GACA,mDCEA,MADA,2BAA0D,CAC3C,CAD2C,eAAqB,CAAG,WAAe","sources":["webpack://_N_E/./node_modules/@mui/material/styles/useTheme.js","webpack://_N_E/./node_modules/yet-another-react-lightbox/dist/types.js","webpack://_N_E/./node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","webpack://_N_E/./node_modules/yet-another-react-lightbox/dist/index.js","webpack://_N_E/./node_modules/@mui/system/esm/useTheme/useTheme.js","webpack://_N_E/./node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js","webpack://_N_E/./node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\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","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\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 };","'use client';\n\nimport createTheme from \"../createTheme/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;"],"names":["useTheme","theme","useThemeSystem","defaultTheme","THEME_ID"],"sourceRoot":"","ignoreList":[0,1,2,3,4,5,6]}