@vellumai/web 0.8.8 → 0.8.9-staging.1
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/dist/assets/BundleConfirmPage-p6PoFo-P.js +1 -0
- package/dist/assets/{QueryClientProvider-DBAeGN3q.js → QueryClientProvider-DNHWXaGq.js} +1 -1
- package/dist/assets/{about-page-C4tN0hSY.js → about-page-COonOOTU.js} +1 -1
- package/dist/assets/{account-page-e-4zB_8t.js → account-page-CXZMoObS.js} +1 -1
- package/dist/assets/{account-shell-BZu7oVl3.js → account-shell-mWbkdjh7.js} +1 -1
- package/dist/assets/add-credits-modal-COZFg6LO.js +1 -0
- package/dist/assets/{advanced-page-Du0vGXNL.js → advanced-page-BcEt2J3g.js} +1 -1
- package/dist/assets/ai-page-DYFuxo_7.js +1 -0
- package/dist/assets/api-D_w9HGm1.js +39 -0
- package/dist/assets/{api-key-screen-Bgk6XGC1.js → api-key-screen-DbyDsrCh.js} +1 -1
- package/dist/assets/{app-html-cache-BsFOfI0R.js → app-html-cache-DZyE8zzT.js} +1 -1
- package/dist/assets/{archive-yWA8_b2E.js → archive-CeE0yzQG.js} +1 -1
- package/dist/assets/archive-page-D2PmzZlQ.js +1 -0
- package/dist/assets/arrow-up-BfbWaCwD.js +1 -0
- package/dist/assets/{assistant-feature-flag-store-CNdFPRBD.js → assistant-feature-flag-store-BiEkLFvf.js} +1 -1
- package/dist/assets/{assistant-identity-store-Y4grVs1H.js → assistant-identity-store-CdxvXGiq.js} +1 -1
- package/dist/assets/assistant-status-panel-DpDMJx-N.js +1 -0
- package/dist/assets/auth-store-RIjuTM3X.js +1 -0
- package/dist/assets/{avatar-api-BfDoaCjw.js → avatar-api-CWZvvL87.js} +1 -1
- package/dist/assets/{bell-BFRXSoMR.js → bell-NxrwR0Jo.js} +1 -1
- package/dist/assets/billing-page-Boeh64OU.js +34 -0
- package/dist/assets/{bug-wSdnBKWO.js → bug-B4KAU7DN.js} +1 -1
- package/dist/assets/button-DdEh-9f_.js +1 -0
- package/dist/assets/{calendar-xwiYi6y2.js → calendar-B2_jTx01.js} +1 -1
- package/dist/assets/capture-error-Di3WCQrq.js +4 -0
- package/dist/assets/card-CL5iEMJO.js +1 -0
- package/dist/assets/check-CW0KmV0o.js +1 -0
- package/dist/assets/checkbox-qlcBvCFW.js +1 -0
- package/dist/assets/chevron-right-DF2EzMUB.js +1 -0
- package/dist/assets/{chevron-up-C-4xJEr7.js → chevron-up-cXyM5mu2.js} +1 -1
- package/dist/assets/{chunk-5KNZJZUH-BpLAEZ0-.js → chunk-5KNZJZUH-B4b1m-Ya.js} +1 -1
- package/dist/assets/cn-DFqQkJlk.js +1 -0
- package/dist/assets/command-palette-Ddl69DKF.js +1 -0
- package/dist/assets/{community-page-BWc9-V5m.js → community-page-COMe3TOq.js} +1 -1
- package/dist/assets/confirm-dialog-DsrjEJ8n.js +1 -0
- package/dist/assets/{connect-page-DLP-KRIF.js → connect-page-jZJ6gRVr.js} +1 -1
- package/dist/assets/{contacts-gateway-BF6L_WJp.js → contacts-gateway-Dzzr2RB0.js} +1 -1
- package/dist/assets/contacts-page-route-lxxkveBK.js +1 -0
- package/dist/assets/{conversation-store-D8-qWog8.js → conversation-store-BB-CCPz4.js} +1 -1
- package/dist/assets/createLucideIcon-Bjb-Kuq7.js +1 -0
- package/dist/assets/danger-zone-redirect-page-qLWyglUT.js +1 -0
- package/dist/assets/debug-page-wZauraKd.js +3 -0
- package/dist/assets/{deploy-dialogs-Ddx6WsXp.js → deploy-dialogs-DEaPwU4I.js} +1 -1
- package/dist/assets/{detail-card-Y8InXOgy.js → detail-card-B-us8iM5.js} +1 -1
- package/dist/assets/developer-page-YiIciPaV.js +1 -0
- package/dist/assets/{devices-page-4yNwXw0J.js → devices-page-C1EjgTdX.js} +1 -1
- package/dist/assets/dist-B1Fpj7hg.js +1 -0
- package/dist/assets/dist-BagEH8Xp.js +153 -0
- package/dist/assets/dist-D6LVk88Z.js +45 -0
- package/dist/assets/document-viewer-page-BbNZ_Hav.js +1 -0
- package/dist/assets/{dollar-sign-D_9hooHL.js → dollar-sign-DjJlJMJx.js} +1 -1
- package/dist/assets/{domain-field-CyNgwvDW.js → domain-field-DiimaXlx.js} +1 -1
- package/dist/assets/dropdown-CocFV5yi.js +1 -0
- package/dist/assets/{earn-credits-modal-BfVEDIqn.js → earn-credits-modal-CWJ3z13E.js} +1 -1
- package/dist/assets/{ellipsis-vertical-f27t2xXb.js → ellipsis-vertical-BYI2M0Y_.js} +1 -1
- package/dist/assets/{emails-page-VM8fJ5kb.js → emails-page-HAwU0PG9.js} +1 -1
- package/dist/assets/{esm-BesMJi2r.js → esm-BuFsuxJb.js} +1 -1
- package/dist/assets/{esm-B9MFZJ_e.js → esm-CqsAL_eV.js} +1 -1
- package/dist/assets/{esm-BAXpcEfg.js → esm-D_3mHrKn.js} +1 -1
- package/dist/assets/{esm-BBKnACgF.js → esm-g5en09UW.js} +1 -1
- package/dist/assets/{esm-Dlx5ghIf.js → esm-t46uzkal.js} +1 -1
- package/dist/assets/{external-link-CcV79Arv.js → external-link-CYugXYpk.js} +1 -1
- package/dist/assets/feature-flag-catalog-OHgjjRa5.js +1 -0
- package/dist/assets/file-markdown-CNb-AHAO.js +2 -0
- package/dist/assets/format-file-size-Cikb_8y_.js +1 -0
- package/dist/assets/general-page-C0EPZJvL.js +1 -0
- package/dist/assets/{globe-B6unPYdp.js → globe-DZ63eZbH.js} +1 -1
- package/dist/assets/{google-logo-NlVU0R23.js → google-logo-uJcTP3BJ.js} +1 -1
- package/dist/assets/{hard-drive-C5ssi802.js → hard-drive-wO6bPcoA.js} +1 -1
- package/dist/assets/hatching-screen-B2hk7GXP.js +1 -0
- package/dist/assets/home-page-route-Dr56dr0q.js +1 -0
- package/dist/assets/hosting-screen-DgRRwkuU.js +1 -0
- package/dist/assets/identity-page-route-OErxaFHE.js +1 -0
- package/dist/assets/index-BKvehXUt.css +2 -0
- package/dist/assets/index-DTWPgS5K.js +124 -0
- package/dist/assets/input-Cu3PPVCq.js +1 -0
- package/dist/assets/{inspect-page-CsvH5Rih.js → inspect-page-Y-3HQoro.js} +2 -2
- package/dist/assets/{install-OHIUtZSu.js → install-aIAefgSX.js} +1 -1
- package/dist/assets/integrations-page-B7Tul8x3.js +1 -0
- package/dist/assets/{intelligence-layout-Onjx6_Xb.js → intelligence-layout-DYIK-GwZ.js} +1 -1
- package/dist/assets/keyboard-shortcuts-page-nlhuxBKZ.js +1 -0
- package/dist/assets/lib-Bq3kPGq-.js +29 -0
- package/dist/assets/{lib-B020BIem.js → lib-CyTHAhFX.js} +1 -1
- package/dist/assets/{library-detail-page-PP_bf3mt.js → library-detail-page-DkG1qTGp.js} +1 -1
- package/dist/assets/library-page-Cb9eaPfO.js +1 -0
- package/dist/assets/{link-2-B0QONFsy.js → link-2-DFhelG7P.js} +1 -1
- package/dist/assets/loader-circle-B9sFQ7nF.js +1 -0
- package/dist/assets/local-mode-Cx_DqCMC.js +1 -0
- package/dist/assets/{login-flow-BbsypWKa.js → login-flow-E2FJkpFg.js} +1 -1
- package/dist/assets/login-page-DLNq7ol2.js +1 -0
- package/dist/assets/{logout-page-BkzePxva.js → logout-page-CcNgLKFy.js} +1 -1
- package/dist/assets/{logs-layout-Cs8hHTTu.js → logs-layout-Dd6YucHg.js} +1 -1
- package/dist/assets/{memory-router-playground-page-4uw1uIhg.js → memory-router-playground-page-C9Bunjup.js} +1 -1
- package/dist/assets/menu-B79-l6IU.js +1 -0
- package/dist/assets/{minimize-2-H-zinYcX.js → minimize-2-BEDsyPze.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-CSQF2rSV.js → mobile-sidebar-drawer-BMjmzJIM.js} +1 -1
- package/dist/assets/modal-BhuCoLJX.js +1 -0
- package/dist/assets/native-biometric-CfMWTyzx.js +6 -0
- package/dist/assets/{native-file-C2WSS7-h.js → native-file-uqYhUlky.js} +2 -2
- package/dist/assets/notice-CF2pptne.js +1 -0
- package/dist/assets/{notifications-page-DRppz7Ms.js → notifications-page-BQVUPJrc.js} +1 -1
- package/dist/assets/{oauth-complete-page-aT6QAfCd.js → oauth-complete-page-GCeZ7H70.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-ClfKIV61.js → oauth-popup-complete-page-v7G3PUyR.js} +2 -2
- package/dist/assets/{octagon-x-Bze4QGjG.js → octagon-x-DV9qasaC.js} +1 -1
- package/dist/assets/{onboarding-layout-DMOume9Z.js → onboarding-layout-CAwJlju5.js} +1 -1
- package/dist/assets/{page-shell-C4yGVVNa.js → page-shell-DHcdwoAZ.js} +1 -1
- package/dist/assets/panel-item-FzMfzMJA.js +1 -0
- package/dist/assets/password-reset-page-qJLxcjME.js +1 -0
- package/dist/assets/{pdf-BbxrOchE.js → pdf-BrYaENqn.js} +1 -1
- package/dist/assets/{pencil-CESg1M7c.js → pencil-ulB7Z-e-.js} +1 -1
- package/dist/assets/platform-loopback-page-Dh4Fk6vZ.js +1 -0
- package/dist/assets/plugin-detail-page-T0e3dY-Z.js +1 -0
- package/dist/assets/plugins-page-ynhoZs-n.js +1 -0
- package/dist/assets/portal-container-DIXEBWUe.js +1 -0
- package/dist/assets/pre-chat-flow-CuvP36-0.js +1 -0
- package/dist/assets/privacy-page-e7nbmXwD.js +1 -0
- package/dist/assets/privacy-screen-JbcO_xgm.js +1 -0
- package/dist/assets/progress-bar-BxeXgLhp.js +1 -0
- package/dist/assets/provider-callback-page-Cdtz4Epz.js +1 -0
- package/dist/assets/{provider-key-DiyETKhK.js → provider-key-BittA9TY.js} +1 -1
- package/dist/assets/{provider-signup-page-BpqjcKpY.js → provider-signup-page-CATLdFQn.js} +1 -1
- package/dist/assets/{query-tags-yOSQTht4.js → query-tags-CXf0mBKU.js} +1 -1
- package/dist/assets/quick-input-page-5mI3RTsv.js +1 -0
- package/dist/assets/react-query.gen-Cj6WQdON.js +1 -0
- package/dist/assets/{resize-errors-C_vO4oid.js → resize-errors-qjdyi4GX.js} +1 -1
- package/dist/assets/resolved-assistants-store-em3zt7_3.js +1 -0
- package/dist/assets/routes-DminYfDX.js +1 -0
- package/dist/assets/{save-CBzZvuPl.js → save-Cg454LRm.js} +1 -1
- package/dist/assets/{schedules-mjx6ouZ2.js → schedules-BTZchh0D.js} +1 -1
- package/dist/assets/schedules-page-BdaO92vz.js +1 -0
- package/dist/assets/{sdk.gen-BO4vbMAj.js → sdk.gen-BnTFwWLf.js} +1 -1
- package/dist/assets/{sdk.gen-up8j0_uF.js → sdk.gen-govMfbgX.js} +1 -1
- package/dist/assets/select-assistant-screen-C0EP-6wf.js +1 -0
- package/dist/assets/settings-layout-D402PkLd.js +1 -0
- package/dist/assets/share-feedback-modal-Ct3bOmhU.js +1 -0
- package/dist/assets/shortcut-keys-FXO7qQjX.js +1 -0
- package/dist/assets/{sidebar-tree-D9JFk5pQ.js → sidebar-tree-Dduanhwq.js} +1 -1
- package/dist/assets/{signup-page-CI7xziFt.js → signup-page-1C3Lfl0s.js} +1 -1
- package/dist/assets/skills-page-BB1Ne-8V.js +1 -0
- package/dist/assets/sounds-page-BmRneQW4.js +1 -0
- package/dist/assets/{src-Bah0_lDG.js → src-BqiaDQPO.js} +3 -3
- package/dist/assets/stat-square-sRJmexc-.js +1 -0
- package/dist/assets/step-indicator-dots-DpYYCL7E.js +1 -0
- package/dist/assets/{subagent-detail-panel-BcUQAemM.js → subagent-detail-panel-DCmHp5r5.js} +2 -2
- package/dist/assets/{system-events-page-BC0hWcTo.js → system-events-page-BOZOscuS.js} +1 -1
- package/dist/assets/system-events-redirect-page-Dq1fO1WL.js +1 -0
- package/dist/assets/tag-Ccr7Quy6.js +1 -0
- package/dist/assets/{target-B8JHLfTN.js → target-3RiNSDOr.js} +1 -1
- package/dist/assets/{tiptap-document-editor-CIVPtfOQ.js → tiptap-document-editor-DSeOYXTN.js} +2 -2
- package/dist/assets/toast-3Fi9QU7z.js +1 -0
- package/dist/assets/toggle-CEm3M86o.js +1 -0
- package/dist/assets/{tool-detail-panel-y2CN1PtJ.js → tool-detail-panel-DvZGjmRf.js} +1 -1
- package/dist/assets/{trace-page-BX5w9eln.js → trace-page-OVXfT7ig.js} +1 -1
- package/dist/assets/typography-Czgs_2w_.js +1 -0
- package/dist/assets/{upgrade-cancel-page-KQ4EN_I1.js → upgrade-cancel-page-CbjsDz_I.js} +1 -1
- package/dist/assets/{upgrade-success-page-Bmv-ncJ6.js → upgrade-success-page-BT3slnw3.js} +1 -1
- package/dist/assets/usage-page-GlfQOrlv.js +1 -0
- package/dist/assets/use-active-assistant-id--1Ick1YC.js +1 -0
- package/dist/assets/use-current-platform-assistant-D-5r_x8u.js +1 -0
- package/dist/assets/use-is-org-ready-okrWrmTt.js +1 -0
- package/dist/assets/{use-oauth-complete-deep-link-listener-BkbO4kZ1.js → use-oauth-complete-deep-link-listener-DxjdcVr0.js} +1 -1
- package/dist/assets/{use-reduced-motion-GQ_HVFpK.js → use-reduced-motion-DVYTox9p.js} +1 -1
- package/dist/assets/{useMutation-DTb3lMvF.js → useMutation-BuofVRHk.js} +1 -1
- package/dist/assets/{useQuery-DAtrV0RI.js → useQuery-D2zf6Uhu.js} +1 -1
- package/dist/assets/{utils-DfoBtDfL.js → utils-BQby93tO.js} +1 -1
- package/dist/assets/viewer-store-DIa3mbc-.js +1 -0
- package/dist/assets/{voice-page-D3jl6Uq8.js → voice-page-DBuSoStd.js} +1 -1
- package/dist/assets/{wand-sparkles-CIV_5Oi6.js → wand-sparkles-CEPQLm45.js} +1 -1
- package/dist/assets/{weather-forecast-display-BA-3Q5jY.js → weather-forecast-display-FVtVZmTZ.js} +1 -1
- package/dist/assets/welcome-screen-bOpdZmIK.js +1 -0
- package/dist/assets/workspace-page-DoXLAgOy.js +1 -0
- package/dist/assets/x-CaVViVFn.js +1 -0
- package/dist/assets/x-D0wgTl3V.js +1 -0
- package/dist/assets/zwitch-qcFX26Jh.js +1 -0
- package/dist/index.html +78 -78
- package/package.json +1 -1
- package/dist/assets/add-credits-modal-p0gkX1yC.js +0 -1
- package/dist/assets/ai-page-BQOcmKeW.js +0 -1
- package/dist/assets/api-8hqpGaif.js +0 -39
- package/dist/assets/archive-page-DhDeJH4l.js +0 -1
- package/dist/assets/arrow-up-Cev-d0qQ.js +0 -1
- package/dist/assets/assistant-status-panel-C3CvCBVl.js +0 -1
- package/dist/assets/auth-store-CYbo7naZ.js +0 -1
- package/dist/assets/billing-page-CyTcQ9ki.js +0 -34
- package/dist/assets/button-Cs9tc8OR.js +0 -1
- package/dist/assets/capture-error-1Tr5aMfq.js +0 -1
- package/dist/assets/card-BcKGvsaa.js +0 -1
- package/dist/assets/check-DqeyrftF.js +0 -1
- package/dist/assets/checkbox-hJlRqWtn.js +0 -1
- package/dist/assets/chevron-right-CJ0Oykrn.js +0 -1
- package/dist/assets/cn-DIX4PZch.js +0 -1
- package/dist/assets/command-palette-CTF-tqv7.js +0 -1
- package/dist/assets/confirm-dialog-DavdF-L4.js +0 -1
- package/dist/assets/contacts-page-route-ziTjDj3t.js +0 -1
- package/dist/assets/createLucideIcon-CSvzx8tc.js +0 -1
- package/dist/assets/danger-zone-redirect-page-BlS6Bao4.js +0 -1
- package/dist/assets/debug-page-B38HF3wu.js +0 -3
- package/dist/assets/developer-page-CVcwOCG9.js +0 -1
- package/dist/assets/dist-3bWmqQYy.js +0 -45
- package/dist/assets/dist-Cb2Epurm.js +0 -1
- package/dist/assets/dist-Ck9KSeuV.js +0 -153
- package/dist/assets/document-viewer-page-BZqF90o0.js +0 -1
- package/dist/assets/dropdown-PPtOL9bp.js +0 -1
- package/dist/assets/exports-B_RC9sMS.js +0 -4
- package/dist/assets/feature-flag-catalog-CRgdQmMF.js +0 -1
- package/dist/assets/file-markdown-DjJ2NSmS.js +0 -1
- package/dist/assets/gateway-session-CaFk8wfN.js +0 -1
- package/dist/assets/general-page-m_m-DrX4.js +0 -1
- package/dist/assets/hatching-screen-CI8iOd8-.js +0 -1
- package/dist/assets/home-page-route-ePg1Cu2z.js +0 -1
- package/dist/assets/hosting-screen-CA6XnVWn.js +0 -1
- package/dist/assets/identity-page-route-BcE8OAJ6.js +0 -1
- package/dist/assets/index-Cb930VA2.css +0 -2
- package/dist/assets/index-DUwiZuxe.js +0 -124
- package/dist/assets/input-DwAJUlac.js +0 -1
- package/dist/assets/integrations-page-B54hIoCi.js +0 -1
- package/dist/assets/lib-h5KT63h9.js +0 -29
- package/dist/assets/library-page-Cg1IA3a6.js +0 -1
- package/dist/assets/loader-circle-FEkI0Am4.js +0 -1
- package/dist/assets/login-page-BVX4fr6R.js +0 -1
- package/dist/assets/loopback-auth-Dclf8zKT.js +0 -1
- package/dist/assets/menu-0h93UDZw.js +0 -1
- package/dist/assets/modal-C7CS3Y_X.js +0 -1
- package/dist/assets/native-biometric-B4t4zElu.js +0 -6
- package/dist/assets/notice-BWm2kHlI.js +0 -1
- package/dist/assets/panel-item-BPosLg5Y.js +0 -1
- package/dist/assets/password-reset-page-CugjFViT.js +0 -1
- package/dist/assets/platform-loopback-page-DSAaBS5p.js +0 -1
- package/dist/assets/plugins-page-CYcKA2Ai.js +0 -1
- package/dist/assets/portal-container-CKtYcZfP.js +0 -1
- package/dist/assets/pre-chat-flow-BLHHoHka.js +0 -1
- package/dist/assets/privacy-page-HiOgrDR9.js +0 -1
- package/dist/assets/privacy-screen-Ca0oGFo0.js +0 -1
- package/dist/assets/progress-bar-CgQMQ_UR.js +0 -1
- package/dist/assets/provider-callback-page-DpGReURP.js +0 -1
- package/dist/assets/react-query.gen-CfXF72qo.js +0 -1
- package/dist/assets/routes-C-DwSCj0.js +0 -1
- package/dist/assets/schedules-page-zyXnmD3U.js +0 -1
- package/dist/assets/selection-store-BCKoLRDh.js +0 -1
- package/dist/assets/settings-layout-Bsi8NeES.js +0 -1
- package/dist/assets/share-feedback-modal-BgfMO7ED.js +0 -1
- package/dist/assets/skills-page-DrpHzObX.js +0 -1
- package/dist/assets/sounds-page-Dw_ASs77.js +0 -1
- package/dist/assets/stat-square-CMFH3mHq.js +0 -1
- package/dist/assets/step-indicator-dots-ClKaa4nc.js +0 -1
- package/dist/assets/system-events-redirect-page-BrzAhJZT.js +0 -1
- package/dist/assets/tag-BkZB4euH.js +0 -1
- package/dist/assets/toast-Cii5pffK.js +0 -1
- package/dist/assets/toggle-DGzEs0L1.js +0 -1
- package/dist/assets/typography-PN7B1rrW.js +0 -1
- package/dist/assets/usage-page-CXNTUrjR.js +0 -1
- package/dist/assets/use-active-assistant-id-kjFL4dWB.js +0 -1
- package/dist/assets/use-current-platform-assistant-BXRU4B3R.js +0 -1
- package/dist/assets/use-debounced-value-DK0n_BKN.js +0 -1
- package/dist/assets/use-is-org-ready-Dtde_1TT.js +0 -1
- package/dist/assets/viewer-store-BIIKltsh.js +0 -1
- package/dist/assets/welcome-screen-B3oZjIVb.js +0 -1
- package/dist/assets/workspace-page-CUxLMyKc.js +0 -1
- package/dist/assets/x-2OoTSOWJ.js +0 -1
- package/dist/assets/x-CwP6G6OK.js +0 -1
- /package/dist/assets/{api-errors-DhNZwQy5.js → api-errors-DApr8J5Z.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-BKb8hhzM.js → avatar-bundled-components-DC9a0Ily.js} +0 -0
- /package/dist/assets/{client.gen-BKAMS0D0.js → client.gen-CsQeNtuq.js} +0 -0
- /package/dist/assets/{create-selectors-LbkU9b0a.js → create-selectors-CDULelrw.js} +0 -0
- /package/dist/assets/{createLucideIcon-D8wUFCt3.js → createLucideIcon-BjZY5k1w.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-B2dzgy2b.js → emoji-catalog-data-DvyOWL-F.js} +0 -0
- /package/dist/assets/{format-B2Cl9naL.js → format-Bbxbyy7J.js} +0 -0
- /package/dist/assets/{format-date-C_j5UjES.js → format-date-CdAgBadL.js} +0 -0
- /package/dist/assets/{is-electron-1CyUiqR4.js → is-electron-CavSPgmY.js} +0 -0
- /package/dist/assets/{jsx-runtime-XSukodg_.js → jsx-runtime-CVSDxk6A.js} +0 -0
- /package/dist/assets/{llm-dimension-DPVignMk.js → llm-dimension-CBhYSW7t.js} +0 -0
- /package/dist/assets/{preload-helper-CS_K7l1U.js → preload-helper-BewR0kVT.js} +0 -0
- /package/dist/assets/{queryOptions-C_ypb2wA.js → queryOptions-BtNi-_9H.js} +0 -0
- /package/dist/assets/{usage-window-CsjC43Gn.js → usage-window-COo_tIlP.js} +0 -0
- /package/dist/assets/{wasm-CGZ0ykRa.js → wasm-D-aQj7M_.js} +0 -0
- /package/dist/assets/{with-selector-CZyYmUFz.js → with-selector-NDiUwRRR.js} +0 -0
- /package/dist/assets/{xterm-AXHTOo82.js → xterm-EejPUdmw.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-CfpfPbfB.js → xterm-addon-fit-BRL8IZ7N.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-BjZY5k1w.js";var t=e(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{C as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,u as y,v as b,w as x,x as S,y as C}from"./portal-container-DIXEBWUe.js";import{t as w}from"./jsx-runtime-CVSDxk6A.js";import{i as ee,o as T,r as te,t as E}from"./cn-DFqQkJlk.js";var D=e(t(),1);function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var k=w(),ne=`DismissableLayer`,A=`dismissableLayer.update`,j=`dismissableLayer.pointerDownOutside`,re=`dismissableLayer.focusOutside`,M,N=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P=D.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=D.useContext(N),[d,f]=D.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=D.useState({}),h=T(t,e=>f(e)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(_),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=ae(e=>{let t=e.target,n=[...u.branches].some(e=>e.contains(t));!S||n||(i?.(e),s?.(e),e.defaultPrevented||c?.())},p),w=oe(e=>{let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p);return b(e=>{y===u.layers.size-1&&(r?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},p),D.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(M=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),I(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=M)}},[d,p,n,u]),D.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),I())},[d,u]),D.useEffect(()=>{let e=()=>m({});return document.addEventListener(A,e),()=>document.removeEventListener(A,e)},[]),(0,k.jsx)(a.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:O(e.onFocusCapture,w.onFocusCapture),onBlurCapture:O(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});P.displayName=ne;var ie=`DismissableLayerBranch`,F=D.forwardRef((e,t)=>{let n=D.useContext(N),r=D.useRef(null),i=T(t,r);return D.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,k.jsx)(a.div,{...e,ref:i})});F.displayName=ie;function ae(e,t=globalThis?.document){let n=C(e),r=D.useRef(!1),i=D.useRef(()=>{});return D.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){L(j,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function oe(e,t=globalThis?.document){let n=C(e),r=D.useRef(!1);return D.useEffect(()=>{let e=e=>{e.target&&!r.current&&L(re,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function I(){let e=new CustomEvent(A);document.dispatchEvent(e)}function L(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?S(i,a):i.dispatchEvent(a)}var R=`Popper`,[z,B]=n(R),[se,ce]=z(R),V=e=>{let{__scopePopper:t,children:n}=e,[r,i]=D.useState(null);return(0,k.jsx)(se,{scope:t,anchor:r,onAnchorChange:i,children:n})};V.displayName=R;var H=`PopperAnchor`,U=D.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=ce(H,n),s=D.useRef(null),c=T(t,s);return D.useEffect(()=>{o.onAnchorChange(r?.current||s.current)}),r?null:(0,k.jsx)(a.div,{...i,ref:c})});U.displayName=H;var W=`PopperContent`,[le,ue]=z(W),G=D.forwardRef((e,t)=>{let{__scopePopper:n,side:l=`bottom`,sideOffset:d=0,align:m=`center`,alignOffset:h=0,arrowPadding:_=0,avoidCollisions:b=!0,collisionBoundary:x=[],collisionPadding:S=0,sticky:w=`partial`,hideWhenDetached:ee=!1,updatePositionStrategy:te=`optimized`,onPlaced:E,...O}=e,ne=ce(W,n),[A,j]=D.useState(null),re=T(t,e=>j(e)),[M,N]=D.useState(null),P=i(M),ie=P?.width??0,F=P?.height??0,ae=l+(m===`center`?``:`-`+m),oe=typeof S==`number`?S:{top:0,right:0,bottom:0,left:0,...S},I=Array.isArray(x)?x:[x],L=I.length>0,R={padding:oe,boundary:I.filter(pe),altBoundary:L},{refs:z,floatingStyles:B,placement:se,isPositioned:V,middlewareData:H}=p({strategy:`fixed`,placement:ae,whileElementsMounted:(...e)=>u(...e,{animationFrame:te===`always`}),elements:{reference:ne.anchor},middleware:[s({mainAxis:d+F,alignmentAxis:h}),b&&c({mainAxis:!0,crossAxis:!1,limiter:w===`partial`?y():void 0,...R}),b&&o({...R}),g({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),M&&v({element:M,padding:_}),me({arrowWidth:ie,arrowHeight:F}),ee&&f({strategy:`referenceHidden`,...R})]}),[U,ue]=he(se),G=C(E);r(()=>{V&&G?.()},[V,G]);let K=H.arrow?.x,de=H.arrow?.y,fe=H.arrow?.centerOffset!==0,[ge,_e]=D.useState();return r(()=>{A&&_e(window.getComputedStyle(A).zIndex)},[A]),(0,k.jsx)(`div`,{ref:z.setFloating,"data-radix-popper-content-wrapper":``,style:{...B,transform:V?B.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ge,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(` `),...H.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,k.jsx)(le,{scope:n,placedSide:U,onArrowChange:N,arrowX:K,arrowY:de,shouldHideArrow:fe,children:(0,k.jsx)(a.div,{"data-side":U,"data-align":ue,...O,ref:re,style:{...O.style,animation:V?void 0:`none`}})})})});G.displayName=W;var K=`PopperArrow`,de={top:`bottom`,right:`left`,bottom:`top`,left:`right`},fe=D.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=ue(K,n),a=de[i.placedSide];return(0,k.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,k.jsx)(h,{...r,ref:t,style:{...r.style,display:`block`}})})});fe.displayName=K;function pe(e){return e!==null}var me=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=he(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function he(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ge=V,_e=U,ve=G,ye=fe;function be(e,t){return D.useReducer((e,n)=>t[e][n]??e,e)}var xe=e=>{let{present:t,children:n}=e,r=Se(t),i=typeof n==`function`?n({present:r.isPresent}):D.Children.only(n),a=T(r.ref,Ce(i));return typeof n==`function`||r.isPresent?D.cloneElement(i,{ref:a}):null};xe.displayName=`Presence`;function Se(e){let[t,n]=D.useState(),i=D.useRef(null),a=D.useRef(e),o=D.useRef(`none`),[s,c]=be(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return D.useEffect(()=>{let e=q(i.current);o.current=s===`mounted`?e:`none`},[s]),r(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=q(t);e?c(`MOUNT`):i===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),r(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let o=q(i.current).includes(r.animationName);if(r.target===t&&o&&(c(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(o.current=q(i.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:D.useCallback(e=>{i.current=e?getComputedStyle(e):null,n(e)},[])}}function q(e){return e?.animationName||`none`}function Ce(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var we=Symbol(`radix.slottable`);function Te(e){let t=({children:e})=>(0,k.jsx)(k.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=we,t}var Ee=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),De=`VisuallyHidden`,Oe=D.forwardRef((e,t)=>(0,k.jsx)(a.span,{...e,ref:t,style:{...Ee,...e.style}}));Oe.displayName=De;var ke=Oe,[J,Ae]=n(`Tooltip`,[B]),Y=B(),je=`TooltipProvider`,Me=700,Ne=`tooltip.open`,[Pe,Fe]=J(je),Ie=e=>{let{__scopeTooltip:t,delayDuration:n=Me,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=D.useRef(!0),s=D.useRef(!1),c=D.useRef(0);return D.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,k.jsx)(Pe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:D.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Ie.displayName=je;var X=`Tooltip`,[Le,Z]=J(X),Re=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Fe(X,e.__scopeTooltip),u=Y(t),[d,f]=D.useState(null),p=l(),m=D.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,v=D.useRef(!1),[y,b]=_({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ne))):c.onClose(),a?.(e)},caller:X}),x=D.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=D.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,b(!0)},[b]),C=D.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),w=D.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,b(!0),m.current=0},g)},[g,b]);return D.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,k.jsx)(ge,{...u,children:(0,k.jsx)(Le,{scope:t,contentId:p,open:y,stateAttribute:x,trigger:d,onTriggerChange:f,onTriggerEnter:D.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:D.useCallback(()=>{h?C():(window.clearTimeout(m.current),m.current=0)},[C,h]),onOpen:S,onClose:C,disableHoverableContent:h,children:n})})};Re.displayName=X;var ze=`TooltipTrigger`,Be=D.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Z(ze,n),o=Fe(ze,n),s=Y(n),c=T(t,D.useRef(null),i.onTriggerChange),l=D.useRef(!1),u=D.useRef(!1),d=D.useCallback(()=>l.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,k.jsx)(_e,{asChild:!0,...s,children:(0,k.jsx)(a.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:O(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:O(e.onPointerDown,()=>{i.open&&i.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:O(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:O(e.onBlur,i.onClose),onClick:O(e.onClick,i.onClose)})})});Be.displayName=ze;var Ve=`TooltipPortal`,[He,Ue]=J(Ve,{forceMount:void 0}),We=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Z(Ve,t);return(0,k.jsx)(He,{scope:t,forceMount:n,children:(0,k.jsx)(xe,{present:n||a.open,children:(0,k.jsx)(d,{asChild:!0,container:i,children:r})})})};We.displayName=Ve;var Q=`TooltipContent`,Ge=D.forwardRef((e,t)=>{let n=Ue(Q,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Z(Q,e.__scopeTooltip);return(0,k.jsx)(xe,{present:r||o.open,children:o.disableHoverableContent?(0,k.jsx)(Xe,{side:i,...a,ref:t}):(0,k.jsx)(Ke,{side:i,...a,ref:t})})}),Ke=D.forwardRef((e,t)=>{let n=Z(Q,e.__scopeTooltip),r=Fe(Q,e.__scopeTooltip),i=D.useRef(null),a=T(t,i),[o,s]=D.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=D.useCallback(()=>{s(null),d(!1)},[d]),p=D.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=et(r,$e(r,n.getBoundingClientRect())),a=tt(t.getBoundingClientRect());s(rt([...i,...a])),d(!0)},[d]);return D.useEffect(()=>()=>f(),[f]),D.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),D.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!nt(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,k.jsx)(Xe,{...e,ref:a})}),[qe,Je]=J(X,{isInside:!1}),Ye=Te(`TooltipContent`),Xe=D.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Z(Q,n),l=Y(n),{onClose:u}=c;return D.useEffect(()=>(document.addEventListener(Ne,u),()=>document.removeEventListener(Ne,u)),[u]),D.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,k.jsx)(P,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,k.jsxs)(ve,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,k.jsx)(Ye,{children:r}),(0,k.jsx)(qe,{scope:n,isInside:!0,children:(0,k.jsx)(ke,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Ge.displayName=Q;var Ze=`TooltipArrow`,Qe=D.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Y(n);return Je(Ze,n).isInside?null:(0,k.jsx)(ye,{...i,...r,ref:t})});Qe.displayName=Ze;function $e(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function et(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tt(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function nt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function rt(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),it(t)}function it(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var at=Ie,ot=Re,st=Be,ct=We,lt=Ge;function ut(e){return(0,k.jsx)(at,{"data-slot":`tooltip-provider`,...e})}var dt=ot;function ft(e){return(0,k.jsx)(st,{"data-slot":`tooltip-trigger`,...e})}function pt({className:e,children:t,sideOffset:n=6,ref:r,...i}){let a=m();return(0,k.jsx)(ct,{container:a??void 0,children:(0,k.jsx)(lt,{ref:r,"data-slot":`tooltip-content`,sideOffset:n,className:E(`z-50 rounded-md bg-[var(--primary-base)] px-2 py-1 shadow-[var(--shadow-popover)]`,`text-body-small-default text-[color:var(--content-inset)]`,`data-[state=delayed-open]:animate-[popoverIn_120ms_ease-out]`,`data-[state=instant-open]:animate-[popoverIn_60ms_ease-out]`,e),...i,children:t})})}function $({content:e,children:t,side:n,align:r,delayDuration:i}){return(0,k.jsx)(at,{delayDuration:200,skipDelayDuration:300,children:(0,k.jsxs)(dt,{delayDuration:i,children:[(0,k.jsx)(ft,{asChild:!0,children:t}),(0,k.jsx)(pt,{side:n,align:r,children:e})]})})}$.Root=dt,$.Trigger=ft,$.Content=pt;var mt=x([`relative inline-flex items-center justify-center gap-1.5 cursor-pointer`,`select-none whitespace-nowrap transition-[background-color,color,border-color,transform,box-shadow]`,`duration-150 ease-out outline-none border`,`keyboard-focus:ring-2 keyboard-focus:ring-[var(--ring)] keyboard-focus:ring-offset-0`,`active:scale-[0.97]`,`disabled:cursor-not-allowed disabled:active:scale-100`,`aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:opacity-60 aria-disabled:active:scale-100`,`text-[color:var(--vbtn-fg)]`].join(` `),{variants:{variant:{primary:[`[--vbtn-fg:var(--content-inset)]`,`bg-[var(--primary-base)]`,`hover:bg-[var(--primary-hover)]`,`active:bg-[var(--primary-active)]`,`border-transparent`,`disabled:bg-[var(--primary-disabled)]`,`disabled:[--vbtn-fg:var(--content-disabled)]`].join(` `),danger:[`[--vbtn-fg:var(--aux-white)]`,`bg-[var(--system-negative-strong)]`,`hover:bg-[var(--system-negative-hover)]`,`active:bg-[var(--system-negative-hover)]`,`border-transparent`,`disabled:bg-[var(--primary-disabled)]`,`disabled:[--vbtn-fg:var(--content-disabled)]`].join(` `),dangerOutline:[`[--vbtn-fg:var(--system-negative-strong)]`,`bg-transparent`,`border-[var(--system-negative-strong)]`,`hover:[--vbtn-fg:var(--system-negative-hover)]`,`hover:border-[var(--system-negative-hover)]`,`active:border-[var(--system-negative-hover)]`,`disabled:border-[var(--primary-disabled)]`,`disabled:[--vbtn-fg:var(--content-disabled)]`].join(` `),dangerGhost:[`[--vbtn-fg:var(--system-negative-strong)]`,`bg-transparent border-transparent`,`hover:[--vbtn-fg:var(--system-negative-hover)]`,`hover:bg-[var(--system-negative-weak)]`,`active:bg-[var(--system-negative-weak)] active:scale-100`,`disabled:[--vbtn-fg:var(--content-disabled)]`].join(` `),outlined:[`[--vbtn-fg:var(--primary-base)]`,`bg-transparent`,`border-[var(--border-element)]`,`hover:[--vbtn-fg:var(--primary-active)]`,`hover:bg-[color-mix(in_srgb,var(--primary-second-hover)_15%,transparent)]`,`active:bg-[color-mix(in_srgb,var(--primary-second-hover)_20%,transparent)]`,`disabled:border-[var(--primary-disabled)]`,`disabled:[--vbtn-fg:var(--content-disabled)]`,`disabled:bg-transparent`].join(` `),ghost:[`[--vbtn-fg:var(--content-default)]`,`bg-transparent border-transparent`,`hover:[--vbtn-fg:var(--primary-active)]`,`hover:bg-[color-mix(in_srgb,var(--primary-second-hover)_15%,transparent)]`,`active:bg-[color-mix(in_srgb,var(--primary-second-hover)_20%,transparent)] active:scale-100`,`disabled:[--vbtn-fg:var(--content-disabled)]`].join(` `)},size:{regular:`h-8 px-2.5 text-body-medium-default rounded-md`,compact:`h-6 px-2 text-label-medium-default rounded-md`},iconOnly:{true:`p-0`,false:``},fullWidth:{true:`w-full`,false:``},active:{true:``,false:``},expandOnMobile:{true:``,false:``}},compoundVariants:[{iconOnly:!0,size:`regular`,class:`h-8 w-8`},{iconOnly:!0,size:`compact`,class:`h-6 w-6`},{iconOnly:!0,size:`regular`,expandOnMobile:!0,class:`max-md:h-10 max-md:w-10`},{iconOnly:!0,size:`compact`,expandOnMobile:!0,class:`max-md:h-10 max-md:w-10`},{variant:`ghost`,active:!0,class:[`bg-[var(--surface-lift)]`,`hover:bg-[var(--surface-active)]`,`active:bg-[var(--surface-active)]`,`[--vbtn-fg:var(--primary-active)]`,`disabled:bg-[var(--border-disabled)]`].join(` `)},{variant:`outlined`,active:!0,class:[`border-[var(--primary-base)]`,`bg-[var(--surface-lift)]`,`hover:bg-[var(--surface-active)]`,`active:bg-[var(--surface-active)]`,`[--vbtn-fg:var(--primary-active)]`].join(` `)},{variant:`outlined`,iconOnly:!0,class:[`hover:bg-[var(--surface-base)]`,`active:bg-[var(--surface-active)]`].join(` `)},{variant:`ghost`,iconOnly:!0,active:!1,class:`[--vbtn-fg:var(--content-tertiary)] hover:[--vbtn-fg:var(--primary-active)]`},{variant:`outlined`,iconOnly:!0,active:!1,class:`[--vbtn-fg:var(--content-tertiary)] hover:[--vbtn-fg:var(--primary-active)]`},{variant:`ghost`,iconOnly:!0,expandOnMobile:!0,class:[`max-md:bg-[var(--surface-lift)]`,`max-md:rounded-full`,`max-md:[--vbtn-fg:var(--content-default)]`,`max-md:hover:bg-[var(--surface-active)]`,`max-md:active:bg-[var(--surface-active)]`].join(` `)}],defaultVariants:{variant:`primary`,size:`regular`,iconOnly:!1,fullWidth:!1,active:!1,expandOnMobile:!0}});function ht(e){return e===`compact`?10:14}function gt({ref:e,variant:t=`primary`,size:n=`regular`,leftIcon:r,rightIcon:i,iconOnly:a,fullWidth:o=!1,active:s=!1,expandOnMobile:c=!0,tintColor:l,tooltip:u,tooltipSide:d,asChild:f=!1,className:p,style:m,type:h,children:g,title:_,disabled:v,onClick:y,...b}){let x=a!=null&&a!==!1,S=v===!0,C=f&&S,w=ht(n),T={width:w,height:w,flexShrink:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},D=E(`inline-flex items-center justify-center shrink-0 size-3.5 [&_svg]:size-full`,c&&`max-md:size-4`),O=f?te:`button`,ne={...l&&!S?{"--vbtn-fg":l}:null,...m},A=e=>{e.preventDefault(),e.stopPropagation()},j=(0,k.jsx)(O,{...b,ref:e,type:f?void 0:h??`button`,disabled:f?void 0:v,"aria-disabled":C?!0:b[`aria-disabled`],"data-disabled":C?``:void 0,"data-slot":`button`,tabIndex:C?-1:b.tabIndex,onClick:C?A:y,title:_,className:E(mt({variant:t,size:n,iconOnly:x,fullWidth:o,active:s,expandOnMobile:c}),p),style:ne,children:x?(0,k.jsx)(`span`,{"aria-hidden":`true`,className:D,children:a}):r==null&&i==null?g:(0,k.jsxs)(k.Fragment,{children:[r==null?null:(0,k.jsx)(`span`,{"aria-hidden":`true`,style:T,children:r}),(0,k.jsx)(ee,{children:g}),i==null?null:(0,k.jsx)(`span`,{"aria-hidden":`true`,style:T,children:i})]})});return u?(0,k.jsx)($,{content:u,side:d,children:j}):j}export{$ as n,ut as r,gt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-BjZY5k1w.js";var t=e(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]);export{t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{t as e}from"./api-errors-DApr8J5Z.js";var t=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,n=globalThis,r=`10.53.1`;function i(){return a(n),n}function a(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.53.1`,t[r]=t[`10.53.1`]||{}}function o(e,t,i=n){let a=i.__SENTRY__=i.__SENTRY__||{},o=a[r]=a[`10.53.1`]||{};return o[e]||(o[e]=t())}var s=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],c=`Sentry Logger `,l={};function u(e){if(!(`console`in n))return e();let t=n.console,r={},i=Object.keys(l);i.forEach(e=>{let n=l[e];r[e]=t[e],t[e]=n});try{return e()}finally{i.forEach(e=>{t[e]=r[e]})}}function d(){ne().enabled=!0}function f(){ne().enabled=!1}function p(){return ne().enabled}function m(...e){te(`log`,...e)}function h(...e){te(`warn`,...e)}function ee(...e){te(`error`,...e)}function te(e,...r){t&&p()&&u(()=>{n.console[e](`${c}[${e}]:`,...r)})}function ne(){return t?o(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var g={enable:d,disable:f,isEnabled:p,log:m,warn:h,error:ee},re=50,ie=/\(error: (.*)\)/,ae=/captureMessage|captureException/;function oe(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
2
|
+
`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ie.test(n)?n.replace(ie,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=re+r)break}}return ce(i.slice(r))}}function se(e){return Array.isArray(e)?oe(...e):e}function ce(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(le(t).function||``)&&t.pop(),t.reverse(),ae.test(le(t).function||``)&&(t.pop(),ae.test(le(t).function||``)&&t.pop()),t.slice(0,re).map(e=>({...e,filename:e.filename||le(t).filename,function:e.function||`?`}))}function le(e){return e[e.length-1]||{}}var ue=`<anonymous>`;function de(e){try{return!e||typeof e!=`function`?ue:e.name||ue}catch{return ue}}function fe(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function pe(e){return`__v_isVNode`in e&&e.__v_isVNode?`[VueVNode]`:`[VueViewModel]`}var me=Object.prototype.toString;function he(e){switch(me.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return b(e,Error)}}function _(e,t){return me.call(e)===`[object ${t}]`}function ge(e){return _(e,`ErrorEvent`)}function _e(e){return _(e,`DOMError`)}function ve(e){return _(e,`DOMException`)}function v(e){return _(e,`String`)}function ye(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function be(e){return e===null||ye(e)||typeof e!=`object`&&typeof e!=`function`}function xe(e){return _(e,`Object`)}function Se(e){return typeof Event<`u`&&b(e,Event)}function Ce(e){return typeof Element<`u`&&b(e,Element)}function we(e){return _(e,`RegExp`)}function y(e){return!!(e?.then&&typeof e.then==`function`)}function Te(e){return xe(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function b(e,t){try{return e instanceof t}catch{return!1}}function Ee(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue||e.__v_isVNode))}function De(e){return typeof Request<`u`&&b(e,Request)}var Oe=n,ke=80;function Ae(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||ke;for(;n&&i++<5&&(o=je(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function je(e,t){let n=e,r=[];if(!n?.tagName)return``;if(Oe.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&v(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function Me(){try{return Oe.document.location.href}catch{return``}}function Ne(e,t=5){if(!Oe.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function Pe(e,n,r){if(!(n in e))return;let i=e[n];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&Fe(a,i);try{e[n]=a}catch{t&&g.log(`Failed to replace method "${n}" in object`,e)}}function x(e,n,r){try{Object.defineProperty(e,n,{value:r,writable:!0,configurable:!0})}catch{t&&g.log(`Failed to add non-enumerable property "${String(n)}" to object`,e)}}function Fe(e,t){try{e.prototype=t.prototype=t.prototype||{},x(e,`__sentry_original__`,t)}catch{}}function Ie(e){return e.__sentry_original__}function Le(e){if(he(e))return{message:e.message,name:e.name,stack:e.stack,...ze(e)};if(Se(e)){let t={type:e.type,target:Re(e.target),currentTarget:Re(e.currentTarget),...ze(e)};return typeof CustomEvent<`u`&&b(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Re(e){try{return Ce(e)?Ae(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function ze(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function Be(e){let t=Object.keys(Le(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var S;function C(e){if(S!==void 0)return S?S(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),r=n;return t in r&&typeof r[t]==`function`?(S=r[t],S(e)):(S=null,e())}function w(){return C(()=>Math.random())}function Ve(){return C(()=>Date.now())}function He(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ue(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Ee(r)?n.push(pe(r)):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function T(e,t,n=!1){return v(e)?we(t)?t.test(e):v(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function We(e,t=[],n=!1){for(let r of t)if(T(e,r,n))return!0;return!1}function Ge(){let e=n;return e.crypto||e.msCrypto}var Ke;function qe(){return w()*16}function E(e=Ge()){try{if(e?.randomUUID)return C(()=>e.randomUUID()).replace(/-/g,``)}catch{}return Ke||=`10000000100040008000100000000000`,Ke.replace(/[018]/g,e=>(e^(qe()&15)>>e/4).toString(16))}function Je(e){return e.exception?.values?.[0]}function Ye(e){let{message:t,event_id:n}=e;if(t)return t;let r=Je(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function Xe(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function Ze(e,t){let n=Je(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function Qe(e){if($e(e))return!0;try{x(e,`__sentry_captured__`,!0)}catch{}return!1}function $e(e){try{return e.__sentry_captured__}catch{}}var et=1e3;function D(){return Ve()/et}function tt(){let{performance:e}=n;if(!e?.now||!e.timeOrigin)return D;let t=e.timeOrigin;return()=>(t+C(()=>e.now()))/et}var nt;function O(){return(nt??=tt())()}function rt(e){let t=O(),n={sid:E(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>at(n)};return e&&k(n,e),n}function k(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||O(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:E()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function it(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),k(e,n)}function at(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function A(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=A(r[e],t[e],n-1));return r}function j(){return E()}function M(){return E().substring(16)}var ot=`_sentrySpan`;function st(e,t){t?x(e,ot,t):delete e[ot]}function ct(e){return e[ot]}var lt=100,N=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:j(),sampleRand:w()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,st(t,ct(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&k(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():xe(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,st(this,void 0),this._attachments=[],this.setPropagationContext({traceId:j(),sampleRand:w()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:lt;if(n<=0)return this;let r={timestamp:D(),...e,message:e.message?He(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ct(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=A(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||E();if(!this._client)return t&&g.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureMessage(e,n,r){let i=r?.event_id||E();if(!this._client)return t&&g.warn(`No client configured on scope - will not capture message!`),i;let a=r?.syntheticException??Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:a,...r,event_id:i},this),i}captureEvent(e,n){let r=e.event_id||n?.event_id||E();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(t&&g.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function ut(){return o(`defaultCurrentScope`,()=>new N)}function dt(){return o(`defaultIsolationScope`,()=>new N)}var ft=e=>e instanceof Promise&&!e[pt],pt=Symbol(`chained PromiseLike`),mt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return ft(r)&&ft(e)?r:ht(e,r)},ht=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[pt]:!0}),t},gt=class{constructor(e,t){let n;n=e||new N;let r;r=t||new N,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return y(n)?mt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function P(){let e=a(i());return e.stack=e.stack||new gt(ut(),dt())}function _t(e){return P().withScope(e)}function vt(e,t){let n=P();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function yt(e){return P().withScope(()=>e(P().getIsolationScope()))}function bt(){return{withIsolationScope:yt,withScope:_t,withSetScope:vt,withSetIsolationScope:(e,t)=>yt(t),getCurrentScope:()=>P().getScope(),getIsolationScope:()=>P().getIsolationScope()}}function F(e){let t=a(e);return t.acs?t.acs:bt()}function xt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function St(e,t){let{value:n,unit:r}=xt(e)?e:{value:e,unit:void 0},i=wt(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function Ct(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=St(i,t);e&&(n[r]=e)}return n}function wt(e){let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var Tt;function Et(){return Tt?.()}function I(){return F(i()).getCurrentScope()}function L(){return F(i()).getIsolationScope()}function Dt(){return o(`globalScope`,()=>new N)}function Ot(...e){let t=F(i());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function R(){return I().getClient()}function kt(e){let t=Et();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||M()};return r&&(a.parent_span_id=r),a}var At=`sentry.source`,jt=`sentry.sample_rate`,Mt=`sentry.op`,Nt=`sentry.origin`,Pt=`sentry.measurement_unit`,Ft=`sentry.measurement_value`,It=`sentry.custom_span_name`,Lt=`sentry.profile_id`,Rt=`sentry.exclusive_time`,zt=`gen_ai.conversation.id`;function Bt(e){try{let t=n.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Vt(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var Ht=`_sentryScope`,Ut=`_sentryIsolationScope`;function Wt(e,t,n){e&&(x(e,Ut,Bt(n)),x(e,Ht,t))}function z(e){let t=e;return{scope:t[Ht],isolationScope:Vt(t[Ut])}}function Gt(e){let t=Kt(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Kt(e){if(!(!e||!v(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=qt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):qt(e)}function qt(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var Jt=/^o(\d+)\./,Yt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Xt(e){return e===`http`||e===`https`}function B(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Zt(e){let t=Yt.exec(e);if(!t){u(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,d=l.split(`/`);if(d.length>1&&(c=d.slice(0,-1).join(`/`),l=d.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Qt({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Qt(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function $t(e){if(!t)return!0;let{port:n,projectId:r,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(g.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:r.match(/^\d+$/)?Xt(i)?n&&isNaN(parseInt(n,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function en(e){return e.match(Jt)?.[1]}function tn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=en(n)),r}function nn(e){let t=typeof e==`string`?Zt(e):Qt(e);if(!(!t||!$t(t)))return t}function rn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var an=!1;function on(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=H(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function sn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:H(e).parent_span_id,a=z(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||M():t,trace_id:n}}function cn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function ln(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function V(e){return typeof e==`number`?un(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?un(e.getTime()):O()}function un(e){return e>9999999999?e/1e3:e}function H(e){if(mn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(pn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:dn(e),start_timestamp:V(i),timestamp:V(o)||void 0,status:hn(s),op:r[Mt],origin:r[Nt],links:cn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function dn(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function fn(e){return{...e,attributes:Ct(e.attributes),links:e.links?.map(e=>({...e,attributes:Ct(e.attributes)}))}}function pn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function mn(e){return typeof e.getSpanJSON==`function`}function U(e){let{traceFlags:t}=e.spanContext();return t===1}function hn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function gn(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}var W=`_sentryChildSpans`,_n=`_sentryRootSpan`;function vn(e,t){x(t,_n,e[_n]||e),e[W]?e[W].add(t):x(e,W,new Set([t]))}function yn(e){let t=new Set;function n(e){if(!t.has(e)&&U(e)){t.add(e);let r=e[W]?Array.from(e[W]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var G=bn;function bn(e){return e[_n]||e}function xn(){an||=(u(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function Sn(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||R()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Cn(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function wn(e,n){if(!n?.length)return!1;for(let r of n){if(Dn(r)){if(e.description&&T(e.description,r))return t&&Cn(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let i=r.name?e.description&&T(e.description,r.name):!0,a=r.op?e.op&&T(e.op,r.op):!0,o=r.attributes?Object.entries(r.attributes).every(([t,n])=>Tn(e.attributes?.[t],n)):!0;if(i&&a&&o)return t&&Cn(e),!0}return!1}function Tn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?T(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function En(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Dn(e){return typeof e==`string`||e instanceof RegExp}var On=`production`,kn=`_frozenDsc`;function An(e,t){x(e,kn,t)}function jn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:tn(t)};return t.emit(`createDsc`,i),i}function Mn(e,t){let n=t.getPropagationContext();return n.dsc||jn(n.traceId,e)}function K(e){let t=R();if(!t)return{};let n=G(e),r=H(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[kn];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&Gt(l);if(u)return s(u);let d=jn(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),Sn()&&(d.sampled=String(U(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??z(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}var q=class{constructor(e={}){this._traceId=e.traceId||j(),this._spanId=e.spanId||M(),this.dropReason=e.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function Nn(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}var Pn=Symbol.for(`sentry.skipNormalization`),Fn=Symbol.for(`sentry.overrideNormalizationDepth`);function In(e){return!!e[Pn]}function Ln(e){let t=e[Fn];return typeof t==`number`?t:void 0}function J(e,t=100,n=1/0){try{return zn(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Rn(e,t=3,n=100*1024){let r=J(e,t);return Un(r)>n?Rn(e,t-1,n):r}function zn(e,t,n=1/0,r=1/0,i=Wn()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Bn(e,t);if(!s.startsWith(`[object `))return s;if(In(t))return t;let c=Ln(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return zn(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Le(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=zn(e,t,l-1,r,i),f++}return o(t),d}function Bn(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(Ee(t))return pe(t);if(Te(t))return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${de(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=Vn(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function Vn(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Hn(e){return~-encodeURI(e).split(/%..|./).length}function Un(e){return Hn(JSON.stringify(e))}function Wn(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Y(e,t=[]){return[e,t]}function Gn(e,t){let[n,r]=e;return[n,[...r,t]]}function Kn(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function qn(e,t){return Kn(e,(e,n)=>t.includes(n))}function Jn(e){let t=a(n);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Yn(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Jn(r),e]:r.push(typeof e==`string`?Jn(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(J(n))}i(e)}}return typeof r==`string`?r:Xn(r)}function Xn(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Zn(e){return[{type:`span`},e]}function Qn(e){let t=typeof e.data==`string`?Jn(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var $n={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function er(e){return e in $n}function tr(e){return er(e)?$n[e]:e}function nr(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function rr(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:B(r)},...i&&{trace:i}}}function ir(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function ar(e,t,n,r){let i=nr(n);return Y({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:B(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function or(e,t,n,r){let i=nr(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;ir(e,n?.sdk);let o=rr(e,i,r,t);return delete e.sdkProcessingMetadata,Y(o,[[{type:a},e]])}function sr(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=K(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:B(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=H(e);return!wn({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=H(e);return(Nn(s)?t:s(t))||(xn(),t)}:H,f=[];for(let e of l){let t=d(e);t&&f.push(Zn(t))}return Y(o,f)}function cr(e){if(!t)return;let{description:n=`< unknown name >`,op:r=`< unknown op >`,parent_span_id:i}=H(e),{spanId:a}=e.spanContext(),o=U(e),s=G(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${r}`,`name: ${n}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=H(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}g.log(`${l}
|
|
3
|
+
${u.join(`
|
|
4
|
+
`)}`)}function lr(e){if(!t)return;let{description:n=`< unknown name >`,op:r=`< unknown op >`}=H(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${r}" ${G(e)===e?`root `:``}span "${n}" with ID ${i}`;g.log(a)}function ur(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[Pt],i=n[Ft];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function X(e){return e.getOptions().traceLifecycle===`stream`}var dr=1e3,fr=class{constructor(e={}){this._traceId=e.traceId||j(),this._spanId=e.spanId||M(),this._startTime=e.startTimestamp||O(),this._links=e.links,this._attributes={},this.setAttributes({[Nt]:`manual`,[Mt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=V(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(At,`custom`),this}end(e){this._endTime||(this._endTime=V(e),lr(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Mt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:hn(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Nt],profile_id:this._attributes[Lt],exclusive_time:this._attributes[Rt],measurements:ur(this._events),is_segment:this._isStandaloneSpan&&G(this)===this||void 0,segment_id:this._isStandaloneSpan?G(this).spanContext().spanId:void 0,links:cn(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===G(this),status:gn(this._status),attributes:this._attributes,links:ln(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){t&&g.log(`[Tracing] Adding an event to span:`,e);let i=pr(n)?n:r||O(),a=pr(n)?{}:n||{},o={name:e,time:V(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=R();if(e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this)),!(this._isStandaloneSpan||this===G(this)))return;if(this._isStandaloneSpan){this._sampled?gr(sr([this],e)):(t&&g.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}else if(e&&X(e)){e.emit(`afterSegmentSpanEnd`,this);return}let n=this._convertSpanToTransaction();n&&(z(this).scope||I()).captureEvent(n)}_convertSpanToTransaction(){if(!mr(H(this)))return;this._name||=(t&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:n}=z(this),r=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=yn(this).filter(e=>e!==this&&!hr(e)).map(e=>H(e)).filter(mr),a=this._attributes[At];delete this._attributes[It];let o=!1;i.forEach(e=>{delete e.data[It],e.op?.startsWith(`gen_ai.`)&&(o=!0)});let s={contexts:{trace:on(this)},spans:i.length>dr?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,dr):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:K(this),hasGenAiSpans:o},request:r,...a&&{transaction_info:{source:a}}},c=ur(this._events);return c&&Object.keys(c).length&&(t&&g.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(c,void 0,2)),s.measurements=c),s}};function pr(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function mr(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function hr(e){return e instanceof fr&&e.isStandaloneSpan()}function gr(e){let t=R();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function _r(e,n,r){if(!Sn(e))return[!1];let i,a;typeof e.tracesSampler==`function`?(a=e.tracesSampler({...n,inheritOrSampleWith:e=>typeof n.parentSampleRate==`number`?n.parentSampleRate:typeof n.parentSampled==`boolean`?Number(n.parentSampled):e}),i=!0):n.parentSampled===void 0?e.tracesSampleRate!==void 0&&(a=e.tracesSampleRate,i=!0):a=n.parentSampled;let o=rn(a);if(o===void 0)return t&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return t&&g.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,o,i];let s=r<o;return s||t&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[s,o,i]}var vr=`__SENTRY_SUPPRESS_TRACING__`;function yr(e){let t=Cr();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Sr(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>Ot(e.scope,t):i===void 0?e=>e():e=>br(i,e))(()=>{let t=I(),a=Er(t,i),o=R();return e.onlyIfParent&&!a?(o?.recordDroppedEvent(`no_parent_span`,`span`),new q):xr({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}function br(e,t){let n=Cr();return n.withActiveSpan?n.withActiveSpan(e,t):Ot(n=>(st(n,e||void 0),t(n)))}function xr({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Sn()){let r=new q;return(n||!e)&&An(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...K(r)}),r}let i=R();if(Dr(i,t))return Or(r)||i?.recordDroppedEvent(`ignored`,`span`),new q({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});let a=L(),o;if(e&&!n)o=Tr(e,r,t),vn(e,o);else if(e){let n=K(e),{traceId:i,spanId:a}=e.spanContext(),s=U(e);o=wr({traceId:i,parentSpanId:a,...t},r,s),An(o,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:s}={...a.getPropagationContext(),...r.getPropagationContext()};o=wr({traceId:e,parentSpanId:i,...t},r,s),n&&An(o,n)}return cr(o),Wt(o,r,a),o}function Sr(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=V(e.startTime),delete n.startTime,n}return t}function Cr(){return F(i())}function wr(e,n,r){let i=R(),a=i?.getOptions()||{},{name:o=``}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:r};i?.emit(`beforeSampling`,s,{decision:!1});let c=s.parentSampled??r,l=s.spanAttributes,u=n.getPropagationContext(),d=Or(n),[f,p,m]=d?[!1]:_r(a,{name:o,parentSampled:c,attributes:l,parentSampleRate:rn(u.dsc?.sample_rate)},u.sampleRand),h=new fr({...e,attributes:{[At]:`custom`,[jt]:p!==void 0&&m?p:void 0,...l},sampled:f});return!f&&i&&!d&&(t&&g.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),i.recordDroppedEvent(`sample_rate`,X(i)?`span`:`transaction`)),i&&i.emit(`spanStart`,h),h}function Tr(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=Or(t),o=a?!1:U(e),s=o?new fr({...n,parentSpanId:r,traceId:i,sampled:o}):new q({traceId:i});vn(e,s);let c=R();return c?(X(c)&&s instanceof q&&(e instanceof q&&e.dropReason?(s.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,`span`)):a||(s.dropReason=`sample_rate`,c.recordDroppedEvent(`sample_rate`,`span`))),c.emit(`spanStart`,s),n.endTimestamp&&(c.emit(`spanEnd`,s),c.emit(`afterSpanEnd`,s)),s):s}function Er(e,t){if(t)return t;if(t===null)return;let n=ct(e);if(!n)return;let r=R();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?G(n):n}function Dr(e,t){let n=e?.getOptions().ignoreSpans;return!e||!X(e)||!n?.length?!1:wn({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function Or(e){return e.getScopeData().sdkProcessingMetadata[vr]===!0}function kr(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Mr(e,t),r&&Fr(e,r),Ir(e,n),Nr(e,i),Pr(e,a)}function Ar(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Z(e,`extra`,n),Z(e,`tags`,r),Z(e,`attributes`,i),Z(e,`user`,a),Z(e,`contexts`,o),e.sdkProcessingMetadata=A(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Z(e,t,n){e[t]=A(e[t],n,1)}function jr(e,t){let n=Dt().getScopeData();return e&&Ar(n,e.getScopeData()),t&&Ar(n,t.getScopeData()),n}function Mr(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Nr(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Pr(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Fr(e,t){e.contexts={trace:sn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:K(t),...e.sdkProcessingMetadata};let n=H(G(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function Ir(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var Lr=0,Rr=1,zr=2;function Br(e){return new Hr(t=>{t(e)})}function Vr(e){return new Hr((t,n)=>{n(e)})}var Hr=class e{constructor(e){this._state=Lr,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===Lr)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Rr&&e[1](this._value),this._state===zr&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===Lr){if(y(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(Rr,e)},r=e=>{t(zr,e)};try{e(n,r)}catch(e){r(e)}}};function Ur(e,t,n,r=0){try{let i=Wr(t,n,e,r);return y(i)?i:Br(i)}catch(e){return Vr(e)}}function Wr(e,n,r,i){let a=r[i];if(!e||!a)return e;let o=a({...e},n);return t&&o===null&&g.log(`Event processor "${a.id||`?`}" dropped event`),y(o)?o.then(e=>Wr(e,n,r,i+1)):Wr(o,n,r,i+1)}var Q,Gr,Kr,$;function qr(e){let t=n._sentryDebugIds,r=n._debugIds;if(!t&&!r)return{};let i=t?Object.keys(t):[],a=r?Object.keys(r):[];if($&&i.length===Gr&&a.length===Kr)return $;Gr=i.length,Kr=a.length,$={},Q||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=Q?.[r];if(i&&$&&t)$[i[0]]=t,Q&&(Q[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&$&&Q){$[i]=t,Q[r]=[i,t];break}}}}};return t&&o(i,t),r&&o(a,r),$}function Jr(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||E(),timestamp:t.timestamp||D()},l=n.integrations||e.integrations.map(e=>e.name);Yr(c,e),Qr(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Xr(c,e.stackParser);let u=ei(r,n.captureContext);n.mechanism&&Ze(c,n.mechanism);let d=i?i.getEventProcessors():[],f=jr(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),kr(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Br(c):Ur(m,c,n)).then(e=>(e&&Zr(e),typeof o==`number`&&o>0?$r(e,o,s):e))}function Yr(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=He(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=He(e.value,a)})}function Xr(e,t){let n=qr(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function Zr(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Qr(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function $r(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:J(e.data,t,n)}}))},...e.user&&{user:J(e.user,t,n)},...e.contexts&&{contexts:J(e.contexts,t,n)},...e.extra&&{extra:J(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=J(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:J(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=J(e.contexts.flags,3,n)),r}function ei(e,t){if(!t)return e;let n=e?e.clone():new N;return n.update(t),n}function ti(e){if(e)return ni(e)||ii(e)?{captureContext:e}:e}function ni(e){return e instanceof N||typeof e==`function`}var ri=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function ii(e){return Object.keys(e).some(e=>ri.includes(e))}function ai(e,t){return I().captureException(e,ti(t))}function oi(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return I().captureMessage(e,n,r)}function si(e,t){return I().captureEvent(e,t)}function ci(e,t){L().setContext(e,t)}function li(){return L().lastEventId()}function ui(e){let t=L(),{user:r}=jr(t,I()),{userAgent:i}=n.navigator||{},a=rt({user:r,...i&&{userAgent:i},...e}),o=t.getSession();return o?.status===`ok`&&k(o,{status:`exited`}),di(),t.setSession(a),a}function di(){let e=L(),t=I().getSession()||e.getSession();t&&it(t),fi(),e.setSession()}function fi(){let e=L(),t=R(),n=e.getSession();n&&t&&t.captureSession(n)}function pi(e=!1){if(e){di();return}fi()}var mi=3;function hi(t){return t instanceof e?!!(t.status===503||t.status===502||t.status===401||t.status===400&&t.message.includes(`Organization-Id header`)):!1}function gi(e,t){return e>=mi?!1:hi(t)}function _i(e){if(!(e instanceof TypeError))return!1;let t=e.message;return!!(t===`Failed to fetch`||t.startsWith(`Failed to fetch (`)&&t.endsWith(`)`)||t===`Load failed`||t.startsWith(`Load failed (`)&&t.endsWith(`)`)||t===`NetworkError when attempting to fetch resource`||t===`NetworkError when attempting to fetch resource.`)}function vi(e){if(e instanceof Error)return e;if(typeof e==`object`&&e){let t=e,n=t.detail;if(typeof n==`string`){let t=Error(n);return t.cause=e,t}let r=t.message;if(typeof r==`string`){let t=Error(r);return t.cause=e,t}try{let t=Error(JSON.stringify(e));return t.cause=e,t}catch{let t=Error(`Non-serializable error object`);return t.cause=e,t}}return Error(String(e))}function yi(e,t){if(_i(e)||t.bestEffort&&hi(e))return;console.error(`[${t.context}]`,e);let n=vi(e),r={...t.extra};n!==e&&(r.originalError=e),ai(n,{level:t.level,tags:{context:t.context,...t.tags},...Object.keys(r).length>0?{extra:r}:{}})}export{E as $,wn as A,g as At,R as B,Kn as C,y as Ct,Mn as D,se as Dt,Nn as E,de as Et,B as F,t as Ft,A as G,L as H,nn as I,O as J,k as K,zt as L,H as M,o as Mt,fn as N,r as Nt,On as O,s as Ot,rn as P,n as Pt,Ye as Q,Rt as R,tr as S,v as St,Rn as T,fe as Tt,kt as U,I as V,Ot as W,Xe as X,Ze as Y,Qe as Z,ar as _,b as _t,ai as a,Be as at,Y as b,be as bt,li as c,Fe as ct,Jr as d,Ae as dt,Ue as et,Vr as f,_e as ft,or as g,Se as gt,X as h,ge as ht,si as i,x as it,xn as j,l as jt,En as k,u as kt,ci as l,Ne as lt,yr as m,he as mt,_i as n,Ve as nt,oi as o,Pe as ot,Br as p,ve as pt,D as q,gi as r,w as rt,pi as s,Ie as st,yi as t,We as tt,ui as u,Me as ut,Gn as v,ye as vt,Yn as w,oe as wt,qn as x,De as xt,Qn as y,xe as yt,Lt as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{r as t,t as n}from"./cn-DFqQkJlk.js";import{t as r}from"./typography-Czgs_2w_.js";var i=e(),a={sm:`p-3`,md:`p-4`,lg:`p-6`},o=[`bg-[var(--surface-lift)]`,`text-[color:var(--content-default)]`,`rounded-xl`].join(` `);function s({padding:e,bordered:t,elevated:r,hasSections:i,noPadding:s,clipContents:c}){return n(o,t?`border border-[var(--border-base)]`:`border border-transparent`,r?`shadow-sm`:null,c?`overflow-hidden`:null,!i&&!s?a[e]:null)}function c(e){let t=!1,n=Array.isArray(e)?e:[e];for(let e of n)if(typeof e==`object`&&e&&`type`in e&&(e.type===u||e.type===d||e.type===f)){t=!0;break}return t}function l({padding:e=`md`,bordered:r=!0,elevated:a=!1,noPadding:o=!1,clipContents:l=!1,asChild:u=!1,className:d,children:f,ref:p,...m}){let h=u?t:`div`,g=c(f);return(0,i.jsx)(h,{...m,ref:p,"data-slot":`card`,className:n(s({padding:e,bordered:r,elevated:a,hasSections:g,noPadding:o,clipContents:l}),d),children:f})}function u({padding:e=`md`,className:t,children:o,ref:s,...c}){return(0,i.jsx)(r,{...c,ref:s,variant:`title-small`,as:`div`,"data-slot":`card-header`,className:n(a[e],`border-b border-[var(--border-base)]`,`text-[color:var(--content-default)]`,t),children:o})}function d({padding:e=`md`,className:t,children:r,ref:o,...s}){return(0,i.jsx)(`div`,{...s,ref:o,"data-slot":`card-body`,className:n(a[e],t),children:r})}function f({padding:e=`md`,className:t,children:r,ref:o,...s}){return(0,i.jsx)(`div`,{...s,ref:o,"data-slot":`card-footer`,className:n(a[e],`border-t border-[var(--border-base)]`,t),children:r})}function p({children:e,padding:t=`md`,noPadding:n=!1,ref:r,...a}){return(0,i.jsx)(l,{ref:r,padding:t,noPadding:n,...a,children:n?e:(0,i.jsx)(d,{padding:t,children:e})})}var m=p;m.Root=l,m.Header=u,m.Body=d,m.Footer=f;export{m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-Bjb-Kuq7.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{C as n,a as r,b as i,r as a}from"./portal-container-DIXEBWUe.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{o as s,t as c}from"./cn-DFqQkJlk.js";import{t as l}from"./typography-Czgs_2w_.js";import{t as u}from"./createLucideIcon-Bjb-Kuq7.js";import{t as d}from"./check-CW0KmV0o.js";import{n as f,t as p}from"./dist-B1Fpj7hg.js";var m=u(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),h=e(t(),1);function g(e){let t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _=o(),v=`Checkbox`,[y,b]=n(v),[x,S]=y(v);function C(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:o,form:s,name:c,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=a({prop:n,defaultProp:i??!1,onChange:l,caller:v}),[g,y]=h.useState(null),[b,S]=h.useState(null),C=h.useRef(!1),w=g?!!s||!!g.closest(`form`):!0,T={checked:p,disabled:o,setChecked:m,control:g,setControl:y,name:c,form:s,value:d,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:M(i)?!1:i,isFormControl:w,bubbleInput:b,setBubbleInput:S};return(0,_.jsx)(x,{scope:t,...T,children:j(f)?f(T):r})}var w=`CheckboxTrigger`,T=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{let{control:o,value:c,disabled:l,checked:u,required:d,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:y}=S(w,e),b=s(a,p),x=h.useRef(u);return h.useEffect(()=>{let e=o?.form;if(e){let t=()=>m(x.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[o,m]),(0,_.jsx)(i.button,{type:`button`,role:`checkbox`,"aria-checked":M(u)?`mixed`:u,"aria-required":d,"data-state":N(u),"data-disabled":l?``:void 0,disabled:l,value:c,...r,ref:b,onKeyDown:f(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:f(n,e=>{m(e=>M(e)?!0:!e),y&&v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});T.displayName=w;var E=h.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,_.jsx)(C,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(T,{...d,ref:t,__scopeCheckbox:n}),e&&(0,_.jsx)(A,{__scopeCheckbox:n})]})})});E.displayName=v;var D=`CheckboxIndicator`,O=h.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...a}=e,o=S(D,n);return(0,_.jsx)(p,{present:r||M(o.checked)||o.checked===!0,children:(0,_.jsx)(i.span,{"data-state":N(o.checked),"data-disabled":o.disabled?``:void 0,...a,ref:t,style:{pointerEvents:`none`,...e.style}})})});O.displayName=D;var k=`CheckboxBubbleInput`,A=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:a,hasConsumerStoppedPropagationRef:o,checked:c,defaultChecked:l,required:u,disabled:d,name:f,value:p,form:m,bubbleInput:v,setBubbleInput:y}=S(k,e),b=s(n,y),x=g(c),C=r(a);h.useEffect(()=>{let e=v;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!o.current;if(x!==c&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=M(c),n.call(e,M(c)?!1:c),e.dispatchEvent(t)}},[v,x,c,o]);let w=h.useRef(M(c)?!1:c);return(0,_.jsx)(i.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:l??w.current,required:u,disabled:d,name:f,value:p,form:m,...t,tabIndex:-1,ref:b,style:{...t.style,...C,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});A.displayName=k;function j(e){return typeof e==`function`}function M(e){return e===`indeterminate`}function N(e){return M(e)?`indeterminate`:e?`checked`:`unchecked`}function P({checked:e,onCheckedChange:t,label:n,helperText:r,disabled:i=!1,id:a,name:o,className:s,ref:u,"aria-label":f,...p}){let g=(0,h.useId)(),v=a??g,y=n?`${v}-label`:void 0,b=r?`${v}-helper`:void 0,x=e===`indeterminate`,S=c(`inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px]`,`border transition-colors outline-none cursor-pointer`,`keyboard-focus:ring-2 keyboard-focus:ring-[var(--ring)] keyboard-focus:ring-offset-0`,`bg-[var(--surface-lift)] border-[var(--border-base)]`,`data-[state=checked]:bg-[var(--system-positive-strong)] data-[state=checked]:border-transparent`,`data-[state=indeterminate]:bg-[var(--system-positive-strong)] data-[state=indeterminate]:border-transparent`,`disabled:cursor-not-allowed disabled:bg-[var(--surface-overlay)]`,`disabled:data-[state=checked]:bg-[var(--surface-overlay)]`,`disabled:data-[state=indeterminate]:bg-[var(--surface-overlay)]`,`disabled:border-[var(--border-base)]`),C=c(`h-3 w-3`,i?`text-[color:var(--content-disabled)]`:`text-[color:var(--aux-white)]`),w=(0,_.jsx)(E,{...p,ref:u,id:v,name:o,checked:e,disabled:i,onCheckedChange:t,"aria-label":n?void 0:f,"aria-labelledby":n?y:void 0,"aria-describedby":b,"data-slot":`checkbox`,className:S,children:(0,_.jsx)(O,{forceMount:!0,className:`flex items-center justify-center`,children:x?(0,_.jsx)(m,{className:C,strokeWidth:3,"aria-hidden":`true`}):e===!0?(0,_.jsx)(d,{className:C,strokeWidth:3,"aria-hidden":`true`}):null})});return!n&&!r?(0,_.jsx)(`span`,{"data-slot":`checkbox`,className:s,children:w}):(0,_.jsxs)(`div`,{"data-slot":`checkbox`,className:c(`flex gap-2.5`,r?`items-start`:`items-center`,s),children:[w,(0,_.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[n?(0,_.jsx)(l,{as:`label`,variant:`body-medium-default`,id:y,htmlFor:v,className:c(`cursor-pointer select-none`,i?`cursor-not-allowed text-[color:var(--content-disabled)]`:`text-[color:var(--content-default)]`),children:n}):null,r?(0,_.jsx)(`span`,{id:b,className:`text-body-small-default text-[color:var(--content-secondary)]`,children:r}):null]})]})}export{g as n,P as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-BjZY5k1w.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-BjZY5k1w.js";var t=e(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]);export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./preload-helper-CS_K7l1U.js";var r=e(t(),1),i=e=>{throw TypeError(e)},a=(e,t,n)=>t.has(e)||i(`Cannot `+n),o=(e,t,n)=>(a(e,t,`read from private field`),n?n.call(e):t.get(e)),s=(e,t,n)=>t.has(e)?i(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),c=(e,t,n,r)=>(a(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),l=`popstate`;function u(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function d(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return g(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:_(t)}return y(t,n,null,e)}function f(e,t){if(e===!1||e==null)throw Error(t)}function p(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function m(){return Math.random().toString(36).substring(2,10)}function h(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function g(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?v(t):t,state:n,key:t&&t.key||r||m(),mask:i}}function _({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function v(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function y(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function p(){s=`POP`;let e=f(),t=e==null?null:e-d;d=e,c&&c({action:s,location:y.location,delta:t})}function m(e,t){s=`PUSH`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f()+1;let l=h(r,d),p=y.createHref(r.mask||r);try{o.pushState(l,``,p)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(p)}a&&c&&c({action:s,location:y.location,delta:1})}function _(e,t){s=`REPLACE`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f();let i=h(r,d),l=y.createHref(r.mask||r);o.replaceState(i,``,l),a&&c&&c({action:s,location:y.location,delta:0})}function v(e){return b(e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(l,p),c=e,()=>{i.removeEventListener(l,p),c=null}},createHref(e){return t(i,e)},createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:m,replace:_,go(e){return o.go(e)}};return y}function b(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),f(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:_(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function x(e){return{defaultValue:e}}var S,C=class{constructor(e){if(s(this,S,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(o(this,S).has(e))return o(this,S).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){o(this,S).set(e,t)}};S=new WeakMap;var w=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function T(e){return w.has(e)}var E=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function D(e){return E.has(e)}function O(e){return e.index===!0}function k(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(f(e.index!==!0||!e.children,`Cannot specify children on an index route`),f(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),O(e)){let n={...e,id:s};return r[s]=A(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=k(e.children,t,o,r,i)),n}})}function A(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function j(e,t,n=`/`){return M(e,t,n,!1)}function M(e,t,n,r,i){let a=z((typeof t==`string`?v(t):t).pathname||`/`,n);if(a==null)return null;let o=i??N(e),s=null,c=R(a);for(let e=0;s==null&&e<o.length;++e)s=L(o[e],c,r);return s}function ee(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function N(e){let t=te(e);return ne(t),t}function te(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;f(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=H([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(f(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),te(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of P(e.path))a(e,t,!0,n)}),t}function P(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=P(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ne(e){e.sort((e,t)=>e.score===t.score?le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,F=3,ie=2,ae=1,oe=10,I=-2,se=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(se)&&(r+=I),t&&(r+=ie),n.filter(e=>!se(e)).reduce((e,t)=>e+(re.test(t)?F:t===``?ae:oe),r)}function le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function L(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:H([a,u.pathname]),pathnameBase:be(H([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=H([a,u.pathnameBase]))}return o}function ue(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){p(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function R(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function z(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function fe({basename:e,pathname:t}){return t===`/`?e:H([e,t])}var pe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,me=e=>pe.test(e);function he(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?v(e):e,a;return n?(n=ye(n),a=n.startsWith(`/`)?ge(n.substring(1),`/`):ge(n,t)):a=t,{pathname:a,search:xe(r),hash:Se(i)}}function ge(e,t){let n=U(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function _e(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ve(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function B(e){let t=ve(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function V(e,t,n,r=!1){let i;typeof e==`string`?i=v(e):(i={...e},f(!i.pathname||!i.pathname.includes(`?`),_e(`?`,`pathname`,`search`,i)),f(!i.pathname||!i.pathname.includes(`#`),_e(`#`,`pathname`,`hash`,i)),f(!i.search||!i.search.includes(`#`),_e(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=he(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ye=e=>e.replace(/\/\/+/g,`/`),H=e=>ye(e.join(`/`)),U=e=>e.replace(/\/+$/,``),be=e=>U(e).replace(/^\/*/,`/`),xe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Se=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ce=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},we=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Te(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ee(e){return H(e.map(e=>e.route.path).filter(Boolean))||`/`}var De=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Oe(e,t){let n=e;if(typeof n!=`string`||!pe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(De)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=z(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{p(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var W=Symbol(`Uninstrumented`);function ke(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=je(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=je(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[W]??i,a=je(n[e],t,(...e)=>G(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[W]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[W]??e,r=je(n.middleware,t,(...e)=>G(e[0]));return r?(r[W]=t,r):e})),r}function Ae(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[W]??e.navigate,r=je(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?_(n):`.`,...K(e,r??{})}});r&&(r[W]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[W]??e.fetch,r=je(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...K(e,i??{})}});r&&(r[W]=t,e.fetch=r)}return e}function je(e,t,n){return e.length===0?null:async(...r)=>{let i=await Me(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Me(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Me(e,t,n,r-1),a=await o,f(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function G(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Ne(t),params:{...r},pattern:i,context:Pe(n)}}function K(e,t){return{currentUrl:_(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Ne(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Pe(e){if(Ie(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Fe=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ie(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Fe}var q=[`POST`,`PUT`,`PATCH`,`DELETE`],Le=new Set(q),Re=[`GET`,...q],ze=new Set(Re),Be=new Set([301,302,303,307,308]),Ve=new Set([307,308]),He={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ue={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},We={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Ge=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ke=`remix-router-transitions`,qe=Symbol(`ResetLoaderData`),Je,Ye,Xe,Ze,Qe=class{constructor(e){s(this,Je),s(this,Ye),s(this,Xe),s(this,Ze),c(this,Je,e),c(this,Ye,N(e))}get stableRoutes(){return o(this,Je)}get activeRoutes(){return o(this,Xe)??o(this,Je)}get branches(){return o(this,Ze)??o(this,Ye)}get hasHMRRoutes(){return o(this,Xe)!=null}setRoutes(e){c(this,Je,e),c(this,Ye,N(e))}setHmrRoutes(e){c(this,Xe,e),c(this,Ze,N(e))}commitHmrRoutes(){o(this,Xe)&&(c(this,Je,o(this,Xe)),c(this,Ye,o(this,Ze)),c(this,Xe,void 0),c(this,Ze,void 0))}};Je=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,Ze=new WeakMap;function $e(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;f(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Ge,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...ke(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Qe(k(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||gt,u={...e.future},d=null,m=new Set,h=null,_=null,y=null,x=e.hydrationData!=null,S=M(s.activeRoutes,e.history.location,c,!1,s.branches),w=!1,T=null,E,D;if(S==null&&!e.patchRoutesOnNavigation){let t=J(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=zt(s.activeRoutes);E=!0,D=!E,S=n,T={[r.id]:t}}else if(S&&!e.hydrationData&&ot(S,s.activeRoutes,e.history.location.pathname).active&&(S=null),!S){E=!1,D=!E,S=[];let t=ot(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(w=!0,S=t.matches)}else if(S.some(e=>e.route.lazy))E=!1,D=!E;else if(!S.some(e=>it(e.route)))E=!0,D=!E;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=S;if(n){let e=S.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}D=!1,E=!0,r.forEach(e=>{let r=at(e.route,t,n);D||=r.renderFallback,E&&=!r.shouldLoad})}let O,A={historyAction:e.history.action,location:e.history.location,matches:S,initialized:E,renderFallback:D,navigation:He,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},j=`POP`,N=null,te=!1,P,ne=!1,re=new Map,F=null,ie=!1,ae=!1,oe=new Set,I=new Map,se=0,ce=-1,le=new Map,L=new Set,ue=new Map,de=new Map,R=new Set,fe=new Map,pe,he=null;function ge(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(pe){pe(),pe=void 0;return}p(fe.size===0||r!=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.");let i=Je({currentLocation:A.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{pe=e});e.history.go(r*-1),qe(i,{state:`blocked`,location:n,proceed(){qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(A.blockers);e.set(i,We),B({blockers:e})}}),N?.resolve(),N=null;return}return U(t,n)}),n){cn(t,re);let e=()=>ln(t,re);t.addEventListener(`pagehide`,e),F=()=>t.removeEventListener(`pagehide`,e)}return A.initialized||U(`POP`,A.location,{initialHydration:!0}),O}function _e(){d&&d(),F&&F(),m.clear(),P&&P.abort(),A.fetchers.forEach((e,t)=>Fe(t)),A.blockers.forEach((e,t)=>Ke(t))}function ve(e){return m.add(e),()=>m.delete(e)}function B(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),A={...A,...e};let n=[],r=[];A.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?n.push(t):r.push(t))}),R.forEach(e=>{!A.fetchers.has(e)&&!I.has(e)&&n.push(e)}),[...m].forEach(r=>r(A,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Fe(e)),r.forEach(e=>A.fetchers.delete(e))}function V(t,n,{flushSync:r}={}){let i=A.actionData!=null&&A.navigation.formMethod!=null&&X(A.navigation.formMethod)&&A.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?A.actionData:null;let o=n.loaderData?It(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,c=A.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,We)));let l=ie?!1:et(t,n.matches||A.matches),u=te===!0||A.navigation.formMethod!=null&&X(A.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ie||j===`POP`||(j===`PUSH`?e.history.push(t,t.state):j===`REPLACE`&&e.history.replace(t,t.state));let d;if(j===`POP`){let e=re.get(A.location.pathname);e&&e.has(t.pathname)?d={currentLocation:A.location,nextLocation:t}:re.has(t.pathname)&&(d={currentLocation:t,nextLocation:A.location})}else if(ne){let e=re.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),re.set(A.location.pathname,e)),d={currentLocation:A.location,nextLocation:t}}B({...n,actionData:a,loaderData:o,historyAction:j,location:t,initialized:!0,renderFallback:!1,navigation:He,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),j=`POP`,te=!1,ne=!1,ie=!1,ae=!1,N?.resolve(),N=null,he?.resolve(),he=null}async function ye(t,n){if(N?.resolve(),N=null,typeof t==`number`){N||=un();let n=N.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=nt(!1,tt(A.location,A.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?v(n.mask):{...A.location.mask,...n.mask}});let s=A.location,l=g(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&X(i.formMethod)&&i.formAction===A.location.pathname+A.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=Je({currentLocation:s,nextLocation:l,historyAction:d});if(m){qe(m,{state:`blocked`,location:l,proceed(){qe(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),ye(t,n)},reset(){let e=new Map(A.blockers);e.set(m,We),B({blockers:e})}});return}await U(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function H(){he||=un(),Me(),B({revalidation:`loading`});let e=he.promise;return A.navigation.state===`submitting`?e:A.navigation.state===`idle`?(U(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),e):(U(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:ne===!0}),e)}async function U(t,n,r){P&&P.abort(),P=null,j=t,ie=(r&&r.startUninterruptedRevalidation)===!0,$e(A.location,A.matches),te=(r&&r.preventScrollReset)===!0,ne=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r&&r.overrideNavigation,o=r?.initialHydration&&A.matches&&A.matches.length>0&&!w?A.matches:M(i,n,c,!1,s.branches),l=(r&&r.flushSync)===!0;if(o&&A.initialized&&!ae&&Ht(A.location,n)&&!(r&&r.submission&&X(r.submission.formMethod))){V(n,{matches:o},{flushSync:l});return}let u=ot(o,i,n.pathname);if(u.active&&u.matches&&(o=u.matches),!o){let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);V(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:l});return}P=new AbortController;let d=At(e.history,n,P.signal,r&&r.submission),f=e.getContext?await e.getContext():new C,p;if(r&&r.pendingError)p=[Rt(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&X(r.submission.formMethod)){let t=await be(d,n,r.submission,o,f,u.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:l});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Y(r)&&Te(r.error)&&r.error.status===404){P=null,V(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,p=t.pendingActionResult,a=nn(n,r.submission),l=!1,u.active=!1,d=At(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_}=await xe(d,n,o,f,u.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,l,p,r&&r.callSiteDefaultShouldRevalidate);m||(P=null,V(n,{matches:h||o,...Lt(p),loaderData:g,errors:_}))}async function be(t,n,i,l,u,d,f,p={}){if(Me(),B({navigation:rn(n,i)},{flushSync:p.flushSync===!0}),d){let e=await st(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=zt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Rt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ye(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=en(l,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:J(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await W(t,n,St(a,o,t,n,l,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of l)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(qt(m)){let n;return n=p&&p.replace!=null?p.replace:kt(m.response.headers.get(`Location`),new URL(t.url),c,e.history)===A.location.pathname+A.location.search,await Oe(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Y(m)){let e=Rt(l,h.route.id);return(p&&p.replace)!==!0&&(j=`PUSH`),{matches:l,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:l,pendingActionResult:[h.route.id,m]}}async function xe(t,n,i,l,u,d,f,p,m,h,g,_,v){let y=d||nn(n,f),b=f||p||tn(y),x=!ie&&!h;if(u){if(x){let e=Se(_);B({navigation:y,...e===void 0?{}:{actionData:e}},{flushSync:g})}let e=await st(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=zt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Rt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let S=s.activeRoutes,{dsMatches:C,revalidatingFetchers:w}=rt(t,l,a,o,e.history,A,i,b,n,h?[]:r,h===!0,ae,oe,R,ue,L,S,c,e.patchRoutesOnNavigation!=null,s.branches,_,v);if(ce=++se,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=Re();return V(n,{matches:i,loaderData:{},errors:_&&Y(_[1])?{[_[0]]:_[1].error}:null,...Lt(_),...e?{fetchers:new Map(A.fetchers)}:{}},{flushSync:g}),{shortCircuited:!0}}if(x){let e={};if(!u){e.navigation=y;let t=Se(_);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Ce(w)),B(e,{flushSync:g})}w.forEach(e=>{q(e.key),e.controller&&I.set(e.key,e.controller)});let T=()=>w.forEach(e=>q(e.key));P&&P.signal.addEventListener(`abort`,T);let{loaderResults:E,fetcherResults:D}=await je(C,w,t,n,l);if(t.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener(`abort`,T),w.forEach(e=>I.delete(e.key));let O=Bt(E);if(O)return await Oe(t,O.result,!0,{replace:m}),{shortCircuited:!0};if(O=Bt(D),O)return L.add(O.key),await Oe(t,O.result,!0,{replace:m}),{shortCircuited:!0};let{loaderData:k,errors:j}=Ft(A,i,E,_,w,D);h&&A.errors&&(j={...A.errors,...j});let M=Re(),ee=ze(ce),N=M||ee||w.length>0;return{matches:i,loaderData:k,errors:j,...N?{fetchers:new Map(A.fetchers)}:{}}}function Se(e){if(e&&!Y(e[1]))return{[e[0]]:e[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Ce(e){return e.forEach(e=>{let t=A.fetchers.get(e.key),n=an(void 0,t?t.data:void 0);A.fetchers.set(e.key,n)}),new Map(A.fetchers)}async function we(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=tt(A.location,A.matches,c,r,n,i?.relative),u=M(o,l,c,!1,s.branches),d=ot(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){K(t,n,J(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=nt(!0,l,i);if(m){K(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new C,g=(i&&i.preventScrollReset)===!0;if(p&&X(p.formMethod)){await Ee(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:f}),await De(t,n,f,u,h,d.active,a,g,p)}async function Ee(t,n,i,l,u,d,p,m,h,g){Me(),ue.delete(t),G(t,on(h,A.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=At(e.history,i,_.signal,h);if(d){let e=await st(l,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:p});return}else if(e.matches)l=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:p});return}}let y=en(l,i);if(!y.route.action&&!y.route.lazy){K(t,n,J(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}I.set(t,_);let b=se,x=St(a,o,v,i,l,y,r,u),S=await W(v,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){I.get(t)===_&&I.delete(t);return}if(R.has(t)){if(qt(C)||Y(C)){G(t,sn(void 0));return}}else{if(qt(C))if(I.delete(t),ce>b){G(t,sn(void 0));return}else return L.add(t),G(t,an(h)),Oe(v,C,!1,{fetcherSubmission:h,preventScrollReset:m});if(Y(C)){K(t,n,C.error);return}}let w=A.navigation.location||A.location,T=At(e.history,w,_.signal),E=s.activeRoutes,D=A.navigation.state===`idle`?A.matches:M(E,A.navigation.location,c,!1,s.branches);f(D,`Didn't find any matches after fetcher action`);let O=++se;le.set(t,O);let k=an(h,C.data);A.fetchers.set(t,k);let{dsMatches:ee,revalidatingFetchers:N}=rt(T,u,a,o,e.history,A,D,h,w,r,!1,ae,oe,R,ue,L,E,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],g);N.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=A.fetchers.get(t),r=an(void 0,n?n.data:void 0);A.fetchers.set(t,r),q(t),e.controller&&I.set(t,e.controller)}),B({fetchers:new Map(A.fetchers)});let te=()=>N.forEach(e=>q(e.key));_.signal.addEventListener(`abort`,te);let{loaderResults:ne,fetcherResults:re}=await je(ee,N,T,w,u);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,te),le.delete(t),I.delete(t),N.forEach(e=>I.delete(e.key)),A.fetchers.has(t)){let e=sn(C.data);A.fetchers.set(t,e)}let F=Bt(ne);if(F)return Oe(T,F.result,!1,{preventScrollReset:m});if(F=Bt(re),F)return L.add(F.key),Oe(T,F.result,!1,{preventScrollReset:m});let{loaderData:ie,errors:de}=Ft(A,D,ne,void 0,N,re);ze(O),A.navigation.state===`loading`&&O>ce?(f(j,`Expected pending action`),P&&P.abort(),V(A.navigation.location,{matches:D,loaderData:ie,errors:de,fetchers:new Map(A.fetchers)})):(B({errors:de,loaderData:It(A.loaderData,ie,D,de),fetchers:new Map(A.fetchers)}),ae=!1)}async function De(t,n,i,s,c,l,u,d,f){let p=A.fetchers.get(t);G(t,an(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=At(e.history,i,m.signal);if(l){let e=await st(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:u});return}}let g=en(s,i);I.set(t,m);let _=se,v=await W(h,i,St(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(R.has(t)){G(t,sn(void 0));return}if(qt(y))if(ce>_){G(t,sn(void 0));return}else{L.add(t),await Oe(h,y,!1,{preventScrollReset:d});return}if(Y(y)){K(t,n,y.error);return}G(t,sn(y.data))}}async function Oe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(N?.resolve(),N=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ae=!0);let d=i.response.headers.get(`Location`);f(d,`Expected a Location header on the redirect Response`),d=kt(d,new URL(r.url),c,e.history);let p=g(A.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(me(d)){let n=b(d,!0);e=n.origin!==t.location.origin||z(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}P=null;let m=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:h,formAction:_,formEncType:v}=A.navigation;!o&&!s&&h&&_&&v&&(o=tn(A.navigation));let y=o||s;Ve.has(i.response.status)&&y&&X(y.formMethod)?await U(m,p,{submission:{...y,formAction:d},preventScrollReset:l||te,enableViewTransition:a?ne:void 0}):await U(m,p,{overrideNavigation:nn(p,o),fetcherSubmission:s,preventScrollReset:l||te,enableViewTransition:a?ne:void 0})}async function W(e,t,n,r,i){let a,o={};try{a=await Ct(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!X(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!A.loaderData.hasOwnProperty(e.route.id)&&(!A.errors||!A.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Kt(r)){let i=r.result;o[t]={type:`redirect`,response:Dt(i,e,t,n,c)}}else o[t]=await Et(r);return o}async function je(e,t,n,r,i){let a=W(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await W(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:J(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Me(){ae=!0,ue.forEach((e,t)=>{I.has(t)&&oe.add(t),q(t)})}function G(e,t,n={}){A.fetchers.set(e,t),B({fetchers:new Map(A.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function K(e,t,n,r={}){let i=Rt(A.matches,t);Fe(e),B({errors:{[i.route.id]:n},fetchers:new Map(A.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Ne(e){return de.set(e,(de.get(e)||0)+1),R.has(e)&&R.delete(e),A.fetchers.get(e)||Ue}function Pe(e,t){q(e,t?.reason),G(e,sn(null))}function Fe(e){let t=A.fetchers.get(e);I.has(e)&&!(t&&t.state===`loading`&&le.has(e))&&q(e),ue.delete(e),le.delete(e),L.delete(e),R.delete(e),oe.delete(e),A.fetchers.delete(e)}function Ie(e){let t=(de.get(e)||0)-1;t<=0?(de.delete(e),R.add(e)):de.set(e,t),B({fetchers:new Map(A.fetchers)})}function q(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function Le(e){for(let t of e){let e=sn(Ne(t).data);A.fetchers.set(t,e)}}function Re(){let e=[],t=!1;for(let n of L){let r=A.fetchers.get(n);f(r,`Expected fetcher: ${n}`),r.state===`loading`&&(L.delete(n),e.push(n),t=!0)}return Le(e),t}function ze(e){let t=[];for(let[n,r]of le)if(r<e){let e=A.fetchers.get(n);f(e,`Expected fetcher: ${n}`),e.state===`loading`&&(q(n),le.delete(n),t.push(n))}return Le(t),t.length>0}function Be(e,t){let n=A.blockers.get(e)||We;return fe.get(e)!==t&&fe.set(e,t),n}function Ke(e){A.blockers.delete(e),fe.delete(e)}function qe(e,t){let n=A.blockers.get(e)||We;f(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(A.blockers);r.set(e,t),B({blockers:r})}function Je({currentLocation:e,nextLocation:t,historyAction:n}){if(fe.size===0)return;fe.size>1&&p(!1,`A router only supports one blocker at a time`);let r=Array.from(fe.entries()),[i,a]=r[r.length-1],o=A.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ye(e){let t=J(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=zt(n);return{notFoundMatches:r,route:i,error:t}}function Xe(e,t,n){if(h=e,y=t,_=n||null,!x&&A.navigation===He){x=!0;let e=et(A.location,A.matches);e!=null&&B({restoreScrollPosition:e})}return()=>{h=null,y=null,_=null}}function Ze(e,t){return _&&_(e,t.map(e=>ee(e,A.loaderData)))||e.key}function $e(e,t){if(h&&y){let n=Ze(e,t);h[n]=y()}}function et(e,t){if(h){let n=Ze(e,t),r=h[n];if(typeof r==`number`)return r}return null}function ot(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:M(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:M(n,r,c,!0,e)}}return{active:!1,matches:null}}async function st(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||lt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=M(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=M(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ct(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=M(s.activeRoutes,n,c,!0,u),!f||ct(l,f))return{type:`success`,matches:null};l=f}}function ct(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function ut(e){o={},s.setHmrRoutes(k(e,a,void 0,o))}function dt(e,t,n=!1){lt(e,t,s,o,a,n),s.hasHMRRoutes||B({})}return O={get basename(){return c},get future(){return u},get state(){return A},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:ge,subscribe:ve,enableScrollRestoration:Xe,navigate:ye,fetch:we,revalidate:H,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ne,resetFetcher:Pe,deleteFetcher:Ie,dispose:_e,getBlocker:Be,deleteBlocker:Ke,patchRoutes:dt,_internalFetchControllers:I,_internalSetRoutes:ut,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){B(e)}},e.instrumentations&&(O=Ae(O,e.instrumentations.map(e=>e.router).filter(Boolean))),O}function et(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function tt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=V(r||`.`,B(o),z(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=$t(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=fe({basename:n,pathname:c.pathname})),_(c)}function nt(e,t,n){if(!n||!et(n))return{path:t};if(n.formMethod&&!Qt(n.formMethod))return{path:t,error:J(405,{method:n.formMethod})};let r=()=>({path:t,error:J(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Vt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!X(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./preload-helper-BewR0kVT.js";var r=e(t(),1),i=e=>{throw TypeError(e)},a=(e,t,n)=>t.has(e)||i(`Cannot `+n),o=(e,t,n)=>(a(e,t,`read from private field`),n?n.call(e):t.get(e)),s=(e,t,n)=>t.has(e)?i(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),c=(e,t,n,r)=>(a(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),l=`popstate`;function u(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function d(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return g(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:_(t)}return y(t,n,null,e)}function f(e,t){if(e===!1||e==null)throw Error(t)}function p(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function m(){return Math.random().toString(36).substring(2,10)}function h(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function g(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?v(t):t,state:n,key:t&&t.key||r||m(),mask:i}}function _({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function v(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function y(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function p(){s=`POP`;let e=f(),t=e==null?null:e-d;d=e,c&&c({action:s,location:y.location,delta:t})}function m(e,t){s=`PUSH`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f()+1;let l=h(r,d),p=y.createHref(r.mask||r);try{o.pushState(l,``,p)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(p)}a&&c&&c({action:s,location:y.location,delta:1})}function _(e,t){s=`REPLACE`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f();let i=h(r,d),l=y.createHref(r.mask||r);o.replaceState(i,``,l),a&&c&&c({action:s,location:y.location,delta:0})}function v(e){return b(e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(l,p),c=e,()=>{i.removeEventListener(l,p),c=null}},createHref(e){return t(i,e)},createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:m,replace:_,go(e){return o.go(e)}};return y}function b(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),f(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:_(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function x(e){return{defaultValue:e}}var S,C=class{constructor(e){if(s(this,S,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(o(this,S).has(e))return o(this,S).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){o(this,S).set(e,t)}};S=new WeakMap;var w=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function T(e){return w.has(e)}var E=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function D(e){return E.has(e)}function O(e){return e.index===!0}function k(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(f(e.index!==!0||!e.children,`Cannot specify children on an index route`),f(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),O(e)){let n={...e,id:s};return r[s]=A(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=k(e.children,t,o,r,i)),n}})}function A(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function j(e,t,n=`/`){return M(e,t,n,!1)}function M(e,t,n,r,i){let a=z((typeof t==`string`?v(t):t).pathname||`/`,n);if(a==null)return null;let o=i??N(e),s=null,c=R(a);for(let e=0;s==null&&e<o.length;++e)s=L(o[e],c,r);return s}function ee(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function N(e){let t=te(e);return ne(t),t}function te(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;f(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=H([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(f(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),te(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of P(e.path))a(e,t,!0,n)}),t}function P(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=P(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ne(e){e.sort((e,t)=>e.score===t.score?le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,F=3,ie=2,ae=1,oe=10,I=-2,se=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(se)&&(r+=I),t&&(r+=ie),n.filter(e=>!se(e)).reduce((e,t)=>e+(re.test(t)?F:t===``?ae:oe),r)}function le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function L(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:H([a,u.pathname]),pathnameBase:be(H([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=H([a,u.pathnameBase]))}return o}function ue(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){p(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function R(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function z(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function fe({basename:e,pathname:t}){return t===`/`?e:H([e,t])}var pe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,me=e=>pe.test(e);function he(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?v(e):e,a;return n?(n=ye(n),a=n.startsWith(`/`)?ge(n.substring(1),`/`):ge(n,t)):a=t,{pathname:a,search:xe(r),hash:Se(i)}}function ge(e,t){let n=U(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function _e(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ve(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function B(e){let t=ve(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function V(e,t,n,r=!1){let i;typeof e==`string`?i=v(e):(i={...e},f(!i.pathname||!i.pathname.includes(`?`),_e(`?`,`pathname`,`search`,i)),f(!i.pathname||!i.pathname.includes(`#`),_e(`#`,`pathname`,`hash`,i)),f(!i.search||!i.search.includes(`#`),_e(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=he(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ye=e=>e.replace(/\/\/+/g,`/`),H=e=>ye(e.join(`/`)),U=e=>e.replace(/\/+$/,``),be=e=>U(e).replace(/^\/*/,`/`),xe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Se=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ce=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},we=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Te(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ee(e){return H(e.map(e=>e.route.path).filter(Boolean))||`/`}var De=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Oe(e,t){let n=e;if(typeof n!=`string`||!pe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(De)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=z(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{p(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var W=Symbol(`Uninstrumented`);function ke(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=je(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=je(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[W]??i,a=je(n[e],t,(...e)=>G(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[W]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[W]??e,r=je(n.middleware,t,(...e)=>G(e[0]));return r?(r[W]=t,r):e})),r}function Ae(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[W]??e.navigate,r=je(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?_(n):`.`,...K(e,r??{})}});r&&(r[W]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[W]??e.fetch,r=je(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...K(e,i??{})}});r&&(r[W]=t,e.fetch=r)}return e}function je(e,t,n){return e.length===0?null:async(...r)=>{let i=await Me(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Me(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Me(e,t,n,r-1),a=await o,f(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function G(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Ne(t),params:{...r},pattern:i,context:Pe(n)}}function K(e,t){return{currentUrl:_(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Ne(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Pe(e){if(Ie(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Fe=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ie(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Fe}var q=[`POST`,`PUT`,`PATCH`,`DELETE`],Le=new Set(q),Re=[`GET`,...q],ze=new Set(Re),Be=new Set([301,302,303,307,308]),Ve=new Set([307,308]),He={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ue={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},We={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Ge=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ke=`remix-router-transitions`,qe=Symbol(`ResetLoaderData`),Je,Ye,Xe,Ze,Qe=class{constructor(e){s(this,Je),s(this,Ye),s(this,Xe),s(this,Ze),c(this,Je,e),c(this,Ye,N(e))}get stableRoutes(){return o(this,Je)}get activeRoutes(){return o(this,Xe)??o(this,Je)}get branches(){return o(this,Ze)??o(this,Ye)}get hasHMRRoutes(){return o(this,Xe)!=null}setRoutes(e){c(this,Je,e),c(this,Ye,N(e))}setHmrRoutes(e){c(this,Xe,e),c(this,Ze,N(e))}commitHmrRoutes(){o(this,Xe)&&(c(this,Je,o(this,Xe)),c(this,Ye,o(this,Ze)),c(this,Xe,void 0),c(this,Ze,void 0))}};Je=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,Ze=new WeakMap;function $e(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;f(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Ge,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...ke(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Qe(k(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||gt,u={...e.future},d=null,m=new Set,h=null,_=null,y=null,x=e.hydrationData!=null,S=M(s.activeRoutes,e.history.location,c,!1,s.branches),w=!1,T=null,E,D;if(S==null&&!e.patchRoutesOnNavigation){let t=J(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=zt(s.activeRoutes);E=!0,D=!E,S=n,T={[r.id]:t}}else if(S&&!e.hydrationData&&ot(S,s.activeRoutes,e.history.location.pathname).active&&(S=null),!S){E=!1,D=!E,S=[];let t=ot(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(w=!0,S=t.matches)}else if(S.some(e=>e.route.lazy))E=!1,D=!E;else if(!S.some(e=>it(e.route)))E=!0,D=!E;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=S;if(n){let e=S.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}D=!1,E=!0,r.forEach(e=>{let r=at(e.route,t,n);D||=r.renderFallback,E&&=!r.shouldLoad})}let O,A={historyAction:e.history.action,location:e.history.location,matches:S,initialized:E,renderFallback:D,navigation:He,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},j=`POP`,N=null,te=!1,P,ne=!1,re=new Map,F=null,ie=!1,ae=!1,oe=new Set,I=new Map,se=0,ce=-1,le=new Map,L=new Set,ue=new Map,de=new Map,R=new Set,fe=new Map,pe,he=null;function ge(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(pe){pe(),pe=void 0;return}p(fe.size===0||r!=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.");let i=Je({currentLocation:A.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{pe=e});e.history.go(r*-1),qe(i,{state:`blocked`,location:n,proceed(){qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(A.blockers);e.set(i,We),B({blockers:e})}}),N?.resolve(),N=null;return}return U(t,n)}),n){cn(t,re);let e=()=>ln(t,re);t.addEventListener(`pagehide`,e),F=()=>t.removeEventListener(`pagehide`,e)}return A.initialized||U(`POP`,A.location,{initialHydration:!0}),O}function _e(){d&&d(),F&&F(),m.clear(),P&&P.abort(),A.fetchers.forEach((e,t)=>Fe(t)),A.blockers.forEach((e,t)=>Ke(t))}function ve(e){return m.add(e),()=>m.delete(e)}function B(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),A={...A,...e};let n=[],r=[];A.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?n.push(t):r.push(t))}),R.forEach(e=>{!A.fetchers.has(e)&&!I.has(e)&&n.push(e)}),[...m].forEach(r=>r(A,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Fe(e)),r.forEach(e=>A.fetchers.delete(e))}function V(t,n,{flushSync:r}={}){let i=A.actionData!=null&&A.navigation.formMethod!=null&&X(A.navigation.formMethod)&&A.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?A.actionData:null;let o=n.loaderData?It(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,c=A.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,We)));let l=ie?!1:et(t,n.matches||A.matches),u=te===!0||A.navigation.formMethod!=null&&X(A.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ie||j===`POP`||(j===`PUSH`?e.history.push(t,t.state):j===`REPLACE`&&e.history.replace(t,t.state));let d;if(j===`POP`){let e=re.get(A.location.pathname);e&&e.has(t.pathname)?d={currentLocation:A.location,nextLocation:t}:re.has(t.pathname)&&(d={currentLocation:t,nextLocation:A.location})}else if(ne){let e=re.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),re.set(A.location.pathname,e)),d={currentLocation:A.location,nextLocation:t}}B({...n,actionData:a,loaderData:o,historyAction:j,location:t,initialized:!0,renderFallback:!1,navigation:He,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),j=`POP`,te=!1,ne=!1,ie=!1,ae=!1,N?.resolve(),N=null,he?.resolve(),he=null}async function ye(t,n){if(N?.resolve(),N=null,typeof t==`number`){N||=un();let n=N.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=nt(!1,tt(A.location,A.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?v(n.mask):{...A.location.mask,...n.mask}});let s=A.location,l=g(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&X(i.formMethod)&&i.formAction===A.location.pathname+A.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=Je({currentLocation:s,nextLocation:l,historyAction:d});if(m){qe(m,{state:`blocked`,location:l,proceed(){qe(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),ye(t,n)},reset(){let e=new Map(A.blockers);e.set(m,We),B({blockers:e})}});return}await U(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function H(){he||=un(),Me(),B({revalidation:`loading`});let e=he.promise;return A.navigation.state===`submitting`?e:A.navigation.state===`idle`?(U(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),e):(U(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:ne===!0}),e)}async function U(t,n,r){P&&P.abort(),P=null,j=t,ie=(r&&r.startUninterruptedRevalidation)===!0,$e(A.location,A.matches),te=(r&&r.preventScrollReset)===!0,ne=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r&&r.overrideNavigation,o=r?.initialHydration&&A.matches&&A.matches.length>0&&!w?A.matches:M(i,n,c,!1,s.branches),l=(r&&r.flushSync)===!0;if(o&&A.initialized&&!ae&&Ht(A.location,n)&&!(r&&r.submission&&X(r.submission.formMethod))){V(n,{matches:o},{flushSync:l});return}let u=ot(o,i,n.pathname);if(u.active&&u.matches&&(o=u.matches),!o){let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);V(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:l});return}P=new AbortController;let d=At(e.history,n,P.signal,r&&r.submission),f=e.getContext?await e.getContext():new C,p;if(r&&r.pendingError)p=[Rt(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&X(r.submission.formMethod)){let t=await be(d,n,r.submission,o,f,u.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:l});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Y(r)&&Te(r.error)&&r.error.status===404){P=null,V(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,p=t.pendingActionResult,a=nn(n,r.submission),l=!1,u.active=!1,d=At(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_}=await xe(d,n,o,f,u.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,l,p,r&&r.callSiteDefaultShouldRevalidate);m||(P=null,V(n,{matches:h||o,...Lt(p),loaderData:g,errors:_}))}async function be(t,n,i,l,u,d,f,p={}){if(Me(),B({navigation:rn(n,i)},{flushSync:p.flushSync===!0}),d){let e=await st(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=zt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Rt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ye(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=en(l,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:J(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await W(t,n,St(a,o,t,n,l,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of l)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(qt(m)){let n;return n=p&&p.replace!=null?p.replace:kt(m.response.headers.get(`Location`),new URL(t.url),c,e.history)===A.location.pathname+A.location.search,await Oe(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Y(m)){let e=Rt(l,h.route.id);return(p&&p.replace)!==!0&&(j=`PUSH`),{matches:l,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:l,pendingActionResult:[h.route.id,m]}}async function xe(t,n,i,l,u,d,f,p,m,h,g,_,v){let y=d||nn(n,f),b=f||p||tn(y),x=!ie&&!h;if(u){if(x){let e=Se(_);B({navigation:y,...e===void 0?{}:{actionData:e}},{flushSync:g})}let e=await st(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=zt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Rt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let S=s.activeRoutes,{dsMatches:C,revalidatingFetchers:w}=rt(t,l,a,o,e.history,A,i,b,n,h?[]:r,h===!0,ae,oe,R,ue,L,S,c,e.patchRoutesOnNavigation!=null,s.branches,_,v);if(ce=++se,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=Re();return V(n,{matches:i,loaderData:{},errors:_&&Y(_[1])?{[_[0]]:_[1].error}:null,...Lt(_),...e?{fetchers:new Map(A.fetchers)}:{}},{flushSync:g}),{shortCircuited:!0}}if(x){let e={};if(!u){e.navigation=y;let t=Se(_);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Ce(w)),B(e,{flushSync:g})}w.forEach(e=>{q(e.key),e.controller&&I.set(e.key,e.controller)});let T=()=>w.forEach(e=>q(e.key));P&&P.signal.addEventListener(`abort`,T);let{loaderResults:E,fetcherResults:D}=await je(C,w,t,n,l);if(t.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener(`abort`,T),w.forEach(e=>I.delete(e.key));let O=Bt(E);if(O)return await Oe(t,O.result,!0,{replace:m}),{shortCircuited:!0};if(O=Bt(D),O)return L.add(O.key),await Oe(t,O.result,!0,{replace:m}),{shortCircuited:!0};let{loaderData:k,errors:j}=Ft(A,i,E,_,w,D);h&&A.errors&&(j={...A.errors,...j});let M=Re(),ee=ze(ce),N=M||ee||w.length>0;return{matches:i,loaderData:k,errors:j,...N?{fetchers:new Map(A.fetchers)}:{}}}function Se(e){if(e&&!Y(e[1]))return{[e[0]]:e[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Ce(e){return e.forEach(e=>{let t=A.fetchers.get(e.key),n=an(void 0,t?t.data:void 0);A.fetchers.set(e.key,n)}),new Map(A.fetchers)}async function we(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=tt(A.location,A.matches,c,r,n,i?.relative),u=M(o,l,c,!1,s.branches),d=ot(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){K(t,n,J(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=nt(!0,l,i);if(m){K(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new C,g=(i&&i.preventScrollReset)===!0;if(p&&X(p.formMethod)){await Ee(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:f}),await De(t,n,f,u,h,d.active,a,g,p)}async function Ee(t,n,i,l,u,d,p,m,h,g){Me(),ue.delete(t),G(t,on(h,A.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=At(e.history,i,_.signal,h);if(d){let e=await st(l,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:p});return}else if(e.matches)l=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:p});return}}let y=en(l,i);if(!y.route.action&&!y.route.lazy){K(t,n,J(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}I.set(t,_);let b=se,x=St(a,o,v,i,l,y,r,u),S=await W(v,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){I.get(t)===_&&I.delete(t);return}if(R.has(t)){if(qt(C)||Y(C)){G(t,sn(void 0));return}}else{if(qt(C))if(I.delete(t),ce>b){G(t,sn(void 0));return}else return L.add(t),G(t,an(h)),Oe(v,C,!1,{fetcherSubmission:h,preventScrollReset:m});if(Y(C)){K(t,n,C.error);return}}let w=A.navigation.location||A.location,T=At(e.history,w,_.signal),E=s.activeRoutes,D=A.navigation.state===`idle`?A.matches:M(E,A.navigation.location,c,!1,s.branches);f(D,`Didn't find any matches after fetcher action`);let O=++se;le.set(t,O);let k=an(h,C.data);A.fetchers.set(t,k);let{dsMatches:ee,revalidatingFetchers:N}=rt(T,u,a,o,e.history,A,D,h,w,r,!1,ae,oe,R,ue,L,E,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],g);N.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=A.fetchers.get(t),r=an(void 0,n?n.data:void 0);A.fetchers.set(t,r),q(t),e.controller&&I.set(t,e.controller)}),B({fetchers:new Map(A.fetchers)});let te=()=>N.forEach(e=>q(e.key));_.signal.addEventListener(`abort`,te);let{loaderResults:ne,fetcherResults:re}=await je(ee,N,T,w,u);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,te),le.delete(t),I.delete(t),N.forEach(e=>I.delete(e.key)),A.fetchers.has(t)){let e=sn(C.data);A.fetchers.set(t,e)}let F=Bt(ne);if(F)return Oe(T,F.result,!1,{preventScrollReset:m});if(F=Bt(re),F)return L.add(F.key),Oe(T,F.result,!1,{preventScrollReset:m});let{loaderData:ie,errors:de}=Ft(A,D,ne,void 0,N,re);ze(O),A.navigation.state===`loading`&&O>ce?(f(j,`Expected pending action`),P&&P.abort(),V(A.navigation.location,{matches:D,loaderData:ie,errors:de,fetchers:new Map(A.fetchers)})):(B({errors:de,loaderData:It(A.loaderData,ie,D,de),fetchers:new Map(A.fetchers)}),ae=!1)}async function De(t,n,i,s,c,l,u,d,f){let p=A.fetchers.get(t);G(t,an(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=At(e.history,i,m.signal);if(l){let e=await st(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:u});return}}let g=en(s,i);I.set(t,m);let _=se,v=await W(h,i,St(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(R.has(t)){G(t,sn(void 0));return}if(qt(y))if(ce>_){G(t,sn(void 0));return}else{L.add(t),await Oe(h,y,!1,{preventScrollReset:d});return}if(Y(y)){K(t,n,y.error);return}G(t,sn(y.data))}}async function Oe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(N?.resolve(),N=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ae=!0);let d=i.response.headers.get(`Location`);f(d,`Expected a Location header on the redirect Response`),d=kt(d,new URL(r.url),c,e.history);let p=g(A.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(me(d)){let n=b(d,!0);e=n.origin!==t.location.origin||z(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}P=null;let m=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:h,formAction:_,formEncType:v}=A.navigation;!o&&!s&&h&&_&&v&&(o=tn(A.navigation));let y=o||s;Ve.has(i.response.status)&&y&&X(y.formMethod)?await U(m,p,{submission:{...y,formAction:d},preventScrollReset:l||te,enableViewTransition:a?ne:void 0}):await U(m,p,{overrideNavigation:nn(p,o),fetcherSubmission:s,preventScrollReset:l||te,enableViewTransition:a?ne:void 0})}async function W(e,t,n,r,i){let a,o={};try{a=await Ct(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!X(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!A.loaderData.hasOwnProperty(e.route.id)&&(!A.errors||!A.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Kt(r)){let i=r.result;o[t]={type:`redirect`,response:Dt(i,e,t,n,c)}}else o[t]=await Et(r);return o}async function je(e,t,n,r,i){let a=W(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await W(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:J(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Me(){ae=!0,ue.forEach((e,t)=>{I.has(t)&&oe.add(t),q(t)})}function G(e,t,n={}){A.fetchers.set(e,t),B({fetchers:new Map(A.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function K(e,t,n,r={}){let i=Rt(A.matches,t);Fe(e),B({errors:{[i.route.id]:n},fetchers:new Map(A.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Ne(e){return de.set(e,(de.get(e)||0)+1),R.has(e)&&R.delete(e),A.fetchers.get(e)||Ue}function Pe(e,t){q(e,t?.reason),G(e,sn(null))}function Fe(e){let t=A.fetchers.get(e);I.has(e)&&!(t&&t.state===`loading`&&le.has(e))&&q(e),ue.delete(e),le.delete(e),L.delete(e),R.delete(e),oe.delete(e),A.fetchers.delete(e)}function Ie(e){let t=(de.get(e)||0)-1;t<=0?(de.delete(e),R.add(e)):de.set(e,t),B({fetchers:new Map(A.fetchers)})}function q(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function Le(e){for(let t of e){let e=sn(Ne(t).data);A.fetchers.set(t,e)}}function Re(){let e=[],t=!1;for(let n of L){let r=A.fetchers.get(n);f(r,`Expected fetcher: ${n}`),r.state===`loading`&&(L.delete(n),e.push(n),t=!0)}return Le(e),t}function ze(e){let t=[];for(let[n,r]of le)if(r<e){let e=A.fetchers.get(n);f(e,`Expected fetcher: ${n}`),e.state===`loading`&&(q(n),le.delete(n),t.push(n))}return Le(t),t.length>0}function Be(e,t){let n=A.blockers.get(e)||We;return fe.get(e)!==t&&fe.set(e,t),n}function Ke(e){A.blockers.delete(e),fe.delete(e)}function qe(e,t){let n=A.blockers.get(e)||We;f(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(A.blockers);r.set(e,t),B({blockers:r})}function Je({currentLocation:e,nextLocation:t,historyAction:n}){if(fe.size===0)return;fe.size>1&&p(!1,`A router only supports one blocker at a time`);let r=Array.from(fe.entries()),[i,a]=r[r.length-1],o=A.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ye(e){let t=J(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=zt(n);return{notFoundMatches:r,route:i,error:t}}function Xe(e,t,n){if(h=e,y=t,_=n||null,!x&&A.navigation===He){x=!0;let e=et(A.location,A.matches);e!=null&&B({restoreScrollPosition:e})}return()=>{h=null,y=null,_=null}}function Ze(e,t){return _&&_(e,t.map(e=>ee(e,A.loaderData)))||e.key}function $e(e,t){if(h&&y){let n=Ze(e,t);h[n]=y()}}function et(e,t){if(h){let n=Ze(e,t),r=h[n];if(typeof r==`number`)return r}return null}function ot(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:M(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:M(n,r,c,!0,e)}}return{active:!1,matches:null}}async function st(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||lt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=M(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=M(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ct(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=M(s.activeRoutes,n,c,!0,u),!f||ct(l,f))return{type:`success`,matches:null};l=f}}function ct(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function ut(e){o={},s.setHmrRoutes(k(e,a,void 0,o))}function dt(e,t,n=!1){lt(e,t,s,o,a,n),s.hasHMRRoutes||B({})}return O={get basename(){return c},get future(){return u},get state(){return A},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:ge,subscribe:ve,enableScrollRestoration:Xe,navigate:ye,fetch:we,revalidate:H,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ne,resetFetcher:Pe,deleteFetcher:Ie,dispose:_e,getBlocker:Be,deleteBlocker:Ke,patchRoutes:dt,_internalFetchControllers:I,_internalSetRoutes:ut,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){B(e)}},e.instrumentations&&(O=Ae(O,e.instrumentations.map(e=>e.router).filter(Boolean))),O}function et(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function tt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=V(r||`.`,B(o),z(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=$t(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=fe({basename:n,pathname:c.pathname})),_(c)}function nt(e,t,n){if(!n||!et(n))return{path:t};if(n.formMethod&&!Qt(n.formMethod))return{path:t,error:J(405,{method:n.formMethod})};let r=()=>({path:t,error:J(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Vt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!X(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
2
2
|
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!X(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}f(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Mt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Mt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Nt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Nt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(X(c.formMethod))return{path:t,submission:c};let l=v(t);return e&&l.search&&$t(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:_(l),submission:c}}function rt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Y(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Y(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Ee(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!it(s))f=!1;else if(u){let{shouldLoad:e}=at(s,a.loaderData,a.errors);f=e}else ot(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return xt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?st(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return xt(n,r,e,c,k,i,l,t,ct(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=M(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=en(b,e.path),C=new AbortController,w=At(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=St(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=St(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:D?!1:d;let a={...O,defaultShouldRevalidate:i};ct(S,a)&&(T=St(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function it(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function at(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!it(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function ot(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function st(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function ct(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function lt(e,t,n,r,i,a){let o;if(e){let t=r[e];f(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>ut(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=k(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=k([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function ut(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>ut(e,t)))??!1:!1}var dt=new WeakMap,ft=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(f(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=dt.get(i);o||(o={},dt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=T(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)p(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)p(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},pt=new WeakMap;function mt(e,t,n,r,i){let a=n[e.id];if(f(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=pt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{f(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=D(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?p(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?p(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return pt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=ft({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function ht(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function gt(e){return e.matches.some(e=>e.route.middleware)?_t(e,()=>ht(e)):ht(e)}function _t(e,t){return vt(e,t,e=>{if(Zt(e))throw e;return e},Wt,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Rt(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function vt(e,t,n,r,i){let{matches:a,...o}=e;return await yt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function yt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await yt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function bt(e,t,n,r,i){let a=ft({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=mt(r.route,X(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function xt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=bt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?ct(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?ct(a,{...l,defaultShouldRevalidate:e}):ct(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!X(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(X(n.method)||!p)?wt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function St(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?xt(e,t,n,r,Ee(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:bt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Ct(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:jt(t,n),pattern:Ee(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw 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`")}:e=>{let t=s;return _t(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function wt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=X(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:jt(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw J(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw J(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Tt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Et(e){let{result:t,type:n}=e;if(Yt(t)){let e;try{e=await Tt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new we(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Jt(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Ut(t),statusCode:Te(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Te(t)?t.status:void 0}:Jt(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Dt(e,t,n,r,i){let a=e.headers.get(`Location`);if(f(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!me(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=tt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Ot=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function kt(e,t,n,r){if(me(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(Ot.includes(i.protocol))throw Error(`Invalid redirect location`);let a=z(i.pathname,n)!=null;if(i.origin===t.origin&&a)return ye(i.pathname)+i.search+i.hash}try{let t=r.createURL(e);if(Ot.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function At(e,t,n,r){let i=e.createURL(Vt(t)).toString(),a={signal:n};if(r&&X(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=Mt(r.formData):a.body=r.formData}return new Request(i,a)}function jt(e,t){let n=new URL(e.url),r=typeof t==`string`?v(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Mt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Nt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Pt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Y(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,p=t[d];if(f(!qt(p),`Cannot handle redirect results in processLoaderData`),Y(p)){let t=p.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Rt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=qe),c||(c=!0,s=Te(p.error)?p.error.status:500),p.headers&&(l[d]=p.headers)}else a[d]=p.data,p.statusCode&&p.statusCode!==200&&!c&&(s=p.statusCode),p.headers&&(l[d]=p.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Ft(e,t,n,r,i,a){let{loaderData:o,errors:s}=Pt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(f(o,`Did not find corresponding fetcher result`),Y(o)){let t=Rt(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(qt(o))f(!1,`Unhandled fetcher revalidation redirect`);else{let t=sn(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function It(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==qe).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Lt(e){return e?Y(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Rt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function zt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function J(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new we(e||500,o,Error(s),!0)}function Bt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(qt(r))return{key:n,result:r}}}function Vt(e){return _({...typeof e==`string`?v(e):e,hash:``})}function Ht(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Ut(e){return new we(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Wt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Gt(t))}function Gt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Kt(e){return Yt(e.result)&&Be.has(e.result.status)}function Y(e){return e.type===`error`}function qt(e){return(e&&e.type)===`redirect`}function Jt(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Yt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Xt(e){return Be.has(e)}function Zt(e){return Yt(e)&&Xt(e.status)&&e.headers.has(`Location`)}function Qt(e){return ze.has(e.toUpperCase())}function X(e){return Le.has(e.toUpperCase())}function $t(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function en(e,t){let n=typeof t==`string`?v(t).search:t.search;if(e[e.length-1].route.index&&$t(n||``))return e[e.length-1];let r=ve(e);return r[r.length-1]}function tn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function nn(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function rn(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function an(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function on(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function sn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function cn(e,t){try{let n=e.sessionStorage.getItem(Ke);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function ln(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ke,JSON.stringify(n))}catch(e){p(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function un(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var dn=r.createContext(null);dn.displayName=`DataRouter`;var fn=r.createContext(null);fn.displayName=`DataRouterState`;var pn=r.createContext(!1);function mn(){return r.useContext(pn)}var hn=r.createContext({isTransitioning:!1});hn.displayName=`ViewTransition`;var gn=r.createContext(new Map);gn.displayName=`Fetchers`;var _n=r.createContext(null);_n.displayName=`Await`;var Z=r.createContext(null);Z.displayName=`Navigation`;var vn=r.createContext(null);vn.displayName=`Location`;var Q=r.createContext({outlet:null,matches:[],isDataRoute:!1});Q.displayName=`Route`;var yn=r.createContext(null);yn.displayName=`RouteError`;var bn=`REACT_ROUTER_ERROR`,xn=`REDIRECT`,Sn=`ROUTE_ERROR_RESPONSE`;function Cn(e){if(e.startsWith(`${bn}:${xn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function wn(e){if(e.startsWith(`${bn}:${Sn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new we(t.status,t.statusText,t.data)}catch{}}function Tn(e,{relative:t}={}){f(En(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:i}=r.useContext(Z),{hash:a,pathname:o,search:s}=Pn(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:H([n,o])),i.createHref({pathname:c,search:s,hash:a})}function En(){return r.useContext(vn)!=null}function $(){return f(En(),`useLocation() may be used only in the context of a <Router> component.`),r.useContext(vn).location}var Dn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function On(e){r.useContext(Z).static||r.useLayoutEffect(e)}function kn(){let{isDataRoute:e}=r.useContext(Q);return e?Qn():An()}function An(){f(En(),`useNavigate() may be used only in the context of a <Router> component.`);let e=r.useContext(dn),{basename:t,navigator:n}=r.useContext(Z),{matches:i}=r.useContext(Q),{pathname:a}=$(),o=JSON.stringify(B(i)),s=r.useRef(!1);return On(()=>{s.current=!0}),r.useCallback((r,i={})=>{if(p(s.current,Dn),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=V(r,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:H([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)},[t,n,o,a,e])}var jn=r.createContext(null);function Mn(e){let t=r.useContext(Q).outlet;return r.useMemo(()=>t&&r.createElement(jn.Provider,{value:e},t),[t,e])}function Nn(){let{matches:e}=r.useContext(Q);return e[e.length-1]?.params??{}}function Pn(e,{relative:t}={}){let{matches:n}=r.useContext(Q),{pathname:i}=$(),a=JSON.stringify(B(n));return r.useMemo(()=>V(e,JSON.parse(a),i,t===`path`),[e,a,i,t])}function Fn(e,t,n){f(En(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:i}=r.useContext(Z),{matches:a}=r.useContext(Q),o=a[a.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;er(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
3
|
|
|
4
4
|
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$(),m;if(t){let e=typeof t==`string`?v(t):t;f(l===`/`||e.pathname?.startsWith(l),`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 "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),m=e}else m=d;let h=m.pathname||`/`,g=h;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);g=`/`+h.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let _=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):j(e,{pathname:g});p(u||_!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),p(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=Hn(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:H([l,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:H([l,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,n);return t&&y?r.createElement(vn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...m},navigationType:`POP`}},y):y}function In(){let e=Zn(),t=Te(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:i},o={padding:`2px 4px`,backgroundColor:i},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=r.createElement(r.Fragment,null,r.createElement(`p`,null,`💿 Hey developer 👋`),r.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,r.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,r.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),r.createElement(r.Fragment,null,r.createElement(`h2`,null,`Unexpected Application Error!`),r.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?r.createElement(`pre`,{style:a},n):null,s)}var Ln=r.createElement(In,null),Rn=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=wn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:r.createElement(Q.Provider,{value:this.props.routeContext},r.createElement(yn.Provider,{value:e,children:this.props.component}));return this.context?r.createElement(Bn,{error:e},t):t}};Rn.contextType=pn;var zn=new WeakMap;function Bn({children:e,error:t}){let{basename:n}=r.useContext(Z);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Cn(t.digest);if(e){let i=zn.get(t);if(i)throw i;let a=Oe(e.location,n);if(De&&!zn.get(t))if(a.isExternal||e.reloadDocument)window.location.href=a.absoluteURL||a.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw zn.set(t,n),n}return r.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a.absoluteURL||a.to}`})}}return e}function Vn({routeContext:e,match:t,children:n}){let i=r.useContext(dn);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),r.createElement(Q.Provider,{value:e},n)}function Hn(e,t=[],n){let i=n?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,o=i?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);f(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),a=c>=0?a.slice(0,c+1):[a[0]];break}}}}let l=n?.onError,u=i&&l?(e,t)=>{l(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:Ee(i.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;i&&(d=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||Ln,s&&(c<0&&l===0?(er(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?r.createElement(n.route.Component,null):n.route.element?n.route.element:e,r.createElement(Vn,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:i!=null},children:t})};return i&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?r.createElement(Rn,{location:i.location,revalidation:i.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Un(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wn(e){let t=r.useContext(dn);return f(t,Un(e)),t}function Gn(e){let t=r.useContext(fn);return f(t,Un(e)),t}function Kn(e){let t=r.useContext(Q);return f(t,Un(e)),t}function qn(e){let t=Kn(e),n=t.matches[t.matches.length-1];return f(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Jn(){return qn(`useRouteId`)}function Yn(){return Gn(`useNavigation`).navigation}function Xn(){let{matches:e,loaderData:t}=Gn(`useMatches`);return r.useMemo(()=>e.map(e=>ee(e,t)),[e,t])}function Zn(){let e=r.useContext(yn),t=Gn(`useRouteError`),n=qn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Qn(){let{router:e}=Wn(`useNavigate`),t=qn(`useNavigate`),n=r.useRef(!1);return On(()=>{n.current=!0}),r.useCallback(async(r,i={})=>{p(n.current,Dn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var $n={};function er(e,t,n){!t&&!$n[e]&&($n[e]=!0,p(!1,n))}var tr={};function nr(e,t){!e&&!tr[t]&&(tr[t]=!0,console.warn(t))}var rr=r.useOptimistic,ir=()=>void 0;function ar(e){return rr?rr(e):[e,ir]}function or(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&p(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:r.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&p(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:r.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&p(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:r.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var sr=[`HydrateFallback`,`hydrateFallbackElement`],cr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function lr({router:e,flushSync:t,onError:n,useTransitions:i}){i=mn()||i;let[a,o]=r.useState(e.state),[s,c]=ar(a),[l,u]=r.useState(),[d,f]=r.useState({isTransitioning:!1}),[p,m]=r.useState(),[h,g]=r.useState(),[_,v]=r.useState(),y=r.useRef(new Map),b=r.useCallback((a,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:a.location,params:a.matches[0]?.params??{},pattern:Ee(a.matches)})),a.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),nr(d===!1||t!=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.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(nr(_==null||b,"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."),!_||!b){t&&d?t(()=>o(a)):i===!1?o(a):r.startTransition(()=>{i===!0&&c(e=>ur(e,a)),o(a)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>o(a))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:a,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(a),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,i,c,n]);r.useLayoutEffect(()=>e.subscribe(b),[e,b]);let x=s.initialized;r.useLayoutEffect(()=>{!x&&e.state.initialized&&b(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[x,b,e.state]),r.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new cr)},[d]),r.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,a=e.window.document.startViewTransition(async()=>{i===!1?o(t):r.startTransition(()=>{i===!0&&c(e=>ur(e,t)),o(t)}),await n});a.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(a)}},[l,p,e.window,i,c]),r.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),r.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let S=r.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),C=e.basename||`/`,w=r.useMemo(()=>({router:e,navigator:S,static:!1,basename:C,onError:n}),[e,S,C,n]);return r.createElement(r.Fragment,null,r.createElement(dn.Provider,{value:w},r.createElement(fn.Provider,{value:s},r.createElement(gn.Provider,{value:y.current},r.createElement(hn.Provider,{value:d},r.createElement(hr,{basename:C,location:s.location,navigationType:s.historyAction,navigator:S,useTransitions:i},r.createElement(dr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function ur(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var dr=r.memo(fr);function fr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Fn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function pr({to:e,replace:t,state:n,relative:i}){f(En(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:a}=r.useContext(Z);p(!a,`<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.`);let{matches:o}=r.useContext(Q),{pathname:s}=$(),c=kn(),l=V(e,B(o),s,i===`path`),u=JSON.stringify(l);return r.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:i})},[c,u,i,t,n]),null}function mr(e){return Mn(e.context)}function hr({basename:e=`/`,children:t=null,location:n,navigationType:i=`POP`,navigator:a,static:o=!1,useTransitions:s}){f(!En(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=r.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof n==`string`&&(n=v(n));let{pathname:u=`/`,search:d=``,hash:m=``,state:h=null,key:g=`default`,mask:_}=n,y=r.useMemo(()=>{let e=z(u,c);return e==null?null:{location:{pathname:e,search:d,hash:m,state:h,key:g,mask:_},navigationType:i}},[c,u,d,m,h,g,i,_]);return p(y!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${m}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:r.createElement(Z.Provider,{value:l},r.createElement(vn.Provider,{children:t,value:y}))}r.Component;var gr=`get`,_r=`application/x-www-form-urlencoded`;function vr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function yr(e){return vr(e)&&e.tagName.toLowerCase()===`button`}function br(e){return vr(e)&&e.tagName.toLowerCase()===`form`}function xr(e){return vr(e)&&e.tagName.toLowerCase()===`input`}function Sr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Cr(e,t){return e.button===0&&(!t||t===`_self`)&&!Sr(e)}function wr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Tr(e,t){let n=wr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Er=null;function Dr(){if(Er===null)try{new FormData(document.createElement(`form`),0),Er=!1}catch{Er=!0}return Er}var Or=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function kr(e){return e!=null&&!Or.has(e)?(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_r}"`),null):e}function Ar(e,t){let n,r,i,a,o;if(br(e)){let o=e.getAttribute(`action`);r=o?z(o,t):null,n=e.getAttribute(`method`)||gr,i=kr(e.getAttribute(`enctype`))||_r,a=new FormData(e)}else if(yr(e)||xr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?z(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||gr,i=kr(e.getAttribute(`formenctype`))||kr(o.getAttribute(`enctype`))||_r,a=new FormData(o,e),!Dr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(vr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=gr,r=null,i=_r,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var jr={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Mr=/[&><\u2028\u2029]/g;function Nr(e){return e.replace(Mr,e=>jr[e])}function Pr(e,t){if(e===!1||e==null)throw Error(t)}function Fr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&z(i.pathname,t)===`/`?i.pathname=`${U(t)}/_root.${r}`:i.pathname=`${U(i.pathname)}.${r}`,i}async function Ir(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Lr(e){return e!=null&&typeof e.page==`string`}function Rr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function zr(e,t,n){return Wr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ir(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Rr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Br(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Vr(e,t,{includeHydrateFallback:n}={}){return Hr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Hr(e){return[...new Set(e)]}function Ur(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Wr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Lr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ur(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Gr(){let e=r.useContext(dn);return Pr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Kr(){let e=r.useContext(fn);return Pr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var qr=r.createContext(void 0);qr.displayName=`FrameworkContext`;function Jr(){let e=r.useContext(qr);return Pr(e,`You must render this element inside a <HydratedRouter> element`),e}function Yr(e,t){let n=r.useContext(qr),[i,a]=r.useState(!1),[o,s]=r.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=r.useRef(null);r.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:Xr(c,m),onBlur:Xr(l,h),onMouseEnter:Xr(u,m),onMouseLeave:Xr(d,h),onTouchStart:Xr(f,m)}]:[o,p,{}]:[!1,p,{}]}function Xr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Zr({page:e,...t}){let n=mn(),{router:i}=Gr(),a=r.useMemo(()=>j(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?n?r.createElement($r,{page:e,matches:a,...t}):r.createElement(ei,{page:e,matches:a,...t}):null}function Qr(e){let{manifest:t,routeModules:n}=Jr(),[i,a]=r.useState([]);return r.useEffect(()=>{let r=!1;return zr(e,t,n).then(e=>{r||a(e)}),()=>{r=!0}},[e,t,n]),i}function $r({page:e,matches:t,...n}){let i=$(),{future:a}=Jr(),{basename:o}=Gr(),s=r.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=Fr(e,o,a.unstable_trailingSlashAwareDataRequests,`rsc`),r=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?r=!0:s.push(e.route.id);return r&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,i,t]);return r.createElement(r.Fragment,null,s.map(e=>r.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ei({page:e,matches:t,...n}){let i=$(),{future:a,manifest:o,routeModules:s}=Jr(),{basename:c}=Gr(),{loaderData:l,matches:u}=Kr(),d=r.useMemo(()=>Br(e,t,u,o,i,`data`),[e,t,u,o,i]),f=r.useMemo(()=>Br(e,t,u,o,i,`assets`),[e,t,u,o,i]),p=r.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=new Set,r=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:n.add(e.route.id))}),n.size===0)return[];let u=Fr(e,c,a.unstable_trailingSlashAwareDataRequests,`data`);return r&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,a.unstable_trailingSlashAwareDataRequests,l,i,o,d,t,e,s]),m=r.useMemo(()=>Vr(f,o),[f,o]),h=Qr(f);return r.createElement(r.Fragment,null,p.map(e=>r.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>r.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>r.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ti(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}r.Component;var ni=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ni&&(window.__reactRouterVersion=`7.15.0`)}catch{}function ri(e,t){return $e({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:d({window:t?.window}),hydrationData:t?.hydrationData||ii(),routes:e,mapRouteProperties:or,hydrationRouteProperties:sr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function ii(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ai(e.errors)}),e}function ai(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new we(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(r.__subType){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function oi({basename:e,children:t,history:n,useTransitions:i}){let[a,o]=r.useState({action:n.action,location:n.location}),s=r.useCallback(e=>{i===!1?o(e):r.startTransition(()=>o(e))},[i]);return r.useLayoutEffect(()=>n.listen(s),[n,s]),r.createElement(hr,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:n,useTransitions:i})}oi.displayName=`unstable_HistoryRouter`;var si=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ci=r.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:i,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=r.useContext(Z),y=typeof u==`string`&&si.test(u),b=Oe(u,g);u=b.to;let x=Tn(u,{relative:i}),S=$(),C=null;if(s){let e=V(s,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:H([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Yr(n,m),D=hi(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:i,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||a),A=r.createElement(`a`,{...m,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:ti(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?r.createElement(r.Fragment,null,A,r.createElement(Zr,{page:x})):A});ci.displayName=`Link`;var li=r.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:i=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=Pn(o,{relative:l.relative}),f=$(),p=r.useContext(fn),{navigator:m,basename:h}=r.useContext(Z),g=p!=null&&Ei(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=z(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!i&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!i&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof a==`function`?a(C):a;return r.createElement(ci,{...l,"aria-current":w,className:T,ref:u,style:E,to:o,viewTransition:s},typeof c==`function`?c(C):c)});li.displayName=`NavLink`;var ui=r.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:o,method:s=gr,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=r.useContext(Z),_=yi(),v=bi(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&si.test(c);return r.createElement(`form`,{ref:h,method:y,action:v,onSubmit:i?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let i=e.nativeEvent.submitter,c=i?.getAttribute(`formmethod`)||s,m=()=>_(i||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?r.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});ui.displayName=`Form`;function di({getKey:e,storageKey:t,...n}){let i=r.useContext(qr),{basename:a}=r.useContext(Z),o=$(),s=Xn();wi({getKey:e,storageKey:t});let c=r.useMemo(()=>{if(!i||!e)return null;let t=Ci(o,s,a,e);return t===o.key?null:t},[]);if(!i||i.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return r.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${Nr(JSON.stringify(t||xi))}, ${Nr(JSON.stringify(c))})`}})}di.displayName=`ScrollRestoration`;function fi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pi(e){let t=r.useContext(dn);return f(t,fi(e)),t}function mi(e){let t=r.useContext(fn);return f(t,fi(e)),t}function hi(e,{target:t,replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=kn(),f=$(),p=Pn(e,{relative:s});return r.useCallback(m=>{if(Cr(m,t)){m.preventDefault();let t=n===void 0?_(f)===_(p):n,h=()=>d(e,{replace:t,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?r.startTransition(()=>h()):h()}},[f,d,p,n,i,a,t,e,o,s,c,l,u])}function gi(e){p(typeof URLSearchParams<`u`,"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.");let t=r.useRef(wr(e)),n=r.useRef(!1),i=$(),a=r.useMemo(()=>Tr(i.search,n.current?null:t.current),[i.search]),o=kn();return[a,r.useCallback((e,t)=>{let r=wr(typeof e==`function`?e(new URLSearchParams(a)):e);n.current=!0,o(`?`+r,t)},[o,a])]}var _i=0,vi=()=>`__${String(++_i)}__`;function yi(){let{router:e}=pi(`useSubmit`),{basename:t}=r.useContext(Z),n=Jn(),i=e.fetch,a=e.navigate;return r.useCallback(async(e,r={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ar(e,t);r.navigate===!1?await i(r.fetcherKey||vi(),n,r.action||o,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:l,body:u,formMethod:r.method||s,formEncType:r.encType||c,flushSync:r.flushSync}):await a(r.action||o,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:l,body:u,formMethod:r.method||s,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[i,a,t,n])}function bi(e,{relative:t}={}){let{basename:n}=r.useContext(Z),i=r.useContext(Q);f(i,`useFormAction must be used inside a RouteContext`);let[a]=i.matches.slice(-1),o={...Pn(e||`.`,{relative:t})},s=$();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:H([n,o.pathname])),_(o)}var xi=`react-router-scroll-positions`,Si={};function Ci(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:z(e.pathname,n)||e.pathname},t)),i??=e.key,i}function wi({getKey:e,storageKey:t}={}){let{router:n}=pi(`useScrollRestoration`),{restoreScrollPosition:i,preventScrollReset:a}=mi(`useScrollRestoration`),{basename:o}=r.useContext(Z),s=$(),c=Xn(),l=Yn();r.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ti(r.useCallback(()=>{if(l.state===`idle`){let t=Ci(s,c,o,e);Si[t]=window.scrollY}try{sessionStorage.setItem(t||xi,JSON.stringify(Si))}catch(e){p(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,o,s,c,t])),typeof document<`u`&&(r.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||xi);e&&(Si=JSON.parse(e))}catch{}},[t]),r.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Si,()=>window.scrollY,e?(t,n)=>Ci(t,n,o,e):void 0);return()=>t&&t()},[n,o,e]),r.useLayoutEffect(()=>{if(i!==!1){if(typeof i==`number`){window.scrollTo(0,i);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{p(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[s,i,a]))}function Ti(e,t){let{capture:n}=t||{};r.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Ei(e,{relative:t}={}){let n=r.useContext(hn);f(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=pi(`useViewTransitionState`),a=Pn(e,{relative:t});if(!n.isTransitioning)return!1;let o=z(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=z(n.nextLocation.pathname,i)||n.nextLocation.pathname;return ue(a.pathname,s)!=null||ue(a.pathname,o)!=null}export{lr as a,Te as c,kn as d,Nn as f,mr as i,Ce as l,gi as m,li as n,ri as o,Zn as p,pr as r,x as s,ci as t,$ as u};
|