`, so it can be styled via any CSS solution you prefer.\n * @see https://floating-ui.com/docs/FloatingOverlay\n */\nconst FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(props, ref) {\n const {\n lockScroll = false,\n ...rest\n } = props;\n index(() => {\n if (!lockScroll) return;\n lockCount++;\n if (lockCount === 1) {\n cleanup = enableScrollLock();\n }\n return () => {\n lockCount--;\n if (lockCount === 0) {\n cleanup();\n }\n };\n }, [lockScroll]);\n return /*#__PURE__*/jsx(\"div\", {\n ref: ref,\n ...rest,\n style: {\n position: 'fixed',\n overflow: 'auto',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...rest.style\n }\n });\n});\n\nfunction isButtonTarget(event) {\n return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';\n}\nfunction isSpaceIgnored(element) {\n return isTypeableElement(element);\n}\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nfunction useClick(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n elements: {\n domReference\n }\n } = context;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n keyboardHandlers = true,\n stickIfOpen = true\n } = props;\n const pointerTypeRef = React.useRef();\n const didKeyDownRef = React.useRef(false);\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0) return;\n if (eventOption === 'click') return;\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n // Prevent stealing focus from the floating element\n event.preventDefault();\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onClick(event) {\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerTypeRef.current) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onKeyDown(event) {\n pointerTypeRef.current = undefined;\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {\n return;\n }\n if (event.key === ' ' && !isSpaceIgnored(domReference)) {\n // Prevent scrolling\n event.preventDefault();\n didKeyDownRef.current = true;\n }\n if (event.key === 'Enter') {\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n },\n onKeyUp(event) {\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {\n return;\n }\n if (event.key === ' ' && didKeyDownRef.current) {\n didKeyDownRef.current = false;\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n }\n }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nfunction createVirtualElement(domElement, data) {\n let offsetX = null;\n let offsetY = null;\n let isAutoUpdateEvent = false;\n return {\n contextElement: domElement || undefined,\n getBoundingClientRect() {\n var _data$dataRef$current;\n const domRect = (domElement == null ? void 0 : domElement.getBoundingClientRect()) || {\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n const isXAxis = data.axis === 'x' || data.axis === 'both';\n const isYAxis = data.axis === 'y' || data.axis === 'both';\n const canTrackCursorOnAutoUpdate = ['mouseenter', 'mousemove'].includes(((_data$dataRef$current = data.dataRef.current.openEvent) == null ? void 0 : _data$dataRef$current.type) || '') && data.pointerType !== 'touch';\n let width = domRect.width;\n let height = domRect.height;\n let x = domRect.x;\n let y = domRect.y;\n if (offsetX == null && data.x && isXAxis) {\n offsetX = domRect.x - data.x;\n }\n if (offsetY == null && data.y && isYAxis) {\n offsetY = domRect.y - data.y;\n }\n x -= offsetX || 0;\n y -= offsetY || 0;\n width = 0;\n height = 0;\n if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {\n width = data.axis === 'y' ? domRect.width : 0;\n height = data.axis === 'x' ? domRect.height : 0;\n x = isXAxis && data.x != null ? data.x : x;\n y = isYAxis && data.y != null ? data.y : y;\n } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {\n height = data.axis === 'x' ? domRect.height : height;\n width = data.axis === 'y' ? domRect.width : width;\n }\n isAutoUpdateEvent = true;\n return {\n width,\n height,\n x,\n y,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x\n };\n }\n };\n}\nfunction isMouseBasedEvent(event) {\n return event != null && event.clientX != null;\n}\n/**\n * Positions the floating element relative to a client point (in the viewport),\n * such as the mouse position. By default, it follows the mouse cursor.\n * @see https://floating-ui.com/docs/useClientPoint\n */\nfunction useClientPoint(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n dataRef,\n elements: {\n floating,\n domReference\n },\n refs\n } = context;\n const {\n enabled = true,\n axis = 'both',\n x = null,\n y = null\n } = props;\n const initialRef = React.useRef(false);\n const cleanupListenerRef = React.useRef(null);\n const [pointerType, setPointerType] = React.useState();\n const [reactive, setReactive] = React.useState([]);\n const setReference = useEffectEvent((x, y) => {\n if (initialRef.current) return;\n\n // Prevent setting if the open event was not a mouse-like one\n // (e.g. focus to open, then hover over the reference element).\n // Only apply if the event exists.\n if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {\n return;\n }\n refs.setPositionReference(createVirtualElement(domReference, {\n x,\n y,\n axis,\n dataRef,\n pointerType\n }));\n });\n const handleReferenceEnterOrMove = useEffectEvent(event => {\n if (x != null || y != null) return;\n if (!open) {\n setReference(event.clientX, event.clientY);\n } else if (!cleanupListenerRef.current) {\n // If there's no cleanup, there's no listener, but we want to ensure\n // we add the listener if the cursor landed on the floating element and\n // then back on the reference (i.e. it's interactive).\n setReactive([]);\n }\n });\n\n // If the pointer is a mouse-like pointer, we want to continue following the\n // mouse even if the floating element is transitioning out. On touch\n // devices, this is undesirable because the floating element will move to\n // the dismissal touch point.\n const openCheck = isMouseLikePointerType(pointerType) ? floating : open;\n const addListener = React.useCallback(() => {\n // Explicitly specified `x`/`y` coordinates shouldn't add a listener.\n if (!openCheck || !enabled || x != null || y != null) return;\n const win = getWindow(floating);\n function handleMouseMove(event) {\n const target = getTarget(event);\n if (!contains(floating, target)) {\n setReference(event.clientX, event.clientY);\n } else {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n }\n }\n if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {\n win.addEventListener('mousemove', handleMouseMove);\n const cleanup = () => {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n };\n cleanupListenerRef.current = cleanup;\n return cleanup;\n }\n refs.setPositionReference(domReference);\n }, [openCheck, enabled, x, y, floating, dataRef, refs, domReference, setReference]);\n React.useEffect(() => {\n return addListener();\n }, [addListener, reactive]);\n React.useEffect(() => {\n if (enabled && !floating) {\n initialRef.current = false;\n }\n }, [enabled, floating]);\n React.useEffect(() => {\n if (!enabled && open) {\n initialRef.current = true;\n }\n }, [enabled, open]);\n index(() => {\n if (enabled && (x != null || y != null)) {\n initialRef.current = false;\n setReference(x, y);\n }\n }, [enabled, x, y, setReference]);\n const reference = React.useMemo(() => {\n function setPointerTypeRef(_ref) {\n let {\n pointerType\n } = _ref;\n setPointerType(pointerType);\n }\n return {\n onPointerDown: setPointerTypeRef,\n onPointerEnter: setPointerTypeRef,\n onMouseMove: handleReferenceEnterOrMove,\n onMouseEnter: handleReferenceEnterOrMove\n };\n }, [handleReferenceEnterOrMove]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nconst bubbleHandlerKeys = {\n pointerdown: 'onPointerDown',\n mousedown: 'onMouseDown',\n click: 'onClick'\n};\nconst captureHandlerKeys = {\n pointerdown: 'onPointerDownCapture',\n mousedown: 'onMouseDownCapture',\n click: 'onClickCapture'\n};\nconst normalizeProp = normalizable => {\n var _normalizable$escapeK, _normalizable$outside;\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : (_normalizable$escapeK = normalizable == null ? void 0 : normalizable.escapeKey) != null ? _normalizable$escapeK : false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : (_normalizable$outside = normalizable == null ? void 0 : normalizable.outsidePress) != null ? _normalizable$outside : true\n };\n};\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nfunction useDismiss(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n elements,\n dataRef\n } = context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: unstable_outsidePress = true,\n outsidePressEvent = 'pointerdown',\n referencePress = false,\n referencePressEvent = 'pointerdown',\n ancestorScroll = false,\n bubbles,\n capture\n } = props;\n const tree = useFloatingTree();\n const outsidePressFn = useEffectEvent(typeof unstable_outsidePress === 'function' ? unstable_outsidePress : () => false);\n const outsidePress = typeof unstable_outsidePress === 'function' ? outsidePressFn : unstable_outsidePress;\n const insideReactTreeRef = React.useRef(false);\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const {\n escapeKey: escapeKeyCapture,\n outsidePress: outsidePressCapture\n } = normalizeProp(capture);\n const isComposingRef = React.useRef(false);\n const closeOnEscapeKeyDown = useEffectEvent(event => {\n var _dataRef$current$floa;\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n const nodeId = (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId;\n const children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n event.stopPropagation();\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context;\n if ((_child$context = child.context) != null && _child$context.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n onOpenChange(false, isReactEvent(event) ? event.nativeEvent : event, 'escape-key');\n });\n const closeOnEscapeKeyDownCapture = useEffectEvent(event => {\n var _getTarget2;\n const callback = () => {\n var _getTarget;\n closeOnEscapeKeyDown(event);\n (_getTarget = getTarget(event)) == null || _getTarget.removeEventListener('keydown', callback);\n };\n (_getTarget2 = getTarget(event)) == null || _getTarget2.addEventListener('keydown', callback);\n });\n const closeOnPressOutside = useEffectEvent(event => {\n var _dataRef$current$floa2;\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = insideReactTreeRef.current;\n insideReactTreeRef.current = false;\n\n // When click outside is lazy (`click` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n if (outsidePressEvent === 'click' && endedOrStartedInside) {\n return;\n }\n if (insideReactTree) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget(event);\n const inertSelector = \"[\" + createAttribute('inert') + \"]\";\n const markers = getDocument(elements.floating).querySelectorAll(inertSelector);\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, elements.floating) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n if (isHTMLElement(target) && floating) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n const nodeId = (_dataRef$current$floa2 = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa2.nodeId;\n const targetIsInsideChildren = tree && getChildren(tree.nodesRef.current, nodeId).some(node => {\n var _node$context;\n return isEventTargetWithin(event, (_node$context = node.context) == null ? void 0 : _node$context.elements.floating);\n });\n if (isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context2;\n if ((_child$context2 = child.context) != null && _child$context2.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n onOpenChange(false, event, 'outside-press');\n });\n const closeOnPressOutsideCapture = useEffectEvent(event => {\n var _getTarget4;\n const callback = () => {\n var _getTarget3;\n closeOnPressOutside(event);\n (_getTarget3 = getTarget(event)) == null || _getTarget3.removeEventListener(outsidePressEvent, callback);\n };\n (_getTarget4 = getTarget(event)) == null || _getTarget4.addEventListener(outsidePressEvent, callback);\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n let compositionTimeout = -1;\n function onScroll(event) {\n onOpenChange(false, event, 'ancestor-scroll');\n }\n function handleCompositionStart() {\n window.clearTimeout(compositionTimeout);\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout = window.setTimeout(() => {\n isComposingRef.current = false;\n },\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n isWebKit() ? 5 : 0);\n }\n const doc = getDocument(elements.floating);\n if (escapeKey) {\n doc.addEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.addEventListener('compositionstart', handleCompositionStart);\n doc.addEventListener('compositionend', handleCompositionEnd);\n }\n outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(elements.domReference)) {\n ancestors = getOverflowAncestors(elements.domReference);\n }\n if (isElement(elements.floating)) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.floating));\n }\n if (!isElement(elements.reference) && elements.reference && elements.reference.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => {\n var _doc$defaultView;\n return ancestor !== ((_doc$defaultView = doc.defaultView) == null ? void 0 : _doc$defaultView.visualViewport);\n });\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n return () => {\n if (escapeKey) {\n doc.removeEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.removeEventListener('compositionstart', handleCompositionStart);\n doc.removeEventListener('compositionend', handleCompositionEnd);\n }\n outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n window.clearTimeout(compositionTimeout);\n };\n }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);\n React.useEffect(() => {\n insideReactTreeRef.current = false;\n }, [outsidePress, outsidePressEvent]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n ...(referencePress && {\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n },\n ...(referencePressEvent !== 'click' && {\n onClick(event) {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n }\n })\n })\n }), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);\n const floating = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n onMouseDown() {\n endedOrStartedInsideRef.current = true;\n },\n onMouseUp() {\n endedOrStartedInsideRef.current = true;\n },\n [captureHandlerKeys[outsidePressEvent]]: () => {\n insideReactTreeRef.current = true;\n }\n }), [closeOnEscapeKeyDown, outsidePressEvent]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nfunction useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange: onOpenChangeProp,\n elements: elementsProp\n } = options;\n const floatingId = useId();\n const dataRef = React.useRef({});\n const [events] = React.useState(() => createPubSub());\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== \"production\") {\n const optionDomReference = elementsProp.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `refs.setPositionReference()`', 'instead.');\n }\n }\n const [positionReference, setPositionReference] = React.useState(elementsProp.reference);\n const onOpenChange = useEffectEvent((open, event, reason) => {\n dataRef.current.openEvent = open ? event : undefined;\n events.emit('openchange', {\n open,\n event,\n reason,\n nested\n });\n onOpenChangeProp == null || onOpenChangeProp(open, event, reason);\n });\n const refs = React.useMemo(() => ({\n setPositionReference\n }), []);\n const elements = React.useMemo(() => ({\n reference: positionReference || elementsProp.reference || null,\n floating: elementsProp.floating || null,\n domReference: elementsProp.reference\n }), [positionReference, elementsProp.reference, elementsProp.floating]);\n return React.useMemo(() => ({\n dataRef,\n open,\n onOpenChange,\n elements,\n events,\n floatingId,\n refs\n }), [open, onOpenChange, elements, events, floatingId, refs]);\n}\n\n/**\n * Provides data to position a floating element and context to add interactions.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n nodeId\n } = options;\n const internalRootContext = useFloatingRootContext({\n ...options,\n elements: {\n reference: null,\n floating: null,\n ...options.elements\n }\n });\n const rootContext = options.rootContext || internalRootContext;\n const computedElements = rootContext.elements;\n const [_domReference, setDomReference] = React.useState(null);\n const [positionReference, _setPositionReference] = React.useState(null);\n const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;\n const domReference = optionDomReference || _domReference;\n const domReferenceRef = React.useRef(null);\n const tree = useFloatingTree();\n index(() => {\n if (domReference) {\n domReferenceRef.current = domReference;\n }\n }, [domReference]);\n const position = useFloating$1({\n ...options,\n elements: {\n ...computedElements,\n ...(positionReference && {\n reference: positionReference\n })\n }\n });\n const setPositionReference = React.useCallback(node => {\n const computedPositionReference = isElement(node) ? {\n getBoundingClientRect: () => node.getBoundingClientRect(),\n contextElement: node\n } : node;\n // Store the positionReference in state if the DOM reference is specified externally via the\n // `elements.reference` option. This ensures that it won't be overridden on future renders.\n _setPositionReference(computedPositionReference);\n position.refs.setReference(computedPositionReference);\n }, [position.refs]);\n const setReference = React.useCallback(node => {\n if (isElement(node) || node === null) {\n domReferenceRef.current = node;\n setDomReference(node);\n }\n\n // Backwards-compatibility for passing a virtual element to `reference`\n // after it has set the DOM reference.\n if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||\n // Don't allow setting virtual elements using the old technique back to\n // `null` to support `positionReference` + an unstable `reference`\n // callback ref.\n node !== null && !isElement(node)) {\n position.refs.setReference(node);\n }\n }, [position.refs]);\n const refs = React.useMemo(() => ({\n ...position.refs,\n setReference,\n setPositionReference,\n domReference: domReferenceRef\n }), [position.refs, setReference, setPositionReference]);\n const elements = React.useMemo(() => ({\n ...position.elements,\n domReference: domReference\n }), [position.elements, domReference]);\n const context = React.useMemo(() => ({\n ...position,\n ...rootContext,\n refs,\n elements,\n nodeId\n }), [position, refs, elements, nodeId, rootContext]);\n index(() => {\n rootContext.dataRef.current.floatingContext = context;\n const node = tree == null ? void 0 : tree.nodesRef.current.find(node => node.id === nodeId);\n if (node) {\n node.context = context;\n }\n });\n return React.useMemo(() => ({\n ...position,\n context,\n refs,\n elements\n }), [position, refs, elements, context]);\n}\n\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nfunction useFocus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n events,\n dataRef,\n elements\n } = context;\n const {\n enabled = true,\n visibleOnly = true\n } = props;\n const blockFocusRef = React.useRef(false);\n const timeoutRef = React.useRef();\n const keyboardModalityRef = React.useRef(true);\n React.useEffect(() => {\n if (!enabled) return;\n const win = getWindow(elements.domReference);\n\n // If the reference was focused and the user left the tab/window, and the\n // floating element was not open, the focus should be blocked when they\n // return to the tab/window.\n function onBlur() {\n if (!open && isHTMLElement(elements.domReference) && elements.domReference === activeElement(getDocument(elements.domReference))) {\n blockFocusRef.current = true;\n }\n }\n function onKeyDown() {\n keyboardModalityRef.current = true;\n }\n win.addEventListener('blur', onBlur);\n win.addEventListener('keydown', onKeyDown, true);\n return () => {\n win.removeEventListener('blur', onBlur);\n win.removeEventListener('keydown', onKeyDown, true);\n };\n }, [elements.domReference, open, enabled]);\n React.useEffect(() => {\n if (!enabled) return;\n function onOpenChange(_ref) {\n let {\n reason\n } = _ref;\n if (reason === 'reference-press' || reason === 'escape-key') {\n blockFocusRef.current = true;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [events, enabled]);\n React.useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current);\n };\n }, []);\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n if (isVirtualPointerEvent(event.nativeEvent)) return;\n keyboardModalityRef.current = false;\n },\n onMouseLeave() {\n blockFocusRef.current = false;\n },\n onFocus(event) {\n if (blockFocusRef.current) return;\n const target = getTarget(event.nativeEvent);\n if (visibleOnly && isElement(target)) {\n try {\n // Mac Safari unreliably matches `:focus-visible` on the reference\n // if focus was outside the page initially - use the fallback\n // instead.\n if (isSafari() && isMac()) throw Error();\n if (!target.matches(':focus-visible')) return;\n } catch (e) {\n // Old browsers will throw an error when using `:focus-visible`.\n if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n return;\n }\n }\n }\n onOpenChange(true, event.nativeEvent, 'focus');\n },\n onBlur(event) {\n blockFocusRef.current = false;\n const relatedTarget = event.relatedTarget;\n const nativeEvent = event.nativeEvent;\n\n // Hit the non-modal focus management portal guard. Focus will be\n // moved into the floating element immediately after.\n const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n // Wait for the window blur listener to fire.\n timeoutRef.current = window.setTimeout(() => {\n var _dataRef$current$floa;\n const activeEl = activeElement(elements.domReference ? elements.domReference.ownerDocument : document);\n\n // Focus left the page, keep it open.\n if (!relatedTarget && activeEl === elements.domReference) return;\n\n // When focusing the reference element (e.g. regular click), then\n // clicking into the floating element, prevent it from hiding.\n // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n // We can not rely on relatedTarget to point to the correct element\n // as it will only point to the shadow host of the newly focused element\n // and not the element that actually has received focus if it is located\n // inside a shadow root.\n if (contains((_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.refs.floating.current, activeEl) || contains(elements.domReference, activeEl) || movedToFocusGuard) {\n return;\n }\n onOpenChange(false, nativeEvent, 'focus');\n });\n }\n }), [dataRef, elements.domReference, onOpenChange, visibleOnly]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nconst ACTIVE_KEY = 'active';\nconst SELECTED_KEY = 'selected';\nfunction mergeProps(userProps, propsList, elementKey) {\n const map = new Map();\n const isItem = elementKey === 'item';\n let domUserProps = userProps;\n if (isItem && userProps) {\n const {\n [ACTIVE_KEY]: _,\n [SELECTED_KEY]: __,\n ...validProps\n } = userProps;\n domUserProps = validProps;\n }\n return {\n ...(elementKey === 'floating' && {\n tabIndex: -1,\n [FOCUSABLE_ATTRIBUTE]: ''\n }),\n ...domUserProps,\n ...propsList.map(value => {\n const propsOrGetProps = value ? value[elementKey] : null;\n if (typeof propsOrGetProps === 'function') {\n return userProps ? propsOrGetProps(userProps) : null;\n }\n return propsOrGetProps;\n }).concat(userProps).reduce((acc, props) => {\n if (!props) {\n return acc;\n }\n Object.entries(props).forEach(_ref => {\n let [key, value] = _ref;\n if (isItem && [ACTIVE_KEY, SELECTED_KEY].includes(key)) {\n return;\n }\n if (key.indexOf('on') === 0) {\n if (!map.has(key)) {\n map.set(key, []);\n }\n if (typeof value === 'function') {\n var _map$get;\n (_map$get = map.get(key)) == null || _map$get.push(value);\n acc[key] = function () {\n var _map$get2;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_map$get2 = map.get(key)) == null ? void 0 : _map$get2.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n } else {\n acc[key] = value;\n }\n });\n return acc;\n }, {})\n };\n}\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nfunction useInteractions(propsList) {\n if (propsList === void 0) {\n propsList = [];\n }\n const referenceDeps = propsList.map(key => key == null ? void 0 : key.reference);\n const floatingDeps = propsList.map(key => key == null ? void 0 : key.floating);\n const itemDeps = propsList.map(key => key == null ? void 0 : key.item);\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n referenceDeps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n floatingDeps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n itemDeps);\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps\n }), [getReferenceProps, getFloatingProps, getItemProps]);\n}\n\nconst ESCAPE = 'Escape';\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl, cols) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && cols && cols > 1) {\n return key === ESCAPE;\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nfunction useListNavigation(context, props) {\n const {\n open,\n onOpenChange,\n elements\n } = context;\n const {\n listRef,\n activeIndex,\n onNavigate: unstable_onNavigate = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loop = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n cols = 1,\n scrollItemIntoView = true,\n virtualItemRef,\n itemSizes,\n dense = false\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (allowEscape) {\n if (!loop) {\n warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && cols > 1) {\n warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const floatingFocusElement = getFloatingFocusElement(elements.floating);\n const floatingFocusElementRef = useLatestRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree();\n index(() => {\n context.dataRef.current.orientation = orientation;\n }, [context, orientation]);\n const onNavigate = useEffectEvent(() => {\n unstable_onNavigate(indexRef.current === -1 ? null : indexRef.current);\n });\n const typeableComboboxReference = isTypeableCombobox(elements.domReference);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex != null ? selectedIndex : -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const previousOnNavigateRef = React.useRef(onNavigate);\n const previousMountedRef = React.useRef(!!elements.floating);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const disabledIndicesRef = useLatestRef(disabledIndices);\n const latestOpenRef = useLatestRef(open);\n const scrollItemIntoViewRef = useLatestRef(scrollItemIntoView);\n const selectedIndexRef = useLatestRef(selectedIndex);\n const [activeId, setActiveId] = React.useState();\n const [virtualId, setVirtualId] = React.useState();\n const focusItem = useEffectEvent(() => {\n function runFocus(item) {\n if (virtual) {\n setActiveId(item.id);\n tree == null || tree.events.emit('virtualfocus', item);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n } else {\n enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? v => v() : requestAnimationFrame;\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) return;\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n const shouldScrollIntoView = scrollIntoViewOptions && item && (forceScrollIntoViewRef.current || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView == null || waitedItem.scrollIntoView(typeof scrollIntoViewOptions === 'boolean' ? {\n block: 'nearest',\n inline: 'nearest'\n } : scrollIntoViewOptions);\n }\n });\n });\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n index(() => {\n if (!enabled) return;\n if (open && elements.floating) {\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n indexRef.current = selectedIndex;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Since the user can specify `onNavigate` conditionally\n // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n // we store and call the previous function.\n indexRef.current = -1;\n previousOnNavigateRef.current();\n }\n }, [enabled, open, elements.floating, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n index(() => {\n if (!enabled) return;\n if (!open) return;\n if (!elements.floating) return;\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs++;\n } else {\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinIndex(listRef, disabledIndicesRef.current) : getMaxIndex(listRef, disabledIndicesRef.current);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, elements.floating, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n index(() => {\n var _nodes$find;\n if (!enabled || elements.floating || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = (_nodes$find = nodes.find(node => node.id === parentId)) == null || (_nodes$find = _nodes$find.context) == null ? void 0 : _nodes$find.elements.floating;\n const activeEl = activeElement(getDocument(elements.floating));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, elements.floating, tree, parentId, virtual]);\n index(() => {\n if (!enabled) return;\n if (!tree) return;\n if (!virtual) return;\n if (parentId) return;\n function handleVirtualFocus(item) {\n setVirtualId(item.id);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n }\n tree.events.on('virtualfocus', handleVirtualFocus);\n return () => {\n tree.events.off('virtualfocus', handleVirtualFocus);\n };\n }, [enabled, tree, virtual, parentId, virtualItemRef]);\n index(() => {\n previousOnNavigateRef.current = onNavigate;\n previousOpenRef.current = open;\n previousMountedRef.current = !!elements.floating;\n });\n index(() => {\n if (!open) {\n keyRef.current = null;\n }\n }, [open]);\n const hasActiveIndex = activeIndex != null;\n const item = React.useMemo(() => {\n function syncCurrentTarget(currentTarget) {\n if (!open) return;\n const index = listRef.current.indexOf(currentTarget);\n if (index !== -1 && indexRef.current !== index) {\n indexRef.current = index;\n onNavigate();\n }\n }\n const props = {\n onFocus(_ref) {\n let {\n currentTarget\n } = _ref;\n forceSyncFocusRef.current = true;\n syncCurrentTarget(currentTarget);\n },\n onClick: _ref2 => {\n let {\n currentTarget\n } = _ref2;\n return currentTarget.focus({\n preventScroll: true\n });\n },\n // Safari\n ...(focusItemOnHover && {\n onMouseMove(_ref3) {\n let {\n currentTarget\n } = _ref3;\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n syncCurrentTarget(currentTarget);\n },\n onPointerLeave(_ref4) {\n let {\n pointerType\n } = _ref4;\n if (!isPointerModalityRef.current || pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n indexRef.current = -1;\n onNavigate();\n if (!virtual) {\n var _floatingFocusElement;\n (_floatingFocusElement = floatingFocusElementRef.current) == null || _floatingFocusElement.focus({\n preventScroll: true\n });\n }\n }\n })\n };\n return props;\n }, [open, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, virtual]);\n const commonOnKeyDown = useEffectEvent(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, cols)) {\n stopEvent(event);\n onOpenChange(false, event.nativeEvent, 'list-navigation');\n if (isHTMLElement(elements.domReference)) {\n if (virtual) {\n tree == null || tree.events.emit('virtualfocus', elements.domReference);\n } else {\n elements.domReference.focus();\n }\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinIndex(listRef, disabledIndices);\n const maxIndex = getMaxIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate();\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate();\n }\n }\n\n // Grid navigation.\n if (cols > 1) {\n const sizes = itemSizes || Array.from({\n length: listRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = buildCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isDisabled(listRef.current, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isDisabled(listRef.current, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const index = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getCellIndices([...(disabledIndices || listRef.current.map((_, index) => isDisabled(listRef.current, index) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getCellIndexOfCorner(indexRef.current > maxIndex ? minIndex : indexRef.current, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction\n // we're moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT) ? 'tr' : 'tl'),\n stopEvent: true\n })];\n if (index != null) {\n indexRef.current = index;\n onNavigate();\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate();\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loop) {\n indexRef.current = currentIndex >= maxIndex ? allowEscape && currentIndex !== listRef.current.length ? -1 : minIndex : findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n });\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else {\n if (loop) {\n indexRef.current = currentIndex <= minIndex ? allowEscape && currentIndex !== -1 ? listRef.current.length : maxIndex : findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n }\n if (isIndexOutOfBounds(listRef, indexRef.current)) {\n indexRef.current = -1;\n }\n onNavigate();\n }\n });\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': virtualId || activeId\n };\n }, [virtual, open, hasActiveIndex, virtualId, activeId]);\n const floating = React.useMemo(() => {\n return {\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown: commonOnKeyDown,\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, orientation, typeableComboboxReference]);\n const reference = React.useMemo(() => {\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n ...ariaActiveDescendantProp,\n onKeyDown(event) {\n var _tree$nodesRef$curren;\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isHomeOrEndKey = ['Home', 'End'].includes(event.key);\n const isMoveKey = isArrowKey || isHomeOrEndKey;\n const parentOrientation = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.dataRef) == null ? void 0 : _tree$nodesRef$curren.current.orientation;\n const isCrossOpenKey = isCrossOrientationOpenKey(event.key, orientation, rtl);\n const isCrossCloseKey = isCrossOrientationCloseKey(event.key, orientation, rtl, cols);\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, parentOrientation, rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && open) {\n const rootNode = tree == null ? void 0 : tree.nodesRef.current.find(node => node.parentId == null);\n const deepestNode = tree && rootNode ? getDeepestNode(tree.nodesRef.current, rootNode.id) : null;\n if (isMoveKey && deepestNode && virtualItemRef) {\n const eventObject = new KeyboardEvent('keydown', {\n key: event.key,\n bubbles: true\n });\n if (isCrossOpenKey || isCrossCloseKey) {\n var _deepestNode$context, _deepestNode$context2;\n const isCurrentTarget = ((_deepestNode$context = deepestNode.context) == null ? void 0 : _deepestNode$context.elements.domReference) === event.currentTarget;\n const dispatchItem = isCrossCloseKey && !isCurrentTarget ? (_deepestNode$context2 = deepestNode.context) == null ? void 0 : _deepestNode$context2.elements.domReference : isCrossOpenKey ? listRef.current.find(item => (item == null ? void 0 : item.id) === activeId) : null;\n if (dispatchItem) {\n stopEvent(event);\n dispatchItem.dispatchEvent(eventObject);\n setVirtualId(undefined);\n }\n }\n if ((isMainKey || isHomeOrEndKey) && deepestNode.context) {\n if (deepestNode.context.open && deepestNode.parentId && event.currentTarget !== deepestNode.context.elements.domReference) {\n var _deepestNode$context$;\n stopEvent(event);\n (_deepestNode$context$ = deepestNode.context.elements.domReference) == null || _deepestNode$context$.dispatchEvent(eventObject);\n return;\n }\n }\n }\n return commonOnKeyDown(event);\n }\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!open && !openOnArrowKeyDown && isArrowKey) {\n return;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, parentOrientation);\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (open) {\n indexRef.current = getMinIndex(listRef, disabledIndicesRef.current);\n onNavigate();\n } else {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n }\n }\n return;\n }\n if (isMainKey) {\n if (selectedIndex != null) {\n indexRef.current = selectedIndex;\n }\n stopEvent(event);\n if (!open && openOnArrowKeyDown) {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n } else {\n commonOnKeyDown(event);\n }\n if (open) {\n onNavigate();\n }\n }\n },\n onFocus() {\n if (open && !virtual) {\n indexRef.current = -1;\n onNavigate();\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [activeId, ariaActiveDescendantProp, cols, commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, onOpenChange, open, openOnArrowKeyDown, orientation, parentId, rtl, selectedIndex, tree, virtual, virtualItemRef]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}\n\nconst componentRoleToAriaRoleMap = /*#__PURE__*/new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nfunction useRole(context, props) {\n var _componentRoleToAriaR;\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n floatingId\n } = context;\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const ariaRole = (_componentRoleToAriaR = componentRoleToAriaRoleMap.get(role)) != null ? _componentRoleToAriaR : role;\n const referenceId = useId();\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n const reference = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n [\"aria-\" + (role === 'label' ? 'labelledby' : 'describedby')]: open ? floatingId : undefined\n };\n }\n return {\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && {\n id: referenceId\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n };\n }, [ariaRole, floatingId, isNested, open, referenceId, role]);\n const floating = React.useMemo(() => {\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return floatingProps;\n }\n return {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n };\n }, [ariaRole, floatingId, referenceId, role]);\n const item = React.useCallback(_ref => {\n let {\n active,\n selected\n } = _ref;\n const commonProps = {\n role: 'option',\n ...(active && {\n id: floatingId + \"-option\"\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n return {\n ...commonProps,\n 'aria-selected': active && selected\n };\n case 'combobox':\n {\n return {\n ...commonProps,\n ...(active && {\n 'aria-selected': true\n })\n };\n }\n }\n return {};\n }, [floatingId, role]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}\n\n// Converts a JS style key like `backgroundColor` to a CSS transition-property\n// like `background-color`.\nconst camelCaseToKebabCase = str => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());\nfunction execWithArgsOrReturn(valueOrFn, args) {\n return typeof valueOrFn === 'function' ? valueOrFn(args) : valueOrFn;\n}\nfunction useDelayUnmount(open, durationMs) {\n const [isMounted, setIsMounted] = React.useState(open);\n if (open && !isMounted) {\n setIsMounted(true);\n }\n React.useEffect(() => {\n if (!open && isMounted) {\n const timeout = setTimeout(() => setIsMounted(false), durationMs);\n return () => clearTimeout(timeout);\n }\n }, [open, isMounted, durationMs]);\n return isMounted;\n}\n/**\n * Provides a status string to apply CSS transitions to a floating element,\n * correctly handling placement-aware transitions.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstatus\n */\nfunction useTransitionStatus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n elements: {\n floating\n }\n } = context;\n const {\n duration = 250\n } = props;\n const isNumberDuration = typeof duration === 'number';\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [status, setStatus] = React.useState('unmounted');\n const isMounted = useDelayUnmount(open, closeDuration);\n if (!isMounted && status === 'close') {\n setStatus('unmounted');\n }\n index(() => {\n if (!floating) return;\n if (open) {\n setStatus('initial');\n const frame = requestAnimationFrame(() => {\n setStatus('open');\n });\n return () => {\n cancelAnimationFrame(frame);\n };\n }\n setStatus('close');\n }, [open, floating]);\n return {\n isMounted,\n status\n };\n}\n/**\n * Provides styles to apply CSS transitions to a floating element, correctly\n * handling placement-aware transitions. Wrapper around `useTransitionStatus`.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstyles\n */\nfunction useTransitionStyles(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n initial: unstable_initial = {\n opacity: 0\n },\n open: unstable_open,\n close: unstable_close,\n common: unstable_common,\n duration = 250\n } = props;\n const placement = context.placement;\n const side = placement.split('-')[0];\n const fnArgs = React.useMemo(() => ({\n side,\n placement\n }), [side, placement]);\n const isNumberDuration = typeof duration === 'number';\n const openDuration = (isNumberDuration ? duration : duration.open) || 0;\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [styles, setStyles] = React.useState(() => ({\n ...execWithArgsOrReturn(unstable_common, fnArgs),\n ...execWithArgsOrReturn(unstable_initial, fnArgs)\n }));\n const {\n isMounted,\n status\n } = useTransitionStatus(context, {\n duration\n });\n const initialRef = useLatestRef(unstable_initial);\n const openRef = useLatestRef(unstable_open);\n const closeRef = useLatestRef(unstable_close);\n const commonRef = useLatestRef(unstable_common);\n index(() => {\n const initialStyles = execWithArgsOrReturn(initialRef.current, fnArgs);\n const closeStyles = execWithArgsOrReturn(closeRef.current, fnArgs);\n const commonStyles = execWithArgsOrReturn(commonRef.current, fnArgs);\n const openStyles = execWithArgsOrReturn(openRef.current, fnArgs) || Object.keys(initialStyles).reduce((acc, key) => {\n acc[key] = '';\n return acc;\n }, {});\n if (status === 'initial') {\n setStyles(styles => ({\n transitionProperty: styles.transitionProperty,\n ...commonStyles,\n ...initialStyles\n }));\n }\n if (status === 'open') {\n setStyles({\n transitionProperty: Object.keys(openStyles).map(camelCaseToKebabCase).join(','),\n transitionDuration: openDuration + \"ms\",\n ...commonStyles,\n ...openStyles\n });\n }\n if (status === 'close') {\n const styles = closeStyles || initialStyles;\n setStyles({\n transitionProperty: Object.keys(styles).map(camelCaseToKebabCase).join(','),\n transitionDuration: closeDuration + \"ms\",\n ...commonStyles,\n ...styles\n });\n }\n }, [closeDuration, closeRef, initialRef, openRef, commonRef, openDuration, status, fnArgs]);\n return {\n isMounted,\n styles\n };\n}\n\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nfunction useTypeahead(context, props) {\n var _ref;\n const {\n open,\n dataRef\n } = context;\n const {\n listRef,\n activeIndex,\n onMatch: unstable_onMatch,\n onTypingChange: unstable_onTypingChange,\n enabled = true,\n findMatch = null,\n resetMs = 750,\n ignoreKeys = [],\n selectedIndex = null\n } = props;\n const timeoutIdRef = React.useRef();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef((_ref = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref : -1);\n const matchIndexRef = React.useRef(null);\n const onMatch = useEffectEvent(unstable_onMatch);\n const onTypingChange = useEffectEvent(unstable_onTypingChange);\n const findMatchRef = useLatestRef(findMatch);\n const ignoreKeysRef = useLatestRef(ignoreKeys);\n index(() => {\n if (open) {\n clearTimeout(timeoutIdRef.current);\n matchIndexRef.current = null;\n stringRef.current = '';\n }\n }, [open]);\n index(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n var _ref2;\n prevIndexRef.current = (_ref2 = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref2 : -1;\n }\n }, [open, selectedIndex, activeIndex]);\n const setTypingChange = useEffectEvent(value => {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n } else {\n if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n }\n });\n const onKeyDown = useEffectEvent(event => {\n function getMatchingIndex(list, orderedList, string) {\n const str = findMatchRef.current ? findMatchRef.current(orderedList, string) : orderedList.find(text => (text == null ? void 0 : text.toLocaleLowerCase().indexOf(string.toLocaleLowerCase())) === 0);\n return str ? list.indexOf(str) : -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n setTypingChange(false);\n } else if (event.key === ' ') {\n stopEvent(event);\n }\n }\n if (listContent == null || ignoreKeysRef.current.includes(event.key) ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => {\n var _text$, _text$2;\n return text ? ((_text$ = text[0]) == null ? void 0 : _text$.toLocaleLowerCase()) !== ((_text$2 = text[1]) == null ? void 0 : _text$2.toLocaleLowerCase()) : true;\n });\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n clearTimeout(timeoutIdRef.current);\n timeoutIdRef.current = setTimeout(() => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n }, resetMs);\n const prevIndex = prevIndexRef.current;\n const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n if (index !== -1) {\n onMatch(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n });\n const reference = React.useMemo(() => ({\n onKeyDown\n }), [onKeyDown]);\n const floating = React.useMemo(() => {\n return {\n onKeyDown,\n onKeyUp(event) {\n if (event.key === ' ') {\n setTypingChange(false);\n }\n }\n };\n }, [onKeyDown, setTypingChange]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nfunction getArgsWithCustomFloatingHeight(state, height) {\n return {\n ...state,\n rects: {\n ...state.rects,\n floating: {\n ...state.rects.floating,\n height\n }\n }\n };\n}\n/**\n * Positions the floating element such that an inner element inside of it is\n * anchored to the reference element.\n * @see https://floating-ui.com/docs/inner\n * @deprecated\n */\nconst inner = props => ({\n name: 'inner',\n options: props,\n async fn(state) {\n const {\n listRef,\n overflowRef,\n onFallbackChange,\n offset: innerOffset = 0,\n index = 0,\n minItemsVisible = 4,\n referenceOverflowThreshold = 0,\n scrollRef,\n ...detectOverflowOptions\n } = evaluate(props, state);\n const {\n rects,\n elements: {\n floating\n }\n } = state;\n const item = listRef.current[index];\n const scrollEl = (scrollRef == null ? void 0 : scrollRef.current) || floating;\n\n // Valid combinations:\n // 1. Floating element is the scrollRef and has a border (default)\n // 2. Floating element is not the scrollRef, floating element has a border\n // 3. Floating element is not the scrollRef, scrollRef has a border\n // Floating > {...getFloatingProps()} wrapper > scrollRef > items is not\n // allowed as VoiceOver doesn't work.\n const clientTop = floating.clientTop || scrollEl.clientTop;\n const floatingIsBordered = floating.clientTop !== 0;\n const scrollElIsBordered = scrollEl.clientTop !== 0;\n const floatingIsScrollEl = floating === scrollEl;\n if (process.env.NODE_ENV !== \"production\") {\n if (!state.placement.startsWith('bottom')) {\n warn('`placement` side must be \"bottom\" when using the `inner`', 'middleware.');\n }\n }\n if (!item) {\n return {};\n }\n const nextArgs = {\n ...state,\n ...(await offset(-item.offsetTop - floating.clientTop - rects.reference.height / 2 - item.offsetHeight / 2 - innerOffset).fn(state))\n };\n const overflow = await detectOverflow(getArgsWithCustomFloatingHeight(nextArgs, scrollEl.scrollHeight + clientTop + floating.clientTop), detectOverflowOptions);\n const refOverflow = await detectOverflow(nextArgs, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const diffY = max(0, overflow.top);\n const nextY = nextArgs.y + diffY;\n const isScrollable = scrollEl.scrollHeight > scrollEl.clientHeight;\n const rounder = isScrollable ? v => v : round;\n const maxHeight = rounder(max(0, scrollEl.scrollHeight + (floatingIsBordered && floatingIsScrollEl || scrollElIsBordered ? clientTop * 2 : 0) - diffY - max(0, overflow.bottom)));\n scrollEl.style.maxHeight = maxHeight + \"px\";\n scrollEl.scrollTop = diffY;\n\n // There is not enough space, fallback to standard anchored positioning\n if (onFallbackChange) {\n const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;\n ReactDOM.flushSync(() => onFallbackChange(shouldFallback));\n }\n if (overflowRef) {\n overflowRef.current = await detectOverflow(getArgsWithCustomFloatingHeight({\n ...nextArgs,\n y: nextY\n }, scrollEl.offsetHeight + clientTop + floating.clientTop), detectOverflowOptions);\n }\n return {\n y: nextY\n };\n }\n});\n/**\n * Changes the `inner` middleware's `offset` upon a `wheel` event to\n * expand the floating element's height, revealing more list items.\n * @see https://floating-ui.com/docs/inner\n * @deprecated\n */\nfunction useInnerOffset(context, props) {\n const {\n open,\n elements\n } = context;\n const {\n enabled = true,\n overflowRef,\n scrollRef,\n onChange: unstable_onChange\n } = props;\n const onChange = useEffectEvent(unstable_onChange);\n const controlledScrollingRef = React.useRef(false);\n const prevScrollTopRef = React.useRef(null);\n const initialOverflowRef = React.useRef(null);\n React.useEffect(() => {\n if (!enabled) return;\n function onWheel(e) {\n if (e.ctrlKey || !el || overflowRef.current == null) {\n return;\n }\n const dY = e.deltaY;\n const isAtTop = overflowRef.current.top >= -0.5;\n const isAtBottom = overflowRef.current.bottom >= -0.5;\n const remainingScroll = el.scrollHeight - el.clientHeight;\n const sign = dY < 0 ? -1 : 1;\n const method = dY < 0 ? 'max' : 'min';\n if (el.scrollHeight <= el.clientHeight) {\n return;\n }\n if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {\n e.preventDefault();\n ReactDOM.flushSync(() => {\n onChange(d => d + Math[method](dY, remainingScroll * sign));\n });\n } else if (/firefox/i.test(getUserAgent())) {\n // Needed to propagate scrolling during momentum scrolling phase once\n // it gets limited by the boundary. UX improvement, not critical.\n el.scrollTop += dY;\n }\n }\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (open && el) {\n el.addEventListener('wheel', onWheel);\n\n // Wait for the position to be ready.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n if (overflowRef.current != null) {\n initialOverflowRef.current = {\n ...overflowRef.current\n };\n }\n });\n return () => {\n prevScrollTopRef.current = null;\n initialOverflowRef.current = null;\n el.removeEventListener('wheel', onWheel);\n };\n }\n }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);\n const floating = React.useMemo(() => ({\n onKeyDown() {\n controlledScrollingRef.current = true;\n },\n onWheel() {\n controlledScrollingRef.current = false;\n },\n onPointerMove() {\n controlledScrollingRef.current = false;\n },\n onScroll() {\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (!overflowRef.current || !el || !controlledScrollingRef.current) {\n return;\n }\n if (prevScrollTopRef.current !== null) {\n const scrollDiff = el.scrollTop - prevScrollTopRef.current;\n if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {\n ReactDOM.flushSync(() => onChange(d => d + scrollDiff));\n }\n }\n\n // [Firefox] Wait for the height change to have been applied.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n });\n }\n }), [elements.floating, onChange, overflowRef, scrollRef]);\n return React.useMemo(() => enabled ? {\n floating\n } : {}, [enabled, floating]);\n}\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nfunction isInside(point, rect) {\n return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nfunction safePolygon(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n buffer = 0.5,\n blockPointerEvents = false,\n requireIntent = true\n } = options;\n let timeoutId;\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = performance.now();\n function getCursorSpeed(x, y) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return null;\n }\n const deltaX = x - lastX;\n const deltaY = y - lastY;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const speed = distance / elapsedTime; // px / ms\n\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return speed;\n }\n const fn = _ref => {\n let {\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n } = _ref;\n return function onMouseMove(event) {\n function close() {\n clearTimeout(timeoutId);\n onClose();\n }\n clearTimeout(timeoutId);\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return;\n }\n const {\n clientX,\n clientY\n } = event;\n const clientPoint = [clientX, clientY];\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(elements.floating, target);\n const isOverReferenceEl = contains(elements.domReference, target);\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isOverReferenceRect = isInside(clientPoint, refRect);\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n }\n if (isOverReferenceEl && !isLeave) {\n hasLanded = true;\n return;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return;\n }\n\n // If any nested child is open, abort.\n if (tree && getChildren(tree.nodesRef.current, nodeId).some(_ref2 => {\n let {\n context\n } = _ref2;\n return context == null ? void 0 : context.open;\n })) {\n return;\n }\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n break;\n case 'bottom':\n rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n break;\n case 'left':\n rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n break;\n }\n function getPolygon(_ref3) {\n let [x, y] = _ref3;\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [x + buffer + 1, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x + buffer + 1, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [x - buffer, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x - buffer, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n }\n }\n if (isPointInPolygon([clientX, clientY], rectPoly)) {\n return;\n }\n if (hasLanded && !isOverReferenceRect) {\n return close();\n }\n if (!isLeave && requireIntent) {\n const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n const cursorSpeedThreshold = 0.1;\n if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n return close();\n }\n }\n if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n close();\n } else if (!hasLanded && requireIntent) {\n timeoutId = window.setTimeout(close, 40);\n }\n };\n };\n fn.__options = {\n blockPointerEvents\n };\n return fn;\n}\n\nexport { Composite, CompositeItem, FloatingArrow, FloatingDelayGroup, FloatingFocusManager, FloatingList, FloatingNode, FloatingOverlay, FloatingPortal, FloatingTree, inner, safePolygon, useClick, useClientPoint, useDelayGroup, useDelayGroupContext, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingPortalNode, useFloatingRootContext, useFloatingTree, useFocus, useHover, useId, useInnerOffset, useInteractions, useListItem, useListNavigation, useMergeRefs, useRole, useTransitionStatus, useTransitionStyles, useTypeahead };\n","/*!\n react-datepicker v8.1.0\n https://github.com/Hacker0x01/react-datepicker\n Released under the MIT License.\n*/\nimport { clsx } from 'clsx';\nimport React, { useRef, useCallback, useEffect, cloneElement, Component, createRef, createElement } from 'react';\nimport { isSameDay as isSameDay$1, isWithinInterval, startOfWeek, format, startOfDay, endOfDay, isEqual as isEqual$1, parseISO, toDate, differenceInCalendarDays, isValid as isValid$1, isBefore, getISOWeek, isSameMonth as isSameMonth$1, isSameQuarter as isSameQuarter$1, getYear, getMonth, getQuarter, startOfMonth, startOfQuarter, endOfMonth, setMonth, setQuarter, isSameYear as isSameYear$1, setHours, getHours, setMinutes, getMinutes, setSeconds, getSeconds, addHours, addMinutes, addSeconds, isAfter, startOfYear, endOfYear, min, max, subMonths, differenceInCalendarMonths, subQuarters, differenceInCalendarQuarters, subYears, differenceInCalendarYears, addMonths, addQuarters, addYears, isDate, parse, endOfWeek, getDay, getDate, addDays, addWeeks, getTime, setYear, differenceInDays, subWeeks, subDays } from 'date-fns';\nimport { useFloating, autoUpdate, flip, offset, arrow, FloatingArrow } from '@floating-ui/react';\nimport ReactDOM from 'react-dom';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return _assign.apply(this, arguments);\n};\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nvar CalendarContainer = function (_a) {\n var _b = _a.showTimeSelectOnly, showTimeSelectOnly = _b === void 0 ? false : _b, _c = _a.showTime, showTime = _c === void 0 ? false : _c, className = _a.className, children = _a.children;\n var ariaLabel = showTimeSelectOnly\n ? \"Choose Time\"\n : \"Choose Date\".concat(showTime ? \" and Time\" : \"\");\n return (React.createElement(\"div\", { className: className, role: \"dialog\", \"aria-label\": ariaLabel, \"aria-modal\": \"true\" }, children));\n};\n\nvar useDetectClickOutside = function (onClickOutside, ignoreClass) {\n var ref = useRef(null);\n var onClickOutsideRef = useRef(onClickOutside);\n onClickOutsideRef.current = onClickOutside;\n var handleClickOutside = useCallback(function (event) {\n var _a;\n var target = (event.composed &&\n event.composedPath &&\n event\n .composedPath()\n .find(function (eventTarget) { return eventTarget instanceof Node; })) ||\n event.target;\n if (ref.current && !ref.current.contains(target)) {\n if (!(ignoreClass &&\n target instanceof HTMLElement &&\n target.classList.contains(ignoreClass))) {\n (_a = onClickOutsideRef.current) === null || _a === void 0 ? void 0 : _a.call(onClickOutsideRef, event);\n }\n }\n }, [ignoreClass]);\n useEffect(function () {\n document.addEventListener(\"mousedown\", handleClickOutside);\n return function () {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [handleClickOutside]);\n return ref;\n};\nvar ClickOutsideWrapper = function (_a) {\n var children = _a.children, onClickOutside = _a.onClickOutside, className = _a.className, containerRef = _a.containerRef, style = _a.style, ignoreClass = _a.ignoreClass;\n var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);\n return (React.createElement(\"div\", { className: className, style: style, ref: function (node) {\n detectRef.current = node;\n if (containerRef) {\n containerRef.current = node;\n }\n } }, children));\n};\n\nvar KeyType;\n(function (KeyType) {\n KeyType[\"ArrowUp\"] = \"ArrowUp\";\n KeyType[\"ArrowDown\"] = \"ArrowDown\";\n KeyType[\"ArrowLeft\"] = \"ArrowLeft\";\n KeyType[\"ArrowRight\"] = \"ArrowRight\";\n KeyType[\"PageUp\"] = \"PageUp\";\n KeyType[\"PageDown\"] = \"PageDown\";\n KeyType[\"Home\"] = \"Home\";\n KeyType[\"End\"] = \"End\";\n KeyType[\"Enter\"] = \"Enter\";\n KeyType[\"Space\"] = \" \";\n KeyType[\"Tab\"] = \"Tab\";\n KeyType[\"Escape\"] = \"Escape\";\n KeyType[\"Backspace\"] = \"Backspace\";\n KeyType[\"X\"] = \"x\";\n})(KeyType || (KeyType = {}));\nfunction getLocaleScope() {\n // Use this cast to avoid messing with users globalThis (like window) and the rest of keys in the globalThis object we don't care about\n var scope = (typeof window !== \"undefined\"\n ? window\n : globalThis);\n return scope;\n}\nvar DEFAULT_YEAR_ITEM_NUMBER = 12;\n// ** Date Constructors **\nfunction newDate(value) {\n if (value == null) {\n return new Date();\n }\n var d = typeof value === \"string\" ? parseISO(value) : toDate(value);\n return isValid(d) ? d : new Date();\n}\n/**\n * Parses a date.\n *\n * @param value - The string representing the Date in a parsable form, e.g., ISO 1861\n * @param dateFormat - The date format.\n * @param locale - The locale.\n * @param strictParsing - The strict parsing flag.\n * @param refDate - The base date to be passed to date-fns parse() function.\n * @returns - The parsed date or null.\n */\nfunction parseDate(value, dateFormat, locale, strictParsing, refDate) {\n if (refDate === void 0) { refDate = newDate(); }\n var localeObject = getLocaleObject(locale) || getLocaleObject(getDefaultLocale());\n var formats = Array.isArray(dateFormat) ? dateFormat : [dateFormat];\n for (var _i = 0, formats_1 = formats; _i < formats_1.length; _i++) {\n var format_1 = formats_1[_i];\n var parsedDate = parse(value, format_1, refDate, {\n locale: localeObject,\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n if (isValid(parsedDate) &&\n (!strictParsing || value === formatDate(parsedDate, format_1, locale))) {\n return parsedDate;\n }\n }\n return null;\n}\n/**\n * Checks if a given date is valid and not before the minimum date.\n * @param date - The date to be checked.\n * @param minDate - The minimum date allowed. If not provided, defaults to \"1/1/1800\".\n * @returns A boolean value indicating whether the date is valid and not before the minimum date.\n */\nfunction isValid(date, minDate) {\n /* the fallback date is essential to not break test case\n * `should auto update calendar when the updated date text is after props.minDate`\n * and backward compatibility respectfully\n */\n return isValid$1(date) && !isBefore(date, new Date(\"1/1/1800\"));\n}\n// ** Date Formatting **\n/**\n * Formats a date.\n *\n * @param date - The date.\n * @param formatStr - The format string.\n * @param locale - The locale.\n * @returns - The formatted date.\n */\nfunction formatDate(date, formatStr, locale) {\n if (locale === \"en\") {\n return format(date, formatStr, {\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n }\n var localeObj = locale ? getLocaleObject(locale) : undefined;\n if (locale && !localeObj) {\n console.warn(\"A locale object was not found for the provided string [\\\"\".concat(locale, \"\\\"].\"));\n }\n localeObj = localeObj || getLocaleObject(getDefaultLocale());\n return format(date, formatStr, {\n locale: localeObj,\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n}\n/**\n * Safely formats a date.\n *\n * @param date - The date.\n * @param options - An object containing the dateFormat and locale.\n * @returns - The formatted date or an empty string.\n */\nfunction safeDateFormat(date, _a) {\n var dateFormat = _a.dateFormat, locale = _a.locale;\n var formatStr = (Array.isArray(dateFormat) && dateFormat.length > 0\n ? dateFormat[0]\n : dateFormat); // Cast to string because it's impossible to get `string | string[] | undefined` here and typescript doesn't know that\n return (date && formatDate(date, formatStr, locale)) || \"\";\n}\n/**\n * Safely formats a date range.\n *\n * @param startDate - The start date.\n * @param endDate - The end date.\n * @param props - The props.\n * @returns - The formatted date range or an empty string.\n */\nfunction safeDateRangeFormat(startDate, endDate, props) {\n if (!startDate) {\n return \"\";\n }\n var formattedStartDate = safeDateFormat(startDate, props);\n var formattedEndDate = endDate ? safeDateFormat(endDate, props) : \"\";\n return \"\".concat(formattedStartDate, \" - \").concat(formattedEndDate);\n}\n/**\n * Safely formats multiple dates.\n *\n * @param dates - The dates.\n * @param props - The props.\n * @returns - The formatted dates or an empty string.\n */\nfunction safeMultipleDatesFormat(dates, props) {\n if (!(dates === null || dates === void 0 ? void 0 : dates.length)) {\n return \"\";\n }\n var formattedFirstDate = dates[0] ? safeDateFormat(dates[0], props) : \"\";\n if (dates.length === 1) {\n return formattedFirstDate;\n }\n if (dates.length === 2 && dates[1]) {\n var formattedSecondDate = safeDateFormat(dates[1], props);\n return \"\".concat(formattedFirstDate, \", \").concat(formattedSecondDate);\n }\n var extraDatesCount = dates.length - 1;\n return \"\".concat(formattedFirstDate, \" (+\").concat(extraDatesCount, \")\");\n}\n// ** Date Setters **\n/**\n * Sets the time for a given date.\n *\n * @param date - The date.\n * @param time - An object containing the hour, minute, and second.\n * @returns - The date with the time set.\n */\nfunction setTime(date, _a) {\n var _b = _a.hour, hour = _b === void 0 ? 0 : _b, _c = _a.minute, minute = _c === void 0 ? 0 : _c, _d = _a.second, second = _d === void 0 ? 0 : _d;\n return setHours(setMinutes(setSeconds(date, second), minute), hour);\n}\n/**\n * Gets the week of the year for a given date.\n *\n * @param date - The date.\n * @returns - The week of the year.\n */\nfunction getWeek(date) {\n return getISOWeek(date);\n}\n/**\n * Gets the day of the week code for a given day.\n *\n * @param day - The day.\n * @param locale - The locale.\n * @returns - The day of the week code.\n */\nfunction getDayOfWeekCode(day, locale) {\n return formatDate(day, \"ddd\", locale);\n}\n// *** Start of ***\n/**\n * Gets the start of the day for a given date.\n *\n * @param date - The date.\n * @returns - The start of the day.\n */\nfunction getStartOfDay(date) {\n return startOfDay(date);\n}\n/**\n * Gets the start of the week for a given date.\n *\n * @param date - The date.\n * @param locale - The locale.\n * @param calendarStartDay - The day the calendar starts on.\n * @returns - The start of the week.\n */\nfunction getStartOfWeek(date, locale, calendarStartDay) {\n var localeObj = locale\n ? getLocaleObject(locale)\n : getLocaleObject(getDefaultLocale());\n return startOfWeek(date, {\n locale: localeObj,\n weekStartsOn: calendarStartDay,\n });\n}\n/**\n * Gets the start of the month for a given date.\n *\n * @param date - The date.\n * @returns - The start of the month.\n */\nfunction getStartOfMonth(date) {\n return startOfMonth(date);\n}\n/**\n * Gets the start of the year for a given date.\n *\n * @param date - The date.\n * @returns - The start of the year.\n */\nfunction getStartOfYear(date) {\n return startOfYear(date);\n}\n/**\n * Gets the start of the quarter for a given date.\n *\n * @param date - The date.\n * @returns - The start of the quarter.\n */\nfunction getStartOfQuarter(date) {\n return startOfQuarter(date);\n}\n/**\n * Gets the start of today.\n *\n * @returns - The start of today.\n */\nfunction getStartOfToday() {\n return startOfDay(newDate());\n}\n// *** End of ***\n/**\n * Gets the end of the day for a given date.\n *\n * @param date - The date.\n * @returns - The end of the day.\n */\nfunction getEndOfDay(date) {\n return endOfDay(date);\n}\n/**\n * Gets the end of the week for a given date.\n *\n * @param date - The date.\n * @returns - The end of the week.\n */\nfunction getEndOfWeek(date) {\n return endOfWeek(date);\n}\n/**\n * Gets the end of the month for a given date.\n *\n * @param date - The date.\n * @returns - The end of the month.\n */\nfunction getEndOfMonth(date) {\n return endOfMonth(date);\n}\n/**\n * Checks if two dates are in the same year.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are in the same year, false otherwise.\n */\nfunction isSameYear(date1, date2) {\n if (date1 && date2) {\n return isSameYear$1(date1, date2);\n }\n else {\n return !date1 && !date2;\n }\n}\n/**\n * Checks if two dates are in the same month.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are in the same month, false otherwise.\n */\nfunction isSameMonth(date1, date2) {\n if (date1 && date2) {\n return isSameMonth$1(date1, date2);\n }\n else {\n return !date1 && !date2;\n }\n}\n/**\n * Checks if two dates are in the same quarter.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are in the same quarter, false otherwise.\n */\nfunction isSameQuarter(date1, date2) {\n if (date1 && date2) {\n return isSameQuarter$1(date1, date2);\n }\n else {\n return !date1 && !date2;\n }\n}\n/**\n * Checks if two dates are on the same day.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are on the same day, false otherwise.\n */\nfunction isSameDay(date1, date2) {\n if (date1 && date2) {\n return isSameDay$1(date1, date2);\n }\n else {\n return !date1 && !date2;\n }\n}\n/**\n * Checks if two dates are equal.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are equal, false otherwise.\n */\nfunction isEqual(date1, date2) {\n if (date1 && date2) {\n return isEqual$1(date1, date2);\n }\n else {\n return !date1 && !date2;\n }\n}\n/**\n * Checks if a day is within a date range.\n *\n * @param day - The day to check.\n * @param startDate - The start date of the range.\n * @param endDate - The end date of the range.\n * @returns - True if the day is within the range, false otherwise.\n */\nfunction isDayInRange(day, startDate, endDate) {\n var valid;\n var start = startOfDay(startDate);\n var end = endOfDay(endDate);\n try {\n valid = isWithinInterval(day, { start: start, end: end });\n }\n catch (err) {\n valid = false;\n }\n return valid;\n}\n// ** Date Localization **\n/**\n * Registers a locale.\n *\n * @param localeName - The name of the locale.\n * @param localeData - The data of the locale.\n */\nfunction registerLocale(localeName, localeData) {\n var scope = getLocaleScope();\n if (!scope.__localeData__) {\n scope.__localeData__ = {};\n }\n scope.__localeData__[localeName] = localeData;\n}\n/**\n * Sets the default locale.\n *\n * @param localeName - The name of the locale.\n */\nfunction setDefaultLocale(localeName) {\n var scope = getLocaleScope();\n scope.__localeId__ = localeName;\n}\n/**\n * Gets the default locale.\n *\n * @returns - The default locale.\n */\nfunction getDefaultLocale() {\n var scope = getLocaleScope();\n return scope.__localeId__;\n}\n/**\n * Gets the locale object.\n *\n * @param localeSpec - The locale specification.\n * @returns - The locale object.\n */\nfunction getLocaleObject(localeSpec) {\n if (typeof localeSpec === \"string\") {\n // Treat it as a locale name registered by registerLocale\n var scope = getLocaleScope();\n // Null was replaced with undefined to avoid type coercion\n return scope.__localeData__ ? scope.__localeData__[localeSpec] : undefined;\n }\n else {\n // Treat it as a raw date-fns locale object\n return localeSpec;\n }\n}\n/**\n * Formats the weekday in a given locale.\n *\n * @param date - The date to format.\n * @param formatFunc - The formatting function.\n * @param locale - The locale to use for formatting.\n * @returns - The formatted weekday.\n */\nfunction getFormattedWeekdayInLocale(date, formatFunc, locale) {\n return formatFunc(formatDate(date, \"EEEE\", locale));\n}\n/**\n * Gets the minimum weekday in a given locale.\n *\n * @param date - The date to format.\n * @param locale - The locale to use for formatting.\n * @returns - The minimum weekday.\n */\nfunction getWeekdayMinInLocale(date, locale) {\n return formatDate(date, \"EEEEEE\", locale);\n}\n/**\n * Gets the short weekday in a given locale.\n *\n * @param date - The date to format.\n * @param locale - The locale to use for formatting.\n * @returns - The short weekday.\n */\nfunction getWeekdayShortInLocale(date, locale) {\n return formatDate(date, \"EEE\", locale);\n}\n/**\n * Gets the month in a given locale.\n *\n * @param month - The month to format.\n * @param locale - The locale to use for formatting.\n * @returns - The month.\n */\nfunction getMonthInLocale(month, locale) {\n return formatDate(setMonth(newDate(), month), \"LLLL\", locale);\n}\n/**\n * Gets the short month in a given locale.\n *\n * @param month - The month to format.\n * @param locale - The locale to use for formatting.\n * @returns - The short month.\n */\nfunction getMonthShortInLocale(month, locale) {\n return formatDate(setMonth(newDate(), month), \"LLL\", locale);\n}\n/**\n * Gets the short quarter in a given locale.\n *\n * @param quarter - The quarter to format.\n * @param locale - The locale to use for formatting.\n * @returns - The short quarter.\n */\nfunction getQuarterShortInLocale(quarter, locale) {\n return formatDate(setQuarter(newDate(), quarter), \"QQQ\", locale);\n}\n/**\n * Checks if a day is disabled.\n *\n * @param day - The day to check.\n * @param options - The options to consider when checking.\n * @returns - Returns true if the day is disabled, false otherwise.\n */\nfunction isDayDisabled(day, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, excludeDateIntervals = _b.excludeDateIntervals, includeDates = _b.includeDates, includeDateIntervals = _b.includeDateIntervals, filterDate = _b.filterDate;\n return (isOutOfBounds(day, { minDate: minDate, maxDate: maxDate }) ||\n (excludeDates &&\n excludeDates.some(function (excludeDate) {\n if (excludeDate instanceof Date) {\n return isSameDay(day, excludeDate);\n }\n else {\n return isSameDay(day, excludeDate.date);\n }\n })) ||\n (excludeDateIntervals &&\n excludeDateIntervals.some(function (_a) {\n var start = _a.start, end = _a.end;\n return isWithinInterval(day, { start: start, end: end });\n })) ||\n (includeDates &&\n !includeDates.some(function (includeDate) { return isSameDay(day, includeDate); })) ||\n (includeDateIntervals &&\n !includeDateIntervals.some(function (_a) {\n var start = _a.start, end = _a.end;\n return isWithinInterval(day, { start: start, end: end });\n })) ||\n (filterDate && !filterDate(newDate(day))) ||\n false);\n}\n/**\n * Checks if a day is excluded.\n *\n * @param day - The day to check.\n * @param options - The options to consider when checking.\n * @returns - Returns true if the day is excluded, false otherwise.\n */\nfunction isDayExcluded(day, _a) {\n var _b = _a === void 0 ? {} : _a, excludeDates = _b.excludeDates, excludeDateIntervals = _b.excludeDateIntervals;\n if (excludeDateIntervals && excludeDateIntervals.length > 0) {\n return excludeDateIntervals.some(function (_a) {\n var start = _a.start, end = _a.end;\n return isWithinInterval(day, { start: start, end: end });\n });\n }\n return ((excludeDates &&\n excludeDates.some(function (excludeDate) {\n var _a;\n if (excludeDate instanceof Date) {\n return isSameDay(day, excludeDate);\n }\n else {\n return isSameDay(day, (_a = excludeDate.date) !== null && _a !== void 0 ? _a : new Date());\n }\n })) ||\n false);\n}\nfunction isMonthDisabled(month, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate;\n return (isOutOfBounds(month, {\n minDate: minDate ? startOfMonth(minDate) : undefined,\n maxDate: maxDate ? endOfMonth(maxDate) : undefined,\n }) ||\n (excludeDates === null || excludeDates === void 0 ? void 0 : excludeDates.some(function (excludeDate) {\n return isSameMonth(month, excludeDate instanceof Date ? excludeDate : excludeDate.date);\n })) ||\n (includeDates &&\n !includeDates.some(function (includeDate) { return isSameMonth(month, includeDate); })) ||\n (filterDate && !filterDate(newDate(month))) ||\n false);\n}\nfunction isMonthInRange(startDate, endDate, m, day) {\n var startDateYear = getYear(startDate);\n var startDateMonth = getMonth(startDate);\n var endDateYear = getYear(endDate);\n var endDateMonth = getMonth(endDate);\n var dayYear = getYear(day);\n if (startDateYear === endDateYear && startDateYear === dayYear) {\n return startDateMonth <= m && m <= endDateMonth;\n }\n else if (startDateYear < endDateYear) {\n return ((dayYear === startDateYear && startDateMonth <= m) ||\n (dayYear === endDateYear && endDateMonth >= m) ||\n (dayYear < endDateYear && dayYear > startDateYear));\n }\n return false;\n}\n/**\n * To check if a date's month and year are disabled/excluded\n * @param date Date to check\n * @returns {boolean} true if month and year are disabled/excluded, false otherwise\n */\nfunction isMonthYearDisabled(date, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates;\n return (isOutOfBounds(date, { minDate: minDate, maxDate: maxDate }) ||\n (excludeDates &&\n excludeDates.some(function (excludedDate) {\n return isSameMonth(excludedDate instanceof Date ? excludedDate : excludedDate.date, date);\n })) ||\n (includeDates &&\n !includeDates.some(function (includedDate) { return isSameMonth(includedDate, date); })) ||\n false);\n}\nfunction isQuarterDisabled(quarter, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate;\n return (isOutOfBounds(quarter, { minDate: minDate, maxDate: maxDate }) ||\n (excludeDates === null || excludeDates === void 0 ? void 0 : excludeDates.some(function (excludeDate) {\n return isSameQuarter(quarter, excludeDate instanceof Date ? excludeDate : excludeDate.date);\n })) ||\n (includeDates &&\n !includeDates.some(function (includeDate) {\n return isSameQuarter(quarter, includeDate);\n })) ||\n (filterDate && !filterDate(newDate(quarter))) ||\n false);\n}\nfunction isYearInRange(year, start, end) {\n if (!start || !end)\n return false;\n if (!isValid$1(start) || !isValid$1(end))\n return false;\n var startYear = getYear(start);\n var endYear = getYear(end);\n return startYear <= year && endYear >= year;\n}\nfunction isYearDisabled(year, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate;\n var date = new Date(year, 0, 1);\n return (isOutOfBounds(date, {\n minDate: minDate ? startOfYear(minDate) : undefined,\n maxDate: maxDate ? endOfYear(maxDate) : undefined,\n }) ||\n (excludeDates === null || excludeDates === void 0 ? void 0 : excludeDates.some(function (excludeDate) {\n return isSameYear(date, excludeDate instanceof Date ? excludeDate : excludeDate.date);\n })) ||\n (includeDates &&\n !includeDates.some(function (includeDate) { return isSameYear(date, includeDate); })) ||\n (filterDate && !filterDate(newDate(date))) ||\n false);\n}\nfunction isQuarterInRange(startDate, endDate, q, day) {\n var startDateYear = getYear(startDate);\n var startDateQuarter = getQuarter(startDate);\n var endDateYear = getYear(endDate);\n var endDateQuarter = getQuarter(endDate);\n var dayYear = getYear(day);\n if (startDateYear === endDateYear && startDateYear === dayYear) {\n return startDateQuarter <= q && q <= endDateQuarter;\n }\n else if (startDateYear < endDateYear) {\n return ((dayYear === startDateYear && startDateQuarter <= q) ||\n (dayYear === endDateYear && endDateQuarter >= q) ||\n (dayYear < endDateYear && dayYear > startDateYear));\n }\n return false;\n}\nfunction isOutOfBounds(day, _a) {\n var _b;\n var _c = _a === void 0 ? {} : _a, minDate = _c.minDate, maxDate = _c.maxDate;\n return ((_b = ((minDate && differenceInCalendarDays(day, minDate) < 0) ||\n (maxDate && differenceInCalendarDays(day, maxDate) > 0))) !== null && _b !== void 0 ? _b : false);\n}\nfunction isTimeInList(time, times) {\n return times.some(function (listTime) {\n return getHours(listTime) === getHours(time) &&\n getMinutes(listTime) === getMinutes(time) &&\n getSeconds(listTime) === getSeconds(time);\n });\n}\nfunction isTimeDisabled(time, _a) {\n var _b = _a === void 0 ? {} : _a, excludeTimes = _b.excludeTimes, includeTimes = _b.includeTimes, filterTime = _b.filterTime;\n return ((excludeTimes && isTimeInList(time, excludeTimes)) ||\n (includeTimes && !isTimeInList(time, includeTimes)) ||\n (filterTime && !filterTime(time)) ||\n false);\n}\nfunction isTimeInDisabledRange(time, _a) {\n var minTime = _a.minTime, maxTime = _a.maxTime;\n if (!minTime || !maxTime) {\n throw new Error(\"Both minTime and maxTime props required\");\n }\n var baseTime = newDate();\n baseTime = setHours(baseTime, getHours(time));\n baseTime = setMinutes(baseTime, getMinutes(time));\n baseTime = setSeconds(baseTime, getSeconds(time));\n var min = newDate();\n min = setHours(min, getHours(minTime));\n min = setMinutes(min, getMinutes(minTime));\n min = setSeconds(min, getSeconds(minTime));\n var max = newDate();\n max = setHours(max, getHours(maxTime));\n max = setMinutes(max, getMinutes(maxTime));\n max = setSeconds(max, getSeconds(maxTime));\n var valid;\n try {\n valid = !isWithinInterval(baseTime, { start: min, end: max });\n }\n catch (err) {\n valid = false;\n }\n return valid;\n}\nfunction monthDisabledBefore(day, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, includeDates = _b.includeDates;\n var previousMonth = subMonths(day, 1);\n return ((minDate && differenceInCalendarMonths(minDate, previousMonth) > 0) ||\n (includeDates &&\n includeDates.every(function (includeDate) {\n return differenceInCalendarMonths(includeDate, previousMonth) > 0;\n })) ||\n false);\n}\nfunction monthDisabledAfter(day, _a) {\n var _b = _a === void 0 ? {} : _a, maxDate = _b.maxDate, includeDates = _b.includeDates;\n var nextMonth = addMonths(day, 1);\n return ((maxDate && differenceInCalendarMonths(nextMonth, maxDate) > 0) ||\n (includeDates &&\n includeDates.every(function (includeDate) { return differenceInCalendarMonths(nextMonth, includeDate) > 0; })) ||\n false);\n}\nfunction quarterDisabledBefore(date, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, includeDates = _b.includeDates;\n var firstDateOfYear = startOfYear(date);\n var previousQuarter = subQuarters(firstDateOfYear, 1);\n return ((minDate && differenceInCalendarQuarters(minDate, previousQuarter) > 0) ||\n (includeDates &&\n includeDates.every(function (includeDate) {\n return differenceInCalendarQuarters(includeDate, previousQuarter) > 0;\n })) ||\n false);\n}\nfunction quarterDisabledAfter(date, _a) {\n var _b = _a === void 0 ? {} : _a, maxDate = _b.maxDate, includeDates = _b.includeDates;\n var lastDateOfYear = endOfYear(date);\n var nextQuarter = addQuarters(lastDateOfYear, 1);\n return ((maxDate && differenceInCalendarQuarters(nextQuarter, maxDate) > 0) ||\n (includeDates &&\n includeDates.every(function (includeDate) {\n return differenceInCalendarQuarters(nextQuarter, includeDate) > 0;\n })) ||\n false);\n}\nfunction yearDisabledBefore(day, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, includeDates = _b.includeDates;\n var previousYear = subYears(day, 1);\n return ((minDate && differenceInCalendarYears(minDate, previousYear) > 0) ||\n (includeDates &&\n includeDates.every(function (includeDate) {\n return differenceInCalendarYears(includeDate, previousYear) > 0;\n })) ||\n false);\n}\nfunction yearsDisabledBefore(day, _a) {\n var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? DEFAULT_YEAR_ITEM_NUMBER : _c;\n var previousYear = getStartOfYear(subYears(day, yearItemNumber));\n var endPeriod = getYearsPeriod(previousYear, yearItemNumber).endPeriod;\n var minDateYear = minDate && getYear(minDate);\n return (minDateYear && minDateYear > endPeriod) || false;\n}\nfunction yearDisabledAfter(day, _a) {\n var _b = _a === void 0 ? {} : _a, maxDate = _b.maxDate, includeDates = _b.includeDates;\n var nextYear = addYears(day, 1);\n return ((maxDate && differenceInCalendarYears(nextYear, maxDate) > 0) ||\n (includeDates &&\n includeDates.every(function (includeDate) { return differenceInCalendarYears(nextYear, includeDate) > 0; })) ||\n false);\n}\nfunction yearsDisabledAfter(day, _a) {\n var _b = _a === void 0 ? {} : _a, maxDate = _b.maxDate, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? DEFAULT_YEAR_ITEM_NUMBER : _c;\n var nextYear = addYears(day, yearItemNumber);\n var startPeriod = getYearsPeriod(nextYear, yearItemNumber).startPeriod;\n var maxDateYear = maxDate && getYear(maxDate);\n return (maxDateYear && maxDateYear < startPeriod) || false;\n}\nfunction getEffectiveMinDate(_a) {\n var minDate = _a.minDate, includeDates = _a.includeDates;\n if (includeDates && minDate) {\n var minDates = includeDates.filter(function (includeDate) { return differenceInCalendarDays(includeDate, minDate) >= 0; });\n return min(minDates);\n }\n else if (includeDates) {\n return min(includeDates);\n }\n else {\n return minDate;\n }\n}\nfunction getEffectiveMaxDate(_a) {\n var maxDate = _a.maxDate, includeDates = _a.includeDates;\n if (includeDates && maxDate) {\n var maxDates = includeDates.filter(function (includeDate) { return differenceInCalendarDays(includeDate, maxDate) <= 0; });\n return max(maxDates);\n }\n else if (includeDates) {\n return max(includeDates);\n }\n else {\n return maxDate;\n }\n}\n/**\n * Get a map of highlighted dates with their corresponding classes.\n * @param highlightDates The dates to highlight.\n * @param defaultClassName The default class to use for highlighting.\n * @returns A map with dates as keys and arrays of class names as values.\n */\nfunction getHighLightDaysMap(highlightDates, defaultClassName) {\n var _a;\n if (highlightDates === void 0) { highlightDates = []; }\n if (defaultClassName === void 0) { defaultClassName = \"react-datepicker__day--highlighted\"; }\n var dateClasses = new Map();\n for (var i = 0, len = highlightDates.length; i < len; i++) {\n var obj = highlightDates[i];\n if (isDate(obj)) {\n var key = formatDate(obj, \"MM.dd.yyyy\");\n var classNamesArr = dateClasses.get(key) || [];\n if (!classNamesArr.includes(defaultClassName)) {\n classNamesArr.push(defaultClassName);\n dateClasses.set(key, classNamesArr);\n }\n }\n else if (typeof obj === \"object\") {\n var keys = Object.keys(obj);\n var className = (_a = keys[0]) !== null && _a !== void 0 ? _a : \"\";\n var arrOfDates = obj[className];\n if (typeof className === \"string\" && Array.isArray(arrOfDates)) {\n for (var k = 0, len_1 = arrOfDates.length; k < len_1; k++) {\n var dateK = arrOfDates[k];\n if (dateK) {\n var key = formatDate(dateK, \"MM.dd.yyyy\");\n var classNamesArr = dateClasses.get(key) || [];\n if (!classNamesArr.includes(className)) {\n classNamesArr.push(className);\n dateClasses.set(key, classNamesArr);\n }\n }\n }\n }\n }\n }\n return dateClasses;\n}\n/**\n * Compare the two arrays\n * @param array1 The first array to compare.\n * @param array2 The second array to compare.\n * @returns true, if the passed arrays are equal, false otherwise.\n */\nfunction arraysAreEqual(array1, array2) {\n if (array1.length !== array2.length) {\n return false;\n }\n return array1.every(function (value, index) { return value === array2[index]; });\n}\n/**\n * Assign the custom class to each date\n * @param holidayDates array of object containing date and name of the holiday\n * @param defaultClassName className to be added.\n * @returns Map containing date as key and array of className and holiday name as value\n */\nfunction getHolidaysMap(holidayDates, defaultClassName) {\n if (holidayDates === void 0) { holidayDates = []; }\n if (defaultClassName === void 0) { defaultClassName = \"react-datepicker__day--holidays\"; }\n var dateClasses = new Map();\n holidayDates.forEach(function (holiday) {\n var dateObj = holiday.date, holidayName = holiday.holidayName;\n if (!isDate(dateObj)) {\n return;\n }\n var key = formatDate(dateObj, \"MM.dd.yyyy\");\n var classNamesObj = dateClasses.get(key) || {\n className: \"\",\n holidayNames: [],\n };\n if (\"className\" in classNamesObj &&\n classNamesObj[\"className\"] === defaultClassName &&\n arraysAreEqual(classNamesObj[\"holidayNames\"], [holidayName])) {\n return;\n }\n classNamesObj[\"className\"] = defaultClassName;\n var holidayNameArr = classNamesObj[\"holidayNames\"];\n classNamesObj[\"holidayNames\"] = holidayNameArr\n ? __spreadArray(__spreadArray([], holidayNameArr, true), [holidayName], false) : [holidayName];\n dateClasses.set(key, classNamesObj);\n });\n return dateClasses;\n}\n/**\n * Determines the times to inject after a given start of day, current time, and multiplier.\n * @param startOfDay The start of the day.\n * @param currentTime The current time.\n * @param currentMultiplier The current multiplier.\n * @param intervals The intervals.\n * @param injectedTimes The times to potentially inject.\n * @returns An array of times to inject.\n */\nfunction timesToInjectAfter(startOfDay, currentTime, currentMultiplier, intervals, injectedTimes) {\n var l = injectedTimes.length;\n var times = [];\n for (var i = 0; i < l; i++) {\n var injectedTime = startOfDay;\n var injectedTimeValue = injectedTimes[i];\n if (injectedTimeValue) {\n injectedTime = addHours(injectedTime, getHours(injectedTimeValue));\n injectedTime = addMinutes(injectedTime, getMinutes(injectedTimeValue));\n injectedTime = addSeconds(injectedTime, getSeconds(injectedTimeValue));\n }\n var nextTime = addMinutes(startOfDay, (currentMultiplier + 1) * intervals);\n if (isAfter(injectedTime, currentTime) &&\n isBefore(injectedTime, nextTime) &&\n injectedTimeValue != undefined) {\n times.push(injectedTimeValue);\n }\n }\n return times;\n}\n/**\n * Adds a leading zero to a number if it's less than 10.\n * @param i The number to add a leading zero to.\n * @returns The number as a string, with a leading zero if it was less than 10.\n */\nfunction addZero(i) {\n return i < 10 ? \"0\".concat(i) : \"\".concat(i);\n}\n/**\n * Gets the start and end years for a period.\n * @param date The date to get the period for.\n * @param yearItemNumber The number of years in the period. Defaults to DEFAULT_YEAR_ITEM_NUMBER.\n * @returns An object with the start and end years for the period.\n */\nfunction getYearsPeriod(date, yearItemNumber) {\n if (yearItemNumber === void 0) { yearItemNumber = DEFAULT_YEAR_ITEM_NUMBER; }\n var endPeriod = Math.ceil(getYear(date) / yearItemNumber) * yearItemNumber;\n var startPeriod = endPeriod - (yearItemNumber - 1);\n return { startPeriod: startPeriod, endPeriod: endPeriod };\n}\n/**\n * Gets the number of hours in a day.\n * @param d The date to get the number of hours for.\n * @returns The number of hours in the day.\n */\nfunction getHoursInDay(d) {\n var startOfDay = new Date(d.getFullYear(), d.getMonth(), d.getDate());\n var startOfTheNextDay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 24);\n return Math.round((+startOfTheNextDay - +startOfDay) / 3600000);\n}\n/**\n * Returns the start of the minute for the given date\n *\n * NOTE: this function is a DST and timezone-safe analog of `date-fns/startOfMinute`\n * do not make changes unless you know what you're doing\n *\n * See comments on https://github.com/Hacker0x01/react-datepicker/pull/4244\n * for more details\n *\n * @param d date\n * @returns start of the minute\n */\nfunction startOfMinute(d) {\n var seconds = d.getSeconds();\n var milliseconds = d.getMilliseconds();\n return toDate(d.getTime() - seconds * 1000 - milliseconds);\n}\n/**\n * Returns whether the given dates are in the same minute\n *\n * This function is a DST and timezone-safe analog of `date-fns/isSameMinute`\n *\n * @param d1\n * @param d2\n * @returns\n */\nfunction isSameMinute(d1, d2) {\n return startOfMinute(d1).getTime() === startOfMinute(d2).getTime();\n}\n/**\n * Returns a new datetime object representing the input date with midnight time\n * @param date The date to get the midnight time for\n * @returns A new datetime object representing the input date with midnight time\n */\nfunction getMidnightDate(date) {\n if (!isDate(date)) {\n throw new Error(\"Invalid date\");\n }\n var dateWithoutTime = new Date(date);\n dateWithoutTime.setHours(0, 0, 0, 0);\n return dateWithoutTime;\n}\n/**\n * Is the first date before the second one?\n * @param date The date that should be before the other one to return true\n * @param dateToCompare The date to compare with\n * @returns The first date is before the second date\n *\n * Note:\n * This function considers the mid-night of the given dates for comparison.\n * It evaluates whether date is before dateToCompare based on their mid-night timestamps.\n */\nfunction isDateBefore(date, dateToCompare) {\n if (!isDate(date) || !isDate(dateToCompare)) {\n throw new Error(\"Invalid date received\");\n }\n var midnightDate = getMidnightDate(date);\n var midnightDateToCompare = getMidnightDate(dateToCompare);\n return isBefore(midnightDate, midnightDateToCompare);\n}\n/**\n * Checks if the space key was pressed down.\n *\n * @param event - The keyboard event.\n * @returns - Returns true if the space key was pressed down, false otherwise.\n */\nfunction isSpaceKeyDown(event) {\n return event.key === KeyType.Space;\n}\n\n/**\n * `InputTime` is a React component that manages time input.\n *\n * @component\n * @example\n *
\n *\n * @param props - The properties that define the `InputTime` component.\n * @param props.onChange - Function that is called when the date changes.\n * @param props.date - The initial date value.\n * @param props.timeString - The initial time string value.\n * @param props.timeInputLabel - The label for the time input.\n * @param props.customTimeInput - An optional custom time input element.\n *\n * @returns The `InputTime` component.\n */\nvar InputTime = /** @class */ (function (_super) {\n __extends(InputTime, _super);\n function InputTime(props) {\n var _this = _super.call(this, props) || this;\n _this.inputRef = React.createRef();\n _this.onTimeChange = function (time) {\n var _a, _b;\n _this.setState({ time: time });\n var propDate = _this.props.date;\n var isPropDateValid = propDate instanceof Date && !isNaN(+propDate);\n var date = isPropDateValid ? propDate : new Date();\n if (time === null || time === void 0 ? void 0 : time.includes(\":\")) {\n var _c = time.split(\":\"), hours = _c[0], minutes = _c[1];\n date.setHours(Number(hours));\n date.setMinutes(Number(minutes));\n }\n (_b = (_a = _this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, date);\n };\n _this.renderTimeInput = function () {\n var time = _this.state.time;\n var _a = _this.props, date = _a.date, timeString = _a.timeString, customTimeInput = _a.customTimeInput;\n if (customTimeInput) {\n return cloneElement(customTimeInput, {\n date: date,\n value: time,\n onChange: _this.onTimeChange,\n });\n }\n return (React.createElement(\"input\", { type: \"time\", className: \"react-datepicker-time__input\", placeholder: \"Time\", name: \"time-input\", ref: _this.inputRef, onClick: function () {\n var _a;\n (_a = _this.inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n }, required: true, value: time, onChange: function (event) {\n _this.onTimeChange(event.target.value || timeString);\n } }));\n };\n _this.state = {\n time: _this.props.timeString,\n };\n return _this;\n }\n InputTime.getDerivedStateFromProps = function (props, state) {\n if (props.timeString !== state.time) {\n return {\n time: props.timeString,\n };\n }\n // Return null to indicate no change to state.\n return null;\n };\n InputTime.prototype.render = function () {\n return (React.createElement(\"div\", { className: \"react-datepicker__input-time-container\" },\n React.createElement(\"div\", { className: \"react-datepicker-time__caption\" }, this.props.timeInputLabel),\n React.createElement(\"div\", { className: \"react-datepicker-time__input-container\" },\n React.createElement(\"div\", { className: \"react-datepicker-time__input\" }, this.renderTimeInput()))));\n };\n return InputTime;\n}(Component));\n\n/**\n * `Day` is a React component that represents a single day in a date picker.\n * It handles the rendering and interaction of a day.\n *\n * @prop ariaLabelPrefixWhenEnabled - Aria label prefix when the day is enabled.\n * @prop ariaLabelPrefixWhenDisabled - Aria label prefix when the day is disabled.\n * @prop disabledKeyboardNavigation - Whether keyboard navigation is disabled.\n * @prop day - The day to be displayed.\n * @prop dayClassName - Function to customize the CSS class of the day.\n * @prop endDate - The end date in a range.\n * @prop highlightDates - Map of dates to be highlighted.\n * @prop holidays - Map of holiday dates.\n * @prop inline - Whether the date picker is inline.\n * @prop shouldFocusDayInline - Whether the day should be focused when date picker is inline.\n * @prop month - The month the day belongs to.\n * @prop onClick - Click event handler.\n * @prop onMouseEnter - Mouse enter event handler.\n * @prop handleOnKeyDown - Key down event handler.\n * @prop usePointerEvent - Whether to use pointer events.\n * @prop preSelection - The date that is currently selected.\n * @prop selected - The selected date.\n * @prop selectingDate - The date currently being selected.\n * @prop selectsEnd - Whether the day can be the end date in a range.\n * @prop selectsStart - Whether the day can be the start date in a range.\n * @prop selectsRange - Whether the day can be in a range.\n * @prop showWeekPicker - Whether to show week picker.\n * @prop showWeekNumber - Whether to show week numbers.\n * @prop selectsDisabledDaysInRange - Whether to select disabled days in a range.\n * @prop selectsMultiple - Whether to allow multiple date selection.\n * @prop selectedDates - Array of selected dates.\n * @prop startDate - The start date in a range.\n * @prop renderDayContents - Function to customize the rendering of the day's contents.\n * @prop containerRef - Ref for the container.\n * @prop excludeDates - Array of dates to be excluded.\n * @prop calendarStartDay - The start day of the week.\n * @prop locale - The locale object.\n * @prop monthShowsDuplicateDaysEnd - Whether to show duplicate days at the end of the month.\n * @prop monthShowsDuplicateDaysStart - Whether to show duplicate days at the start of the month.\n * @prop includeDates - Array of dates to be included.\n * @prop includeDateIntervals - Array of date intervals to be included.\n * @prop minDate - The minimum date that can be selected.\n * @prop maxDate - The maximum date that can be selected.\n *\n * @example\n * ```tsx\n * import React from 'react';\n * import Day from './day';\n *\n * function MyComponent() {\n * const handleDayClick = (event) => {\n * console.log('Day clicked', event);\n * };\n *\n * const handleDayMouseEnter = (event) => {\n * console.log('Mouse entered day', event);\n * };\n *\n * const renderDayContents = (date) => {\n * return
{date.getDate()}
;\n * };\n *\n * return (\n *
\n * );\n * }\n *\n * export default MyComponent;\n * ```\n */\nvar Day = /** @class */ (function (_super) {\n __extends(Day, _super);\n function Day() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dayEl = createRef();\n _this.handleClick = function (event) {\n if (!_this.isDisabled() && _this.props.onClick) {\n _this.props.onClick(event);\n }\n };\n _this.handleMouseEnter = function (event) {\n if (!_this.isDisabled() && _this.props.onMouseEnter) {\n _this.props.onMouseEnter(event);\n }\n };\n _this.handleOnKeyDown = function (event) {\n var _a, _b;\n var eventKey = event.key;\n if (eventKey === KeyType.Space) {\n event.preventDefault();\n event.key = KeyType.Enter;\n }\n (_b = (_a = _this.props).handleOnKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);\n };\n _this.isSameDay = function (other) {\n return isSameDay(_this.props.day, other);\n };\n _this.isKeyboardSelected = function () {\n var _a;\n if (_this.props.disabledKeyboardNavigation) {\n return false;\n }\n var isSelectedDate = _this.props.selectsMultiple\n ? (_a = _this.props.selectedDates) === null || _a === void 0 ? void 0 : _a.some(function (date) { return _this.isSameDayOrWeek(date); })\n : _this.isSameDayOrWeek(_this.props.selected);\n var isDisabled = _this.props.preSelection && _this.isDisabled(_this.props.preSelection);\n return (!isSelectedDate &&\n _this.isSameDayOrWeek(_this.props.preSelection) &&\n !isDisabled);\n };\n _this.isDisabled = function (day) {\n if (day === void 0) { day = _this.props.day; }\n // Almost all props previously were passed as this.props w/o proper typing with prop-types\n // after the migration to TS i made it explicit\n return isDayDisabled(day, {\n minDate: _this.props.minDate,\n maxDate: _this.props.maxDate,\n excludeDates: _this.props.excludeDates,\n excludeDateIntervals: _this.props.excludeDateIntervals,\n includeDateIntervals: _this.props.includeDateIntervals,\n includeDates: _this.props.includeDates,\n filterDate: _this.props.filterDate,\n });\n };\n _this.isExcluded = function () {\n // Almost all props previously were passed as this.props w/o proper typing with prop-types\n // after the migration to TS i made it explicit\n return isDayExcluded(_this.props.day, {\n excludeDates: _this.props.excludeDates,\n excludeDateIntervals: _this.props.excludeDateIntervals,\n });\n };\n _this.isStartOfWeek = function () {\n return isSameDay(_this.props.day, getStartOfWeek(_this.props.day, _this.props.locale, _this.props.calendarStartDay));\n };\n _this.isSameWeek = function (other) {\n return _this.props.showWeekPicker &&\n isSameDay(other, getStartOfWeek(_this.props.day, _this.props.locale, _this.props.calendarStartDay));\n };\n _this.isSameDayOrWeek = function (other) {\n return _this.isSameDay(other) || _this.isSameWeek(other);\n };\n _this.getHighLightedClass = function () {\n var _a = _this.props, day = _a.day, highlightDates = _a.highlightDates;\n if (!highlightDates) {\n return false;\n }\n // Looking for className in the Map of {'day string, 'className'}\n var dayStr = formatDate(day, \"MM.dd.yyyy\");\n return highlightDates.get(dayStr);\n };\n // Function to return the array containing className associated to the date\n _this.getHolidaysClass = function () {\n var _a;\n var _b = _this.props, day = _b.day, holidays = _b.holidays;\n if (!holidays) {\n // For type consistency no other reasons\n return [undefined];\n }\n var dayStr = formatDate(day, \"MM.dd.yyyy\");\n // Looking for className in the Map of {day string: {className, holidayName}}\n if (holidays.has(dayStr)) {\n return [(_a = holidays.get(dayStr)) === null || _a === void 0 ? void 0 : _a.className];\n }\n // For type consistency no other reasons\n return [undefined];\n };\n _this.isInRange = function () {\n var _a = _this.props, day = _a.day, startDate = _a.startDate, endDate = _a.endDate;\n if (!startDate || !endDate) {\n return false;\n }\n return isDayInRange(day, startDate, endDate);\n };\n _this.isInSelectingRange = function () {\n var _a;\n var _b = _this.props, day = _b.day, selectsStart = _b.selectsStart, selectsEnd = _b.selectsEnd, selectsRange = _b.selectsRange, selectsDisabledDaysInRange = _b.selectsDisabledDaysInRange, startDate = _b.startDate, endDate = _b.endDate;\n var selectingDate = (_a = _this.props.selectingDate) !== null && _a !== void 0 ? _a : _this.props.preSelection;\n if (!(selectsStart || selectsEnd || selectsRange) ||\n !selectingDate ||\n (!selectsDisabledDaysInRange && _this.isDisabled())) {\n return false;\n }\n if (selectsStart &&\n endDate &&\n (isBefore(selectingDate, endDate) || isEqual(selectingDate, endDate))) {\n return isDayInRange(day, selectingDate, endDate);\n }\n if (selectsEnd &&\n startDate &&\n (isAfter(selectingDate, startDate) || isEqual(selectingDate, startDate))) {\n return isDayInRange(day, startDate, selectingDate);\n }\n if (selectsRange &&\n startDate &&\n !endDate &&\n (isAfter(selectingDate, startDate) || isEqual(selectingDate, startDate))) {\n return isDayInRange(day, startDate, selectingDate);\n }\n return false;\n };\n _this.isSelectingRangeStart = function () {\n var _a;\n if (!_this.isInSelectingRange()) {\n return false;\n }\n var _b = _this.props, day = _b.day, startDate = _b.startDate, selectsStart = _b.selectsStart;\n var selectingDate = (_a = _this.props.selectingDate) !== null && _a !== void 0 ? _a : _this.props.preSelection;\n if (selectsStart) {\n return isSameDay(day, selectingDate);\n }\n else {\n return isSameDay(day, startDate);\n }\n };\n _this.isSelectingRangeEnd = function () {\n var _a;\n if (!_this.isInSelectingRange()) {\n return false;\n }\n var _b = _this.props, day = _b.day, endDate = _b.endDate, selectsEnd = _b.selectsEnd, selectsRange = _b.selectsRange;\n var selectingDate = (_a = _this.props.selectingDate) !== null && _a !== void 0 ? _a : _this.props.preSelection;\n if (selectsEnd || selectsRange) {\n return isSameDay(day, selectingDate);\n }\n else {\n return isSameDay(day, endDate);\n }\n };\n _this.isRangeStart = function () {\n var _a = _this.props, day = _a.day, startDate = _a.startDate, endDate = _a.endDate;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameDay(startDate, day);\n };\n _this.isRangeEnd = function () {\n var _a = _this.props, day = _a.day, startDate = _a.startDate, endDate = _a.endDate;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameDay(endDate, day);\n };\n _this.isWeekend = function () {\n var weekday = getDay(_this.props.day);\n return weekday === 0 || weekday === 6;\n };\n _this.isAfterMonth = function () {\n return (_this.props.month !== undefined &&\n (_this.props.month + 1) % 12 === getMonth(_this.props.day));\n };\n _this.isBeforeMonth = function () {\n return (_this.props.month !== undefined &&\n (getMonth(_this.props.day) + 1) % 12 === _this.props.month);\n };\n _this.isCurrentDay = function () { return _this.isSameDay(newDate()); };\n _this.isSelected = function () {\n var _a;\n if (_this.props.selectsMultiple) {\n return (_a = _this.props.selectedDates) === null || _a === void 0 ? void 0 : _a.some(function (date) {\n return _this.isSameDayOrWeek(date);\n });\n }\n return _this.isSameDayOrWeek(_this.props.selected);\n };\n _this.getClassNames = function (date) {\n var dayClassName = _this.props.dayClassName\n ? _this.props.dayClassName(date)\n : undefined;\n return clsx(\"react-datepicker__day\", dayClassName, \"react-datepicker__day--\" + getDayOfWeekCode(_this.props.day), {\n \"react-datepicker__day--disabled\": _this.isDisabled(),\n \"react-datepicker__day--excluded\": _this.isExcluded(),\n \"react-datepicker__day--selected\": _this.isSelected(),\n \"react-datepicker__day--keyboard-selected\": _this.isKeyboardSelected(),\n \"react-datepicker__day--range-start\": _this.isRangeStart(),\n \"react-datepicker__day--range-end\": _this.isRangeEnd(),\n \"react-datepicker__day--in-range\": _this.isInRange(),\n \"react-datepicker__day--in-selecting-range\": _this.isInSelectingRange(),\n \"react-datepicker__day--selecting-range-start\": _this.isSelectingRangeStart(),\n \"react-datepicker__day--selecting-range-end\": _this.isSelectingRangeEnd(),\n \"react-datepicker__day--today\": _this.isCurrentDay(),\n \"react-datepicker__day--weekend\": _this.isWeekend(),\n \"react-datepicker__day--outside-month\": _this.isAfterMonth() || _this.isBeforeMonth(),\n }, _this.getHighLightedClass(), _this.getHolidaysClass());\n };\n _this.getAriaLabel = function () {\n var _a = _this.props, day = _a.day, _b = _a.ariaLabelPrefixWhenEnabled, ariaLabelPrefixWhenEnabled = _b === void 0 ? \"Choose\" : _b, _c = _a.ariaLabelPrefixWhenDisabled, ariaLabelPrefixWhenDisabled = _c === void 0 ? \"Not available\" : _c;\n var prefix = _this.isDisabled() || _this.isExcluded()\n ? ariaLabelPrefixWhenDisabled\n : ariaLabelPrefixWhenEnabled;\n return \"\".concat(prefix, \" \").concat(formatDate(day, \"PPPP\", _this.props.locale));\n };\n // A function to return the holiday's name as title's content\n _this.getTitle = function () {\n var _a = _this.props, day = _a.day, _b = _a.holidays, holidays = _b === void 0 ? new Map() : _b, excludeDates = _a.excludeDates;\n var compareDt = formatDate(day, \"MM.dd.yyyy\");\n var titles = [];\n if (holidays.has(compareDt)) {\n titles.push.apply(titles, holidays.get(compareDt).holidayNames);\n }\n if (_this.isExcluded()) {\n titles.push(excludeDates === null || excludeDates === void 0 ? void 0 : excludeDates.filter(function (excludeDate) {\n if (excludeDate instanceof Date) {\n return isSameDay(excludeDate, day);\n }\n return isSameDay(excludeDate === null || excludeDate === void 0 ? void 0 : excludeDate.date, day);\n }).map(function (excludeDate) {\n if (excludeDate instanceof Date) {\n return undefined;\n }\n return excludeDate === null || excludeDate === void 0 ? void 0 : excludeDate.message;\n }));\n }\n // I'm not sure that this is a right output, but all tests are green\n return titles.join(\", \");\n };\n _this.getTabIndex = function () {\n var selectedDay = _this.props.selected;\n var preSelectionDay = _this.props.preSelection;\n var tabIndex = !(_this.props.showWeekPicker &&\n (_this.props.showWeekNumber || !_this.isStartOfWeek())) &&\n (_this.isKeyboardSelected() ||\n (_this.isSameDay(selectedDay) &&\n isSameDay(preSelectionDay, selectedDay)))\n ? 0\n : -1;\n return tabIndex;\n };\n // various cases when we need to apply focus to the preselected day\n // focus the day on mount/update so that keyboard navigation works while cycling through months with up or down keys (not for prev and next month buttons)\n // prevent focus for these activeElement cases so we don't pull focus from the input as the calendar opens\n _this.handleFocusDay = function () {\n var _a;\n // only do this while the input isn't focused\n // otherwise, typing/backspacing the date manually may steal focus away from the input\n _this.shouldFocusDay() && ((_a = _this.dayEl.current) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }));\n };\n _this.renderDayContents = function () {\n if (_this.props.monthShowsDuplicateDaysEnd && _this.isAfterMonth())\n return null;\n if (_this.props.monthShowsDuplicateDaysStart && _this.isBeforeMonth())\n return null;\n return _this.props.renderDayContents\n ? _this.props.renderDayContents(getDate(_this.props.day), _this.props.day)\n : getDate(_this.props.day);\n };\n _this.render = function () { return (\n // TODO: Use
(\" + classes + \"):\\n\";\n for (var x in htmlClassList) {\n buffer += \" \" + x + \" \" + htmlClassList[x] + \"\\n\";\n }\n\n classes = document.body.className;\n\n // eslint-disable-next-line max-len\n buffer += \"\\n\\ndoc.body (\" + classes + \"):\\n\";\n for (var _x in docBodyClassList) {\n buffer += \" \" + _x + \" \" + docBodyClassList[_x] + \"\\n\";\n }\n\n buffer += \"\\n\";\n\n // eslint-disable-next-line no-console\n console.log(buffer);\n }\n}\n\n/**\n * Track the number of reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar incrementReference = function incrementReference(poll, className) {\n if (!poll[className]) {\n poll[className] = 0;\n }\n poll[className] += 1;\n return className;\n};\n\n/**\n * Drop the reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar decrementReference = function decrementReference(poll, className) {\n if (poll[className]) {\n poll[className] -= 1;\n }\n return className;\n};\n\n/**\n * Track a class and add to the given class list.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be tracked.\n */\nvar trackClass = function trackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n incrementReference(poll, className);\n classListRef.add(className);\n });\n};\n\n/**\n * Untrack a class and remove from the given class list if the reference\n * reaches 0.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be untracked.\n */\nvar untrackClass = function untrackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n decrementReference(poll, className);\n poll[className] === 0 && classListRef.remove(className);\n });\n};\n\n/**\n * Public inferface to add classes to the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\nvar add = exports.add = function add(element, classString) {\n return trackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};\n\n/**\n * Public inferface to remove classes from the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\nvar remove = exports.remove = function remove(element, classString) {\n return untrackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleBlur = handleBlur;\nexports.handleFocus = handleFocus;\nexports.markForFocusLater = markForFocusLater;\nexports.returnFocus = returnFocus;\nexports.popWithoutFocus = popWithoutFocus;\nexports.setupScopedFocus = setupScopedFocus;\nexports.teardownScopedFocus = teardownScopedFocus;\n\nvar _tabbable = require(\"../helpers/tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\n\nfunction handleBlur() {\n needToFocus = true;\n}\n\nfunction handleFocus() {\n if (needToFocus) {\n needToFocus = false;\n if (!modalElement) {\n return;\n }\n // need to see how jQuery shims document.on('focusin') so we don't need the\n // setTimeout, firefox doesn't support focusin, if it did, we could focus\n // the element outside of a setTimeout. Side-effect of this implementation\n // is that the document.body gets focus, and then we focus our element right\n // after, seems fine.\n setTimeout(function () {\n if (modalElement.contains(document.activeElement)) {\n return;\n }\n var el = (0, _tabbable2.default)(modalElement)[0] || modalElement;\n el.focus();\n }, 0);\n }\n}\n\nfunction markForFocusLater() {\n focusLaterElements.push(document.activeElement);\n}\n\n/* eslint-disable no-console */\nfunction returnFocus() {\n var toFocus = null;\n try {\n if (focusLaterElements.length !== 0) {\n toFocus = focusLaterElements.pop();\n toFocus.focus();\n }\n return;\n } catch (e) {\n console.warn([\"You tried to return focus to\", toFocus, \"but it is not in the DOM anymore\"].join(\" \"));\n }\n}\n/* eslint-enable no-console */\n\nfunction popWithoutFocus() {\n focusLaterElements.length > 0 && focusLaterElements.pop();\n}\n\nfunction setupScopedFocus(element) {\n modalElement = element;\n\n if (window.addEventListener) {\n window.addEventListener(\"blur\", handleBlur, false);\n document.addEventListener(\"focus\", handleFocus, true);\n } else {\n window.attachEvent(\"onBlur\", handleBlur);\n document.attachEvent(\"onFocus\", handleFocus);\n }\n}\n\nfunction teardownScopedFocus() {\n modalElement = null;\n\n if (window.addEventListener) {\n window.removeEventListener(\"blur\", handleBlur);\n document.removeEventListener(\"focus\", handleFocus);\n } else {\n window.detachEvent(\"onBlur\", handleBlur);\n document.detachEvent(\"onFocus\", handleFocus);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canUseDOM = undefined;\n\nvar _exenv = require(\"exenv\");\n\nvar _exenv2 = _interopRequireDefault(_exenv);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar EE = _exenv2.default;\n\nvar SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};\n\nvar canUseDOM = exports.canUseDOM = EE.canUseDOM;\n\nexports.default = SafeHTMLElement;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scopeTab;\n\nvar _tabbable = require(\"./tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction scopeTab(node, event) {\n var tabbable = (0, _tabbable2.default)(node);\n\n if (!tabbable.length) {\n // Do nothing, since there are no elements that can receive focus.\n event.preventDefault();\n return;\n }\n\n var shiftKey = event.shiftKey;\n var head = tabbable[0];\n var tail = tabbable[tabbable.length - 1];\n\n // proceed with default browser behavior on tab.\n // Focus on last element on shift + tab.\n if (node === document.activeElement) {\n if (!shiftKey) return;\n target = tail;\n }\n\n var target;\n if (tail === document.activeElement && !shiftKey) {\n target = head;\n }\n\n if (head === document.activeElement && shiftKey) {\n target = tail;\n }\n\n if (target) {\n event.preventDefault();\n target.focus();\n return;\n }\n\n // Safari radio issue.\n //\n // Safari does not move the focus to the radio button,\n // so we need to force it to really walk through all elements.\n //\n // This is very error prone, since we are trying to guess\n // if it is a safari browser from the first occurence between\n // chrome or safari.\n //\n // The chrome user agent contains the first ocurrence\n // as the 'chrome/version' and later the 'safari/version'.\n var checkSafari = /(\\bChrome\\b|\\bSafari\\b)\\//.exec(navigator.userAgent);\n var isSafariDesktop = checkSafari != null && checkSafari[1] != \"Chrome\" && /\\biPod\\b|\\biPad\\b/g.exec(navigator.userAgent) == null;\n\n // If we are not in safari desktop, let the browser control\n // the focus\n if (!isSafariDesktop) return;\n\n var x = tabbable.indexOf(document.activeElement);\n\n if (x > -1) {\n x += shiftKey ? -1 : 1;\n }\n\n event.preventDefault();\n\n tabbable[x].focus();\n}\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\n\nfunction hidesContents(element) {\n var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n\n // If the node is empty, this is good enough\n if (zeroSize && !element.innerHTML) return true;\n\n // Otherwise we need to check some styles\n var style = window.getComputedStyle(element);\n return zeroSize ? style.getPropertyValue(\"overflow\") !== \"visible\" : style.getPropertyValue(\"display\") == \"none\";\n}\n\nfunction visible(element) {\n var parentElement = element;\n while (parentElement) {\n if (parentElement === document.body) break;\n if (hidesContents(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n return true;\n}\n\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && visible(element);\n}\n\nfunction tabbable(element) {\n var tabIndex = element.getAttribute(\"tabindex\");\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n return [].slice.call(element.querySelectorAll(\"*\"), 0).filter(tabbable);\n}\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Modal = require(\"./components/Modal\");\n\nvar _Modal2 = _interopRequireDefault(_Modal);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Modal2.default;\nmodule.exports = exports[\"default\"];","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(e.reduxLogger=e.reduxLogger||{})}(this,function(e){\"use strict\";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,\"kind\",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,\"path\",{value:t,enumerable:!0})}function n(e,t,r){n.super_.call(this,\"E\",e),Object.defineProperty(this,\"lhs\",{value:t,enumerable:!0}),Object.defineProperty(this,\"rhs\",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,\"N\",e),Object.defineProperty(this,\"rhs\",{value:t,enumerable:!0})}function i(e,t){i.super_.call(this,\"D\",e),Object.defineProperty(this,\"lhs\",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,\"A\",e),Object.defineProperty(this,\"index\",{value:t,enumerable:!0}),Object.defineProperty(this,\"item\",{value:r,enumerable:!0})}function f(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function u(e){var t=\"undefined\"==typeof e?\"undefined\":N(e);return\"object\"!==t?t:e===Math?\"math\":null===e?\"null\":Array.isArray(e)?\"array\":\"[object Date]\"===Object.prototype.toString.call(e)?\"date\":\"function\"==typeof e.toString&&/^\\/.*\\//.test(e.toString())?\"regexp\":\"object\"}function l(e,t,r,c,s,d,p){s=s||[],p=p||[];var g=s.slice(0);if(\"undefined\"!=typeof d){if(c){if(\"function\"==typeof c&&c(g,d))return;if(\"object\"===(\"undefined\"==typeof c?\"undefined\":N(c))){if(c.prefilter&&c.prefilter(g,d))return;if(c.normalize){var h=c.normalize(g,d,e,t);h&&(e=h[0],t=h[1])}}}g.push(d)}\"regexp\"===u(e)&&\"regexp\"===u(t)&&(e=e.toString(),t=t.toString());var y=\"undefined\"==typeof e?\"undefined\":N(e),v=\"undefined\"==typeof t?\"undefined\":N(t),b=\"undefined\"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(d),m=\"undefined\"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(d);if(!b&&m)r(new o(g,t));else if(!m&&b)r(new i(g,e));else if(u(e)!==u(t))r(new n(g,e,t));else if(\"date\"===u(e)&&e-t!==0)r(new n(g,e,t));else if(\"object\"===y&&null!==e&&null!==t)if(p.filter(function(t){return t.lhs===e}).length)e!==t&&r(new n(g,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){var w;e.length;for(w=0;w
=t.length?r(new a(g,w,new i(void 0,e[w]))):l(e[w],t[w],r,c,g,w,p);for(;w=0?(l(e[n],t[n],r,c,g,n,p),S=f(S,i)):l(e[n],void 0,r,c,g,n,p)}),S.forEach(function(e){l(void 0,t[e],r,c,g,e,p)})}p.length=p.length-1}else e!==t&&(\"number\"===y&&isNaN(e)&&isNaN(t)||r(new n(g,e,t)))}function c(e,t,r,n){return n=n||[],l(e,t,function(e){e&&n.push(e)},r),n.length?n:void 0}function s(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},L,e),r=t.logger,n=t.stateTransformer,o=t.errorTransformer,i=t.predicate,a=t.logErrors,f=t.diffPredicate;if(\"undefined\"==typeof r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error(\"[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\\n// Logger with default options\\nimport { logger } from 'redux-logger'\\nconst store = createStore(\\n reducer,\\n applyMiddleware(logger)\\n)\\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\\nimport createLogger from 'redux-logger'\\nconst logger = createLogger({\\n // ...options\\n});\\nconst store = createStore(\\n reducer,\\n applyMiddleware(logger)\\n)\\n\"),function(){return function(e){return function(t){return e(t)}}};var u=[];return function(e){var r=e.getState;return function(e){return function(l){if(\"function\"==typeof i&&!i(r,l))return e(l);var c={};u.push(c),c.started=O.now(),c.startedTime=new Date,c.prevState=n(r()),c.action=l;var s=void 0;if(a)try{s=e(l)}catch(e){c.error=o(e)}else s=e(l);c.took=O.now()-c.started,c.nextState=n(r());var d=t.diff&&\"function\"==typeof f?f(r,l):t.diff;if(x(u,Object.assign({},t,{diff:d})),u.length=0,c.error)throw c.error;return s}}}}var k,j,E=function(e,t){return new Array(t+1).join(e)},A=function(e,t){return E(\"0\",t-e.toString().length)+e},D=function(e){return A(e.getHours(),2)+\":\"+A(e.getMinutes(),2)+\":\"+A(e.getSeconds(),2)+\".\"+A(e.getMilliseconds(),3)},O=\"undefined\"!=typeof performance&&null!==performance&&\"function\"==typeof performance.now?performance:Date,N=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},P=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return\"function\"==typeof t||\"function\"==typeof r?S()({dispatch:t,getState:r}):void console.error(\"\\n[redux-logger v3] BREAKING CHANGE\\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\\n[redux-logger v3] Change\\n[redux-logger v3] import createLogger from 'redux-logger'\\n[redux-logger v3] to\\n[redux-logger v3] import { createLogger } from 'redux-logger'\\n\")};e.defaults=L,e.createLogger=S,e.logger=T,e.default=T,Object.defineProperty(e,\"__esModule\",{value:!0})});\n","/**\n * @license React\n * use-sync-external-store-with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = React.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/use-sync-external-store-with-selector.production.js');\n} else {\n module.exports = require('./cjs/use-sync-external-store-with-selector.development.js');\n}\n","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n","// src/utils/react.ts\nimport * as React from \"react\";\n\n// src/utils/react-is.ts\nvar IS_REACT_19 = /* @__PURE__ */ React.version.startsWith(\"19\");\nvar REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for(\n IS_REACT_19 ? \"react.transitional.element\" : \"react.element\"\n);\nvar REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for(\"react.portal\");\nvar REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for(\"react.fragment\");\nvar REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for(\"react.strict_mode\");\nvar REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for(\"react.profiler\");\nvar REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for(\"react.consumer\");\nvar REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for(\"react.context\");\nvar REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for(\"react.forward_ref\");\nvar REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for(\"react.suspense\");\nvar REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for(\n \"react.suspense_list\"\n);\nvar REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for(\"react.memo\");\nvar REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for(\"react.lazy\");\nvar REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for(\"react.offscreen\");\nvar REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for(\n \"react.client.reference\"\n);\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nfunction isValidElementType(type) {\n return typeof type === \"string\" || typeof type === \"function\" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || typeof type === \"object\" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0) ? true : false;\n}\nfunction typeOf(object) {\n if (typeof object === \"object\" && object !== null) {\n const { $$typeof } = object;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (object = object.type, object) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return object;\n default:\n switch (object = object && object.$$typeof, object) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nfunction isContextConsumer(object) {\n return IS_REACT_19 ? typeOf(object) === REACT_CONSUMER_TYPE : typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(message);\n }\n try {\n throw new Error(message);\n } catch (e) {\n }\n}\n\n// src/connect/verifySubselectors.ts\nfunction verify(selector, methodName) {\n if (!selector) {\n throw new Error(`Unexpected value for ${methodName} in connect.`);\n } else if (methodName === \"mapStateToProps\" || methodName === \"mapDispatchToProps\") {\n if (!Object.prototype.hasOwnProperty.call(selector, \"dependsOnOwnProps\")) {\n warning(\n `The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.`\n );\n }\n }\n}\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) {\n verify(mapStateToProps, \"mapStateToProps\");\n verify(mapDispatchToProps, \"mapDispatchToProps\");\n verify(mergeProps, \"mergeProps\");\n}\n\n// src/connect/selectorFactory.ts\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, {\n areStatesEqual,\n areOwnPropsEqual,\n areStatePropsEqual\n}) {\n let hasRunAtLeastOnce = false;\n let state;\n let ownProps;\n let stateProps;\n let dispatchProps;\n let mergedProps;\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps)\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps)\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps)\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleNewState() {\n const nextStateProps = mapStateToProps(state, ownProps);\n const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged)\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleSubsequentCalls(nextState, nextOwnProps) {\n const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n const stateChanged = !areStatesEqual(\n nextState,\n state,\n nextOwnProps,\n ownProps\n );\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n}\nfunction finalPropsSelectorFactory(dispatch, {\n initMapStateToProps,\n initMapDispatchToProps,\n initMergeProps,\n ...options\n}) {\n const mapStateToProps = initMapStateToProps(dispatch, options);\n const mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n const mergeProps = initMergeProps(dispatch, options);\n if (process.env.NODE_ENV !== \"production\") {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps);\n }\n return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n\n// src/utils/bindActionCreators.ts\nfunction bindActionCreators(actionCreators, dispatch) {\n const boundActionCreators = {};\n for (const key in actionCreators) {\n const actionCreator = actionCreators[key];\n if (typeof actionCreator === \"function\") {\n boundActionCreators[key] = (...args) => dispatch(actionCreator(...args));\n }\n }\n return boundActionCreators;\n}\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" || obj === null) return false;\n const proto = Object.getPrototypeOf(obj);\n if (proto === null) return true;\n let baseProto = proto;\n while (Object.getPrototypeOf(baseProto) !== null) {\n baseProto = Object.getPrototypeOf(baseProto);\n }\n return proto === baseProto;\n}\n\n// src/utils/verifyPlainObject.ts\nfunction verifyPlainObject(value, displayName, methodName) {\n if (!isPlainObject(value)) {\n warning(\n `${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`\n );\n }\n}\n\n// src/connect/wrapMapToProps.ts\nfunction wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch) {\n const constant = getConstant(dispatch);\n function constantSelector() {\n return constant;\n }\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n}\nfunction getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, { displayName }) {\n const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, void 0);\n };\n proxy.dependsOnOwnProps = true;\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n let props = proxy(stateOrDispatch, ownProps);\n if (typeof props === \"function\") {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n if (process.env.NODE_ENV !== \"production\")\n verifyPlainObject(props, displayName, methodName);\n return props;\n };\n return proxy;\n };\n}\n\n// src/connect/invalidArgFactory.ts\nfunction createInvalidArgFactory(arg, name) {\n return (dispatch, options) => {\n throw new Error(\n `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.`\n );\n };\n}\n\n// src/connect/mapDispatchToProps.ts\nfunction mapDispatchToPropsFactory(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === \"object\" ? wrapMapToPropsConstant(\n (dispatch) => (\n // @ts-ignore\n bindActionCreators(mapDispatchToProps, dispatch)\n )\n ) : !mapDispatchToProps ? wrapMapToPropsConstant((dispatch) => ({\n dispatch\n })) : typeof mapDispatchToProps === \"function\" ? (\n // @ts-ignore\n wrapMapToPropsFunc(mapDispatchToProps, \"mapDispatchToProps\")\n ) : createInvalidArgFactory(mapDispatchToProps, \"mapDispatchToProps\");\n}\n\n// src/connect/mapStateToProps.ts\nfunction mapStateToPropsFactory(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : typeof mapStateToProps === \"function\" ? (\n // @ts-ignore\n wrapMapToPropsFunc(mapStateToProps, \"mapStateToProps\")\n ) : createInvalidArgFactory(mapStateToProps, \"mapStateToProps\");\n}\n\n// src/connect/mergeProps.ts\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return { ...ownProps, ...stateProps, ...dispatchProps };\n}\nfunction wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, { displayName, areMergedPropsEqual }) {\n let hasRunOnce = false;\n let mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n if (hasRunOnce) {\n if (!areMergedPropsEqual(nextMergedProps, mergedProps))\n mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== \"production\")\n verifyPlainObject(mergedProps, displayName, \"mergeProps\");\n }\n return mergedProps;\n };\n };\n}\nfunction mergePropsFactory(mergeProps) {\n return !mergeProps ? () => defaultMergeProps : typeof mergeProps === \"function\" ? wrapMergePropsFunc(mergeProps) : createInvalidArgFactory(mergeProps, \"mergeProps\");\n}\n\n// src/utils/batch.ts\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\n// src/utils/Subscription.ts\nfunction createListenerCollection() {\n let first = null;\n let last = null;\n return {\n clear() {\n first = null;\n last = null;\n },\n notify() {\n defaultNoopBatch(() => {\n let listener = first;\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n get() {\n const listeners = [];\n let listener = first;\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n return listeners;\n },\n subscribe(callback) {\n let isSubscribed = true;\n const listener = last = {\n callback,\n next: null,\n prev: last\n };\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n };\n}\nvar nullListeners = {\n notify() {\n },\n get: () => []\n};\nfunction createSubscription(store, parentSub) {\n let unsubscribe;\n let listeners = nullListeners;\n let subscriptionsAmount = 0;\n let selfSubscribed = false;\n function addNestedSub(listener) {\n trySubscribe();\n const cleanupListener = listeners.subscribe(listener);\n let removed = false;\n return () => {\n if (!removed) {\n removed = true;\n cleanupListener();\n tryUnsubscribe();\n }\n };\n }\n function notifyNestedSubs() {\n listeners.notify();\n }\n function handleChangeWrapper() {\n if (subscription.onStateChange) {\n subscription.onStateChange();\n }\n }\n function isSubscribed() {\n return selfSubscribed;\n }\n function trySubscribe() {\n subscriptionsAmount++;\n if (!unsubscribe) {\n unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);\n listeners = createListenerCollection();\n }\n }\n function tryUnsubscribe() {\n subscriptionsAmount--;\n if (unsubscribe && subscriptionsAmount === 0) {\n unsubscribe();\n unsubscribe = void 0;\n listeners.clear();\n listeners = nullListeners;\n }\n }\n function trySubscribeSelf() {\n if (!selfSubscribed) {\n selfSubscribed = true;\n trySubscribe();\n }\n }\n function tryUnsubscribeSelf() {\n if (selfSubscribed) {\n selfSubscribed = false;\n tryUnsubscribe();\n }\n }\n const subscription = {\n addNestedSub,\n notifyNestedSubs,\n handleChangeWrapper,\n isSubscribed,\n trySubscribe: trySubscribeSelf,\n tryUnsubscribe: tryUnsubscribeSelf,\n getListeners: () => listeners\n };\n return subscription;\n}\n\n// src/utils/useIsomorphicLayoutEffect.ts\nvar canUseDOM = () => !!(typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\");\nvar isDOM = /* @__PURE__ */ canUseDOM();\nvar isRunningInReactNative = () => typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\";\nvar isReactNative = /* @__PURE__ */ isRunningInReactNative();\nvar getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;\nvar useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect();\n\n// src/utils/shallowEqual.ts\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n for (let i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n\n// src/utils/hoistStatics.ts\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {\n [ForwardRef]: FORWARD_REF_STATICS,\n [Memo]: MEMO_STATICS\n};\nfunction getStatics(component) {\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n return TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n}\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent) {\n if (typeof sourceComponent !== \"string\") {\n if (objectPrototype) {\n const inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent);\n }\n }\n let keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!KNOWN_STATICS[key] && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {\n }\n }\n }\n }\n return targetComponent;\n}\n\n// src/components/Context.ts\nvar ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`);\nvar gT = typeof globalThis !== \"undefined\" ? globalThis : (\n /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */\n {}\n);\nfunction getContext() {\n if (!React.createContext) return {};\n const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map();\n let realContext = contextMap.get(React.createContext);\n if (!realContext) {\n realContext = React.createContext(\n null\n );\n if (process.env.NODE_ENV !== \"production\") {\n realContext.displayName = \"ReactRedux\";\n }\n contextMap.set(React.createContext, realContext);\n }\n return realContext;\n}\nvar ReactReduxContext = /* @__PURE__ */ getContext();\n\n// src/components/connect.tsx\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\nvar stringifyComponent = (Comp) => {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies);\n}\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs) {\n lastWrapperProps.current = wrapperProps;\n renderIsScheduled.current = false;\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n}\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, additionalSubscribeListener) {\n if (!shouldHandleStateChanges) return () => {\n };\n let didUnsubscribe = false;\n let lastThrownError = null;\n const checkForUpdates = () => {\n if (didUnsubscribe || !isMounted.current) {\n return;\n }\n const latestStoreState = store.getState();\n let newChildProps, error;\n try {\n newChildProps = childPropsSelector(\n latestStoreState,\n lastWrapperProps.current\n );\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n if (!error) {\n lastThrownError = null;\n }\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true;\n additionalSubscribeListener();\n }\n };\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n const unsubscribeWrapper = () => {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n if (lastThrownError) {\n throw lastThrownError;\n }\n };\n return unsubscribeWrapper;\n}\nfunction strictEqual(a, b) {\n return a === b;\n}\nvar hasWarnedAboutDeprecatedPureOption = false;\nfunction connect(mapStateToProps, mapDispatchToProps, mergeProps, {\n // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n // @ts-ignore\n pure,\n areStatesEqual = strictEqual,\n areOwnPropsEqual = shallowEqual,\n areStatePropsEqual = shallowEqual,\n areMergedPropsEqual = shallowEqual,\n // use React's forwardRef to expose a ref of the wrapped component\n forwardRef = false,\n // the context consumer to use\n context = ReactReduxContext\n} = {}) {\n if (process.env.NODE_ENV !== \"production\") {\n if (pure !== void 0 && !hasWarnedAboutDeprecatedPureOption) {\n hasWarnedAboutDeprecatedPureOption = true;\n warning(\n 'The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component'\n );\n }\n }\n const Context = context;\n const initMapStateToProps = mapStateToPropsFactory(mapStateToProps);\n const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps);\n const initMergeProps = mergePropsFactory(mergeProps);\n const shouldHandleStateChanges = Boolean(mapStateToProps);\n const wrapWithConnect = (WrappedComponent) => {\n if (process.env.NODE_ENV !== \"production\") {\n const isValid = /* @__PURE__ */ isValidElementType(WrappedComponent);\n if (!isValid)\n throw new Error(\n `You must pass a component to the function returned by connect. Instead received ${stringifyComponent(\n WrappedComponent\n )}`\n );\n }\n const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \"Component\";\n const displayName = `Connect(${wrappedComponentName})`;\n const selectorFactoryOptions = {\n shouldHandleStateChanges,\n displayName,\n wrappedComponentName,\n WrappedComponent,\n // @ts-ignore\n initMapStateToProps,\n initMapDispatchToProps,\n initMergeProps,\n areStatesEqual,\n areStatePropsEqual,\n areOwnPropsEqual,\n areMergedPropsEqual\n };\n function ConnectFunction(props) {\n const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => {\n const { reactReduxForwardedRef: reactReduxForwardedRef2, ...wrapperProps2 } = props;\n return [props.context, reactReduxForwardedRef2, wrapperProps2];\n }, [props]);\n const ContextToUse = React.useMemo(() => {\n let ResultContext = Context;\n if (propsContext?.Consumer) {\n if (process.env.NODE_ENV !== \"production\") {\n const isValid = /* @__PURE__ */ isContextConsumer(\n // @ts-ignore\n /* @__PURE__ */ React.createElement(propsContext.Consumer, null)\n );\n if (!isValid) {\n throw new Error(\n \"You must pass a valid React context consumer as `props.context`\"\n );\n }\n ResultContext = propsContext;\n }\n }\n return ResultContext;\n }, [propsContext, Context]);\n const contextValue = React.useContext(ContextToUse);\n const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n if (process.env.NODE_ENV !== \"production\" && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(\n `Could not find \"store\" in the context of \"${displayName}\". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to ${displayName} in connect options.`\n );\n }\n const store = didStoreComeFromProps ? props.store : contextValue.store;\n const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;\n const childPropsSelector = React.useMemo(() => {\n return finalPropsSelectorFactory(store.dispatch, selectorFactoryOptions);\n }, [store]);\n const [subscription, notifyNestedSubs] = React.useMemo(() => {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY;\n const subscription2 = createSubscription(\n store,\n didStoreComeFromProps ? void 0 : contextValue.subscription\n );\n const notifyNestedSubs2 = subscription2.notifyNestedSubs.bind(subscription2);\n return [subscription2, notifyNestedSubs2];\n }, [store, didStoreComeFromProps, contextValue]);\n const overriddenContextValue = React.useMemo(() => {\n if (didStoreComeFromProps) {\n return contextValue;\n }\n return {\n ...contextValue,\n subscription\n };\n }, [didStoreComeFromProps, contextValue, subscription]);\n const lastChildProps = React.useRef(void 0);\n const lastWrapperProps = React.useRef(wrapperProps);\n const childPropsFromStoreUpdate = React.useRef(void 0);\n const renderIsScheduled = React.useRef(false);\n const isMounted = React.useRef(false);\n const latestSubscriptionCallbackError = React.useRef(\n void 0\n );\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n const actualChildPropsSelector = React.useMemo(() => {\n const selector = () => {\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n }\n return childPropsSelector(store.getState(), wrapperProps);\n };\n return selector;\n }, [store, wrapperProps]);\n const subscribeForReact = React.useMemo(() => {\n const subscribe = (reactListener) => {\n if (!subscription) {\n return () => {\n };\n }\n return subscribeUpdates(\n shouldHandleStateChanges,\n store,\n subscription,\n // @ts-ignore\n childPropsSelector,\n lastWrapperProps,\n lastChildProps,\n renderIsScheduled,\n isMounted,\n childPropsFromStoreUpdate,\n notifyNestedSubs,\n reactListener\n );\n };\n return subscribe;\n }, [subscription]);\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [\n lastWrapperProps,\n lastChildProps,\n renderIsScheduled,\n wrapperProps,\n childPropsFromStoreUpdate,\n notifyNestedSubs\n ]);\n let actualChildProps;\n try {\n actualChildProps = React.useSyncExternalStore(\n // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n subscribeForReact,\n // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n actualChildPropsSelector,\n getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector\n );\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n ;\n err.message += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`;\n }\n throw err;\n }\n useIsomorphicLayoutEffect(() => {\n latestSubscriptionCallbackError.current = void 0;\n childPropsFromStoreUpdate.current = void 0;\n lastChildProps.current = actualChildProps;\n });\n const renderedWrappedComponent = React.useMemo(() => {\n return (\n // @ts-ignore\n /* @__PURE__ */ React.createElement(\n WrappedComponent,\n {\n ...actualChildProps,\n ref: reactReduxForwardedRef\n }\n )\n );\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]);\n const renderedChild = React.useMemo(() => {\n if (shouldHandleStateChanges) {\n return /* @__PURE__ */ React.createElement(ContextToUse.Provider, { value: overriddenContextValue }, renderedWrappedComponent);\n }\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n }\n const _Connect = React.memo(ConnectFunction);\n const Connect = _Connect;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = ConnectFunction.displayName = displayName;\n if (forwardRef) {\n const _forwarded = React.forwardRef(\n function forwardConnectRef(props, ref) {\n return /* @__PURE__ */ React.createElement(Connect, { ...props, reactReduxForwardedRef: ref });\n }\n );\n const forwarded = _forwarded;\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return /* @__PURE__ */ hoistNonReactStatics(forwarded, WrappedComponent);\n }\n return /* @__PURE__ */ hoistNonReactStatics(Connect, WrappedComponent);\n };\n return wrapWithConnect;\n}\nvar connect_default = connect;\n\n// src/components/Provider.tsx\nfunction Provider(providerProps) {\n const { children, context, serverState, store } = providerProps;\n const contextValue = React.useMemo(() => {\n const subscription = createSubscription(store);\n const baseContextValue = {\n store,\n subscription,\n getServerState: serverState ? () => serverState : void 0\n };\n if (process.env.NODE_ENV === \"production\") {\n return baseContextValue;\n } else {\n const { identityFunctionCheck = \"once\", stabilityCheck = \"once\" } = providerProps;\n return /* @__PURE__ */ Object.assign(baseContextValue, {\n stabilityCheck,\n identityFunctionCheck\n });\n }\n }, [store, serverState]);\n const previousState = React.useMemo(() => store.getState(), [store]);\n useIsomorphicLayoutEffect(() => {\n const { subscription } = contextValue;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n return () => {\n subscription.tryUnsubscribe();\n subscription.onStateChange = void 0;\n };\n }, [contextValue, previousState]);\n const Context = context || ReactReduxContext;\n return /* @__PURE__ */ React.createElement(Context.Provider, { value: contextValue }, children);\n}\nvar Provider_default = Provider;\n\n// src/hooks/useReduxContext.ts\nfunction createReduxContextHook(context = ReactReduxContext) {\n return function useReduxContext2() {\n const contextValue = React.useContext(context);\n if (process.env.NODE_ENV !== \"production\" && !contextValue) {\n throw new Error(\n \"could not find react-redux context value; please ensure the component is wrapped in a \"\n );\n }\n return contextValue;\n };\n}\nvar useReduxContext = /* @__PURE__ */ createReduxContextHook();\n\n// src/hooks/useStore.ts\nfunction createStoreHook(context = ReactReduxContext) {\n const useReduxContext2 = context === ReactReduxContext ? useReduxContext : (\n // @ts-ignore\n createReduxContextHook(context)\n );\n const useStore2 = () => {\n const { store } = useReduxContext2();\n return store;\n };\n Object.assign(useStore2, {\n withTypes: () => useStore2\n });\n return useStore2;\n}\nvar useStore = /* @__PURE__ */ createStoreHook();\n\n// src/hooks/useDispatch.ts\nfunction createDispatchHook(context = ReactReduxContext) {\n const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context);\n const useDispatch2 = () => {\n const store = useStore2();\n return store.dispatch;\n };\n Object.assign(useDispatch2, {\n withTypes: () => useDispatch2\n });\n return useDispatch2;\n}\nvar useDispatch = /* @__PURE__ */ createDispatchHook();\n\n// src/hooks/useSelector.ts\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/with-selector.js\";\nvar refEquality = (a, b) => a === b;\nfunction createSelectorHook(context = ReactReduxContext) {\n const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context);\n const useSelector2 = (selector, equalityFnOrOptions = {}) => {\n const { equalityFn = refEquality } = typeof equalityFnOrOptions === \"function\" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions;\n if (process.env.NODE_ENV !== \"production\") {\n if (!selector) {\n throw new Error(`You must pass a selector to useSelector`);\n }\n if (typeof selector !== \"function\") {\n throw new Error(`You must pass a function as a selector to useSelector`);\n }\n if (typeof equalityFn !== \"function\") {\n throw new Error(\n `You must pass a function as an equality function to useSelector`\n );\n }\n }\n const reduxContext = useReduxContext2();\n const { store, subscription, getServerState } = reduxContext;\n const firstRun = React.useRef(true);\n const wrappedSelector = React.useCallback(\n {\n [selector.name](state) {\n const selected = selector(state);\n if (process.env.NODE_ENV !== \"production\") {\n const { devModeChecks = {} } = typeof equalityFnOrOptions === \"function\" ? {} : equalityFnOrOptions;\n const { identityFunctionCheck, stabilityCheck } = reduxContext;\n const {\n identityFunctionCheck: finalIdentityFunctionCheck,\n stabilityCheck: finalStabilityCheck\n } = {\n stabilityCheck,\n identityFunctionCheck,\n ...devModeChecks\n };\n if (finalStabilityCheck === \"always\" || finalStabilityCheck === \"once\" && firstRun.current) {\n const toCompare = selector(state);\n if (!equalityFn(selected, toCompare)) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"Selector \" + (selector.name || \"unknown\") + \" returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization\",\n {\n state,\n selected,\n selected2: toCompare,\n stack\n }\n );\n }\n }\n if (finalIdentityFunctionCheck === \"always\" || finalIdentityFunctionCheck === \"once\" && firstRun.current) {\n if (selected === state) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"Selector \" + (selector.name || \"unknown\") + \" returned the root state when called. This can lead to unnecessary rerenders.\\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.\",\n { stack }\n );\n }\n }\n if (firstRun.current) firstRun.current = false;\n }\n return selected;\n }\n }[selector.name],\n [selector]\n );\n const selectedState = useSyncExternalStoreWithSelector(\n subscription.addNestedSub,\n store.getState,\n getServerState || store.getState,\n wrappedSelector,\n equalityFn\n );\n React.useDebugValue(selectedState);\n return selectedState;\n };\n Object.assign(useSelector2, {\n withTypes: () => useSelector2\n });\n return useSelector2;\n}\nvar useSelector = /* @__PURE__ */ createSelectorHook();\n\n// src/exports.ts\nvar batch = defaultNoopBatch;\nexport {\n Provider_default as Provider,\n ReactReduxContext,\n batch,\n connect_default as connect,\n createDispatchHook,\n createSelectorHook,\n createStoreHook,\n shallowEqual,\n useDispatch,\n useSelector,\n useStore\n};\n//# sourceMappingURL=react-redux.mjs.map","// src/index.ts\nfunction createThunkMiddleware(extraArgument) {\n const middleware = ({ dispatch, getState }) => (next) => (action) => {\n if (typeof action === \"function\") {\n return action(dispatch, getState, extraArgument);\n }\n return next(action);\n };\n return middleware;\n}\nvar thunk = createThunkMiddleware();\nvar withExtraArgument = createThunkMiddleware;\nexport {\n thunk,\n withExtraArgument\n};\n","// src/utils/formatProdErrorMessage.ts\nfunction formatProdErrorMessage(code) {\n return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;\n}\n\n// src/utils/symbol-observable.ts\nvar $$observable = /* @__PURE__ */ (() => typeof Symbol === \"function\" && Symbol.observable || \"@@observable\")();\nvar symbol_observable_default = $$observable;\n\n// src/utils/actionTypes.ts\nvar randomString = () => Math.random().toString(36).substring(7).split(\"\").join(\".\");\nvar ActionTypes = {\n INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,\n REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,\n PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`\n};\nvar actionTypes_default = ActionTypes;\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" || obj === null)\n return false;\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;\n}\n\n// src/utils/kindOf.ts\nfunction miniKindOf(val) {\n if (val === void 0)\n return \"undefined\";\n if (val === null)\n return \"null\";\n const type = typeof val;\n switch (type) {\n case \"boolean\":\n case \"string\":\n case \"number\":\n case \"symbol\":\n case \"function\": {\n return type;\n }\n }\n if (Array.isArray(val))\n return \"array\";\n if (isDate(val))\n return \"date\";\n if (isError(val))\n return \"error\";\n const constructorName = ctorName(val);\n switch (constructorName) {\n case \"Symbol\":\n case \"Promise\":\n case \"WeakMap\":\n case \"WeakSet\":\n case \"Map\":\n case \"Set\":\n return constructorName;\n }\n return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\\s/g, \"\");\n}\nfunction ctorName(val) {\n return typeof val.constructor === \"function\" ? val.constructor.name : null;\n}\nfunction isError(val) {\n return val instanceof Error || typeof val.message === \"string\" && val.constructor && typeof val.constructor.stackTraceLimit === \"number\";\n}\nfunction isDate(val) {\n if (val instanceof Date)\n return true;\n return typeof val.toDateString === \"function\" && typeof val.getDate === \"function\" && typeof val.setDate === \"function\";\n}\nfunction kindOf(val) {\n let typeOfVal = typeof val;\n if (process.env.NODE_ENV !== \"production\") {\n typeOfVal = miniKindOf(val);\n }\n return typeOfVal;\n}\n\n// src/createStore.ts\nfunction createStore(reducer, preloadedState, enhancer) {\n if (typeof reducer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);\n }\n if (typeof preloadedState === \"function\" && typeof enhancer === \"function\" || typeof enhancer === \"function\" && typeof arguments[3] === \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : \"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\");\n }\n if (typeof preloadedState === \"function\" && typeof enhancer === \"undefined\") {\n enhancer = preloadedState;\n preloadedState = void 0;\n }\n if (typeof enhancer !== \"undefined\") {\n if (typeof enhancer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);\n }\n return enhancer(createStore)(reducer, preloadedState);\n }\n let currentReducer = reducer;\n let currentState = preloadedState;\n let currentListeners = /* @__PURE__ */ new Map();\n let nextListeners = currentListeners;\n let listenerIdCounter = 0;\n let isDispatching = false;\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = /* @__PURE__ */ new Map();\n currentListeners.forEach((listener, key) => {\n nextListeners.set(key, listener);\n });\n }\n }\n function getState() {\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : \"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");\n }\n return currentState;\n }\n function subscribe(listener) {\n if (typeof listener !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : \"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.\");\n }\n let isSubscribed = true;\n ensureCanMutateNextListeners();\n const listenerId = listenerIdCounter++;\n nextListeners.set(listenerId, listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : \"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.\");\n }\n isSubscribed = false;\n ensureCanMutateNextListeners();\n nextListeners.delete(listenerId);\n currentListeners = null;\n };\n }\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : `Actions must be plain objects. Instead, the actual type was: '${kindOf(action)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);\n }\n if (typeof action.type === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\n }\n if (typeof action.type !== \"string\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(17) : `Action \"type\" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(9) : \"Reducers may not dispatch actions.\");\n }\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n const listeners = currentListeners = nextListeners;\n listeners.forEach((listener) => {\n listener();\n });\n return action;\n }\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);\n }\n currentReducer = nextReducer;\n dispatch({\n type: actionTypes_default.REPLACE\n });\n }\n function observable() {\n const outerSubscribe = subscribe;\n return {\n /**\n * The minimal observable subscription method.\n * @param observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe(observer) {\n if (typeof observer !== \"object\" || observer === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);\n }\n function observeState() {\n const observerAsObserver = observer;\n if (observerAsObserver.next) {\n observerAsObserver.next(getState());\n }\n }\n observeState();\n const unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe\n };\n },\n [symbol_observable_default]() {\n return this;\n }\n };\n }\n dispatch({\n type: actionTypes_default.INIT\n });\n const store = {\n dispatch,\n subscribe,\n getState,\n replaceReducer,\n [symbol_observable_default]: observable\n };\n return store;\n}\nfunction legacy_createStore(reducer, preloadedState, enhancer) {\n return createStore(reducer, preloadedState, enhancer);\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(message);\n }\n try {\n throw new Error(message);\n } catch (e) {\n }\n}\n\n// src/combineReducers.ts\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n const reducerKeys = Object.keys(reducers);\n const argumentName = action && action.type === actionTypes_default.INIT ? \"preloadedState argument passed to createStore\" : \"previous state received by the reducer\";\n if (reducerKeys.length === 0) {\n return \"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";\n }\n if (!isPlainObject(inputState)) {\n return `The ${argumentName} has unexpected type of \"${kindOf(inputState)}\". Expected argument to be an object with the following keys: \"${reducerKeys.join('\", \"')}\"`;\n }\n const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);\n unexpectedKeys.forEach((key) => {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === actionTypes_default.REPLACE)\n return;\n if (unexpectedKeys.length > 0) {\n return `Unexpected ${unexpectedKeys.length > 1 ? \"keys\" : \"key\"} \"${unexpectedKeys.join('\", \"')}\" found in ${argumentName}. Expected to find one of the known reducer keys instead: \"${reducerKeys.join('\", \"')}\". Unexpected keys will be ignored.`;\n }\n}\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach((key) => {\n const reducer = reducers[key];\n const initialState = reducer(void 0, {\n type: actionTypes_default.INIT\n });\n if (typeof initialState === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : `The slice reducer for key \"${key}\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);\n }\n if (typeof reducer(void 0, {\n type: actionTypes_default.PROBE_UNKNOWN_ACTION()\n }) === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : `The slice reducer for key \"${key}\" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);\n }\n });\n}\nfunction combineReducers(reducers) {\n const reducerKeys = Object.keys(reducers);\n const finalReducers = {};\n for (let i = 0; i < reducerKeys.length; i++) {\n const key = reducerKeys[i];\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducers[key] === \"undefined\") {\n warning(`No reducer provided for key \"${key}\"`);\n }\n }\n if (typeof reducers[key] === \"function\") {\n finalReducers[key] = reducers[key];\n }\n }\n const finalReducerKeys = Object.keys(finalReducers);\n let unexpectedKeyCache;\n if (process.env.NODE_ENV !== \"production\") {\n unexpectedKeyCache = {};\n }\n let shapeAssertionError;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n return function combination(state = {}, action) {\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n if (process.env.NODE_ENV !== \"production\") {\n const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n let hasChanged = false;\n const nextState = {};\n for (let i = 0; i < finalReducerKeys.length; i++) {\n const key = finalReducerKeys[i];\n const reducer = finalReducers[key];\n const previousStateForKey = state[key];\n const nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === \"undefined\") {\n const actionType = action && action.type;\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : `When called with an action of type ${actionType ? `\"${String(actionType)}\"` : \"(unknown type)\"}, the slice reducer for key \"${key}\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);\n }\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\n// src/bindActionCreators.ts\nfunction bindActionCreator(actionCreator, dispatch) {\n return function(...args) {\n return dispatch(actionCreator.apply(this, args));\n };\n}\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === \"function\") {\n return bindActionCreator(actionCreators, dispatch);\n }\n if (typeof actionCreators !== \"object\" || actionCreators === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : `bindActionCreators expected an object or a function, but instead received: '${kindOf(actionCreators)}'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?`);\n }\n const boundActionCreators = {};\n for (const key in actionCreators) {\n const actionCreator = actionCreators[key];\n if (typeof actionCreator === \"function\") {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n// src/compose.ts\nfunction compose(...funcs) {\n if (funcs.length === 0) {\n return (arg) => arg;\n }\n if (funcs.length === 1) {\n return funcs[0];\n }\n return funcs.reduce((a, b) => (...args) => a(b(...args)));\n}\n\n// src/applyMiddleware.ts\nfunction applyMiddleware(...middlewares) {\n return (createStore2) => (reducer, preloadedState) => {\n const store = createStore2(reducer, preloadedState);\n let dispatch = () => {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : \"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\");\n };\n const middlewareAPI = {\n getState: store.getState,\n dispatch: (action, ...args) => dispatch(action, ...args)\n };\n const chain = middlewares.map((middleware) => middleware(middlewareAPI));\n dispatch = compose(...chain)(store.dispatch);\n return {\n ...store,\n dispatch\n };\n };\n}\n\n// src/utils/isAction.ts\nfunction isAction(action) {\n return isPlainObject(action) && \"type\" in action && typeof action.type === \"string\";\n}\nexport {\n actionTypes_default as __DO_NOT_USE__ActionTypes,\n applyMiddleware,\n bindActionCreators,\n combineReducers,\n compose,\n createStore,\n isAction,\n isPlainObject,\n legacy_createStore\n};\n//# sourceMappingURL=redux.mjs.map","import { useState, useCallback, useLayoutEffect, useEffect, useRef, useMemo } from 'react';\nimport debounce from 'lodash.debounce';\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue = false) {\n if (typeof defaultValue !== \"boolean\") {\n throw new Error(\"defaultValue must be `true` or `false`\");\n }\n const [value, setValue] = useState(defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n useEffect(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = useCallback(() => {\n setCount((x) => x + 1);\n }, []);\n const decrement = useCallback(() => {\n setCount((x) => x - 1);\n }, []);\n const reset = useCallback(() => {\n setCount(initialValue ?? 0);\n }, [initialValue]);\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown({\n countStart,\n countStop = 0,\n intervalMs = 1e3,\n isIncrement = false\n}) {\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = useCallback(() => {\n stopCountdown();\n resetCounter();\n }, [stopCountdown, resetCounter]);\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return [count, { startCountdown, stopCountdown, resetCountdown }];\n}\nfunction useEventCallback(fn) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER) {\n console.warn(\n `Tried removing localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.localStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, {\n defaultValue = false,\n initializeWithValue = true\n} = {}) {\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options = {}) {\n const {\n defaultValue,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true\n } = options;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useIntersectionObserver({\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = useState(null);\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n const result = [\n setRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\", eventListenerOptions = {}) {\n useEventListener(\n eventType,\n (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.filter((r) => Boolean(r.current)).every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n },\n void 0,\n eventListenerOptions\n );\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options.onResize;\n useEffect(() => {\n if (!ref.current)\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = options.debounceDelay ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER6) {\n console.warn(\n `Tried removing sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.sessionStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode({\n defaultValue = \"system\",\n localStorageKey = LOCAL_STORAGE_KEY2,\n initializeWithValue = true\n} = {}) {\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options.debounceDelay\n );\n function handleSize() {\n const setSize = options.debounceDelay ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\nexport { useBoolean, useClickAnyWhere, useCopyToClipboard, useCountdown, useCounter, useDarkMode, useDebounceCallback, useDebounceValue, useDocumentTitle, useEventCallback, useEventListener, useHover, useIntersectionObserver, useInterval, useIsClient, useIsMounted, useIsomorphicLayoutEffect, useLocalStorage, useMap, useMediaQuery, useOnClickOutside, useReadLocalStorage, useResizeObserver, useScreen, useScript, useScrollLock, useSessionStorage, useStep, useTernaryDarkMode, useTimeout, useToggle, useUnmount, useWindowSize };\n"],"names":["Object","defineProperty","exports","value","_react2","_interopRequireDefault","_propTypes2","_withStyles2","_styles2","obj","__esModule","default","ButtonGroup","_ref","children","classNames","createElement","className","root","propTypes","any","spacing","oneOfType","object","number","align","oneOf","styles","defaultProps","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","_merge","_merge2","_ref2","calculateSpacing","textAlign","multiplier","display","_omit2","Button","Tag","tag","type","props","keys","indexOf","_objectWithoutProperties","allowedProps","undefined","formTarget","isRequired","string","element","func","background","foreground","borderColor","borderWidth","font","size","radius","shadow","effect","block","bool","x","y","colors","effects","radiuses","rhythm","scale","shadows","treatments","width","cursor","textDecoration","overflow","transform","verticalAlign","backgroundColor","color","border","borderRadius","boxShadow","fontSize","margin","marginLeft","marginRight","_typeof","Symbol","iterator","constructor","_button2","_buttonGroup2","_icon2","Form","_ref$errors","errors","footer","icon","_ref$isLoading","isLoading","_ref$isDisabled","isDisabled","noValidate","_ref$submit","submit","_ref$actions","actions","onSubmit","renderIcon","name","action","method","fields","map","error","status","field","message","disabled","title","label","actionProps","array","isInactive","defaultStyles","paddingBottom","opacity","pointerEvents","padding","danger","fontWeight","light","small","marginTop","a","tertiary","transparent","primary","paddingLeft","paddingRight","transition","content","height","borderRightColor","textIndent","animation","GridColumn","xs","sm","md","lg","xsAlign","smAlign","mdAlign","lgAlign","_defineProperty","enumerable","configurable","writable","_extends2","mediaQuery","calculateSize","cols","flex","maxWidth","Grid","justify","direction","justifyContent","minWidth","flexWrap","alignItems","Heading","id","b","head","facebook","d","twitter","instagram","youtube","linkedin","google","vimeo","strava","mapmyfitness","fitbit","twitch","calendar","camera","chat","check","chevron","close","cog","dollar","dropdown","download","edit","euro","heart","home","info","like","loading","lock","mail","menu","minus","mobile","pin","play","plus","pound","search","share","star","upload","user","warning","yen","icons","newObj","_interopRequireWildcard","Icon","paths","viewBox","_ref$ariaHidden","ariaHidden","iconPaths","pathProps","rotate","spin","spinStyles","fill","_form","_inputValidations2","_label2","InputField","required","_ref$type","_onBlur","onBlur","_onChange","onChange","_ref$styles","validations","inputId","labelId","checked","isBoolean","e","renderStatus","placeholder","touched","invalid","readOnly","fonts","measures","checkbox","textarea","isInvalid","position","fontFamily","body","marginBottom","top","left","lightGrey","dark","minHeight","maxHeight","input","secondary","right","_mapKeys2","_groupBy2","InputSelect","groupOptions","_ref$options","options","wrapper","groupedOptions","resultOptions","opts","groupLabel","push","index","_ref3","_ref4","renderOptions","textShadow","zIndex","lineHeight","backgroundImage","appearance","outline","whiteSpace","textOverflow","bottom","InputValidations","_ref$validations","Label","htmlFor","medium","msg","val","trim","test","isNaN","values","min","_createClass","defineProperties","descriptor","Constructor","protoProps","staticProps","_react","_reactModal2","Modal","_Component","instance","TypeError","_classCallCheck","this","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","apply","subClass","superClass","create","setPrototypeOf","_inherits","appElement","setAppElement","_props","closeIcon","style","overlay","base","afterOpen","beforeClose","overlayClassName","onClick","onRequestClose","container","Component","closeTimeoutMS","contentLabel","isOpen","onAfterOpen","shouldCloseOnOverlayClick","RichText","dangerouslySetInnerHTML","__html","arrayOf","lineClamp","headingStyle","webkitBoxOrient","p","ul","listStyleType","listStylePosition","ol","li","blockquote","img","iframe","strong","em","fontStyle","h1","h2","h3","h4","h5","h6","Section","defaultTraits","TraitsProvider","traits","childContextTypes","defaults","_filter2","_isEmpty2","_mapValues2","config","ComponentToWrap","_class","_this","handleChange","bind","updateValues","resetForm","submitForm","initOptions","initFields","state","validateFields","supplied","_this2","initial","initialValue","_this3","validateField","validators","getValues","_this4","validator","filter","v","_this5","updatedFields","dirty","onFormChange","getForm","setState","_this6","newValues","_this7","touchFields","Promise","resolve","reject","checkIfValid","getValidations","form","_React$Component","toggle","toggled","toggleOn","toggleOff","onToggle","onToggleOn","onToggleOff","canUseDOM","window","document","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","addEventListener","attachEvent","canUseViewport","screen","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","g","freeSelf","Function","objectToString","toString","nativeMax","Math","max","nativeMin","now","Date","isObject","toNumber","isObjectLike","isSymbol","other","valueOf","replace","isBinary","slice","module","wait","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","leadingEdge","cancel","clearTimeout","flush","setter","iteratee","accumulator","baseEach","collection","copyObject","keysIn","Stack","arrayEach","assignValue","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isArray","isBuffer","isMap","isSet","argsTag","funcTag","objectTag","cloneableTags","baseClone","bitmask","customizer","stack","isDeep","isFlat","isFull","isArr","isFunc","stacked","get","set","forEach","subValue","add","start","end","Array","castPath","last","parent","toKey","path","cloneArrayBuffer","dataView","buffer","byteOffset","byteLength","reFlags","regexp","exec","lastIndex","symbolProto","symbolValueOf","symbol","getSymbols","getSymbolsIn","arrayAggregator","baseAggregator","baseIteratee","initializer","isPlainObject","flatten","overRest","setToString","baseGetAllKeys","arrayPush","getPrototype","stubArray","getOwnPropertySymbols","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","Ctor","baseGet","baseSlice","baseFlatten","baseAssignValue","createAggregator","groupBy","baseKeys","isArguments","isArrayLike","isPrototype","isTypedArray","splice","baseIsMap","baseUnary","nodeUtil","nodeIsMap","baseIsSet","nodeIsSet","baseForOwn","predicate","arrayMap","baseUnset","customOmitClone","flatRest","omit","CLONE_DEEP_FLAG","arrayFilter","baseFilter","negate","moment","defineLocale","months","split","monthsShort","weekdays","weekdaysShort","weekdaysMin","meridiemParse","isPM","meridiem","hours","minutes","isLower","longDateFormat","LT","LTS","L","LL","LLL","LLLL","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","s","ss","m","mm","h","hh","dd","M","MM","yy","dayOfMonthOrdinalParse","ordinal","week","dow","doy","factory","pluralForm","n","plurals","pluralize","u","withoutSuffix","isFuture","f","str","weekdaysParseExact","hour","minute","postformat","symbolMap","preparse","match","numberMap","reverse","join","suffixes","c","plural","word","num","forms","relativeTimeWithPlural","format","standalone","isFormat","day","period","w","ww","lastDigit","last2Digits","meridiemHour","monthsShortRegex","monthsParseExact","relativeTimeWithMutation","mutation","specialMutationForYears","lastNumber","text","softMutation","mutationTable","charAt","substring","monthsParse","monthsRegex","monthsStrictRegex","monthsShortStrictRegex","fullWeekdaysParse","shortWeekdaysParse","minWeekdaysParse","weekdaysParse","longMonthsParse","shortMonthsParse","token","processRelativeTime","translate","ll","lll","llll","output","l","isFunction","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","month","_monthsNominativeEl","toLowerCase","calendarEl","mom","_calendarEl","monthsShortDot","invalidDate","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eras","since","offset","narrow","abbr","until","eraYearOrdinalRegex","eraYearOrdinalParse","$0","$1","$2","isUpper","ezafeNumSuffix","includes","processFutureTime","eifelerRegelAppliesToNumber","substr","processPastTime","units","translateSeconds","translateSingular","special","relativeTimeWithSingular","relativeSeconds","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","separator","days","numbersNouns","translateFuture","translatePast","numberNoun","numberAsNoun","hundred","floor","ten","one","hm","weekdaysCaseReplace","nominative","accusative","genitive","concat","processHoursFunction","hookCallback","some","hooks","setHookCallback","callback","hasOwnProp","isObjectEmpty","getOwnPropertyNames","k","isUndefined","isNumber","isDate","arr","fn","res","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","getParsingFlags","_pf","isValid","flags","parsedParts","isNowValid","_d","getTime","invalidWeekday","_strict","bigHour","isFrozen","_isValid","createInvalid","NaN","fun","t","len","momentProperties","updateInProgress","copyConfig","to","from","prop","momentPropertiesLen","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","warn","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","arg","argLen","Error","deprecations","deprecateSimple","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","_calendar","zeroFill","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","_relativeTime","pastFuture","diff","aliases","D","dates","date","weekday","E","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","ms","milliseconds","millisecond","Q","quarters","quarter","seconds","second","gg","weekyears","weekyear","GG","isoweekyears","isoweekyear","weeks","W","isoweeks","isoweek","years","year","normalizeUnits","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","getPrioritizedUnits","unitsObj","unit","priority","sort","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","match1to2NoLeadingZero","match1to2HasZero","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","absFloor","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","_a","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","getSetYear","makeGetSet","getIsLeapYear","keepTime","set$1","isUTC","getUTCMilliseconds","getMilliseconds","getUTCSeconds","getSeconds","getUTCMinutes","getMinutes","getUTCHours","getHours","getUTCDate","getDate","getUTCDay","getDay","getUTCMonth","getMonth","getUTCFullYear","getFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setSeconds","setUTCMinutes","setMinutes","setUTCHours","setHours","setUTCDate","setDate","setUTCFullYear","setFullYear","stringGet","stringSet","prioritized","prioritizedLen","mod","daysInMonth","modMonth","o","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","setUTCMonth","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","createDate","createUTCDate","UTC","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","kInput","_isPm","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","globalLocale","baseConfig","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","j","next","loadLocale","isLocaleNameSane","oldLocale","_abbr","getSetGlobalLocale","data","getLocale","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","configFromRFC2822","parsedArray","configFromString","createFromInputFallback","currentDateArray","nowValue","_useUTC","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","temp","weekdayOverflow","curWeek","createLocal","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","prototypeMin","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","_milliseconds","_days","_data","_bubble","isDuration","absRound","round","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","utcOffset","sign","offsetFromString","chunkOffset","matcher","parts","matches","cloneWithOffset","model","clone","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","isAfter","isBefore","createAdder","tmp","isAdding","isString","String","isMomentInput","isNumberOrStringArray","isMomentInputObject","property","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","datetime","suffix","zone","inputString","defaultFormatUtc","defaultFormat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","_eras","localeErasParse","eraName","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetMillisecond","getSetSecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","isDSTShifted","proto$1","get$1","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","enUS","hasRequiredEnUS","unformatting","hasRequiredUnformatting","validating$1","hasRequiredValidating","commonjsGlobal","globalThis","getDefaultExportFromCjs","requireEnUS","languageTag","delimiters","thousands","decimal","abbreviations","thousand","million","billion","trillion","spaceSeparated","bytes","binarySuffixes","decimalSuffixes","currency","code","currencyFormat","thousandSeparated","totalLength","spaceSeparatedCurrency","fourDigits","fullWithTwoDecimals","mantissa","fullWithTwoDecimalsNoCurrency","fullWithNoDecimals","requireUnformatting","allSuffixes","factor","escapeRegExp","computeUnformattedValue","currencySymbol","zeroFormat","stripped","newInput","possibleOrdinalValue","ordinalString","inversedAbbreviations","abbreviationValues","numberOfAbbreviations","unformatValue","removeFormattingSymbols","unformat","globalState","requireGlobalState","currentDelimiters","currentCurrency","currentOrdinal","getZeroFormat","currentAbbreviations","segments","matchesTime","unformatTime","requireValidating","unformatter","bcp47RegExp","validFormat","validValues","restriction","mandatory","characteristic","postfix","forceAverage","average","lowPrecision","currencyPosition","restrictions","exponential","optionalMantissa","trimMantissa","optionalCharacteristic","spaceSeparatedAbbreviation","negative","prefixSymbol","validLanguage","thousandsSize","ordinalFormat","byteFormat","percentageFormat","timeDefaults","validateInput","validateSpec","toValidate","spec","skipMandatoryCheck","results","JSON","stringify","reduce","acc","current","validateFormat","validate","validInput","isFormatValid","validateLanguage","language","globalState$2","hasRequiredGlobalState","parsing$2","parseFormat","parseOutput","parsePostfix","parsePrefix","parseTotalLength","parseCharacteristic","parseOptionalCharacteristic","parseAverage","parseForceAverage","parseMantissa","parseOptionalMantissa","parseTrimMantissa","parseThousandSeparated","parseSpaceSeparated","parseNegative","parseForceSign","validating","parsing","currentLanguageTag","languages","globalDefaults","chooseLanguage","currentLanguageData","currentLanguage","currentBytes","currentDefaults","currentOrdinalDefaultFormat","currentByteDefaultFormat","currentPercentageDefaultFormat","currentCurrencyDefaultFormat","currentTimeDefaultFormat","setDefaults","setZeroFormat","hasZeroFormat","languageData","registerLanguage","useLanguage","setLanguage","fallbackTag","matchingLanguageTag","find","each","loadLanguagesInNode","tags","numbro","commonjsRequire","bignumber","globalObject","BigNumber","isNumeric","mathceil","mathfloor","bignumberError","tooManyDigits","BASE","LOG_BASE","MAX_SAFE_INTEGER","POWS_TEN","SQRT_BASE","MAX","bitFloor","coeffToString","z","r","charCodeAt","compare","xc","yc","intCheck","isOdd","toExponential","toFixedPoint","zs","configObject","div","convertBase","parseNumeric","pow2_53","random53bitInt","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","P","ONE","DECIMAL_PLACES","ROUNDING_MODE","TO_EXP_NEG","TO_EXP_POS","MIN_EXP","MAX_EXP","CRYPTO","MODULO_MODE","POW_PRECISION","FORMAT","groupSize","secondaryGroupSize","groupSeparator","decimalSeparator","fractionGroupSize","fractionGroupSeparator","ALPHABET","alphabetHasNormalDecimalDigits","alphabet","caseChanged","isNum","_isBigNumber","DEBUG","rm","c0","ne","maxOrMin","normalise","pop","sd","ni","rd","pows10","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","crypto","getRandomValues","randomBytes","EXPONENTIAL_AT","RANGE","isBigNumber","maximum","minimum","random","dp","rand","Uint32Array","copy","sum","toBaseOut","baseIn","baseOut","arrL","callerIsToString","multiply","xlo","xhi","carry","klo","khi","aL","bL","cmp","more","prod","prodL","q","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","absoluteValue","comparedTo","decimalPlaces","dividedBy","dividedToIntegerBy","idiv","exponentiatedBy","half","isModExp","nIsBig","nIsNeg","nIsOdd","isInteger","times","integerValue","isEqualTo","eq","isGreaterThan","gt","isGreaterThanOrEqualTo","gte","isLessThan","lt","isLessThanOrEqualTo","lte","isNegative","isPositive","isZero","xLTy","xe","ye","modulo","multipliedBy","xcL","ycL","ylo","yhi","zc","sqrtBase","negated","precision","shiftedBy","squareRoot","sqrt","rep","toFormat","g1","g2","intPart","fractionPart","isNeg","intDigits","toFraction","d0","d1","d2","exp","n0","n1","toPrecision","bignumberExports","globalState$1","parsing$1","BigNumber$1","powers","defaultOptions","general","marker","binary","providedFormat","clonedFormat","space","formatNumber","_value","formatCurrency","formatOrDefault","formatPercentage","localBinarySuffixes","localDecimalSuffixes","baseInfo","getFormatByteUnits","formatByte","formatTime","ordinalFn","formatOrdinal","formatNumbro","insertPrefix","insertPostfix","power","zeroes","toFixedLarge","characteristicPrecision","mantissaPrecision","abbreviation","characteristicLength","computeAverage","numberString","computeExponential","currentCharacteristic","currentMantissa","hasTrailingZeroes","setMantissaPrecision","hasNegativeSign","missingZeros","setCharacteristicPrecision","thousandSeparator","indexesToInsertThousandDelimiters","counter","unshift","indexesOfGroupSpaces","replaceDelimiters","insertAbbreviation","insertSign","otherValue","isNumbro","loader","formatter","getByteUnit","getBinaryByteUnit","getDecimalByteUnit","formatting","manipulate","divide","difference","manipulating","Numbro","binaryByteUnits","decimalByteUnits","byteUnits","normalizeInput","defaultCurrencyFormat","numbro$1","clsx","millisecondsInWeek","millisecondsInMinute","millisecondsInHour","constructFromSymbol","constructFrom","argument","context","parseISO","in","additionalDigits","dateStrings","dateString","patterns","dateTimeDelimiter","timeString","timeZoneDelimiter","timezone","splitDateString","parseYearResult","captures","restDateString","century","parseYear","dateRegex","isWeekDate","parseDateUnit","dayOfWeek","_year","validateWeekDate","fourthOfJanuaryDay","dayOfISOWeekYear","daysInMonths","isLeapYearIndex","validateDate","validateDayOfYearDate","parseDate","timestamp","timeRegex","parseTimeUnit","validateTime","parseTime","tmpDate","timezoneString","timezoneRegex","_hours","validateTimezone","parseTimezone","formatDistanceLocale","lessThanXSeconds","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","defaultWidth","formatLong","full","long","short","dateTime","formatRelativeLocale","yesterday","today","tomorrow","buildLocalizeFn","valuesArray","formattingValues","defaultFormattingWidth","argumentCallback","localize","ordinalNumber","dirtyNumber","_options","Number","rem100","abbreviated","wide","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","findIndex","pattern","findKey","valueCallback","rest","parsePattern","parseResult","formatDistance","count","tokenValue","addSuffix","comparison","formatRelative","_date","_baseDate","weekStartsOn","firstWeekContainsDate","dateLongFormatter","timeLongFormatter","longFormatters","datePattern","timePattern","dateTimeFormat","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","warnOrThrowProtectedError","_message","subject","RangeError","getDefaultOptions","transpose","date_","isConstructor","Setter","subPriority","_utcDate","ValueSetter","validateValue","setValue","super","DateTimezoneSetter","reference","timestampIsSet","Parser","run","parse","numericPatterns","timezonePatterns","mapValue","parseFnResult","mapFn","parseNumericPattern","parseTimezonePattern","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","normalizeTwoDigitYear","twoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","trunc","startOfWeek","getWeekYear","firstWeekOfNextYear","startOfNextYear","firstWeekOfThisYear","startOfThisYear","startOfISOWeek","startOfWeekYear","firstWeek","getWeek","setWeek","getISOWeekYear","fourthOfJanuaryOfNextYear","fourthOfJanuaryOfThisYear","startOfISOWeekYear","fourthOfJanuary","getISOWeek","setISOWeek","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","addDays","amount","setDay","currentDay","delta","getISODay","setISODay","getTimezoneOffsetInMilliseconds","utcDate","parsers","G","incompatibleTokens","isTwoDigitYear","normalizedTwoDigitYear","Y","R","_flags","firstWeekOfYear","I","subpriority","wholeWeekDays","B","H","K","S","X","T","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","notWhitespaceRegExp","unescapedLatinCharacterRegExp","dateStr","formatStr","referenceDate","subFnOptions","setters","firstCharacter","longFormatter","usedTokens","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","parser","incompatibleToken","usedToken","fullToken","uniquePrioritySetters","setterArray","dateToCompare","normalizeDates","normalize","startOfDay","differenceInCalendarDays","laterDate","earlierDate","laterDate_","earlierDate_","laterStartOfDay","earlierStartOfDay","laterTimestamp","earlierTimestamp","startOfYear","getDayOfYear","addLeadingZeros","padStart","lightFormatters","signedYear","dayPeriodEnumValue","numberOfDigits","dayPeriodEnum","formatters","signedWeekYear","localDayOfWeek","isoDayOfWeek","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","O","formatTimezoneShort","delimiter","absOffset","originalDate","isToken","preprocessor","formatterOptions","part","startOfMonth","startOfQuarter","currentMonth","endOfDay","endOfWeek","endOfMonth","isSameYear","isSameMonth","isSameQuarter","dateLeft_","dateRight_","isSameDay","isEqual","leftDate","rightDate","isWithinInterval","interval","startTime","endTime","monthIndex","lastDayOfMonth","midMonth","setQuarter","getYear","endOfYear","getQuarter","addMonths","dayOfMonth","endOfDesiredMonth","subMonths","differenceInCalendarMonths","addQuarters","subQuarters","differenceInCalendarQuarters","addYears","subYears","differenceInCalendarYears","addMilliseconds","addHours","addMinutes","addSeconds","addWeeks","setYear","differenceInDays","compareLocalAsc","subWeeks","subDays","hasWindow","node","isNode","nodeName","_node$ownerDocument","ownerDocument","defaultView","getDocumentElement","documentElement","Node","Element","HTMLElement","isShadowRoot","ShadowRoot","isOverflowElement","overflowX","overflowY","isTableElement","isTopLayer","selector","isContainingBlock","elementOrCss","webkit","css","containerType","backdropFilter","willChange","contain","CSS","supports","getComputedStyle","getNodeScroll","scrollLeft","scrollTop","scrollX","scrollY","assignedSlot","parentNode","host","getNearestOverflowAncestor","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","visualViewport","createCoords","oppositeSideMap","oppositeAlignmentMap","param","placement","getAxisLength","axis","getAlignmentAxis","alignment","getOppositePlacement","side","expandPaddingObject","rect","computeCoordsFromPlacement","rtl","floating","sideAxis","alignmentAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","async","_await$platform$isEle","platform","rects","elements","strategy","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","getClippingRect","isElement","contextElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","getCssDimensions","hasOffset","offsetWidth","offsetHeight","shouldFallback","$","unwrapElement","domElement","getBoundingClientRect","noOffsets","getVisualOffsets","offsetLeft","offsetTop","includeScale","isFixedStrategy","clientRect","visualOffsets","isFixed","floatingOffsetParent","shouldAddVisualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","clientTop","paddingTop","getWindowScrollBarX","leftScroll","getHTMLOffset","scroll","ignoreScrollbarX","htmlRect","getClientRectFromClippingAncestor","clippingAncestor","html","clientWidth","clientHeight","visualViewportBased","getViewportRect","scrollWidth","scrollHeight","getDocumentRect","getInnerBoundingClientRect","hasFixedPositionAncestor","stopNode","getRectRelativeToOffsetParent","isOffsetParentAnElement","offsets","offsetRect","htmlOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","svgOffsetParent","currentNode","getContainingBlock","topLayer","clippingAncestors","cache","cachedResult","el","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","getClippingElementAncestors","_c","firstClippingAncestor","clippingRect","accRect","getElementRects","getOffsetParentFn","getDimensionsFn","getDimensions","floatingDimensions","getClientRects","isRTL","rectsAreEqual","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","IntersectionObserver","animationFrame","referenceEl","ancestors","passive","cleanupIo","onMove","timeoutId","io","cleanup","_io","disconnect","refresh","skip","elementRectForRootMargin","rootMargin","isFirstUpdate","handleObserve","entries","ratio","intersectionRatio","observe","observeMove","frameId","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","requestAnimationFrame","_resizeObserver","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","removeEventListener","_middlewareData$offse","_middlewareData$arrow","middlewareData","diffCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","convertValueToCoords","arrow","alignmentOffset","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment","detectOverflowOptions","initialSideAxis","isBasePlacement","oppositePlacement","getExpandedPlacements","hasFallbackAxisSideDirection","isStart","lr","rl","tb","bt","getSideList","getOppositeAxisPlacements","placements","overflows","overflowsData","flip","sides","mainAlignmentSide","every","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","reset","resetPlacement","_overflowsData$filter2","currentSideAxis","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","shouldAddOffset","centerOffset","Map","mergedOptions","platformWithCache","middleware","validMiddleware","Boolean","statefulPlacement","resetCount","nextX","nextY","computePosition","useLayoutEffect","useEffect","deepEqual","$$typeof","getDPR","devicePixelRatio","roundByDPR","dpr","useLatestRef","ref","arrow$1","deps","SafeReact","useSafeInsertionEffect","useInsertionEffect","useEffectEvent","_len","_key","ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","horizontalKeys","verticalKeys","serverHandoffComplete","genId","useId","setId","FloatingArrow","tipRadius","strokeWidth","staticOffset","stroke","restStyle","clipPathId","setIsRTL","isVerticalSide","computedStaticOffset","computedStrokeWidth","halfStrokeWidth","svgX","svgY","isCustomShape","yOffsetProp","xOffsetProp","arrowX","arrowY","dValue","rotation","jsxs","jsx","clipPath","createPubSub","emit","event","_map$get","handler","on","listener","off","_map$get2","FloatingNodeContext","FloatingTreeContext","useFloatingParentNodeId","_React$useContext","useFloatingTree","nodeId","internalRootContext","open","onOpenChange","onOpenChangeProp","elementsProp","floatingId","dataRef","events","nested","positionReference","setPositionReference","reason","openEvent","refs","domReference","useFloatingRootContext","rootContext","computedElements","_domReference","setDomReference","_setPositionReference","domReferenceRef","tree","externalReference","externalFloating","whileElementsMounted","setData","isPositioned","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","referenceRef","setFloating","floatingRef","floatingEl","hasWhileElementsMounted","whileElementsMountedRef","platformRef","openRef","then","fullData","isMountedRef","floatingStyles","initialStyles","useFloating","computedPositionReference","floatingContext","nodesRef","_extendStatics","__extends","__","_assign","__spreadArray","pack","ar","SuppressedError","KeyType","CalendarContainer","_b","showTimeSelectOnly","showTime","ariaLabel","role","ClickOutsideWrapper","onClickOutside","containerRef","detectRef","ignoreClass","useRef","onClickOutsideRef","handleClickOutside","useCallback","composed","composedPath","eventTarget","contains","classList","useDetectClickOutside","getLocaleScope","newDate","strictParsing","refDate","localeObject","getLocaleObject","getDefaultLocale","formats_1","format_1","parsedDate","formatDate","minDate","localeObj","safeDateFormat","getStartOfDay","getStartOfWeek","calendarStartDay","getStartOfMonth","getStartOfYear","getStartOfQuarter","getStartOfToday","getEndOfDay","getEndOfMonth","date1","date2","isDayInRange","startDate","endDate","valid","err","__localeId__","localeSpec","scope","__localeData__","getMonthInLocale","getMonthShortInLocale","isDayDisabled","maxDate","excludeDates","excludeDateIntervals","includeDates","includeDateIntervals","filterDate","isOutOfBounds","excludeDate","includeDate","isDayExcluded","isMonthDisabled","isMonthInRange","startDateYear","startDateMonth","endDateYear","endDateMonth","dayYear","isMonthYearDisabled","excludedDate","includedDate","isQuarterDisabled","isYearInRange","startYear","endYear","isYearDisabled","isQuarterInRange","startDateQuarter","endDateQuarter","isTimeInList","listTime","isTimeDisabled","excludeTimes","includeTimes","filterTime","isTimeInDisabledRange","minTime","maxTime","baseTime","monthDisabledBefore","previousMonth","monthDisabledAfter","nextMonth","yearDisabledBefore","previousYear","yearDisabledAfter","nextYear","getEffectiveMinDate","getEffectiveMaxDate","getHighLightDaysMap","highlightDates","defaultClassName","dateClasses","classNamesArr","arrOfDates","len_1","dateK","getHolidaysMap","holidayDates","holiday","dateObj","holidayName","classNamesObj","holidayNames","holidayNameArr","timesToInjectAfter","currentTime","currentMultiplier","intervals","injectedTimes","injectedTime","injectedTimeValue","nextTime","addZero","getYearsPeriod","yearItemNumber","endPeriod","startPeriod","startOfMinute","getMidnightDate","dateWithoutTime","isDateBefore","isSpaceKeyDown","Space","InputTime","_super","inputRef","onTimeChange","propDate","renderTimeInput","customTimeInput","cloneElement","focus","getDerivedStateFromProps","render","timeInputLabel","Day","dayEl","createRef","handleClick","handleMouseEnter","onMouseEnter","handleOnKeyDown","preventDefault","Enter","isKeyboardSelected","disabledKeyboardNavigation","isSelectedDate","selectsMultiple","selectedDates","isSameDayOrWeek","selected","preSelection","isExcluded","isStartOfWeek","isSameWeek","showWeekPicker","getHighLightedClass","getHolidaysClass","holidays","has","isInRange","isInSelectingRange","selectsStart","selectsEnd","selectsRange","selectsDisabledDaysInRange","selectingDate","isSelectingRangeStart","isSelectingRangeEnd","isRangeStart","isRangeEnd","isWeekend","isAfterMonth","isBeforeMonth","isCurrentDay","isSelected","getClassNames","dayClassName","getAriaLabel","ariaLabelPrefixWhenEnabled","ariaLabelPrefixWhenDisabled","getTitle","compareDt","titles","getTabIndex","selectedDay","preSelectionDay","showWeekNumber","handleFocusDay","shouldFocusDay","preventScroll","renderDayContents","monthShowsDuplicateDaysEnd","monthShowsDuplicateDaysStart","onKeyDown","usePointerEvent","onPointerEnter","tabIndex","componentDidMount","componentDidUpdate","activeElement","inline","shouldFocusDayInline","isDayActiveElement","isDuplicateDay","WeekNumber","weekNumberEl","handleFocusWeekNumber","prevProps","shouldFocusWeekNumber","isInputFocused","ariaLabelPrefix","weekNumber","isWeekDisabled","weekNumberClasses","Week","handleDayClick","onDayClick","handleDayMouseEnter","onDayMouseEnter","handleWeekClick","enabledWeekDay","processingDay","onWeekSelect","shouldCloseOnSelect","setOpen","formatWeekNumber","processingDate","renderDays","onClickAction","chooseDayAriaLabelPrefix","disabledDayAriaLabelPrefix","MONTH_COLUMNS_LAYOUT","MONTH_COLUMNS","grid","verticalNavigationOffset","getMonthColumnsLayout","showFourColumnMonthYearPicker","showTwoColumnMonthYearPicker","Month","MONTH_REFS","QUARTER_REFS","orderInDisplay","handleMouseLeave","onMouseLeave","isRangeStartMonth","isRangeStartQuarter","isRangeEndMonth","isRangeEndQuarter","isInSelectingRangeMonth","isSelectingMonthRangeStart","_month","isSelectingMonthRangeEnd","isInSelectingRangeQuarter","isWeekInMonth","isCurrentMonth","isCurrentQuarter","isSelectedMonth","isSelectMonthInList","selectedDate","isSelectedQuarter","renderWeeks","isFixedHeight","fixedHeight","breakAfterNextPush","currentWeekStart","isPreSelected","weekAriaLabelPrefix","showWeekNumbers","isFixedAndFinalWeek","isNonFixedAndOutOfMonth","peekNextMonth","onMonthClick","isMonthDisabledForLabelDate","labelDate","onMonthMouseEnter","handleMonthNavigation","newMonth","setPreSelection","handleKeyboardNavigation","eventKey","monthColumnsLayout","verticalOffset","getVerticalOffset","monthsGrid","calculateNewDateAndMonth","newCalculatedDate","newCalculatedMonth","ArrowRight","ArrowLeft","ArrowUp","ArrowDown","eventKeyCopy","validDateFound","iterations","getNewDateAndMonth","onMonthKeyDown","handleOnMonthKeyDown","Tab","onQuarterClick","onQuarterMouseEnter","handleQuarterNavigation","newQuarter","onQuarterKeyDown","getMonthClassNames","monthClassName","_monthClassName","selection","getSelection","preSelectedMonth","isPreSelectedMonthDisabled","getQuarterTabIndex","preSelectedQuarter","isCurrentQuarterDisabled","getQuarterClassNames","getMonthContent","showFullMonthYearPicker","renderMonthContent","shortMonthText","fullMonthText","getQuarterContent","renderQuarterContent","shortQuarter","getQuarterShortInLocale","renderMonths","monthColumns","renderQuarters","showMonthYearPicker","showQuarterYearPicker","formattedAriaLabelPrefix","onPointerLeave","MonthDropdownOptions","monthNames","onCancel","MonthDropdown","dropdownVisible","renderSelectOptions","renderSelectMode","renderReadView","visible","visibility","toggleDropdown","renderDropdown","renderScrollMode","renderedDropdown","useShortMonthInDropdown","dropdownMode","generateMonthYears","currDate","lastDate","MonthYearDropdownOptions","monthYearsList","monthYear","monthYearPoint","isSameMonthYear","dropdownClass","scrollableMonthYearDropdown","MonthYearDropdown","timePoint","onSelectChange","yearMonth","changedDate","Time","scrollToTheSelectedTime","centerLi","calcCenterPosition","monthRef","header","isSelectedTime","isDisabledTime","liClasses","classes","timeClassName","injectTimes","previousSibling","nextSibling","renderTimes","activeDate","openToDate","sortedInjectTimes","minutesInDay","startOfTheNextDay","getHoursInDay","timesToInject","timeToFocus","prev","renderTimeCaption","showTimeCaption","timeCaption","todayButton","listHeight","centerLiRef","Year","YEAR_REFS","updateFocusOnPaginate","refIndex","handleYearClick","handleYearNavigation","newYear","_e","isCurrentYear","onYearClick","onYearKeyDown","leftOverOffset","getYearClassNames","yearClassName","getYearTabIndex","preSelected","isPreSelectedYearDisabled","getYearContent","renderYearContent","yearsList","onYearMouseEnter","onYearMouseLeave","_loop_1","this_1","clearSelectingDate","generateYears","noOfYear","YearDropdownOptions","selectedYear","minYear","maxYear","incrementYears","decrementYears","shiftYears","yearDropdownItemNumber","scrollableYearDropdown","dropdownRef","dropdownCurrent","dropdownCurrentChildren","selectedYearOptionEl","childEl","ariaSelected","YearDropdown","adjustDateOnChange","handleYearChange","onSelect","DROPDOWN_FOCUS_CLASSNAMES","Calendar","monthContainer","setClickOutsideRef","handleDropdownFocus","testClassname","onDropdownFocus","getDateInView","initialDate","increaseMonth","handleMonthChange","decreaseMonth","monthSelectedIn","handleMonthMouseLeave","onMonthMouseLeave","handleYearMouseEnter","handleYearMouseLeave","onYearChange","isRenderAriaLiveMessage","getEnabledPreSelectionDateForMonth","totalDays","preSelectedDate","dayIdx","enabledPreSelectionDate","handleCustomMonthChange","onMonthChange","handleMonthYearChange","changeYear","changeMonth","changeMonthYear","dayNames","weekLabel","weekDayName","formatWeekday","weekDayClassName","formatWeekDay","formatFunc","getFormattedWeekdayInLocale","useWeekdaysShort","getWeekdayShortInLocale","getWeekdayMinInLocale","decreaseYear","showYearPicker","renderPreviousButton","renderCustomHeader","allPrevDaysDisabled","monthsShown","monthsToSubtract","showPreviousMonths","fromMonthDate","minDateYear","yearsDisabledBefore","previousQuarter","quarterDisabledBefore","forceShowMonthNavigation","showDisabledMonthNavigation","clickHandler","isForYear","previousMonthButtonLabel","previousYearButtonLabel","_g","_h","previousMonthAriaLabel","_j","previousYearAriaLabel","increaseYear","renderNextButton","allNextDaysDisabled","maxDateYear","yearsDisabledAfter","nextQuarter","quarterDisabledAfter","showTimeSelect","nextMonthButtonLabel","nextYearButtonLabel","nextMonthAriaLabel","nextYearAriaLabel","renderCurrentMonth","showYearDropdown","showMonthDropdown","showMonthYearDropdown","renderYearDropdown","overrideHide","renderMonthDropdown","renderMonthYearDropdown","handleTodayButtonClick","renderTodayButton","renderDefaultHeader","monthDate","onFocus","headerArgs","prevMonthButtonDisabled","nextMonthButtonDisabled","prevYearButtonDisabled","nextYearButtonDisabled","showDayNames","customHeaderCount","renderYearHeader","renderHeader","monthList","monthsToAdd","monthKey","monthAriaLabelPrefix","handleOnDayKeyDown","renderYears","renderTimeSection","timeIntervals","renderInputTimeSection","showTimeInput","renderAriaLiveRegion","ariaLiveMessage","renderChildren","assignMonthContainer","hasMonthChanged_1","Container","outsideClickIgnoreClass","CalendarIcon","defaultClass","iconElement_1","xmlns","Portal","portalRoot","portalHost","getElementById","portalId","setAttribute","appendChild","componentWillUnmount","removeChild","focusableFilter","HTMLAnchorElement","TabLoop","getTabChildren","tabLoopRef","querySelectorAll","handleFocusStart","tabChildren","handleFocusEnd","enableTabLoop","PopperComponent","hidePopper","wrapperClassName","popperComponent","targetComponent","popperOnKeyDown","popperProps","showArrow","popper","arrowRef","popperContainer","wrapperClasses","PopperComponent$1","floatingProps","popperPlacement","popperModifiers","componentProps","INPUT_ERR_1","DatePicker","getPreSelection","modifyHolidays","calcInitialState","defaultPreSelection","boundedPreSelection","startOpen","preventFocus","inputValue","focused","wasHidden","resetHiddenStatus","setHiddenStatus","setHiddenStateOnVisibilityHidden","visibilityState","clearPreventFocusTimeout","preventFocusTimeout","safeFocus","safeBlur","blur","setFocus","setBlur","cancelFocusInput","skipSetBlur","lastPreSelectChange","PRESELECT_CHANGE_VIA_NAVIGATE","inputOk","isCalendarOpen","handleFocus","isAutoReFocus","isOpenAllowed","preventOpenOnFocus","sendFocusBackToInput","inputFocusTimeout","deferFocusInput","handleBlur","withPortal","handleCalendarClickOutside","allArgs","onChangeRaw","isDefaultPrevented","HTMLInputElement","PRESELECT_CHANGE_VIA_INPUT","valueStart","valueEnd","startDateNew","endDateNew","startChanged","endChanged","setSelected","handleSelect","showDateSelect","swapRange","keepInput","allowSameDay","focusSelectedMonth","hasStartRange","isRangeFilled","nextDates","hasMinDate","hasMaxDate","isValidDateSelection","dateStartOfDay","minDateStartOfDay","maxDateEndOfDay","toggleCalendar","handleTimeChange","onInputClick","onInputKeyDown","selectorString","selectedItem","querySelector","Escape","onInputError","onPortalKeyDown","onDayKeyDown","isShiftKeyActive","shiftKey","calculateNewDate","PageUp","PageDown","Home","End","getEndOfWeek","newSelection","getNewDate","prevMonth","prevYear","onPopperKeyDown","onClearClick","clear","onScroll","closeOnScroll","renderCalendar","elem","dateFormatCalendar","calendarClassName","calendarContainer","renderDateInput","customInput","customInputRef","formattedStartDate","formattedEndDate","safeDateRangeFormat","formattedFirstDate","formattedSecondDate","extraDatesCount","safeMultipleDatesFormat","autoFocus","placeholderText","autoComplete","ariaDescribedBy","ariaInvalid","ariaLabelledBy","ariaRequired","renderClearButton","isClearable","clearButtonTitle","clearButtonClassName","ariaLabelClose","showPopperArrow","excludeScrollbar","toggleCalendarOnIconClick","prevState","onCalendarOpen","onCalendarClose","renderInputContainer","showIcon","calendarIconClassname","calendarIconClassName","portalContainer","popperClassName","componentWillMount","componentWillReceiveProps","nextProps","componentWillUpdate","nextState","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","componentName","displayName","newApiName","maybeSnapshot","snapshot","__suppressDeprecationWarning","bodyOpenClassName","portalClassName","_reactDom2","_ModalPortal2","ariaAppHider","_safeHTMLElement","_safeHTMLElement2","_reactLifecyclesCompat","isReact16","createPortal","unstable_renderSubtreeIntoContainer","getParentElement","parentSelector","_temp","removePortal","unmountComponentAtNode","portalRef","portal","renderPortal","prevParent","nextParent","_","closesAt","closeWithTimeout","setElement","shape","htmlOpenClassName","instanceOf","ariaHideApp","shouldFocusAfterRender","shouldReturnFocusAfterClose","aria","shouldCloseOnEsc","overlayRef","contentRef","WebkitOverflowScrolling","focusManager","_scopeTab2","CLASS_NAMES","ariaHiddenInstances","ModalPortal","setOverlayRef","setContentRef","afterClose","_this$props","remove","getElementsByTagName","show","returnFocus","teardownScopedFocus","popWithoutFocus","beforeOpen","closeTimer","setupScopedFocus","markForFocusLater","closeWithoutTimeout","focusContent","contentHasFocus","handleKeyDown","keyCode","stopPropagation","requestClose","handleOverlayOnClick","shouldClose","ownerHandlesClose","handleContentOnMouseUp","handleOverlayOnMouseDown","handleContentOnClick","handleContentOnMouseDown","shouldBeClosed","buildClassName","which","additional","attributesFromObject","items","moveFromContentToOverlay","hide","_props2","contentStyles","overlayStyles","onMouseDown","onMouseUp","testId","assertNodeList","useElement","globalElement","validateElement","removeAttribute","documentNotReadyOrSSRTesting","resetForTesting","_warning","_warning2","nodeList","dumpClassLists","htmlClassList","docBodyClassList","classString","classListRef","poll","incrementReference","decrementReference","focusLaterElements","toFocus","modalElement","detachEvent","_tabbable","_tabbable2","needToFocus","_exenv","EE","SafeHTMLElement","tabbable","tail","checkSafari","navigator","userAgent","tabbableNode","hidesContents","zeroSize","innerHTML","getPropertyValue","focusable","isTabIndexNotNaN","href","parentElement","getAttribute","isTabIndexNaN","_Modal","_Modal2","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","__self","__source","_owner","super_","N","prefilter","lhs","rhs","kind","F","groupCollapsed","group","log","groupEnd","logger","actionTransformer","titleFormatter","collapsed","level","started","startedTime","took","A","C","stateTransformer","errorTransformer","logErrors","diffPredicate","getState","dispatch","performance","DeepDiff","observableDiff","applyDiff","applyChange","revertChange","isConflict","noConflict","transformer","createLogger","React","objectIs","is","useSyncExternalStore","useMemo","useDebugValue","useSyncExternalStoreWithSelector","subscribe","getSnapshot","getServerSnapshot","instRef","inst","hasValue","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","IS_REACT_19","startsWith","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","ForwardRef","Memo","typeOf","pureFinalPropsSelectorFactory","mapStateToProps","mapDispatchToProps","mergeProps","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","ownProps","stateProps","dispatchProps","mergedProps","hasRunAtLeastOnce","handleSubsequentCalls","nextOwnProps","propsChanged","stateChanged","dependsOnOwnProps","nextStateProps","statePropsChanged","handleNewState","wrapMapToPropsConstant","getConstant","constant","constantSelector","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","methodName","proxy","stateOrDispatch","createInvalidArgFactory","wrappedComponentName","defaultMergeProps","defaultNoopBatch","nullListeners","notify","createSubscription","store","parentSub","unsubscribe","listeners","subscriptionsAmount","selfSubscribed","handleChangeWrapper","subscription","onStateChange","trySubscribe","addNestedSub","first","isSubscribed","createListenerCollection","tryUnsubscribe","cleanupListener","removed","notifyNestedSubs","getListeners","isDOM","isReactNative","product","isRunningInReactNative","useIsomorphicLayoutEffect","getUseIsomorphicLayoutEffect","shallowEqual","objA","objB","keysA","keysB","REACT_STATICS","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","mixins","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","TYPE_STATICS","getStatics","component","getOwnPropertyDescriptor","objectPrototype","hoistNonReactStatics","sourceComponent","inheritedComponent","targetStatics","sourceStatics","ContextKey","gT","getContext","contextMap","realContext","ReactReduxContext","NO_SUBSCRIPTION_ARRAY","captureWrapperProps","lastWrapperProps","lastChildProps","renderIsScheduled","wrapperProps","childPropsFromStoreUpdate","strictEqual","connect_default","pure","areMergedPropsEqual","forwardRef","Context","initMapStateToProps","mapStateToPropsFactory","initMapDispatchToProps","actionCreators","boundActionCreators","actionCreator","mapDispatchToPropsFactory","initMergeProps","hasRunOnce","nextMergedProps","wrapMergePropsFunc","mergePropsFactory","shouldHandleStateChanges","WrappedComponent","selectorFactoryOptions","ConnectFunction","propsContext","reactReduxForwardedRef","reactReduxForwardedRef2","wrapperProps2","ContextToUse","contextValue","didStoreComeFromProps","didStoreComeFromContext","getServerState","childPropsSelector","finalPropsSelectorFactory","subscription2","notifyNestedSubs2","overriddenContextValue","isMounted","latestSubscriptionCallbackError","actualChildPropsSelector","subscribeForReact","reactListener","additionalSubscribeListener","didUnsubscribe","lastThrownError","checkForUpdates","latestStoreState","newChildProps","subscribeUpdates","effectFunc","effectArgs","dependencies","actualChildProps","renderedWrappedComponent","Provider","Connect","forwarded","Provider_default","providerProps","serverState","previousState","createReduxContextHook","useReduxContext","createStoreHook","useReduxContext2","useStore2","withTypes","useStore","createDispatchHook","useDispatch2","useDispatch","refEquality","createSelectorHook","useSelector2","equalityFnOrOptions","equalityFn","reduxContext","wrappedSelector","selectedState","useSelector","createThunkMiddleware","extraArgument","thunk","formatProdErrorMessage","symbol_observable_default","observable","randomString","actionTypes_default","INIT","REPLACE","PROBE_UNKNOWN_ACTION","createStore","reducer","preloadedState","enhancer","currentReducer","currentState","currentListeners","nextListeners","listenerIdCounter","isDispatching","ensureCanMutateNextListeners","listenerId","delete","replaceReducer","nextReducer","outerSubscribe","observer","observeState","observerAsObserver","combineReducers","reducers","reducerKeys","finalReducers","finalReducerKeys","shapeAssertionError","assertReducerShape","hasChanged","previousStateForKey","nextStateForKey","compose","funcs","applyMiddleware","middlewares","createStore2","middlewareAPI","chain","useEventListener","eventName","savedHandler","targetElement","IS_SERVER2","useMediaQuery","query","defaultValue","initializeWithValue","getMatches","query2","matchMedia","setMatches","useState","addListener","removeListener","useUnmount","funcRef","useDebounceCallback","delay","debouncedFunc","debouncedFuncInstance","wrappedFunc","isPending","useDebounceValue","unwrappedInitialValue","debouncedValue","setDebouncedValue","previousValueRef","updateDebouncedValue","useIsMounted","useOnClickOutside","eventType","eventListenerOptions","isConnected","useToggle"],"sourceRoot":""}