{"version":3,"file":"AttachmentLinksList-BrhQ2zdr.js","sources":["../../../node_modules/filesize/dist/filesize.esm.js","../../../node_modules/yet-another-react-lightbox/dist/types.js","../../../node_modules/yet-another-react-lightbox/dist/index.js","../../../frontend/src/Components/Posts/Shared/AttachmentLink/AttachmentLink.tsx","../../../frontend/src/Components/Posts/Shared/AttachmentLinksList/AttachmentLinksList.tsx"],"sourcesContent":["/**\n * filesize\n *\n * @copyright 2024 Jason Mulligan \n * @license BSD-3-Clause\n * @version 10.1.6\n */\nconst ARRAY = \"array\";\r\nconst BIT = \"bit\";\r\nconst BITS = \"bits\";\r\nconst BYTE = \"byte\";\r\nconst BYTES = \"bytes\";\r\nconst EMPTY = \"\";\r\nconst EXPONENT = \"exponent\";\r\nconst FUNCTION = \"function\";\r\nconst IEC = \"iec\";\r\nconst INVALID_NUMBER = \"Invalid number\";\r\nconst INVALID_ROUND = \"Invalid rounding method\";\r\nconst JEDEC = \"jedec\";\r\nconst OBJECT = \"object\";\r\nconst PERIOD = \".\";\r\nconst ROUND = \"round\";\r\nconst S = \"s\";\r\nconst SI = \"si\";\r\nconst SI_KBIT = \"kbit\";\r\nconst SI_KBYTE = \"kB\";\r\nconst SPACE = \" \";\r\nconst STRING = \"string\";\r\nconst ZERO = \"0\";\r\nconst STRINGS = {\r\n\tsymbol: {\r\n\t\tiec: {\r\n\t\t\tbits: [\"bit\", \"Kibit\", \"Mibit\", \"Gibit\", \"Tibit\", \"Pibit\", \"Eibit\", \"Zibit\", \"Yibit\"],\r\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\r\n\t\t},\r\n\t\tjedec: {\r\n\t\t\tbits: [\"bit\", \"Kbit\", \"Mbit\", \"Gbit\", \"Tbit\", \"Pbit\", \"Ebit\", \"Zbit\", \"Ybit\"],\r\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\r\n\t\t}\r\n\t},\r\n\tfullform: {\r\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\r\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\r\n\t}\r\n};function filesize (arg, {\r\n\tbits = false,\r\n\tpad = false,\r\n\tbase = -1,\r\n\tround = 2,\r\n\tlocale = EMPTY,\r\n\tlocaleOptions = {},\r\n\tseparator = EMPTY,\r\n\tspacer = SPACE,\r\n\tsymbols = {},\r\n\tstandard = EMPTY,\r\n\toutput = STRING,\r\n\tfullform = false,\r\n\tfullforms = [],\r\n\texponent = -1,\r\n\troundingMethod = ROUND,\r\n\tprecision = 0\r\n} = {}) {\r\n\tlet e = exponent,\r\n\t\tnum = Number(arg),\r\n\t\tresult = [],\r\n\t\tval = 0,\r\n\t\tu = EMPTY;\r\n\r\n\t// Sync base & standard\r\n\tif (standard === SI) {\r\n\t\tbase = 10;\r\n\t\tstandard = JEDEC;\r\n\t} else if (standard === IEC || standard === JEDEC) {\r\n\t\tbase = 2;\r\n\t} else if (base === 2) {\r\n\t\tstandard = IEC;\r\n\t} else {\r\n\t\tbase = 10;\r\n\t\tstandard = JEDEC;\r\n\t}\r\n\r\n\tconst ceil = base === 10 ? 1000 : 1024,\r\n\t\tfull = fullform === true,\r\n\t\tneg = num < 0,\r\n\t\troundingFunc = Math[roundingMethod];\r\n\r\n\tif (typeof arg !== \"bigint\" && isNaN(arg)) {\r\n\t\tthrow new TypeError(INVALID_NUMBER);\r\n\t}\r\n\r\n\tif (typeof roundingFunc !== FUNCTION) {\r\n\t\tthrow new TypeError(INVALID_ROUND);\r\n\t}\r\n\r\n\t// Flipping a negative number to determine the size\r\n\tif (neg) {\r\n\t\tnum = -num;\r\n\t}\r\n\r\n\t// Determining the exponent\r\n\tif (e === -1 || isNaN(e)) {\r\n\t\te = Math.floor(Math.log(num) / Math.log(ceil));\r\n\r\n\t\tif (e < 0) {\r\n\t\t\te = 0;\r\n\t\t}\r\n\t}\r\n\r\n\t// Exceeding supported length, time to reduce & multiply\r\n\tif (e > 8) {\r\n\t\tif (precision > 0) {\r\n\t\t\tprecision += 8 - e;\r\n\t\t}\r\n\r\n\t\te = 8;\r\n\t}\r\n\r\n\tif (output === EXPONENT) {\r\n\t\treturn e;\r\n\t}\r\n\r\n\t// Zero is now a special case because bytes divide by 1\r\n\tif (num === 0) {\r\n\t\tresult[0] = 0;\r\n\t\tu = result[1] = STRINGS.symbol[standard][bits ? BITS : BYTES][e];\r\n\t} else {\r\n\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\r\n\r\n\t\tif (bits) {\r\n\t\t\tval = val * 8;\r\n\r\n\t\t\tif (val >= ceil && e < 8) {\r\n\t\t\t\tval = val / ceil;\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst p = Math.pow(10, e > 0 ? round : 0);\r\n\t\tresult[0] = roundingFunc(val * p) / p;\r\n\r\n\t\tif (result[0] === ceil && e < 8 && exponent === -1) {\r\n\t\t\tresult[0] = 1;\r\n\t\t\te++;\r\n\t\t}\r\n\r\n\t\tu = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : STRINGS.symbol[standard][bits ? BITS : BYTES][e];\r\n\t}\r\n\r\n\t// Decorating a 'diff'\r\n\tif (neg) {\r\n\t\tresult[0] = -result[0];\r\n\t}\r\n\r\n\t// Setting optional precision\r\n\tif (precision > 0) {\r\n\t\tresult[0] = result[0].toPrecision(precision);\r\n\t}\r\n\r\n\t// Applying custom symbol\r\n\tresult[1] = symbols[result[1]] || result[1];\r\n\r\n\tif (locale === true) {\r\n\t\tresult[0] = result[0].toLocaleString();\r\n\t} else if (locale.length > 0) {\r\n\t\tresult[0] = result[0].toLocaleString(locale, localeOptions);\r\n\t} else if (separator.length > 0) {\r\n\t\tresult[0] = result[0].toString().replace(PERIOD, separator);\r\n\t}\r\n\r\n\tif (pad && round > 0) {\r\n\t\tconst i = result[0].toString(),\r\n\t\t\tx = separator || ((i.match(/(\\D)/g) || []).pop() || PERIOD),\r\n\t\t\ttmp = i.toString().split(x),\r\n\t\t\ts = tmp[1] || EMPTY,\r\n\t\t\tl = s.length,\r\n\t\t\tn = round - l;\r\n\r\n\t\tresult[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`;\r\n\t}\r\n\r\n\tif (full) {\r\n\t\tresult[1] = fullforms[e] ? fullforms[e] : STRINGS.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S);\r\n\t}\r\n\r\n\t// Returning Array, Object, or String (default)\r\n\treturn output === ARRAY ? result : output === OBJECT ? {\r\n\t\tvalue: result[0],\r\n\t\tsymbol: result[1],\r\n\t\texponent: e,\r\n\t\tunit: u\r\n\t} : result.join(spacer);\r\n}\r\n\r\n// Partial application for functional programming\r\nfunction partial ({\r\n\tbits = false,\r\n\tpad = false,\r\n\tbase = -1,\r\n\tround = 2,\r\n\tlocale = EMPTY,\r\n\tlocaleOptions = {},\r\n\tseparator = EMPTY,\r\n\tspacer = SPACE,\r\n\tsymbols = {},\r\n\tstandard = EMPTY,\r\n\toutput = STRING,\r\n\tfullform = false,\r\n\tfullforms = [],\r\n\texponent = -1,\r\n\troundingMethod = ROUND,\r\n\tprecision = 0\r\n} = {}) {\r\n\treturn arg => filesize(arg, {\r\n\t\tbits,\r\n\t\tpad,\r\n\t\tbase,\r\n\t\tround,\r\n\t\tlocale,\r\n\t\tlocaleOptions,\r\n\t\tseparator,\r\n\t\tspacer,\r\n\t\tsymbols,\r\n\t\tstandard,\r\n\t\toutput,\r\n\t\tfullform,\r\n\t\tfullforms,\r\n\t\texponent,\r\n\t\troundingMethod,\r\n\t\tprecision\r\n\t});\r\n}export{filesize,partial};","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_WHEEL, EVENT_ON_KEY_UP, EVENT_ON_KEY_DOWN, EVENT_ON_POINTER_CANCEL, EVENT_ON_POINTER_LEAVE, EVENT_ON_POINTER_UP, EVENT_ON_POINTER_MOVE, EVENT_ON_POINTER_DOWN, 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(undefined);\n const animation = React.useRef(undefined);\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(undefined);\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(undefined);\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(false);\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(undefined);\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(undefined);\n const resetCleanup = React.useRef(undefined);\n const wheelInertia = React.useRef(0);\n const wheelInertiaCleanup = React.useRef(undefined);\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 React from 'react';\nimport { Box, Button, Typography } from '@mui/material';\nimport { GetApp } from '@mui/icons-material';\nimport { filesize } from 'filesize';\n\ninterface AttachmentLinkProps {\n attachment: {\n size: number;\n title: string;\n url: string;\n };\n size?: 'small' | 'medium' | 'large';\n}\n\nfunction AttachmentLink({ attachment, size = 'medium' }: AttachmentLinkProps) {\n return (\n \n }\n variant=\"outlined\"\n role=\"link\"\n aria-label={attachment.title}\n title={attachment.title}\n sx={{ textTransform: 'none', display: 'flex' }}\n >\n \n {attachment.title}\n \n \n {filesize(attachment.size)}\n \n \n \n );\n}\n\nexport default AttachmentLink;\n","import 'yet-another-react-lightbox/styles.css';\n\nimport PropTypes from 'prop-types';\nimport React, { useState } from 'react';\nimport { Box, Stack } from '@mui/material';\nimport Lightbox from 'yet-another-react-lightbox';\n\nimport BaseImage from '../../../DesignSystem/BaseImage';\nimport AttachmentLink from '../AttachmentLink/AttachmentLink';\nimport { cloudinaryImageUrl } from '../../../../Services/Cloudinary';\n\nfunction AttachmentLinksList({ attachments = [], ...rest }: any) {\n const imageAttachments =\n attachments.filter((attachment: any) => attachment.type.includes('image')) || [];\n const otherAttachments = attachments.filter(\n (attachment: any) => !imageAttachments.includes(attachment),\n );\n const [currentIndex, setCurrentIndex] = useState(-1);\n\n let imagesComponent;\n\n if (!otherAttachments.length && !imageAttachments.length) {\n return null;\n }\n\n if (imageAttachments.length) {\n imagesComponent = (\n <>\n \n {imageAttachments.map((attachment: any, index: any) => (\n \n setCurrentIndex(index)}\n rounded\n />\n \n ))}\n \n {\n return {\n src: cloudinaryImageUrl(attachment.s3_key),\n };\n })}\n open={currentIndex >= 0}\n close={() => setCurrentIndex(-1)}\n />\n \n );\n }\n\n return (\n \n {otherAttachments.map((attachment: any) => (\n \n \n \n ))}\n {imagesComponent}\n \n );\n}\n\nAttachmentLinksList.propTypes = {\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n url: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n }),\n ),\n noPreview: PropTypes.bool,\n};\n\nexport default AttachmentLinksList;\n"],"names":["ARRAY","BIT","BITS","BYTE","BYTES","EMPTY","EXPONENT","FUNCTION","IEC","INVALID_NUMBER","INVALID_ROUND","JEDEC","OBJECT","PERIOD","ROUND","S","SI","SI_KBIT","SI_KBYTE","SPACE","STRING","ZERO","STRINGS","filesize","arg","bits","pad","base","round","locale","localeOptions","separator","spacer","symbols","standard","output","fullform","fullforms","exponent","roundingMethod","precision","e","num","result","val","u","ceil","full","neg","roundingFunc","p","i","x","tmp","s","l","n","MODULE_CAROUSEL","MODULE_CONTROLLER","MODULE_NAVIGATION","MODULE_NO_SCROLL","MODULE_PORTAL","MODULE_ROOT","MODULE_TOOLBAR","SLIDE_STATUS_LOADING","SLIDE_STATUS_ERROR","SLIDE_STATUS_COMPLETE","SLIDE_STATUS_PLACEHOLDER","activeSlideStatus","status","CLASS_FLEX_CENTER","CLASS_NO_SCROLL","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_BUTTON","ELEMENT_ICON","IMAGE_FIT_CONTAIN","IMAGE_FIT_COVER","UNKNOWN_ACTION_TYPE","cssPrefix$3","clsx","classes","cssClass","name","cssVar","composePrefix","prefix","makeComposePrefix","label","labels","defaultLabel","_a","cleanup","cleaners","cleaner","makeUseContext","contextName","context","ctx","React.useContext","hasWindow","value","decimals","factor","isImageSlide","slide","isImageFitCover","image","imageFit","parseInt","parseLengthPercentage","input","computeSlideRect","containerRect","padding","paddingValue","paddingPixels","getSlideIndex","index","slidesCount","hasSlides","slides","getSlide","getSlideIfPresent","getSlideKey","calculatePreload","carousel","minimum","isReact19","React.version","makeInertWhen","condition","LightboxDefaultProps","createModule","component","createNode","module","children","traverseNode","node","target","apply","traverse","nodes","withPlugins","root","plugins","augmentations","config","contains","addParent","append","addChild","precede","addSibling","addModule","replace","remove","augment","augmentation","plugin","props","acc","DocumentContext","React.createContext","useDocumentContext","DocumentContextProvider","nodeRef","React.useMemo","getOwnerDocument","React.createElement","EventsContext","useEvents","EventsProvider","subscriptions","React.useState","React.useEffect","topic","unsubscribe","callback","cb","event","LightboxPropsContext","useLightboxProps","LightboxPropsProvider","LightboxStateContext","useLightboxState","LightboxDispatchContext","useLightboxDispatch","reducer","state","action","increment","globalIndex","currentIndex","currentSlide","animation","LightboxStateProvider","dispatch","React.useReducer","TimeoutsContext","useTimeouts","TimeoutsProvider","timeouts","tid","removeTimeout","id","fn","delay","IconButton","React.forwardRef","label$1","className","Icon","renderIcon","onClick","style","rest","ref","styles","buttonLabel","svgIcon","icon","createIcon","glyph","CloseIcon","PreviousIcon","NextIcon","LoadingIcon","React.Fragment","_","array","ErrorIcon","useLayoutEffect","React.useLayoutEffect","useMotionPreference","reduceMotion","setReduceMotion","_b","mediaQuery","listener","currentTransformation","y","z","matcher","values","useAnimation","computeAnimation","snapshot","React.useRef","_c","keyframes","duration","easing","onfinish","err","currentSnapshot","useContainerRect","containerRef","observerRef","setContainerRect","React.useCallback","updateContainerRect","parse","useDelay","timeoutId","setTimeout","clearTimeout","useEventCallback","args","setRef","useForkRef","refA","refB","refValue","useLoseFocus","focus","disabled","focused","onFocus","onBlur","useRTL","isRTL","setIsRTL","useSensors","subscribers","notifySubscribers","type","registerSensors","subscribeSensors","listeners","el","useThrottle","lastCallbackTime","delayCallback","executeCallback","slidePrefix","slideImagePrefix","ImageSlide","offset","render","rect","imageProps","onLoad","onError","_d","_e","_f","_g","setStatus","publish","imageRef","handleLoading","img","setImageRef","handleOnLoad","handleOnError","cover","nonInfinite","fallback","maxWidth","maxHeight","defaultStyle","srcSet","a","b","item","estimateActualWidth","sizes","imagePropsStyle","imagePropsClassName","restImageProps","LightboxRoot","SwipeState","usePointerEvents","onPointerDown","onPointerMove","onPointerUp","Gesture","SWIPE_THRESHOLD","usePointerSwipe","isSwipeValid","containerWidth","swipeAnimationDuration","onSwipeStart","onSwipeProgress","onSwipeFinish","onSwipeCancel","pullUpEnabled","pullDownEnabled","onPullStart","onPullProgress","onPullFinish","onPullCancel","pointers","activePointer","startTime","gesture","clearPointer","currentPointers","addPointer","exceedsPullThreshold","threshold","currentOffset","pointer","isCurrentPointer","deltaX","deltaY","startGesture","newGesture","usePreventWheelDefaults","preventDefaultWheelX","preventDefaultWheelY","horizontal","useWheelSwipe","swipeState","intent","intentCleanup","resetCleanup","wheelInertia","wheelInertiaCleanup","cancelSwipeIntentCleanup","cancelSwipeResetCleanup","handleCleanup","handleCancelSwipe","currentSwipeOffset","onWheel","setWheelInertia","inertia","currentSwipeIntent","newSwipeOffset","cssContainerPrefix","ControllerContext","useController","Controller","controller","on","closeOnPullUp","closeOnPullDown","toolbarWidth","setToolbarWidth","setSwipeState","swipeOffset","pullOffset","pullOpacity","subscribe","cleanupAnimationIncrement","cleanupSwipeOffset","cleanupPullOffset","setContainerRef","handleContainerRef","carouselRef","setCarouselRef","rtl","getLightboxProps","getLightboxState","prev","params","next","close","setSwipeOffset","setPullOffset","offsetValue","preparePullAnimation","translate","pull","cancel","prepareAnimation","isAnimationPlaying","parsedSpacing","spacingValue","swipe","swipeDuration","swipeEasing","direction","count","newSwipeState","newSwipeAnimationDuration","elapsedTime","expectedTime","swipeParams","pullParams","focusOnMount","onViewCallback","React.useImperativeHandle","ControllerModule","cssPrefix$2","cssSlidePrefix","CarouselSlide","slideRect","closeOnBackdropClick","offscreen","renderSlide","rendered","handleBackdropClick","container","Placeholder","Carousel","preload","items","key","placeholder","CarouselModule","useNavigationState","prevDisabled","nextDisabled","useKeyboardNavigation","throttle","handleKeyDown","NavigationButton","Navigation","buttonPrev","buttonNext","iconPrev","iconNext","NavigationModule","noScroll","noScrollPadding","isHTMLElement","element","padScrollbar","property","computedValue","originalValue","NoScroll","getOwnerWindow","ownerWindow","body","documentElement","scrollbar","elements","clean","NoScrollModule","cssPrefix$1","setAttribute","attribute","previousValue","Portal","portal","mounted","setMounted","visible","setVisible","restoreFocus","animationDuration","handleClose","handleEnter","handleRef","createPortal","PortalModule","Root","RootModule","cssPrefix","Toolbar","buttons","buttonClose","iconClose","renderCloseButton","button","ToolbarModule","renderNode","child","mergeAnimation","defaultAnimation","defaultAnimationEasing","restDefaultAnimation","restAnimation","Lightbox","toolbar","restProps","defaultCarousel","defaultRender","defaultToolbar","defaultController","defaultNoScroll","defaultOn","defaultSlides","defaultIndex","defaultPlugins","restDefaultProps","AttachmentLink","_ref","attachment","_ref$size","size","React","createElement","Box","sx","display","Button","rel","href","url","startIcon","GetApp","variant","role","title","textTransform","Typography","textOverflow","overflowX","fontWeight","ml","whiteSpace","content","mr","AttachmentLinksList","_ref$attachments","attachments","_objectWithoutProperties","_excluded","imageAttachments","filter","includes","otherAttachments","_useState","useState","_useState2","_slicedToArray","setCurrentIndex","imagesComponent","length","Fragment","Stack","spacing","xs","sm","useFlexGap","flexWrap","mb","map","cursor","width","height","concat","BaseImage","src","cloudinaryImageUrl","s3_key","ratio","alt","rounded","open","my","blob_key","_extends","propTypes","PropTypes","arrayOf","shape","string","number","noPreview","bool"],"mappings":"wOAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOA,MAAMA,GAAQ,QACRC,GAAM,MACNC,GAAO,OACPC,GAAO,OACPC,GAAQ,QACRC,GAAQ,GACRC,GAAW,WACXC,GAAW,WACXC,GAAM,MACNC,GAAiB,iBACjBC,GAAgB,0BAChBC,GAAQ,QACRC,GAAS,SACTC,GAAS,IACTC,GAAQ,QACRC,GAAI,IACJC,GAAK,KACLC,GAAU,OACVC,GAAW,KACXC,GAAQ,IACRC,GAAS,SACTC,GAAO,IACPC,GAAU,CACf,OAAQ,CACP,IAAK,CACJ,KAAM,CAAC,MAAO,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,OAAO,EACpF,MAAO,CAAC,IAAK,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAK,CACnE,EACD,MAAO,CACN,KAAM,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,MAAM,EAC5E,MAAO,CAAC,IAAK,KAAM,KAA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