@knpkv/control-center 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +309 -0
- package/dist/client/.vite/manifest.json +452 -0
- package/dist/client/assets/ActiveWorkPage-Bvji6Tys.js +2 -0
- package/dist/client/assets/ActiveWorkPage-Bvji6Tys.js.map +1 -0
- package/dist/client/assets/ActiveWorkPage-CxNa23uW.css +1 -0
- package/dist/client/assets/AgentPage-Bom41la2.js +3 -0
- package/dist/client/assets/AgentPage-Bom41la2.js.map +1 -0
- package/dist/client/assets/AgentPage-f6WXQA21.css +1 -0
- package/dist/client/assets/AtlassianOAuthCallbackPage-Cqqgj2o3.css +1 -0
- package/dist/client/assets/AtlassianOAuthCallbackPage-dr-B9-DD.js +2 -0
- package/dist/client/assets/AtlassianOAuthCallbackPage-dr-B9-DD.js.map +1 -0
- package/dist/client/assets/AuthorizedSharePage-C-P-PNfm.js +2 -0
- package/dist/client/assets/AuthorizedSharePage-C-P-PNfm.js.map +1 -0
- package/dist/client/assets/AuthorizedSharePage-DzE_yvHI.css +1 -0
- package/dist/client/assets/BrowserCrypto-BPiuCuW-.js +2 -0
- package/dist/client/assets/BrowserCrypto-BPiuCuW-.js.map +1 -0
- package/dist/client/assets/BrowserSessionHydrator-C8F_LGhg.js +2 -0
- package/dist/client/assets/BrowserSessionHydrator-C8F_LGhg.js.map +1 -0
- package/dist/client/assets/CommandSearch-D6iFcdvj.js +2 -0
- package/dist/client/assets/CommandSearch-D6iFcdvj.js.map +1 -0
- package/dist/client/assets/CommandSearch-Df36xGJc.css +1 -0
- package/dist/client/assets/Dialog-DwSIPb-B-DVn37afM.js +42 -0
- package/dist/client/assets/Dialog-DwSIPb-B-DVn37afM.js.map +1 -0
- package/dist/client/assets/ItemsPage-DsQCbQ11.css +1 -0
- package/dist/client/assets/ItemsPage-x39U11an.js +2 -0
- package/dist/client/assets/ItemsPage-x39U11an.js.map +1 -0
- package/dist/client/assets/PairPage-D5vlz4OG.js +2 -0
- package/dist/client/assets/PairPage-D5vlz4OG.js.map +1 -0
- package/dist/client/assets/PortfolioOverview-DSUabOmm.js +2 -0
- package/dist/client/assets/PortfolioOverview-DSUabOmm.js.map +1 -0
- package/dist/client/assets/PortfolioOverview-nrb6Ebbh.css +1 -0
- package/dist/client/assets/ReleaseRoute-DyDm5s85.js +2 -0
- package/dist/client/assets/ReleaseRoute-DyDm5s85.js.map +1 -0
- package/dist/client/assets/ReleaseRoute-R3GdFaGc.css +1 -0
- package/dist/client/assets/ReleaseWorkset-6gGnZPS8.css +1 -0
- package/dist/client/assets/ReleaseWorkset-BhGacsgb.js +2 -0
- package/dist/client/assets/ReleaseWorkset-BhGacsgb.js.map +1 -0
- package/dist/client/assets/ServicesPage-CoMVH2Si.js +2 -0
- package/dist/client/assets/ServicesPage-CoMVH2Si.js.map +1 -0
- package/dist/client/assets/ServicesPage-D76DN13E.css +1 -0
- package/dist/client/assets/TimelinePage-38jhMz_L.css +1 -0
- package/dist/client/assets/TimelinePage-D8Fj_351.js +2 -0
- package/dist/client/assets/TimelinePage-D8Fj_351.js.map +1 -0
- package/dist/client/assets/WorkspaceEntityLink-BRifdJHn.js +2 -0
- package/dist/client/assets/WorkspaceEntityLink-BRifdJHn.js.map +1 -0
- package/dist/client/assets/WorkspaceEntityRoute-BwpujSqk.css +1 -0
- package/dist/client/assets/WorkspaceEntityRoute-DPci8Q8I.js +30 -0
- package/dist/client/assets/WorkspaceEntityRoute-DPci8Q8I.js.map +1 -0
- package/dist/client/assets/WorkspaceReleaseLayout-CMg2-6IQ.css +1 -0
- package/dist/client/assets/WorkspaceReleaseLayout-DDLdY0rU.js +2 -0
- package/dist/client/assets/WorkspaceReleaseLayout-DDLdY0rU.js.map +1 -0
- package/dist/client/assets/authenticatedMutationClient-D5yD0rch.js +2 -0
- package/dist/client/assets/authenticatedMutationClient-D5yD0rch.js.map +1 -0
- package/dist/client/assets/authorizedShareTransport-Dyj53kJf.js +2 -0
- package/dist/client/assets/authorizedShareTransport-Dyj53kJf.js.map +1 -0
- package/dist/client/assets/client-OmvShYdC.js +12 -0
- package/dist/client/assets/client-OmvShYdC.js.map +1 -0
- package/dist/client/assets/connectionTestTransport-c25QXx7A.js +2 -0
- package/dist/client/assets/connectionTestTransport-c25QXx7A.js.map +1 -0
- package/dist/client/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
- package/dist/client/assets/index-CkslINEH.css +1 -0
- package/dist/client/assets/index-DLoOV6Hp.js +11 -0
- package/dist/client/assets/index-DLoOV6Hp.js.map +1 -0
- package/dist/client/assets/jsx-runtime-n5LQ9ujS.js +2 -0
- package/dist/client/assets/jsx-runtime-n5LQ9ujS.js.map +1 -0
- package/dist/client/assets/patterns-DEbg7R-A-Cw0A2uKS.js +2 -0
- package/dist/client/assets/patterns-DEbg7R-A-Cw0A2uKS.js.map +1 -0
- package/dist/client/assets/presentPortfolio-CkRqd_zz.js +2 -0
- package/dist/client/assets/presentPortfolio-CkRqd_zz.js.map +1 -0
- package/dist/client/assets/presentWorkspaceItems-BU__8LcC.js +2 -0
- package/dist/client/assets/presentWorkspaceItems-BU__8LcC.js.map +1 -0
- package/dist/client/assets/releasePaths-s-fSbIM-.js +2 -0
- package/dist/client/assets/releasePaths-s-fSbIM-.js.map +1 -0
- package/dist/client/assets/releaseRoutes-DSWkTh-E.js +2 -0
- package/dist/client/assets/releaseRoutes-DSWkTh-E.js.map +1 -0
- package/dist/client/assets/serviceOnboarding-B9pvdyWf.js +2 -0
- package/dist/client/assets/serviceOnboarding-B9pvdyWf.js.map +1 -0
- package/dist/client/assets/useCompactReleasePreview-Ch3XxgJU.js +2 -0
- package/dist/client/assets/useCompactReleasePreview-Ch3XxgJU.js.map +1 -0
- package/dist/client/assets/useWorkspaceItems-D0FuHGto.js +2 -0
- package/dist/client/assets/useWorkspaceItems-D0FuHGto.js.map +1 -0
- package/dist/client/assets/workspaceEntityPaths-xAl2jRFm.js +2 -0
- package/dist/client/assets/workspaceEntityPaths-xAl2jRFm.js.map +1 -0
- package/dist/client/assets/workspaceEntityRoutes-CRcfSq7c.js +2 -0
- package/dist/client/assets/workspaceEntityRoutes-CRcfSq7c.js.map +1 -0
- package/dist/client/build-graph.json +1465 -0
- package/dist/client/index.html +17 -0
- package/dist/server/api/agent.d.ts +652 -0
- package/dist/server/api/agent.d.ts.map +1 -0
- package/dist/server/api/client.d.ts +17 -0
- package/dist/server/api/client.d.ts.map +1 -0
- package/dist/server/api/controlCenterApi.d.ts +16 -0
- package/dist/server/api/controlCenterApi.d.ts.map +1 -0
- package/dist/server/api/deliveryGraph.d.ts +8714 -0
- package/dist/server/api/deliveryGraph.d.ts.map +1 -0
- package/dist/server/api/errors.d.ts +87 -0
- package/dist/server/api/errors.d.ts.map +1 -0
- package/dist/server/api/index.d.ts +14 -0
- package/dist/server/api/index.d.ts.map +1 -0
- package/dist/server/api/index.js +12 -0
- package/dist/server/api/index.js.map +1 -0
- package/dist/server/api/liveEvents.d.ts +1120 -0
- package/dist/server/api/liveEvents.d.ts.map +1 -0
- package/dist/server/api/media.d.ts +30 -0
- package/dist/server/api/media.d.ts.map +1 -0
- package/dist/server/api/plugins.d.ts +1853 -0
- package/dist/server/api/plugins.d.ts.map +1 -0
- package/dist/server/api/portfolio.d.ts +742 -0
- package/dist/server/api/portfolio.d.ts.map +1 -0
- package/dist/server/api/session.d.ts +204 -0
- package/dist/server/api/session.d.ts.map +1 -0
- package/dist/server/api/shares.d.ts +422 -0
- package/dist/server/api/shares.d.ts.map +1 -0
- package/dist/server/api/timeline.d.ts +86 -0
- package/dist/server/api/timeline.d.ts.map +1 -0
- package/dist/server/api/wire.d.ts +4 -0
- package/dist/server/api/wire.d.ts.map +1 -0
- package/dist/server/assets/BindConfig-BjK10BEb.js +15440 -0
- package/dist/server/assets/BindConfig-BjK10BEb.js.map +1 -0
- package/dist/server/assets/controlCenterApi-tZPvRPRH.js +1430 -0
- package/dist/server/assets/controlCenterApi-tZPvRPRH.js.map +1 -0
- package/dist/server/assets/domainEvent-x7yeq-gU.js +2130 -0
- package/dist/server/assets/domainEvent-x7yeq-gU.js.map +1 -0
- package/dist/server/assets/firstPartyServices-Y41P8uke.js +49 -0
- package/dist/server/assets/firstPartyServices-Y41P8uke.js.map +1 -0
- package/dist/server/assets/manualPluginSynchronization-C0aHB4UM.js +1805 -0
- package/dist/server/assets/manualPluginSynchronization-C0aHB4UM.js.map +1 -0
- package/dist/server/assets/portfolioInvalidation-Ds9Xm4_P.js +15463 -0
- package/dist/server/assets/portfolioInvalidation-Ds9Xm4_P.js.map +1 -0
- package/dist/server/assets/readiness-CzU3vjYQ.js +1012 -0
- package/dist/server/assets/readiness-CzU3vjYQ.js.map +1 -0
- package/dist/server/build-graph.json +3948 -0
- package/dist/server/domain/actors.d.ts +147 -0
- package/dist/server/domain/actors.d.ts.map +1 -0
- package/dist/server/domain/authorizedShare.d.ts +24 -0
- package/dist/server/domain/authorizedShare.d.ts.map +1 -0
- package/dist/server/domain/deliveryGraph.d.ts +848 -0
- package/dist/server/domain/deliveryGraph.d.ts.map +1 -0
- package/dist/server/domain/domainEvent.d.ts +50 -0
- package/dist/server/domain/domainEvent.d.ts.map +1 -0
- package/dist/server/domain/firstPartyServices.d.ts +60 -0
- package/dist/server/domain/firstPartyServices.d.ts.map +1 -0
- package/dist/server/domain/freshness.d.ts +367 -0
- package/dist/server/domain/freshness.d.ts.map +1 -0
- package/dist/server/domain/governedAction/bindings.d.ts +264 -0
- package/dist/server/domain/governedAction/bindings.d.ts.map +1 -0
- package/dist/server/domain/governedAction/index.d.ts +6 -0
- package/dist/server/domain/governedAction/index.d.ts.map +1 -0
- package/dist/server/domain/governedAction/lifecycle.d.ts +71 -0
- package/dist/server/domain/governedAction/lifecycle.d.ts.map +1 -0
- package/dist/server/domain/governedAction/model.d.ts +357 -0
- package/dist/server/domain/governedAction/model.d.ts.map +1 -0
- package/dist/server/domain/governedAction/stateMachine.d.ts +450 -0
- package/dist/server/domain/governedAction/stateMachine.d.ts.map +1 -0
- package/dist/server/domain/identifiers.d.ts +110 -0
- package/dist/server/domain/identifiers.d.ts.map +1 -0
- package/dist/server/domain/index.d.ts +26 -0
- package/dist/server/domain/index.d.ts.map +1 -0
- package/dist/server/domain/index.js +52 -0
- package/dist/server/domain/index.js.map +1 -0
- package/dist/server/domain/normalizedIssue.d.ts +223 -0
- package/dist/server/domain/normalizedIssue.d.ts.map +1 -0
- package/dist/server/domain/plugins/actions.d.ts +246 -0
- package/dist/server/domain/plugins/actions.d.ts.map +1 -0
- package/dist/server/domain/plugins/bounds.d.ts +12 -0
- package/dist/server/domain/plugins/bounds.d.ts.map +1 -0
- package/dist/server/domain/plugins/descriptor.d.ts +205 -0
- package/dist/server/domain/plugins/descriptor.d.ts.map +1 -0
- package/dist/server/domain/plugins/discovery.d.ts +39 -0
- package/dist/server/domain/plugins/discovery.d.ts.map +1 -0
- package/dist/server/domain/plugins/events.d.ts +232 -0
- package/dist/server/domain/plugins/events.d.ts.map +1 -0
- package/dist/server/domain/plugins/index.d.ts +11 -0
- package/dist/server/domain/plugins/index.d.ts.map +1 -0
- package/dist/server/domain/readiness/evaluate.d.ts +4 -0
- package/dist/server/domain/readiness/evaluate.d.ts.map +1 -0
- package/dist/server/domain/readiness/index.d.ts +7 -0
- package/dist/server/domain/readiness/index.d.ts.map +1 -0
- package/dist/server/domain/readiness/material.d.ts +114 -0
- package/dist/server/domain/readiness/material.d.ts.map +1 -0
- package/dist/server/domain/readiness/model.d.ts +1736 -0
- package/dist/server/domain/readiness/model.d.ts.map +1 -0
- package/dist/server/domain/readiness/policy.d.ts +73 -0
- package/dist/server/domain/readiness/policy.d.ts.map +1 -0
- package/dist/server/domain/readiness/rollup.d.ts +6 -0
- package/dist/server/domain/readiness/rollup.d.ts.map +1 -0
- package/dist/server/domain/relationshipRepair.d.ts +97 -0
- package/dist/server/domain/relationshipRepair.d.ts.map +1 -0
- package/dist/server/domain/release.d.ts +191 -0
- package/dist/server/domain/release.d.ts.map +1 -0
- package/dist/server/domain/releaseRelay.d.ts +44 -0
- package/dist/server/domain/releaseRelay.d.ts.map +1 -0
- package/dist/server/domain/sourceRevision.d.ts +39 -0
- package/dist/server/domain/sourceRevision.d.ts.map +1 -0
- package/dist/server/domain/timeline.d.ts +105 -0
- package/dist/server/domain/timeline.d.ts.map +1 -0
- package/dist/server/domain/utcTimestamp.d.ts +9 -0
- package/dist/server/domain/utcTimestamp.d.ts.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +7 -0
- package/dist/server/server/DataRootProtocol.d.ts +80 -0
- package/dist/server/server/DataRootProtocol.d.ts.map +1 -0
- package/dist/server/server/agent/AgentJobWorker.d.ts +48 -0
- package/dist/server/server/agent/AgentJobWorker.d.ts.map +1 -0
- package/dist/server/server/agent/AgentRuntimeRegistry.d.ts +17 -0
- package/dist/server/server/agent/AgentRuntimeRegistry.d.ts.map +1 -0
- package/dist/server/server/agent/index.d.ts +4 -0
- package/dist/server/server/agent/index.d.ts.map +1 -0
- package/dist/server/server/api/ApiConfiguration.d.ts +24 -0
- package/dist/server/server/api/ApiConfiguration.d.ts.map +1 -0
- package/dist/server/server/api/ApiMiddleware.d.ts +14 -0
- package/dist/server/server/api/ApiMiddleware.d.ts.map +1 -0
- package/dist/server/server/api/ApplicationServices.d.ts +320 -0
- package/dist/server/server/api/ApplicationServices.d.ts.map +1 -0
- package/dist/server/server/api/ControlCenterApiServer.d.ts +11 -0
- package/dist/server/server/api/ControlCenterApiServer.d.ts.map +1 -0
- package/dist/server/server/api/ErrorMapping.d.ts +29 -0
- package/dist/server/server/api/ErrorMapping.d.ts.map +1 -0
- package/dist/server/server/api/Handlers.d.ts +24 -0
- package/dist/server/server/api/Handlers.d.ts.map +1 -0
- package/dist/server/server/api/LiveStreamAdmission.d.ts +34 -0
- package/dist/server/server/api/LiveStreamAdmission.d.ts.map +1 -0
- package/dist/server/server/api/RequestBoundary.d.ts +17 -0
- package/dist/server/server/api/RequestBoundary.d.ts.map +1 -0
- package/dist/server/server/api/RequestContext.d.ts +38 -0
- package/dist/server/server/api/RequestContext.d.ts.map +1 -0
- package/dist/server/server/api/RequestLimits.d.ts +79 -0
- package/dist/server/server/api/RequestLimits.d.ts.map +1 -0
- package/dist/server/server/api/index.d.ts +9 -0
- package/dist/server/server/api/index.d.ts.map +1 -0
- package/dist/server/server/application/authorizedShares.d.ts +29 -0
- package/dist/server/server/application/authorizedShares.d.ts.map +1 -0
- package/dist/server/server/application/awsResourceDiscovery.d.ts +18 -0
- package/dist/server/server/application/awsResourceDiscovery.d.ts.map +1 -0
- package/dist/server/server/application/connectionOwnership.d.ts +50 -0
- package/dist/server/server/application/connectionOwnership.d.ts.map +1 -0
- package/dist/server/server/application/deliveryGraphInspection.d.ts +59 -0
- package/dist/server/server/application/deliveryGraphInspection.d.ts.map +1 -0
- package/dist/server/server/application/errors.d.ts +10 -0
- package/dist/server/server/application/errors.d.ts.map +1 -0
- package/dist/server/server/application/fakeReleaseNormalization.d.ts +152 -0
- package/dist/server/server/application/fakeReleaseNormalization.d.ts.map +1 -0
- package/dist/server/server/application/index.d.ts +17 -0
- package/dist/server/server/application/index.d.ts.map +1 -0
- package/dist/server/server/application/liveEvents.d.ts +22 -0
- package/dist/server/server/application/liveEvents.d.ts.map +1 -0
- package/dist/server/server/application/manualPluginSynchronization.d.ts +41 -0
- package/dist/server/server/application/manualPluginSynchronization.d.ts.map +1 -0
- package/dist/server/server/application/mediaReads.d.ts +14 -0
- package/dist/server/server/application/mediaReads.d.ts.map +1 -0
- package/dist/server/server/application/normalizedPluginPageMaterialization.d.ts +109 -0
- package/dist/server/server/application/normalizedPluginPageMaterialization.d.ts.map +1 -0
- package/dist/server/server/application/pluginAdministration.d.ts +1318 -0
- package/dist/server/server/application/pluginAdministration.d.ts.map +1 -0
- package/dist/server/server/application/pluginSynchronizationAuthority.d.ts +22 -0
- package/dist/server/server/application/pluginSynchronizationAuthority.d.ts.map +1 -0
- package/dist/server/server/application/portfolioInvalidation.d.ts +35 -0
- package/dist/server/server/application/portfolioInvalidation.d.ts.map +1 -0
- package/dist/server/server/application/portfolioSnapshots.d.ts +12 -0
- package/dist/server/server/application/portfolioSnapshots.d.ts.map +1 -0
- package/dist/server/server/application/readinessDigests.d.ts +3 -0
- package/dist/server/server/application/readinessDigests.d.ts.map +1 -0
- package/dist/server/server/application/relationshipInference.d.ts +57 -0
- package/dist/server/server/application/relationshipInference.d.ts.map +1 -0
- package/dist/server/server/application/relationshipInferenceMaterialization.d.ts +26 -0
- package/dist/server/server/application/relationshipInferenceMaterialization.d.ts.map +1 -0
- package/dist/server/server/application/relationshipRepairProposals.d.ts +41 -0
- package/dist/server/server/application/relationshipRepairProposals.d.ts.map +1 -0
- package/dist/server/server/application/releaseAgent.d.ts +30 -0
- package/dist/server/server/application/releaseAgent.d.ts.map +1 -0
- package/dist/server/server/application/releaseAgentJobs.d.ts +26 -0
- package/dist/server/server/application/releaseAgentJobs.d.ts.map +1 -0
- package/dist/server/server/application/releaseSynchronization.d.ts +55 -0
- package/dist/server/server/application/releaseSynchronization.d.ts.map +1 -0
- package/dist/server/server/application/timelineExportAudits.d.ts +22 -0
- package/dist/server/server/application/timelineExportAudits.d.ts.map +1 -0
- package/dist/server/server/application/timelineExports.d.ts +46 -0
- package/dist/server/server/application/timelineExports.d.ts.map +1 -0
- package/dist/server/server/application/timelineReads.d.ts +29 -0
- package/dist/server/server/application/timelineReads.d.ts.map +1 -0
- package/dist/server/server/auth/Auth.d.ts +169 -0
- package/dist/server/server/auth/Auth.d.ts.map +1 -0
- package/dist/server/server/auth/AuthRepository.d.ts +160 -0
- package/dist/server/server/auth/AuthRepository.d.ts.map +1 -0
- package/dist/server/server/auth/TerminalRecovery.d.ts +35 -0
- package/dist/server/server/auth/TerminalRecovery.d.ts.map +1 -0
- package/dist/server/server/auth/errors.d.ts +31 -0
- package/dist/server/server/auth/errors.d.ts.map +1 -0
- package/dist/server/server/auth/index.d.ts +5 -0
- package/dist/server/server/auth/index.d.ts.map +1 -0
- package/dist/server/server/auth/models.d.ts +63 -0
- package/dist/server/server/auth/models.d.ts.map +1 -0
- package/dist/server/server/cli.d.ts +3 -0
- package/dist/server/server/cli.d.ts.map +1 -0
- package/dist/server/server/cli.js +669 -0
- package/dist/server/server/cli.js.map +1 -0
- package/dist/server/server/cliArguments.d.ts +21 -0
- package/dist/server/server/cliArguments.d.ts.map +1 -0
- package/dist/server/server/cliConfiguration.d.ts +20 -0
- package/dist/server/server/cliConfiguration.d.ts.map +1 -0
- package/dist/server/server/governance/governedActionAuthority.d.ts +54 -0
- package/dist/server/server/governance/governedActionAuthority.d.ts.map +1 -0
- package/dist/server/server/governance/governedActionDigests.d.ts +1348 -0
- package/dist/server/server/governance/governedActionDigests.d.ts.map +1 -0
- package/dist/server/server/governance/internal/GovernedActionExecutionEngine.d.ts +55 -0
- package/dist/server/server/governance/internal/GovernedActionExecutionEngine.d.ts.map +1 -0
- package/dist/server/server/governance/internal/GovernedActionExecutionStore.d.ts +116 -0
- package/dist/server/server/governance/internal/GovernedActionExecutionStore.d.ts.map +1 -0
- package/dist/server/server/governance/internal/GovernedActionPolicyEvaluator.d.ts +120 -0
- package/dist/server/server/governance/internal/GovernedActionPolicyEvaluator.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/begin.d.ts +17 -0
- package/dist/server/server/governance/internal/execution-store/begin.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/current-evidence.d.ts +33 -0
- package/dist/server/server/governance/internal/execution-store/current-evidence.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/current-session.d.ts +29 -0
- package/dist/server/server/governance/internal/execution-store/current-session.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/current-target.d.ts +28 -0
- package/dist/server/server/governance/internal/execution-store/current-target.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/dispatch-inbox.d.ts +20 -0
- package/dist/server/server/governance/internal/execution-store/dispatch-inbox.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/dispatch-outcome.d.ts +78 -0
- package/dist/server/server/governance/internal/execution-store/dispatch-outcome.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/inspect.d.ts +17 -0
- package/dist/server/server/governance/internal/execution-store/inspect.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/live.d.ts +6 -0
- package/dist/server/server/governance/internal/execution-store/live.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/preparation.d.ts +42 -0
- package/dist/server/server/governance/internal/execution-store/preparation.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/provider-outcome-fold.d.ts +33 -0
- package/dist/server/server/governance/internal/execution-store/provider-outcome-fold.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/reconciliation-inbox.d.ts +20 -0
- package/dist/server/server/governance/internal/execution-store/reconciliation-inbox.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/reconciliation-locator.d.ts +5 -0
- package/dist/server/server/governance/internal/execution-store/reconciliation-locator.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/reconciliation-outcome.d.ts +123 -0
- package/dist/server/server/governance/internal/execution-store/reconciliation-outcome.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/record-blocked.d.ts +13 -0
- package/dist/server/server/governance/internal/execution-store/record-blocked.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/record-dispatch.d.ts +12 -0
- package/dist/server/server/governance/internal/execution-store/record-dispatch.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/record-reconciliation.d.ts +12 -0
- package/dist/server/server/governance/internal/execution-store/record-reconciliation.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/record-recovery-unavailable.d.ts +11 -0
- package/dist/server/server/governance/internal/execution-store/record-recovery-unavailable.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/record-unknown.d.ts +11 -0
- package/dist/server/server/governance/internal/execution-store/record-unknown.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/recovery-candidates.d.ts +12 -0
- package/dist/server/server/governance/internal/execution-store/recovery-candidates.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/recovery-claim-expiry.d.ts +9 -0
- package/dist/server/server/governance/internal/execution-store/recovery-claim-expiry.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/recovery-claim.d.ts +465 -0
- package/dist/server/server/governance/internal/execution-store/recovery-claim.d.ts.map +1 -0
- package/dist/server/server/governance/internal/execution-store/tokens.d.ts +52 -0
- package/dist/server/server/governance/internal/execution-store/tokens.d.ts.map +1 -0
- package/dist/server/server/http/StaticApplication.d.ts +8 -0
- package/dist/server/server/http/StaticApplication.d.ts.map +1 -0
- package/dist/server/server/http/index.d.ts +4 -0
- package/dist/server/server/http/index.d.ts.map +1 -0
- package/dist/server/server/http/security/HttpLimits.d.ts +22 -0
- package/dist/server/server/http/security/HttpLimits.d.ts.map +1 -0
- package/dist/server/server/http/security/RequestPolicy.d.ts +26 -0
- package/dist/server/server/http/security/RequestPolicy.d.ts.map +1 -0
- package/dist/server/server/http/security/RichDocument.d.ts +154 -0
- package/dist/server/server/http/security/RichDocument.d.ts.map +1 -0
- package/dist/server/server/http/security/SecurityHeaders.d.ts +7 -0
- package/dist/server/server/http/security/SecurityHeaders.d.ts.map +1 -0
- package/dist/server/server/http/security/StaticAssetStore.d.ts +43 -0
- package/dist/server/server/http/security/StaticAssetStore.d.ts.map +1 -0
- package/dist/server/server/http/security/UrlPolicy.d.ts +30 -0
- package/dist/server/server/http/security/UrlPolicy.d.ts.map +1 -0
- package/dist/server/server/http/security/index.d.ts +8 -0
- package/dist/server/server/http/security/index.d.ts.map +1 -0
- package/dist/server/server/index.d.ts +18 -0
- package/dist/server/server/index.d.ts.map +1 -0
- package/dist/server/server/index.js +583 -0
- package/dist/server/server/index.js.map +1 -0
- package/dist/server/server/observability.d.ts +13 -0
- package/dist/server/server/observability.d.ts.map +1 -0
- package/dist/server/server/persistence/ContentStore.d.ts +86 -0
- package/dist/server/server/persistence/ContentStore.d.ts.map +1 -0
- package/dist/server/server/persistence/Database.d.ts +26 -0
- package/dist/server/server/persistence/Database.d.ts.map +1 -0
- package/dist/server/server/persistence/Persistence.d.ts +7042 -0
- package/dist/server/server/persistence/Persistence.d.ts.map +1 -0
- package/dist/server/server/persistence/PersistenceConfig.d.ts +27 -0
- package/dist/server/server/persistence/PersistenceConfig.d.ts.map +1 -0
- package/dist/server/server/persistence/backup/BackupArchive.d.ts +32 -0
- package/dist/server/server/persistence/backup/BackupArchive.d.ts.map +1 -0
- package/dist/server/server/persistence/backup/BackupArchiveCore.d.ts +23 -0
- package/dist/server/server/persistence/backup/BackupArchiveCore.d.ts.map +1 -0
- package/dist/server/server/persistence/backup/BackupManifest.d.ts +136 -0
- package/dist/server/server/persistence/backup/BackupManifest.d.ts.map +1 -0
- package/dist/server/server/persistence/backup/DatabaseSnapshot.d.ts +53 -0
- package/dist/server/server/persistence/backup/DatabaseSnapshot.d.ts.map +1 -0
- package/dist/server/server/persistence/backup/errors.d.ts +53 -0
- package/dist/server/server/persistence/backup/errors.d.ts.map +1 -0
- package/dist/server/server/persistence/backup/index.d.ts +4 -0
- package/dist/server/server/persistence/backup/index.d.ts.map +1 -0
- package/dist/server/server/persistence/errors.d.ts +99 -0
- package/dist/server/server/persistence/errors.d.ts.map +1 -0
- package/dist/server/server/persistence/governedActionReconciliationLocator.d.ts +14 -0
- package/dist/server/server/persistence/governedActionReconciliationLocator.d.ts.map +1 -0
- package/dist/server/server/persistence/index.d.ts +11 -0
- package/dist/server/server/persistence/index.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobDigest.d.ts +6 -0
- package/dist/server/server/persistence/object-store/BlobDigest.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobPath.d.ts +12 -0
- package/dist/server/server/persistence/object-store/BlobPath.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobPublisher.d.ts +8 -0
- package/dist/server/server/persistence/object-store/BlobPublisher.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobRef.d.ts +16 -0
- package/dist/server/server/persistence/object-store/BlobRef.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobStore.d.ts +37 -0
- package/dist/server/server/persistence/object-store/BlobStore.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobStoreError.d.ts +57 -0
- package/dist/server/server/persistence/object-store/BlobStoreError.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/BlobStoreTypes.d.ts +28 -0
- package/dist/server/server/persistence/object-store/BlobStoreTypes.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/OpenedBlob.d.ts +21 -0
- package/dist/server/server/persistence/object-store/OpenedBlob.d.ts.map +1 -0
- package/dist/server/server/persistence/object-store/PinnedDirectory.d.ts +21 -0
- package/dist/server/server/persistence/object-store/PinnedDirectory.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/agentJobModels.d.ts +142 -0
- package/dist/server/server/persistence/repositories/agentJobModels.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/agentJobRepository.d.ts +134 -0
- package/dist/server/server/persistence/repositories/agentJobRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/authorizedShareRepository.d.ts +92 -0
- package/dist/server/server/persistence/repositories/authorizedShareRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/contentBlobMetadataRepository.d.ts +67 -0
- package/dist/server/server/persistence/repositories/contentBlobMetadataRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/contract.d.ts +2989 -0
- package/dist/server/server/persistence/repositories/delivery-graph/contract.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/decode.d.ts +566 -0
- package/dist/server/server/persistence/repositories/delivery-graph/decode.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/integrity.d.ts +16 -0
- package/dist/server/server/persistence/repositories/delivery-graph/integrity.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/quarantine.d.ts +22 -0
- package/dist/server/server/persistence/repositories/delivery-graph/quarantine.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/read.d.ts +2147 -0
- package/dist/server/server/persistence/repositories/delivery-graph/read.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/release-slice.d.ts +16 -0
- package/dist/server/server/persistence/repositories/delivery-graph/release-slice.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/rows.d.ts +683 -0
- package/dist/server/server/persistence/repositories/delivery-graph/rows.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/delivery-graph/write.d.ts +946 -0
- package/dist/server/server/persistence/repositories/delivery-graph/write.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/deliveryGraphRepository.d.ts +2121 -0
- package/dist/server/server/persistence/repositories/deliveryGraphRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/domainEventModels.d.ts +89 -0
- package/dist/server/server/persistence/repositories/domainEventModels.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/domainEventRepository.d.ts +85 -0
- package/dist/server/server/persistence/repositories/domainEventRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/entityRepository.d.ts +134 -0
- package/dist/server/server/persistence/repositories/entityRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/codec.d.ts +1478 -0
- package/dist/server/server/persistence/repositories/governed-action/codec.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/contract.d.ts +858 -0
- package/dist/server/server/persistence/repositories/governed-action/contract.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/quarantine.d.ts +22 -0
- package/dist/server/server/persistence/repositories/governed-action/quarantine.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/read.d.ts +452 -0
- package/dist/server/server/persistence/repositories/governed-action/read.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/rows.d.ts +115 -0
- package/dist/server/server/persistence/repositories/governed-action/rows.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/transaction.d.ts +457 -0
- package/dist/server/server/persistence/repositories/governed-action/transaction.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/write-preparation.d.ts +518 -0
- package/dist/server/server/persistence/repositories/governed-action/write-preparation.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/write-replay.d.ts +702 -0
- package/dist/server/server/persistence/repositories/governed-action/write-replay.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governed-action/write.d.ts +618 -0
- package/dist/server/server/persistence/repositories/governed-action/write.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/governedActionRepository.d.ts +467 -0
- package/dist/server/server/persistence/repositories/governedActionRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/index.d.ts +26 -0
- package/dist/server/server/persistence/repositories/index.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/internal.d.ts +38 -0
- package/dist/server/server/persistence/repositories/internal.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/models.d.ts +420 -0
- package/dist/server/server/persistence/repositories/models.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/peopleRepository.d.ts +407 -0
- package/dist/server/server/persistence/repositories/peopleRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/persistedRowQuarantine.d.ts +20 -0
- package/dist/server/server/persistence/repositories/persistedRowQuarantine.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/pluginConfigurationModels.d.ts +76 -0
- package/dist/server/server/persistence/repositories/pluginConfigurationModels.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/pluginConfigurationRepository.d.ts +179 -0
- package/dist/server/server/persistence/repositories/pluginConfigurationRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/pluginConnectionRepository.d.ts +123 -0
- package/dist/server/server/persistence/repositories/pluginConnectionRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/pluginRuntimeModels.d.ts +195 -0
- package/dist/server/server/persistence/repositories/pluginRuntimeModels.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/pluginRuntimeRepository.d.ts +431 -0
- package/dist/server/server/persistence/repositories/pluginRuntimeRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/providerAccountRepository.d.ts +150 -0
- package/dist/server/server/persistence/repositories/providerAccountRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/quarantineRepository.d.ts +42 -0
- package/dist/server/server/persistence/repositories/quarantineRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/assessments.d.ts +2679 -0
- package/dist/server/server/persistence/repositories/readiness/assessments.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/codec.d.ts +1368 -0
- package/dist/server/server/persistence/repositories/readiness/codec.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/contract.d.ts +3315 -0
- package/dist/server/server/persistence/repositories/readiness/contract.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/materialization.d.ts +459 -0
- package/dist/server/server/persistence/repositories/readiness/materialization.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/quarantine.d.ts +22 -0
- package/dist/server/server/persistence/repositories/readiness/quarantine.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/queue.d.ts +112 -0
- package/dist/server/server/persistence/repositories/readiness/queue.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/rows.d.ts +169 -0
- package/dist/server/server/persistence/repositories/readiness/rows.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readiness/rules.d.ts +85 -0
- package/dist/server/server/persistence/repositories/readiness/rules.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/readinessRepository.d.ts +1722 -0
- package/dist/server/server/persistence/repositories/readinessRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/relationshipRepairProposalRepository.d.ts +294 -0
- package/dist/server/server/persistence/repositories/relationshipRepairProposalRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/releaseRepository.d.ts +1062 -0
- package/dist/server/server/persistence/repositories/releaseRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/timelineExportAuditRepository.d.ts +39 -0
- package/dist/server/server/persistence/repositories/timelineExportAuditRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/timelineRepository.d.ts +84 -0
- package/dist/server/server/persistence/repositories/timelineRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/repositories/workspaceRepository.d.ts +52 -0
- package/dist/server/server/persistence/repositories/workspaceRepository.d.ts.map +1 -0
- package/dist/server/server/persistence/schema.d.ts +17 -0
- package/dist/server/server/persistence/schema.d.ts.map +1 -0
- package/dist/server/server/persistence/schemas.d.ts +14 -0
- package/dist/server/server/persistence/schemas.d.ts.map +1 -0
- package/dist/server/server/plugins/AtlassianBasicAuth.d.ts +2 -0
- package/dist/server/server/plugins/AtlassianBasicAuth.d.ts.map +1 -0
- package/dist/server/server/plugins/PluginCapabilityCodecs.d.ts +357 -0
- package/dist/server/server/plugins/PluginCapabilityCodecs.d.ts.map +1 -0
- package/dist/server/server/plugins/PluginConnection.d.ts +28 -0
- package/dist/server/server/plugins/PluginConnection.d.ts.map +1 -0
- package/dist/server/server/plugins/PluginConnectionMap.d.ts +22 -0
- package/dist/server/server/plugins/PluginConnectionMap.d.ts.map +1 -0
- package/dist/server/server/plugins/PluginDefinition.d.ts +9 -0
- package/dist/server/server/plugins/PluginDefinition.d.ts.map +1 -0
- package/dist/server/server/plugins/PluginDefinitionV1.d.ts +11 -0
- package/dist/server/server/plugins/PluginDefinitionV1.d.ts.map +1 -0
- package/dist/server/server/plugins/PluginExecutor.d.ts +14 -0
- package/dist/server/server/plugins/PluginExecutor.d.ts.map +1 -0
- package/dist/server/server/plugins/atlassian/AtlassianOAuthGrants.d.ts +35 -0
- package/dist/server/server/plugins/atlassian/AtlassianOAuthGrants.d.ts.map +1 -0
- package/dist/server/server/plugins/atlassian/AtlassianProfiles.d.ts +39 -0
- package/dist/server/server/plugins/atlassian/AtlassianProfiles.d.ts.map +1 -0
- package/dist/server/server/plugins/catalog/firstPartyServiceCatalog.d.ts +13 -0
- package/dist/server/server/plugins/catalog/firstPartyServiceCatalog.d.ts.map +1 -0
- package/dist/server/server/plugins/clockify/ClockifyReadPlugin.d.ts +78 -0
- package/dist/server/server/plugins/clockify/ClockifyReadPlugin.d.ts.map +1 -0
- package/dist/server/server/plugins/clockify/ClockifyReadProvider.d.ts +2 -0
- package/dist/server/server/plugins/clockify/ClockifyReadProvider.d.ts.map +1 -0
- package/dist/server/server/plugins/clockify/ClockifyTimeEntryNormalization.d.ts +2 -0
- package/dist/server/server/plugins/clockify/ClockifyTimeEntryNormalization.d.ts.map +1 -0
- package/dist/server/server/plugins/clockify/index.d.ts +3 -0
- package/dist/server/server/plugins/clockify/index.d.ts.map +1 -0
- package/dist/server/server/plugins/codecommit/CodeCommitPluginDefinition.d.ts +4 -0
- package/dist/server/server/plugins/codecommit/CodeCommitPluginDefinition.d.ts.map +1 -0
- package/dist/server/server/plugins/codecommit/index.d.ts +3 -0
- package/dist/server/server/plugins/codecommit/index.d.ts.map +1 -0
- package/dist/server/server/plugins/codepipeline/CodePipelinePluginDefinition.d.ts +4 -0
- package/dist/server/server/plugins/codepipeline/CodePipelinePluginDefinition.d.ts.map +1 -0
- package/dist/server/server/plugins/codepipeline/CodePipelineReadClient.d.ts +2 -0
- package/dist/server/server/plugins/codepipeline/CodePipelineReadClient.d.ts.map +1 -0
- package/dist/server/server/plugins/codepipeline/CodePipelineReadProvider.d.ts +2 -0
- package/dist/server/server/plugins/codepipeline/CodePipelineReadProvider.d.ts.map +1 -0
- package/dist/server/server/plugins/codepipeline/index.d.ts +3 -0
- package/dist/server/server/plugins/codepipeline/index.d.ts.map +1 -0
- package/dist/server/server/plugins/confluence/ConfluencePageAdapter.d.ts +2 -0
- package/dist/server/server/plugins/confluence/ConfluencePageAdapter.d.ts.map +1 -0
- package/dist/server/server/plugins/confluence/ConfluencePageClient.d.ts +2 -0
- package/dist/server/server/plugins/confluence/ConfluencePageClient.d.ts.map +1 -0
- package/dist/server/server/plugins/confluence/ConfluencePagePluginDefinition.d.ts +44 -0
- package/dist/server/server/plugins/confluence/ConfluencePagePluginDefinition.d.ts.map +1 -0
- package/dist/server/server/plugins/confluence/ConfluencePageSchemas.d.ts +2 -0
- package/dist/server/server/plugins/confluence/ConfluencePageSchemas.d.ts.map +1 -0
- package/dist/server/server/plugins/confluence/SafeConfluenceMarkdown.d.ts +2 -0
- package/dist/server/server/plugins/confluence/SafeConfluenceMarkdown.d.ts.map +1 -0
- package/dist/server/server/plugins/failures.d.ts +79 -0
- package/dist/server/server/plugins/failures.d.ts.map +1 -0
- package/dist/server/server/plugins/fake/FakePluginDefinition.d.ts +17 -0
- package/dist/server/server/plugins/fake/FakePluginDefinition.d.ts.map +1 -0
- package/dist/server/server/plugins/fake/FakePluginProbe.d.ts +40 -0
- package/dist/server/server/plugins/fake/FakePluginProbe.d.ts.map +1 -0
- package/dist/server/server/plugins/fake/FakePluginScenario.d.ts +46 -0
- package/dist/server/server/plugins/fake/FakePluginScenario.d.ts.map +1 -0
- package/dist/server/server/plugins/firstPartySynchronization.d.ts +7 -0
- package/dist/server/server/plugins/firstPartySynchronization.d.ts.map +1 -0
- package/dist/server/server/plugins/index.d.ts +21 -0
- package/dist/server/server/plugins/index.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/AuthorizedPluginExecutor.d.ts +8 -0
- package/dist/server/server/plugins/internal/AuthorizedPluginExecutor.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/AuthorizedPluginExecutorMap.d.ts +27 -0
- package/dist/server/server/plugins/internal/AuthorizedPluginExecutorMap.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/FirstPartyPluginRuntimeRegistry.d.ts +2 -0
- package/dist/server/server/plugins/internal/FirstPartyPluginRuntimeRegistry.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/PluginRuntime.d.ts +13 -0
- package/dist/server/server/plugins/internal/PluginRuntime.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/PluginRuntimeAuthority.d.ts +154 -0
- package/dist/server/server/plugins/internal/PluginRuntimeAuthority.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/PluginRuntimeAuthorityRepository.d.ts +131 -0
- package/dist/server/server/plugins/internal/PluginRuntimeAuthorityRepository.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/PluginRuntimeAuthoritySource.d.ts +23 -0
- package/dist/server/server/plugins/internal/PluginRuntimeAuthoritySource.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/PluginRuntimeMap.d.ts +23 -0
- package/dist/server/server/plugins/internal/PluginRuntimeMap.d.ts.map +1 -0
- package/dist/server/server/plugins/internal/PluginRuntimeRegistry.d.ts +21 -0
- package/dist/server/server/plugins/internal/PluginRuntimeRegistry.d.ts.map +1 -0
- package/dist/server/server/plugins/jira/JiraIssueNormalization.d.ts +2 -0
- package/dist/server/server/plugins/jira/JiraIssueNormalization.d.ts.map +1 -0
- package/dist/server/server/plugins/jira/JiraReadPlugin.d.ts +74 -0
- package/dist/server/server/plugins/jira/JiraReadPlugin.d.ts.map +1 -0
- package/dist/server/server/plugins/jira/JiraReadProvider.d.ts +7 -0
- package/dist/server/server/plugins/jira/JiraReadProvider.d.ts.map +1 -0
- package/dist/server/server/plugins/jira/index.d.ts +3 -0
- package/dist/server/server/plugins/jira/index.d.ts.map +1 -0
- package/dist/server/server/plugins/negotiation.d.ts +75 -0
- package/dist/server/server/plugins/negotiation.d.ts.map +1 -0
- package/dist/server/server/plugins/retryPolicy.d.ts +28 -0
- package/dist/server/server/plugins/retryPolicy.d.ts.map +1 -0
- package/dist/server/server/readinessDigests.d.ts +103 -0
- package/dist/server/server/readinessDigests.d.ts.map +1 -0
- package/dist/server/server/runtime/Bootstrap.d.ts +39 -0
- package/dist/server/server/runtime/Bootstrap.d.ts.map +1 -0
- package/dist/server/server/runtime/ControlCenterServer.d.ts +57 -0
- package/dist/server/server/runtime/ControlCenterServer.d.ts.map +1 -0
- package/dist/server/server/runtime/DatabaseDrain.d.ts +6 -0
- package/dist/server/server/runtime/DatabaseDrain.d.ts.map +1 -0
- package/dist/server/server/runtime/DomainEventWakeups.d.ts +22 -0
- package/dist/server/server/runtime/DomainEventWakeups.d.ts.map +1 -0
- package/dist/server/server/runtime/FirstPartyPluginRuntime.d.ts +2 -0
- package/dist/server/server/runtime/FirstPartyPluginRuntime.d.ts.map +1 -0
- package/dist/server/server/runtime/GovernedActionExecutionStartup.d.ts +35 -0
- package/dist/server/server/runtime/GovernedActionExecutionStartup.d.ts.map +1 -0
- package/dist/server/server/runtime/NodeTransport.d.ts +57 -0
- package/dist/server/server/runtime/NodeTransport.d.ts.map +1 -0
- package/dist/server/server/runtime/ReleaseSynchronizationStartup.d.ts +44 -0
- package/dist/server/server/runtime/ReleaseSynchronizationStartup.d.ts.map +1 -0
- package/dist/server/server/runtime/RequestUrlBoundary.d.ts +4 -0
- package/dist/server/server/runtime/RequestUrlBoundary.d.ts.map +1 -0
- package/dist/server/server/runtime/ServerLifecycle.d.ts +74 -0
- package/dist/server/server/runtime/ServerLifecycle.d.ts.map +1 -0
- package/dist/server/server/runtime/index.d.ts +9 -0
- package/dist/server/server/runtime/index.d.ts.map +1 -0
- package/dist/server/server/secrets/SecretRef.d.ts +6 -0
- package/dist/server/server/secrets/SecretRef.d.ts.map +1 -0
- package/dist/server/server/secrets/SecretStore.d.ts +39 -0
- package/dist/server/server/secrets/SecretStore.d.ts.map +1 -0
- package/dist/server/server/secrets/SecretStoreError.d.ts +41 -0
- package/dist/server/server/secrets/SecretStoreError.d.ts.map +1 -0
- package/dist/server/server/secrets/index.d.ts +5 -0
- package/dist/server/server/secrets/index.d.ts.map +1 -0
- package/dist/server/server/security/BindConfig.d.ts +51 -0
- package/dist/server/server/security/BindConfig.d.ts.map +1 -0
- package/dist/server/server/security/RequestSecurity.d.ts +84 -0
- package/dist/server/server/security/RequestSecurity.d.ts.map +1 -0
- package/dist/server/server/security/index.d.ts +3 -0
- package/dist/server/server/security/index.d.ts.map +1 -0
- package/package.json +101 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"gFAWA,IAAI,MACJ,SAAS,EAAuB,EAAM,CACpC,IAAI,EAAM,4BAA8B,EACxC,GAAI,EAAI,UAAU,OAAQ,CACxB,GAAO,WAAa,mBAAmB,UAAU,EAAE,EACnD,IAAK,IAAI,EAAI,EAAG,EAAI,UAAU,OAAQ,IACpC,GAAO,WAAa,mBAAmB,UAAU,EAAE,CACvD,CACA,MACE,yBACA,EACA,WACA,EACA,gHAEJ,CACA,SAAS,GAAO,CAAC,CACjB,IAAI,EAAY,CACZ,EAAG,CACD,EAAG,EACH,EAAG,UAAY,CACb,MAAM,MAAM,EAAuB,GAAG,CAAC,CACzC,EACA,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,CACL,EACA,EAAG,EACH,YAAa,IACf,EACA,EAAoB,OAAO,IAAI,cAAc,EAC/C,SAAS,EAAe,EAAU,EAAe,EAAgB,CAC/D,IAAI,EACF,EAAI,UAAU,QAAqB,UAAU,KAArB,IAAK,GAAqB,UAAU,GAAK,KACnE,MAAO,CACL,SAAU,EACV,IAAa,GAAR,KAAc,KAAO,GAAK,EACrB,WACK,gBACC,gBAClB,CACF,CACA,IAAI,EACF,EAAM,gEACR,SAAS,EAAuB,EAAI,EAAO,CACzC,GAAe,IAAX,OAAe,MAAO,GAC1B,GAAiB,OAAO,GAApB,SACF,OAA6B,IAAtB,kBAA8B,EAAQ,EACjD,CACA,EAAQ,6DACN,EACF,EAAQ,aAAe,SAAU,EAAU,EAAW,CACpD,IAAI,EACF,EAAI,UAAU,QAAqB,UAAU,KAArB,IAAK,GAAqB,UAAU,GAAK,KACnE,GACE,CAAC,GACM,EAAU,WA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AAE,EAAG,GAAK,GAAK,IAAM,EAAG,eAAM,CAAC,EAAG,eAAM,IAAI,EAAG,eAAM,EAAI,GAAE,EAAI,IAAI,EAC1F,GAAK,CAAC,EAAE,UAAY,EAAE,QAAU,EAAE,SAAW,GAAE,GAC/C,IAAI,EAAK,GAAM,CACd,IAAM,EAAE,QAAU,EAAE,SAAW,GAAE,GAAI,IAAM,IAAK,IAAK,EAAE,CAAC,EAAG,IAAI,CAAC,CACjE,EACA,gCAAe,CACd,EAAE,UAAY,IAAM,EAAE,QAAU,EAAG,EAAI,GAAE,EAAI,GAAE,EAAE,OAAO,EACzD,EAAG,CAAC,CAAC,CAAC,GAAmB,SAAE,GAAG,CAAE,UAA0B,SAAE,GAAE,SAAU,CACvE,MAAO,CACN,KAAM,EACN,kBAAmB,EACnB,iBAAkB,EAClB,WAAY,CACb,EACA,UAA0B,SAAE,GAAQ,CACnC,MAAO,CAAC,EACR,aAAc,EACd,KAAM,EACN,SAAU,CACX,CAAC,CACF,CAAC,CAAE,CAAC,CACL,EACA,SAAU,CAAE,IAAK,EAAG,GAAG,KAAQ,CAC9B,IAAI,EAAI,GAAE,EACV,OAAuB,SAAE,GAAW,CACnC,QAAS,CAAC,EACV,UAA0B,SAAE,GAAG,CAC9B,GAAG,EACH,IAAM,GAAM,CACX,EAAE,WAAW,QAAU,EAAG,GAAE,EAAG,CAAC,CACjC,CACD,CAAC,CACF,CAAC,CACF,CACD,CAAC","names":["invariant","#map","isBrowser","DataRoutes","#routes","#branches","#hmrRoutes","#hmrBranches","getDataRouterConsoleError","useDataRouterContext","useDataRouterState","alreadyWarned","composeEventHandlers","Link","setRef","getElementRef","Slot","React","NAME","Fragment","VisuallyHiddenPrimitive.Root","useLayoutEffect","count","useCallbackRef","PORTAL_NAME","SideCar","PortalPrimitive","RemoveScroll","__iconNode","X"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,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],"sources":["../../../../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/cjs/react-dom.production.js","../../../../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/index.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/router/url.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/router/history.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/router/utils.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/router/instrumentation.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/router/router.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/context.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/errors.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/hooks.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/server-runtime/warnings.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/components.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/dom.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/ssr/invariant.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/ssr/markup.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/ssr/single-fetch.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/ssr/routeModules.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/ssr/links.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/ssr/components.js","../../../../../node_modules/.pnpm/react-router@8.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-router/dist/production/lib/dom/lib.js","../../../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.3_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-slot@1.3.0_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.7_@types+react-dom@19.2.3_@types+react@19.2.17__@types+re_6d8fb7f79176be78f7d41dc3e06e6146/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.7_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_5c9a2e5554327bb90be9977ab54b6749/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-accessible-icon@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.17__@t_c5156eb87c7fbb0ed12a833011e2c134/node_modules/@radix-ui/react-accessible-icon/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-context@1.2.0_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-context/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+primitive@1.1.5/node_modules/@radix-ui/primitive/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.2_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.3_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-presence@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.17__@types+rea_70f8d4bf81a86157cd5826dc97175ac4/node_modules/@radix-ui/react-presence/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-id@1.1.2_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-id/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.2_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.17___d2630c6c9beec12e5ce95e8b16c8d437/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.12_@types+react-dom@19.2.3_@types+react@19.2.17__@types_7d8cd400dbf12dff34668e402b760e23/node_modules/@radix-ui/react-focus-scope/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-portal@1.1.13_@types+react-dom@19.2.3_@types+react@19.2.17__@types+reac_9fd48d5b638d9c49f76174408f42dd27/node_modules/@radix-ui/react-portal/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.4_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-focus-guards/dist/index.mjs","../../../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","../../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.17_react@19.2.7/node_modules/use-callback-ref/dist/es2015/assignRef.js","../../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.17_react@19.2.7/node_modules/use-callback-ref/dist/es2015/useRef.js","../../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.17_react@19.2.7/node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.17_react@19.2.7/node_modules/use-sidecar/dist/es2015/medium.js","../../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.17_react@19.2.7/node_modules/use-sidecar/dist/es2015/exports.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/medium.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/UI.js","../../../../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js","../../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.17_react@19.2.7/node_modules/react-style-singleton/dist/es2015/singleton.js","../../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.17_react@19.2.7/node_modules/react-style-singleton/dist/es2015/hook.js","../../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.17_react@19.2.7/node_modules/react-style-singleton/dist/es2015/component.js","../../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll-bar/dist/es2015/component.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/sidecar.js","../../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.17_react@19.2.7/node_modules/react-remove-scroll/dist/es2015/Combination.js","../../../../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js","../../../../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.19_@types+react-dom@19.2.3_@types+react@19.2.17__@types+reac_8c2acd1036ebe22ffa260e976b7bebf3/node_modules/@radix-ui/react-dialog/dist/index.mjs","../../../../../node_modules/.pnpm/@radix-ui+react-avatar@1.2.2_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react_0f1317e902e6e95b512857671514ca87/node_modules/@radix-ui/react-avatar/dist/index.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/defaultAttributes.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/context.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/Icon.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/createLucideIcon.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/arrow-down.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/arrow-left.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/arrow-right.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/arrow-up.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/check.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/chevron-down.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/chevron-up.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/circle-alert.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/clock.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/external-link.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/file.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/link.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/menu.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/minus.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/plus.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/search.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/user.mjs","../../../../../node_modules/.pnpm/lucide-react@1.24.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/x.mjs","../../../../rly/dist/PortalProvider-BpgZwSpw.js","../../../../rly/dist/component-BJeeRuSu.js","../../../../rly/dist/Dialog-DwSIPb-B.js"],"sourcesContent":["/**\n * @license React\n * react-dom.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 formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction noop() {}\nvar Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(formatProdErrorMessage(522));\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\");\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nvar ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\nexports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(formatProdErrorMessage(299));\n return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f();\n }\n};\nexports.preconnect = function (href, options) {\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence ? options.precedence : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n};\nexports.preinitModule = function (href, options) {\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as) {\n var crossOrigin = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n );\n Internals.d.M(href, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n Internals.d.L(href, as, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n};\nexports.preloadModule = function (href, options) {\n if (\"string\" === typeof href)\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0\n });\n } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.2.7\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","/**\n * react-router v8.2.0\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 */\n//#region lib/router/url.ts\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|[\\\\/]{2})/i;\nconst PROTOCOL_RELATIVE_URL_REGEX = /^[\\\\/]{2}/;\nfunction normalizeProtocolRelativeUrl(url, protocol) {\n\treturn protocol + url.replace(/\\\\/g, \"/\");\n}\n//#endregion\nexport { ABSOLUTE_URL_REGEX, PROTOCOL_RELATIVE_URL_REGEX, normalizeProtocolRelativeUrl };\n","/**\n * react-router v8.2.0\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 */\nimport { PROTOCOL_RELATIVE_URL_REGEX } from \"./url.js\";\n//#region lib/router/history.ts\n/**\n* Actions represent the type of change to a location value.\n*/\nlet Action = /* @__PURE__ */ function(Action) {\n\t/**\n\t* A POP indicates a change to an arbitrary index in the history stack, such\n\t* as a back or forward navigation. It does not describe the direction of the\n\t* navigation, only that the current index changed.\n\t*\n\t* Note: This is the default action for newly created history objects.\n\t*/\n\tAction[\"Pop\"] = \"POP\";\n\t/**\n\t* A PUSH indicates a new entry being added to the history stack, such as when\n\t* a link is clicked and a new page loads. When this happens, all subsequent\n\t* entries in the stack are lost.\n\t*/\n\tAction[\"Push\"] = \"PUSH\";\n\t/**\n\t* A REPLACE indicates the entry at the current index in the history stack\n\t* being replaced by a new one.\n\t*/\n\tAction[\"Replace\"] = \"REPLACE\";\n\treturn Action;\n}({});\nconst PopStateEventType = \"popstate\";\nfunction isLocation(obj) {\n\treturn typeof obj === \"object\" && obj != null && \"pathname\" in obj && \"search\" in obj && \"hash\" in obj && \"state\" in obj && \"key\" in obj;\n}\n/**\n* Memory history stores the current location in memory. It is designed for use\n* in stateful non-browser environments like tests and React Native.\n*/\nfunction createMemoryHistory(options = {}) {\n\tlet { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n\tlet entries;\n\tentries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : void 0, typeof entry === \"string\" ? void 0 : entry.mask));\n\tlet index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n\tlet action = \"POP\";\n\tlet listener = null;\n\tfunction clampIndex(n) {\n\t\treturn Math.min(Math.max(n, 0), entries.length - 1);\n\t}\n\tfunction getCurrentLocation() {\n\t\treturn entries[index];\n\t}\n\tfunction createMemoryLocation(to, state = null, key, mask) {\n\t\tlet location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key, mask);\n\t\twarning(location.pathname.charAt(0) === \"/\", `relative pathnames are not supported in memory history: ${JSON.stringify(to)}`);\n\t\treturn location;\n\t}\n\tfunction createHref(to) {\n\t\treturn typeof to === \"string\" ? to : createPath(to);\n\t}\n\treturn {\n\t\tget index() {\n\t\t\treturn index;\n\t\t},\n\t\tget action() {\n\t\t\treturn action;\n\t\t},\n\t\tget location() {\n\t\t\treturn getCurrentLocation();\n\t\t},\n\t\tcreateHref,\n\t\tcreateURL(to) {\n\t\t\treturn new URL(createHref(to), \"http://localhost\");\n\t\t},\n\t\tencodeLocation(to) {\n\t\t\tlet path = typeof to === \"string\" ? parsePath(to) : to;\n\t\t\treturn {\n\t\t\t\tpathname: path.pathname || \"\",\n\t\t\t\tsearch: path.search || \"\",\n\t\t\t\thash: path.hash || \"\"\n\t\t\t};\n\t\t},\n\t\tpush(to, state) {\n\t\t\taction = \"PUSH\";\n\t\t\tlet nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);\n\t\t\tindex += 1;\n\t\t\tentries.splice(index, entries.length, nextLocation);\n\t\t\tif (v5Compat && listener) listener({\n\t\t\t\taction,\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tdelta: 1\n\t\t\t});\n\t\t},\n\t\treplace(to, state) {\n\t\t\taction = \"REPLACE\";\n\t\t\tlet nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);\n\t\t\tentries[index] = nextLocation;\n\t\t\tif (v5Compat && listener) listener({\n\t\t\t\taction,\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tdelta: 0\n\t\t\t});\n\t\t},\n\t\tgo(delta) {\n\t\t\taction = \"POP\";\n\t\t\tlet nextIndex = clampIndex(index + delta);\n\t\t\tlet nextLocation = entries[nextIndex];\n\t\t\tindex = nextIndex;\n\t\t\tif (listener) listener({\n\t\t\t\taction,\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tdelta\n\t\t\t});\n\t\t},\n\t\tlisten(fn) {\n\t\t\tlistener = fn;\n\t\t\treturn () => {\n\t\t\t\tlistener = null;\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* Browser history stores the location in regular URLs. This is the standard for\n* most web apps, but it requires some configuration on the server to ensure you\n* serve the same app at multiple URLs.\n*\n* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n*/\nfunction createBrowserHistory(options = {}) {\n\tfunction createBrowserLocation(window, globalHistory) {\n\t\tlet maskedLocation = globalHistory.state?.masked;\n\t\tlet { pathname, search, hash } = maskedLocation || window.location;\n\t\treturn createLocation(\"\", {\n\t\t\tpathname,\n\t\t\tsearch,\n\t\t\thash\n\t\t}, globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\", maskedLocation ? {\n\t\t\tpathname: window.location.pathname,\n\t\t\tsearch: window.location.search,\n\t\t\thash: window.location.hash\n\t\t} : void 0);\n\t}\n\tfunction createBrowserHref(window, to) {\n\t\treturn typeof to === \"string\" ? to : createPath(to);\n\t}\n\treturn getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n* Hash history stores the location in window.location.hash. This makes it ideal\n* for situations where you don't want to send the location to the server for\n* some reason, either because you do cannot configure it or the URL space is\n* reserved for something else.\n*\n* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n*/\nfunction createHashHistory(options = {}) {\n\tfunction createHashLocation(window, globalHistory) {\n\t\tlet { pathname = \"/\", search = \"\", hash = \"\" } = parsePath(window.location.hash.substring(1));\n\t\tif (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) pathname = \"/\" + pathname;\n\t\treturn createLocation(\"\", {\n\t\t\tpathname,\n\t\t\tsearch,\n\t\t\thash\n\t\t}, globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n\t}\n\tfunction createHashHref(window, to) {\n\t\tlet base = window.document.querySelector(\"base\");\n\t\tlet href = \"\";\n\t\tif (base && base.getAttribute(\"href\")) {\n\t\t\tlet url = window.location.href;\n\t\t\tlet hashIndex = url.indexOf(\"#\");\n\t\t\thref = hashIndex === -1 ? url : url.slice(0, hashIndex);\n\t\t}\n\t\treturn href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n\t}\n\tfunction validateHashLocation(location, to) {\n\t\twarning(location.pathname.charAt(0) === \"/\", `relative pathnames are not supported in hash history.push(${JSON.stringify(to)})`);\n\t}\n\treturn getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n\tif (value === false || value === null || typeof value === \"undefined\") throw new Error(message);\n}\nfunction warning(cond, message) {\n\tif (!cond) {\n\t\tif (typeof console !== \"undefined\") console.warn(message);\n\t\ttry {\n\t\t\tthrow new Error(message);\n\t\t} catch (e) {}\n\t}\n}\nfunction createKey() {\n\treturn Math.random().toString(36).substring(2, 10);\n}\n/**\n* For browser-based histories, we combine the state and key into an object\n*/\nfunction getHistoryState(location, index) {\n\treturn {\n\t\tusr: location.state,\n\t\tkey: location.key,\n\t\tidx: index,\n\t\tmasked: location.mask ? {\n\t\t\tpathname: location.pathname,\n\t\t\tsearch: location.search,\n\t\t\thash: location.hash\n\t\t} : void 0\n\t};\n}\n/**\n* Creates a Location object with a unique key from the given Path\n*/\nfunction createLocation(current, to, state = null, key, mask) {\n\treturn {\n\t\tpathname: typeof current === \"string\" ? current : current.pathname,\n\t\tsearch: \"\",\n\t\thash: \"\",\n\t\t...typeof to === \"string\" ? parsePath(to) : to,\n\t\tstate,\n\t\tkey: to && to.key || key || createKey(),\n\t\tmask\n\t};\n}\n/**\n* Creates a string URL path from the given pathname, search, and hash components.\n*\n* @category Utils\n*/\nfunction createPath({ pathname = \"/\", search = \"\", hash = \"\" }) {\n\tif (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n\tif (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n\treturn pathname;\n}\n/**\n* Parses a string URL path into its separate pathname, search, and hash components.\n*\n* @category Utils\n*/\nfunction parsePath(path) {\n\tlet parsedPath = {};\n\tif (path) {\n\t\tlet hashIndex = path.indexOf(\"#\");\n\t\tif (hashIndex >= 0) {\n\t\t\tparsedPath.hash = path.substring(hashIndex);\n\t\t\tpath = path.substring(0, hashIndex);\n\t\t}\n\t\tlet searchIndex = path.indexOf(\"?\");\n\t\tif (searchIndex >= 0) {\n\t\t\tparsedPath.search = path.substring(searchIndex);\n\t\t\tpath = path.substring(0, searchIndex);\n\t\t}\n\t\tif (path) parsedPath.pathname = path;\n\t}\n\treturn parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options = {}) {\n\tlet { window = document.defaultView, v5Compat = false } = options;\n\tlet globalHistory = window.history;\n\tlet action = \"POP\";\n\tlet listener = null;\n\tlet index = getIndex();\n\tif (index == null) {\n\t\tindex = 0;\n\t\tglobalHistory.replaceState({\n\t\t\t...globalHistory.state,\n\t\t\tidx: index\n\t\t}, \"\");\n\t}\n\tfunction getIndex() {\n\t\treturn (globalHistory.state || { idx: null }).idx;\n\t}\n\tfunction handlePop() {\n\t\taction = \"POP\";\n\t\tlet nextIndex = getIndex();\n\t\tlet delta = nextIndex == null ? null : nextIndex - index;\n\t\tindex = nextIndex;\n\t\tif (listener) listener({\n\t\t\taction,\n\t\t\tlocation: history.location,\n\t\t\tdelta\n\t\t});\n\t}\n\tfunction push(to, state) {\n\t\taction = \"PUSH\";\n\t\tlet location = isLocation(to) ? to : createLocation(history.location, to, state);\n\t\tif (validateLocation) validateLocation(location, to);\n\t\tindex = getIndex() + 1;\n\t\tlet historyState = getHistoryState(location, index);\n\t\tlet url = history.createHref(location.mask || location);\n\t\ttry {\n\t\t\tglobalHistory.pushState(historyState, \"\", url);\n\t\t} catch (error) {\n\t\t\tif (error instanceof DOMException && error.name === \"DataCloneError\") throw error;\n\t\t\twindow.location.assign(url);\n\t\t}\n\t\tif (v5Compat && listener) listener({\n\t\t\taction,\n\t\t\tlocation: history.location,\n\t\t\tdelta: 1\n\t\t});\n\t}\n\tfunction replace(to, state) {\n\t\taction = \"REPLACE\";\n\t\tlet location = isLocation(to) ? to : createLocation(history.location, to, state);\n\t\tif (validateLocation) validateLocation(location, to);\n\t\tindex = getIndex();\n\t\tlet historyState = getHistoryState(location, index);\n\t\tlet url = history.createHref(location.mask || location);\n\t\tglobalHistory.replaceState(historyState, \"\", url);\n\t\tif (v5Compat && listener) listener({\n\t\t\taction,\n\t\t\tlocation: history.location,\n\t\t\tdelta: 0\n\t\t});\n\t}\n\tfunction createURL(to) {\n\t\treturn createBrowserURLImpl(window, to);\n\t}\n\tlet history = {\n\t\tget action() {\n\t\t\treturn action;\n\t\t},\n\t\tget location() {\n\t\t\treturn getLocation(window, globalHistory);\n\t\t},\n\t\tlisten(fn) {\n\t\t\tif (listener) throw new Error(\"A history only accepts one active listener\");\n\t\t\twindow.addEventListener(PopStateEventType, handlePop);\n\t\t\tlistener = fn;\n\t\t\treturn () => {\n\t\t\t\twindow.removeEventListener(PopStateEventType, handlePop);\n\t\t\t\tlistener = null;\n\t\t\t};\n\t\t},\n\t\tcreateHref(to) {\n\t\t\treturn createHref(window, to);\n\t\t},\n\t\tcreateURL,\n\t\tencodeLocation(to) {\n\t\t\tlet url = createURL(to);\n\t\t\treturn {\n\t\t\t\tpathname: url.pathname,\n\t\t\t\tsearch: url.search,\n\t\t\t\thash: url.hash\n\t\t\t};\n\t\t},\n\t\tpush,\n\t\treplace,\n\t\tgo(n) {\n\t\t\treturn globalHistory.go(n);\n\t\t}\n\t};\n\treturn history;\n}\nfunction createBrowserURLImpl(windowImpl, to, isAbsolute = false) {\n\tlet base = \"http://localhost\";\n\tif (windowImpl) base = windowImpl.location.origin !== \"null\" ? windowImpl.location.origin : windowImpl.location.href;\n\tinvariant(base, \"No window.location.(origin|href) available to create URL\");\n\tlet href = typeof to === \"string\" ? to : createPath(to);\n\thref = href.replace(/ $/, \"%20\");\n\tif (!isAbsolute && PROTOCOL_RELATIVE_URL_REGEX.test(href)) href = base + href;\n\treturn new URL(href, base);\n}\n//#endregion\nexport { Action, createBrowserHistory, createBrowserURLImpl, createHashHistory, createLocation, createMemoryHistory, createPath, invariant, parsePath, warning };\n","/**\n * react-router v8.2.0\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 */\nimport { ABSOLUTE_URL_REGEX, PROTOCOL_RELATIVE_URL_REGEX, normalizeProtocolRelativeUrl } from \"./url.js\";\nimport { invariant, parsePath, warning } from \"./history.js\";\nimport * as React$1 from \"react\";\n//#region lib/router/utils.ts\n/**\n* Creates a type-safe {@link RouterContext} object that can be used to\n* store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,\n* [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).\n* Similar to React's [`createContext`](https://react.dev/reference/react/createContext),\n* but specifically designed for React Router's request/response lifecycle.\n*\n* If a `defaultValue` is provided, it will be returned from `context.get()`\n* when no value has been set for the context. Otherwise, reading this context\n* when no value has been set will throw an error.\n*\n* ```tsx filename=app/context.ts\n* import { createContext } from \"react-router\";\n*\n* // Create a context for user data\n* export const userContext =\n* createContext<User | null>(null);\n* ```\n*\n* ```tsx filename=app/middleware/auth.ts\n* import { getUserFromSession } from \"~/auth.server\";\n* import { userContext } from \"~/context\";\n*\n* export const authMiddleware = async ({\n* context,\n* request,\n* }) => {\n* const user = await getUserFromSession(request);\n* context.set(userContext, user);\n* };\n* ```\n*\n* ```tsx filename=app/routes/profile.tsx\n* import { userContext } from \"~/context\";\n*\n* export async function loader({\n* context,\n* }: Route.LoaderArgs) {\n* const user = context.get(userContext);\n*\n* if (!user) {\n* throw new Response(\"Unauthorized\", { status: 401 });\n* }\n*\n* return { user };\n* }\n* ```\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n* @param defaultValue An optional default value for the context. This value\n* will be returned if no value has been set for this context.\n* @returns A {@link RouterContext} object that can be used with\n* `context.get()` and `context.set()` in [`action`](../../start/framework/route-module#action)s,\n* [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).\n*/\nfunction createContext(defaultValue) {\n\treturn { defaultValue };\n}\n/**\n* Provides methods for writing/reading values in application context in a\n* type-safe way. Primarily for usage with [middleware](../../how-to/middleware).\n*\n* @example\n* import {\n* createContext,\n* RouterContextProvider\n* } from \"react-router\";\n*\n* const userContext = createContext<User | null>(null);\n* const contextProvider = new RouterContextProvider();\n* contextProvider.set(userContext, getUser());\n* // ^ Type-safe\n* const user = contextProvider.get(userContext);\n* // ^ User\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n*/\nvar RouterContextProvider = class {\n\t#map = /* @__PURE__ */ new Map();\n\t/**\n\t* Create a new `RouterContextProvider` instance\n\t* @param init An optional initial context map to populate the provider with\n\t*/\n\tconstructor(init) {\n\t\tif (init) for (let [context, value] of init) this.set(context, value);\n\t}\n\t/**\n\t* Access a value from the context. If no value has been set for the context,\n\t* it will return the context's `defaultValue` if provided, or throw an error\n\t* if no `defaultValue` was set.\n\t* @param context The context to get the value for\n\t* @returns The value for the context, or the context's `defaultValue` if no\n\t* value was set\n\t*/\n\tget(context) {\n\t\tif (this.#map.has(context)) return this.#map.get(context);\n\t\tif (context.defaultValue !== void 0) return context.defaultValue;\n\t\tthrow new Error(\"No value found for context\");\n\t}\n\t/**\n\t* Set a value for the context. If the context already has a value set, this\n\t* will overwrite it.\n\t*\n\t* @param context The context to set the value for\n\t* @param value The value to set for the context\n\t* @returns {void}\n\t*/\n\tset(context, value) {\n\t\tthis.#map.set(context, value);\n\t}\n};\nconst unsupportedLazyRouteObjectKeys = new Set([\n\t\"lazy\",\n\t\"caseSensitive\",\n\t\"path\",\n\t\"id\",\n\t\"index\",\n\t\"children\"\n]);\nfunction isUnsupportedLazyRouteObjectKey(key) {\n\treturn unsupportedLazyRouteObjectKeys.has(key);\n}\nconst unsupportedLazyRouteFunctionKeys = new Set([\n\t\"lazy\",\n\t\"caseSensitive\",\n\t\"path\",\n\t\"id\",\n\t\"index\",\n\t\"middleware\",\n\t\"children\"\n]);\nfunction isUnsupportedLazyRouteFunctionKey(key) {\n\treturn unsupportedLazyRouteFunctionKeys.has(key);\n}\nfunction isIndexRoute(route) {\n\treturn route.index === true;\n}\nfunction defaultMapRouteProperties(route) {\n\tlet updates = {};\n\tif (route.Component) Object.assign(updates, {\n\t\telement: React$1.createElement(route.Component),\n\t\tComponent: void 0\n\t});\n\tif (route.HydrateFallback) Object.assign(updates, {\n\t\thydrateFallbackElement: React$1.createElement(route.HydrateFallback),\n\t\tHydrateFallback: void 0\n\t});\n\tif (route.ErrorBoundary) Object.assign(updates, {\n\t\terrorElement: React$1.createElement(route.ErrorBoundary),\n\t\tErrorBoundary: void 0\n\t});\n\treturn updates;\n}\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties = defaultMapRouteProperties, parentPath = [], manifest = {}, allowInPlaceMutations = false) {\n\treturn routes.map((route, index) => {\n\t\tlet treePath = [...parentPath, String(index)];\n\t\tlet id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n\t\tinvariant(route.index !== true || !route.children, `Cannot specify children on an index route`);\n\t\tinvariant(allowInPlaceMutations || !manifest[id], `Found a route id collision on id \"${id}\". Route id's must be globally unique within Data Router usages`);\n\t\tif (isIndexRoute(route)) {\n\t\t\tlet indexRoute = {\n\t\t\t\t...route,\n\t\t\t\tid\n\t\t\t};\n\t\t\tmanifest[id] = mergeRouteUpdates(indexRoute, mapRouteProperties(indexRoute));\n\t\t\treturn indexRoute;\n\t\t} else {\n\t\t\tlet pathOrLayoutRoute = {\n\t\t\t\t...route,\n\t\t\t\tid,\n\t\t\t\tchildren: void 0\n\t\t\t};\n\t\t\tmanifest[id] = mergeRouteUpdates(pathOrLayoutRoute, mapRouteProperties(pathOrLayoutRoute));\n\t\t\tif (route.children) pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest, allowInPlaceMutations);\n\t\t\treturn pathOrLayoutRoute;\n\t\t}\n\t});\n}\nfunction mergeRouteUpdates(route, updates) {\n\treturn Object.assign(route, {\n\t\t...updates,\n\t\t...typeof updates.lazy === \"object\" && updates.lazy != null ? { lazy: {\n\t\t\t...route.lazy,\n\t\t\t...updates.lazy\n\t\t} } : {}\n\t});\n}\n/**\n* Matches the given routes to a location and returns the match data.\n*\n* @example\n* import { matchRoutes } from \"react-router\";\n*\n* let routes = [{\n* path: \"/\",\n* Component: Root,\n* children: [{\n* path: \"dashboard\",\n* Component: Dashboard,\n* }]\n* }];\n*\n* matchRoutes(routes, \"/dashboard\"); // [rootMatch, dashboardMatch]\n*\n* @public\n* @category Utils\n* @param routes The array of route objects to match against.\n* @param locationArg The location to match against, either a string path or a\n* partial {@link Location} object\n* @param basename Optional base path to strip from the location before matching.\n* Defaults to `/`.\n* @returns An array of matched routes, or `null` if no matches were found.\n*/\nfunction matchRoutes(routes, locationArg, basename = \"/\") {\n\treturn matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial, precomputedBranches) {\n\tlet pathname = stripBasename((typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg).pathname || \"/\", basename);\n\tif (pathname == null) return null;\n\tlet branches = precomputedBranches ?? flattenAndRankRoutes(routes);\n\tlet matches = null;\n\tlet decoded = decodePath(pathname);\n\tfor (let i = 0; matches == null && i < branches.length; ++i) matches = matchRouteBranch(branches[i], decoded, allowPartial);\n\treturn matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n\tlet { route, pathname, params } = match;\n\treturn {\n\t\tid: route.id,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData: loaderData[route.id],\n\t\thandle: route.handle\n\t};\n}\nfunction flattenAndRankRoutes(routes) {\n\tlet branches = flattenRoutes(routes);\n\trankRouteBranches(branches);\n\treturn branches;\n}\nfunction flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = \"\", _hasParentOptionalSegments = false) {\n\tlet flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {\n\t\tlet meta = {\n\t\t\trelativePath: relativePath === void 0 ? route.path || \"\" : relativePath,\n\t\t\tcaseSensitive: route.caseSensitive === true,\n\t\t\tchildrenIndex: index,\n\t\t\troute\n\t\t};\n\t\tif (meta.relativePath.startsWith(\"/\")) {\n\t\t\tif (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) return;\n\t\t\tinvariant(meta.relativePath.startsWith(parentPath), `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\t\t\tmeta.relativePath = meta.relativePath.slice(parentPath.length);\n\t\t}\n\t\tlet path = joinPaths([parentPath, meta.relativePath]);\n\t\tlet routesMeta = parentsMeta.concat(meta);\n\t\tif (route.children && route.children.length > 0) {\n\t\t\tinvariant(route.index !== true, `Index routes must not have child routes. Please remove all child routes from route path \"${path}\".`);\n\t\t\tflattenRoutes(route.children, branches, routesMeta, path, hasParentOptionalSegments);\n\t\t}\n\t\tif (route.path == null && !route.index) return;\n\t\tbranches.push({\n\t\t\tpath,\n\t\t\tscore: computeScore(path, route.index),\n\t\t\troutesMeta: routesMeta.map((meta, i) => {\n\t\t\t\tlet [matcher, params] = compilePath(meta.relativePath, meta.caseSensitive, i === routesMeta.length - 1);\n\t\t\t\treturn {\n\t\t\t\t\t...meta,\n\t\t\t\t\tmatcher,\n\t\t\t\t\tcompiledParams: params\n\t\t\t\t};\n\t\t\t})\n\t\t});\n\t};\n\troutes.forEach((route, index) => {\n\t\tif (route.path === \"\" || !route.path?.includes(\"?\")) flattenRoute(route, index);\n\t\telse for (let exploded of explodeOptionalSegments(route.path)) flattenRoute(route, index, true, exploded);\n\t});\n\treturn branches;\n}\nfunction explodeOptionalSegments(path) {\n\tlet segments = path.split(\"/\");\n\tif (segments.length === 0) return [];\n\tlet [first, ...rest] = segments;\n\tlet isOptional = first.endsWith(\"?\");\n\tlet required = first.replace(/\\?$/, \"\");\n\tif (rest.length === 0) return isOptional ? [required, \"\"] : [required];\n\tlet restExploded = explodeOptionalSegments(rest.join(\"/\"));\n\tlet result = [];\n\tresult.push(...restExploded.map((subpath) => subpath === \"\" ? required : [required, subpath].join(\"/\")));\n\tif (isOptional) result.push(...restExploded);\n\treturn result.map((exploded) => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\nfunction rankRouteBranches(branches) {\n\tbranches.sort((a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(a.routesMeta.map((meta) => meta.childrenIndex), b.routesMeta.map((meta) => meta.childrenIndex)));\n}\nconst paramRe = /^:[\\w-]+$/;\nconst partialParamRe = /^:[\\w-]+/;\nconst partialDynamicSegmentValue = 3.5;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = (s) => s === \"*\";\nfunction computeScore(path, index) {\n\tlet segments = path.split(\"/\");\n\tlet initialScore = segments.length;\n\tif (segments.some(isSplat)) initialScore += splatPenalty;\n\tif (index) initialScore += indexRouteValue;\n\treturn segments.filter((s) => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : partialParamRe.test(segment) ? partialDynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n\treturn a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]) ? a[a.length - 1] - b[b.length - 1] : 0;\n}\nfunction matchRouteBranch(branch, pathname, allowPartial = false) {\n\tlet { routesMeta } = branch;\n\tlet matchedParams = {};\n\tlet matchedPathname = \"/\";\n\tlet matches = [];\n\tfor (let i = 0; i < routesMeta.length; ++i) {\n\t\tlet meta = routesMeta[i];\n\t\tlet end = i === routesMeta.length - 1;\n\t\tlet remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n\t\tlet pattern = {\n\t\t\tpath: meta.relativePath,\n\t\t\tcaseSensitive: meta.caseSensitive,\n\t\t\tend\n\t\t};\n\t\tlet match = meta.matcher && meta.compiledParams ? matchPathImpl(pattern, remainingPathname, meta.matcher, meta.compiledParams) : matchPath(pattern, remainingPathname);\n\t\tlet route = meta.route;\n\t\tif (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) match = matchPath({\n\t\t\tpath: meta.relativePath,\n\t\t\tcaseSensitive: meta.caseSensitive,\n\t\t\tend: false\n\t\t}, remainingPathname);\n\t\tif (!match) return null;\n\t\tObject.assign(matchedParams, match.params);\n\t\tmatches.push({\n\t\t\tparams: matchedParams,\n\t\t\tpathname: joinPaths([matchedPathname, match.pathname]),\n\t\t\tpathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n\t\t\troute\n\t\t});\n\t\tif (match.pathnameBase !== \"/\") matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n\t}\n\treturn matches;\n}\n/**\n* Returns a path with params interpolated.\n*\n* @example\n* import { generatePath } from \"react-router\";\n*\n* generatePath(\"/users/:id\", { id: \"123\" }); // \"/users/123\"\n*\n* @public\n* @category Utils\n* @param originalPath The original path to generate.\n* @param params The parameters to interpolate into the path.\n* @returns The generated path with parameters interpolated.\n*/\nfunction generatePath(originalPath, params = {}) {\n\tlet path = originalPath;\n\tif (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n\t\twarning(false, `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\t\tpath = path.replace(/\\*$/, \"/*\");\n\t}\n\tconst prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n\tconst stringify = (p) => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n\treturn prefix + path.split(/\\/+/).map((segment, index, array) => {\n\t\tif (index === array.length - 1 && segment === \"*\") return stringify(params[\"*\"]);\n\t\tconst keyMatch = segment.match(/^:([\\w-]+)(\\??)(.*)/);\n\t\tif (keyMatch) {\n\t\t\tconst [, key, optional, suffix] = keyMatch;\n\t\t\tlet param = params[key];\n\t\t\tinvariant(optional === \"?\" || param != null, `Missing \":${key}\" param`);\n\t\t\treturn encodeURIComponent(stringify(param)) + suffix;\n\t\t}\n\t\treturn segment.replace(/\\?$/g, \"\");\n\t}).filter((segment) => !!segment).join(\"/\");\n}\n/**\n* Performs pattern matching on a URL pathname and returns information about\n* the match.\n*\n* @public\n* @category Utils\n* @param pattern The pattern to match against the URL pathname. This can be a\n* string or a {@link PathPattern} object. If a string is provided, it will be\n* treated as a pattern with `caseSensitive` set to `false` and `end` set to\n* `true`.\n* @param pathname The URL pathname to match against the pattern.\n* @returns A path match object if the pattern matches the pathname,\n* or `null` if it does not match.\n*/\nfunction matchPath(pattern, pathname) {\n\tif (typeof pattern === \"string\") pattern = {\n\t\tpath: pattern,\n\t\tcaseSensitive: false,\n\t\tend: true\n\t};\n\tlet [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n\treturn matchPathImpl(pattern, pathname, matcher, compiledParams);\n}\nfunction matchPathImpl(pattern, pathname, matcher, compiledParams) {\n\tlet match = pathname.match(matcher);\n\tif (!match) return null;\n\tlet matchedPathname = match[0];\n\tlet pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n\tlet captureGroups = match.slice(1);\n\treturn {\n\t\tparams: compiledParams.reduce((memo, { paramName, isOptional }, index) => {\n\t\t\tif (paramName === \"*\") {\n\t\t\t\tlet splatValue = captureGroups[index] || \"\";\n\t\t\t\tpathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n\t\t\t}\n\t\t\tconst value = captureGroups[index];\n\t\t\tif (isOptional && !value) memo[paramName] = void 0;\n\t\t\telse memo[paramName] = (value || \"\").replace(/%2F/g, \"/\");\n\t\t\treturn memo;\n\t\t}, {}),\n\t\tpathname: matchedPathname,\n\t\tpathnameBase,\n\t\tpattern\n\t};\n}\nfunction compilePath(path, caseSensitive = false, end = true) {\n\twarning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), `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\tlet params = [];\n\tlet regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\").replace(/^\\/*/, \"/\").replace(/[\\\\.*+^${}|()[\\]]/g, \"\\\\$&\").replace(/\\/:([\\w-]+)(\\?)?/g, (match, paramName, isOptional, index, str) => {\n\t\tparams.push({\n\t\t\tparamName,\n\t\t\tisOptional: isOptional != null\n\t\t});\n\t\tif (isOptional) {\n\t\t\tlet nextChar = str.charAt(index + match.length);\n\t\t\tif (nextChar && nextChar !== \"/\") return \"/([^\\\\/]*)\";\n\t\t\treturn \"(?:/([^\\\\/]*))?\";\n\t\t}\n\t\treturn \"/([^\\\\/]+)\";\n\t}).replace(/\\/([\\w-]+)\\?(?=\\/|$|\\()/g, \"(?:/$1)?\");\n\tif (path.endsWith(\"*\")) {\n\t\tparams.push({ paramName: \"*\" });\n\t\tregexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" : \"(?:\\\\/(.+)|\\\\/*)$\";\n\t} else if (end) regexpSource += \"\\\\/*$\";\n\telse if (path !== \"\" && path !== \"/\") regexpSource += \"(?:(?=\\\\/|$))\";\n\treturn [new RegExp(regexpSource, caseSensitive ? void 0 : \"i\"), params];\n}\nfunction decodePath(value) {\n\ttry {\n\t\treturn value.split(\"/\").map((v) => decodeURIComponent(v).replace(/\\//g, \"%2F\")).join(\"/\");\n\t} catch (error) {\n\t\twarning(false, `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\t\treturn value;\n\t}\n}\nfunction stripBasename(pathname, basename) {\n\tif (basename === \"/\") return pathname;\n\tif (!pathname.toLowerCase().startsWith(basename.toLowerCase())) return null;\n\tlet startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n\tlet nextChar = pathname.charAt(startIndex);\n\tif (nextChar && nextChar !== \"/\") return null;\n\treturn pathname.slice(startIndex) || \"/\";\n}\nfunction prependBasename({ basename, pathname }) {\n\treturn pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n}\nconst isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);\n/**\n* Returns a resolved {@link Path} object relative to the given pathname.\n*\n* @public\n* @category Utils\n* @param to The path to resolve, either a string or a partial {@link Path}\n* object.\n* @param fromPathname The pathname to resolve the path from. Defaults to `/`.\n* @returns A {@link Path} object with the resolved pathname, search, and hash.\n*/\nfunction resolvePath(to, fromPathname = \"/\") {\n\tlet { pathname: toPathname, search = \"\", hash = \"\" } = typeof to === \"string\" ? parsePath(to) : to;\n\tlet pathname;\n\tif (toPathname) {\n\t\ttoPathname = removeDoubleSlashes(toPathname);\n\t\tif (toPathname.startsWith(\"/\")) pathname = resolvePathname(toPathname.substring(1), \"/\");\n\t\telse pathname = resolvePathname(toPathname, fromPathname);\n\t} else pathname = fromPathname;\n\treturn {\n\t\tpathname,\n\t\tsearch: normalizeSearch(search),\n\t\thash: normalizeHash(hash)\n\t};\n}\nfunction resolvePathname(relativePath, fromPathname) {\n\tlet segments = removeTrailingSlash(fromPathname).split(\"/\");\n\trelativePath.split(\"/\").forEach((segment) => {\n\t\tif (segment === \"..\") {\n\t\t\tif (segments.length > 1) segments.pop();\n\t\t} else if (segment !== \".\") segments.push(segment);\n\t});\n\treturn segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n\treturn `Cannot include a '${char}' character in a manually specified \\`to.${field}\\` field [${JSON.stringify(path)}]. 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\treturn matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\nfunction getResolveToMatches(matches) {\n\tlet pathMatches = getPathContributingMatches(matches);\n\treturn pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);\n}\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) {\n\tlet to;\n\tif (typeof toArg === \"string\") to = parsePath(toArg);\n\telse {\n\t\tto = { ...toArg };\n\t\tinvariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n\t\tinvariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n\t\tinvariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n\t}\n\tlet isEmptyPath = toArg === \"\" || to.pathname === \"\";\n\tlet toPathname = isEmptyPath ? \"/\" : to.pathname;\n\tlet from;\n\tif (toPathname == null) from = locationPathname;\n\telse {\n\t\tlet routePathnameIndex = routePathnames.length - 1;\n\t\tif (!isPathRelative && toPathname.startsWith(\"..\")) {\n\t\t\tlet toSegments = toPathname.split(\"/\");\n\t\t\twhile (toSegments[0] === \"..\") {\n\t\t\t\ttoSegments.shift();\n\t\t\t\troutePathnameIndex -= 1;\n\t\t\t}\n\t\t\tto.pathname = toSegments.join(\"/\");\n\t\t}\n\t\tfrom = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n\t}\n\tlet path = resolvePath(to, from);\n\tlet hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n\tlet hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n\tif (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) path.pathname += \"/\";\n\treturn path;\n}\nconst removeDoubleSlashes = (path) => path.replace(/[\\\\/]{2,}/g, \"/\");\nconst joinPaths = (paths) => removeDoubleSlashes(paths.join(\"/\"));\nconst removeTrailingSlash = (path) => path.replace(/\\/+$/, \"\");\nconst normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^\\/*/, \"/\");\nconst normalizeSearch = (search) => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\nconst normalizeHash = (hash) => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\nvar DataWithResponseInit = class {\n\ttype = \"DataWithResponseInit\";\n\tdata;\n\tinit;\n\tconstructor(data, init) {\n\t\tthis.data = data;\n\t\tthis.init = init || null;\n\t}\n};\n/**\n* Create \"responses\" that contain `headers`/`status` without forcing\n* serialization into an actual [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n*\n* @example\n* import { data } from \"react-router\";\n*\n* export async function action({ request }: Route.ActionArgs) {\n* let formData = await request.formData();\n* let item = await createItem(formData);\n* return data(item, {\n* headers: { \"X-Custom-Header\": \"value\" }\n* status: 201,\n* });\n* }\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n* @param data The data to be included in the response.\n* @param init The status code or a `ResponseInit` object to be included in the\n* response.\n* @returns A {@link DataWithResponseInit} instance containing the data and\n* response init.\n*/\nfunction data(data, init) {\n\treturn new DataWithResponseInit(data, typeof init === \"number\" ? { status: init } : init);\n}\n/**\n* A redirect [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response).\n* Sets the status code and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)\n* header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).\n*\n* This utility accepts absolute URLs and can navigate to external domains, so\n* the application should validate any user-supplied inputs to redirects.\n*\n* @example\n* import { redirect } from \"react-router\";\n*\n* export async function loader({ request }: Route.LoaderArgs) {\n* if (!isLoggedIn(request))\n* throw redirect(\"/login\");\n* }\n*\n* // ...\n* }\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n* @param url The URL to redirect to.\n* @param init The status code or a `ResponseInit` object to be included in the\n* response.\n* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* object with the redirect status and [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)\n* header.\n*/\nconst redirect = (url, init = 302) => {\n\tlet responseInit = init;\n\tif (typeof responseInit === \"number\") responseInit = { status: responseInit };\n\telse if (typeof responseInit.status === \"undefined\") responseInit.status = 302;\n\tlet headers = new Headers(responseInit.headers);\n\theaders.set(\"Location\", url);\n\treturn new Response(null, {\n\t\t...responseInit,\n\t\theaders\n\t});\n};\n/**\n* A redirect [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* that will force a document reload to the new location. Sets the status code\n* and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)\n* header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).\n*\n* This utility accepts absolute URLs and can navigate to external domains, so\n* the application should validate any user-supplied inputs to redirects.\n*\n* ```tsx filename=routes/logout.tsx\n* import { redirectDocument } from \"react-router\";\n*\n* import { destroySession } from \"../sessions.server\";\n*\n* export async function action({ request }: Route.ActionArgs) {\n* let session = await getSession(request.headers.get(\"Cookie\"));\n* return redirectDocument(\"/\", {\n* headers: { \"Set-Cookie\": await destroySession(session) }\n* });\n* }\n* ```\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n* @param url The URL to redirect to.\n* @param init The status code or a `ResponseInit` object to be included in the\n* response.\n* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* object with the redirect status and [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)\n* header.\n*/\nconst redirectDocument = (url, init) => {\n\tlet response = redirect(url, init);\n\tresponse.headers.set(\"X-Remix-Reload-Document\", \"true\");\n\treturn response;\n};\n/**\n* A redirect [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* that will perform a [`history.replaceState`](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState)\n* instead of a [`history.pushState`](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState)\n* for client-side navigation redirects. Sets the status code and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)\n* header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).\n*\n* @example\n* import { replace } from \"react-router\";\n*\n* export async function loader() {\n* return replace(\"/new-location\");\n* }\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n* @param url The URL to redirect to.\n* @param init The status code or a `ResponseInit` object to be included in the\n* response.\n* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* object with the redirect status and [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)\n* header.\n*/\nconst replace = (url, init) => {\n\tlet response = redirect(url, init);\n\tresponse.headers.set(\"X-Remix-Replace\", \"true\");\n\treturn response;\n};\nconst SUPPORTED_ERROR_TYPES = [\n\t\"EvalError\",\n\t\"RangeError\",\n\t\"ReferenceError\",\n\t\"SyntaxError\",\n\t\"TypeError\",\n\t\"URIError\"\n];\nvar ErrorResponseImpl = class {\n\tstatus;\n\tstatusText;\n\tdata;\n\terror;\n\tinternal;\n\tconstructor(status, statusText, data, internal = false) {\n\t\tthis.status = status;\n\t\tthis.statusText = statusText || \"\";\n\t\tthis.internal = internal;\n\t\tif (data instanceof Error) {\n\t\t\tthis.data = data.toString();\n\t\t\tthis.error = data;\n\t\t} else this.data = data;\n\t}\n};\n/**\n* Check if the given error is an {@link ErrorResponse} generated from a 4xx/5xx\n* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* thrown from an [`action`](../../start/framework/route-module#action) or\n* [`loader`](../../start/framework/route-module#loader) function.\n*\n* @example\n* import { isRouteErrorResponse } from \"react-router\";\n*\n* export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {\n* if (isRouteErrorResponse(error)) {\n* return (\n* <>\n* <p>Error: `${error.status}: ${error.statusText}`</p>\n* <p>{error.data}</p>\n* </>\n* );\n* }\n*\n* return (\n* <p>Error: {error instanceof Error ? error.message : \"Unknown Error\"}</p>\n* );\n* }\n*\n* @public\n* @category Utils\n* @mode framework\n* @mode data\n* @param error The error to check.\n* @returns `true` if the error is an {@link ErrorResponse}, `false` otherwise.\n*/\nfunction isRouteErrorResponse(error) {\n\treturn error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\nfunction getRoutePattern(matches) {\n\treturn joinPaths(matches.map((m) => m.route.path).filter(Boolean)) || \"/\";\n}\nfunction createDataFunctionUrl(request, path) {\n\tlet url = new URL(typeof request === \"string\" || request instanceof URL ? request : request.url);\n\tlet parsed = typeof path === \"string\" ? parsePath(path) : path;\n\turl.pathname = parsed.pathname || \"/\";\n\tif (parsed.search) {\n\t\tlet searchParams = new URLSearchParams(parsed.search);\n\t\tlet indexValues = searchParams.getAll(\"index\");\n\t\tsearchParams.delete(\"index\");\n\t\tfor (let value of indexValues.filter(Boolean)) searchParams.append(\"index\", value);\n\t\tlet search = searchParams.toString();\n\t\turl.search = search ? `?${search}` : \"\";\n\t} else url.search = \"\";\n\turl.hash = parsed.hash || \"\";\n\treturn url;\n}\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nfunction parseToInfo(_to, basename) {\n\tlet to = _to;\n\tif (typeof to !== \"string\" || !ABSOLUTE_URL_REGEX.test(to)) return {\n\t\tabsoluteURL: void 0,\n\t\tisExternal: false,\n\t\tto\n\t};\n\tlet absoluteURL = to;\n\tlet isExternal = false;\n\tif (isBrowser) try {\n\t\tlet currentUrl = new URL(window.location.href);\n\t\tlet targetUrl = PROTOCOL_RELATIVE_URL_REGEX.test(to) ? new URL(normalizeProtocolRelativeUrl(to, currentUrl.protocol)) : new URL(to);\n\t\tlet path = stripBasename(targetUrl.pathname, basename);\n\t\tif (targetUrl.origin === currentUrl.origin && path != null) to = path + targetUrl.search + targetUrl.hash;\n\t\telse isExternal = true;\n\t} catch (e) {\n\t\twarning(false, `<Link to=\"${to}\"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);\n\t}\n\treturn {\n\t\tabsoluteURL,\n\t\tisExternal,\n\t\tto\n\t};\n}\n//#endregion\nexport { ErrorResponseImpl, RouterContextProvider, SUPPORTED_ERROR_TYPES, compilePath, convertRouteMatchToUiMatch, convertRoutesToDataRoutes, createContext, createDataFunctionUrl, data, decodePath, defaultMapRouteProperties, flattenAndRankRoutes, generatePath, getPathContributingMatches, getResolveToMatches, getRoutePattern, isAbsoluteUrl, isBrowser, isRouteErrorResponse, isUnsupportedLazyRouteFunctionKey, isUnsupportedLazyRouteObjectKey, joinPaths, matchPath, matchRoutes, matchRoutesImpl, parseToInfo, prependBasename, redirect, redirectDocument, removeDoubleSlashes, removeTrailingSlash, replace, resolvePath, resolveTo, stripBasename };\n","/**\n * react-router v8.2.0\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 */\nimport { createPath, invariant } from \"./history.js\";\nimport { RouterContextProvider, createContext } from \"./utils.js\";\n//#region lib/router/instrumentation.ts\nconst UninstrumentedSymbol = Symbol(\"Uninstrumented\");\nconst instrumentationResultMetaContext = createContext();\nlet instrumentationClientResultMetaReceivers = /* @__PURE__ */ new WeakMap();\nfunction getRouteInstrumentationUpdates(fns, route) {\n\tlet aggregated = {\n\t\tlazy: [],\n\t\t\"lazy.loader\": [],\n\t\t\"lazy.action\": [],\n\t\t\"lazy.middleware\": [],\n\t\tmiddleware: [],\n\t\tloader: [],\n\t\taction: []\n\t};\n\tfns.forEach((fn) => fn({\n\t\tid: route.id,\n\t\tindex: route.index,\n\t\tpath: route.path,\n\t\tinstrument(i) {\n\t\t\tif (i.lazy != null) aggregated.lazy.push(i.lazy);\n\t\t\tif (i[\"lazy.loader\"] != null) aggregated[\"lazy.loader\"].push(i[\"lazy.loader\"]);\n\t\t\tif (i[\"lazy.action\"] != null) aggregated[\"lazy.action\"].push(i[\"lazy.action\"]);\n\t\t\tif (i[\"lazy.middleware\"] != null) aggregated[\"lazy.middleware\"].push(i[\"lazy.middleware\"]);\n\t\t\tif (i.middleware != null) aggregated.middleware.push(i.middleware);\n\t\t\tif (i.loader != null) aggregated.loader.push(i.loader);\n\t\t\tif (i.action != null) aggregated.action.push(i.action);\n\t\t}\n\t}));\n\tlet updates = {};\n\tif (typeof route.lazy === \"function\" && aggregated.lazy.length > 0) {\n\t\tlet lazy = route.lazy;\n\t\tupdates.lazy = async (...args) => {\n\t\t\treturn throwOrReturnResult(await recurseRight(aggregated.lazy, void 0, () => lazy(...args), getInstrumentationInnerResult));\n\t\t};\n\t}\n\tif (typeof route.lazy === \"object\") {\n\t\tlet lazyObject = route.lazy;\n\t\tif (typeof lazyObject.middleware === \"function\" && aggregated[\"lazy.middleware\"].length > 0) {\n\t\t\tlet middleware = lazyObject.middleware;\n\t\t\tupdates.lazy = Object.assign(updates.lazy || {}, { middleware: async (...args) => {\n\t\t\t\treturn throwOrReturnResult(await recurseRight(aggregated[\"lazy.middleware\"], void 0, () => middleware(...args), getInstrumentationInnerResult));\n\t\t\t} });\n\t\t}\n\t\tif (typeof lazyObject.loader === \"function\" && aggregated[\"lazy.loader\"].length > 0) {\n\t\t\tlet loader = lazyObject.loader;\n\t\t\tupdates.lazy = Object.assign(updates.lazy || {}, { loader: async (...args) => {\n\t\t\t\treturn throwOrReturnResult(await recurseRight(aggregated[\"lazy.loader\"], void 0, () => loader(...args), getInstrumentationInnerResult));\n\t\t\t} });\n\t\t}\n\t\tif (typeof lazyObject.action === \"function\" && aggregated[\"lazy.action\"].length > 0) {\n\t\t\tlet action = lazyObject.action;\n\t\t\tupdates.lazy = Object.assign(updates.lazy || {}, { action: async (...args) => {\n\t\t\t\treturn throwOrReturnResult(await recurseRight(aggregated[\"lazy.action\"], void 0, () => action(...args), getInstrumentationInnerResult));\n\t\t\t} });\n\t\t}\n\t}\n\tif (typeof route.loader === \"function\" && aggregated.loader.length > 0) {\n\t\tlet original = getUninstrumentedHandler(route.loader);\n\t\tlet instrumented = async (...args) => {\n\t\t\treturn throwOrReturnResult(await recurseRight(aggregated.loader, getHandlerInfo(args[0]), () => original(...args), getInstrumentationInnerResult));\n\t\t};\n\t\tif (original.hydrate === true) instrumented.hydrate = true;\n\t\tsetUninstrumentedHandler(instrumented, original);\n\t\tupdates.loader = instrumented;\n\t}\n\tif (typeof route.action === \"function\" && aggregated.action.length > 0) {\n\t\tlet original = getUninstrumentedHandler(route.action);\n\t\tlet instrumented = async (...args) => {\n\t\t\treturn throwOrReturnResult(await recurseRight(aggregated.action, getHandlerInfo(args[0]), () => original(...args), getInstrumentationInnerResult));\n\t\t};\n\t\tsetUninstrumentedHandler(instrumented, original);\n\t\tupdates.action = instrumented;\n\t}\n\tif (route.middleware && route.middleware.length > 0 && aggregated.middleware.length > 0) updates.middleware = route.middleware.map((middleware) => {\n\t\tlet original = getUninstrumentedHandler(middleware);\n\t\tlet instrumented = async (...args) => {\n\t\t\treturn throwOrReturnResult(await recurseRight(aggregated.middleware, getHandlerInfo(args[0]), () => original(...args), getInstrumentationInnerResult));\n\t\t};\n\t\tsetUninstrumentedHandler(instrumented, original);\n\t\treturn instrumented;\n\t});\n\treturn updates;\n}\nfunction instrumentClientSideRouter(router, fns) {\n\tlet aggregated = {\n\t\tnavigate: [],\n\t\tfetch: []\n\t};\n\tfns.forEach((fn) => fn({ instrument(i) {\n\t\tif (i.navigate != null) aggregated.navigate.push(i.navigate);\n\t\tif (i.fetch != null) aggregated.fetch.push(i.fetch);\n\t} }));\n\tif (aggregated.navigate.length > 0) {\n\t\tlet navigate = getUninstrumentedHandler(router.navigate);\n\t\tlet instrumentedNavigate = async (...args) => {\n\t\t\tlet [to, opts] = args;\n\t\t\tlet meta;\n\t\t\tlet info = {\n\t\t\t\tto: typeof to === \"number\" || typeof to === \"string\" ? to : to ? createPath(to) : \".\",\n\t\t\t\t...getRouterInfo(router, opts ?? {})\n\t\t\t};\n\t\t\treturn throwOrReturnResult(await recurseRight(aggregated.navigate, info, async () => {\n\t\t\t\tif (typeof to === \"number\") return await navigate(...args);\n\t\t\t\tlet cleanup = setInstrumentationClientResultMetaReceiver(router, (value) => {\n\t\t\t\t\tmeta = value;\n\t\t\t\t});\n\t\t\t\ttry {\n\t\t\t\t\treturn await navigate(...args);\n\t\t\t\t} finally {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}, (result) => ({\n\t\t\t\t...getInstrumentationInnerResult(result),\n\t\t\t\tmeta\n\t\t\t})));\n\t\t};\n\t\tsetUninstrumentedHandler(instrumentedNavigate, navigate);\n\t\trouter.navigate = instrumentedNavigate;\n\t}\n\tif (aggregated.fetch.length > 0) {\n\t\tlet fetch = getUninstrumentedHandler(router.fetch);\n\t\tlet instrumentedFetch = async (...args) => {\n\t\t\tlet [key, _, href, opts] = args;\n\t\t\tlet meta;\n\t\t\treturn throwOrReturnResult(await recurseRight(aggregated.fetch, {\n\t\t\t\thref: href ?? \".\",\n\t\t\t\tfetcherKey: key,\n\t\t\t\t...getRouterInfo(router, opts ?? {})\n\t\t\t}, async () => {\n\t\t\t\tlet cleanup = setInstrumentationClientResultMetaReceiver(router, (value) => {\n\t\t\t\t\tmeta = value;\n\t\t\t\t});\n\t\t\t\ttry {\n\t\t\t\t\treturn await fetch(...args);\n\t\t\t\t} finally {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}, (result) => ({\n\t\t\t\t...getInstrumentationInnerResult(result),\n\t\t\t\tmeta\n\t\t\t})));\n\t\t};\n\t\tsetUninstrumentedHandler(instrumentedFetch, fetch);\n\t\trouter.fetch = instrumentedFetch;\n\t}\n\treturn router;\n}\nfunction instrumentHandler(handler, fns) {\n\tlet aggregated = { request: [] };\n\tfns.forEach((fn) => fn({ instrument(i) {\n\t\tif (i.request != null) aggregated.request.push(i.request);\n\t} }));\n\tlet instrumentedHandler = handler;\n\tif (aggregated.request.length > 0) instrumentedHandler = async (...args) => {\n\t\tlet [request, context] = args;\n\t\tlet instrumentationContext = context ?? new RouterContextProvider();\n\t\treturn throwOrReturnResult(await recurseRight(aggregated.request, {\n\t\t\trequest: getReadonlyRequest(request),\n\t\t\tcontext: getReadonlyContext(instrumentationContext)\n\t\t}, () => handler(request, instrumentationContext), (result, info) => {\n\t\t\tlet meta;\n\t\t\ttry {\n\t\t\t\tmeta = info.context?.get(instrumentationResultMetaContext);\n\t\t\t} catch {}\n\t\t\tinvariant(result.value instanceof Response, \"Expected a Response from the request handler\");\n\t\t\treturn {\n\t\t\t\t...getInstrumentationInnerResult(result),\n\t\t\t\tstatusCode: result.value.status,\n\t\t\t\tmeta\n\t\t\t};\n\t\t}));\n\t};\n\treturn instrumentedHandler;\n}\nfunction getUninstrumentedHandler(handler) {\n\treturn handler[UninstrumentedSymbol] ?? handler;\n}\nfunction setUninstrumentedHandler(handler, uninstrumentedHandler) {\n\thandler[UninstrumentedSymbol] = uninstrumentedHandler;\n}\nfunction setInstrumentationClientResultMetaReceiver(router, receiver) {\n\tinstrumentationClientResultMetaReceivers.set(router, receiver);\n\treturn () => {\n\t\tif (instrumentationClientResultMetaReceivers.get(router) === receiver) instrumentationClientResultMetaReceivers.delete(router);\n\t};\n}\nfunction consumeInstrumentationClientResultMetaReceiver(router) {\n\tlet receiver = instrumentationClientResultMetaReceivers.get(router);\n\tinstrumentationClientResultMetaReceivers.delete(router);\n\treturn receiver;\n}\nfunction throwOrReturnResult(result) {\n\tif (result.type === \"error\") throw result.value;\n\treturn result.value;\n}\nasync function recurseRight(impls, info, handler, getInnerResult, state = {\n\tresult: null,\n\tinnerResult: null\n}, index = impls.length - 1) {\n\tlet impl = impls[index];\n\tif (!impl) {\n\t\ttry {\n\t\t\tstate.result = {\n\t\t\t\ttype: \"success\",\n\t\t\t\tvalue: await handler()\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tstate.result = {\n\t\t\t\ttype: \"error\",\n\t\t\t\tvalue: e\n\t\t\t};\n\t\t}\n\t\tstate.innerResult = getInnerResult(state.result, info);\n\t} else {\n\t\tlet handlerPromise = void 0;\n\t\tlet callHandler = async () => {\n\t\t\tif (handlerPromise) console.error(\"You cannot call instrumented handlers more than once\");\n\t\t\telse handlerPromise = recurseRight(impls, info, handler, getInnerResult, state, index - 1);\n\t\t\tawait handlerPromise;\n\t\t\tinvariant(state.innerResult, \"Expected an inner result\");\n\t\t\treturn state.innerResult;\n\t\t};\n\t\ttry {\n\t\t\tawait impl(callHandler, info);\n\t\t} catch (e) {\n\t\t\tconsole.error(\"An instrumentation function threw an error:\", e);\n\t\t}\n\t\tif (!handlerPromise) await callHandler();\n\t\tawait handlerPromise;\n\t}\n\tif (state.result) return state.result;\n\tstate.result = {\n\t\ttype: \"error\",\n\t\tvalue: /* @__PURE__ */ new Error(\"No result assigned in instrumentation chain.\")\n\t};\n\tstate.innerResult = getInnerResult(state.result, info);\n\treturn state.result;\n}\nfunction getInstrumentationInnerResult(result) {\n\tif (result.type === \"error\" && result.value instanceof Error) return {\n\t\tstatus: \"error\",\n\t\terror: result.value\n\t};\n\treturn {\n\t\tstatus: \"success\",\n\t\terror: void 0\n\t};\n}\nfunction getHandlerInfo(args) {\n\tlet { request, context, params } = args;\n\treturn {\n\t\t...args,\n\t\trequest: getReadonlyRequest(request),\n\t\tparams: { ...params },\n\t\tcontext: getReadonlyContext(context)\n\t};\n}\nfunction getRouterInfo(router, opts) {\n\treturn {\n\t\tcurrentUrl: createPath(router.state.location),\n\t\t...\"formMethod\" in opts ? { formMethod: opts.formMethod } : {},\n\t\t...\"formEncType\" in opts ? { formEncType: opts.formEncType } : {},\n\t\t...\"formData\" in opts ? { formData: opts.formData } : {},\n\t\t...\"body\" in opts ? { body: opts.body } : {}\n\t};\n}\nfunction getReadonlyRequest(request) {\n\treturn {\n\t\tmethod: request.method,\n\t\turl: request.url,\n\t\theaders: { get: (...args) => request.headers.get(...args) }\n\t};\n}\nfunction getReadonlyContext(context) {\n\treturn { get: (ctx) => context.get(ctx) };\n}\n//#endregion\nexport { consumeInstrumentationClientResultMetaReceiver, getRouteInstrumentationUpdates, instrumentClientSideRouter, instrumentHandler, instrumentationResultMetaContext };\n","/**\n * react-router v8.2.0\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 */\nimport { PROTOCOL_RELATIVE_URL_REGEX, normalizeProtocolRelativeUrl } from \"./url.js\";\nimport { createBrowserURLImpl, createLocation, createPath, invariant, parsePath, warning } from \"./history.js\";\nimport { ErrorResponseImpl, RouterContextProvider, convertRouteMatchToUiMatch, convertRoutesToDataRoutes, createDataFunctionUrl, flattenAndRankRoutes, getPathContributingMatches, getResolveToMatches, getRoutePattern, isAbsoluteUrl, isRouteErrorResponse, isUnsupportedLazyRouteFunctionKey, isUnsupportedLazyRouteObjectKey, matchRoutesImpl, prependBasename, removeDoubleSlashes, resolveTo, stripBasename } from \"./utils.js\";\nimport { consumeInstrumentationClientResultMetaReceiver, getRouteInstrumentationUpdates, instrumentClientSideRouter } from \"./instrumentation.js\";\n//#region lib/router/router.ts\nconst validMutationMethodsArr = [\n\t\"POST\",\n\t\"PUT\",\n\t\"PATCH\",\n\t\"DELETE\"\n];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"GET\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([\n\t301,\n\t302,\n\t303,\n\t307,\n\t308\n]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n\tstate: \"idle\",\n\tlocation: void 0,\n\tmatches: void 0,\n\thistoryAction: void 0,\n\tformMethod: void 0,\n\tformAction: void 0,\n\tformEncType: void 0,\n\tformData: void 0,\n\tjson: void 0,\n\ttext: void 0\n};\nconst IDLE_FETCHER = {\n\tstate: \"idle\",\n\tdata: void 0,\n\tformMethod: void 0,\n\tformAction: void 0,\n\tformEncType: void 0,\n\tformData: void 0,\n\tjson: void 0,\n\ttext: void 0\n};\nconst IDLE_BLOCKER = {\n\tstate: \"unblocked\",\n\tproceed: void 0,\n\treset: void 0,\n\tlocation: void 0\n};\nconst TRANSITIONS_STORAGE_KEY = \"remix-router-transitions\";\nconst ResetLoaderDataSymbol = Symbol(\"ResetLoaderData\");\n/**\n* Encapsulates the stable and in-flight route trees together with their\n* pre-computed branch caches so the structures always stay in sync.\n*/\nvar DataRoutes = class {\n\t#routes;\n\t#branches;\n\t#hmrRoutes;\n\t#hmrBranches;\n\tconstructor(routes) {\n\t\tthis.#routes = routes;\n\t\tthis.#branches = flattenAndRankRoutes(routes);\n\t}\n\t/** The stable route tree */\n\tget stableRoutes() {\n\t\treturn this.#routes;\n\t}\n\t/** The in-flight route tree if one is active, otherwise the stable tree */\n\tget activeRoutes() {\n\t\treturn this.#hmrRoutes ?? this.#routes;\n\t}\n\t/** Pre-computed branches */\n\tget branches() {\n\t\treturn this.#hmrBranches ?? this.#branches;\n\t}\n\tget hasHMRRoutes() {\n\t\treturn this.#hmrRoutes != null;\n\t}\n\t/** Replace the stable route tree and recompute its branches */\n\tsetRoutes(routes) {\n\t\tthis.#routes = routes;\n\t\tthis.#branches = flattenAndRankRoutes(routes);\n\t}\n\t/** Set a new in-flight route tree and recompute its branches */\n\tsetHmrRoutes(routes) {\n\t\tthis.#hmrRoutes = routes;\n\t\tthis.#hmrBranches = flattenAndRankRoutes(routes);\n\t}\n\t/** Commit in-flight routes/branches to the stable slot and clear in-flight */\n\tcommitHmrRoutes() {\n\t\tif (this.#hmrRoutes) {\n\t\t\tthis.#routes = this.#hmrRoutes;\n\t\t\tthis.#branches = this.#hmrBranches;\n\t\t\tthis.#hmrRoutes = void 0;\n\t\t\tthis.#hmrBranches = void 0;\n\t\t}\n\t}\n};\n/**\n* Create a router and listen to history POP navigations\n*/\nfunction createRouter(init) {\n\tconst routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : void 0;\n\tconst isBrowser = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n\tinvariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n\tlet hydrationRouteProperties = init.hydrationRouteProperties || [];\n\tlet _mapRouteProperties = init.mapRouteProperties;\n\tlet mapRouteProperties = _mapRouteProperties ? _mapRouteProperties : () => ({});\n\tif (init.instrumentations) {\n\t\tlet instrumentations = init.instrumentations;\n\t\tmapRouteProperties = (route) => {\n\t\t\treturn {\n\t\t\t\t..._mapRouteProperties?.(route),\n\t\t\t\t...getRouteInstrumentationUpdates(instrumentations.map((i) => i.route).filter(Boolean), route)\n\t\t\t};\n\t\t};\n\t}\n\tlet manifest = {};\n\tlet dataRoutes = new DataRoutes(convertRoutesToDataRoutes(init.routes, mapRouteProperties, void 0, manifest));\n\tlet basename = init.basename || \"/\";\n\tif (!basename.startsWith(\"/\")) basename = `/${basename}`;\n\tlet dataStrategyImpl = init.dataStrategy || defaultDataStrategyWithMiddleware;\n\tlet future = { ...init.future };\n\tlet unlistenHistory = null;\n\tlet subscribers = /* @__PURE__ */ new Set();\n\tlet bufferedInitialStateUpdate = null;\n\tlet savedScrollPositions = null;\n\tlet getScrollRestorationKey = null;\n\tlet getScrollPosition = null;\n\tlet initialScrollRestored = init.hydrationData != null;\n\tlet initialMatches = matchRoutesImpl(dataRoutes.activeRoutes, init.history.location, basename, false, dataRoutes.branches);\n\tlet initialMatchesIsFOW = false;\n\tlet initialErrors = null;\n\tlet initialized;\n\tlet renderFallback;\n\tif (initialMatches == null && !init.patchRoutesOnNavigation) {\n\t\tlet error = getInternalRouterError(404, { pathname: init.history.location.pathname });\n\t\tlet { matches, route } = getShortCircuitMatches(dataRoutes.activeRoutes);\n\t\tinitialized = true;\n\t\trenderFallback = !initialized;\n\t\tinitialMatches = matches;\n\t\tinitialErrors = { [route.id]: error };\n\t} else {\n\t\tif (initialMatches && !init.hydrationData) {\n\t\t\tif (checkFogOfWar(initialMatches, dataRoutes.activeRoutes, init.history.location.pathname).active) initialMatches = null;\n\t\t}\n\t\tif (!initialMatches) {\n\t\t\tinitialized = false;\n\t\t\trenderFallback = !initialized;\n\t\t\tinitialMatches = [];\n\t\t\tlet fogOfWar = checkFogOfWar(null, dataRoutes.activeRoutes, init.history.location.pathname);\n\t\t\tif (fogOfWar.active && fogOfWar.matches) {\n\t\t\t\tinitialMatchesIsFOW = true;\n\t\t\t\tinitialMatches = fogOfWar.matches;\n\t\t\t}\n\t\t} else if (initialMatches.some((m) => m.route.lazy)) {\n\t\t\tinitialized = false;\n\t\t\trenderFallback = !initialized;\n\t\t} else if (!initialMatches.some((m) => routeHasLoaderOrMiddleware(m.route))) {\n\t\t\tinitialized = true;\n\t\t\trenderFallback = !initialized;\n\t\t} else {\n\t\t\tlet loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n\t\t\tlet errors = init.hydrationData ? init.hydrationData.errors : null;\n\t\t\tlet relevantMatches = initialMatches;\n\t\t\tif (errors) {\n\t\t\t\tlet idx = initialMatches.findIndex((m) => errors[m.route.id] !== void 0);\n\t\t\t\trelevantMatches = relevantMatches.slice(0, idx + 1);\n\t\t\t}\n\t\t\trenderFallback = false;\n\t\t\tinitialized = true;\n\t\t\trelevantMatches.forEach((m) => {\n\t\t\t\tlet status = getRouteHydrationStatus(m.route, loaderData, errors);\n\t\t\t\trenderFallback = renderFallback || status.renderFallback;\n\t\t\t\tinitialized = initialized && !status.shouldLoad;\n\t\t\t});\n\t\t}\n\t}\n\tlet router;\n\tlet state = {\n\t\thistoryAction: init.history.action,\n\t\tlocation: init.history.location,\n\t\tmatches: initialMatches,\n\t\tinitialized,\n\t\trenderFallback,\n\t\tnavigation: IDLE_NAVIGATION,\n\t\trestoreScrollPosition: init.hydrationData != null ? false : null,\n\t\tpreventScrollReset: false,\n\t\trevalidation: \"idle\",\n\t\tloaderData: init.hydrationData && init.hydrationData.loaderData || {},\n\t\tactionData: init.hydrationData && init.hydrationData.actionData || null,\n\t\terrors: init.hydrationData && init.hydrationData.errors || initialErrors,\n\t\tfetchers: /* @__PURE__ */ new Map(),\n\t\tblockers: /* @__PURE__ */ new Map()\n\t};\n\tlet pendingAction = \"POP\";\n\tlet pendingPopstateNavigationDfd = null;\n\tlet pendingPreventScrollReset = false;\n\tlet pendingNavigationController;\n\tlet pendingViewTransitionEnabled = false;\n\tlet appliedViewTransitions = /* @__PURE__ */ new Map();\n\tlet removePageHideEventListener = null;\n\tlet isUninterruptedRevalidation = false;\n\tlet isRevalidationRequired = false;\n\tlet cancelledFetcherLoads = /* @__PURE__ */ new Set();\n\tlet fetchControllers = /* @__PURE__ */ new Map();\n\tlet incrementingLoadId = 0;\n\tlet pendingNavigationLoadId = -1;\n\tlet fetchReloadIds = /* @__PURE__ */ new Map();\n\tlet fetchRedirectIds = /* @__PURE__ */ new Set();\n\tlet fetchLoadMatches = /* @__PURE__ */ new Map();\n\tlet activeFetchers = /* @__PURE__ */ new Map();\n\tlet fetchersQueuedForDeletion = /* @__PURE__ */ new Set();\n\tlet blockerFunctions = /* @__PURE__ */ new Map();\n\tlet unblockBlockerHistoryUpdate = void 0;\n\tlet pendingRevalidationDfd = null;\n\tfunction initialize() {\n\t\tunlistenHistory = init.history.listen(({ action: historyAction, location, delta }) => {\n\t\t\tif (unblockBlockerHistoryUpdate) {\n\t\t\t\tunblockBlockerHistoryUpdate();\n\t\t\t\tunblockBlockerHistoryUpdate = void 0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twarning(blockerFunctions.size === 0 || delta != null, \"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\t\t\tlet blockerKey = shouldBlockNavigation({\n\t\t\t\tcurrentLocation: state.location,\n\t\t\t\tnextLocation: location,\n\t\t\t\thistoryAction\n\t\t\t});\n\t\t\tif (blockerKey && delta != null) {\n\t\t\t\tlet nextHistoryUpdatePromise = new Promise((resolve) => {\n\t\t\t\t\tunblockBlockerHistoryUpdate = resolve;\n\t\t\t\t});\n\t\t\t\tinit.history.go(delta * -1);\n\t\t\t\tupdateBlocker(blockerKey, {\n\t\t\t\t\tstate: \"blocked\",\n\t\t\t\t\tlocation,\n\t\t\t\t\tproceed() {\n\t\t\t\t\t\tupdateBlocker(blockerKey, {\n\t\t\t\t\t\t\tstate: \"proceeding\",\n\t\t\t\t\t\t\tproceed: void 0,\n\t\t\t\t\t\t\treset: void 0,\n\t\t\t\t\t\t\tlocation\n\t\t\t\t\t\t});\n\t\t\t\t\t\tnextHistoryUpdatePromise.then(() => init.history.go(delta));\n\t\t\t\t\t},\n\t\t\t\t\treset() {\n\t\t\t\t\t\tlet blockers = new Map(state.blockers);\n\t\t\t\t\t\tblockers.set(blockerKey, IDLE_BLOCKER);\n\t\t\t\t\t\tupdateState({ blockers });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpendingPopstateNavigationDfd?.resolve();\n\t\t\t\tpendingPopstateNavigationDfd = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn startNavigation(historyAction, location);\n\t\t});\n\t\tif (isBrowser) {\n\t\t\trestoreAppliedTransitions(routerWindow, appliedViewTransitions);\n\t\t\tlet _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n\t\t\trouterWindow.addEventListener(\"pagehide\", _saveAppliedTransitions);\n\t\t\tremovePageHideEventListener = () => routerWindow.removeEventListener(\"pagehide\", _saveAppliedTransitions);\n\t\t}\n\t\tif (!state.initialized) startNavigation(\"POP\", state.location, { initialHydration: true });\n\t\treturn router;\n\t}\n\tfunction dispose() {\n\t\tif (unlistenHistory) unlistenHistory();\n\t\tif (removePageHideEventListener) removePageHideEventListener();\n\t\tsubscribers.clear();\n\t\tpendingNavigationController && pendingNavigationController.abort();\n\t\tstate.fetchers.forEach((_, key) => deleteFetcher(state.fetchers, key));\n\t\tstate.blockers.forEach((_, key) => deleteBlocker(key));\n\t}\n\tfunction subscribe(fn) {\n\t\tsubscribers.add(fn);\n\t\tif (bufferedInitialStateUpdate) {\n\t\t\tlet { newErrors } = bufferedInitialStateUpdate;\n\t\t\tbufferedInitialStateUpdate = null;\n\t\t\tfn(state, {\n\t\t\t\tdeletedFetchers: [],\n\t\t\t\tnewErrors,\n\t\t\t\tviewTransitionOpts: void 0,\n\t\t\t\tflushSync: false\n\t\t\t});\n\t\t}\n\t\treturn () => subscribers.delete(fn);\n\t}\n\tfunction updateState(newState, opts = {}) {\n\t\tif (newState.matches) newState.matches = newState.matches.map((m) => {\n\t\t\tlet route = manifest[m.route.id];\n\t\t\tlet matchRoute = m.route;\n\t\t\tif (matchRoute.element !== route.element || matchRoute.errorElement !== route.errorElement || matchRoute.hydrateFallbackElement !== route.hydrateFallbackElement) return {\n\t\t\t\t...m,\n\t\t\t\troute\n\t\t\t};\n\t\t\treturn m;\n\t\t});\n\t\tstate = {\n\t\t\t...state,\n\t\t\t...newState\n\t\t};\n\t\tlet unmountedFetchers = [];\n\t\tlet mountedFetchers = [];\n\t\tstate.fetchers.forEach((fetcher, key) => {\n\t\t\tif (fetcher.state === \"idle\") if (fetchersQueuedForDeletion.has(key)) unmountedFetchers.push(key);\n\t\t\telse mountedFetchers.push(key);\n\t\t});\n\t\tfetchersQueuedForDeletion.forEach((key) => {\n\t\t\tif (!state.fetchers.has(key) && !fetchControllers.has(key)) unmountedFetchers.push(key);\n\t\t});\n\t\tif (subscribers.size === 0) bufferedInitialStateUpdate = { newErrors: newState.errors ?? null };\n\t\t[...subscribers].forEach((subscriber) => subscriber(state, {\n\t\t\tdeletedFetchers: unmountedFetchers,\n\t\t\tnewErrors: newState.errors ?? null,\n\t\t\tviewTransitionOpts: opts.viewTransitionOpts,\n\t\t\tflushSync: opts.flushSync === true\n\t\t}));\n\t\tunmountedFetchers.forEach((key) => deleteFetcher(state.fetchers, key));\n\t\tmountedFetchers.forEach((key) => state.fetchers.delete(key));\n\t}\n\tfunction completeNavigation(location, newState, { flushSync } = {}) {\n\t\tlet isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && location.state?._isRedirect !== true;\n\t\tlet actionData;\n\t\tif (newState.actionData) if (Object.keys(newState.actionData).length > 0) actionData = newState.actionData;\n\t\telse actionData = null;\n\t\telse if (isActionReload) actionData = state.actionData;\n\t\telse actionData = null;\n\t\tlet loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n\t\tlet blockers = state.blockers;\n\t\tif (blockers.size > 0 && !isUninterruptedRevalidation) {\n\t\t\tblockers = new Map(blockers);\n\t\t\tblockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n\t\t}\n\t\tlet restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);\n\t\tlet preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && location.state?._isRedirect !== true;\n\t\tdataRoutes.commitHmrRoutes();\n\t\tif (isUninterruptedRevalidation) {} else if (pendingAction === \"POP\") {} else if (pendingAction === \"PUSH\") init.history.push(location, location.state);\n\t\telse if (pendingAction === \"REPLACE\") init.history.replace(location, location.state);\n\t\tlet viewTransitionOpts;\n\t\tif (pendingAction === \"POP\") {\n\t\t\tlet priorPaths = appliedViewTransitions.get(state.location.pathname);\n\t\t\tif (priorPaths && priorPaths.has(location.pathname)) viewTransitionOpts = {\n\t\t\t\tcurrentLocation: state.location,\n\t\t\t\tnextLocation: location\n\t\t\t};\n\t\t\telse if (appliedViewTransitions.has(location.pathname)) viewTransitionOpts = {\n\t\t\t\tcurrentLocation: location,\n\t\t\t\tnextLocation: state.location\n\t\t\t};\n\t\t} else if (pendingViewTransitionEnabled) {\n\t\t\tlet toPaths = appliedViewTransitions.get(state.location.pathname);\n\t\t\tif (toPaths) toPaths.add(location.pathname);\n\t\t\telse {\n\t\t\t\ttoPaths = new Set([location.pathname]);\n\t\t\t\tappliedViewTransitions.set(state.location.pathname, toPaths);\n\t\t\t}\n\t\t\tviewTransitionOpts = {\n\t\t\t\tcurrentLocation: state.location,\n\t\t\t\tnextLocation: location\n\t\t\t};\n\t\t}\n\t\tupdateState({\n\t\t\t...newState,\n\t\t\tactionData,\n\t\t\tloaderData,\n\t\t\thistoryAction: pendingAction,\n\t\t\tlocation,\n\t\t\tinitialized: true,\n\t\t\trenderFallback: false,\n\t\t\tnavigation: IDLE_NAVIGATION,\n\t\t\trevalidation: \"idle\",\n\t\t\trestoreScrollPosition,\n\t\t\tpreventScrollReset,\n\t\t\tblockers\n\t\t}, {\n\t\t\tviewTransitionOpts,\n\t\t\tflushSync: flushSync === true\n\t\t});\n\t\tpendingAction = \"POP\";\n\t\tpendingPreventScrollReset = false;\n\t\tpendingViewTransitionEnabled = false;\n\t\tisUninterruptedRevalidation = false;\n\t\tisRevalidationRequired = false;\n\t\tpendingPopstateNavigationDfd?.resolve();\n\t\tpendingPopstateNavigationDfd = null;\n\t\tpendingRevalidationDfd?.resolve();\n\t\tpendingRevalidationDfd = null;\n\t}\n\tasync function navigate(to, opts) {\n\t\tpendingPopstateNavigationDfd?.resolve();\n\t\tpendingPopstateNavigationDfd = null;\n\t\tif (typeof to === \"number\") {\n\t\t\tif (!pendingPopstateNavigationDfd) pendingPopstateNavigationDfd = createDeferred();\n\t\t\tlet promise = pendingPopstateNavigationDfd.promise;\n\t\t\tinit.history.go(to);\n\t\t\treturn promise;\n\t\t}\n\t\tlet instrumentationNavigateMetaReceiver = consumeInstrumentationClientResultMetaReceiver(router);\n\t\tlet { path, submission, error } = normalizeNavigateOptions(false, normalizeTo(state.location, state.matches, basename, to, opts?.fromRouteId, opts?.relative), opts);\n\t\tlet maskPath;\n\t\tif (opts?.mask) maskPath = {\n\t\t\tpathname: \"\",\n\t\t\tsearch: \"\",\n\t\t\thash: \"\",\n\t\t\t...typeof opts.mask === \"string\" ? parsePath(opts.mask) : {\n\t\t\t\t...state.location.mask,\n\t\t\t\t...opts.mask\n\t\t\t}\n\t\t};\n\t\tlet currentLocation = state.location;\n\t\tlet nextLocation = createLocation(currentLocation, path, opts && opts.state, void 0, maskPath);\n\t\tnextLocation = {\n\t\t\t...nextLocation,\n\t\t\t...init.history.encodeLocation(nextLocation)\n\t\t};\n\t\tlet userReplace = opts && opts.replace != null ? opts.replace : void 0;\n\t\tlet historyAction = \"PUSH\";\n\t\tif (userReplace === true) historyAction = \"REPLACE\";\n\t\telse if (userReplace === false) {} else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) historyAction = \"REPLACE\";\n\t\tlet preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : void 0;\n\t\tlet flushSync = (opts && opts.flushSync) === true;\n\t\tlet blockerKey = shouldBlockNavigation({\n\t\t\tcurrentLocation,\n\t\t\tnextLocation,\n\t\t\thistoryAction\n\t\t});\n\t\tif (blockerKey) {\n\t\t\tupdateBlocker(blockerKey, {\n\t\t\t\tstate: \"blocked\",\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tproceed() {\n\t\t\t\t\tupdateBlocker(blockerKey, {\n\t\t\t\t\t\tstate: \"proceeding\",\n\t\t\t\t\t\tproceed: void 0,\n\t\t\t\t\t\treset: void 0,\n\t\t\t\t\t\tlocation: nextLocation\n\t\t\t\t\t});\n\t\t\t\t\tnavigate(to, opts);\n\t\t\t\t},\n\t\t\t\treset() {\n\t\t\t\t\tlet blockers = new Map(state.blockers);\n\t\t\t\t\tblockers.set(blockerKey, IDLE_BLOCKER);\n\t\t\t\t\tupdateState({ blockers });\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tawait startNavigation(historyAction, nextLocation, {\n\t\t\tsubmission,\n\t\t\tpendingError: error,\n\t\t\tpreventScrollReset,\n\t\t\treplace: opts && opts.replace,\n\t\t\tenableViewTransition: opts && opts.viewTransition,\n\t\t\tflushSync,\n\t\t\tcallSiteDefaultShouldRevalidate: opts && opts.defaultShouldRevalidate,\n\t\t\tinstrumentationNavigateMetaReceiver\n\t\t});\n\t}\n\tfunction revalidate() {\n\t\tif (!pendingRevalidationDfd) pendingRevalidationDfd = createDeferred();\n\t\tinterruptActiveLoads();\n\t\tupdateState({ revalidation: \"loading\" });\n\t\tlet promise = pendingRevalidationDfd.promise;\n\t\tif (state.navigation.state === \"submitting\") return promise;\n\t\tif (state.navigation.state === \"idle\") {\n\t\t\tstartNavigation(state.historyAction, state.location, { startUninterruptedRevalidation: true });\n\t\t\treturn promise;\n\t\t}\n\t\tstartNavigation(pendingAction || state.historyAction, state.navigation.location, {\n\t\t\toverrideNavigation: state.navigation,\n\t\t\tenableViewTransition: pendingViewTransitionEnabled === true\n\t\t});\n\t\treturn promise;\n\t}\n\tasync function startNavigation(historyAction, location, opts) {\n\t\tpendingNavigationController && pendingNavigationController.abort();\n\t\tpendingNavigationController = null;\n\t\tpendingAction = historyAction;\n\t\tisUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n\t\tsaveScrollPosition(state.location, state.matches);\n\t\tpendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n\t\tpendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n\t\tlet routesToUse = dataRoutes.activeRoutes;\n\t\tlet matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? state.matches : matchRoutesImpl(routesToUse, location, basename, false, dataRoutes.branches);\n\t\tlet flushSync = (opts && opts.flushSync) === true;\n\t\tif (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n\t\t\tcompleteNavigation(location, { matches }, { flushSync });\n\t\t\treturn;\n\t\t}\n\t\tlet fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n\t\tif (fogOfWar.active && fogOfWar.matches) matches = fogOfWar.matches;\n\t\tif (opts?.instrumentationNavigateMetaReceiver) {\n\t\t\tlet meta = getInstrumentationNavigateMeta(init.history, location, matches);\n\t\t\topts.instrumentationNavigateMetaReceiver(meta);\n\t\t}\n\t\tif (!matches) {\n\t\t\tlet { error, notFoundMatches, route } = handleNavigational404(location.pathname);\n\t\t\tcompleteNavigation(location, {\n\t\t\t\tmatches: notFoundMatches,\n\t\t\t\tloaderData: {},\n\t\t\t\terrors: { [route.id]: error }\n\t\t\t}, { flushSync });\n\t\t\treturn;\n\t\t}\n\t\tlet loadingNavigation = opts && opts.overrideNavigation ? {\n\t\t\t...opts.overrideNavigation,\n\t\t\tmatches,\n\t\t\thistoryAction\n\t\t} : void 0;\n\t\tpendingNavigationController = new AbortController();\n\t\tlet request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n\t\tlet scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();\n\t\tlet pendingActionResult;\n\t\tif (opts && opts.pendingError) pendingActionResult = [findNearestBoundary(matches).route.id, {\n\t\t\ttype: \"error\",\n\t\t\terror: opts.pendingError\n\t\t}];\n\t\telse if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n\t\t\tlet actionResult = await handleAction(request, location, opts.submission, matches, historyAction, scopedContext, fogOfWar.active, opts && opts.initialHydration === true, {\n\t\t\t\treplace: opts.replace,\n\t\t\t\tflushSync\n\t\t\t});\n\t\t\tif (actionResult.shortCircuited) return;\n\t\t\tif (actionResult.pendingActionResult) {\n\t\t\t\tlet [routeId, result] = actionResult.pendingActionResult;\n\t\t\t\tif (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n\t\t\t\t\tpendingNavigationController = null;\n\t\t\t\t\tcompleteNavigation(location, {\n\t\t\t\t\t\tmatches: actionResult.matches,\n\t\t\t\t\t\tloaderData: {},\n\t\t\t\t\t\terrors: { [routeId]: result.error }\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmatches = actionResult.matches || matches;\n\t\t\tpendingActionResult = actionResult.pendingActionResult;\n\t\t\tloadingNavigation = getLoadingNavigation(location, matches, historyAction, opts.submission);\n\t\t\tflushSync = false;\n\t\t\tfogOfWar.active = false;\n\t\t\trequest = createClientSideRequest(init.history, request.url, request.signal);\n\t\t}\n\t\tlet { shortCircuited, matches: updatedMatches, loaderData, errors, workingFetchers } = await handleLoaders(request, location, matches, historyAction, scopedContext, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult, opts && opts.callSiteDefaultShouldRevalidate);\n\t\tif (shortCircuited) return;\n\t\tpendingNavigationController = null;\n\t\tcompleteNavigation(location, {\n\t\t\tmatches: updatedMatches || matches,\n\t\t\t...getActionDataForCommit(pendingActionResult),\n\t\t\tloaderData,\n\t\t\terrors,\n\t\t\t...workingFetchers ? { fetchers: workingFetchers } : {}\n\t\t});\n\t}\n\tasync function handleAction(request, location, submission, matches, historyAction, scopedContext, isFogOfWar, initialHydration, opts = {}) {\n\t\tinterruptActiveLoads();\n\t\tupdateState({ navigation: getSubmittingNavigation(location, matches, historyAction, submission) }, { flushSync: opts.flushSync === true });\n\t\tif (isFogOfWar) {\n\t\t\tlet discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n\t\t\tif (discoverResult.type === \"aborted\") return { shortCircuited: true };\n\t\t\telse if (discoverResult.type === \"error\") {\n\t\t\t\tif (discoverResult.partialMatches.length === 0) {\n\t\t\t\t\tlet { matches, route } = getShortCircuitMatches(dataRoutes.activeRoutes);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmatches,\n\t\t\t\t\t\tpendingActionResult: [route.id, {\n\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\terror: discoverResult.error\n\t\t\t\t\t\t}]\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tlet boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n\t\t\t\treturn {\n\t\t\t\t\tmatches: discoverResult.partialMatches,\n\t\t\t\t\tpendingActionResult: [boundaryId, {\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\terror: discoverResult.error\n\t\t\t\t\t}]\n\t\t\t\t};\n\t\t\t} else if (!discoverResult.matches) {\n\t\t\t\tlet { notFoundMatches, error, route } = handleNavigational404(location.pathname);\n\t\t\t\treturn {\n\t\t\t\t\tmatches: notFoundMatches,\n\t\t\t\t\tpendingActionResult: [route.id, {\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\terror\n\t\t\t\t\t}]\n\t\t\t\t};\n\t\t\t} else matches = discoverResult.matches;\n\t\t}\n\t\tlet result;\n\t\tlet actionMatch = getTargetMatch(matches, location);\n\t\tif (!actionMatch.route.action && !actionMatch.route.lazy) result = {\n\t\t\ttype: \"error\",\n\t\t\terror: getInternalRouterError(405, {\n\t\t\t\tmethod: request.method,\n\t\t\t\tpathname: location.pathname,\n\t\t\t\trouteId: actionMatch.route.id\n\t\t\t})\n\t\t};\n\t\telse {\n\t\t\tlet results = await callDataStrategy(request, location, getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, location, matches, actionMatch, initialHydration ? [] : hydrationRouteProperties, scopedContext), scopedContext, null);\n\t\t\tresult = results[actionMatch.route.id];\n\t\t\tif (!result) {\n\t\t\t\tfor (let match of matches) if (results[match.route.id]) {\n\t\t\t\t\tresult = results[match.route.id];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (request.signal.aborted) return { shortCircuited: true };\n\t\t}\n\t\tif (isRedirectResult(result)) {\n\t\t\tlet replace;\n\t\t\tif (opts && opts.replace != null) replace = opts.replace;\n\t\t\telse replace = normalizeRedirectLocation(result.response.headers.get(\"Location\"), new URL(request.url), basename, init.history) === state.location.pathname + state.location.search;\n\t\t\tawait startRedirectNavigation(request, result, true, {\n\t\t\t\tsubmission,\n\t\t\t\treplace\n\t\t\t});\n\t\t\treturn { shortCircuited: true };\n\t\t}\n\t\tif (isErrorResult(result)) {\n\t\t\tlet boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n\t\t\tif ((opts && opts.replace) !== true) pendingAction = \"PUSH\";\n\t\t\treturn {\n\t\t\t\tmatches,\n\t\t\t\tpendingActionResult: [\n\t\t\t\t\tboundaryMatch.route.id,\n\t\t\t\t\tresult,\n\t\t\t\t\tactionMatch.route.id\n\t\t\t\t]\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tmatches,\n\t\t\tpendingActionResult: [actionMatch.route.id, result]\n\t\t};\n\t}\n\tasync function handleLoaders(request, location, matches, historyAction, scopedContext, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult, callSiteDefaultShouldRevalidate) {\n\t\tlet loadingNavigation = overrideNavigation || getLoadingNavigation(location, matches, historyAction, submission);\n\t\tlet activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n\t\tlet shouldUpdateNavigationState = !isUninterruptedRevalidation && !initialHydration;\n\t\tif (isFogOfWar) {\n\t\t\tif (shouldUpdateNavigationState) {\n\t\t\t\tlet actionData = getUpdatedActionData(pendingActionResult);\n\t\t\t\tupdateState({\n\t\t\t\t\tnavigation: loadingNavigation,\n\t\t\t\t\t...actionData !== void 0 ? { actionData } : {}\n\t\t\t\t}, { flushSync });\n\t\t\t}\n\t\t\tlet discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n\t\t\tif (discoverResult.type === \"aborted\") return { shortCircuited: true };\n\t\t\telse if (discoverResult.type === \"error\") {\n\t\t\t\tif (discoverResult.partialMatches.length === 0) {\n\t\t\t\t\tlet { matches, route } = getShortCircuitMatches(dataRoutes.activeRoutes);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmatches,\n\t\t\t\t\t\tloaderData: {},\n\t\t\t\t\t\terrors: { [route.id]: discoverResult.error }\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tlet boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n\t\t\t\treturn {\n\t\t\t\t\tmatches: discoverResult.partialMatches,\n\t\t\t\t\tloaderData: {},\n\t\t\t\t\terrors: { [boundaryId]: discoverResult.error }\n\t\t\t\t};\n\t\t\t} else if (!discoverResult.matches) {\n\t\t\t\tlet { error, notFoundMatches, route } = handleNavigational404(location.pathname);\n\t\t\t\treturn {\n\t\t\t\t\tmatches: notFoundMatches,\n\t\t\t\t\tloaderData: {},\n\t\t\t\t\terrors: { [route.id]: error }\n\t\t\t\t};\n\t\t\t} else matches = discoverResult.matches;\n\t\t}\n\t\tlet routesToUse = dataRoutes.activeRoutes;\n\t\tlet { dsMatches, revalidatingFetchers } = getMatchesToLoad(request, scopedContext, mapRouteProperties, manifest, init.history, state, matches, activeSubmission, location, initialHydration ? [] : hydrationRouteProperties, initialHydration === true, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, init.patchRoutesOnNavigation != null, dataRoutes.branches, pendingActionResult, callSiteDefaultShouldRevalidate);\n\t\tpendingNavigationLoadId = ++incrementingLoadId;\n\t\tif (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some((m) => m.route.middleware && m.route.middleware.length > 0) && revalidatingFetchers.length === 0) {\n\t\t\tlet workingFetchers = new Map(state.fetchers);\n\t\t\tlet didUpdateFetcherRedirects = markFetchRedirectsDone(workingFetchers);\n\t\t\tcompleteNavigation(location, {\n\t\t\t\tmatches,\n\t\t\t\tloaderData: {},\n\t\t\t\terrors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null,\n\t\t\t\t...getActionDataForCommit(pendingActionResult),\n\t\t\t\t...didUpdateFetcherRedirects ? { fetchers: workingFetchers } : {}\n\t\t\t}, { flushSync });\n\t\t\treturn { shortCircuited: true };\n\t\t}\n\t\tif (shouldUpdateNavigationState) {\n\t\t\tlet updates = {};\n\t\t\tif (!isFogOfWar) {\n\t\t\t\tupdates.navigation = loadingNavigation;\n\t\t\t\tlet actionData = getUpdatedActionData(pendingActionResult);\n\t\t\t\tif (actionData !== void 0) updates.actionData = actionData;\n\t\t\t}\n\t\t\tif (revalidatingFetchers.length > 0) updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n\t\t\tupdateState(updates, { flushSync });\n\t\t}\n\t\trevalidatingFetchers.forEach((rf) => {\n\t\t\tabortFetcher(rf.key);\n\t\t\tif (rf.controller) fetchControllers.set(rf.key, rf.controller);\n\t\t});\n\t\tlet abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((f) => abortFetcher(f.key));\n\t\tif (pendingNavigationController) pendingNavigationController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n\t\tlet { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(dsMatches, revalidatingFetchers, request, location, scopedContext);\n\t\tif (request.signal.aborted) return { shortCircuited: true };\n\t\tif (pendingNavigationController) pendingNavigationController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n\t\trevalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));\n\t\tlet redirect = findRedirect(loaderResults);\n\t\tif (redirect) {\n\t\t\tawait startRedirectNavigation(request, redirect.result, true, { replace });\n\t\t\treturn { shortCircuited: true };\n\t\t}\n\t\tredirect = findRedirect(fetcherResults);\n\t\tif (redirect) {\n\t\t\tfetchRedirectIds.add(redirect.key);\n\t\t\tawait startRedirectNavigation(request, redirect.result, true, { replace });\n\t\t\treturn { shortCircuited: true };\n\t\t}\n\t\tlet workingFetchers = new Map(state.fetchers);\n\t\tlet { loaderData, errors } = processLoaderData(state, matches, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, workingFetchers);\n\t\tif (initialHydration && state.errors) errors = {\n\t\t\t...state.errors,\n\t\t\t...errors\n\t\t};\n\t\tlet didUpdateFetcherRedirects = markFetchRedirectsDone(workingFetchers);\n\t\tlet didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId, workingFetchers);\n\t\tlet shouldUpdateFetchers = didUpdateFetcherRedirects || didAbortFetchLoads || revalidatingFetchers.length > 0;\n\t\treturn {\n\t\t\tmatches,\n\t\t\tloaderData,\n\t\t\terrors,\n\t\t\t...shouldUpdateFetchers ? { workingFetchers } : {}\n\t\t};\n\t}\n\tfunction getUpdatedActionData(pendingActionResult) {\n\t\tif (pendingActionResult && !isErrorResult(pendingActionResult[1])) return { [pendingActionResult[0]]: pendingActionResult[1].data };\n\t\telse if (state.actionData) if (Object.keys(state.actionData).length === 0) return null;\n\t\telse return state.actionData;\n\t}\n\tfunction getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n\t\tlet workingFetchers = new Map(state.fetchers);\n\t\trevalidatingFetchers.forEach((rf) => {\n\t\t\tlet fetcher = workingFetchers.get(rf.key);\n\t\t\tlet revalidatingFetcher = getLoadingFetcher(void 0, fetcher ? fetcher.data : void 0);\n\t\t\tworkingFetchers.set(rf.key, revalidatingFetcher);\n\t\t});\n\t\treturn workingFetchers;\n\t}\n\tasync function fetch(key, routeId, href, opts) {\n\t\tabortFetcher(key);\n\t\tlet flushSync = (opts && opts.flushSync) === true;\n\t\tlet instrumentationResultMetaReceiver = consumeInstrumentationClientResultMetaReceiver(router);\n\t\tlet routesToUse = dataRoutes.activeRoutes;\n\t\tlet normalizedPath = normalizeTo(state.location, state.matches, basename, href, routeId, opts?.relative);\n\t\tlet matches = matchRoutesImpl(routesToUse, normalizedPath, basename, false, dataRoutes.branches);\n\t\tlet fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n\t\tif (fogOfWar.active && fogOfWar.matches) matches = fogOfWar.matches;\n\t\tif (instrumentationResultMetaReceiver) instrumentationResultMetaReceiver(getInstrumentationNavigateMeta(init.history, normalizedPath, matches));\n\t\tif (!matches) {\n\t\t\tsetFetcherError(key, routeId, getInternalRouterError(404, { pathname: normalizedPath }), { flushSync });\n\t\t\treturn;\n\t\t}\n\t\tlet { path, submission, error } = normalizeNavigateOptions(true, normalizedPath, opts);\n\t\tif (error) {\n\t\t\tsetFetcherError(key, routeId, error, { flushSync });\n\t\t\treturn;\n\t\t}\n\t\tlet scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();\n\t\tlet preventScrollReset = (opts && opts.preventScrollReset) === true;\n\t\tif (submission && isMutationMethod(submission.formMethod)) {\n\t\t\tawait handleFetcherAction(key, routeId, path, matches, scopedContext, fogOfWar.active, flushSync, preventScrollReset, submission, opts && opts.defaultShouldRevalidate);\n\t\t\treturn;\n\t\t}\n\t\tfetchLoadMatches.set(key, {\n\t\t\trouteId,\n\t\t\tpath\n\t\t});\n\t\tawait handleFetcherLoader(key, routeId, path, matches, scopedContext, fogOfWar.active, flushSync, preventScrollReset, submission);\n\t}\n\tasync function handleFetcherAction(key, routeId, path, requestMatches, scopedContext, isFogOfWar, flushSync, preventScrollReset, submission, callSiteDefaultShouldRevalidate) {\n\t\tinterruptActiveLoads();\n\t\tfetchLoadMatches.delete(key);\n\t\tupdateFetcherState(key, getSubmittingFetcher(submission, state.fetchers.get(key)), { flushSync });\n\t\tlet abortController = new AbortController();\n\t\tlet fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n\t\tif (isFogOfWar) {\n\t\t\tlet discoverResult = await discoverRoutes(requestMatches, new URL(fetchRequest.url).pathname, fetchRequest.signal, key);\n\t\t\tif (discoverResult.type === \"aborted\") return;\n\t\t\telse if (discoverResult.type === \"error\") {\n\t\t\t\tsetFetcherError(key, routeId, discoverResult.error, { flushSync });\n\t\t\t\treturn;\n\t\t\t} else if (!discoverResult.matches) {\n\t\t\t\tsetFetcherError(key, routeId, getInternalRouterError(404, { pathname: path }), { flushSync });\n\t\t\t\treturn;\n\t\t\t} else requestMatches = discoverResult.matches;\n\t\t}\n\t\tlet match = getTargetMatch(requestMatches, path);\n\t\tif (!match.route.action && !match.route.lazy) {\n\t\t\tsetFetcherError(key, routeId, getInternalRouterError(405, {\n\t\t\t\tmethod: submission.formMethod,\n\t\t\t\tpathname: path,\n\t\t\t\trouteId\n\t\t\t}), { flushSync });\n\t\t\treturn;\n\t\t}\n\t\tfetchControllers.set(key, abortController);\n\t\tlet originatingLoadId = incrementingLoadId;\n\t\tlet fetchMatches = getTargetedDataStrategyMatches(mapRouteProperties, manifest, fetchRequest, path, requestMatches, match, hydrationRouteProperties, scopedContext);\n\t\tlet actionResults = await callDataStrategy(fetchRequest, path, fetchMatches, scopedContext, key);\n\t\tlet actionResult = actionResults[match.route.id];\n\t\tif (!actionResult) {\n\t\t\tfor (let match of fetchMatches) if (actionResults[match.route.id]) {\n\t\t\t\tactionResult = actionResults[match.route.id];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (fetchRequest.signal.aborted) {\n\t\t\tif (fetchControllers.get(key) === abortController) fetchControllers.delete(key);\n\t\t\treturn;\n\t\t}\n\t\tif (fetchersQueuedForDeletion.has(key)) {\n\t\t\tif (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n\t\t\t\tupdateFetcherState(key, getDoneFetcher(void 0));\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (isRedirectResult(actionResult)) {\n\t\t\t\tfetchControllers.delete(key);\n\t\t\t\tif (pendingNavigationLoadId > originatingLoadId) {\n\t\t\t\t\tupdateFetcherState(key, getDoneFetcher(void 0));\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tfetchRedirectIds.add(key);\n\t\t\t\t\tupdateFetcherState(key, getLoadingFetcher(submission));\n\t\t\t\t\treturn startRedirectNavigation(fetchRequest, actionResult, false, {\n\t\t\t\t\t\tfetcherSubmission: submission,\n\t\t\t\t\t\tpreventScrollReset\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isErrorResult(actionResult)) {\n\t\t\t\tsetFetcherError(key, routeId, actionResult.error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tlet nextLocation = state.navigation.location || state.location;\n\t\tlet revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n\t\tlet routesToUse = dataRoutes.activeRoutes;\n\t\tlet matches = state.navigation.state !== \"idle\" ? matchRoutesImpl(routesToUse, state.navigation.location, basename, false, dataRoutes.branches) : state.matches;\n\t\tinvariant(matches, \"Didn't find any matches after fetcher action\");\n\t\tlet loadId = ++incrementingLoadId;\n\t\tfetchReloadIds.set(key, loadId);\n\t\tlet { dsMatches, revalidatingFetchers } = getMatchesToLoad(revalidationRequest, scopedContext, mapRouteProperties, manifest, init.history, state, matches, submission, nextLocation, hydrationRouteProperties, false, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, init.patchRoutesOnNavigation != null, dataRoutes.branches, [match.route.id, actionResult], callSiteDefaultShouldRevalidate);\n\t\tlet loadFetcher = getLoadingFetcher(submission, actionResult.data);\n\t\tlet workingFetchers = new Map(state.fetchers);\n\t\tworkingFetchers.set(key, loadFetcher);\n\t\trevalidatingFetchers.filter((rf) => rf.key !== key).forEach((rf) => {\n\t\t\tlet staleKey = rf.key;\n\t\t\tlet existingFetcher = workingFetchers.get(staleKey);\n\t\t\tlet revalidatingFetcher = getLoadingFetcher(void 0, existingFetcher ? existingFetcher.data : void 0);\n\t\t\tworkingFetchers.set(staleKey, revalidatingFetcher);\n\t\t\tabortFetcher(staleKey);\n\t\t\tif (rf.controller) fetchControllers.set(staleKey, rf.controller);\n\t\t});\n\t\tupdateState({ fetchers: workingFetchers });\n\t\tlet abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));\n\t\tabortController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n\t\tlet { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(dsMatches, revalidatingFetchers, revalidationRequest, nextLocation, scopedContext);\n\t\tif (abortController.signal.aborted) return;\n\t\tabortController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n\t\tfetchReloadIds.delete(key);\n\t\tfetchControllers.delete(key);\n\t\trevalidatingFetchers.forEach((r) => fetchControllers.delete(r.key));\n\t\tlet fetcherIsMounted = state.fetchers.has(key);\n\t\tlet getRedirectStateWithDoneFetcher = (s) => {\n\t\t\tif (!fetcherIsMounted) return s;\n\t\t\tlet workingFetchers = new Map(s.fetchers);\n\t\t\tworkingFetchers.set(key, getDoneFetcher(actionResult.data));\n\t\t\treturn {\n\t\t\t\t...s,\n\t\t\t\tfetchers: workingFetchers\n\t\t\t};\n\t\t};\n\t\tlet redirect = findRedirect(loaderResults);\n\t\tif (redirect) {\n\t\t\tstate = getRedirectStateWithDoneFetcher(state);\n\t\t\treturn startRedirectNavigation(revalidationRequest, redirect.result, false, { preventScrollReset });\n\t\t}\n\t\tredirect = findRedirect(fetcherResults);\n\t\tif (redirect) {\n\t\t\tfetchRedirectIds.add(redirect.key);\n\t\t\tstate = getRedirectStateWithDoneFetcher(state);\n\t\t\treturn startRedirectNavigation(revalidationRequest, redirect.result, false, { preventScrollReset });\n\t\t}\n\t\tlet finalFetchers = new Map(state.fetchers);\n\t\tif (fetcherIsMounted) finalFetchers.set(key, getDoneFetcher(actionResult.data));\n\t\tlet { loaderData, errors } = processLoaderData(state, matches, loaderResults, void 0, revalidatingFetchers, fetcherResults, finalFetchers);\n\t\tabortStaleFetchLoads(loadId, finalFetchers);\n\t\tif (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n\t\t\tinvariant(pendingAction, \"Expected pending action\");\n\t\t\tpendingNavigationController && pendingNavigationController.abort();\n\t\t\tcompleteNavigation(state.navigation.location, {\n\t\t\t\tmatches,\n\t\t\t\tloaderData,\n\t\t\t\terrors,\n\t\t\t\tfetchers: finalFetchers\n\t\t\t});\n\t\t} else {\n\t\t\tupdateState({\n\t\t\t\terrors,\n\t\t\t\tloaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),\n\t\t\t\tfetchers: finalFetchers\n\t\t\t});\n\t\t\tisRevalidationRequired = false;\n\t\t}\n\t}\n\tasync function handleFetcherLoader(key, routeId, path, matches, scopedContext, isFogOfWar, flushSync, preventScrollReset, submission) {\n\t\tlet existingFetcher = state.fetchers.get(key);\n\t\tupdateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : void 0), { flushSync });\n\t\tlet abortController = new AbortController();\n\t\tlet fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n\t\tif (isFogOfWar) {\n\t\t\tlet discoverResult = await discoverRoutes(matches, new URL(fetchRequest.url).pathname, fetchRequest.signal, key);\n\t\t\tif (discoverResult.type === \"aborted\") return;\n\t\t\telse if (discoverResult.type === \"error\") {\n\t\t\t\tsetFetcherError(key, routeId, discoverResult.error, { flushSync });\n\t\t\t\treturn;\n\t\t\t} else if (!discoverResult.matches) {\n\t\t\t\tsetFetcherError(key, routeId, getInternalRouterError(404, { pathname: path }), { flushSync });\n\t\t\t\treturn;\n\t\t\t} else matches = discoverResult.matches;\n\t\t}\n\t\tlet match = getTargetMatch(matches, path);\n\t\tfetchControllers.set(key, abortController);\n\t\tlet originatingLoadId = incrementingLoadId;\n\t\tlet results = await callDataStrategy(fetchRequest, path, getTargetedDataStrategyMatches(mapRouteProperties, manifest, fetchRequest, path, matches, match, hydrationRouteProperties, scopedContext), scopedContext, key);\n\t\tlet result = results[match.route.id];\n\t\tif (!result) {\n\t\t\tfor (let match of matches) if (results[match.route.id]) {\n\t\t\t\tresult = results[match.route.id];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (fetchControllers.get(key) === abortController) fetchControllers.delete(key);\n\t\tif (fetchRequest.signal.aborted) return;\n\t\tif (fetchersQueuedForDeletion.has(key)) {\n\t\t\tupdateFetcherState(key, getDoneFetcher(void 0));\n\t\t\treturn;\n\t\t}\n\t\tif (isRedirectResult(result)) if (pendingNavigationLoadId > originatingLoadId) {\n\t\t\tupdateFetcherState(key, getDoneFetcher(void 0));\n\t\t\treturn;\n\t\t} else {\n\t\t\tfetchRedirectIds.add(key);\n\t\t\tawait startRedirectNavigation(fetchRequest, result, false, { preventScrollReset });\n\t\t\treturn;\n\t\t}\n\t\tif (isErrorResult(result)) {\n\t\t\tsetFetcherError(key, routeId, result.error);\n\t\t\treturn;\n\t\t}\n\t\tupdateFetcherState(key, getDoneFetcher(result.data));\n\t}\n\t/**\n\t* Utility function to handle redirects returned from an action or loader.\n\t* Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n\t* example:\n\t*\n\t* - user is on /a\n\t* - user clicks a link to /b\n\t* - loader for /b redirects to /c\n\t*\n\t* In a non-JS app the browser would track the in-flight navigation to /b and\n\t* then replace it with /c when it encountered the redirect response. In\n\t* the end it would only ever update the URL bar with /c.\n\t*\n\t* In client-side routing using pushState/replaceState, we aim to emulate\n\t* this behavior and we also do not update history until the end of the\n\t* navigation (including processed redirects). This means that we never\n\t* actually touch history until we've processed redirects, so we just use\n\t* the history action from the original navigation (PUSH or REPLACE).\n\t*/\n\tasync function startRedirectNavigation(request, redirect, isNavigation, { submission, fetcherSubmission, preventScrollReset, replace } = {}) {\n\t\tif (!isNavigation) {\n\t\t\tpendingPopstateNavigationDfd?.resolve();\n\t\t\tpendingPopstateNavigationDfd = null;\n\t\t}\n\t\tif (redirect.response.headers.has(\"X-Remix-Revalidate\")) isRevalidationRequired = true;\n\t\tlet location = redirect.response.headers.get(\"Location\");\n\t\tinvariant(location, \"Expected a Location header on the redirect Response\");\n\t\tlocation = normalizeRedirectLocation(location, new URL(request.url), basename, init.history);\n\t\tlet redirectLocation = createLocation(state.location, location, { _isRedirect: true });\n\t\tif (isBrowser) {\n\t\t\tlet isDocumentReload = false;\n\t\t\tif (redirect.response.headers.has(\"X-Remix-Reload-Document\")) isDocumentReload = true;\n\t\t\telse if (isAbsoluteUrl(location)) {\n\t\t\t\tconst url = createBrowserURLImpl(routerWindow, location, true);\n\t\t\t\tisDocumentReload = url.origin !== routerWindow.location.origin || stripBasename(url.pathname, basename) == null;\n\t\t\t}\n\t\t\tif (isDocumentReload) {\n\t\t\t\tif (replace) routerWindow.location.replace(location);\n\t\t\t\telse routerWindow.location.assign(location);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tpendingNavigationController = null;\n\t\tlet redirectNavigationType = replace === true || redirect.response.headers.has(\"X-Remix-Replace\") ? \"REPLACE\" : \"PUSH\";\n\t\tlet { formMethod, formAction, formEncType } = state.navigation;\n\t\tif (!submission && !fetcherSubmission && formMethod && formAction && formEncType) submission = getSubmissionFromNavigation(state.navigation);\n\t\tlet activeSubmission = submission || fetcherSubmission;\n\t\tif (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) await startNavigation(redirectNavigationType, redirectLocation, {\n\t\t\tsubmission: {\n\t\t\t\t...activeSubmission,\n\t\t\t\tformAction: location\n\t\t\t},\n\t\t\tpreventScrollReset: preventScrollReset || pendingPreventScrollReset,\n\t\t\tenableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0\n\t\t});\n\t\telse await startNavigation(redirectNavigationType, redirectLocation, {\n\t\t\toverrideNavigation: getLoadingNavigation(redirectLocation, [], redirectNavigationType, submission),\n\t\t\tfetcherSubmission,\n\t\t\tpreventScrollReset: preventScrollReset || pendingPreventScrollReset,\n\t\t\tenableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0\n\t\t});\n\t}\n\tasync function callDataStrategy(request, path, matches, scopedContext, fetcherKey) {\n\t\tlet results;\n\t\tlet dataResults = {};\n\t\ttry {\n\t\t\tresults = await callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, false);\n\t\t} catch (e) {\n\t\t\tmatches.filter((m) => m.shouldLoad).forEach((m) => {\n\t\t\t\tdataResults[m.route.id] = {\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\terror: e\n\t\t\t\t};\n\t\t\t});\n\t\t\treturn dataResults;\n\t\t}\n\t\tif (request.signal.aborted) return dataResults;\n\t\tif (!isMutationMethod(request.method)) for (let match of matches) {\n\t\t\tif (results[match.route.id]?.type === \"error\") break;\n\t\t\tif (!results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler()) results[match.route.id] = {\n\t\t\t\ttype: \"error\",\n\t\t\t\tresult: /* @__PURE__ */ new Error(`No result returned from dataStrategy for route ${match.route.id}`)\n\t\t\t};\n\t\t}\n\t\tfor (let [routeId, result] of Object.entries(results)) if (isRedirectDataStrategyResult(result)) {\n\t\t\tlet response = result.result;\n\t\t\tdataResults[routeId] = {\n\t\t\t\ttype: \"redirect\",\n\t\t\t\tresponse: normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename)\n\t\t\t};\n\t\t} else dataResults[routeId] = await convertDataStrategyResultToDataResult(result);\n\t\treturn dataResults;\n\t}\n\tasync function callLoadersAndMaybeResolveData(matches, fetchersToLoad, request, location, scopedContext) {\n\t\tlet loaderResultsPromise = callDataStrategy(request, location, matches, scopedContext, null);\n\t\tlet fetcherResultsPromise = Promise.all(fetchersToLoad.map(async (f) => {\n\t\t\tif (f.matches && f.match && f.request && f.controller) {\n\t\t\t\tlet result = (await callDataStrategy(f.request, f.path, f.matches, scopedContext, f.key))[f.match.route.id];\n\t\t\t\treturn { [f.key]: result };\n\t\t\t} else return Promise.resolve({ [f.key]: {\n\t\t\t\ttype: \"error\",\n\t\t\t\terror: getInternalRouterError(404, { pathname: f.path })\n\t\t\t} });\n\t\t}));\n\t\treturn {\n\t\t\tloaderResults: await loaderResultsPromise,\n\t\t\tfetcherResults: (await fetcherResultsPromise).reduce((acc, r) => Object.assign(acc, r), {})\n\t\t};\n\t}\n\tfunction interruptActiveLoads() {\n\t\tisRevalidationRequired = true;\n\t\tfetchLoadMatches.forEach((_, key) => {\n\t\t\tif (fetchControllers.has(key)) cancelledFetcherLoads.add(key);\n\t\t\tabortFetcher(key);\n\t\t});\n\t}\n\tfunction updateFetcherState(key, fetcher, opts = {}) {\n\t\tlet workingFetchers = new Map(state.fetchers);\n\t\tworkingFetchers.set(key, fetcher);\n\t\tupdateState({ fetchers: workingFetchers }, { flushSync: (opts && opts.flushSync) === true });\n\t}\n\tfunction setFetcherError(key, routeId, error, opts = {}) {\n\t\tlet boundaryMatch = findNearestBoundary(state.matches, routeId);\n\t\tlet workingFetchers = new Map(state.fetchers);\n\t\tdeleteFetcher(workingFetchers, key);\n\t\tupdateState({\n\t\t\terrors: { [boundaryMatch.route.id]: error },\n\t\t\tfetchers: workingFetchers\n\t\t}, { flushSync: (opts && opts.flushSync) === true });\n\t}\n\tfunction getFetcher(key) {\n\t\tactiveFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n\t\tif (fetchersQueuedForDeletion.has(key)) fetchersQueuedForDeletion.delete(key);\n\t\treturn state.fetchers.get(key) || IDLE_FETCHER;\n\t}\n\tfunction resetFetcher(key, opts) {\n\t\tabortFetcher(key, opts?.reason);\n\t\tupdateFetcherState(key, getDoneFetcher(null));\n\t}\n\tfunction deleteFetcher(fetchers, key) {\n\t\tlet fetcher = state.fetchers.get(key);\n\t\tif (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) abortFetcher(key);\n\t\tfetchLoadMatches.delete(key);\n\t\tfetchReloadIds.delete(key);\n\t\tfetchRedirectIds.delete(key);\n\t\tfetchersQueuedForDeletion.delete(key);\n\t\tcancelledFetcherLoads.delete(key);\n\t\tfetchers.delete(key);\n\t}\n\tfunction queueFetcherForDeletion(key) {\n\t\tlet count = (activeFetchers.get(key) || 0) - 1;\n\t\tif (count <= 0) {\n\t\t\tactiveFetchers.delete(key);\n\t\t\tfetchersQueuedForDeletion.add(key);\n\t\t} else activeFetchers.set(key, count);\n\t\tupdateState({ fetchers: new Map(state.fetchers) });\n\t}\n\tfunction abortFetcher(key, reason) {\n\t\tlet controller = fetchControllers.get(key);\n\t\tif (controller) {\n\t\t\tcontroller.abort(reason);\n\t\t\tfetchControllers.delete(key);\n\t\t}\n\t}\n\tfunction markFetchersDone(keys, fetchers) {\n\t\tfor (let key of keys) {\n\t\t\tlet fetcher = fetchers.get(key);\n\t\t\tinvariant(fetcher, `Expected fetcher: ${key}`);\n\t\t\tlet doneFetcher = getDoneFetcher(fetcher.data);\n\t\t\tfetchers.set(key, doneFetcher);\n\t\t}\n\t}\n\tfunction markFetchRedirectsDone(fetchers) {\n\t\tlet doneKeys = [];\n\t\tlet didUpdateFetchers = false;\n\t\tfor (let key of fetchRedirectIds) {\n\t\t\tlet fetcher = fetchers.get(key);\n\t\t\tinvariant(fetcher, `Expected fetcher: ${key}`);\n\t\t\tif (fetcher.state === \"loading\") {\n\t\t\t\tfetchRedirectIds.delete(key);\n\t\t\t\tdoneKeys.push(key);\n\t\t\t\tdidUpdateFetchers = true;\n\t\t\t}\n\t\t}\n\t\tmarkFetchersDone(doneKeys, fetchers);\n\t\treturn didUpdateFetchers;\n\t}\n\tfunction abortStaleFetchLoads(landedId, fetchers) {\n\t\tlet yeetedKeys = [];\n\t\tfor (let [key, id] of fetchReloadIds) if (id < landedId) {\n\t\t\tlet fetcher = fetchers.get(key);\n\t\t\tinvariant(fetcher, `Expected fetcher: ${key}`);\n\t\t\tif (fetcher.state === \"loading\") {\n\t\t\t\tabortFetcher(key);\n\t\t\t\tfetchReloadIds.delete(key);\n\t\t\t\tyeetedKeys.push(key);\n\t\t\t}\n\t\t}\n\t\tmarkFetchersDone(yeetedKeys, fetchers);\n\t\treturn yeetedKeys.length > 0;\n\t}\n\tfunction getBlocker(key, fn) {\n\t\tlet blocker = state.blockers.get(key) || IDLE_BLOCKER;\n\t\tif (blockerFunctions.get(key) !== fn) blockerFunctions.set(key, fn);\n\t\treturn blocker;\n\t}\n\tfunction deleteBlocker(key) {\n\t\tstate.blockers.delete(key);\n\t\tblockerFunctions.delete(key);\n\t}\n\tfunction updateBlocker(key, newBlocker) {\n\t\tlet blocker = state.blockers.get(key) || IDLE_BLOCKER;\n\t\tinvariant(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\", `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}`);\n\t\tlet blockers = new Map(state.blockers);\n\t\tblockers.set(key, newBlocker);\n\t\tupdateState({ blockers });\n\t}\n\tfunction shouldBlockNavigation({ currentLocation, nextLocation, historyAction }) {\n\t\tif (blockerFunctions.size === 0) return;\n\t\tif (blockerFunctions.size > 1) warning(false, \"A router only supports one blocker at a time\");\n\t\tlet entries = Array.from(blockerFunctions.entries());\n\t\tlet [blockerKey, blockerFunction] = entries[entries.length - 1];\n\t\tlet blocker = state.blockers.get(blockerKey);\n\t\tif (blocker && blocker.state === \"proceeding\") return;\n\t\tif (blockerFunction({\n\t\t\tcurrentLocation,\n\t\t\tnextLocation,\n\t\t\thistoryAction\n\t\t})) return blockerKey;\n\t}\n\tfunction handleNavigational404(pathname) {\n\t\tlet error = getInternalRouterError(404, { pathname });\n\t\tlet routesToUse = dataRoutes.activeRoutes;\n\t\tlet { matches, route } = getShortCircuitMatches(routesToUse);\n\t\treturn {\n\t\t\tnotFoundMatches: matches,\n\t\t\troute,\n\t\t\terror\n\t\t};\n\t}\n\tfunction enableScrollRestoration(positions, getPosition, getKey) {\n\t\tsavedScrollPositions = positions;\n\t\tgetScrollPosition = getPosition;\n\t\tgetScrollRestorationKey = getKey || null;\n\t\tif (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n\t\t\tinitialScrollRestored = true;\n\t\t\tlet y = getSavedScrollPosition(state.location, state.matches);\n\t\t\tif (y != null) updateState({ restoreScrollPosition: y });\n\t\t}\n\t\treturn () => {\n\t\t\tsavedScrollPositions = null;\n\t\t\tgetScrollPosition = null;\n\t\t\tgetScrollRestorationKey = null;\n\t\t};\n\t}\n\tfunction getScrollKey(location, matches) {\n\t\tif (getScrollRestorationKey) return getScrollRestorationKey(location, matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))) || location.key;\n\t\treturn location.key;\n\t}\n\tfunction saveScrollPosition(location, matches) {\n\t\tif (savedScrollPositions && getScrollPosition) {\n\t\t\tlet key = getScrollKey(location, matches);\n\t\t\tsavedScrollPositions[key] = getScrollPosition();\n\t\t}\n\t}\n\tfunction getSavedScrollPosition(location, matches) {\n\t\tif (savedScrollPositions) {\n\t\t\tlet key = getScrollKey(location, matches);\n\t\t\tlet y = savedScrollPositions[key];\n\t\t\tif (typeof y === \"number\") return y;\n\t\t}\n\t\treturn null;\n\t}\n\tfunction checkFogOfWar(matches, routesToUse, pathname) {\n\t\tif (init.patchRoutesOnNavigation) {\n\t\t\tlet activeBranches = dataRoutes.branches;\n\t\t\tif (!matches) return {\n\t\t\t\tactive: true,\n\t\t\t\tmatches: matchRoutesImpl(routesToUse, pathname, basename, true, activeBranches) || []\n\t\t\t};\n\t\t\telse if (Object.keys(matches[0].params).length > 0) return {\n\t\t\t\tactive: true,\n\t\t\t\tmatches: matchRoutesImpl(routesToUse, pathname, basename, true, activeBranches)\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tactive: false,\n\t\t\tmatches: null\n\t\t};\n\t}\n\tasync function discoverRoutes(matches, pathname, signal, fetcherKey) {\n\t\tif (!init.patchRoutesOnNavigation) return {\n\t\t\ttype: \"success\",\n\t\t\tmatches\n\t\t};\n\t\tlet partialMatches = matches;\n\t\twhile (true) {\n\t\t\tlet localManifest = manifest;\n\t\t\ttry {\n\t\t\t\tawait init.patchRoutesOnNavigation({\n\t\t\t\t\tsignal,\n\t\t\t\t\tpath: pathname,\n\t\t\t\t\tmatches: partialMatches,\n\t\t\t\t\tfetcherKey,\n\t\t\t\t\tpatch: (routeId, children) => {\n\t\t\t\t\t\tif (signal.aborted) return;\n\t\t\t\t\t\tpatchRoutesImpl(routeId, children, dataRoutes, localManifest, mapRouteProperties, false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\terror: e,\n\t\t\t\t\tpartialMatches\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (signal.aborted) return { type: \"aborted\" };\n\t\t\tlet activeBranches = dataRoutes.branches;\n\t\t\tlet newMatches = matchRoutesImpl(dataRoutes.activeRoutes, pathname, basename, false, activeBranches);\n\t\t\tlet newPartialMatches = null;\n\t\t\tif (newMatches) if (Object.keys(newMatches[0].params).length === 0) return {\n\t\t\t\ttype: \"success\",\n\t\t\t\tmatches: newMatches\n\t\t\t};\n\t\t\telse {\n\t\t\t\tnewPartialMatches = matchRoutesImpl(dataRoutes.activeRoutes, pathname, basename, true, activeBranches);\n\t\t\t\tif (!(newPartialMatches && partialMatches.length < newPartialMatches.length && compareMatches(partialMatches, newPartialMatches.slice(0, partialMatches.length)))) return {\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmatches: newMatches\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (!newPartialMatches) newPartialMatches = matchRoutesImpl(dataRoutes.activeRoutes, pathname, basename, true, activeBranches);\n\t\t\tif (!newPartialMatches || compareMatches(partialMatches, newPartialMatches)) return {\n\t\t\t\ttype: \"success\",\n\t\t\t\tmatches: null\n\t\t\t};\n\t\t\tpartialMatches = newPartialMatches;\n\t\t}\n\t}\n\tfunction compareMatches(a, b) {\n\t\treturn a.length === b.length && a.every((m, i) => m.route.id === b[i].route.id);\n\t}\n\tfunction _internalSetRoutes(newRoutes) {\n\t\tmanifest = {};\n\t\tdataRoutes.setHmrRoutes(convertRoutesToDataRoutes(newRoutes, mapRouteProperties, void 0, manifest));\n\t}\n\tfunction patchRoutes(routeId, children, unstable_allowElementMutations = false) {\n\t\tpatchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProperties, unstable_allowElementMutations);\n\t\tif (!dataRoutes.hasHMRRoutes) updateState({});\n\t}\n\trouter = {\n\t\tget basename() {\n\t\t\treturn basename;\n\t\t},\n\t\tget future() {\n\t\t\treturn future;\n\t\t},\n\t\tget state() {\n\t\t\treturn state;\n\t\t},\n\t\tget routes() {\n\t\t\treturn dataRoutes.stableRoutes;\n\t\t},\n\t\tget branches() {\n\t\t\treturn dataRoutes.branches;\n\t\t},\n\t\tget manifest() {\n\t\t\treturn manifest;\n\t\t},\n\t\tget window() {\n\t\t\treturn routerWindow;\n\t\t},\n\t\tinitialize,\n\t\tsubscribe,\n\t\tenableScrollRestoration,\n\t\tnavigate,\n\t\tfetch,\n\t\trevalidate,\n\t\tcreateHref: (to) => init.history.createHref(to),\n\t\tencodeLocation: (to) => init.history.encodeLocation(to),\n\t\tgetFetcher,\n\t\tresetFetcher,\n\t\tdeleteFetcher: queueFetcherForDeletion,\n\t\tdispose,\n\t\tgetBlocker,\n\t\tdeleteBlocker,\n\t\tpatchRoutes,\n\t\t_internalFetchControllers: fetchControllers,\n\t\t_internalSetRoutes,\n\t\t_internalSetStateDoNotUseOrYouWillBreakYourApp(newState) {\n\t\t\tupdateState(newState);\n\t\t}\n\t};\n\tif (init.instrumentations) router = instrumentClientSideRouter(router, init.instrumentations.map((i) => i.router).filter(Boolean));\n\treturn router;\n}\n/**\n* Create a static handler to perform server-side data loading\n*\n* @example\n* export async function handleRequest(request: Request) {\n* let { query, dataRoutes } = createStaticHandler(routes);\n* let context = await query(request);\n*\n* if (context instanceof Response) {\n* return context;\n* }\n*\n* let router = createStaticRouter(dataRoutes, context);\n* return new Response(\n* ReactDOMServer.renderToString(<StaticRouterProvider ... />),\n* { headers: { \"Content-Type\": \"text/html\" } }\n* );\n* }\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param routes The {@link RouteObject | route objects} to create a static\n* handler for\n* @param opts Options\n* @param opts.basename The base URL for the static handler (default: `/`)\n* @param opts.future Future flags for the static handler\n* @returns A static handler that can be used to query data for the provided\n* routes\n*/\nfunction createStaticHandler(routes, opts) {\n\tinvariant(routes.length > 0, \"You must provide a non-empty routes array to createStaticHandler\");\n\tlet manifest = {};\n\tlet basename = (opts ? opts.basename : null) || \"/\";\n\tlet _mapRouteProperties = opts?.mapRouteProperties;\n\tlet mapRouteProperties = _mapRouteProperties ? _mapRouteProperties : () => ({});\n\t({ ...opts?.future });\n\tif (opts?.instrumentations) {\n\t\tlet instrumentations = opts.instrumentations;\n\t\tmapRouteProperties = (route) => {\n\t\t\treturn {\n\t\t\t\t..._mapRouteProperties?.(route),\n\t\t\t\t...getRouteInstrumentationUpdates(instrumentations.map((i) => i.route).filter(Boolean), route)\n\t\t\t};\n\t\t};\n\t}\n\tlet dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, void 0, manifest);\n\tlet routeBranches = flattenAndRankRoutes(dataRoutes);\n\t/**\n\t* The query() method is intended for document requests, in which we want to\n\t* call an optional action and potentially multiple loaders for all nested\n\t* routes. It returns a StaticHandlerContext object, which is very similar\n\t* to the router state (location, loaderData, actionData, errors, etc.) and\n\t* also adds SSR-specific information such as the statusCode and headers\n\t* from action/loaders Responses.\n\t*\n\t* It _should_ never throw and should report all errors through the\n\t* returned handlerContext.errors object, properly associating errors to\n\t* their error boundary. Additionally, it tracks _deepestRenderedBoundaryId\n\t* which can be used to emulate React error boundaries during SSR by performing\n\t* a second pass only down to the boundaryId.\n\t*\n\t* The one exception where we do not return a StaticHandlerContext is when a\n\t* redirect response is returned or thrown from any action/loader. We\n\t* propagate that out and return the raw Response so the HTTP server can\n\t* return it directly.\n\t*\n\t* - `opts.requestContext` is an optional server context that will be passed\n\t* to actions/loaders in the `context` parameter\n\t* - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent\n\t* the bubbling of errors which allows single-fetch-type implementations\n\t* where the client will handle the bubbling and we may need to return data\n\t* for the handling route\n\t*/\n\tasync function query(request, { requestContext, filterMatchesToLoad, skipLoaderErrorBubbling, skipRevalidation, dataStrategy, generateMiddlewareResponse, normalizePath } = {}) {\n\t\tlet normalizePathImpl = normalizePath || defaultNormalizePath;\n\t\tlet method = request.method;\n\t\tlet location = createLocation(\"\", normalizePathImpl(request), null, \"default\");\n\t\tlet matches = matchRoutesImpl(dataRoutes, location, basename, false, routeBranches);\n\t\trequestContext = requestContext != null ? requestContext : new RouterContextProvider();\n\t\tif (!isValidMethod(method) && method !== \"HEAD\") {\n\t\t\tlet error = getInternalRouterError(405, { method });\n\t\t\tlet { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes);\n\t\t\tlet staticContext = {\n\t\t\t\tbasename,\n\t\t\t\tlocation,\n\t\t\t\tmatches: methodNotAllowedMatches,\n\t\t\t\tloaderData: {},\n\t\t\t\tactionData: null,\n\t\t\t\terrors: { [route.id]: error },\n\t\t\t\tstatusCode: error.status,\n\t\t\t\tloaderHeaders: {},\n\t\t\t\tactionHeaders: {}\n\t\t\t};\n\t\t\treturn generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;\n\t\t} else if (!matches) {\n\t\t\tlet error = getInternalRouterError(404, { pathname: location.pathname });\n\t\t\tlet { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes);\n\t\t\tlet staticContext = {\n\t\t\t\tbasename,\n\t\t\t\tlocation,\n\t\t\t\tmatches: notFoundMatches,\n\t\t\t\tloaderData: {},\n\t\t\t\tactionData: null,\n\t\t\t\terrors: { [route.id]: error },\n\t\t\t\tstatusCode: error.status,\n\t\t\t\tloaderHeaders: {},\n\t\t\t\tactionHeaders: {}\n\t\t\t};\n\t\t\treturn generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;\n\t\t}\n\t\tif (generateMiddlewareResponse) {\n\t\t\tinvariant(requestContext instanceof RouterContextProvider, \"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`\");\n\t\t\ttry {\n\t\t\t\tawait loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties);\n\t\t\t\tlet renderedStaticContext;\n\t\t\t\tlet response = await runServerMiddlewarePipeline({\n\t\t\t\t\trequest,\n\t\t\t\t\turl: createDataFunctionUrl(request, location),\n\t\t\t\t\tpattern: getRoutePattern(matches),\n\t\t\t\t\tmatches,\n\t\t\t\t\tparams: matches[0].params,\n\t\t\t\t\tcontext: requestContext\n\t\t\t\t}, async () => {\n\t\t\t\t\treturn await generateMiddlewareResponse(async (revalidationRequest, opts = {}) => {\n\t\t\t\t\t\tlet result = await queryImpl(revalidationRequest, location, matches, requestContext, dataStrategy || null, skipLoaderErrorBubbling === true, null, \"filterMatchesToLoad\" in opts ? opts.filterMatchesToLoad ?? null : filterMatchesToLoad ?? null, skipRevalidation === true);\n\t\t\t\t\t\tif (isResponse(result)) return result;\n\t\t\t\t\t\trenderedStaticContext = {\n\t\t\t\t\t\t\tlocation,\n\t\t\t\t\t\t\tbasename,\n\t\t\t\t\t\t\t...result\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn renderedStaticContext;\n\t\t\t\t\t});\n\t\t\t\t}, async (error, routeId) => {\n\t\t\t\t\tif (isRedirectResponse(error)) return error;\n\t\t\t\t\tif (isResponse(error)) try {\n\t\t\t\t\t\terror = new ErrorResponseImpl(error.status, error.statusText, await parseResponseBody(error));\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t\tif (isDataWithResponseInit(error)) error = dataWithResponseInitToErrorResponse(error);\n\t\t\t\t\tif (renderedStaticContext) {\n\t\t\t\t\t\tif (routeId in renderedStaticContext.loaderData) renderedStaticContext.loaderData[routeId] = void 0;\n\t\t\t\t\t\tlet staticContext = getStaticContextFromError(dataRoutes, renderedStaticContext, error, skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, routeId).route.id);\n\t\t\t\t\t\treturn generateMiddlewareResponse(() => Promise.resolve(staticContext));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet staticContext = {\n\t\t\t\t\t\t\tmatches,\n\t\t\t\t\t\t\tlocation,\n\t\t\t\t\t\t\tbasename,\n\t\t\t\t\t\t\tloaderData: {},\n\t\t\t\t\t\t\tactionData: null,\n\t\t\t\t\t\t\terrors: { [skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, matches.find((m) => m.route.id === routeId || m.route.loader)?.route.id || routeId).route.id]: error },\n\t\t\t\t\t\t\tstatusCode: isRouteErrorResponse(error) ? error.status : 500,\n\t\t\t\t\t\t\tactionHeaders: {},\n\t\t\t\t\t\t\tloaderHeaders: {}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn generateMiddlewareResponse(() => Promise.resolve(staticContext));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tinvariant(isResponse(response), \"Expected a response in query()\");\n\t\t\t\treturn response;\n\t\t\t} catch (e) {\n\t\t\t\tif (isResponse(e)) return e;\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t\tlet result = await queryImpl(request, location, matches, requestContext, dataStrategy || null, skipLoaderErrorBubbling === true, null, filterMatchesToLoad || null, skipRevalidation === true);\n\t\tif (isResponse(result)) return result;\n\t\treturn {\n\t\t\tlocation,\n\t\t\tbasename,\n\t\t\t...result\n\t\t};\n\t}\n\t/**\n\t* The queryRoute() method is intended for targeted route requests, either\n\t* for fetch ?_data requests or resource route requests. In this case, we\n\t* are only ever calling a single action or loader, and we are returning the\n\t* returned value directly. In most cases, this will be a Response returned\n\t* from the action/loader, but it may be a primitive or other value as well -\n\t* and in such cases the calling context should handle that accordingly.\n\t*\n\t* We do respect the throw/return differentiation, so if an action/loader\n\t* throws, then this method will throw the value. This is important so we\n\t* can do proper boundary identification in Remix where a thrown Response\n\t* must go to the Catch Boundary but a returned Response is happy-path.\n\t*\n\t* One thing to note is that any Router-initiated Errors that make sense\n\t* to associate with a status code will be thrown as an ErrorResponse\n\t* instance which include the raw Error, such that the calling context can\n\t* serialize the error as they see fit while including the proper response\n\t* code. Examples here are 404 and 405 errors that occur prior to reaching\n\t* any user-defined loaders.\n\t*\n\t* - `opts.routeId` allows you to specify the specific route handler to call.\n\t* If not provided the handler will determine the proper route by matching\n\t* against `request.url`\n\t* - `opts.requestContext` is an optional server context that will be passed\n\t* to actions/loaders in the `context` parameter\n\t*/\n\tasync function queryRoute(request, { routeId, requestContext, dataStrategy, generateMiddlewareResponse, normalizePath } = {}) {\n\t\tlet normalizePathImpl = normalizePath || defaultNormalizePath;\n\t\tlet method = request.method;\n\t\tlet location = createLocation(\"\", normalizePathImpl(request), null, \"default\");\n\t\tlet matches = matchRoutesImpl(dataRoutes, location, basename, false, routeBranches);\n\t\trequestContext = requestContext != null ? requestContext : new RouterContextProvider();\n\t\tif (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") throw getInternalRouterError(405, { method });\n\t\telse if (!matches) throw getInternalRouterError(404, { pathname: location.pathname });\n\t\tlet match = routeId ? matches.find((m) => m.route.id === routeId) : getTargetMatch(matches, location);\n\t\tif (routeId && !match) throw getInternalRouterError(403, {\n\t\t\tpathname: location.pathname,\n\t\t\trouteId\n\t\t});\n\t\telse if (!match) throw getInternalRouterError(404, { pathname: location.pathname });\n\t\tif (generateMiddlewareResponse) {\n\t\t\tinvariant(requestContext instanceof RouterContextProvider, \"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`\");\n\t\t\tawait loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties);\n\t\t\treturn await runServerMiddlewarePipeline({\n\t\t\t\trequest,\n\t\t\t\turl: createDataFunctionUrl(request, location),\n\t\t\t\tpattern: getRoutePattern(matches),\n\t\t\t\tmatches,\n\t\t\t\tparams: matches[0].params,\n\t\t\t\tcontext: requestContext\n\t\t\t}, async () => {\n\t\t\t\treturn await generateMiddlewareResponse(async (innerRequest) => {\n\t\t\t\t\tlet processed = handleQueryResult(await queryImpl(innerRequest, location, matches, requestContext, dataStrategy || null, false, match, null, false));\n\t\t\t\t\treturn isResponse(processed) ? processed : typeof processed === \"string\" ? new Response(processed) : Response.json(processed);\n\t\t\t\t});\n\t\t\t}, (error) => {\n\t\t\t\tif (isDataWithResponseInit(error)) return Promise.resolve(dataWithResponseInitToResponse(error));\n\t\t\t\tif (isResponse(error)) return Promise.resolve(error);\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\t\treturn handleQueryResult(await queryImpl(request, location, matches, requestContext, dataStrategy || null, false, match, null, false));\n\t\tfunction handleQueryResult(result) {\n\t\t\tif (isResponse(result)) return result;\n\t\t\tlet error = result.errors ? Object.values(result.errors)[0] : void 0;\n\t\t\tif (error !== void 0) throw error;\n\t\t\tif (result.actionData) return Object.values(result.actionData)[0];\n\t\t\tif (result.loaderData) return Object.values(result.loaderData)[0];\n\t\t}\n\t}\n\tasync function queryImpl(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) {\n\t\tinvariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n\t\ttry {\n\t\t\tif (isMutationMethod(request.method)) return await submit(request, location, matches, routeMatch || getTargetMatch(matches, location), requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch != null, filterMatchesToLoad, skipRevalidation);\n\t\t\tlet result = await loadRouteData(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad);\n\t\t\treturn isResponse(result) ? result : {\n\t\t\t\t...result,\n\t\t\t\tactionData: null,\n\t\t\t\tactionHeaders: {}\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tif (isDataStrategyResult(e) && isResponse(e.result)) {\n\t\t\t\tif (e.type === \"error\") throw e.result;\n\t\t\t\treturn e.result;\n\t\t\t}\n\t\t\tif (isRedirectResponse(e)) return e;\n\t\t\tthrow e;\n\t\t}\n\t}\n\tasync function submit(request, location, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest, filterMatchesToLoad, skipRevalidation) {\n\t\tlet result;\n\t\tif (!actionMatch.route.action && !actionMatch.route.lazy) {\n\t\t\tlet error = getInternalRouterError(405, {\n\t\t\t\tmethod: request.method,\n\t\t\t\tpathname: new URL(request.url).pathname,\n\t\t\t\trouteId: actionMatch.route.id\n\t\t\t});\n\t\t\tif (isRouteRequest) throw error;\n\t\t\tresult = {\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t};\n\t\t} else {\n\t\t\tresult = (await callDataStrategy(request, location, getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, location, matches, actionMatch, [], requestContext), isRouteRequest, requestContext, dataStrategy))[actionMatch.route.id];\n\t\t\tif (request.signal.aborted) throwStaticHandlerAbortedError(request, isRouteRequest);\n\t\t}\n\t\tif (isRedirectResult(result)) throw new Response(null, {\n\t\t\tstatus: result.response.status,\n\t\t\theaders: { Location: result.response.headers.get(\"Location\") }\n\t\t});\n\t\tif (isRouteRequest) {\n\t\t\tif (isErrorResult(result)) throw result.error;\n\t\t\treturn {\n\t\t\t\tmatches: [actionMatch],\n\t\t\t\tloaderData: {},\n\t\t\t\tactionData: { [actionMatch.route.id]: result.data },\n\t\t\t\terrors: null,\n\t\t\t\tstatusCode: 200,\n\t\t\t\tloaderHeaders: {},\n\t\t\t\tactionHeaders: {}\n\t\t\t};\n\t\t}\n\t\tif (skipRevalidation) if (isErrorResult(result)) {\n\t\t\tlet boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n\t\t\treturn {\n\t\t\t\tstatusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n\t\t\t\tactionData: null,\n\t\t\t\tactionHeaders: { ...result.headers ? { [actionMatch.route.id]: result.headers } : {} },\n\t\t\t\tmatches,\n\t\t\t\tloaderData: {},\n\t\t\t\terrors: { [boundaryMatch.route.id]: result.error },\n\t\t\t\tloaderHeaders: {}\n\t\t\t};\n\t\t} else return {\n\t\t\tactionData: { [actionMatch.route.id]: result.data },\n\t\t\tactionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {},\n\t\t\tmatches,\n\t\t\tloaderData: {},\n\t\t\terrors: null,\n\t\t\tstatusCode: result.statusCode || 200,\n\t\t\tloaderHeaders: {}\n\t\t};\n\t\tlet loaderRequest = new Request(request.url, {\n\t\t\theaders: request.headers,\n\t\t\tredirect: request.redirect,\n\t\t\tsignal: request.signal\n\t\t});\n\t\tif (isErrorResult(result)) return {\n\t\t\t...await loadRouteData(loaderRequest, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, null, filterMatchesToLoad, [(skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id)).route.id, result]),\n\t\t\tstatusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n\t\t\tactionData: null,\n\t\t\tactionHeaders: { ...result.headers ? { [actionMatch.route.id]: result.headers } : {} }\n\t\t};\n\t\treturn {\n\t\t\t...await loadRouteData(loaderRequest, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, null, filterMatchesToLoad),\n\t\t\tactionData: { [actionMatch.route.id]: result.data },\n\t\t\t...result.statusCode ? { statusCode: result.statusCode } : {},\n\t\t\tactionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}\n\t\t};\n\t}\n\tasync function loadRouteData(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) {\n\t\tlet isRouteRequest = routeMatch != null;\n\t\tif (isRouteRequest && !routeMatch?.route.loader && !routeMatch?.route.lazy) throw getInternalRouterError(400, {\n\t\t\tmethod: request.method,\n\t\t\tpathname: new URL(request.url).pathname,\n\t\t\trouteId: routeMatch?.route.id\n\t\t});\n\t\tlet dsMatches;\n\t\tif (routeMatch) dsMatches = getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, location, matches, routeMatch, [], requestContext);\n\t\telse {\n\t\t\tlet maxIdx = pendingActionResult && isErrorResult(pendingActionResult[1]) ? matches.findIndex((m) => m.route.id === pendingActionResult[0]) - 1 : void 0;\n\t\t\tlet pattern = getRoutePattern(matches);\n\t\t\tdsMatches = matches.map((match, index) => {\n\t\t\t\tif (maxIdx != null && index > maxIdx) return getDataStrategyMatch(mapRouteProperties, manifest, request, location, pattern, match, [], requestContext, false);\n\t\t\t\treturn getDataStrategyMatch(mapRouteProperties, manifest, request, location, pattern, match, [], requestContext, (match.route.loader || match.route.lazy) != null && (!filterMatchesToLoad || filterMatchesToLoad(match)));\n\t\t\t});\n\t\t}\n\t\tif (!dataStrategy && !dsMatches.some((m) => m.shouldLoad)) return {\n\t\t\tmatches,\n\t\t\tloaderData: {},\n\t\t\terrors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null,\n\t\t\tstatusCode: 200,\n\t\t\tloaderHeaders: {}\n\t\t};\n\t\tlet results = await callDataStrategy(request, location, dsMatches, isRouteRequest, requestContext, dataStrategy);\n\t\tif (request.signal.aborted) throwStaticHandlerAbortedError(request, isRouteRequest);\n\t\treturn {\n\t\t\t...processRouteLoaderData(matches, results, pendingActionResult, true, skipLoaderErrorBubbling),\n\t\t\tmatches\n\t\t};\n\t}\n\tasync function callDataStrategy(request, location, matches, isRouteRequest, requestContext, dataStrategy) {\n\t\tlet results = await callDataStrategyImpl(dataStrategy || defaultDataStrategy, request, location, matches, null, requestContext, true);\n\t\tlet dataResults = {};\n\t\tawait Promise.all(matches.map(async (match) => {\n\t\t\tif (!(match.route.id in results)) return;\n\t\t\tlet result = results[match.route.id];\n\t\t\tif (isRedirectDataStrategyResult(result)) {\n\t\t\t\tlet response = result.result;\n\t\t\t\tthrow normalizeRelativeRoutingRedirectResponse(response, request, match.route.id, matches, basename);\n\t\t\t}\n\t\t\tif (isRouteRequest) {\n\t\t\t\tif (isResponse(result.result)) throw result;\n\t\t\t\telse if (isDataWithResponseInit(result.result)) throw dataWithResponseInitToResponse(result.result);\n\t\t\t}\n\t\t\tdataResults[match.route.id] = await convertDataStrategyResultToDataResult(result);\n\t\t}));\n\t\treturn dataResults;\n\t}\n\treturn {\n\t\tdataRoutes,\n\t\t_internalRouteBranches: routeBranches,\n\t\tquery,\n\t\tqueryRoute\n\t};\n}\n/**\n* Given an existing StaticHandlerContext and an error thrown at render time,\n* provide an updated StaticHandlerContext suitable for a second SSR render\n*\n* @category Utils\n*/\nfunction getStaticContextFromError(routes, handlerContext, error, boundaryId) {\n\tlet errorBoundaryId = boundaryId || handlerContext._deepestRenderedBoundaryId || routes[0].id;\n\treturn {\n\t\t...handlerContext,\n\t\tstatusCode: isRouteErrorResponse(error) ? error.status : 500,\n\t\terrors: { [errorBoundaryId]: error }\n\t};\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest) {\n\tif (request.signal.reason !== void 0) throw request.signal.reason;\n\tthrow new Error(`${isRouteRequest ? \"queryRoute\" : \"query\"}() call aborted without an \\`AbortSignal.reason\\`: ${request.method} ${request.url}`);\n}\nfunction isSubmissionNavigation(opts) {\n\treturn opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== void 0);\n}\nfunction defaultNormalizePath(request) {\n\tlet url = new URL(request.url);\n\treturn {\n\t\tpathname: url.pathname,\n\t\tsearch: url.search,\n\t\thash: url.hash\n\t};\n}\nfunction normalizeTo(location, matches, basename, to, fromRouteId, relative) {\n\tlet contextualMatches;\n\tlet activeRouteMatch;\n\tif (fromRouteId) {\n\t\tcontextualMatches = [];\n\t\tfor (let match of matches) {\n\t\t\tcontextualMatches.push(match);\n\t\t\tif (match.route.id === fromRouteId) {\n\t\t\t\tactiveRouteMatch = match;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tcontextualMatches = matches;\n\t\tactiveRouteMatch = matches[matches.length - 1];\n\t}\n\tlet path = resolveTo(to ? to : \".\", getResolveToMatches(contextualMatches), stripBasename(location.pathname, basename) || location.pathname, relative === \"path\");\n\tif (to == null) {\n\t\tpath.search = location.search;\n\t\tpath.hash = location.hash;\n\t}\n\tif ((to == null || to === \"\" || to === \".\") && activeRouteMatch) {\n\t\tlet nakedIndex = hasNakedIndexQuery(path.search);\n\t\tif (activeRouteMatch.route.index && !nakedIndex) path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n\t\telse if (!activeRouteMatch.route.index && nakedIndex) {\n\t\t\tlet params = new URLSearchParams(path.search);\n\t\t\tlet indexValues = params.getAll(\"index\");\n\t\t\tparams.delete(\"index\");\n\t\t\tindexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n\t\t\tlet qs = params.toString();\n\t\t\tpath.search = qs ? `?${qs}` : \"\";\n\t\t}\n\t}\n\tif (basename !== \"/\") path.pathname = prependBasename({\n\t\tbasename,\n\t\tpathname: path.pathname\n\t});\n\treturn createPath(path);\n}\nfunction normalizeNavigateOptions(isFetcher, path, opts) {\n\tif (!opts || !isSubmissionNavigation(opts)) return { path };\n\tif (opts.formMethod && !isValidMethod(opts.formMethod)) return {\n\t\tpath,\n\t\terror: getInternalRouterError(405, { method: opts.formMethod })\n\t};\n\tlet getInvalidBodyError = () => ({\n\t\tpath,\n\t\terror: getInternalRouterError(400, { type: \"invalid-body\" })\n\t});\n\tlet formMethod = (opts.formMethod || \"get\").toUpperCase();\n\tlet formAction = stripHashFromPath(path);\n\tif (opts.body !== void 0) {\n\t\tif (opts.formEncType === \"text/plain\") {\n\t\t\tif (!isMutationMethod(formMethod)) return getInvalidBodyError();\n\t\t\tlet text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? Array.from(opts.body.entries()).reduce((acc, [name, value]) => `${acc}${name}=${value}\\n`, \"\") : String(opts.body);\n\t\t\treturn {\n\t\t\t\tpath,\n\t\t\t\tsubmission: {\n\t\t\t\t\tformMethod,\n\t\t\t\t\tformAction,\n\t\t\t\t\tformEncType: opts.formEncType,\n\t\t\t\t\tformData: void 0,\n\t\t\t\t\tjson: void 0,\n\t\t\t\t\ttext\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (opts.formEncType === \"application/json\") {\n\t\t\tif (!isMutationMethod(formMethod)) return getInvalidBodyError();\n\t\t\ttry {\n\t\t\t\tlet json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n\t\t\t\treturn {\n\t\t\t\t\tpath,\n\t\t\t\t\tsubmission: {\n\t\t\t\t\t\tformMethod,\n\t\t\t\t\t\tformAction,\n\t\t\t\t\t\tformEncType: opts.formEncType,\n\t\t\t\t\t\tformData: void 0,\n\t\t\t\t\t\tjson,\n\t\t\t\t\t\ttext: void 0\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t} catch (e) {\n\t\t\t\treturn getInvalidBodyError();\n\t\t\t}\n\t\t}\n\t}\n\tinvariant(typeof FormData === \"function\", \"FormData is not available in this environment\");\n\tlet searchParams;\n\tlet formData;\n\tif (opts.formData) {\n\t\tsearchParams = convertFormDataToSearchParams(opts.formData);\n\t\tformData = opts.formData;\n\t} else if (opts.body instanceof FormData) {\n\t\tsearchParams = convertFormDataToSearchParams(opts.body);\n\t\tformData = opts.body;\n\t} else if (opts.body instanceof URLSearchParams) {\n\t\tsearchParams = opts.body;\n\t\tformData = convertSearchParamsToFormData(searchParams);\n\t} else if (opts.body == null) {\n\t\tsearchParams = new URLSearchParams();\n\t\tformData = new FormData();\n\t} else try {\n\t\tsearchParams = new URLSearchParams(opts.body);\n\t\tformData = convertSearchParamsToFormData(searchParams);\n\t} catch (e) {\n\t\treturn getInvalidBodyError();\n\t}\n\tlet submission = {\n\t\tformMethod,\n\t\tformAction,\n\t\tformEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n\t\tformData,\n\t\tjson: void 0,\n\t\ttext: void 0\n\t};\n\tif (isMutationMethod(submission.formMethod)) return {\n\t\tpath,\n\t\tsubmission\n\t};\n\tlet parsedPath = parsePath(path);\n\tif (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) searchParams.append(\"index\", \"\");\n\tparsedPath.search = `?${searchParams}`;\n\treturn {\n\t\tpath: createPath(parsedPath),\n\t\tsubmission\n\t};\n}\nfunction getMatchesToLoad(request, scopedContext, mapRouteProperties, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, branches, pendingActionResult, callSiteDefaultShouldRevalidate) {\n\tlet actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0;\n\tlet currentUrl = history.createURL(state.location);\n\tlet nextUrl = history.createURL(location);\n\tlet maxIdx;\n\tif (initialHydration && state.errors) {\n\t\tlet boundaryId = Object.keys(state.errors)[0];\n\t\tmaxIdx = matches.findIndex((m) => m.route.id === boundaryId);\n\t} else if (pendingActionResult && isErrorResult(pendingActionResult[1])) {\n\t\tlet boundaryId = pendingActionResult[0];\n\t\tmaxIdx = matches.findIndex((m) => m.route.id === boundaryId) - 1;\n\t}\n\tlet actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : void 0;\n\tlet shouldSkipRevalidation = actionStatus && actionStatus >= 400;\n\tlet baseShouldRevalidateArgs = {\n\t\tcurrentUrl,\n\t\tcurrentParams: state.matches[0]?.params || {},\n\t\tnextUrl,\n\t\tnextParams: matches[0].params,\n\t\t...submission,\n\t\tactionResult,\n\t\tactionStatus\n\t};\n\tlet pattern = getRoutePattern(matches);\n\tlet dsMatches = matches.map((match, index) => {\n\t\tlet { route } = match;\n\t\tlet forceShouldLoad = null;\n\t\tif (maxIdx != null && index > maxIdx) forceShouldLoad = false;\n\t\telse if (route.lazy) forceShouldLoad = true;\n\t\telse if (!routeHasLoaderOrMiddleware(route)) forceShouldLoad = false;\n\t\telse if (initialHydration) {\n\t\t\tlet { shouldLoad } = getRouteHydrationStatus(route, state.loaderData, state.errors);\n\t\t\tforceShouldLoad = shouldLoad;\n\t\t} else if (isNewLoader(state.loaderData, state.matches[index], match)) forceShouldLoad = true;\n\t\tif (forceShouldLoad !== null) return getDataStrategyMatch(mapRouteProperties, manifest, request, location, pattern, match, lazyRoutePropertiesToSkip, scopedContext, forceShouldLoad);\n\t\tlet defaultShouldRevalidate = false;\n\t\tif (typeof callSiteDefaultShouldRevalidate === \"boolean\") defaultShouldRevalidate = callSiteDefaultShouldRevalidate;\n\t\telse if (shouldSkipRevalidation) defaultShouldRevalidate = false;\n\t\telse if (isRevalidationRequired) defaultShouldRevalidate = true;\n\t\telse if (currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search) defaultShouldRevalidate = true;\n\t\telse if (currentUrl.search !== nextUrl.search) defaultShouldRevalidate = true;\n\t\telse if (isNewRouteInstance(state.matches[index], match)) defaultShouldRevalidate = true;\n\t\tlet shouldRevalidateArgs = {\n\t\t\t...baseShouldRevalidateArgs,\n\t\t\tdefaultShouldRevalidate\n\t\t};\n\t\treturn getDataStrategyMatch(mapRouteProperties, manifest, request, location, pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateLoader(match, shouldRevalidateArgs), shouldRevalidateArgs, callSiteDefaultShouldRevalidate);\n\t});\n\tlet revalidatingFetchers = [];\n\tfetchLoadMatches.forEach((f, key) => {\n\t\tif (initialHydration || !matches.some((m) => m.route.id === f.routeId) || fetchersQueuedForDeletion.has(key)) return;\n\t\tlet fetcher = state.fetchers.get(key);\n\t\tlet isMidInitialLoad = fetcher && fetcher.state !== \"idle\" && fetcher.data === void 0;\n\t\tlet fetcherMatches = matchRoutesImpl(routesToUse, f.path, basename ?? \"/\", false, branches);\n\t\tif (!fetcherMatches) {\n\t\t\tif (hasPatchRoutesOnNavigation && isMidInitialLoad) return;\n\t\t\trevalidatingFetchers.push({\n\t\t\t\tkey,\n\t\t\t\trouteId: f.routeId,\n\t\t\t\tpath: f.path,\n\t\t\t\tmatches: null,\n\t\t\t\tmatch: null,\n\t\t\t\trequest: null,\n\t\t\t\tcontroller: null\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (fetchRedirectIds.has(key)) return;\n\t\tlet fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n\t\tlet fetchController = new AbortController();\n\t\tlet fetchRequest = createClientSideRequest(history, f.path, fetchController.signal);\n\t\tlet fetcherDsMatches = null;\n\t\tif (cancelledFetcherLoads.has(key)) {\n\t\t\tcancelledFetcherLoads.delete(key);\n\t\t\tfetcherDsMatches = getTargetedDataStrategyMatches(mapRouteProperties, manifest, fetchRequest, f.path, fetcherMatches, fetcherMatch, lazyRoutePropertiesToSkip, scopedContext);\n\t\t} else if (isMidInitialLoad) {\n\t\t\tif (isRevalidationRequired) fetcherDsMatches = getTargetedDataStrategyMatches(mapRouteProperties, manifest, fetchRequest, f.path, fetcherMatches, fetcherMatch, lazyRoutePropertiesToSkip, scopedContext);\n\t\t} else {\n\t\t\tlet defaultShouldRevalidate;\n\t\t\tif (typeof callSiteDefaultShouldRevalidate === \"boolean\") defaultShouldRevalidate = callSiteDefaultShouldRevalidate;\n\t\t\telse if (shouldSkipRevalidation) defaultShouldRevalidate = false;\n\t\t\telse defaultShouldRevalidate = isRevalidationRequired;\n\t\t\tlet shouldRevalidateArgs = {\n\t\t\t\t...baseShouldRevalidateArgs,\n\t\t\t\tdefaultShouldRevalidate\n\t\t\t};\n\t\t\tif (shouldRevalidateLoader(fetcherMatch, shouldRevalidateArgs)) fetcherDsMatches = getTargetedDataStrategyMatches(mapRouteProperties, manifest, fetchRequest, f.path, fetcherMatches, fetcherMatch, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateArgs);\n\t\t}\n\t\tif (fetcherDsMatches) revalidatingFetchers.push({\n\t\t\tkey,\n\t\t\trouteId: f.routeId,\n\t\t\tpath: f.path,\n\t\t\tmatches: fetcherDsMatches,\n\t\t\tmatch: fetcherMatch,\n\t\t\trequest: fetchRequest,\n\t\t\tcontroller: fetchController\n\t\t});\n\t});\n\treturn {\n\t\tdsMatches,\n\t\trevalidatingFetchers\n\t};\n}\nfunction routeHasLoaderOrMiddleware(route) {\n\treturn route.loader != null || route.middleware != null && route.middleware.length > 0;\n}\nfunction getRouteHydrationStatus(route, loaderData, errors) {\n\tif (route.lazy) return {\n\t\tshouldLoad: true,\n\t\trenderFallback: true\n\t};\n\tif (!routeHasLoaderOrMiddleware(route)) return {\n\t\tshouldLoad: false,\n\t\trenderFallback: false\n\t};\n\tlet hasData = loaderData != null && route.id in loaderData;\n\tlet hasError = errors != null && errors[route.id] !== void 0;\n\tif (!hasData && hasError) return {\n\t\tshouldLoad: false,\n\t\trenderFallback: false\n\t};\n\tif (typeof route.loader === \"function\" && route.loader.hydrate === true) return {\n\t\tshouldLoad: true,\n\t\trenderFallback: !hasData\n\t};\n\tlet shouldLoad = !hasData && !hasError;\n\treturn {\n\t\tshouldLoad,\n\t\trenderFallback: shouldLoad\n\t};\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n\tlet isNew = !currentMatch || match.route.id !== currentMatch.route.id;\n\tlet isMissingData = !currentLoaderData.hasOwnProperty(match.route.id);\n\treturn isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n\tlet currentPath = currentMatch.route.path;\n\treturn currentMatch.pathname !== match.pathname || currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"];\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n\tif (loaderMatch.route.shouldRevalidate) {\n\t\tlet routeChoice = loaderMatch.route.shouldRevalidate(arg);\n\t\tif (typeof routeChoice === \"boolean\") return routeChoice;\n\t}\n\treturn arg.defaultShouldRevalidate;\n}\nfunction patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProperties, allowElementMutations) {\n\tlet childrenToPatch;\n\tif (routeId) {\n\t\tlet route = manifest[routeId];\n\t\tinvariant(route, `No route found to patch children into: routeId = ${routeId}`);\n\t\tif (!route.children) route.children = [];\n\t\tchildrenToPatch = route.children;\n\t} else childrenToPatch = dataRoutes.activeRoutes;\n\tlet uniqueChildren = [];\n\tlet existingChildren = [];\n\tchildren.forEach((newRoute) => {\n\t\tlet existingRoute = childrenToPatch.find((existingRoute) => isSameRoute(newRoute, existingRoute));\n\t\tif (existingRoute) existingChildren.push({\n\t\t\texistingRoute,\n\t\t\tnewRoute\n\t\t});\n\t\telse uniqueChildren.push(newRoute);\n\t});\n\tif (uniqueChildren.length > 0) {\n\t\tlet newRoutes = convertRoutesToDataRoutes(uniqueChildren, mapRouteProperties, [\n\t\t\trouteId || \"_\",\n\t\t\t\"patch\",\n\t\t\tString(childrenToPatch?.length || \"0\")\n\t\t], manifest);\n\t\tchildrenToPatch.push(...newRoutes);\n\t}\n\tif (allowElementMutations && existingChildren.length > 0) for (let i = 0; i < existingChildren.length; i++) {\n\t\tlet { existingRoute, newRoute } = existingChildren[i];\n\t\tlet existingRouteTyped = existingRoute;\n\t\tlet [newRouteTyped] = convertRoutesToDataRoutes([newRoute], mapRouteProperties, [], {}, true);\n\t\tObject.assign(existingRouteTyped, {\n\t\t\telement: newRouteTyped.element ? newRouteTyped.element : existingRouteTyped.element,\n\t\t\terrorElement: newRouteTyped.errorElement ? newRouteTyped.errorElement : existingRouteTyped.errorElement,\n\t\t\thydrateFallbackElement: newRouteTyped.hydrateFallbackElement ? newRouteTyped.hydrateFallbackElement : existingRouteTyped.hydrateFallbackElement\n\t\t});\n\t}\n\tif (!dataRoutes.hasHMRRoutes) dataRoutes.setRoutes([...dataRoutes.activeRoutes]);\n}\nfunction isSameRoute(newRoute, existingRoute) {\n\tif (\"id\" in newRoute && \"id\" in existingRoute && newRoute.id === existingRoute.id) return true;\n\tif (!(newRoute.index === existingRoute.index && newRoute.path === existingRoute.path && newRoute.caseSensitive === existingRoute.caseSensitive)) return false;\n\tif ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) return true;\n\treturn newRoute.children?.every((aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))) ?? false;\n}\nconst lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();\nconst loadLazyRouteProperty = ({ key, route, manifest, mapRouteProperties }) => {\n\tlet routeToUpdate = manifest[route.id];\n\tinvariant(routeToUpdate, \"No route found in manifest\");\n\tif (!routeToUpdate.lazy || typeof routeToUpdate.lazy !== \"object\") return;\n\tlet lazyFn = routeToUpdate.lazy[key];\n\tif (!lazyFn) return;\n\tlet cache = lazyRoutePropertyCache.get(routeToUpdate);\n\tif (!cache) {\n\t\tcache = {};\n\t\tlazyRoutePropertyCache.set(routeToUpdate, cache);\n\t}\n\tlet cachedPromise = cache[key];\n\tif (cachedPromise) return cachedPromise;\n\tlet propertyPromise = (async () => {\n\t\tlet isUnsupported = isUnsupportedLazyRouteObjectKey(key);\n\t\tlet isStaticallyDefined = routeToUpdate[key] !== void 0;\n\t\tif (isUnsupported) {\n\t\t\twarning(!isUnsupported, \"Route property \" + key + \" is not a supported lazy route property. This property will be ignored.\");\n\t\t\tcache[key] = Promise.resolve();\n\t\t} else if (isStaticallyDefined) warning(false, `Route \"${routeToUpdate.id}\" has a static property \"${key}\" defined. The lazy property will be ignored.`);\n\t\telse {\n\t\t\tlet value = await lazyFn();\n\t\t\tif (value != null) {\n\t\t\t\tObject.assign(routeToUpdate, { [key]: value });\n\t\t\t\tObject.assign(routeToUpdate, mapRouteProperties(routeToUpdate));\n\t\t\t}\n\t\t}\n\t\tif (typeof routeToUpdate.lazy === \"object\") {\n\t\t\trouteToUpdate.lazy[key] = void 0;\n\t\t\tif (Object.values(routeToUpdate.lazy).every((value) => value === void 0)) routeToUpdate.lazy = void 0;\n\t\t}\n\t})();\n\tcache[key] = propertyPromise;\n\treturn propertyPromise;\n};\nconst lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();\n/**\n* Execute route.lazy functions to lazily load route modules (loader, action,\n* shouldRevalidate) and update the routeManifest in place which shares objects\n* with dataRoutes so those get updated as well.\n*/\nfunction loadLazyRoute(route, type, manifest, mapRouteProperties, lazyRoutePropertiesToSkip) {\n\tlet routeToUpdate = manifest[route.id];\n\tinvariant(routeToUpdate, \"No route found in manifest\");\n\tif (!route.lazy) return {\n\t\tlazyRoutePromise: void 0,\n\t\tlazyHandlerPromise: void 0\n\t};\n\tif (typeof route.lazy === \"function\") {\n\t\tlet cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);\n\t\tif (cachedPromise) return {\n\t\t\tlazyRoutePromise: cachedPromise,\n\t\t\tlazyHandlerPromise: cachedPromise\n\t\t};\n\t\tlet lazyRoutePromise = (async () => {\n\t\t\tinvariant(typeof route.lazy === \"function\", \"No lazy route function found\");\n\t\t\tlet lazyRoute = await route.lazy();\n\t\t\tlet routeUpdates = {};\n\t\t\tfor (let lazyRouteProperty in lazyRoute) {\n\t\t\t\tlet lazyValue = lazyRoute[lazyRouteProperty];\n\t\t\t\tif (lazyValue === void 0) continue;\n\t\t\t\tlet isUnsupported = isUnsupportedLazyRouteFunctionKey(lazyRouteProperty);\n\t\t\t\tlet isStaticallyDefined = routeToUpdate[lazyRouteProperty] !== void 0;\n\t\t\t\tif (isUnsupported) warning(!isUnsupported, \"Route property \" + lazyRouteProperty + \" is not a supported property to be returned from a lazy route function. This property will be ignored.\");\n\t\t\t\telse if (isStaticallyDefined) warning(!isStaticallyDefined, `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\t\t\t\telse routeUpdates[lazyRouteProperty] = lazyValue;\n\t\t\t}\n\t\t\tObject.assign(routeToUpdate, routeUpdates);\n\t\t\tObject.assign(routeToUpdate, {\n\t\t\t\t...mapRouteProperties(routeToUpdate),\n\t\t\t\tlazy: void 0\n\t\t\t});\n\t\t})();\n\t\tlazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);\n\t\tlazyRoutePromise.catch(() => {});\n\t\treturn {\n\t\t\tlazyRoutePromise,\n\t\t\tlazyHandlerPromise: lazyRoutePromise\n\t\t};\n\t}\n\tlet lazyKeys = Object.keys(route.lazy);\n\tlet lazyPropertyPromises = [];\n\tlet lazyHandlerPromise = void 0;\n\tfor (let key of lazyKeys) {\n\t\tif (lazyRoutePropertiesToSkip && lazyRoutePropertiesToSkip.includes(key)) continue;\n\t\tlet promise = loadLazyRouteProperty({\n\t\t\tkey,\n\t\t\troute,\n\t\t\tmanifest,\n\t\t\tmapRouteProperties\n\t\t});\n\t\tif (promise) {\n\t\t\tlazyPropertyPromises.push(promise);\n\t\t\tif (key === type) lazyHandlerPromise = promise;\n\t\t}\n\t}\n\tlet lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {}) : void 0;\n\tlazyRoutePromise?.catch(() => {});\n\tlazyHandlerPromise?.catch(() => {});\n\treturn {\n\t\tlazyRoutePromise,\n\t\tlazyHandlerPromise\n\t};\n}\nfunction isNonNullable(value) {\n\treturn value !== void 0;\n}\nfunction loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties) {\n\tlet promises = matches.map(({ route }) => {\n\t\tif (typeof route.lazy !== \"object\" || !route.lazy.middleware) return;\n\t\treturn loadLazyRouteProperty({\n\t\t\tkey: \"middleware\",\n\t\t\troute,\n\t\t\tmanifest,\n\t\t\tmapRouteProperties\n\t\t});\n\t}).filter(isNonNullable);\n\treturn promises.length > 0 ? Promise.all(promises) : void 0;\n}\nasync function defaultDataStrategy(args) {\n\tlet matchesToLoad = args.matches.filter((m) => m.shouldLoad);\n\tlet keyedResults = {};\n\t(await Promise.all(matchesToLoad.map((m) => m.resolve()))).forEach((result, i) => {\n\t\tkeyedResults[matchesToLoad[i].route.id] = result;\n\t});\n\treturn keyedResults;\n}\nasync function defaultDataStrategyWithMiddleware(args) {\n\tif (!args.matches.some((m) => m.route.middleware)) return defaultDataStrategy(args);\n\treturn runClientMiddlewarePipeline(args, () => defaultDataStrategy(args));\n}\nfunction runServerMiddlewarePipeline(args, handler, errorHandler) {\n\treturn runMiddlewarePipeline(args, handler, processResult, isResponse, errorHandler);\n\tfunction processResult(result) {\n\t\treturn isDataWithResponseInit(result) ? dataWithResponseInitToResponse(result) : result;\n\t}\n}\nfunction runClientMiddlewarePipeline(args, handler) {\n\treturn runMiddlewarePipeline(args, handler, (r) => {\n\t\tif (isRedirectResponse(r)) throw r;\n\t\treturn r;\n\t}, isDataStrategyResults, errorHandler);\n\tasync function errorHandler(error, routeId, nextResult) {\n\t\tif (nextResult) return Object.assign(nextResult.value, { [routeId]: {\n\t\t\ttype: \"error\",\n\t\t\tresult: error\n\t\t} });\n\t\telse {\n\t\t\tlet { matches } = args;\n\t\t\tlet maxBoundaryIdx = Math.min(Math.max(matches.findIndex((m) => m.route.id === routeId), 0), Math.max(matches.findIndex((m) => m.shouldCallHandler()), 0));\n\t\t\tlet deepestRouteId = matches[maxBoundaryIdx].route.id;\n\t\t\tfor (let match of matches.slice(0, maxBoundaryIdx + 1)) try {\n\t\t\t\tawait match._lazyPromises?.route;\n\t\t\t} catch {\n\t\t\t\tdeepestRouteId = match.route.id;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn { [findNearestBoundary(matches, deepestRouteId).route.id]: {\n\t\t\t\ttype: \"error\",\n\t\t\t\tresult: error\n\t\t\t} };\n\t\t}\n\t}\n}\nasync function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {\n\tlet { matches, ...dataFnArgs } = args;\n\treturn await callRouteMiddleware(dataFnArgs, matches.flatMap((m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []), handler, processResult, isResult, errorHandler);\n}\nasync function callRouteMiddleware(args, middlewares, handler, processResult, isResult, errorHandler, idx = 0) {\n\tlet { request } = args;\n\tif (request.signal.aborted) throw request.signal.reason ?? /* @__PURE__ */ new Error(`Request aborted: ${request.method} ${request.url}`);\n\tlet tuple = middlewares[idx];\n\tif (!tuple) return await handler();\n\tlet [routeId, middleware] = tuple;\n\tlet nextResult;\n\tlet next = async () => {\n\t\tif (nextResult) throw new Error(\"You may only call `next()` once per middleware\");\n\t\ttry {\n\t\t\tnextResult = { value: await callRouteMiddleware(args, middlewares, handler, processResult, isResult, errorHandler, idx + 1) };\n\t\t\treturn nextResult.value;\n\t\t} catch (error) {\n\t\t\tnextResult = { value: await errorHandler(error, routeId, nextResult) };\n\t\t\treturn nextResult.value;\n\t\t}\n\t};\n\ttry {\n\t\tlet value = await middleware(args, next);\n\t\tlet result = value != null ? processResult(value) : void 0;\n\t\tif (isResult(result)) return result;\n\t\telse if (nextResult) return result ?? nextResult.value;\n\t\telse {\n\t\t\tnextResult = { value: await next() };\n\t\t\treturn nextResult.value;\n\t\t}\n\t} catch (error) {\n\t\treturn await errorHandler(error, routeId, nextResult);\n\t}\n}\nfunction getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request, match, lazyRoutePropertiesToSkip) {\n\tlet lazyMiddlewarePromise = loadLazyRouteProperty({\n\t\tkey: \"middleware\",\n\t\troute: match.route,\n\t\tmanifest,\n\t\tmapRouteProperties\n\t});\n\tlet lazyRoutePromises = loadLazyRoute(match.route, isMutationMethod(request.method) ? \"action\" : \"loader\", manifest, mapRouteProperties, lazyRoutePropertiesToSkip);\n\treturn {\n\t\tmiddleware: lazyMiddlewarePromise,\n\t\troute: lazyRoutePromises.lazyRoutePromise,\n\t\thandler: lazyRoutePromises.lazyHandlerPromise\n\t};\n}\nfunction getDataStrategyMatch(mapRouteProperties, manifest, request, path, pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {\n\tlet isUsingNewApi = false;\n\tlet _lazyPromises = getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request, match, lazyRoutePropertiesToSkip);\n\treturn {\n\t\t...match,\n\t\t_lazyPromises,\n\t\tshouldLoad,\n\t\tshouldRevalidateArgs,\n\t\tshouldCallHandler(defaultShouldRevalidate) {\n\t\t\tisUsingNewApi = true;\n\t\t\tif (!shouldRevalidateArgs) return shouldLoad;\n\t\t\tif (typeof callSiteDefaultShouldRevalidate === \"boolean\") return shouldRevalidateLoader(match, {\n\t\t\t\t...shouldRevalidateArgs,\n\t\t\t\tdefaultShouldRevalidate: callSiteDefaultShouldRevalidate\n\t\t\t});\n\t\t\tif (typeof defaultShouldRevalidate === \"boolean\") return shouldRevalidateLoader(match, {\n\t\t\t\t...shouldRevalidateArgs,\n\t\t\t\tdefaultShouldRevalidate\n\t\t\t});\n\t\t\treturn shouldRevalidateLoader(match, shouldRevalidateArgs);\n\t\t},\n\t\tresolve(handlerOverride) {\n\t\t\tlet { lazy, loader, middleware } = match.route;\n\t\t\tlet callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);\n\t\t\tlet isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;\n\t\t\tif (callHandler && (isMutationMethod(request.method) || !isMiddlewareOnlyRoute)) return callLoaderOrAction({\n\t\t\t\trequest,\n\t\t\t\tpath,\n\t\t\t\tpattern,\n\t\t\t\tmatch,\n\t\t\t\tlazyHandlerPromise: _lazyPromises?.handler,\n\t\t\t\tlazyRoutePromise: _lazyPromises?.route,\n\t\t\t\thandlerOverride,\n\t\t\t\tscopedContext\n\t\t\t});\n\t\t\treturn Promise.resolve({\n\t\t\t\ttype: \"data\",\n\t\t\t\tresult: void 0\n\t\t\t});\n\t\t}\n\t};\n}\nfunction getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, path, matches, targetMatch, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateArgs = null) {\n\treturn matches.map((match) => {\n\t\tif (match.route.id !== targetMatch.route.id) return {\n\t\t\t...match,\n\t\t\tshouldLoad: false,\n\t\t\tshouldRevalidateArgs,\n\t\t\tshouldCallHandler: () => false,\n\t\t\t_lazyPromises: getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request, match, lazyRoutePropertiesToSkip),\n\t\t\tresolve: () => Promise.resolve({\n\t\t\t\ttype: \"data\",\n\t\t\t\tresult: void 0\n\t\t\t})\n\t\t};\n\t\treturn getDataStrategyMatch(mapRouteProperties, manifest, request, path, getRoutePattern(matches), match, lazyRoutePropertiesToSkip, scopedContext, true, shouldRevalidateArgs);\n\t});\n}\nasync function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, isStaticHandler) {\n\tif (matches.some((m) => m._lazyPromises?.middleware)) await Promise.all(matches.map((m) => m._lazyPromises?.middleware));\n\tlet dataStrategyArgs = {\n\t\trequest,\n\t\turl: createDataFunctionUrl(request, path),\n\t\tpattern: getRoutePattern(matches),\n\t\tparams: matches[0].params,\n\t\tcontext: scopedContext,\n\t\tmatches\n\t};\n\tlet runClientMiddleware = isStaticHandler ? () => {\n\t\tthrow new Error(\"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\t} : (cb) => {\n\t\tlet typedDataStrategyArgs = dataStrategyArgs;\n\t\treturn runClientMiddlewarePipeline(typedDataStrategyArgs, () => {\n\t\t\treturn cb({\n\t\t\t\t...typedDataStrategyArgs,\n\t\t\t\tfetcherKey,\n\t\t\t\trunClientMiddleware: () => {\n\t\t\t\t\tthrow new Error(\"Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler\");\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\tlet results = await dataStrategyImpl({\n\t\t...dataStrategyArgs,\n\t\tfetcherKey,\n\t\trunClientMiddleware\n\t});\n\ttry {\n\t\tawait Promise.all(matches.flatMap((m) => [m._lazyPromises?.handler, m._lazyPromises?.route]));\n\t} catch (e) {}\n\treturn results;\n}\nasync function callLoaderOrAction({ request, path, pattern, match, lazyHandlerPromise, lazyRoutePromise, handlerOverride, scopedContext }) {\n\tlet result;\n\tlet onReject;\n\tlet isAction = isMutationMethod(request.method);\n\tlet type = isAction ? \"action\" : \"loader\";\n\tlet runHandler = (handler) => {\n\t\tlet reject;\n\t\tlet abortPromise = new Promise((_, r) => reject = r);\n\t\tonReject = () => reject();\n\t\trequest.signal.addEventListener(\"abort\", onReject);\n\t\tlet actualHandler = (ctx) => {\n\t\t\tif (typeof handler !== \"function\") return Promise.reject(/* @__PURE__ */ new Error(`You cannot call the handler for a route which defines a boolean \"${type}\" [routeId: ${match.route.id}]`));\n\t\t\treturn handler({\n\t\t\t\trequest,\n\t\t\t\turl: createDataFunctionUrl(request, path),\n\t\t\t\tpattern,\n\t\t\t\tparams: match.params,\n\t\t\t\tcontext: scopedContext\n\t\t\t}, ...ctx !== void 0 ? [ctx] : []);\n\t\t};\n\t\tlet handlerPromise = (async () => {\n\t\t\ttry {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"data\",\n\t\t\t\t\tresult: await (handlerOverride ? handlerOverride((ctx) => actualHandler(ctx)) : actualHandler())\n\t\t\t\t};\n\t\t\t} catch (e) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tresult: e\n\t\t\t\t};\n\t\t\t}\n\t\t})();\n\t\treturn Promise.race([handlerPromise, abortPromise]);\n\t};\n\ttry {\n\t\tlet handler = isAction ? match.route.action : match.route.loader;\n\t\tif (lazyHandlerPromise || lazyRoutePromise) if (handler) {\n\t\t\tlet handlerError;\n\t\t\tlet [value] = await Promise.all([\n\t\t\t\trunHandler(handler).catch((e) => {\n\t\t\t\t\thandlerError = e;\n\t\t\t\t}),\n\t\t\t\tlazyHandlerPromise,\n\t\t\t\tlazyRoutePromise\n\t\t\t]);\n\t\t\tif (handlerError !== void 0) throw handlerError;\n\t\t\tresult = value;\n\t\t} else {\n\t\t\tawait lazyHandlerPromise;\n\t\t\tlet handler = isAction ? match.route.action : match.route.loader;\n\t\t\tif (handler) [result] = await Promise.all([runHandler(handler), lazyRoutePromise]);\n\t\t\telse if (type === \"action\") {\n\t\t\t\tlet url = new URL(request.url);\n\t\t\t\tlet pathname = url.pathname + url.search;\n\t\t\t\tthrow getInternalRouterError(405, {\n\t\t\t\t\tmethod: request.method,\n\t\t\t\t\tpathname,\n\t\t\t\t\trouteId: match.route.id\n\t\t\t\t});\n\t\t\t} else return {\n\t\t\t\ttype: \"data\",\n\t\t\t\tresult: void 0\n\t\t\t};\n\t\t}\n\t\telse if (!handler) {\n\t\t\tlet url = new URL(request.url);\n\t\t\tthrow getInternalRouterError(404, { pathname: url.pathname + url.search });\n\t\t} else result = await runHandler(handler);\n\t} catch (e) {\n\t\treturn {\n\t\t\ttype: \"error\",\n\t\t\tresult: e\n\t\t};\n\t} finally {\n\t\tif (onReject) request.signal.removeEventListener(\"abort\", onReject);\n\t}\n\treturn result;\n}\nasync function parseResponseBody(response) {\n\tlet contentType = response.headers.get(\"Content-Type\");\n\tif (contentType && /\\bapplication\\/json\\b/.test(contentType)) return response.body == null ? null : response.json();\n\treturn response.text();\n}\nasync function convertDataStrategyResultToDataResult(dataStrategyResult) {\n\tlet { result, type } = dataStrategyResult;\n\tif (isResponse(result)) {\n\t\tlet data;\n\t\ttry {\n\t\t\tdata = await parseResponseBody(result);\n\t\t} catch (e) {\n\t\t\treturn {\n\t\t\t\ttype: \"error\",\n\t\t\t\terror: e\n\t\t\t};\n\t\t}\n\t\tif (type === \"error\") return {\n\t\t\ttype: \"error\",\n\t\t\terror: new ErrorResponseImpl(result.status, result.statusText, data),\n\t\t\tstatusCode: result.status,\n\t\t\theaders: result.headers\n\t\t};\n\t\treturn {\n\t\t\ttype: \"data\",\n\t\t\tdata,\n\t\t\tstatusCode: result.status,\n\t\t\theaders: result.headers\n\t\t};\n\t}\n\tif (type === \"error\") {\n\t\tif (isDataWithResponseInit(result)) {\n\t\t\tif (result.data instanceof Error) return {\n\t\t\t\ttype: \"error\",\n\t\t\t\terror: result.data,\n\t\t\t\tstatusCode: result.init?.status,\n\t\t\t\theaders: result.init?.headers ? new Headers(result.init.headers) : void 0\n\t\t\t};\n\t\t\treturn {\n\t\t\t\ttype: \"error\",\n\t\t\t\terror: dataWithResponseInitToErrorResponse(result),\n\t\t\t\tstatusCode: isRouteErrorResponse(result) ? result.status : void 0,\n\t\t\t\theaders: result.init?.headers ? new Headers(result.init.headers) : void 0\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\ttype: \"error\",\n\t\t\terror: result,\n\t\t\tstatusCode: isRouteErrorResponse(result) ? result.status : void 0\n\t\t};\n\t}\n\tif (isDataWithResponseInit(result)) return {\n\t\ttype: \"data\",\n\t\tdata: result.data,\n\t\tstatusCode: result.init?.status,\n\t\theaders: result.init?.headers ? new Headers(result.init.headers) : void 0\n\t};\n\treturn {\n\t\ttype: \"data\",\n\t\tdata: result\n\t};\n}\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename) {\n\tlet location = response.headers.get(\"Location\");\n\tinvariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n\tif (!isAbsoluteUrl(location)) {\n\t\tlet trimmedMatches = matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1);\n\t\tlocation = normalizeTo(new URL(request.url), trimmedMatches, basename, location);\n\t\tresponse.headers.set(\"Location\", location);\n\t}\n\treturn response;\n}\nconst invalidProtocols = [\n\t\"about:\",\n\t\"blob:\",\n\t\"chrome:\",\n\t\"chrome-untrusted:\",\n\t\"content:\",\n\t\"data:\",\n\t\"devtools:\",\n\t\"file:\",\n\t\"filesystem:\",\n\t\"javascript:\"\n];\nfunction hasInvalidProtocol(location) {\n\ttry {\n\t\treturn invalidProtocols.includes(new URL(location).protocol);\n\t} catch {\n\t\treturn false;\n\t}\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename, historyInstance) {\n\tif (isAbsoluteUrl(location)) {\n\t\tlet normalizedLocation = location;\n\t\tlet url = PROTOCOL_RELATIVE_URL_REGEX.test(normalizedLocation) ? new URL(normalizeProtocolRelativeUrl(normalizedLocation, currentUrl.protocol)) : new URL(normalizedLocation);\n\t\tif (hasInvalidProtocol(url.toString())) throw new Error(\"Invalid redirect location\");\n\t\tlet isSameBasename = stripBasename(url.pathname, basename) != null;\n\t\tif (url.origin === currentUrl.origin && isSameBasename) return removeDoubleSlashes(url.pathname) + url.search + url.hash;\n\t}\n\ttry {\n\t\tif (hasInvalidProtocol(historyInstance.createURL(location).toString())) throw new Error(\"Invalid redirect location\");\n\t} catch (e) {}\n\treturn location;\n}\nfunction createClientSideRequest(history, location, signal, submission) {\n\tlet url = history.createURL(stripHashFromPath(location)).toString();\n\tlet init = { signal };\n\tif (submission && isMutationMethod(submission.formMethod)) {\n\t\tlet { formMethod, formEncType } = submission;\n\t\tinit.method = formMethod.toUpperCase();\n\t\tif (formEncType === \"application/json\") {\n\t\t\tinit.headers = new Headers({ \"Content-Type\": formEncType });\n\t\t\tinit.body = JSON.stringify(submission.json);\n\t\t} else if (formEncType === \"text/plain\") init.body = submission.text;\n\t\telse if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) init.body = convertFormDataToSearchParams(submission.formData);\n\t\telse init.body = submission.formData;\n\t}\n\treturn new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n\tlet searchParams = new URLSearchParams();\n\tfor (let [key, value] of formData.entries()) searchParams.append(key, typeof value === \"string\" ? value : value.name);\n\treturn searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n\tlet formData = new FormData();\n\tfor (let [key, value] of searchParams.entries()) formData.append(key, value);\n\treturn formData;\n}\nfunction processRouteLoaderData(matches, results, pendingActionResult, isStaticHandler = false, skipLoaderErrorBubbling = false) {\n\tlet loaderData = {};\n\tlet errors = null;\n\tlet statusCode;\n\tlet foundError = false;\n\tlet loaderHeaders = {};\n\tlet pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : void 0;\n\tmatches.forEach((match) => {\n\t\tif (!(match.route.id in results)) return;\n\t\tlet id = match.route.id;\n\t\tlet result = results[id];\n\t\tinvariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n\t\tif (isErrorResult(result)) {\n\t\t\tlet error = result.error;\n\t\t\tif (pendingError !== void 0) {\n\t\t\t\terror = pendingError;\n\t\t\t\tpendingError = void 0;\n\t\t\t}\n\t\t\terrors = errors || {};\n\t\t\tif (skipLoaderErrorBubbling) errors[id] = error;\n\t\t\telse {\n\t\t\t\tlet boundaryMatch = findNearestBoundary(matches, id);\n\t\t\t\tif (errors[boundaryMatch.route.id] == null) errors[boundaryMatch.route.id] = error;\n\t\t\t}\n\t\t\tif (!isStaticHandler) loaderData[id] = ResetLoaderDataSymbol;\n\t\t\tif (!foundError) {\n\t\t\t\tfoundError = true;\n\t\t\t\tstatusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n\t\t\t}\n\t\t\tif (result.headers) loaderHeaders[id] = result.headers;\n\t\t} else {\n\t\t\tloaderData[id] = result.data;\n\t\t\tif (result.statusCode && result.statusCode !== 200 && !foundError) statusCode = result.statusCode;\n\t\t\tif (result.headers) loaderHeaders[id] = result.headers;\n\t\t}\n\t});\n\tif (pendingError !== void 0 && pendingActionResult) {\n\t\terrors = { [pendingActionResult[0]]: pendingError };\n\t\tif (pendingActionResult[2]) loaderData[pendingActionResult[2]] = void 0;\n\t}\n\treturn {\n\t\tloaderData,\n\t\terrors,\n\t\tstatusCode: statusCode || 200,\n\t\tloaderHeaders\n\t};\n}\nfunction processLoaderData(state, matches, results, pendingActionResult, revalidatingFetchers, fetcherResults, workingFetchers) {\n\tlet { loaderData, errors } = processRouteLoaderData(matches, results, pendingActionResult);\n\trevalidatingFetchers.filter((f) => !f.matches || f.matches.some((m) => m.shouldLoad)).forEach((rf) => {\n\t\tlet { key, match, controller } = rf;\n\t\tif (controller && controller.signal.aborted) return;\n\t\tlet result = fetcherResults[key];\n\t\tinvariant(result, \"Did not find corresponding fetcher result\");\n\t\tif (isErrorResult(result)) {\n\t\t\tlet boundaryMatch = findNearestBoundary(state.matches, match?.route.id);\n\t\t\tif (!(errors && errors[boundaryMatch.route.id])) errors = {\n\t\t\t\t...errors,\n\t\t\t\t[boundaryMatch.route.id]: result.error\n\t\t\t};\n\t\t\tworkingFetchers.delete(key);\n\t\t} else if (isRedirectResult(result)) invariant(false, \"Unhandled fetcher revalidation redirect\");\n\t\telse {\n\t\t\tlet doneFetcher = getDoneFetcher(result.data);\n\t\t\tworkingFetchers.set(key, doneFetcher);\n\t\t}\n\t});\n\treturn {\n\t\tloaderData,\n\t\terrors\n\t};\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n\tlet mergedLoaderData = Object.entries(newLoaderData).filter(([, v]) => v !== ResetLoaderDataSymbol).reduce((merged, [k, v]) => {\n\t\tmerged[k] = v;\n\t\treturn merged;\n\t}, {});\n\tfor (let match of matches) {\n\t\tlet id = match.route.id;\n\t\tif (!newLoaderData.hasOwnProperty(id) && loaderData.hasOwnProperty(id) && match.route.loader) mergedLoaderData[id] = loaderData[id];\n\t\tif (errors && errors.hasOwnProperty(id)) break;\n\t}\n\treturn mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n\tif (!pendingActionResult) return {};\n\treturn isErrorResult(pendingActionResult[1]) ? { actionData: {} } : { actionData: { [pendingActionResult[0]]: pendingActionResult[1].data } };\n}\nfunction findNearestBoundary(matches, routeId) {\n\treturn (routeId ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1) : [...matches]).reverse().find((m) => m.route.ErrorBoundary != null || m.route.errorElement != null) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n\tlet route = routes.length === 1 ? routes[0] : routes.find((r) => r.index || !r.path || r.path === \"/\") || { id: `__shim-error-route__` };\n\treturn {\n\t\tmatches: [{\n\t\t\tparams: {},\n\t\t\tpathname: \"\",\n\t\t\tpathnameBase: \"\",\n\t\t\troute\n\t\t}],\n\t\troute\n\t};\n}\nfunction getInternalRouterError(status, { pathname, routeId, method, type, message } = {}) {\n\tlet statusText = \"Unknown Server Error\";\n\tlet errorMessage = \"Unknown @remix-run/router error\";\n\tif (status === 400) {\n\t\tstatusText = \"Bad Request\";\n\t\tif (method && pathname && routeId) 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\t\telse if (type === \"invalid-body\") errorMessage = \"Unable to encode submission body\";\n\t} else if (status === 403) {\n\t\tstatusText = \"Forbidden\";\n\t\terrorMessage = `Route \"${routeId}\" does not match URL \"${pathname}\"`;\n\t} else if (status === 404) {\n\t\tstatusText = \"Not Found\";\n\t\terrorMessage = `No route matches URL \"${pathname}\"`;\n\t} else if (status === 405) {\n\t\tstatusText = \"Method Not Allowed\";\n\t\tif (method && pathname && routeId) 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\t\telse if (method) errorMessage = `Invalid request method \"${method.toUpperCase()}\"`;\n\t}\n\treturn new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\nfunction findRedirect(results) {\n\tlet entries = Object.entries(results);\n\tfor (let i = entries.length - 1; i >= 0; i--) {\n\t\tlet [key, result] = entries[i];\n\t\tif (isRedirectResult(result)) return {\n\t\t\tkey,\n\t\t\tresult\n\t\t};\n\t}\n}\nfunction stripHashFromPath(path) {\n\treturn createPath({\n\t\t...typeof path === \"string\" ? parsePath(path) : path,\n\t\thash: \"\"\n\t});\n}\nfunction isHashChangeOnly(a, b) {\n\tif (a.pathname !== b.pathname || a.search !== b.search) return false;\n\tif (a.hash === \"\") return b.hash !== \"\";\n\telse if (a.hash === b.hash) return true;\n\telse if (b.hash !== \"\") return true;\n\treturn false;\n}\nfunction dataWithResponseInitToResponse(data) {\n\treturn Response.json(data.data, data.init ?? void 0);\n}\nfunction dataWithResponseInitToErrorResponse(data) {\n\treturn new ErrorResponseImpl(data.init?.status ?? 500, data.init?.statusText ?? \"Internal Server Error\", data.data);\n}\nfunction isDataStrategyResults(result) {\n\treturn result != null && typeof result === \"object\" && Object.entries(result).every(([key, value]) => typeof key === \"string\" && isDataStrategyResult(value));\n}\nfunction isDataStrategyResult(result) {\n\treturn result != null && typeof result === \"object\" && \"type\" in result && \"result\" in result && (result.type === \"data\" || result.type === \"error\");\n}\nfunction isRedirectDataStrategyResult(result) {\n\treturn isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isErrorResult(result) {\n\treturn result.type === \"error\";\n}\nfunction isRedirectResult(result) {\n\treturn (result && result.type) === \"redirect\";\n}\nfunction isDataWithResponseInit(value) {\n\treturn typeof value === \"object\" && value != null && \"type\" in value && \"data\" in value && \"init\" in value && value.type === \"DataWithResponseInit\";\n}\nfunction isResponse(value) {\n\treturn value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectStatusCode(statusCode) {\n\treturn redirectStatusCodes.has(statusCode);\n}\nfunction isRedirectResponse(result) {\n\treturn isResponse(result) && isRedirectStatusCode(result.status) && result.headers.has(\"Location\");\n}\nfunction isValidMethod(method) {\n\treturn validRequestMethods.has(method.toUpperCase());\n}\nfunction isMutationMethod(method) {\n\treturn validMutationMethods.has(method.toUpperCase());\n}\nfunction hasNakedIndexQuery(search) {\n\treturn new URLSearchParams(search).getAll(\"index\").some((v) => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n\tlet search = typeof location === \"string\" ? parsePath(location).search : location.search;\n\tif (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) return matches[matches.length - 1];\n\tlet pathMatches = getPathContributingMatches(matches);\n\treturn pathMatches[pathMatches.length - 1];\n}\nfunction getInstrumentationNavigateMeta(history, location, matches) {\n\treturn {\n\t\turl: createDataFunctionUrl(history.createURL(location), location),\n\t\tpattern: matches ? getRoutePattern(matches) : \"\",\n\t\tparams: matches?.[0]?.params ? { ...matches[0].params } : {}\n\t};\n}\nfunction getSubmissionFromNavigation(navigation) {\n\tlet { formMethod, formAction, formEncType, text, formData, json } = navigation;\n\tif (!formMethod || !formAction || !formEncType) return;\n\tif (text != null) return {\n\t\tformMethod,\n\t\tformAction,\n\t\tformEncType,\n\t\tformData: void 0,\n\t\tjson: void 0,\n\t\ttext\n\t};\n\telse if (formData != null) return {\n\t\tformMethod,\n\t\tformAction,\n\t\tformEncType,\n\t\tformData,\n\t\tjson: void 0,\n\t\ttext: void 0\n\t};\n\telse if (json !== void 0) return {\n\t\tformMethod,\n\t\tformAction,\n\t\tformEncType,\n\t\tformData: void 0,\n\t\tjson,\n\t\ttext: void 0\n\t};\n}\nfunction getLoadingNavigation(location, matches, historyAction, submission) {\n\tif (submission) return {\n\t\tstate: \"loading\",\n\t\tlocation,\n\t\tmatches,\n\t\thistoryAction,\n\t\tformMethod: submission.formMethod,\n\t\tformAction: submission.formAction,\n\t\tformEncType: submission.formEncType,\n\t\tformData: submission.formData,\n\t\tjson: submission.json,\n\t\ttext: submission.text\n\t};\n\telse return {\n\t\tstate: \"loading\",\n\t\tlocation,\n\t\tmatches,\n\t\thistoryAction,\n\t\tformMethod: void 0,\n\t\tformAction: void 0,\n\t\tformEncType: void 0,\n\t\tformData: void 0,\n\t\tjson: void 0,\n\t\ttext: void 0\n\t};\n}\nfunction getSubmittingNavigation(location, matches, historyAction, submission) {\n\treturn {\n\t\tstate: \"submitting\",\n\t\tlocation,\n\t\tmatches,\n\t\thistoryAction,\n\t\tformMethod: submission.formMethod,\n\t\tformAction: submission.formAction,\n\t\tformEncType: submission.formEncType,\n\t\tformData: submission.formData,\n\t\tjson: submission.json,\n\t\ttext: submission.text\n\t};\n}\nfunction getLoadingFetcher(submission, data) {\n\tif (submission) return {\n\t\tstate: \"loading\",\n\t\tformMethod: submission.formMethod,\n\t\tformAction: submission.formAction,\n\t\tformEncType: submission.formEncType,\n\t\tformData: submission.formData,\n\t\tjson: submission.json,\n\t\ttext: submission.text,\n\t\tdata\n\t};\n\telse return {\n\t\tstate: \"loading\",\n\t\tformMethod: void 0,\n\t\tformAction: void 0,\n\t\tformEncType: void 0,\n\t\tformData: void 0,\n\t\tjson: void 0,\n\t\ttext: void 0,\n\t\tdata\n\t};\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n\treturn {\n\t\tstate: \"submitting\",\n\t\tformMethod: submission.formMethod,\n\t\tformAction: submission.formAction,\n\t\tformEncType: submission.formEncType,\n\t\tformData: submission.formData,\n\t\tjson: submission.json,\n\t\ttext: submission.text,\n\t\tdata: existingFetcher ? existingFetcher.data : void 0\n\t};\n}\nfunction getDoneFetcher(data) {\n\treturn {\n\t\tstate: \"idle\",\n\t\tformMethod: void 0,\n\t\tformAction: void 0,\n\t\tformEncType: void 0,\n\t\tformData: void 0,\n\t\tjson: void 0,\n\t\ttext: void 0,\n\t\tdata\n\t};\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n\ttry {\n\t\tlet sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);\n\t\tif (sessionPositions) {\n\t\t\tlet json = JSON.parse(sessionPositions);\n\t\t\tfor (let [k, v] of Object.entries(json || {})) if (v && Array.isArray(v)) transitions.set(k, new Set(v || []));\n\t\t}\n\t} catch (e) {}\n}\nfunction persistAppliedTransitions(_window, transitions) {\n\tif (transitions.size > 0) {\n\t\tlet json = {};\n\t\tfor (let [k, v] of transitions) json[k] = [...v];\n\t\ttry {\n\t\t\t_window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));\n\t\t} catch (error) {\n\t\t\twarning(false, `Failed to save applied view transitions in sessionStorage (${error}).`);\n\t\t}\n\t}\n}\nfunction createDeferred() {\n\tlet resolve;\n\tlet reject;\n\tlet promise = new Promise((res, rej) => {\n\t\tresolve = async (val) => {\n\t\t\tres(val);\n\t\t\ttry {\n\t\t\t\tawait promise;\n\t\t\t} catch (e) {}\n\t\t};\n\t\treject = async (error) => {\n\t\t\trej(error);\n\t\t\ttry {\n\t\t\t\tawait promise;\n\t\t\t} catch (e) {}\n\t\t};\n\t});\n\treturn {\n\t\tpromise,\n\t\tresolve,\n\t\treject\n\t};\n}\n//#endregion\nexport { IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, createRouter, createStaticHandler, getStaticContextFromError, hasInvalidProtocol, isDataWithResponseInit, isMutationMethod, isRedirectResponse, isRedirectStatusCode, isResponse };\n","/**\n * react-router v8.2.0\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 */\nimport * as React$1 from \"react\";\n//#region lib/context.ts\nconst DataRouterContext = React$1.createContext(null);\nDataRouterContext.displayName = \"DataRouter\";\nconst DataRouterStateContext = React$1.createContext(null);\nDataRouterStateContext.displayName = \"DataRouterState\";\nconst RSCRouterContext = React$1.createContext(false);\nfunction useIsRSCRouterContext() {\n\treturn React$1.useContext(RSCRouterContext);\n}\nconst ViewTransitionContext = React$1.createContext({ isTransitioning: false });\nViewTransitionContext.displayName = \"ViewTransition\";\nconst FetchersContext = React$1.createContext(/* @__PURE__ */ new Map());\nFetchersContext.displayName = \"Fetchers\";\nconst AwaitContext = React$1.createContext(null);\nAwaitContext.displayName = \"Await\";\nconst AwaitContextProvider = (props) => React$1.createElement(AwaitContext.Provider, props);\nconst NavigationContext = React$1.createContext(null);\nNavigationContext.displayName = \"Navigation\";\nconst LocationContext = React$1.createContext(null);\nLocationContext.displayName = \"Location\";\nconst RouteContext = React$1.createContext({\n\toutlet: null,\n\tmatches: [],\n\tisDataRoute: false\n});\nRouteContext.displayName = \"Route\";\nconst RouteErrorContext = React$1.createContext(null);\nRouteErrorContext.displayName = \"RouteError\";\n//#endregion\nexport { AwaitContext, AwaitContextProvider, DataRouterContext, DataRouterStateContext, FetchersContext, LocationContext, NavigationContext, RSCRouterContext, RouteContext, RouteErrorContext, ViewTransitionContext, useIsRSCRouterContext };\n","/**\n * react-router v8.2.0\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 */\nimport { ErrorResponseImpl } from \"./router/utils.js\";\n//#region lib/errors.ts\nconst ERROR_DIGEST_BASE = \"REACT_ROUTER_ERROR\";\nconst ERROR_DIGEST_REDIRECT = \"REDIRECT\";\nconst ERROR_DIGEST_ROUTE_ERROR_RESPONSE = \"ROUTE_ERROR_RESPONSE\";\nfunction decodeRedirectErrorDigest(digest) {\n\tif (digest.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`)) try {\n\t\tlet parsed = JSON.parse(digest.slice(28));\n\t\tif (typeof parsed === \"object\" && parsed && typeof parsed.status === \"number\" && typeof parsed.statusText === \"string\" && typeof parsed.location === \"string\" && typeof parsed.reloadDocument === \"boolean\" && typeof parsed.replace === \"boolean\") return parsed;\n\t} catch {}\n}\nfunction decodeRouteErrorResponseDigest(digest) {\n\tif (digest.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`)) try {\n\t\tlet parsed = JSON.parse(digest.slice(40));\n\t\tif (typeof parsed === \"object\" && parsed && typeof parsed.status === \"number\" && typeof parsed.statusText === \"string\") return new ErrorResponseImpl(parsed.status, parsed.statusText, parsed.data);\n\t} catch {}\n}\n//#endregion\nexport { decodeRedirectErrorDigest, decodeRouteErrorResponseDigest };\n","/**\n * react-router v8.2.0\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 */\nimport { invariant, parsePath, warning } from \"./router/history.js\";\nimport { convertRouteMatchToUiMatch, decodePath, getResolveToMatches, getRoutePattern, isBrowser, isRouteErrorResponse, joinPaths, matchPath, matchRoutes, parseToInfo, resolveTo, stripBasename } from \"./router/utils.js\";\nimport { IDLE_BLOCKER, hasInvalidProtocol } from \"./router/router.js\";\nimport { AwaitContext, DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RSCRouterContext, RouteContext, RouteErrorContext } from \"./context.js\";\nimport { decodeRedirectErrorDigest, decodeRouteErrorResponseDigest } from \"./errors.js\";\nimport * as React$1 from \"react\";\n//#region lib/hooks.tsx\n/**\n* Resolves a URL against the current {@link Location}.\n*\n* @example\n* import { useHref } from \"react-router\";\n*\n* function SomeComponent() {\n* let href = useHref(\"some/where\");\n* // \"/resolved/some/where\"\n* }\n*\n* @public\n* @category Hooks\n* @param to The path to resolve\n* @param options Options\n* @param options.relative Defaults to `\"route\"` so routing is relative to the\n* route tree.\n* Set to `\"path\"` to make relative routing operate against path segments.\n* @returns The resolved href string\n*/\nfunction useHref(to, { relative } = {}) {\n\tinvariant(useInRouterContext(), `useHref() may be used only in the context of a <Router> component.`);\n\tlet { basename, navigator } = React$1.useContext(NavigationContext);\n\tlet { hash, pathname, search } = useResolvedPath(to, { relative });\n\tlet joinedPathname = pathname;\n\tif (basename !== \"/\") joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n\treturn navigator.createHref({\n\t\tpathname: joinedPathname,\n\t\tsearch,\n\t\thash\n\t});\n}\n/**\n* Returns `true` if this component is a descendant of a {@link Router}, useful\n* to ensure a component is used within a {@link Router}.\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns Whether the component is within a {@link Router} context\n*/\nfunction useInRouterContext() {\n\treturn React$1.useContext(LocationContext) != null;\n}\n/**\n* Returns the current {@link Location}. This can be useful if you'd like to\n* perform some side effect whenever it changes.\n*\n* @example\n* import * as React from 'react'\n* import { useLocation } from 'react-router'\n*\n* function SomeComponent() {\n* let location = useLocation()\n*\n* React.useEffect(() => {\n* // Google Analytics\n* ga('send', 'pageview')\n* }, [location]);\n*\n* return (\n* // ...\n* );\n* }\n*\n* @public\n* @category Hooks\n* @returns The current {@link Location} object\n*/\nfunction useLocation() {\n\tinvariant(useInRouterContext(), `useLocation() may be used only in the context of a <Router> component.`);\n\treturn React$1.useContext(LocationContext).location;\n}\n/**\n* Returns the current {@link Navigation} action which describes how the router\n* came to the current {@link Location}, either by a pop, push, or replace on\n* the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack.\n*\n* @public\n* @category Hooks\n* @returns The current {@link NavigationType} (`\"POP\"`, `\"PUSH\"`, or `\"REPLACE\"`)\n*/\nfunction useNavigationType() {\n\treturn React$1.useContext(LocationContext).navigationType;\n}\n/**\n* Returns a {@link PathMatch} object if the given pattern matches the current URL.\n* This is useful for components that need to know \"active\" state, e.g.\n* {@link NavLink | `<NavLink>`}.\n*\n* @public\n* @category Hooks\n* @param pattern The pattern to match against the current {@link Location}\n* @returns The path match object if the pattern matches, `null` otherwise\n*/\nfunction useMatch(pattern) {\n\tinvariant(useInRouterContext(), `useMatch() may be used only in the context of a <Router> component.`);\n\tlet { pathname } = useLocation();\n\treturn React$1.useMemo(() => matchPath(pattern, decodePath(pathname)), [pathname, pattern]);\n}\nconst navigateEffectWarning = \"You should call navigate() in a React.useEffect(), not when your component is first rendered.\";\n/**\n* Returns a function that lets you navigate programmatically in the browser in\n* response to user interactions or effects.\n*\n* It's often better to use {@link redirect} in [`action`](../../start/framework/route-module#action)/[`loader`](../../start/framework/route-module#loader)\n* functions than this hook.\n*\n* The returned function signature is `navigate(to, options?)`/`navigate(delta)` where:\n*\n* * `to` can be a string path, a {@link To} object, or a number (delta)\n* * `options` contains options for modifying the navigation\n* * These options work in all modes (Framework, Data, and Declarative):\n* * `relative`: `\"route\"` or `\"path\"` to control relative routing logic\n* * `replace`: Replace the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack\n* * `state`: Optional [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state) to include with the new {@link Location}\n* * These options only work in Framework and Data modes:\n* * `flushSync`: Wrap the DOM updates in [`ReactDom.flushSync`](https://react.dev/reference/react-dom/flushSync)\n* * `preventScrollReset`: Do not scroll back to the top of the page after navigation\n* * `viewTransition`: Enable [`document.startViewTransition`](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for this navigation\n*\n* @example\n* import { useNavigate } from \"react-router\";\n*\n* function SomeComponent() {\n* let navigate = useNavigate();\n* return (\n* <button onClick={() => navigate(-1)}>\n* Go Back\n* </button>\n* );\n* }\n*\n* @additionalExamples\n* ### Navigate to another path\n*\n* ```tsx\n* navigate(\"/some/route\");\n* navigate(\"/some/route?search=param\");\n* ```\n*\n* ### Navigate with a {@link To} object\n*\n* All properties are optional.\n*\n* ```tsx\n* navigate(\n* {\n* pathname: \"/some/route\",\n* search: \"?search=param\",\n* hash: \"#hash\",\n* },\n* {\n* state: { some: \"state\" },\n* },\n* );\n* ```\n*\n* If you use `state`, that will be available on the {@link Location} object on\n* the next page. Access it with `useLocation().state` (see {@link useLocation}).\n*\n* ### Navigate back or forward in the history stack\n*\n* ```tsx\n* // back\n* // often used to close modals\n* navigate(-1);\n*\n* // forward\n* // often used in a multistep wizard workflows\n* navigate(1);\n* ```\n*\n* Be cautious with `navigate(number)`. If your application can load up to a\n* route that has a button that tries to navigate forward/back, there may not be\n* a [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* entry to go back or forward to, or it can go somewhere you don't expect\n* (like a different domain).\n*\n* Only use this if you're sure they will have an entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack to navigate to.\n*\n* ### Replace the current entry in the history stack\n*\n* This will remove the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack, replacing it with a new one, similar to a server side redirect.\n*\n* ```tsx\n* navigate(\"/some/route\", { replace: true });\n* ```\n*\n* ### Prevent Scroll Reset\n*\n* [MODES: framework, data]\n*\n* <br/>\n* <br/>\n*\n* To prevent {@link ScrollRestoration | `<ScrollRestoration>`} from resetting\n* the scroll position, use the `preventScrollReset` option.\n*\n* ```tsx\n* navigate(\"?some-tab=1\", { preventScrollReset: true });\n* ```\n*\n* For example, if you have a tab interface connected to search params in the\n* middle of a page, and you don't want it to scroll to the top when a tab is\n* clicked.\n*\n* ### Return Type Augmentation\n*\n* Internally, `useNavigate` uses a separate implementation when you are in\n* Declarative mode versus Data/Framework mode - the primary difference being\n* that the latter is able to return a stable reference that does not change\n* identity across navigations. The implementation in Data/Framework mode also\n* returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n* that resolves when the navigation is completed. This means the return type of\n* `useNavigate` is `void | Promise<void>`. This is accurate, but can lead to\n* some red squigglies based on the union in the return value:\n*\n* - If you're using `typescript-eslint`, you may see errors from\n* [`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises)\n* - In Framework/Data mode, `React.use(navigate())` will show a false-positive\n* `Argument of type 'void | Promise<void>' is not assignable to parameter of\n* type 'Usable<void>'` error\n*\n* The easiest way to work around these issues is to augment the type based on the\n* router you're using:\n*\n* ```ts\n* // If using <BrowserRouter>\n* declare module \"react-router\" {\n* interface NavigateFunction {\n* (to: To, options?: NavigateOptions): void;\n* (delta: number): void;\n* }\n* }\n*\n* // If using <RouterProvider> or Framework mode\n* declare module \"react-router\" {\n* interface NavigateFunction {\n* (to: To, options?: NavigateOptions): Promise<void>;\n* (delta: number): Promise<void>;\n* }\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @returns A navigate function for programmatic navigation\n*/\nfunction useNavigate() {\n\tlet { isDataRoute } = React$1.useContext(RouteContext);\n\treturn isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n\tinvariant(useInRouterContext(), `useNavigate() may be used only in the context of a <Router> component.`);\n\tlet dataRouterContext = React$1.useContext(DataRouterContext);\n\tlet { basename, navigator } = React$1.useContext(NavigationContext);\n\tlet { matches } = React$1.useContext(RouteContext);\n\tlet { pathname: locationPathname } = useLocation();\n\tlet routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n\tlet activeRef = React$1.useRef(false);\n\tReact$1.useLayoutEffect(() => {\n\t\tactiveRef.current = true;\n\t});\n\treturn React$1.useCallback((to, options = {}) => {\n\t\twarning(activeRef.current, navigateEffectWarning);\n\t\tif (!activeRef.current) return;\n\t\tif (typeof to === \"number\") {\n\t\t\tnavigator.go(to);\n\t\t\treturn;\n\t\t}\n\t\tlet path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\");\n\t\tif (dataRouterContext == null && basename !== \"/\") path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n\t\t(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n\t}, [\n\t\tbasename,\n\t\tnavigator,\n\t\troutePathnamesJson,\n\t\tlocationPathname,\n\t\tdataRouterContext\n\t]);\n}\nconst OutletContext = React$1.createContext(null);\n/**\n* Returns the parent route {@link Outlet | `<Outlet context>`}.\n*\n* Often parent routes manage state or other values you want shared with child\n* routes. You can create your own [context provider](https://react.dev/learn/passing-data-deeply-with-context)\n* if you like, but this is such a common situation that it's built-into\n* {@link Outlet | `<Outlet>`}.\n*\n* ```tsx\n* // Parent route\n* function Parent() {\n* const [count, setCount] = React.useState(0);\n* return <Outlet context={[count, setCount]} />;\n* }\n* ```\n*\n* ```tsx\n* // Child route\n* import { useOutletContext } from \"react-router\";\n*\n* function Child() {\n* const [count, setCount] = useOutletContext();\n* const increment = () => setCount((c) => c + 1);\n* return <button onClick={increment}>{count}</button>;\n* }\n* ```\n*\n* If you're using TypeScript, we recommend the parent component provide a\n* custom hook for accessing the context value. This makes it easier for\n* consumers to get nice typings, control consumers, and know who's consuming\n* the context value.\n*\n* Here's a more realistic example:\n*\n* ```tsx filename=src/routes/dashboard.tsx lines=[14,20]\n* import { useState } from \"react\";\n* import { Outlet, useOutletContext } from \"react-router\";\n*\n* import type { User } from \"./types\";\n*\n* type ContextType = { user: User | null };\n*\n* export default function Dashboard() {\n* const [user, setUser] = useState<User | null>(null);\n*\n* return (\n* <div>\n* <h1>Dashboard</h1>\n* <Outlet context={{ user } satisfies ContextType} />\n* </div>\n* );\n* }\n*\n* export function useUser() {\n* return useOutletContext<ContextType>();\n* }\n* ```\n*\n* ```tsx filename=src/routes/dashboard/messages.tsx lines=[1,4]\n* import { useUser } from \"../dashboard\";\n*\n* export default function DashboardMessages() {\n* const { user } = useUser();\n* return (\n* <div>\n* <h2>Messages</h2>\n* <p>Hello, {user.name}!</p>\n* </div>\n* );\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @returns The context value passed to the parent {@link Outlet} component\n*/\nfunction useOutletContext() {\n\treturn React$1.useContext(OutletContext);\n}\n/**\n* Returns the element for the child route at this level of the route\n* hierarchy. Used internally by {@link Outlet | `<Outlet>`} to render child\n* routes.\n*\n* @public\n* @category Hooks\n* @param context The context to pass to the outlet\n* @returns The child route element or `null` if no child routes match\n*/\nfunction useOutlet(context) {\n\tlet outlet = React$1.useContext(RouteContext).outlet;\n\treturn React$1.useMemo(() => outlet && /* @__PURE__ */ React$1.createElement(OutletContext.Provider, { value: context }, outlet), [outlet, context]);\n}\n/**\n* Returns an object of key/value-pairs of the dynamic params from the current\n* URL that were matched by the routes. Child routes inherit all params from\n* their parent routes.\n*\n* Assuming a route pattern like `/posts/:postId` is matched by `/posts/123`\n* then `params.postId` will be `\"123\"`.\n*\n* @example\n* import { useParams } from \"react-router\";\n*\n* function SomeComponent() {\n* let params = useParams();\n* params.postId;\n* }\n*\n* @additionalExamples\n* ### Basic Usage\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* // given a route like:\n* <Route path=\"/posts/:postId\" element={<Post />} />;\n*\n* // or a data route like:\n* createBrowserRouter([\n* {\n* path: \"/posts/:postId\",\n* component: Post,\n* },\n* ]);\n*\n* // or in routes.ts\n* route(\"/posts/:postId\", \"routes/post.tsx\");\n* ```\n*\n* Access the params in a component:\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* export default function Post() {\n* let params = useParams();\n* return <h1>Post: {params.postId}</h1>;\n* }\n* ```\n*\n* ### Multiple Params\n*\n* Patterns can have multiple params:\n*\n* ```tsx\n* \"/posts/:postId/comments/:commentId\";\n* ```\n*\n* All will be available in the params object:\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* export default function Post() {\n* let params = useParams();\n* return (\n* <h1>\n* Post: {params.postId}, Comment: {params.commentId}\n* </h1>\n* );\n* }\n* ```\n*\n* ### Catchall Params\n*\n* Catchall params are defined with `*`:\n*\n* ```tsx\n* \"/files/*\";\n* ```\n*\n* The matched value will be available in the params object as follows:\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* export default function File() {\n* let params = useParams();\n* let catchall = params[\"*\"];\n* // ...\n* }\n* ```\n*\n* You can destructure the catchall param:\n*\n* ```tsx\n* export default function File() {\n* let { \"*\": catchall } = useParams();\n* console.log(catchall);\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @returns An object containing the dynamic route parameters\n*/\nfunction useParams() {\n\tlet { matches } = React$1.useContext(RouteContext);\n\treturn matches[matches.length - 1]?.params ?? {};\n}\n/**\n* Resolves the pathname of the given `to` value against the current\n* {@link Location}. Similar to {@link useHref}, but returns a\n* {@link Path} instead of a string.\n*\n* @example\n* import { useResolvedPath } from \"react-router\";\n*\n* function SomeComponent() {\n* // if the user is at /dashboard/profile\n* let path = useResolvedPath(\"../accounts\");\n* path.pathname; // \"/dashboard/accounts\"\n* path.search; // \"\"\n* path.hash; // \"\"\n* }\n*\n* @public\n* @category Hooks\n* @param to The path to resolve\n* @param options Options\n* @param options.relative Defaults to `\"route\"` so routing is relative to the route tree.\n* Set to `\"path\"` to make relative routing operate against path segments.\n* @returns The resolved {@link Path} object with `pathname`, `search`, and `hash`\n*/\nfunction useResolvedPath(to, { relative } = {}) {\n\tlet { matches } = React$1.useContext(RouteContext);\n\tlet { pathname: locationPathname } = useLocation();\n\tlet routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n\treturn React$1.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [\n\t\tto,\n\t\troutePathnamesJson,\n\t\tlocationPathname,\n\t\trelative\n\t]);\n}\n/**\n* Hook version of {@link Routes | `<Routes>`} that uses objects instead of\n* components. These objects have the same properties as the component props.\n* The return value of `useRoutes` is either a valid React element you can use\n* to render the route tree, or `null` if nothing matched.\n*\n* @example\n* import { useRoutes } from \"react-router\";\n*\n* function App() {\n* let element = useRoutes([\n* {\n* path: \"/\",\n* element: <Dashboard />,\n* children: [\n* {\n* path: \"messages\",\n* element: <DashboardMessages />,\n* },\n* { path: \"tasks\", element: <DashboardTasks /> },\n* ],\n* },\n* { path: \"team\", element: <AboutPage /> },\n* ]);\n*\n* return element;\n* }\n*\n* @public\n* @category Hooks\n* @param routes An array of {@link RouteObject}s that define the route hierarchy\n* @param locationArg An optional {@link Location} object or pathname string to\n* use instead of the current {@link Location}\n* @returns A React element to render the matched route, or `null` if no routes matched\n*/\nfunction useRoutes(routes, locationArg) {\n\treturn useRoutesImpl(routes, locationArg);\n}\nfunction useRoutesImpl(routes, locationArg, dataRouterOpts) {\n\tinvariant(useInRouterContext(), `useRoutes() may be used only in the context of a <Router> component.`);\n\tlet { navigator } = React$1.useContext(NavigationContext);\n\tlet { matches: parentMatches } = React$1.useContext(RouteContext);\n\tlet routeMatch = parentMatches[parentMatches.length - 1];\n\tlet parentParams = routeMatch ? routeMatch.params : {};\n\trouteMatch && routeMatch.pathname;\n\tlet parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n\trouteMatch && routeMatch.route;\n\tlet locationFromContext = useLocation();\n\tlet location;\n\tif (locationArg) {\n\t\tlet parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n\t\tinvariant(parentPathnameBase === \"/\" || parsedLocationArg.pathname?.startsWith(parentPathnameBase), `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\t\tlocation = parsedLocationArg;\n\t} else location = locationFromContext;\n\tlet pathname = location.pathname || \"/\";\n\tlet remainingPathname = pathname;\n\tif (parentPathnameBase !== \"/\") {\n\t\tlet parentSegments = parentPathnameBase.replace(/^\\//, \"\").split(\"/\");\n\t\tremainingPathname = \"/\" + pathname.replace(/^\\//, \"\").split(\"/\").slice(parentSegments.length).join(\"/\");\n\t}\n\tlet matches = dataRouterOpts && dataRouterOpts.state.matches.length ? dataRouterOpts.state.matches.map((m) => Object.assign(m, { route: dataRouterOpts.manifest[m.route.id] || m.route })) : matchRoutes(routes, { pathname: remainingPathname });\n\tlet renderedMatches = _renderMatches(matches && matches.map((match) => Object.assign({}, match, {\n\t\tparams: Object.assign({}, parentParams, match.params),\n\t\tpathname: joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/%/g, \"%25\").replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")).pathname : match.pathname]),\n\t\tpathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/%/g, \"%25\").replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")).pathname : match.pathnameBase])\n\t})), parentMatches, dataRouterOpts);\n\tif (locationArg && renderedMatches) return /* @__PURE__ */ React$1.createElement(LocationContext.Provider, { value: {\n\t\tlocation: {\n\t\t\tpathname: \"/\",\n\t\t\tsearch: \"\",\n\t\t\thash: \"\",\n\t\t\tstate: null,\n\t\t\tkey: \"default\",\n\t\t\tmask: void 0,\n\t\t\t...location\n\t\t},\n\t\tnavigationType: \"POP\"\n\t} }, renderedMatches);\n\treturn renderedMatches;\n}\nfunction DefaultErrorComponent() {\n\tlet error = useRouteError();\n\tlet message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);\n\tlet stack = error instanceof Error ? error.stack : null;\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(\"h2\", null, \"Unexpected Application Error!\"), /* @__PURE__ */ React$1.createElement(\"h3\", { style: { fontStyle: \"italic\" } }, message), stack ? /* @__PURE__ */ React$1.createElement(\"pre\", { style: {\n\t\tpadding: \"0.5rem\",\n\t\tbackgroundColor: \"rgba(200,200,200, 0.5)\"\n\t} }, stack) : null, null);\n}\nconst defaultErrorElement = /* @__PURE__ */ React$1.createElement(DefaultErrorComponent, null);\nvar RenderErrorBoundary = class extends React$1.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tlocation: props.location,\n\t\t\trevalidation: props.revalidation,\n\t\t\terror: props.error\n\t\t};\n\t}\n\tstatic contextType = RSCRouterContext;\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tif (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") return {\n\t\t\terror: props.error,\n\t\t\tlocation: props.location,\n\t\t\trevalidation: props.revalidation\n\t\t};\n\t\treturn {\n\t\t\terror: props.error !== void 0 ? props.error : state.error,\n\t\t\tlocation: state.location,\n\t\t\trevalidation: props.revalidation || state.revalidation\n\t\t};\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tif (this.props.onError) this.props.onError(error, errorInfo);\n\t\telse console.error(\"React Router caught the following error during render\", error);\n\t}\n\trender() {\n\t\tlet error = this.state.error;\n\t\tif (this.context && typeof error === \"object\" && error && \"digest\" in error && typeof error.digest === \"string\") {\n\t\t\tconst decoded = decodeRouteErrorResponseDigest(error.digest);\n\t\t\tif (decoded) error = decoded;\n\t\t}\n\t\tlet result = error !== void 0 ? /* @__PURE__ */ React$1.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React$1.createElement(RouteErrorContext.Provider, {\n\t\t\tvalue: error,\n\t\t\tchildren: this.props.component\n\t\t})) : this.props.children;\n\t\tif (this.context) return /* @__PURE__ */ React$1.createElement(RSCErrorHandler, { error }, result);\n\t\treturn result;\n\t}\n};\nconst errorRedirectHandledMap = /* @__PURE__ */ new WeakMap();\nfunction RSCErrorHandler({ children, error }) {\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tif (typeof error === \"object\" && error && \"digest\" in error && typeof error.digest === \"string\") {\n\t\tlet redirect = decodeRedirectErrorDigest(error.digest);\n\t\tif (redirect) {\n\t\t\tlet existingRedirect = errorRedirectHandledMap.get(error);\n\t\t\tif (existingRedirect) throw existingRedirect;\n\t\t\tlet parsed = parseToInfo(redirect.location, basename);\n\t\t\tlet target = parsed.absoluteURL || parsed.to;\n\t\t\tif (hasInvalidProtocol(target)) throw new Error(\"Invalid redirect location\");\n\t\t\tif (isBrowser && !errorRedirectHandledMap.get(error)) if (parsed.isExternal || redirect.reloadDocument) window.location.href = target;\n\t\t\telse {\n\t\t\t\tconst redirectPromise = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(parsed.to, { replace: redirect.replace }));\n\t\t\t\terrorRedirectHandledMap.set(error, redirectPromise);\n\t\t\t\tthrow redirectPromise;\n\t\t\t}\n\t\t\treturn /* @__PURE__ */ React$1.createElement(\"meta\", {\n\t\t\t\thttpEquiv: \"refresh\",\n\t\t\t\tcontent: `0;url=${target}`\n\t\t\t});\n\t\t}\n\t}\n\treturn children;\n}\nfunction RenderedRoute({ routeContext, match, children }) {\n\tlet dataRouterContext = React$1.useContext(DataRouterContext);\n\tif (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n\treturn /* @__PURE__ */ React$1.createElement(RouteContext.Provider, { value: routeContext }, children);\n}\nfunction _renderMatches(matches, parentMatches = [], dataRouterOpts) {\n\tlet dataRouterState = dataRouterOpts?.state;\n\tif (matches == null) {\n\t\tif (!dataRouterState) return null;\n\t\tif (dataRouterState.errors) matches = dataRouterState.matches;\n\t\telse if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) matches = dataRouterState.matches;\n\t\telse return null;\n\t}\n\tlet renderedMatches = matches;\n\tlet errors = dataRouterState?.errors;\n\tif (errors != null) {\n\t\tlet errorIndex = renderedMatches.findIndex((m) => m.route.id && errors?.[m.route.id] !== void 0);\n\t\tinvariant(errorIndex >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(errors).join(\",\")}`);\n\t\trenderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n\t}\n\tlet renderFallback = false;\n\tlet fallbackIndex = -1;\n\tif (dataRouterOpts && dataRouterState) {\n\t\trenderFallback = dataRouterState.renderFallback;\n\t\tfor (let i = 0; i < renderedMatches.length; i++) {\n\t\t\tlet match = renderedMatches[i];\n\t\t\tif (match.route.HydrateFallback || match.route.hydrateFallbackElement) fallbackIndex = i;\n\t\t\tif (match.route.id) {\n\t\t\t\tlet { loaderData, errors } = dataRouterState;\n\t\t\t\tlet needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors || errors[match.route.id] === void 0);\n\t\t\t\tif (match.route.lazy || needsToRunLoader) {\n\t\t\t\t\tif (dataRouterOpts.isStatic) renderFallback = true;\n\t\t\t\t\tif (fallbackIndex >= 0) renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n\t\t\t\t\telse renderedMatches = [renderedMatches[0]];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tlet onErrorHandler = dataRouterOpts?.onError;\n\tlet onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {\n\t\tonErrorHandler(error, {\n\t\t\tlocation: dataRouterState.location,\n\t\t\tparams: dataRouterState.matches?.[0]?.params ?? {},\n\t\t\tpattern: getRoutePattern(dataRouterState.matches),\n\t\t\terrorInfo\n\t\t});\n\t} : void 0;\n\treturn renderedMatches.reduceRight((outlet, match, index) => {\n\t\tlet error;\n\t\tlet shouldRenderHydrateFallback = false;\n\t\tlet errorElement = null;\n\t\tlet hydrateFallbackElement = null;\n\t\tif (dataRouterState) {\n\t\t\terror = errors && match.route.id ? errors[match.route.id] : void 0;\n\t\t\terrorElement = match.route.errorElement || defaultErrorElement;\n\t\t\tif (renderFallback) {\n\t\t\t\tif (fallbackIndex < 0 && index === 0) {\n\t\t\t\t\twarningOnce(\"route-fallback\", false, \"No `HydrateFallback` element provided to render during initial hydration\");\n\t\t\t\t\tshouldRenderHydrateFallback = true;\n\t\t\t\t\thydrateFallbackElement = null;\n\t\t\t\t} else if (fallbackIndex === index) {\n\t\t\t\t\tshouldRenderHydrateFallback = true;\n\t\t\t\t\thydrateFallbackElement = match.route.hydrateFallbackElement || null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlet matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n\t\tlet getChildren = () => {\n\t\t\tlet children;\n\t\t\tif (error) children = errorElement;\n\t\t\telse if (shouldRenderHydrateFallback) children = hydrateFallbackElement;\n\t\t\telse if (match.route.Component) children = /* @__PURE__ */ React$1.createElement(match.route.Component, null);\n\t\t\telse if (match.route.element) children = match.route.element;\n\t\t\telse children = outlet;\n\t\t\treturn /* @__PURE__ */ React$1.createElement(RenderedRoute, {\n\t\t\t\tmatch,\n\t\t\t\trouteContext: {\n\t\t\t\t\toutlet,\n\t\t\t\t\tmatches,\n\t\t\t\t\tisDataRoute: dataRouterState != null\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t});\n\t\t};\n\t\treturn dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React$1.createElement(RenderErrorBoundary, {\n\t\t\tlocation: dataRouterState.location,\n\t\t\trevalidation: dataRouterState.revalidation,\n\t\t\tcomponent: errorElement,\n\t\t\terror,\n\t\t\tchildren: getChildren(),\n\t\t\trouteContext: {\n\t\t\t\toutlet: null,\n\t\t\t\tmatches,\n\t\t\t\tisDataRoute: true\n\t\t\t},\n\t\t\tonError\n\t\t}) : getChildren();\n\t}, null);\n}\nfunction getDataRouterConsoleError(hookName) {\n\treturn `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext(hookName) {\n\tlet ctx = React$1.useContext(DataRouterContext);\n\tinvariant(ctx, getDataRouterConsoleError(hookName));\n\treturn ctx;\n}\nfunction useDataRouterState(hookName) {\n\tlet state = React$1.useContext(DataRouterStateContext);\n\tinvariant(state, getDataRouterConsoleError(hookName));\n\treturn state;\n}\nfunction useRouteContext(hookName) {\n\tlet route = React$1.useContext(RouteContext);\n\tinvariant(route, getDataRouterConsoleError(hookName));\n\treturn route;\n}\nfunction useCurrentRouteId(hookName) {\n\tlet route = useRouteContext(hookName);\n\tlet thisRoute = route.matches[route.matches.length - 1];\n\tinvariant(thisRoute.route.id, `${hookName} can only be used on routes that contain a unique \"id\"`);\n\treturn thisRoute.route.id;\n}\n/**\n* Returns the ID for the nearest contextual route\n*\n* @category Hooks\n* @returns The ID of the nearest contextual route\n*/\nfunction useRouteId() {\n\treturn useCurrentRouteId(\"useRouteId\");\n}\n/**\n* Returns the current {@link Navigation}, defaulting to an \"idle\" navigation\n* when no navigation is in progress. You can use this to render pending UI\n* (like a global spinner) or read [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)\n* from a form navigation.\n*\n* @example\n* import { useNavigation } from \"react-router\";\n*\n* function SomeComponent() {\n* let navigation = useNavigation();\n* navigation.state;\n* navigation.formData;\n* // etc.\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The current {@link Navigation} object\n*/\nfunction useNavigation() {\n\tlet state = useDataRouterState(\"useNavigation\");\n\treturn React$1.useMemo(() => {\n\t\tlet { matches, historyAction, ...rest } = state.navigation;\n\t\treturn rest;\n\t}, [state.navigation]);\n}\n/**\n* Revalidate the data on the page for reasons outside of normal data mutations\n* like [`Window` focus](https://developer.mozilla.org/en-US/docs/Web/API/Window/focus_event)\n* or polling on an interval.\n*\n* Note that page data is already revalidated automatically after actions.\n* If you find yourself using this for normal CRUD operations on your data in\n* response to user interactions, you're probably not taking advantage of the\n* other APIs like {@link useFetcher}, {@link Form}, {@link useSubmit} that do\n* this automatically.\n*\n* @example\n* import { useRevalidator } from \"react-router\";\n*\n* function WindowFocusRevalidator() {\n* const revalidator = useRevalidator();\n*\n* useFakeWindowFocus(() => {\n* revalidator.revalidate();\n* });\n*\n* return (\n* <div hidden={revalidator.state === \"idle\"}>\n* Revalidating...\n* </div>\n* );\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns An object with a `revalidate` function and the current revalidation\n* `state`\n*/\nfunction useRevalidator() {\n\tlet dataRouterContext = useDataRouterContext(\"useRevalidator\");\n\tlet state = useDataRouterState(\"useRevalidator\");\n\tlet revalidate = React$1.useCallback(async () => {\n\t\tawait dataRouterContext.router.revalidate();\n\t}, [dataRouterContext.router]);\n\treturn React$1.useMemo(() => ({\n\t\trevalidate,\n\t\tstate: state.revalidation\n\t}), [revalidate, state.revalidation]);\n}\n/**\n* Returns the active route matches, useful for accessing `loaderData` for\n* parent/child routes or the route [`handle`](../../start/framework/route-module#handle)\n* property\n*\n* Pairing the route `handle` with `useMatches` gets very powerful since you can put\n* whatever you want on a route handle and have access to `useMatches` anywhere.\n* Please see the [handle](../../how-to/using-handle) documentation for an example\n* of breadcrumbs via `useMatches`/`handle`.\n*\n* ```tsx\n* import { useMatches } from \"react-router\";\n*\n* function SomeComponent() {\n* const matches = useMatches();\n* // matches[i].id // route id\n* // matches[i].pathname // the portion of the URL the route matched\n* // matches[i].params // the parsed params from the URL\n* // matches[i].loaderData // the data from the loader\n* // matches[i].handle // the route handle with any app specific data\n* }\n* ```\n*\n* <docs-info>useMatches only works with a data router like `createBrowserRouter`,\n* since they know the full route tree up front and can provide all of the current\n* matches. Additionally, `useMatches` will not match down into any descendant route\n* trees since the router isn't aware of the descendant routes.</docs-info>\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns An array of {@link UIMatch | UI matches} for the current route hierarchy\n*/\nfunction useMatches() {\n\tlet { matches, loaderData } = useDataRouterState(\"useMatches\");\n\treturn React$1.useMemo(() => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);\n}\n/**\n* Returns the data from the closest route\n* [`loader`](../../start/framework/route-module#loader) or\n* [`clientLoader`](../../start/framework/route-module#clientloader).\n*\n* @example\n* import { useLoaderData } from \"react-router\";\n*\n* export async function loader() {\n* return await fakeDb.invoices.findAll();\n* }\n*\n* export default function Invoices() {\n* let invoices = useLoaderData<typeof loader>();\n* // ...\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The data returned from the route's [`loader`](../../start/framework/route-module#loader) or [`clientLoader`](../../start/framework/route-module#clientloader) function\n*/\nfunction useLoaderData() {\n\tlet state = useDataRouterState(\"useLoaderData\");\n\tlet routeId = useCurrentRouteId(\"useLoaderData\");\n\treturn state.loaderData[routeId];\n}\n/**\n* Returns the [`loader`](../../start/framework/route-module#loader) data for a\n* given route by route ID.\n*\n* Route IDs are created automatically. They are simply the path of the route file\n* relative to the app folder without the extension.\n*\n* | Route Filename | Route ID |\n* | ---------------------------- | ---------------------- |\n* | `app/root.tsx` | `\"root\"` |\n* | `app/routes/teams.tsx` | `\"routes/teams\"` |\n* | `app/whatever/teams.$id.tsx` | `\"whatever/teams.$id\"` |\n*\n* @example\n* import { useRouteLoaderData } from \"react-router\";\n*\n* function SomeComponent() {\n* const { user } = useRouteLoaderData(\"root\");\n* }\n*\n* // You can also specify your own route ID's manually in your routes.ts file:\n* route(\"/\", \"containers/app.tsx\", { id: \"app\" })\n* useRouteLoaderData(\"app\");\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param routeId The ID of the route to return loader data from\n* @returns The data returned from the specified route's [`loader`](../../start/framework/route-module#loader)\n* function, or `undefined` if not found\n*/\nfunction useRouteLoaderData(routeId) {\n\treturn useDataRouterState(\"useRouteLoaderData\").loaderData[routeId];\n}\n/**\n* Returns the [`action`](../../start/framework/route-module#action) data from\n* the most recent `POST` navigation form submission or `undefined` if there\n* hasn't been one.\n*\n* @example\n* import { Form, useActionData } from \"react-router\";\n*\n* export async function action({ request }) {\n* const body = await request.formData();\n* const name = body.get(\"visitorsName\");\n* return { message: `Hello, ${name}` };\n* }\n*\n* export default function Invoices() {\n* const data = useActionData();\n* return (\n* <Form method=\"post\">\n* <input type=\"text\" name=\"visitorsName\" />\n* {data ? data.message : \"Waiting...\"}\n* </Form>\n* );\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The data returned from the route's [`action`](../../start/framework/route-module#action)\n* function, or `undefined` if no [`action`](../../start/framework/route-module#action)\n* has been called\n*/\nfunction useActionData() {\n\tlet state = useDataRouterState(\"useActionData\");\n\tlet routeId = useCurrentRouteId(\"useLoaderData\");\n\treturn state.actionData ? state.actionData[routeId] : void 0;\n}\n/**\n* Accesses the error thrown during an\n* [`action`](../../start/framework/route-module#action),\n* [`loader`](../../start/framework/route-module#loader),\n* or component render to be used in a route module\n* [`ErrorBoundary`](../../start/framework/route-module#errorboundary).\n*\n* @example\n* export function ErrorBoundary() {\n* const error = useRouteError();\n* return <div>{error.message}</div>;\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The error that was thrown during route [loading](../../start/framework/route-module#loader),\n* [`action`](../../start/framework/route-module#action) execution, or rendering\n*/\nfunction useRouteError() {\n\tlet error = React$1.useContext(RouteErrorContext);\n\tlet state = useDataRouterState(\"useRouteError\");\n\tlet routeId = useCurrentRouteId(\"useRouteError\");\n\tif (error !== void 0) return error;\n\treturn state.errors?.[routeId];\n}\n/**\n* Returns the resolved promise value from the closest {@link Await | `<Await>`}.\n*\n* @example\n* function SomeDescendant() {\n* const value = useAsyncValue();\n* // ...\n* }\n*\n* // somewhere in your app\n* <Await resolve={somePromise}>\n* <SomeDescendant />\n* </Await>;\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The resolved value from the nearest {@link Await} component\n*/\nfunction useAsyncValue() {\n\treturn React$1.useContext(AwaitContext)?._data;\n}\n/**\n* Returns the rejection value from the closest {@link Await | `<Await>`}.\n*\n* @example\n* import { Await, useAsyncError } from \"react-router\";\n*\n* function ErrorElement() {\n* const error = useAsyncError();\n* return (\n* <p>Uh Oh, something went wrong! {error.message}</p>\n* );\n* }\n*\n* // somewhere in your app\n* <Await\n* resolve={promiseThatRejects}\n* errorElement={<ErrorElement />}\n* />;\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The error that was thrown in the nearest {@link Await} component\n*/\nfunction useAsyncError() {\n\treturn React$1.useContext(AwaitContext)?._error;\n}\nlet blockerId = 0;\n/**\n* Allow the application to block navigations within the SPA and present the\n* user a confirmation dialog to confirm the navigation. Mostly used to avoid\n* using half-filled form data. This does not handle hard-reloads or\n* cross-origin navigations.\n*\n* The {@link Blocker} object returned by the hook has the following properties:\n*\n* - **`state`**\n* - `unblocked` - the blocker is idle and has not prevented any navigation\n* - `blocked` - the blocker has prevented a navigation\n* - `proceeding` - the blocker is proceeding through from a blocked navigation\n* - **`location`**\n* - When in a `blocked` state, this represents the {@link Location} to which\n* we blocked a navigation. When in a `proceeding` state, this is the\n* location being navigated to after a `blocker.proceed()` call.\n* - **`proceed()`**\n* - When in a `blocked` state, you may call `blocker.proceed()` to proceed to\n* the blocked location.\n* - **`reset()`**\n* - When in a `blocked` state, you may call `blocker.reset()` to return the\n* blocker to an `unblocked` state and leave the user at the current\n* location.\n*\n* @example\n* // Boolean version\n* let blocker = useBlocker(value !== \"\");\n*\n* // Function version\n* let blocker = useBlocker(\n* ({ currentLocation, nextLocation, historyAction }) =>\n* value !== \"\" &&\n* currentLocation.pathname !== nextLocation.pathname\n* );\n*\n* @additionalExamples\n* ```tsx\n* import { useCallback, useState } from \"react\";\n* import { BlockerFunction, useBlocker } from \"react-router\";\n*\n* export function ImportantForm() {\n* const [value, setValue] = useState(\"\");\n*\n* const shouldBlock = useCallback<BlockerFunction>(\n* () => value !== \"\",\n* [value]\n* );\n* const blocker = useBlocker(shouldBlock);\n*\n* return (\n* <form\n* onSubmit={(e) => {\n* e.preventDefault();\n* setValue(\"\");\n* if (blocker.state === \"blocked\") {\n* blocker.proceed();\n* }\n* }}\n* >\n* <input\n* name=\"data\"\n* value={value}\n* onChange={(e) => setValue(e.target.value)}\n* />\n*\n* <button type=\"submit\">Save</button>\n*\n* {blocker.state === \"blocked\" ? (\n* <>\n* <p style={{ color: \"red\" }}>\n* Blocked the last navigation to\n* </p>\n* <button\n* type=\"button\"\n* onClick={() => blocker.proceed()}\n* >\n* Let me through\n* </button>\n* <button\n* type=\"button\"\n* onClick={() => blocker.reset()}\n* >\n* Keep me here\n* </button>\n* </>\n* ) : blocker.state === \"proceeding\" ? (\n* <p style={{ color: \"orange\" }}>\n* Proceeding through blocked navigation\n* </p>\n* ) : (\n* <p style={{ color: \"green\" }}>\n* Blocker is currently unblocked\n* </p>\n* )}\n* </form>\n* );\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param shouldBlock Either a boolean or a function returning a boolean which\n* indicates whether the navigation should be blocked. The function format\n* receives a single object parameter containing the `currentLocation`,\n* `nextLocation`, and `historyAction` of the potential navigation.\n* @returns A {@link Blocker} object with state and reset functionality\n*/\nfunction useBlocker(shouldBlock) {\n\tlet { router, basename } = useDataRouterContext(\"useBlocker\");\n\tlet state = useDataRouterState(\"useBlocker\");\n\tlet [blockerKey, setBlockerKey] = React$1.useState(\"\");\n\tlet blockerFunction = React$1.useCallback((arg) => {\n\t\tif (typeof shouldBlock !== \"function\") return !!shouldBlock;\n\t\tif (basename === \"/\") return shouldBlock(arg);\n\t\tlet { currentLocation, nextLocation, historyAction } = arg;\n\t\treturn shouldBlock({\n\t\t\tcurrentLocation: {\n\t\t\t\t...currentLocation,\n\t\t\t\tpathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n\t\t\t},\n\t\t\tnextLocation: {\n\t\t\t\t...nextLocation,\n\t\t\t\tpathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n\t\t\t},\n\t\t\thistoryAction\n\t\t});\n\t}, [basename, shouldBlock]);\n\tReact$1.useEffect(() => {\n\t\tlet key = String(++blockerId);\n\t\tsetBlockerKey(key);\n\t\treturn () => router.deleteBlocker(key);\n\t}, [router]);\n\tReact$1.useEffect(() => {\n\t\tif (blockerKey !== \"\") router.getBlocker(blockerKey, blockerFunction);\n\t}, [\n\t\trouter,\n\t\tblockerKey,\n\t\tblockerFunction\n\t]);\n\treturn blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\nfunction useNavigateStable() {\n\tlet { router } = useDataRouterContext(\"useNavigate\");\n\tlet id = useCurrentRouteId(\"useNavigate\");\n\tlet activeRef = React$1.useRef(false);\n\tReact$1.useLayoutEffect(() => {\n\t\tactiveRef.current = true;\n\t});\n\treturn React$1.useCallback(async (to, options = {}) => {\n\t\twarning(activeRef.current, navigateEffectWarning);\n\t\tif (!activeRef.current) return;\n\t\tif (typeof to === \"number\") await router.navigate(to);\n\t\telse await router.navigate(to, {\n\t\t\tfromRouteId: id,\n\t\t\t...options\n\t\t});\n\t}, [router, id]);\n}\nconst alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n\tif (!cond && !alreadyWarned[key]) {\n\t\talreadyWarned[key] = true;\n\t\twarning(false, message);\n\t}\n}\nfunction useRoute(...args) {\n\tconst currentRouteId = useCurrentRouteId(\"useRoute\");\n\tconst id = args[0] ?? currentRouteId;\n\tconst state = useDataRouterState(\"useRoute\");\n\tconst route = state.matches.find(({ route }) => route.id === id);\n\tif (route === void 0) return void 0;\n\treturn {\n\t\thandle: route.route.handle,\n\t\tloaderData: state.loaderData[id],\n\t\tactionData: state.actionData?.[id]\n\t};\n}\nfunction toRouterStateMatch(match) {\n\treturn {\n\t\tid: match.route.id,\n\t\tpathname: match.pathname,\n\t\tparams: match.params,\n\t\thandle: match.route.handle\n\t};\n}\n/**\n* A unified hook for reading router state: current (`active`) and in-flight\n* (`pending`) locations, search params, params, matches, and navigation type.\n*\n* This hook consolidates the information you used to get from {@link useLocation},\n* {@link useSearchParams}, {@link useParams}, {@link useMatches}, {@link useNavigation},\n* and {@link useNavigationType} into a single hook.\n*\n*\n* @example\n* import { unstable_useRouterState as useRouterState } from \"react-router\";\n*\n* let { active, pending } = unstable_useRouterState();\n*\n* // Active is always populated with the current location\n* active.location; // replaces `useLocation()`\n* active.searchParams; // replaces `useSearchParams()[0]`\n* active.params; // replaces `useParams()`\n* active.matches; // replaces `useMatches()`\n* active.type; // replaces `useNavigationType()`\n*\n* // Pending is only populated during a navigation\n* pending.location; // replaces `useNavigation().location`\n* pending.searchParams; // equivalent to `new URLSearchParams(useNavigation().search)`\n* pending.params; // Not directly accessible today\n* pending.matches; // Not directly accessible today\n* pending.type; // Not directly accessible today\n* pending.state; // replaces `useNavigation().state`\n* pending.formMethod; // replaces useNavigation().formMethod\n* pending.formAction; // replaces useNavigation().formAction\n* pending.formEncType; // replaces useNavigation().formEncType\n* pending.formData; // replaces useNavigation().formData\n* pending.json; // replaces useNavigation().json\n* pending.text; // replaces useNavigation().text\n*\n* @name unstable_useRouterState\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The current router state with `active` and `pending` variants\n*/\nfunction useRouterState() {\n\tlet { location, historyAction: type, matches, navigation } = useDataRouterState(\"unstable_useRouterState\");\n\tlet active = React$1.useMemo(() => ({\n\t\ttype,\n\t\tlocation,\n\t\tsearchParams: new URLSearchParams(location.search),\n\t\tparams: matches[matches.length - 1]?.params ?? {},\n\t\tmatches: matches.map((m) => toRouterStateMatch(m))\n\t}), [\n\t\tlocation,\n\t\tmatches,\n\t\ttype\n\t]);\n\tlet pending = React$1.useMemo(() => {\n\t\tif (navigation.state === \"idle\") return null;\n\t\tlet shared = {\n\t\t\ttype: navigation.historyAction,\n\t\t\tlocation: navigation.location,\n\t\t\tsearchParams: new URLSearchParams(navigation.location.search),\n\t\t\tparams: navigation.matches[navigation.matches.length - 1]?.params ?? {},\n\t\t\tmatches: navigation.matches.map((m) => toRouterStateMatch(m))\n\t\t};\n\t\treturn navigation.state === \"loading\" ? {\n\t\t\t...shared,\n\t\t\tstate: \"loading\",\n\t\t\tformMethod: navigation.formMethod,\n\t\t\tformAction: navigation.formAction,\n\t\t\tformEncType: navigation.formEncType,\n\t\t\tformData: navigation.formData,\n\t\t\tjson: navigation.json,\n\t\t\ttext: navigation.text\n\t\t} : {\n\t\t\t...shared,\n\t\t\tstate: \"submitting\",\n\t\t\tformMethod: navigation.formMethod,\n\t\t\tformAction: navigation.formAction,\n\t\t\tformEncType: navigation.formEncType,\n\t\t\tformData: navigation.formData,\n\t\t\tjson: navigation.json,\n\t\t\ttext: navigation.text\n\t\t};\n\t}, [navigation]);\n\treturn React$1.useMemo(() => ({\n\t\tactive,\n\t\tpending\n\t}), [active, pending]);\n}\n//#endregion\nexport { _renderMatches, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRoute, useRouteError, useRouteId, useRouteLoaderData, useRouterState, useRoutes, useRoutesImpl };\n","/**\n * react-router v8.2.0\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 */\n//#region lib/server-runtime/warnings.ts\nconst alreadyWarned = {};\nfunction warnOnce(condition, message) {\n\tif (!condition && !alreadyWarned[message]) {\n\t\talreadyWarned[message] = true;\n\t\tconsole.warn(message);\n\t}\n}\n//#endregion\nexport { warnOnce };\n","/**\n * react-router v8.2.0\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 */\nimport { createMemoryHistory, invariant, parsePath, warning } from \"./router/history.js\";\nimport { defaultMapRouteProperties, getResolveToMatches, getRoutePattern, resolveTo, stripBasename } from \"./router/utils.js\";\nimport { createRouter } from \"./router/router.js\";\nimport { AwaitContext, DataRouterContext, DataRouterStateContext, FetchersContext, LocationContext, NavigationContext, RouteContext, ViewTransitionContext, useIsRSCRouterContext } from \"./context.js\";\nimport { _renderMatches, useActionData, useAsyncValue, useInRouterContext, useLoaderData, useLocation, useMatches, useNavigate, useOutlet, useParams, useRouteError, useRoutes, useRoutesImpl } from \"./hooks.js\";\nimport { warnOnce } from \"./server-runtime/warnings.js\";\nimport * as React$1 from \"react\";\nimport { useOptimistic } from \"react\";\n//#region lib/components.tsx\nconst hydrationRouteProperties = [\"HydrateFallback\", \"hydrateFallbackElement\"];\n/**\n* Create a new {@link DataRouter} that manages the application path using an\n* in-memory [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack. Useful for non-browser environments without a DOM API.\n*\n* Data Routers should not be held in React state. You should create your router\n* once outside of the React tree and pass it to {@link RouterProvider | `<RouterProvider>`}.\n* You can use `patchRoutesOnNavigation` to add additional routes programmatically.\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param routes Application routes\n* @param opts Options\n* @param {MemoryRouterOpts.basename} opts.basename n/a\n* @param {MemoryRouterOpts.dataStrategy} opts.dataStrategy n/a\n* @param {MemoryRouterOpts.future} opts.future n/a\n* @param {MemoryRouterOpts.getContext} opts.getContext n/a\n* @param {MemoryRouterOpts.hydrationData} opts.hydrationData n/a\n* @param {MemoryRouterOpts.initialEntries} opts.initialEntries n/a\n* @param {MemoryRouterOpts.initialIndex} opts.initialIndex n/a\n* @param {MemoryRouterOpts.instrumentations} opts.instrumentations n/a\n* @param {MemoryRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a\n* @returns An initialized {@link DataRouter} to pass to {@link RouterProvider | `<RouterProvider>`}\n*/\nfunction createMemoryRouter(routes, opts) {\n\treturn createRouter({\n\t\tbasename: opts?.basename,\n\t\tgetContext: opts?.getContext,\n\t\tfuture: opts?.future,\n\t\thistory: createMemoryHistory({\n\t\t\tinitialEntries: opts?.initialEntries,\n\t\t\tinitialIndex: opts?.initialIndex\n\t\t}),\n\t\thydrationData: opts?.hydrationData,\n\t\troutes,\n\t\tmapRouteProperties: defaultMapRouteProperties,\n\t\thydrationRouteProperties,\n\t\tdataStrategy: opts?.dataStrategy,\n\t\tpatchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n\t\tinstrumentations: opts?.instrumentations\n\t}).initialize();\n}\nvar Deferred = class {\n\tstatus = \"pending\";\n\tpromise;\n\tresolve;\n\treject;\n\tconstructor() {\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = (value) => {\n\t\t\t\tif (this.status === \"pending\") {\n\t\t\t\t\tthis.status = \"resolved\";\n\t\t\t\t\tresolve(value);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis.reject = (reason) => {\n\t\t\t\tif (this.status === \"pending\") {\n\t\t\t\t\tthis.status = \"rejected\";\n\t\t\t\t\treject(reason);\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n};\n/**\n* Render the UI for the given {@link DataRouter}. This component should\n* typically be at the top of an app's element tree. The router prop should\n* be a single router instance created outside of the React tree. Avoid\n* creating new routers during React renders/re-renders.\n*\n* ```tsx\n* import { createBrowserRouter } from \"react-router\";\n* import { RouterProvider } from \"react-router/dom\";\n* import { createRoot } from \"react-dom/client\";\n*\n* const router = createBrowserRouter(routes);\n* createRoot(document.getElementById(\"root\")).render(\n* <RouterProvider router={router} />\n* );\n* ```\n*\n* <docs-info>Please note that this component is exported both from\n* `react-router` and `react-router/dom` with the only difference being that the\n* latter automatically wires up `react-dom`'s [`flushSync`](https://react.dev/reference/react-dom/flushSync)\n* implementation. You _almost always_ want to use the version from\n* `react-router/dom` unless you're running in a non-DOM environment.</docs-info>\n*\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param props Props\n* @param {RouterProviderProps.flushSync} props.flushSync n/a\n* @param {RouterProviderProps.onError} props.onError n/a\n* @param {RouterProviderProps.router} props.router n/a\n* @param {RouterProviderProps.useTransitions} props.useTransitions n/a\n* @returns React element for the rendered router\n*/\nfunction RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, useTransitions }) {\n\tuseTransitions = useIsRSCRouterContext() || useTransitions;\n\tlet [_state, setStateImpl] = React$1.useState(router.state);\n\tlet [state, setOptimisticState] = useOptimistic(_state);\n\tlet [pendingState, setPendingState] = React$1.useState();\n\tlet [vtContext, setVtContext] = React$1.useState({ isTransitioning: false });\n\tlet [renderDfd, setRenderDfd] = React$1.useState();\n\tlet [transition, setTransition] = React$1.useState();\n\tlet [interruption, setInterruption] = React$1.useState();\n\tlet fetcherData = React$1.useRef(/* @__PURE__ */ new Map());\n\tlet setState = React$1.useCallback((newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {\n\t\tif (newErrors && onError) Object.values(newErrors).forEach((error) => onError(error, {\n\t\t\tlocation: newState.location,\n\t\t\tparams: newState.matches[0]?.params ?? {},\n\t\t\tpattern: getRoutePattern(newState.matches)\n\t\t}));\n\t\tnewState.fetchers.forEach((fetcher, key) => {\n\t\t\tif (fetcher.data !== void 0) fetcherData.current.set(key, fetcher.data);\n\t\t});\n\t\tdeletedFetchers.forEach((key) => fetcherData.current.delete(key));\n\t\twarnOnce(flushSync === false || reactDomFlushSyncImpl != null, \"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\t\tlet isViewTransitionAvailable = router.window != null && router.window.document != null && typeof router.window.document.startViewTransition === \"function\";\n\t\twarnOnce(viewTransitionOpts == null || isViewTransitionAvailable, \"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\t\tif (!viewTransitionOpts || !isViewTransitionAvailable) {\n\t\t\tif (reactDomFlushSyncImpl && flushSync) reactDomFlushSyncImpl(() => setStateImpl(newState));\n\t\t\telse if (useTransitions === false) setStateImpl(newState);\n\t\t\telse React$1.startTransition(() => {\n\t\t\t\tif (useTransitions === true) setOptimisticState((s) => getOptimisticRouterState(s, newState));\n\t\t\t\tsetStateImpl(newState);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (reactDomFlushSyncImpl && flushSync) {\n\t\t\treactDomFlushSyncImpl(() => {\n\t\t\t\tif (transition) {\n\t\t\t\t\trenderDfd?.resolve();\n\t\t\t\t\ttransition.skipTransition();\n\t\t\t\t}\n\t\t\t\tsetVtContext({\n\t\t\t\t\tisTransitioning: true,\n\t\t\t\t\tflushSync: true,\n\t\t\t\t\tcurrentLocation: viewTransitionOpts.currentLocation,\n\t\t\t\t\tnextLocation: viewTransitionOpts.nextLocation\n\t\t\t\t});\n\t\t\t});\n\t\t\tlet t = router.window.document.startViewTransition(() => {\n\t\t\t\treactDomFlushSyncImpl(() => setStateImpl(newState));\n\t\t\t});\n\t\t\tt.finished.finally(() => {\n\t\t\t\treactDomFlushSyncImpl(() => {\n\t\t\t\t\tsetRenderDfd(void 0);\n\t\t\t\t\tsetTransition(void 0);\n\t\t\t\t\tsetPendingState(void 0);\n\t\t\t\t\tsetVtContext({ isTransitioning: false });\n\t\t\t\t});\n\t\t\t});\n\t\t\treactDomFlushSyncImpl(() => setTransition(t));\n\t\t\treturn;\n\t\t}\n\t\tif (transition) {\n\t\t\trenderDfd?.resolve();\n\t\t\ttransition.skipTransition();\n\t\t\tsetInterruption({\n\t\t\t\tstate: newState,\n\t\t\t\tcurrentLocation: viewTransitionOpts.currentLocation,\n\t\t\t\tnextLocation: viewTransitionOpts.nextLocation\n\t\t\t});\n\t\t} else {\n\t\t\tsetPendingState(newState);\n\t\t\tsetVtContext({\n\t\t\t\tisTransitioning: true,\n\t\t\t\tflushSync: false,\n\t\t\t\tcurrentLocation: viewTransitionOpts.currentLocation,\n\t\t\t\tnextLocation: viewTransitionOpts.nextLocation\n\t\t\t});\n\t\t}\n\t}, [\n\t\trouter.window,\n\t\treactDomFlushSyncImpl,\n\t\ttransition,\n\t\trenderDfd,\n\t\tuseTransitions,\n\t\tsetOptimisticState,\n\t\tonError\n\t]);\n\tReact$1.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n\tReact$1.useEffect(() => {\n\t\tif (vtContext.isTransitioning && !vtContext.flushSync) setRenderDfd(new Deferred());\n\t}, [vtContext]);\n\tReact$1.useEffect(() => {\n\t\tif (renderDfd && pendingState && router.window) {\n\t\t\tlet newState = pendingState;\n\t\t\tlet renderPromise = renderDfd.promise;\n\t\t\tlet transition = router.window.document.startViewTransition(async () => {\n\t\t\t\tif (useTransitions === false) setStateImpl(newState);\n\t\t\t\telse React$1.startTransition(() => {\n\t\t\t\t\tif (useTransitions === true) setOptimisticState((s) => getOptimisticRouterState(s, newState));\n\t\t\t\t\tsetStateImpl(newState);\n\t\t\t\t});\n\t\t\t\tawait renderPromise;\n\t\t\t});\n\t\t\ttransition.finished.finally(() => {\n\t\t\t\tsetRenderDfd(void 0);\n\t\t\t\tsetTransition(void 0);\n\t\t\t\tsetPendingState(void 0);\n\t\t\t\tsetVtContext({ isTransitioning: false });\n\t\t\t});\n\t\t\tsetTransition(transition);\n\t\t}\n\t}, [\n\t\tpendingState,\n\t\trenderDfd,\n\t\trouter.window,\n\t\tuseTransitions,\n\t\tsetOptimisticState\n\t]);\n\tReact$1.useEffect(() => {\n\t\tif (renderDfd && pendingState && state.location.key === pendingState.location.key) renderDfd.resolve();\n\t}, [\n\t\trenderDfd,\n\t\ttransition,\n\t\tstate.location,\n\t\tpendingState\n\t]);\n\tReact$1.useEffect(() => {\n\t\tif (!vtContext.isTransitioning && interruption) {\n\t\t\tsetPendingState(interruption.state);\n\t\t\tsetVtContext({\n\t\t\t\tisTransitioning: true,\n\t\t\t\tflushSync: false,\n\t\t\t\tcurrentLocation: interruption.currentLocation,\n\t\t\t\tnextLocation: interruption.nextLocation\n\t\t\t});\n\t\t\tsetInterruption(void 0);\n\t\t}\n\t}, [vtContext.isTransitioning, interruption]);\n\tlet navigator = React$1.useMemo(() => {\n\t\treturn {\n\t\t\tcreateHref: router.createHref,\n\t\t\tencodeLocation: router.encodeLocation,\n\t\t\tgo: (n) => router.navigate(n),\n\t\t\tpush: (to, state, opts) => router.navigate(to, {\n\t\t\t\tstate,\n\t\t\t\tpreventScrollReset: opts?.preventScrollReset\n\t\t\t}),\n\t\t\treplace: (to, state, opts) => router.navigate(to, {\n\t\t\t\treplace: true,\n\t\t\t\tstate,\n\t\t\t\tpreventScrollReset: opts?.preventScrollReset\n\t\t\t})\n\t\t};\n\t}, [router]);\n\tlet basename = router.basename || \"/\";\n\tlet dataRouterContext = React$1.useMemo(() => ({\n\t\trouter,\n\t\tnavigator,\n\t\tstatic: false,\n\t\tbasename,\n\t\tonError\n\t}), [\n\t\trouter,\n\t\tnavigator,\n\t\tbasename,\n\t\tonError\n\t]);\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React$1.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React$1.createElement(FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React$1.createElement(ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tlocation: state.location,\n\t\tnavigationType: state.historyAction,\n\t\tnavigator,\n\t\tuseTransitions\n\t}, /* @__PURE__ */ React$1.createElement(MemoizedDataRoutes, {\n\t\troutes: router.routes,\n\t\tmanifest: router.manifest,\n\t\tfuture: router.future,\n\t\tstate,\n\t\tisStatic: false,\n\t\tonError\n\t})))))), null);\n}\nfunction getOptimisticRouterState(currentState, newState) {\n\treturn {\n\t\t...currentState,\n\t\tnavigation: newState.navigation.state !== \"idle\" ? newState.navigation : currentState.navigation,\n\t\trevalidation: newState.revalidation !== \"idle\" ? newState.revalidation : currentState.revalidation,\n\t\tactionData: newState.navigation.state !== \"submitting\" ? newState.actionData : currentState.actionData,\n\t\tfetchers: newState.fetchers\n\t};\n}\nconst MemoizedDataRoutes = React$1.memo(DataRoutes);\nfunction DataRoutes({ routes, manifest, future, state, isStatic, onError }) {\n\treturn useRoutesImpl(routes, void 0, {\n\t\tmanifest,\n\t\tstate,\n\t\tisStatic,\n\t\tonError,\n\t\tfuture\n\t});\n}\n/**\n* A declarative {@link Router | `<Router>`} that stores all entries in memory.\n*\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {MemoryRouterProps.basename} props.basename n/a\n* @param {MemoryRouterProps.children} props.children n/a\n* @param {MemoryRouterProps.initialEntries} props.initialEntries n/a\n* @param {MemoryRouterProps.initialIndex} props.initialIndex n/a\n* @param {MemoryRouterProps.useTransitions} props.useTransitions n/a\n* @returns A declarative in-memory {@link Router | `<Router>`} for client-side\n* routing.\n*/\nfunction MemoryRouter({ basename, children, initialEntries, initialIndex, useTransitions }) {\n\tlet historyRef = React$1.useRef(null);\n\tif (historyRef.current == null) historyRef.current = createMemoryHistory({\n\t\tinitialEntries,\n\t\tinitialIndex,\n\t\tv5Compat: true\n\t});\n\tlet history = historyRef.current;\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\n/**\n* A component-based version of {@link useNavigate} to use in a\n* [`React.Component` class](https://react.dev/reference/react/Component) where\n* hooks cannot be used.\n*\n* It's recommended to avoid using this component in favor of {@link useNavigate}.\n*\n* @example\n* <Navigate to=\"/tasks\" />\n*\n* @public\n* @category Components\n* @param props Props\n* @param {NavigateProps.relative} props.relative n/a\n* @param {NavigateProps.replace} props.replace n/a\n* @param {NavigateProps.state} props.state n/a\n* @param {NavigateProps.to} props.to n/a\n* @returns {void}\n*\n*/\nfunction Navigate({ to, replace, state, relative }) {\n\tinvariant(useInRouterContext(), `<Navigate> may be used only in the context of a <Router> component.`);\n\tlet { static: isStatic } = React$1.useContext(NavigationContext);\n\twarning(!isStatic, \"<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\tlet { matches } = React$1.useContext(RouteContext);\n\tlet { pathname: locationPathname } = useLocation();\n\tlet navigate = useNavigate();\n\tlet path = resolveTo(to, getResolveToMatches(matches), locationPathname, relative === \"path\");\n\tlet jsonPath = JSON.stringify(path);\n\tReact$1.useEffect(() => {\n\t\tnavigate(JSON.parse(jsonPath), {\n\t\t\treplace,\n\t\t\tstate,\n\t\t\trelative\n\t\t});\n\t}, [\n\t\tnavigate,\n\t\tjsonPath,\n\t\trelative,\n\t\treplace,\n\t\tstate\n\t]);\n\treturn null;\n}\n/**\n* Renders the matching child route of a parent route or nothing if no child\n* route matches.\n*\n* @example\n* import { Outlet } from \"react-router\";\n*\n* export default function SomeParent() {\n* return (\n* <div>\n* <h1>Parent Content</h1>\n* <Outlet />\n* </div>\n* );\n* }\n*\n* @public\n* @category Components\n* @param props Props\n* @param {OutletProps.context} props.context n/a\n* @returns React element for the rendered outlet or `null` if no child route matches.\n*/\nfunction Outlet(props) {\n\treturn useOutlet(props.context);\n}\n/**\n* Configures an element to render when a pattern matches the current location.\n* It must be rendered within a {@link Routes} element. Note that these routes\n* do not participate in data loading, actions, code splitting, or any other\n* route module features.\n*\n* @example\n* // Usually used in a declarative router\n* function App() {\n* return (\n* <BrowserRouter>\n* <Routes>\n* <Route index element={<StepOne />} />\n* <Route path=\"step-2\" element={<StepTwo />} />\n* <Route path=\"step-3\" element={<StepThree />} />\n* </Routes>\n* </BrowserRouter>\n* );\n* }\n*\n* // But can be used with a data router as well if you prefer the JSX notation\n* const routes = createRoutesFromElements(\n* <>\n* <Route index loader={step1Loader} Component={StepOne} />\n* <Route path=\"step-2\" loader={step2Loader} Component={StepTwo} />\n* <Route path=\"step-3\" loader={step3Loader} Component={StepThree} />\n* </>\n* );\n*\n* const router = createBrowserRouter(routes);\n*\n* function App() {\n* return <RouterProvider router={router} />;\n* }\n*\n* @public\n* @category Components\n* @param props Props\n* @param {PathRouteProps.action} props.action n/a\n* @param {PathRouteProps.caseSensitive} props.caseSensitive n/a\n* @param {PathRouteProps.Component} props.Component n/a\n* @param {PathRouteProps.children} props.children n/a\n* @param {PathRouteProps.element} props.element n/a\n* @param {PathRouteProps.ErrorBoundary} props.ErrorBoundary n/a\n* @param {PathRouteProps.errorElement} props.errorElement n/a\n* @param {PathRouteProps.handle} props.handle n/a\n* @param {PathRouteProps.HydrateFallback} props.HydrateFallback n/a\n* @param {PathRouteProps.hydrateFallbackElement} props.hydrateFallbackElement n/a\n* @param {PathRouteProps.id} props.id n/a\n* @param {PathRouteProps.index} props.index n/a\n* @param {PathRouteProps.lazy} props.lazy n/a\n* @param {PathRouteProps.loader} props.loader n/a\n* @param {PathRouteProps.path} props.path n/a\n* @param {PathRouteProps.shouldRevalidate} props.shouldRevalidate n/a\n* @returns {void}\n*/\nfunction Route(props) {\n\tinvariant(false, \"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/**\n* Provides location context for the rest of the app.\n*\n* Note: You usually won't render a `<Router>` directly. Instead, you'll render a\n* router that is more specific to your environment such as a {@link BrowserRouter}\n* in web browsers or a {@link ServerRouter} for server rendering.\n*\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {RouterProps.basename} props.basename n/a\n* @param {RouterProps.children} props.children n/a\n* @param {RouterProps.location} props.location n/a\n* @param {RouterProps.navigationType} props.navigationType n/a\n* @param {RouterProps.navigator} props.navigator n/a\n* @param {RouterProps.static} props.static n/a\n* @param {RouterProps.useTransitions} props.useTransitions n/a\n* @returns React element for the rendered router or `null` if the location does\n* not match the {@link props.basename}\n*/\nfunction Router({ basename: basenameProp = \"/\", children = null, location: locationProp, navigationType = \"POP\", navigator, static: staticProp = false, useTransitions }) {\n\tinvariant(!useInRouterContext(), \"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.\");\n\tlet basename = basenameProp.replace(/^\\/*/, \"/\");\n\tlet navigationContext = React$1.useMemo(() => ({\n\t\tbasename,\n\t\tnavigator,\n\t\tstatic: staticProp,\n\t\tuseTransitions,\n\t\tfuture: {}\n\t}), [\n\t\tbasename,\n\t\tnavigator,\n\t\tstaticProp,\n\t\tuseTransitions\n\t]);\n\tif (typeof locationProp === \"string\") locationProp = parsePath(locationProp);\n\tlet { pathname = \"/\", search = \"\", hash = \"\", state = null, key = \"default\", mask } = locationProp;\n\tlet locationContext = React$1.useMemo(() => {\n\t\tlet trailingPathname = stripBasename(pathname, basename);\n\t\tif (trailingPathname == null) return null;\n\t\treturn {\n\t\t\tlocation: {\n\t\t\t\tpathname: trailingPathname,\n\t\t\t\tsearch,\n\t\t\t\thash,\n\t\t\t\tstate,\n\t\t\t\tkey,\n\t\t\t\tmask\n\t\t\t},\n\t\t\tnavigationType\n\t\t};\n\t}, [\n\t\tbasename,\n\t\tpathname,\n\t\tsearch,\n\t\thash,\n\t\tstate,\n\t\tkey,\n\t\tnavigationType,\n\t\tmask\n\t]);\n\twarning(locationContext != null, `<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\tif (locationContext == null) return null;\n\treturn /* @__PURE__ */ React$1.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React$1.createElement(LocationContext.Provider, {\n\t\tchildren,\n\t\tvalue: locationContext\n\t}));\n}\n/**\n* Renders a branch of {@link Route | `<Route>`s} that best matches the current\n* location. Note that these routes do not participate in [data loading](../../start/framework/route-module#loader),\n* [`action`](../../start/framework/route-module#action), code splitting, or\n* any other [route module](../../start/framework/route-module) features.\n*\n* @example\n* import { Route, Routes } from \"react-router\";\n*\n* <Routes>\n* <Route index element={<StepOne />} />\n* <Route path=\"step-2\" element={<StepTwo />} />\n* <Route path=\"step-3\" element={<StepThree />} />\n* </Routes>\n*\n* @public\n* @category Components\n* @param props Props\n* @param {RoutesProps.children} props.children n/a\n* @param {RoutesProps.location} props.location n/a\n* @returns React element for the rendered routes or `null` if no route matches\n*/\nfunction Routes({ children, location }) {\n\treturn useRoutes(createRoutesFromChildren(children), location);\n}\n/**\n* Used to render promise values with automatic error handling.\n*\n* **Note:** `<Await>` expects to be rendered inside a [`<React.Suspense>`](https://react.dev/reference/react/Suspense)\n*\n* @example\n* import { Await, useLoaderData } from \"react-router\";\n*\n* export async function loader() {\n* // not awaited\n* const reviews = getReviews();\n* // awaited (blocks the transition)\n* const book = await fetch(\"/api/book\").then((res) => res.json());\n* return { book, reviews };\n* }\n*\n* function Book() {\n* const { book, reviews } = useLoaderData();\n* return (\n* <div>\n* <h1>{book.title}</h1>\n* <p>{book.description}</p>\n* <React.Suspense fallback={<ReviewsSkeleton />}>\n* <Await\n* resolve={reviews}\n* errorElement={\n* <div>Could not load reviews 😬</div>\n* }\n* children={(resolvedReviews) => (\n* <Reviews items={resolvedReviews} />\n* )}\n* />\n* </React.Suspense>\n* </div>\n* );\n* }\n*\n* @public\n* @category Components\n* @mode framework\n* @mode data\n* @param props Props\n* @param {AwaitProps.children} props.children n/a\n* @param {AwaitProps.errorElement} props.errorElement n/a\n* @param {AwaitProps.resolve} props.resolve n/a\n* @returns React element for the rendered awaited value\n*/\nfunction Await({ children, errorElement, resolve }) {\n\tlet dataRouterContext = React$1.useContext(DataRouterContext);\n\tlet dataRouterStateContext = React$1.useContext(DataRouterStateContext);\n\tlet onError = React$1.useCallback((error, errorInfo) => {\n\t\tif (dataRouterContext && dataRouterContext.onError && dataRouterStateContext) dataRouterContext.onError(error, {\n\t\t\tlocation: dataRouterStateContext.location,\n\t\t\tparams: dataRouterStateContext.matches[0]?.params || {},\n\t\t\tpattern: getRoutePattern(dataRouterStateContext.matches),\n\t\t\terrorInfo\n\t\t});\n\t}, [dataRouterContext, dataRouterStateContext]);\n\treturn /* @__PURE__ */ React$1.createElement(AwaitErrorBoundary, {\n\t\tresolve,\n\t\terrorElement,\n\t\tonError\n\t}, /* @__PURE__ */ React$1.createElement(ResolveAwait, null, children));\n}\nvar AwaitErrorBoundary = class extends React$1.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { error: null };\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tif (this.props.onError) this.props.onError(error, errorInfo);\n\t\telse console.error(\"<Await> caught the following error during render\", error, errorInfo);\n\t}\n\trender() {\n\t\tlet { children, errorElement, resolve } = this.props;\n\t\tlet promise = null;\n\t\tlet status = 0;\n\t\tif (!(resolve instanceof Promise)) {\n\t\t\tstatus = 1;\n\t\t\tpromise = Promise.resolve();\n\t\t\tObject.defineProperty(promise, \"_tracked\", { get: () => true });\n\t\t\tObject.defineProperty(promise, \"_data\", { get: () => resolve });\n\t\t} else if (this.state.error) {\n\t\t\tstatus = 2;\n\t\t\tlet renderError = this.state.error;\n\t\t\tpromise = Promise.reject().catch(() => {});\n\t\t\tObject.defineProperty(promise, \"_tracked\", { get: () => true });\n\t\t\tObject.defineProperty(promise, \"_error\", { get: () => renderError });\n\t\t} else if (resolve._tracked) {\n\t\t\tpromise = resolve;\n\t\t\tstatus = \"_error\" in promise ? 2 : \"_data\" in promise ? 1 : 0;\n\t\t} else {\n\t\t\tstatus = 0;\n\t\t\tObject.defineProperty(resolve, \"_tracked\", { get: () => true });\n\t\t\tpromise = resolve.then((data) => Object.defineProperty(resolve, \"_data\", { get: () => data }), (error) => {\n\t\t\t\tthis.props.onError?.(error);\n\t\t\t\tObject.defineProperty(resolve, \"_error\", { get: () => error });\n\t\t\t});\n\t\t}\n\t\tif (status === 2 && !errorElement) throw promise._error;\n\t\tif (status === 2) return /* @__PURE__ */ React$1.createElement(AwaitContext.Provider, {\n\t\t\tvalue: promise,\n\t\t\tchildren: errorElement\n\t\t});\n\t\tif (status === 1) return /* @__PURE__ */ React$1.createElement(AwaitContext.Provider, {\n\t\t\tvalue: promise,\n\t\t\tchildren\n\t\t});\n\t\tthrow promise;\n\t}\n};\nfunction ResolveAwait({ children }) {\n\tlet data = useAsyncValue();\n\tlet toRender = typeof children === \"function\" ? children(data) : children;\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, toRender);\n}\n/**\n* Creates a route config from a React \"children\" object, which is usually\n* either a `<Route>` element or an array of them. Used internally by\n* `<Routes>` to create a route config from its children.\n*\n* @category Utils\n* @mode data\n* @param children The React children to convert into a route config\n* @param parentPath The path of the parent route, used to generate unique IDs.\n* @returns An array of {@link RouteObject}s that can be used with a {@link DataRouter}\n*/\nfunction createRoutesFromChildren(children, parentPath = []) {\n\tlet routes = [];\n\tReact$1.Children.forEach(children, (element, index) => {\n\t\tif (!React$1.isValidElement(element)) return;\n\t\tlet treePath = [...parentPath, index];\n\t\tif (element.type === React$1.Fragment) {\n\t\t\troutes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));\n\t\t\treturn;\n\t\t}\n\t\tinvariant(element.type === Route, `[${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\t\tlet props = element.props;\n\t\tinvariant(!props.index || !props.children, \"An index route cannot have child routes.\");\n\t\tlet route = {\n\t\t\tid: props.id || treePath.join(\"-\"),\n\t\t\tcaseSensitive: props.caseSensitive,\n\t\t\telement: props.element,\n\t\t\tComponent: props.Component,\n\t\t\tindex: props.index,\n\t\t\tpath: props.path,\n\t\t\tmiddleware: props.middleware,\n\t\t\tloader: props.loader,\n\t\t\taction: props.action,\n\t\t\thydrateFallbackElement: props.hydrateFallbackElement,\n\t\t\tHydrateFallback: props.HydrateFallback,\n\t\t\terrorElement: props.errorElement,\n\t\t\tErrorBoundary: props.ErrorBoundary,\n\t\t\tshouldRevalidate: props.shouldRevalidate,\n\t\t\thandle: props.handle,\n\t\t\tlazy: props.lazy\n\t\t};\n\t\tif (props.children) route.children = createRoutesFromChildren(props.children, treePath);\n\t\troutes.push(route);\n\t});\n\treturn routes;\n}\n/**\n* Create route objects from JSX elements instead of arrays of objects.\n*\n* @example\n* const routes = createRoutesFromElements(\n* <>\n* <Route index loader={step1Loader} Component={StepOne} />\n* <Route path=\"step-2\" loader={step2Loader} Component={StepTwo} />\n* <Route path=\"step-3\" loader={step3Loader} Component={StepThree} />\n* </>\n* );\n*\n* const router = createBrowserRouter(routes);\n*\n* function App() {\n* return <RouterProvider router={router} />;\n* }\n*\n* @name createRoutesFromElements\n* @public\n* @category Utils\n* @mode data\n* @param children The React children to convert into a route config\n* @param parentPath The path of the parent route, used to generate unique IDs.\n* This is used for internal recursion and is not intended to be used by the\n* application developer.\n* @returns An array of {@link RouteObject}s that can be used with a {@link DataRouter}\n*/\nconst createRoutesFromElements = createRoutesFromChildren;\n/**\n* Renders the result of {@link matchRoutes} into a React element.\n*\n* @public\n* @category Utils\n* @param matches The array of {@link RouteMatch | route matches} to render\n* @returns A React element that renders the matched routes or `null` if no matches\n*/\nfunction renderMatches(matches) {\n\treturn _renderMatches(matches);\n}\nfunction useRouteComponentProps() {\n\treturn {\n\t\tparams: useParams(),\n\t\tloaderData: useLoaderData(),\n\t\tactionData: useActionData(),\n\t\tmatches: useMatches()\n\t};\n}\nfunction WithComponentProps({ children }) {\n\tconst props = useRouteComponentProps();\n\treturn React$1.cloneElement(children, props);\n}\nfunction withComponentProps(Component) {\n\treturn function WithComponentProps() {\n\t\tconst props = useRouteComponentProps();\n\t\treturn React$1.createElement(Component, props);\n\t};\n}\nfunction useHydrateFallbackProps() {\n\treturn {\n\t\tparams: useParams(),\n\t\tloaderData: useLoaderData(),\n\t\tactionData: useActionData()\n\t};\n}\nfunction WithHydrateFallbackProps({ children }) {\n\tconst props = useHydrateFallbackProps();\n\treturn React$1.cloneElement(children, props);\n}\nfunction withHydrateFallbackProps(HydrateFallback) {\n\treturn function WithHydrateFallbackProps() {\n\t\tconst props = useHydrateFallbackProps();\n\t\treturn React$1.createElement(HydrateFallback, props);\n\t};\n}\nfunction useErrorBoundaryProps() {\n\treturn {\n\t\tparams: useParams(),\n\t\tloaderData: useLoaderData(),\n\t\tactionData: useActionData(),\n\t\terror: useRouteError()\n\t};\n}\nfunction WithErrorBoundaryProps({ children }) {\n\tconst props = useErrorBoundaryProps();\n\treturn React$1.cloneElement(children, props);\n}\nfunction withErrorBoundaryProps(ErrorBoundary) {\n\treturn function WithErrorBoundaryProps() {\n\t\tconst props = useErrorBoundaryProps();\n\t\treturn React$1.createElement(ErrorBoundary, props);\n\t};\n}\n//#endregion\nexport { Await, DataRoutes, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, WithComponentProps, WithErrorBoundaryProps, WithHydrateFallbackProps, createMemoryRouter, createRoutesFromChildren, createRoutesFromElements, hydrationRouteProperties, renderMatches, withComponentProps, withErrorBoundaryProps, withHydrateFallbackProps };\n","/**\n * react-router v8.2.0\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 */\nimport { warning } from \"../router/history.js\";\nimport { stripBasename } from \"../router/utils.js\";\nconst defaultEncType = \"application/x-www-form-urlencoded\";\nfunction isHtmlElement(object) {\n\treturn typeof HTMLElement !== \"undefined\" && object instanceof HTMLElement;\n}\nfunction isButtonElement(object) {\n\treturn isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\nfunction isFormElement(object) {\n\treturn isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\nfunction isInputElement(object) {\n\treturn isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\nfunction isModifiedEvent(event) {\n\treturn !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nfunction shouldProcessLinkClick(event, target) {\n\treturn event.button === 0 && (!target || target === \"_self\") && !isModifiedEvent(event);\n}\n/**\nCreates a URLSearchParams object using the given initializer.\n\nThis is identical to `new URLSearchParams(init)` except it also\nsupports arrays as values in the object form of the initializer\ninstead of just strings. This is convenient when you need multiple\nvalues for a given key, but don't want to use an array initializer.\n\nFor example, instead of:\n\n```tsx\nlet searchParams = new URLSearchParams([\n['sort', 'name'],\n['sort', 'price']\n]);\n```\nyou can do:\n\n```\nlet searchParams = createSearchParams({\nsort: ['name', 'price']\n});\n```\n\n@category Utils\n*/\nfunction createSearchParams(init = \"\") {\n\treturn new URLSearchParams(typeof init === \"string\" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {\n\t\tlet value = init[key];\n\t\treturn memo.concat(Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]);\n\t}, []));\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n\tlet searchParams = createSearchParams(locationSearch);\n\tif (defaultSearchParams) defaultSearchParams.forEach((_, key) => {\n\t\tif (!searchParams.has(key)) defaultSearchParams.getAll(key).forEach((value) => {\n\t\t\tsearchParams.append(key, value);\n\t\t});\n\t});\n\treturn searchParams;\n}\nlet _formDataSupportsSubmitter = null;\nfunction isFormDataSubmitterSupported() {\n\tif (_formDataSupportsSubmitter === null) try {\n\t\tnew FormData(document.createElement(\"form\"), 0);\n\t\t_formDataSupportsSubmitter = false;\n\t} catch (e) {\n\t\t_formDataSupportsSubmitter = true;\n\t}\n\treturn _formDataSupportsSubmitter;\n}\nconst supportedFormEncTypes = new Set([\n\t\"application/x-www-form-urlencoded\",\n\t\"multipart/form-data\",\n\t\"text/plain\"\n]);\nfunction getFormEncType(encType) {\n\tif (encType != null && !supportedFormEncTypes.has(encType)) {\n\t\twarning(false, `\"${encType}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` and will default to \"${defaultEncType}\"`);\n\t\treturn null;\n\t}\n\treturn encType;\n}\nfunction getFormSubmissionInfo(target, basename) {\n\tlet method;\n\tlet action;\n\tlet encType;\n\tlet formData;\n\tlet body;\n\tif (isFormElement(target)) {\n\t\tlet attr = target.getAttribute(\"action\");\n\t\taction = attr ? stripBasename(attr, basename) : null;\n\t\tmethod = target.getAttribute(\"method\") || \"get\";\n\t\tencType = getFormEncType(target.getAttribute(\"enctype\")) || defaultEncType;\n\t\tformData = new FormData(target);\n\t} else if (isButtonElement(target) || isInputElement(target) && (target.type === \"submit\" || target.type === \"image\")) {\n\t\tlet form = target.form;\n\t\tif (form == null) throw new Error(`Cannot submit a <button> or <input type=\"submit\"> without a <form>`);\n\t\tlet attr = target.getAttribute(\"formaction\") || form.getAttribute(\"action\");\n\t\taction = attr ? stripBasename(attr, basename) : null;\n\t\tmethod = target.getAttribute(\"formmethod\") || form.getAttribute(\"method\") || \"get\";\n\t\tencType = getFormEncType(target.getAttribute(\"formenctype\")) || getFormEncType(form.getAttribute(\"enctype\")) || defaultEncType;\n\t\tformData = new FormData(form, target);\n\t\tif (!isFormDataSubmitterSupported()) {\n\t\t\tlet { name, type, value } = target;\n\t\t\tif (type === \"image\") {\n\t\t\t\tlet prefix = name ? `${name}.` : \"\";\n\t\t\t\tformData.append(`${prefix}x`, \"0\");\n\t\t\t\tformData.append(`${prefix}y`, \"0\");\n\t\t\t} else if (name) formData.append(name, value);\n\t\t}\n\t} else if (isHtmlElement(target)) throw new Error(\"Cannot submit element that is not <form>, <button>, or <input type=\\\"submit|image\\\">\");\n\telse {\n\t\tmethod = \"get\";\n\t\taction = null;\n\t\tencType = defaultEncType;\n\t\tbody = target;\n\t}\n\tif (formData && encType === \"text/plain\") {\n\t\tbody = formData;\n\t\tformData = void 0;\n\t}\n\treturn {\n\t\taction,\n\t\tmethod: method.toLowerCase(),\n\t\tencType,\n\t\tformData,\n\t\tbody\n\t};\n}\n//#endregion\nexport { createSearchParams, getFormSubmissionInfo, getSearchParamsForLocation, shouldProcessLinkClick };\n","/**\n * react-router v8.2.0\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 */\n//#region lib/dom/ssr/invariant.ts\nfunction invariant(value, message) {\n\tif (value === false || value === null || typeof value === \"undefined\") throw new Error(message);\n}\n//#endregion\nexport { invariant as default };\n","/**\n * react-router v8.2.0\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 */\n//#region lib/dom/ssr/markup.ts\nconst ESCAPE_LOOKUP = {\n\t\"&\": \"\\\\u0026\",\n\t\">\": \"\\\\u003e\",\n\t\"<\": \"\\\\u003c\",\n\t\"\\u2028\": \"\\\\u2028\",\n\t\"\\u2029\": \"\\\\u2029\"\n};\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction escapeHtml(html) {\n\treturn html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);\n}\n//#endregion\nexport { escapeHtml };\n","/**\n * react-router v8.2.0\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 */\nimport { ErrorResponseImpl, SUPPORTED_ERROR_TYPES, data, isRouteErrorResponse, redirect } from \"../../router/utils.js\";\nimport { isDataWithResponseInit, isResponse } from \"../../router/router.js\";\nimport invariant from \"./invariant.js\";\nimport { escapeHtml } from \"./markup.js\";\nimport { decode } from \"../../../vendor/turbo-stream-v2/turbo-stream.js\";\nimport { createRequestInit } from \"./data.js\";\nimport * as React$1 from \"react\";\n//#region lib/dom/ssr/single-fetch.tsx\nconst SingleFetchRedirectSymbol = Symbol(\"SingleFetchRedirect\");\nvar SingleFetchNoResultError = class extends Error {};\nconst NO_BODY_STATUS_CODES = new Set([\n\t100,\n\t101,\n\t204,\n\t205\n]);\nfunction StreamTransfer({ context, identifier, reader, textDecoder, nonce }) {\n\tif (!context.renderMeta || !context.renderMeta.didRenderScripts) return null;\n\tif (!context.renderMeta.streamCache) context.renderMeta.streamCache = {};\n\tlet { streamCache } = context.renderMeta;\n\tlet promise = streamCache[identifier];\n\tif (!promise) promise = streamCache[identifier] = reader.read().then((result) => {\n\t\tstreamCache[identifier].result = {\n\t\t\tdone: result.done,\n\t\t\tvalue: textDecoder.decode(result.value, { stream: true })\n\t\t};\n\t}).catch((e) => {\n\t\tstreamCache[identifier].error = e;\n\t});\n\tif (promise.error) throw promise.error;\n\tif (promise.result === void 0) throw promise;\n\tlet { done, value } = promise.result;\n\tlet scriptTag = value ? /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\tnonce,\n\t\tdangerouslySetInnerHTML: { __html: `window.__reactRouterContext.streamController.enqueue(${escapeHtml(JSON.stringify(value))});` }\n\t}) : null;\n\tif (done) return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, scriptTag, /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\tnonce,\n\t\tdangerouslySetInnerHTML: { __html: `window.__reactRouterContext.streamController.close();` }\n\t}));\n\telse return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, scriptTag, /* @__PURE__ */ React$1.createElement(React$1.Suspense, null, /* @__PURE__ */ React$1.createElement(StreamTransfer, {\n\t\tcontext,\n\t\tidentifier: identifier + 1,\n\t\treader,\n\t\ttextDecoder,\n\t\tnonce\n\t})));\n}\nfunction getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules, ssr) {\n\tlet dataStrategy = getSingleFetchDataStrategyImpl(getRouter, (match) => {\n\t\tlet manifestRoute = manifest.routes[match.route.id];\n\t\tinvariant(manifestRoute, \"Route not found in manifest\");\n\t\treturn {\n\t\t\thasLoader: manifestRoute.hasLoader,\n\t\t\thasClientLoader: manifestRoute.hasClientLoader\n\t\t};\n\t}, fetchAndDecodeViaTurboStream, ssr);\n\treturn async (args) => args.runClientMiddleware(dataStrategy);\n}\nfunction getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, shouldAllowOptOut = () => true) {\n\treturn async (args) => {\n\t\tlet { request, matches, fetcherKey } = args;\n\t\tlet router = getRouter();\n\t\tif (request.method !== \"GET\") return singleFetchActionStrategy(args, fetchAndDecode);\n\t\tlet foundRevalidatingServerLoader = matches.some((m) => {\n\t\t\tlet { hasLoader, hasClientLoader } = getRouteInfo(m);\n\t\t\treturn m.shouldCallHandler() && hasLoader && !hasClientLoader;\n\t\t});\n\t\tif (!ssr && !foundRevalidatingServerLoader) return nonSsrStrategy(args, getRouteInfo, fetchAndDecode);\n\t\tif (fetcherKey) return singleFetchLoaderFetcherStrategy(args, fetchAndDecode);\n\t\treturn singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, fetchAndDecode, ssr, shouldAllowOptOut);\n\t};\n}\nasync function singleFetchActionStrategy(args, fetchAndDecode) {\n\tlet actionMatch = args.matches.find((m) => m.shouldCallHandler());\n\tinvariant(actionMatch, \"No action match found\");\n\tlet actionStatus = void 0;\n\tlet result = await actionMatch.resolve(async (handler) => {\n\t\treturn await handler(async () => {\n\t\t\tlet { data, status } = await fetchAndDecode(args, [actionMatch.route.id]);\n\t\t\tactionStatus = status;\n\t\t\treturn unwrapSingleFetchResult(data, actionMatch.route.id);\n\t\t});\n\t});\n\tif (isResponse(result.result) || isRouteErrorResponse(result.result) || isDataWithResponseInit(result.result)) return { [actionMatch.route.id]: result };\n\treturn { [actionMatch.route.id]: {\n\t\ttype: result.type,\n\t\tresult: data(result.result, actionStatus)\n\t} };\n}\nasync function nonSsrStrategy(args, getRouteInfo, fetchAndDecode) {\n\tlet matchesToLoad = args.matches.filter((m) => m.shouldCallHandler());\n\tlet results = {};\n\tawait Promise.all(matchesToLoad.map((m) => m.resolve(async (handler) => {\n\t\ttry {\n\t\t\tlet { hasClientLoader } = getRouteInfo(m);\n\t\t\tlet routeId = m.route.id;\n\t\t\tlet result = hasClientLoader ? await handler(async () => {\n\t\t\t\tlet { data } = await fetchAndDecode(args, [routeId]);\n\t\t\t\treturn unwrapSingleFetchResult(data, routeId);\n\t\t\t}) : await handler();\n\t\t\tresults[m.route.id] = {\n\t\t\t\ttype: \"data\",\n\t\t\t\tresult\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tresults[m.route.id] = {\n\t\t\t\ttype: \"error\",\n\t\t\t\tresult: e\n\t\t\t};\n\t\t}\n\t})));\n\treturn results;\n}\nasync function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, fetchAndDecode, ssr, shouldAllowOptOut = () => true) {\n\tlet routesParams = /* @__PURE__ */ new Set();\n\tlet foundOptOutRoute = false;\n\tlet routeDfds = args.matches.map(() => createDeferred());\n\tlet singleFetchDfd = createDeferred();\n\tlet results = {};\n\tlet resolvePromise = Promise.all(args.matches.map(async (m, i) => m.resolve(async (handler) => {\n\t\trouteDfds[i].resolve();\n\t\tlet routeId = m.route.id;\n\t\tlet { hasLoader, hasClientLoader } = getRouteInfo(m);\n\t\tlet defaultShouldRevalidate = !m.shouldRevalidateArgs || m.shouldRevalidateArgs.actionStatus == null || m.shouldRevalidateArgs.actionStatus < 400;\n\t\tif (!m.shouldCallHandler(defaultShouldRevalidate)) {\n\t\t\tfoundOptOutRoute ||= m.shouldRevalidateArgs != null && hasLoader;\n\t\t\treturn;\n\t\t}\n\t\tif (shouldAllowOptOut(m) && hasClientLoader) {\n\t\t\tif (hasLoader) foundOptOutRoute = true;\n\t\t\ttry {\n\t\t\t\tresults[routeId] = {\n\t\t\t\t\ttype: \"data\",\n\t\t\t\t\tresult: await handler(async () => {\n\t\t\t\t\t\tlet { data } = await fetchAndDecode(args, [routeId]);\n\t\t\t\t\t\treturn unwrapSingleFetchResult(data, routeId);\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t} catch (e) {\n\t\t\t\tresults[routeId] = {\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tresult: e\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (hasLoader) routesParams.add(routeId);\n\t\ttry {\n\t\t\tresults[routeId] = {\n\t\t\t\ttype: \"data\",\n\t\t\t\tresult: await handler(async () => {\n\t\t\t\t\treturn unwrapSingleFetchResult(await singleFetchDfd.promise, routeId);\n\t\t\t\t})\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tresults[routeId] = {\n\t\t\t\ttype: \"error\",\n\t\t\t\tresult: e\n\t\t\t};\n\t\t}\n\t})));\n\tawait Promise.all(routeDfds.map((d) => d.promise));\n\tif ((!router.state.initialized && router.state.navigation.state === \"idle\" || routesParams.size === 0) && !window.__reactRouterHdrActive) singleFetchDfd.resolve({ routes: {} });\n\telse {\n\t\tlet targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;\n\t\ttry {\n\t\t\tlet data = await fetchAndDecode(args, targetRoutes);\n\t\t\tsingleFetchDfd.resolve(data.data);\n\t\t} catch (e) {\n\t\t\tsingleFetchDfd.reject(e);\n\t\t}\n\t}\n\tawait resolvePromise;\n\tawait bubbleMiddlewareErrors(singleFetchDfd.promise, args.matches, routesParams, results);\n\treturn results;\n}\nasync function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams, results) {\n\ttry {\n\t\tlet middlewareError;\n\t\tlet fetchedData = await singleFetchPromise;\n\t\tif (\"routes\" in fetchedData) {\n\t\t\tfor (let match of matches) if (match.route.id in fetchedData.routes) {\n\t\t\t\tlet routeResult = fetchedData.routes[match.route.id];\n\t\t\t\tif (\"error\" in routeResult) {\n\t\t\t\t\tmiddlewareError = routeResult.error;\n\t\t\t\t\tif (results[match.route.id]?.result == null) results[match.route.id] = {\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\tresult: middlewareError\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (middlewareError !== void 0) Array.from(routesParams.values()).forEach((routeId) => {\n\t\t\tif (results[routeId].result instanceof SingleFetchNoResultError) results[routeId].result = middlewareError;\n\t\t});\n\t} catch (e) {}\n}\nasync function singleFetchLoaderFetcherStrategy(args, fetchAndDecode) {\n\tlet fetcherMatch = args.matches.find((m) => m.shouldCallHandler());\n\tinvariant(fetcherMatch, \"No fetcher match found\");\n\tlet routeId = fetcherMatch.route.id;\n\tlet result = await fetcherMatch.resolve(async (handler) => handler(async () => {\n\t\tlet { data } = await fetchAndDecode(args, [routeId]);\n\t\treturn unwrapSingleFetchResult(data, routeId);\n\t}));\n\treturn { [fetcherMatch.route.id]: result };\n}\nfunction stripIndexParam(url) {\n\tlet indexValues = url.searchParams.getAll(\"index\");\n\turl.searchParams.delete(\"index\");\n\tlet indexValuesToKeep = [];\n\tfor (let indexValue of indexValues) if (indexValue) indexValuesToKeep.push(indexValue);\n\tfor (let toKeep of indexValuesToKeep) url.searchParams.append(\"index\", toKeep);\n\treturn url;\n}\nfunction singleFetchUrl(reqUrl, extension) {\n\tlet url = typeof reqUrl === \"string\" ? new URL(reqUrl, typeof window === \"undefined\" ? \"server://singlefetch/\" : window.location.origin) : reqUrl;\n\tif (url.pathname.endsWith(\"/\")) url.pathname = `${url.pathname}_.${extension}`;\n\telse url.pathname = `${url.pathname}.${extension}`;\n\treturn url;\n}\nasync function fetchAndDecodeViaTurboStream(args, targetRoutes) {\n\tlet { request } = args;\n\tlet url = singleFetchUrl(request.url, \"data\");\n\tif (request.method === \"GET\") {\n\t\turl = stripIndexParam(url);\n\t\tif (targetRoutes) url.searchParams.set(\"_routes\", targetRoutes.join(\",\"));\n\t}\n\tlet res = await fetch(url, await createRequestInit(request));\n\tif (res.status >= 400 && !res.headers.has(\"X-Remix-Response\")) throw new ErrorResponseImpl(res.status, res.statusText, await res.text());\n\tif (res.status === 204 && res.headers.has(\"X-Remix-Redirect\")) return {\n\t\tstatus: 202,\n\t\tdata: { redirect: {\n\t\t\tredirect: res.headers.get(\"X-Remix-Redirect\"),\n\t\t\tstatus: Number(res.headers.get(\"X-Remix-Status\") || \"302\"),\n\t\t\trevalidate: res.headers.get(\"X-Remix-Revalidate\") === \"true\",\n\t\t\treload: res.headers.get(\"X-Remix-Reload-Document\") === \"true\",\n\t\t\treplace: res.headers.get(\"X-Remix-Replace\") === \"true\"\n\t\t} }\n\t};\n\tif (NO_BODY_STATUS_CODES.has(res.status)) {\n\t\tlet routes = {};\n\t\tif (targetRoutes && request.method !== \"GET\") routes[targetRoutes[0]] = { data: void 0 };\n\t\treturn {\n\t\t\tstatus: res.status,\n\t\t\tdata: { routes }\n\t\t};\n\t}\n\tinvariant(res.body, \"No response body to decode\");\n\ttry {\n\t\tlet decoded = await decodeViaTurboStream(res.body, window);\n\t\tlet data;\n\t\tif (request.method === \"GET\") {\n\t\t\tlet typed = decoded.value;\n\t\t\tif (SingleFetchRedirectSymbol in typed) data = { redirect: typed[SingleFetchRedirectSymbol] };\n\t\t\telse data = { routes: typed };\n\t\t} else {\n\t\t\tlet typed = decoded.value;\n\t\t\tlet routeId = targetRoutes?.[0];\n\t\t\tinvariant(routeId, \"No routeId found for single fetch call decoding\");\n\t\t\tif (\"redirect\" in typed) data = { redirect: typed };\n\t\t\telse data = { routes: { [routeId]: typed } };\n\t\t}\n\t\treturn {\n\t\t\tstatus: res.status,\n\t\t\tdata\n\t\t};\n\t} catch (e) {\n\t\tthrow new Error(\"Unable to decode turbo-stream response\");\n\t}\n}\nfunction decodeViaTurboStream(body, global) {\n\treturn decode(body, { plugins: [(type, ...rest) => {\n\t\tif (type === \"SanitizedError\") {\n\t\t\tlet [name, message, stack] = rest;\n\t\t\tlet Constructor = Error;\n\t\t\tif (name && SUPPORTED_ERROR_TYPES.includes(name) && name in global && typeof global[name] === \"function\") Constructor = global[name];\n\t\t\tlet error = new Constructor(message);\n\t\t\terror.stack = stack;\n\t\t\treturn { value: error };\n\t\t}\n\t\tif (type === \"ErrorResponse\") {\n\t\t\tlet [data, status, statusText] = rest;\n\t\t\treturn { value: new ErrorResponseImpl(status, statusText, data) };\n\t\t}\n\t\tif (type === \"SingleFetchRedirect\") return { value: { [SingleFetchRedirectSymbol]: rest[0] } };\n\t\tif (type === \"SingleFetchClassInstance\") return { value: rest[0] };\n\t\tif (type === \"SingleFetchFallback\") return { value: void 0 };\n\t}] });\n}\nfunction unwrapSingleFetchResult(result, routeId) {\n\tif (\"redirect\" in result) {\n\t\tlet { redirect: location, revalidate, reload, replace, status } = result.redirect;\n\t\tthrow redirect(location, {\n\t\t\tstatus,\n\t\t\theaders: {\n\t\t\t\t...revalidate ? { \"X-Remix-Revalidate\": \"yes\" } : null,\n\t\t\t\t...reload ? { \"X-Remix-Reload-Document\": \"yes\" } : null,\n\t\t\t\t...replace ? { \"X-Remix-Replace\": \"yes\" } : null\n\t\t\t}\n\t\t});\n\t}\n\tlet routeResult = result.routes[routeId];\n\tif (routeResult == null) throw new SingleFetchNoResultError(`No result found for routeId \"${routeId}\"`);\n\telse if (\"error\" in routeResult) throw routeResult.error;\n\telse if (\"data\" in routeResult) return routeResult.data;\n\telse throw new Error(`Invalid response found for routeId \"${routeId}\"`);\n}\nfunction createDeferred() {\n\tlet resolve;\n\tlet reject;\n\tlet promise = new Promise((res, rej) => {\n\t\tresolve = async (val) => {\n\t\t\tres(val);\n\t\t\ttry {\n\t\t\t\tawait promise;\n\t\t\t} catch (e) {}\n\t\t};\n\t\treject = async (error) => {\n\t\t\trej(error);\n\t\t\ttry {\n\t\t\t\tawait promise;\n\t\t\t} catch (e) {}\n\t\t};\n\t});\n\treturn {\n\t\tpromise,\n\t\tresolve,\n\t\treject\n\t};\n}\n//#endregion\nexport { NO_BODY_STATUS_CODES, SingleFetchRedirectSymbol, StreamTransfer, decodeViaTurboStream, getSingleFetchDataStrategyImpl, getTurboStreamSingleFetchDataStrategy, singleFetchUrl, stripIndexParam };\n","/**\n * react-router v8.2.0\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 */\n//#region lib/dom/ssr/routeModules.ts\nasync function loadRouteModule(route, routeModulesCache) {\n\tif (route.id in routeModulesCache) return routeModulesCache[route.id];\n\ttry {\n\t\tlet routeModule = await import(\n\t\t\t/* @vite-ignore */\n\t\t\t/* webpackIgnore: true */\n\t\t\troute.module\n);\n\t\trouteModulesCache[route.id] = routeModule;\n\t\treturn routeModule;\n\t} catch (error) {\n\t\tconsole.error(`Error loading route module \\`${route.module}\\`, reloading page...`);\n\t\tconsole.error(error);\n\t\tif (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && import.meta.hot) throw error;\n\t\twindow.location.reload();\n\t\treturn new Promise(() => {});\n\t}\n}\n//#endregion\nexport { loadRouteModule };\n","/**\n * react-router v8.2.0\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 */\nimport { loadRouteModule } from \"./routeModules.js\";\n//#region lib/dom/ssr/links.ts\n/**\n* Gets all the links for a set of matches. The modules are assumed to have been\n* loaded already.\n*/\nfunction getKeyedLinksForMatches(matches, routeModules, manifest) {\n\treturn dedupeLinkDescriptors(matches.map((match) => {\n\t\tlet module = routeModules[match.route.id];\n\t\tlet route = manifest.routes[match.route.id];\n\t\treturn [route && route.css ? route.css.map((href) => ({\n\t\t\trel: \"stylesheet\",\n\t\t\thref\n\t\t})) : [], module?.links?.() || []];\n\t}).flat(2), getModuleLinkHrefs(matches, manifest));\n}\nfunction getRouteCssDescriptors(route) {\n\tif (!route.css) return [];\n\treturn route.css.map((href) => ({\n\t\trel: \"stylesheet\",\n\t\thref\n\t}));\n}\nasync function prefetchRouteCss(route) {\n\tif (!route.css) return;\n\tlet descriptors = getRouteCssDescriptors(route);\n\tawait Promise.all(descriptors.map(prefetchStyleLink));\n}\nasync function prefetchStyleLinks(route, routeModule) {\n\tif (!route.css && !routeModule.links || !isPreloadSupported()) return;\n\tlet descriptors = [];\n\tif (route.css) descriptors.push(...getRouteCssDescriptors(route));\n\tif (routeModule.links) descriptors.push(...routeModule.links());\n\tif (descriptors.length === 0) return;\n\tlet styleLinks = [];\n\tfor (let descriptor of descriptors) if (!isPageLinkDescriptor(descriptor) && descriptor.rel === \"stylesheet\") styleLinks.push({\n\t\t...descriptor,\n\t\trel: \"preload\",\n\t\tas: \"style\"\n\t});\n\tawait Promise.all(styleLinks.map(prefetchStyleLink));\n}\nasync function prefetchStyleLink(descriptor) {\n\treturn new Promise((resolve) => {\n\t\tif (descriptor.media && !window.matchMedia(descriptor.media).matches || document.querySelector(`link[rel=\"stylesheet\"][href=\"${descriptor.href}\"]`)) return resolve();\n\t\tlet link = document.createElement(\"link\");\n\t\tObject.assign(link, descriptor);\n\t\tfunction removeLink() {\n\t\t\tif (document.head.contains(link)) document.head.removeChild(link);\n\t\t}\n\t\tlink.onload = () => {\n\t\t\tremoveLink();\n\t\t\tresolve();\n\t\t};\n\t\tlink.onerror = () => {\n\t\t\tremoveLink();\n\t\t\tresolve();\n\t\t};\n\t\tdocument.head.appendChild(link);\n\t});\n}\nfunction isPageLinkDescriptor(object) {\n\treturn object != null && typeof object.page === \"string\";\n}\nfunction isHtmlLinkDescriptor(object) {\n\tif (object == null) return false;\n\tif (object.href == null) return object.rel === \"preload\" && typeof object.imageSrcSet === \"string\" && typeof object.imageSizes === \"string\";\n\treturn typeof object.rel === \"string\" && typeof object.href === \"string\";\n}\nasync function getKeyedPrefetchLinks(matches, manifest, routeModules) {\n\treturn dedupeLinkDescriptors((await Promise.all(matches.map(async (match) => {\n\t\tlet route = manifest.routes[match.route.id];\n\t\tif (route) {\n\t\t\tlet mod = await loadRouteModule(route, routeModules);\n\t\t\treturn mod.links ? mod.links() : [];\n\t\t}\n\t\treturn [];\n\t}))).flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === \"stylesheet\" || link.rel === \"preload\").map((link) => link.rel === \"stylesheet\" ? {\n\t\t...link,\n\t\trel: \"prefetch\",\n\t\tas: \"style\"\n\t} : {\n\t\t...link,\n\t\trel: \"prefetch\"\n\t}));\n}\nfunction getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {\n\tlet isNew = (match, index) => {\n\t\tif (!currentMatches[index]) return true;\n\t\treturn match.route.id !== currentMatches[index].route.id;\n\t};\n\tlet matchPathChanged = (match, index) => {\n\t\treturn currentMatches[index].pathname !== match.pathname || currentMatches[index].route.path?.endsWith(\"*\") && currentMatches[index].params[\"*\"] !== match.params[\"*\"];\n\t};\n\tif (mode === \"assets\") return nextMatches.filter((match, index) => isNew(match, index) || matchPathChanged(match, index));\n\tif (mode === \"data\") return nextMatches.filter((match, index) => {\n\t\tlet manifestRoute = manifest.routes[match.route.id];\n\t\tif (!manifestRoute || !manifestRoute.hasLoader) return false;\n\t\tif (isNew(match, index) || matchPathChanged(match, index)) return true;\n\t\tif (match.route.shouldRevalidate) {\n\t\t\tlet routeChoice = match.route.shouldRevalidate({\n\t\t\t\tcurrentUrl: new URL(location.pathname + location.search + location.hash, window.origin),\n\t\t\t\tcurrentParams: currentMatches[0]?.params || {},\n\t\t\t\tnextUrl: new URL(page, window.origin),\n\t\t\t\tnextParams: match.params,\n\t\t\t\tdefaultShouldRevalidate: true\n\t\t\t});\n\t\t\tif (typeof routeChoice === \"boolean\") return routeChoice;\n\t\t}\n\t\treturn true;\n\t});\n\treturn [];\n}\nfunction getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {\n\treturn dedupeHrefs(matches.map((match) => {\n\t\tlet route = manifest.routes[match.route.id];\n\t\tif (!route) return [];\n\t\tlet hrefs = [route.module];\n\t\tif (route.clientActionModule) hrefs = hrefs.concat(route.clientActionModule);\n\t\tif (route.clientLoaderModule) hrefs = hrefs.concat(route.clientLoaderModule);\n\t\tif (includeHydrateFallback && route.hydrateFallbackModule) hrefs = hrefs.concat(route.hydrateFallbackModule);\n\t\tif (route.imports) hrefs = hrefs.concat(route.imports);\n\t\treturn hrefs;\n\t}).flat(1));\n}\nfunction dedupeHrefs(hrefs) {\n\treturn [...new Set(hrefs)];\n}\nfunction sortKeys(obj) {\n\tlet sorted = {};\n\tlet keys = Object.keys(obj).sort();\n\tfor (let key of keys) sorted[key] = obj[key];\n\treturn sorted;\n}\nfunction dedupeLinkDescriptors(descriptors, preloads) {\n\tlet set = /* @__PURE__ */ new Set();\n\tlet preloadsSet = new Set(preloads);\n\treturn descriptors.reduce((deduped, descriptor) => {\n\t\tif (preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === \"script\" && descriptor.href && preloadsSet.has(descriptor.href)) return deduped;\n\t\tlet key = JSON.stringify(sortKeys(descriptor));\n\t\tif (!set.has(key)) {\n\t\t\tset.add(key);\n\t\t\tdeduped.push({\n\t\t\t\tkey,\n\t\t\t\tlink: descriptor\n\t\t\t});\n\t\t}\n\t\treturn deduped;\n\t}, []);\n}\nlet _isPreloadSupported;\nfunction isPreloadSupported() {\n\tif (_isPreloadSupported !== void 0) return _isPreloadSupported;\n\tlet el = document.createElement(\"link\");\n\t_isPreloadSupported = el.relList.supports(\"preload\");\n\tel = null;\n\treturn _isPreloadSupported;\n}\n//#endregion\nexport { getKeyedLinksForMatches, getKeyedPrefetchLinks, getModuleLinkHrefs, getNewMatchesForLinks, isPageLinkDescriptor, prefetchRouteCss, prefetchStyleLinks };\n","/**\n * react-router v8.2.0\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 */\nimport { matchRoutes } from \"../../router/utils.js\";\nimport { DataRouterContext, DataRouterStateContext, useIsRSCRouterContext } from \"../../context.js\";\nimport { useLocation } from \"../../hooks.js\";\nimport { warnOnce } from \"../../server-runtime/warnings.js\";\nimport invariant from \"./invariant.js\";\nimport { getKeyedLinksForMatches, getKeyedPrefetchLinks, getModuleLinkHrefs, getNewMatchesForLinks, isPageLinkDescriptor } from \"./links.js\";\nimport { escapeHtml } from \"./markup.js\";\nimport { singleFetchUrl } from \"./single-fetch.js\";\nimport { getPartialManifest, isFogOfWarEnabled } from \"./fog-of-war.js\";\nimport * as React$1 from \"react\";\n//#region lib/dom/ssr/components.tsx\nfunction useDataRouterContext() {\n\tlet context = React$1.useContext(DataRouterContext);\n\tinvariant(context, \"You must render this element inside a <DataRouterContext.Provider> element\");\n\treturn context;\n}\nfunction useDataRouterStateContext() {\n\tlet context = React$1.useContext(DataRouterStateContext);\n\tinvariant(context, \"You must render this element inside a <DataRouterStateContext.Provider> element\");\n\treturn context;\n}\nconst FrameworkContext = React$1.createContext(void 0);\nFrameworkContext.displayName = \"FrameworkContext\";\nfunction useFrameworkContext() {\n\tlet context = React$1.useContext(FrameworkContext);\n\tinvariant(context, \"You must render this element inside a <HydratedRouter> element\");\n\treturn context;\n}\nfunction usePrefetchBehavior(prefetch, theirElementProps) {\n\tlet frameworkContext = React$1.useContext(FrameworkContext);\n\tlet [maybePrefetch, setMaybePrefetch] = React$1.useState(false);\n\tlet [shouldPrefetch, setShouldPrefetch] = React$1.useState(false);\n\tlet { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;\n\tlet ref = React$1.useRef(null);\n\tReact$1.useEffect(() => {\n\t\tif (prefetch === \"render\") setShouldPrefetch(true);\n\t\tif (prefetch === \"viewport\") {\n\t\t\tlet callback = (entries) => {\n\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\tsetShouldPrefetch(entry.isIntersecting);\n\t\t\t\t});\n\t\t\t};\n\t\t\tlet observer = new IntersectionObserver(callback, { threshold: .5 });\n\t\t\tif (ref.current) observer.observe(ref.current);\n\t\t\treturn () => {\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}\n\t}, [prefetch]);\n\tReact$1.useEffect(() => {\n\t\tif (maybePrefetch) {\n\t\t\tlet id = setTimeout(() => {\n\t\t\t\tsetShouldPrefetch(true);\n\t\t\t}, 100);\n\t\t\treturn () => {\n\t\t\t\tclearTimeout(id);\n\t\t\t};\n\t\t}\n\t}, [maybePrefetch]);\n\tlet setIntent = () => {\n\t\tsetMaybePrefetch(true);\n\t};\n\tlet cancelIntent = () => {\n\t\tsetMaybePrefetch(false);\n\t\tsetShouldPrefetch(false);\n\t};\n\tif (!frameworkContext) return [\n\t\tfalse,\n\t\tref,\n\t\t{}\n\t];\n\tif (prefetch !== \"intent\") return [\n\t\tshouldPrefetch,\n\t\tref,\n\t\t{}\n\t];\n\treturn [\n\t\tshouldPrefetch,\n\t\tref,\n\t\t{\n\t\t\tonFocus: composeEventHandlers(onFocus, setIntent),\n\t\t\tonBlur: composeEventHandlers(onBlur, cancelIntent),\n\t\t\tonMouseEnter: composeEventHandlers(onMouseEnter, setIntent),\n\t\t\tonMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),\n\t\t\tonTouchStart: composeEventHandlers(onTouchStart, setIntent)\n\t\t}\n\t];\n}\nfunction composeEventHandlers(theirHandler, ourHandler) {\n\treturn (event) => {\n\t\ttheirHandler && theirHandler(event);\n\t\tif (!event.defaultPrevented) ourHandler(event);\n\t};\n}\nfunction getActiveMatches(matches, errors, isSpaMode) {\n\tif (isSpaMode && !isHydrated) return [matches[0]];\n\tif (errors) {\n\t\tlet errorIdx = matches.findIndex((m) => errors[m.route.id] !== void 0);\n\t\treturn matches.slice(0, errorIdx + 1);\n\t}\n\treturn matches;\n}\nconst CRITICAL_CSS_DATA_ATTRIBUTE = \"data-react-router-critical-css\";\n/**\n* Renders all the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)\n* tags created by the route module's [`links`](../../start/framework/route-module#links)\n* export. You should render it inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)\n* of your document.\n*\n* @example\n* import { Links } from \"react-router\";\n*\n* export default function Root() {\n* return (\n* <html>\n* <head>\n* <Links />\n* </head>\n* <body></body>\n* </html>\n* );\n* }\n*\n* @public\n* @category Components\n* @mode framework\n* @param props Props\n* @param {LinksProps.nonce} props.nonce n/a\n* @param {LinksProps.crossOrigin} props.crossOrigin n/a\n* @returns A collection of React elements for [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)\n* tags\n*/\nfunction Links({ nonce, crossOrigin }) {\n\tlet { isSpaMode, manifest, routeModules, criticalCss, nonce: contextNonce } = useFrameworkContext();\n\tlet { errors, matches: routerMatches } = useDataRouterStateContext();\n\tlet matches = getActiveMatches(routerMatches, errors, isSpaMode);\n\tlet keyedLinks = React$1.useMemo(() => getKeyedLinksForMatches(matches, routeModules, manifest), [\n\t\tmatches,\n\t\trouteModules,\n\t\tmanifest\n\t]);\n\tif (nonce == null && contextNonce) nonce = contextNonce;\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, typeof criticalCss === \"string\" ? /* @__PURE__ */ React$1.createElement(\"style\", {\n\t\t[CRITICAL_CSS_DATA_ATTRIBUTE]: \"\",\n\t\tnonce,\n\t\tdangerouslySetInnerHTML: { __html: criticalCss }\n\t}) : null, typeof criticalCss === \"object\" ? /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\t[CRITICAL_CSS_DATA_ATTRIBUTE]: \"\",\n\t\trel: \"stylesheet\",\n\t\thref: criticalCss.href,\n\t\tnonce,\n\t\tcrossOrigin\n\t}) : null, keyedLinks.map(({ key, link }) => isPageLinkDescriptor(link) ? /* @__PURE__ */ React$1.createElement(PrefetchPageLinks, {\n\t\tkey,\n\t\tnonce,\n\t\t...link,\n\t\tcrossOrigin: link.crossOrigin ?? crossOrigin\n\t}) : /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\tkey,\n\t\tnonce,\n\t\t...link,\n\t\tcrossOrigin: link.crossOrigin ?? crossOrigin\n\t})));\n}\n/**\n* Renders [`<link rel=prefetch|modulepreload>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/rel)\n* tags for modules and data of another page to enable an instant navigation to\n* that page. [`<Link prefetch>`](./Link#prefetch) uses this internally, but you\n* can render it to prefetch a page for any other reason.\n*\n* For example, you may render one of this as the user types into a search field\n* to prefetch search results before they click through to their selection.\n*\n* @example\n* import { PrefetchPageLinks } from \"react-router\";\n*\n* <PrefetchPageLinks page=\"/absolute/path\" />\n*\n* @public\n* @category Components\n* @mode framework\n* @param props Props\n* @param {PageLinkDescriptor.page} props.page n/a\n* @param props.linkProps Additional props to spread onto the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)\n* tags, such as [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/crossOrigin),\n* [`integrity`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/integrity),\n* [`rel`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/rel),\n* etc.\n* @returns A collection of React elements for [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)\n* tags\n*/\nfunction PrefetchPageLinks({ page, ...linkProps }) {\n\tlet rsc = useIsRSCRouterContext();\n\tlet { nonce: contextNonce } = useFrameworkContext();\n\tlet { router } = useDataRouterContext();\n\tlet matches = React$1.useMemo(() => matchRoutes(router.routes, page, router.basename), [\n\t\trouter.routes,\n\t\tpage,\n\t\trouter.basename\n\t]);\n\tif (!matches) return null;\n\tif (linkProps.nonce == null && contextNonce) linkProps = {\n\t\t...linkProps,\n\t\tnonce: contextNonce\n\t};\n\tif (rsc) return /* @__PURE__ */ React$1.createElement(RSCPrefetchPageLinksImpl, {\n\t\tpage,\n\t\tmatches,\n\t\t...linkProps\n\t});\n\treturn /* @__PURE__ */ React$1.createElement(PrefetchPageLinksImpl, {\n\t\tpage,\n\t\tmatches,\n\t\t...linkProps\n\t});\n}\nfunction useKeyedPrefetchLinks(matches) {\n\tlet { manifest, routeModules } = useFrameworkContext();\n\tlet [keyedPrefetchLinks, setKeyedPrefetchLinks] = React$1.useState([]);\n\tReact$1.useEffect(() => {\n\t\tlet interrupted = false;\n\t\tgetKeyedPrefetchLinks(matches, manifest, routeModules).then((links) => {\n\t\t\tif (!interrupted) setKeyedPrefetchLinks(links);\n\t\t});\n\t\treturn () => {\n\t\t\tinterrupted = true;\n\t\t};\n\t}, [\n\t\tmatches,\n\t\tmanifest,\n\t\trouteModules\n\t]);\n\treturn keyedPrefetchLinks;\n}\nfunction RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {\n\tlet location = useLocation();\n\tlet dataHrefs = React$1.useMemo(() => {\n\t\tif (page === location.pathname + location.search + location.hash) return [];\n\t\tlet url = singleFetchUrl(page, \"rsc\");\n\t\tlet hasSomeRoutesWithShouldRevalidate = false;\n\t\tlet targetRoutes = [];\n\t\tfor (let match of nextMatches) if (typeof match.route.shouldRevalidate === \"function\") hasSomeRoutesWithShouldRevalidate = true;\n\t\telse targetRoutes.push(match.route.id);\n\t\tif (hasSomeRoutesWithShouldRevalidate && targetRoutes.length > 0) url.searchParams.set(\"_routes\", targetRoutes.join(\",\"));\n\t\treturn [url.pathname + url.search];\n\t}, [\n\t\tpage,\n\t\tlocation,\n\t\tnextMatches\n\t]);\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\tkey: href,\n\t\trel: \"prefetch\",\n\t\tas: \"fetch\",\n\t\thref,\n\t\t...linkProps\n\t})));\n}\nfunction PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {\n\tlet location = useLocation();\n\tlet { manifest, routeModules } = useFrameworkContext();\n\tlet { loaderData, matches } = useDataRouterStateContext();\n\tlet newMatchesForData = React$1.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, \"data\"), [\n\t\tpage,\n\t\tnextMatches,\n\t\tmatches,\n\t\tmanifest,\n\t\tlocation\n\t]);\n\tlet newMatchesForAssets = React$1.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, \"assets\"), [\n\t\tpage,\n\t\tnextMatches,\n\t\tmatches,\n\t\tmanifest,\n\t\tlocation\n\t]);\n\tlet dataHrefs = React$1.useMemo(() => {\n\t\tif (page === location.pathname + location.search + location.hash) return [];\n\t\tlet routesParams = /* @__PURE__ */ new Set();\n\t\tlet foundOptOutRoute = false;\n\t\tnextMatches.forEach((m) => {\n\t\t\tlet manifestRoute = manifest.routes[m.route.id];\n\t\t\tif (!manifestRoute || !manifestRoute.hasLoader) return;\n\t\t\tif (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) foundOptOutRoute = true;\n\t\t\telse if (manifestRoute.hasClientLoader) foundOptOutRoute = true;\n\t\t\telse routesParams.add(m.route.id);\n\t\t});\n\t\tif (routesParams.size === 0) return [];\n\t\tlet url = singleFetchUrl(page, \"data\");\n\t\tif (foundOptOutRoute && routesParams.size > 0) url.searchParams.set(\"_routes\", nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(\",\"));\n\t\treturn [url.pathname + url.search];\n\t}, [\n\t\tloaderData,\n\t\tlocation,\n\t\tmanifest,\n\t\tnewMatchesForData,\n\t\tnextMatches,\n\t\tpage,\n\t\trouteModules\n\t]);\n\tlet moduleHrefs = React$1.useMemo(() => getModuleLinkHrefs(newMatchesForAssets, manifest), [newMatchesForAssets, manifest]);\n\tlet keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\tkey: href,\n\t\trel: \"prefetch\",\n\t\tas: \"fetch\",\n\t\thref,\n\t\t...linkProps\n\t})), moduleHrefs.map((href) => /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\tkey: href,\n\t\trel: \"modulepreload\",\n\t\thref,\n\t\t...linkProps\n\t})), keyedPrefetchLinks.map(({ key, link }) => /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\tkey,\n\t\tnonce: linkProps.nonce,\n\t\t...link,\n\t\tcrossOrigin: link.crossOrigin ?? linkProps.crossOrigin\n\t})));\n}\n/**\n* Renders all the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta)\n* tags created by the route module's [`meta`](../../start/framework/route-module#meta)\n* export. You should render it inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)\n* of your document.\n*\n* @example\n* import { Meta } from \"react-router\";\n*\n* export default function Root() {\n* return (\n* <html>\n* <head>\n* <Meta />\n* </head>\n* </html>\n* );\n* }\n*\n* @public\n* @category Components\n* @mode framework\n* @returns A collection of React elements for [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta)\n* tags\n*/\nfunction Meta() {\n\tlet { isSpaMode, routeModules } = useFrameworkContext();\n\tlet { errors, matches: routerMatches, loaderData } = useDataRouterStateContext();\n\tlet location = useLocation();\n\tlet _matches = getActiveMatches(routerMatches, errors, isSpaMode);\n\tlet error = null;\n\tif (errors) error = errors[_matches[_matches.length - 1].route.id];\n\tlet meta = [];\n\tlet leafMeta = null;\n\tlet matches = [];\n\tfor (let i = 0; i < _matches.length; i++) {\n\t\tlet _match = _matches[i];\n\t\tlet routeId = _match.route.id;\n\t\tlet data = loaderData[routeId];\n\t\tlet params = _match.params;\n\t\tlet routeModule = routeModules[routeId];\n\t\tlet routeMeta = [];\n\t\tlet match = {\n\t\t\tid: routeId,\n\t\t\tloaderData: data,\n\t\t\tmeta: [],\n\t\t\tparams: _match.params,\n\t\t\tpathname: _match.pathname,\n\t\t\thandle: _match.route.handle,\n\t\t\terror\n\t\t};\n\t\tmatches[i] = match;\n\t\tif (routeModule?.meta) routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n\t\t\tloaderData: data,\n\t\t\tparams,\n\t\t\tlocation,\n\t\t\tmatches,\n\t\t\terror\n\t\t}) : Array.isArray(routeModule.meta) ? [...routeModule.meta] : routeModule.meta;\n\t\telse if (leafMeta) routeMeta = [...leafMeta];\n\t\trouteMeta = routeMeta || [];\n\t\tif (!Array.isArray(routeMeta)) throw new Error(\"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://reactrouter.com/start/framework/route-module#meta\");\n\t\tmatch.meta = routeMeta;\n\t\tmatches[i] = match;\n\t\tmeta = [...routeMeta];\n\t\tleafMeta = meta;\n\t}\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, meta.flat().map((metaProps) => {\n\t\tif (!metaProps) return null;\n\t\tif (\"tagName\" in metaProps) {\n\t\t\tlet { tagName, ...rest } = metaProps;\n\t\t\tif (!isValidMetaTag(tagName)) {\n\t\t\t\tconsole.warn(`A meta object uses an invalid tagName: ${tagName}. Expected either 'link' or 'meta'`);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tlet Comp = tagName;\n\t\t\treturn /* @__PURE__ */ React$1.createElement(Comp, {\n\t\t\t\tkey: JSON.stringify(rest),\n\t\t\t\t...rest\n\t\t\t});\n\t\t}\n\t\tif (\"title\" in metaProps) return /* @__PURE__ */ React$1.createElement(\"title\", { key: \"title\" }, String(metaProps.title));\n\t\tif (\"charset\" in metaProps) {\n\t\t\tmetaProps.charSet ??= metaProps.charset;\n\t\t\tdelete metaProps.charset;\n\t\t}\n\t\tif (\"charSet\" in metaProps && metaProps.charSet != null) return typeof metaProps.charSet === \"string\" ? /* @__PURE__ */ React$1.createElement(\"meta\", {\n\t\t\tkey: \"charSet\",\n\t\t\tcharSet: metaProps.charSet\n\t\t}) : null;\n\t\tif (\"script:ld+json\" in metaProps) try {\n\t\t\tlet json = JSON.stringify(metaProps[\"script:ld+json\"]);\n\t\t\treturn /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\t\t\tkey: `script:ld+json:${json}`,\n\t\t\t\ttype: \"application/ld+json\",\n\t\t\t\tdangerouslySetInnerHTML: { __html: escapeHtml(json) }\n\t\t\t});\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\n\t\treturn /* @__PURE__ */ React$1.createElement(\"meta\", {\n\t\t\tkey: JSON.stringify(metaProps),\n\t\t\t...metaProps\n\t\t});\n\t}));\n}\nfunction isValidMetaTag(tagName) {\n\treturn typeof tagName === \"string\" && /^(meta|link)$/.test(tagName);\n}\n/**\n* Tracks whether hydration is finished, so scripts can be skipped\n* during client-side updates.\n*/\nlet isHydrated = false;\nfunction setIsHydrated() {\n\tisHydrated = true;\n}\n/**\n* Renders the client runtime of your app. It should be rendered inside the\n* [`<body>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body)\n* of the document.\n*\n* If server rendering, you can omit `<Scripts/>` and the app will work as a\n* traditional web app without JavaScript, relying solely on HTML and browser\n* behaviors.\n*\n* @example\n* import { Scripts } from \"react-router\";\n*\n* export default function Root() {\n* return (\n* <html>\n* <head />\n* <body>\n* <Scripts />\n* </body>\n* </html>\n* );\n* }\n*\n* @public\n* @category Components\n* @mode framework\n* @param scriptProps Additional props to spread onto the [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)\n* tags, such as [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/crossOrigin),\n* [`nonce`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/nonce),\n* etc.\n* @returns A collection of React elements for [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)\n* tags\n*/\nfunction Scripts(scriptProps) {\n\tlet { manifest, serverHandoffString, isSpaMode, renderMeta, routeDiscovery, ssr, nonce: contextNonce } = useFrameworkContext();\n\tlet { router, static: isStatic, staticContext } = useDataRouterContext();\n\tlet { matches: routerMatches } = useDataRouterStateContext();\n\tlet isRSCRouterContext = useIsRSCRouterContext();\n\tlet enableFogOfWar = isFogOfWarEnabled(routeDiscovery, ssr);\n\tif (scriptProps.nonce == null && contextNonce) scriptProps = {\n\t\t...scriptProps,\n\t\tnonce: contextNonce\n\t};\n\tif (renderMeta) renderMeta.didRenderScripts = true;\n\tlet matches = getActiveMatches(routerMatches, null, isSpaMode);\n\tReact$1.useEffect(() => {\n\t\tsetIsHydrated();\n\t}, []);\n\tlet initialScripts = React$1.useMemo(() => {\n\t\tif (isRSCRouterContext) return null;\n\t\tlet contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());` : \" \";\n\t\tlet routeModulesScript = !isStatic ? \" \" : `${manifest.hmr?.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : \"\"}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : \"\"};\n${matches.map((match, routeIndex) => {\n\t\t\tlet routeVarName = `route${routeIndex}`;\n\t\t\tlet manifestEntry = manifest.routes[match.route.id];\n\t\t\tinvariant(manifestEntry, `Route ${match.route.id} not found in manifest`);\n\t\t\tlet { clientActionModule, clientLoaderModule, clientMiddlewareModule, hydrateFallbackModule, module } = manifestEntry;\n\t\t\tlet chunks = [\n\t\t\t\t...clientActionModule ? [{\n\t\t\t\t\tmodule: clientActionModule,\n\t\t\t\t\tvarName: `${routeVarName}_clientAction`\n\t\t\t\t}] : [],\n\t\t\t\t...clientLoaderModule ? [{\n\t\t\t\t\tmodule: clientLoaderModule,\n\t\t\t\t\tvarName: `${routeVarName}_clientLoader`\n\t\t\t\t}] : [],\n\t\t\t\t...clientMiddlewareModule ? [{\n\t\t\t\t\tmodule: clientMiddlewareModule,\n\t\t\t\t\tvarName: `${routeVarName}_clientMiddleware`\n\t\t\t\t}] : [],\n\t\t\t\t...hydrateFallbackModule ? [{\n\t\t\t\t\tmodule: hydrateFallbackModule,\n\t\t\t\t\tvarName: `${routeVarName}_HydrateFallback`\n\t\t\t\t}] : [],\n\t\t\t\t{\n\t\t\t\t\tmodule,\n\t\t\t\t\tvarName: `${routeVarName}_main`\n\t\t\t\t}\n\t\t\t];\n\t\t\tif (chunks.length === 1) return `import * as ${routeVarName} from ${JSON.stringify(module)};`;\n\t\t\treturn [chunks.map((chunk) => `import * as ${chunk.varName} from \"${chunk.module}\";`).join(\"\\n\"), `const ${routeVarName} = {${chunks.map((chunk) => `...${chunk.varName}`).join(\",\")}};`].join(\"\\n\");\n\t\t}).join(\"\\n\")}\n ${enableFogOfWar ? `window.__reactRouterManifest = ${JSON.stringify(getPartialManifest(manifest, router), null, 2)};` : \"\"}\n window.__reactRouterRouteModules = {${matches.map((match, index) => `${JSON.stringify(match.route.id)}:route${index}`).join(\",\")}};\n\nimport(${JSON.stringify(manifest.entry.module)});`;\n\t\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\t\t...scriptProps,\n\t\t\tsuppressHydrationWarning: true,\n\t\t\tdangerouslySetInnerHTML: { __html: contextScript },\n\t\t\ttype: void 0\n\t\t}), /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\t\t...scriptProps,\n\t\t\tsuppressHydrationWarning: true,\n\t\t\tdangerouslySetInnerHTML: { __html: routeModulesScript },\n\t\t\ttype: \"module\",\n\t\t\tasync: true\n\t\t}));\n\t}, []);\n\tlet preloads = isHydrated || isRSCRouterContext ? [] : [...new Set(manifest.entry.imports.concat(getModuleLinkHrefs(matches, manifest, { includeHydrateFallback: true })))];\n\tlet sri = typeof manifest.sri === \"object\" ? manifest.sri : {};\n\twarnOnce(!isRSCRouterContext, \"The <Scripts /> element is a no-op when using RSC and can be safely removed.\");\n\treturn isHydrated || isRSCRouterContext ? null : /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, typeof manifest.sri === \"object\" ? /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\t...scriptProps,\n\t\t\"rr-importmap\": \"\",\n\t\ttype: \"importmap\",\n\t\tsuppressHydrationWarning: true,\n\t\tdangerouslySetInnerHTML: { __html: JSON.stringify({ integrity: sri }) }\n\t}) : null, !enableFogOfWar ? /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\trel: \"modulepreload\",\n\t\thref: manifest.url,\n\t\tcrossOrigin: scriptProps.crossOrigin,\n\t\tintegrity: sri[manifest.url],\n\t\tnonce: scriptProps.nonce,\n\t\tsuppressHydrationWarning: true\n\t}) : null, /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\trel: \"modulepreload\",\n\t\thref: manifest.entry.module,\n\t\tcrossOrigin: scriptProps.crossOrigin,\n\t\tintegrity: sri[manifest.entry.module],\n\t\tnonce: scriptProps.nonce,\n\t\tsuppressHydrationWarning: true\n\t}), preloads.map((path) => /* @__PURE__ */ React$1.createElement(\"link\", {\n\t\tkey: path,\n\t\trel: \"modulepreload\",\n\t\thref: path,\n\t\tcrossOrigin: scriptProps.crossOrigin,\n\t\tintegrity: sri[path],\n\t\tnonce: scriptProps.nonce,\n\t\tsuppressHydrationWarning: true\n\t})), initialScripts);\n}\nfunction mergeRefs(...refs) {\n\treturn (value) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === \"function\") ref(value);\n\t\t\telse if (ref != null) ref.current = value;\n\t\t});\n\t};\n}\n//#endregion\nexport { CRITICAL_CSS_DATA_ATTRIBUTE, FrameworkContext, Links, Meta, PrefetchPageLinks, Scripts, mergeRefs, setIsHydrated, useFrameworkContext, usePrefetchBehavior };\n","/**\n * react-router v8.2.0\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 */\nimport { ABSOLUTE_URL_REGEX } from \"../router/url.js\";\nimport { createBrowserHistory, createHashHistory, createPath, invariant, warning } from \"../router/history.js\";\nimport { ErrorResponseImpl, SUPPORTED_ERROR_TYPES, defaultMapRouteProperties, joinPaths, matchPath, parseToInfo, resolveTo, stripBasename } from \"../router/utils.js\";\nimport { IDLE_FETCHER, createRouter } from \"../router/router.js\";\nimport { DataRouterContext, DataRouterStateContext, FetchersContext, NavigationContext, RouteContext, ViewTransitionContext } from \"../context.js\";\nimport { useBlocker, useHref, useLocation, useMatches, useNavigate, useNavigation, useResolvedPath, useRouteId } from \"../hooks.js\";\nimport { Router, hydrationRouteProperties } from \"../components.js\";\nimport { createSearchParams, getFormSubmissionInfo, getSearchParamsForLocation, shouldProcessLinkClick } from \"./dom.js\";\nimport { escapeHtml } from \"./ssr/markup.js\";\nimport { FrameworkContext, PrefetchPageLinks, mergeRefs, usePrefetchBehavior } from \"./ssr/components.js\";\nimport * as React$1 from \"react\";\n//#region lib/dom/lib.tsx\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\ntry {\n\tif (isBrowser) window.__reactRouterVersion = \"8.2.0\";\n} catch (e) {}\n/**\n* Create a new {@link DataRouter| data router} that manages the application\n* path via [`history.pushState`](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState)\n* and [`history.replaceState`](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState).\n*\n* Data Routers should not be held in React state. You should create your router\n* once outside of the React tree and pass it to {@link RouterProvider | `<RouterProvider>`}.\n* You can use `patchRoutesOnNavigation` to add additional routes programmatically.\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param routes Application routes\n* @param opts Options\n* @param {DOMRouterOpts.basename} opts.basename n/a\n* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a\n* @param {DOMRouterOpts.future} opts.future n/a\n* @param {DOMRouterOpts.getContext} opts.getContext n/a\n* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a\n* @param {DOMRouterOpts.instrumentations} opts.instrumentations n/a\n* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a\n* @param {DOMRouterOpts.window} opts.window n/a\n* @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}\n*/\nfunction createBrowserRouter(routes, opts) {\n\treturn createRouter({\n\t\tbasename: opts?.basename,\n\t\tgetContext: opts?.getContext,\n\t\tfuture: opts?.future,\n\t\thistory: createBrowserHistory({ window: opts?.window }),\n\t\thydrationData: opts?.hydrationData || parseHydrationData(),\n\t\troutes,\n\t\tmapRouteProperties: defaultMapRouteProperties,\n\t\thydrationRouteProperties,\n\t\tdataStrategy: opts?.dataStrategy,\n\t\tpatchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n\t\twindow: opts?.window,\n\t\tinstrumentations: opts?.instrumentations\n\t}).initialize();\n}\n/**\n* Create a new {@link DataRouter| data router} that manages the application\n* path via the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash).\n*\n* Data Routers should not be held in React state. You should create your router\n* once outside of the React tree and pass it to {@link RouterProvider | `<RouterProvider>`}.\n* You can use `patchRoutesOnNavigation` to add additional routes programmatically.\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param routes Application routes\n* @param opts Options\n* @param {DOMRouterOpts.basename} opts.basename n/a\n* @param {DOMRouterOpts.future} opts.future n/a\n* @param {DOMRouterOpts.getContext} opts.getContext n/a\n* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a\n* @param {DOMRouterOpts.instrumentations} opts.instrumentations n/a\n* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a\n* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a\n* @param {DOMRouterOpts.window} opts.window n/a\n* @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}\n*/\nfunction createHashRouter(routes, opts) {\n\treturn createRouter({\n\t\tbasename: opts?.basename,\n\t\tgetContext: opts?.getContext,\n\t\tfuture: opts?.future,\n\t\thistory: createHashHistory({ window: opts?.window }),\n\t\thydrationData: opts?.hydrationData || parseHydrationData(),\n\t\troutes,\n\t\tmapRouteProperties: defaultMapRouteProperties,\n\t\thydrationRouteProperties,\n\t\tdataStrategy: opts?.dataStrategy,\n\t\tpatchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n\t\twindow: opts?.window,\n\t\tinstrumentations: opts?.instrumentations\n\t}).initialize();\n}\nfunction parseHydrationData() {\n\tlet state = window?.__staticRouterHydrationData;\n\tif (state && state.errors) state = {\n\t\t...state,\n\t\terrors: deserializeErrors(state.errors)\n\t};\n\treturn state;\n}\nfunction deserializeErrors(errors) {\n\tif (!errors) return null;\n\tlet entries = Object.entries(errors);\n\tlet serialized = {};\n\tfor (let [key, val] of entries) if (val && val.__type === \"RouteErrorResponse\") serialized[key] = new ErrorResponseImpl(val.status, val.statusText, val.data, val.internal === true);\n\telse if (val && val.__type === \"Error\") {\n\t\tif (typeof val.__subType === \"string\" && SUPPORTED_ERROR_TYPES.includes(val.__subType)) {\n\t\t\tlet ErrorConstructor = window[val.__subType];\n\t\t\tif (typeof ErrorConstructor === \"function\") try {\n\t\t\t\tlet error = new ErrorConstructor(val.message);\n\t\t\t\terror.stack = \"\";\n\t\t\t\tserialized[key] = error;\n\t\t\t} catch (e) {}\n\t\t}\n\t\tif (serialized[key] == null) {\n\t\t\tlet error = new Error(val.message);\n\t\t\terror.stack = \"\";\n\t\t\tserialized[key] = error;\n\t\t}\n\t} else serialized[key] = val;\n\treturn serialized;\n}\n/**\n* A declarative {@link Router | `<Router>`} using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* API for client-side routing.\n*\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {BrowserRouterProps.basename} props.basename n/a\n* @param {BrowserRouterProps.children} props.children n/a\n* @param {BrowserRouterProps.useTransitions} props.useTransitions n/a\n* @param {BrowserRouterProps.window} props.window n/a\n* @returns A declarative {@link Router | `<Router>`} using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* API for client-side routing.\n*/\nfunction BrowserRouter({ basename, children, useTransitions, window }) {\n\tlet historyRef = React$1.useRef(null);\n\tif (historyRef.current == null) historyRef.current = createBrowserHistory({\n\t\twindow,\n\t\tv5Compat: true\n\t});\n\tlet history = historyRef.current;\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\n/**\n* A declarative {@link Router | `<Router>`} that stores the location in the\n* [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash) portion\n* of the URL so it is not sent to the server.\n*\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {HashRouterProps.basename} props.basename n/a\n* @param {HashRouterProps.children} props.children n/a\n* @param {HashRouterProps.useTransitions} props.useTransitions n/a\n* @param {HashRouterProps.window} props.window n/a\n* @returns A declarative {@link Router | `<Router>`} using the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash)\n* for client-side routing.\n*/\nfunction HashRouter({ basename, children, useTransitions, window }) {\n\tlet historyRef = React$1.useRef(null);\n\tif (historyRef.current == null) historyRef.current = createHashHistory({\n\t\twindow,\n\t\tv5Compat: true\n\t});\n\tlet history = historyRef.current;\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\n/**\n* A declarative {@link Router | `<Router>`} that accepts a pre-instantiated\n* `history` object.\n* It's important to note that using your own `history` object is highly discouraged\n* and may add two versions of the `history` library to your bundles unless you use\n* the same version of the `history` library that React Router uses internally.\n*\n* @name unstable_HistoryRouter\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {HistoryRouterProps.basename} props.basename n/a\n* @param {HistoryRouterProps.children} props.children n/a\n* @param {HistoryRouterProps.history} props.history n/a\n* @param {HistoryRouterProps.useTransitions} props.useTransitions n/a\n* @returns A declarative {@link Router | `<Router>`} using the provided history\n* implementation for client-side routing.\n*/\nfunction HistoryRouter({ basename, children, history, useTransitions }) {\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\nHistoryRouter.displayName = \"unstable_HistoryRouter\";\n/**\n* A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)\n* wrapper to enable navigation with client-side routing.\n*\n* @example\n* import { Link } from \"react-router\";\n*\n* <Link to=\"/dashboard\">Dashboard</Link>;\n*\n* <Link\n* to={{\n* pathname: \"/some/path\",\n* search: \"?query=string\",\n* hash: \"#hash\",\n* }}\n* />;\n*\n* @public\n* @category Components\n* @param {LinkProps.discover} props.discover [modes: framework] n/a\n* @param {LinkProps.prefetch} props.prefetch [modes: framework] n/a\n* @param {LinkProps.preventScrollReset} props.preventScrollReset [modes: framework, data] n/a\n* @param {LinkProps.relative} props.relative n/a\n* @param {LinkProps.reloadDocument} props.reloadDocument n/a\n* @param {LinkProps.replace} props.replace n/a\n* @param {LinkProps.state} props.state n/a\n* @param {LinkProps.to} props.to n/a\n* @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a\n* @param {LinkProps.defaultShouldRevalidate} props.defaultShouldRevalidate n/a\n* @param {LinkProps.mask} props.mask [modes: framework, data] n/a\n*/\nconst Link = React$1.forwardRef(function LinkWithRef({ onClick, discover = \"render\", prefetch = \"none\", relative, reloadDocument, replace, mask, state, target, to, preventScrollReset, viewTransition, defaultShouldRevalidate, ...rest }, forwardedRef) {\n\tlet { basename, navigator, useTransitions } = React$1.useContext(NavigationContext);\n\tlet isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n\tlet parsed = parseToInfo(to, basename);\n\tto = parsed.to;\n\tlet href = useHref(to, { relative });\n\tlet location = useLocation();\n\tlet maskedHref = null;\n\tif (mask) {\n\t\tlet resolved = resolveTo(mask, [], location.mask ? location.mask.pathname : \"/\", true);\n\t\tif (basename !== \"/\") resolved.pathname = resolved.pathname === \"/\" ? basename : joinPaths([basename, resolved.pathname]);\n\t\tmaskedHref = navigator.createHref(resolved);\n\t}\n\tlet [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(prefetch, rest);\n\tlet internalOnClick = useLinkClickHandler(to, {\n\t\treplace,\n\t\tmask,\n\t\tstate,\n\t\ttarget,\n\t\tpreventScrollReset,\n\t\trelative,\n\t\tviewTransition,\n\t\tdefaultShouldRevalidate,\n\t\tuseTransitions\n\t});\n\tfunction handleClick(event) {\n\t\tif (onClick) onClick(event);\n\t\tif (!event.defaultPrevented) internalOnClick(event);\n\t}\n\tlet isSpaLink = !(parsed.isExternal || reloadDocument);\n\tlet link = /* @__PURE__ */ React$1.createElement(\"a\", {\n\t\t...rest,\n\t\t...prefetchHandlers,\n\t\thref: (isSpaLink ? maskedHref : void 0) || parsed.absoluteURL || href,\n\t\tonClick: isSpaLink ? handleClick : onClick,\n\t\tref: mergeRefs(forwardedRef, prefetchRef),\n\t\ttarget,\n\t\t\"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n\t});\n\treturn shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, link, /* @__PURE__ */ React$1.createElement(PrefetchPageLinks, { page: href })) : link;\n});\nLink.displayName = \"Link\";\n/**\n* Wraps {@link Link | `<Link>`} with additional props for styling active and\n* pending states.\n*\n* - Automatically applies classes to the link based on its `active` and `pending`\n* states, see {@link NavLinkProps.className}\n* - Note that `pending` is only available with Framework and Data modes.\n* - Automatically applies `aria-current=\"page\"` to the link when the link is active.\n* See [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n* on MDN.\n* - States are additionally available through the className, style, and children\n* render props. See {@link NavLinkRenderProps}.\n*\n* @example\n* <NavLink to=\"/message\">Messages</NavLink>\n*\n* // Using render props\n* <NavLink\n* to=\"/messages\"\n* className={({ isActive, isPending }) =>\n* isPending ? \"pending\" : isActive ? \"active\" : \"\"\n* }\n* >\n* Messages\n* </NavLink>\n*\n* @public\n* @category Components\n* @param {NavLinkProps.caseSensitive} props.caseSensitive n/a\n* @param {NavLinkProps.children} props.children n/a\n* @param {NavLinkProps.className} props.className n/a\n* @param {NavLinkProps.discover} props.discover [modes: framework] n/a\n* @param {NavLinkProps.end} props.end n/a\n* @param {NavLinkProps.prefetch} props.prefetch [modes: framework] n/a\n* @param {NavLinkProps.preventScrollReset} props.preventScrollReset [modes: framework, data] n/a\n* @param {NavLinkProps.relative} props.relative n/a\n* @param {NavLinkProps.reloadDocument} props.reloadDocument n/a\n* @param {NavLinkProps.replace} props.replace n/a\n* @param {NavLinkProps.state} props.state n/a\n* @param {NavLinkProps.style} props.style n/a\n* @param {NavLinkProps.to} props.to n/a\n* @param {NavLinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a\n*/\nconst NavLink = React$1.forwardRef(function NavLinkWithRef({ \"aria-current\": ariaCurrentProp = \"page\", caseSensitive = false, className: classNameProp = \"\", end = false, style: styleProp, to, viewTransition, children, ...rest }, ref) {\n\tlet path = useResolvedPath(to, { relative: rest.relative });\n\tlet location = useLocation();\n\tlet routerState = React$1.useContext(DataRouterStateContext);\n\tlet { navigator, basename } = React$1.useContext(NavigationContext);\n\tlet isTransitioning = routerState != null && useViewTransitionState(path) && viewTransition === true;\n\tlet toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n\tlet locationPathname = location.pathname;\n\tlet nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n\tif (!caseSensitive) {\n\t\tlocationPathname = locationPathname.toLowerCase();\n\t\tnextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n\t\ttoPathname = toPathname.toLowerCase();\n\t}\n\tif (nextLocationPathname && basename) nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;\n\tconst endSlashPosition = toPathname !== \"/\" && toPathname.endsWith(\"/\") ? toPathname.length - 1 : toPathname.length;\n\tlet isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === \"/\";\n\tlet isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === \"/\");\n\tlet renderProps = {\n\t\tisActive,\n\t\tisPending,\n\t\tisTransitioning\n\t};\n\tlet ariaCurrent = isActive ? ariaCurrentProp : void 0;\n\tlet className;\n\tif (typeof classNameProp === \"function\") className = classNameProp(renderProps);\n\telse className = [\n\t\tclassNameProp,\n\t\tisActive ? \"active\" : null,\n\t\tisPending ? \"pending\" : null,\n\t\tisTransitioning ? \"transitioning\" : null\n\t].filter(Boolean).join(\" \");\n\tlet style = typeof styleProp === \"function\" ? styleProp(renderProps) : styleProp;\n\treturn /* @__PURE__ */ React$1.createElement(Link, {\n\t\t...rest,\n\t\t\"aria-current\": ariaCurrent,\n\t\tclassName,\n\t\tref,\n\t\tstyle,\n\t\tto,\n\t\tviewTransition\n\t}, typeof children === \"function\" ? children(renderProps) : children);\n});\nNavLink.displayName = \"NavLink\";\n/**\n* A progressively enhanced HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)\n* that submits data to actions via [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch),\n* activating pending states in {@link useNavigation} which enables advanced\n* user interfaces beyond a basic HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form).\n* After a form's `action` completes, all data on the page is automatically\n* revalidated to keep the UI in sync with the data.\n*\n* Because it uses the HTML form API, server rendered pages are interactive at a\n* basic level before JavaScript loads. Instead of React Router managing the\n* submission, the browser manages the submission as well as the pending states\n* (like the spinning favicon). After JavaScript loads, React Router takes over\n* enabling web application user experiences.\n*\n* `Form` is most useful for submissions that should also change the URL or\n* otherwise add an entry to the browser history stack. For forms that shouldn't\n* manipulate the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack, use {@link FetcherWithComponents.Form | `<fetcher.Form>`}.\n*\n* @example\n* import { Form } from \"react-router\";\n*\n* function NewEvent() {\n* return (\n* <Form action=\"/events\" method=\"post\">\n* <input name=\"title\" type=\"text\" />\n* <input name=\"description\" type=\"text\" />\n* </Form>\n* );\n* }\n*\n* @public\n* @category Components\n* @mode framework\n* @mode data\n* @param {FormProps.action} action n/a\n* @param {FormProps.discover} discover n/a\n* @param {FormProps.encType} encType n/a\n* @param {FormProps.fetcherKey} fetcherKey n/a\n* @param {FormProps.method} method n/a\n* @param {FormProps.navigate} navigate n/a\n* @param {FormProps.preventScrollReset} preventScrollReset n/a\n* @param {FormProps.relative} relative n/a\n* @param {FormProps.reloadDocument} reloadDocument n/a\n* @param {FormProps.replace} replace n/a\n* @param {FormProps.state} state n/a\n* @param {FormProps.viewTransition} viewTransition n/a\n* @param {FormProps.defaultShouldRevalidate} defaultShouldRevalidate n/a\n* @returns A progressively enhanced [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) component\n*/\nconst Form = React$1.forwardRef(({ discover = \"render\", fetcherKey, navigate, reloadDocument, replace, state, method = \"get\", action, onSubmit, relative, preventScrollReset, viewTransition, defaultShouldRevalidate, ...props }, forwardedRef) => {\n\tlet { useTransitions } = React$1.useContext(NavigationContext);\n\tlet submit = useSubmit();\n\tlet formAction = useFormAction(action, { relative });\n\tlet formMethod = method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n\tlet isAbsolute = typeof action === \"string\" && ABSOLUTE_URL_REGEX.test(action);\n\tlet submitHandler = (event) => {\n\t\tonSubmit && onSubmit(event);\n\t\tif (event.defaultPrevented) return;\n\t\tevent.preventDefault();\n\t\tlet submitter = event.nativeEvent.submitter;\n\t\tlet submitMethod = submitter?.getAttribute(\"formmethod\") || method;\n\t\tlet doSubmit = () => submit(submitter || event.currentTarget, {\n\t\t\tfetcherKey,\n\t\t\tmethod: submitMethod,\n\t\t\tnavigate,\n\t\t\treplace,\n\t\t\tstate,\n\t\t\trelative,\n\t\t\tpreventScrollReset,\n\t\t\tviewTransition,\n\t\t\tdefaultShouldRevalidate\n\t\t});\n\t\tif (useTransitions && navigate !== false) React$1.startTransition(() => doSubmit());\n\t\telse doSubmit();\n\t};\n\treturn /* @__PURE__ */ React$1.createElement(\"form\", {\n\t\tref: forwardedRef,\n\t\tmethod: formMethod,\n\t\taction: formAction,\n\t\tonSubmit: reloadDocument ? onSubmit : submitHandler,\n\t\t...props,\n\t\t\"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n\t});\n});\nForm.displayName = \"Form\";\n/**\n* Emulates the browser's scroll restoration on location changes. Apps should only render one of these, right before the {@link Scripts} component.\n*\n* ```tsx\n* import { ScrollRestoration } from \"react-router\";\n*\n* export default function Root() {\n* return (\n* <html>\n* <body>\n* <ScrollRestoration />\n* <Scripts />\n* </body>\n* </html>\n* );\n* }\n* ```\n*\n* This component renders an inline `<script>` to prevent scroll flashing. The\n* `nonce` prop will be passed down to the script tag to allow CSP nonce usage.\n* If not provided in Framework Mode, it will default to any\n* {@link ServerRouter | `<ServerRouter nonce>`} prop.\n*\n* ```tsx\n* <ScrollRestoration nonce={cspNonce} />\n* ```\n*\n* @public\n* @category Components\n* @mode framework\n* @mode data\n* @param props Props\n* @param {ScrollRestorationProps.getKey} props.getKey n/a\n* @param {ScriptsProps.nonce} props.nonce n/a\n* @param {ScrollRestorationProps.storageKey} props.storageKey n/a\n* @returns A [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)\n* tag that restores scroll positions on navigation.\n*/\nfunction ScrollRestoration({ getKey, storageKey, ...props }) {\n\tlet remixContext = React$1.useContext(FrameworkContext);\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet location = useLocation();\n\tlet matches = useMatches();\n\tuseScrollRestoration({\n\t\tgetKey,\n\t\tstorageKey\n\t});\n\tlet ssrKey = React$1.useMemo(() => {\n\t\tif (!remixContext || !getKey) return null;\n\t\tlet userKey = getScrollRestorationKey(location, matches, basename, getKey);\n\t\treturn userKey !== location.key ? userKey : null;\n\t}, []);\n\tif (!remixContext || remixContext.isSpaMode) return null;\n\tlet restoreScroll = ((storageKey, restoreKey) => {\n\t\tif (!window.history.state || !window.history.state.key) {\n\t\t\tlet key = Math.random().toString(32).slice(2);\n\t\t\twindow.history.replaceState({ key }, \"\");\n\t\t}\n\t\ttry {\n\t\t\tlet storedY = JSON.parse(sessionStorage.getItem(storageKey) || \"{}\")[restoreKey || window.history.state.key];\n\t\t\tif (typeof storedY === \"number\") window.scrollTo(0, storedY);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tsessionStorage.removeItem(storageKey);\n\t\t}\n\t}).toString();\n\tif (props.nonce == null && remixContext?.nonce) props.nonce = remixContext.nonce;\n\treturn /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\t...props,\n\t\tsuppressHydrationWarning: true,\n\t\tdangerouslySetInnerHTML: { __html: `(${restoreScroll})(${escapeHtml(JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY))}, ${escapeHtml(JSON.stringify(ssrKey))})` }\n\t});\n}\nScrollRestoration.displayName = \"ScrollRestoration\";\nfunction getDataRouterConsoleError(hookName) {\n\treturn `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext(hookName) {\n\tlet ctx = React$1.useContext(DataRouterContext);\n\tinvariant(ctx, getDataRouterConsoleError(hookName));\n\treturn ctx;\n}\nfunction useDataRouterState(hookName) {\n\tlet state = React$1.useContext(DataRouterStateContext);\n\tinvariant(state, getDataRouterConsoleError(hookName));\n\treturn state;\n}\n/**\n* Handles the click behavior for router {@link Link | `<Link>`} components.This\n* is useful if you need to create custom {@link Link | `<Link>`} components with\n* the same click behavior we use in our exported {@link Link | `<Link>`}.\n*\n* @public\n* @category Hooks\n* @param to The URL to navigate to, can be a string or a partial {@link Path}.\n* @param options Options\n* @param options.preventScrollReset Whether to prevent the scroll position from\n* being reset to the top of the viewport on completion of the navigation when\n* using the {@link ScrollRestoration} component. Defaults to `false`.\n* @param options.relative The {@link RelativeRoutingType | relative routing type}\n* to use for the link. Defaults to `\"route\"`.\n* @param options.replace Whether to replace the current [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* entry instead of pushing a new one. Defaults to `false`.\n* @param options.state The state to add to the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* entry for this navigation. Defaults to `undefined`.\n* @param options.target The target attribute for the link. Defaults to `undefined`.\n* @param options.viewTransition Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n* for this navigation. To apply specific styles during the transition, see\n* {@link useViewTransitionState}. Defaults to `false`.\n* @param options.defaultShouldRevalidate Specify the default revalidation\n* behavior for the navigation. Defaults to `true`.\n* @param options.mask Masked location to display in the browser instead\n* of the router location. Defaults to `undefined`.\n* @param options.useTransitions Wraps the navigation in\n* [`React.startTransition`](https://react.dev/reference/react/startTransition)\n* for concurrent rendering. Defaults to `false`.\n* @returns A click handler function that can be used in a custom {@link Link} component.\n*/\nfunction useLinkClickHandler(to, { target, replace: replaceProp, mask, state, preventScrollReset, relative, viewTransition, defaultShouldRevalidate, useTransitions } = {}) {\n\tlet navigate = useNavigate();\n\tlet location = useLocation();\n\tlet path = useResolvedPath(to, { relative });\n\treturn React$1.useCallback((event) => {\n\t\tif (shouldProcessLinkClick(event, target)) {\n\t\t\tevent.preventDefault();\n\t\t\tlet replace = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);\n\t\t\tlet doNavigate = () => navigate(to, {\n\t\t\t\treplace,\n\t\t\t\tmask,\n\t\t\t\tstate,\n\t\t\t\tpreventScrollReset,\n\t\t\t\trelative,\n\t\t\t\tviewTransition,\n\t\t\t\tdefaultShouldRevalidate\n\t\t\t});\n\t\t\tif (useTransitions) React$1.startTransition(() => doNavigate());\n\t\t\telse doNavigate();\n\t\t}\n\t}, [\n\t\tlocation,\n\t\tnavigate,\n\t\tpath,\n\t\treplaceProp,\n\t\tmask,\n\t\tstate,\n\t\ttarget,\n\t\tto,\n\t\tpreventScrollReset,\n\t\trelative,\n\t\tviewTransition,\n\t\tdefaultShouldRevalidate,\n\t\tuseTransitions\n\t]);\n}\n/**\n* Returns a tuple of the current URL's [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n* and a function to update them. Setting the search params causes a navigation.\n*\n* ```tsx\n* import { useSearchParams } from \"react-router\";\n*\n* export function SomeComponent() {\n* const [searchParams, setSearchParams] = useSearchParams();\n* // ...\n* }\n* ```\n*\n* ### `setSearchParams` function\n*\n* The second element of the tuple is a function that can be used to update the\n* search params. It accepts the same types as `defaultInit` and will cause a\n* navigation to the new URL.\n*\n* ```tsx\n* let [searchParams, setSearchParams] = useSearchParams();\n*\n* // a search param string\n* setSearchParams(\"?tab=1\");\n*\n* // a shorthand object\n* setSearchParams({ tab: \"1\" });\n*\n* // object keys can be arrays for multiple values on the key\n* setSearchParams({ brand: [\"nike\", \"reebok\"] });\n*\n* // an array of tuples\n* setSearchParams([[\"tab\", \"1\"]]);\n*\n* // a `URLSearchParams` object\n* setSearchParams(new URLSearchParams(\"?tab=1\"));\n* ```\n*\n* It also supports a function callback like React's\n* [`setState`](https://react.dev/reference/react/useState#setstate):\n*\n* ```tsx\n* setSearchParams((searchParams) => {\n* searchParams.set(\"tab\", \"2\");\n* return searchParams;\n* });\n* ```\n*\n* <docs-warning>The function callback version of `setSearchParams` does not support\n* the [queueing](https://react.dev/reference/react/useState#setstate-parameters)\n* logic that React's `setState` implements. Multiple calls to `setSearchParams`\n* in the same tick will not build on the prior value. If you need this behavior,\n* you can use `setState` manually.</docs-warning>\n*\n* ### Notes\n*\n* Note that `searchParams` is a stable reference, so you can reliably use it\n* as a dependency in React's [`useEffect`](https://react.dev/reference/react/useEffect)\n* hooks.\n*\n* ```tsx\n* useEffect(() => {\n* console.log(searchParams.get(\"tab\"));\n* }, [searchParams]);\n* ```\n*\n* However, this also means it's mutable. If you change the object without\n* calling `setSearchParams`, its values will change between renders if some\n* other state causes the component to re-render and URL will not reflect the\n* values.\n*\n* @public\n* @category Hooks\n* @param defaultInit\n* You can initialize the search params with a default value, though it **will\n* not** change the URL on the first render.\n*\n* ```tsx\n* // a search param string\n* useSearchParams(\"?tab=1\");\n*\n* // a shorthand object\n* useSearchParams({ tab: \"1\" });\n*\n* // object keys can be arrays for multiple values on the key\n* useSearchParams({ brand: [\"nike\", \"reebok\"] });\n*\n* // an array of tuples\n* useSearchParams([[\"tab\", \"1\"]]);\n*\n* // a `URLSearchParams` object\n* useSearchParams(new URLSearchParams(\"?tab=1\"));\n* ```\n* @returns A tuple of the current [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n* and a function to update them.\n*/\nfunction useSearchParams(defaultInit) {\n\twarning(typeof URLSearchParams !== \"undefined\", \"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\tlet defaultSearchParamsRef = React$1.useRef(createSearchParams(defaultInit));\n\tlet hasSetSearchParamsRef = React$1.useRef(false);\n\tlet location = useLocation();\n\tlet searchParams = React$1.useMemo(() => getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]);\n\tlet navigate = useNavigate();\n\treturn [searchParams, React$1.useCallback((nextInit, navigateOptions) => {\n\t\tconst newSearchParams = createSearchParams(typeof nextInit === \"function\" ? nextInit(new URLSearchParams(searchParams)) : nextInit);\n\t\thasSetSearchParamsRef.current = true;\n\t\tnavigate(\"?\" + newSearchParams, navigateOptions);\n\t}, [navigate, searchParams])];\n}\nlet fetcherId = 0;\nlet getUniqueFetcherId = () => `__${String(++fetcherId)}__`;\n/**\n* The imperative version of {@link Form | `<Form>`} that lets you submit a form\n* from code instead of a user interaction.\n*\n* @example\n* import { useSubmit } from \"react-router\";\n*\n* function SomeComponent() {\n* const submit = useSubmit();\n* return (\n* <Form onChange={(event) => submit(event.currentTarget)} />\n* );\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns A function that can be called to submit a {@link Form} imperatively.\n*/\nfunction useSubmit() {\n\tlet { router } = useDataRouterContext(\"useSubmit\");\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet currentRouteId = useRouteId();\n\tlet routerFetch = router.fetch;\n\tlet routerNavigate = router.navigate;\n\treturn React$1.useCallback(async (target, options = {}) => {\n\t\tlet { action, method, encType, formData, body } = getFormSubmissionInfo(target, basename);\n\t\tif (options.navigate === false) await routerFetch(options.fetcherKey || getUniqueFetcherId(), currentRouteId, options.action || action, {\n\t\t\tdefaultShouldRevalidate: options.defaultShouldRevalidate,\n\t\t\tpreventScrollReset: options.preventScrollReset,\n\t\t\tformData,\n\t\t\tbody,\n\t\t\tformMethod: options.method || method,\n\t\t\tformEncType: options.encType || encType,\n\t\t\tflushSync: options.flushSync\n\t\t});\n\t\telse await routerNavigate(options.action || action, {\n\t\t\tdefaultShouldRevalidate: options.defaultShouldRevalidate,\n\t\t\tpreventScrollReset: options.preventScrollReset,\n\t\t\tformData,\n\t\t\tbody,\n\t\t\tformMethod: options.method || method,\n\t\t\tformEncType: options.encType || encType,\n\t\t\treplace: options.replace,\n\t\t\tstate: options.state,\n\t\t\tfromRouteId: currentRouteId,\n\t\t\tflushSync: options.flushSync,\n\t\t\tviewTransition: options.viewTransition\n\t\t});\n\t}, [\n\t\trouterFetch,\n\t\trouterNavigate,\n\t\tbasename,\n\t\tcurrentRouteId\n\t]);\n}\n/**\n* Resolves the URL to the closest route in the component hierarchy instead of\n* the current URL of the app.\n*\n* This is used internally by {@link Form} to resolve the `action` to the closest\n* route, but can be used generically as well.\n*\n* ```ts\n* import { useFormAction } from \"react-router\";\n*\n* function SomeComponent() {\n* // closest route URL\n* let action = useFormAction();\n*\n* // closest route URL + \"destroy\"\n* let destroyAction = useFormAction(\"destroy\");\n* }\n* ```\n*\n* <docs-info>This hook adds a `basename` if your app specifies one, so that it\n* can be used with raw `<form>` elements in a progressively enhanced way. If\n* you are using this to provide an `action` to `<Form>` or `fetcher.submit`, you\n* will need to remove the `basename` since both of those will prepend it\n* internally.</docs-info>\n*\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param action The action to append to the closest route URL. Defaults to the\n* closest route URL.\n* @param options Options\n* @param options.relative The relative routing type to use when resolving the\n* action. Defaults to `\"route\"`.\n* @returns The resolved action URL.\n*/\nfunction useFormAction(action, { relative } = {}) {\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet routeContext = React$1.useContext(RouteContext);\n\tinvariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n\tlet [match] = routeContext.matches.slice(-1);\n\tlet path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n\tlet location = useLocation();\n\tif (action == null) {\n\t\tpath.search = location.search;\n\t\tlet params = new URLSearchParams(path.search);\n\t\tlet indexValues = params.getAll(\"index\");\n\t\tif (indexValues.some((v) => v === \"\")) {\n\t\t\tparams.delete(\"index\");\n\t\t\tindexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n\t\t\tlet qs = params.toString();\n\t\t\tpath.search = qs ? `?${qs}` : \"\";\n\t\t}\n\t}\n\tif ((!action || action === \".\") && match.route.index) path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n\tif (basename !== \"/\") path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n\treturn createPath(path);\n}\n/**\n* Useful for creating complex, dynamic user interfaces that require multiple,\n* concurrent data interactions without causing a navigation.\n*\n* Fetchers track their own, independent state and can be used to load data, submit\n* forms, and generally interact with [`action`](../../start/framework/route-module#action)\n* and [`loader`](../../start/framework/route-module#loader) functions.\n*\n* @example\n* import { useFetcher } from \"react-router\"\n*\n* function SomeComponent() {\n* let fetcher = useFetcher()\n*\n* // states are available on the fetcher\n* fetcher.state // \"idle\" | \"loading\" | \"submitting\"\n* fetcher.data // the data returned from the action or loader\n*\n* // render a form\n* <fetcher.Form method=\"post\" />\n*\n* // load data\n* fetcher.load(\"/some/route\")\n*\n* // submit data\n* fetcher.submit(someFormRef, { method: \"post\" })\n* fetcher.submit(someData, {\n* method: \"post\",\n* encType: \"application/json\"\n* })\n*\n* // reset fetcher\n* fetcher.reset()\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param options Options\n* @param options.key A unique key to identify the fetcher.\n*\n*\n* By default, `useFetcher` generates a unique fetcher scoped to that component.\n* If you want to identify a fetcher with your own key such that you can access\n* it from elsewhere in your app, you can do that with the `key` option:\n*\n* ```tsx\n* function SomeComp() {\n* let fetcher = useFetcher({ key: \"my-key\" })\n* // ...\n* }\n*\n* // Somewhere else\n* function AnotherComp() {\n* // this will be the same fetcher, sharing the state across the app\n* let fetcher = useFetcher({ key: \"my-key\" });\n* // ...\n* }\n* ```\n* @returns A {@link FetcherWithComponents} object that contains the fetcher's state, data, and components for submitting forms and loading data.\n*/\nfunction useFetcher({ key } = {}) {\n\tlet { router } = useDataRouterContext(\"useFetcher\");\n\tlet state = useDataRouterState(\"useFetcher\");\n\tlet fetcherData = React$1.useContext(FetchersContext);\n\tlet route = React$1.useContext(RouteContext);\n\tlet routeId = route.matches[route.matches.length - 1]?.route.id;\n\tinvariant(fetcherData, `useFetcher must be used inside a FetchersContext`);\n\tinvariant(route, `useFetcher must be used inside a RouteContext`);\n\tinvariant(routeId != null, `useFetcher can only be used on routes that contain a unique \"id\"`);\n\tlet defaultKey = React$1.useId();\n\tlet [fetcherKey, setFetcherKey] = React$1.useState(key || defaultKey);\n\tif (key && key !== fetcherKey) setFetcherKey(key);\n\tlet { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch } = router;\n\tReact$1.useEffect(() => {\n\t\tgetFetcher(fetcherKey);\n\t\treturn () => deleteFetcher(fetcherKey);\n\t}, [\n\t\tdeleteFetcher,\n\t\tgetFetcher,\n\t\tfetcherKey\n\t]);\n\tlet load = React$1.useCallback(async (href, opts) => {\n\t\tinvariant(routeId, \"No routeId available for fetcher.load()\");\n\t\tawait routerFetch(fetcherKey, routeId, href, opts);\n\t}, [\n\t\tfetcherKey,\n\t\trouteId,\n\t\trouterFetch\n\t]);\n\tlet submitImpl = useSubmit();\n\tlet submit = React$1.useCallback(async (target, opts) => {\n\t\tawait submitImpl(target, {\n\t\t\t...opts,\n\t\t\tnavigate: false,\n\t\t\tfetcherKey\n\t\t});\n\t}, [fetcherKey, submitImpl]);\n\tlet reset = React$1.useCallback((opts) => resetFetcher(fetcherKey, opts), [resetFetcher, fetcherKey]);\n\tlet FetcherForm = React$1.useMemo(() => {\n\t\tlet FetcherForm = React$1.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ React$1.createElement(Form, {\n\t\t\t\t...props,\n\t\t\t\tnavigate: false,\n\t\t\t\tfetcherKey,\n\t\t\t\tref\n\t\t\t});\n\t\t});\n\t\tFetcherForm.displayName = \"fetcher.Form\";\n\t\treturn FetcherForm;\n\t}, [fetcherKey]);\n\tlet fetcher = state.fetchers.get(fetcherKey) || IDLE_FETCHER;\n\tlet data = fetcherData.get(fetcherKey);\n\treturn React$1.useMemo(() => ({\n\t\tForm: FetcherForm,\n\t\tsubmit,\n\t\tload,\n\t\treset,\n\t\t...fetcher,\n\t\tdata\n\t}), [\n\t\tFetcherForm,\n\t\tsubmit,\n\t\tload,\n\t\treset,\n\t\tfetcher,\n\t\tdata\n\t]);\n}\n/**\n* Returns an array of all in-flight {@link Fetcher}s. This is useful for components\n* throughout the app that didn't create the fetchers but want to use their submissions\n* to participate in optimistic UI.\n*\n* @example\n* import { useFetchers } from \"react-router\";\n*\n* function SomeComponent() {\n* const fetchers = useFetchers();\n* fetchers[0].formData; // FormData\n* fetchers[0].state; // etc.\n* // ...\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns An array of all in-flight {@link Fetcher}s, each with a unique `key`\n* property.\n*/\nfunction useFetchers() {\n\tlet state = useDataRouterState(\"useFetchers\");\n\treturn React$1.useMemo(() => Array.from(state.fetchers.entries()).map(([key, fetcher]) => ({\n\t\t...fetcher,\n\t\tkey\n\t})), [state.fetchers]);\n}\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions = {};\nfunction getScrollRestorationKey(location, matches, basename, getKey) {\n\tlet key = null;\n\tif (getKey) if (basename !== \"/\") key = getKey({\n\t\t...location,\n\t\tpathname: stripBasename(location.pathname, basename) || location.pathname\n\t}, matches);\n\telse key = getKey(location, matches);\n\tif (key == null) key = location.key;\n\treturn key;\n}\n/**\n* When rendered inside a {@link RouterProvider}, will restore scroll positions\n* on navigations\n*\n* <!--\n* Not marked `@public` because we only export as UNSAFE_ and therefore we don't\n* maintain an .md file for this hook\n* -->\n*\n* @name UNSAFE_useScrollRestoration\n* @category Hooks\n* @mode framework\n* @mode data\n* @param options Options\n* @param options.getKey A function that returns a key to use for scroll restoration.\n* This is useful for custom scroll restoration logic, such as using only the pathname\n* so that subsequent navigations to prior paths will restore the scroll. Defaults\n* to `location.key`.\n* @param options.storageKey The key to use for storing scroll positions in\n* `sessionStorage`. Defaults to `\"react-router-scroll-positions\"`.\n* @returns {void}\n*/\nfunction useScrollRestoration({ getKey, storageKey } = {}) {\n\tlet { router } = useDataRouterContext(\"useScrollRestoration\");\n\tlet { restoreScrollPosition, preventScrollReset } = useDataRouterState(\"useScrollRestoration\");\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet location = useLocation();\n\tlet matches = useMatches();\n\tlet navigation = useNavigation();\n\tReact$1.useEffect(() => {\n\t\twindow.history.scrollRestoration = \"manual\";\n\t\treturn () => {\n\t\t\twindow.history.scrollRestoration = \"auto\";\n\t\t};\n\t}, []);\n\tusePageHide(React$1.useCallback(() => {\n\t\tif (navigation.state === \"idle\") {\n\t\t\tlet key = getScrollRestorationKey(location, matches, basename, getKey);\n\t\t\tsavedScrollPositions[key] = window.scrollY;\n\t\t}\n\t\ttry {\n\t\t\tsessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));\n\t\t} catch (error) {\n\t\t\twarning(false, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`);\n\t\t}\n\t\twindow.history.scrollRestoration = \"auto\";\n\t}, [\n\t\tnavigation.state,\n\t\tgetKey,\n\t\tbasename,\n\t\tlocation,\n\t\tmatches,\n\t\tstorageKey\n\t]));\n\tif (typeof document !== \"undefined\") {\n\t\tReact$1.useLayoutEffect(() => {\n\t\t\ttry {\n\t\t\t\tlet sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);\n\t\t\t\tif (sessionPositions) savedScrollPositions = JSON.parse(sessionPositions);\n\t\t\t} catch (e) {}\n\t\t}, [storageKey]);\n\t\tReact$1.useLayoutEffect(() => {\n\t\t\tlet disableScrollRestoration = router?.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKey ? (location, matches) => getScrollRestorationKey(location, matches, basename, getKey) : void 0);\n\t\t\treturn () => disableScrollRestoration && disableScrollRestoration();\n\t\t}, [\n\t\t\trouter,\n\t\t\tbasename,\n\t\t\tgetKey\n\t\t]);\n\t\tReact$1.useLayoutEffect(() => {\n\t\t\tif (restoreScrollPosition === false) return;\n\t\t\tif (typeof restoreScrollPosition === \"number\") {\n\t\t\t\twindow.scrollTo(0, restoreScrollPosition);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (location.hash) {\n\t\t\t\t\tlet el = document.getElementById(decodeURIComponent(location.hash.slice(1)));\n\t\t\t\t\tif (el) {\n\t\t\t\t\t\tel.scrollIntoView();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\twarning(false, `\"${location.hash.slice(1)}\" is not a decodable element ID. The view will not scroll to it.`);\n\t\t\t}\n\t\t\tif (preventScrollReset === true) return;\n\t\t\twindow.scrollTo(0, 0);\n\t\t}, [\n\t\t\tlocation,\n\t\t\trestoreScrollPosition,\n\t\t\tpreventScrollReset\n\t\t]);\n\t}\n}\n/**\n* Set up a callback to be fired on [Window's `beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event).\n*\n* @public\n* @category Hooks\n* @param callback The callback to be called when the [`beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event)\n* is fired.\n* @param options Options\n* @param options.capture If `true`, the event will be captured during the capture\n* phase. Defaults to `false`.\n* @returns {void}\n*/\nfunction useBeforeUnload(callback, options) {\n\tlet { capture } = options || {};\n\tReact$1.useEffect(() => {\n\t\tlet opts = capture != null ? { capture } : void 0;\n\t\twindow.addEventListener(\"beforeunload\", callback, opts);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"beforeunload\", callback, opts);\n\t\t};\n\t}, [callback, capture]);\n}\nfunction usePageHide(callback, options) {\n\tlet { capture } = options || {};\n\tReact$1.useEffect(() => {\n\t\tlet opts = capture != null ? { capture } : void 0;\n\t\twindow.addEventListener(\"pagehide\", callback, opts);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"pagehide\", callback, opts);\n\t\t};\n\t}, [callback, capture]);\n}\n/**\n* Wrapper around {@link useBlocker} to show a [`window.confirm`](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm)\n* prompt to users instead of building a custom UI with {@link useBlocker}.\n*\n* The `unstable_` flag will not be removed because this technique has a lot of\n* rough edges and behaves very differently (and incorrectly sometimes) across\n* browsers if users click addition back/forward navigations while the\n* confirmation is open. Use at your own risk.\n*\n* @example\n* function ImportantForm() {\n* let [value, setValue] = React.useState(\"\");\n*\n* // Block navigating elsewhere when data has been entered into the input\n* unstable_usePrompt({\n* message: \"Are you sure?\",\n* when: ({ currentLocation, nextLocation }) =>\n* value !== \"\" &&\n* currentLocation.pathname !== nextLocation.pathname,\n* });\n*\n* return (\n* <Form method=\"post\">\n* <label>\n* Enter some important data:\n* <input\n* name=\"data\"\n* value={value}\n* onChange={(e) => setValue(e.target.value)}\n* />\n* </label>\n* <button type=\"submit\">Save</button>\n* </Form>\n* );\n* }\n*\n* @name unstable_usePrompt\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param options Options\n* @param options.message The message to show in the confirmation dialog.\n* @param options.when A boolean or a function that returns a boolean indicating\n* whether to block the navigation. If a function is provided, it will receive an\n* object with `currentLocation` and `nextLocation` properties.\n* @returns {void}\n*/\nfunction usePrompt({ when, message }) {\n\tlet blocker = useBlocker(when);\n\tReact$1.useEffect(() => {\n\t\tif (blocker.state === \"blocked\") if (window.confirm(message)) setTimeout(blocker.proceed, 0);\n\t\telse blocker.reset();\n\t}, [blocker, message]);\n\tReact$1.useEffect(() => {\n\t\tif (blocker.state === \"blocked\" && !when) blocker.reset();\n\t}, [blocker, when]);\n}\n/**\n* This hook returns `true` when there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n* and the specified location matches either side of the navigation (the URL you are\n* navigating **to** or the URL you are navigating **from**). This can be used to apply finer-grained styles to\n* elements to further customize the view transition. This requires that view\n* transitions have been enabled for the given navigation via {@link LinkProps.viewTransition}\n* (or the `Form`, `submit`, or `navigate` call)\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param to The {@link To} location to compare against the active transition's current\n* and next URLs.\n* @param options Options\n* @param options.relative The relative routing type to use when resolving the\n* `to` location, defaults to `\"route\"`. See {@link RelativeRoutingType} for\n* more details.\n* @returns `true` if there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n* and the resolved path matches the transition's destination or source pathname, otherwise `false`.\n*/\nfunction useViewTransitionState(to, { relative } = {}) {\n\tlet vtContext = React$1.useContext(ViewTransitionContext);\n\tinvariant(vtContext != null, \"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?\");\n\tlet { basename } = useDataRouterContext(\"useViewTransitionState\");\n\tlet path = useResolvedPath(to, { relative });\n\tif (!vtContext.isTransitioning) return false;\n\tlet currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n\tlet nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n\treturn matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;\n}\n//#endregion\nexport { BrowserRouter, Form, HashRouter, HistoryRouter, Link, NavLink, ScrollRestoration, createBrowserRouter, createHashRouter, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, usePrompt, useScrollRestoration, useSearchParams, useSubmit, useViewTransitionState };\n","// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = (props) => \"child\" in props ? props.children(props.child) : props.children;\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = (slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n};\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nvar createSlotError = (ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n};\nvar createSlottableError = (ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n};\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","// src/accessible-icon.tsx\nimport * as React from \"react\";\nimport * as VisuallyHiddenPrimitive from \"@radix-ui/react-visually-hidden\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar NAME = \"AccessibleIcon\";\nvar AccessibleIcon = ({ children, label }) => {\n const child = React.Children.only(children);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n React.cloneElement(child, {\n // accessibility\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n }),\n /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { children: label })\n ] });\n};\nAccessibleIcon.displayName = NAME;\nvar Root2 = AccessibleIcon;\nexport {\n AccessibleIcon,\n Root2 as Root\n};\n//# sourceMappingURL=index.mjs.map\n","// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, options = {}) {\n const { optional = false } = options;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n if (optional) return void 0;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope, options = {}) {\n const { optional = false } = options;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n if (optional) return void 0;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useStableComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const mountAnimationNameRef = React2.useRef(void 0);\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n if (state === \"mounted\") {\n prevAnimationNameRef.current = mountAnimationNameRef.current ?? getAnimationName(stylesRef.current);\n mountAnimationNameRef.current = void 0;\n } else {\n prevAnimationNameRef.current = \"none\";\n }\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n mountAnimationNameRef.current = currentAnimationName;\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) {\n const styles = getComputedStyle(node2);\n stylesRef.current = styles;\n mountAnimationNameRef.current = getAnimationName(styles);\n } else {\n stylesRef.current = null;\n }\n setNode(node2);\n }, [])\n };\n}\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction useStableComposedRefs(...refs) {\n const refsRef = React2.useRef(refs);\n refsRef.current = refs;\n return React2.useCallback((node) => {\n const currentRefs = refsRef.current;\n let hasCleanup = false;\n const cleanups = currentRefs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup === \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup === \"function\") {\n cleanup();\n } else {\n setRef(currentRefs[i], null);\n }\n }\n };\n }\n }, []);\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set(),\n // Outside elements that belong to a layer's own dismiss affordance (eg, a\n // dialog overlay). Pressing them should dismiss the layer regardless of\n // whether or not they stop propagation.\n //\n // See https://github.com/radix-ui/primitives/issues/3346\n dismissableSurfaces: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n deferPointerDownOutside = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, setNode);\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = highestLayerWithOutsidePointerEventsDisabled ? layers.indexOf(highestLayerWithOutsidePointerEventsDisabled) : -1;\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const isDeferredPointerDownOutsideRef = React.useRef(false);\n const pointerDownOutside = usePointerDownOutside(\n (event) => {\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n },\n {\n ownerDocument,\n deferPointerDownOutside,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces: context.dismissableSurfaces,\n shouldHandlePointerDownOutside: React.useCallback(\n (target) => {\n if (!(target instanceof Node)) {\n return false;\n }\n const isPointerDownOnBranch = [...context.branches].some(\n (branch) => branch.contains(target)\n );\n return isPointerEventsEnabled && !isPointerDownOnBranch;\n },\n [context.branches, isPointerEventsEnabled]\n )\n }\n );\n const focusOutside = useFocusOutside((event) => {\n if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {\n return;\n }\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const isHighestLayer = node ? index === layers.length - 1 : false;\n const handleKeyDown = useCallbackRef((event) => {\n if (event.key !== \"Escape\") {\n return;\n }\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n });\n React.useEffect(() => {\n if (!isHighestLayer) {\n return;\n }\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [ownerDocument, isHighestLayer, handleKeyDown]);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents) {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction useDismissableLayerSurface() {\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n React.useEffect(() => {\n if (!node) {\n return;\n }\n context.dismissableSurfaces.add(node);\n return () => {\n context.dismissableSurfaces.delete(node);\n };\n }, [node, context.dismissableSurfaces]);\n return setNode;\n}\nvar IS_TRUE = () => true;\nfunction usePointerDownOutside(onPointerDownOutside, args) {\n const {\n ownerDocument = globalThis?.document,\n deferPointerDownOutside = false,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces,\n shouldHandlePointerDownOutside = IS_TRUE\n } = args;\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const isPointerDownOutsideRef = React.useRef(false);\n const interceptedOutsideInteractionEventsRef = React.useRef(/* @__PURE__ */ new Map());\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n function resetOutsideInteraction() {\n isPointerDownOutsideRef.current = false;\n isDeferredPointerDownOutsideRef.current = false;\n interceptedOutsideInteractionEventsRef.current.clear();\n }\n function isOutsideInteractionIntercepted() {\n return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);\n }\n function handleInteractionCapture(event) {\n if (!isPointerDownOutsideRef.current) {\n return;\n }\n const target = event.target;\n const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));\n if (!isDismissableSurface) {\n interceptedOutsideInteractionEventsRef.current.set(event.type, true);\n }\n if (event.type === \"click\") {\n window.setTimeout(() => {\n if (isPointerDownOutsideRef.current) {\n handleClickRef.current();\n }\n }, 0);\n }\n }\n function handleInteractionBubble(event) {\n if (isPointerDownOutsideRef.current) {\n interceptedOutsideInteractionEventsRef.current.set(event.type, false);\n }\n }\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();\n resetOutsideInteraction();\n if (!wasOutsideInteractionIntercepted) {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n if (!shouldHandlePointerDownOutside(event.target)) {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n resetOutsideInteraction();\n isPointerInsideReactTreeRef.current = false;\n return;\n }\n const eventDetail = { originalEvent: event };\n isPointerDownOutsideRef.current = true;\n isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;\n interceptedOutsideInteractionEventsRef.current.clear();\n if (!deferPointerDownOutside || event.button !== 0) {\n handleAndDispatchPointerDownOutsideEvent2();\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n resetOutsideInteraction();\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const outsideInteractionEvents = [\n \"pointerup\",\n \"mousedown\",\n \"mouseup\",\n \"touchstart\",\n \"touchend\",\n \"click\"\n ];\n for (const eventName of outsideInteractionEvents) {\n ownerDocument.addEventListener(eventName, handleInteractionCapture, true);\n ownerDocument.addEventListener(eventName, handleInteractionBubble);\n }\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n for (const eventName of outsideInteractionEvents) {\n ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);\n ownerDocument.removeEventListener(eventName, handleInteractionBubble);\n }\n };\n }, [\n ownerDocument,\n handlePointerDownOutside,\n deferPointerDownOutside,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces,\n shouldHandlePointerDownOutside\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root,\n useDismissableLayerSurface\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, setContainer);\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n const canUseCheckVisibility = typeof container.checkVisibility === \"function\" && container.checkVisibility({ checkVisibilityCSS: true });\n for (const element of elements) {\n const hidden = canUseCheckVisibility ? !element.checkVisibility({ checkVisibilityCSS: true }) : isHidden(element, { upTo: container });\n if (!hidden) {\n return element;\n }\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nvar guards = null;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n if (!guards) {\n guards = { start: createFocusGuard(), end: createFocusGuard() };\n }\n const { start, end } = guards;\n if (document.body.firstElementChild !== start) {\n document.body.insertAdjacentElement(\"afterbegin\", start);\n }\n if (document.body.lastElementChild !== end) {\n document.body.insertAdjacentElement(\"beforeend\", end);\n }\n count++;\n return () => {\n if (count === 1) {\n guards?.start.remove();\n guards?.end.remove();\n guards = null;\n }\n count = Math.max(0, count - 1);\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target\n var selection = window.getSelection();\n var anchorNode = selection && selection.anchorNode;\n var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;\n if (isTouchingSelection) {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer, useDismissableLayerSurface } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n const registerDismissableSurface = useDismissableLayerSurface();\n const composedRefs = useComposedRefs(forwardedRef, registerDismissableSurface);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: composedRefs,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n useFocusGuards();\n return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: forwardedRef,\n deferPointerDownOutside: true,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ) });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nvar WarningProvider = (props) => {\n return props.children;\n};\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nexport {\n DialogClose as Close,\n DialogContent as Content,\n DialogDescription as Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogOverlay as Overlay,\n DialogPortal as Portal,\n Dialog as Root,\n DialogTitle as Title,\n DialogTrigger as Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/avatar.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AVATAR_NAME = \"Avatar\";\nvar [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);\nvar STATIC_IMAGE_COUNT_STATE = [\n 0,\n () => void 0\n];\nvar [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);\nvar Avatar = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, ...avatarProps } = props;\n const [imageLoadingStatus, setImageLoadingStatus] = React.useState(\"idle\");\n const [imageCount, setImageCount] = useImageCount();\n return /* @__PURE__ */ jsx(\n AvatarProvider,\n {\n scope: __scopeAvatar,\n imageLoadingStatus,\n setImageLoadingStatus,\n imageCount,\n setImageCount,\n children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })\n }\n );\n }\n);\nAvatar.displayName = AVATAR_NAME;\nvar IMAGE_NAME = \"AvatarImage\";\nvar AvatarImage = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, src, onLoadingStatusChange, ...imageProps } = props;\n const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);\n useUpdateImageCount(context.setImageCount);\n const imageLoadingStatus = useImageLoadingStatus(src, {\n referrerPolicy: imageProps.referrerPolicy,\n crossOrigin: imageProps.crossOrigin,\n loadingStatus: context.imageLoadingStatus,\n setLoadingStatus: context.setImageLoadingStatus\n });\n const handleLoadingStatusChange = useCallbackRef((status) => {\n onLoadingStatusChange?.(status);\n });\n const loadingStatusRef = React.useRef(imageLoadingStatus);\n useLayoutEffect(() => {\n const previousLoadingStatus = loadingStatusRef.current;\n loadingStatusRef.current = imageLoadingStatus;\n if (imageLoadingStatus !== previousLoadingStatus) {\n handleLoadingStatusChange(imageLoadingStatus);\n }\n }, [imageLoadingStatus, handleLoadingStatusChange]);\n return imageLoadingStatus === \"loaded\" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;\n }\n);\nAvatarImage.displayName = IMAGE_NAME;\nvar FALLBACK_NAME = \"AvatarFallback\";\nvar AvatarFallback = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, delayMs, ...fallbackProps } = props;\n const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);\n const [canRender, setCanRender] = React.useState(delayMs === void 0);\n React.useEffect(() => {\n if (delayMs !== void 0) {\n const timerId = window.setTimeout(() => setCanRender(true), delayMs);\n return () => window.clearTimeout(timerId);\n }\n }, [delayMs]);\n return canRender && context.imageLoadingStatus !== \"loaded\" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;\n }\n);\nAvatarFallback.displayName = FALLBACK_NAME;\nfunction useImageLoadingStatus(src, {\n loadingStatus,\n setLoadingStatus,\n referrerPolicy,\n crossOrigin\n}) {\n useLayoutEffect(() => {\n if (!src) {\n setLoadingStatus(\"error\");\n return;\n }\n const image = new window.Image();\n const handleLoad = (event) => {\n const image2 = event.currentTarget;\n setLoadingStatus(getImageLoadingStatus(image2));\n };\n const handleError = () => setLoadingStatus(\"error\");\n image.addEventListener(\"load\", handleLoad);\n image.addEventListener(\"error\", handleError);\n if (referrerPolicy) {\n image.referrerPolicy = referrerPolicy;\n }\n image.crossOrigin = crossOrigin ?? null;\n image.src = src;\n setLoadingStatus(getImageLoadingStatus(image));\n return () => {\n image.removeEventListener(\"load\", handleLoad);\n image.removeEventListener(\"error\", handleError);\n setLoadingStatus(\"idle\");\n };\n }, [src, crossOrigin, referrerPolicy, setLoadingStatus]);\n return loadingStatus;\n}\nfunction getImageLoadingStatus(image) {\n return image.complete ? image.naturalWidth > 0 ? \"loaded\" : \"error\" : \"loading\";\n}\nfunction useImageCount() {\n let state = STATIC_IMAGE_COUNT_STATE;\n if (true) {\n state = React.useState(0);\n const [imageCount] = state;\n const hasWarnedRef = React.useRef(false);\n React.useEffect(() => {\n if (imageCount > 1 && !hasWarnedRef.current) {\n hasWarnedRef.current = true;\n console.warn(\n \"Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior.\"\n );\n }\n }, [imageCount]);\n }\n return state;\n}\nfunction useUpdateImageCount(setImageCount) {\n if (true) {\n React.useEffect(() => {\n setImageCount((imageCount) => imageCount + 1);\n return () => {\n setImageCount((imageCount) => imageCount - 1);\n };\n }, [setImageCount]);\n }\n}\nexport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n AvatarFallback as Fallback,\n AvatarImage as Image,\n Avatar as Root,\n createAvatarScope\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses };\n//# sourceMappingURL=mergeClasses.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { toKebabCase };\n//# sourceMappingURL=toKebabCase.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\n\nexport { toCamelCase };\n//# sourceMappingURL=toCamelCase.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { toCamelCase } from './toCamelCase.mjs';\n\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\n\nexport { toPascalCase };\n//# sourceMappingURL=toPascalCase.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n return false;\n};\n\nexport { hasA11yProp };\n//# sourceMappingURL=hasA11yProp.mjs.map\n","\"use strict\";\n\"use client\";\n/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { createContext, useContext, useMemo, createElement } from 'react';\n\nconst LucideContext = createContext({});\nfunction LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n className\n}) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n className\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, className]\n );\n return createElement(LucideContext.Provider, { value }, children);\n}\nconst useLucideContext = () => useContext(LucideContext);\n\nexport { LucideProvider, useLucideContext };\n//# sourceMappingURL=context.mjs.map\n","\"use strict\";\n\"use client\";\n/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.mjs';\nimport { hasA11yProp } from './shared/src/utils/hasA11yProp.mjs';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.mjs';\nimport { useLucideContext } from './context.mjs';\n\nconst Icon = forwardRef(\n ({ color, size, strokeWidth, absoluteStrokeWidth, className = \"\", children, iconNode, ...rest }, ref) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n color: contextColor = \"currentColor\",\n className: contextClass = \"\"\n } = useLucideContext() ?? {};\n const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;\n return createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size ?? contextSize ?? defaultAttributes.width,\n height: size ?? contextSize ?? defaultAttributes.height,\n stroke: color ?? contextColor,\n strokeWidth: calculatedStrokeWidth,\n className: mergeClasses(\"lucide\", contextClass, className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.mjs';\nimport { toKebabCase } from './shared/src/utils/toKebabCase.mjs';\nimport { toPascalCase } from './shared/src/utils/toPascalCase.mjs';\nimport Icon from './Icon.mjs';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n [\"path\", { d: \"m19 12-7 7-7-7\", key: \"1idqje\" }]\n];\nconst ArrowDown = createLucideIcon(\"arrow-down\", __iconNode);\n\nexport { __iconNode, ArrowDown as default };\n//# sourceMappingURL=arrow-down.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m12 19-7-7 7-7\", key: \"1l729n\" }],\n [\"path\", { d: \"M19 12H5\", key: \"x3x0zl\" }]\n];\nconst ArrowLeft = createLucideIcon(\"arrow-left\", __iconNode);\n\nexport { __iconNode, ArrowLeft as default };\n//# sourceMappingURL=arrow-left.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"m12 5 7 7-7 7\", key: \"xquz4c\" }]\n];\nconst ArrowRight = createLucideIcon(\"arrow-right\", __iconNode);\n\nexport { __iconNode, ArrowRight as default };\n//# sourceMappingURL=arrow-right.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m5 12 7-7 7 7\", key: \"hav0vg\" }],\n [\"path\", { d: \"M12 19V5\", key: \"x0mq9r\" }]\n];\nconst ArrowUp = createLucideIcon(\"arrow-up\", __iconNode);\n\nexport { __iconNode, ArrowUp as default };\n//# sourceMappingURL=arrow-up.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]];\nconst Check = createLucideIcon(\"check\", __iconNode);\n\nexport { __iconNode, Check as default };\n//# sourceMappingURL=check.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]];\nconst ChevronLeft = createLucideIcon(\"chevron-left\", __iconNode);\n\nexport { __iconNode, ChevronLeft as default };\n//# sourceMappingURL=chevron-left.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]];\nconst ChevronDown = createLucideIcon(\"chevron-down\", __iconNode);\n\nexport { __iconNode, ChevronDown as default };\n//# sourceMappingURL=chevron-down.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]];\nconst ChevronRight = createLucideIcon(\"chevron-right\", __iconNode);\n\nexport { __iconNode, ChevronRight as default };\n//# sourceMappingURL=chevron-right.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"m18 15-6-6-6 6\", key: \"153udz\" }]];\nconst ChevronUp = createLucideIcon(\"chevron-up\", __iconNode);\n\nexport { __iconNode, ChevronUp as default };\n//# sourceMappingURL=chevron-up.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"8\", y2: \"12\", key: \"1pkeuh\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"16\", y2: \"16\", key: \"4dfq90\" }]\n];\nconst CircleAlert = createLucideIcon(\"circle-alert\", __iconNode);\n\nexport { __iconNode, CircleAlert as default };\n//# sourceMappingURL=circle-alert.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 6v6l4 2\", key: \"mmk7yg\" }]\n];\nconst Clock = createLucideIcon(\"clock\", __iconNode);\n\nexport { __iconNode, Clock as default };\n//# sourceMappingURL=clock.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"M10 14 21 3\", key: \"gplh6r\" }],\n [\"path\", { d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\", key: \"a6xqqp\" }]\n];\nconst ExternalLink = createLucideIcon(\"external-link\", __iconNode);\n\nexport { __iconNode, ExternalLink as default };\n//# sourceMappingURL=external-link.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\",\n key: \"1oefj6\"\n }\n ],\n [\"path\", { d: \"M14 2v5a1 1 0 0 0 1 1h5\", key: \"wfsgrz\" }]\n];\nconst File = createLucideIcon(\"file\", __iconNode);\n\nexport { __iconNode, File as default };\n//# sourceMappingURL=file.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\", key: \"1cjeqo\" }],\n [\"path\", { d: \"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\", key: \"19qd67\" }]\n];\nconst Link = createLucideIcon(\"link\", __iconNode);\n\nexport { __iconNode, Link as default };\n//# sourceMappingURL=link.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]];\nconst LoaderCircle = createLucideIcon(\"loader-circle\", __iconNode);\n\nexport { __iconNode, LoaderCircle as default };\n//# sourceMappingURL=loader-circle.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M4 5h16\", key: \"1tepv9\" }],\n [\"path\", { d: \"M4 12h16\", key: \"1lakjw\" }],\n [\"path\", { d: \"M4 19h16\", key: \"1djgab\" }]\n];\nconst Menu = createLucideIcon(\"menu\", __iconNode);\n\nexport { __iconNode, Menu as default };\n//# sourceMappingURL=menu.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [[\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }]];\nconst Minus = createLucideIcon(\"minus\", __iconNode);\n\nexport { __iconNode, Minus as default };\n//# sourceMappingURL=minus.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }]\n];\nconst Plus = createLucideIcon(\"plus\", __iconNode);\n\nexport { __iconNode, Plus as default };\n//# sourceMappingURL=plus.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m21 21-4.34-4.34\", key: \"14j7rj\" }],\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }]\n];\nconst Search = createLucideIcon(\"search\", __iconNode);\n\nexport { __iconNode, Search as default };\n//# sourceMappingURL=search.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\", key: \"975kel\" }],\n [\"circle\", { cx: \"12\", cy: \"7\", r: \"4\", key: \"17ys0d\" }]\n];\nconst User = createLucideIcon(\"user\", __iconNode);\n\nexport { __iconNode, User as default };\n//# sourceMappingURL=user.mjs.map\n","/**\n * @license lucide-react v1.24.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.mjs.map\n","import { AccessibleIcon as e } from \"radix-ui\";\nimport { createContext as t, useContext as n, useState as r } from \"react\";\nimport { jsx as i, jsxs as a } from \"react/jsx-runtime\";\nimport { ArrowDown as o, ArrowLeft as s, ArrowRight as c, ArrowUp as l, Check as u, ChevronDown as d, ChevronLeft as f, ChevronRight as p, ChevronUp as m, CircleAlert as h, Clock as g, ExternalLink as _, File as v, Link as y, LoaderCircle as b, Menu as x, Minus as S, Plus as C, Search as w, User as T, X as E } from \"lucide-react\";\nvar D = ((e) => e)([\n\t\"arrow-down\",\n\t\"arrow-left\",\n\t\"arrow-right\",\n\t\"arrow-up\",\n\t\"check\",\n\t\"chevron-down\",\n\t\"chevron-left\",\n\t\"chevron-right\",\n\t\"chevron-up\",\n\t\"alert\",\n\t\"clock\",\n\t\"external-link\",\n\t\"file\",\n\t\"link\",\n\t\"loader\",\n\t\"menu\",\n\t\"minus\",\n\t\"plus\",\n\t\"search\",\n\t\"user\",\n\t\"close\"\n]), O = { size: {\n\tsmall: {\n\t\tpixels: 16,\n\t\tpurpose: \"Dense metadata and supporting controls\"\n\t},\n\tdefault: {\n\t\tpixels: 20,\n\t\tpurpose: \"Standard interface controls\"\n\t},\n\tlarge: {\n\t\tpixels: 24,\n\t\tpurpose: \"Prominent standalone indicators\"\n\t}\n} }, k = { size: \"default\" }, A = {\n\t\"arrow-down\": o,\n\t\"arrow-left\": s,\n\t\"arrow-right\": c,\n\t\"arrow-up\": l,\n\tcheck: u,\n\t\"chevron-down\": d,\n\t\"chevron-left\": f,\n\t\"chevron-right\": p,\n\t\"chevron-up\": m,\n\talert: h,\n\tclock: g,\n\t\"external-link\": _,\n\tfile: v,\n\tlink: y,\n\tloader: b,\n\tmenu: x,\n\tminus: S,\n\tplus: C,\n\tsearch: w,\n\tuser: T,\n\tclose: E\n}, j = (e) => O.size[e ?? k.size].pixels, M = (t) => {\n\tlet n = A[t.name], r = j(t.size), a = {\n\t\tclassName: t.className,\n\t\tcolor: \"currentColor\",\n\t\tfocusable: !1,\n\t\theight: r,\n\t\tstrokeWidth: 1.75,\n\t\twidth: r\n\t};\n\tif (t.decorative) return /* @__PURE__ */ i(n, {\n\t\t...a,\n\t\t\"aria-hidden\": \"true\"\n\t});\n\tif (t.label.trim().length === 0) throw Error(\"Informative Icon labels must contain visible text\");\n\treturn /* @__PURE__ */ i(e.Root, {\n\t\tlabel: t.label,\n\t\tchildren: /* @__PURE__ */ i(n, { ...a })\n\t});\n}, N = { available: !1 }, P = t(N), F = () => n(P), I = ({ children: e }) => {\n\tlet t = F();\n\treturn t.available ? e(t.container) : null;\n}, L = ({ children: e, container: t }) => {\n\tlet [n, o] = r(null), s = t === void 0 ? n : t, c = s === null ? N : {\n\t\tavailable: !0,\n\t\tcontainer: s\n\t};\n\treturn /* @__PURE__ */ a(P.Provider, {\n\t\tvalue: c,\n\t\tchildren: [e, t === void 0 ? /* @__PURE__ */ i(\"div\", {\n\t\t\t\"data-rly-portal-root\": \"\",\n\t\t\tref: o\n\t\t}) : null]\n\t});\n};\n//#endregion\nexport { D as a, k as i, L as n, O as o, M as r, I as t };\n\n//# sourceMappingURL=PortalProvider-BpgZwSpw.js.map","//#region src/internal/component.ts\nvar e = (e) => e, t = (e, t) => {\n\tlet n = e[t];\n\tif (n === void 0) throw Error(`Missing CSS Module class: ${t}`);\n\treturn n;\n}, n = (...e) => e.filter((e) => typeof e == \"string\" && e.length > 0).join(\" \"), r = (e, t) => {\n\tif (e.trim().length === 0) throw Error(`${t} must contain visible text`);\n\treturn e;\n};\n//#endregion\nexport { r as i, t as n, e as r, n as t };\n\n//# sourceMappingURL=component-BJeeRuSu.js.map","import { r as e, t } from \"./PortalProvider-BpgZwSpw.js\";\nimport { i as n, n as r, r as i, t as a } from \"./component-BJeeRuSu.js\";\nimport { Avatar as o, Dialog as s } from \"radix-ui\";\nimport { createContext as c, createElement as l, useCallback as u, useContext as d, useLayoutEffect as f, useRef as p, useState as m } from \"react\";\nimport { jsx as h, jsxs as g } from \"react/jsx-runtime\";\n//#region src/internal/modal.ts\nvar _ = /* @__PURE__ */ new WeakMap(), v = c(null), y = 0, b = (e, t) => {\n\tlet n = p({\n\t\topen: e,\n\t\tvalue: t\n\t}), r = e && !n.current.open ? t : n.current.value;\n\treturn f(() => {\n\t\te ? n.current.open || (n.current = {\n\t\t\topen: !0,\n\t\t\tvalue: t\n\t\t}) : n.current = {\n\t\t\topen: !1,\n\t\t\tvalue: t\n\t\t};\n\t}, [e, t]), r;\n}, x = (e) => e !== null && \"inert\" in e && typeof e.inert == \"boolean\", S = ({ children: e }) => {\n\tlet [t, n] = m(!1);\n\treturn l(v.Provider, { value: {\n\t\tisContentMounted: t,\n\t\tsetContentMounted: n\n\t} }, e);\n}, C = () => d(v)?.isContentMounted ?? !0, w = () => {\n\tlet e = d(v)?.setContentMounted;\n\tf(() => (e?.(!0), () => e?.(!1)), [e]);\n}, T = (e) => {\n\tlet t = _.get(e);\n\tif (t === void 0) {\n\t\t_.set(e, {\n\t\t\tcount: 1,\n\t\t\tprevious: e.inert\n\t\t}), e.inert = !0;\n\t\treturn;\n\t}\n\tt.count += 1;\n}, E = (e) => {\n\tlet t = _.get(e);\n\tif (t !== void 0) {\n\t\tif (t.count > 1) {\n\t\t\t--t.count;\n\t\t\treturn;\n\t\t}\n\t\te.inert = t.previous, _.delete(e);\n\t}\n}, D = (e, t) => {\n\tf(() => {\n\t\tif (!t) return;\n\t\tlet n = e.current;\n\t\tif (n === null) return;\n\t\tlet r = n, i = [];\n\t\tfor (; r !== r.ownerDocument.body;) {\n\t\t\tlet e = r.parentElement;\n\t\t\tif (e === null) break;\n\t\t\tlet t = !1;\n\t\t\tfor (let n of e.children) {\n\t\t\t\tif (n === r) {\n\t\t\t\t\tt = !0;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t!(t && n.hasAttribute(\"data-rly-modal-layer\")) && x(n) && (T(n), i.push(n));\n\t\t\t}\n\t\t\tr = e;\n\t\t}\n\t\treturn () => {\n\t\t\tfor (let e of i) E(e);\n\t\t};\n\t}, [t, e]);\n}, O = () => {\n\ty += 1;\n}, k = (e) => {\n\tlet t = ++y;\n\tsetTimeout(() => {\n\t\ty === t && e?.isConnected && e.focus();\n\t}, 0);\n}, ee = {\n\tlayer: \"rly_Sheet-module__layer\",\n\ttrigger: \"rly_Sheet-module__trigger\",\n\tclose: \"rly_Sheet-module__close\",\n\ticonClose: \"rly_Sheet-module__iconClose\",\n\toverlay: \"rly_Sheet-module__overlay\",\n\t\"rly-sheet-overlay-out\": \"rly_Sheet-module__rly-sheet-overlay-out\",\n\t\"rly-sheet-overlay-in\": \"rly_Sheet-module__rly-sheet-overlay-in\",\n\tcontent: \"rly_Sheet-module__content\",\n\tend: \"rly_Sheet-module__end\",\n\t\"rly-sheet-end-out\": \"rly_Sheet-module__rly-sheet-end-out\",\n\t\"rly-sheet-end-in\": \"rly_Sheet-module__rly-sheet-end-in\",\n\tstart: \"rly_Sheet-module__start\",\n\t\"rly-sheet-start-out\": \"rly_Sheet-module__rly-sheet-start-out\",\n\t\"rly-sheet-start-in\": \"rly_Sheet-module__rly-sheet-start-in\",\n\theader: \"rly_Sheet-module__header\",\n\theading: \"rly_Sheet-module__heading\",\n\ttitle: \"rly_Sheet-module__title\",\n\tdescription: \"rly_Sheet-module__description\",\n\tbody: \"rly_Sheet-module__body\",\n\tfooter: \"rly_Sheet-module__footer\"\n}, A = (e) => r(ee, e), j = i({ side: {\n\tend: {\n\t\tclassName: A(\"end\"),\n\t\tpurpose: \"Supporting detail that follows the current reading flow\",\n\t\ttokens: [\n\t\t\t\"color-surface-1\",\n\t\t\t\"radius-overlay\",\n\t\t\t\"motion-standard\"\n\t\t]\n\t},\n\tstart: {\n\t\tclassName: A(\"start\"),\n\t\tpurpose: \"Navigation or context that precedes the current reading flow\",\n\t\ttokens: [\n\t\t\t\"color-surface-1\",\n\t\t\t\"radius-overlay\",\n\t\t\t\"motion-standard\"\n\t\t]\n\t}\n} }), M = i({ side: \"end\" }), N = c(null), P = () => {\n\tlet e = d(N);\n\tif (e === null) throw Error(\"Sheet compound components must be nested inside Sheet.Root\");\n\treturn e;\n}, te = ({ children: e, entryMotion: t }) => {\n\tlet n = P(), r = p(null);\n\treturn w(), D(r, n.open), /* @__PURE__ */ h(\"div\", {\n\t\tclassName: A(\"layer\"),\n\t\t\"data-rly-modal-layer\": \"\",\n\t\t\"data-rly-sheet-entry-motion\": t,\n\t\t\"data-rly-sheet-layer\": \"\",\n\t\tref: r,\n\t\tchildren: e\n\t});\n}, F = (e, t) => (typeof e == \"string\" && n(e, `${t} children`), e), ne = Object.freeze({\n\tBody: ({ className: e, ...t }) => /* @__PURE__ */ h(\"div\", {\n\t\t...t,\n\t\tclassName: a(A(\"body\"), e)\n\t}),\n\tClose: ({ children: e, className: t, type: n, ...r }) => /* @__PURE__ */ h(s.Close, {\n\t\t...r,\n\t\tclassName: a(A(\"close\"), t),\n\t\ttype: n ?? \"button\",\n\t\tchildren: F(e, \"Sheet.Close\")\n\t}),\n\tContent: ({ children: r, className: i, closeLabel: o, description: c, entryMotion: l = \"intrinsic\", initialFocusRef: d, ref: f, side: m = M.side, tabIndex: _, title: v, ...y }) => {\n\t\tlet S = P(), C = b(S.open, l), w = n(v, \"Sheet title\"), T = c === void 0 ? void 0 : n(c, \"Sheet description\"), E = n(o ?? `Close ${w}`, \"Sheet closeLabel\"), D = p(null), O = u((e) => {\n\t\t\tD.current = e, typeof f == \"function\" ? f(e) : f != null && (f.current = e);\n\t\t}, [f]);\n\t\treturn /* @__PURE__ */ h(t, { children: (t) => /* @__PURE__ */ h(s.Portal, {\n\t\t\tcontainer: t,\n\t\t\tchildren: /* @__PURE__ */ g(te, {\n\t\t\t\tentryMotion: C,\n\t\t\t\tchildren: [/* @__PURE__ */ h(s.Overlay, {\n\t\t\t\t\tclassName: A(\"overlay\"),\n\t\t\t\t\t\"data-rly-sheet-overlay\": \"\",\n\t\t\t\t\tonPointerDown: () => S.requestOpenChange(!1)\n\t\t\t\t}), /* @__PURE__ */ g(s.Content, {\n\t\t\t\t\t...y,\n\t\t\t\t\t...T === void 0 ? { \"aria-describedby\": void 0 } : {},\n\t\t\t\t\tclassName: a(A(\"content\"), j.side[m].className, i),\n\t\t\t\t\t\"data-rly-sheet-side\": m,\n\t\t\t\t\tonCloseAutoFocus: (e) => e.preventDefault(),\n\t\t\t\t\tonOpenAutoFocus: (e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tlet t = D.current?.ownerDocument.activeElement ?? null;\n\t\t\t\t\t\tS.restoreFocusRef.current === null && x(t) && (S.restoreFocusRef.current = t);\n\t\t\t\t\t\tlet n = d?.current ?? D.current;\n\t\t\t\t\t\tn?.focus(), n !== D.current && n?.ownerDocument.activeElement !== n && D.current?.focus();\n\t\t\t\t\t},\n\t\t\t\t\tref: O,\n\t\t\t\t\ttabIndex: _ ?? -1,\n\t\t\t\t\tchildren: [/* @__PURE__ */ g(\"div\", {\n\t\t\t\t\t\tclassName: A(\"header\"),\n\t\t\t\t\t\tchildren: [/* @__PURE__ */ g(\"div\", {\n\t\t\t\t\t\t\tclassName: A(\"heading\"),\n\t\t\t\t\t\t\tchildren: [/* @__PURE__ */ h(s.Title, {\n\t\t\t\t\t\t\t\tclassName: A(\"title\"),\n\t\t\t\t\t\t\t\tchildren: w\n\t\t\t\t\t\t\t}), T === void 0 ? null : /* @__PURE__ */ h(s.Description, {\n\t\t\t\t\t\t\t\tclassName: A(\"description\"),\n\t\t\t\t\t\t\t\tchildren: T\n\t\t\t\t\t\t\t})]\n\t\t\t\t\t\t}), /* @__PURE__ */ h(s.Close, {\n\t\t\t\t\t\t\t\"aria-label\": E,\n\t\t\t\t\t\t\tclassName: A(\"iconClose\"),\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ h(e, {\n\t\t\t\t\t\t\t\tdecorative: !0,\n\t\t\t\t\t\t\t\tname: \"close\",\n\t\t\t\t\t\t\t\tsize: \"default\"\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t})]\n\t\t\t\t\t}), r]\n\t\t\t\t})]\n\t\t\t})\n\t\t}) });\n\t},\n\tFooter: ({ className: e, ...t }) => /* @__PURE__ */ h(\"footer\", {\n\t\t...t,\n\t\tclassName: a(A(\"footer\"), e)\n\t}),\n\tRoot: (e) => {\n\t\tlet { children: t, defaultOpen: n = !1, onOpenChange: r, open: i } = e, [a, o] = m(n), c = C(), l = p(null), u = (i ?? a) && c, d = p(u), g = (e) => {\n\t\t\ti === void 0 && o(e), r?.(e);\n\t\t};\n\t\treturn f(() => {\n\t\t\td.current !== u && (d.current = u, u ? O() : k(l.current));\n\t\t}, [u]), /* @__PURE__ */ h(S, { children: /* @__PURE__ */ h(N.Provider, {\n\t\t\tvalue: {\n\t\t\t\topen: u,\n\t\t\t\trequestOpenChange: g,\n\t\t\t\trestoreFocusRef: l\n\t\t\t},\n\t\t\tchildren: /* @__PURE__ */ h(s.Root, {\n\t\t\t\tmodal: !0,\n\t\t\t\tonOpenChange: g,\n\t\t\t\topen: u,\n\t\t\t\tchildren: t\n\t\t\t})\n\t\t}) });\n\t},\n\tTrigger: ({ children: e, className: t, onClick: n, type: r, ...i }) => {\n\t\tlet o = P();\n\t\treturn /* @__PURE__ */ h(s.Trigger, {\n\t\t\t...i,\n\t\t\tclassName: a(A(\"trigger\"), t),\n\t\t\tonClick: (e) => {\n\t\t\t\to.restoreFocusRef.current = e.currentTarget, n?.(e);\n\t\t\t},\n\t\t\ttype: r ?? \"button\",\n\t\t\tchildren: F(e, \"Sheet.Trigger\")\n\t\t});\n\t}\n}), re = {\n\troot: \"rly_Button-module__root\",\n\tprimary: \"rly_Button-module__primary\",\n\tsecondary: \"rly_Button-module__secondary\",\n\tquiet: \"rly_Button-module__quiet\",\n\tcompact: \"rly_Button-module__compact\",\n\tdefaultSize: \"rly_Button-module__defaultSize\",\n\tprincipal: \"rly_Button-module__principal\",\n\tstretch: \"rly_Button-module__stretch\",\n\tcontent: \"rly_Button-module__content\",\n\tlabel: \"rly_Button-module__label\",\n\tloadingContent: \"rly_Button-module__loadingContent\",\n\tloader: \"rly_Button-module__loader\"\n}, I = (e) => r(re, e), L = i({\n\tvariant: {\n\t\tprimary: {\n\t\t\tclassName: I(\"primary\"),\n\t\t\tpurpose: \"Single principal action\",\n\t\t\ttokens: [\"color-action-background\", \"color-action-foreground\"]\n\t\t},\n\t\tsecondary: {\n\t\t\tclassName: I(\"secondary\"),\n\t\t\tpurpose: \"Default supporting action\",\n\t\t\ttokens: [\"color-surface-1\", \"color-border-2\"]\n\t\t},\n\t\tquiet: {\n\t\t\tclassName: I(\"quiet\"),\n\t\t\tpurpose: \"Low-emphasis contextual action\",\n\t\t\ttokens: [\"color-text-1\", \"color-surface-2\"]\n\t\t}\n\t},\n\tsize: {\n\t\tcompact: {\n\t\t\tclassName: I(\"compact\"),\n\t\t\tpurpose: \"Dense text action\",\n\t\t\ttokens: [\"space-40\"]\n\t\t},\n\t\tdefault: {\n\t\t\tclassName: I(\"defaultSize\"),\n\t\t\tpurpose: \"Standard action\",\n\t\t\ttokens: [\"space-48\"]\n\t\t},\n\t\tprincipal: {\n\t\t\tclassName: I(\"principal\"),\n\t\t\tpurpose: \"Prominent consequential action\",\n\t\t\ttokens: [\"space-48\", \"space-8\"]\n\t\t}\n\t}\n}), ie = i({\n\tvariant: \"secondary\",\n\tsize: \"default\"\n}), R = ({ children: t, className: n, disabled: r, leadingIcon: i, loading: o = !1, size: s = \"default\", stretch: c = !1, trailingIcon: l, type: u, variant: d = \"secondary\", ...f }) => {\n\tif (typeof t != \"number\" && typeof t != \"string\" || typeof t == \"string\" && t.trim().length === 0) throw Error(\"Button children must contain visible content\");\n\treturn /* @__PURE__ */ g(\"button\", {\n\t\t...f,\n\t\t\"aria-busy\": o ? \"true\" : void 0,\n\t\tclassName: a(I(\"root\"), L.variant[d].className, L.size[s].className, c && I(\"stretch\"), n),\n\t\t\"data-loading\": o ? \"true\" : void 0,\n\t\tdisabled: r || o,\n\t\ttype: u ?? \"button\",\n\t\tchildren: [/* @__PURE__ */ g(\"span\", {\n\t\t\tclassName: a(I(\"content\"), o && I(\"loadingContent\")),\n\t\t\tchildren: [\n\t\t\t\ti === void 0 ? null : /* @__PURE__ */ h(e, {\n\t\t\t\t\tdecorative: !0,\n\t\t\t\t\tname: i,\n\t\t\t\t\tsize: s === \"compact\" ? \"small\" : \"default\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ h(\"span\", {\n\t\t\t\t\tclassName: I(\"label\"),\n\t\t\t\t\tchildren: t\n\t\t\t\t}),\n\t\t\t\tl === void 0 ? null : /* @__PURE__ */ h(e, {\n\t\t\t\t\tdecorative: !0,\n\t\t\t\t\tname: l,\n\t\t\t\t\tsize: s === \"compact\" ? \"small\" : \"default\"\n\t\t\t\t})\n\t\t\t]\n\t\t}), o ? /* @__PURE__ */ h(\"span\", {\n\t\t\t\"aria-hidden\": \"true\",\n\t\t\tclassName: I(\"loader\"),\n\t\t\tchildren: /* @__PURE__ */ h(e, {\n\t\t\t\tdecorative: !0,\n\t\t\t\tname: \"loader\",\n\t\t\t\tsize: s === \"compact\" ? \"small\" : \"default\"\n\t\t\t})\n\t\t}) : null]\n\t});\n}, ae = {\n\troot: \"rly_StateLabel-module__root\",\n\tneutral: \"rly_StateLabel-module__neutral\",\n\tpositive: \"rly_StateLabel-module__positive\",\n\tcritical: \"rly_StateLabel-module__critical\",\n\tcaution: \"rly_StateLabel-module__caution\",\n\tprogress: \"rly_StateLabel-module__progress\",\n\tcompact: \"rly_StateLabel-module__compact\",\n\tdefaultSize: \"rly_StateLabel-module__defaultSize\"\n}, z = (e) => r(ae, e), B = i({\n\ttone: {\n\t\tneutral: {\n\t\t\tclassName: z(\"neutral\"),\n\t\t\tpurpose: \"Neutral or unavailable state\",\n\t\t\ttokens: [\"color-text-2\", \"color-surface-2\"]\n\t\t},\n\t\tpositive: {\n\t\t\tclassName: z(\"positive\"),\n\t\t\tpurpose: \"Positive state\",\n\t\t\ttokens: [\"color-success-ink\", \"color-success-tint\"]\n\t\t},\n\t\tcritical: {\n\t\t\tclassName: z(\"critical\"),\n\t\t\tpurpose: \"Critical state\",\n\t\t\ttokens: [\"color-blocked-ink\", \"color-blocked-tint\"]\n\t\t},\n\t\tcaution: {\n\t\t\tclassName: z(\"caution\"),\n\t\t\tpurpose: \"Caution state\",\n\t\t\ttokens: [\"color-held-ink\", \"color-held-tint\"]\n\t\t},\n\t\tprogress: {\n\t\t\tclassName: z(\"progress\"),\n\t\t\tpurpose: \"Work in progress\",\n\t\t\ttokens: [\"color-deploying-ink\", \"color-deploying-tint\"]\n\t\t}\n\t},\n\tsize: {\n\t\tcompact: {\n\t\t\tclassName: z(\"compact\"),\n\t\t\tpurpose: \"Dense metadata state\",\n\t\t\ttokens: [\"type-meta\"]\n\t\t},\n\t\tdefault: {\n\t\t\tclassName: z(\"defaultSize\"),\n\t\t\tpurpose: \"Standard explicit state\",\n\t\t\ttokens: [\"type-label\"]\n\t\t}\n\t}\n}), oe = i({\n\ttone: \"neutral\",\n\tsize: \"default\"\n}), se = {\n\tneutral: \"minus\",\n\tpositive: \"check\",\n\tcritical: \"alert\",\n\tcaution: \"clock\",\n\tprogress: \"loader\"\n}, ce = ({ className: t, icon: r, label: i, size: o = \"default\", tone: s = \"neutral\", ...c }) => /* @__PURE__ */ g(\"span\", {\n\t...c,\n\tclassName: a(z(\"root\"), B.tone[s].className, B.size[o].className, t),\n\tchildren: [/* @__PURE__ */ h(e, {\n\t\tdecorative: !0,\n\t\tname: r ?? se[s],\n\t\tsize: \"small\"\n\t}), /* @__PURE__ */ h(\"span\", { children: n(i, \"StateLabel label\") })]\n}), le = {\n\troot: \"rly_Avatar-module__root\",\n\tsmall: \"rly_Avatar-module__small\",\n\tdefaultSize: \"rly_Avatar-module__defaultSize\",\n\tlarge: \"rly_Avatar-module__large\",\n\thero: \"rly_Avatar-module__hero\",\n\tcircle: \"rly_Avatar-module__circle\",\n\troundedSquare: \"rly_Avatar-module__roundedSquare\",\n\timage: \"rly_Avatar-module__image\",\n\tfallback: \"rly_Avatar-module__fallback\"\n}, V = (e) => r(le, e), H = i({\n\tsize: {\n\t\tsmall: {\n\t\t\tclassName: V(\"small\"),\n\t\t\tpurpose: \"Compact supporting identity\",\n\t\t\ttokens: [\"space-24\"]\n\t\t},\n\t\tdefault: {\n\t\t\tclassName: V(\"defaultSize\"),\n\t\t\tpurpose: \"Standard identity\",\n\t\t\ttokens: [\"space-32\"]\n\t\t},\n\t\tlarge: {\n\t\t\tclassName: V(\"large\"),\n\t\t\tpurpose: \"Prominent identity\",\n\t\t\ttokens: [\"space-40\"]\n\t\t},\n\t\thero: {\n\t\t\tclassName: V(\"hero\"),\n\t\t\tpurpose: \"Page-level identity\",\n\t\t\ttokens: [\"space-48\", \"space-8\"]\n\t\t}\n\t},\n\tshape: {\n\t\tcircle: {\n\t\t\tclassName: V(\"circle\"),\n\t\t\tpurpose: \"Human or general identity\",\n\t\t\ttokens: [\"radius-round\"]\n\t\t},\n\t\t\"rounded-square\": {\n\t\t\tclassName: V(\"roundedSquare\"),\n\t\t\tpurpose: \"Non-human or system identity\",\n\t\t\ttokens: [\"radius-field\"]\n\t\t}\n\t}\n}), U = i({\n\tsize: \"default\",\n\tshape: \"circle\"\n}), ue = ({ className: e, decorative: t, fallback: r, label: i, shape: s = \"circle\", size: c = \"default\", src: l, ...u }) => {\n\tlet d = t ? void 0 : n(i, \"Avatar label\"), f = n(r, \"Avatar fallback\");\n\treturn /* @__PURE__ */ g(o.Root, {\n\t\t...u,\n\t\t\"aria-hidden\": t ? \"true\" : void 0,\n\t\t\"aria-label\": d,\n\t\tclassName: a(V(\"root\"), H.size[c].className, H.shape[s].className, e),\n\t\trole: t ? void 0 : \"img\",\n\t\tchildren: [l === void 0 ? null : /* @__PURE__ */ h(o.Image, {\n\t\t\talt: \"\",\n\t\t\tclassName: V(\"image\"),\n\t\t\tdecoding: \"async\",\n\t\t\tloading: \"lazy\",\n\t\t\tsrc: l\n\t\t}), /* @__PURE__ */ h(o.Fallback, {\n\t\t\t\"aria-hidden\": \"true\",\n\t\t\tclassName: V(\"fallback\"),\n\t\t\tchildren: f\n\t\t})]\n\t});\n}, de = {\n\troot: \"rly_Skeleton-module__root\",\n\ttext: \"rly_Skeleton-module__text\",\n\tblock: \"rly_Skeleton-module__block\",\n\tcircle: \"rly_Skeleton-module__circle\"\n}, W = (e) => r(de, e), G = i({ variant: {\n\ttext: {\n\t\tclassName: W(\"text\"),\n\t\tpurpose: \"A line of unavailable copy\",\n\t\ttokens: [\"type-body\", \"radius-tag\"]\n\t},\n\tblock: {\n\t\tclassName: W(\"block\"),\n\t\tpurpose: \"A rectangular unavailable region\",\n\t\ttokens: [\"space-64\", \"radius-control\"]\n\t},\n\tcircle: {\n\t\tclassName: W(\"circle\"),\n\t\tpurpose: \"A circular unavailable image\",\n\t\ttokens: [\"radius-round\"]\n\t}\n} }), fe = i({ variant: \"text\" }), pe = ({ className: e, decorative: t = !0, height: r, label: i, style: o, variant: s = \"text\", width: c, ...l }) => {\n\tif (!t && i === void 0) throw Error(\"Skeleton label must contain visible text\");\n\tlet u = t || i === void 0 ? void 0 : n(i, \"Skeleton label\"), d = {\n\t\t...r === void 0 ? {} : { blockSize: r },\n\t\t...c === void 0 ? {} : { inlineSize: c }\n\t};\n\treturn /* @__PURE__ */ h(\"div\", {\n\t\t...l,\n\t\t\"aria-busy\": t ? void 0 : \"true\",\n\t\t\"aria-hidden\": t ? \"true\" : void 0,\n\t\t\"aria-label\": u,\n\t\tclassName: a(W(\"root\"), G.variant[s].className, e),\n\t\trole: t ? \"presentation\" : \"status\",\n\t\tstyle: {\n\t\t\t...o,\n\t\t\t...d\n\t\t}\n\t});\n}, me = {\n\troot: \"rly_StatePanel-module__root\",\n\tneutral: \"rly_StatePanel-module__neutral\",\n\tpositive: \"rly_StatePanel-module__positive\",\n\tcritical: \"rly_StatePanel-module__critical\",\n\tcaution: \"rly_StatePanel-module__caution\",\n\tprogress: \"rly_StatePanel-module__progress\",\n\trail: \"rly_StatePanel-module__rail\",\n\ticon: \"rly_StatePanel-module__icon\",\n\tcontent: \"rly_StatePanel-module__content\",\n\ttitle: \"rly_StatePanel-module__title\",\n\tdescription: \"rly_StatePanel-module__description\",\n\taction: \"rly_StatePanel-module__action\"\n}, K = (e) => r(me, e), q = i({ tone: {\n\tneutral: {\n\t\tclassName: K(\"neutral\"),\n\t\tpurpose: \"Neutral explanatory state\",\n\t\ttokens: [\"color-text-2\", \"color-surface-2\"]\n\t},\n\tpositive: {\n\t\tclassName: K(\"positive\"),\n\t\tpurpose: \"Positive outcome\",\n\t\ttokens: [\"color-success-ink\", \"color-success-tint\"]\n\t},\n\tcritical: {\n\t\tclassName: K(\"critical\"),\n\t\tpurpose: \"Critical outcome requiring attention\",\n\t\ttokens: [\"color-blocked-ink\", \"color-blocked-tint\"]\n\t},\n\tcaution: {\n\t\tclassName: K(\"caution\"),\n\t\tpurpose: \"Held outcome requiring review\",\n\t\ttokens: [\"color-held-ink\", \"color-held-tint\"]\n\t},\n\tprogress: {\n\t\tclassName: K(\"progress\"),\n\t\tpurpose: \"Work currently in progress\",\n\t\ttokens: [\"color-deploying-ink\", \"color-deploying-tint\"]\n\t}\n} }), he = i({ tone: \"neutral\" }), ge = {\n\tneutral: \"minus\",\n\tpositive: \"check\",\n\tcritical: \"alert\",\n\tcaution: \"clock\",\n\tprogress: \"loader\"\n}, _e = ({ action: t, announce: r = \"off\", className: i, description: o, icon: s, title: c, tone: l = \"neutral\", ...u }) => {\n\tlet d = r === \"assertive\" ? \"alert\" : r === \"polite\" ? \"status\" : void 0;\n\treturn /* @__PURE__ */ g(\"section\", {\n\t\t...u,\n\t\t\"aria-live\": r === \"off\" ? void 0 : r,\n\t\tclassName: a(K(\"root\"), q.tone[l].className, i),\n\t\trole: d,\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ h(\"span\", {\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\tclassName: K(\"rail\")\n\t\t\t}),\n\t\t\t/* @__PURE__ */ h(\"span\", {\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\tclassName: K(\"icon\"),\n\t\t\t\tchildren: /* @__PURE__ */ h(e, {\n\t\t\t\t\tdecorative: !0,\n\t\t\t\t\tname: s ?? ge[l]\n\t\t\t\t})\n\t\t\t}),\n\t\t\t/* @__PURE__ */ g(\"div\", {\n\t\t\t\tclassName: K(\"content\"),\n\t\t\t\tchildren: [\n\t\t\t\t\t/* @__PURE__ */ h(\"strong\", {\n\t\t\t\t\t\tclassName: K(\"title\"),\n\t\t\t\t\t\tchildren: n(c, \"StatePanel title\")\n\t\t\t\t\t}),\n\t\t\t\t\to === void 0 ? null : /* @__PURE__ */ h(\"div\", {\n\t\t\t\t\t\tclassName: K(\"description\"),\n\t\t\t\t\t\tchildren: o\n\t\t\t\t\t}),\n\t\t\t\t\tt === void 0 ? null : /* @__PURE__ */ h(\"div\", {\n\t\t\t\t\t\tclassName: K(\"action\"),\n\t\t\t\t\t\tchildren: t\n\t\t\t\t\t})\n\t\t\t\t]\n\t\t\t})\n\t\t]\n\t});\n}, ve = {\n\tlayer: \"rly_Dialog-module__layer\",\n\toverlay: \"rly_Dialog-module__overlay\",\n\tcontent: \"rly_Dialog-module__content\",\n\tdefaultSize: \"rly_Dialog-module__defaultSize\",\n\twide: \"rly_Dialog-module__wide\",\n\theader: \"rly_Dialog-module__header\",\n\ttitle: \"rly_Dialog-module__title\",\n\tdescription: \"rly_Dialog-module__description\",\n\tbody: \"rly_Dialog-module__body\",\n\t\"dialog-fade-in\": \"rly_Dialog-module__dialog-fade-in\",\n\t\"dialog-fade-out\": \"rly_Dialog-module__dialog-fade-out\",\n\t\"dialog-enter\": \"rly_Dialog-module__dialog-enter\",\n\t\"dialog-exit\": \"rly_Dialog-module__dialog-exit\",\n\t\"dialog-compact-in\": \"rly_Dialog-module__dialog-compact-in\",\n\t\"dialog-compact-out\": \"rly_Dialog-module__dialog-compact-out\"\n}, J = (e) => r(ve, e), Y = c(null), X = () => {\n\tlet e = d(Y);\n\tif (e === null) throw Error(\"Dialog compound components must be nested inside Dialog\");\n\treturn e;\n}, Z = (e, t) => {\n\ttypeof e == \"function\" ? e(t) : e != null && (e.current = t);\n}, Q = () => typeof document > \"u\" || !x(document.activeElement) ? null : document.activeElement, $ = i({ size: {\n\tdefault: {\n\t\tclassName: J(\"defaultSize\"),\n\t\tpurpose: \"Focused decision or short form\",\n\t\ttokens: [\"radius-overlay\", \"space-32\"]\n\t},\n\twide: {\n\t\tclassName: J(\"wide\"),\n\t\tpurpose: \"Detailed comparison or multi-section form\",\n\t\ttokens: [\"radius-overlay\", \"space-64\"]\n\t}\n} }), ye = i({ size: \"default\" }), be = ({ children: e, entryMotion: t }) => {\n\tlet n = X(), r = p(null);\n\treturn w(), D(r, n.open), /* @__PURE__ */ h(\"div\", {\n\t\tclassName: J(\"layer\"),\n\t\t\"data-rly-dialog-entry-motion\": t,\n\t\t\"data-rly-dialog-layer\": \"\",\n\t\t\"data-rly-modal-layer\": \"\",\n\t\tref: r,\n\t\tchildren: e\n\t});\n}, xe = Object.freeze({\n\tClose: (e) => /* @__PURE__ */ h(s.Close, {\n\t\tasChild: !0,\n\t\tchildren: /* @__PURE__ */ h(R, { ...e })\n\t}),\n\tContent: ({ children: e, className: r, description: i, entryMotion: o = \"intrinsic\", initialFocusRef: c, size: l = \"default\", title: u, ...d }) => {\n\t\tlet f = X(), p = b(f.open, o), m = n(u, \"Dialog title\"), _ = i === void 0 ? void 0 : n(i, \"Dialog description\");\n\t\treturn /* @__PURE__ */ h(t, { children: (t) => /* @__PURE__ */ h(s.Portal, {\n\t\t\tcontainer: t,\n\t\t\tchildren: /* @__PURE__ */ g(be, {\n\t\t\t\tentryMotion: p,\n\t\t\t\tchildren: [/* @__PURE__ */ h(s.Overlay, {\n\t\t\t\t\tclassName: J(\"overlay\"),\n\t\t\t\t\t\"data-rly-dialog-overlay\": \"\",\n\t\t\t\t\tonPointerDown: () => {\n\t\t\t\t\t\tf.requestOpenChange(!1);\n\t\t\t\t\t}\n\t\t\t\t}), /* @__PURE__ */ g(s.Content, {\n\t\t\t\t\t...d,\n\t\t\t\t\t..._ === void 0 ? { \"aria-describedby\": void 0 } : {},\n\t\t\t\t\tclassName: a(J(\"content\"), $.size[l].className, r),\n\t\t\t\t\tonCloseAutoFocus: (e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpenAutoFocus: (e) => {\n\t\t\t\t\t\tlet t = Q();\n\t\t\t\t\t\tf.triggerRef.current === null && t !== null && (f.restoreTargetRef.current = t);\n\t\t\t\t\t\tlet n = c?.current;\n\t\t\t\t\t\tn != null && (e.preventDefault(), n.focus());\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [/* @__PURE__ */ g(\"header\", {\n\t\t\t\t\t\tclassName: J(\"header\"),\n\t\t\t\t\t\tchildren: [/* @__PURE__ */ h(s.Title, {\n\t\t\t\t\t\t\tclassName: J(\"title\"),\n\t\t\t\t\t\t\tchildren: m\n\t\t\t\t\t\t}), _ === void 0 ? null : /* @__PURE__ */ h(s.Description, {\n\t\t\t\t\t\t\tclassName: J(\"description\"),\n\t\t\t\t\t\t\tchildren: _\n\t\t\t\t\t\t})]\n\t\t\t\t\t}), /* @__PURE__ */ h(\"div\", {\n\t\t\t\t\t\tclassName: J(\"body\"),\n\t\t\t\t\t\tchildren: e\n\t\t\t\t\t})]\n\t\t\t\t})]\n\t\t\t})\n\t\t}) });\n\t},\n\tRoot: ({ children: e, defaultOpen: t = !1, onOpenChange: n, open: r }) => {\n\t\tlet [i, a] = m(t), o = C(), c = (r ?? i) && o, l = p(c), u = p(null), d = p(c ? Q() : null);\n\t\tc && !l.current && (d.current = u.current ?? Q());\n\t\tlet g = (e) => {\n\t\t\te && (d.current = u.current ?? Q()), r === void 0 && a(e), n?.(e);\n\t\t};\n\t\treturn f(() => {\n\t\t\tl.current !== c && (l.current = c, c ? O() : k(d.current));\n\t\t}, [c]), /* @__PURE__ */ h(S, { children: /* @__PURE__ */ h(Y.Provider, {\n\t\t\tvalue: {\n\t\t\t\topen: c,\n\t\t\t\trequestOpenChange: g,\n\t\t\t\trestoreTargetRef: d,\n\t\t\t\ttriggerRef: u\n\t\t\t},\n\t\t\tchildren: /* @__PURE__ */ h(s.Root, {\n\t\t\t\tmodal: !0,\n\t\t\t\tonOpenChange: g,\n\t\t\t\topen: c,\n\t\t\t\tchildren: e\n\t\t\t})\n\t\t}) });\n\t},\n\tTrigger: ({ ref: e, ...t }) => {\n\t\tlet n = X();\n\t\treturn /* @__PURE__ */ h(s.Trigger, {\n\t\t\tasChild: !0,\n\t\t\tchildren: /* @__PURE__ */ h(R, {\n\t\t\t\t...t,\n\t\t\t\tref: (t) => {\n\t\t\t\t\tn.triggerRef.current = t, Z(e, t);\n\t\t\t\t}\n\t\t\t})\n\t\t});\n\t}\n});\n//#endregion\nexport { ie as _, q as a, j as b, G as c, U as d, H as f, R as g, ce as h, he as i, pe as l, B as m, ye as n, _e as o, oe as p, $ as r, fe as s, xe as t, ue as u, L as v, ne as x, M as y };\n\n//# sourceMappingURL=Dialog-DwSIPb-B.js.map"],"file":"Dialog-DwSIPb-B-DVn37afM.js"}
|