react-lib-tools 0.0.24 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +6 -0
  2. package/dist/{GettingStartedRoute-DT-NgTRJ.js → GettingStartedRoute-DdNa0GEu.js} +2 -2
  3. package/dist/{GettingStartedRoute-DT-NgTRJ.js.map → GettingStartedRoute-DdNa0GEu.js.map} +1 -1
  4. package/dist/{GettingStartedRoute-CzpsPdpt.cjs → GettingStartedRoute-eHXI8kXM.cjs} +2 -2
  5. package/dist/{GettingStartedRoute-CzpsPdpt.cjs.map → GettingStartedRoute-eHXI8kXM.cjs.map} +1 -1
  6. package/dist/{PageNotFound-s_DTkau5.cjs → PageNotFound-Ds3IquRU.cjs} +2 -2
  7. package/dist/{PageNotFound-s_DTkau5.cjs.map → PageNotFound-Ds3IquRU.cjs.map} +1 -1
  8. package/dist/{PageNotFound-BlfHlRrb.js → PageNotFound-k-Qhjbpf.js} +2 -2
  9. package/dist/{PageNotFound-BlfHlRrb.js.map → PageNotFound-k-Qhjbpf.js.map} +1 -1
  10. package/dist/{SupportRoute-CcJBfOWu.js → SupportRoute-CodOYgT1.js} +2 -2
  11. package/dist/{SupportRoute-CcJBfOWu.js.map → SupportRoute-CodOYgT1.js.map} +1 -1
  12. package/dist/{SupportRoute-BcjMIACR.cjs → SupportRoute-gybxWRSQ.cjs} +2 -2
  13. package/dist/{SupportRoute-BcjMIACR.cjs.map → SupportRoute-gybxWRSQ.cjs.map} +1 -1
  14. package/dist/{VersionsRoute-C_HIVV6r.js → VersionsRoute-CWPitZ1W.js} +2 -2
  15. package/dist/{VersionsRoute-C_HIVV6r.js.map → VersionsRoute-CWPitZ1W.js.map} +1 -1
  16. package/dist/{VersionsRoute-CX3YF7an.cjs → VersionsRoute-D-MGMVvr.cjs} +2 -2
  17. package/dist/{VersionsRoute-CX3YF7an.cjs.map → VersionsRoute-D-MGMVvr.cjs.map} +1 -1
  18. package/dist/{index-Dt2kd-pc.js → index-BGq8Vw-C.js} +3445 -2851
  19. package/dist/index-BGq8Vw-C.js.map +1 -0
  20. package/dist/index-fDoQ6OQ9.cjs +8 -0
  21. package/dist/index-fDoQ6OQ9.cjs.map +1 -0
  22. package/dist/react-lib-tools.cjs +1 -1
  23. package/dist/react-lib-tools.d.ts +8 -1
  24. package/dist/react-lib-tools.js +5 -4
  25. package/package.json +1 -1
  26. package/styles.css +4 -0
  27. package/dist/index-BCwWYpnQ.cjs +0 -8
  28. package/dist/index-BCwWYpnQ.cjs.map +0 -1
  29. package/dist/index-Dt2kd-pc.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BCwWYpnQ.cjs","sources":["../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/ArrowPathIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/ArrowTopRightOnSquareIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/Bars4Icon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/CheckCircleIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/ChevronRightIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/ChevronUpDownIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/ExclamationTriangleIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/InformationCircleIcon.js","../node_modules/.pnpm/@heroicons+react@2.2.0_react@19.2.3/node_modules/@heroicons/react/20/solid/esm/XMarkIcon.js","../node_modules/.pnpm/react-router@7.10.1_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-router/dist/development/chunk-WWGJGFF6.mjs","../public/svgs/github.svg?react","../public/svgs/npm.svg?react","../public/svgs/tags.svg?react","../lib/contexts/LibraryContext.tsx","../node_modules/.pnpm/zustand@5.0.9_@types+react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.mjs","../node_modules/.pnpm/zustand@5.0.9_@types+react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.mjs","../lib/hooks/useNavStore.ts","../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs","../lib/utils/cn.ts","../lib/components/Box.tsx","../node_modules/.pnpm/react-error-boundary@6.0.0_react@19.2.3/node_modules/react-error-boundary/dist/react-error-boundary.js","../lib/components/Callout.tsx","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/useLayoutEffect.mjs","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/useEffectEvent.mjs","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/domHelpers.mjs","../node_modules/.pnpm/@react-stately+flags@3.1.2/node_modules/@react-stately/flags/dist/import.mjs","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/DOMFunctions.mjs","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/platform.mjs","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs","../node_modules/.pnpm/@react-aria+utils@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/utils/dist/isVirtualEvent.mjs","../node_modules/.pnpm/@react-aria+interactions@3.25.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/interactions/dist/utils.mjs","../node_modules/.pnpm/@react-aria+interactions@3.25.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/interactions/dist/useFocusVisible.mjs","../node_modules/.pnpm/@react-aria+interactions@3.25.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/interactions/dist/useFocus.mjs","../node_modules/.pnpm/@react-aria+interactions@3.25.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/interactions/dist/useFocusWithin.mjs","../node_modules/.pnpm/@react-aria+interactions@3.25.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/interactions/dist/useHover.mjs","../node_modules/.pnpm/@react-aria+focus@3.21.2_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/focus/dist/useFocusRing.mjs","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/env.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/owner.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/micro-task.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/disposables.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-disposables.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-latest-value.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-event.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-active-press.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-slot.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/disabled.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/class-names.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/match.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/render.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/button/button.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-controllable.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-default-value.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/form.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/hidden.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/form-fields.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/id.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/dom.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/bugs.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/description/description.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/keyboard.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/label/label.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/close-provider.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-by-comparator.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-element-size.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/mouse.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/default-map.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/machine.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/machines/stack-machine.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.3/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.3/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.3/node_modules/use-sync-external-store/with-selector.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/react-glue.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-inert-others.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/focus-management.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/platform.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-document-event.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-window-event.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-outside-click.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-owner.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-quick-release.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-store.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/store.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-flags.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-transition.js","../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs","../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/.pnpm/@floating-ui+core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/.pnpm/@floating-ui+dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react/dist/floating-ui.react.mjs","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/floating.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/frozen.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/open-closed.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/calculate-active-index.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/internal/portal-force-root.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/portal/portal.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/element-movement.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/transition/transition.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/start-transition.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/disclosure/disclosure.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/utils/get-text-value.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/hooks/use-text-value.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/listbox/listbox-machine.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/listbox/listbox-machine-glue.js","../node_modules/.pnpm/@headlessui+react@2.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@headlessui/react/dist/components/listbox/listbox.js","../lib/components/Button.tsx","../lib/components/ErrorBoundary.tsx","../lib/components/ExternalLink.tsx","../lib/components/Link.tsx","../lib/components/nav/Nav.tsx","../lib/components/app/components/RouteChangeHandler.tsx","../lib/components/app/routes.ts","../lib/components/app/AppRoot.tsx","../lib/components/Block.tsx","../public/svgs/checkbox-checked.svg?react","../public/svgs/checkbox-indeterminate.svg?react","../public/svgs/checkbox-unchecked.svg?react","../lib/components/Checkbox.tsx","../lib/components/code/Code.tsx","../lib/components/DocsSection.tsx","../lib/utils/assert.ts","../lib/hooks/useLibraryContext.ts","../lib/components/Header.tsx","../lib/components/handles/ImperativeHandleMethod.tsx","../lib/components/handles/ImperativeHandle.tsx","../lib/components/Input.tsx","../lib/components/LoadingSpinner.tsx","../lib/components/nav/NavButton.tsx","../lib/components/nav/NavLink.tsx","../lib/components/nav/NavSection.tsx","../lib/utils/processPropsJSON.ts","../lib/components/props/ComponentProp.tsx","../lib/components/props/ComponentPropsSection.tsx","../lib/components/props/ComponentProps.tsx","../public/svgs/radio-checked.svg?react","../public/svgs/radio-unchecked.svg?react","../lib/components/Radio.tsx","../lib/components/Select.tsx","../lib/utils/getIntentClassNames.ts"],"sourcesContent":["import * as React from \"react\";\nfunction ArrowPathIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ArrowPathIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ArrowTopRightOnSquareIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z\",\n clipRule: \"evenodd\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ArrowTopRightOnSquareIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction Bars4Icon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M2 3.75A.75.75 0 0 1 2.75 3h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.166a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(Bars4Icon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction CheckCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(CheckCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ChevronRightIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronRightIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ChevronUpDownIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronUpDownIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ExclamationTriangleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ExclamationTriangleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction InformationCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(InformationCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction XMarkIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(XMarkIcon);\nexport default ForwardRef;","/**\n * react-router v7.10.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nvar __typeError = (msg) => {\n throw TypeError(msg);\n};\nvar __accessCheck = (obj, member, msg) => member.has(obj) || __typeError(\"Cannot \" + msg);\nvar __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj));\nvar __privateAdd = (obj, member, value) => member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n\n// lib/router/history.ts\nvar Action = /* @__PURE__ */ ((Action2) => {\n Action2[\"Pop\"] = \"POP\";\n Action2[\"Push\"] = \"PUSH\";\n Action2[\"Replace\"] = \"REPLACE\";\n return Action2;\n})(Action || {});\nvar PopStateEventType = \"popstate\";\nfunction createMemoryHistory(options = {}) {\n let { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n let entries;\n entries = initialEntries.map(\n (entry, index2) => createMemoryLocation(\n entry,\n typeof entry === \"string\" ? null : entry.state,\n index2 === 0 ? \"default\" : void 0\n )\n );\n let index = clampIndex(\n initialIndex == null ? entries.length - 1 : initialIndex\n );\n let action = \"POP\" /* Pop */;\n let listener = null;\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation() {\n return entries[index];\n }\n function createMemoryLocation(to, state = null, key) {\n let location = createLocation(\n entries ? getCurrentLocation().pathname : \"/\",\n to,\n state,\n key\n );\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in memory history: ${JSON.stringify(\n to\n )}`\n );\n return location;\n }\n function createHref2(to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n let history = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref: createHref2,\n createURL(to) {\n return new URL(createHref2(to), \"http://localhost\");\n },\n encodeLocation(to) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\"\n };\n },\n push(to, state) {\n action = \"PUSH\" /* Push */;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({ action, location: nextLocation, delta: 1 });\n }\n },\n replace(to, state) {\n action = \"REPLACE\" /* Replace */;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({ action, location: nextLocation, delta: 0 });\n }\n },\n go(delta) {\n action = \"POP\" /* Pop */;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({ action, location: nextLocation, delta });\n }\n },\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n };\n return history;\n}\nfunction createBrowserHistory(options = {}) {\n function createBrowserLocation(window2, globalHistory) {\n let { pathname, search, hash } = window2.location;\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null,\n globalHistory.state && globalHistory.state.key || \"default\"\n );\n }\n function createBrowserHref(window2, to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n return getUrlBasedHistory(\n createBrowserLocation,\n createBrowserHref,\n null,\n options\n );\n}\nfunction createHashHistory(options = {}) {\n function createHashLocation(window2, globalHistory) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = parsePath(window2.location.hash.substring(1));\n if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n pathname = \"/\" + pathname;\n }\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null,\n globalHistory.state && globalHistory.state.key || \"default\"\n );\n }\n function createHashHref(window2, to) {\n let base = window2.document.querySelector(\"base\");\n let href = \"\";\n if (base && base.getAttribute(\"href\")) {\n let url = window2.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n function validateHashLocation(location, to) {\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in hash history.push(${JSON.stringify(\n to\n )})`\n );\n }\n return getUrlBasedHistory(\n createHashLocation,\n createHashHref,\n validateHashLocation,\n options\n );\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\nfunction warning(cond, message) {\n if (!cond) {\n if (typeof console !== \"undefined\") console.warn(message);\n try {\n throw new Error(message);\n } catch (e) {\n }\n }\n}\nfunction createKey() {\n return Math.random().toString(36).substring(2, 10);\n}\nfunction getHistoryState(location, index) {\n return {\n usr: location.state,\n key: location.key,\n idx: index\n };\n}\nfunction createLocation(current, to, state = null, key) {\n let location = {\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\",\n ...typeof to === \"string\" ? parsePath(to) : to,\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n };\n return location;\n}\nfunction createPath({\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n}) {\n if (search && search !== \"?\")\n pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\")\n pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\nfunction parsePath(path) {\n let parsedPath = {};\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substring(hashIndex);\n path = path.substring(0, hashIndex);\n }\n let searchIndex = path.indexOf(\"?\");\n if (searchIndex >= 0) {\n parsedPath.search = path.substring(searchIndex);\n path = path.substring(0, searchIndex);\n }\n if (path) {\n parsedPath.pathname = path;\n }\n }\n return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref2, validateLocation, options = {}) {\n let { window: window2 = document.defaultView, v5Compat = false } = options;\n let globalHistory = window2.history;\n let action = \"POP\" /* Pop */;\n let listener = null;\n let index = getIndex();\n if (index == null) {\n index = 0;\n globalHistory.replaceState({ ...globalHistory.state, idx: index }, \"\");\n }\n function getIndex() {\n let state = globalHistory.state || { idx: null };\n return state.idx;\n }\n function handlePop() {\n action = \"POP\" /* Pop */;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({ action, location: history.location, delta });\n }\n }\n function push(to, state) {\n action = \"PUSH\" /* Push */;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n if (error instanceof DOMException && error.name === \"DataCloneError\") {\n throw error;\n }\n window2.location.assign(url);\n }\n if (v5Compat && listener) {\n listener({ action, location: history.location, delta: 1 });\n }\n }\n function replace2(to, state) {\n action = \"REPLACE\" /* Replace */;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n if (v5Compat && listener) {\n listener({ action, location: history.location, delta: 0 });\n }\n }\n function createURL(to) {\n return createBrowserURLImpl(to);\n }\n let history = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window2, globalHistory);\n },\n listen(fn) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n window2.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window2.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref2(window2, to);\n },\n createURL,\n encodeLocation(to) {\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n push,\n replace: replace2,\n go(n) {\n return globalHistory.go(n);\n }\n };\n return history;\n}\nfunction createBrowserURLImpl(to, isAbsolute = false) {\n let base = \"http://localhost\";\n if (typeof window !== \"undefined\") {\n base = window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n }\n invariant(base, \"No window.location.(origin|href) available to create URL\");\n let href = typeof to === \"string\" ? to : createPath(to);\n href = href.replace(/ $/, \"%20\");\n if (!isAbsolute && href.startsWith(\"//\")) {\n href = base + href;\n }\n return new URL(href, base);\n}\n\n// lib/router/utils.ts\nfunction createContext(defaultValue) {\n return { defaultValue };\n}\nvar _map;\nvar RouterContextProvider = class {\n /**\n * Create a new `RouterContextProvider` instance\n * @param init An optional initial context map to populate the provider with\n */\n constructor(init) {\n __privateAdd(this, _map, /* @__PURE__ */ new Map());\n if (init) {\n for (let [context, value] of init) {\n this.set(context, value);\n }\n }\n }\n /**\n * Access a value from the context. If no value has been set for the context,\n * it will return the context's `defaultValue` if provided, or throw an error\n * if no `defaultValue` was set.\n * @param context The context to get the value for\n * @returns The value for the context, or the context's `defaultValue` if no\n * value was set\n */\n get(context) {\n if (__privateGet(this, _map).has(context)) {\n return __privateGet(this, _map).get(context);\n }\n if (context.defaultValue !== void 0) {\n return context.defaultValue;\n }\n throw new Error(\"No value found for context\");\n }\n /**\n * Set a value for the context. If the context already has a value set, this\n * will overwrite it.\n *\n * @param context The context to set the value for\n * @param value The value to set for the context\n * @returns {void}\n */\n set(context, value) {\n __privateGet(this, _map).set(context, value);\n }\n};\n_map = new WeakMap();\nvar unsupportedLazyRouteObjectKeys = /* @__PURE__ */ new Set([\n \"lazy\",\n \"caseSensitive\",\n \"path\",\n \"id\",\n \"index\",\n \"children\"\n]);\nfunction isUnsupportedLazyRouteObjectKey(key) {\n return unsupportedLazyRouteObjectKeys.has(\n key\n );\n}\nvar unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([\n \"lazy\",\n \"caseSensitive\",\n \"path\",\n \"id\",\n \"index\",\n \"middleware\",\n \"children\"\n]);\nfunction isUnsupportedLazyRouteFunctionKey(key) {\n return unsupportedLazyRouteFunctionKeys.has(\n key\n );\n}\nfunction isIndexRoute(route) {\n return route.index === true;\n}\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties2, parentPath = [], manifest = {}, allowInPlaceMutations = false) {\n return routes.map((route, index) => {\n let treePath = [...parentPath, String(index)];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(\n route.index !== true || !route.children,\n `Cannot specify children on an index route`\n );\n invariant(\n allowInPlaceMutations || !manifest[id],\n `Found a route id collision on id \"${id}\". Route id's must be globally unique within Data Router usages`\n );\n if (isIndexRoute(route)) {\n let indexRoute = {\n ...route,\n id\n };\n manifest[id] = mergeRouteUpdates(\n indexRoute,\n mapRouteProperties2(indexRoute)\n );\n return indexRoute;\n } else {\n let pathOrLayoutRoute = {\n ...route,\n id,\n children: void 0\n };\n manifest[id] = mergeRouteUpdates(\n pathOrLayoutRoute,\n mapRouteProperties2(pathOrLayoutRoute)\n );\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(\n route.children,\n mapRouteProperties2,\n treePath,\n manifest,\n allowInPlaceMutations\n );\n }\n return pathOrLayoutRoute;\n }\n });\n}\nfunction mergeRouteUpdates(route, updates) {\n return Object.assign(route, {\n ...updates,\n ...typeof updates.lazy === \"object\" && updates.lazy != null ? {\n lazy: {\n ...route.lazy,\n ...updates.lazy\n }\n } : {}\n });\n}\nfunction matchRoutes(routes, locationArg, basename = \"/\") {\n return matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial) {\n let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || \"/\", basename);\n if (pathname == null) {\n return null;\n }\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n let decoded = decodePath(pathname);\n matches = matchRouteBranch(\n branches[i],\n decoded,\n allowPartial\n );\n }\n return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n let { route, pathname, params } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n loaderData: loaderData[route.id],\n handle: route.handle\n };\n}\nfunction flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = \"\", _hasParentOptionalSegments = false) {\n let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {\n let meta = {\n relativePath: relativePath === void 0 ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n if (meta.relativePath.startsWith(\"/\")) {\n if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {\n return;\n }\n invariant(\n meta.relativePath.startsWith(parentPath),\n `Absolute route path \"${meta.relativePath}\" nested under path \"${parentPath}\" is not valid. An absolute child route path must start with the combined path of all its parent routes.`\n );\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true,\n `Index routes must not have child routes. Please remove all child routes from route path \"${path}\".`\n );\n flattenRoutes(\n route.children,\n branches,\n routesMeta,\n path,\n hasParentOptionalSegments\n );\n }\n if (route.path == null && !route.index) {\n return;\n }\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n routes.forEach((route, index) => {\n if (route.path === \"\" || !route.path?.includes(\"?\")) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, true, exploded);\n }\n }\n });\n return branches;\n}\nfunction explodeOptionalSegments(path) {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments;\n let isOptional = first.endsWith(\"?\");\n let required = first.replace(/\\?$/, \"\");\n if (rest.length === 0) {\n return isOptional ? [required, \"\"] : [required];\n }\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n let result = [];\n result.push(\n ...restExploded.map(\n (subpath) => subpath === \"\" ? required : [required, subpath].join(\"/\")\n )\n );\n if (isOptional) {\n result.push(...restExploded);\n }\n return result.map(\n (exploded) => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded\n );\n}\nfunction rankRouteBranches(branches) {\n branches.sort(\n (a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(\n a.routesMeta.map((meta) => meta.childrenIndex),\n b.routesMeta.map((meta) => meta.childrenIndex)\n )\n );\n}\nvar paramRe = /^:[\\w-]+$/;\nvar dynamicSegmentValue = 3;\nvar indexRouteValue = 2;\nvar emptySegmentValue = 1;\nvar staticSegmentValue = 10;\nvar splatPenalty = -2;\nvar isSplat = (s) => s === \"*\";\nfunction computeScore(path, index) {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n if (index) {\n initialScore += indexRouteValue;\n }\n return segments.filter((s) => !isSplat(s)).reduce(\n (score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue),\n initialScore\n );\n}\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ? (\n // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1]\n ) : (\n // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0\n );\n}\nfunction matchRouteBranch(branch, pathname, allowPartial = false) {\n let { routesMeta } = branch;\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath(\n { path: meta.relativePath, caseSensitive: meta.caseSensitive, end },\n remainingPathname\n );\n let route = meta.route;\n if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {\n match = matchPath(\n {\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end: false\n },\n remainingPathname\n );\n }\n if (!match) {\n return null;\n }\n Object.assign(matchedParams, match.params);\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(\n joinPaths([matchedPathname, match.pathnameBase])\n ),\n route\n });\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n return matches;\n}\nfunction generatePath(originalPath, params = {}) {\n let path = originalPath;\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(\n false,\n `Route path \"${path}\" will be treated as if it were \"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must always follow a \\`/\\` in the pattern. To get rid of this warning, please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n path = path.replace(/\\*$/, \"/*\");\n }\n const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n const stringify2 = (p) => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n const segments = path.split(/\\/+/).map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n if (isLastSegment && segment === \"*\") {\n const star = \"*\";\n return stringify2(params[star]);\n }\n const keyMatch = segment.match(/^:([\\w-]+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key];\n invariant(optional === \"?\" || param != null, `Missing \":${key}\" param`);\n return encodeURIComponent(stringify2(param));\n }\n return segment.replace(/\\?$/g, \"\");\n }).filter((segment) => !!segment);\n return prefix + segments.join(\"/\");\n}\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === \"string\") {\n pattern = { path: pattern, caseSensitive: false, end: true };\n }\n let [matcher, compiledParams] = compilePath(\n pattern.path,\n pattern.caseSensitive,\n pattern.end\n );\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params = compiledParams.reduce(\n (memo2, { paramName, isOptional }, index) => {\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n }\n const value = captureGroups[index];\n if (isOptional && !value) {\n memo2[paramName] = void 0;\n } else {\n memo2[paramName] = (value || \"\").replace(/%2F/g, \"/\");\n }\n return memo2;\n },\n {}\n );\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\nfunction compilePath(path, caseSensitive = false, end = true) {\n warning(\n path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"),\n `Route path \"${path}\" will be treated as if it were \"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must always follow a \\`/\\` in the pattern. To get rid of this warning, please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n let params = [];\n let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\").replace(/^\\/*/, \"/\").replace(/[\\\\.*+^${}|()[\\]]/g, \"\\\\$&\").replace(\n /\\/:([\\w-]+)(\\?)?/g,\n (_, paramName, isOptional) => {\n params.push({ paramName, isOptional: isOptional != null });\n return isOptional ? \"/?([^\\\\/]+)?\" : \"/([^\\\\/]+)\";\n }\n ).replace(/\\/([\\w-]+)\\?(\\/|$)/g, \"(/$1)?$2\");\n if (path.endsWith(\"*\")) {\n params.push({ paramName: \"*\" });\n regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" : \"(?:\\\\/(.+)|\\\\/*)$\";\n } else if (end) {\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else {\n }\n let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : \"i\");\n return [matcher, params];\n}\nfunction decodePath(value) {\n try {\n return value.split(\"/\").map((v) => decodeURIComponent(v).replace(/\\//g, \"%2F\")).join(\"/\");\n } catch (error) {\n warning(\n false,\n `The URL path \"${value}\" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`\n );\n return value;\n }\n}\nfunction stripBasename(pathname, basename) {\n if (basename === \"/\") return pathname;\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== \"/\") {\n return null;\n }\n return pathname.slice(startIndex) || \"/\";\n}\nfunction prependBasename({\n basename,\n pathname\n}) {\n return pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n}\nvar ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nvar isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);\nfunction resolvePath(to, fromPathname = \"/\") {\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\"\n } = typeof to === \"string\" ? parsePath(to) : to;\n let pathname;\n if (toPathname) {\n if (isAbsoluteUrl(toPathname)) {\n pathname = toPathname;\n } else {\n if (toPathname.includes(\"//\")) {\n let oldPathname = toPathname;\n toPathname = toPathname.replace(/\\/\\/+/g, \"/\");\n warning(\n false,\n `Pathnames cannot have embedded double slashes - normalizing ${oldPathname} -> ${toPathname}`\n );\n }\n if (toPathname.startsWith(\"/\")) {\n pathname = resolvePathname(toPathname.substring(1), \"/\");\n } else {\n pathname = resolvePathname(toPathname, fromPathname);\n }\n }\n } else {\n pathname = fromPathname;\n }\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n relativeSegments.forEach((segment) => {\n if (segment === \"..\") {\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n return `Cannot include a '${char}' character in a manually specified \\`to.${field}\\` field [${JSON.stringify(\n path\n )}]. Please separate it out to the \\`to.${dest}\\` field. Alternatively you may provide the full path as a string in <Link to=\"...\"> and the router will parse it for you.`;\n}\nfunction getPathContributingMatches(matches) {\n return matches.filter(\n (match, index) => index === 0 || match.route.path && match.route.path.length > 0\n );\n}\nfunction getResolveToMatches(matches) {\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches.map(\n (match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase\n );\n}\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) {\n let to;\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = { ...toArg };\n invariant(\n !to.pathname || !to.pathname.includes(\"?\"),\n getInvalidPathError(\"?\", \"pathname\", \"search\", to)\n );\n invariant(\n !to.pathname || !to.pathname.includes(\"#\"),\n getInvalidPathError(\"#\", \"pathname\", \"hash\", to)\n );\n invariant(\n !to.search || !to.search.includes(\"#\"),\n getInvalidPathError(\"#\", \"search\", \"hash\", to)\n );\n }\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n let from;\n if (toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n if (!isPathRelative && toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\");\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n to.pathname = toSegments.join(\"/\");\n }\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n let path = resolvePath(to, from);\n let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += \"/\";\n }\n return path;\n}\nvar joinPaths = (paths) => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\nvar normalizePathname = (pathname) => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\nvar normalizeSearch = (search) => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\nvar normalizeHash = (hash) => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\nvar DataWithResponseInit = class {\n constructor(data2, init) {\n this.type = \"DataWithResponseInit\";\n this.data = data2;\n this.init = init || null;\n }\n};\nfunction data(data2, init) {\n return new DataWithResponseInit(\n data2,\n typeof init === \"number\" ? { status: init } : init\n );\n}\nvar redirect = (url, init = 302) => {\n let responseInit = init;\n if (typeof responseInit === \"number\") {\n responseInit = { status: responseInit };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n return new Response(null, { ...responseInit, headers });\n};\nvar redirectDocument = (url, init) => {\n let response = redirect(url, init);\n response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n return response;\n};\nvar replace = (url, init) => {\n let response = redirect(url, init);\n response.headers.set(\"X-Remix-Replace\", \"true\");\n return response;\n};\nvar ErrorResponseImpl = class {\n constructor(status, statusText, data2, internal = false) {\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n if (data2 instanceof Error) {\n this.data = data2.toString();\n this.error = data2;\n } else {\n this.data = data2;\n }\n }\n};\nfunction isRouteErrorResponse(error) {\n return error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\nfunction getRoutePattern(matches) {\n return matches.map((m) => m.route.path).filter(Boolean).join(\"/\").replace(/\\/\\/*/g, \"/\") || \"/\";\n}\n\n// lib/router/instrumentation.ts\nvar UninstrumentedSymbol = Symbol(\"Uninstrumented\");\nfunction getRouteInstrumentationUpdates(fns, route) {\n let aggregated = {\n lazy: [],\n \"lazy.loader\": [],\n \"lazy.action\": [],\n \"lazy.middleware\": [],\n middleware: [],\n loader: [],\n action: []\n };\n fns.forEach(\n (fn) => fn({\n id: route.id,\n index: route.index,\n path: route.path,\n instrument(i) {\n let keys = Object.keys(aggregated);\n for (let key of keys) {\n if (i[key]) {\n aggregated[key].push(i[key]);\n }\n }\n }\n })\n );\n let updates = {};\n if (typeof route.lazy === \"function\" && aggregated.lazy.length > 0) {\n let instrumented = wrapImpl(aggregated.lazy, route.lazy, () => void 0);\n if (instrumented) {\n updates.lazy = instrumented;\n }\n }\n if (typeof route.lazy === \"object\") {\n let lazyObject = route.lazy;\n [\"middleware\", \"loader\", \"action\"].forEach((key) => {\n let lazyFn = lazyObject[key];\n let instrumentations = aggregated[`lazy.${key}`];\n if (typeof lazyFn === \"function\" && instrumentations.length > 0) {\n let instrumented = wrapImpl(instrumentations, lazyFn, () => void 0);\n if (instrumented) {\n updates.lazy = Object.assign(updates.lazy || {}, {\n [key]: instrumented\n });\n }\n }\n });\n }\n [\"loader\", \"action\"].forEach((key) => {\n let handler = route[key];\n if (typeof handler === \"function\" && aggregated[key].length > 0) {\n let original = handler[UninstrumentedSymbol] ?? handler;\n let instrumented = wrapImpl(\n aggregated[key],\n original,\n (...args) => getHandlerInfo(args[0])\n );\n if (instrumented) {\n instrumented[UninstrumentedSymbol] = original;\n updates[key] = instrumented;\n }\n }\n });\n if (route.middleware && route.middleware.length > 0 && aggregated.middleware.length > 0) {\n updates.middleware = route.middleware.map((middleware) => {\n let original = middleware[UninstrumentedSymbol] ?? middleware;\n let instrumented = wrapImpl(\n aggregated.middleware,\n original,\n (...args) => getHandlerInfo(args[0])\n );\n if (instrumented) {\n instrumented[UninstrumentedSymbol] = original;\n return instrumented;\n }\n return middleware;\n });\n }\n return updates;\n}\nfunction instrumentClientSideRouter(router, fns) {\n let aggregated = {\n navigate: [],\n fetch: []\n };\n fns.forEach(\n (fn) => fn({\n instrument(i) {\n let keys = Object.keys(i);\n for (let key of keys) {\n if (i[key]) {\n aggregated[key].push(i[key]);\n }\n }\n }\n })\n );\n if (aggregated.navigate.length > 0) {\n let navigate = router.navigate[UninstrumentedSymbol] ?? router.navigate;\n let instrumentedNavigate = wrapImpl(\n aggregated.navigate,\n navigate,\n (...args) => {\n let [to, opts] = args;\n return {\n to: typeof to === \"number\" || typeof to === \"string\" ? to : to ? createPath(to) : \".\",\n ...getRouterInfo(router, opts ?? {})\n };\n }\n );\n if (instrumentedNavigate) {\n instrumentedNavigate[UninstrumentedSymbol] = navigate;\n router.navigate = instrumentedNavigate;\n }\n }\n if (aggregated.fetch.length > 0) {\n let fetch2 = router.fetch[UninstrumentedSymbol] ?? router.fetch;\n let instrumentedFetch = wrapImpl(aggregated.fetch, fetch2, (...args) => {\n let [key, , href, opts] = args;\n return {\n href: href ?? \".\",\n fetcherKey: key,\n ...getRouterInfo(router, opts ?? {})\n };\n });\n if (instrumentedFetch) {\n instrumentedFetch[UninstrumentedSymbol] = fetch2;\n router.fetch = instrumentedFetch;\n }\n }\n return router;\n}\nfunction instrumentHandler(handler, fns) {\n let aggregated = {\n request: []\n };\n fns.forEach(\n (fn) => fn({\n instrument(i) {\n let keys = Object.keys(i);\n for (let key of keys) {\n if (i[key]) {\n aggregated[key].push(i[key]);\n }\n }\n }\n })\n );\n let instrumentedHandler = handler;\n if (aggregated.request.length > 0) {\n instrumentedHandler = wrapImpl(aggregated.request, handler, (...args) => {\n let [request, context] = args;\n return {\n request: getReadonlyRequest(request),\n context: context != null ? getReadonlyContext(context) : context\n };\n });\n }\n return instrumentedHandler;\n}\nfunction wrapImpl(impls, handler, getInfo) {\n if (impls.length === 0) {\n return null;\n }\n return async (...args) => {\n let result = await recurseRight(\n impls,\n getInfo(...args),\n () => handler(...args),\n impls.length - 1\n );\n if (result.type === \"error\") {\n throw result.value;\n }\n return result.value;\n };\n}\nasync function recurseRight(impls, info, handler, index) {\n let impl = impls[index];\n let result;\n if (!impl) {\n try {\n let value = await handler();\n result = { type: \"success\", value };\n } catch (e) {\n result = { type: \"error\", value: e };\n }\n } else {\n let handlerPromise = void 0;\n let callHandler = async () => {\n if (handlerPromise) {\n console.error(\"You cannot call instrumented handlers more than once\");\n } else {\n handlerPromise = recurseRight(impls, info, handler, index - 1);\n }\n result = await handlerPromise;\n invariant(result, \"Expected a result\");\n if (result.type === \"error\" && result.value instanceof Error) {\n return { status: \"error\", error: result.value };\n }\n return { status: \"success\", error: void 0 };\n };\n try {\n await impl(callHandler, info);\n } catch (e) {\n console.error(\"An instrumentation function threw an error:\", e);\n }\n if (!handlerPromise) {\n await callHandler();\n }\n await handlerPromise;\n }\n if (result) {\n return result;\n }\n return {\n type: \"error\",\n value: new Error(\"No result assigned in instrumentation chain.\")\n };\n}\nfunction getHandlerInfo(args) {\n let { request, context, params, unstable_pattern } = args;\n return {\n request: getReadonlyRequest(request),\n params: { ...params },\n unstable_pattern,\n context: getReadonlyContext(context)\n };\n}\nfunction getRouterInfo(router, opts) {\n return {\n currentUrl: createPath(router.state.location),\n ...\"formMethod\" in opts ? { formMethod: opts.formMethod } : {},\n ...\"formEncType\" in opts ? { formEncType: opts.formEncType } : {},\n ...\"formData\" in opts ? { formData: opts.formData } : {},\n ...\"body\" in opts ? { body: opts.body } : {}\n };\n}\nfunction getReadonlyRequest(request) {\n return {\n method: request.method,\n url: request.url,\n headers: {\n get: (...args) => request.headers.get(...args)\n }\n };\n}\nfunction getReadonlyContext(context) {\n if (isPlainObject(context)) {\n let frozen = { ...context };\n Object.freeze(frozen);\n return frozen;\n } else {\n return {\n get: (ctx) => context.get(ctx)\n };\n }\n}\nvar objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction isPlainObject(thing) {\n if (thing === null || typeof thing !== \"object\") {\n return false;\n }\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === objectProtoNames;\n}\n\n// lib/router/router.ts\nvar validMutationMethodsArr = [\n \"POST\",\n \"PUT\",\n \"PATCH\",\n \"DELETE\"\n];\nvar validMutationMethods = new Set(\n validMutationMethodsArr\n);\nvar validRequestMethodsArr = [\n \"GET\",\n ...validMutationMethodsArr\n];\nvar validRequestMethods = new Set(validRequestMethodsArr);\nvar redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);\nvar redirectPreserveMethodStatusCodes = /* @__PURE__ */ new Set([307, 308]);\nvar IDLE_NAVIGATION = {\n state: \"idle\",\n location: void 0,\n formMethod: void 0,\n formAction: void 0,\n formEncType: void 0,\n formData: void 0,\n json: void 0,\n text: void 0\n};\nvar IDLE_FETCHER = {\n state: \"idle\",\n data: void 0,\n formMethod: void 0,\n formAction: void 0,\n formEncType: void 0,\n formData: void 0,\n json: void 0,\n text: void 0\n};\nvar IDLE_BLOCKER = {\n state: \"unblocked\",\n proceed: void 0,\n reset: void 0,\n location: void 0\n};\nvar defaultMapRouteProperties = (route) => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nvar TRANSITIONS_STORAGE_KEY = \"remix-router-transitions\";\nvar ResetLoaderDataSymbol = Symbol(\"ResetLoaderData\");\nfunction createRouter(init) {\n const routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : void 0;\n const isBrowser2 = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n invariant(\n init.routes.length > 0,\n \"You must provide a non-empty routes array to createRouter\"\n );\n let hydrationRouteProperties2 = init.hydrationRouteProperties || [];\n let _mapRouteProperties = init.mapRouteProperties || defaultMapRouteProperties;\n let mapRouteProperties2 = _mapRouteProperties;\n if (init.unstable_instrumentations) {\n let instrumentations = init.unstable_instrumentations;\n mapRouteProperties2 = (route) => {\n return {\n ..._mapRouteProperties(route),\n ...getRouteInstrumentationUpdates(\n instrumentations.map((i) => i.route).filter(Boolean),\n route\n )\n };\n };\n }\n let manifest = {};\n let dataRoutes = convertRoutesToDataRoutes(\n init.routes,\n mapRouteProperties2,\n void 0,\n manifest\n );\n let inFlightDataRoutes;\n let basename = init.basename || \"/\";\n if (!basename.startsWith(\"/\")) {\n basename = `/${basename}`;\n }\n let dataStrategyImpl = init.dataStrategy || defaultDataStrategyWithMiddleware;\n let future = {\n ...init.future\n };\n let unlistenHistory = null;\n let subscribers = /* @__PURE__ */ new Set();\n let savedScrollPositions2 = null;\n let getScrollRestorationKey2 = null;\n let getScrollPosition = null;\n let initialScrollRestored = init.hydrationData != null;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialMatchesIsFOW = false;\n let initialErrors = null;\n let initialized;\n if (initialMatches == null && !init.patchRoutesOnNavigation) {\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let { matches, route } = getShortCircuitMatches(dataRoutes);\n initialized = true;\n initialMatches = matches;\n initialErrors = { [route.id]: error };\n } else {\n if (initialMatches && !init.hydrationData) {\n let fogOfWar = checkFogOfWar(\n initialMatches,\n dataRoutes,\n init.history.location.pathname\n );\n if (fogOfWar.active) {\n initialMatches = null;\n }\n }\n if (!initialMatches) {\n initialized = false;\n initialMatches = [];\n let fogOfWar = checkFogOfWar(\n null,\n dataRoutes,\n init.history.location.pathname\n );\n if (fogOfWar.active && fogOfWar.matches) {\n initialMatchesIsFOW = true;\n initialMatches = fogOfWar.matches;\n }\n } else if (initialMatches.some((m) => m.route.lazy)) {\n initialized = false;\n } else if (!initialMatches.some((m) => routeHasLoaderOrMiddleware(m.route))) {\n initialized = true;\n } else {\n let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n let errors = init.hydrationData ? init.hydrationData.errors : null;\n if (errors) {\n let idx = initialMatches.findIndex(\n (m) => errors[m.route.id] !== void 0\n );\n initialized = initialMatches.slice(0, idx + 1).every(\n (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors)\n );\n } else {\n initialized = initialMatches.every(\n (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors)\n );\n }\n }\n }\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don't restore on initial updateState() if we were SSR'd\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: /* @__PURE__ */ new Map(),\n blockers: /* @__PURE__ */ new Map()\n };\n let pendingAction = \"POP\" /* Pop */;\n let pendingPopstateNavigationDfd = null;\n let pendingPreventScrollReset = false;\n let pendingNavigationController;\n let pendingViewTransitionEnabled = false;\n let appliedViewTransitions = /* @__PURE__ */ new Map();\n let removePageHideEventListener = null;\n let isUninterruptedRevalidation = false;\n let isRevalidationRequired = false;\n let cancelledFetcherLoads = /* @__PURE__ */ new Set();\n let fetchControllers = /* @__PURE__ */ new Map();\n let incrementingLoadId = 0;\n let pendingNavigationLoadId = -1;\n let fetchReloadIds = /* @__PURE__ */ new Map();\n let fetchRedirectIds = /* @__PURE__ */ new Set();\n let fetchLoadMatches = /* @__PURE__ */ new Map();\n let activeFetchers = /* @__PURE__ */ new Map();\n let fetchersQueuedForDeletion = /* @__PURE__ */ new Set();\n let blockerFunctions = /* @__PURE__ */ new Map();\n let unblockBlockerHistoryUpdate = void 0;\n let pendingRevalidationDfd = null;\n function initialize() {\n unlistenHistory = init.history.listen(\n ({ action: historyAction, location, delta }) => {\n if (unblockBlockerHistoryUpdate) {\n unblockBlockerHistoryUpdate();\n unblockBlockerHistoryUpdate = void 0;\n return;\n }\n warning(\n blockerFunctions.size === 0 || delta != null,\n \"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.\"\n );\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction\n });\n if (blockerKey && delta != null) {\n let nextHistoryUpdatePromise = new Promise((resolve) => {\n unblockBlockerHistoryUpdate = resolve;\n });\n init.history.go(delta * -1);\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location,\n proceed() {\n updateBlocker(blockerKey, {\n state: \"proceeding\",\n proceed: void 0,\n reset: void 0,\n location\n });\n nextHistoryUpdatePromise.then(() => init.history.go(delta));\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({ blockers });\n }\n });\n pendingPopstateNavigationDfd?.resolve();\n pendingPopstateNavigationDfd = null;\n return;\n }\n return startNavigation(historyAction, location);\n }\n );\n if (isBrowser2) {\n restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n routerWindow.addEventListener(\"pagehide\", _saveAppliedTransitions);\n removePageHideEventListener = () => routerWindow.removeEventListener(\"pagehide\", _saveAppliedTransitions);\n }\n if (!state.initialized) {\n startNavigation(\"POP\" /* Pop */, state.location, {\n initialHydration: true\n });\n }\n return router;\n }\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n if (removePageHideEventListener) {\n removePageHideEventListener();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n function updateState(newState, opts = {}) {\n if (newState.matches) {\n newState.matches = newState.matches.map((m) => {\n let route = manifest[m.route.id];\n let matchRoute = m.route;\n if (matchRoute.element !== route.element || matchRoute.errorElement !== route.errorElement || matchRoute.hydrateFallbackElement !== route.hydrateFallbackElement) {\n return {\n ...m,\n route\n };\n }\n return m;\n });\n }\n state = {\n ...state,\n ...newState\n };\n let unmountedFetchers = [];\n let mountedFetchers = [];\n state.fetchers.forEach((fetcher, key) => {\n if (fetcher.state === \"idle\") {\n if (fetchersQueuedForDeletion.has(key)) {\n unmountedFetchers.push(key);\n } else {\n mountedFetchers.push(key);\n }\n }\n });\n fetchersQueuedForDeletion.forEach((key) => {\n if (!state.fetchers.has(key) && !fetchControllers.has(key)) {\n unmountedFetchers.push(key);\n }\n });\n [...subscribers].forEach(\n (subscriber) => subscriber(state, {\n deletedFetchers: unmountedFetchers,\n newErrors: newState.errors ?? null,\n viewTransitionOpts: opts.viewTransitionOpts,\n flushSync: opts.flushSync === true\n })\n );\n unmountedFetchers.forEach((key) => deleteFetcher(key));\n mountedFetchers.forEach((key) => state.fetchers.delete(key));\n }\n function completeNavigation(location, newState, { flushSync } = {}) {\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && location.state?._isRedirect !== true;\n let actionData;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n actionData = null;\n }\n } else if (isActionReload) {\n actionData = state.actionData;\n } else {\n actionData = null;\n }\n let loaderData = newState.loaderData ? mergeLoaderData(\n state.loaderData,\n newState.loaderData,\n newState.matches || [],\n newState.errors\n ) : state.loaderData;\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n let restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);\n let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && location.state?._isRedirect !== true;\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = void 0;\n }\n if (isUninterruptedRevalidation) {\n } else if (pendingAction === \"POP\" /* Pop */) {\n } else if (pendingAction === \"PUSH\" /* Push */) {\n init.history.push(location, location.state);\n } else if (pendingAction === \"REPLACE\" /* Replace */) {\n init.history.replace(location, location.state);\n }\n let viewTransitionOpts;\n if (pendingAction === \"POP\" /* Pop */) {\n let priorPaths = appliedViewTransitions.get(state.location.pathname);\n if (priorPaths && priorPaths.has(location.pathname)) {\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n } else if (appliedViewTransitions.has(location.pathname)) {\n viewTransitionOpts = {\n currentLocation: location,\n nextLocation: state.location\n };\n }\n } else if (pendingViewTransitionEnabled) {\n let toPaths = appliedViewTransitions.get(state.location.pathname);\n if (toPaths) {\n toPaths.add(location.pathname);\n } else {\n toPaths = /* @__PURE__ */ new Set([location.pathname]);\n appliedViewTransitions.set(state.location.pathname, toPaths);\n }\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n }\n updateState(\n {\n ...newState,\n // matches, errors, fetchers go through as-is\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n restoreScrollPosition,\n preventScrollReset,\n blockers\n },\n {\n viewTransitionOpts,\n flushSync: flushSync === true\n }\n );\n pendingAction = \"POP\" /* Pop */;\n pendingPreventScrollReset = false;\n pendingViewTransitionEnabled = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n pendingPopstateNavigationDfd?.resolve();\n pendingPopstateNavigationDfd = null;\n pendingRevalidationDfd?.resolve();\n pendingRevalidationDfd = null;\n }\n async function navigate(to, opts) {\n pendingPopstateNavigationDfd?.resolve();\n pendingPopstateNavigationDfd = null;\n if (typeof to === \"number\") {\n if (!pendingPopstateNavigationDfd) {\n pendingPopstateNavigationDfd = createDeferred();\n }\n let promise = pendingPopstateNavigationDfd.promise;\n init.history.go(to);\n return promise;\n }\n let normalizedPath = normalizeTo(\n state.location,\n state.matches,\n basename,\n to,\n opts?.fromRouteId,\n opts?.relative\n );\n let { path, submission, error } = normalizeNavigateOptions(\n false,\n normalizedPath,\n opts\n );\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n nextLocation = {\n ...nextLocation,\n ...init.history.encodeLocation(nextLocation)\n };\n let userReplace = opts && opts.replace != null ? opts.replace : void 0;\n let historyAction = \"PUSH\" /* Push */;\n if (userReplace === true) {\n historyAction = \"REPLACE\" /* Replace */;\n } else if (userReplace === false) {\n } else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n historyAction = \"REPLACE\" /* Replace */;\n }\n let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : void 0;\n let flushSync = (opts && opts.flushSync) === true;\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction\n });\n if (blockerKey) {\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey, {\n state: \"proceeding\",\n proceed: void 0,\n reset: void 0,\n location: nextLocation\n });\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({ blockers });\n }\n });\n return;\n }\n await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n enableViewTransition: opts && opts.viewTransition,\n flushSync\n });\n }\n function revalidate() {\n if (!pendingRevalidationDfd) {\n pendingRevalidationDfd = createDeferred();\n }\n interruptActiveLoads();\n updateState({ revalidation: \"loading\" });\n let promise = pendingRevalidationDfd.promise;\n if (state.navigation.state === \"submitting\") {\n return promise;\n }\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return promise;\n }\n startNavigation(\n pendingAction || state.historyAction,\n state.navigation.location,\n {\n overrideNavigation: state.navigation,\n // Proxy through any rending view transition\n enableViewTransition: pendingViewTransitionEnabled === true\n }\n );\n return promise;\n }\n async function startNavigation(historyAction, location, opts) {\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (\n // `matchRoutes()` has already been called if we're in here via `router.initialize()`\n state.matches\n ) : matchRoutes(routesToUse, location, basename);\n let flushSync = (opts && opts.flushSync) === true;\n if (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n completeNavigation(location, { matches }, { flushSync });\n return;\n }\n let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n if (fogOfWar.active && fogOfWar.matches) {\n matches = fogOfWar.matches;\n }\n if (!matches) {\n let { error, notFoundMatches, route } = handleNavigational404(\n location.pathname\n );\n completeNavigation(\n location,\n {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n },\n { flushSync }\n );\n return;\n }\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(\n init.history,\n location,\n pendingNavigationController.signal,\n opts && opts.submission\n );\n let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();\n let pendingActionResult;\n if (opts && opts.pendingError) {\n pendingActionResult = [\n findNearestBoundary(matches).route.id,\n { type: \"error\" /* error */, error: opts.pendingError }\n ];\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n let actionResult = await handleAction(\n request,\n location,\n opts.submission,\n matches,\n scopedContext,\n fogOfWar.active,\n opts && opts.initialHydration === true,\n { replace: opts.replace, flushSync }\n );\n if (actionResult.shortCircuited) {\n return;\n }\n if (actionResult.pendingActionResult) {\n let [routeId, result] = actionResult.pendingActionResult;\n if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n pendingNavigationController = null;\n completeNavigation(location, {\n matches: actionResult.matches,\n loaderData: {},\n errors: {\n [routeId]: result.error\n }\n });\n return;\n }\n }\n matches = actionResult.matches || matches;\n pendingActionResult = actionResult.pendingActionResult;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n flushSync = false;\n fogOfWar.active = false;\n request = createClientSideRequest(\n init.history,\n request.url,\n request.signal\n );\n }\n let {\n shortCircuited,\n matches: updatedMatches,\n loaderData,\n errors\n } = await handleLoaders(\n request,\n location,\n matches,\n scopedContext,\n fogOfWar.active,\n loadingNavigation,\n opts && opts.submission,\n opts && opts.fetcherSubmission,\n opts && opts.replace,\n opts && opts.initialHydration === true,\n flushSync,\n pendingActionResult\n );\n if (shortCircuited) {\n return;\n }\n pendingNavigationController = null;\n completeNavigation(location, {\n matches: updatedMatches || matches,\n ...getActionDataForCommit(pendingActionResult),\n loaderData,\n errors\n });\n }\n async function handleAction(request, location, submission, matches, scopedContext, isFogOfWar, initialHydration, opts = {}) {\n interruptActiveLoads();\n let navigation = getSubmittingNavigation(location, submission);\n updateState({ navigation }, { flushSync: opts.flushSync === true });\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(\n matches,\n location.pathname,\n request.signal\n );\n if (discoverResult.type === \"aborted\") {\n return { shortCircuited: true };\n } else if (discoverResult.type === \"error\") {\n if (discoverResult.partialMatches.length === 0) {\n let { matches: matches2, route } = getShortCircuitMatches(dataRoutes);\n return {\n matches: matches2,\n pendingActionResult: [\n route.id,\n {\n type: \"error\" /* error */,\n error: discoverResult.error\n }\n ]\n };\n }\n let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n return {\n matches: discoverResult.partialMatches,\n pendingActionResult: [\n boundaryId,\n {\n type: \"error\" /* error */,\n error: discoverResult.error\n }\n ]\n };\n } else if (!discoverResult.matches) {\n let { notFoundMatches, error, route } = handleNavigational404(\n location.pathname\n );\n return {\n matches: notFoundMatches,\n pendingActionResult: [\n route.id,\n {\n type: \"error\" /* error */,\n error\n }\n ]\n };\n } else {\n matches = discoverResult.matches;\n }\n }\n let result;\n let actionMatch = getTargetMatch(matches, location);\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: \"error\" /* error */,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n let dsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n request,\n matches,\n actionMatch,\n initialHydration ? [] : hydrationRouteProperties2,\n scopedContext\n );\n let results = await callDataStrategy(\n request,\n dsMatches,\n scopedContext,\n null\n );\n result = results[actionMatch.route.id];\n if (!result) {\n for (let match of matches) {\n if (results[match.route.id]) {\n result = results[match.route.id];\n break;\n }\n }\n }\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n }\n if (isRedirectResult(result)) {\n let replace2;\n if (opts && opts.replace != null) {\n replace2 = opts.replace;\n } else {\n let location2 = normalizeRedirectLocation(\n result.response.headers.get(\"Location\"),\n new URL(request.url),\n basename\n );\n replace2 = location2 === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(request, result, true, {\n submission,\n replace: replace2\n });\n return { shortCircuited: true };\n }\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n if ((opts && opts.replace) !== true) {\n pendingAction = \"PUSH\" /* Push */;\n }\n return {\n matches,\n pendingActionResult: [\n boundaryMatch.route.id,\n result,\n actionMatch.route.id\n ]\n };\n }\n return {\n matches,\n pendingActionResult: [actionMatch.route.id, result]\n };\n }\n async function handleLoaders(request, location, matches, scopedContext, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace2, initialHydration, flushSync, pendingActionResult) {\n let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n let shouldUpdateNavigationState = !isUninterruptedRevalidation && !initialHydration;\n if (isFogOfWar) {\n if (shouldUpdateNavigationState) {\n let actionData = getUpdatedActionData(pendingActionResult);\n updateState(\n {\n navigation: loadingNavigation,\n ...actionData !== void 0 ? { actionData } : {}\n },\n {\n flushSync\n }\n );\n }\n let discoverResult = await discoverRoutes(\n matches,\n location.pathname,\n request.signal\n );\n if (discoverResult.type === \"aborted\") {\n return { shortCircuited: true };\n } else if (discoverResult.type === \"error\") {\n if (discoverResult.partialMatches.length === 0) {\n let { matches: matches2, route } = getShortCircuitMatches(dataRoutes);\n return {\n matches: matches2,\n loaderData: {},\n errors: {\n [route.id]: discoverResult.error\n }\n };\n }\n let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n return {\n matches: discoverResult.partialMatches,\n loaderData: {},\n errors: {\n [boundaryId]: discoverResult.error\n }\n };\n } else if (!discoverResult.matches) {\n let { error, notFoundMatches, route } = handleNavigational404(\n location.pathname\n );\n return {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n };\n } else {\n matches = discoverResult.matches;\n }\n }\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let { dsMatches, revalidatingFetchers } = getMatchesToLoad(\n request,\n scopedContext,\n mapRouteProperties2,\n manifest,\n init.history,\n state,\n matches,\n activeSubmission,\n location,\n initialHydration ? [] : hydrationRouteProperties2,\n initialHydration === true,\n isRevalidationRequired,\n cancelledFetcherLoads,\n fetchersQueuedForDeletion,\n fetchLoadMatches,\n fetchRedirectIds,\n routesToUse,\n basename,\n init.patchRoutesOnNavigation != null,\n pendingActionResult\n );\n pendingNavigationLoadId = ++incrementingLoadId;\n if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some(\n (m) => m.route.middleware && m.route.middleware.length > 0\n ) && revalidatingFetchers.length === 0) {\n let updatedFetchers2 = markFetchRedirectsDone();\n completeNavigation(\n location,\n {\n matches,\n loaderData: {},\n // Commit pending error if we're short circuiting\n errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null,\n ...getActionDataForCommit(pendingActionResult),\n ...updatedFetchers2 ? { fetchers: new Map(state.fetchers) } : {}\n },\n { flushSync }\n );\n return { shortCircuited: true };\n }\n if (shouldUpdateNavigationState) {\n let updates = {};\n if (!isFogOfWar) {\n updates.navigation = loadingNavigation;\n let actionData = getUpdatedActionData(pendingActionResult);\n if (actionData !== void 0) {\n updates.actionData = actionData;\n }\n }\n if (revalidatingFetchers.length > 0) {\n updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n }\n updateState(updates, { flushSync });\n }\n revalidatingFetchers.forEach((rf) => {\n abortFetcher(rf.key);\n if (rf.controller) {\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((f) => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n }\n let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(\n dsMatches,\n revalidatingFetchers,\n request,\n scopedContext\n );\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n }\n revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));\n let redirect2 = findRedirect(loaderResults);\n if (redirect2) {\n await startRedirectNavigation(request, redirect2.result, true, {\n replace: replace2\n });\n return { shortCircuited: true };\n }\n redirect2 = findRedirect(fetcherResults);\n if (redirect2) {\n fetchRedirectIds.add(redirect2.key);\n await startRedirectNavigation(request, redirect2.result, true, {\n replace: replace2\n });\n return { shortCircuited: true };\n }\n let { loaderData, errors } = processLoaderData(\n state,\n matches,\n loaderResults,\n pendingActionResult,\n revalidatingFetchers,\n fetcherResults\n );\n if (initialHydration && state.errors) {\n errors = { ...state.errors, ...errors };\n }\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n return {\n matches,\n loaderData,\n errors,\n ...shouldUpdateFetchers ? { fetchers: new Map(state.fetchers) } : {}\n };\n }\n function getUpdatedActionData(pendingActionResult) {\n if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {\n return {\n [pendingActionResult[0]]: pendingActionResult[1].data\n };\n } else if (state.actionData) {\n if (Object.keys(state.actionData).length === 0) {\n return null;\n } else {\n return state.actionData;\n }\n }\n }\n function getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n revalidatingFetchers.forEach((rf) => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(\n void 0,\n fetcher ? fetcher.data : void 0\n );\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n return new Map(state.fetchers);\n }\n async function fetch2(key, routeId, href, opts) {\n abortFetcher(key);\n let flushSync = (opts && opts.flushSync) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(\n state.location,\n state.matches,\n basename,\n href,\n routeId,\n opts?.relative\n );\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n if (fogOfWar.active && fogOfWar.matches) {\n matches = fogOfWar.matches;\n }\n if (!matches) {\n setFetcherError(\n key,\n routeId,\n getInternalRouterError(404, { pathname: normalizedPath }),\n { flushSync }\n );\n return;\n }\n let { path, submission, error } = normalizeNavigateOptions(\n true,\n normalizedPath,\n opts\n );\n if (error) {\n setFetcherError(key, routeId, error, { flushSync });\n return;\n }\n let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();\n let preventScrollReset = (opts && opts.preventScrollReset) === true;\n if (submission && isMutationMethod(submission.formMethod)) {\n await handleFetcherAction(\n key,\n routeId,\n path,\n matches,\n scopedContext,\n fogOfWar.active,\n flushSync,\n preventScrollReset,\n submission\n );\n return;\n }\n fetchLoadMatches.set(key, { routeId, path });\n await handleFetcherLoader(\n key,\n routeId,\n path,\n matches,\n scopedContext,\n fogOfWar.active,\n flushSync,\n preventScrollReset,\n submission\n );\n }\n async function handleFetcherAction(key, routeId, path, requestMatches, scopedContext, isFogOfWar, flushSync, preventScrollReset, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n flushSync\n });\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(\n init.history,\n path,\n abortController.signal,\n submission\n );\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(\n requestMatches,\n new URL(fetchRequest.url).pathname,\n fetchRequest.signal,\n key\n );\n if (discoverResult.type === \"aborted\") {\n return;\n } else if (discoverResult.type === \"error\") {\n setFetcherError(key, routeId, discoverResult.error, { flushSync });\n return;\n } else if (!discoverResult.matches) {\n setFetcherError(\n key,\n routeId,\n getInternalRouterError(404, { pathname: path }),\n { flushSync }\n );\n return;\n } else {\n requestMatches = discoverResult.matches;\n }\n }\n let match = getTargetMatch(requestMatches, path);\n if (!match.route.action && !match.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId\n });\n setFetcherError(key, routeId, error, { flushSync });\n return;\n }\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let fetchMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n fetchRequest,\n requestMatches,\n match,\n hydrationRouteProperties2,\n scopedContext\n );\n let actionResults = await callDataStrategy(\n fetchRequest,\n fetchMatches,\n scopedContext,\n key\n );\n let actionResult = actionResults[match.route.id];\n if (!actionResult) {\n for (let match2 of fetchMatches) {\n if (actionResults[match2.route.id]) {\n actionResult = actionResults[match2.route.id];\n break;\n }\n }\n }\n if (fetchRequest.signal.aborted) {\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n if (fetchersQueuedForDeletion.has(key)) {\n if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n updateFetcherState(key, getDoneFetcher(void 0));\n return;\n }\n } else {\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n updateFetcherState(key, getDoneFetcher(void 0));\n return;\n } else {\n fetchRedirectIds.add(key);\n updateFetcherState(key, getLoadingFetcher(submission));\n return startRedirectNavigation(fetchRequest, actionResult, false, {\n fetcherSubmission: submission,\n preventScrollReset\n });\n }\n }\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n }\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(\n init.history,\n nextLocation,\n abortController.signal\n );\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches = state.navigation.state !== \"idle\" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n invariant(matches, \"Didn't find any matches after fetcher action\");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n let { dsMatches, revalidatingFetchers } = getMatchesToLoad(\n revalidationRequest,\n scopedContext,\n mapRouteProperties2,\n manifest,\n init.history,\n state,\n matches,\n submission,\n nextLocation,\n hydrationRouteProperties2,\n false,\n isRevalidationRequired,\n cancelledFetcherLoads,\n fetchersQueuedForDeletion,\n fetchLoadMatches,\n fetchRedirectIds,\n routesToUse,\n basename,\n init.patchRoutesOnNavigation != null,\n [match.route.id, actionResult]\n );\n revalidatingFetchers.filter((rf) => rf.key !== key).forEach((rf) => {\n let staleKey = rf.key;\n let existingFetcher2 = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(\n void 0,\n existingFetcher2 ? existingFetcher2.data : void 0\n );\n state.fetchers.set(staleKey, revalidatingFetcher);\n abortFetcher(staleKey);\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n updateState({ fetchers: new Map(state.fetchers) });\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));\n abortController.signal.addEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(\n dsMatches,\n revalidatingFetchers,\n revalidationRequest,\n scopedContext\n );\n if (abortController.signal.aborted) {\n return;\n }\n abortController.signal.removeEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key));\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n let redirect2 = findRedirect(loaderResults);\n if (redirect2) {\n return startRedirectNavigation(\n revalidationRequest,\n redirect2.result,\n false,\n { preventScrollReset }\n );\n }\n redirect2 = findRedirect(fetcherResults);\n if (redirect2) {\n fetchRedirectIds.add(redirect2.key);\n return startRedirectNavigation(\n revalidationRequest,\n redirect2.result,\n false,\n { preventScrollReset }\n );\n }\n let { loaderData, errors } = processLoaderData(\n state,\n matches,\n loaderResults,\n void 0,\n revalidatingFetchers,\n fetcherResults\n );\n abortStaleFetchLoads(loadId);\n if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n updateState({\n errors,\n loaderData: mergeLoaderData(\n state.loaderData,\n loaderData,\n matches,\n errors\n ),\n fetchers: new Map(state.fetchers)\n });\n isRevalidationRequired = false;\n }\n }\n async function handleFetcherLoader(key, routeId, path, matches, scopedContext, isFogOfWar, flushSync, preventScrollReset, submission) {\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(\n key,\n getLoadingFetcher(\n submission,\n existingFetcher ? existingFetcher.data : void 0\n ),\n { flushSync }\n );\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(\n init.history,\n path,\n abortController.signal\n );\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(\n matches,\n new URL(fetchRequest.url).pathname,\n fetchRequest.signal,\n key\n );\n if (discoverResult.type === \"aborted\") {\n return;\n } else if (discoverResult.type === \"error\") {\n setFetcherError(key, routeId, discoverResult.error, { flushSync });\n return;\n } else if (!discoverResult.matches) {\n setFetcherError(\n key,\n routeId,\n getInternalRouterError(404, { pathname: path }),\n { flushSync }\n );\n return;\n } else {\n matches = discoverResult.matches;\n }\n }\n let match = getTargetMatch(matches, path);\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let dsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n fetchRequest,\n matches,\n match,\n hydrationRouteProperties2,\n scopedContext\n );\n let results = await callDataStrategy(\n fetchRequest,\n dsMatches,\n scopedContext,\n key\n );\n let result = results[match.route.id];\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n if (fetchRequest.signal.aborted) {\n return;\n }\n if (fetchersQueuedForDeletion.has(key)) {\n updateFetcherState(key, getDoneFetcher(void 0));\n return;\n }\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n updateFetcherState(key, getDoneFetcher(void 0));\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(fetchRequest, result, false, {\n preventScrollReset\n });\n return;\n }\n }\n if (isErrorResult(result)) {\n setFetcherError(key, routeId, result.error);\n return;\n }\n updateFetcherState(key, getDoneFetcher(result.data));\n }\n async function startRedirectNavigation(request, redirect2, isNavigation, {\n submission,\n fetcherSubmission,\n preventScrollReset,\n replace: replace2\n } = {}) {\n if (!isNavigation) {\n pendingPopstateNavigationDfd?.resolve();\n pendingPopstateNavigationDfd = null;\n }\n if (redirect2.response.headers.has(\"X-Remix-Revalidate\")) {\n isRevalidationRequired = true;\n }\n let location = redirect2.response.headers.get(\"Location\");\n invariant(location, \"Expected a Location header on the redirect Response\");\n location = normalizeRedirectLocation(\n location,\n new URL(request.url),\n basename\n );\n let redirectLocation = createLocation(state.location, location, {\n _isRedirect: true\n });\n if (isBrowser2) {\n let isDocumentReload = false;\n if (redirect2.response.headers.has(\"X-Remix-Reload-Document\")) {\n isDocumentReload = true;\n } else if (isAbsoluteUrl(location)) {\n const url = createBrowserURLImpl(location, true);\n isDocumentReload = // Hard reload if it's an absolute URL to a new origin\n url.origin !== routerWindow.location.origin || // Hard reload if it's an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n if (isDocumentReload) {\n if (replace2) {\n routerWindow.location.replace(location);\n } else {\n routerWindow.location.assign(location);\n }\n return;\n }\n }\n pendingNavigationController = null;\n let redirectNavigationType = replace2 === true || redirect2.response.headers.has(\"X-Remix-Replace\") ? \"REPLACE\" /* Replace */ : \"PUSH\" /* Push */;\n let { formMethod, formAction, formEncType } = state.navigation;\n if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n let activeSubmission = submission || fetcherSubmission;\n if (redirectPreserveMethodStatusCodes.has(redirect2.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n await startNavigation(redirectNavigationType, redirectLocation, {\n submission: {\n ...activeSubmission,\n formAction: location\n },\n // Preserve these flags across redirects\n preventScrollReset: preventScrollReset || pendingPreventScrollReset,\n enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0\n });\n } else {\n let overrideNavigation = getLoadingNavigation(\n redirectLocation,\n submission\n );\n await startNavigation(redirectNavigationType, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve these flags across redirects\n preventScrollReset: preventScrollReset || pendingPreventScrollReset,\n enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0\n });\n }\n }\n async function callDataStrategy(request, matches, scopedContext, fetcherKey) {\n let results;\n let dataResults = {};\n try {\n results = await callDataStrategyImpl(\n dataStrategyImpl,\n request,\n matches,\n fetcherKey,\n scopedContext,\n false\n );\n } catch (e) {\n matches.filter((m) => m.shouldLoad).forEach((m) => {\n dataResults[m.route.id] = {\n type: \"error\" /* error */,\n error: e\n };\n });\n return dataResults;\n }\n if (request.signal.aborted) {\n return dataResults;\n }\n for (let [routeId, result] of Object.entries(results)) {\n if (isRedirectDataStrategyResult(result)) {\n let response = result.result;\n dataResults[routeId] = {\n type: \"redirect\" /* redirect */,\n response: normalizeRelativeRoutingRedirectResponse(\n response,\n request,\n routeId,\n matches,\n basename\n )\n };\n } else {\n dataResults[routeId] = await convertDataStrategyResultToDataResult(result);\n }\n }\n return dataResults;\n }\n async function callLoadersAndMaybeResolveData(matches, fetchersToLoad, request, scopedContext) {\n let loaderResultsPromise = callDataStrategy(\n request,\n matches,\n scopedContext,\n null\n );\n let fetcherResultsPromise = Promise.all(\n fetchersToLoad.map(async (f) => {\n if (f.matches && f.match && f.request && f.controller) {\n let results = await callDataStrategy(\n f.request,\n f.matches,\n scopedContext,\n f.key\n );\n let result = results[f.match.route.id];\n return { [f.key]: result };\n } else {\n return Promise.resolve({\n [f.key]: {\n type: \"error\" /* error */,\n error: getInternalRouterError(404, {\n pathname: f.path\n })\n }\n });\n }\n })\n );\n let loaderResults = await loaderResultsPromise;\n let fetcherResults = (await fetcherResultsPromise).reduce(\n (acc, r) => Object.assign(acc, r),\n {}\n );\n return {\n loaderResults,\n fetcherResults\n };\n }\n function interruptActiveLoads() {\n isRevalidationRequired = true;\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.add(key);\n }\n abortFetcher(key);\n });\n }\n function updateFetcherState(key, fetcher, opts = {}) {\n state.fetchers.set(key, fetcher);\n updateState(\n { fetchers: new Map(state.fetchers) },\n { flushSync: (opts && opts.flushSync) === true }\n );\n }\n function setFetcherError(key, routeId, error, opts = {}) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState(\n {\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n },\n { flushSync: (opts && opts.flushSync) === true }\n );\n }\n function getFetcher(key) {\n activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n if (fetchersQueuedForDeletion.has(key)) {\n fetchersQueuedForDeletion.delete(key);\n }\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n function resetFetcher(key, opts) {\n abortFetcher(key, opts?.reason);\n updateFetcherState(key, getDoneFetcher(null));\n }\n function deleteFetcher(key) {\n let fetcher = state.fetchers.get(key);\n if (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n fetchersQueuedForDeletion.delete(key);\n cancelledFetcherLoads.delete(key);\n state.fetchers.delete(key);\n }\n function queueFetcherForDeletion(key) {\n let count = (activeFetchers.get(key) || 0) - 1;\n if (count <= 0) {\n activeFetchers.delete(key);\n fetchersQueuedForDeletion.add(key);\n } else {\n activeFetchers.set(key, count);\n }\n updateState({ fetchers: new Map(state.fetchers) });\n }\n function abortFetcher(key, reason) {\n let controller = fetchControllers.get(key);\n if (controller) {\n controller.abort(reason);\n fetchControllers.delete(key);\n }\n }\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n function markFetchRedirectsDone() {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n function getBlocker(key, fn) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n return blocker;\n }\n function deleteBlocker(key) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n function updateBlocker(key, newBlocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n invariant(\n blocker.state === \"unblocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"proceeding\" || blocker.state === \"blocked\" && newBlocker.state === \"unblocked\" || blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\",\n `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}`\n );\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({ blockers });\n }\n function shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction\n }) {\n if (blockerFunctions.size === 0) {\n return;\n }\n if (blockerFunctions.size > 1) {\n warning(false, \"A router only supports one blocker at a time\");\n }\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n if (blocker && blocker.state === \"proceeding\") {\n return;\n }\n if (blockerFunction({ currentLocation, nextLocation, historyAction })) {\n return blockerKey;\n }\n }\n function handleNavigational404(pathname) {\n let error = getInternalRouterError(404, { pathname });\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let { matches, route } = getShortCircuitMatches(routesToUse);\n return { notFoundMatches: matches, route, error };\n }\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions2 = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey2 = getKey || null;\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({ restoreScrollPosition: y });\n }\n }\n return () => {\n savedScrollPositions2 = null;\n getScrollPosition = null;\n getScrollRestorationKey2 = null;\n };\n }\n function getScrollKey(location, matches) {\n if (getScrollRestorationKey2) {\n let key = getScrollRestorationKey2(\n location,\n matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))\n );\n return key || location.key;\n }\n return location.key;\n }\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions2 && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions2[key] = getScrollPosition();\n }\n }\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions2) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions2[key];\n if (typeof y === \"number\") {\n return y;\n }\n }\n return null;\n }\n function checkFogOfWar(matches, routesToUse, pathname) {\n if (init.patchRoutesOnNavigation) {\n if (!matches) {\n let fogMatches = matchRoutesImpl(\n routesToUse,\n pathname,\n basename,\n true\n );\n return { active: true, matches: fogMatches || [] };\n } else {\n if (Object.keys(matches[0].params).length > 0) {\n let partialMatches = matchRoutesImpl(\n routesToUse,\n pathname,\n basename,\n true\n );\n return { active: true, matches: partialMatches };\n }\n }\n }\n return { active: false, matches: null };\n }\n async function discoverRoutes(matches, pathname, signal, fetcherKey) {\n if (!init.patchRoutesOnNavigation) {\n return { type: \"success\", matches };\n }\n let partialMatches = matches;\n while (true) {\n let isNonHMR = inFlightDataRoutes == null;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let localManifest = manifest;\n try {\n await init.patchRoutesOnNavigation({\n signal,\n path: pathname,\n matches: partialMatches,\n fetcherKey,\n patch: (routeId, children) => {\n if (signal.aborted) return;\n patchRoutesImpl(\n routeId,\n children,\n routesToUse,\n localManifest,\n mapRouteProperties2,\n false\n );\n }\n });\n } catch (e) {\n return { type: \"error\", error: e, partialMatches };\n } finally {\n if (isNonHMR && !signal.aborted) {\n dataRoutes = [...dataRoutes];\n }\n }\n if (signal.aborted) {\n return { type: \"aborted\" };\n }\n let newMatches = matchRoutes(routesToUse, pathname, basename);\n let newPartialMatches = null;\n if (newMatches) {\n if (Object.keys(newMatches[0].params).length === 0) {\n return { type: \"success\", matches: newMatches };\n } else {\n newPartialMatches = matchRoutesImpl(\n routesToUse,\n pathname,\n basename,\n true\n );\n let matchedDeeper = newPartialMatches && partialMatches.length < newPartialMatches.length && compareMatches(\n partialMatches,\n newPartialMatches.slice(0, partialMatches.length)\n );\n if (!matchedDeeper) {\n return { type: \"success\", matches: newMatches };\n }\n }\n }\n if (!newPartialMatches) {\n newPartialMatches = matchRoutesImpl(\n routesToUse,\n pathname,\n basename,\n true\n );\n }\n if (!newPartialMatches || compareMatches(partialMatches, newPartialMatches)) {\n return { type: \"success\", matches: null };\n }\n partialMatches = newPartialMatches;\n }\n }\n function compareMatches(a, b) {\n return a.length === b.length && a.every((m, i) => m.route.id === b[i].route.id);\n }\n function _internalSetRoutes(newRoutes) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(\n newRoutes,\n mapRouteProperties2,\n void 0,\n manifest\n );\n }\n function patchRoutes(routeId, children, unstable_allowElementMutations = false) {\n let isNonHMR = inFlightDataRoutes == null;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n patchRoutesImpl(\n routeId,\n children,\n routesToUse,\n manifest,\n mapRouteProperties2,\n unstable_allowElementMutations\n );\n if (isNonHMR) {\n dataRoutes = [...dataRoutes];\n updateState({});\n }\n }\n router = {\n get basename() {\n return basename;\n },\n get future() {\n return future;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return routerWindow;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch: fetch2,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: (to) => init.history.createHref(to),\n encodeLocation: (to) => init.history.encodeLocation(to),\n getFetcher,\n resetFetcher,\n deleteFetcher: queueFetcherForDeletion,\n dispose,\n getBlocker,\n deleteBlocker,\n patchRoutes,\n _internalFetchControllers: fetchControllers,\n // TODO: Remove setRoutes, it's temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes,\n _internalSetStateDoNotUseOrYouWillBreakYourApp(newState) {\n updateState(newState);\n }\n };\n if (init.unstable_instrumentations) {\n router = instrumentClientSideRouter(\n router,\n init.unstable_instrumentations.map((i) => i.router).filter(Boolean)\n );\n }\n return router;\n}\nfunction createStaticHandler(routes, opts) {\n invariant(\n routes.length > 0,\n \"You must provide a non-empty routes array to createStaticHandler\"\n );\n let manifest = {};\n let basename = (opts ? opts.basename : null) || \"/\";\n let _mapRouteProperties = opts?.mapRouteProperties || defaultMapRouteProperties;\n let mapRouteProperties2 = _mapRouteProperties;\n if (opts?.unstable_instrumentations) {\n let instrumentations = opts.unstable_instrumentations;\n mapRouteProperties2 = (route) => {\n return {\n ..._mapRouteProperties(route),\n ...getRouteInstrumentationUpdates(\n instrumentations.map((i) => i.route).filter(Boolean),\n route\n )\n };\n };\n }\n let dataRoutes = convertRoutesToDataRoutes(\n routes,\n mapRouteProperties2,\n void 0,\n manifest\n );\n async function query(request, {\n requestContext,\n filterMatchesToLoad,\n skipLoaderErrorBubbling,\n skipRevalidation,\n dataStrategy,\n generateMiddlewareResponse\n } = {}) {\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n requestContext = requestContext != null ? requestContext : new RouterContextProvider();\n if (!isValidMethod(method) && method !== \"HEAD\") {\n let error = getInternalRouterError(405, { method });\n let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes);\n let staticContext = {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;\n } else if (!matches) {\n let error = getInternalRouterError(404, { pathname: location.pathname });\n let { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes);\n let staticContext = {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;\n }\n if (generateMiddlewareResponse) {\n invariant(\n requestContext instanceof RouterContextProvider,\n \"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`\"\n );\n try {\n await loadLazyMiddlewareForMatches(\n matches,\n manifest,\n mapRouteProperties2\n );\n let renderedStaticContext;\n let response = await runServerMiddlewarePipeline(\n {\n request,\n unstable_pattern: getRoutePattern(matches),\n matches,\n params: matches[0].params,\n // If we're calling middleware then it must be enabled so we can cast\n // this to the proper type knowing it's not an `AppLoadContext`\n context: requestContext\n },\n async () => {\n let res = await generateMiddlewareResponse(\n async (revalidationRequest, opts2 = {}) => {\n let result2 = await queryImpl(\n revalidationRequest,\n location,\n matches,\n requestContext,\n dataStrategy || null,\n skipLoaderErrorBubbling === true,\n null,\n \"filterMatchesToLoad\" in opts2 ? opts2.filterMatchesToLoad ?? null : filterMatchesToLoad ?? null,\n skipRevalidation === true\n );\n if (isResponse(result2)) {\n return result2;\n }\n renderedStaticContext = { location, basename, ...result2 };\n return renderedStaticContext;\n }\n );\n return res;\n },\n async (error, routeId) => {\n if (isRedirectResponse(error)) {\n return error;\n }\n if (isResponse(error)) {\n try {\n error = new ErrorResponseImpl(\n error.status,\n error.statusText,\n await parseResponseBody(error)\n );\n } catch (e) {\n error = e;\n }\n }\n if (isDataWithResponseInit(error)) {\n error = dataWithResponseInitToErrorResponse(error);\n }\n if (renderedStaticContext) {\n if (routeId in renderedStaticContext.loaderData) {\n renderedStaticContext.loaderData[routeId] = void 0;\n }\n let staticContext = getStaticContextFromError(\n dataRoutes,\n renderedStaticContext,\n error,\n skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, routeId).route.id\n );\n return generateMiddlewareResponse(\n () => Promise.resolve(staticContext)\n );\n } else {\n let boundaryRouteId = skipLoaderErrorBubbling ? routeId : findNearestBoundary(\n matches,\n matches.find(\n (m) => m.route.id === routeId || m.route.loader\n )?.route.id || routeId\n ).route.id;\n let staticContext = {\n matches,\n location,\n basename,\n loaderData: {},\n actionData: null,\n errors: {\n [boundaryRouteId]: error\n },\n statusCode: isRouteErrorResponse(error) ? error.status : 500,\n actionHeaders: {},\n loaderHeaders: {}\n };\n return generateMiddlewareResponse(\n () => Promise.resolve(staticContext)\n );\n }\n }\n );\n invariant(isResponse(response), \"Expected a response in query()\");\n return response;\n } catch (e) {\n if (isResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n let result = await queryImpl(\n request,\n location,\n matches,\n requestContext,\n dataStrategy || null,\n skipLoaderErrorBubbling === true,\n null,\n filterMatchesToLoad || null,\n skipRevalidation === true\n );\n if (isResponse(result)) {\n return result;\n }\n return { location, basename, ...result };\n }\n async function queryRoute(request, {\n routeId,\n requestContext,\n dataStrategy,\n generateMiddlewareResponse\n } = {}) {\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n requestContext = requestContext != null ? requestContext : new RouterContextProvider();\n if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n throw getInternalRouterError(405, { method });\n } else if (!matches) {\n throw getInternalRouterError(404, { pathname: location.pathname });\n }\n let match = routeId ? matches.find((m) => m.route.id === routeId) : getTargetMatch(matches, location);\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n throw getInternalRouterError(404, { pathname: location.pathname });\n }\n if (generateMiddlewareResponse) {\n invariant(\n requestContext instanceof RouterContextProvider,\n \"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`\"\n );\n await loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2);\n let response = await runServerMiddlewarePipeline(\n {\n request,\n unstable_pattern: getRoutePattern(matches),\n matches,\n params: matches[0].params,\n // If we're calling middleware then it must be enabled so we can cast\n // this to the proper type knowing it's not an `AppLoadContext`\n context: requestContext\n },\n async () => {\n let res = await generateMiddlewareResponse(\n async (innerRequest) => {\n let result2 = await queryImpl(\n innerRequest,\n location,\n matches,\n requestContext,\n dataStrategy || null,\n false,\n match,\n null,\n false\n );\n let processed = handleQueryResult(result2);\n return isResponse(processed) ? processed : typeof processed === \"string\" ? new Response(processed) : Response.json(processed);\n }\n );\n return res;\n },\n (error) => {\n if (isDataWithResponseInit(error)) {\n return Promise.resolve(dataWithResponseInitToResponse(error));\n }\n if (isResponse(error)) {\n return Promise.resolve(error);\n }\n throw error;\n }\n );\n return response;\n }\n let result = await queryImpl(\n request,\n location,\n matches,\n requestContext,\n dataStrategy || null,\n false,\n match,\n null,\n false\n );\n return handleQueryResult(result);\n function handleQueryResult(result2) {\n if (isResponse(result2)) {\n return result2;\n }\n let error = result2.errors ? Object.values(result2.errors)[0] : void 0;\n if (error !== void 0) {\n throw error;\n }\n if (result2.actionData) {\n return Object.values(result2.actionData)[0];\n }\n if (result2.loaderData) {\n return Object.values(result2.loaderData)[0];\n }\n return void 0;\n }\n }\n async function queryImpl(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) {\n invariant(\n request.signal,\n \"query()/queryRoute() requests must contain an AbortController signal\"\n );\n try {\n if (isMutationMethod(request.method)) {\n let result2 = await submit(\n request,\n matches,\n routeMatch || getTargetMatch(matches, location),\n requestContext,\n dataStrategy,\n skipLoaderErrorBubbling,\n routeMatch != null,\n filterMatchesToLoad,\n skipRevalidation\n );\n return result2;\n }\n let result = await loadRouteData(\n request,\n matches,\n requestContext,\n dataStrategy,\n skipLoaderErrorBubbling,\n routeMatch,\n filterMatchesToLoad\n );\n return isResponse(result) ? result : {\n ...result,\n actionData: null,\n actionHeaders: {}\n };\n } catch (e) {\n if (isDataStrategyResult(e) && isResponse(e.result)) {\n if (e.type === \"error\" /* error */) {\n throw e.result;\n }\n return e.result;\n }\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest, filterMatchesToLoad, skipRevalidation) {\n let result;\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: \"error\" /* error */,\n error\n };\n } else {\n let dsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n request,\n matches,\n actionMatch,\n [],\n requestContext\n );\n let results = await callDataStrategy(\n request,\n dsMatches,\n isRouteRequest,\n requestContext,\n dataStrategy\n );\n result = results[actionMatch.route.id];\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest);\n }\n }\n if (isRedirectResult(result)) {\n throw new Response(null, {\n status: result.response.status,\n headers: {\n Location: result.response.headers.get(\"Location\")\n }\n });\n }\n if (isRouteRequest) {\n if (isErrorResult(result)) {\n throw result.error;\n }\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: { [actionMatch.route.id]: result.data },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n if (skipRevalidation) {\n if (isErrorResult(result)) {\n let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n return {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n actionData: null,\n actionHeaders: {\n ...result.headers ? { [actionMatch.route.id]: result.headers } : {}\n },\n matches,\n loaderData: {},\n errors: {\n [boundaryMatch.route.id]: result.error\n },\n loaderHeaders: {}\n };\n } else {\n return {\n actionData: {\n [actionMatch.route.id]: result.data\n },\n actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {},\n matches,\n loaderData: {},\n errors: null,\n statusCode: result.statusCode || 200,\n loaderHeaders: {}\n };\n }\n }\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n if (isErrorResult(result)) {\n let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n let handlerContext2 = await loadRouteData(\n loaderRequest,\n matches,\n requestContext,\n dataStrategy,\n skipLoaderErrorBubbling,\n null,\n filterMatchesToLoad,\n [boundaryMatch.route.id, result]\n );\n return {\n ...handlerContext2,\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n actionData: null,\n actionHeaders: {\n ...result.headers ? { [actionMatch.route.id]: result.headers } : {}\n }\n };\n }\n let handlerContext = await loadRouteData(\n loaderRequest,\n matches,\n requestContext,\n dataStrategy,\n skipLoaderErrorBubbling,\n null,\n filterMatchesToLoad\n );\n return {\n ...handlerContext,\n actionData: {\n [actionMatch.route.id]: result.data\n },\n // action status codes take precedence over loader status codes\n ...result.statusCode ? { statusCode: result.statusCode } : {},\n actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}\n };\n }\n async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) {\n let isRouteRequest = routeMatch != null;\n if (isRouteRequest && !routeMatch?.route.loader && !routeMatch?.route.lazy) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch?.route.id\n });\n }\n let dsMatches;\n if (routeMatch) {\n dsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n request,\n matches,\n routeMatch,\n [],\n requestContext\n );\n } else {\n let maxIdx = pendingActionResult && isErrorResult(pendingActionResult[1]) ? (\n // Up to but not including the boundary\n matches.findIndex((m) => m.route.id === pendingActionResult[0]) - 1\n ) : void 0;\n let pattern = getRoutePattern(matches);\n dsMatches = matches.map((match, index) => {\n if (maxIdx != null && index > maxIdx) {\n return getDataStrategyMatch(\n mapRouteProperties2,\n manifest,\n request,\n pattern,\n match,\n [],\n requestContext,\n false\n );\n }\n return getDataStrategyMatch(\n mapRouteProperties2,\n manifest,\n request,\n pattern,\n match,\n [],\n requestContext,\n (match.route.loader || match.route.lazy) != null && (!filterMatchesToLoad || filterMatchesToLoad(match))\n );\n });\n }\n if (!dataStrategy && !dsMatches.some((m) => m.shouldLoad)) {\n return {\n matches,\n loaderData: {},\n errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n [pendingActionResult[0]]: pendingActionResult[1].error\n } : null,\n statusCode: 200,\n loaderHeaders: {}\n };\n }\n let results = await callDataStrategy(\n request,\n dsMatches,\n isRouteRequest,\n requestContext,\n dataStrategy\n );\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest);\n }\n let handlerContext = processRouteLoaderData(\n matches,\n results,\n pendingActionResult,\n true,\n skipLoaderErrorBubbling\n );\n return {\n ...handlerContext,\n matches\n };\n }\n async function callDataStrategy(request, matches, isRouteRequest, requestContext, dataStrategy) {\n let results = await callDataStrategyImpl(\n dataStrategy || defaultDataStrategy,\n request,\n matches,\n null,\n requestContext,\n true\n );\n let dataResults = {};\n await Promise.all(\n matches.map(async (match) => {\n if (!(match.route.id in results)) {\n return;\n }\n let result = results[match.route.id];\n if (isRedirectDataStrategyResult(result)) {\n let response = result.result;\n throw normalizeRelativeRoutingRedirectResponse(\n response,\n request,\n match.route.id,\n matches,\n basename\n );\n }\n if (isRouteRequest) {\n if (isResponse(result.result)) {\n throw result;\n } else if (isDataWithResponseInit(result.result)) {\n throw dataWithResponseInitToResponse(result.result);\n }\n }\n dataResults[match.route.id] = await convertDataStrategyResultToDataResult(result);\n })\n );\n return dataResults;\n }\n return {\n dataRoutes,\n query,\n queryRoute\n };\n}\nfunction getStaticContextFromError(routes, handlerContext, error, boundaryId) {\n let errorBoundaryId = boundaryId || handlerContext._deepestRenderedBoundaryId || routes[0].id;\n return {\n ...handlerContext,\n statusCode: isRouteErrorResponse(error) ? error.status : 500,\n errors: {\n [errorBoundaryId]: error\n }\n };\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest) {\n if (request.signal.reason !== void 0) {\n throw request.signal.reason;\n }\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(\n `${method}() call aborted without an \\`AbortSignal.reason\\`: ${request.method} ${request.url}`\n );\n}\nfunction isSubmissionNavigation(opts) {\n return opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== void 0);\n}\nfunction normalizeTo(location, matches, basename, to, fromRouteId, relative) {\n let contextualMatches;\n let activeRouteMatch;\n if (fromRouteId) {\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n let path = resolveTo(\n to ? to : \".\",\n getResolveToMatches(contextualMatches),\n stripBasename(location.pathname, basename) || location.pathname,\n relative === \"path\"\n );\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n if ((to == null || to === \"\" || to === \".\") && activeRouteMatch) {\n let nakedIndex = hasNakedIndexQuery(path.search);\n if (activeRouteMatch.route.index && !nakedIndex) {\n path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n } else if (!activeRouteMatch.route.index && nakedIndex) {\n let params = new URLSearchParams(path.search);\n let indexValues = params.getAll(\"index\");\n params.delete(\"index\");\n indexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n let qs = params.toString();\n path.search = qs ? `?${qs}` : \"\";\n }\n }\n if (basename !== \"/\") {\n path.pathname = prependBasename({ basename, pathname: path.pathname });\n }\n return createPath(path);\n}\nfunction normalizeNavigateOptions(isFetcher, path, opts) {\n if (!opts || !isSubmissionNavigation(opts)) {\n return { path };\n }\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, { method: opts.formMethod })\n };\n }\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, { type: \"invalid-body\" })\n });\n let rawFormMethod = opts.formMethod || \"get\";\n let formMethod = rawFormMethod.toUpperCase();\n let formAction = stripHashFromPath(path);\n if (opts.body !== void 0) {\n if (opts.formEncType === \"text/plain\") {\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n let text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? (\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce(\n (acc, [name, value]) => `${acc}${name}=${value}\n`,\n \"\"\n )\n ) : String(opts.body);\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: void 0,\n json: void 0,\n text\n }\n };\n } else if (opts.formEncType === \"application/json\") {\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n try {\n let json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: void 0,\n json,\n text: void 0\n }\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n invariant(\n typeof FormData === \"function\",\n \"FormData is not available in this environment\"\n );\n let searchParams;\n let formData;\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n let submission = {\n formMethod,\n formAction,\n formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n formData,\n json: void 0,\n text: void 0\n };\n if (isMutationMethod(submission.formMethod)) {\n return { path, submission };\n }\n let parsedPath = parsePath(path);\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n parsedPath.search = `?${searchParams}`;\n return { path: createPath(parsedPath), submission };\n}\nfunction getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, pendingActionResult) {\n let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0;\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n let maxIdx;\n if (initialHydration && state.errors) {\n let boundaryId = Object.keys(state.errors)[0];\n maxIdx = matches.findIndex((m) => m.route.id === boundaryId);\n } else if (pendingActionResult && isErrorResult(pendingActionResult[1])) {\n let boundaryId = pendingActionResult[0];\n maxIdx = matches.findIndex((m) => m.route.id === boundaryId) - 1;\n }\n let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : void 0;\n let shouldSkipRevalidation = actionStatus && actionStatus >= 400;\n let baseShouldRevalidateArgs = {\n currentUrl,\n currentParams: state.matches[0]?.params || {},\n nextUrl,\n nextParams: matches[0].params,\n ...submission,\n actionResult,\n actionStatus\n };\n let pattern = getRoutePattern(matches);\n let dsMatches = matches.map((match, index) => {\n let { route } = match;\n let forceShouldLoad = null;\n if (maxIdx != null && index > maxIdx) {\n forceShouldLoad = false;\n } else if (route.lazy) {\n forceShouldLoad = true;\n } else if (!routeHasLoaderOrMiddleware(route)) {\n forceShouldLoad = false;\n } else if (initialHydration) {\n forceShouldLoad = shouldLoadRouteOnHydration(\n route,\n state.loaderData,\n state.errors\n );\n } else if (isNewLoader(state.loaderData, state.matches[index], match)) {\n forceShouldLoad = true;\n }\n if (forceShouldLoad !== null) {\n return getDataStrategyMatch(\n mapRouteProperties2,\n manifest,\n request,\n pattern,\n match,\n lazyRoutePropertiesToSkip,\n scopedContext,\n forceShouldLoad\n );\n }\n let defaultShouldRevalidate = shouldSkipRevalidation ? false : (\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search || // Search params affect all loaders\n currentUrl.search !== nextUrl.search || isNewRouteInstance(state.matches[index], match)\n );\n let shouldRevalidateArgs = {\n ...baseShouldRevalidateArgs,\n defaultShouldRevalidate\n };\n let shouldLoad = shouldRevalidateLoader(match, shouldRevalidateArgs);\n return getDataStrategyMatch(\n mapRouteProperties2,\n manifest,\n request,\n pattern,\n match,\n lazyRoutePropertiesToSkip,\n scopedContext,\n shouldLoad,\n shouldRevalidateArgs\n );\n });\n let revalidatingFetchers = [];\n fetchLoadMatches.forEach((f, key) => {\n if (initialHydration || !matches.some((m) => m.route.id === f.routeId) || fetchersQueuedForDeletion.has(key)) {\n return;\n }\n let fetcher = state.fetchers.get(key);\n let isMidInitialLoad = fetcher && fetcher.state !== \"idle\" && fetcher.data === void 0;\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n if (!fetcherMatches) {\n if (hasPatchRoutesOnNavigation && isMidInitialLoad) {\n return;\n }\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n request: null,\n controller: null\n });\n return;\n }\n if (fetchRedirectIds.has(key)) {\n return;\n }\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n let fetchController = new AbortController();\n let fetchRequest = createClientSideRequest(\n history,\n f.path,\n fetchController.signal\n );\n let fetcherDsMatches = null;\n if (cancelledFetcherLoads.has(key)) {\n cancelledFetcherLoads.delete(key);\n fetcherDsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n fetchRequest,\n fetcherMatches,\n fetcherMatch,\n lazyRoutePropertiesToSkip,\n scopedContext\n );\n } else if (isMidInitialLoad) {\n if (isRevalidationRequired) {\n fetcherDsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n fetchRequest,\n fetcherMatches,\n fetcherMatch,\n lazyRoutePropertiesToSkip,\n scopedContext\n );\n }\n } else {\n let shouldRevalidateArgs = {\n ...baseShouldRevalidateArgs,\n defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired\n };\n if (shouldRevalidateLoader(fetcherMatch, shouldRevalidateArgs)) {\n fetcherDsMatches = getTargetedDataStrategyMatches(\n mapRouteProperties2,\n manifest,\n fetchRequest,\n fetcherMatches,\n fetcherMatch,\n lazyRoutePropertiesToSkip,\n scopedContext,\n shouldRevalidateArgs\n );\n }\n }\n if (fetcherDsMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherDsMatches,\n match: fetcherMatch,\n request: fetchRequest,\n controller: fetchController\n });\n }\n });\n return { dsMatches, revalidatingFetchers };\n}\nfunction routeHasLoaderOrMiddleware(route) {\n return route.loader != null || route.middleware != null && route.middleware.length > 0;\n}\nfunction shouldLoadRouteOnHydration(route, loaderData, errors) {\n if (route.lazy) {\n return true;\n }\n if (!routeHasLoaderOrMiddleware(route)) {\n return false;\n }\n let hasData = loaderData != null && route.id in loaderData;\n let hasError = errors != null && errors[route.id] !== void 0;\n if (!hasData && hasError) {\n return false;\n }\n if (typeof route.loader === \"function\" && route.loader.hydrate === true) {\n return true;\n }\n return !hasData && !hasError;\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew = (\n // [a] -> [a, b]\n !currentMatch || // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id\n );\n let isMissingData = !currentLoaderData.hasOwnProperty(match.route.id);\n return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n return arg.defaultShouldRevalidate;\n}\nfunction patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties2, allowElementMutations) {\n let childrenToPatch;\n if (routeId) {\n let route = manifest[routeId];\n invariant(\n route,\n `No route found to patch children into: routeId = ${routeId}`\n );\n if (!route.children) {\n route.children = [];\n }\n childrenToPatch = route.children;\n } else {\n childrenToPatch = routesToUse;\n }\n let uniqueChildren = [];\n let existingChildren = [];\n children.forEach((newRoute) => {\n let existingRoute = childrenToPatch.find(\n (existingRoute2) => isSameRoute(newRoute, existingRoute2)\n );\n if (existingRoute) {\n existingChildren.push({ existingRoute, newRoute });\n } else {\n uniqueChildren.push(newRoute);\n }\n });\n if (uniqueChildren.length > 0) {\n let newRoutes = convertRoutesToDataRoutes(\n uniqueChildren,\n mapRouteProperties2,\n [routeId || \"_\", \"patch\", String(childrenToPatch?.length || \"0\")],\n manifest\n );\n childrenToPatch.push(...newRoutes);\n }\n if (allowElementMutations && existingChildren.length > 0) {\n for (let i = 0; i < existingChildren.length; i++) {\n let { existingRoute, newRoute } = existingChildren[i];\n let existingRouteTyped = existingRoute;\n let [newRouteTyped] = convertRoutesToDataRoutes(\n [newRoute],\n mapRouteProperties2,\n [],\n // Doesn't matter for mutated routes since they already have an id\n {},\n // Don't touch the manifest here since we're updating in place\n true\n );\n Object.assign(existingRouteTyped, {\n element: newRouteTyped.element ? newRouteTyped.element : existingRouteTyped.element,\n errorElement: newRouteTyped.errorElement ? newRouteTyped.errorElement : existingRouteTyped.errorElement,\n hydrateFallbackElement: newRouteTyped.hydrateFallbackElement ? newRouteTyped.hydrateFallbackElement : existingRouteTyped.hydrateFallbackElement\n });\n }\n }\n}\nfunction isSameRoute(newRoute, existingRoute) {\n if (\"id\" in newRoute && \"id\" in existingRoute && newRoute.id === existingRoute.id) {\n return true;\n }\n if (!(newRoute.index === existingRoute.index && newRoute.path === existingRoute.path && newRoute.caseSensitive === existingRoute.caseSensitive)) {\n return false;\n }\n if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {\n return true;\n }\n return newRoute.children.every(\n (aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))\n );\n}\nvar lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();\nvar loadLazyRouteProperty = ({\n key,\n route,\n manifest,\n mapRouteProperties: mapRouteProperties2\n}) => {\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, \"No route found in manifest\");\n if (!routeToUpdate.lazy || typeof routeToUpdate.lazy !== \"object\") {\n return;\n }\n let lazyFn = routeToUpdate.lazy[key];\n if (!lazyFn) {\n return;\n }\n let cache = lazyRoutePropertyCache.get(routeToUpdate);\n if (!cache) {\n cache = {};\n lazyRoutePropertyCache.set(routeToUpdate, cache);\n }\n let cachedPromise = cache[key];\n if (cachedPromise) {\n return cachedPromise;\n }\n let propertyPromise = (async () => {\n let isUnsupported = isUnsupportedLazyRouteObjectKey(key);\n let staticRouteValue = routeToUpdate[key];\n let isStaticallyDefined = staticRouteValue !== void 0 && key !== \"hasErrorBoundary\";\n if (isUnsupported) {\n warning(\n !isUnsupported,\n \"Route property \" + key + \" is not a supported lazy route property. This property will be ignored.\"\n );\n cache[key] = Promise.resolve();\n } else if (isStaticallyDefined) {\n warning(\n false,\n `Route \"${routeToUpdate.id}\" has a static property \"${key}\" defined. The lazy property will be ignored.`\n );\n } else {\n let value = await lazyFn();\n if (value != null) {\n Object.assign(routeToUpdate, { [key]: value });\n Object.assign(routeToUpdate, mapRouteProperties2(routeToUpdate));\n }\n }\n if (typeof routeToUpdate.lazy === \"object\") {\n routeToUpdate.lazy[key] = void 0;\n if (Object.values(routeToUpdate.lazy).every((value) => value === void 0)) {\n routeToUpdate.lazy = void 0;\n }\n }\n })();\n cache[key] = propertyPromise;\n return propertyPromise;\n};\nvar lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();\nfunction loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRoutePropertiesToSkip) {\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, \"No route found in manifest\");\n if (!route.lazy) {\n return {\n lazyRoutePromise: void 0,\n lazyHandlerPromise: void 0\n };\n }\n if (typeof route.lazy === \"function\") {\n let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);\n if (cachedPromise) {\n return {\n lazyRoutePromise: cachedPromise,\n lazyHandlerPromise: cachedPromise\n };\n }\n let lazyRoutePromise2 = (async () => {\n invariant(\n typeof route.lazy === \"function\",\n \"No lazy route function found\"\n );\n let lazyRoute = await route.lazy();\n let routeUpdates = {};\n for (let lazyRouteProperty in lazyRoute) {\n let lazyValue = lazyRoute[lazyRouteProperty];\n if (lazyValue === void 0) {\n continue;\n }\n let isUnsupported = isUnsupportedLazyRouteFunctionKey(lazyRouteProperty);\n let staticRouteValue = routeToUpdate[lazyRouteProperty];\n let isStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== \"hasErrorBoundary\";\n if (isUnsupported) {\n warning(\n !isUnsupported,\n \"Route property \" + lazyRouteProperty + \" is not a supported property to be returned from a lazy route function. This property will be ignored.\"\n );\n } else if (isStaticallyDefined) {\n warning(\n !isStaticallyDefined,\n `Route \"${routeToUpdate.id}\" has a static property \"${lazyRouteProperty}\" defined but its lazy function is also returning a value for this property. The lazy route property \"${lazyRouteProperty}\" will be ignored.`\n );\n } else {\n routeUpdates[lazyRouteProperty] = lazyValue;\n }\n }\n Object.assign(routeToUpdate, routeUpdates);\n Object.assign(routeToUpdate, {\n // To keep things framework agnostic, we use the provided `mapRouteProperties`\n // function to set the framework-aware properties (`element`/`hasErrorBoundary`)\n // since the logic will differ between frameworks.\n ...mapRouteProperties2(routeToUpdate),\n lazy: void 0\n });\n })();\n lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise2);\n lazyRoutePromise2.catch(() => {\n });\n return {\n lazyRoutePromise: lazyRoutePromise2,\n lazyHandlerPromise: lazyRoutePromise2\n };\n }\n let lazyKeys = Object.keys(route.lazy);\n let lazyPropertyPromises = [];\n let lazyHandlerPromise = void 0;\n for (let key of lazyKeys) {\n if (lazyRoutePropertiesToSkip && lazyRoutePropertiesToSkip.includes(key)) {\n continue;\n }\n let promise = loadLazyRouteProperty({\n key,\n route,\n manifest,\n mapRouteProperties: mapRouteProperties2\n });\n if (promise) {\n lazyPropertyPromises.push(promise);\n if (key === type) {\n lazyHandlerPromise = promise;\n }\n }\n }\n let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {\n }) : void 0;\n lazyRoutePromise?.catch(() => {\n });\n lazyHandlerPromise?.catch(() => {\n });\n return {\n lazyRoutePromise,\n lazyHandlerPromise\n };\n}\nfunction isNonNullable(value) {\n return value !== void 0;\n}\nfunction loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2) {\n let promises = matches.map(({ route }) => {\n if (typeof route.lazy !== \"object\" || !route.lazy.middleware) {\n return void 0;\n }\n return loadLazyRouteProperty({\n key: \"middleware\",\n route,\n manifest,\n mapRouteProperties: mapRouteProperties2\n });\n }).filter(isNonNullable);\n return promises.length > 0 ? Promise.all(promises) : void 0;\n}\nasync function defaultDataStrategy(args) {\n let matchesToLoad = args.matches.filter((m) => m.shouldLoad);\n let keyedResults = {};\n let results = await Promise.all(matchesToLoad.map((m) => m.resolve()));\n results.forEach((result, i) => {\n keyedResults[matchesToLoad[i].route.id] = result;\n });\n return keyedResults;\n}\nasync function defaultDataStrategyWithMiddleware(args) {\n if (!args.matches.some((m) => m.route.middleware)) {\n return defaultDataStrategy(args);\n }\n return runClientMiddlewarePipeline(args, () => defaultDataStrategy(args));\n}\nfunction runServerMiddlewarePipeline(args, handler, errorHandler) {\n return runMiddlewarePipeline(\n args,\n handler,\n processResult,\n isResponse,\n errorHandler\n );\n function processResult(result) {\n return isDataWithResponseInit(result) ? dataWithResponseInitToResponse(result) : result;\n }\n}\nfunction runClientMiddlewarePipeline(args, handler) {\n return runMiddlewarePipeline(\n args,\n handler,\n (r) => r,\n // No post-processing needed on the client\n isDataStrategyResults,\n errorHandler\n );\n function errorHandler(error, routeId, nextResult) {\n if (nextResult) {\n return Promise.resolve(\n Object.assign(nextResult.value, {\n [routeId]: { type: \"error\", result: error }\n })\n );\n } else {\n let { matches } = args;\n let maxBoundaryIdx = Math.min(\n // Throwing route\n Math.max(\n matches.findIndex((m) => m.route.id === routeId),\n 0\n ),\n // or the shallowest route that needs to load data\n Math.max(\n matches.findIndex((m) => m.shouldCallHandler()),\n 0\n )\n );\n let boundaryRouteId = findNearestBoundary(\n matches,\n matches[maxBoundaryIdx].route.id\n ).route.id;\n return Promise.resolve({\n [boundaryRouteId]: { type: \"error\", result: error }\n });\n }\n }\n}\nasync function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {\n let { matches, request, params, context, unstable_pattern } = args;\n let tuples = matches.flatMap(\n (m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []\n );\n let result = await callRouteMiddleware(\n {\n request,\n params,\n context,\n unstable_pattern\n },\n tuples,\n handler,\n processResult,\n isResult,\n errorHandler\n );\n return result;\n}\nasync function callRouteMiddleware(args, middlewares, handler, processResult, isResult, errorHandler, idx = 0) {\n let { request } = args;\n if (request.signal.aborted) {\n throw request.signal.reason ?? new Error(`Request aborted: ${request.method} ${request.url}`);\n }\n let tuple = middlewares[idx];\n if (!tuple) {\n let result = await handler();\n return result;\n }\n let [routeId, middleware] = tuple;\n let nextResult;\n let next = async () => {\n if (nextResult) {\n throw new Error(\"You may only call `next()` once per middleware\");\n }\n try {\n let result = await callRouteMiddleware(\n args,\n middlewares,\n handler,\n processResult,\n isResult,\n errorHandler,\n idx + 1\n );\n nextResult = { value: result };\n return nextResult.value;\n } catch (error) {\n nextResult = { value: await errorHandler(error, routeId, nextResult) };\n return nextResult.value;\n }\n };\n try {\n let value = await middleware(args, next);\n let result = value != null ? processResult(value) : void 0;\n if (isResult(result)) {\n return result;\n } else if (nextResult) {\n return result ?? nextResult.value;\n } else {\n nextResult = { value: await next() };\n return nextResult.value;\n }\n } catch (error) {\n let response = await errorHandler(error, routeId, nextResult);\n return response;\n }\n}\nfunction getDataStrategyMatchLazyPromises(mapRouteProperties2, manifest, request, match, lazyRoutePropertiesToSkip) {\n let lazyMiddlewarePromise = loadLazyRouteProperty({\n key: \"middleware\",\n route: match.route,\n manifest,\n mapRouteProperties: mapRouteProperties2\n });\n let lazyRoutePromises = loadLazyRoute(\n match.route,\n isMutationMethod(request.method) ? \"action\" : \"loader\",\n manifest,\n mapRouteProperties2,\n lazyRoutePropertiesToSkip\n );\n return {\n middleware: lazyMiddlewarePromise,\n route: lazyRoutePromises.lazyRoutePromise,\n handler: lazyRoutePromises.lazyHandlerPromise\n };\n}\nfunction getDataStrategyMatch(mapRouteProperties2, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null) {\n let isUsingNewApi = false;\n let _lazyPromises = getDataStrategyMatchLazyPromises(\n mapRouteProperties2,\n manifest,\n request,\n match,\n lazyRoutePropertiesToSkip\n );\n return {\n ...match,\n _lazyPromises,\n shouldLoad,\n shouldRevalidateArgs,\n shouldCallHandler(defaultShouldRevalidate) {\n isUsingNewApi = true;\n if (!shouldRevalidateArgs) {\n return shouldLoad;\n }\n if (typeof defaultShouldRevalidate === \"boolean\") {\n return shouldRevalidateLoader(match, {\n ...shouldRevalidateArgs,\n defaultShouldRevalidate\n });\n }\n return shouldRevalidateLoader(match, shouldRevalidateArgs);\n },\n resolve(handlerOverride) {\n let { lazy, loader, middleware } = match.route;\n let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);\n let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;\n if (callHandler && (isMutationMethod(request.method) || !isMiddlewareOnlyRoute)) {\n return callLoaderOrAction({\n request,\n unstable_pattern,\n match,\n lazyHandlerPromise: _lazyPromises?.handler,\n lazyRoutePromise: _lazyPromises?.route,\n handlerOverride,\n scopedContext\n });\n }\n return Promise.resolve({ type: \"data\" /* data */, result: void 0 });\n }\n };\n}\nfunction getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request, matches, targetMatch, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateArgs = null) {\n return matches.map((match) => {\n if (match.route.id !== targetMatch.route.id) {\n return {\n ...match,\n shouldLoad: false,\n shouldRevalidateArgs,\n shouldCallHandler: () => false,\n _lazyPromises: getDataStrategyMatchLazyPromises(\n mapRouteProperties2,\n manifest,\n request,\n match,\n lazyRoutePropertiesToSkip\n ),\n resolve: () => Promise.resolve({ type: \"data\", result: void 0 })\n };\n }\n return getDataStrategyMatch(\n mapRouteProperties2,\n manifest,\n request,\n getRoutePattern(matches),\n match,\n lazyRoutePropertiesToSkip,\n scopedContext,\n true,\n shouldRevalidateArgs\n );\n });\n}\nasync function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherKey, scopedContext, isStaticHandler) {\n if (matches.some((m) => m._lazyPromises?.middleware)) {\n await Promise.all(matches.map((m) => m._lazyPromises?.middleware));\n }\n let dataStrategyArgs = {\n request,\n unstable_pattern: getRoutePattern(matches),\n params: matches[0].params,\n context: scopedContext,\n matches\n };\n let runClientMiddleware = isStaticHandler ? () => {\n throw new Error(\n \"You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`\"\n );\n } : (cb) => {\n let typedDataStrategyArgs = dataStrategyArgs;\n return runClientMiddlewarePipeline(typedDataStrategyArgs, () => {\n return cb({\n ...typedDataStrategyArgs,\n fetcherKey,\n runClientMiddleware: () => {\n throw new Error(\n \"Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler\"\n );\n }\n });\n });\n };\n let results = await dataStrategyImpl({\n ...dataStrategyArgs,\n fetcherKey,\n runClientMiddleware\n });\n try {\n await Promise.all(\n matches.flatMap((m) => [\n m._lazyPromises?.handler,\n m._lazyPromises?.route\n ])\n );\n } catch (e) {\n }\n return results;\n}\nasync function callLoaderOrAction({\n request,\n unstable_pattern,\n match,\n lazyHandlerPromise,\n lazyRoutePromise,\n handlerOverride,\n scopedContext\n}) {\n let result;\n let onReject;\n let isAction = isMutationMethod(request.method);\n let type = isAction ? \"action\" : \"loader\";\n let runHandler = (handler) => {\n let reject;\n let abortPromise = new Promise((_, r) => reject = r);\n onReject = () => reject();\n request.signal.addEventListener(\"abort\", onReject);\n let actualHandler = (ctx) => {\n if (typeof handler !== \"function\") {\n return Promise.reject(\n new Error(\n `You cannot call the handler for a route which defines a boolean \"${type}\" [routeId: ${match.route.id}]`\n )\n );\n }\n return handler(\n {\n request,\n unstable_pattern,\n params: match.params,\n context: scopedContext\n },\n ...ctx !== void 0 ? [ctx] : []\n );\n };\n let handlerPromise = (async () => {\n try {\n let val = await (handlerOverride ? handlerOverride((ctx) => actualHandler(ctx)) : actualHandler());\n return { type: \"data\", result: val };\n } catch (e) {\n return { type: \"error\", result: e };\n }\n })();\n return Promise.race([handlerPromise, abortPromise]);\n };\n try {\n let handler = isAction ? match.route.action : match.route.loader;\n if (lazyHandlerPromise || lazyRoutePromise) {\n if (handler) {\n let handlerError;\n let [value] = await Promise.all([\n // If the handler throws, don't let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch((e) => {\n handlerError = e;\n }),\n // Ensure all lazy route promises are resolved before continuing\n lazyHandlerPromise,\n lazyRoutePromise\n ]);\n if (handlerError !== void 0) {\n throw handlerError;\n }\n result = value;\n } else {\n await lazyHandlerPromise;\n let handler2 = isAction ? match.route.action : match.route.loader;\n if (handler2) {\n [result] = await Promise.all([runHandler(handler2), lazyRoutePromise]);\n } else if (type === \"action\") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id\n });\n } else {\n return { type: \"data\" /* data */, result: void 0 };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname\n });\n } else {\n result = await runHandler(handler);\n }\n } catch (e) {\n return { type: \"error\" /* error */, result: e };\n } finally {\n if (onReject) {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n }\n return result;\n}\nasync function parseResponseBody(response) {\n let contentType = response.headers.get(\"Content-Type\");\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n return response.body == null ? null : response.json();\n }\n return response.text();\n}\nasync function convertDataStrategyResultToDataResult(dataStrategyResult) {\n let { result, type } = dataStrategyResult;\n if (isResponse(result)) {\n let data2;\n try {\n data2 = await parseResponseBody(result);\n } catch (e) {\n return { type: \"error\" /* error */, error: e };\n }\n if (type === \"error\" /* error */) {\n return {\n type: \"error\" /* error */,\n error: new ErrorResponseImpl(result.status, result.statusText, data2),\n statusCode: result.status,\n headers: result.headers\n };\n }\n return {\n type: \"data\" /* data */,\n data: data2,\n statusCode: result.status,\n headers: result.headers\n };\n }\n if (type === \"error\" /* error */) {\n if (isDataWithResponseInit(result)) {\n if (result.data instanceof Error) {\n return {\n type: \"error\" /* error */,\n error: result.data,\n statusCode: result.init?.status,\n headers: result.init?.headers ? new Headers(result.init.headers) : void 0\n };\n }\n return {\n type: \"error\" /* error */,\n error: dataWithResponseInitToErrorResponse(result),\n statusCode: isRouteErrorResponse(result) ? result.status : void 0,\n headers: result.init?.headers ? new Headers(result.init.headers) : void 0\n };\n }\n return {\n type: \"error\" /* error */,\n error: result,\n statusCode: isRouteErrorResponse(result) ? result.status : void 0\n };\n }\n if (isDataWithResponseInit(result)) {\n return {\n type: \"data\" /* data */,\n data: result.data,\n statusCode: result.init?.status,\n headers: result.init?.headers ? new Headers(result.init.headers) : void 0\n };\n }\n return { type: \"data\" /* data */, data: result };\n}\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename) {\n let location = response.headers.get(\"Location\");\n invariant(\n location,\n \"Redirects returned/thrown from loaders/actions must have a Location header\"\n );\n if (!isAbsoluteUrl(location)) {\n let trimmedMatches = matches.slice(\n 0,\n matches.findIndex((m) => m.route.id === routeId) + 1\n );\n location = normalizeTo(\n new URL(request.url),\n trimmedMatches,\n basename,\n location\n );\n response.headers.set(\"Location\", location);\n }\n return response;\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename) {\n if (isAbsoluteUrl(location)) {\n let normalizedLocation = location;\n let url = normalizedLocation.startsWith(\"//\") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n return url.pathname + url.search + url.hash;\n }\n }\n return location;\n}\nfunction createClientSideRequest(history, location, signal, submission) {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init = { signal };\n if (submission && isMutationMethod(submission.formMethod)) {\n let { formMethod, formEncType } = submission;\n init.method = formMethod.toUpperCase();\n if (formEncType === \"application/json\") {\n init.headers = new Headers({ \"Content-Type\": formEncType });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === \"text/plain\") {\n init.body = submission.text;\n } else if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) {\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n init.body = submission.formData;\n }\n }\n return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n for (let [key, value] of formData.entries()) {\n searchParams.append(key, typeof value === \"string\" ? value : value.name);\n }\n return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\nfunction processRouteLoaderData(matches, results, pendingActionResult, isStaticHandler = false, skipLoaderErrorBubbling = false) {\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {};\n let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : void 0;\n matches.forEach((match) => {\n if (!(match.route.id in results)) {\n return;\n }\n let id = match.route.id;\n let result = results[id];\n invariant(\n !isRedirectResult(result),\n \"Cannot handle redirect results in processLoaderData\"\n );\n if (isErrorResult(result)) {\n let error = result.error;\n if (pendingError !== void 0) {\n error = pendingError;\n pendingError = void 0;\n }\n errors = errors || {};\n if (skipLoaderErrorBubbling) {\n errors[id] = error;\n } else {\n let boundaryMatch = findNearestBoundary(matches, id);\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n }\n if (!isStaticHandler) {\n loaderData[id] = ResetLoaderDataSymbol;\n }\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n loaderData[id] = result.data;\n if (result.statusCode && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n });\n if (pendingError !== void 0 && pendingActionResult) {\n errors = { [pendingActionResult[0]]: pendingError };\n if (pendingActionResult[2]) {\n loaderData[pendingActionResult[2]] = void 0;\n }\n }\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\nfunction processLoaderData(state, matches, results, pendingActionResult, revalidatingFetchers, fetcherResults) {\n let { loaderData, errors } = processRouteLoaderData(\n matches,\n results,\n pendingActionResult\n );\n revalidatingFetchers.filter((f) => !f.matches || f.matches.some((m) => m.shouldLoad)).forEach((rf) => {\n let { key, match, controller } = rf;\n if (controller && controller.signal.aborted) {\n return;\n }\n let result = fetcherResults[key];\n invariant(result, \"Did not find corresponding fetcher result\");\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = {\n ...errors,\n [boundaryMatch.route.id]: result.error\n };\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n invariant(false, \"Unhandled fetcher revalidation redirect\");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n });\n return { loaderData, errors };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n let mergedLoaderData = Object.entries(newLoaderData).filter(([, v]) => v !== ResetLoaderDataSymbol).reduce((merged, [k, v]) => {\n merged[k] = v;\n return merged;\n }, {});\n for (let match of matches) {\n let id = match.route.id;\n if (!newLoaderData.hasOwnProperty(id) && loaderData.hasOwnProperty(id) && match.route.loader) {\n mergedLoaderData[id] = loaderData[id];\n }\n if (errors && errors.hasOwnProperty(id)) {\n break;\n }\n }\n return mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n if (!pendingActionResult) {\n return {};\n }\n return isErrorResult(pendingActionResult[1]) ? {\n // Clear out prior actionData on errors\n actionData: {}\n } : {\n actionData: {\n [pendingActionResult[0]]: pendingActionResult[1].data\n }\n };\n}\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find((m) => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n let route = routes.length === 1 ? routes[0] : routes.find((r) => r.index || !r.path || r.path === \"/\") || {\n id: `__shim-error-route__`\n };\n return {\n matches: [\n {\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route\n }\n ],\n route\n };\n}\nfunction getInternalRouterError(status, {\n pathname,\n routeId,\n method,\n type,\n message\n} = {}) {\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n if (status === 400) {\n statusText = \"Bad Request\";\n if (method && pathname && routeId) {\n errorMessage = `You made a ${method} request to \"${pathname}\" but did not provide a \\`loader\\` for route \"${routeId}\", so there is no way to handle the request.`;\n } else if (type === \"invalid-body\") {\n errorMessage = \"Unable to encode submission body\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = `Route \"${routeId}\" does not match URL \"${pathname}\"`;\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = `No route matches URL \"${pathname}\"`;\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n if (method && pathname && routeId) {\n errorMessage = `You made a ${method.toUpperCase()} request to \"${pathname}\" but did not provide an \\`action\\` for route \"${routeId}\", so there is no way to handle the request.`;\n } else if (method) {\n errorMessage = `Invalid request method \"${method.toUpperCase()}\"`;\n }\n }\n return new ErrorResponseImpl(\n status || 500,\n statusText,\n new Error(errorMessage),\n true\n );\n}\nfunction findRedirect(results) {\n let entries = Object.entries(results);\n for (let i = entries.length - 1; i >= 0; i--) {\n let [key, result] = entries[i];\n if (isRedirectResult(result)) {\n return { key, result };\n }\n }\n}\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath({ ...parsedPath, hash: \"\" });\n}\nfunction isHashChangeOnly(a, b) {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n if (a.hash === \"\") {\n return b.hash !== \"\";\n } else if (a.hash === b.hash) {\n return true;\n } else if (b.hash !== \"\") {\n return true;\n }\n return false;\n}\nfunction dataWithResponseInitToResponse(data2) {\n return Response.json(data2.data, data2.init ?? void 0);\n}\nfunction dataWithResponseInitToErrorResponse(data2) {\n return new ErrorResponseImpl(\n data2.init?.status ?? 500,\n data2.init?.statusText ?? \"Internal Server Error\",\n data2.data\n );\n}\nfunction isDataStrategyResults(result) {\n return result != null && typeof result === \"object\" && Object.entries(result).every(\n ([key, value]) => typeof key === \"string\" && isDataStrategyResult(value)\n );\n}\nfunction isDataStrategyResult(result) {\n return result != null && typeof result === \"object\" && \"type\" in result && \"result\" in result && (result.type === \"data\" /* data */ || result.type === \"error\" /* error */);\n}\nfunction isRedirectDataStrategyResult(result) {\n return isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isErrorResult(result) {\n return result.type === \"error\" /* error */;\n}\nfunction isRedirectResult(result) {\n return (result && result.type) === \"redirect\" /* redirect */;\n}\nfunction isDataWithResponseInit(value) {\n return typeof value === \"object\" && value != null && \"type\" in value && \"data\" in value && \"init\" in value && value.type === \"DataWithResponseInit\";\n}\nfunction isResponse(value) {\n return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectStatusCode(statusCode) {\n return redirectStatusCodes.has(statusCode);\n}\nfunction isRedirectResponse(result) {\n return isResponse(result) && isRedirectStatusCode(result.status) && result.headers.has(\"Location\");\n}\nfunction isValidMethod(method) {\n return validRequestMethods.has(method.toUpperCase());\n}\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method.toUpperCase());\n}\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll(\"index\").some((v) => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n return matches[matches.length - 1];\n }\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n let { formMethod, formAction, formEncType, text, formData, json } = navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: void 0,\n json: void 0,\n text\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: void 0,\n text: void 0\n };\n } else if (json !== void 0) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: void 0,\n json,\n text: void 0\n };\n }\n}\nfunction getLoadingNavigation(location, submission) {\n if (submission) {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n } else {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: void 0,\n formAction: void 0,\n formEncType: void 0,\n formData: void 0,\n json: void 0,\n text: void 0\n };\n return navigation;\n }\n}\nfunction getSubmittingNavigation(location, submission) {\n let navigation = {\n state: \"submitting\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n}\nfunction getLoadingFetcher(submission, data2) {\n if (submission) {\n let fetcher = {\n state: \"loading\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: data2\n };\n return fetcher;\n } else {\n let fetcher = {\n state: \"loading\",\n formMethod: void 0,\n formAction: void 0,\n formEncType: void 0,\n formData: void 0,\n json: void 0,\n text: void 0,\n data: data2\n };\n return fetcher;\n }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n let fetcher = {\n state: \"submitting\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : void 0\n };\n return fetcher;\n}\nfunction getDoneFetcher(data2) {\n let fetcher = {\n state: \"idle\",\n formMethod: void 0,\n formAction: void 0,\n formEncType: void 0,\n formData: void 0,\n json: void 0,\n text: void 0,\n data: data2\n };\n return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n try {\n let sessionPositions = _window.sessionStorage.getItem(\n TRANSITIONS_STORAGE_KEY\n );\n if (sessionPositions) {\n let json = JSON.parse(sessionPositions);\n for (let [k, v] of Object.entries(json || {})) {\n if (v && Array.isArray(v)) {\n transitions.set(k, new Set(v || []));\n }\n }\n }\n } catch (e) {\n }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n if (transitions.size > 0) {\n let json = {};\n for (let [k, v] of transitions) {\n json[k] = [...v];\n }\n try {\n _window.sessionStorage.setItem(\n TRANSITIONS_STORAGE_KEY,\n JSON.stringify(json)\n );\n } catch (error) {\n warning(\n false,\n `Failed to save applied view transitions in sessionStorage (${error}).`\n );\n }\n }\n}\nfunction createDeferred() {\n let resolve;\n let reject;\n let promise = new Promise((res, rej) => {\n resolve = async (val) => {\n res(val);\n try {\n await promise;\n } catch (e) {\n }\n };\n reject = async (error) => {\n rej(error);\n try {\n await promise;\n } catch (e) {\n }\n };\n });\n return {\n promise,\n //@ts-ignore\n resolve,\n //@ts-ignore\n reject\n };\n}\n\n// lib/context.ts\nimport * as React from \"react\";\nvar DataRouterContext = React.createContext(null);\nDataRouterContext.displayName = \"DataRouter\";\nvar DataRouterStateContext = React.createContext(null);\nDataRouterStateContext.displayName = \"DataRouterState\";\nvar RSCRouterContext = React.createContext(false);\nfunction useIsRSCRouterContext() {\n return React.useContext(RSCRouterContext);\n}\nvar ViewTransitionContext = React.createContext({\n isTransitioning: false\n});\nViewTransitionContext.displayName = \"ViewTransition\";\nvar FetchersContext = React.createContext(\n /* @__PURE__ */ new Map()\n);\nFetchersContext.displayName = \"Fetchers\";\nvar AwaitContext = React.createContext(null);\nAwaitContext.displayName = \"Await\";\nvar AwaitContextProvider = (props) => React.createElement(AwaitContext.Provider, props);\nvar NavigationContext = React.createContext(\n null\n);\nNavigationContext.displayName = \"Navigation\";\nvar LocationContext = React.createContext(\n null\n);\nLocationContext.displayName = \"Location\";\nvar RouteContext = React.createContext({\n outlet: null,\n matches: [],\n isDataRoute: false\n});\nRouteContext.displayName = \"Route\";\nvar RouteErrorContext = React.createContext(null);\nRouteErrorContext.displayName = \"RouteError\";\nvar ENABLE_DEV_WARNINGS = true;\n\n// lib/hooks.tsx\nimport * as React2 from \"react\";\nfunction useHref(to, { relative } = {}) {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useHref() may be used only in the context of a <Router> component.`\n );\n let { basename, navigator } = React2.useContext(NavigationContext);\n let { hash, pathname, search } = useResolvedPath(to, { relative });\n let joinedPathname = pathname;\n if (basename !== \"/\") {\n joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n }\n return navigator.createHref({ pathname: joinedPathname, search, hash });\n}\nfunction useInRouterContext() {\n return React2.useContext(LocationContext) != null;\n}\nfunction useLocation() {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useLocation() may be used only in the context of a <Router> component.`\n );\n return React2.useContext(LocationContext).location;\n}\nfunction useNavigationType() {\n return React2.useContext(LocationContext).navigationType;\n}\nfunction useMatch(pattern) {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useMatch() may be used only in the context of a <Router> component.`\n );\n let { pathname } = useLocation();\n return React2.useMemo(\n () => matchPath(pattern, decodePath(pathname)),\n [pathname, pattern]\n );\n}\nvar navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;\nfunction useIsomorphicLayoutEffect(cb) {\n let isStatic = React2.useContext(NavigationContext).static;\n if (!isStatic) {\n React2.useLayoutEffect(cb);\n }\n}\nfunction useNavigate() {\n let { isDataRoute } = React2.useContext(RouteContext);\n return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useNavigate() may be used only in the context of a <Router> component.`\n );\n let dataRouterContext = React2.useContext(DataRouterContext);\n let { basename, navigator } = React2.useContext(NavigationContext);\n let { matches } = React2.useContext(RouteContext);\n let { pathname: locationPathname } = useLocation();\n let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n let activeRef = React2.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = React2.useCallback(\n (to, options = {}) => {\n warning(activeRef.current, navigateEffectWarning);\n if (!activeRef.current) return;\n if (typeof to === \"number\") {\n navigator.go(to);\n return;\n }\n let path = resolveTo(\n to,\n JSON.parse(routePathnamesJson),\n locationPathname,\n options.relative === \"path\"\n );\n if (dataRouterContext == null && basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n (!!options.replace ? navigator.replace : navigator.push)(\n path,\n options.state,\n options\n );\n },\n [\n basename,\n navigator,\n routePathnamesJson,\n locationPathname,\n dataRouterContext\n ]\n );\n return navigate;\n}\nvar OutletContext = React2.createContext(null);\nfunction useOutletContext() {\n return React2.useContext(OutletContext);\n}\nfunction useOutlet(context) {\n let outlet = React2.useContext(RouteContext).outlet;\n return React2.useMemo(\n () => outlet && /* @__PURE__ */ React2.createElement(OutletContext.Provider, { value: context }, outlet),\n [outlet, context]\n );\n}\nfunction useParams() {\n let { matches } = React2.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\nfunction useResolvedPath(to, { relative } = {}) {\n let { matches } = React2.useContext(RouteContext);\n let { pathname: locationPathname } = useLocation();\n let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n return React2.useMemo(\n () => resolveTo(\n to,\n JSON.parse(routePathnamesJson),\n locationPathname,\n relative === \"path\"\n ),\n [to, routePathnamesJson, locationPathname, relative]\n );\n}\nfunction useRoutes(routes, locationArg) {\n return useRoutesImpl(routes, locationArg);\n}\nfunction useRoutesImpl(routes, locationArg, dataRouterState, unstable_onError, future) {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useRoutes() may be used only in the context of a <Router> component.`\n );\n let { navigator } = React2.useContext(NavigationContext);\n let { matches: parentMatches } = React2.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n let parentRoute = routeMatch && routeMatch.route;\n if (ENABLE_DEV_WARNINGS) {\n let parentPath = parentRoute && parentRoute.path || \"\";\n warningOnce(\n parentPathname,\n !parentRoute || parentPath.endsWith(\"*\") || parentPath.endsWith(\"*?\"),\n `You rendered descendant <Routes> (or called \\`useRoutes()\\`) at \"${parentPathname}\" (under <Route path=\"${parentPath}\">) but the parent route path has no trailing \"*\". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path=\"${parentPath}\"> to <Route path=\"${parentPath === \"/\" ? \"*\" : `${parentPath}/*`}\">.`\n );\n }\n let locationFromContext = useLocation();\n let location;\n if (locationArg) {\n let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n invariant(\n parentPathnameBase === \"/\" || parsedLocationArg.pathname?.startsWith(parentPathnameBase),\n `When overriding the location using \\`<Routes location>\\` or \\`useRoutes(routes, location)\\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is \"${parentPathnameBase}\" but pathname \"${parsedLocationArg.pathname}\" was given in the \\`location\\` prop.`\n );\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n let pathname = location.pathname || \"/\";\n let remainingPathname = pathname;\n if (parentPathnameBase !== \"/\") {\n let parentSegments = parentPathnameBase.replace(/^\\//, \"\").split(\"/\");\n let segments = pathname.replace(/^\\//, \"\").split(\"/\");\n remainingPathname = \"/\" + segments.slice(parentSegments.length).join(\"/\");\n }\n let matches = matchRoutes(routes, { pathname: remainingPathname });\n if (ENABLE_DEV_WARNINGS) {\n warning(\n parentRoute || matches != null,\n `No routes matched location \"${location.pathname}${location.search}${location.hash}\" `\n );\n warning(\n matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0,\n `Matched leaf route at location \"${location.pathname}${location.search}${location.hash}\" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an \"empty\" page.`\n );\n }\n let renderedMatches = _renderMatches(\n matches && matches.map(\n (match) => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: joinPaths([\n parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes.\n // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses\n // `new URL()` internally and we need to prevent it from treating\n // them as separators\n navigator.encodeLocation ? navigator.encodeLocation(\n match.pathname.replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")\n ).pathname : match.pathname\n ]),\n pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([\n parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses\n // `new URL()` internally and we need to prevent it from treating\n // them as separators\n navigator.encodeLocation ? navigator.encodeLocation(\n match.pathnameBase.replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")\n ).pathname : match.pathnameBase\n ])\n })\n ),\n parentMatches,\n dataRouterState,\n unstable_onError,\n future\n );\n if (locationArg && renderedMatches) {\n return /* @__PURE__ */ React2.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: \"/\",\n search: \"\",\n hash: \"\",\n state: null,\n key: \"default\",\n ...location\n },\n navigationType: \"POP\" /* Pop */\n }\n },\n renderedMatches\n );\n }\n return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n let error = useRouteError();\n let message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = \"rgba(200,200,200, 0.5)\";\n let preStyles = { padding: \"0.5rem\", backgroundColor: lightgrey };\n let codeStyles = { padding: \"2px 4px\", backgroundColor: lightgrey };\n let devInfo = null;\n if (ENABLE_DEV_WARNINGS) {\n console.error(\n \"Error handled by React Router default ErrorBoundary:\",\n error\n );\n devInfo = /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\"p\", null, \"\\u{1F4BF} Hey developer \\u{1F44B}\"), /* @__PURE__ */ React2.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own \", /* @__PURE__ */ React2.createElement(\"code\", { style: codeStyles }, \"ErrorBoundary\"), \" or\", \" \", /* @__PURE__ */ React2.createElement(\"code\", { style: codeStyles }, \"errorElement\"), \" prop on your route.\"));\n }\n return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\"h2\", null, \"Unexpected Application Error!\"), /* @__PURE__ */ React2.createElement(\"h3\", { style: { fontStyle: \"italic\" } }, message), stack ? /* @__PURE__ */ React2.createElement(\"pre\", { style: preStyles }, stack) : null, devInfo);\n}\nvar defaultErrorElement = /* @__PURE__ */ React2.createElement(DefaultErrorComponent, null);\nvar RenderErrorBoundary = class extends React2.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n revalidation: props.revalidation,\n error: props.error\n };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n static getDerivedStateFromProps(props, state) {\n if (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") {\n return {\n error: props.error,\n location: props.location,\n revalidation: props.revalidation\n };\n }\n return {\n error: props.error !== void 0 ? props.error : state.error,\n location: state.location,\n revalidation: props.revalidation || state.revalidation\n };\n }\n componentDidCatch(error, errorInfo) {\n if (this.props.onError) {\n this.props.onError(error, errorInfo);\n } else {\n console.error(\n \"React Router caught the following error during render\",\n error\n );\n }\n }\n render() {\n return this.state.error !== void 0 ? /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React2.createElement(\n RouteErrorContext.Provider,\n {\n value: this.state.error,\n children: this.props.component\n }\n )) : this.props.children;\n }\n};\nfunction RenderedRoute({ routeContext, match, children }) {\n let dataRouterContext = React2.useContext(DataRouterContext);\n if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n return /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: routeContext }, children);\n}\nfunction _renderMatches(matches, parentMatches = [], dataRouterState = null, unstable_onError = null, future = null) {\n if (matches == null) {\n if (!dataRouterState) {\n return null;\n }\n if (dataRouterState.errors) {\n matches = dataRouterState.matches;\n } else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n let renderedMatches = matches;\n let errors = dataRouterState?.errors;\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(\n (m) => m.route.id && errors?.[m.route.id] !== void 0\n );\n invariant(\n errorIndex >= 0,\n `Could not find a matching route for errors on route IDs: ${Object.keys(\n errors\n ).join(\",\")}`\n );\n renderedMatches = renderedMatches.slice(\n 0,\n Math.min(renderedMatches.length, errorIndex + 1)\n );\n }\n let renderFallback = false;\n let fallbackIndex = -1;\n if (dataRouterState) {\n for (let i = 0; i < renderedMatches.length; i++) {\n let match = renderedMatches[i];\n if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {\n fallbackIndex = i;\n }\n if (match.route.id) {\n let { loaderData, errors: errors2 } = dataRouterState;\n let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);\n if (match.route.lazy || needsToRunLoader) {\n renderFallback = true;\n if (fallbackIndex >= 0) {\n renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n } else {\n renderedMatches = [renderedMatches[0]];\n }\n break;\n }\n }\n }\n }\n let onError = dataRouterState && unstable_onError ? (error, errorInfo) => {\n unstable_onError(error, {\n location: dataRouterState.location,\n params: dataRouterState.matches?.[0]?.params ?? {},\n unstable_pattern: getRoutePattern(dataRouterState.matches),\n errorInfo\n });\n } : void 0;\n return renderedMatches.reduceRight(\n (outlet, match, index) => {\n let error;\n let shouldRenderHydrateFallback = false;\n let errorElement = null;\n let hydrateFallbackElement = null;\n if (dataRouterState) {\n error = errors && match.route.id ? errors[match.route.id] : void 0;\n errorElement = match.route.errorElement || defaultErrorElement;\n if (renderFallback) {\n if (fallbackIndex < 0 && index === 0) {\n warningOnce(\n \"route-fallback\",\n false,\n \"No `HydrateFallback` element provided to render during initial hydration\"\n );\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = null;\n } else if (fallbackIndex === index) {\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = match.route.hydrateFallbackElement || null;\n }\n }\n }\n let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));\n let getChildren = () => {\n let children;\n if (error) {\n children = errorElement;\n } else if (shouldRenderHydrateFallback) {\n children = hydrateFallbackElement;\n } else if (match.route.Component) {\n children = /* @__PURE__ */ React2.createElement(match.route.Component, null);\n } else if (match.route.element) {\n children = match.route.element;\n } else {\n children = outlet;\n }\n return /* @__PURE__ */ React2.createElement(\n RenderedRoute,\n {\n match,\n routeContext: {\n outlet,\n matches: matches2,\n isDataRoute: dataRouterState != null\n },\n children\n }\n );\n };\n return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React2.createElement(\n RenderErrorBoundary,\n {\n location: dataRouterState.location,\n revalidation: dataRouterState.revalidation,\n component: errorElement,\n error,\n children: getChildren(),\n routeContext: { outlet: null, matches: matches2, isDataRoute: true },\n onError\n }\n ) : getChildren();\n },\n null\n );\n}\nfunction getDataRouterConsoleError(hookName) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext(hookName) {\n let ctx = React2.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError(hookName));\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = React2.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError(hookName));\n return state;\n}\nfunction useRouteContext(hookName) {\n let route = React2.useContext(RouteContext);\n invariant(route, getDataRouterConsoleError(hookName));\n return route;\n}\nfunction useCurrentRouteId(hookName) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n invariant(\n thisRoute.route.id,\n `${hookName} can only be used on routes that contain a unique \"id\"`\n );\n return thisRoute.route.id;\n}\nfunction useRouteId() {\n return useCurrentRouteId(\"useRouteId\" /* UseRouteId */);\n}\nfunction useNavigation() {\n let state = useDataRouterState(\"useNavigation\" /* UseNavigation */);\n return state.navigation;\n}\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(\"useRevalidator\" /* UseRevalidator */);\n let state = useDataRouterState(\"useRevalidator\" /* UseRevalidator */);\n let revalidate = React2.useCallback(async () => {\n await dataRouterContext.router.revalidate();\n }, [dataRouterContext.router]);\n return React2.useMemo(\n () => ({ revalidate, state: state.revalidation }),\n [revalidate, state.revalidation]\n );\n}\nfunction useMatches() {\n let { matches, loaderData } = useDataRouterState(\n \"useMatches\" /* UseMatches */\n );\n return React2.useMemo(\n () => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)),\n [matches, loaderData]\n );\n}\nfunction useLoaderData() {\n let state = useDataRouterState(\"useLoaderData\" /* UseLoaderData */);\n let routeId = useCurrentRouteId(\"useLoaderData\" /* UseLoaderData */);\n return state.loaderData[routeId];\n}\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(\"useRouteLoaderData\" /* UseRouteLoaderData */);\n return state.loaderData[routeId];\n}\nfunction useActionData() {\n let state = useDataRouterState(\"useActionData\" /* UseActionData */);\n let routeId = useCurrentRouteId(\"useLoaderData\" /* UseLoaderData */);\n return state.actionData ? state.actionData[routeId] : void 0;\n}\nfunction useRouteError() {\n let error = React2.useContext(RouteErrorContext);\n let state = useDataRouterState(\"useRouteError\" /* UseRouteError */);\n let routeId = useCurrentRouteId(\"useRouteError\" /* UseRouteError */);\n if (error !== void 0) {\n return error;\n }\n return state.errors?.[routeId];\n}\nfunction useAsyncValue() {\n let value = React2.useContext(AwaitContext);\n return value?._data;\n}\nfunction useAsyncError() {\n let value = React2.useContext(AwaitContext);\n return value?._error;\n}\nvar blockerId = 0;\nfunction useBlocker(shouldBlock) {\n let { router, basename } = useDataRouterContext(\"useBlocker\" /* UseBlocker */);\n let state = useDataRouterState(\"useBlocker\" /* UseBlocker */);\n let [blockerKey, setBlockerKey] = React2.useState(\"\");\n let blockerFunction = React2.useCallback(\n (arg) => {\n if (typeof shouldBlock !== \"function\") {\n return !!shouldBlock;\n }\n if (basename === \"/\") {\n return shouldBlock(arg);\n }\n let { currentLocation, nextLocation, historyAction } = arg;\n return shouldBlock({\n currentLocation: {\n ...currentLocation,\n pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n },\n nextLocation: {\n ...nextLocation,\n pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n },\n historyAction\n });\n },\n [basename, shouldBlock]\n );\n React2.useEffect(() => {\n let key = String(++blockerId);\n setBlockerKey(key);\n return () => router.deleteBlocker(key);\n }, [router]);\n React2.useEffect(() => {\n if (blockerKey !== \"\") {\n router.getBlocker(blockerKey, blockerFunction);\n }\n }, [router, blockerKey, blockerFunction]);\n return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\nfunction useNavigateStable() {\n let { router } = useDataRouterContext(\"useNavigate\" /* UseNavigateStable */);\n let id = useCurrentRouteId(\"useNavigate\" /* UseNavigateStable */);\n let activeRef = React2.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = React2.useCallback(\n async (to, options = {}) => {\n warning(activeRef.current, navigateEffectWarning);\n if (!activeRef.current) return;\n if (typeof to === \"number\") {\n await router.navigate(to);\n } else {\n await router.navigate(to, { fromRouteId: id, ...options });\n }\n },\n [router, id]\n );\n return navigate;\n}\nvar alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n warning(false, message);\n }\n}\nfunction useRoute(...args) {\n const currentRouteId = useCurrentRouteId(\n \"useRoute\" /* UseRoute */\n );\n const id = args[0] ?? currentRouteId;\n const state = useDataRouterState(\"useRoute\" /* UseRoute */);\n const route = state.matches.find(({ route: route2 }) => route2.id === id);\n if (route === void 0) return void 0;\n return {\n handle: route.route.handle,\n loaderData: state.loaderData[id],\n actionData: state.actionData?.[id]\n };\n}\n\n// lib/components.tsx\nimport * as React3 from \"react\";\n\n// lib/server-runtime/warnings.ts\nvar alreadyWarned2 = {};\nfunction warnOnce(condition, message) {\n if (!condition && !alreadyWarned2[message]) {\n alreadyWarned2[message] = true;\n console.warn(message);\n }\n}\n\n// lib/components.tsx\nvar USE_OPTIMISTIC = \"useOptimistic\";\nvar useOptimisticImpl = React3[USE_OPTIMISTIC];\nvar stableUseOptimisticSetter = () => void 0;\nfunction useOptimisticSafe(val) {\n if (useOptimisticImpl) {\n return useOptimisticImpl(val);\n } else {\n return [val, stableUseOptimisticSetter];\n }\n}\nfunction mapRouteProperties(route) {\n let updates = {\n // Note: this check also occurs in createRoutesFromChildren so update\n // there if you change this -- please and thank you!\n hasErrorBoundary: route.hasErrorBoundary || route.ErrorBoundary != null || route.errorElement != null\n };\n if (route.Component) {\n if (ENABLE_DEV_WARNINGS) {\n if (route.element) {\n warning(\n false,\n \"You should not include both `Component` and `element` on your route - `Component` will be used.\"\n );\n }\n }\n Object.assign(updates, {\n element: React3.createElement(route.Component),\n Component: void 0\n });\n }\n if (route.HydrateFallback) {\n if (ENABLE_DEV_WARNINGS) {\n if (route.hydrateFallbackElement) {\n warning(\n false,\n \"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used.\"\n );\n }\n }\n Object.assign(updates, {\n hydrateFallbackElement: React3.createElement(route.HydrateFallback),\n HydrateFallback: void 0\n });\n }\n if (route.ErrorBoundary) {\n if (ENABLE_DEV_WARNINGS) {\n if (route.errorElement) {\n warning(\n false,\n \"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used.\"\n );\n }\n }\n Object.assign(updates, {\n errorElement: React3.createElement(route.ErrorBoundary),\n ErrorBoundary: void 0\n });\n }\n return updates;\n}\nvar hydrationRouteProperties = [\n \"HydrateFallback\",\n \"hydrateFallbackElement\"\n];\nfunction createMemoryRouter(routes, opts) {\n return createRouter({\n basename: opts?.basename,\n getContext: opts?.getContext,\n future: opts?.future,\n history: createMemoryHistory({\n initialEntries: opts?.initialEntries,\n initialIndex: opts?.initialIndex\n }),\n hydrationData: opts?.hydrationData,\n routes,\n hydrationRouteProperties,\n mapRouteProperties,\n dataStrategy: opts?.dataStrategy,\n patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n unstable_instrumentations: opts?.unstable_instrumentations\n }).initialize();\n}\nvar Deferred = class {\n constructor() {\n this.status = \"pending\";\n this.promise = new Promise((resolve, reject) => {\n this.resolve = (value) => {\n if (this.status === \"pending\") {\n this.status = \"resolved\";\n resolve(value);\n }\n };\n this.reject = (reason) => {\n if (this.status === \"pending\") {\n this.status = \"rejected\";\n reject(reason);\n }\n };\n });\n }\n};\nfunction RouterProvider({\n router,\n flushSync: reactDomFlushSyncImpl,\n unstable_onError,\n unstable_useTransitions\n}) {\n let [_state, setStateImpl] = React3.useState(router.state);\n let [state, setOptimisticState] = useOptimisticSafe(_state);\n let [pendingState, setPendingState] = React3.useState();\n let [vtContext, setVtContext] = React3.useState({\n isTransitioning: false\n });\n let [renderDfd, setRenderDfd] = React3.useState();\n let [transition, setTransition] = React3.useState();\n let [interruption, setInterruption] = React3.useState();\n let fetcherData = React3.useRef(/* @__PURE__ */ new Map());\n let setState = React3.useCallback(\n (newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {\n if (newErrors && unstable_onError) {\n Object.values(newErrors).forEach(\n (error) => unstable_onError(error, {\n location: newState.location,\n params: newState.matches[0]?.params ?? {},\n unstable_pattern: getRoutePattern(newState.matches)\n })\n );\n }\n newState.fetchers.forEach((fetcher, key) => {\n if (fetcher.data !== void 0) {\n fetcherData.current.set(key, fetcher.data);\n }\n });\n deletedFetchers.forEach((key) => fetcherData.current.delete(key));\n warnOnce(\n flushSync === false || reactDomFlushSyncImpl != null,\n 'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from \"react-router/dom\"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'\n );\n let isViewTransitionAvailable = router.window != null && router.window.document != null && typeof router.window.document.startViewTransition === \"function\";\n warnOnce(\n viewTransitionOpts == null || isViewTransitionAvailable,\n \"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available.\"\n );\n if (!viewTransitionOpts || !isViewTransitionAvailable) {\n if (reactDomFlushSyncImpl && flushSync) {\n reactDomFlushSyncImpl(() => setStateImpl(newState));\n } else if (unstable_useTransitions === false) {\n setStateImpl(newState);\n } else {\n React3.startTransition(() => {\n if (unstable_useTransitions === true) {\n setOptimisticState((s) => getOptimisticRouterState(s, newState));\n }\n setStateImpl(newState);\n });\n }\n return;\n }\n if (reactDomFlushSyncImpl && flushSync) {\n reactDomFlushSyncImpl(() => {\n if (transition) {\n renderDfd?.resolve();\n transition.skipTransition();\n }\n setVtContext({\n isTransitioning: true,\n flushSync: true,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n });\n let t = router.window.document.startViewTransition(() => {\n reactDomFlushSyncImpl(() => setStateImpl(newState));\n });\n t.finished.finally(() => {\n reactDomFlushSyncImpl(() => {\n setRenderDfd(void 0);\n setTransition(void 0);\n setPendingState(void 0);\n setVtContext({ isTransitioning: false });\n });\n });\n reactDomFlushSyncImpl(() => setTransition(t));\n return;\n }\n if (transition) {\n renderDfd?.resolve();\n transition.skipTransition();\n setInterruption({\n state: newState,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n } else {\n setPendingState(newState);\n setVtContext({\n isTransitioning: true,\n flushSync: false,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n }\n },\n [\n router.window,\n reactDomFlushSyncImpl,\n transition,\n renderDfd,\n unstable_useTransitions,\n setOptimisticState,\n unstable_onError\n ]\n );\n React3.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n React3.useEffect(() => {\n if (vtContext.isTransitioning && !vtContext.flushSync) {\n setRenderDfd(new Deferred());\n }\n }, [vtContext]);\n React3.useEffect(() => {\n if (renderDfd && pendingState && router.window) {\n let newState = pendingState;\n let renderPromise = renderDfd.promise;\n let transition2 = router.window.document.startViewTransition(async () => {\n if (unstable_useTransitions === false) {\n setStateImpl(newState);\n } else {\n React3.startTransition(() => {\n if (unstable_useTransitions === true) {\n setOptimisticState((s) => getOptimisticRouterState(s, newState));\n }\n setStateImpl(newState);\n });\n }\n await renderPromise;\n });\n transition2.finished.finally(() => {\n setRenderDfd(void 0);\n setTransition(void 0);\n setPendingState(void 0);\n setVtContext({ isTransitioning: false });\n });\n setTransition(transition2);\n }\n }, [\n pendingState,\n renderDfd,\n router.window,\n unstable_useTransitions,\n setOptimisticState\n ]);\n React3.useEffect(() => {\n if (renderDfd && pendingState && state.location.key === pendingState.location.key) {\n renderDfd.resolve();\n }\n }, [renderDfd, transition, state.location, pendingState]);\n React3.useEffect(() => {\n if (!vtContext.isTransitioning && interruption) {\n setPendingState(interruption.state);\n setVtContext({\n isTransitioning: true,\n flushSync: false,\n currentLocation: interruption.currentLocation,\n nextLocation: interruption.nextLocation\n });\n setInterruption(void 0);\n }\n }, [vtContext.isTransitioning, interruption]);\n let navigator = React3.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: (n) => router.navigate(n),\n push: (to, state2, opts) => router.navigate(to, {\n state: state2,\n preventScrollReset: opts?.preventScrollReset\n }),\n replace: (to, state2, opts) => router.navigate(to, {\n replace: true,\n state: state2,\n preventScrollReset: opts?.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || \"/\";\n let dataRouterContext = React3.useMemo(\n () => ({\n router,\n navigator,\n static: false,\n basename,\n unstable_onError\n }),\n [router, navigator, basename, unstable_onError]\n );\n return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React3.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React3.createElement(FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React3.createElement(ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React3.createElement(\n Router,\n {\n basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator,\n unstable_useTransitions: unstable_useTransitions === true\n },\n /* @__PURE__ */ React3.createElement(\n MemoizedDataRoutes,\n {\n routes: router.routes,\n future: router.future,\n state,\n unstable_onError\n }\n )\n ))))), null);\n}\nfunction getOptimisticRouterState(currentState, newState) {\n return {\n // Don't surface \"current location specific\" stuff mid-navigation\n // (historyAction, location, matches, loaderData, errors, initialized,\n // restoreScroll, preventScrollReset, blockers, etc.)\n ...currentState,\n // Only surface \"pending/in-flight stuff\"\n // (navigation, revalidation, actionData, fetchers, )\n navigation: newState.navigation.state !== \"idle\" ? newState.navigation : currentState.navigation,\n revalidation: newState.revalidation !== \"idle\" ? newState.revalidation : currentState.revalidation,\n actionData: newState.navigation.state !== \"submitting\" ? newState.actionData : currentState.actionData,\n fetchers: newState.fetchers\n };\n}\nvar MemoizedDataRoutes = React3.memo(DataRoutes);\nfunction DataRoutes({\n routes,\n future,\n state,\n unstable_onError\n}) {\n return useRoutesImpl(routes, void 0, state, unstable_onError, future);\n}\nfunction MemoryRouter({\n basename,\n children,\n initialEntries,\n initialIndex,\n unstable_useTransitions\n}) {\n let historyRef = React3.useRef();\n if (historyRef.current == null) {\n historyRef.current = createMemoryHistory({\n initialEntries,\n initialIndex,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = React3.useState({\n action: history.action,\n location: history.location\n });\n let setState = React3.useCallback(\n (newState) => {\n if (unstable_useTransitions === false) {\n setStateImpl(newState);\n } else {\n React3.startTransition(() => setStateImpl(newState));\n }\n },\n [unstable_useTransitions]\n );\n React3.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /* @__PURE__ */ React3.createElement(\n Router,\n {\n basename,\n children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n unstable_useTransitions: unstable_useTransitions === true\n }\n );\n}\nfunction Navigate({\n to,\n replace: replace2,\n state,\n relative\n}) {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of\n // the router loaded. We can help them understand how to avoid that.\n `<Navigate> may be used only in the context of a <Router> component.`\n );\n let { static: isStatic } = React3.useContext(NavigationContext);\n warning(\n !isStatic,\n `<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`\n );\n let { matches } = React3.useContext(RouteContext);\n let { pathname: locationPathname } = useLocation();\n let navigate = useNavigate();\n let path = resolveTo(\n to,\n getResolveToMatches(matches),\n locationPathname,\n relative === \"path\"\n );\n let jsonPath = JSON.stringify(path);\n React3.useEffect(() => {\n navigate(JSON.parse(jsonPath), { replace: replace2, state, relative });\n }, [navigate, jsonPath, relative, replace2, state]);\n return null;\n}\nfunction Outlet(props) {\n return useOutlet(props.context);\n}\nfunction Route(props) {\n invariant(\n false,\n `A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`\n );\n}\nfunction Router({\n basename: basenameProp = \"/\",\n children = null,\n location: locationProp,\n navigationType = \"POP\" /* Pop */,\n navigator,\n static: staticProp = false,\n unstable_useTransitions\n}) {\n invariant(\n !useInRouterContext(),\n `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`\n );\n let basename = basenameProp.replace(/^\\/*/, \"/\");\n let navigationContext = React3.useMemo(\n () => ({\n basename,\n navigator,\n static: staticProp,\n unstable_useTransitions,\n future: {}\n }),\n [basename, navigator, staticProp, unstable_useTransitions]\n );\n if (typeof locationProp === \"string\") {\n locationProp = parsePath(locationProp);\n }\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n state = null,\n key = \"default\"\n } = locationProp;\n let locationContext = React3.useMemo(() => {\n let trailingPathname = stripBasename(pathname, basename);\n if (trailingPathname == null) {\n return null;\n }\n return {\n location: {\n pathname: trailingPathname,\n search,\n hash,\n state,\n key\n },\n navigationType\n };\n }, [basename, pathname, search, hash, state, key, navigationType]);\n warning(\n locationContext != null,\n `<Router basename=\"${basename}\"> is not able to match the URL \"${pathname}${search}${hash}\" because it does not start with the basename, so the <Router> won't render anything.`\n );\n if (locationContext == null) {\n return null;\n }\n return /* @__PURE__ */ React3.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React3.createElement(LocationContext.Provider, { children, value: locationContext }));\n}\nfunction Routes({\n children,\n location\n}) {\n return useRoutes(createRoutesFromChildren(children), location);\n}\nfunction Await({\n children,\n errorElement,\n resolve\n}) {\n let dataRouterContext = React3.useContext(DataRouterContext);\n let dataRouterStateContext = React3.useContext(DataRouterStateContext);\n let onError = React3.useCallback(\n (error, errorInfo) => {\n if (dataRouterContext && dataRouterContext.unstable_onError && dataRouterStateContext) {\n dataRouterContext.unstable_onError(error, {\n location: dataRouterStateContext.location,\n params: dataRouterStateContext.matches[0]?.params || {},\n unstable_pattern: getRoutePattern(dataRouterStateContext.matches),\n errorInfo\n });\n }\n },\n [dataRouterContext, dataRouterStateContext]\n );\n return /* @__PURE__ */ React3.createElement(\n AwaitErrorBoundary,\n {\n resolve,\n errorElement,\n onError\n },\n /* @__PURE__ */ React3.createElement(ResolveAwait, null, children)\n );\n}\nvar AwaitErrorBoundary = class extends React3.Component {\n constructor(props) {\n super(props);\n this.state = { error: null };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n componentDidCatch(error, errorInfo) {\n if (this.props.onError) {\n this.props.onError(error, errorInfo);\n } else {\n console.error(\n \"<Await> caught the following error during render\",\n error,\n errorInfo\n );\n }\n }\n render() {\n let { children, errorElement, resolve } = this.props;\n let promise = null;\n let status = 0 /* pending */;\n if (!(resolve instanceof Promise)) {\n status = 1 /* success */;\n promise = Promise.resolve();\n Object.defineProperty(promise, \"_tracked\", { get: () => true });\n Object.defineProperty(promise, \"_data\", { get: () => resolve });\n } else if (this.state.error) {\n status = 2 /* error */;\n let renderError = this.state.error;\n promise = Promise.reject().catch(() => {\n });\n Object.defineProperty(promise, \"_tracked\", { get: () => true });\n Object.defineProperty(promise, \"_error\", { get: () => renderError });\n } else if (resolve._tracked) {\n promise = resolve;\n status = \"_error\" in promise ? 2 /* error */ : \"_data\" in promise ? 1 /* success */ : 0 /* pending */;\n } else {\n status = 0 /* pending */;\n Object.defineProperty(resolve, \"_tracked\", { get: () => true });\n promise = resolve.then(\n (data2) => Object.defineProperty(resolve, \"_data\", { get: () => data2 }),\n (error) => {\n this.props.onError?.(error);\n Object.defineProperty(resolve, \"_error\", { get: () => error });\n }\n );\n }\n if (status === 2 /* error */ && !errorElement) {\n throw promise._error;\n }\n if (status === 2 /* error */) {\n return /* @__PURE__ */ React3.createElement(AwaitContext.Provider, { value: promise, children: errorElement });\n }\n if (status === 1 /* success */) {\n return /* @__PURE__ */ React3.createElement(AwaitContext.Provider, { value: promise, children });\n }\n throw promise;\n }\n};\nfunction ResolveAwait({\n children\n}) {\n let data2 = useAsyncValue();\n let toRender = typeof children === \"function\" ? children(data2) : children;\n return /* @__PURE__ */ React3.createElement(React3.Fragment, null, toRender);\n}\nfunction createRoutesFromChildren(children, parentPath = []) {\n let routes = [];\n React3.Children.forEach(children, (element, index) => {\n if (!React3.isValidElement(element)) {\n return;\n }\n let treePath = [...parentPath, index];\n if (element.type === React3.Fragment) {\n routes.push.apply(\n routes,\n createRoutesFromChildren(element.props.children, treePath)\n );\n return;\n }\n invariant(\n element.type === Route,\n `[${typeof element.type === \"string\" ? element.type : element.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`\n );\n invariant(\n !element.props.index || !element.props.children,\n \"An index route cannot have child routes.\"\n );\n let route = {\n id: element.props.id || treePath.join(\"-\"),\n caseSensitive: element.props.caseSensitive,\n element: element.props.element,\n Component: element.props.Component,\n index: element.props.index,\n path: element.props.path,\n middleware: element.props.middleware,\n loader: element.props.loader,\n action: element.props.action,\n hydrateFallbackElement: element.props.hydrateFallbackElement,\n HydrateFallback: element.props.HydrateFallback,\n errorElement: element.props.errorElement,\n ErrorBoundary: element.props.ErrorBoundary,\n hasErrorBoundary: element.props.hasErrorBoundary === true || element.props.ErrorBoundary != null || element.props.errorElement != null,\n shouldRevalidate: element.props.shouldRevalidate,\n handle: element.props.handle,\n lazy: element.props.lazy\n };\n if (element.props.children) {\n route.children = createRoutesFromChildren(\n element.props.children,\n treePath\n );\n }\n routes.push(route);\n });\n return routes;\n}\nvar createRoutesFromElements = createRoutesFromChildren;\nfunction renderMatches(matches) {\n return _renderMatches(matches);\n}\nfunction useRouteComponentProps() {\n return {\n params: useParams(),\n loaderData: useLoaderData(),\n actionData: useActionData(),\n matches: useMatches()\n };\n}\nfunction WithComponentProps({\n children\n}) {\n const props = useRouteComponentProps();\n return React3.cloneElement(children, props);\n}\nfunction withComponentProps(Component4) {\n return function WithComponentProps2() {\n const props = useRouteComponentProps();\n return React3.createElement(Component4, props);\n };\n}\nfunction useHydrateFallbackProps() {\n return {\n params: useParams(),\n loaderData: useLoaderData(),\n actionData: useActionData()\n };\n}\nfunction WithHydrateFallbackProps({\n children\n}) {\n const props = useHydrateFallbackProps();\n return React3.cloneElement(children, props);\n}\nfunction withHydrateFallbackProps(HydrateFallback) {\n return function WithHydrateFallbackProps2() {\n const props = useHydrateFallbackProps();\n return React3.createElement(HydrateFallback, props);\n };\n}\nfunction useErrorBoundaryProps() {\n return {\n params: useParams(),\n loaderData: useLoaderData(),\n actionData: useActionData(),\n error: useRouteError()\n };\n}\nfunction WithErrorBoundaryProps({\n children\n}) {\n const props = useErrorBoundaryProps();\n return React3.cloneElement(children, props);\n}\nfunction withErrorBoundaryProps(ErrorBoundary) {\n return function WithErrorBoundaryProps2() {\n const props = useErrorBoundaryProps();\n return React3.createElement(ErrorBoundary, props);\n };\n}\n\n// lib/dom/dom.ts\nvar defaultMethod = \"get\";\nvar defaultEncType = \"application/x-www-form-urlencoded\";\nfunction isHtmlElement(object) {\n return typeof HTMLElement !== \"undefined\" && object instanceof HTMLElement;\n}\nfunction isButtonElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\nfunction isFormElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\nfunction isInputElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nfunction shouldProcessLinkClick(event, target) {\n return event.button === 0 && // Ignore everything but left clicks\n (!target || target === \"_self\") && // Let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event);\n}\nfunction createSearchParams(init = \"\") {\n return new URLSearchParams(\n typeof init === \"string\" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo2, key) => {\n let value = init[key];\n return memo2.concat(\n Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n );\n }, [])\n );\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n let searchParams = createSearchParams(locationSearch);\n if (defaultSearchParams) {\n defaultSearchParams.forEach((_, key) => {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach((value) => {\n searchParams.append(key, value);\n });\n }\n });\n }\n return searchParams;\n}\nvar _formDataSupportsSubmitter = null;\nfunction isFormDataSubmitterSupported() {\n if (_formDataSupportsSubmitter === null) {\n try {\n new FormData(\n document.createElement(\"form\"),\n // @ts-expect-error if FormData supports the submitter parameter, this will throw\n 0\n );\n _formDataSupportsSubmitter = false;\n } catch (e) {\n _formDataSupportsSubmitter = true;\n }\n }\n return _formDataSupportsSubmitter;\n}\nvar supportedFormEncTypes = /* @__PURE__ */ new Set([\n \"application/x-www-form-urlencoded\",\n \"multipart/form-data\",\n \"text/plain\"\n]);\nfunction getFormEncType(encType) {\n if (encType != null && !supportedFormEncTypes.has(encType)) {\n warning(\n false,\n `\"${encType}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` and will default to \"${defaultEncType}\"`\n );\n return null;\n }\n return encType;\n}\nfunction getFormSubmissionInfo(target, basename) {\n let method;\n let action;\n let encType;\n let formData;\n let body;\n if (isFormElement(target)) {\n let attr = target.getAttribute(\"action\");\n action = attr ? stripBasename(attr, basename) : null;\n method = target.getAttribute(\"method\") || defaultMethod;\n encType = getFormEncType(target.getAttribute(\"enctype\")) || defaultEncType;\n formData = new FormData(target);\n } else if (isButtonElement(target) || isInputElement(target) && (target.type === \"submit\" || target.type === \"image\")) {\n let form = target.form;\n if (form == null) {\n throw new Error(\n `Cannot submit a <button> or <input type=\"submit\"> without a <form>`\n );\n }\n let attr = target.getAttribute(\"formaction\") || form.getAttribute(\"action\");\n action = attr ? stripBasename(attr, basename) : null;\n method = target.getAttribute(\"formmethod\") || form.getAttribute(\"method\") || defaultMethod;\n encType = getFormEncType(target.getAttribute(\"formenctype\")) || getFormEncType(form.getAttribute(\"enctype\")) || defaultEncType;\n formData = new FormData(form, target);\n if (!isFormDataSubmitterSupported()) {\n let { name, type, value } = target;\n if (type === \"image\") {\n let prefix = name ? `${name}.` : \"\";\n formData.append(`${prefix}x`, \"0\");\n formData.append(`${prefix}y`, \"0\");\n } else if (name) {\n formData.append(name, value);\n }\n }\n } else if (isHtmlElement(target)) {\n throw new Error(\n `Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">`\n );\n } else {\n method = defaultMethod;\n action = null;\n encType = defaultEncType;\n body = target;\n }\n if (formData && encType === \"text/plain\") {\n body = formData;\n formData = void 0;\n }\n return { action, method: method.toLowerCase(), encType, formData, body };\n}\n\n// lib/dom/ssr/single-fetch.tsx\nimport * as React4 from \"react\";\n\n// vendor/turbo-stream-v2/utils.ts\nvar HOLE = -1;\nvar NAN = -2;\nvar NEGATIVE_INFINITY = -3;\nvar NEGATIVE_ZERO = -4;\nvar NULL = -5;\nvar POSITIVE_INFINITY = -6;\nvar UNDEFINED = -7;\nvar TYPE_BIGINT = \"B\";\nvar TYPE_DATE = \"D\";\nvar TYPE_ERROR = \"E\";\nvar TYPE_MAP = \"M\";\nvar TYPE_NULL_OBJECT = \"N\";\nvar TYPE_PROMISE = \"P\";\nvar TYPE_REGEXP = \"R\";\nvar TYPE_SET = \"S\";\nvar TYPE_SYMBOL = \"Y\";\nvar TYPE_URL = \"U\";\nvar TYPE_PREVIOUS_RESOLVED = \"Z\";\nvar Deferred2 = class {\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n};\nfunction createLineSplittingTransform() {\n const decoder = new TextDecoder();\n let leftover = \"\";\n return new TransformStream({\n transform(chunk, controller) {\n const str = decoder.decode(chunk, { stream: true });\n const parts = (leftover + str).split(\"\\n\");\n leftover = parts.pop() || \"\";\n for (const part of parts) {\n controller.enqueue(part);\n }\n },\n flush(controller) {\n if (leftover) {\n controller.enqueue(leftover);\n }\n }\n });\n}\n\n// vendor/turbo-stream-v2/flatten.ts\nfunction flatten(input) {\n const { indices } = this;\n const existing = indices.get(input);\n if (existing) return [existing];\n if (input === void 0) return UNDEFINED;\n if (input === null) return NULL;\n if (Number.isNaN(input)) return NAN;\n if (input === Number.POSITIVE_INFINITY) return POSITIVE_INFINITY;\n if (input === Number.NEGATIVE_INFINITY) return NEGATIVE_INFINITY;\n if (input === 0 && 1 / input < 0) return NEGATIVE_ZERO;\n const index = this.index++;\n indices.set(input, index);\n stringify.call(this, input, index);\n return index;\n}\nfunction stringify(input, index) {\n const { deferred, plugins, postPlugins } = this;\n const str = this.stringified;\n const stack = [[input, index]];\n while (stack.length > 0) {\n const [input2, index2] = stack.pop();\n const partsForObj = (obj) => Object.keys(obj).map((k) => `\"_${flatten.call(this, k)}\":${flatten.call(this, obj[k])}`).join(\",\");\n let error = null;\n switch (typeof input2) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n str[index2] = JSON.stringify(input2);\n break;\n case \"bigint\":\n str[index2] = `[\"${TYPE_BIGINT}\",\"${input2}\"]`;\n break;\n case \"symbol\": {\n const keyFor = Symbol.keyFor(input2);\n if (!keyFor) {\n error = new Error(\n \"Cannot encode symbol unless created with Symbol.for()\"\n );\n } else {\n str[index2] = `[\"${TYPE_SYMBOL}\",${JSON.stringify(keyFor)}]`;\n }\n break;\n }\n case \"object\": {\n if (!input2) {\n str[index2] = `${NULL}`;\n break;\n }\n const isArray = Array.isArray(input2);\n let pluginHandled = false;\n if (!isArray && plugins) {\n for (const plugin of plugins) {\n const pluginResult = plugin(input2);\n if (Array.isArray(pluginResult)) {\n pluginHandled = true;\n const [pluginIdentifier, ...rest] = pluginResult;\n str[index2] = `[${JSON.stringify(pluginIdentifier)}`;\n if (rest.length > 0) {\n str[index2] += `,${rest.map((v) => flatten.call(this, v)).join(\",\")}`;\n }\n str[index2] += \"]\";\n break;\n }\n }\n }\n if (!pluginHandled) {\n let result = isArray ? \"[\" : \"{\";\n if (isArray) {\n for (let i = 0; i < input2.length; i++)\n result += (i ? \",\" : \"\") + (i in input2 ? flatten.call(this, input2[i]) : HOLE);\n str[index2] = `${result}]`;\n } else if (input2 instanceof Date) {\n const dateTime = input2.getTime();\n str[index2] = `[\"${TYPE_DATE}\",${Number.isNaN(dateTime) ? JSON.stringify(\"invalid\") : dateTime}]`;\n } else if (input2 instanceof URL) {\n str[index2] = `[\"${TYPE_URL}\",${JSON.stringify(input2.href)}]`;\n } else if (input2 instanceof RegExp) {\n str[index2] = `[\"${TYPE_REGEXP}\",${JSON.stringify(\n input2.source\n )},${JSON.stringify(input2.flags)}]`;\n } else if (input2 instanceof Set) {\n if (input2.size > 0) {\n str[index2] = `[\"${TYPE_SET}\",${[...input2].map((val) => flatten.call(this, val)).join(\",\")}]`;\n } else {\n str[index2] = `[\"${TYPE_SET}\"]`;\n }\n } else if (input2 instanceof Map) {\n if (input2.size > 0) {\n str[index2] = `[\"${TYPE_MAP}\",${[...input2].flatMap(([k, v]) => [\n flatten.call(this, k),\n flatten.call(this, v)\n ]).join(\",\")}]`;\n } else {\n str[index2] = `[\"${TYPE_MAP}\"]`;\n }\n } else if (input2 instanceof Promise) {\n str[index2] = `[\"${TYPE_PROMISE}\",${index2}]`;\n deferred[index2] = input2;\n } else if (input2 instanceof Error) {\n str[index2] = `[\"${TYPE_ERROR}\",${JSON.stringify(input2.message)}`;\n if (input2.name !== \"Error\") {\n str[index2] += `,${JSON.stringify(input2.name)}`;\n }\n str[index2] += \"]\";\n } else if (Object.getPrototypeOf(input2) === null) {\n str[index2] = `[\"${TYPE_NULL_OBJECT}\",{${partsForObj(input2)}}]`;\n } else if (isPlainObject2(input2)) {\n str[index2] = `{${partsForObj(input2)}}`;\n } else {\n error = new Error(\"Cannot encode object with prototype\");\n }\n }\n break;\n }\n default: {\n const isArray = Array.isArray(input2);\n let pluginHandled = false;\n if (!isArray && plugins) {\n for (const plugin of plugins) {\n const pluginResult = plugin(input2);\n if (Array.isArray(pluginResult)) {\n pluginHandled = true;\n const [pluginIdentifier, ...rest] = pluginResult;\n str[index2] = `[${JSON.stringify(pluginIdentifier)}`;\n if (rest.length > 0) {\n str[index2] += `,${rest.map((v) => flatten.call(this, v)).join(\",\")}`;\n }\n str[index2] += \"]\";\n break;\n }\n }\n }\n if (!pluginHandled) {\n error = new Error(\"Cannot encode function or unexpected type\");\n }\n }\n }\n if (error) {\n let pluginHandled = false;\n if (postPlugins) {\n for (const plugin of postPlugins) {\n const pluginResult = plugin(input2);\n if (Array.isArray(pluginResult)) {\n pluginHandled = true;\n const [pluginIdentifier, ...rest] = pluginResult;\n str[index2] = `[${JSON.stringify(pluginIdentifier)}`;\n if (rest.length > 0) {\n str[index2] += `,${rest.map((v) => flatten.call(this, v)).join(\",\")}`;\n }\n str[index2] += \"]\";\n break;\n }\n }\n }\n if (!pluginHandled) {\n throw error;\n }\n }\n }\n}\nvar objectProtoNames2 = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction isPlainObject2(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === objectProtoNames2;\n}\n\n// vendor/turbo-stream-v2/unflatten.ts\nvar globalObj = typeof window !== \"undefined\" ? window : typeof globalThis !== \"undefined\" ? globalThis : void 0;\nfunction unflatten(parsed) {\n const { hydrated, values } = this;\n if (typeof parsed === \"number\") return hydrate.call(this, parsed);\n if (!Array.isArray(parsed) || !parsed.length) throw new SyntaxError();\n const startIndex = values.length;\n for (const value of parsed) {\n values.push(value);\n }\n hydrated.length = values.length;\n return hydrate.call(this, startIndex);\n}\nfunction hydrate(index) {\n const { hydrated, values, deferred, plugins } = this;\n let result;\n const stack = [\n [\n index,\n (v) => {\n result = v;\n }\n ]\n ];\n let postRun = [];\n while (stack.length > 0) {\n const [index2, set] = stack.pop();\n switch (index2) {\n case UNDEFINED:\n set(void 0);\n continue;\n case NULL:\n set(null);\n continue;\n case NAN:\n set(NaN);\n continue;\n case POSITIVE_INFINITY:\n set(Infinity);\n continue;\n case NEGATIVE_INFINITY:\n set(-Infinity);\n continue;\n case NEGATIVE_ZERO:\n set(-0);\n continue;\n }\n if (hydrated[index2]) {\n set(hydrated[index2]);\n continue;\n }\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n set(value);\n continue;\n }\n if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const [type, b, c] = value;\n switch (type) {\n case TYPE_DATE:\n set(hydrated[index2] = new Date(b));\n continue;\n case TYPE_URL:\n set(hydrated[index2] = new URL(b));\n continue;\n case TYPE_BIGINT:\n set(hydrated[index2] = BigInt(b));\n continue;\n case TYPE_REGEXP:\n set(hydrated[index2] = new RegExp(b, c));\n continue;\n case TYPE_SYMBOL:\n set(hydrated[index2] = Symbol.for(b));\n continue;\n case TYPE_SET:\n const newSet = /* @__PURE__ */ new Set();\n hydrated[index2] = newSet;\n for (let i = value.length - 1; i > 0; i--)\n stack.push([\n value[i],\n (v) => {\n newSet.add(v);\n }\n ]);\n set(newSet);\n continue;\n case TYPE_MAP:\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = value.length - 2; i > 0; i -= 2) {\n const r = [];\n stack.push([\n value[i + 1],\n (v) => {\n r[1] = v;\n }\n ]);\n stack.push([\n value[i],\n (k) => {\n r[0] = k;\n }\n ]);\n postRun.push(() => {\n map.set(r[0], r[1]);\n });\n }\n set(map);\n continue;\n case TYPE_NULL_OBJECT:\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (const key of Object.keys(b).reverse()) {\n const r = [];\n stack.push([\n b[key],\n (v) => {\n r[1] = v;\n }\n ]);\n stack.push([\n Number(key.slice(1)),\n (k) => {\n r[0] = k;\n }\n ]);\n postRun.push(() => {\n obj[r[0]] = r[1];\n });\n }\n set(obj);\n continue;\n case TYPE_PROMISE:\n if (hydrated[b]) {\n set(hydrated[index2] = hydrated[b]);\n } else {\n const d = new Deferred2();\n deferred[b] = d;\n set(hydrated[index2] = d.promise);\n }\n continue;\n case TYPE_ERROR:\n const [, message, errorType] = value;\n let error = errorType && globalObj && globalObj[errorType] ? new globalObj[errorType](message) : new Error(message);\n hydrated[index2] = error;\n set(error);\n continue;\n case TYPE_PREVIOUS_RESOLVED:\n set(hydrated[index2] = hydrated[b]);\n continue;\n default:\n if (Array.isArray(plugins)) {\n const r = [];\n const vals = value.slice(1);\n for (let i = 0; i < vals.length; i++) {\n const v = vals[i];\n stack.push([\n v,\n (v2) => {\n r[i] = v2;\n }\n ]);\n }\n postRun.push(() => {\n for (const plugin of plugins) {\n const result2 = plugin(value[0], ...r);\n if (result2) {\n set(hydrated[index2] = result2.value);\n return;\n }\n }\n throw new SyntaxError();\n });\n continue;\n }\n throw new SyntaxError();\n }\n } else {\n const array = [];\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i++) {\n const n = value[i];\n if (n !== HOLE) {\n stack.push([\n n,\n (v) => {\n array[i] = v;\n }\n ]);\n }\n }\n set(array);\n continue;\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key of Object.keys(value).reverse()) {\n const r = [];\n stack.push([\n value[key],\n (v) => {\n r[1] = v;\n }\n ]);\n stack.push([\n Number(key.slice(1)),\n (k) => {\n r[0] = k;\n }\n ]);\n postRun.push(() => {\n object[r[0]] = r[1];\n });\n }\n set(object);\n continue;\n }\n }\n while (postRun.length > 0) {\n postRun.pop()();\n }\n return result;\n}\n\n// vendor/turbo-stream-v2/turbo-stream.ts\nasync function decode(readable, options) {\n const { plugins } = options ?? {};\n const done = new Deferred2();\n const reader = readable.pipeThrough(createLineSplittingTransform()).getReader();\n const decoder = {\n values: [],\n hydrated: [],\n deferred: {},\n plugins\n };\n const decoded = await decodeInitial.call(decoder, reader);\n let donePromise = done.promise;\n if (decoded.done) {\n done.resolve();\n } else {\n donePromise = decodeDeferred.call(decoder, reader).then(done.resolve).catch((reason) => {\n for (const deferred of Object.values(decoder.deferred)) {\n deferred.reject(reason);\n }\n done.reject(reason);\n });\n }\n return {\n done: donePromise.then(() => reader.closed),\n value: decoded.value\n };\n}\nasync function decodeInitial(reader) {\n const read = await reader.read();\n if (!read.value) {\n throw new SyntaxError();\n }\n let line;\n try {\n line = JSON.parse(read.value);\n } catch (reason) {\n throw new SyntaxError();\n }\n return {\n done: read.done,\n value: unflatten.call(this, line)\n };\n}\nasync function decodeDeferred(reader) {\n let read = await reader.read();\n while (!read.done) {\n if (!read.value) continue;\n const line = read.value;\n switch (line[0]) {\n case TYPE_PROMISE: {\n const colonIndex = line.indexOf(\":\");\n const deferredId = Number(line.slice(1, colonIndex));\n const deferred = this.deferred[deferredId];\n if (!deferred) {\n throw new Error(`Deferred ID ${deferredId} not found in stream`);\n }\n const lineData = line.slice(colonIndex + 1);\n let jsonLine;\n try {\n jsonLine = JSON.parse(lineData);\n } catch (reason) {\n throw new SyntaxError();\n }\n const value = unflatten.call(this, jsonLine);\n deferred.resolve(value);\n break;\n }\n case TYPE_ERROR: {\n const colonIndex = line.indexOf(\":\");\n const deferredId = Number(line.slice(1, colonIndex));\n const deferred = this.deferred[deferredId];\n if (!deferred) {\n throw new Error(`Deferred ID ${deferredId} not found in stream`);\n }\n const lineData = line.slice(colonIndex + 1);\n let jsonLine;\n try {\n jsonLine = JSON.parse(lineData);\n } catch (reason) {\n throw new SyntaxError();\n }\n const value = unflatten.call(this, jsonLine);\n deferred.reject(value);\n break;\n }\n default:\n throw new SyntaxError();\n }\n read = await reader.read();\n }\n}\nfunction encode(input, options) {\n const { plugins, postPlugins, signal } = options ?? {};\n const encoder = {\n deferred: {},\n index: 0,\n indices: /* @__PURE__ */ new Map(),\n stringified: [],\n plugins,\n postPlugins,\n signal\n };\n const textEncoder = new TextEncoder();\n let lastSentIndex = 0;\n const readable = new ReadableStream({\n async start(controller) {\n const id = flatten.call(encoder, input);\n if (Array.isArray(id)) {\n throw new Error(\"This should never happen\");\n }\n if (id < 0) {\n controller.enqueue(textEncoder.encode(`${id}\n`));\n } else {\n controller.enqueue(\n textEncoder.encode(`[${encoder.stringified.join(\",\")}]\n`)\n );\n lastSentIndex = encoder.stringified.length - 1;\n }\n const seenPromises = /* @__PURE__ */ new WeakSet();\n if (Object.keys(encoder.deferred).length) {\n let raceDone;\n const racePromise = new Promise((resolve, reject) => {\n raceDone = resolve;\n if (signal) {\n const rejectPromise = () => reject(signal.reason || new Error(\"Signal was aborted.\"));\n if (signal.aborted) {\n rejectPromise();\n } else {\n signal.addEventListener(\"abort\", (event) => {\n rejectPromise();\n });\n }\n }\n });\n while (Object.keys(encoder.deferred).length > 0) {\n for (const [deferredId, deferred] of Object.entries(\n encoder.deferred\n )) {\n if (seenPromises.has(deferred)) continue;\n seenPromises.add(\n // biome-ignore lint/suspicious/noAssignInExpressions: <explanation>\n encoder.deferred[Number(deferredId)] = Promise.race([\n racePromise,\n deferred\n ]).then(\n (resolved) => {\n const id2 = flatten.call(encoder, resolved);\n if (Array.isArray(id2)) {\n controller.enqueue(\n textEncoder.encode(\n `${TYPE_PROMISE}${deferredId}:[[\"${TYPE_PREVIOUS_RESOLVED}\",${id2[0]}]]\n`\n )\n );\n encoder.index++;\n lastSentIndex++;\n } else if (id2 < 0) {\n controller.enqueue(\n textEncoder.encode(\n `${TYPE_PROMISE}${deferredId}:${id2}\n`\n )\n );\n } else {\n const values = encoder.stringified.slice(lastSentIndex + 1).join(\",\");\n controller.enqueue(\n textEncoder.encode(\n `${TYPE_PROMISE}${deferredId}:[${values}]\n`\n )\n );\n lastSentIndex = encoder.stringified.length - 1;\n }\n },\n (reason) => {\n if (!reason || typeof reason !== \"object\" || !(reason instanceof Error)) {\n reason = new Error(\"An unknown error occurred\");\n }\n const id2 = flatten.call(encoder, reason);\n if (Array.isArray(id2)) {\n controller.enqueue(\n textEncoder.encode(\n `${TYPE_ERROR}${deferredId}:[[\"${TYPE_PREVIOUS_RESOLVED}\",${id2[0]}]]\n`\n )\n );\n encoder.index++;\n lastSentIndex++;\n } else if (id2 < 0) {\n controller.enqueue(\n textEncoder.encode(\n `${TYPE_ERROR}${deferredId}:${id2}\n`\n )\n );\n } else {\n const values = encoder.stringified.slice(lastSentIndex + 1).join(\",\");\n controller.enqueue(\n textEncoder.encode(\n `${TYPE_ERROR}${deferredId}:[${values}]\n`\n )\n );\n lastSentIndex = encoder.stringified.length - 1;\n }\n }\n ).finally(() => {\n delete encoder.deferred[Number(deferredId)];\n })\n );\n }\n await Promise.race(Object.values(encoder.deferred));\n }\n raceDone();\n }\n await Promise.all(Object.values(encoder.deferred));\n controller.close();\n }\n });\n return readable;\n}\n\n// lib/dom/ssr/data.ts\nasync function createRequestInit(request) {\n let init = { signal: request.signal };\n if (request.method !== \"GET\") {\n init.method = request.method;\n let contentType = request.headers.get(\"Content-Type\");\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n init.headers = { \"Content-Type\": contentType };\n init.body = JSON.stringify(await request.json());\n } else if (contentType && /\\btext\\/plain\\b/.test(contentType)) {\n init.headers = { \"Content-Type\": contentType };\n init.body = await request.text();\n } else if (contentType && /\\bapplication\\/x-www-form-urlencoded\\b/.test(contentType)) {\n init.body = new URLSearchParams(await request.text());\n } else {\n init.body = await request.formData();\n }\n }\n return init;\n}\n\n// lib/dom/ssr/markup.ts\nvar ESCAPE_LOOKUP = {\n \"&\": \"\\\\u0026\",\n \">\": \"\\\\u003e\",\n \"<\": \"\\\\u003c\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nvar ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction escapeHtml(html) {\n return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);\n}\n\n// lib/dom/ssr/invariant.ts\nfunction invariant2(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\n// lib/dom/ssr/single-fetch.tsx\nvar SingleFetchRedirectSymbol = Symbol(\"SingleFetchRedirect\");\nvar SingleFetchNoResultError = class extends Error {\n};\nvar SINGLE_FETCH_REDIRECT_STATUS = 202;\nvar NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([100, 101, 204, 205]);\nfunction StreamTransfer({\n context,\n identifier,\n reader,\n textDecoder,\n nonce\n}) {\n if (!context.renderMeta || !context.renderMeta.didRenderScripts) {\n return null;\n }\n if (!context.renderMeta.streamCache) {\n context.renderMeta.streamCache = {};\n }\n let { streamCache } = context.renderMeta;\n let promise = streamCache[identifier];\n if (!promise) {\n promise = streamCache[identifier] = reader.read().then((result) => {\n streamCache[identifier].result = {\n done: result.done,\n value: textDecoder.decode(result.value, { stream: true })\n };\n }).catch((e) => {\n streamCache[identifier].error = e;\n });\n }\n if (promise.error) {\n throw promise.error;\n }\n if (promise.result === void 0) {\n throw promise;\n }\n let { done, value } = promise.result;\n let scriptTag = value ? /* @__PURE__ */ React4.createElement(\n \"script\",\n {\n nonce,\n dangerouslySetInnerHTML: {\n __html: `window.__reactRouterContext.streamController.enqueue(${escapeHtml(\n JSON.stringify(value)\n )});`\n }\n }\n ) : null;\n if (done) {\n return /* @__PURE__ */ React4.createElement(React4.Fragment, null, scriptTag, /* @__PURE__ */ React4.createElement(\n \"script\",\n {\n nonce,\n dangerouslySetInnerHTML: {\n __html: `window.__reactRouterContext.streamController.close();`\n }\n }\n ));\n } else {\n return /* @__PURE__ */ React4.createElement(React4.Fragment, null, scriptTag, /* @__PURE__ */ React4.createElement(React4.Suspense, null, /* @__PURE__ */ React4.createElement(\n StreamTransfer,\n {\n context,\n identifier: identifier + 1,\n reader,\n textDecoder,\n nonce\n }\n )));\n }\n}\nfunction getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules, ssr, basename) {\n let dataStrategy = getSingleFetchDataStrategyImpl(\n getRouter,\n (match) => {\n let manifestRoute = manifest.routes[match.route.id];\n invariant2(manifestRoute, \"Route not found in manifest\");\n let routeModule = routeModules[match.route.id];\n return {\n hasLoader: manifestRoute.hasLoader,\n hasClientLoader: manifestRoute.hasClientLoader,\n hasShouldRevalidate: Boolean(routeModule?.shouldRevalidate)\n };\n },\n fetchAndDecodeViaTurboStream,\n ssr,\n basename\n );\n return async (args) => args.runClientMiddleware(dataStrategy);\n}\nfunction getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, basename, shouldAllowOptOut = () => true) {\n return async (args) => {\n let { request, matches, fetcherKey } = args;\n let router = getRouter();\n if (request.method !== \"GET\") {\n return singleFetchActionStrategy(args, fetchAndDecode, basename);\n }\n let foundRevalidatingServerLoader = matches.some((m) => {\n let { hasLoader, hasClientLoader } = getRouteInfo(m);\n return m.shouldCallHandler() && hasLoader && !hasClientLoader;\n });\n if (!ssr && !foundRevalidatingServerLoader) {\n return nonSsrStrategy(args, getRouteInfo, fetchAndDecode, basename);\n }\n if (fetcherKey) {\n return singleFetchLoaderFetcherStrategy(args, fetchAndDecode, basename);\n }\n return singleFetchLoaderNavigationStrategy(\n args,\n router,\n getRouteInfo,\n fetchAndDecode,\n ssr,\n basename,\n shouldAllowOptOut\n );\n };\n}\nasync function singleFetchActionStrategy(args, fetchAndDecode, basename) {\n let actionMatch = args.matches.find((m) => m.shouldCallHandler());\n invariant2(actionMatch, \"No action match found\");\n let actionStatus = void 0;\n let result = await actionMatch.resolve(async (handler) => {\n let result2 = await handler(async () => {\n let { data: data2, status } = await fetchAndDecode(args, basename, [\n actionMatch.route.id\n ]);\n actionStatus = status;\n return unwrapSingleFetchResult(data2, actionMatch.route.id);\n });\n return result2;\n });\n if (isResponse(result.result) || isRouteErrorResponse(result.result) || isDataWithResponseInit(result.result)) {\n return { [actionMatch.route.id]: result };\n }\n return {\n [actionMatch.route.id]: {\n type: result.type,\n result: data(result.result, actionStatus)\n }\n };\n}\nasync function nonSsrStrategy(args, getRouteInfo, fetchAndDecode, basename) {\n let matchesToLoad = args.matches.filter((m) => m.shouldCallHandler());\n let results = {};\n await Promise.all(\n matchesToLoad.map(\n (m) => m.resolve(async (handler) => {\n try {\n let { hasClientLoader } = getRouteInfo(m);\n let routeId = m.route.id;\n let result = hasClientLoader ? await handler(async () => {\n let { data: data2 } = await fetchAndDecode(args, basename, [routeId]);\n return unwrapSingleFetchResult(data2, routeId);\n }) : await handler();\n results[m.route.id] = { type: \"data\", result };\n } catch (e) {\n results[m.route.id] = { type: \"error\", result: e };\n }\n })\n )\n );\n return results;\n}\nasync function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, fetchAndDecode, ssr, basename, shouldAllowOptOut = () => true) {\n let routesParams = /* @__PURE__ */ new Set();\n let foundOptOutRoute = false;\n let routeDfds = args.matches.map(() => createDeferred2());\n let singleFetchDfd = createDeferred2();\n let results = {};\n let resolvePromise = Promise.all(\n args.matches.map(\n async (m, i) => m.resolve(async (handler) => {\n routeDfds[i].resolve();\n let routeId = m.route.id;\n let { hasLoader, hasClientLoader, hasShouldRevalidate } = getRouteInfo(m);\n let defaultShouldRevalidate = !m.shouldRevalidateArgs || m.shouldRevalidateArgs.actionStatus == null || m.shouldRevalidateArgs.actionStatus < 400;\n let shouldCall = m.shouldCallHandler(defaultShouldRevalidate);\n if (!shouldCall) {\n foundOptOutRoute || (foundOptOutRoute = m.shouldRevalidateArgs != null && // This is a revalidation,\n hasLoader && // for a route with a server loader,\n hasShouldRevalidate === true);\n return;\n }\n if (shouldAllowOptOut(m) && hasClientLoader) {\n if (hasLoader) {\n foundOptOutRoute = true;\n }\n try {\n let result = await handler(async () => {\n let { data: data2 } = await fetchAndDecode(args, basename, [routeId]);\n return unwrapSingleFetchResult(data2, routeId);\n });\n results[routeId] = { type: \"data\", result };\n } catch (e) {\n results[routeId] = { type: \"error\", result: e };\n }\n return;\n }\n if (hasLoader) {\n routesParams.add(routeId);\n }\n try {\n let result = await handler(async () => {\n let data2 = await singleFetchDfd.promise;\n return unwrapSingleFetchResult(data2, routeId);\n });\n results[routeId] = { type: \"data\", result };\n } catch (e) {\n results[routeId] = { type: \"error\", result: e };\n }\n })\n )\n );\n await Promise.all(routeDfds.map((d) => d.promise));\n let isInitialLoad = !router.state.initialized && router.state.navigation.state === \"idle\";\n if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {\n singleFetchDfd.resolve({ routes: {} });\n } else {\n let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;\n try {\n let data2 = await fetchAndDecode(args, basename, targetRoutes);\n singleFetchDfd.resolve(data2.data);\n } catch (e) {\n singleFetchDfd.reject(e);\n }\n }\n await resolvePromise;\n await bubbleMiddlewareErrors(\n singleFetchDfd.promise,\n args.matches,\n routesParams,\n results\n );\n return results;\n}\nasync function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams, results) {\n try {\n let middlewareError;\n let fetchedData = await singleFetchPromise;\n if (\"routes\" in fetchedData) {\n for (let match of matches) {\n if (match.route.id in fetchedData.routes) {\n let routeResult = fetchedData.routes[match.route.id];\n if (\"error\" in routeResult) {\n middlewareError = routeResult.error;\n if (results[match.route.id]?.result == null) {\n results[match.route.id] = {\n type: \"error\",\n result: middlewareError\n };\n }\n break;\n }\n }\n }\n }\n if (middlewareError !== void 0) {\n Array.from(routesParams.values()).forEach((routeId) => {\n if (results[routeId].result instanceof SingleFetchNoResultError) {\n results[routeId].result = middlewareError;\n }\n });\n }\n } catch (e) {\n }\n}\nasync function singleFetchLoaderFetcherStrategy(args, fetchAndDecode, basename) {\n let fetcherMatch = args.matches.find((m) => m.shouldCallHandler());\n invariant2(fetcherMatch, \"No fetcher match found\");\n let routeId = fetcherMatch.route.id;\n let result = await fetcherMatch.resolve(\n async (handler) => handler(async () => {\n let { data: data2 } = await fetchAndDecode(args, basename, [routeId]);\n return unwrapSingleFetchResult(data2, routeId);\n })\n );\n return { [fetcherMatch.route.id]: result };\n}\nfunction stripIndexParam(url) {\n let indexValues = url.searchParams.getAll(\"index\");\n url.searchParams.delete(\"index\");\n let indexValuesToKeep = [];\n for (let indexValue of indexValues) {\n if (indexValue) {\n indexValuesToKeep.push(indexValue);\n }\n }\n for (let toKeep of indexValuesToKeep) {\n url.searchParams.append(\"index\", toKeep);\n }\n return url;\n}\nfunction singleFetchUrl(reqUrl, basename, extension) {\n let url = typeof reqUrl === \"string\" ? new URL(\n reqUrl,\n // This can be called during the SSR flow via PrefetchPageLinksImpl so\n // don't assume window is available\n typeof window === \"undefined\" ? \"server://singlefetch/\" : window.location.origin\n ) : reqUrl;\n if (url.pathname === \"/\") {\n url.pathname = `_root.${extension}`;\n } else if (basename && stripBasename(url.pathname, basename) === \"/\") {\n url.pathname = `${basename.replace(/\\/$/, \"\")}/_root.${extension}`;\n } else {\n url.pathname = `${url.pathname.replace(/\\/$/, \"\")}.${extension}`;\n }\n return url;\n}\nasync function fetchAndDecodeViaTurboStream(args, basename, targetRoutes) {\n let { request } = args;\n let url = singleFetchUrl(request.url, basename, \"data\");\n if (request.method === \"GET\") {\n url = stripIndexParam(url);\n if (targetRoutes) {\n url.searchParams.set(\"_routes\", targetRoutes.join(\",\"));\n }\n }\n let res = await fetch(url, await createRequestInit(request));\n if (res.status >= 400 && !res.headers.has(\"X-Remix-Response\")) {\n throw new ErrorResponseImpl(res.status, res.statusText, await res.text());\n }\n if (res.status === 204 && res.headers.has(\"X-Remix-Redirect\")) {\n return {\n status: SINGLE_FETCH_REDIRECT_STATUS,\n data: {\n redirect: {\n redirect: res.headers.get(\"X-Remix-Redirect\"),\n status: Number(res.headers.get(\"X-Remix-Status\") || \"302\"),\n revalidate: res.headers.get(\"X-Remix-Revalidate\") === \"true\",\n reload: res.headers.get(\"X-Remix-Reload-Document\") === \"true\",\n replace: res.headers.get(\"X-Remix-Replace\") === \"true\"\n }\n }\n };\n }\n if (NO_BODY_STATUS_CODES.has(res.status)) {\n let routes = {};\n if (targetRoutes && request.method !== \"GET\") {\n routes[targetRoutes[0]] = { data: void 0 };\n }\n return {\n status: res.status,\n data: { routes }\n };\n }\n invariant2(res.body, \"No response body to decode\");\n try {\n let decoded = await decodeViaTurboStream(res.body, window);\n let data2;\n if (request.method === \"GET\") {\n let typed = decoded.value;\n if (SingleFetchRedirectSymbol in typed) {\n data2 = { redirect: typed[SingleFetchRedirectSymbol] };\n } else {\n data2 = { routes: typed };\n }\n } else {\n let typed = decoded.value;\n let routeId = targetRoutes?.[0];\n invariant2(routeId, \"No routeId found for single fetch call decoding\");\n if (\"redirect\" in typed) {\n data2 = { redirect: typed };\n } else {\n data2 = { routes: { [routeId]: typed } };\n }\n }\n return { status: res.status, data: data2 };\n } catch (e) {\n throw new Error(\"Unable to decode turbo-stream response\");\n }\n}\nfunction decodeViaTurboStream(body, global) {\n return decode(body, {\n plugins: [\n (type, ...rest) => {\n if (type === \"SanitizedError\") {\n let [name, message, stack] = rest;\n let Constructor = Error;\n if (name && name in global && typeof global[name] === \"function\") {\n Constructor = global[name];\n }\n let error = new Constructor(message);\n error.stack = stack;\n return { value: error };\n }\n if (type === \"ErrorResponse\") {\n let [data2, status, statusText] = rest;\n return {\n value: new ErrorResponseImpl(status, statusText, data2)\n };\n }\n if (type === \"SingleFetchRedirect\") {\n return { value: { [SingleFetchRedirectSymbol]: rest[0] } };\n }\n if (type === \"SingleFetchClassInstance\") {\n return { value: rest[0] };\n }\n if (type === \"SingleFetchFallback\") {\n return { value: void 0 };\n }\n }\n ]\n });\n}\nfunction unwrapSingleFetchResult(result, routeId) {\n if (\"redirect\" in result) {\n let {\n redirect: location,\n revalidate,\n reload,\n replace: replace2,\n status\n } = result.redirect;\n throw redirect(location, {\n status,\n headers: {\n // Three R's of redirecting (lol Veep)\n ...revalidate ? { \"X-Remix-Revalidate\": \"yes\" } : null,\n ...reload ? { \"X-Remix-Reload-Document\": \"yes\" } : null,\n ...replace2 ? { \"X-Remix-Replace\": \"yes\" } : null\n }\n });\n }\n let routeResult = result.routes[routeId];\n if (routeResult == null) {\n throw new SingleFetchNoResultError(\n `No result found for routeId \"${routeId}\"`\n );\n } else if (\"error\" in routeResult) {\n throw routeResult.error;\n } else if (\"data\" in routeResult) {\n return routeResult.data;\n } else {\n throw new Error(`Invalid response found for routeId \"${routeId}\"`);\n }\n}\nfunction createDeferred2() {\n let resolve;\n let reject;\n let promise = new Promise((res, rej) => {\n resolve = async (val) => {\n res(val);\n try {\n await promise;\n } catch (e) {\n }\n };\n reject = async (error) => {\n rej(error);\n try {\n await promise;\n } catch (e) {\n }\n };\n });\n return {\n promise,\n //@ts-ignore\n resolve,\n //@ts-ignore\n reject\n };\n}\n\n// lib/dom/ssr/errorBoundaries.tsx\nimport * as React9 from \"react\";\n\n// lib/dom/ssr/components.tsx\nimport * as React8 from \"react\";\n\n// lib/dom/ssr/routeModules.ts\nasync function loadRouteModule(route, routeModulesCache) {\n if (route.id in routeModulesCache) {\n return routeModulesCache[route.id];\n }\n try {\n let routeModule = await import(\n /* @vite-ignore */\n /* webpackIgnore: true */\n route.module\n );\n routeModulesCache[route.id] = routeModule;\n return routeModule;\n } catch (error) {\n console.error(\n `Error loading route module \\`${route.module}\\`, reloading page...`\n );\n console.error(error);\n if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error\n import.meta.hot) {\n throw error;\n }\n window.location.reload();\n return new Promise(() => {\n });\n }\n}\n\n// lib/dom/ssr/links.ts\nfunction getKeyedLinksForMatches(matches, routeModules, manifest) {\n let descriptors = matches.map((match) => {\n let module = routeModules[match.route.id];\n let route = manifest.routes[match.route.id];\n return [\n route && route.css ? route.css.map((href) => ({ rel: \"stylesheet\", href })) : [],\n module?.links?.() || []\n ];\n }).flat(2);\n let preloads = getModuleLinkHrefs(matches, manifest);\n return dedupeLinkDescriptors(descriptors, preloads);\n}\nfunction getRouteCssDescriptors(route) {\n if (!route.css) return [];\n return route.css.map((href) => ({ rel: \"stylesheet\", href }));\n}\nasync function prefetchRouteCss(route) {\n if (!route.css) return;\n let descriptors = getRouteCssDescriptors(route);\n await Promise.all(descriptors.map(prefetchStyleLink));\n}\nasync function prefetchStyleLinks(route, routeModule) {\n if (!route.css && !routeModule.links || !isPreloadSupported()) return;\n let descriptors = [];\n if (route.css) {\n descriptors.push(...getRouteCssDescriptors(route));\n }\n if (routeModule.links) {\n descriptors.push(...routeModule.links());\n }\n if (descriptors.length === 0) return;\n let styleLinks = [];\n for (let descriptor of descriptors) {\n if (!isPageLinkDescriptor(descriptor) && descriptor.rel === \"stylesheet\") {\n styleLinks.push({\n ...descriptor,\n rel: \"preload\",\n as: \"style\"\n });\n }\n }\n await Promise.all(styleLinks.map(prefetchStyleLink));\n}\nasync function prefetchStyleLink(descriptor) {\n return new Promise((resolve) => {\n if (descriptor.media && !window.matchMedia(descriptor.media).matches || document.querySelector(\n `link[rel=\"stylesheet\"][href=\"${descriptor.href}\"]`\n )) {\n return resolve();\n }\n let link = document.createElement(\"link\");\n Object.assign(link, descriptor);\n function removeLink() {\n if (document.head.contains(link)) {\n document.head.removeChild(link);\n }\n }\n link.onload = () => {\n removeLink();\n resolve();\n };\n link.onerror = () => {\n removeLink();\n resolve();\n };\n document.head.appendChild(link);\n });\n}\nfunction isPageLinkDescriptor(object) {\n return object != null && typeof object.page === \"string\";\n}\nfunction isHtmlLinkDescriptor(object) {\n if (object == null) {\n return false;\n }\n if (object.href == null) {\n return object.rel === \"preload\" && typeof object.imageSrcSet === \"string\" && typeof object.imageSizes === \"string\";\n }\n return typeof object.rel === \"string\" && typeof object.href === \"string\";\n}\nasync function getKeyedPrefetchLinks(matches, manifest, routeModules) {\n let links = await Promise.all(\n matches.map(async (match) => {\n let route = manifest.routes[match.route.id];\n if (route) {\n let mod = await loadRouteModule(route, routeModules);\n return mod.links ? mod.links() : [];\n }\n return [];\n })\n );\n return dedupeLinkDescriptors(\n links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === \"stylesheet\" || link.rel === \"preload\").map(\n (link) => link.rel === \"stylesheet\" ? { ...link, rel: \"prefetch\", as: \"style\" } : { ...link, rel: \"prefetch\" }\n )\n );\n}\nfunction getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {\n let isNew = (match, index) => {\n if (!currentMatches[index]) return true;\n return match.route.id !== currentMatches[index].route.id;\n };\n let matchPathChanged = (match, index) => {\n return (\n // param change, /users/123 -> /users/456\n currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentMatches[index].route.path?.endsWith(\"*\") && currentMatches[index].params[\"*\"] !== match.params[\"*\"]\n );\n };\n if (mode === \"assets\") {\n return nextMatches.filter(\n (match, index) => isNew(match, index) || matchPathChanged(match, index)\n );\n }\n if (mode === \"data\") {\n return nextMatches.filter((match, index) => {\n let manifestRoute = manifest.routes[match.route.id];\n if (!manifestRoute || !manifestRoute.hasLoader) {\n return false;\n }\n if (isNew(match, index) || matchPathChanged(match, index)) {\n return true;\n }\n if (match.route.shouldRevalidate) {\n let routeChoice = match.route.shouldRevalidate({\n currentUrl: new URL(\n location.pathname + location.search + location.hash,\n window.origin\n ),\n currentParams: currentMatches[0]?.params || {},\n nextUrl: new URL(page, window.origin),\n nextParams: match.params,\n defaultShouldRevalidate: true\n });\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n return true;\n });\n }\n return [];\n}\nfunction getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {\n return dedupeHrefs(\n matches.map((match) => {\n let route = manifest.routes[match.route.id];\n if (!route) return [];\n let hrefs = [route.module];\n if (route.clientActionModule) {\n hrefs = hrefs.concat(route.clientActionModule);\n }\n if (route.clientLoaderModule) {\n hrefs = hrefs.concat(route.clientLoaderModule);\n }\n if (includeHydrateFallback && route.hydrateFallbackModule) {\n hrefs = hrefs.concat(route.hydrateFallbackModule);\n }\n if (route.imports) {\n hrefs = hrefs.concat(route.imports);\n }\n return hrefs;\n }).flat(1)\n );\n}\nfunction dedupeHrefs(hrefs) {\n return [...new Set(hrefs)];\n}\nfunction sortKeys(obj) {\n let sorted = {};\n let keys = Object.keys(obj).sort();\n for (let key of keys) {\n sorted[key] = obj[key];\n }\n return sorted;\n}\nfunction dedupeLinkDescriptors(descriptors, preloads) {\n let set = /* @__PURE__ */ new Set();\n let preloadsSet = new Set(preloads);\n return descriptors.reduce((deduped, descriptor) => {\n let alreadyModulePreload = preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === \"script\" && descriptor.href && preloadsSet.has(descriptor.href);\n if (alreadyModulePreload) {\n return deduped;\n }\n let key = JSON.stringify(sortKeys(descriptor));\n if (!set.has(key)) {\n set.add(key);\n deduped.push({ key, link: descriptor });\n }\n return deduped;\n }, []);\n}\nvar _isPreloadSupported;\nfunction isPreloadSupported() {\n if (_isPreloadSupported !== void 0) {\n return _isPreloadSupported;\n }\n let el = document.createElement(\"link\");\n _isPreloadSupported = el.relList.supports(\"preload\");\n el = null;\n return _isPreloadSupported;\n}\n\n// lib/dom/ssr/fog-of-war.ts\nimport * as React7 from \"react\";\n\n// lib/dom/ssr/routes.tsx\nimport * as React6 from \"react\";\n\n// lib/dom/ssr/fallback.tsx\nimport * as React5 from \"react\";\nfunction RemixRootDefaultHydrateFallback() {\n return /* @__PURE__ */ React5.createElement(BoundaryShell, { title: \"Loading...\", renderScripts: true }, ENABLE_DEV_WARNINGS ? /* @__PURE__ */ React5.createElement(\n \"script\",\n {\n dangerouslySetInnerHTML: {\n __html: `\n console.log(\n \"\\u{1F4BF} Hey developer \\u{1F44B}. You can provide a way better UX than this \" +\n \"when your app is loading JS modules and/or running \\`clientLoader\\` \" +\n \"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback \" +\n \"for more information.\"\n );\n `\n }\n }\n ) : null);\n}\n\n// lib/dom/ssr/routes.tsx\nfunction groupRoutesByParentId(manifest) {\n let routes = {};\n Object.values(manifest).forEach((route) => {\n if (route) {\n let parentId = route.parentId || \"\";\n if (!routes[parentId]) {\n routes[parentId] = [];\n }\n routes[parentId].push(route);\n }\n });\n return routes;\n}\nfunction getRouteComponents(route, routeModule, isSpaMode) {\n let Component4 = getRouteModuleComponent(routeModule);\n let HydrateFallback = routeModule.HydrateFallback && (!isSpaMode || route.id === \"root\") ? routeModule.HydrateFallback : route.id === \"root\" ? RemixRootDefaultHydrateFallback : void 0;\n let ErrorBoundary = routeModule.ErrorBoundary ? routeModule.ErrorBoundary : route.id === \"root\" ? () => /* @__PURE__ */ React6.createElement(RemixRootDefaultErrorBoundary, { error: useRouteError() }) : void 0;\n if (route.id === \"root\" && routeModule.Layout) {\n return {\n ...Component4 ? {\n element: /* @__PURE__ */ React6.createElement(routeModule.Layout, null, /* @__PURE__ */ React6.createElement(Component4, null))\n } : { Component: Component4 },\n ...ErrorBoundary ? {\n errorElement: /* @__PURE__ */ React6.createElement(routeModule.Layout, null, /* @__PURE__ */ React6.createElement(ErrorBoundary, null))\n } : { ErrorBoundary },\n ...HydrateFallback ? {\n hydrateFallbackElement: /* @__PURE__ */ React6.createElement(routeModule.Layout, null, /* @__PURE__ */ React6.createElement(HydrateFallback, null))\n } : { HydrateFallback }\n };\n }\n return { Component: Component4, ErrorBoundary, HydrateFallback };\n}\nfunction createServerRoutes(manifest, routeModules, future, isSpaMode, parentId = \"\", routesByParentId = groupRoutesByParentId(manifest), spaModeLazyPromise = Promise.resolve({ Component: () => null })) {\n return (routesByParentId[parentId] || []).map((route) => {\n let routeModule = routeModules[route.id];\n invariant2(\n routeModule,\n \"No `routeModule` available to create server routes\"\n );\n let dataRoute = {\n ...getRouteComponents(route, routeModule, isSpaMode),\n caseSensitive: route.caseSensitive,\n id: route.id,\n index: route.index,\n path: route.path,\n handle: routeModule.handle,\n // For SPA Mode, all routes are lazy except root. However we tell the\n // router root is also lazy here too since we don't need a full\n // implementation - we just need a `lazy` prop to tell the RR rendering\n // where to stop which is always at the root route in SPA mode\n lazy: isSpaMode ? () => spaModeLazyPromise : void 0,\n // For partial hydration rendering, we need to indicate when the route\n // has a loader/clientLoader, but it won't ever be called during the static\n // render, so just give it a no-op function so we can render down to the\n // proper fallback\n loader: route.hasLoader || route.hasClientLoader ? () => null : void 0\n // We don't need middleware/action/shouldRevalidate on these routes since\n // they're for a static render\n };\n let children = createServerRoutes(\n manifest,\n routeModules,\n future,\n isSpaMode,\n route.id,\n routesByParentId,\n spaModeLazyPromise\n );\n if (children.length > 0) dataRoute.children = children;\n return dataRoute;\n });\n}\nfunction createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, initialState, ssr, isSpaMode) {\n return createClientRoutes(\n manifest,\n routeModulesCache,\n initialState,\n ssr,\n isSpaMode,\n \"\",\n groupRoutesByParentId(manifest),\n needsRevalidation\n );\n}\nfunction preventInvalidServerHandlerCall(type, route) {\n if (type === \"loader\" && !route.hasLoader || type === \"action\" && !route.hasAction) {\n let fn = type === \"action\" ? \"serverAction()\" : \"serverLoader()\";\n let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: \"${route.id}\")`;\n console.error(msg);\n throw new ErrorResponseImpl(400, \"Bad Request\", new Error(msg), true);\n }\n}\nfunction noActionDefinedError(type, routeId) {\n let article = type === \"clientAction\" ? \"a\" : \"an\";\n let msg = `Route \"${routeId}\" does not have ${article} ${type}, but you are trying to submit to it. To fix this, please add ${article} \\`${type}\\` function to the route`;\n console.error(msg);\n throw new ErrorResponseImpl(405, \"Method Not Allowed\", new Error(msg), true);\n}\nfunction createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = \"\", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {\n return (routesByParentId[parentId] || []).map((route) => {\n let routeModule = routeModulesCache[route.id];\n function fetchServerHandler(singleFetch) {\n invariant2(\n typeof singleFetch === \"function\",\n \"No single fetch function available for route handler\"\n );\n return singleFetch();\n }\n function fetchServerLoader(singleFetch) {\n if (!route.hasLoader) return Promise.resolve(null);\n return fetchServerHandler(singleFetch);\n }\n function fetchServerAction(singleFetch) {\n if (!route.hasAction) {\n throw noActionDefinedError(\"action\", route.id);\n }\n return fetchServerHandler(singleFetch);\n }\n function prefetchModule(modulePath) {\n import(\n /* @vite-ignore */\n /* webpackIgnore: true */\n modulePath\n );\n }\n function prefetchRouteModuleChunks(route2) {\n if (route2.clientActionModule) {\n prefetchModule(route2.clientActionModule);\n }\n if (route2.clientLoaderModule) {\n prefetchModule(route2.clientLoaderModule);\n }\n }\n async function prefetchStylesAndCallHandler(handler) {\n let cachedModule = routeModulesCache[route.id];\n let linkPrefetchPromise = cachedModule ? prefetchStyleLinks(route, cachedModule) : Promise.resolve();\n try {\n return handler();\n } finally {\n await linkPrefetchPromise;\n }\n }\n let dataRoute = {\n id: route.id,\n index: route.index,\n path: route.path\n };\n if (routeModule) {\n Object.assign(dataRoute, {\n ...dataRoute,\n ...getRouteComponents(route, routeModule, isSpaMode),\n middleware: routeModule.clientMiddleware,\n handle: routeModule.handle,\n shouldRevalidate: getShouldRevalidateFunction(\n dataRoute.path,\n routeModule,\n route,\n ssr,\n needsRevalidation\n )\n });\n let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;\n let initialData = hasInitialData ? initialState?.loaderData?.[route.id] : void 0;\n let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;\n let initialError = hasInitialError ? initialState?.errors?.[route.id] : void 0;\n let isHydrationRequest = needsRevalidation == null && (routeModule.clientLoader?.hydrate === true || !route.hasLoader);\n dataRoute.loader = async ({ request, params, context, unstable_pattern }, singleFetch) => {\n try {\n let result = await prefetchStylesAndCallHandler(async () => {\n invariant2(\n routeModule,\n \"No `routeModule` available for critical-route loader\"\n );\n if (!routeModule.clientLoader) {\n return fetchServerLoader(singleFetch);\n }\n return routeModule.clientLoader({\n request,\n params,\n context,\n unstable_pattern,\n async serverLoader() {\n preventInvalidServerHandlerCall(\"loader\", route);\n if (isHydrationRequest) {\n if (hasInitialData) {\n return initialData;\n }\n if (hasInitialError) {\n throw initialError;\n }\n }\n return fetchServerLoader(singleFetch);\n }\n });\n });\n return result;\n } finally {\n isHydrationRequest = false;\n }\n };\n dataRoute.loader.hydrate = shouldHydrateRouteLoader(\n route.id,\n routeModule.clientLoader,\n route.hasLoader,\n isSpaMode\n );\n dataRoute.action = ({ request, params, context, unstable_pattern }, singleFetch) => {\n return prefetchStylesAndCallHandler(async () => {\n invariant2(\n routeModule,\n \"No `routeModule` available for critical-route action\"\n );\n if (!routeModule.clientAction) {\n if (isSpaMode) {\n throw noActionDefinedError(\"clientAction\", route.id);\n }\n return fetchServerAction(singleFetch);\n }\n return routeModule.clientAction({\n request,\n params,\n context,\n unstable_pattern,\n async serverAction() {\n preventInvalidServerHandlerCall(\"action\", route);\n return fetchServerAction(singleFetch);\n }\n });\n });\n };\n } else {\n if (!route.hasClientLoader) {\n dataRoute.loader = (_, singleFetch) => prefetchStylesAndCallHandler(() => {\n return fetchServerLoader(singleFetch);\n });\n }\n if (!route.hasClientAction) {\n dataRoute.action = (_, singleFetch) => prefetchStylesAndCallHandler(() => {\n if (isSpaMode) {\n throw noActionDefinedError(\"clientAction\", route.id);\n }\n return fetchServerAction(singleFetch);\n });\n }\n let lazyRoutePromise;\n async function getLazyRoute() {\n if (lazyRoutePromise) {\n return await lazyRoutePromise;\n }\n lazyRoutePromise = (async () => {\n if (route.clientLoaderModule || route.clientActionModule) {\n await new Promise((resolve) => setTimeout(resolve, 0));\n }\n let routeModulePromise = loadRouteModuleWithBlockingLinks(\n route,\n routeModulesCache\n );\n prefetchRouteModuleChunks(route);\n return await routeModulePromise;\n })();\n return await lazyRoutePromise;\n }\n dataRoute.lazy = {\n loader: route.hasClientLoader ? async () => {\n let { clientLoader } = route.clientLoaderModule ? await import(\n /* @vite-ignore */\n /* webpackIgnore: true */\n route.clientLoaderModule\n ) : await getLazyRoute();\n invariant2(clientLoader, \"No `clientLoader` export found\");\n return (args, singleFetch) => clientLoader({\n ...args,\n async serverLoader() {\n preventInvalidServerHandlerCall(\"loader\", route);\n return fetchServerLoader(singleFetch);\n }\n });\n } : void 0,\n action: route.hasClientAction ? async () => {\n let clientActionPromise = route.clientActionModule ? import(\n /* @vite-ignore */\n /* webpackIgnore: true */\n route.clientActionModule\n ) : getLazyRoute();\n prefetchRouteModuleChunks(route);\n let { clientAction } = await clientActionPromise;\n invariant2(clientAction, \"No `clientAction` export found\");\n return (args, singleFetch) => clientAction({\n ...args,\n async serverAction() {\n preventInvalidServerHandlerCall(\"action\", route);\n return fetchServerAction(singleFetch);\n }\n });\n } : void 0,\n middleware: route.hasClientMiddleware ? async () => {\n let { clientMiddleware } = route.clientMiddlewareModule ? await import(\n /* @vite-ignore */\n /* webpackIgnore: true */\n route.clientMiddlewareModule\n ) : await getLazyRoute();\n invariant2(clientMiddleware, \"No `clientMiddleware` export found\");\n return clientMiddleware;\n } : void 0,\n shouldRevalidate: async () => {\n let lazyRoute = await getLazyRoute();\n return getShouldRevalidateFunction(\n dataRoute.path,\n lazyRoute,\n route,\n ssr,\n needsRevalidation\n );\n },\n handle: async () => (await getLazyRoute()).handle,\n // No need to wrap these in layout since the root route is never\n // loaded via route.lazy()\n Component: async () => (await getLazyRoute()).Component,\n ErrorBoundary: route.hasErrorBoundary ? async () => (await getLazyRoute()).ErrorBoundary : void 0\n };\n }\n let children = createClientRoutes(\n manifest,\n routeModulesCache,\n initialState,\n ssr,\n isSpaMode,\n route.id,\n routesByParentId,\n needsRevalidation\n );\n if (children.length > 0) dataRoute.children = children;\n return dataRoute;\n });\n}\nfunction getShouldRevalidateFunction(path, route, manifestRoute, ssr, needsRevalidation) {\n if (needsRevalidation) {\n return wrapShouldRevalidateForHdr(\n manifestRoute.id,\n route.shouldRevalidate,\n needsRevalidation\n );\n }\n if (!ssr && manifestRoute.hasLoader && !manifestRoute.hasClientLoader) {\n let myParams = path ? compilePath(path)[1].map((p) => p.paramName) : [];\n const didParamsChange = (opts) => myParams.some((p) => opts.currentParams[p] !== opts.nextParams[p]);\n if (route.shouldRevalidate) {\n let fn = route.shouldRevalidate;\n return (opts) => fn({\n ...opts,\n defaultShouldRevalidate: didParamsChange(opts)\n });\n } else {\n return (opts) => didParamsChange(opts);\n }\n }\n return route.shouldRevalidate;\n}\nfunction wrapShouldRevalidateForHdr(routeId, routeShouldRevalidate, needsRevalidation) {\n let handledRevalidation = false;\n return (arg) => {\n if (!handledRevalidation) {\n handledRevalidation = true;\n return needsRevalidation.has(routeId);\n }\n return routeShouldRevalidate ? routeShouldRevalidate(arg) : arg.defaultShouldRevalidate;\n };\n}\nasync function loadRouteModuleWithBlockingLinks(route, routeModules) {\n let routeModulePromise = loadRouteModule(route, routeModules);\n let prefetchRouteCssPromise = prefetchRouteCss(route);\n let routeModule = await routeModulePromise;\n await Promise.all([\n prefetchRouteCssPromise,\n prefetchStyleLinks(route, routeModule)\n ]);\n return {\n Component: getRouteModuleComponent(routeModule),\n ErrorBoundary: routeModule.ErrorBoundary,\n clientMiddleware: routeModule.clientMiddleware,\n clientAction: routeModule.clientAction,\n clientLoader: routeModule.clientLoader,\n handle: routeModule.handle,\n links: routeModule.links,\n meta: routeModule.meta,\n shouldRevalidate: routeModule.shouldRevalidate\n };\n}\nfunction getRouteModuleComponent(routeModule) {\n if (routeModule.default == null) return void 0;\n let isEmptyObject = typeof routeModule.default === \"object\" && Object.keys(routeModule.default).length === 0;\n if (!isEmptyObject) {\n return routeModule.default;\n }\n}\nfunction shouldHydrateRouteLoader(routeId, clientLoader, hasLoader, isSpaMode) {\n return isSpaMode && routeId !== \"root\" || clientLoader != null && (clientLoader.hydrate === true || hasLoader !== true);\n}\n\n// lib/dom/ssr/fog-of-war.ts\nvar nextPaths = /* @__PURE__ */ new Set();\nvar discoveredPathsMaxSize = 1e3;\nvar discoveredPaths = /* @__PURE__ */ new Set();\nvar URL_LIMIT = 7680;\nfunction isFogOfWarEnabled(routeDiscovery, ssr) {\n return routeDiscovery.mode === \"lazy\" && ssr === true;\n}\nfunction getPartialManifest({ sri, ...manifest }, router) {\n let routeIds = new Set(router.state.matches.map((m) => m.route.id));\n let segments = router.state.location.pathname.split(\"/\").filter(Boolean);\n let paths = [\"/\"];\n segments.pop();\n while (segments.length > 0) {\n paths.push(`/${segments.join(\"/\")}`);\n segments.pop();\n }\n paths.forEach((path) => {\n let matches = matchRoutes(router.routes, path, router.basename);\n if (matches) {\n matches.forEach((m) => routeIds.add(m.route.id));\n }\n });\n let initialRoutes = [...routeIds].reduce(\n (acc, id) => Object.assign(acc, { [id]: manifest.routes[id] }),\n {}\n );\n return {\n ...manifest,\n routes: initialRoutes,\n sri: sri ? true : void 0\n };\n}\nfunction getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, routeDiscovery, isSpaMode, basename) {\n if (!isFogOfWarEnabled(routeDiscovery, ssr)) {\n return void 0;\n }\n return async ({ path, patch, signal, fetcherKey }) => {\n if (discoveredPaths.has(path)) {\n return;\n }\n await fetchAndApplyManifestPatches(\n [path],\n fetcherKey ? window.location.href : path,\n manifest,\n routeModules,\n ssr,\n isSpaMode,\n basename,\n routeDiscovery.manifestPath,\n patch,\n signal\n );\n };\n}\nfunction useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {\n React7.useEffect(() => {\n if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet\n window.navigator?.connection?.saveData === true) {\n return;\n }\n function registerElement(el) {\n let path = el.tagName === \"FORM\" ? el.getAttribute(\"action\") : el.getAttribute(\"href\");\n if (!path) {\n return;\n }\n let pathname = el.tagName === \"A\" ? el.pathname : new URL(path, window.location.origin).pathname;\n if (!discoveredPaths.has(pathname)) {\n nextPaths.add(pathname);\n }\n }\n async function fetchPatches() {\n document.querySelectorAll(\"a[data-discover], form[data-discover]\").forEach(registerElement);\n let lazyPaths = Array.from(nextPaths.keys()).filter((path) => {\n if (discoveredPaths.has(path)) {\n nextPaths.delete(path);\n return false;\n }\n return true;\n });\n if (lazyPaths.length === 0) {\n return;\n }\n try {\n await fetchAndApplyManifestPatches(\n lazyPaths,\n null,\n manifest,\n routeModules,\n ssr,\n isSpaMode,\n router.basename,\n routeDiscovery.manifestPath,\n router.patchRoutes\n );\n } catch (e) {\n console.error(\"Failed to fetch manifest patches\", e);\n }\n }\n let debouncedFetchPatches = debounce(fetchPatches, 100);\n fetchPatches();\n let observer = new MutationObserver(() => debouncedFetchPatches());\n observer.observe(document.documentElement, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: [\"data-discover\", \"href\", \"action\"]\n });\n return () => observer.disconnect();\n }, [ssr, isSpaMode, manifest, routeModules, router, routeDiscovery]);\n}\nfunction getManifestPath(_manifestPath, basename) {\n let manifestPath = _manifestPath || \"/__manifest\";\n if (basename == null) {\n return manifestPath;\n }\n return `${basename}${manifestPath}`.replace(/\\/+/g, \"/\");\n}\nvar MANIFEST_VERSION_STORAGE_KEY = \"react-router-manifest-version\";\nasync function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, routeModules, ssr, isSpaMode, basename, manifestPath, patchRoutes, signal) {\n const searchParams = new URLSearchParams();\n searchParams.set(\"paths\", paths.sort().join(\",\"));\n searchParams.set(\"version\", manifest.version);\n let url = new URL(\n getManifestPath(manifestPath, basename),\n window.location.origin\n );\n url.search = searchParams.toString();\n if (url.toString().length > URL_LIMIT) {\n nextPaths.clear();\n return;\n }\n let serverPatches;\n try {\n let res = await fetch(url, { signal });\n if (!res.ok) {\n throw new Error(`${res.status} ${res.statusText}`);\n } else if (res.status === 204 && res.headers.has(\"X-Remix-Reload-Document\")) {\n if (!errorReloadPath) {\n console.warn(\n \"Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.\"\n );\n return;\n }\n try {\n if (sessionStorage.getItem(MANIFEST_VERSION_STORAGE_KEY) === manifest.version) {\n console.error(\n \"Unable to discover routes due to manifest version mismatch.\"\n );\n return;\n }\n sessionStorage.setItem(MANIFEST_VERSION_STORAGE_KEY, manifest.version);\n } catch {\n }\n window.location.href = errorReloadPath;\n console.warn(\"Detected manifest version mismatch, reloading...\");\n await new Promise(() => {\n });\n } else if (res.status >= 400) {\n throw new Error(await res.text());\n }\n try {\n sessionStorage.removeItem(MANIFEST_VERSION_STORAGE_KEY);\n } catch {\n }\n serverPatches = await res.json();\n } catch (e) {\n if (signal?.aborted) return;\n throw e;\n }\n let knownRoutes = new Set(Object.keys(manifest.routes));\n let patches = Object.values(serverPatches).reduce((acc, route) => {\n if (route && !knownRoutes.has(route.id)) {\n acc[route.id] = route;\n }\n return acc;\n }, {});\n Object.assign(manifest.routes, patches);\n paths.forEach((p) => addToFifoQueue(p, discoveredPaths));\n let parentIds = /* @__PURE__ */ new Set();\n Object.values(patches).forEach((patch) => {\n if (patch && (!patch.parentId || !patches[patch.parentId])) {\n parentIds.add(patch.parentId);\n }\n });\n parentIds.forEach(\n (parentId) => patchRoutes(\n parentId || null,\n createClientRoutes(patches, routeModules, null, ssr, isSpaMode, parentId)\n )\n );\n}\nfunction addToFifoQueue(path, queue) {\n if (queue.size >= discoveredPathsMaxSize) {\n let first = queue.values().next().value;\n queue.delete(first);\n }\n queue.add(path);\n}\nfunction debounce(callback, wait) {\n let timeoutId;\n return (...args) => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(() => callback(...args), wait);\n };\n}\n\n// lib/dom/ssr/components.tsx\nfunction useDataRouterContext2() {\n let context = React8.useContext(DataRouterContext);\n invariant2(\n context,\n \"You must render this element inside a <DataRouterContext.Provider> element\"\n );\n return context;\n}\nfunction useDataRouterStateContext() {\n let context = React8.useContext(DataRouterStateContext);\n invariant2(\n context,\n \"You must render this element inside a <DataRouterStateContext.Provider> element\"\n );\n return context;\n}\nvar FrameworkContext = React8.createContext(void 0);\nFrameworkContext.displayName = \"FrameworkContext\";\nfunction useFrameworkContext() {\n let context = React8.useContext(FrameworkContext);\n invariant2(\n context,\n \"You must render this element inside a <HydratedRouter> element\"\n );\n return context;\n}\nfunction usePrefetchBehavior(prefetch, theirElementProps) {\n let frameworkContext = React8.useContext(FrameworkContext);\n let [maybePrefetch, setMaybePrefetch] = React8.useState(false);\n let [shouldPrefetch, setShouldPrefetch] = React8.useState(false);\n let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;\n let ref = React8.useRef(null);\n React8.useEffect(() => {\n if (prefetch === \"render\") {\n setShouldPrefetch(true);\n }\n if (prefetch === \"viewport\") {\n let callback = (entries) => {\n entries.forEach((entry) => {\n setShouldPrefetch(entry.isIntersecting);\n });\n };\n let observer = new IntersectionObserver(callback, { threshold: 0.5 });\n if (ref.current) observer.observe(ref.current);\n return () => {\n observer.disconnect();\n };\n }\n }, [prefetch]);\n React8.useEffect(() => {\n if (maybePrefetch) {\n let id = setTimeout(() => {\n setShouldPrefetch(true);\n }, 100);\n return () => {\n clearTimeout(id);\n };\n }\n }, [maybePrefetch]);\n let setIntent = () => {\n setMaybePrefetch(true);\n };\n let cancelIntent = () => {\n setMaybePrefetch(false);\n setShouldPrefetch(false);\n };\n if (!frameworkContext) {\n return [false, ref, {}];\n }\n if (prefetch !== \"intent\") {\n return [shouldPrefetch, ref, {}];\n }\n return [\n shouldPrefetch,\n ref,\n {\n onFocus: composeEventHandlers(onFocus, setIntent),\n onBlur: composeEventHandlers(onBlur, cancelIntent),\n onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),\n onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),\n onTouchStart: composeEventHandlers(onTouchStart, setIntent)\n }\n ];\n}\nfunction composeEventHandlers(theirHandler, ourHandler) {\n return (event) => {\n theirHandler && theirHandler(event);\n if (!event.defaultPrevented) {\n ourHandler(event);\n }\n };\n}\nfunction getActiveMatches(matches, errors, isSpaMode) {\n if (isSpaMode && !isHydrated) {\n return [matches[0]];\n }\n if (errors) {\n let errorIdx = matches.findIndex((m) => errors[m.route.id] !== void 0);\n return matches.slice(0, errorIdx + 1);\n }\n return matches;\n}\nvar CRITICAL_CSS_DATA_ATTRIBUTE = \"data-react-router-critical-css\";\nfunction Links({ nonce }) {\n let { isSpaMode, manifest, routeModules, criticalCss } = useFrameworkContext();\n let { errors, matches: routerMatches } = useDataRouterStateContext();\n let matches = getActiveMatches(routerMatches, errors, isSpaMode);\n let keyedLinks = React8.useMemo(\n () => getKeyedLinksForMatches(matches, routeModules, manifest),\n [matches, routeModules, manifest]\n );\n return /* @__PURE__ */ React8.createElement(React8.Fragment, null, typeof criticalCss === \"string\" ? /* @__PURE__ */ React8.createElement(\n \"style\",\n {\n ...{ [CRITICAL_CSS_DATA_ATTRIBUTE]: \"\" },\n dangerouslySetInnerHTML: { __html: criticalCss }\n }\n ) : null, typeof criticalCss === \"object\" ? /* @__PURE__ */ React8.createElement(\n \"link\",\n {\n ...{ [CRITICAL_CSS_DATA_ATTRIBUTE]: \"\" },\n rel: \"stylesheet\",\n href: criticalCss.href,\n nonce\n }\n ) : null, keyedLinks.map(\n ({ key, link }) => isPageLinkDescriptor(link) ? /* @__PURE__ */ React8.createElement(PrefetchPageLinks, { key, nonce, ...link }) : /* @__PURE__ */ React8.createElement(\"link\", { key, nonce, ...link })\n ));\n}\nfunction PrefetchPageLinks({ page, ...linkProps }) {\n let { router } = useDataRouterContext2();\n let matches = React8.useMemo(\n () => matchRoutes(router.routes, page, router.basename),\n [router.routes, page, router.basename]\n );\n if (!matches) {\n return null;\n }\n return /* @__PURE__ */ React8.createElement(PrefetchPageLinksImpl, { page, matches, ...linkProps });\n}\nfunction useKeyedPrefetchLinks(matches) {\n let { manifest, routeModules } = useFrameworkContext();\n let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React8.useState([]);\n React8.useEffect(() => {\n let interrupted = false;\n void getKeyedPrefetchLinks(matches, manifest, routeModules).then(\n (links) => {\n if (!interrupted) {\n setKeyedPrefetchLinks(links);\n }\n }\n );\n return () => {\n interrupted = true;\n };\n }, [matches, manifest, routeModules]);\n return keyedPrefetchLinks;\n}\nfunction PrefetchPageLinksImpl({\n page,\n matches: nextMatches,\n ...linkProps\n}) {\n let location = useLocation();\n let { manifest, routeModules } = useFrameworkContext();\n let { basename } = useDataRouterContext2();\n let { loaderData, matches } = useDataRouterStateContext();\n let newMatchesForData = React8.useMemo(\n () => getNewMatchesForLinks(\n page,\n nextMatches,\n matches,\n manifest,\n location,\n \"data\"\n ),\n [page, nextMatches, matches, manifest, location]\n );\n let newMatchesForAssets = React8.useMemo(\n () => getNewMatchesForLinks(\n page,\n nextMatches,\n matches,\n manifest,\n location,\n \"assets\"\n ),\n [page, nextMatches, matches, manifest, location]\n );\n let dataHrefs = React8.useMemo(() => {\n if (page === location.pathname + location.search + location.hash) {\n return [];\n }\n let routesParams = /* @__PURE__ */ new Set();\n let foundOptOutRoute = false;\n nextMatches.forEach((m) => {\n let manifestRoute = manifest.routes[m.route.id];\n if (!manifestRoute || !manifestRoute.hasLoader) {\n return;\n }\n if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {\n foundOptOutRoute = true;\n } else if (manifestRoute.hasClientLoader) {\n foundOptOutRoute = true;\n } else {\n routesParams.add(m.route.id);\n }\n });\n if (routesParams.size === 0) {\n return [];\n }\n let url = singleFetchUrl(page, basename, \"data\");\n if (foundOptOutRoute && routesParams.size > 0) {\n url.searchParams.set(\n \"_routes\",\n nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(\",\")\n );\n }\n return [url.pathname + url.search];\n }, [\n basename,\n loaderData,\n location,\n manifest,\n newMatchesForData,\n nextMatches,\n page,\n routeModules\n ]);\n let moduleHrefs = React8.useMemo(\n () => getModuleLinkHrefs(newMatchesForAssets, manifest),\n [newMatchesForAssets, manifest]\n );\n let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);\n return /* @__PURE__ */ React8.createElement(React8.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React8.createElement(\"link\", { key: href, rel: \"prefetch\", as: \"fetch\", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React8.createElement(\"link\", { key: href, rel: \"modulepreload\", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (\n // these don't spread `linkProps` because they are full link descriptors\n // already with their own props\n /* @__PURE__ */ React8.createElement(\"link\", { key, nonce: linkProps.nonce, ...link })\n )));\n}\nfunction Meta() {\n let { isSpaMode, routeModules } = useFrameworkContext();\n let {\n errors,\n matches: routerMatches,\n loaderData\n } = useDataRouterStateContext();\n let location = useLocation();\n let _matches = getActiveMatches(routerMatches, errors, isSpaMode);\n let error = null;\n if (errors) {\n error = errors[_matches[_matches.length - 1].route.id];\n }\n let meta = [];\n let leafMeta = null;\n let matches = [];\n for (let i = 0; i < _matches.length; i++) {\n let _match = _matches[i];\n let routeId = _match.route.id;\n let data2 = loaderData[routeId];\n let params = _match.params;\n let routeModule = routeModules[routeId];\n let routeMeta = [];\n let match = {\n id: routeId,\n data: data2,\n loaderData: data2,\n meta: [],\n params: _match.params,\n pathname: _match.pathname,\n handle: _match.route.handle,\n error\n };\n matches[i] = match;\n if (routeModule?.meta) {\n routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n data: data2,\n loaderData: data2,\n params,\n location,\n matches,\n error\n }) : Array.isArray(routeModule.meta) ? [...routeModule.meta] : routeModule.meta;\n } else if (leafMeta) {\n routeMeta = [...leafMeta];\n }\n routeMeta = routeMeta || [];\n if (!Array.isArray(routeMeta)) {\n throw new Error(\n \"The route at \" + _match.route.path + \" returns an invalid value. All route meta functions must return an array of meta objects.\\n\\nTo reference the meta function API, see https://remix.run/route/meta\"\n );\n }\n match.meta = routeMeta;\n matches[i] = match;\n meta = [...routeMeta];\n leafMeta = meta;\n }\n return /* @__PURE__ */ React8.createElement(React8.Fragment, null, meta.flat().map((metaProps) => {\n if (!metaProps) {\n return null;\n }\n if (\"tagName\" in metaProps) {\n let { tagName, ...rest } = metaProps;\n if (!isValidMetaTag(tagName)) {\n console.warn(\n `A meta object uses an invalid tagName: ${tagName}. Expected either 'link' or 'meta'`\n );\n return null;\n }\n let Comp = tagName;\n return /* @__PURE__ */ React8.createElement(Comp, { key: JSON.stringify(rest), ...rest });\n }\n if (\"title\" in metaProps) {\n return /* @__PURE__ */ React8.createElement(\"title\", { key: \"title\" }, String(metaProps.title));\n }\n if (\"charset\" in metaProps) {\n metaProps.charSet ?? (metaProps.charSet = metaProps.charset);\n delete metaProps.charset;\n }\n if (\"charSet\" in metaProps && metaProps.charSet != null) {\n return typeof metaProps.charSet === \"string\" ? /* @__PURE__ */ React8.createElement(\"meta\", { key: \"charSet\", charSet: metaProps.charSet }) : null;\n }\n if (\"script:ld+json\" in metaProps) {\n try {\n let json = JSON.stringify(metaProps[\"script:ld+json\"]);\n return /* @__PURE__ */ React8.createElement(\n \"script\",\n {\n key: `script:ld+json:${json}`,\n type: \"application/ld+json\",\n dangerouslySetInnerHTML: { __html: escapeHtml(json) }\n }\n );\n } catch (err) {\n return null;\n }\n }\n return /* @__PURE__ */ React8.createElement(\"meta\", { key: JSON.stringify(metaProps), ...metaProps });\n }));\n}\nfunction isValidMetaTag(tagName) {\n return typeof tagName === \"string\" && /^(meta|link)$/.test(tagName);\n}\nvar isHydrated = false;\nfunction setIsHydrated() {\n isHydrated = true;\n}\nfunction Scripts(scriptProps) {\n let {\n manifest,\n serverHandoffString,\n isSpaMode,\n renderMeta,\n routeDiscovery,\n ssr\n } = useFrameworkContext();\n let { router, static: isStatic, staticContext } = useDataRouterContext2();\n let { matches: routerMatches } = useDataRouterStateContext();\n let isRSCRouterContext = useIsRSCRouterContext();\n let enableFogOfWar = isFogOfWarEnabled(routeDiscovery, ssr);\n if (renderMeta) {\n renderMeta.didRenderScripts = true;\n }\n let matches = getActiveMatches(routerMatches, null, isSpaMode);\n React8.useEffect(() => {\n setIsHydrated();\n }, []);\n let initialScripts = React8.useMemo(() => {\n if (isRSCRouterContext) {\n return null;\n }\n let streamScript = \"window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());\";\n let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : \" \";\n let routeModulesScript = !isStatic ? \" \" : `${manifest.hmr?.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : \"\"}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : \"\"};\n${matches.map((match, routeIndex) => {\n let routeVarName = `route${routeIndex}`;\n let manifestEntry = manifest.routes[match.route.id];\n invariant2(manifestEntry, `Route ${match.route.id} not found in manifest`);\n let {\n clientActionModule,\n clientLoaderModule,\n clientMiddlewareModule,\n hydrateFallbackModule,\n module\n } = manifestEntry;\n let chunks = [\n ...clientActionModule ? [\n {\n module: clientActionModule,\n varName: `${routeVarName}_clientAction`\n }\n ] : [],\n ...clientLoaderModule ? [\n {\n module: clientLoaderModule,\n varName: `${routeVarName}_clientLoader`\n }\n ] : [],\n ...clientMiddlewareModule ? [\n {\n module: clientMiddlewareModule,\n varName: `${routeVarName}_clientMiddleware`\n }\n ] : [],\n ...hydrateFallbackModule ? [\n {\n module: hydrateFallbackModule,\n varName: `${routeVarName}_HydrateFallback`\n }\n ] : [],\n { module, varName: `${routeVarName}_main` }\n ];\n if (chunks.length === 1) {\n return `import * as ${routeVarName} from ${JSON.stringify(module)};`;\n }\n let chunkImportsSnippet = chunks.map((chunk) => `import * as ${chunk.varName} from \"${chunk.module}\";`).join(\"\\n\");\n let mergedChunksSnippet = `const ${routeVarName} = {${chunks.map((chunk) => `...${chunk.varName}`).join(\",\")}};`;\n return [chunkImportsSnippet, mergedChunksSnippet].join(\"\\n\");\n }).join(\"\\n\")}\n ${enableFogOfWar ? (\n // Inline a minimal manifest with the SSR matches\n `window.__reactRouterManifest = ${JSON.stringify(\n getPartialManifest(manifest, router),\n null,\n 2\n )};`\n ) : \"\"}\n window.__reactRouterRouteModules = {${matches.map((match, index) => `${JSON.stringify(match.route.id)}:route${index}`).join(\",\")}};\n\nimport(${JSON.stringify(manifest.entry.module)});`;\n return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(\n \"script\",\n {\n ...scriptProps,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: { __html: contextScript },\n type: void 0\n }\n ), /* @__PURE__ */ React8.createElement(\n \"script\",\n {\n ...scriptProps,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: { __html: routeModulesScript },\n type: \"module\",\n async: true\n }\n ));\n }, []);\n let preloads = isHydrated || isRSCRouterContext ? [] : dedupe(\n manifest.entry.imports.concat(\n getModuleLinkHrefs(matches, manifest, {\n includeHydrateFallback: true\n })\n )\n );\n let sri = typeof manifest.sri === \"object\" ? manifest.sri : {};\n warnOnce(\n !isRSCRouterContext,\n \"The <Scripts /> element is a no-op when using RSC and can be safely removed.\"\n );\n return isHydrated || isRSCRouterContext ? null : /* @__PURE__ */ React8.createElement(React8.Fragment, null, typeof manifest.sri === \"object\" ? /* @__PURE__ */ React8.createElement(\n \"script\",\n {\n \"rr-importmap\": \"\",\n type: \"importmap\",\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: JSON.stringify({\n integrity: sri\n })\n }\n }\n ) : null, !enableFogOfWar ? /* @__PURE__ */ React8.createElement(\n \"link\",\n {\n rel: \"modulepreload\",\n href: manifest.url,\n crossOrigin: scriptProps.crossOrigin,\n integrity: sri[manifest.url],\n suppressHydrationWarning: true\n }\n ) : null, /* @__PURE__ */ React8.createElement(\n \"link\",\n {\n rel: \"modulepreload\",\n href: manifest.entry.module,\n crossOrigin: scriptProps.crossOrigin,\n integrity: sri[manifest.entry.module],\n suppressHydrationWarning: true\n }\n ), preloads.map((path) => /* @__PURE__ */ React8.createElement(\n \"link\",\n {\n key: path,\n rel: \"modulepreload\",\n href: path,\n crossOrigin: scriptProps.crossOrigin,\n integrity: sri[path],\n suppressHydrationWarning: true\n }\n )), initialScripts);\n}\nfunction dedupe(array) {\n return [...new Set(array)];\n}\nfunction mergeRefs(...refs) {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n });\n };\n}\n\n// lib/dom/ssr/errorBoundaries.tsx\nvar RemixErrorBoundary = class extends React9.Component {\n constructor(props) {\n super(props);\n this.state = { error: props.error || null, location: props.location };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n static getDerivedStateFromProps(props, state) {\n if (state.location !== props.location) {\n return { error: props.error || null, location: props.location };\n }\n return { error: props.error || state.error, location: state.location };\n }\n render() {\n if (this.state.error) {\n return /* @__PURE__ */ React9.createElement(\n RemixRootDefaultErrorBoundary,\n {\n error: this.state.error,\n isOutsideRemixApp: true\n }\n );\n } else {\n return this.props.children;\n }\n }\n};\nfunction RemixRootDefaultErrorBoundary({\n error,\n isOutsideRemixApp\n}) {\n console.error(error);\n let heyDeveloper = /* @__PURE__ */ React9.createElement(\n \"script\",\n {\n dangerouslySetInnerHTML: {\n __html: `\n console.log(\n \"\\u{1F4BF} Hey developer \\u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information.\"\n );\n `\n }\n }\n );\n if (isRouteErrorResponse(error)) {\n return /* @__PURE__ */ React9.createElement(BoundaryShell, { title: \"Unhandled Thrown Response!\" }, /* @__PURE__ */ React9.createElement(\"h1\", { style: { fontSize: \"24px\" } }, error.status, \" \", error.statusText), ENABLE_DEV_WARNINGS ? heyDeveloper : null);\n }\n let errorInstance;\n if (error instanceof Error) {\n errorInstance = error;\n } else {\n let errorString = error == null ? \"Unknown Error\" : typeof error === \"object\" && \"toString\" in error ? error.toString() : JSON.stringify(error);\n errorInstance = new Error(errorString);\n }\n return /* @__PURE__ */ React9.createElement(\n BoundaryShell,\n {\n title: \"Application Error!\",\n isOutsideRemixApp\n },\n /* @__PURE__ */ React9.createElement(\"h1\", { style: { fontSize: \"24px\" } }, \"Application Error\"),\n /* @__PURE__ */ React9.createElement(\n \"pre\",\n {\n style: {\n padding: \"2rem\",\n background: \"hsla(10, 50%, 50%, 0.1)\",\n color: \"red\",\n overflow: \"auto\"\n }\n },\n errorInstance.stack\n ),\n heyDeveloper\n );\n}\nfunction BoundaryShell({\n title,\n renderScripts,\n isOutsideRemixApp,\n children\n}) {\n let { routeModules } = useFrameworkContext();\n if (routeModules.root?.Layout && !isOutsideRemixApp) {\n return children;\n }\n return /* @__PURE__ */ React9.createElement(\"html\", { lang: \"en\" }, /* @__PURE__ */ React9.createElement(\"head\", null, /* @__PURE__ */ React9.createElement(\"meta\", { charSet: \"utf-8\" }), /* @__PURE__ */ React9.createElement(\n \"meta\",\n {\n name: \"viewport\",\n content: \"width=device-width,initial-scale=1,viewport-fit=cover\"\n }\n ), /* @__PURE__ */ React9.createElement(\"title\", null, title)), /* @__PURE__ */ React9.createElement(\"body\", null, /* @__PURE__ */ React9.createElement(\"main\", { style: { fontFamily: \"system-ui, sans-serif\", padding: \"2rem\" } }, children, renderScripts ? /* @__PURE__ */ React9.createElement(Scripts, null) : null)));\n}\n\n// lib/dom/lib.tsx\nimport * as React10 from \"react\";\nvar isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\ntry {\n if (isBrowser) {\n window.__reactRouterVersion = // @ts-expect-error\n \"7.10.1\";\n }\n} catch (e) {\n}\nfunction createBrowserRouter(routes, opts) {\n return createRouter({\n basename: opts?.basename,\n getContext: opts?.getContext,\n future: opts?.future,\n history: createBrowserHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes,\n mapRouteProperties,\n hydrationRouteProperties,\n dataStrategy: opts?.dataStrategy,\n patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n window: opts?.window,\n unstable_instrumentations: opts?.unstable_instrumentations\n }).initialize();\n}\nfunction createHashRouter(routes, opts) {\n return createRouter({\n basename: opts?.basename,\n getContext: opts?.getContext,\n future: opts?.future,\n history: createHashHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes,\n mapRouteProperties,\n hydrationRouteProperties,\n dataStrategy: opts?.dataStrategy,\n patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n window: opts?.window,\n unstable_instrumentations: opts?.unstable_instrumentations\n }).initialize();\n}\nfunction parseHydrationData() {\n let state = window?.__staticRouterHydrationData;\n if (state && state.errors) {\n state = {\n ...state,\n errors: deserializeErrors(state.errors)\n };\n }\n return state;\n}\nfunction deserializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n if (val && val.__type === \"RouteErrorResponse\") {\n serialized[key] = new ErrorResponseImpl(\n val.status,\n val.statusText,\n val.data,\n val.internal === true\n );\n } else if (val && val.__type === \"Error\") {\n if (val.__subType) {\n let ErrorConstructor = window[val.__subType];\n if (typeof ErrorConstructor === \"function\") {\n try {\n let error = new ErrorConstructor(val.message);\n error.stack = \"\";\n serialized[key] = error;\n } catch (e) {\n }\n }\n }\n if (serialized[key] == null) {\n let error = new Error(val.message);\n error.stack = \"\";\n serialized[key] = error;\n }\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\nfunction BrowserRouter({\n basename,\n children,\n unstable_useTransitions,\n window: window2\n}) {\n let historyRef = React10.useRef();\n if (historyRef.current == null) {\n historyRef.current = createBrowserHistory({ window: window2, v5Compat: true });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = React10.useState({\n action: history.action,\n location: history.location\n });\n let setState = React10.useCallback(\n (newState) => {\n if (unstable_useTransitions === false) {\n setStateImpl(newState);\n } else {\n React10.startTransition(() => setStateImpl(newState));\n }\n },\n [unstable_useTransitions]\n );\n React10.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /* @__PURE__ */ React10.createElement(\n Router,\n {\n basename,\n children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n unstable_useTransitions: unstable_useTransitions === true\n }\n );\n}\nfunction HashRouter({\n basename,\n children,\n unstable_useTransitions,\n window: window2\n}) {\n let historyRef = React10.useRef();\n if (historyRef.current == null) {\n historyRef.current = createHashHistory({ window: window2, v5Compat: true });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = React10.useState({\n action: history.action,\n location: history.location\n });\n let setState = React10.useCallback(\n (newState) => {\n if (unstable_useTransitions === false) {\n setStateImpl(newState);\n } else {\n React10.startTransition(() => setStateImpl(newState));\n }\n },\n [unstable_useTransitions]\n );\n React10.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /* @__PURE__ */ React10.createElement(\n Router,\n {\n basename,\n children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n unstable_useTransitions: unstable_useTransitions === true\n }\n );\n}\nfunction HistoryRouter({\n basename,\n children,\n history,\n unstable_useTransitions\n}) {\n let [state, setStateImpl] = React10.useState({\n action: history.action,\n location: history.location\n });\n let setState = React10.useCallback(\n (newState) => {\n if (unstable_useTransitions === false) {\n setStateImpl(newState);\n } else {\n React10.startTransition(() => setStateImpl(newState));\n }\n },\n [unstable_useTransitions]\n );\n React10.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /* @__PURE__ */ React10.createElement(\n Router,\n {\n basename,\n children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n unstable_useTransitions: unstable_useTransitions === true\n }\n );\n}\nHistoryRouter.displayName = \"unstable_HistoryRouter\";\nvar ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nvar Link = React10.forwardRef(\n function LinkWithRef({\n onClick,\n discover = \"render\",\n prefetch = \"none\",\n relative,\n reloadDocument,\n replace: replace2,\n state,\n target,\n to,\n preventScrollReset,\n viewTransition,\n ...rest\n }, forwardedRef) {\n let { basename, unstable_useTransitions } = React10.useContext(NavigationContext);\n let isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX2.test(to);\n let absoluteHref;\n let isExternal = false;\n if (typeof to === \"string\" && isAbsolute) {\n absoluteHref = to;\n if (isBrowser) {\n try {\n let currentUrl = new URL(window.location.href);\n let targetUrl = to.startsWith(\"//\") ? new URL(currentUrl.protocol + to) : new URL(to);\n let path = stripBasename(targetUrl.pathname, basename);\n if (targetUrl.origin === currentUrl.origin && path != null) {\n to = path + targetUrl.search + targetUrl.hash;\n } else {\n isExternal = true;\n }\n } catch (e) {\n warning(\n false,\n `<Link to=\"${to}\"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`\n );\n }\n }\n }\n let href = useHref(to, { relative });\n let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(\n prefetch,\n rest\n );\n let internalOnClick = useLinkClickHandler(to, {\n replace: replace2,\n state,\n target,\n preventScrollReset,\n relative,\n viewTransition,\n unstable_useTransitions\n });\n function handleClick(event) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n let link = (\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n /* @__PURE__ */ React10.createElement(\n \"a\",\n {\n ...rest,\n ...prefetchHandlers,\n href: absoluteHref || href,\n onClick: isExternal || reloadDocument ? onClick : handleClick,\n ref: mergeRefs(forwardedRef, prefetchRef),\n target,\n \"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n }\n )\n );\n return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href })) : link;\n }\n);\nLink.displayName = \"Link\";\nvar NavLink = React10.forwardRef(\n function NavLinkWithRef({\n \"aria-current\": ariaCurrentProp = \"page\",\n caseSensitive = false,\n className: classNameProp = \"\",\n end = false,\n style: styleProp,\n to,\n viewTransition,\n children,\n ...rest\n }, ref) {\n let path = useResolvedPath(to, { relative: rest.relative });\n let location = useLocation();\n let routerState = React10.useContext(DataRouterStateContext);\n let { navigator, basename } = React10.useContext(NavigationContext);\n let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useViewTransitionState(path) && viewTransition === true;\n let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n toPathname = toPathname.toLowerCase();\n }\n if (nextLocationPathname && basename) {\n nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;\n }\n const endSlashPosition = toPathname !== \"/\" && toPathname.endsWith(\"/\") ? toPathname.length - 1 : toPathname.length;\n let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === \"/\";\n let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === \"/\");\n let renderProps = {\n isActive,\n isPending,\n isTransitioning\n };\n let ariaCurrent = isActive ? ariaCurrentProp : void 0;\n let className;\n if (typeof classNameProp === \"function\") {\n className = classNameProp(renderProps);\n } else {\n className = [\n classNameProp,\n isActive ? \"active\" : null,\n isPending ? \"pending\" : null,\n isTransitioning ? \"transitioning\" : null\n ].filter(Boolean).join(\" \");\n }\n let style = typeof styleProp === \"function\" ? styleProp(renderProps) : styleProp;\n return /* @__PURE__ */ React10.createElement(\n Link,\n {\n ...rest,\n \"aria-current\": ariaCurrent,\n className,\n ref,\n style,\n to,\n viewTransition\n },\n typeof children === \"function\" ? children(renderProps) : children\n );\n }\n);\nNavLink.displayName = \"NavLink\";\nvar Form = React10.forwardRef(\n ({\n discover = \"render\",\n fetcherKey,\n navigate,\n reloadDocument,\n replace: replace2,\n state,\n method = defaultMethod,\n action,\n onSubmit,\n relative,\n preventScrollReset,\n viewTransition,\n ...props\n }, forwardedRef) => {\n let { unstable_useTransitions } = React10.useContext(NavigationContext);\n let submit = useSubmit();\n let formAction = useFormAction(action, { relative });\n let formMethod = method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n let isAbsolute = typeof action === \"string\" && ABSOLUTE_URL_REGEX2.test(action);\n let submitHandler = (event) => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n let submitter = event.nativeEvent.submitter;\n let submitMethod = submitter?.getAttribute(\"formmethod\") || method;\n let doSubmit = () => submit(submitter || event.currentTarget, {\n fetcherKey,\n method: submitMethod,\n navigate,\n replace: replace2,\n state,\n relative,\n preventScrollReset,\n viewTransition\n });\n if (unstable_useTransitions && navigate !== false) {\n React10.startTransition(() => doSubmit());\n } else {\n doSubmit();\n }\n };\n return /* @__PURE__ */ React10.createElement(\n \"form\",\n {\n ref: forwardedRef,\n method: formMethod,\n action: formAction,\n onSubmit: reloadDocument ? onSubmit : submitHandler,\n ...props,\n \"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n }\n );\n }\n);\nForm.displayName = \"Form\";\nfunction ScrollRestoration({\n getKey,\n storageKey,\n ...props\n}) {\n let remixContext = React10.useContext(FrameworkContext);\n let { basename } = React10.useContext(NavigationContext);\n let location = useLocation();\n let matches = useMatches();\n useScrollRestoration({ getKey, storageKey });\n let ssrKey = React10.useMemo(\n () => {\n if (!remixContext || !getKey) return null;\n let userKey = getScrollRestorationKey(\n location,\n matches,\n basename,\n getKey\n );\n return userKey !== location.key ? userKey : null;\n },\n // Nah, we only need this the first time for the SSR render\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n if (!remixContext || remixContext.isSpaMode) {\n return null;\n }\n let restoreScroll = ((storageKey2, restoreKey) => {\n if (!window.history.state || !window.history.state.key) {\n let key = Math.random().toString(32).slice(2);\n window.history.replaceState({ key }, \"\");\n }\n try {\n let positions = JSON.parse(sessionStorage.getItem(storageKey2) || \"{}\");\n let storedY = positions[restoreKey || window.history.state.key];\n if (typeof storedY === \"number\") {\n window.scrollTo(0, storedY);\n }\n } catch (error) {\n console.error(error);\n sessionStorage.removeItem(storageKey2);\n }\n }).toString();\n return /* @__PURE__ */ React10.createElement(\n \"script\",\n {\n ...props,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: `(${restoreScroll})(${JSON.stringify(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY\n )}, ${JSON.stringify(ssrKey)})`\n }\n }\n );\n}\nScrollRestoration.displayName = \"ScrollRestoration\";\nfunction getDataRouterConsoleError2(hookName) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext3(hookName) {\n let ctx = React10.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError2(hookName));\n return ctx;\n}\nfunction useDataRouterState2(hookName) {\n let state = React10.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError2(hookName));\n return state;\n}\nfunction useLinkClickHandler(to, {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n viewTransition,\n unstable_useTransitions\n} = {}) {\n let navigate = useNavigate();\n let location = useLocation();\n let path = useResolvedPath(to, { relative });\n return React10.useCallback(\n (event) => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);\n let doNavigate = () => navigate(to, {\n replace: replace2,\n state,\n preventScrollReset,\n relative,\n viewTransition\n });\n if (unstable_useTransitions) {\n React10.startTransition(() => doNavigate());\n } else {\n doNavigate();\n }\n }\n },\n [\n location,\n navigate,\n path,\n replaceProp,\n state,\n target,\n to,\n preventScrollReset,\n relative,\n viewTransition,\n unstable_useTransitions\n ]\n );\n}\nfunction useSearchParams(defaultInit) {\n warning(\n typeof URLSearchParams !== \"undefined\",\n `You cannot use the \\`useSearchParams\\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`\n );\n let defaultSearchParamsRef = React10.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = React10.useRef(false);\n let location = useLocation();\n let searchParams = React10.useMemo(\n () => (\n // Only merge in the defaults if we haven't yet called setSearchParams.\n // Once we call that we want those to take precedence, otherwise you can't\n // remove a param with setSearchParams({}) if it has an initial value\n getSearchParamsForLocation(\n location.search,\n hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current\n )\n ),\n [location.search]\n );\n let navigate = useNavigate();\n let setSearchParams = React10.useCallback(\n (nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(new URLSearchParams(searchParams)) : nextInit\n );\n hasSetSearchParamsRef.current = true;\n navigate(\"?\" + newSearchParams, navigateOptions);\n },\n [navigate, searchParams]\n );\n return [searchParams, setSearchParams];\n}\nvar fetcherId = 0;\nvar getUniqueFetcherId = () => `__${String(++fetcherId)}__`;\nfunction useSubmit() {\n let { router } = useDataRouterContext3(\"useSubmit\" /* UseSubmit */);\n let { basename } = React10.useContext(NavigationContext);\n let currentRouteId = useRouteId();\n let routerFetch = router.fetch;\n let routerNavigate = router.navigate;\n return React10.useCallback(\n async (target, options = {}) => {\n let { action, method, encType, formData, body } = getFormSubmissionInfo(\n target,\n basename\n );\n if (options.navigate === false) {\n let key = options.fetcherKey || getUniqueFetcherId();\n await routerFetch(key, currentRouteId, options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || method,\n formEncType: options.encType || encType,\n flushSync: options.flushSync\n });\n } else {\n await routerNavigate(options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || method,\n formEncType: options.encType || encType,\n replace: options.replace,\n state: options.state,\n fromRouteId: currentRouteId,\n flushSync: options.flushSync,\n viewTransition: options.viewTransition\n });\n }\n },\n [routerFetch, routerNavigate, basename, currentRouteId]\n );\n}\nfunction useFormAction(action, { relative } = {}) {\n let { basename } = React10.useContext(NavigationContext);\n let routeContext = React10.useContext(RouteContext);\n invariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n let [match] = routeContext.matches.slice(-1);\n let path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n let location = useLocation();\n if (action == null) {\n path.search = location.search;\n let params = new URLSearchParams(path.search);\n let indexValues = params.getAll(\"index\");\n let hasNakedIndexParam = indexValues.some((v) => v === \"\");\n if (hasNakedIndexParam) {\n params.delete(\"index\");\n indexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n let qs = params.toString();\n path.search = qs ? `?${qs}` : \"\";\n }\n }\n if ((!action || action === \".\") && match.route.index) {\n path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n }\n if (basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n return createPath(path);\n}\nfunction useFetcher({\n key\n} = {}) {\n let { router } = useDataRouterContext3(\"useFetcher\" /* UseFetcher */);\n let state = useDataRouterState2(\"useFetcher\" /* UseFetcher */);\n let fetcherData = React10.useContext(FetchersContext);\n let route = React10.useContext(RouteContext);\n let routeId = route.matches[route.matches.length - 1]?.route.id;\n invariant(fetcherData, `useFetcher must be used inside a FetchersContext`);\n invariant(route, `useFetcher must be used inside a RouteContext`);\n invariant(\n routeId != null,\n `useFetcher can only be used on routes that contain a unique \"id\"`\n );\n let defaultKey = React10.useId();\n let [fetcherKey, setFetcherKey] = React10.useState(key || defaultKey);\n if (key && key !== fetcherKey) {\n setFetcherKey(key);\n }\n let { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch } = router;\n React10.useEffect(() => {\n getFetcher(fetcherKey);\n return () => deleteFetcher(fetcherKey);\n }, [deleteFetcher, getFetcher, fetcherKey]);\n let load = React10.useCallback(\n async (href, opts) => {\n invariant(routeId, \"No routeId available for fetcher.load()\");\n await routerFetch(fetcherKey, routeId, href, opts);\n },\n [fetcherKey, routeId, routerFetch]\n );\n let submitImpl = useSubmit();\n let submit = React10.useCallback(\n async (target, opts) => {\n await submitImpl(target, {\n ...opts,\n navigate: false,\n fetcherKey\n });\n },\n [fetcherKey, submitImpl]\n );\n let reset = React10.useCallback(\n (opts) => resetFetcher(fetcherKey, opts),\n [resetFetcher, fetcherKey]\n );\n let FetcherForm = React10.useMemo(() => {\n let FetcherForm2 = React10.forwardRef(\n (props, ref) => {\n return /* @__PURE__ */ React10.createElement(Form, { ...props, navigate: false, fetcherKey, ref });\n }\n );\n FetcherForm2.displayName = \"fetcher.Form\";\n return FetcherForm2;\n }, [fetcherKey]);\n let fetcher = state.fetchers.get(fetcherKey) || IDLE_FETCHER;\n let data2 = fetcherData.get(fetcherKey);\n let fetcherWithComponents = React10.useMemo(\n () => ({\n Form: FetcherForm,\n submit,\n load,\n reset,\n ...fetcher,\n data: data2\n }),\n [FetcherForm, submit, load, reset, fetcher, data2]\n );\n return fetcherWithComponents;\n}\nfunction useFetchers() {\n let state = useDataRouterState2(\"useFetchers\" /* UseFetchers */);\n return Array.from(state.fetchers.entries()).map(([key, fetcher]) => ({\n ...fetcher,\n key\n }));\n}\nvar SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nvar savedScrollPositions = {};\nfunction getScrollRestorationKey(location, matches, basename, getKey) {\n let key = null;\n if (getKey) {\n if (basename !== \"/\") {\n key = getKey(\n {\n ...location,\n pathname: stripBasename(location.pathname, basename) || location.pathname\n },\n matches\n );\n } else {\n key = getKey(location, matches);\n }\n }\n if (key == null) {\n key = location.key;\n }\n return key;\n}\nfunction useScrollRestoration({\n getKey,\n storageKey\n} = {}) {\n let { router } = useDataRouterContext3(\"useScrollRestoration\" /* UseScrollRestoration */);\n let { restoreScrollPosition, preventScrollReset } = useDataRouterState2(\n \"useScrollRestoration\" /* UseScrollRestoration */\n );\n let { basename } = React10.useContext(NavigationContext);\n let location = useLocation();\n let matches = useMatches();\n let navigation = useNavigation();\n React10.useEffect(() => {\n window.history.scrollRestoration = \"manual\";\n return () => {\n window.history.scrollRestoration = \"auto\";\n };\n }, []);\n usePageHide(\n React10.useCallback(() => {\n if (navigation.state === \"idle\") {\n let key = getScrollRestorationKey(location, matches, basename, getKey);\n savedScrollPositions[key] = window.scrollY;\n }\n try {\n sessionStorage.setItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY,\n JSON.stringify(savedScrollPositions)\n );\n } catch (error) {\n warning(\n false,\n `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`\n );\n }\n window.history.scrollRestoration = \"auto\";\n }, [navigation.state, getKey, basename, location, matches, storageKey])\n );\n if (typeof document !== \"undefined\") {\n React10.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY\n );\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {\n }\n }, [storageKey]);\n React10.useLayoutEffect(() => {\n let disableScrollRestoration = router?.enableScrollRestoration(\n savedScrollPositions,\n () => window.scrollY,\n getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0\n );\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, basename, getKey]);\n React10.useLayoutEffect(() => {\n if (restoreScrollPosition === false) {\n return;\n }\n if (typeof restoreScrollPosition === \"number\") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n }\n try {\n if (location.hash) {\n let el = document.getElementById(\n decodeURIComponent(location.hash.slice(1))\n );\n if (el) {\n el.scrollIntoView();\n return;\n }\n }\n } catch {\n warning(\n false,\n `\"${location.hash.slice(\n 1\n )}\" is not a decodable element ID. The view will not scroll to it.`\n );\n }\n if (preventScrollReset === true) {\n return;\n }\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\nfunction useBeforeUnload(callback, options) {\n let { capture } = options || {};\n React10.useEffect(() => {\n let opts = capture != null ? { capture } : void 0;\n window.addEventListener(\"beforeunload\", callback, opts);\n return () => {\n window.removeEventListener(\"beforeunload\", callback, opts);\n };\n }, [callback, capture]);\n}\nfunction usePageHide(callback, options) {\n let { capture } = options || {};\n React10.useEffect(() => {\n let opts = capture != null ? { capture } : void 0;\n window.addEventListener(\"pagehide\", callback, opts);\n return () => {\n window.removeEventListener(\"pagehide\", callback, opts);\n };\n }, [callback, capture]);\n}\nfunction usePrompt({\n when,\n message\n}) {\n let blocker = useBlocker(when);\n React10.useEffect(() => {\n if (blocker.state === \"blocked\") {\n let proceed = window.confirm(message);\n if (proceed) {\n setTimeout(blocker.proceed, 0);\n } else {\n blocker.reset();\n }\n }\n }, [blocker, message]);\n React10.useEffect(() => {\n if (blocker.state === \"blocked\" && !when) {\n blocker.reset();\n }\n }, [blocker, when]);\n}\nfunction useViewTransitionState(to, { relative } = {}) {\n let vtContext = React10.useContext(ViewTransitionContext);\n invariant(\n vtContext != null,\n \"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?\"\n );\n let { basename } = useDataRouterContext3(\n \"useViewTransitionState\" /* useViewTransitionState */\n );\n let path = useResolvedPath(to, { relative });\n if (!vtContext.isTransitioning) {\n return false;\n }\n let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;\n}\n\n// lib/dom/server.tsx\nimport * as React11 from \"react\";\nfunction StaticRouter({\n basename,\n children,\n location: locationProp = \"/\"\n}) {\n if (typeof locationProp === \"string\") {\n locationProp = parsePath(locationProp);\n }\n let action = \"POP\" /* Pop */;\n let location = {\n pathname: locationProp.pathname || \"/\",\n search: locationProp.search || \"\",\n hash: locationProp.hash || \"\",\n state: locationProp.state != null ? locationProp.state : null,\n key: locationProp.key || \"default\"\n };\n let staticNavigator = getStatelessNavigator();\n return /* @__PURE__ */ React11.createElement(\n Router,\n {\n basename,\n children,\n location,\n navigationType: action,\n navigator: staticNavigator,\n static: true,\n unstable_useTransitions: false\n }\n );\n}\nfunction StaticRouterProvider({\n context,\n router,\n hydrate: hydrate2 = true,\n nonce\n}) {\n invariant(\n router && context,\n \"You must provide `router` and `context` to <StaticRouterProvider>\"\n );\n let dataRouterContext = {\n router,\n navigator: getStatelessNavigator(),\n static: true,\n staticContext: context,\n basename: context.basename || \"/\"\n };\n let fetchersContext = /* @__PURE__ */ new Map();\n let hydrateScript = \"\";\n if (hydrate2 !== false) {\n let data2 = {\n loaderData: context.loaderData,\n actionData: context.actionData,\n errors: serializeErrors(context.errors)\n };\n let json = htmlEscape(JSON.stringify(JSON.stringify(data2)));\n hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;\n }\n let { state } = dataRouterContext.router;\n return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React11.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React11.createElement(FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React11.createElement(ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React11.createElement(\n Router,\n {\n basename: dataRouterContext.basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: dataRouterContext.navigator,\n static: dataRouterContext.static,\n unstable_useTransitions: false\n },\n /* @__PURE__ */ React11.createElement(\n DataRoutes2,\n {\n routes: router.routes,\n future: router.future,\n state\n }\n )\n ))))), hydrateScript ? /* @__PURE__ */ React11.createElement(\n \"script\",\n {\n suppressHydrationWarning: true,\n nonce,\n dangerouslySetInnerHTML: { __html: hydrateScript }\n }\n ) : null);\n}\nfunction DataRoutes2({\n routes,\n future,\n state\n}) {\n return useRoutesImpl(routes, void 0, state, void 0, future);\n}\nfunction serializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n if (isRouteErrorResponse(val)) {\n serialized[key] = { ...val, __type: \"RouteErrorResponse\" };\n } else if (val instanceof Error) {\n serialized[key] = {\n message: val.message,\n __type: \"Error\",\n // If this is a subclass (i.e., ReferenceError), send up the type so we\n // can re-create the same type during hydration.\n ...val.name !== \"Error\" ? {\n __subType: val.name\n } : {}\n };\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\nfunction getStatelessNavigator() {\n return {\n createHref,\n encodeLocation,\n push(to) {\n throw new Error(\n `You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \\`navigate(${JSON.stringify(to)})\\` somewhere in your app.`\n );\n },\n replace(to) {\n throw new Error(\n `You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \\`navigate(${JSON.stringify(to)}, { replace: true })\\` somewhere in your app.`\n );\n },\n go(delta) {\n throw new Error(\n `You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \\`navigate(${delta})\\` somewhere in your app.`\n );\n },\n back() {\n throw new Error(\n `You cannot use navigator.back() on the server because it is a stateless environment.`\n );\n },\n forward() {\n throw new Error(\n `You cannot use navigator.forward() on the server because it is a stateless environment.`\n );\n }\n };\n}\nfunction createStaticHandler2(routes, opts) {\n return createStaticHandler(routes, {\n ...opts,\n mapRouteProperties\n });\n}\nfunction createStaticRouter(routes, context, opts = {}) {\n let manifest = {};\n let dataRoutes = convertRoutesToDataRoutes(\n routes,\n mapRouteProperties,\n void 0,\n manifest\n );\n let matches = context.matches.map((match) => {\n let route = manifest[match.route.id] || match.route;\n return {\n ...match,\n route\n };\n });\n let msg = (method) => `You cannot use router.${method}() on the server because it is a stateless environment`;\n return {\n get basename() {\n return context.basename;\n },\n get future() {\n return {\n v8_middleware: false,\n ...opts?.future\n };\n },\n get state() {\n return {\n historyAction: \"POP\" /* Pop */,\n location: context.location,\n matches,\n loaderData: context.loaderData,\n actionData: context.actionData,\n errors: context.errors,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n restoreScrollPosition: null,\n preventScrollReset: false,\n revalidation: \"idle\",\n fetchers: /* @__PURE__ */ new Map(),\n blockers: /* @__PURE__ */ new Map()\n };\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return void 0;\n },\n initialize() {\n throw msg(\"initialize\");\n },\n subscribe() {\n throw msg(\"subscribe\");\n },\n enableScrollRestoration() {\n throw msg(\"enableScrollRestoration\");\n },\n navigate() {\n throw msg(\"navigate\");\n },\n fetch() {\n throw msg(\"fetch\");\n },\n revalidate() {\n throw msg(\"revalidate\");\n },\n createHref,\n encodeLocation,\n getFetcher() {\n return IDLE_FETCHER;\n },\n deleteFetcher() {\n throw msg(\"deleteFetcher\");\n },\n resetFetcher() {\n throw msg(\"resetFetcher\");\n },\n dispose() {\n throw msg(\"dispose\");\n },\n getBlocker() {\n return IDLE_BLOCKER;\n },\n deleteBlocker() {\n throw msg(\"deleteBlocker\");\n },\n patchRoutes() {\n throw msg(\"patchRoutes\");\n },\n _internalFetchControllers: /* @__PURE__ */ new Map(),\n _internalSetRoutes() {\n throw msg(\"_internalSetRoutes\");\n },\n _internalSetStateDoNotUseOrYouWillBreakYourApp() {\n throw msg(\"_internalSetStateDoNotUseOrYouWillBreakYourApp\");\n }\n };\n}\nfunction createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n}\nfunction encodeLocation(to) {\n let href = typeof to === \"string\" ? to : createPath(to);\n href = href.replace(/ $/, \"%20\");\n let encoded = ABSOLUTE_URL_REGEX3.test(href) ? new URL(href) : new URL(href, \"http://localhost\");\n return {\n pathname: encoded.pathname,\n search: encoded.search,\n hash: encoded.hash\n };\n}\nvar ABSOLUTE_URL_REGEX3 = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nvar ESCAPE_LOOKUP2 = {\n \"&\": \"\\\\u0026\",\n \">\": \"\\\\u003e\",\n \"<\": \"\\\\u003c\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nvar ESCAPE_REGEX2 = /[&><\\u2028\\u2029]/g;\nfunction htmlEscape(str) {\n return str.replace(ESCAPE_REGEX2, (match) => ESCAPE_LOOKUP2[match]);\n}\n\nexport {\n Action,\n createBrowserHistory,\n invariant,\n createPath,\n parsePath,\n createContext,\n RouterContextProvider,\n convertRoutesToDataRoutes,\n matchRoutes,\n generatePath,\n matchPath,\n stripBasename,\n resolvePath,\n data,\n redirect,\n redirectDocument,\n replace,\n ErrorResponseImpl,\n isRouteErrorResponse,\n instrumentHandler,\n IDLE_NAVIGATION,\n IDLE_FETCHER,\n IDLE_BLOCKER,\n createRouter,\n createStaticHandler,\n getStaticContextFromError,\n isDataWithResponseInit,\n isResponse,\n isRedirectStatusCode,\n isRedirectResponse,\n isMutationMethod,\n DataRouterContext,\n DataRouterStateContext,\n RSCRouterContext,\n ViewTransitionContext,\n FetchersContext,\n AwaitContextProvider,\n NavigationContext,\n LocationContext,\n RouteContext,\n ENABLE_DEV_WARNINGS,\n useHref,\n useInRouterContext,\n useLocation,\n useNavigationType,\n useMatch,\n useNavigate,\n useOutletContext,\n useOutlet,\n useParams,\n useResolvedPath,\n useRoutes,\n useNavigation,\n useRevalidator,\n useMatches,\n useLoaderData,\n useRouteLoaderData,\n useActionData,\n useRouteError,\n useAsyncValue,\n useAsyncError,\n useBlocker,\n useRoute,\n warnOnce,\n mapRouteProperties,\n hydrationRouteProperties,\n createMemoryRouter,\n RouterProvider,\n MemoryRouter,\n Navigate,\n Outlet,\n Route,\n Router,\n Routes,\n Await,\n createRoutesFromChildren,\n createRoutesFromElements,\n renderMatches,\n WithComponentProps,\n withComponentProps,\n WithHydrateFallbackProps,\n withHydrateFallbackProps,\n WithErrorBoundaryProps,\n withErrorBoundaryProps,\n createSearchParams,\n escapeHtml,\n encode,\n createRequestInit,\n SingleFetchRedirectSymbol,\n SINGLE_FETCH_REDIRECT_STATUS,\n NO_BODY_STATUS_CODES,\n StreamTransfer,\n getTurboStreamSingleFetchDataStrategy,\n getSingleFetchDataStrategyImpl,\n stripIndexParam,\n singleFetchUrl,\n decodeViaTurboStream,\n RemixErrorBoundary,\n createServerRoutes,\n createClientRoutesWithHMRRevalidationOptOut,\n noActionDefinedError,\n createClientRoutes,\n shouldHydrateRouteLoader,\n getPatchRoutesOnNavigationFunction,\n useFogOFWarDiscovery,\n getManifestPath,\n FrameworkContext,\n CRITICAL_CSS_DATA_ATTRIBUTE,\n Links,\n PrefetchPageLinks,\n Meta,\n setIsHydrated,\n Scripts,\n createBrowserRouter,\n createHashRouter,\n BrowserRouter,\n HashRouter,\n HistoryRouter,\n Link,\n NavLink,\n Form,\n ScrollRestoration,\n useLinkClickHandler,\n useSearchParams,\n useSubmit,\n useFormAction,\n useFetcher,\n useFetchers,\n useScrollRestoration,\n useBeforeUnload,\n usePrompt,\n useViewTransitionState,\n StaticRouter,\n StaticRouterProvider,\n createStaticHandler2,\n createStaticRouter\n};\n","import * as React from \"react\";\nconst SvgGithub = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"currentColor\", className: \"bi bi-github\", viewBox: \"0 0 16 16\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8\" }));\nexport default SvgGithub;\n","import * as React from \"react\";\nconst SvgNpm = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 128 128\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { fill: \"currentColor\", d: \"M2 38.5h124v43.71H64v7.29H36.44v-7.29H2zm6.89 36.43h13.78V53.07h6.89v21.86h6.89V45.79H8.89zm34.44-29.14v36.42h13.78v-7.28h13.78V45.79zm13.78 7.29H64v14.56h-6.89zm20.67-7.29v29.14h13.78V53.07h6.89v21.86h6.89V53.07h6.89v21.86h6.89V45.79z\" }));\nexport default SvgNpm;\n","import * as React from \"react\";\nconst SvgTags = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 0 640 640\", width: \"24px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M433.2 103.1L581.4 253.4C609.1 281.5 609.1 326.5 581.4 354.6L425 512.9C415.7 522.3 400.5 522.4 391.1 513.1C381.7 503.8 381.6 488.6 390.9 479.2L547.3 320.8C556.5 311.5 556.5 296.4 547.3 287.1L399 136.9C389.7 127.5 389.8 112.3 399.2 103C408.6 93.7 423.8 93.8 433.1 103.2zM64.1 293.5L64.1 160C64.1 124.7 92.8 96 128.1 96L261.6 96C278.6 96 294.9 102.7 306.9 114.7L450.9 258.7C475.9 283.7 475.9 324.2 450.9 349.2L317.4 482.7C292.4 507.7 251.9 507.7 226.9 482.7L82.9 338.7C70.9 326.7 64.2 310.4 64.2 293.4zM208.1 208C208.1 190.3 193.8 176 176.1 176C158.4 176 144.1 190.3 144.1 208C144.1 225.7 158.4 240 176.1 240C193.8 240 208.1 225.7 208.1 208z\" }));\nexport default SvgTags;\n","import { createContext, type ReactNode } from \"react\";\n\nexport type Versions = {\n [major: string]: {\n [fullVersion: string]: string;\n };\n};\n\nexport type LibraryContextType = {\n overview?: ReactNode | undefined;\n packageDescription: string;\n packageName: string;\n showOpenCollectLink: boolean;\n versions: Versions | undefined;\n};\n\nexport const LibraryContext = createContext<LibraryContextType | null>(null);\n","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n","import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n","import { create } from \"zustand\";\n\nexport const useNavStore = create<{\n visible: boolean;\n\n hide: () => void;\n show: () => void;\n toggle: () => void;\n}>((set) => ({\n visible: false,\n\n hide: () => set({ visible: false }),\n show: () => set({ visible: true }),\n toggle: () => set((state) => ({ visible: !state.visible }))\n}));\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * Concatenates two arrays faster than the array spread operator.\n */\nconst concatArrays = (array1, array2) => {\n // Pre-allocate for better V8 optimization\n const combinedArray = new Array(array1.length + array2.length);\n for (let i = 0; i < array1.length; i++) {\n combinedArray[i] = array1[i];\n }\n for (let i = 0; i < array2.length; i++) {\n combinedArray[array1.length + i] = array2[i];\n }\n return combinedArray;\n};\n\n// Factory function ensures consistent object shapes\nconst createClassValidatorObject = (classGroupId, validator) => ({\n classGroupId,\n validator\n});\n// Factory ensures consistent ClassPartObject shape\nconst createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({\n nextPart,\n validators,\n classGroupId\n});\nconst CLASS_PART_SEPARATOR = '-';\nconst EMPTY_CONFLICTS = [];\n// I use two dots here because one dot is used as prefix for class groups in plugins\nconst ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n if (className.startsWith('[') && className.endsWith(']')) {\n return getGroupIdForArbitraryProperty(className);\n }\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.\n const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;\n return getGroupRecursive(classParts, startIndex, classMap);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n if (hasPostfixModifier) {\n const modifierConflicts = conflictingClassGroupModifiers[classGroupId];\n const baseConflicts = conflictingClassGroups[classGroupId];\n if (modifierConflicts) {\n if (baseConflicts) {\n // Merge base conflicts with modifier conflicts\n return concatArrays(baseConflicts, modifierConflicts);\n }\n // Only modifier conflicts\n return modifierConflicts;\n }\n // Fall back to without postfix if no modifier conflicts\n return baseConflicts || EMPTY_CONFLICTS;\n }\n return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, startIndex, classPartObject) => {\n const classPathsLength = classParts.length - startIndex;\n if (classPathsLength === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[startIndex];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n if (nextClassPartObject) {\n const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);\n if (result) return result;\n }\n const validators = classPartObject.validators;\n if (validators === null) {\n return undefined;\n }\n // Build classRest string efficiently by joining from startIndex onwards\n const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);\n const validatorsLength = validators.length;\n for (let i = 0; i < validatorsLength; i++) {\n const validatorObj = validators[i];\n if (validatorObj.validator(classRest)) {\n return validatorObj.classGroupId;\n }\n }\n return undefined;\n};\n/**\n * Get the class group ID for an arbitrary property.\n *\n * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.\n */\nconst getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {\n const content = className.slice(1, -1);\n const colonIndex = content.indexOf(':');\n const property = content.slice(0, colonIndex);\n return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;\n})();\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n return processClassGroups(classGroups, theme);\n};\n// Split into separate functions to maintain monomorphic call sites\nconst processClassGroups = (classGroups, theme) => {\n const classMap = createClassPartObject();\n for (const classGroupId in classGroups) {\n const group = classGroups[classGroupId];\n processClassesRecursively(group, classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n const len = classGroup.length;\n for (let i = 0; i < len; i++) {\n const classDefinition = classGroup[i];\n processClassDefinition(classDefinition, classPartObject, classGroupId, theme);\n }\n};\n// Split into separate functions for each type to maintain monomorphic call sites\nconst processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (typeof classDefinition === 'string') {\n processStringDefinition(classDefinition, classPartObject, classGroupId);\n return;\n }\n if (typeof classDefinition === 'function') {\n processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);\n return;\n }\n processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);\n};\nconst processStringDefinition = (classDefinition, classPartObject, classGroupId) => {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n};\nconst processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n if (classPartObject.validators === null) {\n classPartObject.validators = [];\n }\n classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));\n};\nconst processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n const entries = Object.entries(classDefinition);\n const len = entries.length;\n for (let i = 0; i < len; i++) {\n const [key, value] = entries[i];\n processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);\n }\n};\nconst getPart = (classPartObject, path) => {\n let current = classPartObject;\n const parts = path.split(CLASS_PART_SEPARATOR);\n const len = parts.length;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n let next = current.nextPart.get(part);\n if (!next) {\n next = createClassPartObject();\n current.nextPart.set(part, next);\n }\n current = next;\n }\n return current;\n};\n// Type guard maintains monomorphic check\nconst isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;\n\n// LRU cache implementation using plain objects for simplicity\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = Object.create(null);\n let previousCache = Object.create(null);\n const update = (key, value) => {\n cache[key] = value;\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = Object.create(null);\n }\n };\n return {\n get(key) {\n let value = cache[key];\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache[key]) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (key in cache) {\n cache[key] = value;\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst EMPTY_MODIFIERS = [];\n// Pre-allocated result object shape for consistency\nconst createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition,\n isExternal\n});\nconst createParseClassName = config => {\n const {\n prefix,\n experimentalParseClassName\n } = config;\n /**\n * Parse class name into parts.\n *\n * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n */\n let parseClassName = className => {\n // Use simple array with push for better performance\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n const len = className.length;\n for (let index = 0; index < len; index++) {\n const currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + 1;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);\n // Inline important modifier check\n let baseClassName = baseClassNameWithImportantModifier;\n let hasImportantModifier = false;\n if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(0, -1);\n hasImportantModifier = true;\n } else if (\n /**\n * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.\n * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864\n */\n baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(1);\n hasImportantModifier = true;\n }\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\n};\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst createSortModifiers = config => {\n // Pre-compute weights for all known modifiers for O(1) comparison\n const modifierWeights = new Map();\n // Assign weights to sensitive modifiers (highest priority, but preserve order)\n config.orderSensitiveModifiers.forEach((mod, index) => {\n modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods\n });\n return modifiers => {\n const result = [];\n let currentSegment = [];\n // Process modifiers in one pass\n for (let i = 0; i < modifiers.length; i++) {\n const modifier = modifiers[i];\n // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)\n const isArbitrary = modifier[0] === '[';\n const isOrderSensitive = modifierWeights.has(modifier);\n if (isArbitrary || isOrderSensitive) {\n // Sort and flush current segment alphabetically\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n currentSegment = [];\n }\n result.push(modifier);\n } else {\n // Regular modifier - add to current segment for batch sorting\n currentSegment.push(modifier);\n }\n }\n // Sort and add any remaining segment items\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n }\n return result;\n };\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n sortModifiers: createSortModifiers(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds,\n sortModifiers\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n isExternal,\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n if (isExternal) {\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n let hasPostfixModifier = !!maybePostfixModifierPosition;\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n // Fast path: skip sorting for empty or single modifier\n const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.indexOf(classId) > -1) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nconst twJoin = (...classLists) => {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < classLists.length) {\n if (argument = classLists[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst toValue = mix => {\n // Fast path for strings\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst createTailwindMerge = (createConfigFirst, ...createConfigRest) => {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall;\n const initTailwindMerge = classList => {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n };\n const tailwindMerge = classList => {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n };\n functionToCall = initTailwindMerge;\n return (...args) => functionToCall(twJoin(...args));\n};\nconst fallbackThemeArr = [];\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || fallbackThemeArr;\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isFraction = value => fractionRegex.test(value);\nconst isNumber = value => !!value && !Number.isNaN(Number(value));\nconst isInteger = value => !!value && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst isAny = () => true;\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);\nconst isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);\nconst isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);\nconst isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);\nconst isArbitraryVariable = value => arbitraryVariableRegex.test(value);\nconst isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);\nconst isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);\nconst isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);\nconst isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);\nconst isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);\nconst isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);\n// Helpers\nconst getIsArbitraryValue = (value, testLabel, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {\n const result = arbitraryVariableRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return shouldMatchNoLabel;\n }\n return false;\n};\n// Labels\nconst isLabelPosition = label => label === 'position' || label === 'percentage';\nconst isLabelImage = label => label === 'image' || label === 'url';\nconst isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';\nconst isLabelLength = label => label === 'length';\nconst isLabelNumber = label => label === 'number';\nconst isLabelFamilyName = label => label === 'family-name';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isArbitraryVariable,\n isArbitraryVariableFamilyName,\n isArbitraryVariableImage,\n isArbitraryVariableLength,\n isArbitraryVariablePosition,\n isArbitraryVariableShadow,\n isArbitraryVariableSize,\n isFraction,\n isInteger,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n /**\n * Theme getters for theme variable namespaces\n * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces\n */\n /***/\n const themeColor = fromTheme('color');\n const themeFont = fromTheme('font');\n const themeText = fromTheme('text');\n const themeFontWeight = fromTheme('font-weight');\n const themeTracking = fromTheme('tracking');\n const themeLeading = fromTheme('leading');\n const themeBreakpoint = fromTheme('breakpoint');\n const themeContainer = fromTheme('container');\n const themeSpacing = fromTheme('spacing');\n const themeRadius = fromTheme('radius');\n const themeShadow = fromTheme('shadow');\n const themeInsetShadow = fromTheme('inset-shadow');\n const themeTextShadow = fromTheme('text-shadow');\n const themeDropShadow = fromTheme('drop-shadow');\n const themeBlur = fromTheme('blur');\n const themePerspective = fromTheme('perspective');\n const themeAspect = fromTheme('aspect');\n const themeEase = fromTheme('ease');\n const themeAnimate = fromTheme('animate');\n /**\n * Helpers to avoid repeating the same scales\n *\n * We use functions that create a new array every time they're called instead of static arrays.\n * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.\n */\n /***/\n const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-top', 'top-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-top', 'bottom-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-bottom', 'bottom-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-bottom'];\n const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];\n const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const scaleOverscroll = () => ['auto', 'contain', 'none'];\n const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];\n const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];\n const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartAndEnd = () => ['auto', {\n span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]\n }, isInteger, isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];\n const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];\n const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];\n const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];\n const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];\n const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];\n const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {\n position: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleBgRepeat = () => ['no-repeat', {\n repeat: ['', 'x', 'y', 'space', 'round']\n }];\n const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {\n size: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];\n const scaleRadius = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];\n const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];\n const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];\n const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];\n const scaleBlur = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];\n const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];\n return {\n cacheSize: 500,\n theme: {\n animate: ['spin', 'ping', 'pulse', 'bounce'],\n aspect: ['video'],\n blur: [isTshirtSize],\n breakpoint: [isTshirtSize],\n color: [isAny],\n container: [isTshirtSize],\n 'drop-shadow': [isTshirtSize],\n ease: ['in', 'out', 'in-out'],\n font: [isAnyNonArbitrary],\n 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],\n 'inset-shadow': [isTshirtSize],\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],\n perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],\n radius: [isTshirtSize],\n shadow: [isTshirtSize],\n spacing: ['px', isNumber],\n text: [isTshirtSize],\n 'text-shadow': [isTshirtSize],\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']\n },\n classGroups: {\n // --------------\n // --- Layout ---\n // --------------\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n * @deprecated since Tailwind CSS v4.0.0\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': scaleBreak()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': scaleBreak()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Screen Reader Only\n * @see https://tailwindcss.com/docs/display#screen-reader-only\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: scalePositionWithArbitrary()\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: scaleOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': scaleOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': scaleOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: scaleOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': scaleOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': scaleOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: scaleInset()\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: scaleInset()\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: scaleInset()\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: scaleInset()\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: scaleInset()\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: scaleInset()\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------------\n // --- Flexbox and Grid ---\n // ------------------------\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['nowrap', 'wrap', 'wrap-reverse']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': scaleGridAutoColsRows()\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': scaleGridAutoColsRows()\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: scaleUnambiguousSpacing()\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': scaleUnambiguousSpacing()\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': scaleUnambiguousSpacing()\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: [...scaleAlignPrimaryAxis(), 'normal']\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...scaleAlignPrimaryAxis()]\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: [...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', ...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': scaleAlignPrimaryAxis()\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: scaleUnambiguousSpacing()\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: scaleUnambiguousSpacing()\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: scaleMargin()\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: scaleMargin()\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: scaleMargin()\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: scaleMargin()\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: scaleMargin()\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x': [{\n 'space-x': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y': [{\n 'space-y': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y-reverse': ['space-y-reverse'],\n // --------------\n // --- Sizing ---\n // --------------\n /**\n * Size\n * @see https://tailwindcss.com/docs/width#setting-both-width-and-height\n */\n size: [{\n size: scaleSizing()\n }],\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: [themeContainer, 'screen', ...scaleSizing()]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'none', ...scaleSizing()]\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n {\n screen: [themeBreakpoint]\n }, ...scaleSizing()]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: ['screen', 'lh', ...scaleSizing()]\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': ['screen', 'lh', ...scaleSizing()]\n }],\n // ------------------\n // --- Typography ---\n // ------------------\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Font Stretch\n * @see https://tailwindcss.com/docs/font-stretch\n */\n 'font-stretch': [{\n 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n themeLeading, ...scaleUnambiguousSpacing()]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://v3.tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: scaleColor()\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: scaleColor()\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...scaleLineStyle(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: scaleColor()\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: scaleUnambiguousSpacing()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Overflow Wrap\n * @see https://tailwindcss.com/docs/overflow-wrap\n */\n wrap: [{\n wrap: ['break-word', 'anywhere', 'normal']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // -------------------\n // --- Backgrounds ---\n // -------------------\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: scaleBgPosition()\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: scaleBgRepeat()\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: scaleBgSize()\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n linear: [{\n to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isInteger, isArbitraryVariable, isArbitraryValue],\n radial: ['', isArbitraryVariable, isArbitraryValue],\n conic: [isInteger, isArbitraryVariable, isArbitraryValue]\n }, isArbitraryVariableImage, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: scaleColor()\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: scaleColor()\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: scaleColor()\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: scaleColor()\n }],\n // ---------------\n // --- Borders ---\n // ---------------\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: scaleRadius()\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': scaleRadius()\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': scaleRadius()\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': scaleRadius()\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': scaleRadius()\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': scaleRadius()\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': scaleRadius()\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': scaleRadius()\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': scaleRadius()\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': scaleRadius()\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': scaleRadius()\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': scaleRadius()\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': scaleRadius()\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': scaleRadius()\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': scaleRadius()\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: scaleBorderWidth()\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': scaleBorderWidth()\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': scaleBorderWidth()\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': scaleBorderWidth()\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': scaleBorderWidth()\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x': [{\n 'divide-x': scaleBorderWidth()\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y': [{\n 'divide-y': scaleBorderWidth()\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style\n */\n 'divide-style': [{\n divide: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: scaleColor()\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color S\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color E\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': scaleColor()\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': scaleColor()\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': scaleColor()\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': scaleColor()\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: scaleColor()\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: [...scaleLineStyle(), 'none', 'hidden']\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: scaleColor()\n }],\n // ---------------\n // --- Effects ---\n // ---------------\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color\n */\n 'shadow-color': [{\n shadow: scaleColor()\n }],\n /**\n * Inset Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow\n */\n 'inset-shadow': [{\n 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Inset Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color\n */\n 'inset-shadow-color': [{\n 'inset-shadow': scaleColor()\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring\n */\n 'ring-w': [{\n ring: scaleBorderWidth()\n }],\n /**\n * Ring Width Inset\n * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color\n */\n 'ring-color': [{\n ring: scaleColor()\n }],\n /**\n * Ring Offset Width\n * @see https://v3.tailwindcss.com/docs/ring-offset-width\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-w': [{\n 'ring-offset': [isNumber, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://v3.tailwindcss.com/docs/ring-offset-color\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-color': [{\n 'ring-offset': scaleColor()\n }],\n /**\n * Inset Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring\n */\n 'inset-ring-w': [{\n 'inset-ring': scaleBorderWidth()\n }],\n /**\n * Inset Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color\n */\n 'inset-ring-color': [{\n 'inset-ring': scaleColor()\n }],\n /**\n * Text Shadow\n * @see https://tailwindcss.com/docs/text-shadow\n */\n 'text-shadow': [{\n 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Text Shadow Color\n * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color\n */\n 'text-shadow-color': [{\n 'text-shadow': scaleColor()\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': scaleBlendMode()\n }],\n /**\n * Mask Clip\n * @see https://tailwindcss.com/docs/mask-clip\n */\n 'mask-clip': [{\n 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }, 'mask-no-clip'],\n /**\n * Mask Composite\n * @see https://tailwindcss.com/docs/mask-composite\n */\n 'mask-composite': [{\n mask: ['add', 'subtract', 'intersect', 'exclude']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image-linear-pos': [{\n 'mask-linear': [isNumber]\n }],\n 'mask-image-linear-from-pos': [{\n 'mask-linear-from': scaleMaskImagePosition()\n }],\n 'mask-image-linear-to-pos': [{\n 'mask-linear-to': scaleMaskImagePosition()\n }],\n 'mask-image-linear-from-color': [{\n 'mask-linear-from': scaleColor()\n }],\n 'mask-image-linear-to-color': [{\n 'mask-linear-to': scaleColor()\n }],\n 'mask-image-t-from-pos': [{\n 'mask-t-from': scaleMaskImagePosition()\n }],\n 'mask-image-t-to-pos': [{\n 'mask-t-to': scaleMaskImagePosition()\n }],\n 'mask-image-t-from-color': [{\n 'mask-t-from': scaleColor()\n }],\n 'mask-image-t-to-color': [{\n 'mask-t-to': scaleColor()\n }],\n 'mask-image-r-from-pos': [{\n 'mask-r-from': scaleMaskImagePosition()\n }],\n 'mask-image-r-to-pos': [{\n 'mask-r-to': scaleMaskImagePosition()\n }],\n 'mask-image-r-from-color': [{\n 'mask-r-from': scaleColor()\n }],\n 'mask-image-r-to-color': [{\n 'mask-r-to': scaleColor()\n }],\n 'mask-image-b-from-pos': [{\n 'mask-b-from': scaleMaskImagePosition()\n }],\n 'mask-image-b-to-pos': [{\n 'mask-b-to': scaleMaskImagePosition()\n }],\n 'mask-image-b-from-color': [{\n 'mask-b-from': scaleColor()\n }],\n 'mask-image-b-to-color': [{\n 'mask-b-to': scaleColor()\n }],\n 'mask-image-l-from-pos': [{\n 'mask-l-from': scaleMaskImagePosition()\n }],\n 'mask-image-l-to-pos': [{\n 'mask-l-to': scaleMaskImagePosition()\n }],\n 'mask-image-l-from-color': [{\n 'mask-l-from': scaleColor()\n }],\n 'mask-image-l-to-color': [{\n 'mask-l-to': scaleColor()\n }],\n 'mask-image-x-from-pos': [{\n 'mask-x-from': scaleMaskImagePosition()\n }],\n 'mask-image-x-to-pos': [{\n 'mask-x-to': scaleMaskImagePosition()\n }],\n 'mask-image-x-from-color': [{\n 'mask-x-from': scaleColor()\n }],\n 'mask-image-x-to-color': [{\n 'mask-x-to': scaleColor()\n }],\n 'mask-image-y-from-pos': [{\n 'mask-y-from': scaleMaskImagePosition()\n }],\n 'mask-image-y-to-pos': [{\n 'mask-y-to': scaleMaskImagePosition()\n }],\n 'mask-image-y-from-color': [{\n 'mask-y-from': scaleColor()\n }],\n 'mask-image-y-to-color': [{\n 'mask-y-to': scaleColor()\n }],\n 'mask-image-radial': [{\n 'mask-radial': [isArbitraryVariable, isArbitraryValue]\n }],\n 'mask-image-radial-from-pos': [{\n 'mask-radial-from': scaleMaskImagePosition()\n }],\n 'mask-image-radial-to-pos': [{\n 'mask-radial-to': scaleMaskImagePosition()\n }],\n 'mask-image-radial-from-color': [{\n 'mask-radial-from': scaleColor()\n }],\n 'mask-image-radial-to-color': [{\n 'mask-radial-to': scaleColor()\n }],\n 'mask-image-radial-shape': [{\n 'mask-radial': ['circle', 'ellipse']\n }],\n 'mask-image-radial-size': [{\n 'mask-radial': [{\n closest: ['side', 'corner'],\n farthest: ['side', 'corner']\n }]\n }],\n 'mask-image-radial-pos': [{\n 'mask-radial-at': scalePosition()\n }],\n 'mask-image-conic-pos': [{\n 'mask-conic': [isNumber]\n }],\n 'mask-image-conic-from-pos': [{\n 'mask-conic-from': scaleMaskImagePosition()\n }],\n 'mask-image-conic-to-pos': [{\n 'mask-conic-to': scaleMaskImagePosition()\n }],\n 'mask-image-conic-from-color': [{\n 'mask-conic-from': scaleColor()\n }],\n 'mask-image-conic-to-color': [{\n 'mask-conic-to': scaleColor()\n }],\n /**\n * Mask Mode\n * @see https://tailwindcss.com/docs/mask-mode\n */\n 'mask-mode': [{\n mask: ['alpha', 'luminance', 'match']\n }],\n /**\n * Mask Origin\n * @see https://tailwindcss.com/docs/mask-origin\n */\n 'mask-origin': [{\n 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }],\n /**\n * Mask Position\n * @see https://tailwindcss.com/docs/mask-position\n */\n 'mask-position': [{\n mask: scaleBgPosition()\n }],\n /**\n * Mask Repeat\n * @see https://tailwindcss.com/docs/mask-repeat\n */\n 'mask-repeat': [{\n mask: scaleBgRepeat()\n }],\n /**\n * Mask Size\n * @see https://tailwindcss.com/docs/mask-size\n */\n 'mask-size': [{\n mask: scaleBgSize()\n }],\n /**\n * Mask Type\n * @see https://tailwindcss.com/docs/mask-type\n */\n 'mask-type': [{\n 'mask-type': ['alpha', 'luminance']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image': [{\n mask: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // ---------------\n // --- Filters ---\n // ---------------\n /**\n * Filter\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: scaleBlur()\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Drop Shadow Color\n * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color\n */\n 'drop-shadow-color': [{\n 'drop-shadow': scaleColor()\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Filter\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': scaleBlur()\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n // --------------\n // --- Tables ---\n // --------------\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': scaleUnambiguousSpacing()\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // ---------------------------------\n // --- Transitions and Animation ---\n // ---------------------------------\n /**\n * Transition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Behavior\n * @see https://tailwindcss.com/docs/transition-behavior\n */\n 'transition-behavior': [{\n transition: ['normal', 'discrete']\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------\n // --- Transforms ---\n // ------------------\n /**\n * Backface Visibility\n * @see https://tailwindcss.com/docs/backface-visibility\n */\n backface: [{\n backface: ['hidden', 'visible']\n }],\n /**\n * Perspective\n * @see https://tailwindcss.com/docs/perspective\n */\n perspective: [{\n perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Perspective Origin\n * @see https://tailwindcss.com/docs/perspective-origin\n */\n 'perspective-origin': [{\n 'perspective-origin': scalePositionWithArbitrary()\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: scaleRotate()\n }],\n /**\n * Rotate X\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-x': [{\n 'rotate-x': scaleRotate()\n }],\n /**\n * Rotate Y\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-y': [{\n 'rotate-y': scaleRotate()\n }],\n /**\n * Rotate Z\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-z': [{\n 'rotate-z': scaleRotate()\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: scaleScale()\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': scaleScale()\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': scaleScale()\n }],\n /**\n * Scale Z\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-z': [{\n 'scale-z': scaleScale()\n }],\n /**\n * Scale 3D\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-3d': ['scale-3d'],\n /**\n * Skew\n * @see https://tailwindcss.com/docs/skew\n */\n skew: [{\n skew: scaleSkew()\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': scaleSkew()\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': scaleSkew()\n }],\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: scalePositionWithArbitrary()\n }],\n /**\n * Transform Style\n * @see https://tailwindcss.com/docs/transform-style\n */\n 'transform-style': [{\n transform: ['3d', 'flat']\n }],\n /**\n * Translate\n * @see https://tailwindcss.com/docs/translate\n */\n translate: [{\n translate: scaleTranslate()\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': scaleTranslate()\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': scaleTranslate()\n }],\n /**\n * Translate Z\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-z': [{\n 'translate-z': scaleTranslate()\n }],\n /**\n * Translate None\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-none': ['translate-none'],\n // ---------------------\n // --- Interactivity ---\n // ---------------------\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: scaleColor()\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: scaleColor()\n }],\n /**\n * Color Scheme\n * @see https://tailwindcss.com/docs/color-scheme\n */\n 'color-scheme': [{\n scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Field Sizing\n * @see https://tailwindcss.com/docs/field-sizing\n */\n 'field-sizing': [{\n 'field-sizing': ['fixed', 'content']\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['auto', 'none']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', '', 'y', 'x']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]\n }],\n // -----------\n // --- SVG ---\n // -----------\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: ['none', ...scaleColor()]\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: ['none', ...scaleColor()]\n }],\n // ---------------------\n // --- Accessibility ---\n // ---------------------\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n translate: ['translate-x', 'translate-y', 'translate-none'],\n 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n },\n orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n overrideConfigProperties(baseConfig.theme, override.theme);\n overrideConfigProperties(baseConfig.classGroups, override.classGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);\n overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);\n mergeConfigProperties(baseConfig.theme, extend.theme);\n mergeConfigProperties(baseConfig.classGroups, extend.classGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);\n mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n mergeArrayProperties(baseObject, mergeObject, key);\n }\n }\n};\nconst mergeArrayProperties = (baseObject, mergeObject, key) => {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { CSSProperties, HTMLAttributes } from \"react\";\nimport { cn } from \"../utils/cn\";\n\nexport function Box({\n align,\n children,\n className,\n direction,\n gap = 0,\n grow,\n justify,\n shrink,\n style,\n wrap,\n ...rest\n}: HTMLAttributes<HTMLDivElement> & {\n align?: \"center\" | \"end\" | \"start\" | \"stretch\" | undefined;\n className?: string | undefined;\n direction: \"column\" | \"row\";\n gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined;\n grow?: 0 | 1 | undefined;\n justify?:\n | \"around\"\n | \"between\"\n | \"center\"\n | \"end\"\n | \"start\"\n | \"stretch\"\n | undefined;\n shrink?: 0 | 1 | undefined;\n style?: CSSProperties | undefined;\n wrap?: boolean | undefined;\n}) {\n return (\n <div\n className={cn(\n \"flex\",\n {\n // align\n \"items-center\": align === \"center\",\n \"items-end\": align === \"end\",\n \"items-start\": align === \"start\",\n \"items-stretch\": align === \"stretch\",\n\n // direction\n \"flex-col\": direction === \"column\",\n \"flex-row\": direction === \"row\",\n\n // gap\n \"gap-1\": gap === 1,\n \"gap-2\": gap === 2,\n \"gap-3\": gap === 3,\n \"gap-4\": gap === 4,\n \"gap-5\": gap === 5,\n \"gap-6\": gap === 6,\n \"gap-7\": gap === 7,\n \"gap-8\": gap === 8,\n\n // grow\n \"grow-0\": grow === 0,\n \"grow-1\": grow === 1,\n\n // justify\n \"justify-around\": justify === \"around\",\n \"justify-between\": justify === \"between\",\n \"justify-center\": justify === \"center\",\n \"justify-end\": justify === \"end\",\n \"justify-start\": justify === \"start\",\n \"justify-stretch\": justify === \"stretch\",\n\n // shrink\n \"shrink-0\": shrink === 0,\n \"shrink-1\": shrink === 1,\n\n // wrap\n \"flex-wrap\": wrap\n },\n className\n )}\n style={style}\n {...rest}\n >\n {children}\n </div>\n );\n}\n","'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n didCatch: false,\n error: null\n};\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n this.state = initialState;\n }\n static getDerivedStateFromError(error) {\n return {\n didCatch: true,\n error\n };\n }\n resetErrorBoundary() {\n const {\n error\n } = this.state;\n if (error !== null) {\n var _this$props$onReset, _this$props;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n args,\n reason: \"imperative-api\"\n });\n this.setState(initialState);\n }\n }\n componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n }\n componentDidUpdate(prevProps, prevState) {\n const {\n didCatch\n } = this.state;\n const {\n resetKeys\n } = this.props;\n\n // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n // we'd end up resetting the error boundary immediately.\n // This would likely trigger a second error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n var _this$props$onReset2, _this$props3;\n (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n next: resetKeys,\n prev: prevProps.resetKeys,\n reason: \"keys\"\n });\n this.setState(initialState);\n }\n }\n render() {\n const {\n children,\n fallbackRender,\n FallbackComponent,\n fallback\n } = this.props;\n const {\n didCatch,\n error\n } = this.state;\n let childToRender = children;\n if (didCatch) {\n const props = {\n error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof fallbackRender === \"function\") {\n childToRender = fallbackRender(props);\n } else if (FallbackComponent) {\n childToRender = createElement(FallbackComponent, props);\n } else if (fallback !== undefined) {\n childToRender = fallback;\n } else {\n throw error;\n }\n }\n return createElement(ErrorBoundaryContext.Provider, {\n value: {\n didCatch,\n error,\n resetErrorBoundary: this.resetErrorBoundary\n }\n }, childToRender);\n }\n}\nfunction hasArrayChanged() {\n let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n throw new Error(\"ErrorBoundaryContext not found\");\n }\n}\n\nfunction useErrorBoundary() {\n const context = useContext(ErrorBoundaryContext);\n assertErrorBoundaryContext(context);\n const [state, setState] = useState({\n error: null,\n hasError: false\n });\n const memoized = useMemo(() => ({\n resetBoundary: () => {\n context.resetErrorBoundary();\n setState({\n error: null,\n hasError: false\n });\n },\n showBoundary: error => setState({\n error,\n hasError: true\n })\n }), [context.resetErrorBoundary]);\n if (state.hasError) {\n throw state.error;\n }\n return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n ...props,\n ref\n })));\n\n // Format for display in DevTools\n const name = component.displayName || component.name || \"Unknown\";\n Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n","import {\n CheckCircleIcon,\n ExclamationTriangleIcon,\n InformationCircleIcon\n} from \"@heroicons/react/20/solid\";\nimport type { HTMLAttributes, PropsWithChildren } from \"react\";\nimport type { Intent } from \"../types\";\n\nexport function Callout({\n children,\n className,\n html = false,\n inline = false,\n intent = \"none\",\n minimal,\n ...rest\n}: PropsWithChildren<\n HTMLAttributes<HTMLDivElement> & {\n className?: string | undefined;\n html?: boolean;\n inline?: boolean;\n intent?: Intent;\n minimal?: boolean;\n }\n>) {\n let Icon = ExclamationTriangleIcon;\n switch (intent) {\n case \"none\":\n case \"primary\": {\n Icon = InformationCircleIcon;\n break;\n }\n case \"success\": {\n Icon = CheckCircleIcon;\n break;\n }\n }\n\n return (\n <div\n className={`${inline ? \"w-fit\" : \"w-full\"} rounded-md p-2 px-3 ${getClassNames(intent, !!minimal)} ${className}`}\n role=\"alert\"\n {...rest}\n >\n <div className=\"flex flex-row gap-2\">\n <Icon className=\"w-6 h-6 shrink-0\" />\n {html ? (\n <div dangerouslySetInnerHTML={{ __html: children as string }} />\n ) : (\n <div>{children}</div>\n )}\n </div>\n </div>\n );\n}\n\nfunction getClassNames(intent: Intent, minimal: boolean) {\n switch (intent) {\n case \"danger\": {\n if (minimal) {\n return \"bg-red-950 text-red-300 [&_svg]:text-red-500\";\n }\n return \"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!\";\n }\n case \"none\": {\n if (minimal) {\n return \"bg-white/10 text-slate-300 [&_svg]:text-slate-400\";\n }\n return \"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60\";\n }\n case \"primary\": {\n if (minimal) {\n return \"bg-sky-950 text-sky-300 [&_svg]:text-sky-400\";\n }\n return \"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400\";\n }\n case \"success\": {\n if (minimal) {\n return \"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400\";\n }\n return \"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400\";\n }\n case \"warning\": {\n if (minimal) {\n return \"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300\";\n }\n return \"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!\";\n }\n }\n}\n","import $HgANd$react 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 */ \nconst $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (0, $HgANd$react).useLayoutEffect : ()=>{};\n\n\nexport {$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect};\n//# sourceMappingURL=useLayoutEffect.module.js.map\n","import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from \"./useLayoutEffect.mjs\";\nimport $lmaYr$react, {useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback} from \"react\";\n\n/*\n * Copyright 2023 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\nvar $8ae05eaa5c114e9c$var$_React_useInsertionEffect;\n// Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,\n// before all layout effects, but is available only in React 18 and later.\nconst $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = (0, $lmaYr$react)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);\nfunction $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {\n const ref = (0, $lmaYr$useRef)(null);\n $8ae05eaa5c114e9c$var$useEarlyEffect(()=>{\n ref.current = fn;\n }, [\n fn\n ]);\n // @ts-ignore\n return (0, $lmaYr$useCallback)((...args)=>{\n const f = ref.current;\n return f === null || f === void 0 ? void 0 : f(...args);\n }, []);\n}\n\n\nexport {$8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent};\n//# sourceMappingURL=useEffectEvent.module.js.map\n","const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{\n var _el_ownerDocument;\n return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;\n};\nconst $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{\n if (el && 'window' in el && el.window === el) return el;\n const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);\n return doc.defaultView || window;\n};\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */ function $431fbd86ca7dc216$var$isNode(value) {\n return value !== null && typeof value === 'object' && 'nodeType' in value && typeof value.nodeType === 'number';\n}\nfunction $431fbd86ca7dc216$export$af51f0f06c0f328a(node) {\n return $431fbd86ca7dc216$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'host' in node;\n}\n\n\nexport {$431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot};\n//# sourceMappingURL=domHelpers.module.js.map\n","/*\n * Copyright 2023 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 */ let $f4e2df6bd15f8569$var$_tableNestedRows = false;\nlet $f4e2df6bd15f8569$var$_shadowDOM = false;\nfunction $f4e2df6bd15f8569$export$d9d8a0f82de49530() {\n $f4e2df6bd15f8569$var$_tableNestedRows = true;\n}\nfunction $f4e2df6bd15f8569$export$1b00cb14a96194e6() {\n return $f4e2df6bd15f8569$var$_tableNestedRows;\n}\nfunction $f4e2df6bd15f8569$export$12b151d9882e9985() {\n $f4e2df6bd15f8569$var$_shadowDOM = true;\n}\nfunction $f4e2df6bd15f8569$export$98658e8c59125e6a() {\n return $f4e2df6bd15f8569$var$_shadowDOM;\n}\n\n\nexport {$f4e2df6bd15f8569$export$d9d8a0f82de49530 as enableTableNestedRows, $f4e2df6bd15f8569$export$1b00cb14a96194e6 as tableNestedRows, $f4e2df6bd15f8569$export$12b151d9882e9985 as enableShadowDOM, $f4e2df6bd15f8569$export$98658e8c59125e6a as shadowDOM};\n//# sourceMappingURL=module.js.map\n","import {isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from \"./domHelpers.mjs\";\nimport {shadowDOM as $lcSu5$shadowDOM} from \"@react-stately/flags\";\n\n// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\n\nfunction $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {\n if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;\n if (!node || !otherNode) return false;\n let currentNode = otherNode;\n while(currentNode !== null){\n if (currentNode === node) return true;\n if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted\n currentNode = currentNode.assignedSlot.parentNode;\n else if ((0, $431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root\n currentNode = currentNode.host;\n else currentNode = currentNode.parentNode;\n }\n return false;\n}\nconst $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{\n var _activeElement_shadowRoot;\n if (!(0, $lcSu5$shadowDOM)()) return doc.activeElement;\n let activeElement = doc.activeElement;\n while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;\n return activeElement;\n};\nfunction $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {\n if ((0, $lcSu5$shadowDOM)() && event.target.shadowRoot) {\n if (event.composedPath) return event.composedPath()[0];\n }\n return event.target;\n}\n\n\nexport {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget};\n//# sourceMappingURL=DOMFunctions.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 */ function $c87311424ea30a05$var$testUserAgent(re) {\n var _window_navigator_userAgentData;\n if (typeof window === 'undefined' || window.navigator == null) return false;\n let brands = (_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands;\n return Array.isArray(brands) && brands.some((brand)=>re.test(brand.brand)) || re.test(window.navigator.userAgent);\n}\nfunction $c87311424ea30a05$var$testPlatform(re) {\n var _window_navigator_userAgentData;\n return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;\n}\nfunction $c87311424ea30a05$var$cached(fn) {\n if (process.env.NODE_ENV === 'test') return fn;\n let res = null;\n return ()=>{\n if (res == null) res = fn();\n return res;\n };\n}\nconst $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^Mac/i);\n});\nconst $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPhone/i);\n});\nconst $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;\n});\nconst $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();\n});\nconst $c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();\n});\nconst $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();\n});\nconst $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Chrome/i);\n});\nconst $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Android/i);\n});\nconst $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Firefox/i);\n});\n\n\nexport {$c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $c87311424ea30a05$export$b7d78993b74f766d as isFirefox};\n//# sourceMappingURL=platform.module.js.map\n","import {useRef as $lPAwt$useRef, useCallback as $lPAwt$useCallback, useEffect as $lPAwt$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 */ \nfunction $03deb23ff14920c4$export$4eaf04e54aa8eed6() {\n let globalListeners = (0, $lPAwt$useRef)(new Map());\n let addGlobalListener = (0, $lPAwt$useCallback)((eventTarget, type, listener, options)=>{\n // Make sure we remove the listener after it is called with the `once` option.\n let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args)=>{\n globalListeners.current.delete(listener);\n listener(...args);\n } : listener;\n globalListeners.current.set(listener, {\n type: type,\n eventTarget: eventTarget,\n fn: fn,\n options: options\n });\n eventTarget.addEventListener(type, fn, options);\n }, []);\n let removeGlobalListener = (0, $lPAwt$useCallback)((eventTarget, type, listener, options)=>{\n var _globalListeners_current_get;\n let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;\n eventTarget.removeEventListener(type, fn, options);\n globalListeners.current.delete(listener);\n }, []);\n let removeAllGlobalListeners = (0, $lPAwt$useCallback)(()=>{\n globalListeners.current.forEach((value, key)=>{\n removeGlobalListener(value.eventTarget, value.type, key, value.options);\n });\n }, [\n removeGlobalListener\n ]);\n (0, $lPAwt$useEffect)(()=>{\n return removeAllGlobalListeners;\n }, [\n removeAllGlobalListeners\n ]);\n return {\n addGlobalListener: addGlobalListener,\n removeGlobalListener: removeGlobalListener,\n removeAllGlobalListeners: removeAllGlobalListeners\n };\n}\n\n\nexport {$03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners};\n//# sourceMappingURL=useGlobalListeners.module.js.map\n","import {isAndroid as $c87311424ea30a05$export$a11b0059900ceec8} from \"./platform.mjs\";\n\n/*\n * Copyright 2022 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 $6a7db85432448f7f$export$60278871457622de(event) {\n // JAWS/NVDA with Firefox.\n if (event.pointerType === '' && event.isTrusted) return true;\n // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n // to detect TalkBack virtual clicks.\n if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1;\n return event.detail === 0 && !event.pointerType;\n}\nfunction $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';\n}\n\n\nexport {$6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent};\n//# sourceMappingURL=isVirtualEvent.module.js.map\n","import {useLayoutEffect as $6dfIe$useLayoutEffect, useEffectEvent as $6dfIe$useEffectEvent, isFocusable as $6dfIe$isFocusable, getOwnerWindow as $6dfIe$getOwnerWindow, focusWithoutScrolling as $6dfIe$focusWithoutScrolling} from \"@react-aria/utils\";\nimport {useRef as $6dfIe$useRef, useCallback as $6dfIe$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 */ \n\nfunction $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {\n let event = nativeEvent;\n event.nativeEvent = nativeEvent;\n event.isDefaultPrevented = ()=>event.defaultPrevented;\n // cancelBubble is technically deprecated in the spec, but still supported in all browsers.\n event.isPropagationStopped = ()=>event.cancelBubble;\n event.persist = ()=>{};\n return event;\n}\nfunction $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {\n Object.defineProperty(event, 'target', {\n value: target\n });\n Object.defineProperty(event, 'currentTarget', {\n value: target\n });\n}\nfunction $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {\n let stateRef = (0, $6dfIe$useRef)({\n isFocused: false,\n observer: null\n });\n // Clean up MutationObserver on unmount. See below.\n (0, $6dfIe$useLayoutEffect)(()=>{\n const state = stateRef.current;\n return ()=>{\n if (state.observer) {\n state.observer.disconnect();\n state.observer = null;\n }\n };\n }, []);\n let dispatchBlur = (0, $6dfIe$useEffectEvent)((e)=>{\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);\n });\n // This function is called during a React onFocus event.\n return (0, $6dfIe$useCallback)((e)=>{\n // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {\n stateRef.current.isFocused = true;\n let target = e.target;\n let onBlurHandler = (e)=>{\n stateRef.current.isFocused = false;\n if (target.disabled) {\n // For backward compatibility, dispatch a (fake) React synthetic event.\n let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);\n dispatchBlur(event);\n }\n // We no longer need the MutationObserver once the target is blurred.\n if (stateRef.current.observer) {\n stateRef.current.observer.disconnect();\n stateRef.current.observer = null;\n }\n };\n target.addEventListener('focusout', onBlurHandler, {\n once: true\n });\n stateRef.current.observer = new MutationObserver(()=>{\n if (stateRef.current.isFocused && target.disabled) {\n var _stateRef_current_observer;\n (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();\n let relatedTargetEl = target === document.activeElement ? null : document.activeElement;\n target.dispatchEvent(new FocusEvent('blur', {\n relatedTarget: relatedTargetEl\n }));\n target.dispatchEvent(new FocusEvent('focusout', {\n bubbles: true,\n relatedTarget: relatedTargetEl\n }));\n }\n });\n stateRef.current.observer.observe(target, {\n attributes: true,\n attributeFilter: [\n 'disabled'\n ]\n });\n }\n }, [\n dispatchBlur\n ]);\n}\nlet $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;\nfunction $8a9cb279dc87e130$export$cabe61c495ee3649(target) {\n // The browser will focus the nearest focusable ancestor of our target.\n while(target && !(0, $6dfIe$isFocusable)(target))target = target.parentElement;\n let window = (0, $6dfIe$getOwnerWindow)(target);\n let activeElement = window.document.activeElement;\n if (!activeElement || activeElement === target) return;\n $8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;\n let isRefocusing = false;\n let onBlur = (e)=>{\n if (e.target === activeElement || isRefocusing) e.stopImmediatePropagation();\n };\n let onFocusOut = (e)=>{\n if (e.target === activeElement || isRefocusing) {\n e.stopImmediatePropagation();\n // If there was no focusable ancestor, we don't expect a focus event.\n // Re-focus the original active element here.\n if (!target && !isRefocusing) {\n isRefocusing = true;\n (0, $6dfIe$focusWithoutScrolling)(activeElement);\n cleanup();\n }\n }\n };\n let onFocus = (e)=>{\n if (e.target === target || isRefocusing) e.stopImmediatePropagation();\n };\n let onFocusIn = (e)=>{\n if (e.target === target || isRefocusing) {\n e.stopImmediatePropagation();\n if (!isRefocusing) {\n isRefocusing = true;\n (0, $6dfIe$focusWithoutScrolling)(activeElement);\n cleanup();\n }\n }\n };\n window.addEventListener('blur', onBlur, true);\n window.addEventListener('focusout', onFocusOut, true);\n window.addEventListener('focusin', onFocusIn, true);\n window.addEventListener('focus', onFocus, true);\n let cleanup = ()=>{\n cancelAnimationFrame(raf);\n window.removeEventListener('blur', onBlur, true);\n window.removeEventListener('focusout', onFocusOut, true);\n window.removeEventListener('focusin', onFocusIn, true);\n window.removeEventListener('focus', onFocus, true);\n $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;\n isRefocusing = false;\n };\n let raf = requestAnimationFrame(cleanup);\n return cleanup;\n}\n\n\nexport {$8a9cb279dc87e130$export$525bc4921d56d4a as createSyntheticEvent, $8a9cb279dc87e130$export$c2b7abe5d61ec696 as setEventTarget, $8a9cb279dc87e130$export$715c682d09d639cc as useSyntheticBlurEvent, $8a9cb279dc87e130$export$fda7da73ab5d4c48 as ignoreFocusEvent, $8a9cb279dc87e130$export$cabe61c495ee3649 as preventFocus};\n//# sourceMappingURL=utils.module.js.map\n","import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, isVirtualClick as $28AnR$isVirtualClick, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$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 */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\n\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$changeHandlers = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if ($507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if ((0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e === null || e === void 0 ? void 0 : e.target);\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n","import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useCallback as $hf0lj$useCallback} from \"react\";\nimport {getOwnerDocument as $hf0lj$getOwnerDocument, getActiveElement as $hf0lj$getActiveElement, getEventTarget as $hf0lj$getEventTarget} from \"@react-aria/utils\";\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 */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\nfunction $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {\n let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;\n const onBlur = (0, $hf0lj$useCallback)((e)=>{\n if (e.target === e.currentTarget) {\n if (onBlurProp) onBlurProp(e);\n if (onFocusChange) onFocusChange(false);\n return true;\n }\n }, [\n onBlurProp,\n onFocusChange\n ]);\n const onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n const onFocus = (0, $hf0lj$useCallback)((e)=>{\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $hf0lj$getOwnerDocument)(e.target);\n const activeElement = ownerDocument ? (0, $hf0lj$getActiveElement)(ownerDocument) : (0, $hf0lj$getActiveElement)();\n if (e.target === e.currentTarget && activeElement === (0, $hf0lj$getEventTarget)(e.nativeEvent)) {\n if (onFocusProp) onFocusProp(e);\n if (onFocusChange) onFocusChange(true);\n onSyntheticFocus(e);\n }\n }, [\n onFocusChange,\n onFocusProp,\n onSyntheticFocus\n ]);\n return {\n focusProps: {\n onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,\n onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined\n }\n };\n}\n\n\nexport {$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus};\n//# sourceMappingURL=useFocus.module.js.map\n","import {createSyntheticEvent as $8a9cb279dc87e130$export$525bc4921d56d4a, setEventTarget as $8a9cb279dc87e130$export$c2b7abe5d61ec696, useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useRef as $3b9Q0$useRef, useCallback as $3b9Q0$useCallback} from \"react\";\nimport {useGlobalListeners as $3b9Q0$useGlobalListeners, getOwnerDocument as $3b9Q0$getOwnerDocument, getActiveElement as $3b9Q0$getActiveElement, getEventTarget as $3b9Q0$getEventTarget, nodeContains as $3b9Q0$nodeContains} from \"@react-aria/utils\";\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 */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\nfunction $9ab94262bd0047c7$export$420e68273165f4ec(props) {\n let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;\n let state = (0, $3b9Q0$useRef)({\n isFocusWithin: false\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $3b9Q0$useGlobalListeners)();\n let onBlur = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {\n state.current.isFocusWithin = false;\n removeAllGlobalListeners();\n if (onBlurWithin) onBlurWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(false);\n }\n }, [\n onBlurWithin,\n onFocusWithinChange,\n state,\n removeAllGlobalListeners\n ]);\n let onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n let onFocus = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $3b9Q0$getOwnerDocument)(e.target);\n const activeElement = (0, $3b9Q0$getActiveElement)(ownerDocument);\n if (!state.current.isFocusWithin && activeElement === (0, $3b9Q0$getEventTarget)(e.nativeEvent)) {\n if (onFocusWithin) onFocusWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(true);\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n // Browsers don't fire blur events when elements are removed from the DOM.\n // However, if a focus event occurs outside the element we're tracking, we\n // can manually fire onBlur.\n let currentTarget = e.currentTarget;\n addGlobalListener(ownerDocument, 'focus', (e)=>{\n if (state.current.isFocusWithin && !(0, $3b9Q0$nodeContains)(currentTarget, e.target)) {\n let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {\n relatedTarget: e.target\n });\n (0, $8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);\n let event = (0, $8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);\n onBlur(event);\n }\n }, {\n capture: true\n });\n }\n }, [\n onFocusWithin,\n onFocusWithinChange,\n onSyntheticFocus,\n addGlobalListener,\n onBlur\n ]);\n if (isDisabled) return {\n focusWithinProps: {\n // These cannot be null, that would conflict in mergeProps\n onFocus: undefined,\n onBlur: undefined\n }\n };\n return {\n focusWithinProps: {\n onFocus: onFocus,\n onBlur: onBlur\n }\n };\n}\n\n\nexport {$9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin};\n//# sourceMappingURL=useFocusWithin.module.js.map\n","import {useGlobalListeners as $AWxnT$useGlobalListeners, getOwnerDocument as $AWxnT$getOwnerDocument, nodeContains as $AWxnT$nodeContains} from \"@react-aria/utils\";\nimport {useState as $AWxnT$useState, useRef as $AWxnT$useRef, useEffect as $AWxnT$useEffect, useMemo as $AWxnT$useMemo} 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 */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n// iOS fires onPointerEnter twice: once with pointerType=\"touch\" and again with pointerType=\"mouse\".\n// We want to ignore these emulated events so they do not trigger hover behavior.\n// See https://bugs.webkit.org/show_bug.cgi?id=214609.\nlet $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;\nlet $6179b936705e76d3$var$hoverCount = 0;\nfunction $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents() {\n $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = true;\n // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter\n // with pointerType=\"mouse\" immediately after onPointerUp and before onFocus. On other\n // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in\n // the distant future because a user previously touched the element.\n setTimeout(()=>{\n $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;\n }, 50);\n}\nfunction $6179b936705e76d3$var$handleGlobalPointerEvent(e) {\n if (e.pointerType === 'touch') $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents();\n}\nfunction $6179b936705e76d3$var$setupGlobalTouchEvents() {\n if (typeof document === 'undefined') return;\n if ($6179b936705e76d3$var$hoverCount === 0) {\n if (typeof PointerEvent !== 'undefined') document.addEventListener('pointerup', $6179b936705e76d3$var$handleGlobalPointerEvent);\n else if (process.env.NODE_ENV === 'test') document.addEventListener('touchend', $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);\n }\n $6179b936705e76d3$var$hoverCount++;\n return ()=>{\n $6179b936705e76d3$var$hoverCount--;\n if ($6179b936705e76d3$var$hoverCount > 0) return;\n if (typeof PointerEvent !== 'undefined') document.removeEventListener('pointerup', $6179b936705e76d3$var$handleGlobalPointerEvent);\n else if (process.env.NODE_ENV === 'test') document.removeEventListener('touchend', $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);\n };\n}\nfunction $6179b936705e76d3$export$ae780daf29e6d456(props) {\n let { onHoverStart: onHoverStart, onHoverChange: onHoverChange, onHoverEnd: onHoverEnd, isDisabled: isDisabled } = props;\n let [isHovered, setHovered] = (0, $AWxnT$useState)(false);\n let state = (0, $AWxnT$useRef)({\n isHovered: false,\n ignoreEmulatedMouseEvents: false,\n pointerType: '',\n target: null\n }).current;\n (0, $AWxnT$useEffect)($6179b936705e76d3$var$setupGlobalTouchEvents, []);\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $AWxnT$useGlobalListeners)();\n let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = (0, $AWxnT$useMemo)(()=>{\n let triggerHoverStart = (event, pointerType)=>{\n state.pointerType = pointerType;\n if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) return;\n state.isHovered = true;\n let target = event.currentTarget;\n state.target = target;\n // When an element that is hovered over is removed, no pointerleave event is fired by the browser,\n // even though the originally hovered target may have shrunk in size so it is no longer hovered.\n // However, a pointerover event will be fired on the new target the mouse is over.\n // In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.\n addGlobalListener((0, $AWxnT$getOwnerDocument)(event.target), 'pointerover', (e)=>{\n if (state.isHovered && state.target && !(0, $AWxnT$nodeContains)(state.target, e.target)) triggerHoverEnd(e, e.pointerType);\n }, {\n capture: true\n });\n if (onHoverStart) onHoverStart({\n type: 'hoverstart',\n target: target,\n pointerType: pointerType\n });\n if (onHoverChange) onHoverChange(true);\n setHovered(true);\n };\n let triggerHoverEnd = (event, pointerType)=>{\n let target = state.target;\n state.pointerType = '';\n state.target = null;\n if (pointerType === 'touch' || !state.isHovered || !target) return;\n state.isHovered = false;\n removeAllGlobalListeners();\n if (onHoverEnd) onHoverEnd({\n type: 'hoverend',\n target: target,\n pointerType: pointerType\n });\n if (onHoverChange) onHoverChange(false);\n setHovered(false);\n };\n let hoverProps = {};\n if (typeof PointerEvent !== 'undefined') {\n hoverProps.onPointerEnter = (e)=>{\n if ($6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents && e.pointerType === 'mouse') return;\n triggerHoverStart(e, e.pointerType);\n };\n hoverProps.onPointerLeave = (e)=>{\n if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, e.pointerType);\n };\n } else if (process.env.NODE_ENV === 'test') {\n hoverProps.onTouchStart = ()=>{\n state.ignoreEmulatedMouseEvents = true;\n };\n hoverProps.onMouseEnter = (e)=>{\n if (!state.ignoreEmulatedMouseEvents && !$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents) triggerHoverStart(e, 'mouse');\n state.ignoreEmulatedMouseEvents = false;\n };\n hoverProps.onMouseLeave = (e)=>{\n if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, 'mouse');\n };\n }\n return {\n hoverProps: hoverProps,\n triggerHoverEnd: triggerHoverEnd\n };\n }, [\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n isDisabled,\n state,\n addGlobalListener,\n removeAllGlobalListeners\n ]);\n (0, $AWxnT$useEffect)(()=>{\n // Call the triggerHoverEnd as soon as isDisabled changes to true\n // Safe to call triggerHoverEnd, it will early return if we aren't currently hovering\n if (isDisabled) triggerHoverEnd({\n currentTarget: state.target\n }, state.pointerType);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isDisabled\n ]);\n return {\n hoverProps: hoverProps,\n isHovered: isHovered\n };\n}\n\n\nexport {$6179b936705e76d3$export$ae780daf29e6d456 as useHover};\n//# sourceMappingURL=useHover.module.js.map\n","import {isFocusVisible as $isWE5$isFocusVisible, useFocusVisibleListener as $isWE5$useFocusVisibleListener, useFocus as $isWE5$useFocus, useFocusWithin as $isWE5$useFocusWithin} from \"@react-aria/interactions\";\nimport {useRef as $isWE5$useRef, useState as $isWE5$useState, useCallback as $isWE5$useCallback} from \"react\";\n\n\n\nfunction $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {\n let { autoFocus: autoFocus = false, isTextInput: isTextInput, within: within } = props;\n let state = (0, $isWE5$useRef)({\n isFocused: false,\n isFocusVisible: autoFocus || (0, $isWE5$isFocusVisible)()\n });\n let [isFocused, setFocused] = (0, $isWE5$useState)(false);\n let [isFocusVisibleState, setFocusVisible] = (0, $isWE5$useState)(()=>state.current.isFocused && state.current.isFocusVisible);\n let updateState = (0, $isWE5$useCallback)(()=>setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);\n let onFocusChange = (0, $isWE5$useCallback)((isFocused)=>{\n state.current.isFocused = isFocused;\n setFocused(isFocused);\n updateState();\n }, [\n updateState\n ]);\n (0, $isWE5$useFocusVisibleListener)((isFocusVisible)=>{\n state.current.isFocusVisible = isFocusVisible;\n updateState();\n }, [], {\n isTextInput: isTextInput\n });\n let { focusProps: focusProps } = (0, $isWE5$useFocus)({\n isDisabled: within,\n onFocusChange: onFocusChange\n });\n let { focusWithinProps: focusWithinProps } = (0, $isWE5$useFocusWithin)({\n isDisabled: !within,\n onFocusWithinChange: onFocusChange\n });\n return {\n isFocused: isFocused,\n isFocusVisible: isFocusVisibleState,\n focusProps: within ? focusWithinProps : focusProps\n };\n}\n\n\nexport {$f7dceffc5ad7768b$export$4e328f61c538687f as useFocusRing};\n//# sourceMappingURL=useFocusRing.module.js.map\n","var i=Object.defineProperty;var d=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r=(t,e,n)=>(d(t,typeof e!=\"symbol\"?e+\"\":e,n),n);class o{constructor(){r(this,\"current\",this.detect());r(this,\"handoffState\",\"pending\");r(this,\"currentId\",0)}set(e){this.current!==e&&(this.handoffState=\"pending\",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===\"server\"}get isClient(){return this.current===\"client\"}detect(){return typeof window==\"undefined\"||typeof document==\"undefined\"?\"server\":\"client\"}handoff(){this.handoffState===\"pending\"&&(this.handoffState=\"complete\")}get isHandoffComplete(){return this.handoffState===\"complete\"}}let s=new o;export{s as env};\n","import{env as t}from'./env.js';function l(n){var u;return t.isServer?null:n==null?document:(u=n==null?void 0:n.ownerDocument)!=null?u:document}function r(n){var u,o;return t.isServer?null:n==null?document:(o=(u=n==null?void 0:n.getRootNode)==null?void 0:u.call(n))!=null?o:document}function e(n){var u,o;return(o=(u=r(n))==null?void 0:u.activeElement)!=null?o:null}function d(n){return e(n)===n}export{e as getActiveElement,l as getOwnerDocument,r as getRootNode,d as isActiveElement};\n","function t(e){typeof queueMicrotask==\"function\"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};\n","import{microTask as a}from'./micro-task.js';function o(){let s=[],r={addEventListener(e,t,n,i){return e.addEventListener(t,n,i),r.add(()=>e.removeEventListener(t,n,i))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return a(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,n){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:i})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(e){return s.includes(e)||s.push(e),()=>{let t=s.indexOf(e);if(t>=0)for(let n of s.splice(t,1))n()}},dispose(){for(let e of s.splice(0))e()}};return r}export{o as disposables};\n","import{useEffect as s,useState as o}from\"react\";import{disposables as t}from'../utils/disposables.js';function p(){let[e]=o(t);return s(()=>()=>e.dispose(),[e]),e}export{p as useDisposables};\n","import{useEffect as f,useLayoutEffect as c}from\"react\";import{env as i}from'../utils/env.js';let n=(e,t)=>{i.isServer?f(e,t):c(e,t)};export{n as useIsoMorphicEffect};\n","import{useRef as t}from\"react\";import{useIsoMorphicEffect as o}from'./use-iso-morphic-effect.js';function s(e){let r=t(e);return o(()=>{r.current=e},[e]),r}export{s as useLatestValue};\n","import a from\"react\";import{useLatestValue as n}from'./use-latest-value.js';let o=function(t){let e=n(t);return a.useCallback((...r)=>e.current(...r),[e])};export{o as useEvent};\n","import{useRef as a,useState as m}from\"react\";import{getOwnerDocument as d}from'../utils/owner.js';import{useDisposables as g}from'./use-disposables.js';import{useEvent as u}from'./use-event.js';function E(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function P(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function w({disabled:e=!1}={}){let t=a(null),[n,l]=m(!1),r=g(),o=u(()=>{t.current=null,l(!1),r.dispose()}),f=u(s=>{if(r.dispose(),t.current===null){t.current=s.currentTarget,l(!0);{let i=d(s.currentTarget);r.addEventListener(i,\"pointerup\",o,!1),r.addEventListener(i,\"pointermove\",c=>{if(t.current){let p=E(c);l(P(p,t.current.getBoundingClientRect()))}},!1),r.addEventListener(i,\"pointercancel\",o,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:f,onPointerUp:o,onClick:o}}}export{w as useActivePress};\n","import{useMemo as t}from\"react\";function n(e){return t(()=>e,Object.values(e))}export{n as useSlot};\n","import n,{createContext as r,useContext as i}from\"react\";let e=r(void 0);function a(){return i(e)}function l({value:t,children:o}){return n.createElement(e.Provider,{value:t},o)}export{l as DisabledProvider,a as useDisabled};\n","function t(...r){return Array.from(new Set(r.flatMap(n=>typeof n==\"string\"?n.split(\" \"):[]))).filter(Boolean).join(\" \")}export{t as classNames};\n","function u(r,n,...a){if(r in n){let e=n[r];return typeof e==\"function\"?e(...a):e}let t=new Error(`Tried to handle \"${r}\" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`\"${e}\"`).join(\", \")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};\n","import E,{Fragment as j,cloneElement as v,createElement as S,forwardRef as w,isValidElement as k,useCallback as x,useRef as M}from\"react\";import{classNames as N}from'./class-names.js';import{match as O}from'./match.js';var A=(a=>(a[a.None=0]=\"None\",a[a.RenderStrategy=1]=\"RenderStrategy\",a[a.Static=2]=\"Static\",a))(A||{}),C=(e=>(e[e.Unmount=0]=\"Unmount\",e[e.Hidden=1]=\"Hidden\",e))(C||{});function K(){let n=$();return x(r=>U({mergeRefs:n,...r}),[n])}function U({ourProps:n,theirProps:r,slot:e,defaultTag:a,features:s,visible:t=!0,name:l,mergeRefs:i}){i=i!=null?i:I;let o=P(r,n);if(t)return F(o,e,a,l,i);let y=s!=null?s:0;if(y&2){let{static:f=!1,...u}=o;if(f)return F(u,e,a,l,i)}if(y&1){let{unmount:f=!0,...u}=o;return O(f?0:1,{[0](){return null},[1](){return F({...u,hidden:!0,style:{display:\"none\"}},e,a,l,i)}})}return F(o,e,a,l,i)}function F(n,r={},e,a,s){let{as:t=e,children:l,refName:i=\"ref\",...o}=h(n,[\"unmount\",\"static\"]),y=n.ref!==void 0?{[i]:n.ref}:{},f=typeof l==\"function\"?l(r):l;\"className\"in o&&o.className&&typeof o.className==\"function\"&&(o.className=o.className(r)),o[\"aria-labelledby\"]&&o[\"aria-labelledby\"]===o.id&&(o[\"aria-labelledby\"]=void 0);let u={};if(r){let d=!1,p=[];for(let[c,T]of Object.entries(r))typeof T==\"boolean\"&&(d=!0),T===!0&&p.push(c.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(d){u[\"data-headlessui-state\"]=p.join(\" \");for(let c of p)u[`data-${c}`]=\"\"}}if(b(t)&&(Object.keys(m(o)).length>0||Object.keys(m(u)).length>0))if(!k(f)||Array.isArray(f)&&f.length>1||D(f)){if(Object.keys(m(o)).length>0)throw new Error(['Passing props on \"Fragment\"!',\"\",`The current component <${a} /> is rendering a \"Fragment\".`,\"However we need to passthrough the following props:\",Object.keys(m(o)).concat(Object.keys(m(u))).map(d=>` - ${d}`).join(`\n`),\"\",\"You can apply a few solutions:\",['Add an `as=\"...\"` prop, to ensure that we render an actual element instead of a \"Fragment\".',\"Render a single element as the child so that we can forward the props onto that element.\"].map(d=>` - ${d}`).join(`\n`)].join(`\n`))}else{let d=f.props,p=d==null?void 0:d.className,c=typeof p==\"function\"?(...R)=>N(p(...R),o.className):N(p,o.className),T=c?{className:c}:{},g=P(f.props,m(h(o,[\"ref\"])));for(let R in u)R in g&&delete u[R];return v(f,Object.assign({},g,u,y,{ref:s(H(f),y.ref)},T))}return S(t,Object.assign({},h(o,[\"ref\"]),!b(t)&&y,!b(t)&&u),f)}function $(){let n=M([]),r=x(e=>{for(let a of n.current)a!=null&&(typeof a==\"function\"?a(e):a.current=e)},[]);return(...e)=>{if(!e.every(a=>a==null))return n.current=e,r}}function I(...n){return n.every(r=>r==null)?void 0:r=>{for(let e of n)e!=null&&(typeof e==\"function\"?e(r):e.current=r)}}function P(...n){var a;if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let s of n)for(let t in s)t.startsWith(\"on\")&&typeof s[t]==\"function\"?((a=e[t])!=null||(e[t]=[]),e[t].push(s[t])):r[t]=s[t];if(r.disabled||r[\"aria-disabled\"])for(let s in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(s)&&(e[s]=[t=>{var l;return(l=t==null?void 0:t.preventDefault)==null?void 0:l.call(t)}]);for(let s in e)Object.assign(r,{[s](t,...l){let i=e[s];for(let o of i){if((t instanceof Event||(t==null?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;o(t,...l)}}});return r}function V(...n){var a;if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let s of n)for(let t in s)t.startsWith(\"on\")&&typeof s[t]==\"function\"?((a=e[t])!=null||(e[t]=[]),e[t].push(s[t])):r[t]=s[t];for(let s in e)Object.assign(r,{[s](...t){let l=e[s];for(let i of l)i==null||i(...t)}});return r}function Y(n){var r;return Object.assign(w(n),{displayName:(r=n.displayName)!=null?r:n.name})}function m(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function h(n,r=[]){let e=Object.assign({},n);for(let a of r)a in e&&delete e[a];return e}function H(n){return E.version.split(\".\")[0]>=\"19\"?n.props.ref:n.ref}function b(n){return n===j||n===Symbol.for(\"react.fragment\")}function D(n){return b(n.type)}export{A as RenderFeatures,C as RenderStrategy,m as compact,Y as forwardRefWithAs,b as isFragment,D as isFragmentInstance,V as mergeProps,K as useRender};\n","\"use client\";import{useFocusRing as y}from\"@react-aria/focus\";import{useHover as b}from\"@react-aria/interactions\";import{useActivePress as P}from'../../hooks/use-active-press.js';import{useSlot as B}from'../../hooks/use-slot.js';import{useDisabled as c}from'../../internal/disabled.js';import{forwardRefWithAs as A,mergeProps as g,useRender as _}from'../../utils/render.js';let R=\"button\";function v(s,n){var r;let p=c(),{disabled:e=p||!1,autoFocus:t=!1,...o}=s,{isFocusVisible:a,focusProps:l}=y({autoFocus:t}),{isHovered:u,hoverProps:i}=b({isDisabled:e}),{pressed:T,pressProps:d}=P({disabled:e}),f=g({ref:n,type:(r=o.type)!=null?r:\"button\",disabled:e||void 0,autoFocus:t},l,i,d),m=B({disabled:e,hover:u,focus:a,active:T,autofocus:t});return _()({ourProps:f,theirProps:o,slot:m,defaultTag:R,name:\"Button\"})}let L=A(v);export{L as Button};\n","import{useRef as o,useState as f}from\"react\";import{flushSync as a}from\"react-dom\";import{useEvent as m}from'./use-event.js';function b(l,r,c){let[i,s]=f(c),e=l!==void 0,t=o(e),u=o(!1),d=o(!1);return e&&!t.current&&!u.current?(u.current=!0,t.current=e,console.error(\"A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.\")):!e&&t.current&&!d.current&&(d.current=!0,t.current=e,console.error(\"A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.\")),[e?l:i,m(n=>(e||a(()=>s(n)),r==null?void 0:r(n)))]}export{b as useControllable};\n","import{useState as u}from\"react\";function l(e){let[t]=u(e);return t}export{l as useDefaultValue};\n","import{isValidElement as f}from\"react\";function p(t={},i=null,n=[]){for(let[e,o]of Object.entries(t))s(n,r(i,e),o);return n}function r(t,i){return t?t+\"[\"+i+\"]\":i}function s(t,i,n){if(Array.isArray(n))for(let[e,o]of n.entries())s(t,r(i,e.toString()),o);else n instanceof Date?t.push([i,n.toISOString()]):typeof n==\"boolean\"?t.push([i,n?\"1\":\"0\"]):typeof n==\"string\"?t.push([i,n]):typeof n==\"number\"?t.push([i,`${n}`]):n==null?t.push([i,\"\"]):c(n)&&!f(n)&&p(n,i,t)}function g(t){var n,e;let i=(n=t==null?void 0:t.form)!=null?n:t.closest(\"form\");if(i){for(let o of i.elements)if(o!==t&&(o.tagName===\"INPUT\"&&o.type===\"submit\"||o.tagName===\"BUTTON\"&&o.type===\"submit\"||o.nodeName===\"INPUT\"&&o.type===\"image\")){o.click();return}(e=i.requestSubmit)==null||e.call(i)}}function c(t){if(Object.prototype.toString.call(t)!==\"[object Object]\")return!1;let i=Object.getPrototypeOf(t);return i===null||Object.getPrototypeOf(i)===null}export{g as attemptSubmit,p as objectToFormEntries};\n","import{forwardRefWithAs as i,useRender as p}from'../utils/render.js';let a=\"span\";var s=(e=>(e[e.None=1]=\"None\",e[e.Focusable=2]=\"Focusable\",e[e.Hidden=4]=\"Hidden\",e))(s||{});function l(t,r){var n;let{features:d=1,...e}=t,o={ref:r,\"aria-hidden\":(d&2)===2?!0:(n=e[\"aria-hidden\"])!=null?n:void 0,hidden:(d&4)===4?!0:void 0,style:{position:\"fixed\",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",borderWidth:\"0\",...(d&4)===4&&(d&2)!==2&&{display:\"none\"}}};return p()({ourProps:o,theirProps:e,slot:{},defaultTag:a,name:\"Hidden\"})}let f=i(l);export{f as Hidden,s as HiddenFeatures};\n","import o,{createContext as H,useContext as E,useEffect as m,useState as u}from\"react\";import{createPortal as g}from\"react-dom\";import{useDisposables as h}from'../hooks/use-disposables.js';import{objectToFormEntries as x}from'../utils/form.js';import{compact as y}from'../utils/render.js';import{Hidden as l,HiddenFeatures as d}from'./hidden.js';let f=H(null);function W(t){let[e,r]=u(null);return o.createElement(f.Provider,{value:{target:e}},t.children,o.createElement(l,{features:d.Hidden,ref:r}))}function c({children:t}){let e=E(f);if(!e)return o.createElement(o.Fragment,null,t);let{target:r}=e;return r?g(o.createElement(o.Fragment,null,t),r):null}function j({data:t,form:e,disabled:r,onReset:n,overrides:F}){let[i,a]=u(null),p=h();return m(()=>{if(n&&i)return p.addEventListener(i,\"reset\",n)},[i,e,n]),o.createElement(c,null,o.createElement(C,{setForm:a,formId:e}),x(t).map(([s,v])=>o.createElement(l,{features:d.Hidden,...y({key:s,as:\"input\",type:\"hidden\",hidden:!0,readOnly:!0,form:e,disabled:r,name:s,value:v,...F})})))}function C({setForm:t,formId:e}){return m(()=>{if(e){let r=document.getElementById(e);r&&t(r)}},[t,e]),e?null:o.createElement(l,{features:d.Hidden,as:\"input\",type:\"hidden\",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest(\"form\");n&&t(n)}})}export{j as FormFields,W as FormFieldsProvider,c as HoistFormFields};\n","import n,{createContext as d,useContext as i}from\"react\";let e=d(void 0);function u(){return i(e)}function f({id:t,children:r}){return n.createElement(e.Provider,{value:t},r)}export{f as IdProvider,u as useProvidedId};\n","function o(e){return typeof e!=\"object\"||e===null?!1:\"nodeType\"in e}function t(e){return o(e)&&\"tagName\"in e}function n(e){return t(e)&&\"accessKey\"in e}function i(e){return t(e)&&\"tabIndex\"in e}function r(e){return t(e)&&\"style\"in e}function u(e){return n(e)&&e.nodeName===\"IFRAME\"}function l(e){return n(e)&&e.nodeName===\"INPUT\"}function s(e){return n(e)&&e.nodeName===\"TEXTAREA\"}function m(e){return n(e)&&e.nodeName===\"LABEL\"}function a(e){return n(e)&&e.nodeName===\"FIELDSET\"}function E(e){return n(e)&&e.nodeName===\"LEGEND\"}function L(e){return t(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type=\"hidden\"]),label,select,textarea,video[controls]'):!1}export{r as hasInlineStyle,t as isElement,n as isHTMLElement,a as isHTMLFieldSetElement,u as isHTMLIframeElement,l as isHTMLInputElement,m as isHTMLLabelElement,E as isHTMLLegendElement,s as isHTMLTextAreaElement,i as isHTMLorSVGElement,L as isInteractiveElement,o as isNode};\n","import*as n from'./dom.js';function s(l){let e=l.parentElement,t=null;for(;e&&!n.isHTMLFieldSetElement(e);)n.isHTMLLegendElement(e)&&(t=e),e=e.parentElement;let i=(e==null?void 0:e.getAttribute(\"disabled\"))===\"\";return i&&r(t)?!1:i}function r(l){if(!l)return!1;let e=l.previousElementSibling;for(;e!==null;){if(n.isHTMLLegendElement(e))return!1;e=e.previousElementSibling}return!0}export{s as isDisabledReactIssue7711};\n","import{useEffect as l,useRef as i}from\"react\";import{useEvent as r}from'./use-event.js';let u=Symbol();function T(t,n=!0){return Object.assign(t,{[u]:n})}function y(...t){let n=i(t);l(()=>{n.current=t},[t]);let c=r(e=>{for(let o of n.current)o!=null&&(typeof o==\"function\"?o(e):o.current=e)});return t.every(e=>e==null||(e==null?void 0:e[u]))?void 0:c}export{T as optionalRef,y as useSyncRefs};\n","\"use client\";import m,{createContext as D,useContext as d,useMemo as u,useState as T}from\"react\";import{useEvent as P}from'../../hooks/use-event.js';import{useId as g}from'../../hooks/use-id.js';import{useIsoMorphicEffect as x}from'../../hooks/use-iso-morphic-effect.js';import{useSlot as y}from'../../hooks/use-slot.js';import{useSyncRefs as E}from'../../hooks/use-sync-refs.js';import{useDisabled as v}from'../../internal/disabled.js';import{forwardRefWithAs as R,useRender as S}from'../../utils/render.js';let a=D(null);a.displayName=\"DescriptionContext\";function f(){let r=d(a);if(r===null){let e=new Error(\"You used a <Description /> component, but it is not inside a relevant parent.\");throw Error.captureStackTrace&&Error.captureStackTrace(e,f),e}return r}function w(){var r,e;return(e=(r=d(a))==null?void 0:r.value)!=null?e:void 0}function H(){let[r,e]=T([]);return[r.length>0?r.join(\" \"):void 0,u(()=>function(t){let i=P(n=>(e(o=>[...o,n]),()=>e(o=>{let s=o.slice(),p=s.indexOf(n);return p!==-1&&s.splice(p,1),s}))),l=u(()=>({register:i,slot:t.slot,name:t.name,props:t.props,value:t.value}),[i,t.slot,t.name,t.props,t.value]);return m.createElement(a.Provider,{value:l},t.children)},[e])]}let I=\"p\";function C(r,e){let c=g(),t=v(),{id:i=`headlessui-description-${c}`,...l}=r,n=f(),o=E(e);x(()=>n.register(i),[i,n.register]);let s=y({...n.slot,disabled:t||!1}),p={ref:o,...n.props,id:i};return S()({ourProps:p,theirProps:l,slot:s,defaultTag:I,name:n.name||\"Description\"})}let _=R(C),M=Object.assign(_,{});export{M as Description,w as useDescribedBy,H as useDescriptions};\n","var o=(r=>(r.Space=\" \",r.Enter=\"Enter\",r.Escape=\"Escape\",r.Backspace=\"Backspace\",r.Delete=\"Delete\",r.ArrowLeft=\"ArrowLeft\",r.ArrowUp=\"ArrowUp\",r.ArrowRight=\"ArrowRight\",r.ArrowDown=\"ArrowDown\",r.Home=\"Home\",r.End=\"End\",r.PageUp=\"PageUp\",r.PageDown=\"PageDown\",r.Tab=\"Tab\",r))(o||{});export{o as Keys};\n","\"use client\";import R,{createContext as D,useContext as h,useMemo as v,useState as k}from\"react\";import{useEvent as P}from'../../hooks/use-event.js';import{useId as _}from'../../hooks/use-id.js';import{useIsoMorphicEffect as S}from'../../hooks/use-iso-morphic-effect.js';import{useSlot as A}from'../../hooks/use-slot.js';import{useSyncRefs as B}from'../../hooks/use-sync-refs.js';import{useDisabled as F}from'../../internal/disabled.js';import{useProvidedId as M}from'../../internal/id.js';import*as m from'../../utils/dom.js';import{forwardRefWithAs as I,useRender as H}from'../../utils/render.js';let L=D(null);L.displayName=\"LabelContext\";function C(){let n=h(L);if(n===null){let l=new Error(\"You used a <Label /> component, but it is not inside a relevant parent.\");throw Error.captureStackTrace&&Error.captureStackTrace(l,C),l}return n}function N(n){var a,e,o;let l=(e=(a=h(L))==null?void 0:a.value)!=null?e:void 0;return((o=n==null?void 0:n.length)!=null?o:0)>0?[l,...n].filter(Boolean).join(\" \"):l}function V({inherit:n=!1}={}){let l=N(),[a,e]=k([]),o=n?[l,...a].filter(Boolean):a;return[o.length>0?o.join(\" \"):void 0,v(()=>function(t){let p=P(i=>(e(u=>[...u,i]),()=>e(u=>{let d=u.slice(),f=d.indexOf(i);return f!==-1&&d.splice(f,1),d}))),b=v(()=>({register:p,slot:t.slot,name:t.name,props:t.props,value:t.value}),[p,t.slot,t.name,t.props,t.value]);return R.createElement(L.Provider,{value:b},t.children)},[e])]}let G=\"label\";function U(n,l){var y;let a=_(),e=C(),o=M(),T=F(),{id:t=`headlessui-label-${a}`,htmlFor:p=o!=null?o:(y=e.props)==null?void 0:y.htmlFor,passive:b=!1,...i}=n,u=B(l);S(()=>e.register(t),[t,e.register]);let d=P(s=>{let g=s.currentTarget;if(!(s.target!==s.currentTarget&&m.isInteractiveElement(s.target))&&(m.isHTMLLabelElement(g)&&s.preventDefault(),e.props&&\"onClick\"in e.props&&typeof e.props.onClick==\"function\"&&e.props.onClick(s),m.isHTMLLabelElement(g))){let r=document.getElementById(g.htmlFor);if(r){let E=r.getAttribute(\"disabled\");if(E===\"true\"||E===\"\")return;let x=r.getAttribute(\"aria-disabled\");if(x===\"true\"||x===\"\")return;(m.isHTMLInputElement(r)&&(r.type===\"file\"||r.type===\"radio\"||r.type===\"checkbox\")||r.role===\"radio\"||r.role===\"checkbox\"||r.role===\"switch\")&&r.click(),r.focus({preventScroll:!0})}}}),f=A({...e.slot,disabled:T||!1}),c={ref:u,...e.props,id:t,htmlFor:p,onClick:d};return b&&(\"onClick\"in c&&(delete c.htmlFor,delete c.onClick),\"onClick\"in i&&delete i.onClick),H()({ourProps:c,theirProps:i,slot:f,defaultTag:p?G:\"div\",name:e.name||\"Label\"})}let j=I(U),Z=Object.assign(j,{});export{Z as Label,C as useLabelContext,N as useLabelledBy,V as useLabels};\n","\"use client\";import r,{createContext as n,useContext as i}from\"react\";let e=n(()=>{});function u(){return i(e)}function C({value:t,children:o}){return r.createElement(e.Provider,{value:t},o)}export{C as CloseProvider,u as useClose};\n","import{useCallback as n}from\"react\";function l(e,r){return e!==null&&r!==null&&typeof e==\"object\"&&typeof r==\"object\"&&\"id\"in e&&\"id\"in r?e.id===r.id:e===r}function u(e=l){return n((r,t)=>{if(typeof e==\"string\"){let o=e;return(r==null?void 0:r[o])===(t==null?void 0:t[o])}return e(r,t)},[e])}export{u as useByComparator};\n","import{useState as l}from\"react\";import{disposables as m}from'../utils/disposables.js';import{useIsoMorphicEffect as p}from'./use-iso-morphic-effect.js';function h(i){if(i===null)return{width:0,height:0};let{width:t,height:e}=i.getBoundingClientRect();return{width:t,height:e}}function w(i,t,e=!1){let[r,f]=l(()=>h(t));return p(()=>{if(!t||!i)return;let n=m();return n.requestAnimationFrame(function s(){n.requestAnimationFrame(s),f(u=>{let o=h(t);return o.width===u.width&&o.height===u.height?u:o})}),()=>{n.dispose()}},[t,i]),e?{width:`${r.width}px`,height:`${r.height}px`}:r}export{w as useElementSize};\n","var g=(f=>(f[f.Left=0]=\"Left\",f[f.Right=2]=\"Right\",f))(g||{});export{g as MouseButton};\n","import{useRef as l}from\"react\";import{MouseButton as f}from'../components/mouse.js';import{isDisabledReactIssue7711 as n}from'../utils/bugs.js';import{useEvent as o}from'./use-event.js';function s(t){let r=l(null),u=o(e=>{r.current=e.pointerType,!n(e.currentTarget)&&e.pointerType===\"mouse\"&&e.button===f.Left&&(e.preventDefault(),t(e))}),i=o(e=>{r.current!==\"mouse\"&&(n(e.currentTarget)||t(e))});return{onPointerDown:u,onClick:i}}export{s as useHandleToggle};\n","class a extends Map{constructor(t){super();this.factory=t}get(t){let e=super.get(t);return e===void 0&&(e=this.factory(t),this.set(t,e)),e}}export{a as DefaultMap};\n","var h=Object.defineProperty;var v=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var S=(t,e,r)=>(v(t,typeof e!=\"symbol\"?e+\"\":e,r),r),b=(t,e,r)=>{if(!e.has(t))throw TypeError(\"Cannot \"+r)};var i=(t,e,r)=>(b(t,e,\"read from private field\"),r?r.call(t):e.get(t)),c=(t,e,r)=>{if(e.has(t))throw TypeError(\"Cannot add the same private member more than once\");e instanceof WeakSet?e.add(t):e.set(t,r)},u=(t,e,r,s)=>(b(t,e,\"write to private field\"),s?s.call(t,r):e.set(t,r),r);var n,a,o;import{DefaultMap as m}from'./utils/default-map.js';import{disposables as y}from'./utils/disposables.js';import{env as d}from'./utils/env.js';class T{constructor(e){c(this,n,{});c(this,a,new m(()=>new Set));c(this,o,new Set);S(this,\"disposables\",y());u(this,n,e),d.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return i(this,n)}subscribe(e,r){if(d.isServer)return()=>{};let s={selector:e,callback:r,current:e(i(this,n))};return i(this,o).add(s),this.disposables.add(()=>{i(this,o).delete(s)})}on(e,r){return d.isServer?()=>{}:(i(this,a).get(e).add(r),this.disposables.add(()=>{i(this,a).get(e).delete(r)}))}send(e){let r=this.reduce(i(this,n),e);if(r!==i(this,n)){u(this,n,r);for(let s of i(this,o)){let l=s.selector(i(this,n));j(s.current,l)||(s.current=l,s.callback(l))}for(let s of i(this,a).get(e.type))s(i(this,n),e)}}}n=new WeakMap,a=new WeakMap,o=new WeakMap;function j(t,e){return Object.is(t,e)?!0:typeof t!=\"object\"||t===null||typeof e!=\"object\"||e===null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:f(t[Symbol.iterator](),e[Symbol.iterator]()):t instanceof Map&&e instanceof Map||t instanceof Set&&e instanceof Set?t.size!==e.size?!1:f(t.entries(),e.entries()):p(t)&&p(e)?f(Object.entries(t)[Symbol.iterator](),Object.entries(e)[Symbol.iterator]()):!1}function f(t,e){do{let r=t.next(),s=e.next();if(r.done&&s.done)return!0;if(r.done||s.done||!Object.is(r.value,s.value))return!1}while(!0)}function p(t){if(Object.prototype.toString.call(t)!==\"[object Object]\")return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}function k(t){let[e,r]=t(),s=y();return(...l)=>{e(...l),s.dispose(),s.microTask(r)}}export{T as Machine,k as batch,j as shallowEqual};\n","var a=Object.defineProperty;var r=(e,c,t)=>c in e?a(e,c,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[c]=t;var p=(e,c,t)=>(r(e,typeof c!=\"symbol\"?c+\"\":c,t),t);import{Machine as d}from'../machine.js';import{DefaultMap as l}from'../utils/default-map.js';import{match as u}from'../utils/match.js';var k=(t=>(t[t.Push=0]=\"Push\",t[t.Pop=1]=\"Pop\",t))(k||{});let y={[0](e,c){let t=c.id,s=e.stack,i=e.stack.indexOf(t);if(i!==-1){let n=e.stack.slice();return n.splice(i,1),n.push(t),s=n,{...e,stack:s}}return{...e,stack:[...e.stack,t]}},[1](e,c){let t=c.id,s=e.stack.indexOf(t);if(s===-1)return e;let i=e.stack.slice();return i.splice(s,1),{...e,stack:i}}};class o extends d{constructor(){super(...arguments);p(this,\"actions\",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})});p(this,\"selectors\",{isTop:(t,s)=>t.stack[t.stack.length-1]===s,inStack:(t,s)=>t.stack.includes(s)})}static new(){return new o({stack:[]})}reduce(t,s){return u(s.type,y,t,s)}}const x=new l(()=>o.new());export{k as ActionTypes,x as stackMachines};\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","/**\n * @license React\n * use-sync-external-store-with-selector.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n 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;\n exports.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))\n 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 \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\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","import{useSyncExternalStoreWithSelector as a}from\"use-sync-external-store/with-selector\";import{useEvent as t}from'./hooks/use-event.js';import{shallowEqual as o}from'./machine.js';function S(e,n,r=o){return a(t(i=>e.subscribe(s,i)),t(()=>e.state),t(()=>e.state),t(n),r)}function s(e){return e}export{S as useSlice};\n","import{useCallback as n,useId as u}from\"react\";import{stackMachines as p}from'../machines/stack-machine.js';import{useSlice as f}from'../react-glue.js';import{useIsoMorphicEffect as a}from'./use-iso-morphic-effect.js';function I(o,s){let t=u(),r=p.get(s),[i,c]=f(r,n(e=>[r.selectors.isTop(e,t),r.selectors.inStack(e,t)],[r,t]));return a(()=>{if(o)return r.actions.push(t),()=>r.actions.pop(t)},[r,o,t]),o?c?i:!0:!1}export{I as useIsTopLayer};\n","import{disposables as M}from'../utils/disposables.js';import{getOwnerDocument as b}from'../utils/owner.js';import{useIsTopLayer as L}from'./use-is-top-layer.js';import{useIsoMorphicEffect as T}from'./use-iso-morphic-effect.js';let f=new Map,u=new Map;function h(t){var e;let r=(e=u.get(t))!=null?e:0;return u.set(t,r+1),r!==0?()=>m(t):(f.set(t,{\"aria-hidden\":t.getAttribute(\"aria-hidden\"),inert:t.inert}),t.setAttribute(\"aria-hidden\",\"true\"),t.inert=!0,()=>m(t))}function m(t){var i;let r=(i=u.get(t))!=null?i:1;if(r===1?u.delete(t):u.set(t,r-1),r!==1)return;let e=f.get(t);e&&(e[\"aria-hidden\"]===null?t.removeAttribute(\"aria-hidden\"):t.setAttribute(\"aria-hidden\",e[\"aria-hidden\"]),t.inert=e.inert,f.delete(t))}function y(t,{allowed:r,disallowed:e}={}){let i=L(t,\"inert-others\");T(()=>{var d,c;if(!i)return;let a=M();for(let n of(d=e==null?void 0:e())!=null?d:[])n&&a.add(h(n));let s=(c=r==null?void 0:r())!=null?c:[];for(let n of s){if(!n)continue;let l=b(n);if(!l)continue;let o=n.parentElement;for(;o&&o!==l.body;){for(let p of o.children)s.some(E=>p.contains(E))||a.add(h(p));o=o.parentElement}}return a.dispose},[i,r,e])}export{y as useInertOthers};\n","import{useEffect as l}from\"react\";import{disposables as u}from'../utils/disposables.js';import*as c from'../utils/dom.js';import{useLatestValue as d}from'./use-latest-value.js';function p(s,n,o){let i=d(t=>{let e=t.getBoundingClientRect();e.x===0&&e.y===0&&e.width===0&&e.height===0&&o()});l(()=>{if(!s)return;let t=n===null?null:c.isHTMLElement(n)?n:n.current;if(!t)return;let e=u();if(typeof ResizeObserver!=\"undefined\"){let r=new ResizeObserver(()=>i.current(t));r.observe(t),e.add(()=>r.disconnect())}if(typeof IntersectionObserver!=\"undefined\"){let r=new IntersectionObserver(()=>i.current(t));r.observe(t),e.add(()=>r.disconnect())}return()=>e.dispose()},[n,i,s])}export{p as useOnDisappear};\n","import{disposables as p}from'./disposables.js';import*as y from'./dom.js';import{match as L}from'./match.js';import{getActiveElement as b,getOwnerDocument as F,getRootNode as f}from'./owner.js';let E=[\"[contentEditable=true]\",\"[tabindex]\",\"a[href]\",\"area[href]\",\"button:not([disabled])\",\"iframe\",\"input:not([disabled])\",\"select:not([disabled])\",\"details>summary\",\"textarea:not([disabled])\"].map(e=>`${e}:not([tabindex='-1'])`).join(\",\"),S=[\"[data-autofocus]\"].map(e=>`${e}:not([tabindex='-1'])`).join(\",\");var T=(o=>(o[o.First=1]=\"First\",o[o.Previous=2]=\"Previous\",o[o.Next=4]=\"Next\",o[o.Last=8]=\"Last\",o[o.WrapAround=16]=\"WrapAround\",o[o.NoScroll=32]=\"NoScroll\",o[o.AutoFocus=64]=\"AutoFocus\",o))(T||{}),A=(n=>(n[n.Error=0]=\"Error\",n[n.Overflow=1]=\"Overflow\",n[n.Success=2]=\"Success\",n[n.Underflow=3]=\"Underflow\",n))(A||{}),O=(t=>(t[t.Previous=-1]=\"Previous\",t[t.Next=1]=\"Next\",t))(O||{});function x(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(E)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function h(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(S)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var I=(t=>(t[t.Strict=0]=\"Strict\",t[t.Loose=1]=\"Loose\",t))(I||{});function H(e,r=0){var t;return e===((t=F(e))==null?void 0:t.body)?!1:L(r,{[0](){return e.matches(E)},[1](){let l=e;for(;l!==null;){if(l.matches(E))return!0;l=l.parentElement}return!1}})}function K(e){p().nextFrame(()=>{let r=b(e);r&&y.isHTMLorSVGElement(r)&&!H(r,0)&&w(e)})}var g=(t=>(t[t.Keyboard=0]=\"Keyboard\",t[t.Mouse=1]=\"Mouse\",t))(g||{});typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"keydown\",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0),document.addEventListener(\"click\",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0));function w(e){e==null||e.focus({preventScroll:!0})}let _=[\"textarea\",\"input\"].join(\",\");function P(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,_))!=null?t:!1}function G(e,r=t=>t){return e.slice().sort((t,l)=>{let n=r(t),a=r(l);if(n===null||a===null)return 0;let u=n.compareDocumentPosition(a);return u&Node.DOCUMENT_POSITION_FOLLOWING?-1:u&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function R(e,r,t=e===null?document.body:f(e)){return v(x(t),r,{relativeTo:e})}function v(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:n=[]}={}){let a=Array.isArray(e)?e.length>0?f(e[0]):document:f(e),u=Array.isArray(e)?t?G(e):e:r&64?h(e):x(e);n.length>0&&u.length>1&&(u=u.filter(i=>!n.some(d=>d!=null&&\"current\"in d?(d==null?void 0:d.current)===i:d===i))),l=l!=null?l:a==null?void 0:a.activeElement;let o=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),M=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,u.indexOf(l))-1;if(r&4)return Math.max(0,u.indexOf(l))+1;if(r&8)return u.length-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),N=r&32?{preventScroll:!0}:{},m=0,c=u.length,s;do{if(m>=c||m+c<=0)return 0;let i=M+m;if(r&16)i=(i+c)%c;else{if(i<0)return 3;if(i>=c)return 1}s=u[i],s==null||s.focus(N),m+=o}while(s!==b(s));return r&6&&P(s)&&s.select(),2}export{T as Focus,A as FocusResult,I as FocusableMode,w as focusElement,R as focusFrom,v as focusIn,E as focusableSelector,h as getAutoFocusableElements,x as getFocusableElements,H as isFocusableElement,K as restoreFocusIfNecessary,G as sortByDomNode};\n","function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};\n","import{useEffect as c}from\"react\";import{useLatestValue as a}from'./use-latest-value.js';function i(t,e,o,n){let u=a(o);c(()=>{if(!t)return;function r(m){u.current(m)}return document.addEventListener(e,r,n),()=>document.removeEventListener(e,r,n)},[t,e,n])}export{i as useDocumentEvent};\n","import{useEffect as a}from\"react\";import{useLatestValue as f}from'./use-latest-value.js';function s(t,e,o,n){let i=f(o);a(()=>{if(!t)return;function r(d){i.current(d)}return window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)},[t,e,n])}export{s as useWindowEvent};\n","import{useCallback as T,useRef as E}from\"react\";import*as d from'../utils/dom.js';import{FocusableMode as g,isFocusableElement as y}from'../utils/focus-management.js';import{isMobile as p}from'../utils/platform.js';import{useDocumentEvent as a}from'./use-document-event.js';import{useLatestValue as L}from'./use-latest-value.js';import{useWindowEvent as x}from'./use-window-event.js';const C=30;function k(o,f,h){let m=L(h),s=T(function(e,c){if(e.defaultPrevented)return;let r=c(e);if(r===null||!r.getRootNode().contains(r)||!r.isConnected)return;let M=function u(n){return typeof n==\"function\"?u(n()):Array.isArray(n)||n instanceof Set?n:[n]}(f);for(let u of M)if(u!==null&&(u.contains(r)||e.composed&&e.composedPath().includes(u)))return;return!y(r,g.Loose)&&r.tabIndex!==-1&&e.preventDefault(),m.current(e,r)},[m,f]),i=E(null);a(o,\"pointerdown\",t=>{var e,c;p()||(i.current=((c=(e=t.composedPath)==null?void 0:e.call(t))==null?void 0:c[0])||t.target)},!0),a(o,\"pointerup\",t=>{if(p()||!i.current)return;let e=i.current;return i.current=null,s(t,()=>e)},!0);let l=E({x:0,y:0});a(o,\"touchstart\",t=>{l.current.x=t.touches[0].clientX,l.current.y=t.touches[0].clientY},!0),a(o,\"touchend\",t=>{let e={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY};if(!(Math.abs(e.x-l.current.x)>=C||Math.abs(e.y-l.current.y)>=C))return s(t,()=>d.isHTMLorSVGElement(t.target)?t.target:null)},!0),x(o,\"blur\",t=>s(t,()=>d.isHTMLIframeElement(window.document.activeElement)?window.document.activeElement:null),!0)}export{k as useOutsideClick};\n","import{useMemo as o}from\"react\";import{getOwnerDocument as t,getRootNode as r}from'../utils/owner.js';function u(...e){return o(()=>t(...e),[...e])}function c(...e){return o(()=>r(...e),[...e])}export{u as useOwnerDocument,c as useRootDocument};\n","import{useRef as o}from\"react\";import*as E from'../utils/dom.js';import{useDocumentEvent as d}from'./use-document-event.js';var H=(e=>(e[e.Ignore=0]=\"Ignore\",e[e.Select=1]=\"Select\",e[e.Close=2]=\"Close\",e))(H||{});const S={Ignore:{kind:0},Select:r=>({kind:1,target:r}),Close:{kind:2}},M=200,f=5;function L(r,{trigger:n,action:T,close:e,select:p}){let l=o(null),i=o(null),u=o(null);d(r&&n!==null,\"pointerdown\",t=>{E.isNode(t==null?void 0:t.target)&&n!=null&&n.contains(t.target)&&(i.current=t.x,u.current=t.y,l.current=t.timeStamp)}),d(r&&n!==null,\"pointerup\",t=>{var s,m;let c=l.current;if(c===null||(l.current=null,!E.isHTMLorSVGElement(t.target))||Math.abs(t.x-((s=i.current)!=null?s:t.x))<f&&Math.abs(t.y-((m=u.current)!=null?m:t.y))<f)return;let a=T(t);switch(a.kind){case 0:return;case 1:{t.timeStamp-c>M&&(p(a.target),e());break}case 2:{e();break}}},{capture:!0})}export{S as Action,L as useQuickRelease};\n","import{useMemo as a}from\"react\";function e(t,u){return a(()=>{var n;if(t.type)return t.type;let r=(n=t.as)!=null?n:\"button\";if(typeof r==\"string\"&&r.toLowerCase()===\"button\"||(u==null?void 0:u.tagName)===\"BUTTON\"&&!u.hasAttribute(\"type\"))return\"button\"},[t.type,t.as,u])}export{e as useResolveButtonType};\n","import{useSyncExternalStore as e}from\"react\";function o(t){return e(t.subscribe,t.getSnapshot,t.getSnapshot)}export{o as useStore};\n","function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};\n","function d(){let r;return{before({doc:e}){var l;let o=e.documentElement,t=(l=e.defaultView)!=null?l:window;r=Math.max(0,t.innerWidth-o.clientWidth)},after({doc:e,d:o}){let t=e.documentElement,l=Math.max(0,t.clientWidth-t.offsetWidth),n=Math.max(0,r-l);o.style(t,\"paddingRight\",`${n}px`)}}}export{d as adjustScrollbarPadding};\n","import{disposables as u}from'../../utils/disposables.js';import*as i from'../../utils/dom.js';import{isIOS as p}from'../../utils/platform.js';function w(){return p()?{before({doc:o,d:r,meta:m}){function a(s){for(let l of m().containers)for(let c of l())if(c.contains(s))return!0;return!1}r.microTask(()=>{var c;if(window.getComputedStyle(o.documentElement).scrollBehavior!==\"auto\"){let t=u();t.style(o.documentElement,\"scrollBehavior\",\"auto\"),r.add(()=>r.microTask(()=>t.dispose()))}let s=(c=window.scrollY)!=null?c:window.pageYOffset,l=null;r.addEventListener(o,\"click\",t=>{if(i.isHTMLorSVGElement(t.target))try{let e=t.target.closest(\"a\");if(!e)return;let{hash:n}=new URL(e.href),f=o.querySelector(n);i.isHTMLorSVGElement(f)&&!a(f)&&(l=f)}catch{}},!0),r.group(t=>{r.addEventListener(o,\"touchstart\",e=>{if(t.dispose(),i.isHTMLorSVGElement(e.target)&&i.hasInlineStyle(e.target))if(a(e.target)){let n=e.target;for(;n.parentElement&&a(n.parentElement);)n=n.parentElement;t.style(n,\"overscrollBehavior\",\"contain\")}else t.style(e.target,\"touchAction\",\"none\")})}),r.addEventListener(o,\"touchmove\",t=>{if(i.isHTMLorSVGElement(t.target)){if(i.isHTMLInputElement(t.target))return;if(a(t.target)){let e=t.target;for(;e.parentElement&&e.dataset.headlessuiPortal!==\"\"&&!(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth);)e=e.parentElement;e.dataset.headlessuiPortal===\"\"&&t.preventDefault()}else t.preventDefault()}},{passive:!1}),r.add(()=>{var e;let t=(e=window.scrollY)!=null?e:window.pageYOffset;s!==t&&window.scrollTo(0,s),l&&l.isConnected&&(l.scrollIntoView({block:\"nearest\"}),l=null)})})}}:{}}export{w as handleIOSLocking};\n","function r(){return{before({doc:e,d:o}){o.style(e.documentElement,\"overflow\",\"hidden\")}}}export{r as preventScroll};\n","import{disposables as s}from'../../utils/disposables.js';import{createStore as d}from'../../utils/store.js';import{adjustScrollbarPadding as i}from'./adjust-scrollbar-padding.js';import{handleIOSLocking as l}from'./handle-ios-locking.js';import{preventScroll as p}from'./prevent-scroll.js';function r(e){let o={};for(let t of e)Object.assign(o,t(o));return o}let c=d(()=>new Map,{PUSH(e,o){var n;let t=(n=this.get(e))!=null?n:{doc:e,count:0,d:s(),meta:new Set,computedMeta:{}};return t.count++,t.meta.add(o),t.computedMeta=r(t.meta),this.set(e,t),this},POP(e,o){let t=this.get(e);return t&&(t.count--,t.meta.delete(o),t.computedMeta=r(t.meta)),this},SCROLL_PREVENT(e){let o={doc:e.doc,d:e.d,meta(){return e.computedMeta}},t=[l(),i(),p()];t.forEach(({before:n})=>n==null?void 0:n(o)),t.forEach(({after:n})=>n==null?void 0:n(o))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});c.subscribe(()=>{let e=c.getSnapshot(),o=new Map;for(let[t]of e)o.set(t,t.documentElement.style.overflow);for(let t of e.values()){let n=o.get(t.doc)===\"hidden\",a=t.count!==0;(a&&!n||!a&&n)&&c.dispatch(t.count>0?\"SCROLL_PREVENT\":\"SCROLL_ALLOW\",t),t.count===0&&c.dispatch(\"TEARDOWN\",t)}});export{c as overflows};\n","import{useStore as s}from'../../hooks/use-store.js';import{useIsoMorphicEffect as u}from'../use-iso-morphic-effect.js';import{overflows as t}from'./overflow-store.js';function a(r,e,n=()=>({containers:[]})){let f=s(t),o=e?f.get(e):void 0,i=o?o.count>0:!1;return u(()=>{if(!(!e||!r))return t.dispatch(\"PUSH\",e,n),()=>t.dispatch(\"POP\",e,n)},[r,e]),i}export{a as useDocumentOverflowLockedEffect};\n","import{useDocumentOverflowLockedEffect as l}from'./document-overflow/use-document-overflow.js';import{useIsTopLayer as m}from'./use-is-top-layer.js';function f(e,c,n=()=>[document.body]){let r=m(e,\"scroll-lock\");l(r,c,t=>{var o;return{containers:[...(o=t.containers)!=null?o:[],n]}})}export{f as useScrollLock};\n","import{useRef as o}from\"react\";function t(e){return[e.screenX,e.screenY]}function u(){let e=o([-1,-1]);return{wasMoved(r){let n=t(r);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(r){e.current=t(r)}}}export{u as useTrackedPointer};\n","import{useCallback as t,useState as b}from\"react\";function c(u=0){let[r,a]=b(u),g=t(e=>a(e),[]),s=t(e=>a(l=>l|e),[]),m=t(e=>(r&e)===e,[r]),n=t(e=>a(l=>l&~e),[]),F=t(e=>a(l=>l^e),[]);return{flags:r,setFlag:g,addFlag:s,hasFlag:m,removeFlag:n,toggleFlag:F}}export{c as useFlags};\n","var T,S;import{useRef as c,useState as b}from\"react\";import{disposables as m}from'../utils/disposables.js';import{useDisposables as g}from'./use-disposables.js';import{useFlags as y}from'./use-flags.js';import{useIsoMorphicEffect as L}from'./use-iso-morphic-effect.js';typeof process!=\"undefined\"&&typeof globalThis!=\"undefined\"&&typeof Element!=\"undefined\"&&((T=process==null?void 0:process.env)==null?void 0:T[\"NODE_ENV\"])===\"test\"&&typeof((S=Element==null?void 0:Element.prototype)==null?void 0:S.getAnimations)==\"undefined\"&&(Element.prototype.getAnimations=function(){return console.warn([\"Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.\",\"Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.\",\"\",\"Example usage:\",\"```js\",\"import { mockAnimationsApi } from 'jsdom-testing-mocks'\",\"mockAnimationsApi()\",\"```\"].join(`\n`)),[]});var A=(i=>(i[i.None=0]=\"None\",i[i.Closed=1]=\"Closed\",i[i.Enter=2]=\"Enter\",i[i.Leave=4]=\"Leave\",i))(A||{});function x(e){let r={};for(let t in e)e[t]===!0&&(r[`data-${t}`]=\"\");return r}function N(e,r,t,n){let[i,a]=b(t),{hasFlag:s,addFlag:o,removeFlag:l}=y(e&&i?3:0),u=c(!1),f=c(!1),E=g();return L(()=>{var d;if(e){if(t&&a(!0),!r){t&&o(3);return}return(d=n==null?void 0:n.start)==null||d.call(n,t),C(r,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(t?(o(3),l(4)):(o(4),l(2)))},run(){f.current?t?(l(3),o(4)):(l(4),o(3)):t?l(1):o(1)},done(){var p;f.current&&D(r)||(u.current=!1,l(7),t||a(!1),(p=n==null?void 0:n.end)==null||p.call(n,t))}})}},[e,t,r,E]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function C(e,{prepare:r,run:t,done:n,inFlight:i}){let a=m();return j(e,{prepare:r,inFlight:i}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(M(e,n))})}),a.dispose}function M(e,r){var a,s;let t=m();if(!e)return t.dispose;let n=!1;t.add(()=>{n=!0});let i=(s=(a=e.getAnimations)==null?void 0:a.call(e).filter(o=>o instanceof CSSTransition))!=null?s:[];return i.length===0?(r(),t.dispose):(Promise.allSettled(i.map(o=>o.finished)).then(()=>{n||r()}),t.dispose)}function j(e,{inFlight:r,prepare:t}){if(r!=null&&r.current){t();return}let n=e.style.transition;e.style.transition=\"none\",t(),e.offsetHeight,e.style.transition=n}function D(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(i=>i instanceof CSSTransition&&i.playState!==\"finished\")}export{x as transitionDataAttributes,N as useTransition};\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\n\nfunction activeElement(doc) {\n let activeElement = doc.activeElement;\n while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {\n var _activeElement;\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n const uaData = navigator.userAgentData;\n if (uaData != null && uaData.platform) {\n return uaData.platform;\n }\n return navigator.platform;\n}\nfunction getUserAgent() {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(_ref => {\n let {\n brand,\n version\n } = _ref;\n return brand + \"/\" + version;\n }).join(' ');\n }\n return navigator.userAgent;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid() && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n if (isJSDOM()) return false;\n return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nfunction isSafari() {\n // Chrome DevTools does not complain about navigator.vendor\n return /apple/i.test(navigator.vendor);\n}\nfunction isAndroid() {\n const re = /android/i;\n return re.test(getPlatform()) || re.test(getUserAgent());\n}\nfunction isMac() {\n return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isJSDOM() {\n return getUserAgent().includes('jsdom/');\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\nfunction isReactEvent(event) {\n return 'nativeEvent' in event;\n}\nfunction isRootElement(element) {\n return element.matches('html,body');\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const e = event;\n return e.target != null && node.contains(e.target);\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nfunction isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nfunction isTypeableCombobox(element) {\n if (!element) return false;\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\n\nexport { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isJSDOM, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","import * as React from 'react';\nimport { useLayoutEffect, useEffect, useRef } from 'react';\nimport { stopEvent, getDocument, isMouseLikePointerType, contains, activeElement, isSafari, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, getTarget, getPlatform, isTypeableElement, isReactEvent, isRootElement, isEventTargetWithin, isMac, getUserAgent } from '@floating-ui/react/utils';\nimport { floor, evaluate, max, min, round } from '@floating-ui/utils';\nimport { getComputedStyle, isElement, getNodeName, isHTMLElement, getWindow, isLastTraversableNode, getParentNode, isWebKit } from '@floating-ui/utils/dom';\nimport { tabbable, isTabbable } from 'tabbable';\nimport * as ReactDOM from 'react-dom';\nimport { getOverflowAncestors, useFloating as useFloating$1, offset, detectOverflow } from '@floating-ui/react-dom';\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/react-dom';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/react-utils#usemergerefs\n */\nfunction useMergeRefs(refs) {\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n ...React\n};\n\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect = useInsertionEffect || (fn => fn());\nfunction useEffectEvent(callback) {\n const ref = React.useRef(() => {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error('Cannot call an event handler while rendering.');\n }\n });\n useSafeInsertionEffect(() => {\n ref.current = callback;\n });\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return ref.current == null ? void 0 : ref.current(...args);\n }, []);\n}\n\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nfunction isDifferentRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nfunction isIndexOutOfBounds(listRef, index) {\n return index < 0 || index >= listRef.current.length;\n}\nfunction getMinIndex(listRef, disabledIndices) {\n return findNonDisabledIndex(listRef, {\n disabledIndices\n });\n}\nfunction getMaxIndex(listRef, disabledIndices) {\n return findNonDisabledIndex(listRef, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nfunction findNonDisabledIndex(listRef, _temp) {\n let {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n } = _temp === void 0 ? {} : _temp;\n const list = listRef.current;\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= list.length - 1 && isDisabled(list, index, disabledIndices));\n return index;\n}\nfunction getGridNavigatedIndex(elementsRef, _ref) {\n let {\n event,\n orientation,\n loop,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n } = _ref;\n let nextIndex = prevIndex;\n if (event.key === ARROW_UP) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: nextIndex,\n amount: cols,\n decrement: true,\n disabledIndices\n });\n if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {\n const col = prevIndex % cols;\n const maxCol = maxIndex % cols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - cols;\n }\n }\n }\n if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === ARROW_DOWN) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = minIndex;\n } else {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex,\n amount: cols,\n disabledIndices\n });\n if (loop && prevIndex + cols > maxIndex) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex % cols - cols,\n amount: cols,\n disabledIndices\n });\n }\n }\n if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n stop && stopEvent(event);\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loop && isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n if (isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n stop && stopEvent(event);\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loop && isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n if (isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n if (loop && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nfunction buildCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach((_ref2, index) => {\n let {\n width,\n height\n } = _ref2;\n if (width > cols) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\"[Floating UI]: Invalid grid - item width at index \" + index + \" is greater than grid columns\");\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i++) {\n for (let j = 0; j < height; j++) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex++;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nfunction getCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) return -1;\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nfunction getCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nfunction isDisabled(list, index, disabledIndices) {\n if (disabledIndices) {\n return disabledIndices.includes(index);\n }\n const element = list[index];\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\nfunction sortByDocumentPosition(a, b) {\n const position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n return 0;\n}\nfunction areMapsEqual(map1, map2) {\n if (map1.size !== map2.size) {\n return false;\n }\n for (const [key, value] of map1.entries()) {\n if (value !== map2.get(key)) {\n return false;\n }\n }\n return true;\n}\nconst FloatingListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n map: /*#__PURE__*/new Map(),\n elementsRef: {\n current: []\n }\n});\n/**\n * Provides context for a list of items within the floating element.\n * @see https://floating-ui.com/docs/FloatingList\n */\nfunction FloatingList(props) {\n const {\n children,\n elementsRef,\n labelsRef\n } = props;\n const [map, setMap] = React.useState(() => new Map());\n const register = React.useCallback(node => {\n setMap(prevMap => new Map(prevMap).set(node, null));\n }, []);\n const unregister = React.useCallback(node => {\n setMap(prevMap => {\n const map = new Map(prevMap);\n map.delete(node);\n return map;\n });\n }, []);\n index(() => {\n const newMap = new Map(map);\n const nodes = Array.from(newMap.keys()).sort(sortByDocumentPosition);\n nodes.forEach((node, index) => {\n newMap.set(node, index);\n });\n if (!areMapsEqual(map, newMap)) {\n setMap(newMap);\n }\n }, [map]);\n return /*#__PURE__*/React.createElement(FloatingListContext.Provider, {\n value: React.useMemo(() => ({\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n }), [register, unregister, map, elementsRef, labelsRef])\n }, children);\n}\n/**\n * Used to register a list item and its index (DOM position) in the\n * `FloatingList`.\n * @see https://floating-ui.com/docs/FloatingList#uselistitem\n */\nfunction useListItem(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n label\n } = props;\n const {\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n } = React.useContext(FloatingListContext);\n const [index$1, setIndex] = React.useState(null);\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index$1 !== null) {\n elementsRef.current[index$1] = node;\n if (labelsRef) {\n var _node$textContent;\n const isLabelDefined = label !== undefined;\n labelsRef.current[index$1] = isLabelDefined ? label : (_node$textContent = node == null ? void 0 : node.textContent) != null ? _node$textContent : null;\n }\n }\n }, [index$1, elementsRef, labelsRef, label]);\n index(() => {\n const node = componentRef.current;\n if (node) {\n register(node);\n return () => {\n unregister(node);\n };\n }\n }, [register, unregister]);\n index(() => {\n const index = componentRef.current ? map.get(componentRef.current) : null;\n if (index != null) {\n setIndex(index);\n }\n }, [map]);\n return React.useMemo(() => ({\n ref,\n index: index$1 == null ? -1 : index$1\n }), [index$1, ref]);\n}\n\nfunction renderJsx(render, computedProps) {\n if (typeof render === 'function') {\n return render(computedProps);\n }\n if (render) {\n return /*#__PURE__*/React.cloneElement(render, computedProps);\n }\n return /*#__PURE__*/React.createElement(\"div\", computedProps);\n}\nconst CompositeContext = /*#__PURE__*/React.createContext({\n activeIndex: 0,\n onNavigate: () => {}\n});\nconst horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];\nconst verticalKeys = [ARROW_UP, ARROW_DOWN];\nconst allKeys = [...horizontalKeys, ...verticalKeys];\n\n/**\n * Creates a single tab stop whose items are navigated by arrow keys, which\n * provides list navigation outside of floating element contexts.\n *\n * This is useful to enable navigation of a list of items that aren’t part of a\n * floating element. A menubar is an example of a composite, with each reference\n * element being an item.\n * @see https://floating-ui.com/docs/Composite\n */\nconst Composite = /*#__PURE__*/React.forwardRef(function Composite(props, forwardedRef) {\n const {\n render,\n orientation = 'both',\n loop = true,\n rtl = false,\n cols = 1,\n disabledIndices,\n activeIndex: externalActiveIndex,\n onNavigate: externalSetActiveIndex,\n itemSizes,\n dense = false,\n ...domProps\n } = props;\n const [internalActiveIndex, internalSetActiveIndex] = React.useState(0);\n const activeIndex = externalActiveIndex != null ? externalActiveIndex : internalActiveIndex;\n const onNavigate = useEffectEvent(externalSetActiveIndex != null ? externalSetActiveIndex : internalSetActiveIndex);\n const elementsRef = React.useRef([]);\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const contextValue = React.useMemo(() => ({\n activeIndex,\n onNavigate\n }), [activeIndex, onNavigate]);\n const isGrid = cols > 1;\n function handleKeyDown(event) {\n if (!allKeys.includes(event.key)) return;\n let nextIndex = activeIndex;\n const minIndex = getMinIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxIndex(elementsRef, disabledIndices);\n const horizontalEndKey = rtl ? ARROW_LEFT : ARROW_RIGHT;\n const horizontalStartKey = rtl ? ARROW_RIGHT : ARROW_LEFT;\n if (isGrid) {\n const sizes = itemSizes || Array.from({\n length: elementsRef.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(elementsRef.current, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isDisabled(elementsRef.current, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const maybeNextIndex = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex ? elementsRef.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 || elementsRef.current.map((_, index) => isDisabled(elementsRef.current, index) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getCellIndexOfCorner(activeIndex > maxIndex ? minIndex : activeIndex, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction we're\n // 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 === horizontalEndKey ? 'tr' : 'tl')\n })];\n if (maybeNextIndex != null) {\n nextIndex = maybeNextIndex;\n }\n }\n const toEndKeys = {\n horizontal: [horizontalEndKey],\n vertical: [ARROW_DOWN],\n both: [horizontalEndKey, ARROW_DOWN]\n }[orientation];\n const toStartKeys = {\n horizontal: [horizontalStartKey],\n vertical: [ARROW_UP],\n both: [horizontalStartKey, ARROW_UP]\n }[orientation];\n const preventedKeys = isGrid ? allKeys : {\n horizontal: horizontalKeys,\n vertical: verticalKeys,\n both: allKeys\n }[orientation];\n if (nextIndex === activeIndex && [...toEndKeys, ...toStartKeys].includes(event.key)) {\n if (loop && nextIndex === maxIndex && toEndKeys.includes(event.key)) {\n nextIndex = minIndex;\n } else if (loop && nextIndex === minIndex && toStartKeys.includes(event.key)) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: nextIndex,\n decrement: toStartKeys.includes(event.key),\n disabledIndices\n });\n }\n }\n if (nextIndex !== activeIndex && !isIndexOutOfBounds(elementsRef, nextIndex)) {\n var _elementsRef$current$;\n event.stopPropagation();\n if (preventedKeys.includes(event.key)) {\n event.preventDefault();\n }\n onNavigate(nextIndex);\n (_elementsRef$current$ = elementsRef.current[nextIndex]) == null || _elementsRef$current$.focus();\n }\n }\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: forwardedRef,\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n onKeyDown(e) {\n domProps.onKeyDown == null || domProps.onKeyDown(e);\n renderElementProps.onKeyDown == null || renderElementProps.onKeyDown(e);\n handleKeyDown(e);\n }\n };\n return /*#__PURE__*/React.createElement(CompositeContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(FloatingList, {\n elementsRef: elementsRef\n }, renderJsx(render, computedProps)));\n});\n/**\n * @see https://floating-ui.com/docs/Composite\n */\nconst CompositeItem = /*#__PURE__*/React.forwardRef(function CompositeItem(props, forwardedRef) {\n const {\n render,\n ...domProps\n } = props;\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const {\n activeIndex,\n onNavigate\n } = React.useContext(CompositeContext);\n const {\n ref,\n index\n } = useListItem();\n const mergedRef = useMergeRefs([ref, forwardedRef, renderElementProps.ref]);\n const isActive = activeIndex === index;\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: mergedRef,\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? '' : undefined,\n onFocus(e) {\n domProps.onFocus == null || domProps.onFocus(e);\n renderElementProps.onFocus == null || renderElementProps.onFocus(e);\n onNavigate(index);\n }\n };\n return renderJsx(render, computedProps);\n});\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nlet serverHandoffComplete = false;\nlet count = 0;\nconst genId = () => // Ensure the id is unique with multiple independent versions of Floating UI\n// on <React 18\n\"floating-ui-\" + Math.random().toString(36).slice(2, 6) + count++;\nfunction useFloatingId() {\n const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);\n index(() => {\n if (id == null) {\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n serverHandoffComplete = true;\n }, []);\n return id;\n}\nconst useReactId = SafeReact.useId;\n\n/**\n * Uses React 18's built-in `useId()` when available, or falls back to a\n * slightly less performant (requiring a double render) implementation for\n * earlier React versions.\n * @see https://floating-ui.com/docs/react-utils#useid\n */\nconst useId = useReactId || useFloatingId;\n\nlet devMessageSet;\nif (process.env.NODE_ENV !== \"production\") {\n devMessageSet = /*#__PURE__*/new Set();\n}\nfunction warn() {\n var _devMessageSet;\n for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {\n messages[_key] = arguments[_key];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(message))) {\n var _devMessageSet2;\n (_devMessageSet2 = devMessageSet) == null || _devMessageSet2.add(message);\n console.warn(message);\n }\n}\nfunction error() {\n var _devMessageSet3;\n for (var _len2 = arguments.length, messages = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n messages[_key2] = arguments[_key2];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet3 = devMessageSet) != null && _devMessageSet3.has(message))) {\n var _devMessageSet4;\n (_devMessageSet4 = devMessageSet) == null || _devMessageSet4.add(message);\n console.error(message);\n }\n}\n\n/**\n * Renders a pointing arrow triangle.\n * @see https://floating-ui.com/docs/FloatingArrow\n */\nconst FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(props, ref) {\n const {\n context: {\n placement,\n elements: {\n floating\n },\n middlewareData: {\n arrow,\n shift\n }\n },\n width = 14,\n height = 7,\n tipRadius = 0,\n strokeWidth = 0,\n staticOffset,\n stroke,\n d,\n style: {\n transform,\n ...restStyle\n } = {},\n ...rest\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (!ref) {\n warn('The `ref` prop is required for `FloatingArrow`.');\n }\n }\n const clipPathId = useId();\n const [isRTL, setIsRTL] = React.useState(false);\n\n // https://github.com/floating-ui/floating-ui/issues/2932\n index(() => {\n if (!floating) return;\n const isRTL = getComputedStyle(floating).direction === 'rtl';\n if (isRTL) {\n setIsRTL(true);\n }\n }, [floating]);\n if (!floating) {\n return null;\n }\n const [side, alignment] = placement.split('-');\n const isVerticalSide = side === 'top' || side === 'bottom';\n let computedStaticOffset = staticOffset;\n if (isVerticalSide && shift != null && shift.x || !isVerticalSide && shift != null && shift.y) {\n computedStaticOffset = null;\n }\n\n // Strokes must be double the border width, this ensures the stroke's width\n // works as you'd expect.\n const computedStrokeWidth = strokeWidth * 2;\n const halfStrokeWidth = computedStrokeWidth / 2;\n const svgX = width / 2 * (tipRadius / -8 + 1);\n const svgY = height / 2 * tipRadius / 4;\n const isCustomShape = !!d;\n const yOffsetProp = computedStaticOffset && alignment === 'end' ? 'bottom' : 'top';\n let xOffsetProp = computedStaticOffset && alignment === 'end' ? 'right' : 'left';\n if (computedStaticOffset && isRTL) {\n xOffsetProp = alignment === 'end' ? 'left' : 'right';\n }\n const arrowX = (arrow == null ? void 0 : arrow.x) != null ? computedStaticOffset || arrow.x : '';\n const arrowY = (arrow == null ? void 0 : arrow.y) != null ? computedStaticOffset || arrow.y : '';\n const dValue = d || 'M0,0' + (\" H\" + width) + (\" L\" + (width - svgX) + \",\" + (height - svgY)) + (\" Q\" + width / 2 + \",\" + height + \" \" + svgX + \",\" + (height - svgY)) + ' Z';\n const rotation = {\n top: isCustomShape ? 'rotate(180deg)' : '',\n left: isCustomShape ? 'rotate(90deg)' : 'rotate(-90deg)',\n bottom: isCustomShape ? '' : 'rotate(180deg)',\n right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)'\n }[side];\n return /*#__PURE__*/React.createElement(\"svg\", _extends({}, rest, {\n \"aria-hidden\": true,\n ref: ref,\n width: isCustomShape ? width : width + computedStrokeWidth,\n height: width,\n viewBox: \"0 0 \" + width + \" \" + (height > width ? height : width),\n style: {\n position: 'absolute',\n pointerEvents: 'none',\n [xOffsetProp]: arrowX,\n [yOffsetProp]: arrowY,\n [side]: isVerticalSide || isCustomShape ? '100%' : \"calc(100% - \" + computedStrokeWidth / 2 + \"px)\",\n transform: [rotation, transform].filter(t => !!t).join(' '),\n ...restStyle\n }\n }), computedStrokeWidth > 0 && /*#__PURE__*/React.createElement(\"path\", {\n clipPath: \"url(#\" + clipPathId + \")\",\n fill: \"none\",\n stroke: stroke\n // Account for the stroke on the fill path rendered below.\n ,\n strokeWidth: computedStrokeWidth + (d ? 0 : 1),\n d: dValue\n }), /*#__PURE__*/React.createElement(\"path\", {\n stroke: computedStrokeWidth && !d ? rest.fill : 'none',\n d: dValue\n }), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: clipPathId\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: -halfStrokeWidth,\n y: halfStrokeWidth * (isCustomShape ? -1 : 1),\n width: width + computedStrokeWidth,\n height: width\n })));\n});\n\nfunction createPubSub() {\n const map = new Map();\n return {\n emit(event, data) {\n var _map$get;\n (_map$get = map.get(event)) == null || _map$get.forEach(handler => handler(data));\n },\n on(event, listener) {\n map.set(event, [...(map.get(event) || []), listener]);\n },\n off(event, listener) {\n var _map$get2;\n map.set(event, ((_map$get2 = map.get(event)) == null ? void 0 : _map$get2.filter(l => l !== listener)) || []);\n }\n };\n}\n\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nconst useFloatingParentNodeId = () => {\n var _React$useContext;\n return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;\n};\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nconst useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction useFloatingNodeId(customParentId) {\n const id = useId();\n const tree = useFloatingTree();\n const reactParentId = useFloatingParentNodeId();\n const parentId = customParentId || reactParentId;\n index(() => {\n const node = {\n id,\n parentId\n };\n tree == null || tree.addNode(node);\n return () => {\n tree == null || tree.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/React.createElement(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId])\n }, children);\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingTree(props) {\n const {\n children\n } = props;\n const nodesRef = React.useRef([]);\n const addNode = React.useCallback(node => {\n nodesRef.current = [...nodesRef.current, node];\n }, []);\n const removeNode = React.useCallback(node => {\n nodesRef.current = nodesRef.current.filter(n => n !== node);\n }, []);\n const events = React.useState(() => createPubSub())[0];\n return /*#__PURE__*/React.createElement(FloatingTreeContext.Provider, {\n value: React.useMemo(() => ({\n nodesRef,\n addNode,\n removeNode,\n events\n }), [addNode, removeNode, events])\n }, children);\n}\n\nfunction createAttribute(name) {\n return \"data-floating-ui-\" + name;\n}\n\nfunction useLatestRef(value) {\n const ref = useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\nconst safePolygonIdentifier = /*#__PURE__*/createAttribute('safe-polygon');\nfunction getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n return value == null ? void 0 : value[prop];\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nfunction useHover(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n events,\n elements\n } = context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true\n } = props;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const handleCloseRef = useLatestRef(handleClose);\n const delayRef = useLatestRef(delay);\n const openRef = useLatestRef(open);\n const pointerTypeRef = React.useRef();\n const timeoutRef = React.useRef(-1);\n const handlerRef = React.useRef();\n const restTimeoutRef = React.useRef(-1);\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const restTimeoutPendingRef = React.useRef(false);\n const isHoverOpen = React.useCallback(() => {\n var _dataRef$current$open;\n const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;\n return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';\n }, [dataRef]);\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) return;\n function onOpenChange(_ref) {\n let {\n open\n } = _ref;\n if (!open) {\n clearTimeout(timeoutRef.current);\n clearTimeout(restTimeoutRef.current);\n blockMouseMoveRef.current = true;\n restTimeoutPendingRef.current = false;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [enabled, events]);\n React.useEffect(() => {\n if (!enabled) return;\n if (!handleCloseRef.current) return;\n if (!open) return;\n function onLeave(event) {\n if (isHoverOpen()) {\n onOpenChange(false, event, 'hover');\n }\n }\n const html = getDocument(elements.floating).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [elements.floating, open, onOpenChange, enabled, handleCloseRef, isHoverOpen]);\n const closeWithDelay = React.useCallback(function (event, runElseBranch, reason) {\n if (runElseBranch === void 0) {\n runElseBranch = true;\n }\n if (reason === void 0) {\n reason = 'hover';\n }\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(() => onOpenChange(false, event, reason), closeDelay);\n } else if (runElseBranch) {\n clearTimeout(timeoutRef.current);\n onOpenChange(false, event, reason);\n }\n }, [delayRef, onOpenChange]);\n const cleanupMouseMoveHandler = useEffectEvent(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n });\n const clearPointerEvents = useEffectEvent(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument(elements.floating).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n const isClickLikeOpenEvent = useEffectEvent(() => {\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n });\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) return;\n function onMouseEnter(event) {\n clearTimeout(timeoutRef.current);\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || restMs > 0 && !getDelay(delayRef.current, 'open')) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n if (openDelay) {\n timeoutRef.current = window.setTimeout(() => {\n if (!openRef.current) {\n onOpenChange(true, event, 'hover');\n }\n }, openDelay);\n } else if (!open) {\n onOpenChange(true, event, 'hover');\n }\n }\n function onMouseLeave(event) {\n if (isClickLikeOpenEvent()) return;\n unbindMouseMoveRef.current();\n const doc = getDocument(elements.floating);\n clearTimeout(restTimeoutRef.current);\n restTimeoutPendingRef.current = false;\n if (handleCloseRef.current && dataRef.current.floatingContext) {\n // Prevent clearing `onScrollMouseLeave` timeout.\n if (!open) {\n clearTimeout(timeoutRef.current);\n }\n handlerRef.current = handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, true, 'safe-polygon');\n }\n }\n });\n const handler = handlerRef.current;\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n\n // Allow interactivity without `safePolygon` on touch devices. With a\n // pointer, a short close delay is an alternative, so it should work\n // consistently.\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains(elements.floating, event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) return;\n if (!dataRef.current.floatingContext) return;\n handleCloseRef.current == null || handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n })(event);\n }\n if (isElement(elements.domReference)) {\n var _elements$floating;\n const ref = elements.domReference;\n open && ref.addEventListener('mouseleave', onScrollMouseLeave);\n (_elements$floating = elements.floating) == null || _elements$floating.addEventListener('mouseleave', onScrollMouseLeave);\n move && ref.addEventListener('mousemove', onMouseEnter, {\n once: true\n });\n ref.addEventListener('mouseenter', onMouseEnter);\n ref.addEventListener('mouseleave', onMouseLeave);\n return () => {\n var _elements$floating2;\n open && ref.removeEventListener('mouseleave', onScrollMouseLeave);\n (_elements$floating2 = elements.floating) == null || _elements$floating2.removeEventListener('mouseleave', onScrollMouseLeave);\n move && ref.removeEventListener('mousemove', onMouseEnter);\n ref.removeEventListener('mouseenter', onMouseEnter);\n ref.removeEventListener('mouseleave', onMouseLeave);\n };\n }\n }, [elements, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent]);\n\n // Block pointer-events of every element other than the reference and floating\n // while the floating element is open and has a `handleClose` handler. Also\n // handles nested floating elements.\n // https://github.com/floating-ui/floating-ui/issues/1722\n index(() => {\n var _handleCloseRef$curre;\n if (!enabled) return;\n if (open && (_handleCloseRef$curre = handleCloseRef.current) != null && _handleCloseRef$curre.__options.blockPointerEvents && isHoverOpen()) {\n performedPointerEventsMutationRef.current = true;\n const floatingEl = elements.floating;\n if (isElement(elements.domReference) && floatingEl) {\n var _tree$nodesRef$curren;\n const body = getDocument(elements.floating).body;\n body.setAttribute(safePolygonIdentifier, '');\n const ref = elements.domReference;\n const parentFloating = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n body.style.pointerEvents = 'none';\n ref.style.pointerEvents = 'auto';\n floatingEl.style.pointerEvents = 'auto';\n return () => {\n body.style.pointerEvents = '';\n ref.style.pointerEvents = '';\n floatingEl.style.pointerEvents = '';\n };\n }\n }\n }, [enabled, open, parentId, elements, tree, handleCloseRef, isHoverOpen]);\n index(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n restTimeoutPendingRef.current = false;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n clearTimeout(timeoutRef.current);\n clearTimeout(restTimeoutRef.current);\n clearPointerEvents();\n };\n }, [enabled, elements.domReference, cleanupMouseMoveHandler, clearPointerEvents]);\n const reference = React.useMemo(() => {\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n function handleMouseMove() {\n if (!blockMouseMoveRef.current && !openRef.current) {\n onOpenChange(true, nativeEvent, 'hover');\n }\n }\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (open || restMs === 0) {\n return;\n }\n\n // Ignore insignificant movements to account for tremors.\n if (restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n clearTimeout(restTimeoutRef.current);\n if (pointerTypeRef.current === 'touch') {\n handleMouseMove();\n } else {\n restTimeoutPendingRef.current = true;\n restTimeoutRef.current = window.setTimeout(handleMouseMove, restMs);\n }\n }\n };\n }, [mouseOnly, onOpenChange, open, openRef, restMs]);\n const floating = React.useMemo(() => ({\n onMouseEnter() {\n clearTimeout(timeoutRef.current);\n },\n onMouseLeave(event) {\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event.nativeEvent, false);\n }\n }\n }), [closeWithDelay, isClickLikeOpenEvent]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nconst NOOP = () => {};\nconst FloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n delay: 0,\n initialDelay: 0,\n timeoutMs: 0,\n currentId: null,\n setCurrentId: NOOP,\n setState: NOOP,\n isInstantPhase: false\n});\n\n/**\n * @deprecated\n * Use the return value of `useDelayGroup()` instead.\n */\nconst useDelayGroupContext = () => React.useContext(FloatingDelayGroupContext);\n/**\n * Provides context for a group of floating elements that should share a\n * `delay`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction FloatingDelayGroup(props) {\n const {\n children,\n delay,\n timeoutMs = 0\n } = props;\n const [state, setState] = React.useReducer((prev, next) => ({\n ...prev,\n ...next\n }), {\n delay,\n timeoutMs,\n initialDelay: delay,\n currentId: null,\n isInstantPhase: false\n });\n const initialCurrentIdRef = React.useRef(null);\n const setCurrentId = React.useCallback(currentId => {\n setState({\n currentId\n });\n }, []);\n index(() => {\n if (state.currentId) {\n if (initialCurrentIdRef.current === null) {\n initialCurrentIdRef.current = state.currentId;\n } else if (!state.isInstantPhase) {\n setState({\n isInstantPhase: true\n });\n }\n } else {\n if (state.isInstantPhase) {\n setState({\n isInstantPhase: false\n });\n }\n initialCurrentIdRef.current = null;\n }\n }, [state.currentId, state.isInstantPhase]);\n return /*#__PURE__*/React.createElement(FloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n ...state,\n setState,\n setCurrentId\n }), [state, setCurrentId])\n }, children);\n}\n/**\n * Enables grouping when called inside a component that's a child of a\n * `FloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useDelayGroup(context, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n open,\n onOpenChange,\n floatingId\n } = context;\n const {\n id: optionId,\n enabled = true\n } = options;\n const id = optionId != null ? optionId : floatingId;\n const groupContext = useDelayGroupContext();\n const {\n currentId,\n setCurrentId,\n initialDelay,\n setState,\n timeoutMs\n } = groupContext;\n index(() => {\n if (!enabled) return;\n if (!currentId) return;\n setState({\n delay: {\n open: 1,\n close: getDelay(initialDelay, 'close')\n }\n });\n if (currentId !== id) {\n onOpenChange(false);\n }\n }, [enabled, id, onOpenChange, setState, currentId, initialDelay]);\n index(() => {\n function unset() {\n onOpenChange(false);\n setState({\n delay: initialDelay,\n currentId: null\n });\n }\n if (!enabled) return;\n if (!currentId) return;\n if (!open && currentId === id) {\n if (timeoutMs) {\n const timeout = window.setTimeout(unset, timeoutMs);\n return () => {\n clearTimeout(timeout);\n };\n }\n unset();\n }\n }, [enabled, open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]);\n index(() => {\n if (!enabled) return;\n if (setCurrentId === NOOP || !open) return;\n setCurrentId(id);\n }, [enabled, open, setCurrentId, id]);\n return groupContext;\n}\n\nlet rafId = 0;\nfunction enqueueFocus(el, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n cancelPrevious && cancelAnimationFrame(rafId);\n const exec = () => el == null ? void 0 : el.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}\n\nfunction getAncestors(nodes, id) {\n var _nodes$find;\n let allAncestors = [];\n let currentParentId = (_nodes$find = nodes.find(node => node.id === id)) == null ? void 0 : _nodes$find.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode == null ? void 0 : currentNode.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}\n\nfunction getChildren(nodes, id) {\n let allChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && ((_node$context = node.context) == null ? void 0 : _node$context.open);\n });\n let currentChildren = allChildren;\n while (currentChildren.length) {\n currentChildren = nodes.filter(node => {\n var _currentChildren;\n return (_currentChildren = currentChildren) == null ? void 0 : _currentChildren.some(n => {\n var _node$context2;\n return node.parentId === n.id && ((_node$context2 = node.context) == null ? void 0 : _node$context2.open);\n });\n });\n allChildren = allChildren.concat(currentChildren);\n }\n return allChildren;\n}\nfunction getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\n\n// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nlet counterMap = /*#__PURE__*/new WeakMap();\nlet uncontrolledElementsSet = /*#__PURE__*/new WeakSet();\nlet markerMap = {};\nlet lockCount$1 = 0;\nconst supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nconst unwrapHost = node => node && (node.host || unwrapHost(node.parentNode));\nconst correctElements = (parent, targets) => targets.map(target => {\n if (parent.contains(target)) {\n return target;\n }\n const correctedTarget = unwrapHost(target);\n if (parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n const markerName = 'data-floating-ui-inert';\n const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n const avoidElements = correctElements(body, uncorrectedAvoidElements);\n const elementsToKeep = new Set();\n const elementsToStop = new Set(avoidElements);\n const hiddenElements = [];\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n const markerCounter = markerMap[markerName];\n avoidElements.forEach(keep);\n deep(body);\n elementsToKeep.clear();\n function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n el.parentNode && keep(el.parentNode);\n }\n function deep(parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n [].forEach.call(parent.children, node => {\n if (getNodeName(node) === 'script') return;\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenElements.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledElementsSet.add(node);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, '');\n }\n if (!alreadyHidden && controlAttribute) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n });\n }\n lockCount$1++;\n return () => {\n hiddenElements.forEach(element => {\n const counterValue = (counterMap.get(element) || 0) - 1;\n const markerValue = (markerCounter.get(element) || 0) - 1;\n counterMap.set(element, counterValue);\n markerCounter.set(element, markerValue);\n if (!counterValue) {\n if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n element.removeAttribute(controlAttribute);\n }\n uncontrolledElementsSet.delete(element);\n }\n if (!markerValue) {\n element.removeAttribute(markerName);\n }\n });\n lockCount$1--;\n if (!lockCount$1) {\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledElementsSet = new WeakSet();\n markerMap = {};\n }\n };\n}\nfunction markOthers(avoidElements, ariaHidden, inert) {\n if (ariaHidden === void 0) {\n ariaHidden = false;\n }\n if (inert === void 0) {\n inert = false;\n }\n const body = getDocument(avoidElements[0]).body;\n return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live]'))), body, ariaHidden, inert);\n}\n\nconst getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, direction) {\n const allTabbable = tabbable(container, getTabbableOptions());\n if (direction === 'prev') {\n allTabbable.reverse();\n }\n const activeIndex = allTabbable.indexOf(activeElement(getDocument(container)));\n const nextTabbableElements = allTabbable.slice(activeIndex + 1);\n return nextTabbableElements[0];\n}\nfunction getNextTabbable() {\n return getTabbableIn(document.body, 'next');\n}\nfunction getPreviousTabbable() {\n return getTabbableIn(document.body, 'prev');\n}\nfunction isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nfunction enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}\n\n// See Diego Haz's Sandbox for making this logic work well on Safari/iOS:\n// https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/FocusTrap.tsx\n\nconst HIDDEN_STYLES = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'fixed',\n whiteSpace: 'nowrap',\n width: '1px',\n top: 0,\n left: 0\n};\nlet timeoutId;\nfunction setActiveElementOnTab(event) {\n if (event.key === 'Tab') {\n event.target;\n clearTimeout(timeoutId);\n }\n}\nconst FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n index(() => {\n if (isSafari()) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n // NB: \"group\" role in the Sandbox no longer appears to work, must be a\n // button role.\n setRole('button');\n }\n document.addEventListener('keydown', setActiveElementOnTab);\n return () => {\n document.removeEventListener('keydown', setActiveElementOnTab);\n };\n }, []);\n const restProps = {\n ref,\n tabIndex: 0,\n // Role is only for VoiceOver\n role,\n 'aria-hidden': role ? undefined : true,\n [createAttribute('focus-guard')]: '',\n style: HIDDEN_STYLES\n };\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, props, restProps));\n});\n\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nconst attr = /*#__PURE__*/createAttribute('portal');\n/**\n * @see https://floating-ui.com/docs/FloatingPortal#usefloatingportalnode\n */\nfunction useFloatingPortalNode(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n id,\n root\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const [portalNode, setPortalNode] = React.useState(null);\n const portalNodeRef = React.useRef(null);\n index(() => {\n return () => {\n portalNode == null || portalNode.remove();\n // Allow the subsequent layout effects to create a new node on updates.\n // The portal node will still be cleaned up on unmount.\n // https://github.com/floating-ui/floating-ui/issues/2454\n queueMicrotask(() => {\n portalNodeRef.current = null;\n });\n };\n }, [portalNode]);\n index(() => {\n // Wait for the uniqueId to be generated before creating the portal node in\n // React <18 (using `useFloatingId` instead of the native `useId`).\n // https://github.com/floating-ui/floating-ui/issues/2778\n if (!uniqueId) return;\n if (portalNodeRef.current) return;\n const existingIdRoot = id ? document.getElementById(id) : null;\n if (!existingIdRoot) return;\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n existingIdRoot.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, uniqueId]);\n index(() => {\n // Wait for the root to exist before creating the portal node. The root must\n // be stored in state, not a ref, for this to work reactively.\n if (root === null) return;\n if (!uniqueId) return;\n if (portalNodeRef.current) return;\n let container = root || (portalContext == null ? void 0 : portalContext.portalNode);\n if (container && !isElement(container)) container = container.current;\n container = container || document.body;\n let idWrapper = null;\n if (id) {\n idWrapper = document.createElement('div');\n idWrapper.id = id;\n container.appendChild(idWrapper);\n }\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n container = idWrapper || container;\n container.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, root, uniqueId, portalContext]);\n return portalNode;\n}\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nfunction FloatingPortal(props) {\n const {\n children,\n id,\n root,\n preserveTabOrder = true\n } = props;\n const portalNode = useFloatingPortalNode({\n id,\n root\n });\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const modal = focusManagerState == null ? void 0 : focusManagerState.modal;\n const open = focusManagerState == null ? void 0 : focusManagerState.open;\n const shouldRenderGuards =\n // The FocusManager and therefore floating element are currently open/\n // rendered.\n !!focusManagerState &&\n // Guards are only for non-modal focus management.\n !focusManagerState.modal &&\n // Don't render if unmount is transitioning.\n focusManagerState.open && preserveTabOrder && !!(root || portalNode);\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || !preserveTabOrder || modal) {\n return;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, preserveTabOrder, modal]);\n React.useEffect(() => {\n if (!portalNode) return;\n if (open) return;\n enableFocusInside(portalNode);\n }, [open, portalNode]);\n return /*#__PURE__*/React.createElement(PortalContext.Provider, {\n value: React.useMemo(() => ({\n preserveTabOrder,\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [preserveTabOrder, portalNode])\n }, shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _beforeInsideRef$curr;\n (_beforeInsideRef$curr = beforeInsideRef.current) == null || _beforeInsideRef$curr.focus();\n } else {\n const prevTabbable = getPreviousTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n prevTabbable == null || prevTabbable.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(\"span\", {\n \"aria-owns\": portalNode.id,\n style: HIDDEN_STYLES\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _afterInsideRef$curre;\n (_afterInsideRef$curre = afterInsideRef.current) == null || _afterInsideRef$curre.focus();\n } else {\n const nextTabbable = getNextTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n nextTabbable == null || nextTabbable.focus();\n (focusManagerState == null ? void 0 : focusManagerState.closeOnFocusOut) && (focusManagerState == null ? void 0 : focusManagerState.onOpenChange(false, event.nativeEvent, 'focus-out'));\n }\n }\n }));\n}\nconst usePortalContext = () => React.useContext(PortalContext);\n\nconst FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';\nfunction getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(\"[\" + FOCUSABLE_ATTRIBUTE + \"]\") || floatingElement;\n}\n\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction addPreviouslyFocusedElement(element) {\n previouslyFocusedElements = previouslyFocusedElements.filter(el => el.isConnected);\n let tabbableEl = element;\n if (!tabbableEl || getNodeName(tabbableEl) === 'body') return;\n if (!isTabbable(tabbableEl, getTabbableOptions())) {\n const tabbableChild = tabbable(tabbableEl, getTabbableOptions())[0];\n if (tabbableChild) {\n tabbableEl = tabbableChild;\n }\n }\n previouslyFocusedElements.push(tabbableEl);\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n}\nfunction getPreviouslyFocusedElement() {\n return previouslyFocusedElements.slice().reverse().find(el => el.isConnected);\n}\nconst VisuallyHiddenDismiss = /*#__PURE__*/React.forwardRef(function VisuallyHiddenDismiss(props, ref) {\n return /*#__PURE__*/React.createElement(\"button\", _extends({}, props, {\n type: \"button\",\n ref: ref,\n tabIndex: -1,\n style: HIDDEN_STYLES\n }));\n});\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n */\nfunction FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n order = ['content'],\n guards: _guards = true,\n initialFocus = 0,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n visuallyHiddenDismiss = false,\n closeOnFocusOut = true\n } = props;\n const {\n open,\n refs,\n nodeId,\n onOpenChange,\n events,\n dataRef,\n floatingId,\n elements: {\n domReference,\n floating\n }\n } = context;\n const ignoreInitialFocus = typeof initialFocus === 'number' && initialFocus < 0;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n\n // Force the guards to be rendered if the `inert` attribute is not supported.\n const guards = supportsInert() ? _guards : true;\n const orderRef = useLatestRef(order);\n const initialFocusRef = useLatestRef(initialFocus);\n const returnFocusRef = useLatestRef(returnFocus);\n const tree = useFloatingTree();\n const portalContext = usePortalContext();\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const tabbableIndexRef = React.useRef(-1);\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useEffectEvent(function (container) {\n if (container === void 0) {\n container = floatingFocusElement;\n }\n return container ? tabbable(container, getTabbableOptions()) : [];\n });\n const getTabbableElements = useEffectEvent(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(type => {\n if (domReference && type === 'reference') {\n return domReference;\n }\n if (floatingFocusElement && type === 'floating') {\n return floatingFocusElement;\n }\n return content;\n }).filter(Boolean).flat();\n });\n React.useEffect(() => {\n if (disabled) return;\n if (!modal) return;\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(getDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n const els = getTabbableElements();\n const target = getTarget(event);\n if (orderRef.current[0] === 'reference' && target === domReference) {\n stopEvent(event);\n if (event.shiftKey) {\n enqueueFocus(els[els.length - 1]);\n } else {\n enqueueFocus(els[1]);\n }\n }\n if (orderRef.current[1] === 'floating' && target === floatingFocusElement && event.shiftKey) {\n stopEvent(event);\n enqueueFocus(els[0]);\n }\n }\n }\n const doc = getDocument(floatingFocusElement);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (disabled) return;\n if (!floating) return;\n function handleFocusIn(event) {\n const target = getTarget(event);\n const tabbableContent = getTabbableContent();\n const tabbableIndex = tabbableContent.indexOf(target);\n if (tabbableIndex !== -1) {\n tabbableIndexRef.current = tabbableIndex;\n }\n }\n floating.addEventListener('focusin', handleFocusIn);\n return () => {\n floating.removeEventListener('focusin', handleFocusIn);\n };\n }, [disabled, floating, getTabbableContent]);\n React.useEffect(() => {\n if (disabled) return;\n if (!closeOnFocusOut) return;\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n setTimeout(() => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n queueMicrotask(() => {\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext == null ? void 0 : portalContext.portalNode, relatedTarget) || relatedTarget != null && relatedTarget.hasAttribute(createAttribute('focus-guard')) || tree && (getChildren(tree.nodesRef.current, nodeId).find(node => {\n var _node$context, _node$context2;\n return contains((_node$context = node.context) == null ? void 0 : _node$context.elements.floating, relatedTarget) || contains((_node$context2 = node.context) == null ? void 0 : _node$context2.elements.domReference, relatedTarget);\n }) || getAncestors(tree.nodesRef.current, nodeId).find(node => {\n var _node$context3, _node$context4;\n return ((_node$context3 = node.context) == null ? void 0 : _node$context3.elements.floating) === relatedTarget || ((_node$context4 = node.context) == null ? void 0 : _node$context4.elements.domReference) === relatedTarget;\n })));\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && movedToUnrelatedNode && activeElement(getDocument(floatingFocusElement)) === getDocument(floatingFocusElement).body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n }\n const prevTabbableIndex = tabbableIndexRef.current;\n const tabbableContent = getTabbableContent();\n const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current &&\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n relatedTarget !== getPreviouslyFocusedElement()) {\n preventReturnFocusRef.current = true;\n onOpenChange(false, event, 'focus-out');\n }\n });\n }\n if (floating && isHTMLElement(domReference)) {\n domReference.addEventListener('focusout', handleFocusOutside);\n domReference.addEventListener('pointerdown', handlePointerDown);\n floating.addEventListener('focusout', handleFocusOutside);\n return () => {\n domReference.removeEventListener('focusout', handleFocusOutside);\n domReference.removeEventListener('pointerdown', handlePointerDown);\n floating.removeEventListener('focusout', handleFocusOutside);\n };\n }\n }, [disabled, domReference, floating, floatingFocusElement, modal, nodeId, tree, portalContext, onOpenChange, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox]);\n React.useEffect(() => {\n var _portalContext$portal;\n if (disabled) return;\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from((portalContext == null || (_portalContext$portal = portalContext.portalNode) == null ? void 0 : _portalContext$portal.querySelectorAll(\"[\" + createAttribute('portal') + \"]\")) || []);\n if (floating) {\n const insideElements = [floating, ...portalNodes, startDismissButtonRef.current, endDismissButtonRef.current, orderRef.current.includes('reference') || isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const cleanup = modal || isUntrappedTypeableCombobox ? markOthers(insideElements, guards, !guards) : markOthers(insideElements);\n return () => {\n cleanup();\n };\n }\n }, [disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, guards]);\n index(() => {\n if (disabled || !isHTMLElement(floatingFocusElement)) return;\n const doc = getDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const focusableElements = getTabbableElements(floatingFocusElement);\n const initialFocusValue = initialFocusRef.current;\n const elToFocus = (typeof initialFocusValue === 'number' ? focusableElements[initialFocusValue] : initialFocusValue.current) || floatingFocusElement;\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (!ignoreInitialFocus && !focusAlreadyInsideFloatingEl && open) {\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement\n });\n }\n });\n }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef]);\n index(() => {\n if (disabled || !floatingFocusElement) return;\n let preventReturnFocusScroll = false;\n const doc = getDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n const contextData = dataRef.current;\n let openEvent = contextData.openEvent;\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChange(_ref) {\n let {\n open,\n reason,\n event,\n nested\n } = _ref;\n if (open) {\n openEvent = event;\n }\n if (reason === 'escape-key' && refs.domReference.current) {\n addPreviouslyFocusedElement(refs.domReference.current);\n }\n if (reason === 'hover' && event.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (reason !== 'outside-press') return;\n if (nested) {\n preventReturnFocusRef.current = false;\n preventReturnFocusScroll = true;\n } else {\n preventReturnFocusRef.current = !(isVirtualClick(event) || isVirtualPointerEvent(event));\n }\n }\n events.on('openchange', onOpenChange);\n const fallbackEl = doc.createElement('span');\n fallbackEl.setAttribute('tabindex', '-1');\n fallbackEl.setAttribute('aria-hidden', 'true');\n Object.assign(fallbackEl.style, HIDDEN_STYLES);\n if (isInsidePortal && domReference) {\n domReference.insertAdjacentElement('afterend', fallbackEl);\n }\n function getReturnElement() {\n if (typeof returnFocusRef.current === 'boolean') {\n return getPreviouslyFocusedElement() || fallbackEl;\n }\n return returnFocusRef.current.current || fallbackEl;\n }\n return () => {\n events.off('openchange', onOpenChange);\n const activeEl = activeElement(doc);\n const isFocusInsideFloatingTree = contains(floating, activeEl) || tree && getChildren(tree.nodesRef.current, nodeId).some(node => {\n var _node$context5;\n return contains((_node$context5 = node.context) == null ? void 0 : _node$context5.elements.floating, activeEl);\n });\n const shouldFocusReference = isFocusInsideFloatingTree || openEvent && ['click', 'mousedown'].includes(openEvent.type);\n if (shouldFocusReference && refs.domReference.current) {\n addPreviouslyFocusedElement(refs.domReference.current);\n }\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n if (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(returnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n returnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n returnElement.focus({\n preventScroll: preventReturnFocusScroll\n });\n }\n fallbackEl.remove();\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, refs, events, tree, nodeId, isInsidePortal, domReference]);\n React.useEffect(() => {\n // The `returnFocus` cleanup behavior is inside a microtask; ensure we\n // wait for it to complete before resetting the flag.\n queueMicrotask(() => {\n preventReturnFocusRef.current = false;\n });\n }, [disabled]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n index(() => {\n if (disabled) return;\n if (!portalContext) return;\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange,\n refs\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, onOpenChange, refs, closeOnFocusOut]);\n index(() => {\n if (disabled) return;\n if (!floatingFocusElement) return;\n if (typeof MutationObserver !== 'function') return;\n if (ignoreInitialFocus) return;\n const handleMutation = () => {\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n const tabbableContent = getTabbableContent();\n const activeEl = activeElement(getDocument(floating));\n const tabbableIndex = tabbableContent.indexOf(activeEl);\n if (tabbableIndex !== -1) {\n tabbableIndexRef.current = tabbableIndex;\n }\n if (orderRef.current.includes('floating') || activeEl !== refs.domReference.current && tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n }\n };\n handleMutation();\n const observer = new MutationObserver(handleMutation);\n observer.observe(floatingFocusElement, {\n childList: true,\n subtree: true,\n attributes: true\n });\n return () => {\n observer.disconnect();\n };\n }, [disabled, floating, floatingFocusElement, refs, orderRef, getTabbableContent, ignoreInitialFocus]);\n function renderDismissButton(location) {\n if (disabled || !visuallyHiddenDismiss || !modal) {\n return null;\n }\n return /*#__PURE__*/React.createElement(VisuallyHiddenDismiss, {\n ref: location === 'start' ? startDismissButtonRef : endDismissButtonRef,\n onClick: event => onOpenChange(false, event.nativeEvent)\n }, typeof visuallyHiddenDismiss === 'string' ? visuallyHiddenDismiss : 'Dismiss');\n }\n const shouldRenderGuards = !disabled && guards && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderGuards && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"inside\",\n ref: portalContext == null ? void 0 : portalContext.beforeInsideRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableElements();\n enqueueFocus(order[0] === 'reference' ? els[0] : els[els.length - 1]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable() || domReference;\n nextTabbable == null || nextTabbable.focus();\n } else {\n var _portalContext$before;\n (_portalContext$before = portalContext.beforeOutsideRef.current) == null || _portalContext$before.focus();\n }\n }\n }\n }), !isUntrappedTypeableCombobox && renderDismissButton('start'), children, renderDismissButton('end'), shouldRenderGuards && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"inside\",\n ref: portalContext == null ? void 0 : portalContext.afterInsideRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableElements()[0]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable() || domReference;\n prevTabbable == null || prevTabbable.focus();\n } else {\n var _portalContext$afterO;\n (_portalContext$afterO = portalContext.afterOutsideRef.current) == null || _portalContext$afterO.focus();\n }\n }\n }\n }));\n}\n\nlet lockCount = 0;\nfunction enableScrollLock() {\n const isIOS = /iP(hone|ad|od)|iOS/.test(getPlatform());\n const bodyStyle = document.body.style;\n // RTL <body> scrollbar\n const scrollbarX = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft;\n const paddingProp = scrollbarX ? 'paddingLeft' : 'paddingRight';\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const scrollX = bodyStyle.left ? parseFloat(bodyStyle.left) : window.scrollX;\n const scrollY = bodyStyle.top ? parseFloat(bodyStyle.top) : window.scrollY;\n bodyStyle.overflow = 'hidden';\n if (scrollbarWidth) {\n bodyStyle[paddingProp] = scrollbarWidth + \"px\";\n }\n\n // Only iOS doesn't respect `overflow: hidden` on document.body, and this\n // technique has fewer side effects.\n if (isIOS) {\n var _window$visualViewpor, _window$visualViewpor2;\n // iOS 12 does not support `visualViewport`.\n const offsetLeft = ((_window$visualViewpor = window.visualViewport) == null ? void 0 : _window$visualViewpor.offsetLeft) || 0;\n const offsetTop = ((_window$visualViewpor2 = window.visualViewport) == null ? void 0 : _window$visualViewpor2.offsetTop) || 0;\n Object.assign(bodyStyle, {\n position: 'fixed',\n top: -(scrollY - Math.floor(offsetTop)) + \"px\",\n left: -(scrollX - Math.floor(offsetLeft)) + \"px\",\n right: '0'\n });\n }\n return () => {\n Object.assign(bodyStyle, {\n overflow: '',\n [paddingProp]: ''\n });\n if (isIOS) {\n Object.assign(bodyStyle, {\n position: '',\n top: '',\n left: '',\n right: ''\n });\n window.scrollTo(scrollX, scrollY);\n }\n };\n}\nlet cleanup = () => {};\n\n/**\n * Provides base styling for a fixed overlay element to dim content or block\n * pointer events behind a floating element.\n * It's a regular `<div>`, 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__*/React.createElement(\"div\", _extends({\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 // In Firefox, `target.scrollWidth > target.clientWidth` for inline\n // elements.\n const canScrollX = target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n let xCond = canScrollY && event.offsetX > target.clientWidth;\n\n // In some browsers it is possible to change the <body> (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 if (canScrollY) {\n const isRTL = getComputedStyle(target).direction === 'rtl';\n if (isRTL) {\n xCond = event.offsetX <= target.offsetWidth - target.clientWidth;\n }\n }\n if (xCond || canScrollX && event.offsetY > target.clientHeight) {\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 [bubbleHandlerKeys[referencePressEvent]]: event => {\n if (referencePress) {\n onOpenChange(false, event.nativeEvent, 'reference-press');\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\nlet isPreventScrollSupported = false;\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) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\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 const onNavigate = useEffectEvent(unstable_onNavigate);\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 forceSyncFocus = 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(function (listRef, indexRef, forceScrollIntoView) {\n if (forceScrollIntoView === void 0) {\n forceScrollIntoView = false;\n }\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 preventScroll: true,\n // Mac Safari does not move the virtual cursor unless the focus call\n // is sync. However, for the very first focus call, we need to wait\n // for the position to be ready in order to prevent unwanted\n // scrolling. This means the virtual cursor will not move to the first\n // item when first opening the floating element, but will on\n // subsequent calls. `preventScroll` is supported in modern Safari,\n // so we can use that instead.\n // iOS Safari must be async or the first item will not be focused.\n sync: isMac() && isSafari() ? isPreventScrollSupported || forceSyncFocus.current : false\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n if (initialItem) {\n runFocus(initialItem);\n }\n requestAnimationFrame(() => {\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 && (forceScrollIntoView || !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 index(() => {\n document.createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\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(selectedIndex);\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(null);\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 && elements.floating) {\n if (activeIndex == null) {\n forceSyncFocus.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(listRef, indexRef);\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(indexRef.current);\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem(listRef, indexRef, forceScrollIntoViewRef.current);\n forceScrollIntoViewRef.current = false;\n }\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 previousMountedRef.current = !!elements.floating;\n });\n index(() => {\n if (!open) {\n keyRef.current = null;\n }\n }, [open]);\n index(() => {\n previousOpenRef.current = open;\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) {\n onNavigate(index);\n }\n }\n const props = {\n onFocus(_ref) {\n let {\n currentTarget\n } = _ref;\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 syncCurrentTarget(currentTarget);\n },\n onPointerLeave(_ref4) {\n let {\n pointerType\n } = _ref4;\n if (!isPointerModalityRef.current || pointerType === 'touch') {\n return;\n }\n indexRef.current = -1;\n focusItem(listRef, indexRef);\n onNavigate(null);\n if (!virtual) {\n enqueueFocus(floatingFocusElementRef.current, {\n preventScroll: true\n });\n }\n }\n })\n };\n return props;\n }, [open, floatingFocusElementRef, focusItem, focusItemOnHover, listRef, onNavigate, virtual]);\n const commonOnKeyDown = useEffectEvent(event => {\n isPointerModalityRef.current = false;\n forceSyncFocus.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)) {\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(indexRef.current);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(indexRef.current);\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(indexRef.current);\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(indexRef.current);\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 onNavigate(null);\n } else {\n onNavigate(indexRef.current);\n }\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 ...(!isTypeableCombobox(elements.domReference) && ariaActiveDescendantProp),\n onKeyDown: commonOnKeyDown,\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, elements.domReference, orientation]);\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 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 isCrossOpenKey = isCrossOrientationOpenKey(event.key, orientation, rtl);\n const isCrossCloseKey = isCrossOrientationCloseKey(event.key, orientation, rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isCrossOpenKey : 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\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 keyRef.current = nested && isMainKey ? null : event.key;\n }\n if (nested) {\n if (isCrossOpenKey) {\n stopEvent(event);\n if (open) {\n indexRef.current = getMinIndex(listRef, disabledIndicesRef.current);\n onNavigate(indexRef.current);\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(indexRef.current);\n }\n }\n },\n onFocus() {\n if (open && !virtual) {\n onNavigate(null);\n }\n },\n onPointerDown: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [activeId, ariaActiveDescendantProp, commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, onOpenChange, open, openOnArrowKeyDown, orientation, 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 */\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 */\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","import{autoUpdate as Z,flip as ee,inner as te,offset as ne,shift as re,size as le,useFloating as oe,useInnerOffset as ie,useInteractions as se}from\"@floating-ui/react\";import*as j from\"react\";import{createContext as _,useCallback as ae,useContext as T,useMemo as R,useRef as ue,useState as v}from\"react\";import{useDisposables as fe}from'../hooks/use-disposables.js';import{useEvent as z}from'../hooks/use-event.js';import{useIsoMorphicEffect as C}from'../hooks/use-iso-morphic-effect.js';import*as pe from'../utils/dom.js';let y=_({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});y.displayName=\"FloatingContext\";let $=_(null);$.displayName=\"PlacementContext\";function ye(e){return R(()=>e?typeof e==\"string\"?{to:e}:e:null,[e])}function Fe(){return T(y).setReference}function be(){return T(y).getReferenceProps}function Te(){let{getFloatingProps:e,slot:t}=T(y);return ae((...n)=>Object.assign({},e(...n),{\"data-anchor\":t.anchor}),[e,t])}function Re(e=null){e===!1&&(e=null),typeof e==\"string\"&&(e={to:e});let t=T($),n=R(()=>e,[JSON.stringify(e,(l,o)=>{var u;return(u=o==null?void 0:o.outerHTML)!=null?u:o})]);C(()=>{t==null||t(n!=null?n:null)},[t,n]);let r=T(y);return R(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let D=4;function Ae({children:e,enabled:t=!0}){let[n,r]=v(null),[l,o]=v(0),u=ue(null),[f,s]=v(null);ce(f);let i=t&&n!==null&&f!==null,{to:F=\"bottom\",gap:E=0,offset:A=0,padding:c=0,inner:h}=ge(n,f),[a,p=\"center\"]=F.split(\" \");C(()=>{i&&o(0)},[i]);let{refs:b,floatingStyles:S,context:g}=oe({open:i,placement:a===\"selection\"?p===\"center\"?\"bottom\":`bottom-${p}`:p===\"center\"?`${a}`:`${a}-${p}`,strategy:\"absolute\",transform:!1,middleware:[ne({mainAxis:a===\"selection\"?0:E,crossAxis:A}),re({padding:c}),a!==\"selection\"&&ee({padding:c}),a===\"selection\"&&h?te({...h,padding:c,overflowRef:u,offset:l,minItemsVisible:D,referenceOverflowThreshold:c,onFallbackChange(P){var L,N;if(!P)return;let d=g.elements.floating;if(!d)return;let M=parseFloat(getComputedStyle(d).scrollPaddingBottom)||0,I=Math.min(D,d.childElementCount),W=0,B=0;for(let m of(N=(L=g.elements.floating)==null?void 0:L.childNodes)!=null?N:[])if(pe.isHTMLElement(m)){let x=m.offsetTop,k=x+m.clientHeight+M,H=d.scrollTop,U=H+d.clientHeight;if(x>=H&&k<=U)I--;else{B=Math.max(0,Math.min(k,U)-Math.max(x,H)),W=m.clientHeight;break}}I>=1&&o(m=>{let x=W*I-B+M;return m>=x?m:x})}}):null,le({padding:c,apply({availableWidth:P,availableHeight:d,elements:M}){Object.assign(M.floating.style,{overflow:\"auto\",maxWidth:`${P}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${d}px)`})}})].filter(Boolean),whileElementsMounted:Z}),[w=a,V=p]=g.placement.split(\"-\");a===\"selection\"&&(w=\"selection\");let G=R(()=>({anchor:[w,V].filter(Boolean).join(\" \")}),[w,V]),K=ie(g,{overflowRef:u,onChange:o}),{getReferenceProps:Q,getFloatingProps:X}=se([K]),Y=z(P=>{s(P),b.setFloating(P)});return j.createElement($.Provider,{value:r},j.createElement(y.Provider,{value:{setFloating:Y,setReference:b.setReference,styles:S,getReferenceProps:Q,getFloatingProps:X,slot:G}},e))}function ce(e){C(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let l=parseInt(n);isNaN(l)||r!==l&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[\"style\"]}),()=>{t.disconnect()}},[e])}function ge(e,t){var o,u,f;let n=O((o=e==null?void 0:e.gap)!=null?o:\"var(--anchor-gap, 0)\",t),r=O((u=e==null?void 0:e.offset)!=null?u:\"var(--anchor-offset, 0)\",t),l=O((f=e==null?void 0:e.padding)!=null?f:\"var(--anchor-padding, 0)\",t);return{...e,gap:n,offset:r,padding:l}}function O(e,t,n=void 0){let r=fe(),l=z((s,i)=>{if(s==null)return[n,null];if(typeof s==\"number\")return[s,null];if(typeof s==\"string\"){if(!i)return[n,null];let F=J(s,i);return[F,E=>{let A=q(s);{let c=A.map(h=>window.getComputedStyle(i).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let a=!1;for(let[b,S]of A.entries()){let g=window.getComputedStyle(i).getPropertyValue(S);if(c[b]!==g){c[b]=g,a=!0;break}}if(!a)return;let p=J(s,i);F!==p&&(E(p),F=p)})}return r.dispose}]}return[n,null]}),o=R(()=>l(e,t)[0],[e,t]),[u=o,f]=v();return C(()=>{let[s,i]=l(e,t);if(f(s),!!i)return i(f)},[e,t]),u}function q(e){let t=/var\\((.*)\\)/.exec(e);if(t){let n=t[1].indexOf(\",\");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),l=t[1].slice(n+1).trim();return l?[r,...q(l)]:[r]}return[]}function J(e,t){let n=document.createElement(\"div\");t.appendChild(n),n.style.setProperty(\"margin-top\",\"0px\",\"important\"),n.style.setProperty(\"margin-top\",e,\"important\");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}export{Ae as FloatingProvider,Re as useFloatingPanel,Te as useFloatingPanelProps,Fe as useFloatingReference,be as useFloatingReferenceProps,ye as useResolvedAnchor};\n","import r,{cloneElement as l,isValidElement as c,useState as a}from\"react\";function f({children:t,freeze:e},o){let n=u(e,t);return c(n)?l(n,{ref:o}):r.createElement(r.Fragment,null,n)}const s=r.forwardRef(f);function u(t,e){let[o,n]=a(e);return!t&&o!==e&&n(e),t?o:e}export{s as Frozen,u as useFrozenData};\n","import r,{createContext as l,useContext as d}from\"react\";let n=l(null);n.displayName=\"OpenClosedContext\";var i=(e=>(e[e.Open=1]=\"Open\",e[e.Closed=2]=\"Closed\",e[e.Closing=4]=\"Closing\",e[e.Opening=8]=\"Opening\",e))(i||{});function u(){return d(n)}function c({value:o,children:t}){return r.createElement(n.Provider,{value:o},t)}function s({children:o}){return r.createElement(n.Provider,{value:null},o)}export{c as OpenClosedProvider,s as ResetOpenClosedProvider,i as State,u as useOpenClosed};\n","function u(l){throw new Error(\"Unexpected object: \"+l)}var c=(i=>(i[i.First=0]=\"First\",i[i.Previous=1]=\"Previous\",i[i.Next=2]=\"Next\",i[i.Last=3]=\"Last\",i[i.Specific=4]=\"Specific\",i[i.Nothing=5]=\"Nothing\",i))(c||{});function f(l,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),s=r!=null?r:-1;switch(l.focus){case 0:{for(let e=0;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 1:{s===-1&&(s=t.length);for(let e=s-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 2:{for(let e=s+1;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 3:{for(let e=t.length-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 4:{for(let e=0;e<t.length;++e)if(n.resolveId(t[e],e,t)===l.id)return e;return r}case 5:return null;default:u(l)}}export{c as Focus,f as calculateActiveIndex};\n","import{useEffect as u,useRef as n}from\"react\";import{microTask as o}from'../utils/micro-task.js';import{useEvent as f}from'./use-event.js';function c(t){let r=f(t),e=n(!1);u(()=>(e.current=!1,()=>{e.current=!0,o(()=>{e.current&&r()})}),[r])}export{c as useOnUnmount};\n","import t,{createContext as r,useContext as c}from\"react\";let e=r(!1);function a(){return c(e)}function l(o){return t.createElement(e.Provider,{value:o.force},o.children)}export{l as ForcePortalRoot,a as usePortalRoot};\n","\"use client\";import i,{Fragment as R,createContext as E,useContext as P,useEffect as A,useMemo as G,useRef as x,useState as M}from\"react\";import{createPortal as b}from\"react-dom\";import{useDisposables as O}from'../../hooks/use-disposables.js';import{useEvent as L}from'../../hooks/use-event.js';import{useOnUnmount as F}from'../../hooks/use-on-unmount.js';import{useOwnerDocument as H}from'../../hooks/use-owner.js';import{optionalRef as h,useSyncRefs as T}from'../../hooks/use-sync-refs.js';import{usePortalRoot as U}from'../../internal/portal-force-root.js';import{env as N}from'../../utils/env.js';import{forwardRefWithAs as f,useRender as d}from'../../utils/render.js';function W(e){let o=U(),l=P(c),[r,p]=M(()=>{var s;if(!o&&l!==null)return(s=l.current)!=null?s:null;if(N.isServer)return null;let t=e==null?void 0:e.getElementById(\"headlessui-portal-root\");if(t)return t;if(e===null)return null;let n=e.createElement(\"div\");return n.setAttribute(\"id\",\"headlessui-portal-root\"),e.body.appendChild(n)});return A(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),A(()=>{o||l!==null&&p(l.current)},[l,p,o]),r}let _=R,j=f(function(o,l){let{ownerDocument:r=null,...p}=o,t=x(null),n=T(h(a=>{t.current=a}),l),s=H(t.current),C=r!=null?r:s,u=W(C),y=P(m),g=O(),v=d();return F(()=>{var a;u&&u.childNodes.length<=0&&((a=u.parentElement)==null||a.removeChild(u))}),u?b(i.createElement(\"div\",{\"data-headlessui-portal\":\"\",ref:a=>{g.dispose(),y&&a&&g.add(y.register(a))}},v({ourProps:{ref:n},theirProps:p,slot:{},defaultTag:_,name:\"Portal\"})),u):null});function S(e,o){let l=T(o),{enabled:r=!0,ownerDocument:p,...t}=e,n=d();return r?i.createElement(j,{...t,ownerDocument:p,ref:l}):n({ourProps:{ref:l},theirProps:t,slot:{},defaultTag:_,name:\"Portal\"})}let I=R,c=E(null);function D(e,o){let{target:l,...r}=e,t={ref:T(o)},n=d();return i.createElement(c.Provider,{value:l},n({ourProps:t,theirProps:r,defaultTag:I,name:\"Popover.Group\"}))}let m=E(null);function ee(){let e=P(m),o=x([]),l=L(t=>(o.current.push(t),e&&e.register(t),()=>r(t))),r=L(t=>{let n=o.current.indexOf(t);n!==-1&&o.current.splice(n,1),e&&e.unregister(t)}),p=G(()=>({register:l,unregister:r,portals:o}),[l,r,o]);return[o,G(()=>function({children:n}){return i.createElement(m.Provider,{value:p},n)},[p])]}let J=f(S),X=f(D),te=Object.assign(J,{Group:X});export{te as Portal,X as PortalGroup,ee as useNestedPortals};\n","import{disposables as r}from'./disposables.js';const c={Idle:{kind:\"Idle\"},Tracked:e=>({kind:\"Tracked\",position:e}),Moved:{kind:\"Moved\"}};function a(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function p(e,t,i){let n=r();if(t.kind===\"Tracked\"){let o=function(){d!==a(e)&&(n.dispose(),i())};var f=o;let{position:d}=t,s=new ResizeObserver(o);s.observe(e),n.add(()=>s.disconnect()),n.addEventListener(window,\"scroll\",o,{passive:!0}),n.addEventListener(window,\"resize\",o)}return()=>n.dispose()}export{c as ElementPositionState,a as computeVisualPosition,p as detectMovement};\n","import*as t from\"react\";import{env as f}from'../utils/env.js';function s(){let r=typeof document==\"undefined\";return\"useSyncExternalStore\"in t?(o=>o.useSyncExternalStore)(t)(()=>()=>{},()=>!1,()=>!r):!1}function l(){let r=s(),[e,n]=t.useState(f.isHandoffComplete);return e&&f.isHandoffComplete===!1&&n(!1),t.useEffect(()=>{e!==!0&&n(!0)},[e]),t.useEffect(()=>f.handoff(),[]),r?!1:e}export{l as useServerHandoffComplete};\n","import{useRef as r}from\"react\";import{useIsoMorphicEffect as t}from'./use-iso-morphic-effect.js';function f(){let e=r(!1);return t(()=>(e.current=!0,()=>{e.current=!1}),[]),e}export{f as useIsMounted};\n","\"use client\";import c,{Fragment as k,createContext as ne,useContext as q,useEffect as ge,useMemo as ie,useRef as b,useState as O}from\"react\";import{useDisposables as ve}from'../../hooks/use-disposables.js';import{useEvent as E}from'../../hooks/use-event.js';import{useIsMounted as be}from'../../hooks/use-is-mounted.js';import{useIsoMorphicEffect as D}from'../../hooks/use-iso-morphic-effect.js';import{useLatestValue as Ee}from'../../hooks/use-latest-value.js';import{useServerHandoffComplete as re}from'../../hooks/use-server-handoff-complete.js';import{useSyncRefs as oe}from'../../hooks/use-sync-refs.js';import{transitionDataAttributes as Se,useTransition as Re}from'../../hooks/use-transition.js';import{OpenClosedProvider as ye,State as x,useOpenClosed as se}from'../../internal/open-closed.js';import{classNames as Pe}from'../../utils/class-names.js';import{match as le}from'../../utils/match.js';import{RenderFeatures as xe,RenderStrategy as P,compact as Ne,forwardRefWithAs as J,isFragment as _e,useRender as ae}from'../../utils/render.js';function ue(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!_e((t=e.as)!=null?t:de)||c.Children.count(e.children)===1}let V=ne(null);V.displayName=\"TransitionContext\";var De=(n=>(n.Visible=\"visible\",n.Hidden=\"hidden\",n))(De||{});function He(){let e=q(V);if(e===null)throw new Error(\"A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.\");return e}function Ae(){let e=q(w);if(e===null)throw new Error(\"A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.\");return e}let w=ne(null);w.displayName=\"NestingContext\";function M(e){return\"children\"in e?M(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t===\"visible\").length>0}function Te(e,t){let n=Ee(e),l=b([]),S=be(),R=ve(),d=E((o,i=P.Hidden)=>{let a=l.current.findIndex(({el:s})=>s===o);a!==-1&&(le(i,{[P.Unmount](){l.current.splice(a,1)},[P.Hidden](){l.current[a].state=\"hidden\"}}),R.microTask(()=>{var s;!M(l)&&S.current&&((s=n.current)==null||s.call(n))}))}),y=E(o=>{let i=l.current.find(({el:a})=>a===o);return i?i.state!==\"visible\"&&(i.state=\"visible\"):l.current.push({el:o,state:\"visible\"}),()=>d(o,P.Unmount)}),C=b([]),p=b(Promise.resolve()),h=b({enter:[],leave:[]}),g=E((o,i,a)=>{C.current.splice(0),t&&(t.chains.current[i]=t.chains.current[i].filter(([s])=>s!==o)),t==null||t.chains.current[i].push([o,new Promise(s=>{C.current.push(s)})]),t==null||t.chains.current[i].push([o,new Promise(s=>{Promise.all(h.current[i].map(([r,f])=>f)).then(()=>s())})]),i===\"enter\"?p.current=p.current.then(()=>t==null?void 0:t.wait.current).then(()=>a(i)):a(i)}),v=E((o,i,a)=>{Promise.all(h.current[i].splice(0).map(([s,r])=>r)).then(()=>{var s;(s=C.current.shift())==null||s()}).then(()=>a(i))});return ie(()=>({children:l,register:y,unregister:d,onStart:g,onStop:v,wait:p,chains:h}),[y,d,l,g,v,h,p])}let de=k,fe=xe.RenderStrategy;function Fe(e,t){var ee,te;let{transition:n=!0,beforeEnter:l,afterEnter:S,beforeLeave:R,afterLeave:d,enter:y,enterFrom:C,enterTo:p,entered:h,leave:g,leaveFrom:v,leaveTo:o,...i}=e,[a,s]=O(null),r=b(null),f=ue(e),U=oe(...f?[r,t,s]:t===null?[]:[t]),H=(ee=i.unmount)==null||ee?P.Unmount:P.Hidden,{show:u,appear:z,initial:K}=He(),[m,j]=O(u?\"visible\":\"hidden\"),Q=Ae(),{register:A,unregister:F}=Q;D(()=>A(r),[A,r]),D(()=>{if(H===P.Hidden&&r.current){if(u&&m!==\"visible\"){j(\"visible\");return}return le(m,{[\"hidden\"]:()=>F(r),[\"visible\"]:()=>A(r)})}},[m,r,A,F,u,H]);let G=re();D(()=>{if(f&&G&&m===\"visible\"&&r.current===null)throw new Error(\"Did you forget to passthrough the `ref` to the actual DOM node?\")},[r,m,G,f]);let ce=K&&!z,Y=z&&u&&K,B=b(!1),I=Te(()=>{B.current||(j(\"hidden\"),F(r))},Q),Z=E(W=>{B.current=!0;let L=W?\"enter\":\"leave\";I.onStart(r,L,_=>{_===\"enter\"?l==null||l():_===\"leave\"&&(R==null||R())})}),$=E(W=>{let L=W?\"enter\":\"leave\";B.current=!1,I.onStop(r,L,_=>{_===\"enter\"?S==null||S():_===\"leave\"&&(d==null||d())}),L===\"leave\"&&!M(I)&&(j(\"hidden\"),F(r))});ge(()=>{f&&n||(Z(u),$(u))},[u,f,n]);let pe=(()=>!(!n||!f||!G||ce))(),[,T]=Re(pe,a,u,{start:Z,end:$}),Ce=Ne({ref:U,className:((te=Pe(i.className,Y&&y,Y&&C,T.enter&&y,T.enter&&T.closed&&C,T.enter&&!T.closed&&p,T.leave&&g,T.leave&&!T.closed&&v,T.leave&&T.closed&&o,!T.transition&&u&&h))==null?void 0:te.trim())||void 0,...Se(T)}),N=0;m===\"visible\"&&(N|=x.Open),m===\"hidden\"&&(N|=x.Closed),u&&m===\"hidden\"&&(N|=x.Opening),!u&&m===\"visible\"&&(N|=x.Closing);let he=ae();return c.createElement(w.Provider,{value:I},c.createElement(ye,{value:N},he({ourProps:Ce,theirProps:i,defaultTag:de,features:fe,visible:m===\"visible\",name:\"Transition.Child\"})))}function Ie(e,t){let{show:n,appear:l=!1,unmount:S=!0,...R}=e,d=b(null),y=ue(e),C=oe(...y?[d,t]:t===null?[]:[t]);re();let p=se();if(n===void 0&&p!==null&&(n=(p&x.Open)===x.Open),n===void 0)throw new Error(\"A <Transition /> is used but it is missing a `show={true | false}` prop.\");let[h,g]=O(n?\"visible\":\"hidden\"),v=Te(()=>{n||g(\"hidden\")}),[o,i]=O(!0),a=b([n]);D(()=>{o!==!1&&a.current[a.current.length-1]!==n&&(a.current.push(n),i(!1))},[a,n]);let s=ie(()=>({show:n,appear:l,initial:o}),[n,l,o]);D(()=>{n?g(\"visible\"):!M(v)&&d.current!==null&&g(\"hidden\")},[n,v]);let r={unmount:S},f=E(()=>{var u;o&&i(!1),(u=e.beforeEnter)==null||u.call(e)}),U=E(()=>{var u;o&&i(!1),(u=e.beforeLeave)==null||u.call(e)}),H=ae();return c.createElement(w.Provider,{value:v},c.createElement(V.Provider,{value:s},H({ourProps:{...r,as:k,children:c.createElement(me,{ref:C,...r,...R,beforeEnter:f,beforeLeave:U})},theirProps:{},defaultTag:k,features:fe,visible:h===\"visible\",name:\"Transition\"})))}function Le(e,t){let n=q(V)!==null,l=se()!==null;return c.createElement(c.Fragment,null,!n&&l?c.createElement(X,{ref:t,...e}):c.createElement(me,{ref:t,...e}))}let X=J(Ie),me=J(Fe),Oe=J(Le),Ke=Object.assign(X,{Child:Oe,Root:X});export{Ke as Transition,Oe as TransitionChild};\n","var t;import r from\"react\";let a=(t=r.startTransition)!=null?t:function(i){i()};export{a as startTransition};\n","\"use client\";import{useFocusRing as q}from\"@react-aria/focus\";import{useHover as z}from\"@react-aria/interactions\";import y,{Fragment as Q,createContext as R,useContext as I,useEffect as N,useMemo as Y,useReducer as Z,useRef as k,useState as ee}from\"react\";import{useActivePress as te}from'../../hooks/use-active-press.js';import{useEvent as P}from'../../hooks/use-event.js';import{useId as w}from'../../hooks/use-id.js';import{useResolveButtonType as ne}from'../../hooks/use-resolve-button-type.js';import{useSlot as x}from'../../hooks/use-slot.js';import{optionalRef as oe,useSyncRefs as L}from'../../hooks/use-sync-refs.js';import{transitionDataAttributes as le,useTransition as re}from'../../hooks/use-transition.js';import{CloseProvider as se}from'../../internal/close-provider.js';import{OpenClosedProvider as ue,ResetOpenClosedProvider as ie,State as b,useOpenClosed as ae}from'../../internal/open-closed.js';import{isDisabledReactIssue7711 as pe}from'../../utils/bugs.js';import*as K from'../../utils/dom.js';import{match as B}from'../../utils/match.js';import{getOwnerDocument as ce}from'../../utils/owner.js';import{RenderFeatures as W,forwardRefWithAs as O,isFragment as de,mergeProps as j,useRender as v}from'../../utils/render.js';import{startTransition as Te}from'../../utils/start-transition.js';import{Keys as A}from'../keyboard.js';var me=(l=>(l[l.Open=0]=\"Open\",l[l.Closed=1]=\"Closed\",l))(me||{}),fe=(n=>(n[n.ToggleDisclosure=0]=\"ToggleDisclosure\",n[n.CloseDisclosure=1]=\"CloseDisclosure\",n[n.SetButtonId=2]=\"SetButtonId\",n[n.SetPanelId=3]=\"SetPanelId\",n[n.SetButtonElement=4]=\"SetButtonElement\",n[n.SetPanelElement=5]=\"SetPanelElement\",n))(fe||{});let De={[0]:e=>({...e,disclosureState:B(e.disclosureState,{[0]:1,[1]:0})}),[1]:e=>e.disclosureState===1?e:{...e,disclosureState:1},[2](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[3](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},[4](e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},[5](e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},_=R(null);_.displayName=\"DisclosureContext\";function M(e){let t=I(_);if(t===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,M),l}return t}let F=R(null);F.displayName=\"DisclosureAPIContext\";function V(e){let t=I(F);if(t===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,V),l}return t}let H=R(null);H.displayName=\"DisclosurePanelContext\";function ye(){return I(H)}function Pe(e,t){return B(t.type,De,e,t)}let Ee=Q;function Se(e,t){let{defaultOpen:l=!1,...p}=e,a=k(null),c=L(t,oe(u=>{a.current=u},e.as===void 0||de(e.as))),n=Z(Pe,{disclosureState:l?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:r},f]=n,s=P(u=>{f({type:1});let m=ce(a.current);if(!m||!r)return;let d=(()=>u?K.isHTMLorSVGElement(u)?u:\"current\"in u&&K.isHTMLorSVGElement(u.current)?u.current:m.getElementById(r):m.getElementById(r))();d==null||d.focus()}),E=Y(()=>({close:s}),[s]),T=x({open:o===0,close:s}),D={ref:c},S=v();return y.createElement(_.Provider,{value:n},y.createElement(F.Provider,{value:E},y.createElement(se,{value:s},y.createElement(ue,{value:B(o,{[0]:b.Open,[1]:b.Closed})},S({ourProps:D,theirProps:p,slot:T,defaultTag:Ee,name:\"Disclosure\"})))))}let ge=\"button\";function Ae(e,t){let l=w(),{id:p=`headlessui-disclosure-button-${l}`,disabled:a=!1,autoFocus:c=!1,...n}=e,[o,r]=M(\"Disclosure.Button\"),f=ye(),s=f===null?!1:f===o.panelId,E=k(null),T=L(E,t,P(i=>{if(!s)return r({type:4,element:i})}));N(()=>{if(!s)return r({type:2,buttonId:p}),()=>{r({type:2,buttonId:null})}},[p,r,s]);let D=P(i=>{var g;if(s){if(o.disclosureState===1)return;switch(i.key){case A.Space:case A.Enter:i.preventDefault(),i.stopPropagation(),r({type:0}),(g=o.buttonElement)==null||g.focus();break}}else switch(i.key){case A.Space:case A.Enter:i.preventDefault(),i.stopPropagation(),r({type:0});break}}),S=P(i=>{switch(i.key){case A.Space:i.preventDefault();break}}),u=P(i=>{var g;pe(i.currentTarget)||a||(s?(r({type:0}),(g=o.buttonElement)==null||g.focus()):r({type:0}))}),{isFocusVisible:m,focusProps:d}=q({autoFocus:c}),{isHovered:C,hoverProps:h}=z({isDisabled:a}),{pressed:$,pressProps:U}=te({disabled:a}),J=x({open:o.disclosureState===0,hover:C,active:$,disabled:a,focus:m,autofocus:c}),G=ne(e,o.buttonElement),X=s?j({ref:T,type:G,disabled:a||void 0,autoFocus:c,onKeyDown:D,onClick:u},d,h,U):j({ref:T,id:p,type:G,\"aria-expanded\":o.disclosureState===0,\"aria-controls\":o.panelElement?o.panelId:void 0,disabled:a||void 0,autoFocus:c,onKeyDown:D,onKeyUp:S,onClick:u},d,h,U);return v()({ourProps:X,theirProps:n,slot:J,defaultTag:ge,name:\"Disclosure.Button\"})}let be=\"div\",Ce=W.RenderStrategy|W.Static;function Re(e,t){let l=w(),{id:p=`headlessui-disclosure-panel-${l}`,transition:a=!1,...c}=e,[n,o]=M(\"Disclosure.Panel\"),{close:r}=V(\"Disclosure.Panel\"),[f,s]=ee(null),E=L(t,P(C=>{Te(()=>o({type:5,element:C}))}),s);N(()=>(o({type:3,panelId:p}),()=>{o({type:3,panelId:null})}),[p,o]);let T=ae(),[D,S]=re(a,f,T!==null?(T&b.Open)===b.Open:n.disclosureState===0),u=x({open:n.disclosureState===0,close:r}),m={ref:E,id:p,...le(S)},d=v();return y.createElement(ie,null,y.createElement(H.Provider,{value:n.panelId},d({ourProps:m,theirProps:c,slot:u,defaultTag:be,features:Ce,visible:D,name:\"Disclosure.Panel\"})))}let Ie=O(Se),xe=O(Ae),Le=O(Re),Xe=Object.assign(Ie,{Button:xe,Panel:Le});export{Xe as Disclosure,xe as DisclosureButton,Le as DisclosurePanel};\n","import*as g from'./dom.js';let a=/([\\u2700-\\u27BF]|[\\uE000-\\uF8FF]|\\uD83C[\\uDC00-\\uDFFF]|\\uD83D[\\uDC00-\\uDFFF]|[\\u2011-\\u26FF]|\\uD83E[\\uDD10-\\uDDFF])/g;function o(e){var l,n;let i=(l=e.innerText)!=null?l:\"\",t=e.cloneNode(!0);if(!g.isHTMLElement(t))return i;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role=\"img\"]'))f.remove(),u=!0;let r=u?(n=t.innerText)!=null?n:\"\":i;return a.test(r)&&(r=r.replace(a,\"\")),r}function F(e){let i=e.getAttribute(\"aria-label\");if(typeof i==\"string\")return i.trim();let t=e.getAttribute(\"aria-labelledby\");if(t){let u=t.split(\" \").map(r=>{let l=document.getElementById(r);if(l){let n=l.getAttribute(\"aria-label\");return typeof n==\"string\"?n.trim():o(l).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(\", \")}return o(e).trim()}export{F as getTextValue};\n","import{useRef as l}from\"react\";import{getTextValue as i}from'../utils/get-text-value.js';import{useEvent as o}from'./use-event.js';function s(c){let t=l(\"\"),r=l(\"\");return o(()=>{let e=c.current;if(!e)return\"\";let u=e.innerText;if(t.current===u)return r.current;let n=i(e).trim().toLowerCase();return t.current=u,r.current=n,n})}export{s as useTextValue};\n","var T=Object.defineProperty;var y=(e,o,t)=>o in e?T(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var b=(e,o,t)=>(y(e,typeof o!=\"symbol\"?o+\"\":o,t),t);import{Machine as I,batch as v}from'../../machine.js';import{ActionTypes as R,stackMachines as A}from'../../machines/stack-machine.js';import{Focus as a,calculateActiveIndex as x}from'../../utils/calculate-active-index.js';import{ElementPositionState as S,computeVisualPosition as E,detectMovement as L}from'../../utils/element-movement.js';import{sortByDomNode as M}from'../../utils/focus-management.js';import{match as m}from'../../utils/match.js';var F=(t=>(t[t.Open=0]=\"Open\",t[t.Closed=1]=\"Closed\",t))(F||{}),P=(t=>(t[t.Single=0]=\"Single\",t[t.Multi=1]=\"Multi\",t))(P||{}),C=(t=>(t[t.Pointer=0]=\"Pointer\",t[t.Other=1]=\"Other\",t))(C||{}),k=(r=>(r[r.OpenListbox=0]=\"OpenListbox\",r[r.CloseListbox=1]=\"CloseListbox\",r[r.GoToOption=2]=\"GoToOption\",r[r.Search=3]=\"Search\",r[r.ClearSearch=4]=\"ClearSearch\",r[r.SelectOption=5]=\"SelectOption\",r[r.RegisterOptions=6]=\"RegisterOptions\",r[r.UnregisterOptions=7]=\"UnregisterOptions\",r[r.SetButtonElement=8]=\"SetButtonElement\",r[r.SetOptionsElement=9]=\"SetOptionsElement\",r[r.SortOptions=10]=\"SortOptions\",r[r.MarkButtonAsMoved=11]=\"MarkButtonAsMoved\",r))(k||{});function g(e,o=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=M(o(e.options.slice()),s=>s.dataRef.current.domRef.current),i=t?n.indexOf(t):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let D={[1](e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=e.buttonElement?S.Tracked(E(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:a.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:o}},[0](e,o){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,i=e.options.findIndex(s=>n(s.dataRef.current.value));return i!==-1&&(t=i),{...e,frozenValue:!1,pendingFocus:o.focus,listboxState:0,activeOptionIndex:t,__demoMode:!1,buttonPositionState:S.Idle}},[2](e,o){var s,l,c,p,f;if(e.dataRef.current.disabled||e.listboxState===1)return e;let t={...e,searchQuery:\"\",activationTrigger:(s=o.trigger)!=null?s:1,__demoMode:!1};if(o.focus===a.Nothing)return{...t,activeOptionIndex:null};if(o.focus===a.Specific)return{...t,activeOptionIndex:e.options.findIndex(d=>d.id===o.id)};if(o.focus===a.Previous){let d=e.activeOptionIndex;if(d!==null){let O=e.options[d].dataRef.current.domRef,r=x(o,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(r!==null){let u=e.options[r].dataRef.current.domRef;if(((l=O.current)==null?void 0:l.previousElementSibling)===u.current||((c=u.current)==null?void 0:c.previousElementSibling)===null)return{...t,activeOptionIndex:r}}}}else if(o.focus===a.Next){let d=e.activeOptionIndex;if(d!==null){let O=e.options[d].dataRef.current.domRef,r=x(o,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(r!==null){let u=e.options[r].dataRef.current.domRef;if(((p=O.current)==null?void 0:p.nextElementSibling)===u.current||((f=u.current)==null?void 0:f.nextElementSibling)===null)return{...t,activeOptionIndex:r}}}}let n=g(e),i=x(o,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...t,...n,activeOptionIndex:i}},[3]:(e,o)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==\"\"?0:1,i=e.searchQuery+o.value.toLowerCase(),l=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(p=>{var f;return!p.dataRef.current.disabled&&((f=p.dataRef.current.textValue)==null?void 0:f.startsWith(i))}),c=l?e.options.indexOf(l):-1;return c===-1||c===e.activeOptionIndex?{...e,searchQuery:i}:{...e,searchQuery:i,activeOptionIndex:c,activationTrigger:1}},[4](e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===\"\"?e:{...e,searchQuery:\"\"}},[5](e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},[6]:(e,o)=>{let t=e.options.concat(o.options),n=e.activeOptionIndex;if(e.pendingFocus.focus!==a.Nothing&&(n=x(e.pendingFocus,{resolveItems:()=>t,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:i}=e.dataRef.current;if(i){let s=t.findIndex(l=>i==null?void 0:i(l.dataRef.current.value));s!==-1&&(n=s)}}return{...e,options:t,activeOptionIndex:n,pendingFocus:{focus:a.Nothing},pendingShouldSort:!0}},[7]:(e,o)=>{let t=e.options,n=[],i=new Set(o.options);for(let[s,l]of t.entries())if(i.has(l.id)&&(n.push(s),i.delete(l.id),i.size===0))break;if(n.length>0){t=t.slice();for(let s of n.reverse())t.splice(s,1)}return{...e,options:t,activationTrigger:1}},[8]:(e,o)=>e.buttonElement===o.element?e:{...e,buttonElement:o.element},[9]:(e,o)=>e.optionsElement===o.element?e:{...e,optionsElement:o.element},[10]:e=>e.pendingShouldSort?{...e,...g(e),pendingShouldSort:!1}:e,[11](e){return e.buttonPositionState.kind!==\"Tracked\"?e:{...e,buttonPositionState:S.Moved}}};class h extends I{constructor(t){super(t);b(this,\"actions\",{onChange:t=>{let{onChange:n,compare:i,mode:s,value:l}=this.state.dataRef.current;return m(s,{[0]:()=>n==null?void 0:n(t),[1]:()=>{let c=l.slice(),p=c.findIndex(f=>i(f,t));return p===-1?c.push(t):c.splice(p,1),n==null?void 0:n(c)}})},registerOption:v(()=>{let t=[],n=new Set;return[(i,s)=>{n.has(s)||(n.add(s),t.push({id:i,dataRef:s}))},()=>(n.clear(),this.send({type:6,options:t.splice(0)}))]}),unregisterOption:v(()=>{let t=[];return[n=>t.push(n),()=>{this.send({type:7,options:t.splice(0)})}]}),goToOption:v(()=>{let t=null;return[(n,i)=>{t={type:2,...n,trigger:i}},()=>t&&this.send(t)]}),closeListbox:()=>{this.send({type:1})},openListbox:t=>{this.send({type:0,focus:t})},selectActiveOption:()=>{var t;if(this.state.activeOptionIndex!==null){let{dataRef:n}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(n.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(t=this.state.buttonElement)==null||t.focus({preventScroll:!0}))},selectOption:t=>{this.send({type:5,value:t})},search:t=>{this.send({type:3,value:t})},clearSearch:()=>{this.send({type:4})},setButtonElement:t=>{this.send({type:8,element:t})},setOptionsElement:t=>{this.send({type:9,element:t})}});b(this,\"selectors\",{activeDescendantId(t){var s;let n=t.activeOptionIndex,i=t.options;return n===null||(s=i[n])==null?void 0:s.id},isActive(t,n){var l;let i=t.activeOptionIndex,s=t.options;return i!==null?((l=s[i])==null?void 0:l.id)===n:!1},hasFrozenValue(t){return t.frozenValue},shouldScrollIntoView(t,n){return t.__demoMode||t.listboxState!==0||t.activationTrigger===0?!1:this.isActive(t,n)},didButtonMove(t){return t.buttonPositionState.kind===\"Moved\"}});this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let n=this.state.id,i=A.get(null);this.disposables.add(i.on(R.Push,s=>{!i.selectors.isTop(s,n)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>i.actions.push(n)),this.on(1,()=>i.actions.pop(n))}this.disposables.group(n=>{this.on(1,i=>{i.buttonElement&&(n.dispose(),n.add(L(i.buttonElement,i.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(n,i)=>{var s;this.actions.onChange(i.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(s=this.state.buttonElement)==null||s.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new h({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:\"\",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:a.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:S.Idle})}reduce(t,n){return m(n.type,D,t,n)}}export{k as ActionTypes,C as ActivationTrigger,h as ListboxMachine,F as ListboxStates,P as ValueMode};\n","import{createContext as n,useContext as r,useMemo as i}from\"react\";import{useOnUnmount as s}from'../../hooks/use-on-unmount.js';import{ListboxMachine as a}from'./listbox-machine.js';const c=n(null);function p(o){let e=r(c);if(e===null){let t=new Error(`<${o} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}return e}function u({id:o,__demoMode:e=!1}){let t=i(()=>a.new({id:o,__demoMode:e}),[]);return s(()=>t.dispose()),t}export{c as ListboxContext,u as useListboxMachine,p as useListboxMachineContext};\n","\"use client\";import{useFocusRing as Ee}from\"@react-aria/focus\";import{useHover as he}from\"@react-aria/interactions\";import D,{Fragment as ce,createContext as fe,useCallback as K,useContext as Te,useEffect as Ae,useMemo as _e,useRef as ae,useState as Se}from\"react\";import{flushSync as ie}from\"react-dom\";import{useActivePress as De}from'../../hooks/use-active-press.js';import{useByComparator as Re}from'../../hooks/use-by-comparator.js';import{useControllable as Fe}from'../../hooks/use-controllable.js';import{useDefaultValue as Ce}from'../../hooks/use-default-value.js';import{useDisposables as Me}from'../../hooks/use-disposables.js';import{useElementSize as we}from'../../hooks/use-element-size.js';import{useEvent as B}from'../../hooks/use-event.js';import{useHandleToggle as Be}from'../../hooks/use-handle-toggle.js';import{useId as Y}from'../../hooks/use-id.js';import{useInertOthers as Ie}from'../../hooks/use-inert-others.js';import{useIsoMorphicEffect as se}from'../../hooks/use-iso-morphic-effect.js';import{useLatestValue as ke}from'../../hooks/use-latest-value.js';import{useOnDisappear as Ue}from'../../hooks/use-on-disappear.js';import{useOutsideClick as Ne}from'../../hooks/use-outside-click.js';import{useOwnerDocument as be}from'../../hooks/use-owner.js';import{Action as Z,useQuickRelease as He}from'../../hooks/use-quick-release.js';import{useResolveButtonType as Ge}from'../../hooks/use-resolve-button-type.js';import{useScrollLock as Ve}from'../../hooks/use-scroll-lock.js';import{useSlot as z}from'../../hooks/use-slot.js';import{useSyncRefs as X}from'../../hooks/use-sync-refs.js';import{useTextValue as Ke}from'../../hooks/use-text-value.js';import{useTrackedPointer as ze}from'../../hooks/use-tracked-pointer.js';import{transitionDataAttributes as We,useTransition as Xe}from'../../hooks/use-transition.js';import{useDisabled as je}from'../../internal/disabled.js';import{FloatingProvider as Je,useFloatingPanel as Qe,useFloatingPanelProps as $e,useFloatingReference as qe,useFloatingReferenceProps as Ye,useResolvedAnchor as Ze}from'../../internal/floating.js';import{FormFields as et}from'../../internal/form-fields.js';import{useFrozenData as tt}from'../../internal/frozen.js';import{useProvidedId as ot}from'../../internal/id.js';import{OpenClosedProvider as nt,State as ee,useOpenClosed as rt}from'../../internal/open-closed.js';import{stackMachines as lt}from'../../machines/stack-machine.js';import{useSlice as g}from'../../react-glue.js';import{Focus as v}from'../../utils/calculate-active-index.js';import{disposables as at}from'../../utils/disposables.js';import*as it from'../../utils/dom.js';import{Focus as me,FocusableMode as st,focusFrom as pt,isFocusableElement as ut}from'../../utils/focus-management.js';import{attemptSubmit as dt}from'../../utils/form.js';import{match as te}from'../../utils/match.js';import{isActiveElement as ct}from'../../utils/owner.js';import{RenderFeatures as ye,forwardRefWithAs as j,mergeProps as xe,useRender as J}from'../../utils/render.js';import{useDescribedBy as ft}from'../description/description.js';import{Keys as d}from'../keyboard.js';import{Label as Tt,useLabelledBy as bt,useLabels as mt}from'../label/label.js';import{Portal as yt}from'../portal/portal.js';import{ActionTypes as xt,ActivationTrigger as pe,ListboxStates as T,ValueMode as G}from'./listbox-machine.js';import{ListboxContext as Ot,useListboxMachine as Lt,useListboxMachineContext as ue}from'./listbox-machine-glue.js';let oe=fe(null);oe.displayName=\"ListboxDataContext\";function Q(b){let E=Te(oe);if(E===null){let m=new Error(`<${b} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(m,Q),m}return E}let Pt=ce;function gt(b,E){let m=Y(),u=je(),{value:s,defaultValue:a,form:_,name:i,onChange:y,by:o,invalid:x=!1,disabled:O=u||!1,horizontal:l=!1,multiple:t=!1,__demoMode:p=!1,...S}=b;const h=l?\"horizontal\":\"vertical\";let I=X(E),R=Ce(a),[c=t?[]:void 0,L]=Fe(s,y,R),f=Lt({id:m,__demoMode:p}),k=ae({static:!1,hold:!1}),N=ae(new Map),C=Re(o),V=K(P=>te(n.mode,{[G.Multi]:()=>c.some(W=>C(W,P)),[G.Single]:()=>C(c,P)}),[c]),n=z({value:c,disabled:O,invalid:x,mode:t?G.Multi:G.Single,orientation:h,onChange:L,compare:C,isSelected:V,optionsPropsRef:k,listRef:N});se(()=>{f.state.dataRef.current=n},[n]);let F=g(f,P=>P.listboxState),U=lt.get(null),H=g(U,K(P=>U.selectors.isTop(P,m),[U,m])),[A,$]=g(f,P=>[P.buttonElement,P.optionsElement]);Ne(H,[A,$],(P,W)=>{f.send({type:xt.CloseListbox}),ut(W,st.Loose)||(P.preventDefault(),A==null||A.focus())});let r=z({open:F===T.Open,disabled:O,invalid:x,value:c}),[M,ne]=mt({inherit:!0}),re={ref:I},q=K(()=>{if(R!==void 0)return L==null?void 0:L(R)},[L,R]),le=J();return D.createElement(ne,{value:M,props:{htmlFor:A==null?void 0:A.id},slot:{open:F===T.Open,disabled:O}},D.createElement(Je,null,D.createElement(Ot.Provider,{value:f},D.createElement(oe.Provider,{value:n},D.createElement(nt,{value:te(F,{[T.Open]:ee.Open,[T.Closed]:ee.Closed})},i!=null&&c!=null&&D.createElement(et,{disabled:O,data:{[i]:c},form:_,onReset:q}),le({ourProps:re,theirProps:S,slot:r,defaultTag:Pt,name:\"Listbox\"}))))))}let vt=\"button\";function Et(b,E){let m=Y(),u=ot(),s=Q(\"Listbox.Button\"),a=ue(\"Listbox.Button\"),{id:_=u||`headlessui-listbox-button-${m}`,disabled:i=s.disabled||!1,autoFocus:y=!1,...o}=b,x=X(E,qe(),a.actions.setButtonElement),O=Ye(),[l,t,p]=g(a,r=>[r.listboxState,r.buttonElement,r.optionsElement]),S=l===T.Open;He(S,{trigger:t,action:K(r=>{if(t!=null&&t.contains(r.target))return Z.Ignore;let M=r.target.closest('[role=\"option\"]:not([data-disabled])');return it.isHTMLElement(M)?Z.Select(M):p!=null&&p.contains(r.target)?Z.Ignore:Z.Close},[t,p]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let h=B(r=>{switch(r.key){case d.Enter:dt(r.currentTarget);break;case d.Space:case d.ArrowDown:r.preventDefault(),a.actions.openListbox({focus:s.value?v.Nothing:v.First});break;case d.ArrowUp:r.preventDefault(),a.actions.openListbox({focus:s.value?v.Nothing:v.Last});break}}),I=B(r=>{switch(r.key){case d.Space:r.preventDefault();break}}),R=Be(r=>{var M;a.state.listboxState===T.Open?(ie(()=>a.actions.closeListbox()),(M=a.state.buttonElement)==null||M.focus({preventScroll:!0})):(r.preventDefault(),a.actions.openListbox({focus:v.Nothing}))}),c=B(r=>r.preventDefault()),L=bt([_]),f=ft(),{isFocusVisible:k,focusProps:N}=Ee({autoFocus:y}),{isHovered:C,hoverProps:V}=he({isDisabled:i}),{pressed:n,pressProps:F}=De({disabled:i}),U=z({open:l===T.Open,active:n||l===T.Open,disabled:i,invalid:s.invalid,value:s.value,hover:C,focus:k,autofocus:y}),H=g(a,r=>r.listboxState===T.Open),A=xe(O(),{ref:x,id:_,type:Ge(b,t),\"aria-haspopup\":\"listbox\",\"aria-controls\":p==null?void 0:p.id,\"aria-expanded\":H,\"aria-labelledby\":L,\"aria-describedby\":f,disabled:i||void 0,autoFocus:y,onKeyDown:h,onKeyUp:I,onKeyPress:c},R,N,V,F);return J()({ourProps:A,theirProps:o,slot:U,defaultTag:vt,name:\"Listbox.Button\"})}let Oe=fe(!1),ht=\"div\",At=ye.RenderStrategy|ye.Static;function _t(b,E){let m=Y(),{id:u=`headlessui-listbox-options-${m}`,anchor:s,portal:a=!1,modal:_=!0,transition:i=!1,...y}=b,o=Ze(s),[x,O]=Se(null);o&&(a=!0);let l=Q(\"Listbox.Options\"),t=ue(\"Listbox.Options\"),[p,S,h,I]=g(t,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),R=be(S),c=be(h),L=rt(),[f,k]=Xe(i,x,L!==null?(L&ee.Open)===ee.Open:p===T.Open);Ue(f,S,t.actions.closeListbox);let N=I?!1:_&&p===T.Open;Ve(N,c);let C=I?!1:_&&p===T.Open;Ie(C,{allowed:K(()=>[S,h],[S,h])});let n=g(t,t.selectors.didButtonMove)?!1:f,F=g(t,t.selectors.hasFrozenValue)&&!b.static,U=tt(F,l.value),H=K(e=>l.compare(U,e),[l.compare,U]),A=g(t,e=>{var de;if(o==null||!((de=o==null?void 0:o.to)!=null&&de.includes(\"selection\")))return null;let w=e.options.findIndex(ve=>H(ve.dataRef.current.value));return w===-1&&(w=0),w}),$=(()=>{if(o==null)return;if(A===null)return{...o,inner:void 0};let e=Array.from(l.listRef.current.values());return{...o,inner:{listRef:{current:e},index:A}}})(),[r,M]=Qe($),ne=$e(),re=X(E,o?r:null,t.actions.setOptionsElement,O),q=Me();Ae(()=>{let e=h;e&&p===T.Open&&(ct(e)||e==null||e.focus({preventScroll:!0}))},[p,h]);let le=B(e=>{var w;switch(q.dispose(),e.key){case d.Space:if(t.state.searchQuery!==\"\")return e.preventDefault(),e.stopPropagation(),t.actions.search(e.key);case d.Enter:e.preventDefault(),e.stopPropagation(),t.actions.selectActiveOption();break;case te(l.orientation,{vertical:d.ArrowDown,horizontal:d.ArrowRight}):return e.preventDefault(),e.stopPropagation(),t.actions.goToOption({focus:v.Next});case te(l.orientation,{vertical:d.ArrowUp,horizontal:d.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),t.actions.goToOption({focus:v.Previous});case d.Home:case d.PageUp:return e.preventDefault(),e.stopPropagation(),t.actions.goToOption({focus:v.First});case d.End:case d.PageDown:return e.preventDefault(),e.stopPropagation(),t.actions.goToOption({focus:v.Last});case d.Escape:e.preventDefault(),e.stopPropagation(),ie(()=>t.actions.closeListbox()),(w=t.state.buttonElement)==null||w.focus({preventScroll:!0});return;case d.Tab:e.preventDefault(),e.stopPropagation(),ie(()=>t.actions.closeListbox()),pt(t.state.buttonElement,e.shiftKey?me.Previous:me.Next);break;default:e.key.length===1&&(t.actions.search(e.key),q.setTimeout(()=>t.actions.clearSearch(),350));break}}),P=g(t,e=>{var w;return(w=e.buttonElement)==null?void 0:w.id}),W=z({open:p===T.Open}),Le=xe(o?ne():{},{id:u,ref:re,\"aria-activedescendant\":g(t,t.selectors.activeDescendantId),\"aria-multiselectable\":l.mode===G.Multi?!0:void 0,\"aria-labelledby\":P,\"aria-orientation\":l.orientation,onKeyDown:le,role:\"listbox\",tabIndex:p===T.Open?0:void 0,style:{...y.style,...M,\"--button-width\":we(f,S,!0).width},...We(k)}),Pe=J(),ge=_e(()=>l.mode===G.Multi?l:{...l,isSelected:H},[l,H]);return D.createElement(yt,{enabled:a?b.static||f:!1,ownerDocument:R},D.createElement(oe.Provider,{value:ge},Pe({ourProps:Le,theirProps:y,slot:W,defaultTag:ht,features:At,visible:n,name:\"Listbox.Options\"})))}let St=\"div\";function Dt(b,E){let m=Y(),{id:u=`headlessui-listbox-option-${m}`,disabled:s=!1,value:a,..._}=b,i=Te(Oe)===!0,y=Q(\"Listbox.Option\"),o=ue(\"Listbox.Option\"),x=g(o,n=>o.selectors.isActive(n,u)),O=y.isSelected(a),l=ae(null),t=Ke(l),p=ke({disabled:s,value:a,domRef:l,get textValue(){return t()}}),S=X(E,l,n=>{n?y.listRef.current.set(u,n):y.listRef.current.delete(u)}),h=g(o,n=>o.selectors.shouldScrollIntoView(n,u));se(()=>{if(h)return at().requestAnimationFrame(()=>{var n,F;(F=(n=l.current)==null?void 0:n.scrollIntoView)==null||F.call(n,{block:\"nearest\"})})},[h,l]),se(()=>{if(!i)return o.actions.registerOption(u,p),()=>o.actions.unregisterOption(u)},[p,u,i]);let I=B(n=>{if(s)return n.preventDefault();o.actions.selectOption(a)}),R=B(()=>{if(s)return o.actions.goToOption({focus:v.Nothing});o.actions.goToOption({focus:v.Specific,id:u})}),c=ze(),L=B(n=>c.update(n)),f=B(n=>{c.wasMoved(n)&&(s||x&&o.state.activationTrigger===pe.Pointer||o.actions.goToOption({focus:v.Specific,id:u},pe.Pointer))}),k=B(n=>{c.wasMoved(n)&&(s||x&&o.state.activationTrigger===pe.Pointer&&o.actions.goToOption({focus:v.Nothing}))}),N=z({active:x,focus:x,selected:O,disabled:s,selectedOption:O&&i}),C=i?{}:{id:u,ref:S,role:\"option\",tabIndex:s===!0?void 0:-1,\"aria-disabled\":s===!0?!0:void 0,\"aria-selected\":O,disabled:void 0,onClick:I,onFocus:R,onPointerEnter:L,onMouseEnter:L,onPointerMove:f,onMouseMove:f,onPointerLeave:k,onMouseLeave:k},V=J();return!O&&i?null:V({ourProps:C,theirProps:_,slot:N,defaultTag:St,name:\"Listbox.Option\"})}let Rt=ce;function Ft(b,E){let{options:m,placeholder:u,...s}=b,_={ref:X(E)},i=Q(\"ListboxSelectedOption\"),y=z({}),o=i.value===void 0||i.value===null||i.mode===G.Multi&&Array.isArray(i.value)&&i.value.length===0,x=J();return D.createElement(Oe.Provider,{value:!0},x({ourProps:_,theirProps:{...s,children:D.createElement(D.Fragment,null,u&&o?u:m)},slot:y,defaultTag:Rt,name:\"ListboxSelectedOption\"}))}let Ct=j(gt),Mt=j(Et),wt=Tt,Bt=j(_t),It=j(Dt),kt=j(Ft),Mo=Object.assign(Ct,{Button:Mt,Label:wt,Options:Bt,Option:It,SelectedOption:kt});export{Mo as Listbox,Mt as ListboxButton,wt as ListboxLabel,It as ListboxOption,Bt as ListboxOptions,kt as ListboxSelectedOption};\n","import { Button as HeadlessButton } from \"@headlessui/react\";\nimport type { KeyboardEvent, MouseEvent, PropsWithChildren } from \"react\";\nimport type { Intent } from \"../types\";\nimport { cn } from \"../utils/cn\";\n\nexport function Button({\n children,\n className,\n disabled = false,\n intent = \"primary\",\n ...rest\n}: PropsWithChildren<{\n className?: string | undefined;\n disabled?: boolean | undefined;\n intent?: Intent | undefined;\n onClick?: ((event: MouseEvent) => void) | undefined;\n onKeyDown?: ((event: KeyboardEvent) => void) | undefined;\n}>) {\n return (\n <HeadlessButton\n className={cn(\n \"rounded-md font-bold cursor-pointer px-2\",\n getClassNames(intent, !!disabled),\n {\n \"opacity-50 cursor-default\": disabled\n },\n className\n )}\n data-focus\n disabled={disabled}\n {...rest}\n >\n {children}\n </HeadlessButton>\n );\n}\n\nfunction getClassNames(intent: Intent, disabled: boolean) {\n switch (intent) {\n case \"danger\": {\n return cn(\"bg-red-400 text-red-950 focus:text-black\", {\n \"hover:bg-red-500 focus:text-black\": !disabled\n });\n }\n case \"none\": {\n return cn(\"bg-white/20 text-slate-300 focus:text-white\", {\n \"hover:bg-white/10 focus:text-white\": !disabled\n });\n }\n case \"success\": {\n return cn(\"bg-emerald-400 text-emerald-950 focus:text-black\", {\n \"hover:bg-emerald-500 focus:text-black\": !disabled\n });\n }\n case \"primary\": {\n return cn(\"bg-sky-400 text-sky-950 focus:text-black\", {\n \"hover:bg-sky-500 focus:text-black\": !disabled\n });\n }\n case \"warning\": {\n return cn(\"bg-amber-400 text-amber-950 focus:text-black\", {\n \"hover:bg-amber-500 focus:text-black\": !disabled\n });\n }\n }\n}\n","import type { PropsWithChildren } from \"react\";\nimport {\n ErrorBoundary as ErrorBoundaryExternal,\n type FallbackProps\n} from \"react-error-boundary\";\nimport { Callout } from \"./Callout\";\nimport { Box } from \"./Box\";\nimport { Button } from \"./Button\";\n\nexport function ErrorBoundary({ children }: PropsWithChildren) {\n return (\n <ErrorBoundaryExternal FallbackComponent={FallbackComponent}>\n {children}\n </ErrorBoundaryExternal>\n );\n}\n\nfunction FallbackComponent({ error, resetErrorBoundary }: FallbackProps) {\n return (\n <Callout intent=\"danger\">\n <Box align=\"start\" direction=\"column\" gap={2}>\n <div className=\"font-bold\">Something went wrong!</div>\n <pre className=\"text-sm font-monospace text-red-300\">\n {error.message}\n </pre>\n <Button intent=\"danger\" onClick={resetErrorBoundary}>\n Retry\n </Button>\n </Box>\n </Callout>\n );\n}\n","import type { AnchorHTMLAttributes } from \"react\";\n\nexport function ExternalLink({\n children,\n className,\n href,\n target = \"_blank\",\n ...rest\n}: AnchorHTMLAttributes<HTMLAnchorElement>) {\n return (\n <a\n className={className}\n href={href}\n target={target}\n rel=\"noopener noreferrer\"\n {...rest}\n >\n {children}\n </a>\n );\n}\n","import { useTransition, type HTMLAttributes, type ReactNode } from \"react\";\nimport { useMatch, useNavigate } from \"react-router-dom\";\n\ntype RenderFunction = (params: {\n isActive: boolean;\n isPending: boolean;\n}) => ReactNode;\n\nexport function Link({\n children,\n onClick,\n to,\n ...rest\n}: Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> & {\n children?: ReactNode | RenderFunction;\n to: string;\n}) {\n const isActive = !!useMatch(to);\n const [isPending, startTransition] = useTransition();\n const navigate = useNavigate();\n\n return (\n <span\n children={\n typeof children === \"function\"\n ? children({ isActive, isPending })\n : children\n }\n data-link\n onClick={(event) => {\n onClick?.(event);\n\n startTransition(() => {\n navigate(to);\n });\n }}\n {...rest}\n />\n );\n}\n","import type { PropsWithChildren } from \"react\";\n\nexport function Nav({ children }: PropsWithChildren) {\n return (\n <div className=\"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto\">\n {children}\n </div>\n );\n}\n","import { useLayoutEffect } from \"react\";\nimport { useLocation } from \"react-router-dom\";\nimport { useNavStore } from \"../../../hooks/useNavStore\";\n\nexport function RouteChangeHandler() {\n const { hide } = useNavStore();\n\n const { pathname } = useLocation();\n\n useLayoutEffect(() => {\n hide();\n\n const main = document.body.querySelector(\"[data-main-scrollable]\");\n if (main) {\n const timeout = setTimeout(() => {\n main.scrollTo(0, 0);\n }, 1);\n\n return () => {\n clearTimeout(timeout);\n };\n }\n }, [hide, pathname]);\n\n return null;\n}\n","import { lazy, type ComponentType, type LazyExoticComponent } from \"react\";\n\nexport type Route = LazyExoticComponent<ComponentType<unknown>>;\n\nexport const routes = {\n \"*\": lazy(() => import(\"./routes/PageNotFound\")),\n \"/\": lazy(() => import(\"./routes/GettingStartedRoute\")),\n \"/support\": lazy(() => import(\"./routes/SupportRoute\")),\n \"/versions\": lazy(() => import(\"./routes/VersionsRoute\"))\n} satisfies Record<string, Route>;\n\nexport type Routes = Record<keyof typeof routes, Route>;\nexport type Path = keyof Routes;\n","import { Bars4Icon, XMarkIcon } from \"@heroicons/react/20/solid\";\nimport {\n useMemo,\n type ComponentType,\n type LazyExoticComponent,\n type ReactNode\n} from \"react\";\nimport { BrowserRouter, Route, Routes } from \"react-router-dom\";\nimport GitHubIcon from \"../../../public/svgs/github.svg?react\";\nimport NpmHubIcon from \"../../../public/svgs/npm.svg?react\";\nimport TagsIcon from \"../../../public/svgs/tags.svg?react\";\nimport {\n LibraryContext,\n type LibraryContextType,\n type Versions\n} from \"../../contexts/LibraryContext\";\nimport { useNavStore } from \"../../hooks/useNavStore\";\nimport { cn } from \"../../utils/cn\";\nimport { Box } from \"../Box\";\nimport { ErrorBoundary } from \"../ErrorBoundary\";\nimport { ExternalLink } from \"../ExternalLink\";\nimport { Link } from \"../Link\";\nimport { Nav } from \"../nav/Nav\";\nimport { RouteChangeHandler } from \"./components/RouteChangeHandler\";\nimport { routes as defaultRoutes } from \"./routes\";\n\n/**\n * Displays an application shell with desktop and mobile layouts.\n */\nexport function AppRoot({\n navLinks,\n overview,\n packageDescription,\n packageName,\n routes,\n showOpenCollectLink = false,\n versions\n}: {\n navLinks: ReactNode;\n overview?: ReactNode | undefined;\n packageDescription: string;\n packageName: string;\n routes: Record<string, LazyExoticComponent<ComponentType<unknown>>>;\n showOpenCollectLink?: boolean | undefined;\n versions?: Versions | undefined;\n}) {\n const { toggle, visible } = useNavStore();\n\n const context = useMemo<LibraryContextType>(\n () => ({\n overview,\n packageDescription,\n packageName,\n showOpenCollectLink,\n versions\n }),\n [overview, packageDescription, packageName, showOpenCollectLink, versions]\n );\n\n return (\n <LibraryContext.Provider value={context}>\n <BrowserRouter>\n <RouteChangeHandler />\n\n <div className=\"h-full w-full max-w-350 mx-auto flex flex-col\">\n <Box\n align=\"center\"\n className=\"h-12 w-full p-4\"\n direction=\"row\"\n justify=\"between\"\n gap={4}\n >\n <Box\n className=\"overflow-hidden\"\n align=\"center\"\n direction=\"row\"\n gap={4}\n >\n <Link\n children={packageName}\n className=\"text-xl text-white! text-shadow-black/80 text-shadow-xs font-bold cursor-pointer truncate\"\n to=\"/\"\n />\n <div className=\"hidden md:block text-black text-shadow-white/50 text-shadow-xs\">\n {packageDescription}\n </div>\n </Box>\n <Box align=\"center\" direction=\"row\" gap={4}>\n {versions !== undefined && (\n <Link\n aria-label=\"Documentation for other versions\"\n className=\"text-xs font-bold text-white! drop-shadow-black/20 drop-shadow-sm cursor-pointer\"\n title=\"Past releases\"\n to=\"/versions\"\n >\n <TagsIcon className=\"w-6 h-6\" />\n </Link>\n )}\n <ExternalLink\n aria-label=\"NPM project page\"\n className=\"text-white! drop-shadow-black/20 drop-shadow-sm\"\n href={`https://www.npmjs.com/package/${packageName}`}\n title=\"NPM package\"\n >\n <NpmHubIcon className=\"w-8 h-8\" />\n </ExternalLink>\n <ExternalLink\n aria-label=\"GitHub project page\"\n className=\"text-white! drop-shadow-black/20 drop-shadow-sm\"\n href={`https://github.com/bvaughn/${packageName}`}\n title=\"Source code\"\n >\n <GitHubIcon className=\"w-6 h-6\" />\n </ExternalLink>\n <button\n aria-label=\"Site navigation menu\"\n className={cn(\"block md:hidden cursor-pointer rounded-lg p-1\", {\n \"bg-black/40\": !visible,\n \"bg-black/50 text-white\": visible\n })}\n onClick={toggle}\n >\n {visible ? (\n <XMarkIcon className=\"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs\" />\n ) : (\n <Bars4Icon className=\"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs\" />\n )}\n </button>\n </Box>\n </Box>\n <div className=\"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden\">\n <section\n className={cn(\n \"w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto\",\n {\n hidden: !visible\n }\n )}\n >\n <Nav children={navLinks} />\n </section>\n <main\n className={cn(\"w-full bg-black/90 relative overflow-auto\", {\n hidden: visible\n })}\n >\n <div\n className=\"h-full p-4 py-4 overflow-auto [mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)]\"\n data-main-scrollable\n >\n <Routes>\n {Object.entries({\n ...defaultRoutes,\n ...routes\n }).map(([path, Component]) => (\n <Route\n element={\n <ErrorBoundary key={path}>\n <Component />\n </ErrorBoundary>\n }\n key={path}\n path={path}\n />\n ))}\n </Routes>\n </div>\n </main>\n </div>\n </div>\n </BrowserRouter>\n </LibraryContext.Provider>\n );\n}\n","import type { HTMLAttributes, PropsWithChildren } from \"react\";\nimport { ErrorBoundary } from \"./ErrorBoundary\";\n\nexport function Block({\n children,\n className,\n ...rest\n}: PropsWithChildren<HTMLAttributes<HTMLDivElement> & { className?: string }>) {\n return (\n <ErrorBoundary>\n <div\n className={`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${className}`}\n {...rest}\n >\n {children}\n </div>\n </ErrorBoundary>\n );\n}\n","import * as React from \"react\";\nconst SvgCheckboxChecked = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 -960 960 960\", width: \"24px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m424-424-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-424ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z\" }));\nexport default SvgCheckboxChecked;\n","import * as React from \"react\";\nconst SvgCheckboxIndeterminate = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 -960 960 960\", width: \"24px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M320-440h320q17 0 28.5-11.5T680-480q0-17-11.5-28.5T640-520H320q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z\" }));\nexport default SvgCheckboxIndeterminate;\n","import * as React from \"react\";\nconst SvgCheckboxUnchecked = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 -960 960 960\", width: \"24px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z\" }));\nexport default SvgCheckboxUnchecked;\n","import {\n type FunctionComponent,\n type HTMLAttributes,\n type PropsWithChildren,\n type SVGProps\n} from \"react\";\nimport CheckedIcon from \"../../public/svgs/checkbox-checked.svg?react\";\nimport IndeterminateIcon from \"../../public/svgs/checkbox-indeterminate.svg?react\";\nimport UncheckedIcon from \"../../public/svgs/checkbox-unchecked.svg?react\";\n\nexport function Checkbox({\n checked,\n children,\n className,\n indeterminate,\n onChange,\n ...rest\n}: PropsWithChildren<\n Omit<HTMLAttributes<HTMLElement>, \"defaultChecked\" | \"onChange\"> & {\n checked: boolean;\n className?: string | undefined;\n indeterminate?: boolean;\n onChange: (value: boolean) => void;\n }\n>) {\n let IconElement: FunctionComponent<SVGProps<SVGSVGElement>>;\n let iconClassName: string;\n if (indeterminate) {\n IconElement = IndeterminateIcon;\n iconClassName = \"fill-white\";\n } else if (checked) {\n IconElement = CheckedIcon;\n iconClassName = \"fill-blue-600\";\n } else {\n IconElement = UncheckedIcon;\n iconClassName = \"fill-slate-600\";\n }\n\n return (\n <label\n className={`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${className}`}\n data-focus-within\n {...rest}\n >\n <input\n checked={checked}\n className=\"w-0 h-0\"\n onChange={(event) => {\n onChange(event.currentTarget.checked);\n }}\n type=\"checkbox\"\n />\n <IconElement className={iconClassName} />\n {children && <>&nbsp;{children}</>}\n </label>\n );\n}\n","import { cn } from \"../../utils/cn\";\nimport \"./code-mirror.css\";\n\nexport function Code({\n className = \"\",\n html\n}: {\n className?: string;\n html: string;\n}) {\n return (\n <div className=\"relative\">\n <code\n className={cn(\n \"text-sm md:text-base block text-left whitespace-pre-wrap break-normal text-white! rounded-md p-3 bg-black\",\n \"flex flex-col\",\n className\n )}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n </div>\n );\n}\n","import type { Section } from \"../types\";\nimport { Box } from \"./Box\";\nimport { Callout } from \"./Callout\";\n\nexport function DocsSection({\n className,\n sections\n}: {\n className?: string;\n sections: Section[];\n}) {\n return (\n <Box className={className} direction=\"column\" gap={2}>\n {sections.map(({ content, intent }, index) => {\n if (intent) {\n return (\n <Callout key={index} html inline intent={intent} minimal>\n {content}\n </Callout>\n );\n }\n\n return (\n <div\n key={index}\n dangerouslySetInnerHTML={{\n __html: content.replaceAll(\"<ul>\", '<ul class=\"list-disc pl-4\">')\n }}\n ></div>\n );\n })}\n </Box>\n );\n}\n","export function assert(\n expectedCondition: unknown,\n message: string = \"Assertion error\"\n): asserts expectedCondition {\n if (!expectedCondition) {\n throw Error(message);\n }\n}\n","import { useContext } from \"react\";\nimport { LibraryContext } from \"../contexts/LibraryContext\";\nimport { assert } from \"../utils/assert\";\n\nexport function useLibraryContext() {\n const context = useContext(LibraryContext);\n assert(context, \"App must be rendered within a LibraryContextProvider\");\n\n return context;\n}\n","import { ChevronRightIcon } from \"@heroicons/react/20/solid\";\nimport { useLibraryContext } from \"../hooks/useLibraryContext\";\nimport { Box } from \"./Box\";\n\nexport function Header({\n section,\n title: titleProp\n}: {\n section?: string;\n title: string;\n}) {\n const { packageName } = useLibraryContext();\n\n const title = `${packageName}: ${section ? `${section}: ${titleProp}` : titleProp}`;\n\n return (\n <>\n <Box align=\"center\" direction=\"row\" gap={2} wrap>\n {section && (\n <>\n <div className=\"text-xl whitespace-nowrap\">{section}</div>\n <ChevronRightIcon className=\"size-4 text-slate-400\" />\n </>\n )}\n <div className=\"text-xl whitespace-nowrap\">{title}</div>\n </Box>\n\n <title>{title}</title>\n </>\n );\n}\n","import type { ImperativeHandleMethodMetadata } from \"../../types\";\nimport { Code } from \"../code/Code\";\nimport { DocsSection } from \"../DocsSection\";\n\nexport function ImperativeHandleMethod({\n method\n}: {\n method: ImperativeHandleMethodMetadata;\n}) {\n return (\n <>\n <dd className=\"[&_code]:text-sky-300 text-lg font-bold\">{method.name}</dd>\n <dt className=\"mt-2\">\n <DocsSection sections={method.description} />\n <Code className=\"mt-2 p-2 flex flex-col\" html={method.html} />\n </dt>\n </>\n );\n}\n","import { ArrowTopRightOnSquareIcon } from \"@heroicons/react/20/solid\";\nimport { repository } from \"../../../package.json\";\nimport type { ImperativeHandleMetadata } from \"../../types\";\nimport { Box } from \"../Box\";\nimport { DocsSection } from \"../DocsSection\";\nimport { ExternalLink } from \"../ExternalLink\";\nimport { Header } from \"../Header\";\nimport { ImperativeHandleMethod } from \"./ImperativeHandleMethod\";\n\nexport function ImperativeHandle({\n json,\n section\n}: {\n json: ImperativeHandleMetadata;\n section: string;\n}) {\n return (\n <Box direction=\"column\" gap={4}>\n <Box align=\"center\" direction=\"row\" gap={2} wrap>\n <Header section={section} title={`${json.name}`} />\n <ExternalLink\n className=\"text-sm text-emerald-300 hover:text-white\"\n href={`${repository.url.replace(\".git\", \"\")}/blob/main/${json.filePath}`}\n >\n <ArrowTopRightOnSquareIcon className=\"inline-block size-4 fill-current\" />\n </ExternalLink>\n </Box>\n <DocsSection sections={json.description} />\n <Box direction=\"column\">\n <dl className=\"flex flex-col gap-2\">\n {json.methods.map((method, index) => (\n <ImperativeHandleMethod key={index} method={method} />\n ))}\n </dl>\n </Box>\n </Box>\n );\n}\n","import type { InputHTMLAttributes, PropsWithChildren } from \"react\";\n\nexport function Input<Type extends string>({\n children,\n className,\n onChange,\n value,\n ...rest\n}: PropsWithChildren<\n Omit<InputHTMLAttributes<HTMLInputElement>, \"onChange\"> & {\n className?: string | undefined;\n onChange: (value: Type) => void;\n value: Type;\n }\n>) {\n return (\n <input\n className={`rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-emerald-300 ${className}`}\n data-focus\n onChange={(event) => {\n onChange(event.currentTarget.value as Type);\n }}\n value={value}\n {...rest}\n >\n {children}\n </input>\n );\n}\n","import { ArrowPathIcon } from \"@heroicons/react/20/solid\";\nimport { Box } from \"./Box\";\n\nexport function LoadingSpinner() {\n return (\n <Box align=\"center\" className=\"text-slate-300\" direction=\"row\" gap={2}>\n <ArrowPathIcon className=\"size-4 animate-spin\" />\n Loading...\n </Box>\n );\n}\n","import type { PropsWithChildren } from \"react\";\nimport { Box } from \"../Box\";\nimport { cn } from \"../../utils/cn\";\n\nexport function NavButton({\n children,\n className,\n disabled\n}: PropsWithChildren<{ className?: string; disabled?: boolean }>) {\n return (\n <Box\n align=\"center\"\n className={cn(\n \"px-4 h-8 cursor-pointer text-white/90 hover:text-white focus:bg-white/10 focus-within:bg-white/10\",\n { \"pointer-events-none text-white/50\": disabled },\n className\n )}\n direction=\"row\"\n gap={1}\n >\n {children}\n </Box>\n );\n}\n","import { type PropsWithChildren } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Box } from \"../Box\";\nimport { Link } from \"../Link\";\nimport { NavButton } from \"./NavButton\";\n\nexport function NavLink({\n children,\n className,\n path\n}: PropsWithChildren<{\n className?: string | undefined;\n path: string;\n}>) {\n return (\n <Link to={path}>\n {({ isActive, isPending }) => (\n <NavButton\n className={cn(\n \"px-4 cursor-pointer\",\n {\n \"font-bold text-nav-active hover:text-nav-hover\": isActive,\n \"opacity-50 pointer-events-none\": isPending\n },\n className\n )}\n >\n <Box align=\"center\" direction=\"row\" gap={2}>\n {children}\n </Box>\n </NavButton>\n )}\n </Link>\n );\n}\n","import {\n Disclosure,\n DisclosureButton,\n DisclosurePanel\n} from \"@headlessui/react\";\nimport { ChevronRightIcon } from \"@heroicons/react/20/solid\";\nimport type { PropsWithChildren, ReactNode } from \"react\";\nimport { NavButton } from \"./NavButton\";\n\nexport function NavSection({\n children,\n label\n}: PropsWithChildren<{ label: ReactNode }>) {\n return (\n <Disclosure as=\"section\" defaultOpen={true}>\n <DisclosureButton className=\"w-full group border-none! data-focus:bg-white/10\">\n <NavButton>\n <div className=\"uppercase text-sm font-bold text-white/50\">\n {label}\n </div>\n <div className=\"grow\" />\n <ChevronRightIcon className=\"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90\" />\n </NavButton>\n </DisclosureButton>\n <DisclosurePanel className=\"pl-4\">{children}</DisclosurePanel>\n </Disclosure>\n );\n}\n","import type { ComponentMetadata, ComponentPropMetadata } from \"../types\";\n\nexport function processPropsJSON(json: ComponentMetadata) {\n const optionalProps: ComponentPropMetadata[] = [];\n const requiredProps: ComponentPropMetadata[] = [];\n\n Object.values(json.props).forEach((prop) => {\n if (prop.required) {\n requiredProps.push(prop);\n } else {\n optionalProps.push(prop);\n }\n });\n\n optionalProps.sort((a, b) => a.name.localeCompare(b.name));\n requiredProps.sort((a, b) => a.name.localeCompare(b.name));\n\n return { optionalProps, requiredProps };\n}\n","import type { ComponentPropMetadata } from \"../../types\";\nimport { Code } from \"../code/Code\";\nimport { DocsSection } from \"../DocsSection\";\n\nexport function ComponentProp({ prop }: { prop: ComponentPropMetadata }) {\n return (\n <>\n <dt className=\"mt-6 pl-8 indent-[-1rem]\">\n <Code\n className=\"bg-transparent inline-flex flex-col p-0\"\n html={prop.html}\n />\n </dt>\n <dd className=\"mt-2 pl-4 [&_code]:text-sky-300\">\n <DocsSection sections={prop.description} />\n </dd>\n </>\n );\n}\n","import type { ComponentPropMetadata } from \"../../types\";\nimport { Box } from \"../Box\";\nimport { ComponentProp } from \"./ComponentProp\";\n\nexport function ComponentPropsSection({\n header,\n props\n}: {\n header: string;\n props: ComponentPropMetadata[];\n}) {\n if (props.length === 0) {\n return null;\n }\n\n return (\n <Box direction=\"column\">\n <div className=\"text-lg font-bold\">{header}</div>\n <dl>\n {props.map((prop) => (\n <ComponentProp key={prop.name} prop={prop} />\n ))}\n </dl>\n </Box>\n );\n}\n","import { ArrowTopRightOnSquareIcon } from \"@heroicons/react/20/solid\";\nimport { useMemo } from \"react\";\nimport { repository } from \"../../../package.json\";\nimport type { ComponentMetadata } from \"../../types\";\nimport { processPropsJSON } from \"../../utils/processPropsJSON\";\nimport { Box } from \"../Box\";\nimport { DocsSection } from \"../DocsSection\";\nimport { ExternalLink } from \"../ExternalLink\";\nimport { Header } from \"../Header\";\nimport { ComponentPropsSection } from \"./ComponentPropsSection\";\n\nexport function ComponentProps({\n json,\n section\n}: {\n json: ComponentMetadata;\n section: string;\n}) {\n const { optionalProps, requiredProps } = useMemo(\n () => processPropsJSON(json),\n [json]\n );\n\n return (\n <Box direction=\"column\" gap={4}>\n <Box align=\"center\" direction=\"row\" gap={2} wrap>\n <Header section={section} title={`${json.name} component`} />\n <ExternalLink\n className=\"text-sm text-emerald-300 hover:text-white\"\n href={`${repository.url.replace(\".git\", \"\")}/blob/main/${json.filePath}`}\n >\n <ArrowTopRightOnSquareIcon className=\"inline-block size-4 fill-current\" />\n </ExternalLink>\n </Box>\n <DocsSection sections={json.description} />\n <ComponentPropsSection header=\"Required props\" props={requiredProps} />\n <ComponentPropsSection header=\"Optional props\" props={optionalProps} />\n </Box>\n );\n}\n","import * as React from \"react\";\nconst SvgRadioChecked = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 -960 960 960\", width: \"24px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z\" }));\nexport default SvgRadioChecked;\n","import * as React from \"react\";\nconst SvgRadioUnchecked = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 -960 960 960\", width: \"24px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z\" }));\nexport default SvgRadioUnchecked;\n","import {\n type FunctionComponent,\n type HTMLAttributes,\n type PropsWithChildren,\n type SVGProps\n} from \"react\";\nimport CheckedIcon from \"../../public/svgs/radio-checked.svg?react\";\nimport UncheckedIcon from \"../../public/svgs/radio-unchecked.svg?react\";\n\nexport function Radio<Value extends string>({\n checked,\n children,\n className,\n name,\n onChange,\n value,\n ...rest\n}: PropsWithChildren<\n Omit<HTMLAttributes<HTMLElement>, \"defaultChecked\" | \"onChange\"> & {\n checked: boolean;\n name: string;\n onChange: (value: Value) => void;\n value: Value;\n }\n>) {\n let IconElement: FunctionComponent<SVGProps<SVGSVGElement>>;\n let iconClassName: string;\n if (checked) {\n IconElement = CheckedIcon;\n iconClassName = \"fill-blue-600\";\n } else {\n IconElement = UncheckedIcon;\n iconClassName = \"fill-slate-600\";\n }\n\n return (\n <label\n className={`cursor-pointer rounded-full flex flex-row items-center outline-none group ${className}`}\n data-focus-within\n {...rest}\n >\n <input\n checked={checked}\n className=\"w-0 h-0\"\n name={name}\n onChange={() => {\n onChange(value);\n }}\n type=\"radio\"\n value={value}\n />\n <IconElement className={iconClassName} />\n {children && <>&nbsp;{children}</>}\n </label>\n );\n}\n","import {\n Listbox,\n ListboxButton,\n ListboxOption,\n ListboxOptions,\n Transition\n} from \"@headlessui/react\";\nimport { ChevronUpDownIcon } from \"@heroicons/react/20/solid\";\nimport { Fragment } from \"react\";\nimport { cn } from \"../utils/cn\";\n\nexport type Option<Value extends string> = {\n label: string;\n value: Value;\n};\n\nexport function Select<Value extends string>({\n className,\n defaultValue,\n onChange,\n options,\n placeholder = \"\",\n value\n}: {\n className?: string;\n defaultValue?: Option<Value> | undefined;\n onChange: (value: Option<Value>) => void;\n options: Option<Value>[];\n placeholder?: string;\n value: Option<Value> | undefined;\n}) {\n return (\n <Listbox value={(value ?? defaultValue)!} onChange={onChange}>\n <div className={`relative ${className}`}>\n <ListboxButton\n className=\"w-full h-9 text-left rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-teal-300\"\n data-focus\n >\n {value?.label ? (\n <span className=\"block truncate\">{value.label}</span>\n ) : (\n <span className=\"block truncate text-slate-500\">{placeholder}</span>\n )}\n <span className=\"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2\">\n <ChevronUpDownIcon\n className=\"h-4 w-4 text-gray-400\"\n aria-hidden=\"true\"\n />\n </span>\n </ListboxButton>\n <Transition as={Fragment} leaveFrom=\"opacity-100\" leaveTo=\"opacity-0\">\n <ListboxOptions\n className=\"absolute z-10 mt-1 max-h-50 w-full overflow-auto rounded-md py-1 bg-black/90\"\n data-focus\n >\n {options.map((option, index) => (\n <ListboxOption\n key={index}\n className={cn(\n \"relative cursor-pointer select-none h-7 py-1 px-2 text-slate-300 border-none!\",\n \"data-focus:text-teal-300 data-focus:bg-black\",\n \"data-active:text-teal-300 data-active:bg-black\",\n \"data-selected:text-teal-300 data-selected:font-bold\"\n )}\n value={option}\n >\n {option.label}\n </ListboxOption>\n ))}\n </ListboxOptions>\n </Transition>\n </div>\n </Listbox>\n );\n}\n","import type { Intent } from \"../types\";\n\nexport function getIntentClassNames(intent: Intent, minimal?: boolean) {\n switch (intent) {\n case \"danger\": {\n if (minimal) {\n return \"bg-red-950 text-red-300 [&_svg]:text-red-500\";\n }\n return \"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!\";\n }\n case \"none\": {\n if (minimal) {\n return \"bg-white/10 text-slate-300 [&_svg]:text-slate-400\";\n }\n return \"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60\";\n }\n case \"primary\": {\n if (minimal) {\n return \"bg-sky-950 text-sky-300 [&_svg]:text-sky-400\";\n }\n return \"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400\";\n }\n case \"success\": {\n if (minimal) {\n return \"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400\";\n }\n return \"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400\";\n }\n case \"warning\": {\n if (minimal) {\n return \"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300\";\n }\n return \"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!\";\n }\n }\n}\n"],"names":["ArrowPathIcon","title","titleId","props","svgRef","React","ForwardRef","ArrowTopRightOnSquareIcon","Bars4Icon","CheckCircleIcon","ChevronRightIcon","ChevronUpDownIcon","ExclamationTriangleIcon","InformationCircleIcon","XMarkIcon","PopStateEventType","createBrowserHistory","options","createBrowserLocation","window2","globalHistory","pathname","search","hash","createLocation","createBrowserHref","to","createPath","getUrlBasedHistory","invariant","value","message","warning","cond","createKey","getHistoryState","location","index","current","state","key","parsePath","path","parsedPath","hashIndex","searchIndex","getLocation","createHref2","validateLocation","v5Compat","action","listener","getIndex","handlePop","nextIndex","delta","history","push","historyState","url","error","replace2","createURL","createBrowserURLImpl","fn","n","isAbsolute","base","href","matchRoutes","routes","locationArg","basename","matchRoutesImpl","allowPartial","stripBasename","branches","flattenRoutes","rankRouteBranches","matches","i","decoded","decodePath","matchRouteBranch","parentsMeta","parentPath","_hasParentOptionalSegments","flattenRoute","route","hasParentOptionalSegments","relativePath","meta","joinPaths","routesMeta","computeScore","exploded","explodeOptionalSegments","segments","first","rest","isOptional","required","restExploded","result","subpath","a","b","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","s","initialScore","score","segment","branch","matchedParams","matchedPathname","end","remainingPathname","match","matchPath","normalizePathname","pattern","matcher","compiledParams","compilePath","pathnameBase","captureGroups","memo2","paramName","splatValue","caseSensitive","params","regexpSource","_","v","startIndex","nextChar","ABSOLUTE_URL_REGEX","isAbsoluteUrl","resolvePath","fromPathname","toPathname","oldPathname","resolvePathname","normalizeSearch","normalizeHash","getInvalidPathError","char","field","dest","getPathContributingMatches","getResolveToMatches","pathMatches","idx","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","from","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","paths","isRouteErrorResponse","getRoutePattern","m","validMutationMethodsArr","validRequestMethodsArr","DataRouterContext","DataRouterStateContext","ViewTransitionContext","FetchersContext","AwaitContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","useHref","relative","useInRouterContext","navigator","React2","useResolvedPath","joinedPathname","useLocation","useMatch","navigateEffectWarning","useIsomorphicLayoutEffect","cb","useNavigate","isDataRoute","useNavigateStable","useNavigateUnstable","dataRouterContext","routePathnamesJson","activeRef","useRoutes","useRoutesImpl","dataRouterState","unstable_onError","future","parentMatches","routeMatch","parentParams","parentPathname","parentPathnameBase","parentRoute","warningOnce","locationFromContext","parsedLocationArg","parentSegments","renderedMatches","_renderMatches","DefaultErrorComponent","useRouteError","stack","lightgrey","preStyles","codeStyles","devInfo","defaultErrorElement","RenderErrorBoundary","errorInfo","RenderedRoute","routeContext","children","errors","errorIndex","renderFallback","fallbackIndex","loaderData","errors2","needsToRunLoader","onError","outlet","shouldRenderHydrateFallback","errorElement","hydrateFallbackElement","matches2","getChildren","getDataRouterConsoleError","hookName","useDataRouterContext","ctx","useDataRouterState","useRouteContext","useCurrentRouteId","thisRoute","useRouteId","routeId","router","id","alreadyWarned","React3","DataRoutes","Route","Router","basenameProp","locationProp","navigationType","staticProp","unstable_useTransitions","navigationContext","locationContext","trailingPathname","Routes","createRoutesFromChildren","element","treePath","defaultMethod","defaultEncType","isHtmlElement","object","isButtonElement","isFormElement","isInputElement","isModifiedEvent","event","shouldProcessLinkClick","target","_formDataSupportsSubmitter","isFormDataSubmitterSupported","supportedFormEncTypes","getFormEncType","encType","getFormSubmissionInfo","method","formData","body","attr","form","name","type","prefix","invariant2","singleFetchUrl","reqUrl","extension","loadRouteModule","routeModulesCache","routeModule","isHtmlLinkDescriptor","getKeyedPrefetchLinks","manifest","routeModules","links","mod","dedupeLinkDescriptors","link","getNewMatchesForLinks","page","nextMatches","currentMatches","mode","isNew","matchPathChanged","manifestRoute","routeChoice","getModuleLinkHrefs","includeHydrateFallback","dedupeHrefs","hrefs","sortKeys","obj","sorted","keys","descriptors","preloads","set","deduped","descriptor","useDataRouterContext2","context","React8","useDataRouterStateContext","FrameworkContext","useFrameworkContext","usePrefetchBehavior","prefetch","theirElementProps","frameworkContext","maybePrefetch","setMaybePrefetch","shouldPrefetch","setShouldPrefetch","onFocus","onBlur","onMouseEnter","onMouseLeave","onTouchStart","ref","callback","entries","entry","observer","setIntent","cancelIntent","composeEventHandlers","theirHandler","ourHandler","PrefetchPageLinks","linkProps","PrefetchPageLinksImpl","useKeyedPrefetchLinks","keyedPrefetchLinks","setKeyedPrefetchLinks","interrupted","newMatchesForData","newMatchesForAssets","dataHrefs","routesParams","foundOptOutRoute","m2","moduleHrefs","mergeRefs","refs","isBrowser","BrowserRouter","historyRef","React10","setStateImpl","setState","newState","ABSOLUTE_URL_REGEX2","Link","onClick","discover","reloadDocument","preventScrollReset","viewTransition","forwardedRef","absoluteHref","isExternal","currentUrl","targetUrl","prefetchRef","prefetchHandlers","internalOnClick","useLinkClickHandler","handleClick","NavLink","ariaCurrentProp","classNameProp","styleProp","routerState","isTransitioning","useViewTransitionState","nextLocationPathname","endSlashPosition","isActive","isPending","renderProps","ariaCurrent","className","style","Form","fetcherKey","navigate","onSubmit","submit","useSubmit","formAction","useFormAction","formMethod","submitHandler","submitter","submitMethod","doSubmit","getDataRouterConsoleError2","useDataRouterContext3","replaceProp","doNavigate","fetcherId","getUniqueFetcherId","currentRouteId","routerFetch","routerNavigate","indexValues","qs","vtContext","currentPath","nextPath","SvgGithub","SvgNpm","SvgTags","LibraryContext","createContext","createStoreImpl","createState","listeners","partial","replace","nextState","previousState","getState","api","initialState","createStore","identity","arg","useStore","selector","slice","createImpl","useBoundStore","create","useNavStore","r","f","clsx","concatArrays","array1","array2","combinedArray","createClassValidatorObject","classGroupId","validator","createClassPartObject","nextPart","validators","CLASS_PART_SEPARATOR","EMPTY_CONFLICTS","ARBITRARY_PROPERTY_PREFIX","createClassGroupUtils","config","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","getGroupIdForArbitraryProperty","classParts","getGroupRecursive","hasPostfixModifier","modifierConflicts","baseConflicts","classPartObject","currentClassPart","nextClassPartObject","classRest","validatorsLength","validatorObj","content","colonIndex","property","theme","classGroups","processClassGroups","group","processClassesRecursively","classGroup","len","classDefinition","processClassDefinition","processStringDefinition","processFunctionDefinition","processObjectDefinition","classPartObjectToEdit","getPart","isThemeGetter","parts","part","next","func","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","EMPTY_MODIFIERS","createResultObject","modifiers","hasImportantModifier","baseClassName","maybePostfixModifierPosition","createParseClassName","experimentalParseClassName","parseClassName","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","currentCharacter","baseClassNameWithImportantModifier","fullPrefix","parseClassNameOriginal","createSortModifiers","modifierWeights","currentSegment","modifier","isArbitrary","isOrderSensitive","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","sortModifiers","classGroupsInConflict","classNames","originalClassName","variantModifier","modifierId","classId","conflictGroups","twJoin","classLists","argument","resolvedValue","string","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","args","fallbackThemeArr","fromTheme","themeGetter","arbitraryValueRegex","arbitraryVariableRegex","fractionRegex","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isFraction","isNumber","isInteger","isPercent","isTshirtSize","isAny","isLengthOnly","isNever","isShadow","isImage","isAnyNonArbitrary","isArbitraryValue","isArbitraryVariable","isArbitrarySize","getIsArbitraryValue","isLabelSize","isArbitraryLength","isLabelLength","isArbitraryNumber","isLabelNumber","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isLabelFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","testLabel","testValue","shouldMatchNoLabel","label","getDefaultConfig","themeColor","themeFont","themeText","themeFontWeight","themeTracking","themeLeading","themeBreakpoint","themeContainer","themeSpacing","themeRadius","themeShadow","themeInsetShadow","themeTextShadow","themeDropShadow","themeBlur","themePerspective","themeAspect","themeEase","themeAnimate","scaleBreak","scalePosition","scalePositionWithArbitrary","scaleOverflow","scaleOverscroll","scaleUnambiguousSpacing","scaleInset","scaleGridTemplateColsRows","scaleGridColRowStartAndEnd","scaleGridColRowStartOrEnd","scaleGridAutoColsRows","scaleAlignPrimaryAxis","scaleAlignSecondaryAxis","scaleMargin","scaleSizing","scaleColor","scaleBgPosition","scaleBgRepeat","scaleBgSize","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","twMerge","cn","inputs","Box","align","direction","gap","grow","justify","shrink","wrap","jsx","ErrorBoundaryContext","Component","_this$props$onReset","_this$props","_len","_key","info","_this$props$onError","_this$props2","prevProps","prevState","didCatch","resetKeys","hasArrayChanged","_this$props$onReset2","_this$props3","fallbackRender","FallbackComponent","fallback","childToRender","createElement","item","Callout","html","inline","intent","minimal","Icon","getClassNames","jsxs","$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c","$HgANd$react","$8ae05eaa5c114e9c$var$_React_useInsertionEffect","$8ae05eaa5c114e9c$var$useEarlyEffect","$lmaYr$react","$8ae05eaa5c114e9c$export$7f54fc3180508a52","$lmaYr$useRef","$lmaYr$useCallback","$431fbd86ca7dc216$export$b204af158042fbac","el","_el_ownerDocument","$431fbd86ca7dc216$export$f21a1ffae260145a","$431fbd86ca7dc216$var$isNode","$431fbd86ca7dc216$export$af51f0f06c0f328a","node","$f4e2df6bd15f8569$var$_shadowDOM","$f4e2df6bd15f8569$export$98658e8c59125e6a","$d4ee10de306f2510$export$4282f70798064fe0","otherNode","$lcSu5$shadowDOM","currentNode","$d4ee10de306f2510$export$cd4e5573fbe2b576","doc","_activeElement_shadowRoot","activeElement","$d4ee10de306f2510$export$e58f029f0fbfdb29","$c87311424ea30a05$var$testUserAgent","re","_window_navigator_userAgentData","brands","brand","$c87311424ea30a05$var$testPlatform","$c87311424ea30a05$var$cached","res","$c87311424ea30a05$export$9ac100e40613ea10","$c87311424ea30a05$export$186c6964ca17d99","$c87311424ea30a05$export$7bef049ce92e4224","$c87311424ea30a05$export$fedb369cb70207f1","$c87311424ea30a05$export$6446a186d09e379e","$c87311424ea30a05$export$a11b0059900ceec8","$03deb23ff14920c4$export$4eaf04e54aa8eed6","globalListeners","$lPAwt$useRef","addGlobalListener","$lPAwt$useCallback","eventTarget","removeGlobalListener","_globalListeners_current_get","removeAllGlobalListeners","$lPAwt$useEffect","$6a7db85432448f7f$export$60278871457622de","$8a9cb279dc87e130$export$525bc4921d56d4a","nativeEvent","$8a9cb279dc87e130$export$c2b7abe5d61ec696","$8a9cb279dc87e130$export$715c682d09d639cc","stateRef","$6dfIe$useRef","$6dfIe$useLayoutEffect","dispatchBlur","$6dfIe$useEffectEvent","e","$6dfIe$useCallback","onBlurHandler","_stateRef_current_observer","relatedTargetEl","$8a9cb279dc87e130$export$fda7da73ab5d4c48","$507fabe10e71c6fb$var$currentModality","$507fabe10e71c6fb$var$changeHandlers","$507fabe10e71c6fb$export$d90243b58daecda7","$507fabe10e71c6fb$var$hasEventBeforeFocus","$507fabe10e71c6fb$var$hasBlurredWindowRecently","$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS","$507fabe10e71c6fb$var$triggerChangeHandlers","modality","handler","$507fabe10e71c6fb$var$isValidKey","$28AnR$isMac","$507fabe10e71c6fb$var$handleKeyboardEvent","$507fabe10e71c6fb$var$handlePointerEvent","$507fabe10e71c6fb$var$handleClickEvent","$28AnR$isVirtualClick","$507fabe10e71c6fb$var$handleFocusEvent","$507fabe10e71c6fb$var$handleWindowBlur","$507fabe10e71c6fb$var$setupGlobalFocusEvents","$28AnR$getOwnerWindow","windowObject","documentObject","$28AnR$getOwnerDocument","focus","$507fabe10e71c6fb$var$tearDownWindowFocusTracking","loadListener","$507fabe10e71c6fb$export$2f1888112f558a7d","$507fabe10e71c6fb$export$b9b3dfddab17db27","$507fabe10e71c6fb$var$nonTextInputTypes","$507fabe10e71c6fb$var$isKeyboardFocusEvent","isTextInput","document1","IHTMLInputElement","IHTMLTextAreaElement","IHTMLElement","IKeyboardEvent","$507fabe10e71c6fb$export$ec71b4b83ac08ec3","deps","opts","$28AnR$useEffect","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","isDisabled","onFocusProp","onBlurProp","onFocusChange","$hf0lj$useCallback","onSyntheticFocus","ownerDocument","$hf0lj$getOwnerDocument","$hf0lj$getActiveElement","$hf0lj$getEventTarget","$9ab94262bd0047c7$export$420e68273165f4ec","onBlurWithin","onFocusWithin","onFocusWithinChange","$3b9Q0$useRef","$3b9Q0$useGlobalListeners","$3b9Q0$useCallback","$3b9Q0$getOwnerDocument","$3b9Q0$getActiveElement","$3b9Q0$getEventTarget","currentTarget","$3b9Q0$nodeContains","$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents","$6179b936705e76d3$var$hoverCount","$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents","$6179b936705e76d3$var$handleGlobalPointerEvent","$6179b936705e76d3$var$setupGlobalTouchEvents","$6179b936705e76d3$export$ae780daf29e6d456","onHoverStart","onHoverChange","onHoverEnd","isHovered","setHovered","$AWxnT$useState","$AWxnT$useRef","$AWxnT$useEffect","$AWxnT$useGlobalListeners","hoverProps","triggerHoverEnd","$AWxnT$useMemo","triggerHoverStart","pointerType","$AWxnT$getOwnerDocument","$AWxnT$nodeContains","$f7dceffc5ad7768b$export$4e328f61c538687f","autoFocus","within","$isWE5$useRef","$isWE5$isFocusVisible","isFocused","setFocused","$isWE5$useState","isFocusVisibleState","setFocusVisible","updateState","$isWE5$useCallback","$isWE5$useFocusVisibleListener","isFocusVisible","focusProps","$isWE5$useFocus","focusWithinProps","$isWE5$useFocusWithin","d","t","o$8","o","l","u","p","c","E","P","w","g","A","C","K","$","x","U","I","F","y","O","h","T","D","R","N","H","S","M","V","Y","j","B","L","n.isHTMLFieldSetElement","n.isHTMLLegendElement","G","m.isInteractiveElement","m.isHTMLLabelElement","m.isHTMLInputElement","Z","T$3","o$2","require$$0","is","objectIs","useSyncExternalStore","useRef","useEffect","useMemo","useDebugValue","useSyncExternalStoreWithSelector_production","subscribe","getSnapshot","getServerSnapshot","isEqual","instRef","inst","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","useSyncExternalStoreWithSelector_development","withSelectorModule","require$$1","c.isHTMLElement","d.isHTMLorSVGElement","d.isHTMLIframeElement","E.isNode","E.isHTMLorSVGElement","i.isHTMLorSVGElement","i.hasInlineStyle","i.isHTMLInputElement","hasWindow","getNodeName","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","isElement","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","overflow","overflowX","overflowY","display","getComputedStyle","tableElements","isTableElement","topLayerSelectors","isTopLayer","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","getParentNode","isLastTraversableNode","lastTraversableNodeNames","getNodeScroll","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","getUserAgent","uaData","version","min","max","round","floor","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","start","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","yAxisSides","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","width","height","computeCoordsFromPlacement","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","statefulPlacement","middlewareData","resetCount","nextX","nextY","data","reset","detectOverflow","_await$platform$isEle","elements","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflows","overflowsData","sides","_middlewareData$flip2","_overflowsData$filter","nextPlacement","resetPlacement","_overflowsData$filter2","currentSideAxis","acc","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","offset","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","size","_state$middlewareData","_state$middlewareData2","apply","isYAxis","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","xMin","xMax","yMin","yMax","nextDimensions","getCssDimensions","getComputedStyle$1","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","offsets","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","SCROLLBAR_MAX","getViewportRect","visualViewport","visualViewportBased","windowScrollbarX","bodyStyles","bodyMarginInline","clippingStableScrollbarWidth","absoluteOrFixed","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","rectsAreEqual","observeMove","onMove","io","timeoutId","root","cleanup","_io","refresh","skip","threshold","elementRectForRootMargin","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","autoUpdate","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","detectOverflow$1","offset$1","shift$1","flip$1","size$1","mergedOptions","platformWithCache","computePosition$1","isClient","noop","useLayoutEffect","deepEqual","getDPR","roundByDPR","dpr","useLatestRef","useFloating","externalReference","externalFloating","transform","whileElementsMounted","open","setData","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","referenceRef","setFloating","floatingRef","floatingEl","dataRef","hasWhileElementsMounted","whileElementsMountedRef","platformRef","openRef","fullData","isMountedRef","ReactDOM","floatingStyles","initialStyles","SafeReact","useInsertionEffect","useSafeInsertionEffect","useEffectEvent","serverHandoffComplete","count","genId","useFloatingId","setId","useReactId","useId","devMessageSet","warn","_devMessageSet","messages","_devMessageSet2","_devMessageSet3","_len2","_key2","_devMessageSet4","createPubSub","map","_map$get","_map$get2","FloatingNodeContext","FloatingTreeContext","useFloatingParentNodeId","_React$useContext","useFloatingTree","FOCUSABLE_ATTRIBUTE","useFloatingRootContext","onOpenChangeProp","elementsProp","floatingId","events","nested","optionDomReference","positionReference","setPositionReference","onOpenChange","reason","nodeId","internalRootContext","rootContext","computedElements","_domReference","setDomReference","_setPositionReference","domReference","domReferenceRef","tree","position","useFloating$1","computedPositionReference","ACTIVE_KEY","SELECTED_KEY","mergeProps","userProps","propsList","elementKey","isItem","domUserProps","__","validProps","propsOrGetProps","val","useInteractions","referenceDeps","floatingDeps","itemDeps","getReferenceProps","getFloatingProps","getItemProps","getArgsWithCustomFloatingHeight","inner","listRef","overflowRef","onFallbackChange","innerOffset","minItemsVisible","referenceOverflowThreshold","scrollRef","scrollEl","clientTop","floatingIsBordered","scrollElIsBordered","floatingIsScrollEl","nextArgs","refOverflow","diffY","maxHeight","useInnerOffset","enabled","unstable_onChange","onChange","controlledScrollingRef","prevScrollTopRef","initialOverflowRef","onWheel","dY","isAtTop","isAtBottom","remainingScroll","sign","scrollDiff","ye","Fe","be","Te","ae","Re","Ae","ue","ce","ge","oe","ne","ee","te","W","pe.isHTMLElement","le","ie","Q","X","se","z","fe","J","q","_e","de","De","He","Ee","ve","xe","pe","Ce","Ne","Pe","Se","he","Ie","me","Le","Oe","Ke","K.isHTMLorSVGElement","Xe","g.isHTMLElement","Pt","gt","je","Lt","lt","xt","ut","st","mt","Je","Ot","nt","et","vt","Et","ot","qe","Ye","it.isHTMLElement","dt","Be","bt","ft","Ge","ht","At","_t","Ze","rt","Ue","Ve","tt","Qe","$e","Me","ct","pt","we","We","yt","St","Dt","ke","at","ze","Rt","Ft","Ct","Mt","wt","Tt","Bt","It","kt","Mo","Button","disabled","HeadlessButton","ErrorBoundary","ErrorBoundaryExternal","resetErrorBoundary","ExternalLink","startTransition","useTransition","Nav","RouteChangeHandler","hide","main","timeout","lazy","AppRoot","navLinks","overview","packageDescription","packageName","showOpenCollectLink","versions","toggle","visible","TagsIcon","NpmHubIcon","GitHubIcon","defaultRoutes","Block","SvgCheckboxChecked","SvgCheckboxIndeterminate","SvgCheckboxUnchecked","Checkbox","checked","indeterminate","IconElement","iconClassName","IndeterminateIcon","CheckedIcon","UncheckedIcon","Fragment","Code","DocsSection","sections","assert","expectedCondition","useLibraryContext","useContext","Header","section","titleProp","ImperativeHandleMethod","ImperativeHandle","json","repository","Input","LoadingSpinner","NavButton","NavSection","Disclosure","DisclosureButton","DisclosurePanel","processPropsJSON","optionalProps","requiredProps","prop","ComponentProp","ComponentPropsSection","header","ComponentProps","SvgRadioChecked","SvgRadioUnchecked","Radio","Select","defaultValue","placeholder","Listbox","ListboxButton","Transition","ListboxOptions","option","ListboxOption","getIntentClassNames"],"mappings":"gZACA,SAASA,GAAc,CACrB,MAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EAAGC,EAAQ,CACT,OAAoBC,EAAM,cAAc,MAAO,OAAO,OAAO,CAC3D,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,YAAa,OACb,IAAKD,EACL,kBAAmBF,CACvB,EAAKC,CAAK,EAAGF,EAAqBI,EAAM,cAAc,QAAS,CAC3D,GAAIH,CACR,EAAKD,CAAK,EAAI,KAAmBI,EAAM,cAAc,OAAQ,CACzD,SAAU,UACV,EAAG,0YACH,SAAU,SACd,CAAG,CAAC,CACJ,CACA,MAAMC,GAA2BD,EAAM,WAAWL,EAAa,ECrB/D,SAASO,GAA0B,CACjC,MAAAN,EACA,QAAAC,EACA,GAAGC,CACL,EAAGC,EAAQ,CACT,OAAoBC,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A,IAAC84B,GAAA,CAAQ,MAAQpjD,GAASkjD,EAAgB,SAAA1L,EACxC,SAAAprB,EAAAA,KAAC,MAAA,CAAI,UAAW,YAAY5T,CAAS,GACnC,SAAA,CAAA4T,EAAAA,KAACi3B,GAAA,CACC,UAAU,8HACV,aAAU,GAET,SAAA,CAAArjD,GAAO,MACNsqB,MAAC,OAAA,CAAK,UAAU,iBAAkB,SAAAtqB,EAAM,KAAA,CAAM,EAE9CsqB,EAAAA,IAAC,OAAA,CAAK,UAAU,gCAAiC,SAAA64B,EAAY,EAE/D74B,EAAAA,IAAC,OAAA,CAAK,UAAU,wEACd,SAAAA,EAAAA,IAACzrB,GAAA,CACC,UAAU,wBACV,cAAY,MAAA,CAAA,CACd,CACF,CAAA,CAAA,CAAA,QAEDykD,GAAA,CAAW,GAAItC,EAAAA,SAAU,UAAU,cAAc,QAAQ,YACxD,SAAA12B,EAAAA,IAACi5B,GAAA,CACC,UAAU,+EACV,aAAU,GAET,SAAApkD,EAAQ,IAAI,CAACqkD,EAAQjjD,IACpB+pB,EAAAA,IAACm5B,GAAA,CAEC,UAAW75B,GACT,gFACA,+CACA,iDACA,qDAAA,EAEF,MAAO45B,EAEN,SAAAA,EAAO,KAAA,EATHjjD,CAAA,CAWR,CAAA,CAAA,CACH,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAEJ,CCxEO,SAASmjD,GAAoB13B,EAAgBC,EAAmB,CACrE,OAAQD,EAAA,CACN,IAAK,SACH,OAAIC,EACK,+CAEF,oGAET,IAAK,OACH,OAAIA,EACK,oDAEF,kFAET,IAAK,UACH,OAAIA,EACK,+CAEF,gFAET,IAAK,UACH,OAAIA,EACK,2DAEF,wFAET,IAAK,UACH,OAAIA,EACK,wDAEF,yGACT,CAEJ","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,14,15,17,18,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122]}