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KAAAmQ,GAEAT,GAKAI,CAAAA,EAAA9P,CAAA,CACA,CACA,oBAAAA,GACA4P,QAAAC,IAAA,8HAYAL,EANA,CAAAc,EAAA,GAAAC,KACA,IAAAC,EAAAxQ,EAAA0P,EAAAI,EAAAQ,KAAAC,SAEA,CADAL,EAAAM,KAAAP,GACAP,GACAY,EADAE,CAEA,KAGAd,GAAAF,EAAAxP,GACAkQ,EAAAlQ,KAAAiQ,GAEA,EAAK,CACLP,EACAI,EACAR,EACA,EACA,OACAQ,EACAC,EACA,AACA","sources":["webpack://_N_E/./node_modules/@heroui/react-utils/dist/chunk-OTWYT2HS.mjs","webpack://_N_E/./node_modules/@heroui/use-safe-layout-effect/dist/index.mjs","webpack://_N_E/./node_modules/@react-aria/focus/dist/isElementVisible.mjs","webpack://_N_E/./node_modules/@react-aria/focus/dist/FocusScope.mjs","webpack://_N_E/./node_modules/@react-aria/i18n/dist/utils.mjs","webpack://_N_E/./node_modules/@react-aria/i18n/dist/useDefaultLocale.mjs","webpack://_N_E/./node_modules/@react-aria/i18n/dist/context.mjs","webpack://_N_E/./node_modules/@react-aria/utils/dist/isScrollable.mjs","webpack://_N_E/./node_modules/@react-stately/utils/dist/useControlledState.mjs"],"sourcesContent":["\"use client\";\n\n// src/refs.ts\nimport { isFunction } from \"@heroui/shared-utils\";\nfunction assignRef(ref, value) {\n if (ref == null) return;\n if (isFunction(ref)) {\n ref(value);\n return;\n }\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);\n }\n}\nfunction mergeRefs(...refs) {\n return (node) => {\n refs.forEach((ref) => assignRef(ref, node));\n };\n}\n\nexport {\n assignRef,\n mergeRefs\n};\n","// src/index.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? useLayoutEffect : useEffect;\nexport {\n useSafeLayoutEffect\n};\n","import {getOwnerWindow as $djhjW$getOwnerWindow} from \"@react-aria/utils\";\n\n/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $645f2e67b85a24c9$var$isStyleVisible(element) {\n const windowObject = (0, $djhjW$getOwnerWindow)(element);\n if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;\n let { display: display, visibility: visibility } = element.style;\n let isVisible = display !== 'none' && visibility !== 'hidden' && visibility !== 'collapse';\n if (isVisible) {\n const { getComputedStyle: getComputedStyle } = element.ownerDocument.defaultView;\n let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);\n isVisible = computedDisplay !== 'none' && computedVisibility !== 'hidden' && computedVisibility !== 'collapse';\n }\n return isVisible;\n}\nfunction $645f2e67b85a24c9$var$isAttributeVisible(element, childElement) {\n return !element.hasAttribute('hidden') && // Ignore HiddenSelect when tree walking.\n !element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);\n}\nfunction $645f2e67b85a24c9$export$e989c0fffaa6b27a(element, childElement) {\n return element.nodeName !== '#comment' && $645f2e67b85a24c9$var$isStyleVisible(element) && $645f2e67b85a24c9$var$isAttributeVisible(element, childElement) && (!element.parentElement || $645f2e67b85a24c9$export$e989c0fffaa6b27a(element.parentElement, element));\n}\n\n\nexport {$645f2e67b85a24c9$export$e989c0fffaa6b27a as isElementVisible};\n//# sourceMappingURL=isElementVisible.module.js.map\n","import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {isElementVisible as $645f2e67b85a24c9$export$e989c0fffaa6b27a} from \"./isElementVisible.mjs\";\nimport {getInteractionModality as $cgawC$getInteractionModality} from \"@react-aria/interactions\";\nimport {useLayoutEffect as $cgawC$useLayoutEffect, getOwnerDocument as $cgawC$getOwnerDocument, isAndroid as $cgawC$isAndroid, isChrome as $cgawC$isChrome} from \"@react-aria/utils\";\nimport $cgawC$react, {useRef as $cgawC$useRef, useContext as $cgawC$useContext, useMemo as $cgawC$useMemo, useEffect as $cgawC$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\nconst $9bf71ea28793e738$var$FocusContext = /*#__PURE__*/ (0, $cgawC$react).createContext(null);\nconst $9bf71ea28793e738$var$RESTORE_FOCUS_EVENT = 'react-aria-focus-scope-restore';\nlet $9bf71ea28793e738$var$activeScope = null;\nfunction $9bf71ea28793e738$export$20e40289641fbbb6(props) {\n let { children: children, contain: contain, restoreFocus: restoreFocus, autoFocus: autoFocus } = props;\n let startRef = (0, $cgawC$useRef)(null);\n let endRef = (0, $cgawC$useRef)(null);\n let scopeRef = (0, $cgawC$useRef)([]);\n let { parentNode: parentNode } = (0, $cgawC$useContext)($9bf71ea28793e738$var$FocusContext) || {};\n // Create a tree node here so we can add children to it even before it is added to the tree.\n let node = (0, $cgawC$useMemo)(()=>new $9bf71ea28793e738$var$TreeNode({\n scopeRef: scopeRef\n }), [\n scopeRef\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n // If a new scope mounts outside the active scope, (e.g. DialogContainer launched from a menu),\n // use the active scope as the parent instead of the parent from context. Layout effects run bottom\n // up, so if the parent is not yet added to the tree, don't do this. Only the outer-most FocusScope\n // that is being added should get the activeScope as its parent.\n let parent = parentNode || $9bf71ea28793e738$export$d06fae2ee68b101e.root;\n if ($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, parent.scopeRef)) {\n let activeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n if (activeNode) parent = activeNode;\n }\n // Add the node to the parent, and to the tree.\n parent.addChild(node);\n $9bf71ea28793e738$export$d06fae2ee68b101e.addNode(node);\n }, [\n node,\n parentNode\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n let node = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (node) node.contain = !!contain;\n }, [\n contain\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n var _startRef_current;\n // Find all rendered nodes between the sentinels and add them to the scope.\n let node = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling;\n let nodes = [];\n let stopPropagation = (e)=>e.stopPropagation();\n while(node && node !== endRef.current){\n nodes.push(node);\n // Stop custom restore focus event from propagating to parent focus scopes.\n node.addEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);\n node = node.nextSibling;\n }\n scopeRef.current = nodes;\n return ()=>{\n for (let node of nodes)node.removeEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);\n };\n }, [\n children\n ]);\n $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restoreFocus, contain);\n $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain);\n $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain);\n $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus);\n // This needs to be an effect so that activeScope is updated after the FocusScope tree is complete.\n // It cannot be a useLayoutEffect because the parent of this node hasn't been attached in the tree yet.\n (0, $cgawC$useEffect)(()=>{\n const activeElement = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined).activeElement;\n let scope = null;\n if ($9bf71ea28793e738$var$isElementInScope(activeElement, scopeRef.current)) {\n // We need to traverse the focusScope tree and find the bottom most scope that\n // contains the active element and set that as the activeScope.\n for (let node of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())if (node.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node.scopeRef.current)) scope = node;\n if (scope === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) $9bf71ea28793e738$var$activeScope = scope.scopeRef;\n }\n }, [\n scopeRef\n ]);\n // This layout effect cleanup is so that the tree node is removed synchronously with react before the RAF\n // in useRestoreFocus cleanup runs.\n (0, $cgawC$useLayoutEffect)(()=>{\n return ()=>{\n var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;\n var _focusScopeTree_getTreeNode_parent_scopeRef;\n // Scope may have been re-parented.\n let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;\n if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;\n $9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);\n };\n }, [\n scopeRef\n ]);\n let focusManager = (0, $cgawC$useMemo)(()=>$9bf71ea28793e738$var$createFocusManagerForScope(scopeRef), []);\n let value = (0, $cgawC$useMemo)(()=>({\n focusManager: focusManager,\n parentNode: node\n }), [\n node,\n focusManager\n ]);\n return /*#__PURE__*/ (0, $cgawC$react).createElement($9bf71ea28793e738$var$FocusContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $cgawC$react).createElement(\"span\", {\n \"data-focus-scope-start\": true,\n hidden: true,\n ref: startRef\n }), children, /*#__PURE__*/ (0, $cgawC$react).createElement(\"span\", {\n \"data-focus-scope-end\": true,\n hidden: true,\n ref: endRef\n }));\n}\nfunction $9bf71ea28793e738$export$10c5169755ce7bd7() {\n var _useContext;\n return (_useContext = (0, $cgawC$useContext)($9bf71ea28793e738$var$FocusContext)) === null || _useContext === void 0 ? void 0 : _useContext.focusManager;\n}\nfunction $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {\n return {\n focusNext (opts = {}) {\n let scope = scopeRef.current;\n let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(scope[0]).activeElement;\n let sentinel = scope[0].previousElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;\n let nextNode = walker.nextNode();\n if (!nextNode && wrap) {\n walker.currentNode = sentinel;\n nextNode = walker.nextNode();\n }\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusPrevious (opts = {}) {\n let scope = scopeRef.current;\n let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(scope[0]).activeElement;\n let sentinel = scope[scope.length - 1].nextElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;\n let previousNode = walker.previousNode();\n if (!previousNode && wrap) {\n walker.currentNode = sentinel;\n previousNode = walker.previousNode();\n }\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode;\n },\n focusFirst (opts = {}) {\n let scope = scopeRef.current;\n let { tabbable: tabbable, accept: accept } = opts;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = scope[0].previousElementSibling;\n let nextNode = walker.nextNode();\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusLast (opts = {}) {\n let scope = scopeRef.current;\n let { tabbable: tabbable, accept: accept } = opts;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = scope[scope.length - 1].nextElementSibling;\n let previousNode = walker.previousNode();\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode;\n }\n };\n}\nconst $9bf71ea28793e738$var$focusableElements = [\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable^=\"false\"])'\n];\nconst $9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR = $9bf71ea28793e738$var$focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';\n$9bf71ea28793e738$var$focusableElements.push('[tabindex]:not([tabindex=\"-1\"]):not([disabled])');\nconst $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR = $9bf71ea28793e738$var$focusableElements.join(':not([hidden]):not([tabindex=\"-1\"]),');\nfunction $9bf71ea28793e738$export$4c063cf1350e6fed(element) {\n return element.matches($9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR);\n}\nfunction $9bf71ea28793e738$var$getScopeRoot(scope) {\n return scope[0].parentElement;\n}\nfunction $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {\n let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n while(scope && scope.scopeRef !== scopeRef){\n if (scope.contain) return false;\n scope = scope.parent;\n }\n return true;\n}\nfunction $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {\n let focusedNode = (0, $cgawC$useRef)(undefined);\n let raf = (0, $cgawC$useRef)(undefined);\n (0, $cgawC$useLayoutEffect)(()=>{\n let scope = scopeRef.current;\n if (!contain) {\n // if contain was changed, then we should cancel any ongoing waits to pull focus back into containment\n if (raf.current) {\n cancelAnimationFrame(raf.current);\n raf.current = undefined;\n }\n return;\n }\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n // Handle the Tab key to contain focus within the scope\n let onKeyDown = (e)=>{\n if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;\n let focusedElement = ownerDocument.activeElement;\n let scope = scopeRef.current;\n if (!scope || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope)) return;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: true\n }, scope);\n if (!focusedElement) return;\n walker.currentNode = focusedElement;\n let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n if (!nextElement) {\n walker.currentNode = e.shiftKey ? scope[scope.length - 1].nextElementSibling : scope[0].previousElementSibling;\n nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n }\n e.preventDefault();\n if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);\n };\n let onFocus = (e)=>{\n // If focusing an element in a child scope of the currently active scope, the child becomes active.\n // Moving out of the active scope to an ancestor is not allowed.\n if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(e.target, scopeRef.current)) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n focusedNode.current = e.target;\n } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(e.target, scopeRef)) {\n // If a focus event occurs outside the active scope (e.g. user tabs from browser location bar),\n // restore focus to the previously focused node or the first tabbable element in the active scope.\n if (focusedNode.current) focusedNode.current.focus();\n else if ($9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);\n } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef)) focusedNode.current = e.target;\n };\n let onBlur = (e)=>{\n // Firefox doesn't shift focus back to the Dialog properly without this\n if (raf.current) cancelAnimationFrame(raf.current);\n raf.current = requestAnimationFrame(()=>{\n // Patches infinite focus coersion loop for Android Talkback where the user isn't able to move the virtual cursor\n // if within a containing focus scope. Bug filed against Chrome: https://issuetracker.google.com/issues/384844019.\n // Note that this means focus can leave focus containing modals due to this, but it is isolated to Chrome Talkback.\n let modality = (0, $cgawC$getInteractionModality)();\n let shouldSkipFocusRestore = (modality === 'virtual' || modality === null) && (0, $cgawC$isAndroid)() && (0, $cgawC$isChrome)();\n // Use document.activeElement instead of e.relatedTarget so we can tell if user clicked into iframe\n if (!shouldSkipFocusRestore && ownerDocument.activeElement && $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef)) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n if (ownerDocument.body.contains(e.target)) {\n var _focusedNode_current;\n focusedNode.current = e.target;\n (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 ? void 0 : _focusedNode_current.focus();\n } else if ($9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);\n }\n });\n };\n ownerDocument.addEventListener('keydown', onKeyDown, false);\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusout', onBlur, false));\n return ()=>{\n ownerDocument.removeEventListener('keydown', onKeyDown, false);\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusout', onBlur, false));\n };\n }, [\n scopeRef,\n contain\n ]);\n // This is a useLayoutEffect so it is guaranteed to run before our async synthetic blur\n (0, $cgawC$useLayoutEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, [\n raf\n ]);\n}\nfunction $9bf71ea28793e738$var$isElementInAnyScope(element) {\n return $9bf71ea28793e738$var$isElementInChildScope(element);\n}\nfunction $9bf71ea28793e738$var$isElementInScope(element, scope) {\n if (!element) return false;\n if (!scope) return false;\n return scope.some((node)=>node.contains(element));\n}\nfunction $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {\n // If the element is within a top layer element (e.g. toasts), always allow moving focus there.\n if (element instanceof Element && element.closest('[data-react-aria-top-layer]')) return true;\n // node.contains in isElementInScope covers child scopes that are also DOM children,\n // but does not cover child scopes in portals.\n for (let { scopeRef: s } of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope))){\n if (s && $9bf71ea28793e738$var$isElementInScope(element, s.current)) return true;\n }\n return false;\n}\nfunction $9bf71ea28793e738$export$1258395f99bf9cbf(element) {\n return $9bf71ea28793e738$var$isElementInChildScope(element, $9bf71ea28793e738$var$activeScope);\n}\nfunction $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {\n var _focusScopeTree_getTreeNode;\n let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;\n while(parent){\n if (parent.scopeRef === ancestor) return true;\n parent = parent.parent;\n }\n return false;\n}\nfunction $9bf71ea28793e738$var$focusElement(element, scroll = false) {\n if (element != null && !scroll) try {\n (0, $6a99195332edec8b$export$80f3e147d781571c)(element);\n } catch {\n // ignore\n }\n else if (element != null) try {\n element.focus();\n } catch {\n // ignore\n }\n}\nfunction $9bf71ea28793e738$var$getFirstInScope(scope, tabbable = true) {\n let sentinel = scope[0].previousElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable\n }, scope);\n walker.currentNode = sentinel;\n let nextNode = walker.nextNode();\n // If the scope does not contain a tabbable element, use the first focusable element.\n if (tabbable && !nextNode) {\n scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: false\n }, scope);\n walker.currentNode = sentinel;\n nextNode = walker.nextNode();\n }\n return nextNode;\n}\nfunction $9bf71ea28793e738$var$focusFirstInScope(scope, tabbable = true) {\n $9bf71ea28793e738$var$focusElement($9bf71ea28793e738$var$getFirstInScope(scope, tabbable));\n}\nfunction $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {\n const autoFocusRef = (0, $cgawC$react).useRef(autoFocus);\n (0, $cgawC$useEffect)(()=>{\n if (autoFocusRef.current) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!$9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, $9bf71ea28793e738$var$activeScope.current) && scopeRef.current) $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);\n }\n autoFocusRef.current = false;\n }, [\n scopeRef\n ]);\n}\nfunction $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain) {\n // tracks the active scope, in case restore and contain are both false.\n // if either are true, this is tracked in useRestoreFocus or useFocusContainment.\n (0, $cgawC$useLayoutEffect)(()=>{\n if (restore || contain) return;\n let scope = scopeRef.current;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n let onFocus = (e)=>{\n let target = e.target;\n if ($9bf71ea28793e738$var$isElementInScope(target, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;\n else if (!$9bf71ea28793e738$var$isElementInAnyScope(target)) $9bf71ea28793e738$var$activeScope = null;\n };\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n return ()=>{\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n };\n }, [\n scopeRef,\n restore,\n contain\n ]);\n}\nfunction $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {\n let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n while(scope && scope.scopeRef !== scopeRef){\n if (scope.nodeToRestore) return false;\n scope = scope.parent;\n }\n return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;\n}\nfunction $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {\n // create a ref during render instead of useLayoutEffect so the active element is saved before a child with autoFocus=true mounts.\n // eslint-disable-next-line no-restricted-globals\n const nodeToRestoreRef = (0, $cgawC$useRef)(typeof document !== 'undefined' ? (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined).activeElement : null);\n // restoring scopes should all track if they are active regardless of contain, but contain already tracks it plus logic to contain the focus\n // restoring-non-containing scopes should only care if they become active so they can perform the restore\n (0, $cgawC$useLayoutEffect)(()=>{\n let scope = scopeRef.current;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n if (!restoreFocus || contain) return;\n let onFocus = ()=>{\n // If focusing an element in a child scope of the currently active scope, the child becomes active.\n // Moving out of the active scope to an ancestor is not allowed.\n if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;\n };\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n return ()=>{\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n scopeRef,\n contain\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!restoreFocus) return;\n // Handle the Tab key so that tabbing out of the scope goes to the next element\n // after the node that had focus when the scope mounted. This is important when\n // using portals for overlays, so that focus goes to the expected element when\n // tabbing out of the overlay.\n let onKeyDown = (e)=>{\n if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;\n let focusedElement = ownerDocument.activeElement;\n if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return;\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n let nodeToRestore = treeNode.nodeToRestore;\n // Create a DOM tree walker that matches all tabbable elements\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ownerDocument.body, {\n tabbable: true\n });\n // Find the next tabbable element after the currently focused element\n walker.currentNode = focusedElement;\n let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n if (!nodeToRestore || !ownerDocument.body.contains(nodeToRestore) || nodeToRestore === ownerDocument.body) {\n nodeToRestore = undefined;\n treeNode.nodeToRestore = undefined;\n }\n // If there is no next element, or it is outside the current scope, move focus to the\n // next element after the node to restore to instead.\n if ((!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {\n walker.currentNode = nodeToRestore;\n // Skip over elements within the scope, in case the scope immediately follows the node to restore.\n do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef));\n e.preventDefault();\n e.stopPropagation();\n if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);\n else // If there is no next element and the nodeToRestore isn't within a FocusScope (i.e. we are leaving the top level focus scope)\n // then move focus to the body.\n // Otherwise restore focus to the nodeToRestore (e.g menu within a popover -> tabbing to close the menu should move focus to menu trigger)\n if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();\n else $9bf71ea28793e738$var$focusElement(nodeToRestore, true);\n }\n };\n if (!contain) ownerDocument.addEventListener('keydown', onKeyDown, true);\n return ()=>{\n if (!contain) ownerDocument.removeEventListener('keydown', onKeyDown, true);\n };\n }, [\n scopeRef,\n restoreFocus,\n contain\n ]);\n // useLayoutEffect instead of useEffect so the active element is saved synchronously instead of asynchronously.\n (0, $cgawC$useLayoutEffect)(()=>{\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!restoreFocus) return;\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n var _nodeToRestoreRef_current;\n treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : undefined;\n return ()=>{\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n let nodeToRestore = treeNode.nodeToRestore;\n // if we already lost focus to the body and this was the active scope, then we should attempt to restore\n if (restoreFocus && nodeToRestore && (ownerDocument.activeElement && $9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {\n // freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it\n let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();\n requestAnimationFrame(()=>{\n // Only restore focus if we've lost focus to the body, the alternative is that focus has been purposefully moved elsewhere\n if (ownerDocument.activeElement === ownerDocument.body) {\n // look up the tree starting with our scope to find a nodeToRestore still in the DOM\n let treeNode = clonedTree.getTreeNode(scopeRef);\n while(treeNode){\n if (treeNode.nodeToRestore && treeNode.nodeToRestore.isConnected) {\n $9bf71ea28793e738$var$restoreFocusToElement(treeNode.nodeToRestore);\n return;\n }\n treeNode = treeNode.parent;\n }\n // If no nodeToRestore was found, focus the first element in the nearest\n // ancestor scope that is still in the tree.\n treeNode = clonedTree.getTreeNode(scopeRef);\n while(treeNode){\n if (treeNode.scopeRef && treeNode.scopeRef.current && $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(treeNode.scopeRef)) {\n let node = $9bf71ea28793e738$var$getFirstInScope(treeNode.scopeRef.current, true);\n $9bf71ea28793e738$var$restoreFocusToElement(node);\n return;\n }\n treeNode = treeNode.parent;\n }\n }\n });\n }\n };\n }, [\n scopeRef,\n restoreFocus\n ]);\n}\nfunction $9bf71ea28793e738$var$restoreFocusToElement(node) {\n // Dispatch a custom event that parent elements can intercept to customize focus restoration.\n // For example, virtualized collection components reuse DOM elements, so the original element\n // might still exist in the DOM but representing a different item.\n if (node.dispatchEvent(new CustomEvent($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, {\n bubbles: true,\n cancelable: true\n }))) $9bf71ea28793e738$var$focusElement(node);\n}\nfunction $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {\n let selector = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR : $9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR;\n let walker = (0, $cgawC$getOwnerDocument)(root).createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode (node) {\n var _opts_from;\n // Skip nodes inside the starting node.\n if (opts === null || opts === void 0 ? void 0 : (_opts_from = opts.from) === null || _opts_from === void 0 ? void 0 : _opts_from.contains(node)) return NodeFilter.FILTER_REJECT;\n if (node.matches(selector) && (0, $645f2e67b85a24c9$export$e989c0fffaa6b27a)(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;\n return NodeFilter.FILTER_SKIP;\n }\n });\n if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;\n return walker;\n}\nfunction $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {\n return {\n focusNext (opts = {}) {\n let root = ref.current;\n if (!root) return null;\n let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(root).activeElement;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n if (root.contains(node)) walker.currentNode = node;\n let nextNode = walker.nextNode();\n if (!nextNode && wrap) {\n walker.currentNode = root;\n nextNode = walker.nextNode();\n }\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusPrevious (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(root).activeElement;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n if (root.contains(node)) walker.currentNode = node;\n else {\n let next = $9bf71ea28793e738$var$last(walker);\n if (next) $9bf71ea28793e738$var$focusElement(next, true);\n return next !== null && next !== void 0 ? next : null;\n }\n let previousNode = walker.previousNode();\n if (!previousNode && wrap) {\n walker.currentNode = root;\n let lastNode = $9bf71ea28793e738$var$last(walker);\n if (!lastNode) // couldn't wrap\n return null;\n previousNode = lastNode;\n }\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode !== null && previousNode !== void 0 ? previousNode : null;\n },\n focusFirst (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n let nextNode = walker.nextNode();\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusLast (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n let next = $9bf71ea28793e738$var$last(walker);\n if (next) $9bf71ea28793e738$var$focusElement(next, true);\n return next !== null && next !== void 0 ? next : null;\n }\n };\n}\nfunction $9bf71ea28793e738$var$last(walker) {\n let next = undefined;\n let last;\n do {\n last = walker.lastChild();\n if (last) next = last;\n }while (last);\n return next;\n}\nclass $9bf71ea28793e738$var$Tree {\n get size() {\n return this.fastMap.size;\n }\n getTreeNode(data) {\n return this.fastMap.get(data);\n }\n addTreeNode(scopeRef, parent, nodeToRestore) {\n let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);\n if (!parentNode) return;\n let node = new $9bf71ea28793e738$var$TreeNode({\n scopeRef: scopeRef\n });\n parentNode.addChild(node);\n node.parent = parentNode;\n this.fastMap.set(scopeRef, node);\n if (nodeToRestore) node.nodeToRestore = nodeToRestore;\n }\n addNode(node) {\n this.fastMap.set(node.scopeRef, node);\n }\n removeTreeNode(scopeRef) {\n // never remove the root\n if (scopeRef === null) return;\n let node = this.fastMap.get(scopeRef);\n if (!node) return;\n let parentNode = node.parent;\n // when we remove a scope, check if any sibling scopes are trying to restore focus to something inside the scope we're removing\n // if we are, then replace the siblings restore with the restore from the scope we're removing\n for (let current of this.traverse())if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;\n let children = node.children;\n if (parentNode) {\n parentNode.removeChild(node);\n if (children.size > 0) children.forEach((child)=>parentNode && parentNode.addChild(child));\n }\n this.fastMap.delete(node.scopeRef);\n }\n // Pre Order Depth First\n *traverse(node = this.root) {\n if (node.scopeRef != null) yield node;\n if (node.children.size > 0) for (let child of node.children)yield* this.traverse(child);\n }\n clone() {\n var _node_parent;\n let newTree = new $9bf71ea28793e738$var$Tree();\n var _node_parent_scopeRef;\n for (let node of this.traverse())newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);\n return newTree;\n }\n constructor(){\n this.fastMap = new Map();\n this.root = new $9bf71ea28793e738$var$TreeNode({\n scopeRef: null\n });\n this.fastMap.set(null, this.root);\n }\n}\nclass $9bf71ea28793e738$var$TreeNode {\n addChild(node) {\n this.children.add(node);\n node.parent = this;\n }\n removeChild(node) {\n this.children.delete(node);\n node.parent = undefined;\n }\n constructor(props){\n this.children = new Set();\n this.contain = false;\n this.scopeRef = props.scopeRef;\n }\n}\nlet $9bf71ea28793e738$export$d06fae2ee68b101e = new $9bf71ea28793e738$var$Tree();\n\n\nexport {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$d06fae2ee68b101e as focusScopeTree, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$4c063cf1350e6fed as isFocusable, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager};\n//# sourceMappingURL=FocusScope.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // https://en.wikipedia.org/wiki/Right-to-left\nconst $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([\n 'Arab',\n 'Syrc',\n 'Samr',\n 'Mand',\n 'Thaa',\n 'Mend',\n 'Nkoo',\n 'Adlm',\n 'Rohg',\n 'Hebr'\n]);\nconst $148a7a147e38ea7f$var$RTL_LANGS = new Set([\n 'ae',\n 'ar',\n 'arc',\n 'bcc',\n 'bqi',\n 'ckb',\n 'dv',\n 'fa',\n 'glk',\n 'he',\n 'ku',\n 'mzn',\n 'nqo',\n 'pnb',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'yi'\n]);\nfunction $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) return textInfo.direction === 'rtl';\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);\n }\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);\n}\n\n\nexport {$148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};\n//# sourceMappingURL=utils.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useState as $ffhGL$useState, useEffect as $ffhGL$useEffect} from \"react\";\nimport {useIsSSR as $ffhGL$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n// Locale passed from server by PackageLocalizationProvider.\nconst $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');\nfunction $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {\n let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';\n try {\n Intl.DateTimeFormat.supportedLocalesOf([\n locale\n ]);\n } catch {\n locale = 'en-US';\n }\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n}\nlet $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\nlet $1e5a04cdaf7d1af8$var$listeners = new Set();\nfunction $1e5a04cdaf7d1af8$var$updateLocale() {\n $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\n for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);\n}\nfunction $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {\n let isSSR = (0, $ffhGL$useIsSSR)();\n let [defaultLocale, setDefaultLocale] = (0, $ffhGL$useState)($1e5a04cdaf7d1af8$var$currentLocale);\n (0, $ffhGL$useEffect)(()=>{\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);\n return ()=>{\n $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n };\n }, []);\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) return {\n locale: 'en-US',\n direction: 'ltr'\n };\n return defaultLocale;\n}\n\n\nexport {$1e5a04cdaf7d1af8$export$f09106e7c6677ec5 as getDefaultLocale, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a as useDefaultLocale};\n//# sourceMappingURL=useDefaultLocale.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useDefaultLocale as $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a} from \"./useDefaultLocale.mjs\";\nimport $h9FiU$react, {useContext as $h9FiU$useContext} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $h9FiU$react).createContext(null);\nfunction $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {\n let { locale: locale, children: children } = props;\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let value = (0, $h9FiU$react).useMemo(()=>{\n if (!locale) return defaultLocale;\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n }, [\n defaultLocale,\n locale\n ]);\n return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {\n value: value\n }, children);\n}\nfunction $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let context = (0, $h9FiU$useContext)($18f2051aff69b9bf$var$I18nContext);\n return context || defaultLocale;\n}\n\n\nexport {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale};\n//# sourceMappingURL=context.module.js.map\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {\n if (!node) return false;\n let style = window.getComputedStyle(node);\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n return isScrollable;\n}\n\n\nexport {$cc38e7bd3fc7b213$export$2bb74740c4e19def as isScrollable};\n//# sourceMappingURL=isScrollable.module.js.map\n","import {useState as $3whtM$useState, useRef as $3whtM$useRef, useEffect as $3whtM$useEffect, useCallback as $3whtM$useCallback} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {\n let [stateValue, setStateValue] = (0, $3whtM$useState)(value || defaultValue);\n let isControlledRef = (0, $3whtM$useRef)(value !== undefined);\n let isControlled = value !== undefined;\n (0, $3whtM$useEffect)(()=>{\n let wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);\n isControlledRef.current = isControlled;\n }, [\n isControlled\n ]);\n let currentValue = isControlled ? value : stateValue;\n let setValue = (0, $3whtM$useCallback)((value, ...args)=>{\n let onChangeCaller = (value, ...onChangeArgs)=>{\n if (onChange) {\n if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);\n }\n if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that\n // calling setState multiple times with the same value only emits onChange once.\n // We do not use a ref for this because we specifically _do_ want the value to\n // reset every render, and assigning to a ref in render breaks aborted suspended renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n currentValue = value;\n };\n if (typeof value === 'function') {\n console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');\n // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates\n // when someone using useControlledState calls setControlledState(myFunc)\n // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc\n // if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning\n // otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same\n let updateFunction = (oldValue, ...functionArgs)=>{\n let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);\n onChangeCaller(interceptedValue, ...args);\n if (!isControlled) return interceptedValue;\n return oldValue;\n };\n setStateValue(updateFunction);\n } else {\n if (!isControlled) setStateValue(value);\n onChangeCaller(value, ...args);\n }\n }, [\n isControlled,\n currentValue,\n onChange\n ]);\n return [\n currentValue,\n setValue\n ];\n}\n\n\nexport {$458b0a5536c1a7cf$export$40bfa8c7b0832715 as useControlledState};\n//# sourceMappingURL=useControlledState.module.js.map\n"],"names":["mergeRefs","_len","arguments","length","refs","_key","forEach","assignRef","ref","value","isFunction","current","error","concat","node","useSafeLayoutEffect","Boolean","globalThis","document","react__WEBPACK_IMPORTED_MODULE_0__","useLayoutEffect","useEffect","$9bf71ea28793e738$var$FocusContext","createContext","$9bf71ea28793e738$var$RESTORE_FOCUS_EVENT","$9bf71ea28793e738$var$activeScope","$9bf71ea28793e738$export$20e40289641fbbb6","props","focusedNode","raf","children","contain","restoreFocus","autoFocus","startRef","react","useRef","endRef","scopeRef","parentNode","useContext","useMemo","$9bf71ea28793e738$var$TreeNode","b","parent","$9bf71ea28793e738$export$d06fae2ee68b101e","root","getTreeNode","$9bf71ea28793e738$var$isAncestorScope","activeNode","addChild","addNode","_startRef_current","nextSibling","nodes","stopPropagation","e","push","addEventListener","removeEventListener","restore","scope","ownerDocument","domHelpers","r","undefined","onFocus","target","$9bf71ea28793e738$var$isElementInScope","$9bf71ea28793e738$var$isElementInChildScope","element","cancelAnimationFrame","onKeyDown","key","altKey","ctrlKey","metaKey","$9bf71ea28793e738$var$shouldContainFocus","isComposing","focusedElement","activeElement","walker","$9bf71ea28793e738$export$2d6ec8fc375ceafa","$9bf71ea28793e738$var$getScopeRoot","tabbable","currentNode","nextElement","shiftKey","previousNode","nextNode","nextElementSibling","previousElementSibling","preventDefault","$9bf71ea28793e738$var$focusElement","focus","$9bf71ea28793e738$var$focusFirstInScope","onBlur","requestAnimationFrame","modality","useFocusVisible","Jz","platform","Dt","i7","body","contains","_focusedNode_current","$9bf71ea28793e738$var$useRestoreFocus","nodeToRestoreRef","$9bf71ea28793e738$var$shouldRestoreFocus","treeNode","nodeToRestore","blur","_nodeToRestoreRef_current","clonedTree","clone","isConnected","$9bf71ea28793e738$var$restoreFocusToElement","$9bf71ea28793e738$var$getFirstInScope","$9bf71ea28793e738$var$useAutoFocus","autoFocusRef","traverse","_focusScopeTree_getTreeNode_parent","_focusScopeTree_getTreeNode","_focusScopeTree_getTreeNode_parent_scopeRef","parentScope","removeTreeNode","focusManager","focusNext","opts","from","wrap","accept","sentinel","focusPrevious","focusFirst","focusLast","createElement","Provider","hidden","$9bf71ea28793e738$var$focusableElements","$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR","join","$9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR","parentElement","some","Element","closest","s","$9bf71ea28793e738$export$1258395f99bf9cbf","ancestor","scroll","focusSafely","scopeRoot","dispatchEvent","CustomEvent","bubbles","cancelable","selector","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","_opts_from","FILTER_REJECT","matches","$645f2e67b85a24c9$export$e989c0fffaa6b27a","childElement","nodeName","$645f2e67b85a24c9$var$isStyleVisible","windowObject","k","HTMLElement","SVGElement","display","visibility","style","isVisible","getComputedStyle","defaultView","computedDisplay","computedVisibility","hasAttribute","FILTER_ACCEPT","FILTER_SKIP","$9bf71ea28793e738$var$Tree","size","fastMap","data","get","addTreeNode","set","removeChild","child","delete","_node_parent","_node_parent_scopeRef","newTree","constructor","Map","add","Set","$148a7a147e38ea7f$var$RTL_SCRIPTS","$148a7a147e38ea7f$var$RTL_LANGS","$148a7a147e38ea7f$export$702d680b21cbd764","localeString","Intl","Locale","locale","maximize","textInfo","getTextInfo","direction","script","has","lang","split","$1e5a04cdaf7d1af8$var$localeSymbol","Symbol","for","$1e5a04cdaf7d1af8$export$f09106e7c6677ec5","window","navigator","language","userLanguage","DateTimeFormat","supportedLocalesOf","$1e5a04cdaf7d1af8$var$currentLocale","$1e5a04cdaf7d1af8$var$listeners","$1e5a04cdaf7d1af8$var$updateLocale","listener","$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a","isSSR","SSRProvider","Av","defaultLocale","setDefaultLocale","useState","$18f2051aff69b9bf$var$I18nContext","$18f2051aff69b9bf$export$a54013f0d02a8f82","$18f2051aff69b9bf$export$43bb16f9c6d9e3f7","context","$cc38e7bd3fc7b213$export$2bb74740c4e19def","checkForOverflow","isScrollable","test","overflow","overflowX","overflowY","scrollHeight","clientHeight","scrollWidth","clientWidth","$458b0a5536c1a7cf$export$40bfa8c7b0832715","defaultValue","onChange","stateValue","setStateValue","isControlledRef","isControlled","wasControlled","console","warn","currentValue","setValue","useCallback","args","onChangeCaller","onChangeArgs","Object","is","oldValue","functionArgs","interceptedValue"],"sourceRoot":""}