@objectstack/console 17.0.0 → 17.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +452 -0
- package/dist/.objectstack-injection.json +13 -0
- package/dist/.objectui-sha +1 -1
- package/dist/assets/AdapterProvider-gULVLpjV.js +3 -0
- package/dist/assets/AiPendingActionsPage-CyG11hX9.js +1 -0
- package/dist/assets/ApiConsolePage-DYuOp_W4.js +1 -0
- package/dist/assets/AppDocsIndex-BXkNskk1.js +1 -0
- package/dist/assets/AppManagementPage-BvSxDdA_.js +1 -0
- package/dist/assets/ApprovalsInboxPage-oep3a-Ek.js +1 -0
- package/dist/assets/AuditLogPage-BZZ6tzHu.js +1 -0
- package/dist/assets/ComponentNavView-Cq4wkNUa.js +1 -0
- package/dist/assets/DashboardView-C23ZCS2S.js +1 -0
- package/dist/assets/{DeveloperHubPage-DVKVm5k0.js → DeveloperHubPage-KEpKc45V.js} +1 -1
- package/dist/assets/DocPage-Y4rWCZ3E.js +1 -0
- package/dist/assets/{DocShell-C1VQpTIJ.js → DocShell-DMJHUgE5.js} +1 -1
- package/dist/assets/DocsIndex-Bb5OtPb3.js +1 -0
- package/dist/assets/DocsLayout-CoIVTMH_.js +1 -0
- package/dist/assets/DocsSlug-BARWHmXg.js +1 -0
- package/dist/assets/{ExpressionProvider-qmd0nVCn.js → ExpressionProvider-vGLngw8h.js} +1 -1
- package/dist/assets/FlowRunsPage-BeGa9_ge.js +1 -0
- package/dist/assets/{IntegrationsPage-Cq4mWRFh.js → IntegrationsPage-DTXA-Nne.js} +2 -2
- package/dist/assets/InterfaceListPage-BMvedZyV.js +1 -0
- package/dist/assets/{ManagedByBadge-DgsrLolr.js → ManagedByBadge-mKmG0hP7.js} +1 -1
- package/dist/assets/MarketplaceAccessDenied-BBMyNu2w.js +1 -0
- package/dist/assets/{MarketplaceInstalledPage-CRe2BiM2.js → MarketplaceInstalledPage-B4qrvb7w.js} +1 -1
- package/dist/assets/MarketplacePackagePage-BuVfVeBj.js +4 -0
- package/dist/assets/MarketplacePage-Cmltk5nG.js +1 -0
- package/dist/assets/{MetadataInspector-qQ85bFun.js → MetadataInspector-kVAu8vlh.js} +1 -1
- package/dist/assets/MetadataProvider-DyFZSNqq.js +1 -0
- package/dist/assets/{MonacoImpl-DStuouLX.js → MonacoImpl-Cu_-ISwm.js} +1 -1
- package/dist/assets/ObjectDataPage-BKHEYwXA.js +1 -0
- package/dist/assets/PageView-CTqS-VD9.js +1 -0
- package/dist/assets/ProfilePage-CBUxXn5a.js +1 -0
- package/dist/assets/PublicFormsPage-B8Dk8fky.js +1 -0
- package/dist/assets/RecordDetailView-BBNqsNy9.js +11 -0
- package/dist/assets/RecordFormPage-CeUmmc_n.js +1 -0
- package/dist/assets/ReportDefaultInspector-CRjDi2Er.js +3 -0
- package/dist/assets/ReportView-Cwi_Po4H.js +2 -0
- package/dist/assets/SearchResultsPage-Cg0oq2by.js +1 -0
- package/dist/assets/SettingsHub-B5_S9YgI.js +1 -0
- package/dist/assets/SettingsView-Csi1awf-.js +1 -0
- package/dist/assets/SystemHubPage-CnDri9oU.js +1 -0
- package/dist/assets/{abnfDiagram-N423BO3Z-Ck9FUrgJ.js → abnfDiagram-N423BO3Z-DfpQlDUF.js} +1 -1
- package/dist/assets/{architectureDiagram-T3A2C74G-DJbnVK1q.js → architectureDiagram-T3A2C74G-Ej_4n3NG.js} +1 -1
- package/dist/assets/{assistantBus-DNogw1P-.js → assistantBus-DNH-fDWN.js} +1 -1
- package/dist/assets/{blockDiagram-VBNYF7ZC-Qtci47Jq.js → blockDiagram-VBNYF7ZC-l_P_W7_Y.js} +1 -1
- package/dist/assets/{c4Diagram-5PPSVZJV-DC9Uk9FW.js → c4Diagram-5PPSVZJV-CE82HAlO.js} +1 -1
- package/dist/assets/channel-DowAYf9b.js +1 -0
- package/dist/assets/{chunk-2GRJ4B5K-C6KsYuNR.js → chunk-2GRJ4B5K-D1if-ThW.js} +1 -1
- package/dist/assets/chunk-3NCLNEKW-Z5ckM4mG.js +1 -0
- package/dist/assets/{chunk-4I5QYGJK-CPsvNPUx.js → chunk-4I5QYGJK-DlrWrdEa.js} +1 -1
- package/dist/assets/{chunk-5RXB4S5H-CU_v2umt.js → chunk-5RXB4S5H-JwFhdddt.js} +1 -1
- package/dist/assets/{chunk-6Q2QTUOP-C_q0JPmG.js → chunk-6Q2QTUOP-C2vvuHlO.js} +1 -1
- package/dist/assets/{chunk-7Z6QIM7H-jM3JGv9o.js → chunk-7Z6QIM7H-m6s_oalL.js} +1 -1
- package/dist/assets/{chunk-GF5L2VYU-Dp_0e4Vj.js → chunk-GF5L2VYU-Dgjjn2FR.js} +1 -1
- package/dist/assets/{chunk-I66GZJ75-CLtbCU_E.js → chunk-I66GZJ75-BsY3mBMx.js} +1 -1
- package/dist/assets/{chunk-J7OUQ5F2-C4uAdkrD.js → chunk-J7OUQ5F2-Cl4FNR_k.js} +1 -1
- package/dist/assets/{chunk-JQJVKLGR-BlTMFaN6.js → chunk-JQJVKLGR-BApWxqMA.js} +1 -1
- package/dist/assets/{chunk-KBJHAD2P-BJzwVqKy.js → chunk-KBJHAD2P-DI4-lUt-.js} +1 -1
- package/dist/assets/{chunk-NSK5VX7P-B7tNpEbR.js → chunk-NSK5VX7P-BBTxIP6Z.js} +1 -1
- package/dist/assets/{chunk-QR6OTTB3-B3mQWEI2.js → chunk-QR6OTTB3-DJcD7xr-.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-B3DAS_Q-.js → chunk-RYQCIY6F-CnMsR_qh.js} +1 -1
- package/dist/assets/{chunk-UBXNYLIW-Cqb7MpFH.js → chunk-UBXNYLIW-B7z1tp3V.js} +1 -1
- package/dist/assets/{chunk-W5SLKNZC-DWOVkEVc.js → chunk-W5SLKNZC-BnMc5i0B.js} +1 -1
- package/dist/assets/{chunk-WRU74C26-DR5g8owc.js → chunk-WRU74C26-MrzCPX2E.js} +1 -1
- package/dist/assets/chunk-XXDRQBXY-NKBlW2Dm.js +1 -0
- package/dist/assets/classDiagram-JCYQIIEL-C4ADaKBz.js +1 -0
- package/dist/assets/classDiagram-v2-OCEON4UE-C4ADaKBz.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CcXrYRrs.js → cose-bilkent-JH36ORCC-XP-DnSP5.js} +1 -1
- package/dist/assets/{createDerive-C1PaRnFZ.js → createDerive-B3AGnDaY.js} +1 -1
- package/dist/assets/{cynefinDiagram-MW4NZA55-DuPIOMPB.js → cynefinDiagram-MW4NZA55-B8MvpqXe.js} +1 -1
- package/dist/assets/{dagre-VZM6K2ZE-CHbs07zF.js → dagre-VZM6K2ZE-B5E8-xuM.js} +1 -1
- package/dist/assets/{diagram-7IWD3JNH-sPS-Y-CP.js → diagram-7IWD3JNH-Xj62y5BF.js} +1 -1
- package/dist/assets/{diagram-B4RE2ZJO-C4Essr7L.js → diagram-B4RE2ZJO-mI-iOCGl.js} +1 -1
- package/dist/assets/{diagram-LBJQPF4R-CluEJ_Yg.js → diagram-LBJQPF4R-BMTSoZch.js} +1 -1
- package/dist/assets/{diagram-Q27KOJAE-D4lem9jQ.js → diagram-Q27KOJAE-B98Knrnh.js} +1 -1
- package/dist/assets/{diagram-UB23O5K3-Bfj6mHJD.js → diagram-UB23O5K3-bseKIzhv.js} +1 -1
- package/dist/assets/{dist-D3VfqzjO.js → dist-BK-OswHQ.js} +1 -1
- package/dist/assets/dist-Ck19TqqJ.js +5 -0
- package/dist/assets/{ebnfDiagram-BXEA7PRR-BKXyHLd_.js → ebnfDiagram-BXEA7PRR-Bgo10FP1.js} +1 -1
- package/dist/assets/{erDiagram-JOGREHBK-B6_uGYAF.js → erDiagram-JOGREHBK-BU4b8mUv.js} +1 -1
- package/dist/assets/flowDiagram-UKHOOZJN-BDHHPApJ.js +1 -0
- package/dist/assets/framework-BwfIhdyz.js +55 -0
- package/dist/assets/{ganttDiagram-PKOTCBZU-Cip5kKH4.js → ganttDiagram-PKOTCBZU-CrmKcYGt.js} +1 -1
- package/dist/assets/{getIcon-QmYxLBSb.js → getIcon-1ZXs1v-a.js} +1 -1
- package/dist/assets/{gitGraphDiagram-DS77QQ5N-CF75OjHf.js → gitGraphDiagram-DS77QQ5N-COu0mOui.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-BPV_Giyg.js → highlighted-body-OFNGDK62-CnGKNo0r.js} +1 -1
- package/dist/assets/i18n-rra-09wp.js +9 -0
- package/dist/assets/index-BLepsDd_.js +19 -0
- package/dist/assets/index-D26gl3rg.css +2 -0
- package/dist/assets/{infoDiagram-6WML65LV-IbyJxsv4.js → infoDiagram-6WML65LV-BT0Q6MIs.js} +1 -1
- package/dist/assets/infrastructure-BCTDJsqi.js +3 -0
- package/dist/assets/{ishikawaDiagram-WSZJBQD7-D8FhFMwb.js → ishikawaDiagram-WSZJBQD7-kvPjMvBP.js} +1 -1
- package/dist/assets/{journeyDiagram-NVQOT4AX-C1y_DqRe.js → journeyDiagram-NVQOT4AX-DhXy7wxt.js} +1 -1
- package/dist/assets/{kanban-definition-27J2QSJJ-DIUOavva.js → kanban-definition-27J2QSJJ-CFDavpZY.js} +1 -1
- package/dist/assets/maplibre-gl-CrDadnl3.js +801 -0
- package/dist/assets/maplibre-gl-shared.mjs +2 -2
- package/dist/assets/maplibre-gl-worker.mjs +2 -2
- package/dist/assets/mermaid-GHXKKRXX-CR9PcY0X.js +1 -0
- package/dist/assets/{mermaid-parser.core-BbBeSajF.js → mermaid-parser.core-Dd2B8Ckv.js} +1 -1
- package/dist/assets/{mermaid.core-Dc9p2r4P.js → mermaid.core-BwiBFu_S.js} +2 -2
- package/dist/assets/metadata-admin-BE9_-F_f.js +25 -0
- package/dist/assets/{mindmap-definition-FAOFIHXS-TIsZfgu-.js → mindmap-definition-FAOFIHXS-ITGoV4nW.js} +1 -1
- package/dist/assets/{pegDiagram-VL7TDLO6-BrUvPfjL.js → pegDiagram-VL7TDLO6-BoRu9yvl.js} +1 -1
- package/dist/assets/{pieDiagram-7S7Q4E2Y-BNPIri0N.js → pieDiagram-7S7Q4E2Y-DVsM9krU.js} +1 -1
- package/dist/assets/plugin-calendar-BfY9ZunQ.js +1 -0
- package/dist/assets/plugin-charts-CmWL7Og-.js +7 -0
- package/dist/assets/plugin-chatbot-mxoQfkdx.js +120 -0
- package/dist/assets/plugin-dashboard-CzbAW1Rz.js +6 -0
- package/dist/assets/plugin-form-ItAwTFz-.js +1 -0
- package/dist/assets/plugin-gantt-DF5W5xkN.js +64 -0
- package/dist/assets/plugin-grid-B42Photo.js +9 -0
- package/dist/assets/plugin-kanban-Dh3HIJIm.js +1 -0
- package/dist/assets/plugin-map-C1wSLqlB.js +1 -0
- package/dist/assets/plugin-map-DSnsEFKn.css +1 -0
- package/dist/assets/{plugin-markdown-CbQeAjXv.js → plugin-markdown-DNllWgPM.js} +1 -1
- package/dist/assets/plugin-report-yfOfZPQg.js +59 -0
- package/dist/assets/plugin-timeline-BpuaaqBd.js +1 -0
- package/dist/assets/plugin-tree-BrXE50se.js +1 -0
- package/dist/assets/plugin-view-Jc0rkk7A.js +1 -0
- package/dist/assets/plugins-views-cOiN-mPq.js +4 -0
- package/dist/assets/{quadrantDiagram-CIZ2JOQS-BpL1Kl6d.js → quadrantDiagram-CIZ2JOQS-C4VzXHnp.js} +1 -1
- package/dist/assets/{railroadDiagram-AXF67PYL-CY1JovP6.js → railroadDiagram-AXF67PYL-DqZ3yKWv.js} +1 -1
- package/dist/assets/{requirementDiagram-LRYGKXZP-TRTGy9-6.js → requirementDiagram-LRYGKXZP-BeH0P3vD.js} +1 -1
- package/dist/assets/{runtime-metadata-persistence-DDZN-tZg.js → runtime-metadata-persistence-DTOJpVmd.js} +1 -1
- package/dist/assets/{sankeyDiagram-W5VNT64P-Hj-Un0bp.js → sankeyDiagram-W5VNT64P-Bu_tPh-A.js} +1 -1
- package/dist/assets/{sequenceDiagram-SI44F4Z6-iGYyf5AF.js → sequenceDiagram-SI44F4Z6-BWEuLn1a.js} +1 -1
- package/dist/assets/{skeletons-BWrJAbfN.js → skeletons-BwA1TSR2.js} +1 -1
- package/dist/assets/src-BLbFBP_B.js +1 -0
- package/dist/assets/{src-DwpgXgLE.js → src-CY2xhbXR.js} +1 -1
- package/dist/assets/{src-0qbDl74X.js → src-CvicUdp3.js} +1 -1
- package/dist/assets/src-DhAd4aY4.js +2 -0
- package/dist/assets/{stateDiagram-OKZ733FA-B-kn5M6g.js → stateDiagram-OKZ733FA-Cp7aDYsZ.js} +1 -1
- package/dist/assets/stateDiagram-v2-UEYNNEHI-DaTg8C5m.js +1 -0
- package/dist/assets/{swimlanes-SLNWSIFB-sV1QkjXA.js → swimlanes-SLNWSIFB-wrx1JN6o.js} +1 -1
- package/dist/assets/swimlanesDiagram-ULZ7WXOC-Bqz9GVuM.js +8 -0
- package/dist/assets/{timeline-definition-Z64GVDOM-DMClsS2j.js → timeline-definition-Z64GVDOM-BcUiJfLU.js} +1 -1
- package/dist/assets/ui-components-Dwq5utCl.js +42 -0
- package/dist/assets/ui-layout-DPFlQaQp.js +1 -0
- package/dist/assets/use-book-data-CZc8MJsb.js +1 -0
- package/dist/assets/useActionModal-DYiSBx1G.js +1 -0
- package/dist/assets/useOpenRecordList-DOZu_JZX.js +1 -0
- package/dist/assets/usePackageL10n-D91-102Q.js +1 -0
- package/dist/assets/{useSettingsLabel-Bl5L3RqQ.js → useSettingsLabel-CeZ36S4g.js} +1 -1
- package/dist/assets/{utils-L-_x2yPF.js → utils-CJ4UwXMF.js} +1 -1
- package/dist/assets/{vendor-charts-DAI87uet.js → vendor-charts-BEGSmcjR.js} +3 -3
- package/dist/assets/{vendor-dndkit-CQdzTF9d.js → vendor-dndkit-CkJ59XFL.js} +1 -1
- package/dist/assets/{vendor-i18n-DeMInx63.js → vendor-i18n-Cpia2wlg.js} +1 -1
- package/dist/assets/{vendor-icons-core-B25E_7o5.js → vendor-icons-core-Bi9GWsvI.js} +1 -1
- package/dist/assets/{vendor-markdown-DjBjpmKk.js → vendor-markdown-C_Ip9E_I.js} +2 -2
- package/dist/assets/vendor-objectstack-B1R3ym-9.js +264 -0
- package/dist/assets/{vendor-radix-D1dussIM.js → vendor-radix-DFmVRiEf.js} +1 -1
- package/dist/assets/{vendor-react-BgOXCBVK.js → vendor-react-CsWFRkED.js} +1 -1
- package/dist/assets/vendor-sentry-B2ojA7qm.js +501 -0
- package/dist/assets/vendor-ui-utils-BFw4cGI6.js +1 -0
- package/dist/assets/vendor-zod-r9lyeyrU.js +64 -0
- package/dist/assets/{vennDiagram-T6HMQDX7-CrP23lgd.js → vennDiagram-T6HMQDX7-BKJsL5fS.js} +1 -1
- package/dist/assets/{wardleyDiagram-T6FBY63Y-DSw6poZ6.js → wardleyDiagram-T6FBY63Y-CZ0aMbYX.js} +1 -1
- package/dist/assets/{xychartDiagram-ELKLHX3M-BVUFqBDL.js → xychartDiagram-ELKLHX3M-BpK2RmQ_.js} +1 -1
- package/dist/eager-closure.json +277 -0
- package/dist/index.html +56 -16
- package/package.json +1 -1
- package/dist/assets/AdapterProvider-BpWMSLQH.js +0 -3
- package/dist/assets/AiPendingActionsPage-DAJUEqyC.js +0 -1
- package/dist/assets/ApiConsolePage-CgXbOsFC.js +0 -1
- package/dist/assets/AppDocsIndex-BgaIthca.js +0 -1
- package/dist/assets/AppManagementPage-BvGPskyf.js +0 -1
- package/dist/assets/ApprovalsInboxPage-CxmrNrwP.js +0 -1
- package/dist/assets/AuditLogPage-JahfQFnX.js +0 -1
- package/dist/assets/ComponentNavView-DjiNAGys.js +0 -1
- package/dist/assets/CreateViewDialog-CUvjCA1o.js +0 -1
- package/dist/assets/DashboardView-Cr-Q-16_.js +0 -1
- package/dist/assets/FlowRunsPage-DL7MhL_U.js +0 -1
- package/dist/assets/InterfaceListPage-CfhSyYAw.js +0 -1
- package/dist/assets/MarketplaceAccessDenied-t8A0k9OX.js +0 -1
- package/dist/assets/MarketplacePackagePage-XSdk80Dd.js +0 -4
- package/dist/assets/MarketplacePage-CZjDbg5G.js +0 -1
- package/dist/assets/MetadataProvider-CnYsadFP.js +0 -1
- package/dist/assets/ObjectDataPage-D9kCSxvN.js +0 -1
- package/dist/assets/PageView-q1XSwpVo.js +0 -1
- package/dist/assets/ProfilePage-DeDhni58.js +0 -1
- package/dist/assets/PublicFormsPage-BX6YXY8w.js +0 -1
- package/dist/assets/RecordDetailView-DrVbrbaN.js +0 -9
- package/dist/assets/RecordFormPage-Bs9wX-M6.js +0 -1
- package/dist/assets/ReportDefaultInspector-BbbhDn34.js +0 -3
- package/dist/assets/ReportView-D_soBKL6.js +0 -2
- package/dist/assets/SearchResultsPage--Beqyte8.js +0 -1
- package/dist/assets/SettingsHub-BozLt7dt.js +0 -1
- package/dist/assets/SettingsView-CC3o9IGe.js +0 -1
- package/dist/assets/SystemHubPage-CBdrX4bx.js +0 -1
- package/dist/assets/channel-dlPH8oK4.js +0 -1
- package/dist/assets/chunk-3NCLNEKW-CHvXlKAW.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-BLRqgrvV.js +0 -1
- package/dist/assets/classDiagram-JCYQIIEL-ghx-FrtR.js +0 -1
- package/dist/assets/classDiagram-v2-OCEON4UE-ghx-FrtR.js +0 -1
- package/dist/assets/componentRegistry-ByxoJqMW.js +0 -1
- package/dist/assets/data-adapter-yS4exRPT.js +0 -24
- package/dist/assets/flowDiagram-UKHOOZJN-6YBsanbO.js +0 -1
- package/dist/assets/framework-B8ndNKrd.js +0 -38
- package/dist/assets/i18n-DLOdKEiB.js +0 -9
- package/dist/assets/index-DaeqUnH6.js +0 -2
- package/dist/assets/index-gaeYmjTV.css +0 -2
- package/dist/assets/infrastructure-ChmEYj6c.js +0 -3
- package/dist/assets/maplibre-gl-DPzMTNDD.js +0 -801
- package/dist/assets/mermaid-GHXKKRXX-BrwYiPsC.js +0 -1
- package/dist/assets/metadata-admin-DqAvOmNf.js +0 -25
- package/dist/assets/plugin-calendar-CQVTjox_.js +0 -1
- package/dist/assets/plugin-charts-CBUIhVeW.js +0 -7
- package/dist/assets/plugin-chatbot-DsLGdfGx.js +0 -120
- package/dist/assets/plugin-dashboard-fdM1jm2j.js +0 -6
- package/dist/assets/plugin-form-Bv0Hi0E6.js +0 -1
- package/dist/assets/plugin-gantt-CRJpVrrP.js +0 -63
- package/dist/assets/plugin-grid-gHcTrjs3.js +0 -8
- package/dist/assets/plugin-kanban-CNm7DssD.js +0 -1
- package/dist/assets/plugin-map-5lRITB8H.css +0 -1
- package/dist/assets/plugin-map-TrYBEx8q.js +0 -1
- package/dist/assets/plugin-report-Bg1oh9SG.js +0 -59
- package/dist/assets/plugin-timeline-B30kCAGi.js +0 -1
- package/dist/assets/plugin-tree-Br5XanqO.js +0 -1
- package/dist/assets/plugin-view-CgDs-8T5.js +0 -1
- package/dist/assets/plugins-views-BxwTmeut.js +0 -4
- package/dist/assets/src-BBKXMp-o.js +0 -19
- package/dist/assets/src-CVuJHohL.js +0 -1
- package/dist/assets/src-leh_hyM1.js +0 -2
- package/dist/assets/stateDiagram-v2-UEYNNEHI-CHYANMPw.js +0 -1
- package/dist/assets/swimlanesDiagram-ULZ7WXOC-CBFvMN71.js +0 -8
- package/dist/assets/ui-components-mPgY5chB.js +0 -42
- package/dist/assets/ui-layout-CRcyxP_X.js +0 -1
- package/dist/assets/use-book-data-B2KPEJjv.js +0 -1
- package/dist/assets/useOpenRecordList-ovuRzPa2.js +0 -1
- package/dist/assets/usePackageL10n-9fP2GgDK.js +0 -1
- package/dist/assets/vendor-objectstack-DneBps14.js +0 -155
- package/dist/assets/vendor-sentry-DlmtNsBO.js +0 -501
- package/dist/assets/vendor-ui-utils-BGw4RtYu.js +0 -1
- package/dist/assets/vendor-zod-CBDIIwrA.js +0 -65
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{r as t,v as n,y as r}from"./vendor-react-BgOXCBVK.js";var i=e(r(),1),a=t(),o=Object.defineProperty,s=(e,t)=>o(e,`name`,{value:t,configurable:!0});function c(e,t){let n=i.createContext(t);n.displayName=e+`Context`;let r=s(e=>{let{children:t,...r}=e,o=i.useMemo(()=>r,Object.values(r));return(0,a.jsx)(n.Provider,{value:o,children:t})},`Provider`);r.displayName=e+`Provider`;function o(r,a={}){let{optional:o=!1}=a,s=i.useContext(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return s(o,`useContext`),[r,o]}s(c,`createContext`);function l(e,t=[]){let n=[];function r(t,r){let o=i.createContext(r);o.displayName=t+`Context`;let c=n.length;n=[...n,r];let l=s(t=>{let{scope:n,children:r,...s}=t,l=n?.[e]?.[c]||o,u=i.useMemo(()=>s,Object.values(s));return(0,a.jsx)(l.Provider,{value:u,children:r})},`Provider`);l.displayName=t+`Provider`;function u(n,a,s={}){let{optional:l=!1}=s,u=a?.[e]?.[c]||o,d=i.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return s(u,`useContext`),[l,u]}s(r,`createContext`);let o=s(()=>{let t=n.map(e=>i.createContext(e));return s(function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return o.scopeName=e,[r,u(o,...t)]}s(l,`createContextScope`);function u(...e){let t=e[0];if(e.length===1)return t;let n=s(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return s(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}s(u,`composeContextScopes`);var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}f(p,`setRef`);function m(...e){return t=>{let n=!1,r=e.map(e=>{let r=p(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():p(e[t],null)}}}}f(m,`composeRefs`);function h(...e){return i.useCallback(m(...e),e)}f(h,`useComposedRefs`);var g=Object.defineProperty,_=(e,t)=>g(e,`name`,{value:t,configurable:!0});function v(e){let t=i.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,s=!1,c=[];D(r)&&typeof j==`function`&&(r=j(r._payload)),i.Children.forEach(r,e=>{if(T(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;D(n)&&typeof j==`function`&&(n=j(n._payload)),o=S(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=i.cloneElement(o,void 0,c):!s&&i.Children.count(r)===1&&i.isValidElement(r)&&(o=r);let l=o?w(o):void 0,u=h(n,l);if(!o){if(r||r===0)throw Error(s?A(e):k(e));return r}let d=C(a,o.props??{});return o.type!==i.Fragment&&(d.ref=n?u:l),i.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}_(v,`createSlot`);var y=v(`Slot`),b=Symbol.for(`radix.slottable`);function x(e){let t=_(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=b,t}_(x,`createSlottable`);var S=_((e,t)=>{if(`child`in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function C(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}_(C,`mergeProps`);function w(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)}_(w,`getElementRef`);function T(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===b}_(T,`isSlottable`);var E=Symbol.for(`react.lazy`);function D(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===E&&`_payload`in e&&O(e._payload)}_(D,`isLazyComponent`);function O(e){return typeof e==`object`&&!!e&&`then`in e}_(O,`isPromiseLike`);var k=_(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),A=_(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),j=i.use,M=Object.defineProperty,N=(e,t)=>M(e,`name`,{value:t,configurable:!0});function P(e){let t=e+`CollectionProvider`,[n,r]=l(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=N(e=>{let{scope:t,children:n}=e,r=i.useRef(null),s=i.useRef(new Map).current;return(0,a.jsx)(o,{scope:t,itemMap:s,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=t;let u=e+`CollectionSlot`,d=v(u),f=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,s(u,n).collectionRef);return(0,a.jsx)(d,{ref:i,children:r})});f.displayName=u;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,g=v(p),_=i.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,c=i.useRef(null),l=h(t,c),u=s(p,n);return i.useEffect(()=>(u.itemMap.set(c,{ref:c,...o}),()=>void u.itemMap.delete(c))),(0,a.jsx)(g,{[m]:``,ref:l,children:r})});_.displayName=p;function y(t){let n=s(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return N(y,`useCollection`),[{Provider:c,Slot:f,ItemSlot:_},y,r]}N(P,`createCollection`);var ee=new WeakMap,te=class e extends Map{static{N(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ee.set(this,!0)}set(e,t){return ee.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=re(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=F(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=F(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return F(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function F(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=ne(e,t);return n===-1?void 0:e[n]}N(F,`at`);function ne(e,t){let n=e.length,r=re(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}N(ne,`toSafeIndex`);function re(e){return e!==e||e===0?0:Math.trunc(e)}N(re,`toSafeInteger`);function ie(e){let t=e+`CollectionProvider`,[n,r]=l(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new te,setItemMap:N(()=>void 0,`setItemMap`)}),c=N(({state:e,...t})=>e?(0,a.jsx)(d,{...t,state:e}):(0,a.jsx)(u,{...t}),`CollectionProvider`);c.displayName=t;let u=N(e=>{let t=b();return(0,a.jsx)(d,{...e,state:t})},`CollectionInit`);u.displayName=t+`Init`;let d=N(e=>{let{scope:t,children:n,state:r}=e,s=i.useRef(null),[c,l]=i.useState(null),u=h(s,l),[d,f]=r;return i.useEffect(()=>{if(!c)return;let e=ce(()=>{});return e.observe(c,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[c]),(0,a.jsx)(o,{scope:t,itemMap:d,setItemMap:f,collectionRef:u,collectionRefObject:s,collectionElement:c,children:n})},`CollectionProviderImpl`);d.displayName=t+`Impl`;let f=e+`CollectionSlot`,p=v(f),m=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,s(f,n).collectionRef);return(0,a.jsx)(p,{ref:i,children:r})});m.displayName=f;let g=e+`CollectionItemSlot`,_=v(g),y=i.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,c=i.useRef(null),[l,u]=i.useState(null),d=h(t,c,u),{setItemMap:f}=s(g,n),p=i.useRef(o);ae(p.current,o)||(p.current=o);let m=p.current;return i.useEffect(()=>{let e=m;return f(t=>l?t.has(l)?t.set(l,{...e,element:l}).toSorted(se):(t.set(l,{...e,element:l}),t.toSorted(se)):t),()=>{f(e=>!l||!e.has(l)?e:(e.delete(l),new te(e)))}},[l,m,f]),(0,a.jsx)(_,{"data-radix-collection-item":``,ref:d,children:r})});y.displayName=g;function b(){return i.useState(new te)}N(b,`useInitCollection`);function x(t){let{itemMap:n}=s(e+`CollectionConsumer`,t);return n}return N(x,`useCollection`),[{Provider:c,Slot:m,ItemSlot:y},{createCollectionScope:r,useCollection:x,useInitCollection:b}]}N(ie,`createCollection`);function ae(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}N(ae,`shallowEqual`);function oe(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}N(oe,`isElementPreceding`);function se(e,t){return!e[1].element||!t[1].element?0:oe(e[1].element,t[1].element)?-1:1}N(se,`sortByDocumentPosition`);function ce(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}N(ce,`getChildListObserver`);var le=Object.defineProperty,ue=(e,t)=>le(e,`name`,{value:t,configurable:!0}),de=!!(typeof window<`u`&&window.document&&window.document.createElement);function I(e,t,{checkForDefaultPrevented:n=!0}={}){return ue(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ue(I,`composeEventHandlers`);function fe(e){if(!de)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ue(fe,`getOwnerWindow`);function pe(e){if(!de)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ue(pe,`getOwnerDocument`);function me(e,t=!1){let{activeElement:n}=pe(e);if(!n?.nodeName)return null;if(he(n)&&n.contentDocument)return me(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=pe(n).getElementById(e);if(t)return t}}return n}ue(me,`getActiveElement`);function he(e){return e.tagName===`IFRAME`}ue(he,`isFrame`);var L=globalThis?.document?i.useLayoutEffect:()=>{},ge=Object.defineProperty,_e=(e,t)=>ge(e,`name`,{value:t,configurable:!0}),ve=i.useEffectEvent,ye=i.useInsertionEffect;function be(e){if(typeof ve==`function`)return ve(e);let t=i.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ye==`function`?ye(()=>{t.current=e}):L(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}_e(be,`useEffectEvent`);var xe=Object.defineProperty,Se=(e,t)=>xe(e,`name`,{value:t,configurable:!0}),Ce=i.useInsertionEffect||L;function R({prop:e,defaultProp:t,onChange:n=Se(()=>{},`onChange`),caller:r}){let[a,o,s]=we({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i.useCallback(t=>{if(c){let n=Te(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}Se(R,`useControllableState`);function we({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return Ce(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}Se(we,`useUncontrolledState`);function Te(e){return typeof e==`function`}Se(Te,`isFunction`);var Ee=Symbol(`RADIX:SYNC_STATE`);function De(e,t,n,r){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=be(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=i.useReducer((t,n)=>{if(n.type===Ee)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=i.useRef(m);i.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=i.useMemo(()=>a===void 0?f:{...f,state:a},[f,a]);return i.useEffect(()=>{l&&!Object.is(a,f.state)&&p({type:Ee,state:a})},[a,f.state,l]),[g,p]}Se(De,`useControllableStateReducer`);var Oe=e(n(),1),ke=Object.defineProperty,Ae=(e,t)=>ke(e,`name`,{value:t,configurable:!0}),z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=v(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...o}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,a.jsx)(s,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function je(e,t){e&&Oe.flushSync(()=>e.dispatchEvent(t))}Ae(je,`dispatchDiscreteCustomEvent`);var Me=Object.defineProperty,Ne=(e,t)=>Me(e,`name`,{value:t,configurable:!0});function Pe(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}Ne(Pe,`useStateMachine`);var B=Ne(e=>{let{present:t,children:n}=e,r=Fe(t),a=typeof n==`function`?n({present:r.isPresent}):i.Children.only(n),o=Le(r.ref,ze(a));return typeof n==`function`||r.isPresent?i.cloneElement(a,{ref:o}):null},`Presence`);function Fe(e){let[t,n]=i.useState(),r=i.useRef(null),a=i.useRef(e),o=i.useRef(`none`),s=i.useRef(void 0),[c,l]=Pe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{c===`mounted`?(o.current=s.current??Re(r.current),s.current=void 0):o.current=`none`},[c]),L(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=Re(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),L(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=Ne(i=>{let o=Re(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Ne(e=>{e.target===t&&(o.current=Re(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:i.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Re(t)}else r.current=null;n(e)},[])}}Ne(Fe,`usePresence`);function Ie(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ne(Ie,`setRef`);function Le(...e){let t=i.useRef(e);return t.current=e,i.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ie(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ie(n[e],null)}}},[])}Ne(Le,`useStableComposedRefs`);function Re(e){return e?.animationName||`none`}Ne(Re,`getAnimationName`);function ze(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)}Ne(ze,`getElementRef`);var Be=Object.defineProperty,Ve=(e,t)=>Be(e,`name`,{value:t,configurable:!0}),He=i.useId||(()=>void 0),Ue=0;function V(e){let[t,n]=i.useState(He());return L(()=>{e||n(e=>e??String(Ue++))},[e]),e||(t?`radix-${t}`:``)}Ve(V,`useId`);var We=Object.defineProperty,Ge=(e,t)=>We(e,`name`,{value:t,configurable:!0}),Ke=`Collapsible`,[qe,Je]=l(Ke),[Ye,Xe]=qe(Ke),Ze=i.forwardRef(Ge(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:c,...l}=e,[u,d]=R({prop:r,defaultProp:o??!1,onChange:c,caller:Ke});return(0,a.jsx)(Ye,{scope:n,disabled:s,contentId:V(),open:u,onOpenToggle:i.useCallback(()=>d(e=>!e),[d]),children:(0,a.jsx)(z.div,{"data-state":rt(u),"data-disabled":s?``:void 0,...l,ref:t})})},`Collapsible`)),Qe=`CollapsibleTrigger`,$e=i.forwardRef(Ge(function(e,t){let{__scopeCollapsible:n,...r}=e,i=Xe(Qe,n);return(0,a.jsx)(z.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":rt(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:I(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),et=`CollapsibleContent`,tt=i.forwardRef(Ge(function(e,t){let{forceMount:n,...r}=e,i=Xe(et,e.__scopeCollapsible);return(0,a.jsx)(B,{present:n||i.open,children:({present:e})=>(0,a.jsx)(nt,{...r,ref:t,present:e})})},`CollapsibleContent`)),nt=i.forwardRef(Ge(function(e,t){let{__scopeCollapsible:n,present:r,children:o,...s}=e,c=Xe(et,n),[l,u]=i.useState(r),d=i.useRef(null),f=h(t,d),p=i.useRef(0),m=p.current,g=i.useRef(0),_=g.current,v=c.open||l,y=i.useRef(v),b=i.useRef(void 0);return i.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),L(()=>{let e=d.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();p.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),u(r)}},[c.open,r]),(0,a.jsx)(z.div,{"data-state":rt(c.open),"data-disabled":c.disabled?``:void 0,id:c.contentId,hidden:!v,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:v&&o})},`CollapsibleContentImpl`));function rt(e){return e?`open`:`closed`}Ge(rt,`getState`);var it=Ze,at=$e,ot=tt,st=Object.defineProperty,ct=(e,t)=>st(e,`name`,{value:t,configurable:!0}),lt=i.createContext(void 0);function ut(e){let t=i.useContext(lt);return e||t||`ltr`}ct(ut,`useDirection`);var dt=Object.defineProperty,ft=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),pt=`Accordion`,mt=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[ht,gt,_t]=P(pt),[vt,yt]=l(pt,[_t,Je]),bt=Je(),xt=i.forwardRef(ft(function(e,t){let{type:n,...r}=e,i=r,o=r;return(0,a.jsx)(ht.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,a.jsx)(Dt,{...o,ref:t}):(0,a.jsx)(Et,{...i,ref:t})})},`Accordion`)),[St,Ct]=vt(pt),[wt,Tt]=vt(pt,{collapsible:!1}),Et=i.forwardRef(ft(function(e,t){let{value:n,defaultValue:r,onValueChange:o=ft(()=>{},`onValueChange`),collapsible:s=!1,...c}=e,[l,u]=R({prop:n,defaultProp:r??``,onChange:o,caller:pt});return(0,a.jsx)(St,{scope:e.__scopeAccordion,value:i.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:i.useCallback(()=>s&&u(``),[s,u]),children:(0,a.jsx)(wt,{scope:e.__scopeAccordion,collapsible:s,children:(0,a.jsx)(At,{...c,ref:t})})})},`AccordionImplSingle`)),Dt=i.forwardRef(ft(function(e,t){let{value:n,defaultValue:r,onValueChange:o=ft(()=>{},`onValueChange`),...s}=e,[c,l]=R({prop:n,defaultProp:r??[],onChange:o,caller:pt}),u=i.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=i.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return(0,a.jsx)(St,{scope:e.__scopeAccordion,value:c,onItemOpen:u,onItemClose:d,children:(0,a.jsx)(wt,{scope:e.__scopeAccordion,collapsible:!0,children:(0,a.jsx)(At,{...s,ref:t})})})},`AccordionImplMultiple`)),[Ot,kt]=vt(pt),At=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,disabled:r,dir:o,orientation:s=`vertical`,...c}=e,l=h(i.useRef(null),t),u=gt(n),d=ut(o)===`ltr`,f=I(e.onKeyDown,e=>{if(!mt.includes(e.key))return;let t=e.target,n=u().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let a=r,o=i-1,c=ft(()=>{a=r+1,a>o&&(a=0)},`moveNext`),l=ft(()=>{a=r-1,a<0&&(a=o)},`movePrev`);switch(e.key){case`Home`:a=0;break;case`End`:a=o;break;case`ArrowRight`:s===`horizontal`&&(d?c():l());break;case`ArrowDown`:s===`vertical`&&c();break;case`ArrowLeft`:s===`horizontal`&&(d?l():c());break;case`ArrowUp`:s===`vertical`&&l()}n[a%i].ref.current?.focus()});return(0,a.jsx)(Ot,{scope:n,disabled:r,direction:o,orientation:s,children:(0,a.jsx)(ht.Slot,{scope:n,children:(0,a.jsx)(z.div,{...c,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})},`AccordionImpl`)),jt=`AccordionItem`,[Mt,Nt]=vt(jt),Pt=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,o=kt(jt,n),s=Ct(jt,n),c=bt(n),l=V(),u=r&&s.value.includes(r)||!1,d=o.disabled||e.disabled;return(0,a.jsx)(Mt,{scope:n,open:u,disabled:d,triggerId:l,children:(0,a.jsx)(it,{"data-orientation":o.orientation,"data-state":Vt(u),...c,...i,ref:t,disabled:d,open:u,onOpenChange:e=>{e?s.onItemOpen(r):s.onItemClose(r)}})})},`AccordionItem`)),Ft=`AccordionHeader`,It=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,...r}=e,i=kt(pt,n),o=Nt(Ft,n);return(0,a.jsx)(z.h3,{"data-orientation":i.orientation,"data-state":Vt(o.open),"data-disabled":o.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),Lt=`AccordionTrigger`,Rt=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,...r}=e,i=kt(pt,n),o=Nt(Lt,n),s=Tt(Lt,n),c=bt(n);return(0,a.jsx)(ht.ItemSlot,{scope:n,children:(0,a.jsx)(at,{"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...c,...r,ref:t})})},`AccordionTrigger`)),zt=`AccordionContent`,Bt=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,...r}=e,i=kt(pt,n),o=Nt(zt,n),s=bt(n);return(0,a.jsx)(ot,{role:`region`,"aria-labelledby":o.triggerId,"data-orientation":i.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})},`AccordionContent`));function Vt(e){return e?`open`:`closed`}ft(Vt,`getState`);var Ht=xt,Ut=Pt,Wt=It,Gt=Rt,Kt=Bt,qt=Object.defineProperty,Jt=(e,t)=>qt(e,`name`,{value:t,configurable:!0});function H(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}Jt(H,`useCallbackRef`);var Yt=Object.defineProperty,U=(e,t)=>Yt(e,`name`,{value:t,configurable:!0}),Xt=`dismissableLayer.update`,Zt=`dismissableLayer.pointerDownOutside`,Qt=`dismissableLayer.focusOutside`,$t,en=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),tn=i.forwardRef(U(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,onDismiss:u,...d}=e,f=i.useContext(en),[p,m]=i.useState(null),g=p?.ownerDocument??globalThis?.document,[,_]=i.useState({}),v=h(t,m),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=b?y.indexOf(b):-1,S=p?y.indexOf(p):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=i.useRef(!1),E=an(e=>{s?.(e),l?.(e),e.defaultPrevented||u?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:i.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return w&&!t},[f.branches,w])}),D=on(e=>{if(r&&T.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(c?.(e),l?.(e),e.defaultPrevented||u?.())},g),O=p?S===y.length-1:!1,k=H(e=>{e.key===`Escape`&&(o?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return i.useEffect(()=>{if(O)return g.addEventListener(`keydown`,k,{capture:!0}),()=>g.removeEventListener(`keydown`,k,{capture:!0})},[g,O,k]),i.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&($t=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),sn(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=$t))}},[p,g,n,f]),i.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),sn())},[p,f]),i.useEffect(()=>{let e=U(()=>_({}),`handleUpdate`);return document.addEventListener(Xt,e),()=>document.removeEventListener(Xt,e)},[]),(0,a.jsx)(z.div,{...d,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:I(e.onFocusCapture,D.onFocusCapture),onBlurCapture:I(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function nn(){let e=i.useContext(en),[t,n]=i.useState(null);return i.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}U(nn,`useDismissableLayerSurface`);var rn=U(()=>!0,`IS_TRUE`);function an(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=rn}=t,c=H(e),l=i.useRef(!1),u=i.useRef(!1),d=i.useRef(new Map),f=i.useRef(()=>{});return i.useEffect(()=>{function e(){u.current=!1,a.current=!1,d.current.clear()}U(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}U(t,`isOutsideInteractionIntercepted`);function i(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}U(i,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}U(p,`handleInteractionBubble`);let m=U(i=>{if(i.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||cn(Zt,c,p,{discrete:!0})};if(U(o,`handleAndDispatchPointerDownOutsideEvent`),!s(i.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:i};u.current=!0,a.current=r&&i.button===0,d.current.clear(),!r||i.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,i,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,i,!0),n.removeEventListener(e,p)}},[n,c,r,a,o,s]),{onPointerDownCapture:U(()=>l.current=!0,`onPointerDownCapture`)}}U(an,`usePointerDownOutside`);function on(e,t=globalThis?.document){let n=H(e),r=i.useRef(!1);return i.useEffect(()=>{let e=U(e=>{e.target&&!r.current&&cn(Qt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:U(()=>r.current=!0,`onFocusCapture`),onBlurCapture:U(()=>r.current=!1,`onBlurCapture`)}}U(on,`useFocusOutside`);function sn(){let e=new CustomEvent(Xt);document.dispatchEvent(e)}U(sn,`dispatchUpdate`);function cn(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?je(i,a):i.dispatchEvent(a)}U(cn,`handleAndDispatchCustomEvent`);var ln=Object.defineProperty,W=(e,t)=>ln(e,`name`,{value:t,configurable:!0}),un=`focusScope.autoFocusOnMount`,dn=`focusScope.autoFocusOnUnmount`,fn={bubbles:!1,cancelable:!0},pn=i.forwardRef(W(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=i.useState(null),d=H(o),f=H(s),p=i.useRef(null),m=h(t,u),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(g.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:bn(p.current,{select:!0})},t=function(e){if(g.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||bn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&bn(l)};W(e,`handleFocusIn`),W(t,`handleFocusOut`),W(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,g.paused]),i.useEffect(()=>{if(l){g.__pendingStackRemove!==void 0&&(clearTimeout(g.__pendingStackRemove),g.__pendingStackRemove=void 0),xn.add(g);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(un,fn);l.addEventListener(un,d),l.dispatchEvent(t),t.defaultPrevented||(mn(wn(gn(l)),{select:!0}),document.activeElement===e&&bn(l))}return()=>{l.removeEventListener(un,d),g.__pendingStackRemove=setTimeout(()=>{g.__pendingStackRemove=void 0;let t=new CustomEvent(dn,fn);l.addEventListener(dn,f),l.dispatchEvent(t),t.defaultPrevented||bn(e??document.body,{select:!0}),l.removeEventListener(dn,f),xn.remove(g)},0)}}},[l,d,f,g]);let _=i.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=hn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&bn(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&bn(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,a.jsx)(z.div,{tabIndex:-1,...c,ref:m,onKeyDown:_})},`FocusScope`));function mn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(bn(r,{select:t}),document.activeElement!==n)return}W(mn,`focusFirst`);function hn(e){let t=gn(e);return[_n(t,e),_n(t.reverse(),e)]}W(hn,`getTabbableEdges`);function gn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:W(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}W(gn,`getTabbableCandidates`);function _n(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):vn(r,{upTo:t})))return r}W(_n,`findVisible`);function vn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}W(vn,`isHidden`);function yn(e){return e instanceof HTMLInputElement&&`select`in e}W(yn,`isSelectableInput`);function bn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yn(e)&&t&&e.select()}}W(bn,`focus`);var xn=Sn();function Sn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Cn(e,t),e.unshift(t)},remove(t){e=Cn(e,t),e[0]?.resume()}}}W(Sn,`createFocusScopesStack`);function Cn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}W(Cn,`arrayRemove`);function wn(e){return e.filter(e=>e.tagName!==`A`)}W(wn,`removeLinks`);var Tn=Object.defineProperty,En=i.forwardRef(((e,t)=>Tn(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[o,s]=i.useState(!1);L(()=>s(!0),[]);let c=n||o&&globalThis?.document?.body;return c?Oe.createPortal((0,a.jsx)(z.div,{...r,ref:t}),c):null},`Portal`)),Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0}),kn=0,An=null;function jn(e){return Mn(),e.children}On(jn,`FocusGuards`);function Mn(){i.useEffect(()=>{An||={start:Nn(),end:Nn()};let{start:e,end:t}=An;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),kn++,()=>{kn===1&&(An?.start.remove(),An?.end.remove(),An=null),kn=Math.max(0,kn-1)}},[])}On(Mn,`useFocusGuards`);function Nn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}On(Nn,`createFocusGuard`);var Pn=function(){return Pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pn.apply(this,arguments)};function Fn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function In(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ln=`right-scroll-bar-position`,Rn=`width-before-scroll-bar`,zn=`with-scroll-bars-hidden`,Bn=`--removed-body-scroll-bar-size`;function Vn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Hn(e,t){var n=(0,i.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Un=typeof window<`u`?i.useLayoutEffect:i.useEffect,Wn=new WeakMap;function Gn(e,t){var n=Hn(t||null,function(t){return e.forEach(function(e){return Vn(e,t)})});return Un(function(){var t=Wn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Vn(e,null)}),i.forEach(function(e){r.has(e)||Vn(e,a)})}Wn.set(n,e)},[e]),n}function Kn(e){return e}function qn(e,t){t===void 0&&(t=Kn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Jn(e){e===void 0&&(e={});var t=qn(null);return t.options=Pn({async:!0,ssr:!1},e),t}var Yn=function(e){var t=e.sideCar,n=Fn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return i.createElement(r,Pn({},n))};Yn.isSideCarExport=!0;function Xn(e,t){return e.useMedium(t),Yn}var Zn=Jn(),Qn=function(){},$n=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Qn,onWheelCapture:Qn,onTouchMoveCapture:Qn}),a=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Fn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Gn([n,t]),w=Pn(Pn({},x),a);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:Zn,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(c),Pn(Pn({},w),{ref:C})):i.createElement(y,Pn({},w,{className:l,ref:C}),c))});$n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$n.classNames={fullWidth:Rn,zeroRight:Ln};var er,tr=function(){if(er)return er;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tr();return t&&e.setAttribute(`nonce`,t),e}function rr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ir(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ar=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nr())&&(rr(t,n),ir(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},or=function(){var e=ar();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sr=function(){var e=or();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},cr={left:0,top:0,right:0,gap:0},lr=function(e){return parseInt(e||``,10)||0},ur=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[lr(n),lr(r),lr(i)]},dr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return cr;var t=ur(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fr=sr(),pr=`data-scroll-locked`,mr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n,y as r}from"./vendor-react-CsWFRkED.js";var i=e(t(),1),a=n(),o=Object.defineProperty,s=(e,t)=>o(e,`name`,{value:t,configurable:!0});function c(e,t){let n=i.createContext(t);n.displayName=e+`Context`;let r=s(e=>{let{children:t,...r}=e,o=i.useMemo(()=>r,Object.values(r));return(0,a.jsx)(n.Provider,{value:o,children:t})},`Provider`);r.displayName=e+`Provider`;function o(r,a={}){let{optional:o=!1}=a,s=i.useContext(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return s(o,`useContext`),[r,o]}s(c,`createContext`);function l(e,t=[]){let n=[];function r(t,r){let o=i.createContext(r);o.displayName=t+`Context`;let c=n.length;n=[...n,r];let l=s(t=>{let{scope:n,children:r,...s}=t,l=n?.[e]?.[c]||o,u=i.useMemo(()=>s,Object.values(s));return(0,a.jsx)(l.Provider,{value:u,children:r})},`Provider`);l.displayName=t+`Provider`;function u(n,a,s={}){let{optional:l=!1}=s,u=a?.[e]?.[c]||o,d=i.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return s(u,`useContext`),[l,u]}s(r,`createContext`);let o=s(()=>{let t=n.map(e=>i.createContext(e));return s(function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return o.scopeName=e,[r,u(o,...t)]}s(l,`createContextScope`);function u(...e){let t=e[0];if(e.length===1)return t;let n=s(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return s(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}s(u,`composeContextScopes`);var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}f(p,`setRef`);function m(...e){return t=>{let n=!1,r=e.map(e=>{let r=p(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():p(e[t],null)}}}}f(m,`composeRefs`);function h(...e){return i.useCallback(m(...e),e)}f(h,`useComposedRefs`);var g=Object.defineProperty,_=(e,t)=>g(e,`name`,{value:t,configurable:!0});function v(e){let t=i.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,s=!1,c=[];D(r)&&typeof j==`function`&&(r=j(r._payload)),i.Children.forEach(r,e=>{if(T(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;D(n)&&typeof j==`function`&&(n=j(n._payload)),o=S(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=i.cloneElement(o,void 0,c):!s&&i.Children.count(r)===1&&i.isValidElement(r)&&(o=r);let l=o?w(o):void 0,u=h(n,l);if(!o){if(r||r===0)throw Error(s?A(e):k(e));return r}let d=C(a,o.props??{});return o.type!==i.Fragment&&(d.ref=n?u:l),i.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}_(v,`createSlot`);var y=v(`Slot`),b=Symbol.for(`radix.slottable`);function x(e){let t=_(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=b,t}_(x,`createSlottable`);var S=_((e,t)=>{if(`child`in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function C(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}_(C,`mergeProps`);function w(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)}_(w,`getElementRef`);function T(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===b}_(T,`isSlottable`);var E=Symbol.for(`react.lazy`);function D(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===E&&`_payload`in e&&O(e._payload)}_(D,`isLazyComponent`);function O(e){return typeof e==`object`&&!!e&&`then`in e}_(O,`isPromiseLike`);var k=_(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),A=_(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),j=i.use,M=Object.defineProperty,N=(e,t)=>M(e,`name`,{value:t,configurable:!0});function P(e){let t=e+`CollectionProvider`,[n,r]=l(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=N(e=>{let{scope:t,children:n}=e,r=i.useRef(null),s=i.useRef(new Map).current;return(0,a.jsx)(o,{scope:t,itemMap:s,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=t;let u=e+`CollectionSlot`,d=v(u),f=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,s(u,n).collectionRef);return(0,a.jsx)(d,{ref:i,children:r})});f.displayName=u;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,g=v(p),_=i.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,c=i.useRef(null),l=h(t,c),u=s(p,n);return i.useEffect(()=>(u.itemMap.set(c,{ref:c,...o}),()=>void u.itemMap.delete(c))),(0,a.jsx)(g,{[m]:``,ref:l,children:r})});_.displayName=p;function y(t){let n=s(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return N(y,`useCollection`),[{Provider:c,Slot:f,ItemSlot:_},y,r]}N(P,`createCollection`);var ee=new WeakMap,te=class e extends Map{static{N(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ee.set(this,!0)}set(e,t){return ee.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=re(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=F(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=F(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return F(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function F(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=ne(e,t);return n===-1?void 0:e[n]}N(F,`at`);function ne(e,t){let n=e.length,r=re(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}N(ne,`toSafeIndex`);function re(e){return e!==e||e===0?0:Math.trunc(e)}N(re,`toSafeInteger`);function ie(e){let t=e+`CollectionProvider`,[n,r]=l(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new te,setItemMap:N(()=>void 0,`setItemMap`)}),c=N(({state:e,...t})=>e?(0,a.jsx)(d,{...t,state:e}):(0,a.jsx)(u,{...t}),`CollectionProvider`);c.displayName=t;let u=N(e=>{let t=b();return(0,a.jsx)(d,{...e,state:t})},`CollectionInit`);u.displayName=t+`Init`;let d=N(e=>{let{scope:t,children:n,state:r}=e,s=i.useRef(null),[c,l]=i.useState(null),u=h(s,l),[d,f]=r;return i.useEffect(()=>{if(!c)return;let e=ce(()=>{});return e.observe(c,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[c]),(0,a.jsx)(o,{scope:t,itemMap:d,setItemMap:f,collectionRef:u,collectionRefObject:s,collectionElement:c,children:n})},`CollectionProviderImpl`);d.displayName=t+`Impl`;let f=e+`CollectionSlot`,p=v(f),m=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,s(f,n).collectionRef);return(0,a.jsx)(p,{ref:i,children:r})});m.displayName=f;let g=e+`CollectionItemSlot`,_=v(g),y=i.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,c=i.useRef(null),[l,u]=i.useState(null),d=h(t,c,u),{setItemMap:f}=s(g,n),p=i.useRef(o);ae(p.current,o)||(p.current=o);let m=p.current;return i.useEffect(()=>{let e=m;return f(t=>l?t.has(l)?t.set(l,{...e,element:l}).toSorted(se):(t.set(l,{...e,element:l}),t.toSorted(se)):t),()=>{f(e=>!l||!e.has(l)?e:(e.delete(l),new te(e)))}},[l,m,f]),(0,a.jsx)(_,{"data-radix-collection-item":``,ref:d,children:r})});y.displayName=g;function b(){return i.useState(new te)}N(b,`useInitCollection`);function x(t){let{itemMap:n}=s(e+`CollectionConsumer`,t);return n}return N(x,`useCollection`),[{Provider:c,Slot:m,ItemSlot:y},{createCollectionScope:r,useCollection:x,useInitCollection:b}]}N(ie,`createCollection`);function ae(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}N(ae,`shallowEqual`);function oe(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}N(oe,`isElementPreceding`);function se(e,t){return!e[1].element||!t[1].element?0:oe(e[1].element,t[1].element)?-1:1}N(se,`sortByDocumentPosition`);function ce(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}N(ce,`getChildListObserver`);var le=Object.defineProperty,ue=(e,t)=>le(e,`name`,{value:t,configurable:!0}),de=!!(typeof window<`u`&&window.document&&window.document.createElement);function I(e,t,{checkForDefaultPrevented:n=!0}={}){return ue(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ue(I,`composeEventHandlers`);function fe(e){if(!de)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ue(fe,`getOwnerWindow`);function pe(e){if(!de)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ue(pe,`getOwnerDocument`);function me(e,t=!1){let{activeElement:n}=pe(e);if(!n?.nodeName)return null;if(he(n)&&n.contentDocument)return me(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=pe(n).getElementById(e);if(t)return t}}return n}ue(me,`getActiveElement`);function he(e){return e.tagName===`IFRAME`}ue(he,`isFrame`);var L=globalThis?.document?i.useLayoutEffect:()=>{},ge=Object.defineProperty,_e=(e,t)=>ge(e,`name`,{value:t,configurable:!0}),ve=i.useEffectEvent,ye=i.useInsertionEffect;function be(e){if(typeof ve==`function`)return ve(e);let t=i.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ye==`function`?ye(()=>{t.current=e}):L(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}_e(be,`useEffectEvent`);var xe=Object.defineProperty,Se=(e,t)=>xe(e,`name`,{value:t,configurable:!0}),Ce=i.useInsertionEffect||L;function R({prop:e,defaultProp:t,onChange:n=Se(()=>{},`onChange`),caller:r}){let[a,o,s]=we({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i.useCallback(t=>{if(c){let n=Te(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}Se(R,`useControllableState`);function we({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return Ce(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}Se(we,`useUncontrolledState`);function Te(e){return typeof e==`function`}Se(Te,`isFunction`);var Ee=Symbol(`RADIX:SYNC_STATE`);function De(e,t,n,r){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=be(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=i.useReducer((t,n)=>{if(n.type===Ee)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=i.useRef(m);i.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=i.useMemo(()=>a===void 0?f:{...f,state:a},[f,a]);return i.useEffect(()=>{l&&!Object.is(a,f.state)&&p({type:Ee,state:a})},[a,f.state,l]),[g,p]}Se(De,`useControllableStateReducer`);var Oe=e(r(),1),ke=Object.defineProperty,Ae=(e,t)=>ke(e,`name`,{value:t,configurable:!0}),z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=v(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...o}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,a.jsx)(s,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function je(e,t){e&&Oe.flushSync(()=>e.dispatchEvent(t))}Ae(je,`dispatchDiscreteCustomEvent`);var Me=Object.defineProperty,Ne=(e,t)=>Me(e,`name`,{value:t,configurable:!0});function Pe(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}Ne(Pe,`useStateMachine`);var B=Ne(e=>{let{present:t,children:n}=e,r=Fe(t),a=typeof n==`function`?n({present:r.isPresent}):i.Children.only(n),o=Le(r.ref,ze(a));return typeof n==`function`||r.isPresent?i.cloneElement(a,{ref:o}):null},`Presence`);function Fe(e){let[t,n]=i.useState(),r=i.useRef(null),a=i.useRef(e),o=i.useRef(`none`),s=i.useRef(void 0),[c,l]=Pe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{c===`mounted`?(o.current=s.current??Re(r.current),s.current=void 0):o.current=`none`},[c]),L(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=Re(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),L(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=Ne(i=>{let o=Re(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Ne(e=>{e.target===t&&(o.current=Re(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:i.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Re(t)}else r.current=null;n(e)},[])}}Ne(Fe,`usePresence`);function Ie(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ne(Ie,`setRef`);function Le(...e){let t=i.useRef(e);return t.current=e,i.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ie(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ie(n[e],null)}}},[])}Ne(Le,`useStableComposedRefs`);function Re(e){return e?.animationName||`none`}Ne(Re,`getAnimationName`);function ze(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)}Ne(ze,`getElementRef`);var Be=Object.defineProperty,Ve=(e,t)=>Be(e,`name`,{value:t,configurable:!0}),He=i.useId||(()=>void 0),Ue=0;function V(e){let[t,n]=i.useState(He());return L(()=>{e||n(e=>e??String(Ue++))},[e]),e||(t?`radix-${t}`:``)}Ve(V,`useId`);var We=Object.defineProperty,Ge=(e,t)=>We(e,`name`,{value:t,configurable:!0}),Ke=`Collapsible`,[qe,Je]=l(Ke),[Ye,Xe]=qe(Ke),Ze=i.forwardRef(Ge(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:c,...l}=e,[u,d]=R({prop:r,defaultProp:o??!1,onChange:c,caller:Ke});return(0,a.jsx)(Ye,{scope:n,disabled:s,contentId:V(),open:u,onOpenToggle:i.useCallback(()=>d(e=>!e),[d]),children:(0,a.jsx)(z.div,{"data-state":rt(u),"data-disabled":s?``:void 0,...l,ref:t})})},`Collapsible`)),Qe=`CollapsibleTrigger`,$e=i.forwardRef(Ge(function(e,t){let{__scopeCollapsible:n,...r}=e,i=Xe(Qe,n);return(0,a.jsx)(z.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":rt(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:I(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),et=`CollapsibleContent`,tt=i.forwardRef(Ge(function(e,t){let{forceMount:n,...r}=e,i=Xe(et,e.__scopeCollapsible);return(0,a.jsx)(B,{present:n||i.open,children:({present:e})=>(0,a.jsx)(nt,{...r,ref:t,present:e})})},`CollapsibleContent`)),nt=i.forwardRef(Ge(function(e,t){let{__scopeCollapsible:n,present:r,children:o,...s}=e,c=Xe(et,n),[l,u]=i.useState(r),d=i.useRef(null),f=h(t,d),p=i.useRef(0),m=p.current,g=i.useRef(0),_=g.current,v=c.open||l,y=i.useRef(v),b=i.useRef(void 0);return i.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),L(()=>{let e=d.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();p.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),u(r)}},[c.open,r]),(0,a.jsx)(z.div,{"data-state":rt(c.open),"data-disabled":c.disabled?``:void 0,id:c.contentId,hidden:!v,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:v&&o})},`CollapsibleContentImpl`));function rt(e){return e?`open`:`closed`}Ge(rt,`getState`);var it=Ze,at=$e,ot=tt,st=Object.defineProperty,ct=(e,t)=>st(e,`name`,{value:t,configurable:!0}),lt=i.createContext(void 0);function ut(e){let t=i.useContext(lt);return e||t||`ltr`}ct(ut,`useDirection`);var dt=Object.defineProperty,ft=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),pt=`Accordion`,mt=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[ht,gt,_t]=P(pt),[vt,yt]=l(pt,[_t,Je]),bt=Je(),xt=i.forwardRef(ft(function(e,t){let{type:n,...r}=e,i=r,o=r;return(0,a.jsx)(ht.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,a.jsx)(Dt,{...o,ref:t}):(0,a.jsx)(Et,{...i,ref:t})})},`Accordion`)),[St,Ct]=vt(pt),[wt,Tt]=vt(pt,{collapsible:!1}),Et=i.forwardRef(ft(function(e,t){let{value:n,defaultValue:r,onValueChange:o=ft(()=>{},`onValueChange`),collapsible:s=!1,...c}=e,[l,u]=R({prop:n,defaultProp:r??``,onChange:o,caller:pt});return(0,a.jsx)(St,{scope:e.__scopeAccordion,value:i.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:i.useCallback(()=>s&&u(``),[s,u]),children:(0,a.jsx)(wt,{scope:e.__scopeAccordion,collapsible:s,children:(0,a.jsx)(At,{...c,ref:t})})})},`AccordionImplSingle`)),Dt=i.forwardRef(ft(function(e,t){let{value:n,defaultValue:r,onValueChange:o=ft(()=>{},`onValueChange`),...s}=e,[c,l]=R({prop:n,defaultProp:r??[],onChange:o,caller:pt}),u=i.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=i.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return(0,a.jsx)(St,{scope:e.__scopeAccordion,value:c,onItemOpen:u,onItemClose:d,children:(0,a.jsx)(wt,{scope:e.__scopeAccordion,collapsible:!0,children:(0,a.jsx)(At,{...s,ref:t})})})},`AccordionImplMultiple`)),[Ot,kt]=vt(pt),At=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,disabled:r,dir:o,orientation:s=`vertical`,...c}=e,l=h(i.useRef(null),t),u=gt(n),d=ut(o)===`ltr`,f=I(e.onKeyDown,e=>{if(!mt.includes(e.key))return;let t=e.target,n=u().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let a=r,o=i-1,c=ft(()=>{a=r+1,a>o&&(a=0)},`moveNext`),l=ft(()=>{a=r-1,a<0&&(a=o)},`movePrev`);switch(e.key){case`Home`:a=0;break;case`End`:a=o;break;case`ArrowRight`:s===`horizontal`&&(d?c():l());break;case`ArrowDown`:s===`vertical`&&c();break;case`ArrowLeft`:s===`horizontal`&&(d?l():c());break;case`ArrowUp`:s===`vertical`&&l()}n[a%i].ref.current?.focus()});return(0,a.jsx)(Ot,{scope:n,disabled:r,direction:o,orientation:s,children:(0,a.jsx)(ht.Slot,{scope:n,children:(0,a.jsx)(z.div,{...c,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})},`AccordionImpl`)),jt=`AccordionItem`,[Mt,Nt]=vt(jt),Pt=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,o=kt(jt,n),s=Ct(jt,n),c=bt(n),l=V(),u=r&&s.value.includes(r)||!1,d=o.disabled||e.disabled;return(0,a.jsx)(Mt,{scope:n,open:u,disabled:d,triggerId:l,children:(0,a.jsx)(it,{"data-orientation":o.orientation,"data-state":Vt(u),...c,...i,ref:t,disabled:d,open:u,onOpenChange:e=>{e?s.onItemOpen(r):s.onItemClose(r)}})})},`AccordionItem`)),Ft=`AccordionHeader`,It=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,...r}=e,i=kt(pt,n),o=Nt(Ft,n);return(0,a.jsx)(z.h3,{"data-orientation":i.orientation,"data-state":Vt(o.open),"data-disabled":o.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),Lt=`AccordionTrigger`,Rt=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,...r}=e,i=kt(pt,n),o=Nt(Lt,n),s=Tt(Lt,n),c=bt(n);return(0,a.jsx)(ht.ItemSlot,{scope:n,children:(0,a.jsx)(at,{"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...c,...r,ref:t})})},`AccordionTrigger`)),zt=`AccordionContent`,Bt=i.forwardRef(ft(function(e,t){let{__scopeAccordion:n,...r}=e,i=kt(pt,n),o=Nt(zt,n),s=bt(n);return(0,a.jsx)(ot,{role:`region`,"aria-labelledby":o.triggerId,"data-orientation":i.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})},`AccordionContent`));function Vt(e){return e?`open`:`closed`}ft(Vt,`getState`);var Ht=xt,Ut=Pt,Wt=It,Gt=Rt,Kt=Bt,qt=Object.defineProperty,Jt=(e,t)=>qt(e,`name`,{value:t,configurable:!0});function H(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}Jt(H,`useCallbackRef`);var Yt=Object.defineProperty,U=(e,t)=>Yt(e,`name`,{value:t,configurable:!0}),Xt=`dismissableLayer.update`,Zt=`dismissableLayer.pointerDownOutside`,Qt=`dismissableLayer.focusOutside`,$t,en=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),tn=i.forwardRef(U(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,onDismiss:u,...d}=e,f=i.useContext(en),[p,m]=i.useState(null),g=p?.ownerDocument??globalThis?.document,[,_]=i.useState({}),v=h(t,m),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=b?y.indexOf(b):-1,S=p?y.indexOf(p):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=i.useRef(!1),E=an(e=>{s?.(e),l?.(e),e.defaultPrevented||u?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:i.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return w&&!t},[f.branches,w])}),D=on(e=>{if(r&&T.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(c?.(e),l?.(e),e.defaultPrevented||u?.())},g),O=p?S===y.length-1:!1,k=H(e=>{e.key===`Escape`&&(o?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return i.useEffect(()=>{if(O)return g.addEventListener(`keydown`,k,{capture:!0}),()=>g.removeEventListener(`keydown`,k,{capture:!0})},[g,O,k]),i.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&($t=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),sn(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=$t))}},[p,g,n,f]),i.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),sn())},[p,f]),i.useEffect(()=>{let e=U(()=>_({}),`handleUpdate`);return document.addEventListener(Xt,e),()=>document.removeEventListener(Xt,e)},[]),(0,a.jsx)(z.div,{...d,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:I(e.onFocusCapture,D.onFocusCapture),onBlurCapture:I(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function nn(){let e=i.useContext(en),[t,n]=i.useState(null);return i.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}U(nn,`useDismissableLayerSurface`);var rn=U(()=>!0,`IS_TRUE`);function an(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=rn}=t,c=H(e),l=i.useRef(!1),u=i.useRef(!1),d=i.useRef(new Map),f=i.useRef(()=>{});return i.useEffect(()=>{function e(){u.current=!1,a.current=!1,d.current.clear()}U(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}U(t,`isOutsideInteractionIntercepted`);function i(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}U(i,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}U(p,`handleInteractionBubble`);let m=U(i=>{if(i.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||cn(Zt,c,p,{discrete:!0})};if(U(o,`handleAndDispatchPointerDownOutsideEvent`),!s(i.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:i};u.current=!0,a.current=r&&i.button===0,d.current.clear(),!r||i.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,i,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,i,!0),n.removeEventListener(e,p)}},[n,c,r,a,o,s]),{onPointerDownCapture:U(()=>l.current=!0,`onPointerDownCapture`)}}U(an,`usePointerDownOutside`);function on(e,t=globalThis?.document){let n=H(e),r=i.useRef(!1);return i.useEffect(()=>{let e=U(e=>{e.target&&!r.current&&cn(Qt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:U(()=>r.current=!0,`onFocusCapture`),onBlurCapture:U(()=>r.current=!1,`onBlurCapture`)}}U(on,`useFocusOutside`);function sn(){let e=new CustomEvent(Xt);document.dispatchEvent(e)}U(sn,`dispatchUpdate`);function cn(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?je(i,a):i.dispatchEvent(a)}U(cn,`handleAndDispatchCustomEvent`);var ln=Object.defineProperty,W=(e,t)=>ln(e,`name`,{value:t,configurable:!0}),un=`focusScope.autoFocusOnMount`,dn=`focusScope.autoFocusOnUnmount`,fn={bubbles:!1,cancelable:!0},pn=i.forwardRef(W(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=i.useState(null),d=H(o),f=H(s),p=i.useRef(null),m=h(t,u),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(g.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:bn(p.current,{select:!0})},t=function(e){if(g.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||bn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&bn(l)};W(e,`handleFocusIn`),W(t,`handleFocusOut`),W(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,g.paused]),i.useEffect(()=>{if(l){g.__pendingStackRemove!==void 0&&(clearTimeout(g.__pendingStackRemove),g.__pendingStackRemove=void 0),xn.add(g);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(un,fn);l.addEventListener(un,d),l.dispatchEvent(t),t.defaultPrevented||(mn(wn(gn(l)),{select:!0}),document.activeElement===e&&bn(l))}return()=>{l.removeEventListener(un,d),g.__pendingStackRemove=setTimeout(()=>{g.__pendingStackRemove=void 0;let t=new CustomEvent(dn,fn);l.addEventListener(dn,f),l.dispatchEvent(t),t.defaultPrevented||bn(e??document.body,{select:!0}),l.removeEventListener(dn,f),xn.remove(g)},0)}}},[l,d,f,g]);let _=i.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=hn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&bn(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&bn(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,a.jsx)(z.div,{tabIndex:-1,...c,ref:m,onKeyDown:_})},`FocusScope`));function mn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(bn(r,{select:t}),document.activeElement!==n)return}W(mn,`focusFirst`);function hn(e){let t=gn(e);return[_n(t,e),_n(t.reverse(),e)]}W(hn,`getTabbableEdges`);function gn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:W(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}W(gn,`getTabbableCandidates`);function _n(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):vn(r,{upTo:t})))return r}W(_n,`findVisible`);function vn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}W(vn,`isHidden`);function yn(e){return e instanceof HTMLInputElement&&`select`in e}W(yn,`isSelectableInput`);function bn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yn(e)&&t&&e.select()}}W(bn,`focus`);var xn=Sn();function Sn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Cn(e,t),e.unshift(t)},remove(t){e=Cn(e,t),e[0]?.resume()}}}W(Sn,`createFocusScopesStack`);function Cn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}W(Cn,`arrayRemove`);function wn(e){return e.filter(e=>e.tagName!==`A`)}W(wn,`removeLinks`);var Tn=Object.defineProperty,En=i.forwardRef(((e,t)=>Tn(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[o,s]=i.useState(!1);L(()=>s(!0),[]);let c=n||o&&globalThis?.document?.body;return c?Oe.createPortal((0,a.jsx)(z.div,{...r,ref:t}),c):null},`Portal`)),Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0}),kn=0,An=null;function jn(e){return Mn(),e.children}On(jn,`FocusGuards`);function Mn(){i.useEffect(()=>{An||={start:Nn(),end:Nn()};let{start:e,end:t}=An;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),kn++,()=>{kn===1&&(An?.start.remove(),An?.end.remove(),An=null),kn=Math.max(0,kn-1)}},[])}On(Mn,`useFocusGuards`);function Nn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}On(Nn,`createFocusGuard`);var Pn=function(){return Pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pn.apply(this,arguments)};function Fn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function In(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ln=`right-scroll-bar-position`,Rn=`width-before-scroll-bar`,zn=`with-scroll-bars-hidden`,Bn=`--removed-body-scroll-bar-size`;function Vn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Hn(e,t){var n=(0,i.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Un=typeof window<`u`?i.useLayoutEffect:i.useEffect,Wn=new WeakMap;function Gn(e,t){var n=Hn(t||null,function(t){return e.forEach(function(e){return Vn(e,t)})});return Un(function(){var t=Wn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Vn(e,null)}),i.forEach(function(e){r.has(e)||Vn(e,a)})}Wn.set(n,e)},[e]),n}function Kn(e){return e}function qn(e,t){t===void 0&&(t=Kn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Jn(e){e===void 0&&(e={});var t=qn(null);return t.options=Pn({async:!0,ssr:!1},e),t}var Yn=function(e){var t=e.sideCar,n=Fn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return i.createElement(r,Pn({},n))};Yn.isSideCarExport=!0;function Xn(e,t){return e.useMedium(t),Yn}var Zn=Jn(),Qn=function(){},$n=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Qn,onWheelCapture:Qn,onTouchMoveCapture:Qn}),a=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Fn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Gn([n,t]),w=Pn(Pn({},x),a);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:Zn,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(c),Pn(Pn({},w),{ref:C})):i.createElement(y,Pn({},w,{className:l,ref:C}),c))});$n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$n.classNames={fullWidth:Rn,zeroRight:Ln};var er,tr=function(){if(er)return er;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tr();return t&&e.setAttribute(`nonce`,t),e}function rr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ir(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ar=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nr())&&(rr(t,n),ir(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},or=function(){var e=ar();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sr=function(){var e=or();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},cr={left:0,top:0,right:0,gap:0},lr=function(e){return parseInt(e||``,10)||0},ur=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[lr(n),lr(r),lr(i)]},dr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return cr;var t=ur(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fr=sr(),pr=`data-scroll-locked`,mr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${zn} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
|
@@ -10,4 +10,4 @@ Error generating stack: `+e.message+`
|
|
|
10
10
|
|
|
11
11
|
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=ot(),f;if(t){let e=typeof t==`string`?ne(t):t;x(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ie(e,{pathname:m});S(l||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),S(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.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 g=Ct(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Oe([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Oe([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?u.createElement(Xe.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function _t(){let e=kt(),t=Pe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=u.createElement(u.Fragment,null,u.createElement(`p`,null,`💿 Hey developer 👋`),u.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,u.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,u.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),u.createElement(u.Fragment,null,u.createElement(`h2`,null,`Unexpected Application Error!`),u.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?u.createElement(`pre`,{style:i},n):null,o)}var vt=u.createElement(_t,null),yt=class extends u.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=rt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:u.createElement(Ze.Provider,{value:this.props.routeContext},u.createElement(Qe.Provider,{value:e,children:this.props.component}));return this.context?u.createElement(xt,{error:e},t):t}};yt.contextType=We;var bt=new WeakMap;function xt({children:e,error:t}){let{basename:n}=u.useContext(Ye);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=nt(t.digest);if(e){let r=bt.get(t);if(r)throw r;let i=Le(e.location,n),a=i.absoluteURL||i.to;if(Ve(a))throw Error(`Invalid redirect location`);if(Ie&&!bt.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw bt.set(t,n),n}}return u.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function St({routeContext:e,match:t,children:n}){let r=u.useContext(He);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(Ze.Provider,{value:e},n)}function Ct(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);x(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Fe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||vt,o&&(s<0&&c===0?(Mt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?u.createElement(n.route.Component,null):n.route.element?n.route.element:e,u.createElement(St,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?u.createElement(yt,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function wt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tt(e){let t=u.useContext(He);return x(t,wt(e)),t}function Et(e){let t=u.useContext(Ue);return x(t,wt(e)),t}function j(e){let t=u.useContext(Ze);return x(t,wt(e)),t}function Dt(e){let t=j(e),n=t.matches[t.matches.length-1];return x(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ot(){return Dt(`useRouteId`)}function kt(){let e=u.useContext(Qe),t=Et(`useRouteError`),n=Dt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function At(){let{router:e}=Tt(`useNavigate`),t=Dt(`useNavigate`),n=u.useRef(!1);return ct(()=>{n.current=!0}),u.useCallback(async(r,i={})=>{S(n.current,st),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var jt={};function Mt(e,t,n){!t&&!jt[e]&&(jt[e]=!0,S(!1,n))}u.memo(Nt);function Nt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return gt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Pt({to:e,replace:t,state:n,relative:r}){x(at(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=u.useContext(Ye);S(!i,`<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:a}=u.useContext(Ze),{pathname:o}=ot(),s=lt(),c=Ee(e,Te(a),o,r===`path`),l=JSON.stringify(c);return u.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Ft(e){return pt(e.context)}function It(e){x(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Lt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){x(!at(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=u.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ne(n));let{pathname:l=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=u.useMemo(()=>{let e=be(l,s);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[s,l,d,f,p,m,r,h]);return S(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:u.createElement(Ye.Provider,{value:c},u.createElement(Xe.Provider,{children:t,value:g}))}function Rt({children:e,location:t}){return ht(zt(e),t)}u.Component;function zt(e,t=[]){let n=[];return u.Children.forEach(e,(e,r)=>{if(!u.isValidElement(e))return;let i=[...t,r];if(e.type===u.Fragment){n.push.apply(n,zt(e.props.children,i));return}x(e.type===It,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),x(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=zt(e.props.children,i)),n.push(a)}),n}var Bt=`get`,Vt=`application/x-www-form-urlencoded`;function Ht(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ut(e){return Ht(e)&&e.tagName.toLowerCase()===`button`}function Wt(e){return Ht(e)&&e.tagName.toLowerCase()===`form`}function Gt(e){return Ht(e)&&e.tagName.toLowerCase()===`input`}function Kt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qt(e,t){return e.button===0&&(!t||t===`_self`)&&!Kt(e)}function Jt(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 Yt(e,t){let n=Jt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Xt=null;function Zt(){if(Xt===null)try{new FormData(document.createElement(`form`),0),Xt=!1}catch{Xt=!0}return Xt}var Qt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function $t(e){return e!=null&&!Qt.has(e)?(S(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vt}"`),null):e}function en(e,t){let n,r,i,a,o;if(Wt(e)){let o=e.getAttribute(`action`);r=o?be(o,t):null,n=e.getAttribute(`method`)||Bt,i=$t(e.getAttribute(`enctype`))||Vt,a=new FormData(e)}else if(Ut(e)||Gt(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?be(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Bt,i=$t(e.getAttribute(`formenctype`))||$t(o.getAttribute(`enctype`))||Vt,a=new FormData(o,e),!Zt()){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(Ht(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Bt,r=null,i=Vt,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`);function tn(e,t){if(e===!1||e==null)throw Error(t)}function nn(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&be(i.pathname,t)===`/`?`${ke(t)}/_root.${r}`:`${ke(i.pathname)}.${r}`,i}async function rn(e,t){if(e.id in t)return t[e.id];try{let n=await m(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}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 an(e){return e!=null&&typeof e.page==`string`}function on(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 sn(e,t,n){return fn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await rn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(on).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function cn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,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 ln(e,t,{includeHydrateFallback:n}={}){return un(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 un(e){return[...new Set(e)]}function dn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!an(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(dn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function pn(){let e=u.useContext(He);return tn(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function mn(){let e=u.useContext(Ue);return tn(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var hn=u.createContext(void 0);hn.displayName=`FrameworkContext`;function gn(){let e=u.useContext(hn);return tn(e,`You must render this element inside a <HydratedRouter> element`),e}function _n(e,t){let n=u.useContext(hn),[r,i]=u.useState(!1),[a,o]=u.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:d,onTouchStart:f}=t,p=u.useRef(null);u.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),u.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:vn(s,m),onBlur:vn(c,h),onMouseEnter:vn(l,m),onMouseLeave:vn(d,h),onTouchStart:vn(f,m)}]:[a,p,{}]:[!1,p,{}]}function vn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function yn({page:e,...t}){let n=Ge(),{nonce:r}=gn(),{router:i}=pn(),a=u.useMemo(()=>ie(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?u.createElement(xn,{page:e,matches:a,...t}):u.createElement(Sn,{page:e,matches:a,...t})):null}function bn(e){let{manifest:t,routeModules:n}=gn(),[r,i]=u.useState([]);return u.useEffect(()=>{let r=!1;return sn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function xn({page:e,matches:t,...n}){let r=ot(),{future:i}=gn(),{basename:a}=pn(),o=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=nn(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return u.createElement(u.Fragment,null,o.map(e=>u.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Sn({page:e,matches:t,...n}){let r=ot(),{future:i,manifest:a,routeModules:o}=gn(),{basename:s}=pn(),{loaderData:c,matches:l}=mn(),d=u.useMemo(()=>cn(e,t,l,a,r,`data`),[e,t,l,a,r]),f=u.useMemo(()=>cn(e,t,l,a,r,`assets`),[e,t,l,a,r]),p=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let u=nn(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&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]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,d,t,e,o]),m=u.useMemo(()=>ln(f,a),[f,a]),h=bn(f);return u.createElement(u.Fragment,null,p.map(e=>u.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>u.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>u.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Cn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}u.Component;var wn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{wn&&(window.__reactRouterVersion=`7.18.2`)}catch{}function Tn({basename:e,children:t,useTransitions:n,window:r}){let i=u.useRef();i.current??=b({window:r,v5Compat:!0});let a=i.current,[o,s]=u.useState({action:a.action,location:a.location}),c=u.useCallback(e=>{n===!1?s(e):u.startTransition(()=>s(e))},[n]);return u.useLayoutEffect(()=>a.listen(c),[a,c]),u.createElement(Lt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var En=u.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},g){let{basename:_,navigator:v,useTransitions:y}=u.useContext(Ye),b=typeof l==`string`&&h.test(l),x=Le(l,_);l=x.to;let S=it(l,{relative:r}),C=ot(),w=null;if(o){let e=Ee(o,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:Oe([_,e.pathname])),w=v.createHref(e)}let[ee,te,ne]=_n(n,m),T=jn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function re(t){e&&e(t),t.defaultPrevented||T(t)}let ie=!(x.isExternal||i),ae=u.createElement(`a`,{...m,...ne,href:(ie?w:void 0)||x.absoluteURL||S,onClick:ie?re:e,ref:Cn(g,te),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return ee&&!b?u.createElement(u.Fragment,null,ae,u.createElement(yn,{page:S})):ae});En.displayName=`Link`;var Dn=u.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let d=A(a,{relative:c.relative}),f=ot(),p=u.useContext(Ue),{navigator:m,basename:h}=u.useContext(Ye),g=p!=null&&Ln(d)&&o===!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=be(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,ee;ee=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(C):i;return u.createElement(En,{...c,"aria-current":w,className:ee,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Dn.displayName=`NavLink`;var On=u.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Bt,action:s,onSubmit:c,relative:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},g)=>{let{useTransitions:_}=u.useContext(Ye),v=Fn(),y=In(s,{relative:l}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&h.test(s);return u.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?u.startTransition(()=>m()):m()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});On.displayName=`Form`;function kn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function An(e){let t=u.useContext(He);return x(t,kn(e)),t}function jn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let d=lt(),f=ot(),p=A(e,{relative:o});return u.useCallback(m=>{if(qt(m,t)){m.preventDefault();let t=n===void 0?te(f)===te(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?u.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,c,l])}function Mn(e){S(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=u.useRef(Jt(e)),n=u.useRef(!1),r=ot(),i=u.useMemo(()=>Yt(r.search,n.current?null:t.current),[r.search]),a=lt();return[i,u.useCallback((e,t)=>{let r=Jt(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Nn=0,Pn=()=>`__${String(++Nn)}__`;function Fn(){let{router:e}=An(`useSubmit`),{basename:t}=u.useContext(Ye),n=Ot(),r=e.fetch,i=e.navigate;return u.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=en(e,t);if(a.navigate===!1){let e=a.fetcherKey||Pn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function In(e,{relative:t}={}){let{basename:n}=u.useContext(Ye),r=u.useContext(Ze);x(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...A(e||`.`,{relative:t})},o=ot();if(e==null){a.search=o.search;let e=new URLSearchParams(a.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();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Oe([n,a.pathname])),te(a)}function Ln(e,{relative:t}={}){let n=u.useContext(Ke);x(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=An(`useViewTransitionState`),i=A(e,{relative:t});if(!n.isTransitioning)return!1;let a=be(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=be(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ge(i.pathname,o)!=null||ge(i.pathname,a)!=null}var Rn=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),zn=t(((e,t)=>{t.exports=Rn()})),Bn=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Vn=/^[\\/]{2}/;function Hn(e,t){return t+e.replace(/\\/g,`/`)}function Un(e,t){if(e===!1||e==null)throw Error(t)}function Wn(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Gn({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 Kn(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 qn(e,t,n=`/`){return Jn(e,t,n,!1)}function Jn(e,t,n,r,i){let a=pr((typeof t==`string`?Kn(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Yn(e),s=null,c=fr(a);for(let e=0;s==null&&e<o.length;++e)s=cr(o[e],c,r);return s}function Yn(e){let t=Xn(e);return Qn(t),t}function Xn(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;Un(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=xr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Un(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Xn(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:or(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=dr(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Zn(e.path))a(e,t,!0,n)}),t}function Zn(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=Zn(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 Qn(e){e.sort((e,t)=>e.score===t.score?sr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var $n=/^:[\w-]+$/,er=3,tr=2,nr=1,rr=10,ir=-2,ar=e=>e===`*`;function or(e,t){let n=e.split(`/`),r=n.length;return n.some(ar)&&(r+=ir),t&&(r+=tr),n.filter(e=>!ar(e)).reduce((e,t)=>e+($n.test(t)?er:t===``?nr:rr),r)}function sr(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 cr(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={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ur(u,l,s.matcher,s.compiledParams):lr(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=lr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:xr([a,d.pathname]),pathnameBase:Cr(xr([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=xr([a,d.pathnameBase]))}return o}function lr(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=dr(e.path,e.caseSensitive,e.end);return ur(e,t,n,r)}function ur(e,t,n,r){let 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 e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function dr(e,t=!1,n=!0){Wn(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 fr(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Wn(!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 pr(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 mr(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Kn(e):e,a;return n?(n=br(n),a=n.startsWith(`/`)?hr(n.substring(1),`/`):hr(n,t)):a=t,{pathname:a,search:wr(r),hash:Tr(i)}}function hr(e,t){let n=Sr(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function gr(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 _r(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function vr(e){let t=_r(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function yr(e,t,n,r=!1){let i;typeof e==`string`?i=Kn(e):(i={...e},Un(!i.pathname||!i.pathname.includes(`?`),gr(`?`,`pathname`,`search`,i)),Un(!i.pathname||!i.pathname.includes(`#`),gr(`#`,`pathname`,`hash`,i)),Un(!i.search||!i.search.includes(`#`),gr(`#`,`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=mr(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var br=e=>e.replace(/[\\/]{2,}/g,`/`),xr=e=>br(e.join(`/`)),Sr=e=>e.replace(/\/+$/,``),Cr=e=>Sr(e).replace(/^\/*/,`/`),wr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Tr=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Er=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 Dr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Or(e){return xr(e.map(e=>e.route.path).filter(Boolean))||`/`}var kr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ar(e,t){let n=e;if(typeof n!=`string`||!Bn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(kr)try{let e=new URL(window.location.href),r=Vn.test(n)?new URL(Hn(n,e.protocol)):new URL(n),a=pr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Wn(!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}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var jr=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(jr);var Mr=[`GET`,...jr];new Set(Mr);var Nr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Pr(e){try{return Nr.includes(new URL(e).protocol)}catch{return!1}}var Fr=u.createContext(null);Fr.displayName=`DataRouter`;var Ir=u.createContext(null);Ir.displayName=`DataRouterState`;var Lr=u.createContext(!1);function Rr(){return u.useContext(Lr)}var zr=u.createContext({isTransitioning:!1});zr.displayName=`ViewTransition`;var Br=u.createContext(new Map);Br.displayName=`Fetchers`;var Vr=u.createContext(null);Vr.displayName=`Await`;var Hr=u.createContext(null);Hr.displayName=`Navigation`;var Ur=u.createContext(null);Ur.displayName=`Location`;var Wr=u.createContext({outlet:null,matches:[],isDataRoute:!1});Wr.displayName=`Route`;var Gr=u.createContext(null);Gr.displayName=`RouteError`;var Kr=`REACT_ROUTER_ERROR`,qr=`REDIRECT`,Jr=`ROUTE_ERROR_RESPONSE`;function Yr(e){if(e.startsWith(`${Kr}:${qr}:{`))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 Xr(e){if(e.startsWith(`${Kr}:${Jr}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Er(t.status,t.statusText,t.data)}catch{}}function Zr(e,{relative:t}={}){Un(Qr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=u.useContext(Hr),{hash:i,pathname:a,search:o}=ai(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:xr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Qr(){return u.useContext(Ur)!=null}function $r(){return Un(Qr(),`useLocation() may be used only in the context of a <Router> component.`),u.useContext(Ur).location}var ei=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ti(e){u.useContext(Hr).static||u.useLayoutEffect(e)}function ni(){let{isDataRoute:e}=u.useContext(Wr);return e?xi():ri()}function ri(){Un(Qr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=u.useContext(Fr),{basename:t,navigator:n}=u.useContext(Hr),{matches:r}=u.useContext(Wr),{pathname:i}=$r(),a=JSON.stringify(vr(r)),o=u.useRef(!1);return ti(()=>{o.current=!0}),u.useCallback((r,s={})=>{if(Wn(o.current,ei),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=yr(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:xr([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}u.createContext(null);function ii(){let{matches:e}=u.useContext(Wr);return e[e.length-1]?.params??{}}function ai(e,{relative:t}={}){let{matches:n}=u.useContext(Wr),{pathname:r}=$r(),i=JSON.stringify(vr(n));return u.useMemo(()=>yr(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function oi(e,t,n){Un(Qr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=u.useContext(Hr),{matches:i}=u.useContext(Wr),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Ci(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (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.
|
|
12
12
|
|
|
13
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$r(),f;if(t){let e=typeof t==`string`?Kn(t):t;Un(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):qn(e,{pathname:m});Wn(l||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Wn(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.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 g=pi(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:xr([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:xr([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?u.createElement(Ur.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function si(){let e=bi(),t=Dr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=u.createElement(u.Fragment,null,u.createElement(`p`,null,`💿 Hey developer 👋`),u.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,u.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,u.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),u.createElement(u.Fragment,null,u.createElement(`h2`,null,`Unexpected Application Error!`),u.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?u.createElement(`pre`,{style:i},n):null,o)}var ci=u.createElement(si,null),li=class extends u.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=Xr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:u.createElement(Wr.Provider,{value:this.props.routeContext},u.createElement(Gr.Provider,{value:e,children:this.props.component}));return this.context?u.createElement(di,{error:e},t):t}};li.contextType=Lr;var ui=new WeakMap;function di({children:e,error:t}){let{basename:n}=u.useContext(Hr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Yr(t.digest);if(e){let r=ui.get(t);if(r)throw r;let i=Ar(e.location,n),a=i.absoluteURL||i.to;if(Pr(a))throw Error(`Invalid redirect location`);if(kr&&!ui.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw ui.set(t,n),n}}return u.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function fi({routeContext:e,match:t,children:n}){let r=u.useContext(Fr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(Wr.Provider,{value:e},n)}function pi(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Un(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Or(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||ci,o&&(s<0&&c===0?(Ci(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?u.createElement(n.route.Component,null):n.route.element?n.route.element:e,u.createElement(fi,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?u.createElement(li,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function mi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hi(e){let t=u.useContext(Fr);return Un(t,mi(e)),t}function gi(e){let t=u.useContext(Ir);return Un(t,mi(e)),t}function _i(e){let t=u.useContext(Wr);return Un(t,mi(e)),t}function vi(e){let t=_i(e),n=t.matches[t.matches.length-1];return Un(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function yi(){return vi(`useRouteId`)}function bi(){let e=u.useContext(Gr),t=gi(`useRouteError`),n=vi(`useRouteError`);return e===void 0?t.errors?.[n]:e}function xi(){let{router:e}=hi(`useNavigate`),t=vi(`useNavigate`),n=u.useRef(!1);return ti(()=>{n.current=!0}),u.useCallback(async(r,i={})=>{Wn(n.current,ei),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Si={};function Ci(e,t,n){!t&&!Si[e]&&(Si[e]=!0,Wn(!1,n))}u.memo(wi);function wi({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return oi(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}u.Component;var Ti=`get`,Ei=`application/x-www-form-urlencoded`;function Di(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Oi(e){return Di(e)&&e.tagName.toLowerCase()===`button`}function ki(e){return Di(e)&&e.tagName.toLowerCase()===`form`}function Ai(e){return Di(e)&&e.tagName.toLowerCase()===`input`}function ji(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Mi(e,t){return e.button===0&&(!t||t===`_self`)&&!ji(e)}var Ni=null;function Pi(){if(Ni===null)try{new FormData(document.createElement(`form`),0),Ni=!1}catch{Ni=!0}return Ni}var Fi=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ii(e){return e!=null&&!Fi.has(e)?(Wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ei}"`),null):e}function Li(e,t){let n,r,i,a,o;if(ki(e)){let o=e.getAttribute(`action`);r=o?pr(o,t):null,n=e.getAttribute(`method`)||Ti,i=Ii(e.getAttribute(`enctype`))||Ei,a=new FormData(e)}else if(Oi(e)||Ai(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?pr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ti,i=Ii(e.getAttribute(`formenctype`))||Ii(o.getAttribute(`enctype`))||Ei,a=new FormData(o,e),!Pi()){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(Di(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ti,r=null,i=Ei,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`);function Ri(e,t){if(e===!1||e==null)throw Error(t)}function zi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&pr(i.pathname,t)===`/`?`${Sr(t)}/_root.${r}`:`${Sr(i.pathname)}.${r}`,i}async function Bi(e,t){if(e.id in t)return t[e.id];try{let n=await m(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}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 M(e){return e!=null&&typeof e.page==`string`}function N(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 Vi(e,t,n){return Ki((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Bi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(N).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Hi(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,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 Ui(e,t,{includeHydrateFallback:n}={}){return Wi(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 Wi(e){return[...new Set(e)]}function Gi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ki(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!M(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Gi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function qi(){let e=u.useContext(Fr);return Ri(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ji(){let e=u.useContext(Ir);return Ri(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Yi=u.createContext(void 0);Yi.displayName=`FrameworkContext`;function Xi(){let e=u.useContext(Yi);return Ri(e,`You must render this element inside a <HydratedRouter> element`),e}function Zi(e,t){let n=u.useContext(Yi),[r,i]=u.useState(!1),[a,o]=u.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:d,onTouchStart:f}=t,p=u.useRef(null);u.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),u.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:Qi(s,m),onBlur:Qi(c,h),onMouseEnter:Qi(l,m),onMouseLeave:Qi(d,h),onTouchStart:Qi(f,m)}]:[a,p,{}]:[!1,p,{}]}function Qi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $i({page:e,...t}){let n=Rr(),{nonce:r}=Xi(),{router:i}=qi(),a=u.useMemo(()=>qn(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?u.createElement(ta,{page:e,matches:a,...t}):u.createElement(na,{page:e,matches:a,...t})):null}function ea(e){let{manifest:t,routeModules:n}=Xi(),[r,i]=u.useState([]);return u.useEffect(()=>{let r=!1;return Vi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ta({page:e,matches:t,...n}){let r=$r(),{future:i}=Xi(),{basename:a}=qi(),o=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=zi(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return u.createElement(u.Fragment,null,o.map(e=>u.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function na({page:e,matches:t,...n}){let r=$r(),{future:i,manifest:a,routeModules:o}=Xi(),{basename:s}=qi(),{loaderData:c,matches:l}=Ji(),d=u.useMemo(()=>Hi(e,t,l,a,r,`data`),[e,t,l,a,r]),f=u.useMemo(()=>Hi(e,t,l,a,r,`assets`),[e,t,l,a,r]),p=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let u=zi(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&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]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,d,t,e,o]),m=u.useMemo(()=>Ui(f,a),[f,a]),h=ea(f);return u.createElement(u.Fragment,null,p.map(e=>u.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>u.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>u.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ra(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}u.Component;var ia=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ia&&(window.__reactRouterVersion=`7.18.0`)}catch{}var aa=u.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=u.useContext(Hr),y=typeof l==`string`&&Bn.test(l),b=Ar(l,g);l=b.to;let x=Zr(l,{relative:r}),S=$r(),C=null;if(o){let e=yr(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:xr([g,e.pathname])),C=_.createHref(e)}let[w,ee,te]=Zi(n,m),ne=ua(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function T(t){e&&e(t),t.defaultPrevented||ne(t)}let re=!(b.isExternal||i),ie=u.createElement(`a`,{...m,...te,href:(re?C:void 0)||b.absoluteURL||x,onClick:re?T:e,ref:ra(h,ee),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?u.createElement(u.Fragment,null,ie,u.createElement($i,{page:x})):ie});aa.displayName=`Link`;var oa=u.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let d=ai(a,{relative:c.relative}),f=$r(),p=u.useContext(Ir),{navigator:m,basename:h}=u.useContext(Hr),g=p!=null&&ma(d)&&o===!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=pr(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,ee;ee=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(C):i;return u.createElement(aa,{...c,"aria-current":w,className:ee,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(C):s)});oa.displayName=`NavLink`;var sa=u.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ti,action:s,onSubmit:c,relative:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=u.useContext(Hr),_=P(),v=pa(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Bn.test(s);return u.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?u.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});sa.displayName=`Form`;function ca(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function la(e){let t=u.useContext(Fr);return Un(t,ca(e)),t}function ua(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let d=ni(),f=$r(),p=ai(e,{relative:o});return u.useCallback(m=>{if(Mi(m,t)){m.preventDefault();let t=n===void 0?Gn(f)===Gn(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?u.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,c,l])}var da=0,fa=()=>`__${String(++da)}__`;function P(){let{router:e}=la(`useSubmit`),{basename:t}=u.useContext(Hr),n=yi(),r=e.fetch,i=e.navigate;return u.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Li(e,t);if(a.navigate===!1){let e=a.fetcherKey||fa();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function pa(e,{relative:t}={}){let{basename:n}=u.useContext(Hr),r=u.useContext(Wr);Un(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ai(e||`.`,{relative:t})},o=$r();if(e==null){a.search=o.search;let e=new URLSearchParams(a.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();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:xr([n,a.pathname])),Gn(a)}function ma(e,{relative:t}={}){let n=u.useContext(zr);Un(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=la(`useViewTransitionState`),i=ai(e,{relative:t});if(!n.isTransitioning)return!1;let a=pr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=pr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return lr(i.pathname,o)!=null||lr(i.pathname,a)!=null}export{l as _,En as a,Ft as c,ot as d,lt as f,m as g,Mn as h,Tn as i,It as l,mt as m,ii as n,Dn as o,ft as p,zn as r,Pt as s,ni as t,Rt as u,s as v,r as y};
|
|
13
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$r(),f;if(t){let e=typeof t==`string`?Kn(t):t;Un(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):qn(e,{pathname:m});Wn(l||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Wn(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.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 g=pi(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:xr([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:xr([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?u.createElement(Ur.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function si(){let e=bi(),t=Dr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=u.createElement(u.Fragment,null,u.createElement(`p`,null,`💿 Hey developer 👋`),u.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,u.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,u.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),u.createElement(u.Fragment,null,u.createElement(`h2`,null,`Unexpected Application Error!`),u.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?u.createElement(`pre`,{style:i},n):null,o)}var ci=u.createElement(si,null),li=class extends u.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=Xr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:u.createElement(Wr.Provider,{value:this.props.routeContext},u.createElement(Gr.Provider,{value:e,children:this.props.component}));return this.context?u.createElement(di,{error:e},t):t}};li.contextType=Lr;var ui=new WeakMap;function di({children:e,error:t}){let{basename:n}=u.useContext(Hr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Yr(t.digest);if(e){let r=ui.get(t);if(r)throw r;let i=Ar(e.location,n),a=i.absoluteURL||i.to;if(Pr(a))throw Error(`Invalid redirect location`);if(kr&&!ui.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw ui.set(t,n),n}}return u.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function fi({routeContext:e,match:t,children:n}){let r=u.useContext(Fr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(Wr.Provider,{value:e},n)}function pi(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Un(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Or(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||ci,o&&(s<0&&c===0?(Ci(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?u.createElement(n.route.Component,null):n.route.element?n.route.element:e,u.createElement(fi,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?u.createElement(li,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function mi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hi(e){let t=u.useContext(Fr);return Un(t,mi(e)),t}function gi(e){let t=u.useContext(Ir);return Un(t,mi(e)),t}function _i(e){let t=u.useContext(Wr);return Un(t,mi(e)),t}function vi(e){let t=_i(e),n=t.matches[t.matches.length-1];return Un(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function yi(){return vi(`useRouteId`)}function bi(){let e=u.useContext(Gr),t=gi(`useRouteError`),n=vi(`useRouteError`);return e===void 0?t.errors?.[n]:e}function xi(){let{router:e}=hi(`useNavigate`),t=vi(`useNavigate`),n=u.useRef(!1);return ti(()=>{n.current=!0}),u.useCallback(async(r,i={})=>{Wn(n.current,ei),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Si={};function Ci(e,t,n){!t&&!Si[e]&&(Si[e]=!0,Wn(!1,n))}u.memo(wi);function wi({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return oi(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}u.Component;var Ti=`get`,Ei=`application/x-www-form-urlencoded`;function Di(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Oi(e){return Di(e)&&e.tagName.toLowerCase()===`button`}function ki(e){return Di(e)&&e.tagName.toLowerCase()===`form`}function Ai(e){return Di(e)&&e.tagName.toLowerCase()===`input`}function ji(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Mi(e,t){return e.button===0&&(!t||t===`_self`)&&!ji(e)}var Ni=null;function Pi(){if(Ni===null)try{new FormData(document.createElement(`form`),0),Ni=!1}catch{Ni=!0}return Ni}var Fi=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ii(e){return e!=null&&!Fi.has(e)?(Wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ei}"`),null):e}function Li(e,t){let n,r,i,a,o;if(ki(e)){let o=e.getAttribute(`action`);r=o?pr(o,t):null,n=e.getAttribute(`method`)||Ti,i=Ii(e.getAttribute(`enctype`))||Ei,a=new FormData(e)}else if(Oi(e)||Ai(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?pr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ti,i=Ii(e.getAttribute(`formenctype`))||Ii(o.getAttribute(`enctype`))||Ei,a=new FormData(o,e),!Pi()){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(Di(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ti,r=null,i=Ei,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`);function Ri(e,t){if(e===!1||e==null)throw Error(t)}function zi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&pr(i.pathname,t)===`/`?`${Sr(t)}/_root.${r}`:`${Sr(i.pathname)}.${r}`,i}async function Bi(e,t){if(e.id in t)return t[e.id];try{let n=await m(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}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 M(e){return e!=null&&typeof e.page==`string`}function N(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 Vi(e,t,n){return Ki((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Bi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(N).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Hi(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,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 Ui(e,t,{includeHydrateFallback:n}={}){return Wi(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 Wi(e){return[...new Set(e)]}function Gi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ki(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!M(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Gi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function qi(){let e=u.useContext(Fr);return Ri(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ji(){let e=u.useContext(Ir);return Ri(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Yi=u.createContext(void 0);Yi.displayName=`FrameworkContext`;function Xi(){let e=u.useContext(Yi);return Ri(e,`You must render this element inside a <HydratedRouter> element`),e}function Zi(e,t){let n=u.useContext(Yi),[r,i]=u.useState(!1),[a,o]=u.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:d,onTouchStart:f}=t,p=u.useRef(null);u.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),u.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:Qi(s,m),onBlur:Qi(c,h),onMouseEnter:Qi(l,m),onMouseLeave:Qi(d,h),onTouchStart:Qi(f,m)}]:[a,p,{}]:[!1,p,{}]}function Qi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $i({page:e,...t}){let n=Rr(),{nonce:r}=Xi(),{router:i}=qi(),a=u.useMemo(()=>qn(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?u.createElement(ta,{page:e,matches:a,...t}):u.createElement(na,{page:e,matches:a,...t})):null}function ea(e){let{manifest:t,routeModules:n}=Xi(),[r,i]=u.useState([]);return u.useEffect(()=>{let r=!1;return Vi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ta({page:e,matches:t,...n}){let r=$r(),{future:i}=Xi(),{basename:a}=qi(),o=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=zi(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return u.createElement(u.Fragment,null,o.map(e=>u.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function na({page:e,matches:t,...n}){let r=$r(),{future:i,manifest:a,routeModules:o}=Xi(),{basename:s}=qi(),{loaderData:c,matches:l}=Ji(),d=u.useMemo(()=>Hi(e,t,l,a,r,`data`),[e,t,l,a,r]),f=u.useMemo(()=>Hi(e,t,l,a,r,`assets`),[e,t,l,a,r]),p=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let u=zi(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&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]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,d,t,e,o]),m=u.useMemo(()=>Ui(f,a),[f,a]),h=ea(f);return u.createElement(u.Fragment,null,p.map(e=>u.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>u.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>u.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ra(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}u.Component;var ia=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ia&&(window.__reactRouterVersion=`7.18.0`)}catch{}var aa=u.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=u.useContext(Hr),y=typeof l==`string`&&Bn.test(l),b=Ar(l,g);l=b.to;let x=Zr(l,{relative:r}),S=$r(),C=null;if(o){let e=yr(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:xr([g,e.pathname])),C=_.createHref(e)}let[w,ee,te]=Zi(n,m),ne=ua(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function T(t){e&&e(t),t.defaultPrevented||ne(t)}let re=!(b.isExternal||i),ie=u.createElement(`a`,{...m,...te,href:(re?C:void 0)||b.absoluteURL||x,onClick:re?T:e,ref:ra(h,ee),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?u.createElement(u.Fragment,null,ie,u.createElement($i,{page:x})):ie});aa.displayName=`Link`;var oa=u.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let d=ai(a,{relative:c.relative}),f=$r(),p=u.useContext(Ir),{navigator:m,basename:h}=u.useContext(Hr),g=p!=null&&ma(d)&&o===!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=pr(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,ee;ee=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(C):i;return u.createElement(aa,{...c,"aria-current":w,className:ee,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(C):s)});oa.displayName=`NavLink`;var sa=u.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ti,action:s,onSubmit:c,relative:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=u.useContext(Hr),_=P(),v=pa(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Bn.test(s);return u.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?u.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});sa.displayName=`Form`;function ca(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function la(e){let t=u.useContext(Fr);return Un(t,ca(e)),t}function ua(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let d=ni(),f=$r(),p=ai(e,{relative:o});return u.useCallback(m=>{if(Mi(m,t)){m.preventDefault();let t=n===void 0?Gn(f)===Gn(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?u.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,c,l])}var da=0,fa=()=>`__${String(++da)}__`;function P(){let{router:e}=la(`useSubmit`),{basename:t}=u.useContext(Hr),n=yi(),r=e.fetch,i=e.navigate;return u.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Li(e,t);if(a.navigate===!1){let e=a.fetcherKey||fa();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function pa(e,{relative:t}={}){let{basename:n}=u.useContext(Hr),r=u.useContext(Wr);Un(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ai(e||`.`,{relative:t})},o=$r();if(e==null){a.search=o.search;let e=new URLSearchParams(a.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();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:xr([n,a.pathname])),Gn(a)}function ma(e,{relative:t}={}){let n=u.useContext(zr);Un(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=la(`useViewTransitionState`),i=ai(e,{relative:t});if(!n.isTransitioning)return!1;let a=pr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=pr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return lr(i.pathname,o)!=null||lr(i.pathname,a)!=null}export{m as _,En as a,r as b,Ft as c,at as d,ot as f,Mn as g,mt as h,Tn as i,It as l,ft as m,ii as n,Dn as o,lt as p,zn as r,Pt as s,ni as t,Rt as u,l as v,s as y};
|