agent-tower 0.7.4-beta.1 → 0.7.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/executors/__tests__/codex-mcp-windows.test.d.ts +2 -0
- package/dist/executors/__tests__/codex-mcp-windows.test.d.ts.map +1 -0
- package/dist/executors/__tests__/codex-mcp-windows.test.js +128 -0
- package/dist/executors/__tests__/codex-mcp-windows.test.js.map +1 -0
- package/dist/executors/__tests__/codex.executor.test.js +394 -1
- package/dist/executors/__tests__/codex.executor.test.js.map +1 -1
- package/dist/executors/codex.executor.d.ts +6 -6
- package/dist/executors/codex.executor.d.ts.map +1 -1
- package/dist/executors/codex.executor.js +118 -32
- package/dist/executors/codex.executor.js.map +1 -1
- package/dist/mcp/tools/tasks.js +1 -1
- package/dist/mcp/tools/tasks.js.map +1 -1
- package/dist/mcp/types.js +1 -1
- package/dist/mcp/types.js.map +1 -1
- package/dist/runtime/__tests__/acp-process-manager.test.js +65 -0
- package/dist/runtime/__tests__/acp-process-manager.test.js.map +1 -1
- package/dist/runtime/acp/agents/pi-coding-agent.d.ts.map +1 -1
- package/dist/runtime/acp/agents/pi-coding-agent.js +3 -0
- package/dist/runtime/acp/agents/pi-coding-agent.js.map +1 -1
- package/dist/services/__tests__/task.service.test.js +69 -7
- package/dist/services/__tests__/task.service.test.js.map +1 -1
- package/dist/services/__tests__/workspace.service.test.js +31 -0
- package/dist/services/__tests__/workspace.service.test.js.map +1 -1
- package/dist/services/task-display-state.d.ts +10 -0
- package/dist/services/task-display-state.d.ts.map +1 -0
- package/dist/services/task-display-state.js +45 -0
- package/dist/services/task-display-state.js.map +1 -0
- package/dist/services/task.service.d.ts +14 -6
- package/dist/services/task.service.d.ts.map +1 -1
- package/dist/services/task.service.js +70 -83
- package/dist/services/task.service.js.map +1 -1
- package/dist/services/workspace.service.d.ts.map +1 -1
- package/dist/services/workspace.service.js +2 -1
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-DiHEh1iv.js → AgentDemoPage-CrkoVCOZ.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-B_Xk7Bef.js → AgentEnvironmentSettingsPage-BRihy3_Q.js} +1 -1
- package/dist/web/assets/{AttachmentPreview-BngGSahV.js → AttachmentPreview-B9z1Mxb-.js} +1 -1
- package/dist/web/assets/{BranchSelect-BgVKUnxj.js → BranchSelect-Bo5uhKCt.js} +1 -1
- package/dist/web/assets/{BrandLogo-CBahjTd7.js → BrandLogo-DEL42B23.js} +1 -1
- package/dist/web/assets/{ConversationPage-kgJIlyS5.js → ConversationPage-C46RuN9U.js} +1 -1
- package/dist/web/assets/{CreateTaskInput-Cllw4abW.js → CreateTaskInput-4aHJpsfL.js} +1 -1
- package/dist/web/assets/{DemoPage-CkS__9CE.js → DemoPage-CAZqNag-.js} +1 -1
- package/dist/web/assets/{DesignSystemPage-BklN99GA.js → DesignSystemPage-CjCYC24B.js} +1 -1
- package/dist/web/assets/{ExecutionPermissionSelector-Bsi1aa7q.js → ExecutionPermissionSelector-CJgc_EVo.js} +1 -1
- package/dist/web/assets/{GeneralSettingsPage-BC9TUWiu.js → GeneralSettingsPage-DFT7Cubi.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-Dx8Si6-g.js → LoadingPreviewPage-CB4VDPAZ.js} +1 -1
- package/dist/web/assets/{McpSettingsPage-fqXRGtFu.js → McpSettingsPage-CgiyGvkH.js} +1 -1
- package/dist/web/assets/{MemberAvatar-CZ3F53Ep.js → MemberAvatar-Cfz8LU6k.js} +1 -1
- package/dist/web/assets/MobileTaskDetail-yZNyZMQt.js +3 -0
- package/dist/web/assets/{NotificationSettingsPage-D9KGIFVA.js → NotificationSettingsPage-BSMJ45yx.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-D_Hw5lpd.js → ProfileSettingsPage-BwNThOnH.js} +1 -1
- package/dist/web/assets/ProjectKanbanPage-DtZW0bOh.js +14 -0
- package/dist/web/assets/{ProjectSettingsPage-CJANCPJX.js → ProjectSettingsPage-CMBMkbgI.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-B6Ro5PQa.js → ProviderSettingsPage-D759BSRa.js} +1 -1
- package/dist/web/assets/{SettingsMasterDetail-Q-049Dvh.js → SettingsMasterDetail-DpYUTM-Q.js} +1 -1
- package/dist/web/assets/TaskDetail-rRHGOvSw.js +1 -0
- package/dist/web/assets/{TaskHandoffPanel-BpGiZ5eT.js → TaskHandoffPanel-DBcC1xQW.js} +24 -24
- package/dist/web/assets/{TeamSettingsPage-DbKgqEO_.js → TeamSettingsPage-BszQfKp0.js} +1 -1
- package/dist/web/assets/{TranslationSettingsPage-Ba-iypOV.js → TranslationSettingsPage-lLaxWCy3.js} +1 -1
- package/dist/web/assets/{arc-SOqs3Svk.js → arc-DtgXFw4D.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-BH25ukq_.js → architectureDiagram-3BPJPVTR-B3p3EMX1.js} +1 -1
- package/dist/web/assets/{at-sign-CEsum1vJ.js → at-sign-B8rXgKEE.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-CKA17iNP.js → blockDiagram-GPEHLZMM-BmekCfr0.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-DnZ_8oOf.js → c4Diagram-AAUBKEIU-CF6hJhuL.js} +1 -1
- package/dist/web/assets/channel-BdK_fAel.js +1 -0
- package/dist/web/assets/check-DwK55QS2.js +1 -0
- package/dist/web/assets/{chevron-down-Bmwy-nvS.js → chevron-down-Dftc5hr4.js} +1 -1
- package/dist/web/assets/{chevron-up-CClL6-SF.js → chevron-up-CKRxN6zX.js} +1 -1
- package/dist/web/assets/{chip-BSMT2uT1.js → chip-ZTBHcXU2.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-BrtUyBDF.js → chunk-2J33WTMH-Bjelop4M.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-DZDNetDC.js → chunk-4BX2VUAB-B1rJPbL6.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-xVa3bJqv.js → chunk-55IACEB6-B5qfH7Gj.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-B7n9vxY4.js → chunk-727SXJPM-ClFMbgrH.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-DQd4G76y.js → chunk-AQP2D5EJ-BMFjTO7B.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-CXyP08kl.js → chunk-FMBD7UC4-Pr1oOFfR.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-BtnIS-HK.js → chunk-ND2GUHAM-BPm4TRpO.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-D4D-V_ex.js → chunk-QZHKN3VN-DCPA_U0M.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-CFzCq0ml.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CFzCq0ml.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-DfERo9L1.js → code-block-OCS4YCEC-Cx53F4d7.js} +1 -1
- package/dist/web/assets/{confirm-dialog-8ItnHBi0.js → confirm-dialog-C_j-w4TS.js} +1 -1
- package/dist/web/assets/{content-DrW8KnXu.js → content-DeIfej_n.js} +1 -1
- package/dist/web/assets/{copy-prrQrInw.js → copy-B-BaLIlh.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-CXdH8Idq.js → cose-bilkent-S5V4N54A-gIys-0yu.js} +1 -1
- package/dist/web/assets/{cssMode-CJ6_f10q.js → cssMode-xF0bjbbU.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-XZydDwXe.js → dagre-BM42HDAG-Bwc3Ntc-.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-CofEe0Fr.js → diagram-2AECGRRQ-zkydBsMT.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-BbTtW5WH.js → diagram-5GNKFQAL-p9As3QtI.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-BJHZXpUM.js → diagram-KO2AKTUF-N_pUU-iU.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-DN7A27YU.js → diagram-LMA3HP47-CA2rl4Gq.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-4IdYadiw.js → diagram-OG6HWLK6-BoXxBlUC.js} +1 -1
- package/dist/web/assets/{dialog-BUsI4h2U.js → dialog-CnjWIdWp.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-BFijhCWv.js → erDiagram-TEJ5UH35-CVBHQTCN.js} +1 -1
- package/dist/web/assets/{file-C6QMUr5_.js → file-jMLGlXos.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-D9MxC-El.js → flowDiagram-I6XJVG4X-kK7iKiAv.js} +1 -1
- package/dist/web/assets/{folder-picker-CBdw-4v3.js → folder-picker-CR8LiSQf.js} +1 -1
- package/dist/web/assets/{freemarker2-CJVobC22.js → freemarker2-CTMcTiBd.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-BijCAyPQ.js → ganttDiagram-6RSMTGT7-CJVvLTkW.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-AvI5QqxQ.js → gitGraphDiagram-PVQCEYII-D8uj_SCw.js} +1 -1
- package/dist/web/assets/{globe-BOfcTsvL.js → globe-FFVKce9-.js} +1 -1
- package/dist/web/assets/{handlebars-DTqWmI25.js → handlebars-NHxbmOs3.js} +1 -1
- package/dist/web/assets/{html-Bx7L8DX_.js → html-oFqzz32q.js} +1 -1
- package/dist/web/assets/{htmlMode-D_S0NjZc.js → htmlMode-sgeetciK.js} +1 -1
- package/dist/web/assets/index-408ws6FY.css +1 -0
- package/dist/web/assets/index-9KNEuwGB.js +122 -0
- package/dist/web/assets/{index-Bg8TlDo_.js → index-BzqyZD7L.js} +1 -1
- package/dist/web/assets/{index-BFcDmhr0.js → index-C5lNOKJb.js} +1 -1
- package/dist/web/assets/{index-BClyhWqz.js → index-C9vIrQ3Q.js} +1 -1
- package/dist/web/assets/{index-Cdmj8aPv.js → index-Cm_7q6ju.js} +1 -1
- package/dist/web/assets/{index-DUmVscrR.js → index-CwfWGzxi.js} +4 -4
- package/dist/web/assets/{index-COigMgrJ.js → index-D8TNxwWk.js} +1 -1
- package/dist/web/assets/{index-JXcQeorP.js → index-biTPUXAe.js} +1 -1
- package/dist/web/assets/{index-CtOu4p9B.js → index-gqrRO6ZJ.js} +1 -1
- package/dist/web/assets/{infoDiagram-5YYISTIA-76JLqjJ0.js → infoDiagram-5YYISTIA-CExRZE3Y.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-CXHFTVly.js → ishikawaDiagram-YF4QCWOH-CsqM2X33.js} +1 -1
- package/dist/web/assets/javascript-COt-61wn.js +1 -0
- package/dist/web/assets/{journeyDiagram-JHISSGLW-6SDJs9C5.js → journeyDiagram-JHISSGLW-DX9OMhPD.js} +1 -1
- package/dist/web/assets/{jsonMode-BGg9MhFR.js → jsonMode-VQg5cpLV.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-C0Y3zy1P.js → kanban-definition-UN3LZRKU-CWHMx6vc.js} +1 -1
- package/dist/web/assets/{kbd-D4KIW7lm.js → kbd-GGofKfKu.js} +1 -1
- package/dist/web/assets/{key-round-C4vhwqUu.js → key-round-p-Fpykfj.js} +1 -1
- package/dist/web/assets/{layers-BBHgMnhN.js → layers-pbPa_eZq.js} +1 -1
- package/dist/web/assets/{linear-CjeIgBwO.js → linear-9VwGhaEA.js} +1 -1
- package/dist/web/assets/{link-C-Jq7dnc.js → link-CG4UwIS1.js} +1 -1
- package/dist/web/assets/{liquid-guocpCJB.js → liquid-SJInUaiB.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CPXERxVW.js → lspLanguageFeatures-DJOdVyBc.js} +1 -1
- package/dist/web/assets/{mdx-DA4ymd3l.js → mdx-CToYr-3b.js} +1 -1
- package/dist/web/assets/{menu-BgtmXAzT.js → menu-BFQ1mKU7.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-XQbfQDGS.js → mermaid-NOHMQCX5-BOViobLk.js} +58 -58
- package/dist/web/assets/{message-square-DIFv9yrO.js → message-square-BYZsUsLz.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-6ucD61UV.js → mindmap-definition-RKZ34NQL-BTcDnn6X.js} +1 -1
- package/dist/web/assets/{modal-Dx4N46s5.js → modal-BT_7Lhtw.js} +1 -1
- package/dist/web/assets/{monaco-Mn1xgio_.js → monaco-DUftz48_.js} +3 -3
- package/dist/web/assets/{nav-row-DwEkbw3N.js → nav-row-BjDckaPC.js} +1 -1
- package/dist/web/assets/{paperclip-CdQvl5ee.js → paperclip-CFAH5neE.js} +1 -1
- package/dist/web/assets/{pencil-ChX7G9j9.js → pencil-Bg9TWm_-.js} +1 -1
- package/dist/web/assets/{people-D_VwidfV.js → people-BIQwajM2.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-KVvAyrIn.js → pieDiagram-4H26LBE5-CRjqdnP8.js} +1 -1
- package/dist/web/assets/{popover-CGEFZKuu.js → popover-DpYhrrCE.js} +1 -1
- package/dist/web/assets/{python-BzNNRn8W.js → python-DbmUucgH.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-ClVzvpE7.js → quadrantDiagram-W4KKPZXB-uvA8TYC6.js} +1 -1
- package/dist/web/assets/{razor-DF2ZxqCE.js → razor-B0AJhw7W.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-uXN6Uoln.js → requirementDiagram-4Y6WPE33-BWLugaKX.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-Bi3Tc0wR.js → sankeyDiagram-5OEKKPKP-DHrbZZv8.js} +1 -1
- package/dist/web/assets/{search--FRFbCre.js → search-BH8nze-X.js} +1 -1
- package/dist/web/assets/{select-c5IIpQj0.js → select-BegY9RkP.js} +1 -1
- package/dist/web/assets/{select-D0sHgfcU.js → select-EcEr5QSS.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-CLdrO2PY.js → sequenceDiagram-3UESZ5HK-CKwEKcTn.js} +1 -1
- package/dist/web/assets/{server-Dr_6KJFM.js → server-BxEUjx0l.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-BGInldGc.js → stateDiagram-AJRCARHV-vhgmSpa9.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-C0z5OTY4.js +1 -0
- package/dist/web/assets/{textarea-W-xQPto3.js → textarea-CvoGGROs.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-BUp6Qykc.js → timeline-definition-PNZ67QCA-bSDKcwDZ.js} +1 -1
- package/dist/web/assets/{toggles-Bgp7vdwg.js → toggles-CEDUD08u.js} +1 -1
- package/dist/web/assets/{tooltip-DZcaSN1F.js → tooltip-CKaUbVZ7.js} +1 -1
- package/dist/web/assets/{track-Cj1Ogapu.js → track-1qw2cvTy.js} +1 -1
- package/dist/web/assets/{trash-2-DmFXzIhh.js → trash-2-ChiXon87.js} +1 -1
- package/dist/web/assets/{tsMode-CSHMQttX.js → tsMode-bnV8W2Ru.js} +1 -1
- package/dist/web/assets/{typescript-CyQKmnN-.js → typescript-d1MHIeEx.js} +1 -1
- package/dist/web/assets/{upload-C-4QDrwN.js → upload-CQ-cQaOz.js} +1 -1
- package/dist/web/assets/{use-profiles-D5mIgeQU.js → use-profiles-CJzoqarX.js} +1 -1
- package/dist/web/assets/{use-providers-BViTes-6.js → use-providers-S29TCag2.js} +1 -1
- package/dist/web/assets/{use-translation-settings-Dgw0oKP1.js → use-translation-settings-DifNJaCu.js} +1 -1
- package/dist/web/assets/{useNormalizedLogs-BX7pMg0-.js → useNormalizedLogs-BVdY8qDk.js} +1 -1
- package/dist/web/assets/{useTokenUsage-T03faPfn.js → useTokenUsage-nh_KDA3q.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-iQYnP9Ux.js → vennDiagram-CIIHVFJN-D7QbDYzC.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-J7vXwA5J.js → wardley-L42UT6IY-C9aHlNVa.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CdtM5GJv.js → wardleyDiagram-YWT4CUSO-CZhubDRC.js} +1 -1
- package/dist/web/assets/{xml-C79KdvcD.js → xml-DAKKxHAr.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-B3gcBChQ.js → xychartDiagram-2RQKCTM6-BgDlpFBh.js} +1 -1
- package/dist/web/assets/{yaml-C1WLpuVe.js → yaml-D_hSVVz0.js} +1 -1
- package/dist/web/index.html +2 -2
- package/node_modules/@agent-tower/shared/dist/types.d.ts +12 -2
- package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/assets/MobileTaskDetail-B68iYPOI.js +0 -3
- package/dist/web/assets/ProjectKanbanPage-CUX0Kh-t.js +0 -12
- package/dist/web/assets/TaskDetail-DBtWf0YV.js +0 -1
- package/dist/web/assets/channel-xU45IQlP.js +0 -1
- package/dist/web/assets/check-DUA2DjGH.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-pvRulc6s.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-pvRulc6s.js +0 -1
- package/dist/web/assets/index-BDON669P.css +0 -1
- package/dist/web/assets/index-BRu1Yhrx.js +0 -122
- package/dist/web/assets/javascript-80FDzX3y.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-D44x8SXb.js +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-DFT7Cubi.js","assets/select-BegY9RkP.js","assets/select-EcEr5QSS.js","assets/menu-styles-DWynpVVz.js","assets/chevron-down-Dftc5hr4.js","assets/check-DwK55QS2.js","assets/index-gqrRO6ZJ.js","assets/index-C5lNOKJb.js","assets/index-C9vIrQ3Q.js","assets/index-biTPUXAe.js","assets/index-Cm_7q6ju.js","assets/textarea-CvoGGROs.js","assets/toggles-CEDUD08u.js","assets/index-BzqyZD7L.js","assets/use-providers-S29TCag2.js","assets/provider-selection-DSu7SCI7.js","assets/TranslationSettingsPage-lLaxWCy3.js","assets/use-translation-settings-DifNJaCu.js","assets/search-BH8nze-X.js","assets/index-D8TNxwWk.js","assets/ProviderSettingsPage-D759BSRa.js","assets/ExecutionPermissionSelector-CJgc_EVo.js","assets/confirm-dialog-C_j-w4TS.js","assets/dialog-CnjWIdWp.js","assets/modal-BT_7Lhtw.js","assets/mermaid-NOHMQCX5-BOViobLk.js","assets/AttachmentPreview-B9z1Mxb-.js","assets/tooltip-CKaUbVZ7.js","assets/kbd-GGofKfKu.js","assets/copy-B-BaLIlh.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/SettingsMasterDetail-DpYUTM-Q.js","assets/key-round-p-Fpykfj.js","assets/trash-2-ChiXon87.js","assets/upload-CQ-cQaOz.js","assets/pencil-Bg9TWm_-.js","assets/TeamSettingsPage-BszQfKp0.js","assets/MemberAvatar-Cfz8LU6k.js","assets/people-BIQwajM2.js","assets/chevron-up-CKRxN6zX.js","assets/ProjectSettingsPage-CMBMkbgI.js","assets/BranchSelect-Bo5uhKCt.js","assets/popover-DpYhrrCE.js","assets/file-jMLGlXos.js","assets/chip-ZTBHcXU2.js","assets/folder-picker-CR8LiSQf.js","assets/NotificationSettingsPage-BSMJ45yx.js","assets/message-square-BYZsUsLz.js","assets/link-CG4UwIS1.js","assets/McpSettingsPage-CgiyGvkH.js","assets/server-BxEUjx0l.js","assets/ProfileSettingsPage-BwNThOnH.js","assets/use-profiles-CJzoqarX.js","assets/layers-pbPa_eZq.js","assets/ProjectKanbanPage-DtZW0bOh.js","assets/CreateTaskInput-4aHJpsfL.js","assets/BrandLogo-DEL42B23.js","assets/paperclip-CFAH5neE.js","assets/ConversationPage-C46RuN9U.js","assets/nav-row-BjDckaPC.js","assets/useNormalizedLogs-BVdY8qDk.js","assets/track-1qw2cvTy.js","assets/useTokenUsage-nh_KDA3q.js","assets/menu-BFQ1mKU7.js","assets/AgentDemoPage-CrkoVCOZ.js","assets/at-sign-B8rXgKEE.js","assets/globe-FFVKce9-.js","assets/DesignSystemPage-CjCYC24B.js","assets/content-DeIfej_n.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function nS(t,a){for(var i=0;i<a.length;i++){const o=a[i];if(typeof o!="string"&&!Array.isArray(o)){for(const c in o)if(c!=="default"&&!(c in t)){const u=Object.getOwnPropertyDescriptor(o,c);u&&Object.defineProperty(t,c,u.get?u:{enumerable:!0,get:()=>o[c]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function i(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(c){if(c.ep)return;c.ep=!0;const u=i(c);fetch(c.href,u)}})();function Cv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rd={exports:{}},Xs={};var Qg;function aS(){if(Qg)return Xs;Qg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(o,c,u){var f=null;if(u!==void 0&&(f=""+u),c.key!==void 0&&(f=""+c.key),"key"in c){u={};for(var h in c)h!=="key"&&(u[h]=c[h])}else u=c;return c=u.ref,{$$typeof:t,type:o,key:f,ref:c!==void 0?c:null,props:u}}return Xs.Fragment=a,Xs.jsx=i,Xs.jsxs=i,Xs}var Kg;function rS(){return Kg||(Kg=1,Rd.exports=aS()),Rd.exports}var m=rS(),Nd={exports:{}},je={};var Gg;function iS(){if(Gg)return je;Gg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function k(C){return C===null||typeof C!="object"?null:(C=w&&C[w]||C["@@iterator"],typeof C=="function"?C:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,q={};function B(C,I,H){this.props=C,this.context=I,this.refs=q,this.updater=H||z}B.prototype.isReactComponent={},B.prototype.setState=function(C,I){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,I,"setState")},B.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function K(){}K.prototype=B.prototype;function W(C,I,H){this.props=C,this.context=I,this.refs=q,this.updater=H||z}var me=W.prototype=new K;me.constructor=W,M(me,B.prototype),me.isPureReactComponent=!0;var he=Array.isArray;function fe(){}var R={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function ie(C,I,H){var $=H.ref;return{$$typeof:t,type:C,key:I,ref:$!==void 0?$:null,props:H}}function Oe(C,I){return ie(C.type,I,C.props)}function Ne(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Ee(C){var I={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(H){return I[H]})}var ze=/\/+/g;function Be(C,I){return typeof C=="object"&&C!==null&&C.key!=null?Ee(""+C.key):I.toString(36)}function Ce(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(fe,fe):(C.status="pending",C.then(function(I){C.status==="pending"&&(C.status="fulfilled",C.value=I)},function(I){C.status==="pending"&&(C.status="rejected",C.reason=I)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function _(C,I,H,$,ee){var J=typeof C;(J==="undefined"||J==="boolean")&&(C=null);var re=!1;if(C===null)re=!0;else switch(J){case"bigint":case"string":case"number":re=!0;break;case"object":switch(C.$$typeof){case t:case a:re=!0;break;case x:return re=C._init,_(re(C._payload),I,H,$,ee)}}if(re)return ee=ee(C),re=$===""?"."+Be(C,0):$,he(ee)?(H="",re!=null&&(H=re.replace(ze,"$&/")+"/"),_(ee,I,H,"",function(Kt){return Kt})):ee!=null&&(Ne(ee)&&(ee=Oe(ee,H+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(ze,"$&/")+"/")+re)),I.push(ee)),1;re=0;var ke=$===""?".":$+":";if(he(C))for(var Pe=0;Pe<C.length;Pe++)$=C[Pe],J=ke+Be($,Pe),re+=_($,I,H,J,ee);else if(Pe=k(C),typeof Pe=="function")for(C=Pe.call(C),Pe=0;!($=C.next()).done;)$=$.value,J=ke+Be($,Pe++),re+=_($,I,H,J,ee);else if(J==="object"){if(typeof C.then=="function")return _(Ce(C),I,H,$,ee);throw I=String(C),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return re}function F(C,I,H){if(C==null)return C;var $=[],ee=0;return _(C,$,"","",function(J){return I.call(H,J,ee++)}),$}function Q(C){if(C._status===-1){var I=C._result;I=I(),I.then(function(H){(C._status===0||C._status===-1)&&(C._status=1,C._result=H)},function(H){(C._status===0||C._status===-1)&&(C._status=2,C._result=H)}),C._status===-1&&(C._status=0,C._result=I)}if(C._status===1)return C._result.default;throw C._result}var pe=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},be={map:F,forEach:function(C,I,H){F(C,function(){I.apply(this,arguments)},H)},count:function(C){var I=0;return F(C,function(){I++}),I},toArray:function(C){return F(C,function(I){return I})||[]},only:function(C){if(!Ne(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return je.Activity=v,je.Children=be,je.Component=B,je.Fragment=i,je.Profiler=c,je.PureComponent=W,je.StrictMode=o,je.Suspense=p,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,je.__COMPILER_RUNTIME={__proto__:null,c:function(C){return R.H.useMemoCache(C)}},je.cache=function(C){return function(){return C.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(C,I,H){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var $=M({},C.props),ee=C.key;if(I!=null)for(J in I.key!==void 0&&(ee=""+I.key),I)!Y.call(I,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&I.ref===void 0||($[J]=I[J]);var J=arguments.length-2;if(J===1)$.children=H;else if(1<J){for(var re=Array(J),ke=0;ke<J;ke++)re[ke]=arguments[ke+2];$.children=re}return ie(C.type,ee,$)},je.createContext=function(C){return C={$$typeof:f,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},je.createElement=function(C,I,H){var $,ee={},J=null;if(I!=null)for($ in I.key!==void 0&&(J=""+I.key),I)Y.call(I,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(ee[$]=I[$]);var re=arguments.length-2;if(re===1)ee.children=H;else if(1<re){for(var ke=Array(re),Pe=0;Pe<re;Pe++)ke[Pe]=arguments[Pe+2];ee.children=ke}if(C&&C.defaultProps)for($ in re=C.defaultProps,re)ee[$]===void 0&&(ee[$]=re[$]);return ie(C,J,ee)},je.createRef=function(){return{current:null}},je.forwardRef=function(C){return{$$typeof:h,render:C}},je.isValidElement=Ne,je.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:Q}},je.memo=function(C,I){return{$$typeof:g,type:C,compare:I===void 0?null:I}},je.startTransition=function(C){var I=R.T,H={};R.T=H;try{var $=C(),ee=R.S;ee!==null&&ee(H,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(fe,pe)}catch(J){pe(J)}finally{I!==null&&H.types!==null&&(I.types=H.types),R.T=I}},je.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},je.use=function(C){return R.H.use(C)},je.useActionState=function(C,I,H){return R.H.useActionState(C,I,H)},je.useCallback=function(C,I){return R.H.useCallback(C,I)},je.useContext=function(C){return R.H.useContext(C)},je.useDebugValue=function(){},je.useDeferredValue=function(C,I){return R.H.useDeferredValue(C,I)},je.useEffect=function(C,I){return R.H.useEffect(C,I)},je.useEffectEvent=function(C){return R.H.useEffectEvent(C)},je.useId=function(){return R.H.useId()},je.useImperativeHandle=function(C,I,H){return R.H.useImperativeHandle(C,I,H)},je.useInsertionEffect=function(C,I){return R.H.useInsertionEffect(C,I)},je.useLayoutEffect=function(C,I){return R.H.useLayoutEffect(C,I)},je.useMemo=function(C,I){return R.H.useMemo(C,I)},je.useOptimistic=function(C,I){return R.H.useOptimistic(C,I)},je.useReducer=function(C,I,H){return R.H.useReducer(C,I,H)},je.useRef=function(C){return R.H.useRef(C)},je.useState=function(C){return R.H.useState(C)},je.useSyncExternalStore=function(C,I,H){return R.H.useSyncExternalStore(C,I,H)},je.useTransition=function(){return R.H.useTransition()},je.version="19.2.4",je}var Yg;function wf(){return Yg||(Yg=1,Nd.exports=iS()),Nd.exports}var S=wf();const ne=Cv(S),Ef=nS({__proto__:null,default:ne},[S]);var _d={exports:{}},$s={},Od={exports:{}},Md={};var Vg;function sS(){return Vg||(Vg=1,(function(t){function a(_,F){var Q=_.length;_.push(F);e:for(;0<Q;){var pe=Q-1>>>1,be=_[pe];if(0<c(be,F))_[pe]=F,_[Q]=be,Q=pe;else break e}}function i(_){return _.length===0?null:_[0]}function o(_){if(_.length===0)return null;var F=_[0],Q=_.pop();if(Q!==F){_[0]=Q;e:for(var pe=0,be=_.length,C=be>>>1;pe<C;){var I=2*(pe+1)-1,H=_[I],$=I+1,ee=_[$];if(0>c(H,Q))$<be&&0>c(ee,H)?(_[pe]=ee,_[$]=Q,pe=$):(_[pe]=H,_[I]=Q,pe=I);else if($<be&&0>c(ee,Q))_[pe]=ee,_[$]=Q,pe=$;else break e}}return F}function c(_,F){var Q=_.sortIndex-F.sortIndex;return Q!==0?Q:_.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],g=[],x=1,v=null,w=3,k=!1,z=!1,M=!1,q=!1,B=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function me(_){for(var F=i(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=_)o(g),F.sortIndex=F.expirationTime,a(p,F);else break;F=i(g)}}function he(_){if(M=!1,me(_),!z)if(i(p)!==null)z=!0,fe||(fe=!0,Ee());else{var F=i(g);F!==null&&Ce(he,F.startTime-_)}}var fe=!1,R=-1,Y=5,ie=-1;function Oe(){return q?!0:!(t.unstable_now()-ie<Y)}function Ne(){if(q=!1,fe){var _=t.unstable_now();ie=_;var F=!0;try{e:{z=!1,M&&(M=!1,K(R),R=-1),k=!0;var Q=w;try{t:{for(me(_),v=i(p);v!==null&&!(v.expirationTime>_&&Oe());){var pe=v.callback;if(typeof pe=="function"){v.callback=null,w=v.priorityLevel;var be=pe(v.expirationTime<=_);if(_=t.unstable_now(),typeof be=="function"){v.callback=be,me(_),F=!0;break t}v===i(p)&&o(p),me(_)}else o(p);v=i(p)}if(v!==null)F=!0;else{var C=i(g);C!==null&&Ce(he,C.startTime-_),F=!1}}break e}finally{v=null,w=Q,k=!1}F=void 0}}finally{F?Ee():fe=!1}}}var Ee;if(typeof W=="function")Ee=function(){W(Ne)};else if(typeof MessageChannel<"u"){var ze=new MessageChannel,Be=ze.port2;ze.port1.onmessage=Ne,Ee=function(){Be.postMessage(null)}}else Ee=function(){B(Ne,0)};function Ce(_,F){R=B(function(){_(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(_){_.callback=null},t.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_next=function(_){switch(w){case 1:case 2:case 3:var F=3;break;default:F=w}var Q=w;w=F;try{return _()}finally{w=Q}},t.unstable_requestPaint=function(){q=!0},t.unstable_runWithPriority=function(_,F){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var Q=w;w=_;try{return F()}finally{w=Q}},t.unstable_scheduleCallback=function(_,F,Q){var pe=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?pe+Q:pe):Q=pe,_){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=Q+be,_={id:x++,callback:F,priorityLevel:_,startTime:Q,expirationTime:be,sortIndex:-1},Q>pe?(_.sortIndex=Q,a(g,_),i(p)===null&&_===i(g)&&(M?(K(R),R=-1):M=!0,Ce(he,Q-pe))):(_.sortIndex=be,a(p,_),z||k||(z=!0,fe||(fe=!0,Ee()))),_},t.unstable_shouldYield=Oe,t.unstable_wrapCallback=function(_){var F=w;return function(){var Q=w;w=F;try{return _.apply(this,arguments)}finally{w=Q}}}})(Md)),Md}var Fg;function oS(){return Fg||(Fg=1,Od.exports=sS()),Od.exports}var Dd={exports:{}},nn={};var Xg;function lS(){if(Xg)return nn;Xg=1;var t=wf();function a(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(p,g,x){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:p,containerInfo:g,implementation:x}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,nn.createPortal=function(p,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return u(p,g,null,x)},nn.flushSync=function(p){var g=f.T,x=o.p;try{if(f.T=null,o.p=2,p)return p()}finally{f.T=g,o.p=x,o.d.f()}},nn.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(p,g))},nn.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},nn.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var x=g.as,v=h(x,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,k=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?o.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:k}):x==="script"&&o.d.X(p,{crossOrigin:v,integrity:w,fetchPriority:k,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},nn.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=h(g.as,g.crossOrigin);o.d.M(p,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(p)},nn.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,v=h(x,g.crossOrigin);o.d.L(p,x,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},nn.preloadModule=function(p,g){if(typeof p=="string")if(g){var x=h(g.as,g.crossOrigin);o.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(p)},nn.requestFormReset=function(p){o.d.r(p)},nn.unstable_batchedUpdates=function(p,g){return p(g)},nn.useFormState=function(p,g,x){return f.H.useFormState(p,g,x)},nn.useFormStatus=function(){return f.H.useHostTransitionStatus()},nn.version="19.2.4",nn}var $g;function kv(){if($g)return Dd.exports;$g=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Dd.exports=lS(),Dd.exports}var Zg;function cS(){if(Zg)return $s;Zg=1;var t=oS(),a=wf(),i=kv();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(o(188))}function g(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(o(188));return n!==e?null:e}for(var r=e,s=n;;){var l=r.return;if(l===null)break;var d=l.alternate;if(d===null){if(s=l.return,s!==null){r=s;continue}break}if(l.child===d.child){for(d=l.child;d;){if(d===r)return p(l),e;if(d===s)return p(l),n;d=d.sibling}throw Error(o(188))}if(r.return!==s.return)r=l,s=d;else{for(var y=!1,b=l.child;b;){if(b===r){y=!0,r=l,s=d;break}if(b===s){y=!0,s=l,r=d;break}b=b.sibling}if(!y){for(b=d.child;b;){if(b===r){y=!0,r=d,s=l;break}if(b===s){y=!0,s=d,r=l;break}b=b.sibling}if(!y)throw Error(o(189))}}if(r.alternate!==s)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),W=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),Oe=Symbol.for("react.memo_cache_sentinel"),Ne=Symbol.iterator;function Ee(e){return e===null||typeof e!="object"?null:(e=Ne&&e[Ne]||e["@@iterator"],typeof e=="function"?e:null)}var ze=Symbol.for("react.client.reference");function Be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ze?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case B:return"Profiler";case q:return"StrictMode";case he:return"Suspense";case fe:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case W:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case me:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return n=e.displayName||null,n!==null?n:Be(e.type)||"Memo";case Y:n=e._payload,e=e._init;try{return Be(e(n))}catch{}}return null}var Ce=Array.isArray,_=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},pe=[],be=-1;function C(e){return{current:e}}function I(e){0>be||(e.current=pe[be],pe[be]=null,be--)}function H(e,n){be++,pe[be]=e.current,e.current=n}var $=C(null),ee=C(null),J=C(null),re=C(null);function ke(e,n){switch(H(J,n),H(ee,e),H($,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=fg(n),e=hg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I($),H($,e)}function Pe(){I($),I(ee),I(J)}function Kt(e){e.memoizedState!==null&&H(re,e);var n=$.current,r=hg(n,e.type);n!==r&&(H(ee,e),H($,r))}function sn(e){ee.current===e&&(I($),I(ee)),re.current===e&&(I(re),Gs._currentValue=Q)}var We,Jn;function un(e){if(We===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);We=n&&n[1]||"",Jn=-1<r.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+We+e+Jn}var Or=!1;function dn(e,n){if(!e||Or)return"";Or=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(P){var L=P}Reflect.construct(e,[],X)}else{try{X.call()}catch(P){L=P}e.call(X.prototype)}}else{try{throw Error()}catch(P){L=P}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(P){if(P&&L&&typeof P.stack=="string")return[P.stack,L.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),y=d[0],b=d[1];if(y&&b){var T=y.split(`
|
|
5
|
+
`),j=b.split(`
|
|
6
|
+
`);for(l=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;l<j.length&&!j[l].includes("DetermineComponentFrameRoot");)l++;if(s===T.length||l===j.length)for(s=T.length-1,l=j.length-1;1<=s&&0<=l&&T[s]!==j[l];)l--;for(;1<=s&&0<=l;s--,l--)if(T[s]!==j[l]){if(s!==1||l!==1)do if(s--,l--,0>l||T[s]!==j[l]){var G=`
|
|
7
|
+
`+T[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=l);break}}}finally{Or=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?un(r):""}function Ta(e,n){switch(e.tag){case 26:case 27:case 5:return un(e.type);case 16:return un("Lazy");case 13:return e.child!==n&&n!==null?un("Suspense Fallback"):un("Suspense");case 19:return un("SuspenseList");case 0:case 15:return dn(e.type,!1);case 11:return dn(e.type.render,!1);case 1:return dn(e.type,!0);case 31:return un("Activity");default:return""}}function Mr(e){try{var n="",r=null;do n+=Ta(e,r),r=e,e=e.return;while(e);return n}catch(s){return`
|
|
8
|
+
Error generating stack: `+s.message+`
|
|
9
|
+
`+s.stack}}var en=Object.prototype.hasOwnProperty,Dr=t.unstable_scheduleCallback,jr=t.unstable_cancelCallback,Gt=t.unstable_shouldYield,da=t.unstable_requestPaint,bt=t.unstable_now,Ca=t.unstable_getCurrentPriorityLevel,fa=t.unstable_ImmediatePriority,$a=t.unstable_UserBlockingPriority,Yt=t.unstable_NormalPriority,on=t.unstable_LowPriority,Dn=t.unstable_IdlePriority,ui=t.log,jn=t.unstable_setDisableYieldValue,ka=null,ht=null;function fn(e){if(typeof ui=="function"&&jn(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(ka,e)}catch{}}var Bt=Math.clz32?Math.clz32:Sn,di=Math.log,zr=Math.LN2;function Sn(e){return e>>>=0,e===0?32:31-(di(e)/zr|0)|0}var Wn=256,Aa=262144,ea=4194304;function zn(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _e(e,n,r){var s=e.pendingLanes;if(s===0)return 0;var l=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~d,s!==0?l=zn(s):(y&=b,y!==0?l=zn(y):r||(r=b&~e,r!==0&&(l=zn(r))))):(b=s&~d,b!==0?l=zn(b):y!==0?l=zn(y):r||(r=s&~e,r!==0&&(l=zn(r)))),l===0?0:n!==0&&n!==l&&(n&d)===0&&(d=l&-l,r=n&-n,d>=r||d===32&&(r&4194048)!==0)?n:l}function dt(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function kt(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function At(){var e=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),e}function wn(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function ft(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tn(e,n,r,s,l,d){var y=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var b=e.entanglements,T=e.expirationTimes,j=e.hiddenUpdates;for(r=y&~r;0<r;){var G=31-Bt(r),X=1<<G;b[G]=0,T[G]=-1;var L=j[G];if(L!==null)for(j[G]=null,G=0;G<L.length;G++){var P=L[G];P!==null&&(P.lane&=-536870913)}r&=~X}s!==0&&Ra(e,s,0),d!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~n))}function Ra(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-Bt(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|r&261930}function E(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var s=31-Bt(r),l=1<<s;l&n|e[s]&n&&(e[s]|=n),r&=~l}}function N(e,n){var r=n&-n;return r=(r&42)!==0?1:U(r),(r&(e.suspendedLanes|n))!==0?0:r}function U(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Z(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function te(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Lg(e.type))}function xe(e,n){var r=F.p;try{return F.p=e,n()}finally{F.p=r}}var oe=Math.random().toString(36).slice(2),se="__reactFiber$"+oe,le="__reactProps$"+oe,ve="__reactContainer$"+oe,Ae="__reactEvents$"+oe,we="__reactListeners$"+oe,Je="__reactHandles$"+oe,Ye="__reactResources$"+oe,xt="__reactMarker$"+oe;function St(e){delete e[se],delete e[le],delete e[Ae],delete e[we],delete e[Je]}function wt(e){var n=e[se];if(n)return n;for(var r=e.parentNode;r;){if(n=r[ve]||r[se]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=xg(e);e!==null;){if(r=e[se])return r;e=xg(e)}return n}e=r,r=e.parentNode}return null}function Ve(e){if(e=e[se]||e[ve]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function It(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function hn(e){var n=e[Ye];return n||(n=e[Ye]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function yt(e){e[xt]=!0}var ta=new Set,En={};function na(e,n){Ln(e,n),Ln(e+"Capture",n)}function Ln(e,n){for(En[e]=n,e=0;e<n.length;e++)ta.add(n[e])}var Na=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Lr={},Ur={};function Fe(e){return en.call(Ur,e)?!0:en.call(Lr,e)?!1:Na.test(e)?Ur[e]=!0:(Lr[e]=!0,!1)}function Rt(e,n,r){if(Fe(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+r)}}function aa(e,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+r)}}function Vt(e,n,r,s){if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,""+s)}}function Xe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Br(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ko(e,n,r){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var l=s.get,d=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(y){r=""+y,d.call(this,y)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(y){r=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function os(e){if(!e._valueTracker){var n=Br(e)?"checked":"value";e._valueTracker=ko(e,n,""+e[n])}}function ih(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),s="";return e&&(s=Br(e)?e.checked?"true":"false":e.value),e=s,e!==r?(n.setValue(e),!0):!1}function Ao(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var $0=/[\n"\\]/g;function Un(e){return e.replace($0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function wc(e,n,r,s,l,d,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),n!=null?y==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Xe(n)):e.value!==""+Xe(n)&&(e.value=""+Xe(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?Ec(e,y,Xe(n)):r!=null?Ec(e,y,Xe(r)):s!=null&&e.removeAttribute("value"),l==null&&d!=null&&(e.defaultChecked=!!d),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Xe(b):e.removeAttribute("name")}function sh(e,n,r,s,l,d,y,b){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||r!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){os(e);return}r=r!=null?""+Xe(r):"",n=n!=null?""+Xe(n):r,b||n===e.value||(e.value=n),e.defaultValue=n}s=s??l,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),os(e)}function Ec(e,n,r){n==="number"&&Ao(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function fi(e,n,r,s){if(e=e.options,n){n={};for(var l=0;l<r.length;l++)n["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=n.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&s&&(e[r].defaultSelected=!0)}else{for(r=""+Xe(r),n=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,s&&(e[l].defaultSelected=!0);return}n!==null||e[l].disabled||(n=e[l])}n!==null&&(n.selected=!0)}}function oh(e,n,r){if(n!=null&&(n=""+Xe(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+Xe(r):""}function lh(e,n,r,s){if(n==null){if(s!=null){if(r!=null)throw Error(o(92));if(Ce(s)){if(1<s.length)throw Error(o(93));s=s[0]}r=s}r==null&&(r=""),n=r}r=Xe(n),e.defaultValue=r,s=e.textContent,s===r&&s!==""&&s!==null&&(e.value=s),os(e)}function hi(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var Z0=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ch(e,n,r){var s=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,r):typeof r!="number"||r===0||Z0.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function uh(e,n,r){if(n!=null&&typeof n!="object")throw Error(o(62));if(e=e.style,r!=null){for(var s in r)!r.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var l in n)s=n[l],n.hasOwnProperty(l)&&r[l]!==s&&ch(e,l,s)}else for(var d in n)n.hasOwnProperty(d)&&ch(e,d,n[d])}function Tc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var J0=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),W0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ro(e){return W0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _a(){}var Cc=null;function kc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mi=null,pi=null;function dh(e){var n=Ve(e);if(n&&(e=n.stateNode)){var r=e[le]||null;e:switch(e=n.stateNode,n.type){case"input":if(wc(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Un(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var s=r[n];if(s!==e&&s.form===e.form){var l=s[le]||null;if(!l)throw Error(o(90));wc(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(n=0;n<r.length;n++)s=r[n],s.form===e.form&&ih(s)}break e;case"textarea":oh(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&fi(e,!!r.multiple,n,!1)}}}var Ac=!1;function fh(e,n,r){if(Ac)return e(n,r);Ac=!0;try{var s=e(n);return s}finally{if(Ac=!1,(mi!==null||pi!==null)&&(pl(),mi&&(n=mi,e=pi,pi=mi=null,dh(n),e)))for(n=0;n<e.length;n++)dh(e[n])}}function ls(e,n){var r=e.stateNode;if(r===null)return null;var s=r[le]||null;if(s===null)return null;r=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,n,typeof r));return r}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rc=!1;if(Oa)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){Rc=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Rc=!1}var Za=null,Nc=null,No=null;function hh(){if(No)return No;var e,n=Nc,r=n.length,s,l="value"in Za?Za.value:Za.textContent,d=l.length;for(e=0;e<r&&n[e]===l[e];e++);var y=r-e;for(s=1;s<=y&&n[r-s]===l[d-s];s++);return No=l.slice(e,1<s?1-s:void 0)}function _o(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Oo(){return!0}function mh(){return!1}function mn(e){function n(r,s,l,d,y){this._reactName=r,this._targetInst=l,this.type=s,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(r=e[b],this[b]=r?r(d):d[b]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Oo:mh,this.isPropagationStopped=mh,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Oo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),n}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mo=mn(qr),us=v({},qr,{view:0,detail:0}),ex=mn(us),_c,Oc,ds,Do=v({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ds&&(ds&&e.type==="mousemove"?(_c=e.screenX-ds.screenX,Oc=e.screenY-ds.screenY):Oc=_c=0,ds=e),_c)},movementY:function(e){return"movementY"in e?e.movementY:Oc}}),ph=mn(Do),tx=v({},Do,{dataTransfer:0}),nx=mn(tx),ax=v({},us,{relatedTarget:0}),Mc=mn(ax),rx=v({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),ix=mn(rx),sx=v({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ox=mn(sx),lx=v({},qr,{data:0}),gh=mn(lx),cx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ux={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=dx[e])?!!n[e]:!1}function Dc(){return fx}var hx=v({},us,{key:function(e){if(e.key){var n=cx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=_o(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ux[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dc,charCode:function(e){return e.type==="keypress"?_o(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_o(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mx=mn(hx),px=v({},Do,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yh=mn(px),gx=v({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dc}),yx=mn(gx),vx=v({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),bx=mn(vx),xx=v({},Do,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Sx=mn(xx),wx=v({},qr,{newState:0,oldState:0}),Ex=mn(wx),Tx=[9,13,27,32],jc=Oa&&"CompositionEvent"in window,fs=null;Oa&&"documentMode"in document&&(fs=document.documentMode);var Cx=Oa&&"TextEvent"in window&&!fs,vh=Oa&&(!jc||fs&&8<fs&&11>=fs),bh=" ",xh=!1;function Sh(e,n){switch(e){case"keyup":return Tx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gi=!1;function kx(e,n){switch(e){case"compositionend":return wh(n);case"keypress":return n.which!==32?null:(xh=!0,bh);case"textInput":return e=n.data,e===bh&&xh?null:e;default:return null}}function Ax(e,n){if(gi)return e==="compositionend"||!jc&&Sh(e,n)?(e=hh(),No=Nc=Za=null,gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return vh&&n.locale!=="ko"?null:n.data;default:return null}}var Rx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Eh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Rx[e.type]:n==="textarea"}function Th(e,n,r,s){mi?pi?pi.push(s):pi=[s]:mi=s,n=wl(n,"onChange"),0<n.length&&(r=new Mo("onChange","change",null,r,s),e.push({event:r,listeners:n}))}var hs=null,ms=null;function Nx(e){sg(e,0)}function jo(e){var n=It(e);if(ih(n))return e}function Ch(e,n){if(e==="change")return n}var kh=!1;if(Oa){var zc;if(Oa){var Lc="oninput"in document;if(!Lc){var Ah=document.createElement("div");Ah.setAttribute("oninput","return;"),Lc=typeof Ah.oninput=="function"}zc=Lc}else zc=!1;kh=zc&&(!document.documentMode||9<document.documentMode)}function Rh(){hs&&(hs.detachEvent("onpropertychange",Nh),ms=hs=null)}function Nh(e){if(e.propertyName==="value"&&jo(ms)){var n=[];Th(n,ms,e,kc(e)),fh(Nx,n)}}function _x(e,n,r){e==="focusin"?(Rh(),hs=n,ms=r,hs.attachEvent("onpropertychange",Nh)):e==="focusout"&&Rh()}function Ox(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jo(ms)}function Mx(e,n){if(e==="click")return jo(n)}function Dx(e,n){if(e==="input"||e==="change")return jo(n)}function jx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Tn=typeof Object.is=="function"?Object.is:jx;function ps(e,n){if(Tn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),s=Object.keys(n);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var l=r[s];if(!en.call(n,l)||!Tn(e[l],n[l]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Oh(e,n){var r=_h(e);e=0;for(var s;r;){if(r.nodeType===3){if(s=e+r.textContent.length,e<=n&&s>=n)return{node:r,offset:n-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_h(r)}}function Mh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Mh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Dh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ao(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=Ao(e.document)}return n}function Uc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var zx=Oa&&"documentMode"in document&&11>=document.documentMode,yi=null,Bc=null,gs=null,qc=!1;function jh(e,n,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;qc||yi==null||yi!==Ao(s)||(s=yi,"selectionStart"in s&&Uc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),gs&&ps(gs,s)||(gs=s,s=wl(Bc,"onSelect"),0<s.length&&(n=new Mo("onSelect","select",null,n,r),e.push({event:n,listeners:s}),n.target=yi)))}function Pr(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var vi={animationend:Pr("Animation","AnimationEnd"),animationiteration:Pr("Animation","AnimationIteration"),animationstart:Pr("Animation","AnimationStart"),transitionrun:Pr("Transition","TransitionRun"),transitionstart:Pr("Transition","TransitionStart"),transitioncancel:Pr("Transition","TransitionCancel"),transitionend:Pr("Transition","TransitionEnd")},Pc={},zh={};Oa&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Ir(e){if(Pc[e])return Pc[e];if(!vi[e])return e;var n=vi[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in zh)return Pc[e]=n[r];return e}var Lh=Ir("animationend"),Uh=Ir("animationiteration"),Bh=Ir("animationstart"),Lx=Ir("transitionrun"),Ux=Ir("transitionstart"),Bx=Ir("transitioncancel"),qh=Ir("transitionend"),Ph=new Map,Ic="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ic.push("scrollEnd");function ra(e,n){Ph.set(e,n),na(n,[e])}var zo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bn=[],bi=0,Hc=0;function Lo(){for(var e=bi,n=Hc=bi=0;n<e;){var r=Bn[n];Bn[n++]=null;var s=Bn[n];Bn[n++]=null;var l=Bn[n];Bn[n++]=null;var d=Bn[n];if(Bn[n++]=null,s!==null&&l!==null){var y=s.pending;y===null?l.next=l:(l.next=y.next,y.next=l),s.pending=l}d!==0&&Ih(r,l,d)}}function Uo(e,n,r,s){Bn[bi++]=e,Bn[bi++]=n,Bn[bi++]=r,Bn[bi++]=s,Hc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Qc(e,n,r,s){return Uo(e,n,r,s),Bo(e)}function Hr(e,n){return Uo(e,null,null,n),Bo(e)}function Ih(e,n,r){e.lanes|=r;var s=e.alternate;s!==null&&(s.lanes|=r);for(var l=!1,d=e.return;d!==null;)d.childLanes|=r,s=d.alternate,s!==null&&(s.childLanes|=r),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(l=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,l&&n!==null&&(l=31-Bt(r),e=d.hiddenUpdates,s=e[l],s===null?e[l]=[n]:s.push(n),n.lane=r|536870912),d):null}function Bo(e){if(50<Bs)throw Bs=0,Ju=null,Error(o(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var xi={};function qx(e,n,r,s){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(e,n,r,s){return new qx(e,n,r,s)}function Kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ma(e,n){var r=e.alternate;return r===null?(r=Cn(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Hh(e,n){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function qo(e,n,r,s,l,d){var y=0;if(s=e,typeof e=="function")Kc(e)&&(y=1);else if(typeof e=="string")y=K1(e,r,$.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Cn(31,r,n,l),e.elementType=ie,e.lanes=d,e;case M:return Qr(r.children,l,d,n);case q:y=8,l|=24;break;case B:return e=Cn(12,r,n,l|2),e.elementType=B,e.lanes=d,e;case he:return e=Cn(13,r,n,l),e.elementType=he,e.lanes=d,e;case fe:return e=Cn(19,r,n,l),e.elementType=fe,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:y=10;break e;case K:y=9;break e;case me:y=11;break e;case R:y=14;break e;case Y:y=16,s=null;break e}y=29,r=Error(o(130,e===null?"null":typeof e,"")),s=null}return n=Cn(y,r,n,l),n.elementType=e,n.type=s,n.lanes=d,n}function Qr(e,n,r,s){return e=Cn(7,e,s,n),e.lanes=r,e}function Gc(e,n,r){return e=Cn(6,e,null,n),e.lanes=r,e}function Qh(e){var n=Cn(18,null,null,0);return n.stateNode=e,n}function Yc(e,n,r){return n=Cn(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Kh=new WeakMap;function qn(e,n){if(typeof e=="object"&&e!==null){var r=Kh.get(e);return r!==void 0?r:(n={value:e,source:n,stack:Mr(n)},Kh.set(e,n),n)}return{value:e,source:n,stack:Mr(n)}}var Si=[],wi=0,Po=null,ys=0,Pn=[],In=0,Ja=null,ha=1,ma="";function Da(e,n){Si[wi++]=ys,Si[wi++]=Po,Po=e,ys=n}function Gh(e,n,r){Pn[In++]=ha,Pn[In++]=ma,Pn[In++]=Ja,Ja=e;var s=ha;e=ma;var l=32-Bt(s)-1;s&=~(1<<l),r+=1;var d=32-Bt(n)+l;if(30<d){var y=l-l%5;d=(s&(1<<y)-1).toString(32),s>>=y,l-=y,ha=1<<32-Bt(n)+l|r<<l|s,ma=d+e}else ha=1<<d|r<<l|s,ma=e}function Vc(e){e.return!==null&&(Da(e,1),Gh(e,1,0))}function Fc(e){for(;e===Po;)Po=Si[--wi],Si[wi]=null,ys=Si[--wi],Si[wi]=null;for(;e===Ja;)Ja=Pn[--In],Pn[In]=null,ma=Pn[--In],Pn[In]=null,ha=Pn[--In],Pn[In]=null}function Yh(e,n){Pn[In++]=ha,Pn[In++]=ma,Pn[In++]=Ja,ha=n.id,ma=n.overflow,Ja=e}var Ft=null,mt=null,$e=!1,Wa=null,Hn=!1,Xc=Error(o(519));function er(e){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vs(qn(n,e)),Xc}function Vh(e){var n=e.stateNode,r=e.type,s=e.memoizedProps;switch(n[se]=e,n[le]=s,r){case"dialog":Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":case"embed":Qe("load",n);break;case"video":case"audio":for(r=0;r<Ps.length;r++)Qe(Ps[r],n);break;case"source":Qe("error",n);break;case"img":case"image":case"link":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"input":Qe("invalid",n),sh(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",n);break;case"textarea":Qe("invalid",n),lh(n,s.value,s.defaultValue,s.children)}r=s.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||s.suppressHydrationWarning===!0||ug(n.textContent,r)?(s.popover!=null&&(Qe("beforetoggle",n),Qe("toggle",n)),s.onScroll!=null&&Qe("scroll",n),s.onScrollEnd!=null&&Qe("scrollend",n),s.onClick!=null&&(n.onclick=_a),n=!0):n=!1,n||er(e,!0)}function Fh(e){for(Ft=e.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:Hn=!1;return;case 27:case 3:Hn=!0;return;default:Ft=Ft.return}}function Ei(e){if(e!==Ft)return!1;if(!$e)return Fh(e),$e=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||hd(e.type,e.memoizedProps)),r=!r),r&&mt&&er(e),Fh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));mt=bg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));mt=bg(e)}else n===27?(n=mt,mr(e.type)?(e=vd,vd=null,mt=e):mt=n):mt=Ft?Kn(e.stateNode.nextSibling):null;return!0}function Kr(){mt=Ft=null,$e=!1}function $c(){var e=Wa;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),Wa=null),e}function vs(e){Wa===null?Wa=[e]:Wa.push(e)}var Zc=C(null),Gr=null,ja=null;function tr(e,n,r){H(Zc,n._currentValue),n._currentValue=r}function za(e){e._currentValue=Zc.current,I(Zc)}function Jc(e,n,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===r)break;e=e.return}}function Wc(e,n,r,s){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var d=l.dependencies;if(d!==null){var y=l.child;d=d.firstContext;e:for(;d!==null;){var b=d;d=l;for(var T=0;T<n.length;T++)if(b.context===n[T]){d.lanes|=r,b=d.alternate,b!==null&&(b.lanes|=r),Jc(d.return,r,e),s||(y=null);break e}d=b.next}}else if(l.tag===18){if(y=l.return,y===null)throw Error(o(341));y.lanes|=r,d=y.alternate,d!==null&&(d.lanes|=r),Jc(y,r,e),y=null}else y=l.child;if(y!==null)y.return=l;else for(y=l;y!==null;){if(y===e){y=null;break}if(l=y.sibling,l!==null){l.return=y.return,y=l;break}y=y.return}l=y}}function Ti(e,n,r,s){e=null;for(var l=n,d=!1;l!==null;){if(!d){if((l.flags&524288)!==0)d=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var y=l.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var b=l.type;Tn(l.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(l===re.current){if(y=l.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Gs):e=[Gs])}l=l.return}e!==null&&Wc(n,e,r,s),n.flags|=262144}function Io(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Yr(e){Gr=e,ja=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return Xh(Gr,e)}function Ho(e,n){return Gr===null&&Yr(e),Xh(e,n)}function Xh(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},ja===null){if(e===null)throw Error(o(308));ja=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else ja=ja.next=n;return r}var Px=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},Ix=t.unstable_scheduleCallback,Hx=t.unstable_NormalPriority,Mt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eu(){return{controller:new Px,data:new Map,refCount:0}}function bs(e){e.refCount--,e.refCount===0&&Ix(Hx,function(){e.controller.abort()})}var xs=null,tu=0,Ci=0,ki=null;function Qx(e,n){if(xs===null){var r=xs=[];tu=0,Ci=rd(),ki={status:"pending",value:void 0,then:function(s){r.push(s)}}}return tu++,n.then($h,$h),n}function $h(){if(--tu===0&&xs!==null){ki!==null&&(ki.status="fulfilled");var e=xs;xs=null,Ci=0,ki=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Kx(e,n){var r=[],s={status:"pending",value:null,reason:null,then:function(l){r.push(l)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var l=0;l<r.length;l++)(0,r[l])(n)},function(l){for(s.status="rejected",s.reason=l,l=0;l<r.length;l++)(0,r[l])(void 0)}),s}var Zh=_.S;_.S=function(e,n){jp=bt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Qx(e,n),Zh!==null&&Zh(e,n)};var Vr=C(null);function nu(){var e=Vr.current;return e!==null?e:ut.pooledCache}function Qo(e,n){n===null?H(Vr,Vr.current):H(Vr,n.pool)}function Jh(){var e=nu();return e===null?null:{parent:Mt._currentValue,pool:e}}var Ai=Error(o(460)),au=Error(o(474)),Ko=Error(o(542)),Go={then:function(){}};function Wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function em(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(_a,_a),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,nm(e),e;default:if(typeof n.status=="string")n.then(_a,_a);else{if(e=ut,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var l=n;l.status="fulfilled",l.value=s}},function(s){if(n.status==="pending"){var l=n;l.status="rejected",l.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,nm(e),e}throw Xr=n,Ai}}function Fr(e){try{var n=e._init;return n(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Xr=r,Ai):r}}var Xr=null;function tm(){if(Xr===null)throw Error(o(459));var e=Xr;return Xr=null,e}function nm(e){if(e===Ai||e===Ko)throw Error(o(483))}var Ri=null,Ss=0;function Yo(e){var n=Ss;return Ss+=1,Ri===null&&(Ri=[]),em(Ri,e,n)}function ws(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Vo(e,n){throw n.$$typeof===w?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function am(e){function n(O,A){if(e){var D=O.deletions;D===null?(O.deletions=[A],O.flags|=16):D.push(A)}}function r(O,A){if(!e)return null;for(;A!==null;)n(O,A),A=A.sibling;return null}function s(O){for(var A=new Map;O!==null;)O.key!==null?A.set(O.key,O):A.set(O.index,O),O=O.sibling;return A}function l(O,A){return O=Ma(O,A),O.index=0,O.sibling=null,O}function d(O,A,D){return O.index=D,e?(D=O.alternate,D!==null?(D=D.index,D<A?(O.flags|=67108866,A):D):(O.flags|=67108866,A)):(O.flags|=1048576,A)}function y(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,A,D,V){return A===null||A.tag!==6?(A=Gc(D,O.mode,V),A.return=O,A):(A=l(A,D),A.return=O,A)}function T(O,A,D,V){var Te=D.type;return Te===M?G(O,A,D.props.children,V,D.key):A!==null&&(A.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Y&&Fr(Te)===A.type)?(A=l(A,D.props),ws(A,D),A.return=O,A):(A=qo(D.type,D.key,D.props,null,O.mode,V),ws(A,D),A.return=O,A)}function j(O,A,D,V){return A===null||A.tag!==4||A.stateNode.containerInfo!==D.containerInfo||A.stateNode.implementation!==D.implementation?(A=Yc(D,O.mode,V),A.return=O,A):(A=l(A,D.children||[]),A.return=O,A)}function G(O,A,D,V,Te){return A===null||A.tag!==7?(A=Qr(D,O.mode,V,Te),A.return=O,A):(A=l(A,D),A.return=O,A)}function X(O,A,D){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Gc(""+A,O.mode,D),A.return=O,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case k:return D=qo(A.type,A.key,A.props,null,O.mode,D),ws(D,A),D.return=O,D;case z:return A=Yc(A,O.mode,D),A.return=O,A;case Y:return A=Fr(A),X(O,A,D)}if(Ce(A)||Ee(A))return A=Qr(A,O.mode,D,null),A.return=O,A;if(typeof A.then=="function")return X(O,Yo(A),D);if(A.$$typeof===W)return X(O,Ho(O,A),D);Vo(O,A)}return null}function L(O,A,D,V){var Te=A!==null?A.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return Te!==null?null:b(O,A,""+D,V);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case k:return D.key===Te?T(O,A,D,V):null;case z:return D.key===Te?j(O,A,D,V):null;case Y:return D=Fr(D),L(O,A,D,V)}if(Ce(D)||Ee(D))return Te!==null?null:G(O,A,D,V,null);if(typeof D.then=="function")return L(O,A,Yo(D),V);if(D.$$typeof===W)return L(O,A,Ho(O,D),V);Vo(O,D)}return null}function P(O,A,D,V,Te){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return O=O.get(D)||null,b(A,O,""+V,Te);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case k:return O=O.get(V.key===null?D:V.key)||null,T(A,O,V,Te);case z:return O=O.get(V.key===null?D:V.key)||null,j(A,O,V,Te);case Y:return V=Fr(V),P(O,A,D,V,Te)}if(Ce(V)||Ee(V))return O=O.get(D)||null,G(A,O,V,Te,null);if(typeof V.then=="function")return P(O,A,D,Yo(V),Te);if(V.$$typeof===W)return P(O,A,D,Ho(A,V),Te);Vo(A,V)}return null}function ce(O,A,D,V){for(var Te=null,et=null,ge=A,Ue=A=0,Ge=null;ge!==null&&Ue<D.length;Ue++){ge.index>Ue?(Ge=ge,ge=null):Ge=ge.sibling;var tt=L(O,ge,D[Ue],V);if(tt===null){ge===null&&(ge=Ge);break}e&&ge&&tt.alternate===null&&n(O,ge),A=d(tt,A,Ue),et===null?Te=tt:et.sibling=tt,et=tt,ge=Ge}if(Ue===D.length)return r(O,ge),$e&&Da(O,Ue),Te;if(ge===null){for(;Ue<D.length;Ue++)ge=X(O,D[Ue],V),ge!==null&&(A=d(ge,A,Ue),et===null?Te=ge:et.sibling=ge,et=ge);return $e&&Da(O,Ue),Te}for(ge=s(ge);Ue<D.length;Ue++)Ge=P(ge,O,Ue,D[Ue],V),Ge!==null&&(e&&Ge.alternate!==null&&ge.delete(Ge.key===null?Ue:Ge.key),A=d(Ge,A,Ue),et===null?Te=Ge:et.sibling=Ge,et=Ge);return e&&ge.forEach(function(br){return n(O,br)}),$e&&Da(O,Ue),Te}function Re(O,A,D,V){if(D==null)throw Error(o(151));for(var Te=null,et=null,ge=A,Ue=A=0,Ge=null,tt=D.next();ge!==null&&!tt.done;Ue++,tt=D.next()){ge.index>Ue?(Ge=ge,ge=null):Ge=ge.sibling;var br=L(O,ge,tt.value,V);if(br===null){ge===null&&(ge=Ge);break}e&&ge&&br.alternate===null&&n(O,ge),A=d(br,A,Ue),et===null?Te=br:et.sibling=br,et=br,ge=Ge}if(tt.done)return r(O,ge),$e&&Da(O,Ue),Te;if(ge===null){for(;!tt.done;Ue++,tt=D.next())tt=X(O,tt.value,V),tt!==null&&(A=d(tt,A,Ue),et===null?Te=tt:et.sibling=tt,et=tt);return $e&&Da(O,Ue),Te}for(ge=s(ge);!tt.done;Ue++,tt=D.next())tt=P(ge,O,Ue,tt.value,V),tt!==null&&(e&&tt.alternate!==null&&ge.delete(tt.key===null?Ue:tt.key),A=d(tt,A,Ue),et===null?Te=tt:et.sibling=tt,et=tt);return e&&ge.forEach(function(tS){return n(O,tS)}),$e&&Da(O,Ue),Te}function ct(O,A,D,V){if(typeof D=="object"&&D!==null&&D.type===M&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case k:e:{for(var Te=D.key;A!==null;){if(A.key===Te){if(Te=D.type,Te===M){if(A.tag===7){r(O,A.sibling),V=l(A,D.props.children),V.return=O,O=V;break e}}else if(A.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Y&&Fr(Te)===A.type){r(O,A.sibling),V=l(A,D.props),ws(V,D),V.return=O,O=V;break e}r(O,A);break}else n(O,A);A=A.sibling}D.type===M?(V=Qr(D.props.children,O.mode,V,D.key),V.return=O,O=V):(V=qo(D.type,D.key,D.props,null,O.mode,V),ws(V,D),V.return=O,O=V)}return y(O);case z:e:{for(Te=D.key;A!==null;){if(A.key===Te)if(A.tag===4&&A.stateNode.containerInfo===D.containerInfo&&A.stateNode.implementation===D.implementation){r(O,A.sibling),V=l(A,D.children||[]),V.return=O,O=V;break e}else{r(O,A);break}else n(O,A);A=A.sibling}V=Yc(D,O.mode,V),V.return=O,O=V}return y(O);case Y:return D=Fr(D),ct(O,A,D,V)}if(Ce(D))return ce(O,A,D,V);if(Ee(D)){if(Te=Ee(D),typeof Te!="function")throw Error(o(150));return D=Te.call(D),Re(O,A,D,V)}if(typeof D.then=="function")return ct(O,A,Yo(D),V);if(D.$$typeof===W)return ct(O,A,Ho(O,D),V);Vo(O,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,A!==null&&A.tag===6?(r(O,A.sibling),V=l(A,D),V.return=O,O=V):(r(O,A),V=Gc(D,O.mode,V),V.return=O,O=V),y(O)):r(O,A)}return function(O,A,D,V){try{Ss=0;var Te=ct(O,A,D,V);return Ri=null,Te}catch(ge){if(ge===Ai||ge===Ko)throw ge;var et=Cn(29,ge,null,O.mode);return et.lanes=V,et.return=O,et}}}var $r=am(!0),rm=am(!1),nr=!1;function ru(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ar(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function rr(e,n,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(at&2)!==0){var l=s.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),s.pending=n,n=Bo(e),Ih(e,null,r),n}return Uo(e,s,n,r),Bo(e)}function Es(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,r|=s,n.lanes=r,E(e,r)}}function su(e,n){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var l=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var y={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?l=d=y:d=d.next=y,r=r.next}while(r!==null);d===null?l=d=n:d=d.next=n}else l=d=n;r={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var ou=!1;function Ts(){if(ou){var e=ki;if(e!==null)throw e}}function Cs(e,n,r,s){ou=!1;var l=e.updateQueue;nr=!1;var d=l.firstBaseUpdate,y=l.lastBaseUpdate,b=l.shared.pending;if(b!==null){l.shared.pending=null;var T=b,j=T.next;T.next=null,y===null?d=j:y.next=j,y=T;var G=e.alternate;G!==null&&(G=G.updateQueue,b=G.lastBaseUpdate,b!==y&&(b===null?G.firstBaseUpdate=j:b.next=j,G.lastBaseUpdate=T))}if(d!==null){var X=l.baseState;y=0,G=j=T=null,b=d;do{var L=b.lane&-536870913,P=L!==b.lane;if(P?(Ke&L)===L:(s&L)===L){L!==0&&L===Ci&&(ou=!0),G!==null&&(G=G.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ce=e,Re=b;L=n;var ct=r;switch(Re.tag){case 1:if(ce=Re.payload,typeof ce=="function"){X=ce.call(ct,X,L);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=Re.payload,L=typeof ce=="function"?ce.call(ct,X,L):ce,L==null)break e;X=v({},X,L);break e;case 2:nr=!0}}L=b.callback,L!==null&&(e.flags|=64,P&&(e.flags|=8192),P=l.callbacks,P===null?l.callbacks=[L]:P.push(L))}else P={lane:L,tag:b.tag,payload:b.payload,callback:b.callback,next:null},G===null?(j=G=P,T=X):G=G.next=P,y|=L;if(b=b.next,b===null){if(b=l.shared.pending,b===null)break;P=b,b=P.next,P.next=null,l.lastBaseUpdate=P,l.shared.pending=null}}while(!0);G===null&&(T=X),l.baseState=T,l.firstBaseUpdate=j,l.lastBaseUpdate=G,d===null&&(l.shared.lanes=0),cr|=y,e.lanes=y,e.memoizedState=X}}function im(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function sm(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)im(r[e],n)}var Ni=C(null),Fo=C(0);function om(e,n){e=Ka,H(Fo,e),H(Ni,n),Ka=e|n.baseLanes}function lu(){H(Fo,Ka),H(Ni,Ni.current)}function cu(){Ka=Fo.current,I(Ni),I(Fo)}var kn=C(null),Qn=null;function ir(e){var n=e.alternate;H(Nt,Nt.current&1),H(kn,e),Qn===null&&(n===null||Ni.current!==null||n.memoizedState!==null)&&(Qn=e)}function uu(e){H(Nt,Nt.current),H(kn,e),Qn===null&&(Qn=e)}function lm(e){e.tag===22?(H(Nt,Nt.current),H(kn,e),Qn===null&&(Qn=e)):sr()}function sr(){H(Nt,Nt.current),H(kn,kn.current)}function An(e){I(kn),Qn===e&&(Qn=null),I(Nt)}var Nt=C(0);function Xo(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||gd(r)||yd(r)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var La=0,Le=null,ot=null,Dt=null,$o=!1,_i=!1,Zr=!1,Zo=0,ks=0,Oi=null,Gx=0;function Et(){throw Error(o(321))}function du(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!Tn(e[r],n[r]))return!1;return!0}function fu(e,n,r,s,l,d){return La=d,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,_.H=e===null||e.memoizedState===null?Gm:Au,Zr=!1,d=r(s,l),Zr=!1,_i&&(d=um(n,r,s,l)),cm(e),d}function cm(e){_.H=Ns;var n=ot!==null&&ot.next!==null;if(La=0,Dt=ot=Le=null,$o=!1,ks=0,Oi=null,n)throw Error(o(300));e===null||jt||(e=e.dependencies,e!==null&&Io(e)&&(jt=!0))}function um(e,n,r,s){Le=e;var l=0;do{if(_i&&(Oi=null),ks=0,_i=!1,25<=l)throw Error(o(301));if(l+=1,Dt=ot=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}_.H=Ym,d=n(r,s)}while(_i);return d}function Yx(){var e=_.H,n=e.useState()[0];return n=typeof n.then=="function"?As(n):n,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(Le.flags|=1024),n}function hu(){var e=Zo!==0;return Zo=0,e}function mu(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function pu(e){if($o){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}$o=!1}La=0,Dt=ot=Le=null,_i=!1,ks=Zo=0,Oi=null}function ln(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Le.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function _t(){if(ot===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var n=Dt===null?Le.memoizedState:Dt.next;if(n!==null)Dt=n,ot=e;else{if(e===null)throw Le.alternate===null?Error(o(467)):Error(o(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Dt===null?Le.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(e){var n=ks;return ks+=1,Oi===null&&(Oi=[]),e=em(Oi,e,n),n=Le,(Dt===null?n.memoizedState:Dt.next)===null&&(n=n.alternate,_.H=n===null||n.memoizedState===null?Gm:Au),e}function Wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return As(e);if(e.$$typeof===W)return Xt(e)}throw Error(o(438,String(e)))}function gu(e){var n=null,r=Le.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var s=Le.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(l){return l.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=Jo(),Le.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),s=0;s<e;s++)r[s]=Oe;return n.index++,r}function Ua(e,n){return typeof n=="function"?n(e):n}function el(e){var n=_t();return yu(n,ot,e)}function yu(e,n,r){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=r;var l=e.baseQueue,d=s.pending;if(d!==null){if(l!==null){var y=l.next;l.next=d.next,d.next=y}n.baseQueue=l=d,s.pending=null}if(d=e.baseState,l===null)e.memoizedState=d;else{n=l.next;var b=y=null,T=null,j=n,G=!1;do{var X=j.lane&-536870913;if(X!==j.lane?(Ke&X)===X:(La&X)===X){var L=j.revertLane;if(L===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),X===Ci&&(G=!0);else if((La&L)===L){j=j.next,L===Ci&&(G=!0);continue}else X={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},T===null?(b=T=X,y=d):T=T.next=X,Le.lanes|=L,cr|=L;X=j.action,Zr&&r(d,X),d=j.hasEagerState?j.eagerState:r(d,X)}else L={lane:X,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},T===null?(b=T=L,y=d):T=T.next=L,Le.lanes|=X,cr|=X;j=j.next}while(j!==null&&j!==n);if(T===null?y=d:T.next=b,!Tn(d,e.memoizedState)&&(jt=!0,G&&(r=ki,r!==null)))throw r;e.memoizedState=d,e.baseState=y,e.baseQueue=T,s.lastRenderedState=d}return l===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function vu(e){var n=_t(),r=n.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var s=r.dispatch,l=r.pending,d=n.memoizedState;if(l!==null){r.pending=null;var y=l=l.next;do d=e(d,y.action),y=y.next;while(y!==l);Tn(d,n.memoizedState)||(jt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),r.lastRenderedState=d}return[d,s]}function dm(e,n,r){var s=Le,l=_t(),d=$e;if(d){if(r===void 0)throw Error(o(407));r=r()}else r=n();var y=!Tn((ot||l).memoizedState,r);if(y&&(l.memoizedState=r,jt=!0),l=l.queue,Su(mm.bind(null,s,l,e),[e]),l.getSnapshot!==n||y||Dt!==null&&Dt.memoizedState.tag&1){if(s.flags|=2048,Mi(9,{destroy:void 0},hm.bind(null,s,l,r,n),null),ut===null)throw Error(o(349));d||(La&127)!==0||fm(s,n,r)}return r}function fm(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Le.updateQueue,n===null?(n=Jo(),Le.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function hm(e,n,r,s){n.value=r,n.getSnapshot=s,pm(n)&&gm(e)}function mm(e,n,r){return r(function(){pm(n)&&gm(e)})}function pm(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!Tn(e,r)}catch{return!0}}function gm(e){var n=Hr(e,2);n!==null&&bn(n,e,2)}function bu(e){var n=ln();if(typeof e=="function"){var r=e;if(e=r(),Zr){fn(!0);try{r()}finally{fn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:e},n}function ym(e,n,r,s){return e.baseState=r,yu(e,ot,typeof s=="function"?s:Ua)}function Vx(e,n,r,s,l){if(al(e))throw Error(o(485));if(e=n.action,e!==null){var d={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};_.T!==null?r(!0):d.isTransition=!1,s(d),r=n.pending,r===null?(d.next=n.pending=d,vm(n,d)):(d.next=r.next,n.pending=r.next=d)}}function vm(e,n){var r=n.action,s=n.payload,l=e.state;if(n.isTransition){var d=_.T,y={};_.T=y;try{var b=r(l,s),T=_.S;T!==null&&T(y,b),bm(e,n,b)}catch(j){xu(e,n,j)}finally{d!==null&&y.types!==null&&(d.types=y.types),_.T=d}}else try{d=r(l,s),bm(e,n,d)}catch(j){xu(e,n,j)}}function bm(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){xm(e,n,s)},function(s){return xu(e,n,s)}):xm(e,n,r)}function xm(e,n,r){n.status="fulfilled",n.value=r,Sm(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,vm(e,r)))}function xu(e,n,r){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=r,Sm(n),n=n.next;while(n!==s)}e.action=null}function Sm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function wm(e,n){return n}function Em(e,n){if($e){var r=ut.formState;if(r!==null){e:{var s=Le;if($e){if(mt){t:{for(var l=mt,d=Hn;l.nodeType!==8;){if(!d){l=null;break t}if(l=Kn(l.nextSibling),l===null){l=null;break t}}d=l.data,l=d==="F!"||d==="F"?l:null}if(l){mt=Kn(l.nextSibling),s=l.data==="F!";break e}}er(s)}s=!1}s&&(n=r[0])}}return r=ln(),r.memoizedState=r.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wm,lastRenderedState:n},r.queue=s,r=Hm.bind(null,Le,s),s.dispatch=r,s=bu(!1),d=ku.bind(null,Le,!1,s.queue),s=ln(),l={state:n,dispatch:null,action:e,pending:null},s.queue=l,r=Vx.bind(null,Le,l,d,r),l.dispatch=r,s.memoizedState=e,[n,r,!1]}function Tm(e){var n=_t();return Cm(n,ot,e)}function Cm(e,n,r){if(n=yu(e,n,wm)[0],e=el(Ua)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=As(n)}catch(y){throw y===Ai?Ko:y}else s=n;n=_t();var l=n.queue,d=l.dispatch;return r!==n.memoizedState&&(Le.flags|=2048,Mi(9,{destroy:void 0},Fx.bind(null,l,r),null)),[s,d,e]}function Fx(e,n){e.action=n}function km(e){var n=_t(),r=ot;if(r!==null)return Cm(n,r,e);_t(),n=n.memoizedState,r=_t();var s=r.queue.dispatch;return r.memoizedState=e,[n,s,!1]}function Mi(e,n,r,s){return e={tag:e,create:r,deps:s,inst:n,next:null},n=Le.updateQueue,n===null&&(n=Jo(),Le.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(s=r.next,r.next=e,e.next=s,n.lastEffect=e),e}function Am(){return _t().memoizedState}function tl(e,n,r,s){var l=ln();Le.flags|=e,l.memoizedState=Mi(1|n,{destroy:void 0},r,s===void 0?null:s)}function nl(e,n,r,s){var l=_t();s=s===void 0?null:s;var d=l.memoizedState.inst;ot!==null&&s!==null&&du(s,ot.memoizedState.deps)?l.memoizedState=Mi(n,d,r,s):(Le.flags|=e,l.memoizedState=Mi(1|n,d,r,s))}function Rm(e,n){tl(8390656,8,e,n)}function Su(e,n){nl(2048,8,e,n)}function Xx(e){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=Jo(),Le.updateQueue=n,n.events=[e];else{var r=n.events;r===null?n.events=[e]:r.push(e)}}function Nm(e){var n=_t().memoizedState;return Xx({ref:n,nextImpl:e}),function(){if((at&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function _m(e,n){return nl(4,2,e,n)}function Om(e,n){return nl(4,4,e,n)}function Mm(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Dm(e,n,r){r=r!=null?r.concat([e]):null,nl(4,4,Mm.bind(null,n,e),r)}function wu(){}function jm(e,n){var r=_t();n=n===void 0?null:n;var s=r.memoizedState;return n!==null&&du(n,s[1])?s[0]:(r.memoizedState=[e,n],e)}function zm(e,n){var r=_t();n=n===void 0?null:n;var s=r.memoizedState;if(n!==null&&du(n,s[1]))return s[0];if(s=e(),Zr){fn(!0);try{e()}finally{fn(!1)}}return r.memoizedState=[s,n],s}function Eu(e,n,r){return r===void 0||(La&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=n:(e.memoizedState=r,e=Lp(),Le.lanes|=e,cr|=e,r)}function Lm(e,n,r,s){return Tn(r,n)?r:Ni.current!==null?(e=Eu(e,r,s),Tn(e,n)||(jt=!0),e):(La&42)===0||(La&1073741824)!==0&&(Ke&261930)===0?(jt=!0,e.memoizedState=r):(e=Lp(),Le.lanes|=e,cr|=e,n)}function Um(e,n,r,s,l){var d=F.p;F.p=d!==0&&8>d?d:8;var y=_.T,b={};_.T=b,ku(e,!1,n,r);try{var T=l(),j=_.S;if(j!==null&&j(b,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var G=Kx(T,s);Rs(e,n,G,_n(e))}else Rs(e,n,s,_n(e))}catch(X){Rs(e,n,{then:function(){},status:"rejected",reason:X},_n())}finally{F.p=d,y!==null&&b.types!==null&&(y.types=b.types),_.T=y}}function $x(){}function Tu(e,n,r,s){if(e.tag!==5)throw Error(o(476));var l=Bm(e).queue;Um(e,l,n,Q,r===null?$x:function(){return qm(e),r(s)})}function Bm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:Q},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function qm(e){var n=Bm(e);n.next===null&&(n=e.alternate.memoizedState),Rs(e,n.next.queue,{},_n())}function Cu(){return Xt(Gs)}function Pm(){return _t().memoizedState}function Im(){return _t().memoizedState}function Zx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=_n();e=ar(r);var s=rr(n,e,r);s!==null&&(bn(s,n,r),Es(s,n,r)),n={cache:eu()},e.payload=n;return}n=n.return}}function Jx(e,n,r){var s=_n();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},al(e)?Qm(n,r):(r=Qc(e,n,r,s),r!==null&&(bn(r,e,s),Km(r,n,s)))}function Hm(e,n,r){var s=_n();Rs(e,n,r,s)}function Rs(e,n,r,s){var l={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(al(e))Qm(n,l);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var y=n.lastRenderedState,b=d(y,r);if(l.hasEagerState=!0,l.eagerState=b,Tn(b,y))return Uo(e,n,l,0),ut===null&&Lo(),!1}catch{}if(r=Qc(e,n,l,s),r!==null)return bn(r,e,s),Km(r,n,s),!0}return!1}function ku(e,n,r,s){if(s={lane:2,revertLane:rd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},al(e)){if(n)throw Error(o(479))}else n=Qc(e,r,s,2),n!==null&&bn(n,e,2)}function al(e){var n=e.alternate;return e===Le||n!==null&&n===Le}function Qm(e,n){_i=$o=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function Km(e,n,r){if((r&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,r|=s,n.lanes=r,E(e,r)}}var Ns={readContext:Xt,use:Wo,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};Ns.useEffectEvent=Et;var Gm={readContext:Xt,use:Wo,useCallback:function(e,n){return ln().memoizedState=[e,n===void 0?null:n],e},useContext:Xt,useEffect:Rm,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,tl(4194308,4,Mm.bind(null,n,e),r)},useLayoutEffect:function(e,n){return tl(4194308,4,e,n)},useInsertionEffect:function(e,n){tl(4,2,e,n)},useMemo:function(e,n){var r=ln();n=n===void 0?null:n;var s=e();if(Zr){fn(!0);try{e()}finally{fn(!1)}}return r.memoizedState=[s,n],s},useReducer:function(e,n,r){var s=ln();if(r!==void 0){var l=r(n);if(Zr){fn(!0);try{r(n)}finally{fn(!1)}}}else l=n;return s.memoizedState=s.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},s.queue=e,e=e.dispatch=Jx.bind(null,Le,e),[s.memoizedState,e]},useRef:function(e){var n=ln();return e={current:e},n.memoizedState=e},useState:function(e){e=bu(e);var n=e.queue,r=Hm.bind(null,Le,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:wu,useDeferredValue:function(e,n){var r=ln();return Eu(r,e,n)},useTransition:function(){var e=bu(!1);return e=Um.bind(null,Le,e.queue,!0,!1),ln().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var s=Le,l=ln();if($e){if(r===void 0)throw Error(o(407));r=r()}else{if(r=n(),ut===null)throw Error(o(349));(Ke&127)!==0||fm(s,n,r)}l.memoizedState=r;var d={value:r,getSnapshot:n};return l.queue=d,Rm(mm.bind(null,s,d,e),[e]),s.flags|=2048,Mi(9,{destroy:void 0},hm.bind(null,s,d,r,n),null),r},useId:function(){var e=ln(),n=ut.identifierPrefix;if($e){var r=ma,s=ha;r=(s&~(1<<32-Bt(s)-1)).toString(32)+r,n="_"+n+"R_"+r,r=Zo++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=Gx++,n="_"+n+"r_"+r.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Cu,useFormState:Em,useActionState:Em,useOptimistic:function(e){var n=ln();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=ku.bind(null,Le,!0,r),r.dispatch=n,[e,n]},useMemoCache:gu,useCacheRefresh:function(){return ln().memoizedState=Zx.bind(null,Le)},useEffectEvent:function(e){var n=ln(),r={impl:e};return n.memoizedState=r,function(){if((at&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Au={readContext:Xt,use:Wo,useCallback:jm,useContext:Xt,useEffect:Su,useImperativeHandle:Dm,useInsertionEffect:_m,useLayoutEffect:Om,useMemo:zm,useReducer:el,useRef:Am,useState:function(){return el(Ua)},useDebugValue:wu,useDeferredValue:function(e,n){var r=_t();return Lm(r,ot.memoizedState,e,n)},useTransition:function(){var e=el(Ua)[0],n=_t().memoizedState;return[typeof e=="boolean"?e:As(e),n]},useSyncExternalStore:dm,useId:Pm,useHostTransitionStatus:Cu,useFormState:Tm,useActionState:Tm,useOptimistic:function(e,n){var r=_t();return ym(r,ot,e,n)},useMemoCache:gu,useCacheRefresh:Im};Au.useEffectEvent=Nm;var Ym={readContext:Xt,use:Wo,useCallback:jm,useContext:Xt,useEffect:Su,useImperativeHandle:Dm,useInsertionEffect:_m,useLayoutEffect:Om,useMemo:zm,useReducer:vu,useRef:Am,useState:function(){return vu(Ua)},useDebugValue:wu,useDeferredValue:function(e,n){var r=_t();return ot===null?Eu(r,e,n):Lm(r,ot.memoizedState,e,n)},useTransition:function(){var e=vu(Ua)[0],n=_t().memoizedState;return[typeof e=="boolean"?e:As(e),n]},useSyncExternalStore:dm,useId:Pm,useHostTransitionStatus:Cu,useFormState:km,useActionState:km,useOptimistic:function(e,n){var r=_t();return ot!==null?ym(r,ot,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:gu,useCacheRefresh:Im};Ym.useEffectEvent=Nm;function Ru(e,n,r,s){n=e.memoizedState,r=r(s,n),r=r==null?n:v({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Nu={enqueueSetState:function(e,n,r){e=e._reactInternals;var s=_n(),l=ar(s);l.payload=n,r!=null&&(l.callback=r),n=rr(e,l,s),n!==null&&(bn(n,e,s),Es(n,e,s))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var s=_n(),l=ar(s);l.tag=1,l.payload=n,r!=null&&(l.callback=r),n=rr(e,l,s),n!==null&&(bn(n,e,s),Es(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=_n(),s=ar(r);s.tag=2,n!=null&&(s.callback=n),n=rr(e,s,r),n!==null&&(bn(n,e,r),Es(n,e,r))}};function Vm(e,n,r,s,l,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,y):n.prototype&&n.prototype.isPureReactComponent?!ps(r,s)||!ps(l,d):!0}function Fm(e,n,r,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,s),n.state!==e&&Nu.enqueueReplaceState(n,n.state,null)}function Jr(e,n){var r=n;if("ref"in n){r={};for(var s in n)s!=="ref"&&(r[s]=n[s])}if(e=e.defaultProps){r===n&&(r=v({},r));for(var l in e)r[l]===void 0&&(r[l]=e[l])}return r}function Xm(e){zo(e)}function $m(e){console.error(e)}function Zm(e){zo(e)}function rl(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Jm(e,n,r){try{var s=e.onCaughtError;s(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function _u(e,n,r){return r=ar(r),r.tag=3,r.payload={element:null},r.callback=function(){rl(e,n)},r}function Wm(e){return e=ar(e),e.tag=3,e}function ep(e,n,r,s){var l=r.type.getDerivedStateFromError;if(typeof l=="function"){var d=s.value;e.payload=function(){return l(d)},e.callback=function(){Jm(n,r,s)}}var y=r.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Jm(n,r,s),typeof l!="function"&&(ur===null?ur=new Set([this]):ur.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Wx(e,n,r,s,l){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=r.alternate,n!==null&&Ti(n,r,l,!0),r=kn.current,r!==null){switch(r.tag){case 31:case 13:return Qn===null?gl():r.alternate===null&&Tt===0&&(Tt=3),r.flags&=-257,r.flags|=65536,r.lanes=l,s===Go?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([s]):n.add(s),td(e,s,l)),!1;case 22:return r.flags|=65536,s===Go?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([s]):r.add(s)),td(e,s,l)),!1}throw Error(o(435,r.tag))}return td(e,s,l),gl(),!1}if($e)return n=kn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=l,s!==Xc&&(e=Error(o(422),{cause:s}),vs(qn(e,r)))):(s!==Xc&&(n=Error(o(423),{cause:s}),vs(qn(n,r))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,s=qn(s,r),l=_u(e.stateNode,s,l),su(e,l),Tt!==4&&(Tt=2)),!1;var d=Error(o(520),{cause:s});if(d=qn(d,r),Us===null?Us=[d]:Us.push(d),Tt!==4&&(Tt=2),n===null)return!0;s=qn(s,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=l&-l,r.lanes|=e,e=_u(r.stateNode,s,e),su(r,e),!1;case 1:if(n=r.type,d=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ur===null||!ur.has(d))))return r.flags|=65536,l&=-l,r.lanes|=l,l=Wm(l),ep(l,e,r,s),su(r,l),!1}r=r.return}while(r!==null);return!1}var Ou=Error(o(461)),jt=!1;function $t(e,n,r,s){n.child=e===null?rm(n,null,r,s):$r(n,e.child,r,s)}function tp(e,n,r,s,l){r=r.render;var d=n.ref;if("ref"in s){var y={};for(var b in s)b!=="ref"&&(y[b]=s[b])}else y=s;return Yr(n),s=fu(e,n,r,y,d,l),b=hu(),e!==null&&!jt?(mu(e,n,l),Ba(e,n,l)):($e&&b&&Vc(n),n.flags|=1,$t(e,n,s,l),n.child)}function np(e,n,r,s,l){if(e===null){var d=r.type;return typeof d=="function"&&!Kc(d)&&d.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=d,ap(e,n,d,s,l)):(e=qo(r.type,null,s,n,n.mode,l),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!qu(e,l)){var y=d.memoizedProps;if(r=r.compare,r=r!==null?r:ps,r(y,s)&&e.ref===n.ref)return Ba(e,n,l)}return n.flags|=1,e=Ma(d,s),e.ref=n.ref,e.return=n,n.child=e}function ap(e,n,r,s,l){if(e!==null){var d=e.memoizedProps;if(ps(d,s)&&e.ref===n.ref)if(jt=!1,n.pendingProps=s=d,qu(e,l))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,Ba(e,n,l)}return Mu(e,n,r,s,l)}function rp(e,n,r,s){var l=s.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|r:r,e!==null){for(s=n.child=e.child,l=0;s!==null;)l=l|s.lanes|s.childLanes,s=s.sibling;s=l&~d}else s=0,n.child=null;return ip(e,n,d,r,s)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qo(n,d!==null?d.cachePool:null),d!==null?om(n,d):lu(),lm(n);else return s=n.lanes=536870912,ip(e,n,d!==null?d.baseLanes|r:r,r,s)}else d!==null?(Qo(n,d.cachePool),om(n,d),sr(),n.memoizedState=null):(e!==null&&Qo(n,null),lu(),sr());return $t(e,n,l,r),n.child}function _s(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ip(e,n,r,s,l){var d=nu();return d=d===null?null:{parent:Mt._currentValue,pool:d},n.memoizedState={baseLanes:r,cachePool:d},e!==null&&Qo(n,null),lu(),lm(n),e!==null&&Ti(e,n,s,!0),n.childLanes=l,null}function il(e,n){return n=ol({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function sp(e,n,r){return $r(n,e.child,null,r),e=il(n,n.pendingProps),e.flags|=2,An(n),n.memoizedState=null,e}function e1(e,n,r){var s=n.pendingProps,l=(n.flags&128)!==0;if(n.flags&=-129,e===null){if($e){if(s.mode==="hidden")return e=il(n,s),n.lanes=536870912,_s(null,e);if(uu(n),(e=mt)?(e=vg(e,Hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},r=Qh(e),r.return=n,n.child=r,Ft=n,mt=null)):e=null,e===null)throw er(n);return n.lanes=536870912,null}return il(n,s)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(uu(n),l)if(n.flags&256)n.flags&=-257,n=sp(e,n,r);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(o(558));else if(jt||Ti(e,n,r,!1),l=(r&e.childLanes)!==0,jt||l){if(s=ut,s!==null&&(y=N(s,r),y!==0&&y!==d.retryLane))throw d.retryLane=y,Hr(e,y),bn(s,e,y),Ou;gl(),n=sp(e,n,r)}else e=d.treeContext,mt=Kn(y.nextSibling),Ft=n,$e=!0,Wa=null,Hn=!1,e!==null&&Yh(n,e),n=il(n,s),n.flags|=4096;return n}return e=Ma(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function sl(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function Mu(e,n,r,s,l){return Yr(n),r=fu(e,n,r,s,void 0,l),s=hu(),e!==null&&!jt?(mu(e,n,l),Ba(e,n,l)):($e&&s&&Vc(n),n.flags|=1,$t(e,n,r,l),n.child)}function op(e,n,r,s,l,d){return Yr(n),n.updateQueue=null,r=um(n,s,r,l),cm(e),s=hu(),e!==null&&!jt?(mu(e,n,d),Ba(e,n,d)):($e&&s&&Vc(n),n.flags|=1,$t(e,n,r,d),n.child)}function lp(e,n,r,s,l){if(Yr(n),n.stateNode===null){var d=xi,y=r.contextType;typeof y=="object"&&y!==null&&(d=Xt(y)),d=new r(s,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Nu,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=s,d.state=n.memoizedState,d.refs={},ru(n),y=r.contextType,d.context=typeof y=="object"&&y!==null?Xt(y):xi,d.state=n.memoizedState,y=r.getDerivedStateFromProps,typeof y=="function"&&(Ru(n,r,y,s),d.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&Nu.enqueueReplaceState(d,d.state,null),Cs(n,s,d,l),Ts(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){d=n.stateNode;var b=n.memoizedProps,T=Jr(r,b);d.props=T;var j=d.context,G=r.contextType;y=xi,typeof G=="object"&&G!==null&&(y=Xt(G));var X=r.getDerivedStateFromProps;G=typeof X=="function"||typeof d.getSnapshotBeforeUpdate=="function",b=n.pendingProps!==b,G||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b||j!==y)&&Fm(n,d,s,y),nr=!1;var L=n.memoizedState;d.state=L,Cs(n,s,d,l),Ts(),j=n.memoizedState,b||L!==j||nr?(typeof X=="function"&&(Ru(n,r,X,s),j=n.memoizedState),(T=nr||Vm(n,r,T,s,L,j,y))?(G||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=j),d.props=s,d.state=j,d.context=y,s=T):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{d=n.stateNode,iu(e,n),y=n.memoizedProps,G=Jr(r,y),d.props=G,X=n.pendingProps,L=d.context,j=r.contextType,T=xi,typeof j=="object"&&j!==null&&(T=Xt(j)),b=r.getDerivedStateFromProps,(j=typeof b=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==X||L!==T)&&Fm(n,d,s,T),nr=!1,L=n.memoizedState,d.state=L,Cs(n,s,d,l),Ts();var P=n.memoizedState;y!==X||L!==P||nr||e!==null&&e.dependencies!==null&&Io(e.dependencies)?(typeof b=="function"&&(Ru(n,r,b,s),P=n.memoizedState),(G=nr||Vm(n,r,G,s,L,P,T)||e!==null&&e.dependencies!==null&&Io(e.dependencies))?(j||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,P,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,P,T)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=P),d.props=s,d.state=P,d.context=T,s=G):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(n.flags|=1024),s=!1)}return d=s,sl(e,n),s=(n.flags&128)!==0,d||s?(d=n.stateNode,r=s&&typeof r.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&s?(n.child=$r(n,e.child,null,l),n.child=$r(n,null,r,l)):$t(e,n,r,l),n.memoizedState=d.state,e=n.child):e=Ba(e,n,l),e}function cp(e,n,r,s){return Kr(),n.flags|=256,$t(e,n,r,s),n.child}var Du={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ju(e){return{baseLanes:e,cachePool:Jh()}}function zu(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=Nn),e}function up(e,n,r){var s=n.pendingProps,l=!1,d=(n.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(Nt.current&2)!==0),y&&(l=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if($e){if(l?ir(n):sr(),(e=mt)?(e=vg(e,Hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},r=Qh(e),r.return=n,n.child=r,Ft=n,mt=null)):e=null,e===null)throw er(n);return yd(e)?n.lanes=32:n.lanes=536870912,null}var b=s.children;return s=s.fallback,l?(sr(),l=n.mode,b=ol({mode:"hidden",children:b},l),s=Qr(s,l,r,null),b.return=n,s.return=n,b.sibling=s,n.child=b,s=n.child,s.memoizedState=ju(r),s.childLanes=zu(e,y,r),n.memoizedState=Du,_s(null,s)):(ir(n),Lu(n,b))}var T=e.memoizedState;if(T!==null&&(b=T.dehydrated,b!==null)){if(d)n.flags&256?(ir(n),n.flags&=-257,n=Uu(e,n,r)):n.memoizedState!==null?(sr(),n.child=e.child,n.flags|=128,n=null):(sr(),b=s.fallback,l=n.mode,s=ol({mode:"visible",children:s.children},l),b=Qr(b,l,r,null),b.flags|=2,s.return=n,b.return=n,s.sibling=b,n.child=s,$r(n,e.child,null,r),s=n.child,s.memoizedState=ju(r),s.childLanes=zu(e,y,r),n.memoizedState=Du,n=_s(null,s));else if(ir(n),yd(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var j=y.dgst;y=j,s=Error(o(419)),s.stack="",s.digest=y,vs({value:s,source:null,stack:null}),n=Uu(e,n,r)}else if(jt||Ti(e,n,r,!1),y=(r&e.childLanes)!==0,jt||y){if(y=ut,y!==null&&(s=N(y,r),s!==0&&s!==T.retryLane))throw T.retryLane=s,Hr(e,s),bn(y,e,s),Ou;gd(b)||gl(),n=Uu(e,n,r)}else gd(b)?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,mt=Kn(b.nextSibling),Ft=n,$e=!0,Wa=null,Hn=!1,e!==null&&Yh(n,e),n=Lu(n,s.children),n.flags|=4096);return n}return l?(sr(),b=s.fallback,l=n.mode,T=e.child,j=T.sibling,s=Ma(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,j!==null?b=Ma(j,b):(b=Qr(b,l,r,null),b.flags|=2),b.return=n,s.return=n,s.sibling=b,n.child=s,_s(null,s),s=n.child,b=e.child.memoizedState,b===null?b=ju(r):(l=b.cachePool,l!==null?(T=Mt._currentValue,l=l.parent!==T?{parent:T,pool:T}:l):l=Jh(),b={baseLanes:b.baseLanes|r,cachePool:l}),s.memoizedState=b,s.childLanes=zu(e,y,r),n.memoizedState=Du,_s(e.child,s)):(ir(n),r=e.child,e=r.sibling,r=Ma(r,{mode:"visible",children:s.children}),r.return=n,r.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=r,n.memoizedState=null,r)}function Lu(e,n){return n=ol({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function ol(e,n){return e=Cn(22,e,null,n),e.lanes=0,e}function Uu(e,n,r){return $r(n,e.child,null,r),e=Lu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function dp(e,n,r){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Jc(e.return,n,r)}function Bu(e,n,r,s,l,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:l,treeForkCount:d}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=r,y.tailMode=l,y.treeForkCount=d)}function fp(e,n,r){var s=n.pendingProps,l=s.revealOrder,d=s.tail;s=s.children;var y=Nt.current,b=(y&2)!==0;if(b?(y=y&1|2,n.flags|=128):y&=1,H(Nt,y),$t(e,n,s,r),s=$e?ys:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dp(e,r,n);else if(e.tag===19)dp(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(r=n.child,l=null;r!==null;)e=r.alternate,e!==null&&Xo(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=n.child,n.child=null):(l=r.sibling,r.sibling=null),Bu(n,!1,l,r,d,s);break;case"backwards":case"unstable_legacy-backwards":for(r=null,l=n.child,n.child=null;l!==null;){if(e=l.alternate,e!==null&&Xo(e)===null){n.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}Bu(n,!0,r,null,d,s);break;case"together":Bu(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function Ba(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),cr|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(Ti(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,r=Ma(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=Ma(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function qu(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Io(e)))}function t1(e,n,r){switch(n.tag){case 3:ke(n,n.stateNode.containerInfo),tr(n,Mt,e.memoizedState.cache),Kr();break;case 27:case 5:Kt(n);break;case 4:ke(n,n.stateNode.containerInfo);break;case 10:tr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,uu(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(ir(n),n.flags|=128,null):(r&n.child.childLanes)!==0?up(e,n,r):(ir(n),e=Ba(e,n,r),e!==null?e.sibling:null);ir(n);break;case 19:var l=(e.flags&128)!==0;if(s=(r&n.childLanes)!==0,s||(Ti(e,n,r,!1),s=(r&n.childLanes)!==0),l){if(s)return fp(e,n,r);n.flags|=128}if(l=n.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),H(Nt,Nt.current),s)break;return null;case 22:return n.lanes=0,rp(e,n,r,n.pendingProps);case 24:tr(n,Mt,e.memoizedState.cache)}return Ba(e,n,r)}function hp(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!qu(e,r)&&(n.flags&128)===0)return jt=!1,t1(e,n,r);jt=(e.flags&131072)!==0}else jt=!1,$e&&(n.flags&1048576)!==0&&Gh(n,ys,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=Fr(n.elementType),n.type=e,typeof e=="function")Kc(e)?(s=Jr(e,s),n.tag=1,n=lp(null,n,e,s,r)):(n.tag=0,n=Mu(null,n,e,s,r));else{if(e!=null){var l=e.$$typeof;if(l===me){n.tag=11,n=tp(null,n,e,s,r);break e}else if(l===R){n.tag=14,n=np(null,n,e,s,r);break e}}throw n=Be(e)||e,Error(o(306,n,""))}}return n;case 0:return Mu(e,n,n.type,n.pendingProps,r);case 1:return s=n.type,l=Jr(s,n.pendingProps),lp(e,n,s,l,r);case 3:e:{if(ke(n,n.stateNode.containerInfo),e===null)throw Error(o(387));s=n.pendingProps;var d=n.memoizedState;l=d.element,iu(e,n),Cs(n,s,null,r);var y=n.memoizedState;if(s=y.cache,tr(n,Mt,s),s!==d.cache&&Wc(n,[Mt],r,!0),Ts(),s=y.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=cp(e,n,s,r);break e}else if(s!==l){l=qn(Error(o(424)),n),vs(l),n=cp(e,n,s,r);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,mt=Kn(e.firstChild),Ft=n,$e=!0,Wa=null,Hn=!0,r=rm(n,null,s,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Kr(),s===l){n=Ba(e,n,r);break e}$t(e,n,s,r)}n=n.child}return n;case 26:return sl(e,n),e===null?(r=Tg(n.type,null,n.pendingProps,null))?n.memoizedState=r:$e||(r=n.type,e=n.pendingProps,s=El(J.current).createElement(r),s[se]=n,s[le]=e,Zt(s,r,e),yt(s),n.stateNode=s):n.memoizedState=Tg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Kt(n),e===null&&$e&&(s=n.stateNode=Sg(n.type,n.pendingProps,J.current),Ft=n,Hn=!0,l=mt,mr(n.type)?(vd=l,mt=Kn(s.firstChild)):mt=l),$t(e,n,n.pendingProps.children,r),sl(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&$e&&((l=s=mt)&&(s=O1(s,n.type,n.pendingProps,Hn),s!==null?(n.stateNode=s,Ft=n,mt=Kn(s.firstChild),Hn=!1,l=!0):l=!1),l||er(n)),Kt(n),l=n.type,d=n.pendingProps,y=e!==null?e.memoizedProps:null,s=d.children,hd(l,d)?s=null:y!==null&&hd(l,y)&&(n.flags|=32),n.memoizedState!==null&&(l=fu(e,n,Yx,null,null,r),Gs._currentValue=l),sl(e,n),$t(e,n,s,r),n.child;case 6:return e===null&&$e&&((e=r=mt)&&(r=M1(r,n.pendingProps,Hn),r!==null?(n.stateNode=r,Ft=n,mt=null,e=!0):e=!1),e||er(n)),null;case 13:return up(e,n,r);case 4:return ke(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=$r(n,null,s,r):$t(e,n,s,r),n.child;case 11:return tp(e,n,n.type,n.pendingProps,r);case 7:return $t(e,n,n.pendingProps,r),n.child;case 8:return $t(e,n,n.pendingProps.children,r),n.child;case 12:return $t(e,n,n.pendingProps.children,r),n.child;case 10:return s=n.pendingProps,tr(n,n.type,s.value),$t(e,n,s.children,r),n.child;case 9:return l=n.type._context,s=n.pendingProps.children,Yr(n),l=Xt(l),s=s(l),n.flags|=1,$t(e,n,s,r),n.child;case 14:return np(e,n,n.type,n.pendingProps,r);case 15:return ap(e,n,n.type,n.pendingProps,r);case 19:return fp(e,n,r);case 31:return e1(e,n,r);case 22:return rp(e,n,r,n.pendingProps);case 24:return Yr(n),s=Xt(Mt),e===null?(l=nu(),l===null&&(l=ut,d=eu(),l.pooledCache=d,d.refCount++,d!==null&&(l.pooledCacheLanes|=r),l=d),n.memoizedState={parent:s,cache:l},ru(n),tr(n,Mt,l)):((e.lanes&r)!==0&&(iu(e,n),Cs(n,null,null,r),Ts()),l=e.memoizedState,d=n.memoizedState,l.parent!==s?(l={parent:s,cache:s},n.memoizedState=l,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=l),tr(n,Mt,s)):(s=d.cache,tr(n,Mt,s),s!==l.cache&&Wc(n,[Mt],r,!0))),$t(e,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function qa(e){e.flags|=4}function Pu(e,n,r,s,l){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Pp())e.flags|=8192;else throw Xr=Go,au}else e.flags&=-16777217}function mp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ng(n))if(Pp())e.flags|=8192;else throw Xr=Go,au}function ll(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?At():536870912,e.lanes|=n,Li|=n)}function Os(e,n){if(!$e)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function pt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,s=0;if(n)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,s|=l.subtreeFlags&65011712,s|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=r,n}function n1(e,n,r){var s=n.pendingProps;switch(Fc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(n),null;case 1:return pt(n),null;case 3:return r=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),za(Mt),Pe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ei(n)?qa(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,$c())),pt(n),null;case 26:var l=n.type,d=n.memoizedState;return e===null?(qa(n),d!==null?(pt(n),mp(n,d)):(pt(n),Pu(n,l,null,s,r))):d?d!==e.memoizedState?(qa(n),pt(n),mp(n,d)):(pt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&qa(n),pt(n),Pu(n,l,e,s,r)),null;case 27:if(sn(n),r=J.current,l=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&qa(n);else{if(!s){if(n.stateNode===null)throw Error(o(166));return pt(n),null}e=$.current,Ei(n)?Vh(n):(e=Sg(l,s,r),n.stateNode=e,qa(n))}return pt(n),null;case 5:if(sn(n),l=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&qa(n);else{if(!s){if(n.stateNode===null)throw Error(o(166));return pt(n),null}if(d=$.current,Ei(n))Vh(n);else{var y=El(J.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?y.createElement(l,{is:s.is}):y.createElement(l)}}d[se]=n,d[le]=s;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=d;e:switch(Zt(d,l,s),l){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&qa(n)}}return pt(n),Pu(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,r),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&qa(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(o(166));if(e=J.current,Ei(n)){if(e=n.stateNode,r=n.memoizedProps,s=null,l=Ft,l!==null)switch(l.tag){case 27:case 5:s=l.memoizedProps}e[se]=n,e=!!(e.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||ug(e.nodeValue,r)),e||er(n,!0)}else e=El(e).createTextNode(s),e[se]=n,n.stateNode=e}return pt(n),null;case 31:if(r=n.memoizedState,e===null||e.memoizedState!==null){if(s=Ei(n),r!==null){if(e===null){if(!s)throw Error(o(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[se]=n}else Kr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pt(n),e=!1}else r=$c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return n.flags&256?(An(n),n):(An(n),null);if((n.flags&128)!==0)throw Error(o(558))}return pt(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Ei(n),s!==null&&s.dehydrated!==null){if(e===null){if(!l)throw Error(o(318));if(l=n.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));l[se]=n}else Kr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pt(n),l=!1}else l=$c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return n.flags&256?(An(n),n):(An(n),null)}return An(n),(n.flags&128)!==0?(n.lanes=r,n):(r=s!==null,e=e!==null&&e.memoizedState!==null,r&&(s=n.child,l=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(l=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==l&&(s.flags|=2048)),r!==e&&r&&(n.child.flags|=8192),ll(n,n.updateQueue),pt(n),null);case 4:return Pe(),e===null&&ld(n.stateNode.containerInfo),pt(n),null;case 10:return za(n.type),pt(n),null;case 19:if(I(Nt),s=n.memoizedState,s===null)return pt(n),null;if(l=(n.flags&128)!==0,d=s.rendering,d===null)if(l)Os(s,!1);else{if(Tt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Xo(e),d!==null){for(n.flags|=128,Os(s,!1),e=d.updateQueue,n.updateQueue=e,ll(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)Hh(r,e),r=r.sibling;return H(Nt,Nt.current&1|2),$e&&Da(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&bt()>hl&&(n.flags|=128,l=!0,Os(s,!1),n.lanes=4194304)}else{if(!l)if(e=Xo(d),e!==null){if(n.flags|=128,l=!0,e=e.updateQueue,n.updateQueue=e,ll(n,e),Os(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!$e)return pt(n),null}else 2*bt()-s.renderingStartTime>hl&&r!==536870912&&(n.flags|=128,l=!0,Os(s,!1),n.lanes=4194304);s.isBackwards?(d.sibling=n.child,n.child=d):(e=s.last,e!==null?e.sibling=d:n.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=bt(),e.sibling=null,r=Nt.current,H(Nt,l?r&1|2:r&1),$e&&Da(n,s.treeForkCount),e):(pt(n),null);case 22:case 23:return An(n),cu(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(r&536870912)!==0&&(n.flags&128)===0&&(pt(n),n.subtreeFlags&6&&(n.flags|=8192)):pt(n),r=n.updateQueue,r!==null&&ll(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==r&&(n.flags|=2048),e!==null&&I(Vr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),za(Mt),pt(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function a1(e,n){switch(Fc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return za(Mt),Pe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return sn(n),null;case 31:if(n.memoizedState!==null){if(An(n),n.alternate===null)throw Error(o(340));Kr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(An(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Kr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return I(Nt),null;case 4:return Pe(),null;case 10:return za(n.type),null;case 22:case 23:return An(n),cu(),e!==null&&I(Vr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return za(Mt),null;case 25:return null;default:return null}}function pp(e,n){switch(Fc(n),n.tag){case 3:za(Mt),Pe();break;case 26:case 27:case 5:sn(n);break;case 4:Pe();break;case 31:n.memoizedState!==null&&An(n);break;case 13:An(n);break;case 19:I(Nt);break;case 10:za(n.type);break;case 22:case 23:An(n),cu(),e!==null&&I(Vr);break;case 24:za(Mt)}}function Ms(e,n){try{var r=n.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var l=s.next;r=l;do{if((r.tag&e)===e){s=void 0;var d=r.create,y=r.inst;s=d(),y.destroy=s}r=r.next}while(r!==l)}}catch(b){st(n,n.return,b)}}function or(e,n,r){try{var s=n.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var d=l.next;s=d;do{if((s.tag&e)===e){var y=s.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,l=n;var T=r,j=b;try{j()}catch(G){st(l,T,G)}}}s=s.next}while(s!==d)}}catch(G){st(n,n.return,G)}}function gp(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{sm(n,r)}catch(s){st(e,e.return,s)}}}function yp(e,n,r){r.props=Jr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(s){st(e,n,s)}}function Ds(e,n){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof r=="function"?e.refCleanup=r(s):r.current=s}}catch(l){st(e,n,l)}}function pa(e,n){var r=e.ref,s=e.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(l){st(e,n,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(l){st(e,n,l)}else r.current=null}function vp(e){var n=e.type,r=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&s.focus();break e;case"img":r.src?s.src=r.src:r.srcSet&&(s.srcset=r.srcSet)}}catch(l){st(e,e.return,l)}}function Iu(e,n,r){try{var s=e.stateNode;C1(s,e.type,r,n),s[le]=n}catch(l){st(e,e.return,l)}}function bp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mr(e.type)||e.tag===4}function Hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&mr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qu(e,n,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(e),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=_a));else if(s!==4&&(s===27&&mr(e.type)&&(r=e.stateNode,n=null),e=e.child,e!==null))for(Qu(e,n,r),e=e.sibling;e!==null;)Qu(e,n,r),e=e.sibling}function cl(e,n,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(s!==4&&(s===27&&mr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(cl(e,n,r),e=e.sibling;e!==null;)cl(e,n,r),e=e.sibling}function xp(e){var n=e.stateNode,r=e.memoizedProps;try{for(var s=e.type,l=n.attributes;l.length;)n.removeAttributeNode(l[0]);Zt(n,s,r),n[se]=e,n[le]=r}catch(d){st(e,e.return,d)}}var Pa=!1,zt=!1,Ku=!1,Sp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function r1(e,n){if(e=e.containerInfo,dd=_l,e=Dh(e),Uc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var l=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var y=0,b=-1,T=-1,j=0,G=0,X=e,L=null;t:for(;;){for(var P;X!==r||l!==0&&X.nodeType!==3||(b=y+l),X!==d||s!==0&&X.nodeType!==3||(T=y+s),X.nodeType===3&&(y+=X.nodeValue.length),(P=X.firstChild)!==null;)L=X,X=P;for(;;){if(X===e)break t;if(L===r&&++j===l&&(b=y),L===d&&++G===s&&(T=y),(P=X.nextSibling)!==null)break;X=L,L=X.parentNode}X=P}r=b===-1||T===-1?null:{start:b,end:T}}else r=null}r=r||{start:0,end:0}}else r=null;for(fd={focusedElem:e,selectionRange:r},_l=!1,Ht=n;Ht!==null;)if(n=Ht,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ht=e;else for(;Ht!==null;){switch(n=Ht,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)l=e[r],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,r=n,l=d.memoizedProps,d=d.memoizedState,s=r.stateNode;try{var ce=Jr(r.type,l);e=s.getSnapshotBeforeUpdate(ce,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(Re){st(r,r.return,Re)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,r=e.nodeType,r===9)pd(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=n.sibling,e!==null){e.return=n.return,Ht=e;break}Ht=n.return}}function wp(e,n,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:Ha(e,r),s&4&&Ms(5,r);break;case 1:if(Ha(e,r),s&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(y){st(r,r.return,y)}else{var l=Jr(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(l,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){st(r,r.return,y)}}s&64&&gp(r),s&512&&Ds(r,r.return);break;case 3:if(Ha(e,r),s&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{sm(e,n)}catch(y){st(r,r.return,y)}}break;case 27:n===null&&s&4&&xp(r);case 26:case 5:Ha(e,r),n===null&&s&4&&vp(r),s&512&&Ds(r,r.return);break;case 12:Ha(e,r);break;case 31:Ha(e,r),s&4&&Cp(e,r);break;case 13:Ha(e,r),s&4&&kp(e,r),s&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=h1.bind(null,r),D1(e,r))));break;case 22:if(s=r.memoizedState!==null||Pa,!s){n=n!==null&&n.memoizedState!==null||zt,l=Pa;var d=zt;Pa=s,(zt=n)&&!d?Qa(e,r,(r.subtreeFlags&8772)!==0):Ha(e,r),Pa=l,zt=d}break;case 30:break;default:Ha(e,r)}}function Ep(e){var n=e.alternate;n!==null&&(e.alternate=null,Ep(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&St(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,pn=!1;function Ia(e,n,r){for(r=r.child;r!==null;)Tp(e,n,r),r=r.sibling}function Tp(e,n,r){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(ka,r)}catch{}switch(r.tag){case 26:zt||pa(r,n),Ia(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:zt||pa(r,n);var s=vt,l=pn;mr(r.type)&&(vt=r.stateNode,pn=!1),Ia(e,n,r),Hs(r.stateNode),vt=s,pn=l;break;case 5:zt||pa(r,n);case 6:if(s=vt,l=pn,vt=null,Ia(e,n,r),vt=s,pn=l,vt!==null)if(pn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(r.stateNode)}catch(d){st(r,n,d)}else try{vt.removeChild(r.stateNode)}catch(d){st(r,n,d)}break;case 18:vt!==null&&(pn?(e=vt,gg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Ki(e)):gg(vt,r.stateNode));break;case 4:s=vt,l=pn,vt=r.stateNode.containerInfo,pn=!0,Ia(e,n,r),vt=s,pn=l;break;case 0:case 11:case 14:case 15:or(2,r,n),zt||or(4,r,n),Ia(e,n,r);break;case 1:zt||(pa(r,n),s=r.stateNode,typeof s.componentWillUnmount=="function"&&yp(r,n,s)),Ia(e,n,r);break;case 21:Ia(e,n,r);break;case 22:zt=(s=zt)||r.memoizedState!==null,Ia(e,n,r),zt=s;break;default:Ia(e,n,r)}}function Cp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ki(e)}catch(r){st(n,n.return,r)}}}function kp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ki(e)}catch(r){st(n,n.return,r)}}function i1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Sp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Sp),n;default:throw Error(o(435,e.tag))}}function ul(e,n){var r=i1(e);n.forEach(function(s){if(!r.has(s)){r.add(s);var l=m1.bind(null,e,s);s.then(l,l)}})}function gn(e,n){var r=n.deletions;if(r!==null)for(var s=0;s<r.length;s++){var l=r[s],d=e,y=n,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(mr(b.type)){vt=b.stateNode,pn=!1;break e}break;case 5:vt=b.stateNode,pn=!1;break e;case 3:case 4:vt=b.stateNode.containerInfo,pn=!0;break e}b=b.return}if(vt===null)throw Error(o(160));Tp(d,y,l),vt=null,pn=!1,d=l.alternate,d!==null&&(d.return=null),l.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Ap(n,e),n=n.sibling}var ia=null;function Ap(e,n){var r=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(n,e),yn(e),s&4&&(or(3,e,e.return),Ms(3,e),or(5,e,e.return));break;case 1:gn(n,e),yn(e),s&512&&(zt||r===null||pa(r,r.return)),s&64&&Pa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?s:r.concat(s))));break;case 26:var l=ia;if(gn(n,e),yn(e),s&512&&(zt||r===null||pa(r,r.return)),s&4){var d=r!==null?r.memoizedState:null;if(s=e.memoizedState,r===null)if(s===null)if(e.stateNode===null){e:{s=e.type,r=e.memoizedProps,l=l.ownerDocument||l;t:switch(s){case"title":d=l.getElementsByTagName("title")[0],(!d||d[xt]||d[se]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=l.createElement(s),l.head.insertBefore(d,l.querySelector("head > title"))),Zt(d,s,r),d[se]=e,yt(d),s=d;break e;case"link":var y=Ag("link","href",l).get(s+(r.href||""));if(y){for(var b=0;b<y.length;b++)if(d=y[b],d.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&d.getAttribute("rel")===(r.rel==null?null:r.rel)&&d.getAttribute("title")===(r.title==null?null:r.title)&&d.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){y.splice(b,1);break t}}d=l.createElement(s),Zt(d,s,r),l.head.appendChild(d);break;case"meta":if(y=Ag("meta","content",l).get(s+(r.content||""))){for(b=0;b<y.length;b++)if(d=y[b],d.getAttribute("content")===(r.content==null?null:""+r.content)&&d.getAttribute("name")===(r.name==null?null:r.name)&&d.getAttribute("property")===(r.property==null?null:r.property)&&d.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&d.getAttribute("charset")===(r.charSet==null?null:r.charSet)){y.splice(b,1);break t}}d=l.createElement(s),Zt(d,s,r),l.head.appendChild(d);break;default:throw Error(o(468,s))}d[se]=e,yt(d),s=d}e.stateNode=s}else Rg(l,e.type,e.stateNode);else e.stateNode=kg(l,s,e.memoizedProps);else d!==s?(d===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):d.count--,s===null?Rg(l,e.type,e.stateNode):kg(l,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Iu(e,e.memoizedProps,r.memoizedProps)}break;case 27:gn(n,e),yn(e),s&512&&(zt||r===null||pa(r,r.return)),r!==null&&s&4&&Iu(e,e.memoizedProps,r.memoizedProps);break;case 5:if(gn(n,e),yn(e),s&512&&(zt||r===null||pa(r,r.return)),e.flags&32){l=e.stateNode;try{hi(l,"")}catch(ce){st(e,e.return,ce)}}s&4&&e.stateNode!=null&&(l=e.memoizedProps,Iu(e,l,r!==null?r.memoizedProps:l)),s&1024&&(Ku=!0);break;case 6:if(gn(n,e),yn(e),s&4){if(e.stateNode===null)throw Error(o(162));s=e.memoizedProps,r=e.stateNode;try{r.nodeValue=s}catch(ce){st(e,e.return,ce)}}break;case 3:if(kl=null,l=ia,ia=Tl(n.containerInfo),gn(n,e),ia=l,yn(e),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Ki(n.containerInfo)}catch(ce){st(e,e.return,ce)}Ku&&(Ku=!1,Rp(e));break;case 4:s=ia,ia=Tl(e.stateNode.containerInfo),gn(n,e),yn(e),ia=s;break;case 12:gn(n,e),yn(e);break;case 31:gn(n,e),yn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ul(e,s)));break;case 13:gn(n,e),yn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(fl=bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ul(e,s)));break;case 22:l=e.memoizedState!==null;var T=r!==null&&r.memoizedState!==null,j=Pa,G=zt;if(Pa=j||l,zt=G||T,gn(n,e),zt=G,Pa=j,yn(e),s&8192)e:for(n=e.stateNode,n._visibility=l?n._visibility&-2:n._visibility|1,l&&(r===null||T||Pa||zt||Wr(e)),r=null,n=e;;){if(n.tag===5||n.tag===26){if(r===null){T=r=n;try{if(d=T.stateNode,l)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=T.stateNode;var X=T.memoizedProps.style,L=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ce){st(T,T.return,ce)}}}else if(n.tag===6){if(r===null){T=n;try{T.stateNode.nodeValue=l?"":T.memoizedProps}catch(ce){st(T,T.return,ce)}}}else if(n.tag===18){if(r===null){T=n;try{var P=T.stateNode;l?yg(P,!0):yg(T.stateNode,!1)}catch(ce){st(T,T.return,ce)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(r=s.retryQueue,r!==null&&(s.retryQueue=null,ul(e,r))));break;case 19:gn(n,e),yn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ul(e,s)));break;case 30:break;case 21:break;default:gn(n,e),yn(e)}}function yn(e){var n=e.flags;if(n&2){try{for(var r,s=e.return;s!==null;){if(bp(s)){r=s;break}s=s.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var l=r.stateNode,d=Hu(e);cl(e,d,l);break;case 5:var y=r.stateNode;r.flags&32&&(hi(y,""),r.flags&=-33);var b=Hu(e);cl(e,b,y);break;case 3:case 4:var T=r.stateNode.containerInfo,j=Hu(e);Qu(e,j,T);break;default:throw Error(o(161))}}catch(G){st(e,e.return,G)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Rp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Rp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ha(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)wp(e,n.alternate,n),n=n.sibling}function Wr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:or(4,n,n.return),Wr(n);break;case 1:pa(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&yp(n,n.return,r),Wr(n);break;case 27:Hs(n.stateNode);case 26:case 5:pa(n,n.return),Wr(n);break;case 22:n.memoizedState===null&&Wr(n);break;case 30:Wr(n);break;default:Wr(n)}e=e.sibling}}function Qa(e,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,l=e,d=n,y=d.flags;switch(d.tag){case 0:case 11:case 15:Qa(l,d,r),Ms(4,d);break;case 1:if(Qa(l,d,r),s=d,l=s.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(j){st(s,s.return,j)}if(s=d,l=s.updateQueue,l!==null){var b=s.stateNode;try{var T=l.shared.hiddenCallbacks;if(T!==null)for(l.shared.hiddenCallbacks=null,l=0;l<T.length;l++)im(T[l],b)}catch(j){st(s,s.return,j)}}r&&y&64&&gp(d),Ds(d,d.return);break;case 27:xp(d);case 26:case 5:Qa(l,d,r),r&&s===null&&y&4&&vp(d),Ds(d,d.return);break;case 12:Qa(l,d,r);break;case 31:Qa(l,d,r),r&&y&4&&Cp(l,d);break;case 13:Qa(l,d,r),r&&y&4&&kp(l,d);break;case 22:d.memoizedState===null&&Qa(l,d,r),Ds(d,d.return);break;case 30:break;default:Qa(l,d,r)}n=n.sibling}}function Gu(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&bs(r))}function Yu(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&bs(e))}function sa(e,n,r,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Np(e,n,r,s),n=n.sibling}function Np(e,n,r,s){var l=n.flags;switch(n.tag){case 0:case 11:case 15:sa(e,n,r,s),l&2048&&Ms(9,n);break;case 1:sa(e,n,r,s);break;case 3:sa(e,n,r,s),l&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&bs(e)));break;case 12:if(l&2048){sa(e,n,r,s),e=n.stateNode;try{var d=n.memoizedProps,y=d.id,b=d.onPostCommit;typeof b=="function"&&b(y,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){st(n,n.return,T)}}else sa(e,n,r,s);break;case 31:sa(e,n,r,s);break;case 13:sa(e,n,r,s);break;case 23:break;case 22:d=n.stateNode,y=n.alternate,n.memoizedState!==null?d._visibility&2?sa(e,n,r,s):js(e,n):d._visibility&2?sa(e,n,r,s):(d._visibility|=2,Di(e,n,r,s,(n.subtreeFlags&10256)!==0||!1)),l&2048&&Gu(y,n);break;case 24:sa(e,n,r,s),l&2048&&Yu(n.alternate,n);break;default:sa(e,n,r,s)}}function Di(e,n,r,s,l){for(l=l&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,y=n,b=r,T=s,j=y.flags;switch(y.tag){case 0:case 11:case 15:Di(d,y,b,T,l),Ms(8,y);break;case 23:break;case 22:var G=y.stateNode;y.memoizedState!==null?G._visibility&2?Di(d,y,b,T,l):js(d,y):(G._visibility|=2,Di(d,y,b,T,l)),l&&j&2048&&Gu(y.alternate,y);break;case 24:Di(d,y,b,T,l),l&&j&2048&&Yu(y.alternate,y);break;default:Di(d,y,b,T,l)}n=n.sibling}}function js(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,s=n,l=s.flags;switch(s.tag){case 22:js(r,s),l&2048&&Gu(s.alternate,s);break;case 24:js(r,s),l&2048&&Yu(s.alternate,s);break;default:js(r,s)}n=n.sibling}}var zs=8192;function ji(e,n,r){if(e.subtreeFlags&zs)for(e=e.child;e!==null;)_p(e,n,r),e=e.sibling}function _p(e,n,r){switch(e.tag){case 26:ji(e,n,r),e.flags&zs&&e.memoizedState!==null&&G1(r,ia,e.memoizedState,e.memoizedProps);break;case 5:ji(e,n,r);break;case 3:case 4:var s=ia;ia=Tl(e.stateNode.containerInfo),ji(e,n,r),ia=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=zs,zs=16777216,ji(e,n,r),zs=s):ji(e,n,r));break;default:ji(e,n,r)}}function Op(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ls(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];Ht=s,Dp(s,e)}Op(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mp(e),e=e.sibling}function Mp(e){switch(e.tag){case 0:case 11:case 15:Ls(e),e.flags&2048&&or(9,e,e.return);break;case 3:Ls(e);break;case 12:Ls(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,dl(e)):Ls(e);break;default:Ls(e)}}function dl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];Ht=s,Dp(s,e)}Op(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:or(8,n,n.return),dl(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,dl(n));break;default:dl(n)}e=e.sibling}}function Dp(e,n){for(;Ht!==null;){var r=Ht;switch(r.tag){case 0:case 11:case 15:or(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var s=r.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:bs(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,Ht=s;else e:for(r=e;Ht!==null;){s=Ht;var l=s.sibling,d=s.return;if(Ep(s),s===r){Ht=null;break e}if(l!==null){l.return=d,Ht=l;break e}Ht=d}}}var s1={getCacheForType:function(e){var n=Xt(Mt),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r},cacheSignal:function(){return Xt(Mt).controller.signal}},o1=typeof WeakMap=="function"?WeakMap:Map,at=0,ut=null,He=null,Ke=0,it=0,Rn=null,lr=!1,zi=!1,Vu=!1,Ka=0,Tt=0,cr=0,ei=0,Fu=0,Nn=0,Li=0,Us=null,vn=null,Xu=!1,fl=0,jp=0,hl=1/0,ml=null,ur=null,qt=0,dr=null,Ui=null,Ga=0,$u=0,Zu=null,zp=null,Bs=0,Ju=null;function _n(){return(at&2)!==0&&Ke!==0?Ke&-Ke:_.T!==null?rd():te()}function Lp(){if(Nn===0)if((Ke&536870912)===0||$e){var e=Aa;Aa<<=1,(Aa&3932160)===0&&(Aa=262144),Nn=e}else Nn=536870912;return e=kn.current,e!==null&&(e.flags|=32),Nn}function bn(e,n,r){(e===ut&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Bi(e,0),fr(e,Ke,Nn,!1)),ft(e,r),((at&2)===0||e!==ut)&&(e===ut&&((at&2)===0&&(ei|=r),Tt===4&&fr(e,Ke,Nn,!1)),ga(e))}function Up(e,n,r){if((at&6)!==0)throw Error(o(327));var s=!r&&(n&127)===0&&(n&e.expiredLanes)===0||dt(e,n),l=s?u1(e,n):ed(e,n,!0),d=s;do{if(l===0){zi&&!s&&fr(e,n,0,!1);break}else{if(r=e.current.alternate,d&&!l1(r)){l=ed(e,n,!1),d=!1;continue}if(l===2){if(d=n,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var b=e;l=Us;var T=b.current.memoizedState.isDehydrated;if(T&&(Bi(b,y).flags|=256),y=ed(b,y,!1),y!==2){if(Vu&&!T){b.errorRecoveryDisabledLanes|=d,ei|=d,l=4;break e}d=vn,vn=l,d!==null&&(vn===null?vn=d:vn.push.apply(vn,d))}l=y}if(d=!1,l!==2)continue}}if(l===1){Bi(e,0),fr(e,n,0,!0);break}e:{switch(s=e,d=l,d){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:fr(s,n,Nn,!lr);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(l=fl+300-bt(),10<l)){if(fr(s,n,Nn,!lr),_e(s,0,!0)!==0)break e;Ga=n,s.timeoutHandle=mg(Bp.bind(null,s,r,vn,ml,Xu,n,Nn,ei,Li,lr,d,"Throttled",-0,0),l);break e}Bp(s,r,vn,ml,Xu,n,Nn,ei,Li,lr,d,null,-0,0)}}break}while(!0);ga(e)}function Bp(e,n,r,s,l,d,y,b,T,j,G,X,L,P){if(e.timeoutHandle=-1,X=n.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_a},_p(n,d,X);var ce=(d&62914560)===d?fl-bt():(d&4194048)===d?jp-bt():0;if(ce=Y1(X,ce),ce!==null){Ga=d,e.cancelPendingCommit=ce(Yp.bind(null,e,n,d,r,s,l,y,b,T,G,X,null,L,P)),fr(e,d,y,!j);return}}Yp(e,n,d,r,s,l,y,b,T)}function l1(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var s=0;s<r.length;s++){var l=r[s],d=l.getSnapshot;l=l.value;try{if(!Tn(d(),l))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function fr(e,n,r,s){n&=~Fu,n&=~ei,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var l=n;0<l;){var d=31-Bt(l),y=1<<d;s[d]=-1,l&=~y}r!==0&&Ra(e,r,n)}function pl(){return(at&6)===0?(qs(0),!1):!0}function Wu(){if(He!==null){if(it===0)var e=He.return;else e=He,ja=Gr=null,pu(e),Ri=null,Ss=0,e=He;for(;e!==null;)pp(e.alternate,e),e=e.return;He=null}}function Bi(e,n){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,R1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Ga=0,Wu(),ut=e,He=r=Ma(e.current,null),Ke=n,it=0,Rn=null,lr=!1,zi=dt(e,n),Vu=!1,Li=Nn=Fu=ei=cr=Tt=0,vn=Us=null,Xu=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var l=31-Bt(s),d=1<<l;n|=e[l],s&=~d}return Ka=n,Lo(),r}function qp(e,n){Le=null,_.H=Ns,n===Ai||n===Ko?(n=tm(),it=3):n===au?(n=tm(),it=4):it=n===Ou?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Rn=n,He===null&&(Tt=1,rl(e,qn(n,e.current)))}function Pp(){var e=kn.current;return e===null?!0:(Ke&4194048)===Ke?Qn===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===Qn:!1}function Ip(){var e=_.H;return _.H=Ns,e===null?Ns:e}function Hp(){var e=_.A;return _.A=s1,e}function gl(){Tt=4,lr||(Ke&4194048)!==Ke&&kn.current!==null||(zi=!0),(cr&134217727)===0&&(ei&134217727)===0||ut===null||fr(ut,Ke,Nn,!1)}function ed(e,n,r){var s=at;at|=2;var l=Ip(),d=Hp();(ut!==e||Ke!==n)&&(ml=null,Bi(e,n)),n=!1;var y=Tt;e:do try{if(it!==0&&He!==null){var b=He,T=Rn;switch(it){case 8:Wu(),y=6;break e;case 3:case 2:case 9:case 6:kn.current===null&&(n=!0);var j=it;if(it=0,Rn=null,qi(e,b,T,j),r&&zi){y=0;break e}break;default:j=it,it=0,Rn=null,qi(e,b,T,j)}}c1(),y=Tt;break}catch(G){qp(e,G)}while(!0);return n&&e.shellSuspendCounter++,ja=Gr=null,at=s,_.H=l,_.A=d,He===null&&(ut=null,Ke=0,Lo()),y}function c1(){for(;He!==null;)Qp(He)}function u1(e,n){var r=at;at|=2;var s=Ip(),l=Hp();ut!==e||Ke!==n?(ml=null,hl=bt()+500,Bi(e,n)):zi=dt(e,n);e:do try{if(it!==0&&He!==null){n=He;var d=Rn;t:switch(it){case 1:it=0,Rn=null,qi(e,n,d,1);break;case 2:case 9:if(Wh(d)){it=0,Rn=null,Kp(n);break}n=function(){it!==2&&it!==9||ut!==e||(it=7),ga(e)},d.then(n,n);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:Wh(d)?(it=0,Rn=null,Kp(n)):(it=0,Rn=null,qi(e,n,d,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var b=He;if(y?Ng(y):b.stateNode.complete){it=0,Rn=null;var T=b.sibling;if(T!==null)He=T;else{var j=b.return;j!==null?(He=j,yl(j)):He=null}break t}}it=0,Rn=null,qi(e,n,d,5);break;case 6:it=0,Rn=null,qi(e,n,d,6);break;case 8:Wu(),Tt=6;break e;default:throw Error(o(462))}}d1();break}catch(G){qp(e,G)}while(!0);return ja=Gr=null,_.H=s,_.A=l,at=r,He!==null?0:(ut=null,Ke=0,Lo(),Tt)}function d1(){for(;He!==null&&!Gt();)Qp(He)}function Qp(e){var n=hp(e.alternate,e,Ka);e.memoizedProps=e.pendingProps,n===null?yl(e):He=n}function Kp(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=op(r,n,n.pendingProps,n.type,void 0,Ke);break;case 11:n=op(r,n,n.pendingProps,n.type.render,n.ref,Ke);break;case 5:pu(n);default:pp(r,n),n=He=Hh(n,Ka),n=hp(r,n,Ka)}e.memoizedProps=e.pendingProps,n===null?yl(e):He=n}function qi(e,n,r,s){ja=Gr=null,pu(n),Ri=null,Ss=0;var l=n.return;try{if(Wx(e,l,n,r,Ke)){Tt=1,rl(e,qn(r,e.current)),He=null;return}}catch(d){if(l!==null)throw He=l,d;Tt=1,rl(e,qn(r,e.current)),He=null;return}n.flags&32768?($e||s===1?e=!0:zi||(Ke&536870912)!==0?e=!1:(lr=e=!0,(s===2||s===9||s===3||s===6)&&(s=kn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gp(n,e)):yl(n)}function yl(e){var n=e;do{if((n.flags&32768)!==0){Gp(n,lr);return}e=n.return;var r=n1(n.alternate,n,Ka);if(r!==null){He=r;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);Tt===0&&(Tt=5)}function Gp(e,n){do{var r=a1(e.alternate,e);if(r!==null){r.flags&=32767,He=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=r}while(e!==null);Tt=6,He=null}function Yp(e,n,r,s,l,d,y,b,T){e.cancelPendingCommit=null;do vl();while(qt!==0);if((at&6)!==0)throw Error(o(327));if(n!==null){if(n===e.current)throw Error(o(177));if(d=n.lanes|n.childLanes,d|=Hc,tn(e,r,d,y,b,T),e===ut&&(He=ut=null,Ke=0),Ui=n,dr=e,Ga=r,$u=d,Zu=l,zp=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p1(Yt,function(){return Zp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=_.T,_.T=null,l=F.p,F.p=2,y=at,at|=4;try{r1(e,n,r)}finally{at=y,F.p=l,_.T=s}}qt=1,Vp(),Fp(),Xp()}}function Vp(){if(qt===1){qt=0;var e=dr,n=Ui,r=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||r){r=_.T,_.T=null;var s=F.p;F.p=2;var l=at;at|=4;try{Ap(n,e);var d=fd,y=Dh(e.containerInfo),b=d.focusedElem,T=d.selectionRange;if(y!==b&&b&&b.ownerDocument&&Mh(b.ownerDocument.documentElement,b)){if(T!==null&&Uc(b)){var j=T.start,G=T.end;if(G===void 0&&(G=j),"selectionStart"in b)b.selectionStart=j,b.selectionEnd=Math.min(G,b.value.length);else{var X=b.ownerDocument||document,L=X&&X.defaultView||window;if(L.getSelection){var P=L.getSelection(),ce=b.textContent.length,Re=Math.min(T.start,ce),ct=T.end===void 0?Re:Math.min(T.end,ce);!P.extend&&Re>ct&&(y=ct,ct=Re,Re=y);var O=Oh(b,Re),A=Oh(b,ct);if(O&&A&&(P.rangeCount!==1||P.anchorNode!==O.node||P.anchorOffset!==O.offset||P.focusNode!==A.node||P.focusOffset!==A.offset)){var D=X.createRange();D.setStart(O.node,O.offset),P.removeAllRanges(),Re>ct?(P.addRange(D),P.extend(A.node,A.offset)):(D.setEnd(A.node,A.offset),P.addRange(D))}}}}for(X=[],P=b;P=P.parentNode;)P.nodeType===1&&X.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<X.length;b++){var V=X[b];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}_l=!!dd,fd=dd=null}finally{at=l,F.p=s,_.T=r}}e.current=n,qt=2}}function Fp(){if(qt===2){qt=0;var e=dr,n=Ui,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=_.T,_.T=null;var s=F.p;F.p=2;var l=at;at|=4;try{wp(e,n.alternate,n)}finally{at=l,F.p=s,_.T=r}}qt=3}}function Xp(){if(qt===4||qt===3){qt=0,da();var e=dr,n=Ui,r=Ga,s=zp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?qt=5:(qt=0,Ui=dr=null,$p(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(ur=null),Z(r),n=n.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(ka,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=_.T,l=F.p,F.p=2,_.T=null;try{for(var d=e.onRecoverableError,y=0;y<s.length;y++){var b=s[y];d(b.value,{componentStack:b.stack})}}finally{_.T=n,F.p=l}}(Ga&3)!==0&&vl(),ga(e),l=e.pendingLanes,(r&261930)!==0&&(l&42)!==0?e===Ju?Bs++:(Bs=0,Ju=e):Bs=0,qs(0)}}function $p(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,bs(n)))}function vl(){return Vp(),Fp(),Xp(),Zp()}function Zp(){if(qt!==5)return!1;var e=dr,n=$u;$u=0;var r=Z(Ga),s=_.T,l=F.p;try{F.p=32>r?32:r,_.T=null,r=Zu,Zu=null;var d=dr,y=Ga;if(qt=0,Ui=dr=null,Ga=0,(at&6)!==0)throw Error(o(331));var b=at;if(at|=4,Mp(d.current),Np(d,d.current,y,r),at=b,qs(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(ka,d)}catch{}return!0}finally{F.p=l,_.T=s,$p(e,n)}}function Jp(e,n,r){n=qn(r,n),n=_u(e.stateNode,n,2),e=rr(e,n,2),e!==null&&(ft(e,2),ga(e))}function st(e,n,r){if(e.tag===3)Jp(e,e,r);else for(;n!==null;){if(n.tag===3){Jp(n,e,r);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ur===null||!ur.has(s))){e=qn(r,e),r=Wm(2),s=rr(n,r,2),s!==null&&(ep(r,s,n,e),ft(s,2),ga(s));break}}n=n.return}}function td(e,n,r){var s=e.pingCache;if(s===null){s=e.pingCache=new o1;var l=new Set;s.set(n,l)}else l=s.get(n),l===void 0&&(l=new Set,s.set(n,l));l.has(r)||(Vu=!0,l.add(r),e=f1.bind(null,e,n,r),n.then(e,e))}function f1(e,n,r){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ut===e&&(Ke&r)===r&&(Tt===4||Tt===3&&(Ke&62914560)===Ke&&300>bt()-fl?(at&2)===0&&Bi(e,0):Fu|=r,Li===Ke&&(Li=0)),ga(e)}function Wp(e,n){n===0&&(n=At()),e=Hr(e,n),e!==null&&(ft(e,n),ga(e))}function h1(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Wp(e,r)}function m1(e,n){var r=0;switch(e.tag){case 31:case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(n),Wp(e,r)}function p1(e,n){return Dr(e,n)}var bl=null,Pi=null,nd=!1,xl=!1,ad=!1,hr=0;function ga(e){e!==Pi&&e.next===null&&(Pi===null?bl=Pi=e:Pi=Pi.next=e),xl=!0,nd||(nd=!0,y1())}function qs(e,n){if(!ad&&xl){ad=!0;do for(var r=!1,s=bl;s!==null;){if(e!==0){var l=s.pendingLanes;if(l===0)var d=0;else{var y=s.suspendedLanes,b=s.pingedLanes;d=(1<<31-Bt(42|e)+1)-1,d&=l&~(y&~b),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,ag(s,d))}else d=Ke,d=_e(s,s===ut?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||dt(s,d)||(r=!0,ag(s,d));s=s.next}while(r);ad=!1}}function g1(){eg()}function eg(){xl=nd=!1;var e=0;hr!==0&&A1()&&(e=hr);for(var n=bt(),r=null,s=bl;s!==null;){var l=s.next,d=tg(s,n);d===0?(s.next=null,r===null?bl=l:r.next=l,l===null&&(Pi=r)):(r=s,(e!==0||(d&3)!==0)&&(xl=!0)),s=l}qt!==0&&qt!==5||qs(e),hr!==0&&(hr=0)}function tg(e,n){for(var r=e.suspendedLanes,s=e.pingedLanes,l=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Bt(d),b=1<<y,T=l[y];T===-1?((b&r)===0||(b&s)!==0)&&(l[y]=kt(b,n)):T<=n&&(e.expiredLanes|=b),d&=~b}if(n=ut,r=Ke,r=_e(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,r===0||e===n&&(it===2||it===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&jr(s),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||dt(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(s!==null&&jr(s),Z(r)){case 2:case 8:r=$a;break;case 32:r=Yt;break;case 268435456:r=Dn;break;default:r=Yt}return s=ng.bind(null,e),r=Dr(r,s),e.callbackPriority=n,e.callbackNode=r,n}return s!==null&&s!==null&&jr(s),e.callbackPriority=2,e.callbackNode=null,2}function ng(e,n){if(qt!==0&&qt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(vl()&&e.callbackNode!==r)return null;var s=Ke;return s=_e(e,e===ut?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Up(e,s,n),tg(e,bt()),e.callbackNode!=null&&e.callbackNode===r?ng.bind(null,e):null)}function ag(e,n){if(vl())return null;Up(e,n,!0)}function y1(){N1(function(){(at&6)!==0?Dr(fa,g1):eg()})}function rd(){if(hr===0){var e=Ci;e===0&&(e=Wn,Wn<<=1,(Wn&261888)===0&&(Wn=256)),hr=e}return hr}function rg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ro(""+e)}function ig(e,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,e.id&&r.setAttribute("form",e.id),n.parentNode.insertBefore(r,n),e=new FormData(e),r.parentNode.removeChild(r),e}function v1(e,n,r,s,l){if(n==="submit"&&r&&r.stateNode===l){var d=rg((l[le]||null).action),y=s.submitter;y&&(n=(n=y[le]||null)?rg(n.formAction):y.getAttribute("formAction"),n!==null&&(d=n,y=null));var b=new Mo("action","action",null,s,l);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(hr!==0){var T=y?ig(l,y):new FormData(l);Tu(r,{pending:!0,data:T,method:l.method,action:d},null,T)}}else typeof d=="function"&&(b.preventDefault(),T=y?ig(l,y):new FormData(l),Tu(r,{pending:!0,data:T,method:l.method,action:d},d,T))},currentTarget:l}]})}}for(var id=0;id<Ic.length;id++){var sd=Ic[id],b1=sd.toLowerCase(),x1=sd[0].toUpperCase()+sd.slice(1);ra(b1,"on"+x1)}ra(Lh,"onAnimationEnd"),ra(Uh,"onAnimationIteration"),ra(Bh,"onAnimationStart"),ra("dblclick","onDoubleClick"),ra("focusin","onFocus"),ra("focusout","onBlur"),ra(Lx,"onTransitionRun"),ra(Ux,"onTransitionStart"),ra(Bx,"onTransitionCancel"),ra(qh,"onTransitionEnd"),Ln("onMouseEnter",["mouseout","mouseover"]),Ln("onMouseLeave",["mouseout","mouseover"]),Ln("onPointerEnter",["pointerout","pointerover"]),Ln("onPointerLeave",["pointerout","pointerover"]),na("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),na("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),na("onBeforeInput",["compositionend","keypress","textInput","paste"]),na("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),S1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function sg(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var s=e[r],l=s.event;s=s.listeners;e:{var d=void 0;if(n)for(var y=s.length-1;0<=y;y--){var b=s[y],T=b.instance,j=b.currentTarget;if(b=b.listener,T!==d&&l.isPropagationStopped())break e;d=b,l.currentTarget=j;try{d(l)}catch(G){zo(G)}l.currentTarget=null,d=T}else for(y=0;y<s.length;y++){if(b=s[y],T=b.instance,j=b.currentTarget,b=b.listener,T!==d&&l.isPropagationStopped())break e;d=b,l.currentTarget=j;try{d(l)}catch(G){zo(G)}l.currentTarget=null,d=T}}}}function Qe(e,n){var r=n[Ae];r===void 0&&(r=n[Ae]=new Set);var s=e+"__bubble";r.has(s)||(og(n,e,2,!1),r.add(s))}function od(e,n,r){var s=0;n&&(s|=4),og(r,e,s,n)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function ld(e){if(!e[Sl]){e[Sl]=!0,ta.forEach(function(r){r!=="selectionchange"&&(S1.has(r)||od(r,!1,e),od(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Sl]||(n[Sl]=!0,od("selectionchange",!1,n))}}function og(e,n,r,s){switch(Lg(n)){case 2:var l=X1;break;case 8:l=$1;break;default:l=Ed}r=l.bind(null,n,r,e),l=void 0,!Rc||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(l=!0),s?l!==void 0?e.addEventListener(n,r,{capture:!0,passive:l}):e.addEventListener(n,r,!0):l!==void 0?e.addEventListener(n,r,{passive:l}):e.addEventListener(n,r,!1)}function cd(e,n,r,s,l){var d=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var b=s.stateNode.containerInfo;if(b===l)break;if(y===4)for(y=s.return;y!==null;){var T=y.tag;if((T===3||T===4)&&y.stateNode.containerInfo===l)return;y=y.return}for(;b!==null;){if(y=wt(b),y===null)return;if(T=y.tag,T===5||T===6||T===26||T===27){s=d=y;continue e}b=b.parentNode}}s=s.return}fh(function(){var j=d,G=kc(r),X=[];e:{var L=Ph.get(e);if(L!==void 0){var P=Mo,ce=e;switch(e){case"keypress":if(_o(r)===0)break e;case"keydown":case"keyup":P=mx;break;case"focusin":ce="focus",P=Mc;break;case"focusout":ce="blur",P=Mc;break;case"beforeblur":case"afterblur":P=Mc;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=nx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=yx;break;case Lh:case Uh:case Bh:P=ix;break;case qh:P=bx;break;case"scroll":case"scrollend":P=ex;break;case"wheel":P=Sx;break;case"copy":case"cut":case"paste":P=ox;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=yh;break;case"toggle":case"beforetoggle":P=Ex}var Re=(n&4)!==0,ct=!Re&&(e==="scroll"||e==="scrollend"),O=Re?L!==null?L+"Capture":null:L;Re=[];for(var A=j,D;A!==null;){var V=A;if(D=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||D===null||O===null||(V=ls(A,O),V!=null&&Re.push(Is(A,V,D))),ct)break;A=A.return}0<Re.length&&(L=new P(L,ce,null,r,G),X.push({event:L,listeners:Re}))}}if((n&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",L&&r!==Cc&&(ce=r.relatedTarget||r.fromElement)&&(wt(ce)||ce[ve]))break e;if((P||L)&&(L=G.window===G?G:(L=G.ownerDocument)?L.defaultView||L.parentWindow:window,P?(ce=r.relatedTarget||r.toElement,P=j,ce=ce?wt(ce):null,ce!==null&&(ct=u(ce),Re=ce.tag,ce!==ct||Re!==5&&Re!==27&&Re!==6)&&(ce=null)):(P=null,ce=j),P!==ce)){if(Re=ph,V="onMouseLeave",O="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(Re=yh,V="onPointerLeave",O="onPointerEnter",A="pointer"),ct=P==null?L:It(P),D=ce==null?L:It(ce),L=new Re(V,A+"leave",P,r,G),L.target=ct,L.relatedTarget=D,V=null,wt(G)===j&&(Re=new Re(O,A+"enter",ce,r,G),Re.target=D,Re.relatedTarget=ct,V=Re),ct=V,P&&ce)t:{for(Re=w1,O=P,A=ce,D=0,V=O;V;V=Re(V))D++;V=0;for(var Te=A;Te;Te=Re(Te))V++;for(;0<D-V;)O=Re(O),D--;for(;0<V-D;)A=Re(A),V--;for(;D--;){if(O===A||A!==null&&O===A.alternate){Re=O;break t}O=Re(O),A=Re(A)}Re=null}else Re=null;P!==null&&lg(X,L,P,Re,!1),ce!==null&&ct!==null&&lg(X,ct,ce,Re,!0)}}e:{if(L=j?It(j):window,P=L.nodeName&&L.nodeName.toLowerCase(),P==="select"||P==="input"&&L.type==="file")var et=Ch;else if(Eh(L))if(kh)et=Dx;else{et=Ox;var ge=_x}else P=L.nodeName,!P||P.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?j&&Tc(j.elementType)&&(et=Ch):et=Mx;if(et&&(et=et(e,j))){Th(X,et,r,G);break e}ge&&ge(e,L,j),e==="focusout"&&j&&L.type==="number"&&j.memoizedProps.value!=null&&Ec(L,"number",L.value)}switch(ge=j?It(j):window,e){case"focusin":(Eh(ge)||ge.contentEditable==="true")&&(yi=ge,Bc=j,gs=null);break;case"focusout":gs=Bc=yi=null;break;case"mousedown":qc=!0;break;case"contextmenu":case"mouseup":case"dragend":qc=!1,jh(X,r,G);break;case"selectionchange":if(zx)break;case"keydown":case"keyup":jh(X,r,G)}var Ue;if(jc)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else gi?Sh(e,r)&&(Ge="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ge="onCompositionStart");Ge&&(vh&&r.locale!=="ko"&&(gi||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&gi&&(Ue=hh()):(Za=G,Nc="value"in Za?Za.value:Za.textContent,gi=!0)),ge=wl(j,Ge),0<ge.length&&(Ge=new gh(Ge,e,null,r,G),X.push({event:Ge,listeners:ge}),Ue?Ge.data=Ue:(Ue=wh(r),Ue!==null&&(Ge.data=Ue)))),(Ue=Cx?kx(e,r):Ax(e,r))&&(Ge=wl(j,"onBeforeInput"),0<Ge.length&&(ge=new gh("onBeforeInput","beforeinput",null,r,G),X.push({event:ge,listeners:Ge}),ge.data=Ue)),v1(X,e,j,r,G)}sg(X,n)})}function Is(e,n,r){return{instance:e,listener:n,currentTarget:r}}function wl(e,n){for(var r=n+"Capture",s=[];e!==null;){var l=e,d=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||d===null||(l=ls(e,r),l!=null&&s.unshift(Is(e,l,d)),l=ls(e,n),l!=null&&s.push(Is(e,l,d))),e.tag===3)return s;e=e.return}return[]}function w1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lg(e,n,r,s,l){for(var d=n._reactName,y=[];r!==null&&r!==s;){var b=r,T=b.alternate,j=b.stateNode;if(b=b.tag,T!==null&&T===s)break;b!==5&&b!==26&&b!==27||j===null||(T=j,l?(j=ls(r,d),j!=null&&y.unshift(Is(r,j,T))):l||(j=ls(r,d),j!=null&&y.push(Is(r,j,T)))),r=r.return}y.length!==0&&e.push({event:n,listeners:y})}var E1=/\r\n?/g,T1=/\u0000|\uFFFD/g;function cg(e){return(typeof e=="string"?e:""+e).replace(E1,`
|
|
10
|
+
`).replace(T1,"")}function ug(e,n){return n=cg(n),cg(e)===n}function lt(e,n,r,s,l,d){switch(r){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||hi(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&hi(e,""+s);break;case"className":aa(e,"class",s);break;case"tabIndex":aa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":aa(e,r,s);break;case"style":uh(e,s,d);break;case"data":if(n!=="object"){aa(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=Ro(""+s),e.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(r==="formAction"?(n!=="input"&<(e,n,"name",l.name,l,null),lt(e,n,"formEncType",l.formEncType,l,null),lt(e,n,"formMethod",l.formMethod,l,null),lt(e,n,"formTarget",l.formTarget,l,null)):(lt(e,n,"encType",l.encType,l,null),lt(e,n,"method",l.method,l,null),lt(e,n,"target",l.target,l,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=Ro(""+s),e.setAttribute(r,s);break;case"onClick":s!=null&&(e.onclick=_a);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(r=s.__html,r!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}r=Ro(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,""+s):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":s===!0?e.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,s):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(r,s):e.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(r):e.setAttribute(r,s);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),Rt(e,"popover",s);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Rt(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=J0.get(r)||r,Rt(e,r,s))}}function ud(e,n,r,s,l,d){switch(r){case"style":uh(e,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(r=s.__html,r!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof s=="string"?hi(e,s):(typeof s=="number"||typeof s=="bigint")&&hi(e,""+s);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=_a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!En.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(l=r.endsWith("Capture"),n=r.slice(2,l?r.length-7:void 0),d=e[le]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(n,d,l),typeof s=="function")){typeof d!="function"&&d!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(n,s,l);break e}r in e?e[r]=s:s===!0?e.setAttribute(r,""):Rt(e,r,s)}}}function Zt(e,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var s=!1,l=!1,d;for(d in r)if(r.hasOwnProperty(d)){var y=r[d];if(y!=null)switch(d){case"src":s=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:lt(e,n,d,y,r,null)}}l&<(e,n,"srcSet",r.srcSet,r,null),s&<(e,n,"src",r.src,r,null);return;case"input":Qe("invalid",e);var b=d=y=l=null,T=null,j=null;for(s in r)if(r.hasOwnProperty(s)){var G=r[s];if(G!=null)switch(s){case"name":l=G;break;case"type":y=G;break;case"checked":T=G;break;case"defaultChecked":j=G;break;case"value":d=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,n));break;default:lt(e,n,s,G,r,null)}}sh(e,d,b,T,j,y,l,!1);return;case"select":Qe("invalid",e),s=y=d=null;for(l in r)if(r.hasOwnProperty(l)&&(b=r[l],b!=null))switch(l){case"value":d=b;break;case"defaultValue":y=b;break;case"multiple":s=b;default:lt(e,n,l,b,r,null)}n=d,r=y,e.multiple=!!s,n!=null?fi(e,!!s,n,!1):r!=null&&fi(e,!!s,r,!0);return;case"textarea":Qe("invalid",e),d=l=s=null;for(y in r)if(r.hasOwnProperty(y)&&(b=r[y],b!=null))switch(y){case"value":s=b;break;case"defaultValue":l=b;break;case"children":d=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:lt(e,n,y,b,r,null)}lh(e,s,l,d);return;case"option":for(T in r)r.hasOwnProperty(T)&&(s=r[T],s!=null)&&(T==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":lt(e,n,T,s,r,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(s=0;s<Ps.length;s++)Qe(Ps[s],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in r)if(r.hasOwnProperty(j)&&(s=r[j],s!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:lt(e,n,j,s,r,null)}return;default:if(Tc(n)){for(G in r)r.hasOwnProperty(G)&&(s=r[G],s!==void 0&&ud(e,n,G,s,r,void 0));return}}for(b in r)r.hasOwnProperty(b)&&(s=r[b],s!=null&<(e,n,b,s,r,null))}function C1(e,n,r,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,d=null,y=null,b=null,T=null,j=null,G=null;for(P in r){var X=r[P];if(r.hasOwnProperty(P)&&X!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":T=X;default:s.hasOwnProperty(P)||lt(e,n,P,null,s,X)}}for(var L in s){var P=s[L];if(X=r[L],s.hasOwnProperty(L)&&(P!=null||X!=null))switch(L){case"type":d=P;break;case"name":l=P;break;case"checked":j=P;break;case"defaultChecked":G=P;break;case"value":y=P;break;case"defaultValue":b=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,n));break;default:P!==X&<(e,n,L,P,s,X)}}wc(e,y,b,T,j,G,d,l);return;case"select":P=y=b=L=null;for(d in r)if(T=r[d],r.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":P=T;default:s.hasOwnProperty(d)||lt(e,n,d,null,s,T)}for(l in s)if(d=s[l],T=r[l],s.hasOwnProperty(l)&&(d!=null||T!=null))switch(l){case"value":L=d;break;case"defaultValue":b=d;break;case"multiple":y=d;default:d!==T&<(e,n,l,d,s,T)}n=b,r=y,s=P,L!=null?fi(e,!!r,L,!1):!!s!=!!r&&(n!=null?fi(e,!!r,n,!0):fi(e,!!r,r?[]:"",!1));return;case"textarea":P=L=null;for(b in r)if(l=r[b],r.hasOwnProperty(b)&&l!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:lt(e,n,b,null,s,l)}for(y in s)if(l=s[y],d=r[y],s.hasOwnProperty(y)&&(l!=null||d!=null))switch(y){case"value":L=l;break;case"defaultValue":P=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(o(91));break;default:l!==d&<(e,n,y,l,s,d)}oh(e,L,P);return;case"option":for(var ce in r)L=r[ce],r.hasOwnProperty(ce)&&L!=null&&!s.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:lt(e,n,ce,null,s,L));for(T in s)L=s[T],P=r[T],s.hasOwnProperty(T)&&L!==P&&(L!=null||P!=null)&&(T==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":lt(e,n,T,L,s,P));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in r)L=r[Re],r.hasOwnProperty(Re)&&L!=null&&!s.hasOwnProperty(Re)&<(e,n,Re,null,s,L);for(j in s)if(L=s[j],P=r[j],s.hasOwnProperty(j)&&L!==P&&(L!=null||P!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,n));break;default:lt(e,n,j,L,s,P)}return;default:if(Tc(n)){for(var ct in r)L=r[ct],r.hasOwnProperty(ct)&&L!==void 0&&!s.hasOwnProperty(ct)&&ud(e,n,ct,void 0,s,L);for(G in s)L=s[G],P=r[G],!s.hasOwnProperty(G)||L===P||L===void 0&&P===void 0||ud(e,n,G,L,s,P);return}}for(var O in r)L=r[O],r.hasOwnProperty(O)&&L!=null&&!s.hasOwnProperty(O)&<(e,n,O,null,s,L);for(X in s)L=s[X],P=r[X],!s.hasOwnProperty(X)||L===P||L==null&&P==null||lt(e,n,X,L,s,P)}function dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var l=r[s],d=l.transferSize,y=l.initiatorType,b=l.duration;if(d&&b&&dg(y)){for(y=0,b=l.responseEnd,s+=1;s<r.length;s++){var T=r[s],j=T.startTime;if(j>b)break;var G=T.transferSize,X=T.initiatorType;G&&dg(X)&&(T=T.responseEnd,y+=G*(T<b?1:(b-j)/(T-j)))}if(--s,n+=8*(d+y)/(l.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var dd=null,fd=null;function El(e){return e.nodeType===9?e:e.ownerDocument}function fg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function hd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var md=null;function A1(){var e=window.event;return e&&e.type==="popstate"?e===md?!1:(md=e,!0):(md=null,!1)}var mg=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,pg=typeof Promise=="function"?Promise:void 0,N1=typeof queueMicrotask=="function"?queueMicrotask:typeof pg<"u"?function(e){return pg.resolve(null).then(e).catch(_1)}:mg;function _1(e){setTimeout(function(){throw e})}function mr(e){return e==="head"}function gg(e,n){var r=n,s=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"||r==="/&"){if(s===0){e.removeChild(l),Ki(n);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")Hs(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Hs(r);for(var d=r.firstChild;d;){var y=d.nextSibling,b=d.nodeName;d[xt]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&d.rel.toLowerCase()==="stylesheet"||r.removeChild(d),d=y}}else r==="body"&&Hs(e.ownerDocument.body);r=l}while(r);Ki(n)}function yg(e,n){var r=e;e=0;do{var s=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=s}while(r)}function pd(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":pd(r),St(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function O1(e,n,r,s){for(;e.nodeType===1;){var l=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[xt])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Kn(e.nextSibling),e===null)break}return null}function M1(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Kn(e.nextSibling),e===null))return null;return e}function vg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Kn(e.nextSibling),e===null))return null;return e}function gd(e){return e.data==="$?"||e.data==="$~"}function yd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function D1(e,n){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||r.readyState!=="loading")n();else{var s=function(){n(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Kn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var vd=null;function bg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(n===0)return Kn(e.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}e=e.nextSibling}return null}function xg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return e;n--}else r!=="/$"&&r!=="/&"||n++}e=e.previousSibling}return null}function Sg(e,n,r){switch(n=El(r),e){case"html":if(e=n.documentElement,!e)throw Error(o(452));return e;case"head":if(e=n.head,!e)throw Error(o(453));return e;case"body":if(e=n.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Hs(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);St(e)}var Gn=new Map,wg=new Set;function Tl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ya=F.d;F.d={f:j1,r:z1,D:L1,C:U1,L:B1,m:q1,X:I1,S:P1,M:H1};function j1(){var e=Ya.f(),n=pl();return e||n}function z1(e){var n=Ve(e);n!==null&&n.tag===5&&n.type==="form"?qm(n):Ya.r(e)}var Ii=typeof document>"u"?null:document;function Eg(e,n,r){var s=Ii;if(s&&typeof n=="string"&&n){var l=Un(n);l='link[rel="'+e+'"][href="'+l+'"]',typeof r=="string"&&(l+='[crossorigin="'+r+'"]'),wg.has(l)||(wg.add(l),e={rel:e,crossOrigin:r,href:n},s.querySelector(l)===null&&(n=s.createElement("link"),Zt(n,"link",e),yt(n),s.head.appendChild(n)))}}function L1(e){Ya.D(e),Eg("dns-prefetch",e,null)}function U1(e,n){Ya.C(e,n),Eg("preconnect",e,n)}function B1(e,n,r){Ya.L(e,n,r);var s=Ii;if(s&&e&&n){var l='link[rel="preload"][as="'+Un(n)+'"]';n==="image"&&r&&r.imageSrcSet?(l+='[imagesrcset="'+Un(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(l+='[imagesizes="'+Un(r.imageSizes)+'"]')):l+='[href="'+Un(e)+'"]';var d=l;switch(n){case"style":d=Hi(e);break;case"script":d=Qi(e)}Gn.has(d)||(e=v({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),Gn.set(d,e),s.querySelector(l)!==null||n==="style"&&s.querySelector(Qs(d))||n==="script"&&s.querySelector(Ks(d))||(n=s.createElement("link"),Zt(n,"link",e),yt(n),s.head.appendChild(n)))}}function q1(e,n){Ya.m(e,n);var r=Ii;if(r&&e){var s=n&&typeof n.as=="string"?n.as:"script",l='link[rel="modulepreload"][as="'+Un(s)+'"][href="'+Un(e)+'"]',d=l;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Qi(e)}if(!Gn.has(d)&&(e=v({rel:"modulepreload",href:e},n),Gn.set(d,e),r.querySelector(l)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Ks(d)))return}s=r.createElement("link"),Zt(s,"link",e),yt(s),r.head.appendChild(s)}}}function P1(e,n,r){Ya.S(e,n,r);var s=Ii;if(s&&e){var l=hn(s).hoistableStyles,d=Hi(e);n=n||"default";var y=l.get(d);if(!y){var b={loading:0,preload:null};if(y=s.querySelector(Qs(d)))b.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},r),(r=Gn.get(d))&&bd(e,r);var T=y=s.createElement("link");yt(T),Zt(T,"link",e),T._p=new Promise(function(j,G){T.onload=j,T.onerror=G}),T.addEventListener("load",function(){b.loading|=1}),T.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Cl(y,n,s)}y={type:"stylesheet",instance:y,count:1,state:b},l.set(d,y)}}}function I1(e,n){Ya.X(e,n);var r=Ii;if(r&&e){var s=hn(r).hoistableScripts,l=Qi(e),d=s.get(l);d||(d=r.querySelector(Ks(l)),d||(e=v({src:e,async:!0},n),(n=Gn.get(l))&&xd(e,n),d=r.createElement("script"),yt(d),Zt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(l,d))}}function H1(e,n){Ya.M(e,n);var r=Ii;if(r&&e){var s=hn(r).hoistableScripts,l=Qi(e),d=s.get(l);d||(d=r.querySelector(Ks(l)),d||(e=v({src:e,async:!0,type:"module"},n),(n=Gn.get(l))&&xd(e,n),d=r.createElement("script"),yt(d),Zt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(l,d))}}function Tg(e,n,r,s){var l=(l=J.current)?Tl(l):null;if(!l)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=Hi(r.href),r=hn(l).hoistableStyles,s=r.get(n),s||(s={type:"style",instance:null,count:0,state:null},r.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Hi(r.href);var d=hn(l).hoistableStyles,y=d.get(e);if(y||(l=l.ownerDocument||l,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=l.querySelector(Qs(e)))&&!d._p&&(y.instance=d,y.state.loading=5),Gn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Gn.set(e,r),d||Q1(l,e,r,y.state))),n&&s===null)throw Error(o(528,""));return y}if(n&&s!==null)throw Error(o(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Qi(r),r=hn(l).hoistableScripts,s=r.get(n),s||(s={type:"script",instance:null,count:0,state:null},r.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Hi(e){return'href="'+Un(e)+'"'}function Qs(e){return'link[rel="stylesheet"]['+e+"]"}function Cg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Q1(e,n,r,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Zt(n,"link",r),yt(n),e.head.appendChild(n))}function Qi(e){return'[src="'+Un(e)+'"]'}function Ks(e){return"script[async]"+e}function kg(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+Un(r.href)+'"]');if(s)return n.instance=s,yt(s),s;var l=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),yt(s),Zt(s,"style",l),Cl(s,r.precedence,e),n.instance=s;case"stylesheet":l=Hi(r.href);var d=e.querySelector(Qs(l));if(d)return n.state.loading|=4,n.instance=d,yt(d),d;s=Cg(r),(l=Gn.get(l))&&bd(s,l),d=(e.ownerDocument||e).createElement("link"),yt(d);var y=d;return y._p=new Promise(function(b,T){y.onload=b,y.onerror=T}),Zt(d,"link",s),n.state.loading|=4,Cl(d,r.precedence,e),n.instance=d;case"script":return d=Qi(r.src),(l=e.querySelector(Ks(d)))?(n.instance=l,yt(l),l):(s=r,(l=Gn.get(d))&&(s=v({},r),xd(s,l)),e=e.ownerDocument||e,l=e.createElement("script"),yt(l),Zt(l,"link",s),e.head.appendChild(l),n.instance=l);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,Cl(s,r.precedence,e));return n.instance}function Cl(e,n,r){for(var s=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=s.length?s[s.length-1]:null,d=l,y=0;y<s.length;y++){var b=s[y];if(b.dataset.precedence===n)d=b;else if(d!==l)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function bd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function xd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var kl=null;function Ag(e,n,r){if(kl===null){var s=new Map,l=kl=new Map;l.set(r,s)}else l=kl,s=l.get(r),s||(s=new Map,l.set(r,s));if(s.has(e))return s;for(s.set(e,null),r=r.getElementsByTagName(e),l=0;l<r.length;l++){var d=r[l];if(!(d[xt]||d[se]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(n)||"";y=e+y;var b=s.get(y);b?b.push(d):s.set(y,[d])}}return s}function Rg(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function K1(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Ng(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function G1(e,n,r,s){if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var l=Hi(s.href),d=n.querySelector(Qs(l));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Al.bind(e),n.then(e,e)),r.state.loading|=4,r.instance=d,yt(d);return}d=n.ownerDocument||n,s=Cg(s),(l=Gn.get(l))&&bd(s,l),d=d.createElement("link"),yt(d);var y=d;y._p=new Promise(function(b,T){y.onload=b,y.onerror=T}),Zt(d,"link",s),r.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Al.bind(e),n.addEventListener("load",r),n.addEventListener("error",r))}}var Sd=0;function Y1(e,n){return e.stylesheets&&e.count===0&&Nl(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var s=setTimeout(function(){if(e.stylesheets&&Nl(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Sd===0&&(Sd=62500*k1());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Nl(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Sd?50:800)+n);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(l)}}:null}function Al(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rl=null;function Nl(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rl=new Map,n.forEach(V1,e),Rl=null,Al.call(e))}function V1(e,n){if(!(n.state.loading&4)){var r=Rl.get(e);if(r)var s=r.get(null);else{r=new Map,Rl.set(e,r);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<l.length;d++){var y=l[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(r.set(y.dataset.precedence,y),s=y)}s&&r.set(null,s)}l=n.instance,y=l.getAttribute("data-precedence"),d=r.get(y)||s,d===s&&r.set(null,l),r.set(y,l),this.count++,s=Al.bind(this),l.addEventListener("load",s),l.addEventListener("error",s),d?d.parentNode.insertBefore(l,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),n.state.loading|=4}}var Gs={$$typeof:W,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function F1(e,n,r,s,l,d,y,b,T){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=s,this.onUncaughtError=l,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function _g(e,n,r,s,l,d,y,b,T,j,G,X){return e=new F1(e,n,r,y,T,j,G,X,b),n=1,d===!0&&(n|=24),d=Cn(3,null,null,n),e.current=d,d.stateNode=e,n=eu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:s,isDehydrated:r,cache:n},ru(d),e}function Og(e){return e?(e=xi,e):xi}function Mg(e,n,r,s,l,d){l=Og(l),s.context===null?s.context=l:s.pendingContext=l,s=ar(n),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=rr(e,s,n),r!==null&&(bn(r,e,n),Es(r,e,n))}function Dg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function wd(e,n){Dg(e,n),(e=e.alternate)&&Dg(e,n)}function jg(e){if(e.tag===13||e.tag===31){var n=Hr(e,67108864);n!==null&&bn(n,e,67108864),wd(e,67108864)}}function zg(e){if(e.tag===13||e.tag===31){var n=_n();n=U(n);var r=Hr(e,n);r!==null&&bn(r,e,n),wd(e,n)}}var _l=!0;function X1(e,n,r,s){var l=_.T;_.T=null;var d=F.p;try{F.p=2,Ed(e,n,r,s)}finally{F.p=d,_.T=l}}function $1(e,n,r,s){var l=_.T;_.T=null;var d=F.p;try{F.p=8,Ed(e,n,r,s)}finally{F.p=d,_.T=l}}function Ed(e,n,r,s){if(_l){var l=Td(s);if(l===null)cd(e,n,s,Ol,r),Ug(e,s);else if(J1(l,e,n,r,s))s.stopPropagation();else if(Ug(e,s),n&4&&-1<Z1.indexOf(e)){for(;l!==null;){var d=Ve(l);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=zn(d.pendingLanes);if(y!==0){var b=d;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var T=1<<31-Bt(y);b.entanglements[1]|=T,y&=~T}ga(d),(at&6)===0&&(hl=bt()+500,qs(0))}}break;case 31:case 13:b=Hr(d,2),b!==null&&bn(b,d,2),pl(),wd(d,2)}if(d=Td(s),d===null&&cd(e,n,s,Ol,r),d===l)break;l=d}l!==null&&s.stopPropagation()}else cd(e,n,s,null,r)}}function Td(e){return e=kc(e),Cd(e)}var Ol=null;function Cd(e){if(Ol=null,e=wt(e),e!==null){var n=u(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=f(n),e!==null)return e;e=null}else if(r===31){if(e=h(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ol=e,null}function Lg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ca()){case fa:return 2;case $a:return 8;case Yt:case on:return 32;case Dn:return 268435456;default:return 32}default:return 32}}var kd=!1,pr=null,gr=null,yr=null,Ys=new Map,Vs=new Map,vr=[],Z1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ug(e,n){switch(e){case"focusin":case"focusout":pr=null;break;case"dragenter":case"dragleave":gr=null;break;case"mouseover":case"mouseout":yr=null;break;case"pointerover":case"pointerout":Ys.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(n.pointerId)}}function Fs(e,n,r,s,l,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:r,eventSystemFlags:s,nativeEvent:d,targetContainers:[l]},n!==null&&(n=Ve(n),n!==null&&jg(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,l!==null&&n.indexOf(l)===-1&&n.push(l),e)}function J1(e,n,r,s,l){switch(n){case"focusin":return pr=Fs(pr,e,n,r,s,l),!0;case"dragenter":return gr=Fs(gr,e,n,r,s,l),!0;case"mouseover":return yr=Fs(yr,e,n,r,s,l),!0;case"pointerover":var d=l.pointerId;return Ys.set(d,Fs(Ys.get(d)||null,e,n,r,s,l)),!0;case"gotpointercapture":return d=l.pointerId,Vs.set(d,Fs(Vs.get(d)||null,e,n,r,s,l)),!0}return!1}function Bg(e){var n=wt(e.target);if(n!==null){var r=u(n);if(r!==null){if(n=r.tag,n===13){if(n=f(r),n!==null){e.blockedOn=n,xe(e.priority,function(){zg(r)});return}}else if(n===31){if(n=h(r),n!==null){e.blockedOn=n,xe(e.priority,function(){zg(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ml(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=Td(e.nativeEvent);if(r===null){r=e.nativeEvent;var s=new r.constructor(r.type,r);Cc=s,r.target.dispatchEvent(s),Cc=null}else return n=Ve(r),n!==null&&jg(n),e.blockedOn=r,!1;n.shift()}return!0}function qg(e,n,r){Ml(e)&&r.delete(n)}function W1(){kd=!1,pr!==null&&Ml(pr)&&(pr=null),gr!==null&&Ml(gr)&&(gr=null),yr!==null&&Ml(yr)&&(yr=null),Ys.forEach(qg),Vs.forEach(qg)}function Dl(e,n){e.blockedOn===n&&(e.blockedOn=null,kd||(kd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,W1)))}var jl=null;function Pg(e){jl!==e&&(jl=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jl===e&&(jl=null);for(var n=0;n<e.length;n+=3){var r=e[n],s=e[n+1],l=e[n+2];if(typeof s!="function"){if(Cd(s||r)===null)continue;break}var d=Ve(r);d!==null&&(e.splice(n,3),n-=3,Tu(d,{pending:!0,data:l,method:r.method,action:s},s,l))}}))}function Ki(e){function n(T){return Dl(T,e)}pr!==null&&Dl(pr,e),gr!==null&&Dl(gr,e),yr!==null&&Dl(yr,e),Ys.forEach(n),Vs.forEach(n);for(var r=0;r<vr.length;r++){var s=vr[r];s.blockedOn===e&&(s.blockedOn=null)}for(;0<vr.length&&(r=vr[0],r.blockedOn===null);)Bg(r),r.blockedOn===null&&vr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(s=0;s<r.length;s+=3){var l=r[s],d=r[s+1],y=l[le]||null;if(typeof d=="function")y||Pg(r);else if(y){var b=null;if(d&&d.hasAttribute("formAction")){if(l=d,y=d[le]||null)b=y.formAction;else if(Cd(l)!==null)continue}else b=y.action;typeof b=="function"?r[s+1]=b:(r.splice(s,3),s-=3),Pg(r)}}}function Ig(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return l=y})},focusReset:"manual",scroll:"manual"})}function n(){l!==null&&(l(),l=null),s||setTimeout(r,20)}function r(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),l!==null&&(l(),l=null)}}}function Ad(e){this._internalRoot=e}zl.prototype.render=Ad.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));var r=n.current,s=_n();Mg(r,s,e,n,null,null)},zl.prototype.unmount=Ad.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Mg(e.current,2,null,e,null,null),pl(),n[ve]=null}};function zl(e){this._internalRoot=e}zl.prototype.unstable_scheduleHydration=function(e){if(e){var n=te();e={blockedOn:null,target:e,priority:n};for(var r=0;r<vr.length&&n!==0&&n<vr[r].priority;r++);vr.splice(r,0,e),r===0&&Bg(e)}};var Hg=a.version;if(Hg!=="19.2.4")throw Error(o(527,Hg,"19.2.4"));F.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var eS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{ka=Ll.inject(eS),ht=Ll}catch{}}return $s.createRoot=function(e,n){if(!c(e))throw Error(o(299));var r=!1,s="",l=Xm,d=$m,y=Zm;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=_g(e,1,!1,null,null,r,s,null,l,d,y,Ig),e[ve]=n.current,ld(e),new Ad(n)},$s.hydrateRoot=function(e,n,r){if(!c(e))throw Error(o(299));var s=!1,l="",d=Xm,y=$m,b=Zm,T=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError),r.formState!==void 0&&(T=r.formState)),n=_g(e,1,!0,n,r??null,s,l,T,d,y,b,Ig),n.context=Og(null),r=n.current,s=_n(),s=U(s),l=ar(s),l.callback=null,rr(r,l,s),r=s,n.current.lanes=r,ft(n,r),ga(n),e[ve]=n.current,ld(e),new zl(n)},$s.version="19.2.4",$s}var Jg;function uS(){if(Jg)return _d.exports;Jg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),_d.exports=cS(),_d.exports}var dS=uS(),li=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fS={setTimeout:(t,a)=>setTimeout(t,a),clearTimeout:t=>clearTimeout(t),setInterval:(t,a)=>setInterval(t,a),clearInterval:t=>clearInterval(t)},hS=class{#t=fS;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,a){return this.#t.setTimeout(t,a)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,a){return this.#t.setInterval(t,a)}clearInterval(t){this.#t.clearInterval(t)}},ai=new hS;function mS(t){setTimeout(t,0)}var ii=typeof window>"u"||"Deno"in globalThis;function an(){}function pS(t,a){return typeof t=="function"?t(a):t}function Vd(t){return typeof t=="number"&&t>=0&&t!==1/0}function Av(t,a){return Math.max(t+(a||0)-Date.now(),0)}function Cr(t,a){return typeof t=="function"?t(a):t}function Vn(t,a){return typeof t=="function"?t(a):t}function Wg(t,a){const{type:i="all",exact:o,fetchStatus:c,predicate:u,queryKey:f,stale:h}=t;if(f){if(o){if(a.queryHash!==Tf(f,a.options))return!1}else if(!fo(a.queryKey,f))return!1}if(i!=="all"){const p=a.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||c&&c!==a.state.fetchStatus||u&&!u(a))}function ey(t,a){const{exact:i,status:o,predicate:c,mutationKey:u}=t;if(u){if(!a.options.mutationKey)return!1;if(i){if(si(a.options.mutationKey)!==si(u))return!1}else if(!fo(a.options.mutationKey,u))return!1}return!(o&&a.state.status!==o||c&&!c(a))}function Tf(t,a){return(a?.queryKeyHashFn||si)(t)}function si(t){return JSON.stringify(t,(a,i)=>Fd(i)?Object.keys(i).sort().reduce((o,c)=>(o[c]=i[c],o),{}):i)}function fo(t,a){return t===a?!0:typeof t!=typeof a?!1:t&&a&&typeof t=="object"&&typeof a=="object"?Object.keys(a).every(i=>fo(t[i],a[i])):!1}var gS=Object.prototype.hasOwnProperty;function Cf(t,a,i=0){if(t===a)return t;if(i>500)return a;const o=ty(t)&&ty(a);if(!o&&!(Fd(t)&&Fd(a)))return a;const u=(o?t:Object.keys(t)).length,f=o?a:Object.keys(a),h=f.length,p=o?new Array(h):{};let g=0;for(let x=0;x<h;x++){const v=o?x:f[x],w=t[v],k=a[v];if(w===k){p[v]=w,(o?x<u:gS.call(t,v))&&g++;continue}if(w===null||k===null||typeof w!="object"||typeof k!="object"){p[v]=k;continue}const z=Cf(w,k,i+1);p[v]=z,z===w&&g++}return u===h&&g===u?t:p}function ho(t,a){if(!a||Object.keys(t).length!==Object.keys(a).length)return!1;for(const i in t)if(t[i]!==a[i])return!1;return!0}function ty(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Fd(t){if(!ny(t))return!1;const a=t.constructor;if(a===void 0)return!0;const i=a.prototype;return!(!ny(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function ny(t){return Object.prototype.toString.call(t)==="[object Object]"}function yS(t){return new Promise(a=>{ai.setTimeout(a,t)})}function Xd(t,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(t,a):i.structuralSharing!==!1?Cf(t,a):a}function vS(t,a,i=0){const o=[...t,a];return i&&o.length>i?o.slice(1):o}function bS(t,a,i=0){const o=[a,...t];return i&&o.length>i?o.slice(0,-1):o}var kf=Symbol();function Rv(t,a){return!t.queryFn&&a?.initialPromise?()=>a.initialPromise:!t.queryFn||t.queryFn===kf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Af(t,a){return typeof t=="function"?t(...a):!!t}function xS(t,a,i){let o=!1,c;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(c??=a(),o||(o=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),t}var SS=class extends li{#t;#e;#n;constructor(){super(),this.#n=t=>{if(!ii&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Rf=new SS;function $d(){let t,a;const i=new Promise((c,u)=>{t=c,a=u});i.status="pending",i.catch(()=>{});function o(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{o({status:"fulfilled",value:c}),t(c)},i.reject=c=>{o({status:"rejected",reason:c}),a(c)},i}var wS=mS;function ES(){let t=[],a=0,i=h=>{h()},o=h=>{h()},c=wS;const u=h=>{a?t.push(h):c(()=>{i(h)})},f=()=>{const h=t;t=[],h.length&&c(()=>{o(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;a++;try{p=h()}finally{a--,a||f()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{c=h}}}var Ct=ES(),TS=class extends li{#t=!0;#e;#n;constructor(){super(),this.#n=t=>{if(!ii&&window.addEventListener){const a=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#t}},sc=new TS;function CS(t){return Math.min(1e3*2**t,3e4)}function Nv(t){return(t??"online")==="online"?sc.isOnline():!0}var Zd=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function _v(t){let a=!1,i=0,o;const c=$d(),u=()=>c.status!=="pending",f=M=>{if(!u()){const q=new Zd(M);w(q),t.onCancel?.(q)}},h=()=>{a=!0},p=()=>{a=!1},g=()=>Rf.isFocused()&&(t.networkMode==="always"||sc.isOnline())&&t.canRun(),x=()=>Nv(t.networkMode)&&t.canRun(),v=M=>{u()||(o?.(),c.resolve(M))},w=M=>{u()||(o?.(),c.reject(M))},k=()=>new Promise(M=>{o=q=>{(u()||g())&&M(q)},t.onPause?.()}).then(()=>{o=void 0,u()||t.onContinue?.()}),z=()=>{if(u())return;let M;const q=i===0?t.initialPromise:void 0;try{M=q??t.fn()}catch(B){M=Promise.reject(B)}Promise.resolve(M).then(v).catch(B=>{if(u())return;const K=t.retry??(ii?0:3),W=t.retryDelay??CS,me=typeof W=="function"?W(i,B):W,he=K===!0||typeof K=="number"&&i<K||typeof K=="function"&&K(i,B);if(a||!he){w(B);return}i++,t.onFail?.(i,B),yS(me).then(()=>g()?void 0:k()).then(()=>{a?w(B):z()})})};return{promise:c,status:()=>c.status,cancel:f,continue:()=>(o?.(),c),cancelRetry:h,continueRetry:p,canStart:x,start:()=>(x()?z():k().then(z),c)}}var Ov=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vd(this.gcTime)&&(this.#t=ai.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ii?1/0:300*1e3))}clearGcTimeout(){this.#t&&(ai.clearTimeout(this.#t),this.#t=void 0)}},kS=class extends Ov{#t;#e;#n;#r;#a;#i;#o;constructor(t){super(),this.#o=!1,this.#i=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=ry(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#i,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=ry(this.options);a.data!==void 0&&(this.setState(ay(a.data,a.dataUpdatedAt)),this.#t=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,a){const i=Xd(this.state.data,t,this.options);return this.#s({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(t,a){this.#s({type:"setState",state:t,setStateOptions:a})}cancel(t){const a=this.#a?.promise;return this.#a?.cancel(t),a?a.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>Vn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Cr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Av(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(a=>a!==t),this.observers.length||(this.#a&&(this.#o?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,a){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const i=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#o=!0,i.signal)})},c=()=>{const h=Rv(this.options,a),g=(()=>{const x={client:this.#r,queryKey:this.queryKey,meta:this.meta};return o(x),x})();return this.#o=!1,this.options.persister?this.options.persister(h,g,this):h(g)},f=(()=>{const h={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:c};return o(h),h})();this.options.behavior?.onFetch(f,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#s({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=_v({initialPromise:a?.initialPromise,fn:f.fetchFn,onCancel:h=>{h instanceof Zd&&h.revert&&this.setState({...this.#e,fetchStatus:"idle"}),i.abort()},onFail:(h,p)=>{this.#s({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Zd){if(h.silent)return this.#a.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(t){const a=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Mv(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...ay(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?o:void 0,o;case"error":const c=t.error;return{...i,error:c,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=a(this.state),Ct.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Mv(t,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Nv(a.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ay(t,a){return{data:t,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ry(t){const a=typeof t.initialData=="function"?t.initialData():t.initialData,i=a!==void 0,o=i?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var mc=class extends li{constructor(t,a){super(),this.options=a,this.#t=t,this.#s=null,this.#o=$d(),this.bindMethods(),this.setOptions(a)}#t;#e=void 0;#n=void 0;#r=void 0;#a;#i;#o;#s;#m;#d;#f;#c;#u;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),iy(this.#e,this.options)?this.#p():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jd(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jd(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const a=this.options,i=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),a._defaulted&&!ho(this.options,a)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&sy(this.#e,i,this.options,a)&&this.#p(),this.updateResult(),o&&(this.#e!==i||Vn(this.options.enabled,this.#e)!==Vn(a.enabled,this.#e)||Cr(this.options.staleTime,this.#e)!==Cr(a.staleTime,this.#e))&&this.#g();const c=this.#y();o&&(this.#e!==i||Vn(this.options.enabled,this.#e)!==Vn(a.enabled,this.#e)||c!==this.#l)&&this.#v(c)}getOptimisticResult(t){const a=this.#t.getQueryCache().build(this.#t,t),i=this.createResult(a,t);return RS(this,i)&&(this.#r=i,this.#i=this.options,this.#a=this.#e.state),i}getCurrentResult(){return this.#r}trackResult(t,a){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),a?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=this.#t.defaultQueryOptions(t),i=this.#t.getQueryCache().build(this.#t,a);return i.fetch().then(()=>this.createResult(i,a))}fetch(t){return this.#p({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#p(t){this.#w();let a=this.#e.fetch(this.options,t);return t?.throwOnError||(a=a.catch(an)),a}#g(){this.#x();const t=Cr(this.options.staleTime,this.#e);if(ii||this.#r.isStale||!Vd(t))return;const i=Av(this.#r.dataUpdatedAt,t)+1;this.#c=ai.setTimeout(()=>{this.#r.isStale||this.updateResult()},i)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#S(),this.#l=t,!(ii||Vn(this.options.enabled,this.#e)===!1||!Vd(this.#l)||this.#l===0)&&(this.#u=ai.setInterval(()=>{(this.options.refetchIntervalInBackground||Rf.isFocused())&&this.#p()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#c&&(ai.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(ai.clearInterval(this.#u),this.#u=void 0)}createResult(t,a){const i=this.#e,o=this.options,c=this.#r,u=this.#a,f=this.#i,p=t!==i?t.state:this.#n,{state:g}=t;let x={...g},v=!1,w;if(a._optimisticResults){const Y=this.hasListeners(),ie=!Y&&iy(t,a),Oe=Y&&sy(t,i,a,o);(ie||Oe)&&(x={...x,...Mv(g.data,t.options)}),a._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:k,errorUpdatedAt:z,status:M}=x;w=x.data;let q=!1;if(a.placeholderData!==void 0&&w===void 0&&M==="pending"){let Y;c?.isPlaceholderData&&a.placeholderData===f?.placeholderData?(Y=c.data,q=!0):Y=typeof a.placeholderData=="function"?a.placeholderData(this.#f?.state.data,this.#f):a.placeholderData,Y!==void 0&&(M="success",w=Xd(c?.data,Y,a),v=!0)}if(a.select&&w!==void 0&&!q)if(c&&w===u?.data&&a.select===this.#m)w=this.#d;else try{this.#m=a.select,w=a.select(w),w=Xd(c?.data,w,a),this.#d=w,this.#s=null}catch(Y){this.#s=Y}this.#s&&(k=this.#s,w=this.#d,z=Date.now(),M="error");const B=x.fetchStatus==="fetching",K=M==="pending",W=M==="error",me=K&&B,he=w!==void 0,R={status:M,fetchStatus:x.fetchStatus,isPending:K,isSuccess:M==="success",isError:W,isInitialLoading:me,isLoading:me,data:w,dataUpdatedAt:x.dataUpdatedAt,error:k,errorUpdatedAt:z,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:B,isRefetching:B&&!K,isLoadingError:W&&!he,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:W&&he,isStale:Nf(t,a),refetch:this.refetch,promise:this.#o,isEnabled:Vn(a.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const Y=R.data!==void 0,ie=R.status==="error"&&!Y,Oe=ze=>{ie?ze.reject(R.error):Y&&ze.resolve(R.data)},Ne=()=>{const ze=this.#o=R.promise=$d();Oe(ze)},Ee=this.#o;switch(Ee.status){case"pending":t.queryHash===i.queryHash&&Oe(Ee);break;case"fulfilled":(ie||R.data!==Ee.value)&&Ne();break;case"rejected":(!ie||R.error!==Ee.reason)&&Ne();break}}return R}updateResult(){const t=this.#r,a=this.createResult(this.#e,this.options);if(this.#a=this.#e.state,this.#i=this.options,this.#a.data!==void 0&&(this.#f=this.#e),ho(a,t))return;this.#r=a;const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,c=typeof o=="function"?o():o;if(c==="all"||!c&&!this.#h.size)return!0;const u=new Set(c??this.#h);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(f=>{const h=f;return this.#r[h]!==t[h]&&u.has(h)})};this.#E({listeners:i()})}#w(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const a=this.#e;this.#e=t,this.#n=t.state,this.hasListeners()&&(a?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function AS(t,a){return Vn(a.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&a.retryOnMount===!1)}function iy(t,a){return AS(t,a)||t.state.data!==void 0&&Jd(t,a,a.refetchOnMount)}function Jd(t,a,i){if(Vn(a.enabled,t)!==!1&&Cr(a.staleTime,t)!=="static"){const o=typeof i=="function"?i(t):i;return o==="always"||o!==!1&&Nf(t,a)}return!1}function sy(t,a,i,o){return(t!==a||Vn(o.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&Nf(t,i)}function Nf(t,a){return Vn(a.enabled,t)!==!1&&t.isStaleByTime(Cr(a.staleTime,t))}function RS(t,a){return!ho(t.getCurrentResult(),a)}function oc(t){return{onFetch:(a,i)=>{const o=a.options,c=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],f=a.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const g=async()=>{let x=!1;const v=z=>{xS(z,()=>a.signal,()=>x=!0)},w=Rv(a.options,a.fetchOptions),k=async(z,M,q)=>{if(x)return Promise.reject();if(M==null&&z.pages.length)return Promise.resolve(z);const K=(()=>{const fe={client:a.client,queryKey:a.queryKey,pageParam:M,direction:q?"backward":"forward",meta:a.options.meta};return v(fe),fe})(),W=await w(K),{maxPages:me}=a.options,he=q?bS:vS;return{pages:he(z.pages,W,me),pageParams:he(z.pageParams,M,me)}};if(c&&u.length){const z=c==="backward",M=z?Dv:Wd,q={pages:u,pageParams:f},B=M(o,q);h=await k(q,B,z)}else{const z=t??u.length;do{const M=p===0?f[0]??o.initialPageParam:Wd(o,h);if(p>0&&M==null)break;h=await k(h,M),p++}while(p<z)}return h};a.options.persister?a.fetchFn=()=>a.options.persister?.(g,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=g}}}function Wd(t,{pages:a,pageParams:i}){const o=a.length-1;return a.length>0?t.getNextPageParam(a[o],a,i[o],i):void 0}function Dv(t,{pages:a,pageParams:i}){return a.length>0?t.getPreviousPageParam?.(a[0],a,i[0],i):void 0}function NS(t,a){return a?Wd(t,a)!=null:!1}function _S(t,a){return!a||!t.getPreviousPageParam?!1:Dv(t,a)!=null}var OS=class extends mc{constructor(t,a){super(t,a)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:oc()})}getOptimisticResult(t){return t.behavior=oc(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,a){const{state:i}=t,o=super.createResult(t,a),{isFetching:c,isRefetching:u,isError:f,isRefetchError:h}=o,p=i.fetchMeta?.fetchMore?.direction,g=f&&p==="forward",x=c&&p==="forward",v=f&&p==="backward",w=c&&p==="backward";return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:NS(a,i.data),hasPreviousPage:_S(a,i.data),isFetchNextPageError:g,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:w,isRefetchError:h&&!g&&!v,isRefetching:u&&!x&&!w}}},MS=class extends Ov{#t;#e;#n;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#e=[],this.state=t.state||jv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(a=>a!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const a=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=_v({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,f)=>{this.#a({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const o=this.state.status==="pending",c=!this.#r.canStart();try{if(o)a();else{this.#a({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,i);const f=await this.options.onMutate?.(t,i);f!==this.state.context&&this.#a({type:"pending",context:f,variables:t,isPaused:c})}const u=await this.#r.start();return await this.#n.config.onSuccess?.(u,t,this.state.context,this,i),await this.options.onSuccess?.(u,t,this.state.context,i),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,t,this.state.context,i),this.#a({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,t,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onError?.(u,t,this.state.context,i)}catch(f){Promise.reject(f)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,i)}catch(f){Promise.reject(f)}throw this.#a({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#a(t){const a=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Ct.batch(()=>{this.#e.forEach(i=>{i.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function jv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var DS=class extends li{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(t,a,i){const o=new MS({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(a),state:i});return this.add(o),o}add(t){this.#t.add(t);const a=Ul(t);if(typeof a=="string"){const i=this.#e.get(a);i?i.push(t):this.#e.set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const a=Ul(t);if(typeof a=="string"){const i=this.#e.get(a);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&this.#e.delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=Ul(t);if(typeof a=="string"){const o=this.#e.get(a)?.find(c=>c.state.status==="pending");return!o||o===t}else return!0}runNext(t){const a=Ul(t);return typeof a=="string"?this.#e.get(a)?.find(o=>o!==t&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ct.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const a={exact:!0,...t};return this.getAll().find(i=>ey(a,i))}findAll(t={}){return this.getAll().filter(a=>ey(t,a))}notify(t){Ct.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return Ct.batch(()=>Promise.all(t.map(a=>a.continue().catch(an))))}};function Ul(t){return t.options.scope?.id}var jS=class extends li{#t;#e=void 0;#n;#r;constructor(a,i){super(),this.#t=a,this.setOptions(i),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const i=this.options;this.options=this.#t.defaultMutationOptions(a),ho(this.options,i)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&si(i.mutationKey)!==si(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(a){this.#a(),this.#i(a)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(a,i){return this.#r=i,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(a)}#a(){const a=this.#n?.state??jv();this.#e={...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset}}#i(a){Ct.batch(()=>{if(this.#r&&this.hasListeners()){const i=this.#e.variables,o=this.#e.context,c={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#r.onSuccess?.(a.data,i,o,c)}catch(u){Promise.reject(u)}try{this.#r.onSettled?.(a.data,null,i,o,c)}catch(u){Promise.reject(u)}}else if(a?.type==="error"){try{this.#r.onError?.(a.error,i,o,c)}catch(u){Promise.reject(u)}try{this.#r.onSettled?.(void 0,a.error,i,o,c)}catch(u){Promise.reject(u)}}}this.listeners.forEach(i=>{i(this.#e)})})}};function oy(t,a){const i=new Set(a);return t.filter(o=>!i.has(o))}function zS(t,a,i){const o=t.slice(0);return o[a]=i,o}var LS=class extends li{#t;#e;#n;#r;#a;#i;#o;#s;#m;#d=[];constructor(t,a,i){super(),this.#t=t,this.#r=i,this.#n=[],this.#a=[],this.#e=[],this.setQueries(a)}onSubscribe(){this.listeners.size===1&&this.#a.forEach(t=>{t.subscribe(a=>{this.#l(t,a)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#a.forEach(t=>{t.destroy()})}setQueries(t,a){this.#n=t,this.#r=a,Ct.batch(()=>{const i=this.#a,o=this.#u(this.#n);o.forEach(x=>x.observer.setOptions(x.defaultedQueryOptions));const c=o.map(x=>x.observer),u=c.map(x=>x.getCurrentResult()),f=i.length!==c.length,h=c.some((x,v)=>x!==i[v]),p=f||h,g=p?!0:u.some((x,v)=>{const w=this.#e[v];return!w||!ho(x,w)});!p&&!g||(p&&(this.#d=o,this.#a=c),this.#e=u,this.hasListeners()&&(p&&(oy(i,c).forEach(x=>{x.destroy()}),oy(c,i).forEach(x=>{x.subscribe(v=>{this.#l(x,v)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#a.map(t=>t.getCurrentQuery())}getObservers(){return this.#a}getOptimisticResult(t,a){const i=this.#u(t),o=i.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=i.map(u=>u.defaultedQueryOptions.queryHash);return[o,u=>this.#c(u??o,a,c),()=>this.#f(o,i)]}#f(t,a){return a.map((i,o)=>{const c=t[o];return i.defaultedQueryOptions.notifyOnChangeProps?c:i.observer.trackResult(c,u=>{a.forEach(f=>{f.observer.trackProp(u)})})})}#c(t,a,i){if(a){const o=this.#m,c=i!==void 0&&o!==void 0&&(o.length!==i.length||i.some((u,f)=>u!==o[f]));return(!this.#i||this.#e!==this.#s||c||a!==this.#o)&&(this.#o=a,this.#s=this.#e,i!==void 0&&(this.#m=i),this.#i=Cf(this.#i,a(t))),this.#i}return t}#u(t){const a=new Map;this.#a.forEach(o=>{const c=o.options.queryHash;if(!c)return;const u=a.get(c);u?u.push(o):a.set(c,[o])});const i=[];return t.forEach(o=>{const c=this.#t.defaultQueryOptions(o),f=a.get(c.queryHash)?.shift()??new mc(this.#t,c);i.push({defaultedQueryOptions:c,observer:f})}),i}#l(t,a){const i=this.#a.indexOf(t);i!==-1&&(this.#e=zS(this.#e,i,a),this.#h())}#h(){if(this.hasListeners()){const t=this.#i,a=this.#f(this.#e,this.#d),i=this.#c(a,this.#r?.combine);t!==i&&Ct.batch(()=>{this.listeners.forEach(o=>{o(this.#e)})})}}},US=class extends li{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,a,i){const o=a.queryKey,c=a.queryHash??Tf(o,a);let u=this.get(c);return u||(u=new kS({client:t,queryKey:o,queryHash:c,options:t.defaultQueryOptions(a),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=this.#t.get(t.queryHash);a&&(t.destroy(),a===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const a={exact:!0,...t};return this.getAll().find(i=>Wg(a,i))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(i=>Wg(t,i)):a}notify(t){Ct.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},BS=class{#t;#e;#n;#r;#a;#i;#o;#s;constructor(t={}){this.#t=t.queryCache||new US,this.#e=t.mutationCache||new DS,this.#n=t.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=Rf.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#s=sc.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const a=this.defaultQueryOptions({queryKey:t});return this.#t.get(a.queryHash)?.state.data}ensureQueryData(t){const a=this.defaultQueryOptions(t),i=this.#t.build(this,a),o=i.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime(Cr(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(o))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:a,state:i})=>{const o=i.data;return[a,o]})}setQueryData(t,a,i){const o=this.defaultQueryOptions({queryKey:t}),u=this.#t.get(o.queryHash)?.state.data,f=pS(a,u);if(f!==void 0)return this.#t.build(this,o).setData(f,{...i,manual:!0})}setQueriesData(t,a,i){return Ct.batch(()=>this.#t.findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,a,i)]))}getQueryState(t){const a=this.defaultQueryOptions({queryKey:t});return this.#t.get(a.queryHash)?.state}removeQueries(t){const a=this.#t;Ct.batch(()=>{a.findAll(t).forEach(i=>{a.remove(i)})})}resetQueries(t,a){const i=this.#t;return Ct.batch(()=>(i.findAll(t).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...t},a)))}cancelQueries(t,a={}){const i={revert:!0,...a},o=Ct.batch(()=>this.#t.findAll(t).map(c=>c.cancel(i)));return Promise.all(o).then(an).catch(an)}invalidateQueries(t,a={}){return Ct.batch(()=>(this.#t.findAll(t).forEach(i=>{i.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},a)))}refetchQueries(t,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},o=Ct.batch(()=>this.#t.findAll(t).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let u=c.fetch(void 0,i);return i.throwOnError||(u=u.catch(an)),c.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(an)}fetchQuery(t){const a=this.defaultQueryOptions(t);a.retry===void 0&&(a.retry=!1);const i=this.#t.build(this,a);return i.isStaleByTime(Cr(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(an).catch(an)}fetchInfiniteQuery(t){return t.behavior=oc(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(an).catch(an)}ensureInfiniteQueryData(t){return t.behavior=oc(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return sc.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,a){this.#r.set(si(t),{queryKey:t,defaultOptions:a})}getQueryDefaults(t){const a=[...this.#r.values()],i={};return a.forEach(o=>{fo(t,o.queryKey)&&Object.assign(i,o.defaultOptions)}),i}setMutationDefaults(t,a){this.#a.set(si(t),{mutationKey:t,defaultOptions:a})}getMutationDefaults(t){const a=[...this.#a.values()],i={};return a.forEach(o=>{fo(t,o.mutationKey)&&Object.assign(i,o.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;const a={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return a.queryHash||(a.queryHash=Tf(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===kf&&(a.enabled=!1),a}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},zv=S.createContext(void 0),nt=t=>{const a=S.useContext(zv);if(t)return t;if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},qS=({client:t,children:a})=>(S.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(zv.Provider,{value:t,children:a})),Lv=S.createContext(!1),Uv=()=>S.useContext(Lv);Lv.Provider;function PS(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var IS=S.createContext(PS()),Bv=()=>S.useContext(IS),qv=(t,a,i)=>{const o=i?.state.error&&typeof t.throwOnError=="function"?Af(t.throwOnError,[i.state.error,i]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||o)&&(a.isReset()||(t.retryOnMount=!1))},Pv=t=>{S.useEffect(()=>{t.clearReset()},[t])},Iv=({result:t,errorResetBoundary:a,throwOnError:i,query:o,suspense:c})=>t.isError&&!a.isReset()&&!t.isFetching&&o&&(c&&t.data===void 0||Af(i,[t.error,o])),Hv=t=>{if(t.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),o=t.staleTime;t.staleTime=typeof o=="function"?(...c)=>i(o(...c)):i(o),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Qv=(t,a)=>t.isLoading&&t.isFetching&&!a,ef=(t,a)=>t?.suspense&&a.isPending,lc=(t,a,i)=>a.fetchOptimistic(t).catch(()=>{i.clearReset()});function HS({queries:t,...a},i){const o=nt(i),c=Uv(),u=Bv(),f=S.useMemo(()=>t.map(M=>{const q=o.defaultQueryOptions(M);return q._optimisticResults=c?"isRestoring":"optimistic",q}),[t,o,c]);f.forEach(M=>{Hv(M);const q=o.getQueryCache().get(M.queryHash);qv(M,u,q)}),Pv(u);const[h]=S.useState(()=>new LS(o,f,a)),[p,g,x]=h.getOptimisticResult(f,a.combine),v=!c&&a.subscribed!==!1;S.useSyncExternalStore(S.useCallback(M=>v?h.subscribe(Ct.batchCalls(M)):an,[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setQueries(f,a)},[f,a,h]);const k=p.some((M,q)=>ef(f[q],M))?p.flatMap((M,q)=>{const B=f[q];if(B){const K=new mc(o,B);if(ef(B,M))return lc(B,K,u);Qv(M,c)&&lc(B,K,u)}return[]}):[];if(k.length>0)throw Promise.all(k);const z=p.find((M,q)=>{const B=f[q];return B&&Iv({result:M,errorResetBoundary:u,throwOnError:B.throwOnError,query:o.getQueryCache().get(B.queryHash),suspense:B.suspense})});if(z?.error)throw z.error;return g(x())}function Kv(t,a,i){const o=Uv(),c=Bv(),u=nt(i),f=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(f);const h=u.getQueryCache().get(f.queryHash);f._optimisticResults=o?"isRestoring":"optimistic",Hv(f),qv(f,c,h),Pv(c);const p=!u.getQueryCache().get(f.queryHash),[g]=S.useState(()=>new a(u,f)),x=g.getOptimisticResult(f),v=!o&&t.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(w=>{const k=v?g.subscribe(Ct.batchCalls(w)):an;return g.updateResult(),k},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(f)},[f,g]),ef(f,x))throw lc(f,g,c);if(Iv({result:x,errorResetBoundary:c,throwOnError:f.throwOnError,query:h,suspense:f.suspense}))throw x.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(f,x),f.experimental_prefetchInRender&&!ii&&Qv(x,o)&&(p?lc(f,g,c):h?.promise)?.catch(an).finally(()=>{g.updateResult()}),f.notifyOnChangeProps?x:g.trackResult(x)}function Wt(t,a){return Kv(t,mc,a)}function gt(t,a){const i=nt(a),[o]=S.useState(()=>new jS(i,t));S.useEffect(()=>{o.setOptions(t)},[o,t]);const c=S.useSyncExternalStore(S.useCallback(f=>o.subscribe(Ct.batchCalls(f)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=S.useCallback((f,h)=>{o.mutate(f,h).catch(an)},[o]);if(c.error&&Af(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}function QS(t,a){return Kv(t,OS,a)}var _f=kv();const KS=Cv(_f);function GS(t){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",a.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}const YS=t=>{switch(t){case"success":return XS;case"info":return ZS;case"warning":return $S;case"error":return JS;default:return null}},VS=Array(12).fill(0),FS=({visible:t,className:a})=>ne.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},ne.createElement("div",{className:"sonner-spinner"},VS.map((i,o)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),XS=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$S=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ZS=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),JS=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),WS=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ew=()=>{const[t,a]=ne.useState(document.hidden);return ne.useEffect(()=>{const i=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),t};let tf=1;class tw{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const i=this.subscribers.indexOf(a);this.subscribers.splice(i,1)}),this.publish=a=>{this.subscribers.forEach(i=>i(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var i;const{message:o,...c}=a,u=typeof a?.id=="number"||((i=a.id)==null?void 0:i.length)>0?a.id:tf++,f=this.toasts.find(p=>p.id===u),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...a,id:u,title:o}),{...p,...a,id:u,dismissible:h,title:o}):p):this.addToast({title:o,...c,dismissible:h,id:u}),u},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:a,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(o=>o({id:i.id,dismiss:!0}))}),a),this.message=(a,i)=>this.create({...i,message:a}),this.error=(a,i)=>this.create({...i,message:a,type:"error"}),this.success=(a,i)=>this.create({...i,type:"success",message:a}),this.info=(a,i)=>this.create({...i,type:"info",message:a}),this.warning=(a,i)=>this.create({...i,type:"warning",message:a}),this.loading=(a,i)=>this.create({...i,type:"loading",message:a}),this.promise=(a,i)=>{if(!i)return;let o;i.loading!==void 0&&(o=this.create({...i,promise:a,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const c=Promise.resolve(a instanceof Function?a():a);let u=o!==void 0,f;const h=c.then(async g=>{if(f=["resolve",g],ne.isValidElement(g))u=!1,this.create({id:o,type:"default",message:g});else if(aw(g)&&!g.ok){u=!1;const v=typeof i.error=="function"?await i.error(`HTTP error! status: ${g.status}`):i.error,w=typeof i.description=="function"?await i.description(`HTTP error! status: ${g.status}`):i.description,z=typeof v=="object"&&!ne.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:w,...z})}else if(g instanceof Error){u=!1;const v=typeof i.error=="function"?await i.error(g):i.error,w=typeof i.description=="function"?await i.description(g):i.description,z=typeof v=="object"&&!ne.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:w,...z})}else if(i.success!==void 0){u=!1;const v=typeof i.success=="function"?await i.success(g):i.success,w=typeof i.description=="function"?await i.description(g):i.description,z=typeof v=="object"&&!ne.isValidElement(v)?v:{message:v};this.create({id:o,type:"success",description:w,...z})}}).catch(async g=>{if(f=["reject",g],i.error!==void 0){u=!1;const x=typeof i.error=="function"?await i.error(g):i.error,v=typeof i.description=="function"?await i.description(g):i.description,k=typeof x=="object"&&!ne.isValidElement(x)?x:{message:x};this.create({id:o,type:"error",description:v,...k})}}).finally(()=>{u&&(this.dismiss(o),o=void 0),i.finally==null||i.finally.call(i)}),p=()=>new Promise((g,x)=>h.then(()=>f[0]==="reject"?x(f[1]):g(f[1])).catch(x));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(a,i)=>{const o=i?.id||tf++;return this.create({jsx:a(o),id:o,...i}),o},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xn=new tw,nw=(t,a)=>{const i=a?.id||tf++;return xn.addToast({title:t,...a,id:i}),i},aw=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",rw=nw,iw=()=>xn.toasts,sw=()=>xn.getActiveToasts(),ba=Object.assign(rw,{success:xn.success,info:xn.info,warning:xn.warning,error:xn.error,custom:xn.custom,message:xn.message,promise:xn.promise,dismiss:xn.dismiss,loading:xn.loading},{getHistory:iw,getToasts:sw});GS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Bl(t){return t.label!==void 0}const ow=3,lw="24px",cw="16px",ly=4e3,uw=356,dw=14,fw=45,hw=200;function ya(...t){return t.filter(Boolean).join(" ")}function mw(t){const[a,i]=t.split("-"),o=[];return a&&o.push(a),i&&o.push(i),o}const pw=t=>{var a,i,o,c,u,f,h,p,g;const{invert:x,toast:v,unstyled:w,interacting:k,setHeights:z,visibleToasts:M,heights:q,index:B,toasts:K,expanded:W,removeToast:me,defaultRichColors:he,closeButton:fe,style:R,cancelButtonStyle:Y,actionButtonStyle:ie,className:Oe="",descriptionClassName:Ne="",duration:Ee,position:ze,gap:Be,expandByDefault:Ce,classNames:_,icons:F,closeButtonAriaLabel:Q="Close toast"}=t,[pe,be]=ne.useState(null),[C,I]=ne.useState(null),[H,$]=ne.useState(!1),[ee,J]=ne.useState(!1),[re,ke]=ne.useState(!1),[Pe,Kt]=ne.useState(!1),[sn,We]=ne.useState(!1),[Jn,un]=ne.useState(0),[Or,dn]=ne.useState(0),Ta=ne.useRef(v.duration||Ee||ly),Mr=ne.useRef(null),en=ne.useRef(null),Dr=B===0,jr=B+1<=M,Gt=v.type,da=v.dismissible!==!1,bt=v.className||"",Ca=v.descriptionClassName||"",fa=ne.useMemo(()=>q.findIndex(_e=>_e.toastId===v.id)||0,[q,v.id]),$a=ne.useMemo(()=>{var _e;return(_e=v.closeButton)!=null?_e:fe},[v.closeButton,fe]),Yt=ne.useMemo(()=>v.duration||Ee||ly,[v.duration,Ee]),on=ne.useRef(0),Dn=ne.useRef(0),ui=ne.useRef(0),jn=ne.useRef(null),[ka,ht]=ze.split("-"),fn=ne.useMemo(()=>q.reduce((_e,dt,kt)=>kt>=fa?_e:_e+dt.height,0),[q,fa]),Bt=ew(),di=v.invert||x,zr=Gt==="loading";Dn.current=ne.useMemo(()=>fa*Be+fn,[fa,fn]),ne.useEffect(()=>{Ta.current=Yt},[Yt]),ne.useEffect(()=>{$(!0)},[]),ne.useEffect(()=>{const _e=en.current;if(_e){const dt=_e.getBoundingClientRect().height;return dn(dt),z(kt=>[{toastId:v.id,height:dt,position:v.position},...kt]),()=>z(kt=>kt.filter(At=>At.toastId!==v.id))}},[z,v.id]),ne.useLayoutEffect(()=>{if(!H)return;const _e=en.current,dt=_e.style.height;_e.style.height="auto";const kt=_e.getBoundingClientRect().height;_e.style.height=dt,dn(kt),z(At=>At.find(ft=>ft.toastId===v.id)?At.map(ft=>ft.toastId===v.id?{...ft,height:kt}:ft):[{toastId:v.id,height:kt,position:v.position},...At])},[H,v.title,v.description,z,v.id,v.jsx,v.action,v.cancel]);const Sn=ne.useCallback(()=>{J(!0),un(Dn.current),z(_e=>_e.filter(dt=>dt.toastId!==v.id)),setTimeout(()=>{me(v)},hw)},[v,me,z,Dn]);ne.useEffect(()=>{if(v.promise&&Gt==="loading"||v.duration===1/0||v.type==="loading")return;let _e;return W||k||Bt?(()=>{if(ui.current<on.current){const At=new Date().getTime()-on.current;Ta.current=Ta.current-At}ui.current=new Date().getTime()})():Ta.current!==1/0&&(on.current=new Date().getTime(),_e=setTimeout(()=>{v.onAutoClose==null||v.onAutoClose.call(v,v),Sn()},Ta.current)),()=>clearTimeout(_e)},[W,k,v,Gt,Bt,Sn]),ne.useEffect(()=>{v.delete&&(Sn(),v.onDismiss==null||v.onDismiss.call(v,v))},[Sn,v.delete]);function Wn(){var _e;if(F?.loading){var dt;return ne.createElement("div",{className:ya(_?.loader,v==null||(dt=v.classNames)==null?void 0:dt.loader,"sonner-loader"),"data-visible":Gt==="loading"},F.loading)}return ne.createElement(FS,{className:ya(_?.loader,v==null||(_e=v.classNames)==null?void 0:_e.loader),visible:Gt==="loading"})}const Aa=v.icon||F?.[Gt]||YS(Gt);var ea,zn;return ne.createElement("li",{tabIndex:0,ref:en,className:ya(Oe,bt,_?.toast,v==null||(a=v.classNames)==null?void 0:a.toast,_?.default,_?.[Gt],v==null||(i=v.classNames)==null?void 0:i[Gt]),"data-sonner-toast":"","data-rich-colors":(ea=v.richColors)!=null?ea:he,"data-styled":!(v.jsx||v.unstyled||w),"data-mounted":H,"data-promise":!!v.promise,"data-swiped":sn,"data-removed":ee,"data-visible":jr,"data-y-position":ka,"data-x-position":ht,"data-index":B,"data-front":Dr,"data-swiping":re,"data-dismissible":da,"data-type":Gt,"data-invert":di,"data-swipe-out":Pe,"data-swipe-direction":C,"data-expanded":!!(W||Ce&&H),"data-testid":v.testId,style:{"--index":B,"--toasts-before":B,"--z-index":K.length-B,"--offset":`${ee?Jn:Dn.current}px`,"--initial-height":Ce?"auto":`${Or}px`,...R,...v.style},onDragEnd:()=>{ke(!1),be(null),jn.current=null},onPointerDown:_e=>{_e.button!==2&&(zr||!da||(Mr.current=new Date,un(Dn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(ke(!0),jn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,dt,kt;if(Pe||!da)return;jn.current=null;const At=Number(((_e=en.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((dt=en.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ft=new Date().getTime()-((kt=Mr.current)==null?void 0:kt.getTime()),tn=pe==="x"?At:wn,Ra=Math.abs(tn)/ft;if(Math.abs(tn)>=fw||Ra>.11){un(Dn.current),v.onDismiss==null||v.onDismiss.call(v,v),I(pe==="x"?At>0?"right":"left":wn>0?"down":"up"),Sn(),Kt(!0);return}else{var E,N;(E=en.current)==null||E.style.setProperty("--swipe-amount-x","0px"),(N=en.current)==null||N.style.setProperty("--swipe-amount-y","0px")}We(!1),ke(!1),be(null)},onPointerMove:_e=>{var dt,kt,At;if(!jn.current||!da||((dt=window.getSelection())==null?void 0:dt.toString().length)>0)return;const ft=_e.clientY-jn.current.y,tn=_e.clientX-jn.current.x;var Ra;const E=(Ra=t.swipeDirections)!=null?Ra:mw(ze);!pe&&(Math.abs(tn)>1||Math.abs(ft)>1)&&be(Math.abs(tn)>Math.abs(ft)?"x":"y");let N={x:0,y:0};const U=Z=>1/(1.5+Math.abs(Z)/20);if(pe==="y"){if(E.includes("top")||E.includes("bottom"))if(E.includes("top")&&ft<0||E.includes("bottom")&&ft>0)N.y=ft;else{const Z=ft*U(ft);N.y=Math.abs(Z)<Math.abs(ft)?Z:ft}}else if(pe==="x"&&(E.includes("left")||E.includes("right")))if(E.includes("left")&&tn<0||E.includes("right")&&tn>0)N.x=tn;else{const Z=tn*U(tn);N.x=Math.abs(Z)<Math.abs(tn)?Z:tn}(Math.abs(N.x)>0||Math.abs(N.y)>0)&&We(!0),(kt=en.current)==null||kt.style.setProperty("--swipe-amount-x",`${N.x}px`),(At=en.current)==null||At.style.setProperty("--swipe-amount-y",`${N.y}px`)}},$a&&!v.jsx&&Gt!=="loading"?ne.createElement("button",{"aria-label":Q,"data-disabled":zr,"data-close-button":!0,onClick:zr||!da?()=>{}:()=>{Sn(),v.onDismiss==null||v.onDismiss.call(v,v)},className:ya(_?.closeButton,v==null||(o=v.classNames)==null?void 0:o.closeButton)},(zn=F?.close)!=null?zn:WS):null,(Gt||v.icon||v.promise)&&v.icon!==null&&(F?.[Gt]!==null||v.icon)?ne.createElement("div",{"data-icon":"",className:ya(_?.icon,v==null||(c=v.classNames)==null?void 0:c.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||Wn():null,v.type!=="loading"?Aa:null):null,ne.createElement("div",{"data-content":"",className:ya(_?.content,v==null||(u=v.classNames)==null?void 0:u.content)},ne.createElement("div",{"data-title":"",className:ya(_?.title,v==null||(f=v.classNames)==null?void 0:f.title)},v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title),v.description?ne.createElement("div",{"data-description":"",className:ya(Ne,Ca,_?.description,v==null||(h=v.classNames)==null?void 0:h.description)},typeof v.description=="function"?v.description():v.description):null),ne.isValidElement(v.cancel)?v.cancel:v.cancel&&Bl(v.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||Y,onClick:_e=>{Bl(v.cancel)&&da&&(v.cancel.onClick==null||v.cancel.onClick.call(v.cancel,_e),Sn())},className:ya(_?.cancelButton,v==null||(p=v.classNames)==null?void 0:p.cancelButton)},v.cancel.label):null,ne.isValidElement(v.action)?v.action:v.action&&Bl(v.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||ie,onClick:_e=>{Bl(v.action)&&(v.action.onClick==null||v.action.onClick.call(v.action,_e),!_e.defaultPrevented&&Sn())},className:ya(_?.actionButton,v==null||(g=v.classNames)==null?void 0:g.actionButton)},v.action.label):null)};function cy(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function gw(t,a){const i={};return[t,a].forEach((o,c)=>{const u=c===1,f=u?"--mobile-offset":"--offset",h=u?cw:lw;function p(g){["top","right","bottom","left"].forEach(x=>{i[`${f}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof o=="number"||typeof o=="string"?p(o):typeof o=="object"?["top","right","bottom","left"].forEach(g=>{o[g]===void 0?i[`${f}-${g}`]=h:i[`${f}-${g}`]=typeof o[g]=="number"?`${o[g]}px`:o[g]}):p(h)}),i}const yw=ne.forwardRef(function(a,i){const{id:o,invert:c,position:u="bottom-right",hotkey:f=["altKey","KeyT"],expand:h,closeButton:p,className:g,offset:x,mobileOffset:v,theme:w="light",richColors:k,duration:z,style:M,visibleToasts:q=ow,toastOptions:B,dir:K=cy(),gap:W=dw,icons:me,containerAriaLabel:he="Notifications"}=a,[fe,R]=ne.useState([]),Y=ne.useMemo(()=>o?fe.filter(H=>H.toasterId===o):fe.filter(H=>!H.toasterId),[fe,o]),ie=ne.useMemo(()=>Array.from(new Set([u].concat(Y.filter(H=>H.position).map(H=>H.position)))),[Y,u]),[Oe,Ne]=ne.useState([]),[Ee,ze]=ne.useState(!1),[Be,Ce]=ne.useState(!1),[_,F]=ne.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=ne.useRef(null),pe=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),be=ne.useRef(null),C=ne.useRef(!1),I=ne.useCallback(H=>{R($=>{var ee;return(ee=$.find(J=>J.id===H.id))!=null&&ee.delete||xn.dismiss(H.id),$.filter(({id:J})=>J!==H.id)})},[]);return ne.useEffect(()=>xn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R($=>$.map(ee=>ee.id===H.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{KS.flushSync(()=>{R($=>{const ee=$.findIndex(J=>J.id===H.id);return ee!==-1?[...$.slice(0,ee),{...$[ee],...H},...$.slice(ee+1)]:[H,...$]})})})}),[fe]),ne.useEffect(()=>{if(w!=="system"){F(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:$})=>{F($?"dark":"light")})}catch{H.addListener(({matches:ee})=>{try{F(ee?"dark":"light")}catch(J){console.error(J)}})}},[w]),ne.useEffect(()=>{fe.length<=1&&ze(!1)},[fe]),ne.useEffect(()=>{const H=$=>{var ee;if(f.every(ke=>$[ke]||$.code===ke)){var re;ze(!0),(re=Q.current)==null||re.focus()}$.code==="Escape"&&(document.activeElement===Q.current||(ee=Q.current)!=null&&ee.contains(document.activeElement))&&ze(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[f]),ne.useEffect(()=>{if(Q.current)return()=>{be.current&&(be.current.focus({preventScroll:!0}),be.current=null,C.current=!1)}},[Q.current]),ne.createElement("section",{ref:i,"aria-label":`${he} ${pe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ie.map((H,$)=>{var ee;const[J,re]=H.split("-");return Y.length?ne.createElement("ol",{key:H,dir:K==="auto"?cy():K,tabIndex:-1,ref:Q,className:g,"data-sonner-toaster":!0,"data-sonner-theme":_,"data-y-position":J,"data-x-position":re,style:{"--front-toast-height":`${((ee=Oe[0])==null?void 0:ee.height)||0}px`,"--width":`${uw}px`,"--gap":`${W}px`,...M,...gw(x,v)},onBlur:ke=>{C.current&&!ke.currentTarget.contains(ke.relatedTarget)&&(C.current=!1,be.current&&(be.current.focus({preventScroll:!0}),be.current=null))},onFocus:ke=>{ke.target instanceof HTMLElement&&ke.target.dataset.dismissible==="false"||C.current||(C.current=!0,be.current=ke.relatedTarget)},onMouseEnter:()=>ze(!0),onMouseMove:()=>ze(!0),onMouseLeave:()=>{Be||ze(!1)},onDragEnd:()=>ze(!1),onPointerDown:ke=>{ke.target instanceof HTMLElement&&ke.target.dataset.dismissible==="false"||Ce(!0)},onPointerUp:()=>Ce(!1)},Y.filter(ke=>!ke.position&&$===0||ke.position===H).map((ke,Pe)=>{var Kt,sn;return ne.createElement(pw,{key:ke.id,icons:me,index:Pe,toast:ke,defaultRichColors:k,duration:(Kt=B?.duration)!=null?Kt:z,className:B?.className,descriptionClassName:B?.descriptionClassName,invert:c,visibleToasts:q,closeButton:(sn=B?.closeButton)!=null?sn:p,interacting:Be,position:H,style:B?.style,unstyled:B?.unstyled,classNames:B?.classNames,cancelButtonStyle:B?.cancelButtonStyle,actionButtonStyle:B?.actionButtonStyle,closeButtonAriaLabel:B?.closeButtonAriaLabel,removeToast:I,toasts:Y.filter(We=>We.position==ke.position),heights:Oe.filter(We=>We.position==ke.position),setHeights:Ne,expandByDefault:h,gap:W,expanded:Ee,swipeDirections:a.swipeDirections})})):null}))}),vw=new BS({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}});var Gv=t=>{throw TypeError(t)},bw=(t,a,i)=>a.has(t)||Gv("Cannot "+i),jd=(t,a,i)=>(bw(t,a,"read from private field"),i?i.call(t):a.get(t)),xw=(t,a,i)=>a.has(t)?Gv("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,i),uy="popstate";function Sw(t={}){function a(o,c){let{pathname:u,search:f,hash:h}=o.location;return mo("",{pathname:u,search:f,hash:h},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function i(o,c){return typeof c=="string"?c:wa(c)}return Ew(a,i,null,t)}function Ie(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function Ut(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function ww(){return Math.random().toString(36).substring(2,10)}function dy(t,a){return{usr:t.state,key:t.key,idx:a}}function mo(t,a,i=null,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?Nr(a):a,state:i,key:a&&a.key||o||ww()}}function wa({pathname:t="/",search:a="",hash:i=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Nr(t){let a={};if(t){let i=t.indexOf("#");i>=0&&(a.hash=t.substring(i),t=t.substring(0,i));let o=t.indexOf("?");o>=0&&(a.search=t.substring(o),t=t.substring(0,o)),t&&(a.pathname=t)}return a}function Ew(t,a,i,o={}){let{window:c=document.defaultView,v5Compat:u=!1}=o,f=c.history,h="POP",p=null,g=x();g==null&&(g=0,f.replaceState({...f.state,idx:g},""));function x(){return(f.state||{idx:null}).idx}function v(){h="POP";let q=x(),B=q==null?null:q-g;g=q,p&&p({action:h,location:M.location,delta:B})}function w(q,B){h="PUSH";let K=mo(M.location,q,B);g=x()+1;let W=dy(K,g),me=M.createHref(K);try{f.pushState(W,"",me)}catch(he){if(he instanceof DOMException&&he.name==="DataCloneError")throw he;c.location.assign(me)}u&&p&&p({action:h,location:M.location,delta:1})}function k(q,B){h="REPLACE";let K=mo(M.location,q,B);g=x();let W=dy(K,g),me=M.createHref(K);f.replaceState(W,"",me),u&&p&&p({action:h,location:M.location,delta:0})}function z(q){return Yv(q)}let M={get action(){return h},get location(){return t(c,f)},listen(q){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(uy,v),p=q,()=>{c.removeEventListener(uy,v),p=null}},createHref(q){return a(c,q)},createURL:z,encodeLocation(q){let B=z(q);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:w,replace:k,go(q){return f.go(q)}};return M}function Yv(t,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(i,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:wa(t);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}var ao,fy=class{constructor(t){if(xw(this,ao,new Map),t)for(let[a,i]of t)this.set(a,i)}get(t){if(jd(this,ao).has(t))return jd(this,ao).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,a){jd(this,ao).set(t,a)}};ao=new WeakMap;var Tw=new Set(["lazy","caseSensitive","path","id","index","children"]);function Cw(t){return Tw.has(t)}var kw=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Aw(t){return kw.has(t)}function Rw(t){return t.index===!0}function po(t,a,i=[],o={},c=!1){return t.map((u,f)=>{let h=[...i,String(f)],p=typeof u.id=="string"?u.id:h.join("-");if(Ie(u.index!==!0||!u.children,"Cannot specify children on an index route"),Ie(c||!o[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),Rw(u)){let g={...u,id:p};return o[p]=hy(g,a(g)),g}else{let g={...u,id:p,children:void 0};return o[p]=hy(g,a(g)),u.children&&(g.children=po(u.children,a,h,o,c)),g}})}function hy(t,a){return Object.assign(t,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...t.lazy,...a.lazy}}:{}})}function Sr(t,a,i="/"){return ro(t,a,i,!1)}function ro(t,a,i,o){let c=typeof a=="string"?Nr(a):a,u=$n(c.pathname||"/",i);if(u==null)return null;let f=Vv(t);_w(f);let h=null;for(let p=0;h==null&&p<f.length;++p){let g=Iw(u);h=qw(f[p],g,o)}return h}function Nw(t,a){let{route:i,pathname:o,params:c}=t;return{id:i.id,pathname:o,params:c,data:a[i.id],loaderData:a[i.id],handle:i.handle}}function Vv(t,a=[],i=[],o="",c=!1){let u=(f,h,p=c,g)=>{let x={relativePath:g===void 0?f.path||"":g,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&p)return;Ie(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let v=xa([o,x.relativePath]),w=i.concat(x);f.children&&f.children.length>0&&(Ie(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Vv(f.children,a,w,v,p)),!(f.path==null&&!f.index)&&a.push({path:v,score:Uw(v,f.index),routesMeta:w})};return t.forEach((f,h)=>{if(f.path===""||!f.path?.includes("?"))u(f,h);else for(let p of Fv(f.path))u(f,h,!0,p)}),a}function Fv(t){let a=t.split("/");if(a.length===0)return[];let[i,...o]=a,c=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return c?[u,""]:[u];let f=Fv(o.join("/")),h=[];return h.push(...f.map(p=>p===""?u:[u,p].join("/"))),c&&h.push(...f),h.map(p=>t.startsWith("/")&&p===""?"/":p)}function _w(t){t.sort((a,i)=>a.score!==i.score?i.score-a.score:Bw(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var Ow=/^:[\w-]+$/,Mw=3,Dw=2,jw=1,zw=10,Lw=-2,my=t=>t==="*";function Uw(t,a){let i=t.split("/"),o=i.length;return i.some(my)&&(o+=Lw),a&&(o+=Dw),i.filter(c=>!my(c)).reduce((c,u)=>c+(Ow.test(u)?Mw:u===""?jw:zw),o)}function Bw(t,a){return t.length===a.length&&t.slice(0,-1).every((o,c)=>o===a[c])?t[t.length-1]-a[a.length-1]:0}function qw(t,a,i=!1){let{routesMeta:o}=t,c={},u="/",f=[];for(let h=0;h<o.length;++h){let p=o[h],g=h===o.length-1,x=u==="/"?a:a.slice(u.length)||"/",v=cc({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},x),w=p.route;if(!v&&g&&i&&!o[o.length-1].route.index&&(v=cc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},x)),!v)return null;Object.assign(c,v.params),f.push({params:c,pathname:xa([u,v.pathname]),pathnameBase:Kw(xa([u,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(u=xa([u,v.pathnameBase]))}return f}function cc(t,a){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,o]=Pw(t.path,t.caseSensitive,t.end),c=a.match(i);if(!c)return null;let u=c[0],f=u.replace(/(.)\/+$/,"$1"),h=c.slice(1);return{params:o.reduce((g,{paramName:x,isOptional:v},w)=>{if(x==="*"){let z=h[w]||"";f=u.slice(0,u.length-z.length).replace(/(.)\/+$/,"$1")}const k=h[w];return v&&!k?g[x]=void 0:g[x]=(k||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:f,pattern:t}}function Pw(t,a=!1,i=!0){Ut(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],c="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(o.push({paramName:"*"}),c+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":t!==""&&t!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),o]}function Iw(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Ut(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function $n(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=t.charAt(i);return o&&o!=="/"?null:t.slice(i)||"/"}function Hw({basename:t,pathname:a}){return a==="/"?t:xa([t,a])}var Xv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Of=t=>Xv.test(t);function Qw(t,a="/"){let{pathname:i,search:o="",hash:c=""}=typeof t=="string"?Nr(t):t,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=py(i.substring(1),"/"):u=py(i,a)):u=a,{pathname:u,search:Gw(o),hash:Yw(c)}}function py(t,a){let i=a.replace(/\/+$/,"").split("/");return t.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function zd(t,a,i,o){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $v(t){return t.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Mf(t){let a=$v(t);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Df(t,a,i,o=!1){let c;typeof t=="string"?c=Nr(t):(c={...t},Ie(!c.pathname||!c.pathname.includes("?"),zd("?","pathname","search",c)),Ie(!c.pathname||!c.pathname.includes("#"),zd("#","pathname","hash",c)),Ie(!c.search||!c.search.includes("#"),zd("#","search","hash",c)));let u=t===""||c.pathname==="",f=u?"/":c.pathname,h;if(f==null)h=i;else{let v=a.length-1;if(!o&&f.startsWith("..")){let w=f.split("/");for(;w[0]==="..";)w.shift(),v-=1;c.pathname=w.join("/")}h=v>=0?a[v]:"/"}let p=Qw(c,h),g=f&&f!=="/"&&f.endsWith("/"),x=(u||f===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(g||x)&&(p.pathname+="/"),p}var xa=t=>t.join("/").replace(/\/\/+/g,"/"),Kw=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Gw=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Yw=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,xo=class{constructor(t,a,i,o=!1){this.status=t,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function go(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function So(t){return t.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Zv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Jv(t,a){let i=t;if(typeof i!="string"||!Xv.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,c=!1;if(Zv)try{let u=new URL(window.location.href),f=i.startsWith("//")?new URL(u.protocol+i):new URL(i),h=$n(f.pathname,a);f.origin===u.origin&&h!=null?i=h+f.search+f.hash:c=!0}catch{Ut(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:c,to:i}}var Er=Symbol("Uninstrumented");function Vw(t,a){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(c=>c({id:a.id,index:a.index,path:a.path,instrument(u){let f=Object.keys(i);for(let h of f)u[h]&&i[h].push(u[h])}}));let o={};if(typeof a.lazy=="function"&&i.lazy.length>0){let c=Fi(i.lazy,a.lazy,()=>{});c&&(o.lazy=c)}if(typeof a.lazy=="object"){let c=a.lazy;["middleware","loader","action"].forEach(u=>{let f=c[u],h=i[`lazy.${u}`];if(typeof f=="function"&&h.length>0){let p=Fi(h,f,()=>{});p&&(o.lazy=Object.assign(o.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(c=>{let u=a[c];if(typeof u=="function"&&i[c].length>0){let f=u[Er]??u,h=Fi(i[c],f,(...p)=>gy(p[0]));h&&(c==="loader"&&f.hydrate===!0&&(h.hydrate=!0),h[Er]=f,o[c]=h)}}),a.middleware&&a.middleware.length>0&&i.middleware.length>0&&(o.middleware=a.middleware.map(c=>{let u=c[Er]??c,f=Fi(i.middleware,u,(...h)=>gy(h[0]));return f?(f[Er]=u,f):c})),o}function Fw(t,a){let i={navigate:[],fetch:[]};if(a.forEach(o=>o({instrument(c){let u=Object.keys(c);for(let f of u)c[f]&&i[f].push(c[f])}})),i.navigate.length>0){let o=t.navigate[Er]??t.navigate,c=Fi(i.navigate,o,(...u)=>{let[f,h]=u;return{to:typeof f=="number"||typeof f=="string"?f:f?wa(f):".",...yy(t,h??{})}});c&&(c[Er]=o,t.navigate=c)}if(i.fetch.length>0){let o=t.fetch[Er]??t.fetch,c=Fi(i.fetch,o,(...u)=>{let[f,,h,p]=u;return{href:h??".",fetcherKey:f,...yy(t,p??{})}});c&&(c[Er]=o,t.fetch=c)}return t}function Fi(t,a,i){return t.length===0?null:async(...o)=>{let c=await Wv(t,i(...o),()=>a(...o),t.length-1);if(c.type==="error")throw c.value;return c.value}}async function Wv(t,a,i,o){let c=t[o],u;if(c){let f,h=async()=>(f?console.error("You cannot call instrumented handlers more than once"):f=Wv(t,a,i,o-1),u=await f,Ie(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await c(h,a)}catch(p){console.error("An instrumentation function threw an error:",p)}f||await h(),await f}else try{u={type:"success",value:await i()}}catch(f){u={type:"error",value:f}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function gy(t){let{request:a,context:i,params:o,unstable_pattern:c}=t;return{request:Xw(a),params:{...o},unstable_pattern:c,context:$w(i)}}function yy(t,a){return{currentUrl:wa(t.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function Xw(t){return{method:t.method,url:t.url,headers:{get:(...a)=>t.headers.get(...a)}}}function $w(t){if(Jw(t)){let a={...t};return Object.freeze(a),a}else return{get:a=>t.get(a)}}var Zw=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jw(t){if(t===null||typeof t!="object")return!1;const a=Object.getPrototypeOf(t);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===Zw}var eb=["POST","PUT","PATCH","DELETE"],Ww=new Set(eb),eE=["GET",...eb],tE=new Set(eE),tb=new Set([301,302,303,307,308]),nE=new Set([307,308]),Ld={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},aE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Zs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rE=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),nb="remix-router-transitions",ab=Symbol("ResetLoaderData");function iE(t){const a=t.window?t.window:typeof window<"u"?window:void 0,i=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Ie(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=t.hydrationRouteProperties||[],c=t.mapRouteProperties||rE,u=c;if(t.unstable_instrumentations){let E=t.unstable_instrumentations;u=N=>({...c(N),...Vw(E.map(U=>U.route).filter(Boolean),N)})}let f={},h=po(t.routes,u,void 0,f),p,g=t.basename||"/";g.startsWith("/")||(g=`/${g}`);let x=t.dataStrategy||uE,v={...t.future},w=null,k=new Set,z=null,M=null,q=null,B=t.hydrationData!=null,K=Sr(h,t.history.location,g),W=!1,me=null,he;if(K==null&&!t.patchRoutesOnNavigation){let E=Yn(404,{pathname:t.history.location.pathname}),{matches:N,route:U}=ql(h);he=!0,K=N,me={[U.id]:E}}else if(K&&!t.hydrationData&&At(K,h,t.history.location.pathname).active&&(K=null),K)if(K.some(E=>E.route.lazy))he=!1;else if(!K.some(E=>jf(E.route)))he=!0;else{let E=t.hydrationData?t.hydrationData.loaderData:null,N=t.hydrationData?t.hydrationData.errors:null;if(N){let U=K.findIndex(Z=>N[Z.route.id]!==void 0);he=K.slice(0,U+1).every(Z=>!af(Z.route,E,N))}else he=K.every(U=>!af(U.route,E,N))}else{he=!1,K=[];let E=At(null,h,t.history.location.pathname);E.active&&E.matches&&(W=!0,K=E.matches)}let fe,R={historyAction:t.history.action,location:t.history.location,matches:K,initialized:he,navigation:Ld,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||me,fetchers:new Map,blockers:new Map},Y="POP",ie=null,Oe=!1,Ne,Ee=!1,ze=new Map,Be=null,Ce=!1,_=!1,F=new Set,Q=new Map,pe=0,be=-1,C=new Map,I=new Set,H=new Map,$=new Map,ee=new Set,J=new Map,re,ke=null;function Pe(){if(w=t.history.listen(({action:E,location:N,delta:U})=>{if(re){re(),re=void 0;return}Ut(J.size===0||U!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Z=Aa({currentLocation:R.location,nextLocation:N,historyAction:E});if(Z&&U!=null){let te=new Promise(xe=>{re=xe});t.history.go(U*-1),Wn(Z,{state:"blocked",location:N,proceed(){Wn(Z,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),te.then(()=>t.history.go(U))},reset(){let xe=new Map(R.blockers);xe.set(Z,Zs),We({blockers:xe})}}),ie?.resolve(),ie=null;return}return dn(E,N)}),i){RE(a,ze);let E=()=>NE(a,ze);a.addEventListener("pagehide",E),Be=()=>a.removeEventListener("pagehide",E)}return R.initialized||dn("POP",R.location,{initialHydration:!0}),fe}function Kt(){w&&w(),Be&&Be(),k.clear(),Ne&&Ne.abort(),R.fetchers.forEach((E,N)=>jn(N)),R.blockers.forEach((E,N)=>Sn(N))}function sn(E){return k.add(E),()=>k.delete(E)}function We(E,N={}){E.matches&&(E.matches=E.matches.map(te=>{let xe=f[te.route.id],oe=te.route;return oe.element!==xe.element||oe.errorElement!==xe.errorElement||oe.hydrateFallbackElement!==xe.hydrateFallbackElement?{...te,route:xe}:te})),R={...R,...E};let U=[],Z=[];R.fetchers.forEach((te,xe)=>{te.state==="idle"&&(ee.has(xe)?U.push(xe):Z.push(xe))}),ee.forEach(te=>{!R.fetchers.has(te)&&!Q.has(te)&&U.push(te)}),[...k].forEach(te=>te(R,{deletedFetchers:U,newErrors:E.errors??null,viewTransitionOpts:N.viewTransitionOpts,flushSync:N.flushSync===!0})),U.forEach(te=>jn(te)),Z.forEach(te=>R.fetchers.delete(te))}function Jn(E,N,{flushSync:U}={}){let Z=R.actionData!=null&&R.navigation.formMethod!=null&&rn(R.navigation.formMethod)&&R.navigation.state==="loading"&&E.state?._isRedirect!==!0,te;N.actionData?Object.keys(N.actionData).length>0?te=N.actionData:te=null:Z?te=R.actionData:te=null;let xe=N.loaderData?Ay(R.loaderData,N.loaderData,N.matches||[],N.errors):R.loaderData,oe=R.blockers;oe.size>0&&(oe=new Map(oe),oe.forEach((Ae,we)=>oe.set(we,Zs)));let se=Ce?!1:kt(E,N.matches||R.matches),le=Oe===!0||R.navigation.formMethod!=null&&rn(R.navigation.formMethod)&&E.state?._isRedirect!==!0;p&&(h=p,p=void 0),Ce||Y==="POP"||(Y==="PUSH"?t.history.push(E,E.state):Y==="REPLACE"&&t.history.replace(E,E.state));let ve;if(Y==="POP"){let Ae=ze.get(R.location.pathname);Ae&&Ae.has(E.pathname)?ve={currentLocation:R.location,nextLocation:E}:ze.has(E.pathname)&&(ve={currentLocation:E,nextLocation:R.location})}else if(Ee){let Ae=ze.get(R.location.pathname);Ae?Ae.add(E.pathname):(Ae=new Set([E.pathname]),ze.set(R.location.pathname,Ae)),ve={currentLocation:R.location,nextLocation:E}}We({...N,actionData:te,loaderData:xe,historyAction:Y,location:E,initialized:!0,navigation:Ld,revalidation:"idle",restoreScrollPosition:se,preventScrollReset:le,blockers:oe},{viewTransitionOpts:ve,flushSync:U===!0}),Y="POP",Oe=!1,Ee=!1,Ce=!1,_=!1,ie?.resolve(),ie=null,ke?.resolve(),ke=null}async function un(E,N){if(ie?.resolve(),ie=null,typeof E=="number"){ie||(ie=Oy());let Ye=ie.promise;return t.history.go(E),Ye}let U=nf(R.location,R.matches,g,E,N?.fromRouteId,N?.relative),{path:Z,submission:te,error:xe}=vy(!1,U,N),oe=R.location,se=mo(R.location,Z,N&&N.state);se={...se,...t.history.encodeLocation(se)};let le=N&&N.replace!=null?N.replace:void 0,ve="PUSH";le===!0?ve="REPLACE":le===!1||te!=null&&rn(te.formMethod)&&te.formAction===R.location.pathname+R.location.search&&(ve="REPLACE");let Ae=N&&"preventScrollReset"in N?N.preventScrollReset===!0:void 0,we=(N&&N.flushSync)===!0,Je=Aa({currentLocation:oe,nextLocation:se,historyAction:ve});if(Je){Wn(Je,{state:"blocked",location:se,proceed(){Wn(Je,{state:"proceeding",proceed:void 0,reset:void 0,location:se}),un(E,N)},reset(){let Ye=new Map(R.blockers);Ye.set(Je,Zs),We({blockers:Ye})}});return}await dn(ve,se,{submission:te,pendingError:xe,preventScrollReset:Ae,replace:N&&N.replace,enableViewTransition:N&&N.viewTransition,flushSync:we,callSiteDefaultShouldRevalidate:N&&N.unstable_defaultShouldRevalidate})}function Or(){ke||(ke=Oy()),$a(),We({revalidation:"loading"});let E=ke.promise;return R.navigation.state==="submitting"?E:R.navigation.state==="idle"?(dn(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),E):(dn(Y||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:Ee===!0}),E)}async function dn(E,N,U){Ne&&Ne.abort(),Ne=null,Y=E,Ce=(U&&U.startUninterruptedRevalidation)===!0,dt(R.location,R.matches),Oe=(U&&U.preventScrollReset)===!0,Ee=(U&&U.enableViewTransition)===!0;let Z=p||h,te=U&&U.overrideNavigation,xe=U?.initialHydration&&R.matches&&R.matches.length>0&&!W?R.matches:Sr(Z,N,g),oe=(U&&U.flushSync)===!0;if(xe&&R.initialized&&!_&&vE(R.location,N)&&!(U&&U.submission&&rn(U.submission.formMethod))){Jn(N,{matches:xe},{flushSync:oe});return}let se=At(xe,Z,N.pathname);if(se.active&&se.matches&&(xe=se.matches),!xe){let{error:St,notFoundMatches:wt,route:Ve}=ea(N.pathname);Jn(N,{matches:wt,loaderData:{},errors:{[Ve.id]:St}},{flushSync:oe});return}Ne=new AbortController;let le=Vi(t.history,N,Ne.signal,U&&U.submission),ve=t.getContext?await t.getContext():new fy,Ae;if(U&&U.pendingError)Ae=[wr(xe).route.id,{type:"error",error:U.pendingError}];else if(U&&U.submission&&rn(U.submission.formMethod)){let St=await Ta(le,N,U.submission,xe,ve,se.active,U&&U.initialHydration===!0,{replace:U.replace,flushSync:oe});if(St.shortCircuited)return;if(St.pendingActionResult){let[wt,Ve]=St.pendingActionResult;if(Mn(Ve)&&go(Ve.error)&&Ve.error.status===404){Ne=null,Jn(N,{matches:St.matches,loaderData:{},errors:{[wt]:Ve.error}});return}}xe=St.matches||xe,Ae=St.pendingActionResult,te=Ud(N,U.submission),oe=!1,se.active=!1,le=Vi(t.history,le.url,le.signal)}let{shortCircuited:we,matches:Je,loaderData:Ye,errors:xt}=await Mr(le,N,xe,ve,se.active,te,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,U&&U.initialHydration===!0,oe,Ae,U&&U.callSiteDefaultShouldRevalidate);we||(Ne=null,Jn(N,{matches:Je||xe,...Ry(Ae),loaderData:Ye,errors:xt}))}async function Ta(E,N,U,Z,te,xe,oe,se={}){$a();let le=kE(N,U);if(We({navigation:le},{flushSync:se.flushSync===!0}),xe){let we=await wn(Z,N.pathname,E.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){if(we.partialMatches.length===0){let{matches:Ye,route:xt}=ql(h);return{matches:Ye,pendingActionResult:[xt.id,{type:"error",error:we.error}]}}let Je=wr(we.partialMatches).route.id;return{matches:we.partialMatches,pendingActionResult:[Je,{type:"error",error:we.error}]}}else if(we.matches)Z=we.matches;else{let{notFoundMatches:Je,error:Ye,route:xt}=ea(N.pathname);return{matches:Je,pendingActionResult:[xt.id,{type:"error",error:Ye}]}}}let ve,Ae=Zl(Z,N);if(!Ae.route.action&&!Ae.route.lazy)ve={type:"error",error:Yn(405,{method:E.method,pathname:N.pathname,routeId:Ae.route.id})};else{let we=Xi(u,f,E,Z,Ae,oe?[]:o,te),Je=await Ca(E,we,te,null);if(ve=Je[Ae.route.id],!ve){for(let Ye of Z)if(Je[Ye.route.id]){ve=Je[Ye.route.id];break}}if(E.signal.aborted)return{shortCircuited:!0}}if(ri(ve)){let we;return se&&se.replace!=null?we=se.replace:we=Ty(ve.response.headers.get("Location"),new URL(E.url),g,t.history)===R.location.pathname+R.location.search,await bt(E,ve,!0,{submission:U,replace:we}),{shortCircuited:!0}}if(Mn(ve)){let we=wr(Z,Ae.route.id);return(se&&se.replace)!==!0&&(Y="PUSH"),{matches:Z,pendingActionResult:[we.route.id,ve,Ae.route.id]}}return{matches:Z,pendingActionResult:[Ae.route.id,ve]}}async function Mr(E,N,U,Z,te,xe,oe,se,le,ve,Ae,we,Je){let Ye=xe||Ud(N,oe),xt=oe||se||_y(Ye),St=!Ce&&!ve;if(te){if(St){let Rt=en(we);We({navigation:Ye,...Rt!==void 0?{actionData:Rt}:{}},{flushSync:Ae})}let Fe=await wn(U,N.pathname,E.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){if(Fe.partialMatches.length===0){let{matches:aa,route:Vt}=ql(h);return{matches:aa,loaderData:{},errors:{[Vt.id]:Fe.error}}}let Rt=wr(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[Rt]:Fe.error}}}else if(Fe.matches)U=Fe.matches;else{let{error:Rt,notFoundMatches:aa,route:Vt}=ea(N.pathname);return{matches:aa,loaderData:{},errors:{[Vt.id]:Rt}}}}let wt=p||h,{dsMatches:Ve,revalidatingFetchers:It}=by(E,Z,u,f,t.history,R,U,xt,N,ve?[]:o,ve===!0,_,F,ee,H,I,wt,g,t.patchRoutesOnNavigation!=null,we,Je);if(be=++pe,!t.dataStrategy&&!Ve.some(Fe=>Fe.shouldLoad)&&!Ve.some(Fe=>Fe.route.middleware&&Fe.route.middleware.length>0)&&It.length===0){let Fe=Bt();return Jn(N,{matches:U,loaderData:{},errors:we&&Mn(we[1])?{[we[0]]:we[1].error}:null,...Ry(we),...Fe?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(St){let Fe={};if(!te){Fe.navigation=Ye;let Rt=en(we);Rt!==void 0&&(Fe.actionData=Rt)}It.length>0&&(Fe.fetchers=Dr(It)),We(Fe,{flushSync:Ae})}It.forEach(Fe=>{ht(Fe.key),Fe.controller&&Q.set(Fe.key,Fe.controller)});let hn=()=>It.forEach(Fe=>ht(Fe.key));Ne&&Ne.signal.addEventListener("abort",hn);let{loaderResults:yt,fetcherResults:ta}=await fa(Ve,It,E,Z);if(E.signal.aborted)return{shortCircuited:!0};Ne&&Ne.signal.removeEventListener("abort",hn),It.forEach(Fe=>Q.delete(Fe.key));let En=Pl(yt);if(En)return await bt(E,En.result,!0,{replace:le}),{shortCircuited:!0};if(En=Pl(ta),En)return I.add(En.key),await bt(E,En.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:na,errors:Ln}=ky(R,U,yt,we,It,ta);ve&&R.errors&&(Ln={...R.errors,...Ln});let Na=Bt(),Lr=di(be),Ur=Na||Lr||It.length>0;return{matches:U,loaderData:na,errors:Ln,...Ur?{fetchers:new Map(R.fetchers)}:{}}}function en(E){if(E&&!Mn(E[1]))return{[E[0]]:E[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Dr(E){return E.forEach(N=>{let U=R.fetchers.get(N.key),Z=Js(void 0,U?U.data:void 0);R.fetchers.set(N.key,Z)}),new Map(R.fetchers)}async function jr(E,N,U,Z){ht(E);let te=(Z&&Z.flushSync)===!0,xe=p||h,oe=nf(R.location,R.matches,g,U,N,Z?.relative),se=Sr(xe,oe,g),le=At(se,xe,oe);if(le.active&&le.matches&&(se=le.matches),!se){on(E,N,Yn(404,{pathname:oe}),{flushSync:te});return}let{path:ve,submission:Ae,error:we}=vy(!0,oe,Z);if(we){on(E,N,we,{flushSync:te});return}let Je=t.getContext?await t.getContext():new fy,Ye=(Z&&Z.preventScrollReset)===!0;if(Ae&&rn(Ae.formMethod)){await Gt(E,N,ve,se,Je,le.active,te,Ye,Ae,Z&&Z.unstable_defaultShouldRevalidate);return}H.set(E,{routeId:N,path:ve}),await da(E,N,ve,se,Je,le.active,te,Ye,Ae)}async function Gt(E,N,U,Z,te,xe,oe,se,le,ve){$a(),H.delete(E);let Ae=R.fetchers.get(E);Yt(E,AE(le,Ae),{flushSync:oe});let we=new AbortController,Je=Vi(t.history,U,we.signal,le);if(xe){let Xe=await wn(Z,new URL(Je.url).pathname,Je.signal,E);if(Xe.type==="aborted")return;if(Xe.type==="error"){on(E,N,Xe.error,{flushSync:oe});return}else if(Xe.matches)Z=Xe.matches;else{on(E,N,Yn(404,{pathname:U}),{flushSync:oe});return}}let Ye=Zl(Z,U);if(!Ye.route.action&&!Ye.route.lazy){let Xe=Yn(405,{method:le.formMethod,pathname:U,routeId:N});on(E,N,Xe,{flushSync:oe});return}Q.set(E,we);let xt=pe,St=Xi(u,f,Je,Z,Ye,o,te),wt=await Ca(Je,St,te,E),Ve=wt[Ye.route.id];if(!Ve){for(let Xe of St)if(wt[Xe.route.id]){Ve=wt[Xe.route.id];break}}if(Je.signal.aborted){Q.get(E)===we&&Q.delete(E);return}if(ee.has(E)){if(ri(Ve)||Mn(Ve)){Yt(E,Fa(void 0));return}}else{if(ri(Ve))if(Q.delete(E),be>xt){Yt(E,Fa(void 0));return}else return I.add(E),Yt(E,Js(le)),bt(Je,Ve,!1,{fetcherSubmission:le,preventScrollReset:se});if(Mn(Ve)){on(E,N,Ve.error);return}}let It=R.navigation.location||R.location,hn=Vi(t.history,It,we.signal),yt=p||h,ta=R.navigation.state!=="idle"?Sr(yt,R.navigation.location,g):R.matches;Ie(ta,"Didn't find any matches after fetcher action");let En=++pe;C.set(E,En);let na=Js(le,Ve.data);R.fetchers.set(E,na);let{dsMatches:Ln,revalidatingFetchers:Na}=by(hn,te,u,f,t.history,R,ta,le,It,o,!1,_,F,ee,H,I,yt,g,t.patchRoutesOnNavigation!=null,[Ye.route.id,Ve],ve);Na.filter(Xe=>Xe.key!==E).forEach(Xe=>{let Br=Xe.key,ko=R.fetchers.get(Br),os=Js(void 0,ko?ko.data:void 0);R.fetchers.set(Br,os),ht(Br),Xe.controller&&Q.set(Br,Xe.controller)}),We({fetchers:new Map(R.fetchers)});let Lr=()=>Na.forEach(Xe=>ht(Xe.key));we.signal.addEventListener("abort",Lr);let{loaderResults:Ur,fetcherResults:Fe}=await fa(Ln,Na,hn,te);if(we.signal.aborted)return;if(we.signal.removeEventListener("abort",Lr),C.delete(E),Q.delete(E),Na.forEach(Xe=>Q.delete(Xe.key)),R.fetchers.has(E)){let Xe=Fa(Ve.data);R.fetchers.set(E,Xe)}let Rt=Pl(Ur);if(Rt)return bt(hn,Rt.result,!1,{preventScrollReset:se});if(Rt=Pl(Fe),Rt)return I.add(Rt.key),bt(hn,Rt.result,!1,{preventScrollReset:se});let{loaderData:aa,errors:Vt}=ky(R,ta,Ur,void 0,Na,Fe);di(En),R.navigation.state==="loading"&&En>be?(Ie(Y,"Expected pending action"),Ne&&Ne.abort(),Jn(R.navigation.location,{matches:ta,loaderData:aa,errors:Vt,fetchers:new Map(R.fetchers)})):(We({errors:Vt,loaderData:Ay(R.loaderData,aa,ta,Vt),fetchers:new Map(R.fetchers)}),_=!1)}async function da(E,N,U,Z,te,xe,oe,se,le){let ve=R.fetchers.get(E);Yt(E,Js(le,ve?ve.data:void 0),{flushSync:oe});let Ae=new AbortController,we=Vi(t.history,U,Ae.signal);if(xe){let Ve=await wn(Z,new URL(we.url).pathname,we.signal,E);if(Ve.type==="aborted")return;if(Ve.type==="error"){on(E,N,Ve.error,{flushSync:oe});return}else if(Ve.matches)Z=Ve.matches;else{on(E,N,Yn(404,{pathname:U}),{flushSync:oe});return}}let Je=Zl(Z,U);Q.set(E,Ae);let Ye=pe,xt=Xi(u,f,we,Z,Je,o,te),wt=(await Ca(we,xt,te,E))[Je.route.id];if(Q.get(E)===Ae&&Q.delete(E),!we.signal.aborted){if(ee.has(E)){Yt(E,Fa(void 0));return}if(ri(wt))if(be>Ye){Yt(E,Fa(void 0));return}else{I.add(E),await bt(we,wt,!1,{preventScrollReset:se});return}if(Mn(wt)){on(E,N,wt.error);return}Yt(E,Fa(wt.data))}}async function bt(E,N,U,{submission:Z,fetcherSubmission:te,preventScrollReset:xe,replace:oe}={}){U||(ie?.resolve(),ie=null),N.response.headers.has("X-Remix-Revalidate")&&(_=!0);let se=N.response.headers.get("Location");Ie(se,"Expected a Location header on the redirect Response"),se=Ty(se,new URL(E.url),g,t.history);let le=mo(R.location,se,{_isRedirect:!0});if(i){let xt=!1;if(N.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(Of(se)){const St=Yv(se,!0);xt=St.origin!==a.location.origin||$n(St.pathname,g)==null}if(xt){oe?a.location.replace(se):a.location.assign(se);return}}Ne=null;let ve=oe===!0||N.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:we,formEncType:Je}=R.navigation;!Z&&!te&&Ae&&we&&Je&&(Z=_y(R.navigation));let Ye=Z||te;if(nE.has(N.response.status)&&Ye&&rn(Ye.formMethod))await dn(ve,le,{submission:{...Ye,formAction:se},preventScrollReset:xe||Oe,enableViewTransition:U?Ee:void 0});else{let xt=Ud(le,Z);await dn(ve,le,{overrideNavigation:xt,fetcherSubmission:te,preventScrollReset:xe||Oe,enableViewTransition:U?Ee:void 0})}}async function Ca(E,N,U,Z){let te,xe={};try{te=await fE(x,E,N,Z,U,!1)}catch(oe){return N.filter(se=>se.shouldLoad).forEach(se=>{xe[se.route.id]={type:"error",error:oe}}),xe}if(E.signal.aborted)return xe;if(!rn(E.method))for(let oe of N){if(te[oe.route.id]?.type==="error")break;!te.hasOwnProperty(oe.route.id)&&!R.loaderData.hasOwnProperty(oe.route.id)&&(!R.errors||!R.errors.hasOwnProperty(oe.route.id))&&oe.shouldCallHandler()&&(te[oe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${oe.route.id}`)})}for(let[oe,se]of Object.entries(te))if(wE(se)){let le=se.result;xe[oe]={type:"redirect",response:gE(le,E,oe,N,g)}}else xe[oe]=await pE(se);return xe}async function fa(E,N,U,Z){let te=Ca(U,E,Z,null),xe=Promise.all(N.map(async le=>{if(le.matches&&le.match&&le.request&&le.controller){let Ae=(await Ca(le.request,le.matches,Z,le.key))[le.match.route.id];return{[le.key]:Ae}}else return Promise.resolve({[le.key]:{type:"error",error:Yn(404,{pathname:le.path})}})})),oe=await te,se=(await xe).reduce((le,ve)=>Object.assign(le,ve),{});return{loaderResults:oe,fetcherResults:se}}function $a(){_=!0,H.forEach((E,N)=>{Q.has(N)&&F.add(N),ht(N)})}function Yt(E,N,U={}){R.fetchers.set(E,N),We({fetchers:new Map(R.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function on(E,N,U,Z={}){let te=wr(R.matches,N);jn(E),We({errors:{[te.route.id]:U},fetchers:new Map(R.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function Dn(E){return $.set(E,($.get(E)||0)+1),ee.has(E)&&ee.delete(E),R.fetchers.get(E)||aE}function ui(E,N){ht(E,N?.reason),Yt(E,Fa(null))}function jn(E){let N=R.fetchers.get(E);Q.has(E)&&!(N&&N.state==="loading"&&C.has(E))&&ht(E),H.delete(E),C.delete(E),I.delete(E),ee.delete(E),F.delete(E),R.fetchers.delete(E)}function ka(E){let N=($.get(E)||0)-1;N<=0?($.delete(E),ee.add(E)):$.set(E,N),We({fetchers:new Map(R.fetchers)})}function ht(E,N){let U=Q.get(E);U&&(U.abort(N),Q.delete(E))}function fn(E){for(let N of E){let U=Dn(N),Z=Fa(U.data);R.fetchers.set(N,Z)}}function Bt(){let E=[],N=!1;for(let U of I){let Z=R.fetchers.get(U);Ie(Z,`Expected fetcher: ${U}`),Z.state==="loading"&&(I.delete(U),E.push(U),N=!0)}return fn(E),N}function di(E){let N=[];for(let[U,Z]of C)if(Z<E){let te=R.fetchers.get(U);Ie(te,`Expected fetcher: ${U}`),te.state==="loading"&&(ht(U),C.delete(U),N.push(U))}return fn(N),N.length>0}function zr(E,N){let U=R.blockers.get(E)||Zs;return J.get(E)!==N&&J.set(E,N),U}function Sn(E){R.blockers.delete(E),J.delete(E)}function Wn(E,N){let U=R.blockers.get(E)||Zs;Ie(U.state==="unblocked"&&N.state==="blocked"||U.state==="blocked"&&N.state==="blocked"||U.state==="blocked"&&N.state==="proceeding"||U.state==="blocked"&&N.state==="unblocked"||U.state==="proceeding"&&N.state==="unblocked",`Invalid blocker state transition: ${U.state} -> ${N.state}`);let Z=new Map(R.blockers);Z.set(E,N),We({blockers:Z})}function Aa({currentLocation:E,nextLocation:N,historyAction:U}){if(J.size===0)return;J.size>1&&Ut(!1,"A router only supports one blocker at a time");let Z=Array.from(J.entries()),[te,xe]=Z[Z.length-1],oe=R.blockers.get(te);if(!(oe&&oe.state==="proceeding")&&xe({currentLocation:E,nextLocation:N,historyAction:U}))return te}function ea(E){let N=Yn(404,{pathname:E}),U=p||h,{matches:Z,route:te}=ql(U);return{notFoundMatches:Z,route:te,error:N}}function zn(E,N,U){if(z=E,q=N,M=U||null,!B&&R.navigation===Ld){B=!0;let Z=kt(R.location,R.matches);Z!=null&&We({restoreScrollPosition:Z})}return()=>{z=null,q=null,M=null}}function _e(E,N){return M&&M(E,N.map(Z=>Nw(Z,R.loaderData)))||E.key}function dt(E,N){if(z&&q){let U=_e(E,N);z[U]=q()}}function kt(E,N){if(z){let U=_e(E,N),Z=z[U];if(typeof Z=="number")return Z}return null}function At(E,N,U){if(t.patchRoutesOnNavigation)if(E){if(Object.keys(E[0].params).length>0)return{active:!0,matches:ro(N,U,g,!0)}}else return{active:!0,matches:ro(N,U,g,!0)||[]};return{active:!1,matches:null}}async function wn(E,N,U,Z){if(!t.patchRoutesOnNavigation)return{type:"success",matches:E};let te=E;for(;;){let xe=p==null,oe=p||h,se=f;try{await t.patchRoutesOnNavigation({signal:U,path:N,matches:te,fetcherKey:Z,patch:(Ae,we)=>{U.aborted||xy(Ae,we,oe,se,u,!1)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:te}}finally{xe&&!U.aborted&&(h=[...h])}if(U.aborted)return{type:"aborted"};let le=Sr(oe,N,g),ve=null;if(le){if(Object.keys(le[0].params).length===0)return{type:"success",matches:le};if(ve=ro(oe,N,g,!0),!(ve&&te.length<ve.length&&ft(te,ve.slice(0,te.length))))return{type:"success",matches:le}}if(ve||(ve=ro(oe,N,g,!0)),!ve||ft(te,ve))return{type:"success",matches:null};te=ve}}function ft(E,N){return E.length===N.length&&E.every((U,Z)=>U.route.id===N[Z].route.id)}function tn(E){f={},p=po(E,u,void 0,f)}function Ra(E,N,U=!1){let Z=p==null;xy(E,N,p||h,f,u,U),Z&&(h=[...h],We({}))}return fe={get basename(){return g},get future(){return v},get state(){return R},get routes(){return h},get window(){return a},initialize:Pe,subscribe:sn,enableScrollRestoration:zn,navigate:un,fetch:jr,revalidate:Or,createHref:E=>t.history.createHref(E),encodeLocation:E=>t.history.encodeLocation(E),getFetcher:Dn,resetFetcher:ui,deleteFetcher:ka,dispose:Kt,getBlocker:zr,deleteBlocker:Sn,patchRoutes:Ra,_internalFetchControllers:Q,_internalSetRoutes:tn,_internalSetStateDoNotUseOrYouWillBreakYourApp(E){We(E)}},t.unstable_instrumentations&&(fe=Fw(fe,t.unstable_instrumentations.map(E=>E.router).filter(Boolean))),fe}function sE(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function nf(t,a,i,o,c,u){let f,h;if(c){f=[];for(let g of a)if(f.push(g),g.route.id===c){h=g;break}}else f=a,h=a[a.length-1];let p=Df(o||".",Mf(f),$n(t.pathname,i)||t.pathname,u==="path");if(o==null&&(p.search=t.search,p.hash=t.hash),(o==null||o===""||o===".")&&h){let g=Lf(p.search);if(h.route.index&&!g)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&g){let x=new URLSearchParams(p.search),v=x.getAll("index");x.delete("index"),v.filter(k=>k).forEach(k=>x.append("index",k));let w=x.toString();p.search=w?`?${w}`:""}}return i!=="/"&&(p.pathname=Hw({basename:i,pathname:p.pathname})),wa(p)}function vy(t,a,i){if(!i||!sE(i))return{path:a};if(i.formMethod&&!CE(i.formMethod))return{path:a,error:Yn(405,{method:i.formMethod})};let o=()=>({path:a,error:Yn(400,{type:"invalid-body"})}),u=(i.formMethod||"get").toUpperCase(),f=cb(a);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!rn(u))return o();let v=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((w,[k,z])=>`${w}${k}=${z}
|
|
11
|
+
`,""):String(i.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:i.formEncType,formData:void 0,json:void 0,text:v}}}else if(i.formEncType==="application/json"){if(!rn(u))return o();try{let v=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:i.formEncType,formData:void 0,json:v,text:void 0}}}catch{return o()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let h,p;if(i.formData)h=sf(i.formData),p=i.formData;else if(i.body instanceof FormData)h=sf(i.body),p=i.body;else if(i.body instanceof URLSearchParams)h=i.body,p=Cy(h);else if(i.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(i.body),p=Cy(h)}catch{return o()}let g={formMethod:u,formAction:f,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(rn(g.formMethod))return{path:a,submission:g};let x=Nr(a);return t&&x.search&&Lf(x.search)&&h.append("index",""),x.search=`?${h}`,{path:wa(x),submission:g}}function by(t,a,i,o,c,u,f,h,p,g,x,v,w,k,z,M,q,B,K,W,me){let he=W?Mn(W[1])?W[1].error:W[1].data:void 0,fe=c.createURL(u.location),R=c.createURL(p),Y;if(x&&u.errors){let Ce=Object.keys(u.errors)[0];Y=f.findIndex(_=>_.route.id===Ce)}else if(W&&Mn(W[1])){let Ce=W[0];Y=f.findIndex(_=>_.route.id===Ce)-1}let ie=W?W[1].statusCode:void 0,Oe=ie&&ie>=400,Ne={currentUrl:fe,currentParams:u.matches[0]?.params||{},nextUrl:R,nextParams:f[0].params,...h,actionResult:he,actionStatus:ie},Ee=So(f),ze=f.map((Ce,_)=>{let{route:F}=Ce,Q=null;if(Y!=null&&_>Y?Q=!1:F.lazy?Q=!0:jf(F)?x?Q=af(F,u.loaderData,u.errors):oE(u.loaderData,u.matches[_],Ce)&&(Q=!0):Q=!1,Q!==null)return rf(i,o,t,Ee,Ce,g,a,Q);let pe=!1;typeof me=="boolean"?pe=me:Oe?pe=!1:(v||fe.pathname+fe.search===R.pathname+R.search||fe.search!==R.search||lE(u.matches[_],Ce))&&(pe=!0);let be={...Ne,defaultShouldRevalidate:pe},C=co(Ce,be);return rf(i,o,t,Ee,Ce,g,a,C,be,me)}),Be=[];return z.forEach((Ce,_)=>{if(x||!f.some($=>$.route.id===Ce.routeId)||k.has(_))return;let F=u.fetchers.get(_),Q=F&&F.state!=="idle"&&F.data===void 0,pe=Sr(q,Ce.path,B);if(!pe){if(K&&Q)return;Be.push({key:_,routeId:Ce.routeId,path:Ce.path,matches:null,match:null,request:null,controller:null});return}if(M.has(_))return;let be=Zl(pe,Ce.path),C=new AbortController,I=Vi(c,Ce.path,C.signal),H=null;if(w.has(_))w.delete(_),H=Xi(i,o,I,pe,be,g,a);else if(Q)v&&(H=Xi(i,o,I,pe,be,g,a));else{let $;typeof me=="boolean"?$=me:Oe?$=!1:$=v;let ee={...Ne,defaultShouldRevalidate:$};co(be,ee)&&(H=Xi(i,o,I,pe,be,g,a,ee))}H&&Be.push({key:_,routeId:Ce.routeId,path:Ce.path,matches:H,match:be,request:I,controller:C})}),{dsMatches:ze,revalidatingFetchers:Be}}function jf(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function af(t,a,i){if(t.lazy)return!0;if(!jf(t))return!1;let o=a!=null&&t.id in a,c=i!=null&&i[t.id]!==void 0;return!o&&c?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!o&&!c}function oE(t,a,i){let o=!a||i.route.id!==a.route.id,c=!t.hasOwnProperty(i.route.id);return o||c}function lE(t,a){let i=t.route.path;return t.pathname!==a.pathname||i!=null&&i.endsWith("*")&&t.params["*"]!==a.params["*"]}function co(t,a){if(t.route.shouldRevalidate){let i=t.route.shouldRevalidate(a);if(typeof i=="boolean")return i}return a.defaultShouldRevalidate}function xy(t,a,i,o,c,u){let f;if(t){let g=o[t];Ie(g,`No route found to patch children into: routeId = ${t}`),g.children||(g.children=[]),f=g.children}else f=i;let h=[],p=[];if(a.forEach(g=>{let x=f.find(v=>rb(g,v));x?p.push({existingRoute:x,newRoute:g}):h.push(g)}),h.length>0){let g=po(h,c,[t||"_","patch",String(f?.length||"0")],o);f.push(...g)}if(u&&p.length>0)for(let g=0;g<p.length;g++){let{existingRoute:x,newRoute:v}=p[g],w=x,[k]=po([v],c,[],{},!0);Object.assign(w,{element:k.element?k.element:w.element,errorElement:k.errorElement?k.errorElement:w.errorElement,hydrateFallbackElement:k.hydrateFallbackElement?k.hydrateFallbackElement:w.hydrateFallbackElement})}}function rb(t,a){return"id"in t&&"id"in a&&t.id===a.id?!0:t.index===a.index&&t.path===a.path&&t.caseSensitive===a.caseSensitive?(!t.children||t.children.length===0)&&(!a.children||a.children.length===0)?!0:t.children.every((i,o)=>a.children?.some(c=>rb(i,c))):!1}var Sy=new WeakMap,ib=({key:t,route:a,manifest:i,mapRouteProperties:o})=>{let c=i[a.id];if(Ie(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let u=c.lazy[t];if(!u)return;let f=Sy.get(c);f||(f={},Sy.set(c,f));let h=f[t];if(h)return h;let p=(async()=>{let g=Cw(t),v=c[t]!==void 0&&t!=="hasErrorBoundary";if(g)Ut(!g,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),f[t]=Promise.resolve();else if(v)Ut(!1,`Route "${c.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let w=await u();w!=null&&(Object.assign(c,{[t]:w}),Object.assign(c,o(c)))}typeof c.lazy=="object"&&(c.lazy[t]=void 0,Object.values(c.lazy).every(w=>w===void 0)&&(c.lazy=void 0))})();return f[t]=p,p},wy=new WeakMap;function cE(t,a,i,o,c){let u=i[t.id];if(Ie(u,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let x=wy.get(u);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let v=(async()=>{Ie(typeof t.lazy=="function","No lazy route function found");let w=await t.lazy(),k={};for(let z in w){let M=w[z];if(M===void 0)continue;let q=Aw(z),K=u[z]!==void 0&&z!=="hasErrorBoundary";q?Ut(!q,"Route property "+z+" is not a supported property to be returned from a lazy route function. This property will be ignored."):K?Ut(!K,`Route "${u.id}" has a static property "${z}" defined but its lazy function is also returning a value for this property. The lazy route property "${z}" will be ignored.`):k[z]=M}Object.assign(u,k),Object.assign(u,{...o(u),lazy:void 0})})();return wy.set(u,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let f=Object.keys(t.lazy),h=[],p;for(let x of f){if(c&&c.includes(x))continue;let v=ib({key:x,route:t,manifest:i,mapRouteProperties:o});v&&(h.push(v),x===a&&(p=v))}let g=h.length>0?Promise.all(h).then(()=>{}):void 0;return g?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:p}}async function Ey(t){let a=t.matches.filter(c=>c.shouldLoad),i={};return(await Promise.all(a.map(c=>c.resolve()))).forEach((c,u)=>{i[a[u].route.id]=c}),i}async function uE(t){return t.matches.some(a=>a.route.middleware)?sb(t,()=>Ey(t)):Ey(t)}function sb(t,a){return dE(t,a,o=>{if(TE(o))throw o;return o},xE,i);function i(o,c,u){if(u)return Promise.resolve(Object.assign(u.value,{[c]:{type:"error",result:o}}));{let{matches:f}=t,h=Math.min(Math.max(f.findIndex(g=>g.route.id===c),0),Math.max(f.findIndex(g=>g.shouldCallHandler()),0)),p=wr(f,f[h].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:o}})}}}async function dE(t,a,i,o,c){let{matches:u,request:f,params:h,context:p,unstable_pattern:g}=t,x=u.flatMap(w=>w.route.middleware?w.route.middleware.map(k=>[w.route.id,k]):[]);return await ob({request:f,params:h,context:p,unstable_pattern:g},x,a,i,o,c)}async function ob(t,a,i,o,c,u,f=0){let{request:h}=t;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let p=a[f];if(!p)return await i();let[g,x]=p,v,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await ob(t,a,i,o,c,u,f+1)},v.value}catch(k){return v={value:await u(k,g,v)},v.value}};try{let k=await x(t,w),z=k!=null?o(k):void 0;return c(z)?z:v?z??v.value:(v={value:await w()},v.value)}catch(k){return await u(k,g,v)}}function lb(t,a,i,o,c){let u=ib({key:"middleware",route:o.route,manifest:a,mapRouteProperties:t}),f=cE(o.route,rn(i.method)?"action":"loader",a,t,c);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function rf(t,a,i,o,c,u,f,h,p=null,g){let x=!1,v=lb(t,a,i,c,u);return{...c,_lazyPromises:v,shouldLoad:h,shouldRevalidateArgs:p,shouldCallHandler(w){return x=!0,p?typeof g=="boolean"?co(c,{...p,defaultShouldRevalidate:g}):typeof w=="boolean"?co(c,{...p,defaultShouldRevalidate:w}):co(c,p):h},resolve(w){let{lazy:k,loader:z,middleware:M}=c.route,q=x||h||w&&!rn(i.method)&&(k||z),B=M&&M.length>0&&!z&&!k;return q&&(rn(i.method)||!B)?hE({request:i,unstable_pattern:o,match:c,lazyHandlerPromise:v?.handler,lazyRoutePromise:v?.route,handlerOverride:w,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function Xi(t,a,i,o,c,u,f,h=null){return o.map(p=>p.route.id!==c.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:h,shouldCallHandler:()=>!1,_lazyPromises:lb(t,a,i,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:rf(t,a,i,So(o),p,u,f,!0,h))}async function fE(t,a,i,o,c,u){i.some(g=>g._lazyPromises?.middleware)&&await Promise.all(i.map(g=>g._lazyPromises?.middleware));let f={request:a,unstable_pattern:So(i),params:i[0].params,context:c,matches:i},p=await t({...f,fetcherKey:o,runClientMiddleware:g=>{let x=f;return sb(x,()=>g({...x,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(g=>[g._lazyPromises?.handler,g._lazyPromises?.route]))}catch{}return p}async function hE({request:t,unstable_pattern:a,match:i,lazyHandlerPromise:o,lazyRoutePromise:c,handlerOverride:u,scopedContext:f}){let h,p,g=rn(t.method),x=g?"action":"loader",v=w=>{let k,z=new Promise((B,K)=>k=K);p=()=>k(),t.signal.addEventListener("abort",p);let M=B=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${i.route.id}]`)):w({request:t,unstable_pattern:a,params:i.params,context:f},...B!==void 0?[B]:[]),q=(async()=>{try{return{type:"data",result:await(u?u(K=>M(K)):M())}}catch(B){return{type:"error",result:B}}})();return Promise.race([q,z])};try{let w=g?i.route.action:i.route.loader;if(o||c)if(w){let k,[z]=await Promise.all([v(w).catch(M=>{k=M}),o,c]);if(k!==void 0)throw k;h=z}else{await o;let k=g?i.route.action:i.route.loader;if(k)[h]=await Promise.all([v(k),c]);else if(x==="action"){let z=new URL(t.url),M=z.pathname+z.search;throw Yn(405,{method:t.method,pathname:M,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(w)h=await v(w);else{let k=new URL(t.url),z=k.pathname+k.search;throw Yn(404,{pathname:z})}}catch(w){return{type:"error",result:w}}finally{p&&t.signal.removeEventListener("abort",p)}return h}async function mE(t){let a=t.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?t.body==null?null:t.json():t.text()}async function pE(t){let{result:a,type:i}=t;if(zf(a)){let o;try{o=await mE(a)}catch(c){return{type:"error",error:c}}return i==="error"?{type:"error",error:new xo(a.status,a.statusText,o),statusCode:a.status,headers:a.headers}:{type:"data",data:o,statusCode:a.status,headers:a.headers}}return i==="error"?Ny(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:bE(a),statusCode:go(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:go(a)?a.status:void 0}:Ny(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function gE(t,a,i,o,c){let u=t.headers.get("Location");if(Ie(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!Of(u)){let f=o.slice(0,o.findIndex(h=>h.route.id===i)+1);u=nf(new URL(a.url),f,c,u),t.headers.set("Location",u)}return t}function Ty(t,a,i,o){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Of(t)){let u=t,f=u.startsWith("//")?new URL(a.protocol+u):new URL(u);if(c.includes(f.protocol))throw new Error("Invalid redirect location");let h=$n(f.pathname,i)!=null;if(f.origin===a.origin&&h)return f.pathname+f.search+f.hash}try{let u=o.createURL(t);if(c.includes(u.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Vi(t,a,i,o){let c=t.createURL(cb(a)).toString(),u={signal:i};if(o&&rn(o.formMethod)){let{formMethod:f,formEncType:h}=o;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(o.json)):h==="text/plain"?u.body=o.text:h==="application/x-www-form-urlencoded"&&o.formData?u.body=sf(o.formData):u.body=o.formData}return new Request(c,u)}function sf(t){let a=new URLSearchParams;for(let[i,o]of t.entries())a.append(i,typeof o=="string"?o:o.name);return a}function Cy(t){let a=new FormData;for(let[i,o]of t.entries())a.append(i,o);return a}function yE(t,a,i,o=!1,c=!1){let u={},f=null,h,p=!1,g={},x=i&&Mn(i[1])?i[1].error:void 0;return t.forEach(v=>{if(!(v.route.id in a))return;let w=v.route.id,k=a[w];if(Ie(!ri(k),"Cannot handle redirect results in processLoaderData"),Mn(k)){let z=k.error;if(x!==void 0&&(z=x,x=void 0),f=f||{},c)f[w]=z;else{let M=wr(t,w);f[M.route.id]==null&&(f[M.route.id]=z)}o||(u[w]=ab),p||(p=!0,h=go(k.error)?k.error.status:500),k.headers&&(g[w]=k.headers)}else u[w]=k.data,k.statusCode&&k.statusCode!==200&&!p&&(h=k.statusCode),k.headers&&(g[w]=k.headers)}),x!==void 0&&i&&(f={[i[0]]:x},i[2]&&(u[i[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:g}}function ky(t,a,i,o,c,u){let{loaderData:f,errors:h}=yE(a,i,o);return c.filter(p=>!p.matches||p.matches.some(g=>g.shouldLoad)).forEach(p=>{let{key:g,match:x,controller:v}=p;if(v&&v.signal.aborted)return;let w=u[g];if(Ie(w,"Did not find corresponding fetcher result"),Mn(w)){let k=wr(t.matches,x?.route.id);h&&h[k.route.id]||(h={...h,[k.route.id]:w.error}),t.fetchers.delete(g)}else if(ri(w))Ie(!1,"Unhandled fetcher revalidation redirect");else{let k=Fa(w.data);t.fetchers.set(g,k)}}),{loaderData:f,errors:h}}function Ay(t,a,i,o){let c=Object.entries(a).filter(([,u])=>u!==ab).reduce((u,[f,h])=>(u[f]=h,u),{});for(let u of i){let f=u.route.id;if(!a.hasOwnProperty(f)&&t.hasOwnProperty(f)&&u.route.loader&&(c[f]=t[f]),o&&o.hasOwnProperty(f))break}return c}function Ry(t){return t?Mn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function wr(t,a){return(a?t.slice(0,t.findIndex(o=>o.route.id===a)+1):[...t]).reverse().find(o=>o.route.hasErrorBoundary===!0)||t[0]}function ql(t){let a=t.length===1?t[0]:t.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Yn(t,{pathname:a,routeId:i,method:o,type:c,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return t===400?(f="Bad Request",o&&a&&i?h=`You made a ${o} request to "${a}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:c==="invalid-body"&&(h="Unable to encode submission body")):t===403?(f="Forbidden",h=`Route "${i}" does not match URL "${a}"`):t===404?(f="Not Found",h=`No route matches URL "${a}"`):t===405&&(f="Method Not Allowed",o&&a&&i?h=`You made a ${o.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:o&&(h=`Invalid request method "${o.toUpperCase()}"`)),new xo(t||500,f,new Error(h),!0)}function Pl(t){let a=Object.entries(t);for(let i=a.length-1;i>=0;i--){let[o,c]=a[i];if(ri(c))return{key:o,result:c}}}function cb(t){let a=typeof t=="string"?Nr(t):t;return wa({...a,hash:""})}function vE(t,a){return t.pathname!==a.pathname||t.search!==a.search?!1:t.hash===""?a.hash!=="":t.hash===a.hash?!0:a.hash!==""}function bE(t){return new xo(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function xE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([a,i])=>typeof a=="string"&&SE(i))}function SE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function wE(t){return zf(t.result)&&tb.has(t.result.status)}function Mn(t){return t.type==="error"}function ri(t){return(t&&t.type)==="redirect"}function Ny(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function zf(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function EE(t){return tb.has(t)}function TE(t){return zf(t)&&EE(t.status)&&t.headers.has("Location")}function CE(t){return tE.has(t.toUpperCase())}function rn(t){return Ww.has(t.toUpperCase())}function Lf(t){return new URLSearchParams(t).getAll("index").some(a=>a==="")}function Zl(t,a){let i=typeof a=="string"?Nr(a).search:a.search;if(t[t.length-1].route.index&&Lf(i||""))return t[t.length-1];let o=$v(t);return o[o.length-1]}function _y(t){let{formMethod:a,formAction:i,formEncType:o,text:c,formData:u,json:f}=t;if(!(!a||!i||!o)){if(c!=null)return{formMethod:a,formAction:i,formEncType:o,formData:void 0,json:void 0,text:c};if(u!=null)return{formMethod:a,formAction:i,formEncType:o,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:i,formEncType:o,formData:void 0,json:f,text:void 0}}}function Ud(t,a){return a?{state:"loading",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kE(t,a){return{state:"submitting",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Js(t,a){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function AE(t,a){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a?a.data:void 0}}function Fa(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function RE(t,a){try{let i=t.sessionStorage.getItem(nb);if(i){let o=JSON.parse(i);for(let[c,u]of Object.entries(o||{}))u&&Array.isArray(u)&&a.set(c,new Set(u||[]))}}catch{}}function NE(t,a){if(a.size>0){let i={};for(let[o,c]of a)i[o]=[...c];try{t.sessionStorage.setItem(nb,JSON.stringify(i))}catch(o){Ut(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Oy(){let t,a,i=new Promise((o,c)=>{t=async u=>{o(u);try{await i}catch{}},a=async u=>{c(u);try{await i}catch{}}});return{promise:i,resolve:t,reject:a}}var ci=S.createContext(null);ci.displayName="DataRouter";var wo=S.createContext(null);wo.displayName="DataRouterState";var ub=S.createContext(!1);function _E(){return S.useContext(ub)}var Uf=S.createContext({isTransitioning:!1});Uf.displayName="ViewTransition";var db=S.createContext(new Map);db.displayName="Fetchers";var OE=S.createContext(null);OE.displayName="Await";var Zn=S.createContext(null);Zn.displayName="Navigation";var pc=S.createContext(null);pc.displayName="Location";var ua=S.createContext({outlet:null,matches:[],isDataRoute:!1});ua.displayName="Route";var Bf=S.createContext(null);Bf.displayName="RouteError";var fb="REACT_ROUTER_ERROR",ME="REDIRECT",DE="ROUTE_ERROR_RESPONSE";function jE(t){if(t.startsWith(`${fb}:${ME}:{`))try{let a=JSON.parse(t.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function zE(t){if(t.startsWith(`${fb}:${DE}:{`))try{let a=JSON.parse(t.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new xo(a.status,a.statusText,a.data)}catch{}}function LE(t,{relative:a}={}){Ie(Eo(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(Zn),{hash:c,pathname:u,search:f}=To(t,{relative:a}),h=u;return i!=="/"&&(h=u==="/"?i:xa([i,u])),o.createHref({pathname:h,search:f,hash:c})}function Eo(){return S.useContext(pc)!=null}function _r(){return Ie(Eo(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(pc).location}var hb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mb(t){S.useContext(Zn).static||S.useLayoutEffect(t)}function qf(){let{isDataRoute:t}=S.useContext(ua);return t?ZE():UE()}function UE(){Ie(Eo(),"useNavigate() may be used only in the context of a <Router> component.");let t=S.useContext(ci),{basename:a,navigator:i}=S.useContext(Zn),{matches:o}=S.useContext(ua),{pathname:c}=_r(),u=JSON.stringify(Mf(o)),f=S.useRef(!1);return mb(()=>{f.current=!0}),S.useCallback((p,g={})=>{if(Ut(f.current,hb),!f.current)return;if(typeof p=="number"){i.go(p);return}let x=Df(p,JSON.parse(u),c,g.relative==="path");t==null&&a!=="/"&&(x.pathname=x.pathname==="/"?a:xa([a,x.pathname])),(g.replace?i.replace:i.push)(x,g.state,g)},[a,i,u,c,t])}var BE=S.createContext(null);function qE(t){let a=S.useContext(ua).outlet;return S.useMemo(()=>a&&S.createElement(BE.Provider,{value:t},a),[a,t])}function PE(){let{matches:t}=S.useContext(ua),a=t[t.length-1];return a?a.params:{}}function To(t,{relative:a}={}){let{matches:i}=S.useContext(ua),{pathname:o}=_r(),c=JSON.stringify(Mf(i));return S.useMemo(()=>Df(t,JSON.parse(c),o,a==="path"),[t,c,o,a])}function IE(t,a,i,o,c){Ie(Eo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=S.useContext(Zn),{matches:f}=S.useContext(ua),h=f[f.length-1],p=h?h.params:{},g=h?h.pathname:"/",x=h?h.pathnameBase:"/",v=h&&h.route;{let K=v&&v.path||"";yb(g,!v||K.endsWith("*")||K.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${K}">) 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
|
+
|
|
13
|
+
Please change the parent <Route path="${K}"> to <Route path="${K==="/"?"*":`${K}/*`}">.`)}let w=_r(),k;k=w;let z=k.pathname||"/",M=z;if(x!=="/"){let K=x.replace(/^\//,"").split("/");M="/"+z.replace(/^\//,"").split("/").slice(K.length).join("/")}let q=Sr(t,{pathname:M});return Ut(v||q!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Ut(q==null||q[q.length-1].route.element!==void 0||q[q.length-1].route.Component!==void 0||q[q.length-1].route.lazy!==void 0,`Matched leaf route at location "${k.pathname}${k.search}${k.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.`),YE(q&&q.map(K=>Object.assign({},K,{params:Object.assign({},p,K.params),pathname:xa([x,u.encodeLocation?u.encodeLocation(K.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathname]),pathnameBase:K.pathnameBase==="/"?x:xa([x,u.encodeLocation?u.encodeLocation(K.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathnameBase])})),f,i,o,c)}function HE(){let t=gb(),a=go(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:c},i):null,f)}var QE=S.createElement(HE,null),pb=class extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){this.props.onError?this.props.onError(t,a):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=zE(t.digest);i&&(t=i)}let a=t!==void 0?S.createElement(ua.Provider,{value:this.props.routeContext},S.createElement(Bf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?S.createElement(KE,{error:t},a):a}};pb.contextType=ub;var Bd=new WeakMap;function KE({children:t,error:a}){let{basename:i}=S.useContext(Zn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=jE(a.digest);if(o){let c=Bd.get(a);if(c)throw c;let u=Jv(o.location,i);if(Zv&&!Bd.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Bd.set(a,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return t}function GE({routeContext:t,match:a,children:i}){let o=S.useContext(ci);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(ua.Provider,{value:t},i)}function YE(t,a=[],i=null,o=null,c=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(a.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let u=t,f=i?.errors;if(f!=null){let x=u.findIndex(v=>v.route.id&&f?.[v.route.id]!==void 0);Ie(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,x+1))}let h=!1,p=-1;if(i)for(let x=0;x<u.length;x++){let v=u[x];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(p=x),v.route.id){let{loaderData:w,errors:k}=i,z=v.route.loader&&!w.hasOwnProperty(v.route.id)&&(!k||k[v.route.id]===void 0);if(v.route.lazy||z){h=!0,p>=0?u=u.slice(0,p+1):u=[u[0]];break}}}let g=i&&o?(x,v)=>{o(x,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:So(i.matches),errorInfo:v})}:void 0;return u.reduceRight((x,v,w)=>{let k,z=!1,M=null,q=null;i&&(k=f&&v.route.id?f[v.route.id]:void 0,M=v.route.errorElement||QE,h&&(p<0&&w===0?(yb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,q=null):p===w&&(z=!0,q=v.route.hydrateFallbackElement||null)));let B=a.concat(u.slice(0,w+1)),K=()=>{let W;return k?W=M:z?W=q:v.route.Component?W=S.createElement(v.route.Component,null):v.route.element?W=v.route.element:W=x,S.createElement(GE,{match:v,routeContext:{outlet:x,matches:B,isDataRoute:i!=null},children:W})};return i&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?S.createElement(pb,{location:i.location,revalidation:i.revalidation,component:M,error:k,children:K(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:g}):K()},null)}function Pf(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function VE(t){let a=S.useContext(ci);return Ie(a,Pf(t)),a}function FE(t){let a=S.useContext(wo);return Ie(a,Pf(t)),a}function XE(t){let a=S.useContext(ua);return Ie(a,Pf(t)),a}function If(t){let a=XE(t),i=a.matches[a.matches.length-1];return Ie(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function $E(){return If("useRouteId")}function gb(){let t=S.useContext(Bf),a=FE("useRouteError"),i=If("useRouteError");return t!==void 0?t:a.errors?.[i]}function ZE(){let{router:t}=VE("useNavigate"),a=If("useNavigate"),i=S.useRef(!1);return mb(()=>{i.current=!0}),S.useCallback(async(c,u={})=>{Ut(i.current,hb),i.current&&(typeof c=="number"?await t.navigate(c):await t.navigate(c,{fromRouteId:a,...u}))},[t,a])}var My={};function yb(t,a,i){!a&&!My[t]&&(My[t]=!0,Ut(!1,i))}var Dy={};function jy(t,a){!t&&!Dy[a]&&(Dy[a]=!0,console.warn(a))}var JE="useOptimistic",zy=Ef[JE],WE=()=>{};function eT(t){return zy?zy(t):[t,WE]}function tT(t){let a={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Ut(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Ut(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Ut(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),a}var nT=["HydrateFallback","hydrateFallbackElement"],aT=class{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",t(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",a(i))}})}};function rT({router:t,flushSync:a,onError:i,unstable_useTransitions:o}){o=_E()||o;let[u,f]=S.useState(t.state),[h,p]=eT(u),[g,x]=S.useState(),[v,w]=S.useState({isTransitioning:!1}),[k,z]=S.useState(),[M,q]=S.useState(),[B,K]=S.useState(),W=S.useRef(new Map),me=S.useCallback((Y,{deletedFetchers:ie,newErrors:Oe,flushSync:Ne,viewTransitionOpts:Ee})=>{Oe&&i&&Object.values(Oe).forEach(Be=>i(Be,{location:Y.location,params:Y.matches[0]?.params??{},unstable_pattern:So(Y.matches)})),Y.fetchers.forEach((Be,Ce)=>{Be.data!==void 0&&W.current.set(Ce,Be.data)}),ie.forEach(Be=>W.current.delete(Be)),jy(Ne===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ze=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(jy(Ee==null||ze,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Ee||!ze){a&&Ne?a(()=>f(Y)):o===!1?f(Y):S.startTransition(()=>{o===!0&&p(Be=>Ly(Be,Y)),f(Y)});return}if(a&&Ne){a(()=>{M&&(k?.resolve(),M.skipTransition()),w({isTransitioning:!0,flushSync:!0,currentLocation:Ee.currentLocation,nextLocation:Ee.nextLocation})});let Be=t.window.document.startViewTransition(()=>{a(()=>f(Y))});Be.finished.finally(()=>{a(()=>{z(void 0),q(void 0),x(void 0),w({isTransitioning:!1})})}),a(()=>q(Be));return}M?(k?.resolve(),M.skipTransition(),K({state:Y,currentLocation:Ee.currentLocation,nextLocation:Ee.nextLocation})):(x(Y),w({isTransitioning:!0,flushSync:!1,currentLocation:Ee.currentLocation,nextLocation:Ee.nextLocation}))},[t.window,a,M,k,o,p,i]);S.useLayoutEffect(()=>t.subscribe(me),[t,me]),S.useEffect(()=>{v.isTransitioning&&!v.flushSync&&z(new aT)},[v]),S.useEffect(()=>{if(k&&g&&t.window){let Y=g,ie=k.promise,Oe=t.window.document.startViewTransition(async()=>{o===!1?f(Y):S.startTransition(()=>{o===!0&&p(Ne=>Ly(Ne,Y)),f(Y)}),await ie});Oe.finished.finally(()=>{z(void 0),q(void 0),x(void 0),w({isTransitioning:!1})}),q(Oe)}},[g,k,t.window,o,p]),S.useEffect(()=>{k&&g&&h.location.key===g.location.key&&k.resolve()},[k,M,h.location,g]),S.useEffect(()=>{!v.isTransitioning&&B&&(x(B.state),w({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}),K(void 0))},[v.isTransitioning,B]);let he=S.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:Y=>t.navigate(Y),push:(Y,ie,Oe)=>t.navigate(Y,{state:ie,preventScrollReset:Oe?.preventScrollReset}),replace:(Y,ie,Oe)=>t.navigate(Y,{replace:!0,state:ie,preventScrollReset:Oe?.preventScrollReset})}),[t]),fe=t.basename||"/",R=S.useMemo(()=>({router:t,navigator:he,static:!1,basename:fe,onError:i}),[t,he,fe,i]);return S.createElement(S.Fragment,null,S.createElement(ci.Provider,{value:R},S.createElement(wo.Provider,{value:h},S.createElement(db.Provider,{value:W.current},S.createElement(Uf.Provider,{value:v},S.createElement(lT,{basename:fe,location:h.location,navigationType:h.historyAction,navigator:he,unstable_useTransitions:o},S.createElement(iT,{routes:t.routes,future:t.future,state:h,onError:i})))))),null)}function Ly(t,a){return{...t,navigation:a.navigation.state!=="idle"?a.navigation:t.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:t.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:t.actionData,fetchers:a.fetchers}}var iT=S.memo(sT);function sT({routes:t,future:a,state:i,onError:o}){return IE(t,void 0,i,o,a)}function oT(t){return qE(t.context)}function lT({basename:t="/",children:a=null,location:i,navigationType:o="POP",navigator:c,static:u=!1,unstable_useTransitions:f}){Ie(!Eo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:h,navigator:c,static:u,unstable_useTransitions:f,future:{}}),[h,c,u,f]);typeof i=="string"&&(i=Nr(i));let{pathname:g="/",search:x="",hash:v="",state:w=null,key:k="default"}=i,z=S.useMemo(()=>{let M=$n(g,h);return M==null?null:{location:{pathname:M,search:x,hash:v,state:w,key:k},navigationType:o}},[h,g,x,v,w,k,o]);return Ut(z!=null,`<Router basename="${h}"> is not able to match the URL "${g}${x}${v}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:S.createElement(Zn.Provider,{value:p},S.createElement(pc.Provider,{children:a,value:z}))}var Jl="get",Wl="application/x-www-form-urlencoded";function gc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function cT(t){return gc(t)&&t.tagName.toLowerCase()==="button"}function uT(t){return gc(t)&&t.tagName.toLowerCase()==="form"}function dT(t){return gc(t)&&t.tagName.toLowerCase()==="input"}function fT(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function hT(t,a){return t.button===0&&(!a||a==="_self")&&!fT(t)}var Il=null;function mT(){if(Il===null)try{new FormData(document.createElement("form"),0),Il=!1}catch{Il=!0}return Il}var pT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qd(t){return t!=null&&!pT.has(t)?(Ut(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wl}"`),null):t}function gT(t,a){let i,o,c,u,f;if(uT(t)){let h=t.getAttribute("action");o=h?$n(h,a):null,i=t.getAttribute("method")||Jl,c=qd(t.getAttribute("enctype"))||Wl,u=new FormData(t)}else if(cT(t)||dT(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||h.getAttribute("action");if(o=p?$n(p,a):null,i=t.getAttribute("formmethod")||h.getAttribute("method")||Jl,c=qd(t.getAttribute("formenctype"))||qd(h.getAttribute("enctype"))||Wl,u=new FormData(h,t),!mT()){let{name:g,type:x,value:v}=t;if(x==="image"){let w=g?`${g}.`:"";u.append(`${w}x`,"0"),u.append(`${w}y`,"0")}else g&&u.append(g,v)}}else{if(gc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Jl,o=null,c=Wl,f=t}return u&&c==="text/plain"&&(f=u,u=void 0),{action:o,method:i.toLowerCase(),encType:c,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hf(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function yT(t,a,i,o){let c=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${o}`:c.pathname=`${c.pathname}.${o}`:c.pathname==="/"?c.pathname=`_root.${o}`:a&&$n(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${o}`,c}async function vT(t,a){if(t.id in a)return a[t.id];try{let i=await import(t.module);return a[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function bT(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function xT(t,a,i){let o=await Promise.all(t.map(async c=>{let u=a.routes[c.route.id];if(u){let f=await vT(u,i);return f.links?f.links():[]}return[]}));return TT(o.flat(1).filter(bT).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Uy(t,a,i,o,c,u){let f=(p,g)=>i[g]?p.route.id!==i[g].route.id:!0,h=(p,g)=>i[g].pathname!==p.pathname||i[g].route.path?.endsWith("*")&&i[g].params["*"]!==p.params["*"];return u==="assets"?a.filter((p,g)=>f(p,g)||h(p,g)):u==="data"?a.filter((p,g)=>{let x=o.routes[p.route.id];if(!x||!x.hasLoader)return!1;if(f(p,g)||h(p,g))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function ST(t,a,{includeHydrateFallback:i}={}){return wT(t.map(o=>{let c=a.routes[o.route.id];if(!c)return[];let u=[c.module];return c.clientActionModule&&(u=u.concat(c.clientActionModule)),c.clientLoaderModule&&(u=u.concat(c.clientLoaderModule)),i&&c.hydrateFallbackModule&&(u=u.concat(c.hydrateFallbackModule)),c.imports&&(u=u.concat(c.imports)),u}).flat(1))}function wT(t){return[...new Set(t)]}function ET(t){let a={},i=Object.keys(t).sort();for(let o of i)a[o]=t[o];return a}function TT(t,a){let i=new Set;return new Set(a),t.reduce((o,c)=>{let u=JSON.stringify(ET(c));return i.has(u)||(i.add(u),o.push({key:u,link:c})),o},[])}function vb(){let t=S.useContext(ci);return Hf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function CT(){let t=S.useContext(wo);return Hf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Qf=S.createContext(void 0);Qf.displayName="FrameworkContext";function bb(){let t=S.useContext(Qf);return Hf(t,"You must render this element inside a <HydratedRouter> element"),t}function kT(t,a){let i=S.useContext(Qf),[o,c]=S.useState(!1),[u,f]=S.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:g,onMouseLeave:x,onTouchStart:v}=a,w=S.useRef(null);S.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let M=B=>{B.forEach(K=>{f(K.isIntersecting)})},q=new IntersectionObserver(M,{threshold:.5});return w.current&&q.observe(w.current),()=>{q.disconnect()}}},[t]),S.useEffect(()=>{if(o){let M=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(M)}}},[o]);let k=()=>{c(!0)},z=()=>{c(!1),f(!1)};return i?t!=="intent"?[u,w,{}]:[u,w,{onFocus:Ws(h,k),onBlur:Ws(p,z),onMouseEnter:Ws(g,k),onMouseLeave:Ws(x,z),onTouchStart:Ws(v,k)}]:[!1,w,{}]}function Ws(t,a){return i=>{t&&t(i),i.defaultPrevented||a(i)}}function AT({page:t,...a}){let{router:i}=vb(),o=S.useMemo(()=>Sr(i.routes,t,i.basename),[i.routes,t,i.basename]);return o?S.createElement(NT,{page:t,matches:o,...a}):null}function RT(t){let{manifest:a,routeModules:i}=bb(),[o,c]=S.useState([]);return S.useEffect(()=>{let u=!1;return xT(t,a,i).then(f=>{u||c(f)}),()=>{u=!0}},[t,a,i]),o}function NT({page:t,matches:a,...i}){let o=_r(),{future:c,manifest:u,routeModules:f}=bb(),{basename:h}=vb(),{loaderData:p,matches:g}=CT(),x=S.useMemo(()=>Uy(t,a,g,u,o,"data"),[t,a,g,u,o]),v=S.useMemo(()=>Uy(t,a,g,u,o,"assets"),[t,a,g,u,o]),w=S.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let M=new Set,q=!1;if(a.forEach(K=>{let W=u.routes[K.route.id];!W||!W.hasLoader||(!x.some(me=>me.route.id===K.route.id)&&K.route.id in p&&f[K.route.id]?.shouldRevalidate||W.hasClientLoader?q=!0:M.add(K.route.id))}),M.size===0)return[];let B=yT(t,h,c.unstable_trailingSlashAwareDataRequests,"data");return q&&M.size>0&&B.searchParams.set("_routes",a.filter(K=>M.has(K.route.id)).map(K=>K.route.id).join(",")),[B.pathname+B.search]},[h,c.unstable_trailingSlashAwareDataRequests,p,o,u,x,a,t,f]),k=S.useMemo(()=>ST(v,u),[v,u]),z=RT(v);return S.createElement(S.Fragment,null,w.map(M=>S.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...i})),k.map(M=>S.createElement("link",{key:M,rel:"modulepreload",href:M,...i})),z.map(({key:M,link:q})=>S.createElement("link",{key:M,nonce:i.nonce,...q,crossOrigin:q.crossOrigin??i.crossOrigin})))}function _T(...t){return a=>{t.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var OT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{OT&&(window.__reactRouterVersion="7.13.0")}catch{}function MT(t,a){return iE({basename:a?.basename,getContext:a?.getContext,future:a?.future,history:Sw({window:a?.window}),hydrationData:DT(),routes:t,mapRouteProperties:tT,hydrationRouteProperties:nT,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation,window:a?.window,unstable_instrumentations:a?.unstable_instrumentations}).initialize()}function DT(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:jT(t.errors)}),t}function jT(t){if(!t)return null;let a=Object.entries(t),i={};for(let[o,c]of a)if(c&&c.__type==="RouteErrorResponse")i[o]=new xo(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let u=window[c.__subType];if(typeof u=="function")try{let f=new u(c.message);f.stack="",i[o]=f}catch{}}if(i[o]==null){let u=new Error(c.message);u.stack="",i[o]=u}}else i[o]=c;return i}var xb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sb=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:c,reloadDocument:u,replace:f,state:h,target:p,to:g,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:w,...k},z){let{basename:M,unstable_useTransitions:q}=S.useContext(Zn),B=typeof g=="string"&&xb.test(g),K=Jv(g,M);g=K.to;let W=LE(g,{relative:c}),[me,he,fe]=kT(o,k),R=BT(g,{replace:f,state:h,target:p,preventScrollReset:x,relative:c,viewTransition:v,unstable_defaultShouldRevalidate:w,unstable_useTransitions:q});function Y(Oe){a&&a(Oe),Oe.defaultPrevented||R(Oe)}let ie=S.createElement("a",{...k,...fe,href:K.absoluteURL||W,onClick:K.isExternal||u?a:Y,ref:_T(z,he),target:p,"data-discover":!B&&i==="render"?"true":void 0});return me&&!B?S.createElement(S.Fragment,null,ie,S.createElement(AT,{page:W})):ie});Sb.displayName="Link";var zT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:c=!1,style:u,to:f,viewTransition:h,children:p,...g},x){let v=To(f,{relative:g.relative}),w=_r(),k=S.useContext(wo),{navigator:z,basename:M}=S.useContext(Zn),q=k!=null&&QT(v)&&h===!0,B=z.encodeLocation?z.encodeLocation(v).pathname:v.pathname,K=w.pathname,W=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;i||(K=K.toLowerCase(),W=W?W.toLowerCase():null,B=B.toLowerCase()),W&&M&&(W=$n(W,M)||W);const me=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let he=K===B||!c&&K.startsWith(B)&&K.charAt(me)==="/",fe=W!=null&&(W===B||!c&&W.startsWith(B)&&W.charAt(B.length)==="/"),R={isActive:he,isPending:fe,isTransitioning:q},Y=he?a:void 0,ie;typeof o=="function"?ie=o(R):ie=[o,he?"active":null,fe?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let Oe=typeof u=="function"?u(R):u;return S.createElement(Sb,{...g,"aria-current":Y,className:ie,ref:x,style:Oe,to:f,viewTransition:h},typeof p=="function"?p(R):p)});zT.displayName="NavLink";var LT=S.forwardRef(({discover:t="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:c,state:u,method:f=Jl,action:h,onSubmit:p,relative:g,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:w,...k},z)=>{let{unstable_useTransitions:M}=S.useContext(Zn),q=IT(),B=HT(h,{relative:g}),K=f.toLowerCase()==="get"?"get":"post",W=typeof h=="string"&&xb.test(h),me=he=>{if(p&&p(he),he.defaultPrevented)return;he.preventDefault();let fe=he.nativeEvent.submitter,R=fe?.getAttribute("formmethod")||f,Y=()=>q(fe||he.currentTarget,{fetcherKey:a,method:R,navigate:i,replace:c,state:u,relative:g,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:w});M&&i!==!1?S.startTransition(()=>Y()):Y()};return S.createElement("form",{ref:z,method:K,action:B,onSubmit:o?p:me,...k,"data-discover":!W&&t==="render"?"true":void 0})});LT.displayName="Form";function UT(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wb(t){let a=S.useContext(ci);return Ie(a,UT(t)),a}function BT(t,{target:a,replace:i,state:o,preventScrollReset:c,relative:u,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p}={}){let g=qf(),x=_r(),v=To(t,{relative:u});return S.useCallback(w=>{if(hT(w,a)){w.preventDefault();let k=i!==void 0?i:wa(x)===wa(v),z=()=>g(t,{replace:k,state:o,preventScrollReset:c,relative:u,viewTransition:f,unstable_defaultShouldRevalidate:h});p?S.startTransition(()=>z()):z()}},[x,g,v,i,o,a,t,c,u,f,h,p])}var qT=0,PT=()=>`__${String(++qT)}__`;function IT(){let{router:t}=wb("useSubmit"),{basename:a}=S.useContext(Zn),i=$E(),o=t.fetch,c=t.navigate;return S.useCallback(async(u,f={})=>{let{action:h,method:p,encType:g,formData:x,body:v}=gT(u,a);if(f.navigate===!1){let w=f.fetcherKey||PT();await o(w,i,f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:v,formMethod:f.method||p,formEncType:f.encType||g,flushSync:f.flushSync})}else await c(f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:v,formMethod:f.method||p,formEncType:f.encType||g,replace:f.replace,state:f.state,fromRouteId:i,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,c,a,i])}function HT(t,{relative:a}={}){let{basename:i}=S.useContext(Zn),o=S.useContext(ua);Ie(o,"useFormAction must be used inside a RouteContext");let[c]=o.matches.slice(-1),u={...To(t||".",{relative:a})},f=_r();if(t==null){u.search=f.search;let h=new URLSearchParams(u.search),p=h.getAll("index");if(p.some(x=>x==="")){h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let x=h.toString();u.search=x?`?${x}`:""}}return(!t||t===".")&&c.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:xa([i,u.pathname])),wa(u)}function QT(t,{relative:a}={}){let i=S.useContext(Uf);Ie(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=wb("useViewTransitionState"),c=To(t,{relative:a});if(!i.isTransitioning)return!1;let u=$n(i.currentLocation.pathname,o)||i.currentLocation.pathname,f=$n(i.nextLocation.pathname,o)||i.nextLocation.pathname;return cc(c.pathname,f)!=null||cc(c.pathname,u)!=null}function KT(t){return S.createElement(rT,{flushSync:_f.flushSync,...t})}const GT="modulepreload",YT=function(t){return"/"+t},By={},cn=function(a,i,o){let c=Promise.resolve();if(i&&i.length>0){let p=function(g){return Promise.all(g.map(x=>Promise.resolve(x).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");c=p(i.map(g=>{if(g=YT(g),g in By)return;By[g]=!0;const x=g.endsWith(".css"),v=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const w=document.createElement("link");if(w.rel=x?"stylesheet":GT,x||(w.as="script"),w.crossOrigin="",w.href=g,h&&w.setAttribute("nonce",h),document.head.appendChild(w),x)return new Promise((k,z)=>{w.addEventListener("load",k),w.addEventListener("error",()=>z(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return c.then(f=>{for(const h of f||[])h.status==="rejected"&&u(h.reason);return a().catch(u)})};const Eb=(...t)=>t.filter((a,i,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===i).join(" ").trim();const VT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const FT=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,i,o)=>o?o.toUpperCase():i.toLowerCase());const qy=t=>{const a=FT(t);return a.charAt(0).toUpperCase()+a.slice(1)};var XT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const $T=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const ZT=S.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:u,iconNode:f,...h},p)=>S.createElement("svg",{ref:p,...XT,width:a,height:a,stroke:t,strokeWidth:o?Number(i)*24/Number(a):i,className:Eb("lucide",c),...!u&&!$T(h)&&{"aria-hidden":"true"},...h},[...f.map(([g,x])=>S.createElement(g,x)),...Array.isArray(u)?u:[u]]));const rt=(t,a)=>{const i=S.forwardRef(({className:o,...c},u)=>S.createElement(ZT,{ref:u,iconNode:a,className:Eb(`lucide-${VT(qy(t))}`,`lucide-${t}`,o),...c}));return i.displayName=qy(t),i};const JT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],WT=rt("arrow-down",JT);const eC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],tC=rt("arrow-left",eC);const nC=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],aC=rt("arrow-up",nC);const rC=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],iC=rt("bell",rC);const sC=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Tb=rt("bot",sC);const oC=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],lC=rt("cable",oC);const cC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],uC=rt("chevron-right",cC);const dC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fC=rt("circle-alert",dC);const hC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Wi=rt("circle-check",hC);const mC=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],Kf=rt("circle-dashed",mC);const pC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],Cb=rt("circle-slash",pC);const gC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],kb=rt("circle-x",gC);const yC=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Ab=rt("cpu",yC);const vC=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Rb=rt("download",vC);const bC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],xC=rt("external-link",bC);const SC=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],wC=rt("eye",SC);const EC=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],TC=rt("folder-git-2",EC);const CC=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],kC=rt("git-branch",CC);const AC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],of=rt("info",AC);const RC=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],Py=rt("languages",RC);const NC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ar=rt("loader-circle",NC);const _C=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],OC=rt("lock-keyhole",_C);const MC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],DC=rt("refresh-cw",MC);const jC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],yc=rt("rotate-ccw",jC);const zC=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],LC=rt("settings",zC);const UC=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],BC=rt("shield-check",UC);const qC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],PC=rt("square",qC);const IC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],HC=rt("terminal",IC);const QC=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Rr=rt("triangle-alert",QC);const KC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],GC=rt("users",KC);const YC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gf=rt("x",YC),Iy=t=>{let a;const i=new Set,o=(g,x)=>{const v=typeof g=="function"?g(a):g;if(!Object.is(v,a)){const w=a;a=x??(typeof v!="object"||v===null)?v:Object.assign({},a,v),i.forEach(k=>k(a,w))}},c=()=>a,h={setState:o,getState:c,getInitialState:()=>p,subscribe:g=>(i.add(g),()=>i.delete(g))},p=a=t(o,c,h);return h},VC=(t=>t?Iy(t):Iy),FC=t=>t;function XC(t,a=FC){const i=ne.useSyncExternalStore(t.subscribe,ne.useCallback(()=>a(t.getState()),[t,a]),ne.useCallback(()=>a(t.getInitialState()),[t,a]));return ne.useDebugValue(i),i}const Hy=t=>{const a=VC(t),i=o=>XC(a,o);return Object.assign(i,a),i},Nb=(t=>t?Hy(t):Hy),io=Nb(t=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>t(a=>({sidebarOpen:!a.sidebarOpen})),setSidebarOpen:a=>t({sidebarOpen:a}),setTheme:a=>t({theme:a}),openSettings:a=>t({settingsOpen:!0,...a?{settingsTab:a}:{}}),closeSettings:()=>t({settingsOpen:!1}),setSettingsTab:a=>t({settingsTab:a})})),Qy="/api";function _b(t){return t.endsWith("/")?t.slice(0,-1):t}function Ob(t){return!1}function $C(){return Ob()?Qy:_b(Qy)}function ZC(){return Ob()?"":_b("")}const Mb="tower:conflict-recovery:v1:",JC="tower:conflict-recovery-changed",yo=new Map;let es=!1;function Co(t){try{if(!t||t.length>256*1024)return;const a=t.split(".")[0].replace(/-/g,"+").replace(/_/g,"/"),i=JSON.parse(new TextDecoder().decode(Uint8Array.from(atob(a),o=>o.charCodeAt(0))));if(typeof i.actor=="string"&&typeof i.operationId=="string"&&i.context&&typeof i.context=="object")return i}catch{}}function s_(t){const a=Co(t);return a?[a.actor,a.operationId,a.context]:null}function Db(t){const a=Co(t.resolutionContextToken)?.context,i={...t};if(!a)return i;for(const o of["sourceWorkspaceId","targetWorkspaceId","sourceWorktreePath","targetWorktreePath","sourceBranch","targetBranch"])typeof a[o]=="string"&&a[o]&&(i[o]=a[o]);return(a.conflictOp==="MERGE"||a.conflictOp==="REBASE")&&(i.conflictOp=a.conflictOp),Array.isArray(a.conflictedFiles)&&a.conflictedFiles.every(o=>typeof o=="string")&&(i.conflictedFiles=a.conflictedFiles),typeof a.mergeAborted=="boolean"&&(i.mergeAborted=a.mergeAborted),(a.mergeStrategy==="squash"||a.mergeStrategy==="no_ff")&&(i.mergeStrategy=a.mergeStrategy),i}const jb=t=>`${Mb}${t.actor}:${t.operationId}`;function zb(){window.dispatchEvent(new Event(JC))}function WC(t,a){t=Db(t);const i=Co(t.resolutionContextToken);if(!i||i.actor==="unbound")return;const o=jb(i),c=yo.get(o),u={actor:i.actor,operationId:i.operationId,details:t,intent:"resolve_conflicts",savedAt:c?.savedAt??Date.now(),expiresAt:i.recovery?.expiresAt??i.expiresAt,receiverSessionId:a??c?.receiverSessionId};yo.set(o,u);try{sessionStorage.setItem(o,JSON.stringify(u)),es=!1}catch{es=!0}return zb(),u}function o_(t){try{for(let a=0;a<sessionStorage.length;a++){const i=sessionStorage.key(a);if(i?.startsWith(`${Mb}${t}:`))try{const o=JSON.parse(sessionStorage.getItem(i)),c=Co(o.details?.resolutionContextToken);o.actor===t&&o.intent==="resolve_conflicts"&&c?.actor===t&&c.operationId===o.operationId&&yo.set(i,{...o,details:Db(o.details)})}catch{es=!0}}}catch{es=!0}return[...yo.values()].filter(a=>a.actor===t).sort((a,i)=>i.savedAt-a.savedAt)}function l_(t){const a=Co(t);if(!a)return;const i=jb(a);yo.delete(i);try{sessionStorage.removeItem(i)}catch{es=!0}zb()}function c_(){return es}const ek=$C();class tk{baseUrl;constructor(a){this.baseUrl=a}async request(a,i={}){const{params:o,...c}=i;let u=`${this.baseUrl}${a}`;if(o){const p=new URLSearchParams(o);u+=`?${p.toString()}`}const f={...c.headers};c.body!==void 0&&(f["Content-Type"]="application/json");const h=await fetch(u,{...c,headers:f,credentials:c.credentials??"same-origin"});if(!h.ok){const p=await h.json().catch(()=>({}));throw h.status===409&&p.code==="MERGE_CONFLICT"&&(p.conflictOp==="MERGE"||p.conflictOp==="REBASE")&&Array.isArray(p.conflictedFiles)&&WC(p),new ns(h.status,typeof p.message=="string"?p.message:typeof p.error=="string"?p.error:"Request failed",p)}if(h.status!==204)return h.json()}get(a,i){return this.request(a,{...i,method:"GET"})}post(a,i,o){return this.request(a,{...o,method:"POST",body:i?JSON.stringify(i):void 0})}put(a,i,o){return this.request(a,{...o,method:"PUT",body:i?JSON.stringify(i):void 0})}patch(a,i,o){return this.request(a,{...o,method:"PATCH",body:i?JSON.stringify(i):void 0})}delete(a,i){return this.request(a,{...i,method:"DELETE"})}}class ns extends Error{status;details;constructor(a,i,o={}){super(i),this.name="ApiError",this.status=a,this.details=o}}const De=new tk(ek),ae={roomTranslations:{all:["room-translations"],scope:t=>["room-translations",t],summaries:t=>["room-translations",t,"summaries"],details:t=>["room-translations",t,"full"],full:(t,a,i,o,c)=>["room-translations",t,"full",a,i,o,c]},translationSettings:{detail:["translation-settings"]},sessionTranslations:{session:t=>["session-translations",t],blocks:(t,a)=>["session-translations",t,a]},projects:{all:["projects"],list:t=>["projects","list",t],detail:t=>["projects","detail",t],gitCapability:t=>["projects","gitCapability",t]},tasks:{all:["tasks"],boardAll:["tasks","board"],board:t=>["tasks","board",t],list:(t,a)=>["tasks","list",t,a],detail:t=>["tasks","detail",t],body:t=>["tasks","body",t],handoff:t=>["tasks","handoff",t],subtasks:t=>["tasks","subtasks",t],deletionScope:t=>["tasks","deletion-scope",t],cleanup:t=>["task-cleanup",t],stats:t=>["tasks","stats",t]},workspaces:{all:["workspaces"],projectBranches:t=>["workspaces","project-branches",t],list:t=>["workspaces","list",t],setupProgress:t=>["workspaces","setup-progress",t],detail:t=>["workspaces","detail",t],diff:t=>["workspaces","diff",t],gitStatus:t=>["workspaces","gitStatus",t]},workspaceServices:{all:["workspace-services"],list:t=>["workspace-services","list",t],logs:(t,a)=>["workspace-services","logs",t,a]},previews:{all:["previews"],status:t=>["previews","status",t]},sessions:{all:["sessions"],detail:t=>["sessions","detail",t],runtime:t=>["sessions","runtime",t]},conversations:{all:["conversations"],list:t=>["conversations","list",t],detail:t=>["conversations","detail",t]},files:{all:["files"],tree:(t,a)=>["files","tree",t,a],content:(t,a)=>["files","content",t,a]},git:{all:["git"],changes:t=>["git","changes",t],diff:(t,a,i)=>["git","diff",t,a,i],log:t=>["git","log",t],commitFiles:(t,a)=>["git","commitFiles",t,a],commitDiff:(t,a,i)=>["git","commitDiff",t,a,i]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:t=>["profiles","agent",t],variant:(t,a)=>["profiles","variant",t,a]},providers:{all:["providers"],capabilities:(t,a,i,o,c,u)=>["providers","capabilities",t??"",a??"",i??"",o??"",c??null,u??null],detail:t=>["providers","detail",t]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},accessAuth:{identityChange:["access-auth","identity-change"],conflictRecoveryIdentity:["conflict-recovery-identity"],status:["access-auth","status"],settings:["access-auth","settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:t=>["agent-cli","preview",t],task:t=>["agent-cli","task",t],logs:t=>["agent-cli","logs",t]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(t,a)=>["system","slash-command-catalog",t??null,a??null],skillCatalog:(t,a)=>["system","skill-catalog",t??null,a??null]}};function nk(){return Wt({queryKey:ae.appSettings.detail,queryFn:()=>De.get("/app-settings")})}function ak(){const t=nt();return gt({mutationFn:a=>De.put("/app-settings",a),onSuccess:()=>{t.invalidateQueries({queryKey:ae.appSettings.detail})}})}function u_(){return Wt({queryKey:[...ae.appSettings.detail,"commit-message-defaults"],queryFn:()=>De.get("/app-settings/commit-message-defaults")})}const rk={"zh-CN":{"Own status: {status}":"自身状态:{status}","Subtasks and grandchildren: {running} running, {review} in review":"子孙任务:{running} 个进行中,{review} 个待审查","Handoff note":"交接笔记","Handoff Markdown":"交接笔记 Markdown","Progress, decisions, and next steps":"进展、决策与下一步","Could not load the handoff note.":"无法加载交接笔记。","Could not save the handoff note. Your draft is preserved.":"交接笔记保存失败,草稿已保留。","The handoff changed elsewhere. Your draft is preserved. Cancel editing to view the latest note.":"交接笔记已被更新,当前草稿已保留。取消编辑可查看最新内容。","Summarize progress, decisions, verification, open problems, and next steps.":"记录进展、决策、验证结果、未解决问题及下一步。","No handoff note yet. Record what has been done and what comes next.":"暂无交接笔记。可以记录已完成的工作和下一步安排。","Create subtask":"创建子任务",Subtasks:"子任务","{count} subtasks":"{count} 个子任务","Parent task: {title}":"父任务:{title}","Subtasks of {title}":"{title} 的子任务","{count} subtasks, {running} running":"{count} 个子任务,{running} 个运行中","Could not load subtasks. Retry":"无法加载子任务,点击重试","No subtasks yet":"暂无子任务","Delete “{title}” and all {count} descendants? This cannot be undone.":"确认删除「{title}」及其全部 {count} 个子任务和孙任务?此操作不可撤销。","All related Agents and services will stop. Their worktrees and owned branches will be deleted.":"将停止所有相关 Agent 和后台服务,并删除对应的工作目录和任务分支。","Delete all":"删除全部","Task resources deleted":"任务资源已清理","Task resource cleanup failed":"任务资源清理失败","Deleting task resources…":"正在清理任务资源…","Subtasks changed. Review the deletion confirmation again.":"子任务已发生变化,请重新查看并确认删除范围。","Tasks support at most three levels":"最多支持三级任务,孙任务不能继续创建子任务","More task options":"更多任务选项","More options":"更多","More task options (modified)":"更多任务选项(有修改)","Project default":"项目默认","Workspace mode":"工作模式","Task mode":"任务模式","Solo mode":"单人模式","Choose solo or team mode":"选择单人或团队模式","Search languages":"搜索语言","Search language or code…":"搜索语言名称或代码…","Saved custom language":"已保存的自定义语言","No matching languages":"没有匹配的语言","Language matches: {count}. Search to narrow the list.":"共匹配 {count} 项,输入名称或代码缩小范围。","Language directory: IANA language subtags and Unicode CLDR 48.1 regional variants. Saved custom values are preserved.":"目录包含 IANA 注册语言子标签及 Unicode CLDR 48.1 地区变体;保留已保存的自定义语言。","Search branches":"搜索分支","No matching branches":"没有匹配的分支","Refreshing branches":"正在刷新分支","{count} local branches":"共 {count} 个本地分支","{shown} of {total} local branches":"{shown} / {total} 个本地分支","Default base branch":"默认基础分支","New tasks default to this branch. Saved task and workspace bases remain unchanged.":"新任务默认使用此分支,任务和工作区已保存的基础分支保持不变。","Could not load branches. Refresh to try again.":"无法加载分支,请刷新重试。","Default base branch saved":"默认基础分支已保存","Save default base branch":"保存默认基础分支","Could not save the default base branch. Refresh and choose an existing local branch.":"默认基础分支保存失败,请刷新并选择已存在的本地分支。","Base branch for this workspace":"当前工作区的基础分支","Changing this base branch updates the comparison, update and merge target for this workspace only. Save and review the changes before merging.":"仅修改当前工作区的差异比较、更新及合并目标。保存后请重新审查变更,再确认合并。","Save base branch and review changes":"保存基础分支并审查变更","Workspace base branch saved. Review the changes before merging.":"工作区基础分支已保存,请重新审查变更后合并。","Review the changes and sync the base branch before submitting.":"请先审查变更、同步基础分支更新,再提交。","Team creation pending":"待创建团队","Team creation result unknown. Check the original request.":"团队创建结果待核对,请恢复原创建请求。","Check team creation":"核对创建结果",语言转换:"语言转换","Could not load translation settings.":"无法加载翻译设置。","Translate outgoing messages and Agent replies. Saving applies the global switch.":"转换发送消息与 Agent 回复。总开关在保存后生效。","Enable translation":"启用语言转换","When disabled, successful historical translations remain available. Pending messages are not sent automatically.":"关闭后仍可对照历史成功译文;待发消息不会自动发送原文。","Send target language":"发送目标语言","Reply display language":"回复显示目标语言","API base URL":"API 基础地址","OpenAI compatible base URL. The server appends /chat/completions.":"填写 OpenAI 兼容服务的基础地址,服务端会追加 /chat/completions。",Model:"模型","API key (write only)":"API Key(只写)","A stored credential is configured. Its value is never displayed.":"已配置凭据,不显示已存的 Key。","No stored credential is indicated. A service without credentials may already be configured.":"未显示已存凭据,也可能已配置为免凭据服务。","Keep saved credential choice":"保留已存凭据选择","Replace API key":"替换 API Key","Clear credential configuration":"清除凭据配置","Service without credentials":"免凭据服务","New API key":"新 API Key","Clearing prevents enabling and testing until a credential choice is configured.":"清除后需要重新配置凭据或选择免凭据,才能启用或测试。","Shared prompt template":"共用提示词模板","Both directions use this template. Include {{target_language}} and {{text}}; unknown variables are invalid.":"两个方向共用此模板,必须包含 {{target_language}} 和 {{text}},不支持其他变量。","Maximum translation concurrency (1–16)":"最大翻译并发数(1–16)","Test draft translation":"测试当前草稿","Sample text is sent to the configured translation service. Testing does not save settings or send messages to an Agent.":"示例正文会交给所配翻译服务。测试不会保存设置,也不会向 Agent 投递消息。","Test direction":"测试方向","Sample text":"示例正文","Testing…":"测试中…","Test translation":"测试翻译","Translation settings saved.":"翻译设置已保存。","Settings changed in another tab. Your draft is preserved. Reload saved settings to discard this draft.":"其他标签已修改设置,当前草稿已保留。可丢弃草稿,重新读取已存设置。","Discard draft and reload saved settings":"丢弃草稿并重新读取","Enter a new API key, or explicitly choose a service without credentials.":"请输入新 API Key,或明确选择免凭据服务。","Enter sample text to test.":"请输入用于测试的示例正文。","Concurrency must be an integer from 1 to 16.":"并发数必须为 1 到 16 的整数。","Enter an HTTP(S) base URL without credentials, query or fragment.":"请填写 HTTP(S) 基础地址,不包含凭据、查询参数或片段。","Enter a model and both target languages.":"请填写模型和两个目标语言。","The template must contain only {{target_language}} and {{text}}, including both variables.":"模板必须同时包含 {{target_language}} 和 {{text}},且不能使用其他变量。","Complete the translation configuration and credential choice.":"请补全翻译配置,并配置凭据或选择免凭据服务。","Translation credential was rejected. Check the API key.":"翻译服务拒绝了凭据,请检查 API Key。","Check the translation base URL and model.":"请检查翻译基础地址和模型。","Check the translation fields and credential choice.":"请检查翻译字段和凭据选择。","The translation request timed out. Try again.":"翻译请求超时,请重试。","Could not connect to the translation service.":"无法连接翻译服务。","The translation service is busy. Try again later.":"翻译服务繁忙,请稍后重试。","The translation queue is full. Try again later.":"翻译队列已满,请稍后重试。","Translation testing is temporarily unavailable.":"翻译测试暂不可用。","The translation request was cancelled.":"翻译请求已取消。","The translation text is too large.":"待翻译正文过长。","The translation changed protected content. The original is preserved.":"译文改动了受保护内容,已保留原文。","The translation service returned no usable text.":"翻译服务未返回可用正文。","The translation service returned incomplete text.":"翻译服务返回的正文不完整。","The translation response is too large.":"翻译结果过长。","The translation service returned an error. Try again later.":"翻译服务返回错误,请稍后重试。","An internal translation error occurred. Try again.":"翻译发生内部错误,请重试。","Translation retry limit reached. Try again manually.":"翻译自动重试次数或时限已用尽,请手动重试。","Translation is paused after a configuration error. Check the API key, base URL and model.":"翻译因配置错误暂停,请检查 API Key、基础地址和模型。","Translation is disabled. Enable it to retry.":"翻译功能已关闭,启用后可重试。","Translation was interrupted. Try again.":"翻译已中断,请重试。","The translation attempt expired. Try again.":"本次翻译已过期,请重试。","The original text changed. Retry the current text.":"原文已变更,请对当前正文重试。","The original message is no longer available.":"原消息已不可用。","The original message or translation attempt is no longer valid. Try again.":"原消息或本次翻译已失效,请重试。","Translation request failed. Check the service and try again.":"翻译请求失败,请检查服务后重试。",Original:"原文","Copy original":"复制原文","Copy displayed text":"复制当前正文",Translated:"译文","Copy failed.":"复制失败。","Translating…":"翻译中…","Waiting to retry translation":"等待重试翻译","Translation cancelled":"翻译已取消","Translation interrupted":"翻译已中断","Translation queue full":"翻译队列已满","Translation paused":"翻译已暂停","Retrying…":"重试中…","浏览器存储不可用或资料损坏;本页仅在内存中保留,刷新后可能无法恢复。请先保存操作资料。":"浏览器存储不可用或资料损坏;本页仅在内存中保留,刷新后可能无法恢复。请先保存操作资料。","无法确认当前身份,暂不展示已保存的冲突资料。":"无法确认当前身份,暂不展示已保存的冲突资料。","已保留原冲突资料;关闭弹窗后可在此重新打开。仅当前身份和本标签页可恢复,关闭标签页或清理浏览器数据会删除资料。":"已保留原冲突资料;关闭弹窗后可在此重新打开。仅当前身份和本标签页可恢复,关闭标签页或清理浏览器数据会删除资料。","恢复证明已过期;保留成果,在实际目标手工继续,或确认后明确中止并重做。已提交但结果未知的请求仍可核对原 UUID。":"恢复证明已过期;保留成果,在实际目标手工继续,或确认后明确中止并重做。已提交但结果未知的请求仍可核对原 UUID。",恢复截止时间:"恢复截止时间",未知:"未知",恢复上次冲突资料:"恢复上次冲突资料",清理本地操作资料:"清理本地操作资料","清理不会取消服务端已受理请求;结果未知时请先核对原提交。":"清理不会取消服务端已受理请求;结果未知时请先核对原提交。","重新核验仅读取 Git,不自动发送。现场变化(包括部分 stage)可能无法继续 AI 恢复;请保留成果,在实际目标手工继续,或确认后明确中止并重做原操作。":"重新核验仅读取 Git,不自动发送。现场变化(包括部分 stage)可能无法继续 AI 恢复;请保留成果,在实际目标手工继续,或确认后明确中止并重做原操作。",实际冲突目标目录:"实际冲突目标目录","结果未知或待重试的原提交将先使用原 Session、UUID 和原请求核对;明确未受理后才使用新凭据。":"结果未知或待重试的原提交将先使用原 Session、UUID 和原请求核对;明确未受理后才使用新凭据。","Waiting for translation":"等待翻译","Waiting for task input":"等待任务输入","Task input":"任务输入","Load more task inputs":"加载更早任务输入","Failed to restore pending messages":"待发消息恢复失败","Acceptance unknown; check or retry the same submission.":"受理结果待核对,请核对或重试同一条提交。","Retry original submission":"核对原提交","Acceptance unknown":"受理结果待核对","Submitting...":"正在提交...","已受理,等待发送到 Team Room":"已受理,等待发送到 Team Room","Waiting to send":"等待发送","Sent original":"已发送原文","Load earlier sent messages":"加载更早已发送消息","Queued, not sent":"已入队,尚未发送","Sending paused":"发送已暂停","Translation failed":"翻译失败","Delivery failed":"投递失败","Delivery result unknown. Verify before retrying.":"投递结果待核对,请核实后再重试。","Confirmed not sent: retry":"已确认未发送:重试投递","End operation (may already be received)":"结束此操作(Agent 可能已收到)","Retry translation":"重试翻译","Retry delivery":"重试投递","Send original":"发送原文","Delivery action failed. Refresh and try again.":"操作失败,请刷新状态后重试。","Actual sent text":"实际发送内容","Workspace base branch":"Workspace 基础分支","Choose the branch used for changes, updates and merges in an existing workspace.":"为已有 workspace 选择用于差异比较、更新和合并的基础分支。","Could not load workspace branches. Refresh to try again.":"无法加载 workspace 分支,请刷新重试。","No active worktree workspaces to configure.":"暂无可配置的活跃工作树 workspace。","Select a workspace":"选择 workspace","Available for active task and TeamRun main workspaces. Member workspaces follow their parent workspace.":"支持活跃的任务 workspace 和 TeamRun 主 workspace;成员 workspace 跟随父 workspace。","Base branch":"基础分支",Unavailable:"不可用","Saving changes the comparison, update and merge target for this workspace. Existing commits and files stay in place; review the changes before merging.":"保存后将更改此 workspace 的差异比较、更新及合并目标。已有提交和文件保持原状,合并前请重新审查变更。","Save base branch":"保存基础分支","Workspace base branch saved":"Workspace 基础分支已保存","Could not save the base branch. Refresh and try again.":"基础分支保存失败,请刷新重试。","Choose an existing local branch different from the workspace branch.":"请选择已存在且不同于 workspace 自身分支的本地分支。","The selected branch has no shared commit history with this workspace.":"所选分支与此 workspace 没有共同的提交历史。","Wait for the Agent to finish or stop it before changing the base branch.":"请等待 Agent 完成或停止运行后再修改基础分支。","Finish or abort the current Git operation before changing the base branch.":"请完成或中止当前 Git 操作后再修改基础分支。","The workspace changed. Refresh and select the base branch again.":"Workspace 已发生变化,请刷新后重新选择基础分支。","Only active workspaces can change base branch. Refresh the list.":"仅活跃的 workspace 支持修改基础分支,请刷新列表。","TeamRun member base branches are managed by their parent workspace.":"TeamRun 成员的基础分支由父 workspace 管理。","Execution permission":"执行权限","Ask for approval":"请求批准","Auto approve (sandbox)":"自动同意(沙箱)","Auto approve (full access)":"自动同意(完全访问)","Use native approvals. Already permitted actions can run without asking.":"遵循原生审批规则,已允许的操作可以直接执行。","Use the native sandbox and automatic review. Some actions can still require approval.":"使用原生沙箱与自动审阅,部分操作仍可能请求批准。","Codex auto-review may approve writes or destructive deletions outside the workspace, or network access, without a human approval card. Dangerous actions are not guaranteed to prompt you. The native sandbox does not fully isolate the host or MCP tools.":"Codex 原生自动审阅可能不弹人工审批卡片就批准工作区外写入、破坏性删除或网络访问。危险操作不保证弹卡;原生沙箱也不完整隔离宿主或 MCP 工具。","Agent executable is unavailable.":"Agent 可执行程序当前不可用。","Selected Provider is unavailable.":"所选 Provider 当前不可用。","No available Provider for this session.":"当前会话没有可用的 Provider。","Remove sandbox_workspace_write from Codex advanced settings before using automatic sandbox approval.":"使用 Codex 自动同意(沙箱)前,请移除高级配置中的 sandbox_workspace_write。","Use native broad approval and disable the configurable sandbox. Upstream rules still apply.":"使用原生广泛自动批准并关闭可配置沙箱,上游强制规则仍然生效。","Loading permission support…":"正在加载权限支持信息…","This Agent has no available execution permission mode.":"此 Agent 没有可用的执行权限档位。","Changes apply when a new runtime starts. Running sessions keep their launch mode.":"修改在新运行实例启动时生效,运行中的会话保留启动模式。","This Agent does not support this runtime.":"该 Agent 不支持此运行协议。","The current headless CLI integration cannot forward native approval requests. Use ACP.":"当前非交互 CLI 接入无法转发原生审批请求,请使用 ACP。","A per-launch allowlist configuration has not been verified for Cursor ACP.":"Cursor ACP 尚未核实单次启动的人工审批配置。","This integration has no native sandbox permission mode.":"此接入方式没有原生沙箱权限模式。","A native sandbox mode has not been verified for this integration.":"此接入方式的原生沙箱档尚未核实。","Pi ordinary tools do not provide a complete approval gate.":"Pi 普通工具没有完整的审批机制。","Kiro V2/V3 trust configuration has not been verified for this integration.":"此接入方式的 Kiro V2/V3 信任配置尚未核实。","Your deployment does not allow this permission mode.":"当前部署或账号未开放此权限档位。","Legacy Codex permissions did not explicitly select the human reviewer. Select an execution permission mode.":"旧 Codex 配置没有明确选择人工审阅,请重新选择执行权限。","Legacy permission fields conflict with executionPermission":"旧权限字段与统一执行权限冲突。","Required permission: {mode}":"所需权限:{mode}",Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...","Allow once":"本次批准","Reject once":"本次拒绝","Permission required":"需要授权","The agent needs approval to continue.":"Agent 需要你的授权才能继续。",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Priority:"优先级","Task priority":"任务优先级",紧急:"紧急",高:"高",普通:"普通",低:"低",优先级变更失败:"优先级变更失败",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Unread:"未读",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Open visualization":"打开可视化","Download file":"下载文件","Viewing agent visualization":"正在查看 Agent 可视化","Session file":"会话文件","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前",now:"刚刚","{count}m":"{count} 分钟","{count}h":"{count} 小时","{count}d":"{count} 天",正在思考:"正在思考","最后一次输出于 {duration}前":"最后一次输出于 {duration}前",等待首次输出:"等待首次输出","{count} 秒":"{count} 秒","{minutes} 分 {seconds} 秒":"{minutes} 分 {seconds} 秒","{hours} 小时 {minutes} 分":"{hours} 小时 {minutes} 分","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试","Failed to stop session. Refreshing status; check it and try again.":"停止会话失败。正在刷新状态,请确认后重试。",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端","Interactive terminals":"交互终端","Background services":"后台服务","Background service logs":"后台服务日志","Loading background services...":"正在加载后台服务...","Failed to load background services.":"加载后台服务失败。","No background services":"暂无后台服务","Select a background service":"选择一个后台服务","Loading service logs...":"正在加载服务日志...","Failed to refresh service logs.":"刷新服务日志失败。","Earlier log output is unavailable.":"较早的日志内容已不可用。","No logs yet":"暂无日志",Retry:"重试","Something went wrong":"出了点问题","Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.":"此处只兜住渲染阶段抛出的错误;事件处理器、异步回调或 observer 中抛出的错误不会进入兜底。","This section hit a rendering error and was replaced by this message.":"这一区域渲染出错,已由本条提示替代。","Failed to display logs":"日志显示失败","The log view hit a rendering error. Retry renders the same data again, so it will fail again while the bad data is still there.":"日志视图渲染出错。重试只是重新渲染同一份数据,坏数据仍在时会再次出错。","This page could not be displayed. Go back to the task board and try again.":"这个页面无法显示。请返回任务看板后重试。","The interface hit a rendering error. Reload the page to continue.":"界面渲染出错,请重新加载页面后继续。","The interface could not be displayed. Reload the page to try again.":"界面无法显示,请重新加载页面后再试。","Reload page":"重新加载页面","Back to home":"返回首页",Command:"命令","Working directory":"工作目录",Started:"启动时间","Not started":"尚未启动",Exited:"已退出","Paste into terminal":"粘贴到终端","Paste terminal input here":"在此粘贴终端输入内容","Terminal paste content":"终端粘贴内容","Terminal is not ready":"终端尚未就绪","Pasted into terminal":"已粘贴到终端",Paste:"粘贴",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用",已处理:"已处理","已处理 {duration}":"已处理 {duration}","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","Creating worktree":"正在创建工作树","Creating session":"正在创建会话","Starting agent":"正在启动 Agent","Starting task":"正在启动任务","Agent start failed":"启动 Agent 失败","Preparing workspace":"准备工作空间","Run setup script":"执行 Setup 脚本","Running setup ({current}/{total})":"正在执行 Setup({current}/{total})","Setup complete":"Setup 完成","View setup output":"查看 Setup 输出","Hide setup output":"收起 Setup 输出","Setup failed":"Setup 失败","More details":"更多详情","Hide details":"收起详情","Retry start":"重试启动 Agent","Workspace setup is running in the background.":"工作空间正在后台准备。","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败",Forward:"前进","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存","Preview address":"预览地址",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Stop loading":"停止加载","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中",Copy:"复制",Copied:"已复制",Clear:"清除",Dismiss:"关闭提示",Chart:"图表",Table:"表格",Expand:"展开",Collapse:"收起",Today:"今天",Total:"合计",Less:"少",More:"多","On track":"正常",Ahead:"领先","At risk":"有风险","Off track":"已延期","days overdue":"天已逾期","Due today":"今天到期","days left":"天后到期"},en:{"Own status: {status}":"Own status: {status}","Subtasks and grandchildren: {running} running, {review} in review":"Subtasks and grandchildren: {running} running, {review} in review","Create subtask":"Create subtask",Subtasks:"Subtasks","{count} subtasks":"{count} subtasks","Parent task: {title}":"Parent task: {title}","Subtasks of {title}":"Subtasks of {title}","{count} subtasks, {running} running":"{count} subtasks, {running} running","Could not load subtasks. Retry":"Could not load subtasks. Retry","No subtasks yet":"No subtasks yet","Delete “{title}” and all {count} descendants? This cannot be undone.":"Delete “{title}” and all {count} descendants? This cannot be undone.","All related Agents and services will stop. Their worktrees and owned branches will be deleted.":"All related Agents and services will stop. Their worktrees and owned branches will be deleted.","Delete all":"Delete all","Task resources deleted":"Task resources deleted","Task resource cleanup failed":"Task resource cleanup failed","Deleting task resources…":"Deleting task resources…","Subtasks changed. Review the deletion confirmation again.":"Subtasks changed. Review the deletion confirmation again.","Tasks support at most three levels":"Tasks support at most three levels",语言转换:"Conversation translation","Could not load translation settings.":"Could not load translation settings.","Translate outgoing messages and Agent replies. Saving applies the global switch.":"Translate outgoing messages and Agent replies. Saving applies the global switch.","Enable translation":"Enable translation","When disabled, successful historical translations remain available. Pending messages are not sent automatically.":"When disabled, successful historical translations remain available. Pending messages are not sent automatically.","Send target language":"Send target language","Reply display language":"Reply display language","API base URL":"API base URL","OpenAI compatible base URL. The server appends /chat/completions.":"OpenAI compatible base URL. The server appends /chat/completions.",Model:"Model","API key (write only)":"API key (write only)","A stored credential is configured. Its value is never displayed.":"A stored credential is configured. Its value is never displayed.","No stored credential is indicated. A service without credentials may already be configured.":"No stored credential is indicated. A service without credentials may already be configured.","Keep saved credential choice":"Keep saved credential choice","Replace API key":"Replace API key","Clear credential configuration":"Clear credential configuration","Service without credentials":"Service without credentials","New API key":"New API key","Clearing prevents enabling and testing until a credential choice is configured.":"Clearing prevents enabling and testing until a credential choice is configured.","Shared prompt template":"Shared prompt template","Both directions use this template. Include {{target_language}} and {{text}}; unknown variables are invalid.":"Both directions use this template. Include {{target_language}} and {{text}}; unknown variables are invalid.","Maximum translation concurrency (1–16)":"Maximum translation concurrency (1–16)","Test draft translation":"Test draft translation","Sample text is sent to the configured translation service. Testing does not save settings or send messages to an Agent.":"Sample text is sent to the configured translation service. Testing does not save settings or send messages to an Agent.","Test direction":"Test direction","Sample text":"Sample text","Testing…":"Testing…","Test translation":"Test translation","Translation settings saved.":"Translation settings saved.","Settings changed in another tab. Your draft is preserved. Reload saved settings to discard this draft.":"Settings changed in another tab. Your draft is preserved. Reload saved settings to discard this draft.","Discard draft and reload saved settings":"Discard draft and reload saved settings","Enter a new API key, or explicitly choose a service without credentials.":"Enter a new API key, or explicitly choose a service without credentials.","Enter sample text to test.":"Enter sample text to test.","Concurrency must be an integer from 1 to 16.":"Concurrency must be an integer from 1 to 16.","Enter an HTTP(S) base URL without credentials, query or fragment.":"Enter an HTTP(S) base URL without credentials, query or fragment.","Enter a model and both target languages.":"Enter a model and both target languages.","The template must contain only {{target_language}} and {{text}}, including both variables.":"The template must contain only {{target_language}} and {{text}}, including both variables.","Complete the translation configuration and credential choice.":"Complete the translation configuration and credential choice.","Translation credential was rejected. Check the API key.":"Translation credential was rejected. Check the API key.","Check the translation base URL and model.":"Check the translation base URL and model.","Check the translation fields and credential choice.":"Check the translation fields and credential choice.","The translation request timed out. Try again.":"The translation request timed out. Try again.","Could not connect to the translation service.":"Could not connect to the translation service.","The translation service is busy. Try again later.":"The translation service is busy. Try again later.","The translation queue is full. Try again later.":"The translation queue is full. Try again later.","Translation testing is temporarily unavailable.":"Translation testing is temporarily unavailable.","The translation request was cancelled.":"The translation request was cancelled.","The translation text is too large.":"The translation text is too large.","The translation changed protected content. The original is preserved.":"The translation changed protected content. The original is preserved.","The translation service returned no usable text.":"The translation service returned no usable text.","The translation service returned incomplete text.":"The translation service returned incomplete text.","The translation response is too large.":"The translation response is too large.","The translation service returned an error. Try again later.":"The translation service returned an error. Try again later.","An internal translation error occurred. Try again.":"An internal translation error occurred. Try again.","Translation retry limit reached. Try again manually.":"Translation retry limit reached. Try again manually.","Translation is paused after a configuration error. Check the API key, base URL and model.":"Translation is paused after a configuration error. Check the API key, base URL and model.","Translation is disabled. Enable it to retry.":"Translation is disabled. Enable it to retry.","Translation was interrupted. Try again.":"Translation was interrupted. Try again.","The translation attempt expired. Try again.":"The translation attempt expired. Try again.","The original text changed. Retry the current text.":"The original text changed. Retry the current text.","The original message is no longer available.":"The original message is no longer available.","The original message or translation attempt is no longer valid. Try again.":"The original message or translation attempt is no longer valid. Try again.","Translation request failed. Check the service and try again.":"Translation request failed. Check the service and try again.",Original:"Original","Copy original":"Copy original","Copy displayed text":"Copy displayed text",Translated:"Translated","Copy failed.":"Copy failed.","Translating…":"Translating…","Waiting to retry translation":"Waiting to retry translation","Translation cancelled":"Translation cancelled","Translation interrupted":"Translation interrupted","Translation queue full":"Translation queue full","Translation paused":"Translation paused","Retrying…":"Retrying…","浏览器存储不可用或资料损坏;本页仅在内存中保留,刷新后可能无法恢复。请先保存操作资料。":"Browser storage is unavailable or damaged. This page retains evidence in memory only; refreshing may lose it. Save the operation details first.","无法确认当前身份,暂不展示已保存的冲突资料。":"Could not verify the current identity. Saved conflict details are hidden.","已保留原冲突资料;关闭弹窗后可在此重新打开。仅当前身份和本标签页可恢复,关闭标签页或清理浏览器数据会删除资料。":"Original conflict details are retained here after closing the dialog. Recovery is limited to this identity and tab. Closing the tab or clearing browser data removes them.","恢复证明已过期;保留成果,在实际目标手工继续,或确认后明确中止并重做。已提交但结果未知的请求仍可核对原 UUID。":"Recovery evidence expired. Preserve your work and continue manually at the actual target, or explicitly abort and redo after checking it. An uncertain submission can still be checked with its original UUID.",恢复截止时间:"Recovery deadline",未知:"Unknown",恢复上次冲突资料:"Reopen saved conflict details",清理本地操作资料:"Clear local operation details","清理不会取消服务端已受理请求;结果未知时请先核对原提交。":"Clearing local details does not cancel accepted server requests. Check uncertain submissions first.","重新核验仅读取 Git,不自动发送。现场变化(包括部分 stage)可能无法继续 AI 恢复;请保留成果,在实际目标手工继续,或确认后明确中止并重做原操作。":"Revalidation only reads Git and never sends automatically. Scene changes, including partial staging, may prevent AI recovery. Preserve your work and continue manually at the actual target, or explicitly abort and redo the original operation after checking it.",实际冲突目标目录:"Actual conflict target directory","结果未知或待重试的原提交将先使用原 Session、UUID 和原请求核对;明确未受理后才使用新凭据。":"The original submission is checked using its original Session, UUID and request. Refreshed credentials are used only after an explicit rejection.",设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls",已处理:"Processed","已处理 {duration}":"Processed {duration}",正在思考:"Thinking","最后一次输出于 {duration}前":"Last output {duration} ago",等待首次输出:"Waiting for the first output","{count} 秒":"{count}s","{minutes} 分 {seconds} 秒":"{minutes}m {seconds}s","{hours} 小时 {minutes} 分":"{hours}h {minutes}m","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved",Priority:"Priority","Task priority":"Task priority",紧急:"Urgent",普通:"Normal",优先级变更失败:"Failed to update task priority","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。":"Windows will download and run the official PowerShell installer script; no copy-paste shell pipeline is used.","安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。":"The installer may have completed, but the current Agent Tower process has not refreshed PATH. Restart Agent Tower and detect again.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room","已受理,等待发送到 Team Room":"Accepted, waiting to send to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation","自动批准操作(YOLO)":"Auto-approve Actions (YOLO)",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox","Fast 模式":"Fast mode","支持的模型速度约提升至 1.5 倍,并增加用量消耗。ChatGPT 登录消耗更多额度;API Key 按 Priority 处理计费。":"Supported models run about 1.5x faster with increased usage. ChatGPT sign-in consumes more credits; API keys use Priority processing rates.","Fast 模式字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Fast mode field must be true or false. Fix it in the runtime configuration JSON.","跟随 Codex":"Use Codex default",标准速度:"Standard speed",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","Codex (ACP)":"Codex (ACP)","设为该类型的默认 Provider":"Set as the default provider for this agent type",基本配置:"Basic Configuration","API 地址":"API URL","请输入以 http:// 或 https:// 开头的完整 API 地址":"Enter a complete API URL beginning with http:// or https://.","输入 API Key":"Enter API Key",未配置:"Not configured",由高级配置管理:"Managed in advanced configuration",替换:"Replace",取消替换:"Cancel replacement","确定清除此 API Key?":"Clear this API key?",思考强度:"Reasoning Effort","跟随 CLI":"Use CLI default",更高效:"More efficient",更智能:"More capable",当前:"Current",最低:"Minimal",低:"Low",中:"Medium",高:"High",超高:"Extra high",最高:"Maximum","请选择当前 Agent 支持的思考强度档位":"Choose a reasoning effort supported by this agent.",测试配置:"Test Configuration","测试中...":"Testing...","保存 Provider":"Save Provider",高级配置:"Advanced Configuration",执行权限:"Execution Permission","禁用 WebSocket":"Disable WebSocket","仅禁用 Codex Responses API 的 WebSocket 传输;新启动和后续继续的请求将使用 HTTP。":"Disable only the Codex Responses API WebSocket transport. New sessions and follow-ups will use HTTP.","当前原生 Provider 已使用非 WebSocket 传输;此开关不会添加额外运行时覆盖。":"The current native provider already uses a non-WebSocket transport. This switch adds no runtime override.","禁用 WebSocket 字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Disable WebSocket field must be true or false. Correct it in the runtime JSON.",高风险执行已开启:"High-risk execution enabled","Agent 将不再请求工具执行权限确认。":"The agent will no longer ask for tool execution permission.","Agent 将自动批准操作,不再逐项请求确认。":"The agent will approve operations automatically without asking for each action.","Agent 将以强制模式执行操作。":"The agent will execute operations in force mode.","Agent 将拥有完全访问电脑的权限":"The agent will have full access to this computer.","执行权限字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The execution permission field must be true or false. Correct it in the runtime JSON.","开启高风险执行权限?":"Enable high-risk execution permission?",确认开启:"Enable","配置错误:权限字段必须为布尔值":"Configuration error: the permission field must be a boolean.",配置错误:"Configuration error",权限已开启:"Enabled",权限已关闭:"Disabled","运行配置 (JSON)":"Runtime Configuration (JSON)",配置检查通过:"Configuration check passed",连接测试通过:"Connection test passed",本机可用性检查通过:"Local availability check passed",配置检查未通过:"Configuration check did not pass",测试对象:"Test target",测试时间:"Tested at",需要解决配置冲突:"Configuration conflicts must be resolved",简化字段与高级配置值不同:"The simplified and advanced values differ",采用简化值:"Use simplified value",保留高级值:"Keep advanced value","测试失败不会阻止保存。":"A failed test does not prevent saving.",测试配置失败:"Configuration test failed","存在未保存的修改,确定放弃吗?":"Discard the unsaved changes?","切换 Agent 类型会清空当前类型的配置,是否继续?":"Changing the agent type clears the current type-specific configuration. Continue?","JSON 顶层必须是对象":"The top-level JSON value must be an object.","{format} 语法错误: {message}":"Invalid {format} syntax: {message}","已配置,输入新值以替换":"Configured. Enter a new value to replace it.",权限策略:"Permission Policy",每次询问:"Ask Every Time",无限制:"Unrestricted","ACP 权限策略必须为 ASK 或 UNRESTRICTED":"ACP permission policy must be ASK or UNRESTRICTED",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","Agent 原生配置 (config.toml)":"Native Agent Config (config.toml)","Agent 原生配置 (settings.json)":"Native Agent Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,由当前 Runtime 注入。不会修改你的":"configuration snippet. The selected runtime injects it without modifying your","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code","由当前 Runtime 注入。在":". The selected runtime injects it. Configure",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.",已禁用:"Disabled",启用配置:"Enable configuration","禁用后不在 Agent 可选列表中显示,配置仍会保留,可随时重新启用。":"Disabled configurations are hidden from Agent selectors. They are kept here and can be enabled again at any time.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",编辑标题:"Edit title",输入任务标题:"Enter task title",字符:"characters",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.",访问安全:"Access Security",访问密码:"Access Password","开启后,进入 Agent Tower 需要输入密码。":"When enabled, Agent Tower requires this password before opening.",未启用:"Off",已启用:"On",将启用:"Will turn on",将关闭:"Will turn off",修改密码:"Change password",退出登录:"Log out","退出中...":"Logging out...",退出登录失败:"Failed to log out",已退出登录:"Logged out",当前密码:"Current password",新密码:"New password",确认密码:"Confirm password",请输入当前密码:"Enter the current password","密码至少需要 8 个字符":"Password must be at least 8 characters",两次输入不一致:"Passwords do not match",当前密码不正确:"Current password is incorrect","关闭后不再要求访问密码。":"After turning it off, Agent Tower will no longer require an access password.","保存后其他已登录页面需要重新输入。":"After saving, other signed-in pages will need to enter the password again.",关闭访问密码:"Turn off access password",已关闭:"Turned off","密码不正确,请重试":"Incorrect password. Please try again.",输入访问密码继续:"Enter the access password to continue","验证中...":"Verifying...",解锁:"Unlock","访问状态加载失败,请刷新后重试。":"Failed to load access status. Refresh and try again.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit","正在检查后台服务...":"Checking services...","无法检查后台服务状态,提交时会再次确认。":"Background service status could not be checked. The server will verify it when submitting.","合并前将停止 {count} 个后台服务":"{count} background services will be stopped before merging","停止后不会自动恢复。":"They will not restart automatically after being stopped.",停止服务并提交:"Stop Services and Submit","正在停止服务并提交...":"Stopping and submitting...","后台服务仍在运行,请确认停止服务后再提交。":"Background services are still running. Confirm that they should be stopped before submitting.",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.','该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 Agent 原生配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or native agent configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name","成员心跳检测时间(分钟)":"Member heartbeat timeout (minutes)",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Agent 原生配置":"Native Agent Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},Lb=S.createContext(null),Ub="agent-tower.locale";function Bb(t){return t?t==="en"?"en":t==="zh-CN"?"zh-CN":null:null}function ik(){if(typeof window>"u")return null;try{return Bb(window.localStorage.getItem(Ub))}catch{return null}}function sk(t){if(!(typeof window>"u"))try{window.localStorage.setItem(Ub,t)}catch{}}function ok(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function qb(){return ik()??ok()}function lk(t,a){if(!a)return t;let i=t;for(const[o,c]of Object.entries(a))i=i.replaceAll(`{${o}}`,String(c??""));return i}let lf=qb();function Pb(t,a,i){const o=rk[t]?.[a]??a;return lk(o,i)}function la(t,a){return Pb(lf,t,a)}function ck({children:t}){const a=S.useRef(qb()),[i,o]=S.useState(a.current),{data:c}=nk(),u=ak(),f=S.useRef(!1),h=S.useCallback(x=>{lf=x,o(x),document.documentElement.lang=x,sk(x)},[]);S.useEffect(()=>{const x=Bb(c?.locale)??a.current;h(x),c&&c.locale===null&&!f.current&&(f.current=!0,u.mutate({locale:x}))},[c,h,u]);const p=S.useCallback(x=>{const v=lf;h(x),u.mutate({locale:x},{onError:()=>{h(v),ba.error(la("语言设置保存失败"))}})},[h,u]),g=S.useMemo(()=>({locale:i,setLocale:p,t:(x,v)=>Pb(i,x,v)}),[i,p]);return m.jsx(Lb.Provider,{value:g,children:t})}function Qt(){const t=S.useContext(Lb);if(!t)throw new Error("useI18n must be used within I18nProvider");return t}function Ib(t){var a,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(a=0;a<c;a++)t[a]&&(i=Ib(t[a]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function uk(){for(var t,a,i=0,o="",c=arguments.length;i<c;i++)(t=arguments[i])&&(a=Ib(t))&&(o&&(o+=" "),o+=a);return o}const dk=(t,a)=>{const i=new Array(t.length+a.length);for(let o=0;o<t.length;o++)i[o]=t[o];for(let o=0;o<a.length;o++)i[t.length+o]=a[o];return i},fk=(t,a)=>({classGroupId:t,validator:a}),Hb=(t=new Map,a=null,i)=>({nextPart:t,validators:a,classGroupId:i}),uc="-",Ky=[],hk="arbitrary..",mk=t=>{const a=gk(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return pk(f);const h=f.split(uc),p=h[0]===""&&h.length>1?1:0;return Qb(h,p,a)},getConflictingClassGroupIds:(f,h)=>{if(h){const p=o[f],g=i[f];return p?g?dk(g,p):p:g||Ky}return i[f]||Ky}}},Qb=(t,a,i)=>{if(t.length-a===0)return i.classGroupId;const c=t[a],u=i.nextPart.get(c);if(u){const g=Qb(t,a+1,u);if(g)return g}const f=i.validators;if(f===null)return;const h=a===0?t.join(uc):t.slice(a).join(uc),p=f.length;for(let g=0;g<p;g++){const x=f[g];if(x.validator(h))return x.classGroupId}},pk=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),i=a.indexOf(":"),o=a.slice(0,i);return o?hk+o:void 0})(),gk=t=>{const{theme:a,classGroups:i}=t;return yk(i,a)},yk=(t,a)=>{const i=Hb();for(const o in t){const c=t[o];Yf(c,i,o,a)}return i},Yf=(t,a,i,o)=>{const c=t.length;for(let u=0;u<c;u++){const f=t[u];vk(f,a,i,o)}},vk=(t,a,i,o)=>{if(typeof t=="string"){bk(t,a,i);return}if(typeof t=="function"){xk(t,a,i,o);return}Sk(t,a,i,o)},bk=(t,a,i)=>{const o=t===""?a:Kb(a,t);o.classGroupId=i},xk=(t,a,i,o)=>{if(wk(t)){Yf(t(o),a,i,o);return}a.validators===null&&(a.validators=[]),a.validators.push(fk(i,t))},Sk=(t,a,i,o)=>{const c=Object.entries(t),u=c.length;for(let f=0;f<u;f++){const[h,p]=c[f];Yf(p,Kb(a,h),i,o)}},Kb=(t,a)=>{let i=t;const o=a.split(uc),c=o.length;for(let u=0;u<c;u++){const f=o[u];let h=i.nextPart.get(f);h||(h=Hb(),i.nextPart.set(f,h)),i=h}return i},wk=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Ek=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,i=Object.create(null),o=Object.create(null);const c=(u,f)=>{i[u]=f,a++,a>t&&(a=0,o=i,i=Object.create(null))};return{get(u){let f=i[u];if(f!==void 0)return f;if((f=o[u])!==void 0)return c(u,f),f},set(u,f){u in i?i[u]=f:c(u,f)}}},cf="!",Gy=":",Tk=[],Yy=(t,a,i,o,c)=>({modifiers:t,hasImportantModifier:a,baseClassName:i,maybePostfixModifierPosition:o,isExternal:c}),Ck=t=>{const{prefix:a,experimentalParseClassName:i}=t;let o=c=>{const u=[];let f=0,h=0,p=0,g;const x=c.length;for(let M=0;M<x;M++){const q=c[M];if(f===0&&h===0){if(q===Gy){u.push(c.slice(p,M)),p=M+1;continue}if(q==="/"){g=M;continue}}q==="["?f++:q==="]"?f--:q==="("?h++:q===")"&&h--}const v=u.length===0?c:c.slice(p);let w=v,k=!1;v.endsWith(cf)?(w=v.slice(0,-1),k=!0):v.startsWith(cf)&&(w=v.slice(1),k=!0);const z=g&&g>p?g-p:void 0;return Yy(u,k,w,z)};if(a){const c=a+Gy,u=o;o=f=>f.startsWith(c)?u(f.slice(c.length)):Yy(Tk,!1,f,void 0,!0)}if(i){const c=o;o=u=>i({className:u,parseClassName:c})}return o},kk=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((i,o)=>{a.set(i,1e6+o)}),i=>{const o=[];let c=[];for(let u=0;u<i.length;u++){const f=i[u],h=f[0]==="[",p=a.has(f);h||p?(c.length>0&&(c.sort(),o.push(...c),c=[]),o.push(f)):c.push(f)}return c.length>0&&(c.sort(),o.push(...c)),o}},Ak=t=>({cache:Ek(t.cacheSize),parseClassName:Ck(t),sortModifiers:kk(t),...mk(t)}),Rk=/\s+/,Nk=(t,a)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:c,sortModifiers:u}=a,f=[],h=t.trim().split(Rk);let p="";for(let g=h.length-1;g>=0;g-=1){const x=h[g],{isExternal:v,modifiers:w,hasImportantModifier:k,baseClassName:z,maybePostfixModifierPosition:M}=i(x);if(v){p=x+(p.length>0?" "+p:p);continue}let q=!!M,B=o(q?z.substring(0,M):z);if(!B){if(!q){p=x+(p.length>0?" "+p:p);continue}if(B=o(z),!B){p=x+(p.length>0?" "+p:p);continue}q=!1}const K=w.length===0?"":w.length===1?w[0]:u(w).join(":"),W=k?K+cf:K,me=W+B;if(f.indexOf(me)>-1)continue;f.push(me);const he=c(B,q);for(let fe=0;fe<he.length;++fe){const R=he[fe];f.push(W+R)}p=x+(p.length>0?" "+p:p)}return p},_k=(...t)=>{let a=0,i,o,c="";for(;a<t.length;)(i=t[a++])&&(o=Gb(i))&&(c&&(c+=" "),c+=o);return c},Gb=t=>{if(typeof t=="string")return t;let a,i="";for(let o=0;o<t.length;o++)t[o]&&(a=Gb(t[o]))&&(i&&(i+=" "),i+=a);return i},Ok=(t,...a)=>{let i,o,c,u;const f=p=>{const g=a.reduce((x,v)=>v(x),t());return i=Ak(g),o=i.cache.get,c=i.cache.set,u=h,h(p)},h=p=>{const g=o(p);if(g)return g;const x=Nk(p,i);return c(p,x),x};return u=f,(...p)=>u(_k(...p))},Mk=[],Pt=t=>{const a=i=>i[t]||Mk;return a.isThemeGetter=!0,a},Yb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dk=/^\d+\/\d+$/,jk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gi=t=>Dk.test(t),qe=t=>!!t&&!Number.isNaN(Number(t)),xr=t=>!!t&&Number.isInteger(Number(t)),Pd=t=>t.endsWith("%")&&qe(t.slice(0,-1)),Va=t=>jk.test(t),qk=()=>!0,Pk=t=>zk.test(t)&&!Lk.test(t),Fb=()=>!1,Ik=t=>Uk.test(t),Hk=t=>Bk.test(t),Qk=t=>!ue(t)&&!de(t),Kk=t=>as(t,Zb,Fb),ue=t=>Yb.test(t),ti=t=>as(t,Jb,Pk),Id=t=>as(t,Xk,qe),Vy=t=>as(t,Xb,Fb),Gk=t=>as(t,$b,Hk),Hl=t=>as(t,Wb,Ik),de=t=>Vb.test(t),eo=t=>rs(t,Jb),Yk=t=>rs(t,$k),Fy=t=>rs(t,Xb),Vk=t=>rs(t,Zb),Fk=t=>rs(t,$b),Ql=t=>rs(t,Wb,!0),as=(t,a,i)=>{const o=Yb.exec(t);return o?o[1]?a(o[1]):i(o[2]):!1},rs=(t,a,i=!1)=>{const o=Vb.exec(t);return o?o[1]?a(o[1]):i:!1},Xb=t=>t==="position"||t==="percentage",$b=t=>t==="image"||t==="url",Zb=t=>t==="length"||t==="size"||t==="bg-size",Jb=t=>t==="length",Xk=t=>t==="number",$k=t=>t==="family-name",Wb=t=>t==="shadow",Zk=()=>{const t=Pt("color"),a=Pt("font"),i=Pt("text"),o=Pt("font-weight"),c=Pt("tracking"),u=Pt("leading"),f=Pt("breakpoint"),h=Pt("container"),p=Pt("spacing"),g=Pt("radius"),x=Pt("shadow"),v=Pt("inset-shadow"),w=Pt("text-shadow"),k=Pt("drop-shadow"),z=Pt("blur"),M=Pt("perspective"),q=Pt("aspect"),B=Pt("ease"),K=Pt("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],he=()=>[...me(),de,ue],fe=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],Y=()=>[de,ue,p],ie=()=>[Gi,"full","auto",...Y()],Oe=()=>[xr,"none","subgrid",de,ue],Ne=()=>["auto",{span:["full",xr,de,ue]},xr,de,ue],Ee=()=>[xr,"auto",de,ue],ze=()=>["auto","min","max","fr",de,ue],Be=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ce=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...Y()],F=()=>[Gi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],Q=()=>[t,de,ue],pe=()=>[...me(),Fy,Vy,{position:[de,ue]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",Vk,Kk,{size:[de,ue]}],I=()=>[Pd,eo,ti],H=()=>["","none","full",g,de,ue],$=()=>["",qe,eo,ti],ee=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[qe,Pd,Fy,Vy],ke=()=>["","none",z,de,ue],Pe=()=>["none",qe,de,ue],Kt=()=>["none",qe,de,ue],sn=()=>[qe,de,ue],We=()=>[Gi,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Va],breakpoint:[Va],color:[qk],container:[Va],"drop-shadow":[Va],ease:["in","out","in-out"],font:[Qk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Va],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Va],shadow:[Va],spacing:["px",qe],text:[Va],"text-shadow":[Va],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gi,ue,de,q]}],container:["container"],columns:[{columns:[qe,ue,de,h]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:he()}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[xr,"auto",de,ue]}],basis:[{basis:[Gi,"full","auto",h,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Gi,"auto","initial","none",ue]}],grow:[{grow:["",qe,de,ue]}],shrink:[{shrink:["",qe,de,ue]}],order:[{order:[xr,"first","last","none",de,ue]}],"grid-cols":[{"grid-cols":Oe()}],"col-start-end":[{col:Ne()}],"col-start":[{"col-start":Ee()}],"col-end":[{"col-end":Ee()}],"grid-rows":[{"grid-rows":Oe()}],"row-start-end":[{row:Ne()}],"row-start":[{"row-start":Ee()}],"row-end":[{"row-end":Ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ze()}],"auto-rows":[{"auto-rows":ze()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...Be(),"normal"]}],"justify-items":[{"justify-items":[...Ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ce()]}],"align-content":[{content:["normal",...Be()]}],"align-items":[{items:[...Ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":Be()}],"place-items":[{"place-items":[...Ce(),"baseline"]}],"place-self":[{"place-self":["auto",...Ce()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[h,"screen",...F()]}],"min-w":[{"min-w":[h,"screen","none",...F()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",i,eo,ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,de,Id]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pd,ue]}],"font-family":[{font:[Yk,ue,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,de,ue]}],"line-clamp":[{"line-clamp":[qe,"none",de,Id]}],leading:[{leading:[u,...Y()]}],"list-image":[{"list-image":["none",de,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",de,ti]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[qe,"auto",de,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",de,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:be()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xr,de,ue],radial:["",de,ue],conic:[xr,de,ue]},Fk,Gk]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,de,ue]}],"outline-w":[{outline:["",qe,eo,ti]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,Ql,Hl]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",v,Ql,Hl]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[qe,ti]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",w,Ql,Hl]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[qe,de,ue]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[de,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":me()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ue]}],filter:[{filter:["","none",de,ue]}],blur:[{blur:ke()}],brightness:[{brightness:[qe,de,ue]}],contrast:[{contrast:[qe,de,ue]}],"drop-shadow":[{"drop-shadow":["","none",k,Ql,Hl]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",qe,de,ue]}],"hue-rotate":[{"hue-rotate":[qe,de,ue]}],invert:[{invert:["",qe,de,ue]}],saturate:[{saturate:[qe,de,ue]}],sepia:[{sepia:["",qe,de,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ue]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[qe,de,ue]}],"backdrop-contrast":[{"backdrop-contrast":[qe,de,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,de,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,de,ue]}],"backdrop-invert":[{"backdrop-invert":["",qe,de,ue]}],"backdrop-opacity":[{"backdrop-opacity":[qe,de,ue]}],"backdrop-saturate":[{"backdrop-saturate":[qe,de,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,de,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",de,ue]}],ease:[{ease:["linear","initial",B,de,ue]}],delay:[{delay:[qe,de,ue]}],animate:[{animate:["none",K,de,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,de,ue]}],"perspective-origin":[{"perspective-origin":he()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Kt()}],"scale-x":[{"scale-x":Kt()}],"scale-y":[{"scale-y":Kt()}],"scale-z":[{"scale-z":Kt()}],"scale-3d":["scale-3d"],skew:[{skew:sn()}],"skew-x":[{"skew-x":sn()}],"skew-y":[{"skew-y":sn()}],transform:[{transform:[de,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:he()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",de,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[qe,eo,ti,Id]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Jk=Ok(Zk);function ye(...t){return Jk(uk(t))}function $i(t){let a=0;for(const i of t){const o=i.codePointAt(0);o>=19968&&o<=40959||o>=13312&&o<=19903||o>=65280&&o<=65376||o>=12288&&o<=12351?a+=2:a+=1}return a}function d_(t,a){if($i(t)<=a)return t;const i=a-1,o=Math.ceil(i/2),c=Math.floor(i/2);let u="",f=0;for(const x of t){const v=$i(x);if(f+v>o)break;u+=x,f+=v}const h=[...t];let p="",g=0;for(let x=h.length-1;x>=0;x--){const v=$i(h[x]);if(g+v>c)break;p=h[x]+p,g+=v}return u+"…"+p}function Wk(t,a,i="…"){if($i(t)<=a)return t;const o=a-$i(i);let c="",u=0;for(const f of t){const h=$i(f);if(u+h>o)break;c+=f,u+=h}return c+i}let Zi=0;function Vf(){Zi++,Zi===1&&(document.body.style.overflow="hidden")}function dc(){Zi=Math.max(0,Zi-1),Zi===0&&(document.body.style.overflow="")}function eA(){return Zi}function f_(t){S.useEffect(()=>{if(t)return Vf(),()=>dc()},[t])}function Xy(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function e0(...t){return a=>{let i=!1;const o=t.map(c=>{const u=Xy(c,a);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let c=0;c<o.length;c++){const u=o[c];typeof u=="function"?u():Xy(t[c],null)}}}}function t0(...t){return S.useCallback(e0(...t),t)}function n0(t){const a=tA(t),i=S.forwardRef((o,c)=>{const{children:u,...f}=o,h=S.Children.toArray(u),p=h.find(nA);if(p){const g=p.props.children,x=h.map(v=>v===p?S.Children.count(g)>1?S.Children.only(null):S.isValidElement(g)?g.props.children:null:v);return m.jsx(a,{...f,ref:c,children:S.isValidElement(g)?S.cloneElement(g,void 0,x):null})}return m.jsx(a,{...f,ref:c,children:u})});return i.displayName=`${t}.Slot`,i}var a0=n0("Slot");function tA(t){const a=S.forwardRef((i,o)=>{const{children:c,...u}=i;if(S.isValidElement(c)){const f=rA(c),h=aA(u,c.props);return c.type!==S.Fragment&&(h.ref=o?e0(o,f):f),S.cloneElement(c,h)}return S.Children.count(c)>1?S.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var r0=Symbol("radix.slottable");function h_(t){const a=({children:i})=>m.jsx(m.Fragment,{children:i});return a.displayName=`${t}.Slottable`,a.__radixId=r0,a}function nA(t){return S.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===r0}function aA(t,a){const i={...a};for(const o in a){const c=t[o],u=a[o];/^on[A-Z]/.test(o)?c&&u?i[o]=(...h)=>{const p=u(...h);return c(...h),p}:c&&(i[o]=c):o==="style"?i[o]={...c,...u}:o==="className"&&(i[o]=[c,u].filter(Boolean).join(" "))}return{...t,...i}}function rA(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?t.props.ref:t.props.ref||t.ref)}var iA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ff=iA.reduce((t,a)=>{const i=n0(`Primitive.${a}`),o=S.forwardRef((c,u)=>{const{asChild:f,...h}=c,p=f?i:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${a}`,{...t,[a]:o}},{});function m_(t,a){t&&_f.flushSync(()=>t.dispatchEvent(a))}function p_(t,a){const i=S.createContext(a),o=u=>{const{children:f,...h}=u,p=S.useMemo(()=>h,Object.values(h));return m.jsx(i.Provider,{value:p,children:f})};o.displayName=t+"Provider";function c(u){const f=S.useContext(i);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${t}\``)}return[o,c]}function sA(t,a=[]){let i=[];function o(u,f){const h=S.createContext(f),p=i.length;i=[...i,f];const g=v=>{const{scope:w,children:k,...z}=v,M=w?.[t]?.[p]||h,q=S.useMemo(()=>z,Object.values(z));return m.jsx(M.Provider,{value:q,children:k})};g.displayName=u+"Provider";function x(v,w){const k=w?.[t]?.[p]||h,z=S.useContext(k);if(z)return z;if(f!==void 0)return f;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[g,x]}const c=()=>{const u=i.map(f=>S.createContext(f));return function(h){const p=h?.[t]||u;return S.useMemo(()=>({[`__scope${t}`]:{...h,[t]:p}}),[h,p])}};return c.scopeName=t,[o,oA(c,...a)]}function oA(...t){const a=t[0];if(t.length===1)return a;const i=()=>{const o=t.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(u){const f=o.reduce((h,{useScope:p,scopeName:g})=>{const v=p(u)[`__scope${g}`];return{...h,...v}},{});return S.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return i.scopeName=a.scopeName,i}function lA(t,a,{checkForDefaultPrevented:i=!0}={}){return function(c){if(t?.(c),i===!1||!c.defaultPrevented)return a?.(c)}}var vo=globalThis?.document?S.useLayoutEffect:()=>{},cA=Ef[" useInsertionEffect ".trim().toString()]||vo;function uA({prop:t,defaultProp:a,onChange:i=()=>{},caller:o}){const[c,u,f]=dA({defaultProp:a,onChange:i}),h=t!==void 0,p=h?t:c;{const x=S.useRef(t!==void 0);S.useEffect(()=>{const v=x.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=h},[h,o])}const g=S.useCallback(x=>{if(h){const v=fA(x)?x(t):x;v!==t&&f.current?.(v)}else u(x)},[h,t,u,f]);return[p,g]}function dA({defaultProp:t,onChange:a}){const[i,o]=S.useState(t),c=S.useRef(i),u=S.useRef(a);return cA(()=>{u.current=a},[a]),S.useEffect(()=>{c.current!==i&&(u.current?.(i),c.current=i)},[i,c]),[i,o,u]}function fA(t){return typeof t=="function"}function hA(t,a){return S.useReducer((i,o)=>a[i][o]??i,t)}var i0=t=>{const{present:a,children:i}=t,o=mA(a),c=typeof i=="function"?i({present:o.isPresent}):S.Children.only(i),u=t0(o.ref,pA(c));return typeof i=="function"||o.isPresent?S.cloneElement(c,{ref:u}):null};i0.displayName="Presence";function mA(t){const[a,i]=S.useState(),o=S.useRef(null),c=S.useRef(t),u=S.useRef("none"),f=t?"mounted":"unmounted",[h,p]=hA(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const g=Kl(o.current);u.current=h==="mounted"?g:"none"},[h]),vo(()=>{const g=o.current,x=c.current;if(x!==t){const w=u.current,k=Kl(g);t?p("MOUNT"):k==="none"||g?.display==="none"?p("UNMOUNT"):p(x&&w!==k?"ANIMATION_OUT":"UNMOUNT"),c.current=t}},[t,p]),vo(()=>{if(a){let g;const x=a.ownerDocument.defaultView??window,v=k=>{const M=Kl(o.current).includes(CSS.escape(k.animationName));if(k.target===a&&M&&(p("ANIMATION_END"),!c.current)){const q=a.style.animationFillMode;a.style.animationFillMode="forwards",g=x.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=q)})}},w=k=>{k.target===a&&(u.current=Kl(o.current))};return a.addEventListener("animationstart",w),a.addEventListener("animationcancel",v),a.addEventListener("animationend",v),()=>{x.clearTimeout(g),a.removeEventListener("animationstart",w),a.removeEventListener("animationcancel",v),a.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:S.useCallback(g=>{o.current=g?getComputedStyle(g):null,i(g)},[])}}function Kl(t){return t?.animationName||"none"}function pA(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?t.props.ref:t.props.ref||t.ref)}var gA=Ef[" useId ".trim().toString()]||(()=>{}),yA=0;function vA(t){const[a,i]=S.useState(gA());return vo(()=>{i(o=>o??String(yA++))},[t]),t||(a?`radix-${a}`:"")}var vc="Collapsible",[bA]=sA(vc),[xA,Xf]=bA(vc),s0=S.forwardRef((t,a)=>{const{__scopeCollapsible:i,open:o,defaultOpen:c,disabled:u,onOpenChange:f,...h}=t,[p,g]=uA({prop:o,defaultProp:c??!1,onChange:f,caller:vc});return m.jsx(xA,{scope:i,disabled:u,contentId:vA(),open:p,onOpenToggle:S.useCallback(()=>g(x=>!x),[g]),children:m.jsx(Ff.div,{"data-state":Zf(p),"data-disabled":u?"":void 0,...h,ref:a})})});s0.displayName=vc;var o0="CollapsibleTrigger",l0=S.forwardRef((t,a)=>{const{__scopeCollapsible:i,...o}=t,c=Xf(o0,i);return m.jsx(Ff.button,{type:"button","aria-controls":c.contentId,"aria-expanded":c.open||!1,"data-state":Zf(c.open),"data-disabled":c.disabled?"":void 0,disabled:c.disabled,...o,ref:a,onClick:lA(t.onClick,c.onOpenToggle)})});l0.displayName=o0;var $f="CollapsibleContent",c0=S.forwardRef((t,a)=>{const{forceMount:i,...o}=t,c=Xf($f,t.__scopeCollapsible);return m.jsx(i0,{present:i||c.open,children:({present:u})=>m.jsx(SA,{...o,ref:a,present:u})})});c0.displayName=$f;var SA=S.forwardRef((t,a)=>{const{__scopeCollapsible:i,present:o,children:c,...u}=t,f=Xf($f,i),[h,p]=S.useState(o),g=S.useRef(null),x=t0(a,g),v=S.useRef(0),w=v.current,k=S.useRef(0),z=k.current,M=f.open||h,q=S.useRef(M),B=S.useRef(void 0);return S.useEffect(()=>{const K=requestAnimationFrame(()=>q.current=!1);return()=>cancelAnimationFrame(K)},[]),vo(()=>{const K=g.current;if(K){B.current=B.current||{transitionDuration:K.style.transitionDuration,animationName:K.style.animationName},K.style.transitionDuration="0s",K.style.animationName="none";const W=K.getBoundingClientRect();v.current=W.height,k.current=W.width,q.current||(K.style.transitionDuration=B.current.transitionDuration,K.style.animationName=B.current.animationName),p(o)}},[f.open,o]),m.jsx(Ff.div,{"data-state":Zf(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!M,...u,ref:x,style:{"--radix-collapsible-content-height":w?`${w}px`:void 0,"--radix-collapsible-content-width":z?`${z}px`:void 0,...t.style},children:M&&c})});function Zf(t){return t?"open":"closed"}var wA=s0,EA=l0,TA=c0;const uf={neutral:"text-muted-foreground",info:"text-info",success:"text-success",warning:"text-warning",danger:"text-destructive"},CA={neutral:"bg-muted-foreground/60",info:"bg-info",success:"bg-success",warning:"bg-warning",danger:"bg-destructive"},ts={neutral:"text-foreground/70",info:"text-info-ink",success:"text-success-ink",warning:"text-warning-ink",danger:"text-destructive-ink"},u0={neutral:"bg-foreground/[0.06]",info:"bg-info/10",success:"bg-success/10",warning:"bg-warning/10",danger:"bg-destructive/10"},kA={neutral:"bg-primary text-primary-foreground",info:"bg-info-ink text-white",success:"bg-success-ink text-white",warning:"bg-warning-ink text-white",danger:"bg-destructive-ink text-white"},$y={ink:"var(--viz-6)",context:"var(--viz-2)",plan:"var(--viz-3)",empty:"var(--viz-0)",grid:"var(--viz-grid)",axis:"var(--viz-axis)",surface:"var(--background)",label:"var(--muted-foreground)",text:"var(--foreground)"},AA=["var(--viz-0)","var(--viz-1)","var(--viz-2)","var(--viz-3)","var(--viz-4)","var(--viz-5)","var(--viz-6)"],RA={1:[6],2:[2,6],3:[2,4,6],4:[2,3,4,6],5:[2,3,4,5,6]};function NA(t){return RA[Math.min(5,Math.max(1,t))].map(i=>AA[i])}const g_={neutral:"var(--viz-2)",info:"var(--info)",success:"var(--success)",warning:"var(--warning)",danger:"var(--destructive)"},y_={instant:100,fast:150,base:200,enter:250,move:260,slow:500,easeEnter:"cubic-bezier(0.16, 1, 0.3, 1)",easeMove:"cubic-bezier(0.2, 0, 0, 1)"},Zy=new Map;function _A(t,a){const i=`${t??""}|${JSON.stringify(a)}`;let o=Zy.get(i);return o||(o=new Intl.NumberFormat(t,a),Zy.set(i,o)),o}function df(t,{compact:a=!1,maximumFractionDigits:i,locale:o}={}){return Number.isFinite(t)?_A(o,{notation:a?"compact":"standard",maximumFractionDigits:i??(a||Math.abs(t)<10?1:0)}).format(t):"—"}function v_(t,a=0){return Number.isFinite(t)?`${(t*100).toFixed(a)}%`:"—"}function b_(t,a=1){if(!Number.isFinite(t))return"—";const i=Math.abs(t*100),o=Number.isInteger(i)?i.toFixed(0):i.toFixed(a);return Number(o)===0?"0%":`${t>0?"+":"−"}${o}%`}function x_(t){return Number.isFinite(t)?t>0?`+${df(t)}`:t<0?`−${df(Math.abs(t))}`:"0":"—"}function Xa(t){return t!=null&&typeof t!="boolean"&&t!==""}const OA=3e4;let ff=Date.now();const Gl=new Set;let to=null;function MA(t){return Gl.add(t),to||(ff=Date.now(),to=setInterval(()=>{ff=Date.now(),Gl.forEach(a=>a())},OA)),()=>{Gl.delete(t),Gl.size===0&&to&&(clearInterval(to),to=null)}}function Jy(){return ff}function DA(){return S.useSyncExternalStore(MA,Jy,Jy)}const hf=60,mf=60*hf,Hd=24*mf;function jA(t,a,i,o){const c=t instanceof Date?t:new Date(t),u=Math.max(0,Math.floor((a-c.getTime())/1e3));if(u<hf)return i("now");if(u<mf)return i("{count}m",{count:Math.floor(u/hf)});if(u<Hd)return i("{count}h",{count:Math.floor(u/mf)});if(u<7*Hd)return i("{count}d",{count:Math.floor(u/Hd)});const f=c.getFullYear()===new Date(a).getFullYear();return c.toLocaleDateString(o,f?{month:"numeric",day:"numeric"}:{year:"numeric",month:"numeric"})}const zA={xs:12,sm:14,md:16,lg:20};function LA({size:t="sm",label:a,className:i}){const o=zA[t],c=m.jsxs("svg",{viewBox:"0 0 16 16",width:o,height:o,fill:"none","aria-hidden":"true",className:ye("shrink-0 animate-spin motion-reduce:[animation-duration:2.4s]",!a&&i),children:[m.jsx("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeOpacity:"0.18",strokeWidth:"1.75"}),m.jsx("path",{d:"M8 1.75a6.25 6.25 0 0 1 6.25 6.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]});return a?m.jsxs("span",{role:"status","aria-live":"polite",className:ye("inline-flex items-center gap-2 text-[13px] text-muted-foreground",i),children:[c,m.jsx("span",{children:a})]}):c}const UA={sm:"h-[18px] px-1.5 text-[11px] gap-1 [&_svg]:size-2.5",md:"h-5 px-2 text-xs gap-1 [&_svg]:size-3"};function BA({tone:t="neutral",variant:a="soft",size:i="md",shape:o="pill",icon:c,className:u,children:f,...h}){return m.jsxs("span",{"data-slot":"badge",className:ye("inline-flex shrink-0 items-center whitespace-nowrap font-medium leading-none [&_svg]:shrink-0",UA[i],o==="pill"?"rounded-full":"rounded",a==="soft"&&[u0[t],ts[t]],a==="outline"&&["bg-background ring-1 ring-inset",t==="neutral"?"text-foreground/80 ring-border":[ts[t],"ring-current/25"]],a==="solid"&&kA[t],a==="dot"&&"px-0 text-foreground/80",u),...h,children:[a==="dot"&&m.jsx("span",{"aria-hidden":"true",className:ye("size-1.5 shrink-0 rounded-full",CA[t])}),c,f]})}function qA({count:t,max:a=99,tone:i="neutral",className:o,...c}){const u=t>a?`${a}+`:String(t);return m.jsx("span",{"data-slot":"count-badge",className:ye("inline-flex shrink-0 items-center justify-center text-[11px] leading-4 tabular-nums",i==="neutral"?"font-normal text-muted-foreground":["min-w-4 rounded-full px-1.5 font-semibold",u0[i],ts[i]],o),...c,children:u})}const PA={neutral:m.jsx(of,{}),info:m.jsx(of,{}),success:m.jsx(Wi,{}),warning:m.jsx(Rr,{}),danger:m.jsx(fC,{})},IA={neutral:"bg-foreground/[0.04]",info:"bg-info/[0.06]",success:"bg-success/[0.07]",warning:"bg-warning/[0.08]",danger:"bg-destructive/[0.06]"},Wy={sm:{box:"gap-2 rounded-md px-2.5 py-1.5 text-xs leading-[18px]",icon:"mt-0.5 [&_svg]:size-3.5"},md:{box:"gap-2.5 rounded-lg px-3 py-2.5 text-[13px] leading-5",icon:"mt-0.5 [&_svg]:size-4"}};function HA({tone:t="neutral",size:a="md",title:i,icon:o,action:c,onDismiss:u,className:f,children:h,...p}){const{t:g}=Qt();return m.jsxs("div",{"data-slot":"notice",className:ye("flex items-start",Wy[a].box,IA[t],f),...p,children:[o!==!1&&m.jsx("span",{"aria-hidden":"true",className:ye("shrink-0",Wy[a].icon,uf[t]),children:o??PA[t]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[i&&m.jsx("div",{className:"font-medium text-foreground",children:i}),h&&m.jsx("div",{className:ye("text-foreground/80",i&&"mt-0.5"),children:h})]}),c&&m.jsx("div",{className:"shrink-0 self-center",children:c}),u&&m.jsx("button",{type:"button",onClick:u,"aria-label":g("Dismiss"),className:"-mr-1 shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:m.jsx(Gf,{className:"size-3.5","aria-hidden":"true"})})]})}const QA="relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap font-medium outline-none transition-[background-color,color,box-shadow,opacity] duration-150 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-40 aria-disabled:pointer-events-none aria-disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0",KA={xs:"h-6 gap-1 rounded-md px-2 text-xs [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1.5 rounded-md px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5",md:"h-8 gap-1.5 rounded-md px-3 text-[13px] [&_svg:not([class*='size-'])]:size-4",lg:"h-9 gap-2 rounded-lg px-4 text-sm [&_svg:not([class*='size-'])]:size-4",xl:"h-11 gap-2 rounded-lg px-5 text-sm [&_svg:not([class*='size-'])]:size-4"},GA={xs:"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",sm:"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5",md:"size-8 rounded-lg [&_svg:not([class*='size-'])]:size-4",lg:"size-9 rounded-lg [&_svg:not([class*='size-'])]:size-[18px]",xl:"size-11 rounded-lg [&_svg:not([class*='size-'])]:size-5"},YA={primary:{neutral:"bg-primary text-primary-foreground shadow-raised hover:bg-primary/90 active:bg-primary/85",danger:"bg-destructive-ink text-white shadow-raised hover:bg-destructive-ink/90 active:bg-destructive-ink/85"},secondary:{neutral:"bg-background text-foreground shadow-raised ring-1 ring-inset ring-border hover:bg-accent active:bg-foreground/[0.06]",danger:"bg-background text-destructive-ink shadow-raised ring-1 ring-inset ring-destructive/25 hover:bg-destructive/[0.06] active:bg-destructive/10"},ghost:{neutral:"text-foreground/80 hover:bg-accent hover:text-foreground active:bg-foreground/[0.06]",danger:"text-destructive-ink hover:bg-destructive/10 active:bg-destructive/15"},soft:{neutral:"bg-foreground/[0.05] text-foreground/90 hover:bg-foreground/[0.08] active:bg-foreground/10",danger:"bg-destructive/10 text-destructive-ink hover:bg-destructive/15 active:bg-destructive/20"},link:{neutral:"h-auto rounded-sm px-0 text-foreground underline decoration-border underline-offset-4 hover:decoration-foreground/50",danger:"h-auto rounded-sm px-0 text-destructive-ink underline decoration-destructive/30 underline-offset-4 hover:decoration-destructive/60"}},VA="text-muted-foreground hover:bg-accent hover:text-foreground active:bg-foreground/[0.06] data-[state=open]:bg-accent data-[state=open]:text-foreground";function d0({variant:t="secondary",tone:a="neutral",size:i="md",block:o=!1,iconOnly:c=!1,loading:u=!1,className:f}={}){return ye(QA,c?GA[i]:KA[i],c&&t==="ghost"&&a==="neutral"?VA:YA[t][a],o&&"w-full",u&&"disabled:opacity-100",f)}function fc({variant:t="secondary",tone:a="neutral",size:i="md",loading:o=!1,block:c=!1,asChild:u=!1,className:f,disabled:h,children:p,type:g,...x}){const v=d0({variant:t,tone:a,size:i,block:c,loading:o,className:f});return u?m.jsx(a0,{"data-slot":"button",className:v,...x,children:p}):m.jsxs("button",{type:g??"button","data-slot":"button","data-variant":t,className:v,disabled:h||o,"aria-busy":o||void 0,...x,children:[o&&m.jsx(LA,{size:i==="xs"?"xs":"sm"}),p]})}const FA=S.createContext(null);function S_(){return S.useContext(FA)}const w_="rounded-lg border border-input bg-background text-foreground transition-colors hover:border-ring/50",E_="border-destructive hover:border-destructive focus-within:border-destructive focus:border-destructive",T_="cursor-not-allowed bg-muted/50 text-muted-foreground hover:border-input",C_={sm:"h-8 px-2.5 text-[13px]",md:"h-9 px-3 text-sm"};function XA(t,a){return ye("flex h-8 w-full min-w-0 items-center gap-2.5 rounded-md px-2 text-left text-sm transition-[background-color,box-shadow,color] duration-150 pointer-coarse:h-10 pointer-coarse:text-[15px]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",t?"bg-background text-foreground shadow-raised ring-1 ring-border/80":"text-foreground/80 hover:bg-accent hover:text-foreground active:bg-foreground/[0.06]",a)}function $A({title:t,icon:a,count:i,countTone:o="neutral",sticky:c=!1,defaultOpen:u=!0,open:f,onOpenChange:h,children:p,className:g}){const x=S.useId();return m.jsxs(wA,{defaultOpen:u,open:f,onOpenChange:h,className:ye("mb-2",g),children:[m.jsx("div",{className:ye(c&&"sticky top-0 z-10 bg-sidebar"),children:m.jsxs(EA,{"data-sidebar-item":"",className:"group/header flex h-8 w-full items-center gap-1 rounded-md px-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 pointer-coarse:h-10 pointer-coarse:text-[15px]",children:[a&&m.jsx("span",{className:"mr-1.5 flex shrink-0 -translate-y-px [&_svg]:size-4",children:a}),m.jsx("span",{id:x,className:"truncate",children:t}),m.jsx(uC,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground/60 transition-transform duration-150 group-hover/header:text-muted-foreground group-data-[state=open]/header:rotate-90"}),i!==void 0&&m.jsx(qA,{count:i,tone:i>0?o:"neutral",className:"ml-auto text-xs leading-5"})]})}),m.jsx(TA,{role:"group","aria-labelledby":x,className:"mt-0.5 flex flex-col gap-px",children:p})]})}const k_={ink:$y.ink,context:$y.context,plan:"var(--viz-4)"};function A_(t){return Math.round(t)+.5}function ZA(t){return Array.from(t).reduce((a,i)=>a+(i.charCodeAt(0)>11904?2:1),0)*6.6}function R_(t){return Math.ceil(Math.max(0,...t.map(ZA)))+10}function N_(t){return df(t,{compact:!0})}function __(t,a,i,o){const c=Math.max(2,Math.floor(a/i)),u=Math.max(1,Math.ceil(t/c)),f=new Set;for(let p=0;p<t;p+=u)f.add(p);const h=Math.floor((t-1)/u)*u;if(t>0&&h!==t-1&&(t-1-h<u*.6&&h!==0&&f.delete(h),f.add(t-1)),o!=null&&o>=0&&o<t){for(const p of[...f])p!==o&&Math.abs(p-o)<u&&f.delete(p);f.add(o)}return f}const O_="rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2";function M_(t,a,i,o="x"){if(i===0)return;const c=a??i-1,u=o==="x"?"ArrowRight":"ArrowDown",f=o==="x"?"ArrowLeft":"ArrowUp";switch(t){case u:return a===null?c:Math.min(i-1,c+1);case f:return a===null?c:Math.max(0,c-1);case"Home":return 0;case"End":return i-1;default:return}}function D_(t){return NA(t).slice().reverse()}const f0={todo:{icon:Kf,label:"Pending",className:uf.neutral},doing:{icon:Ar,label:"Running",className:uf.info},done:{icon:Wi,label:"Done",className:"text-success/80"},cancelled:{icon:Cb,label:"Cancelled",className:"text-muted-foreground/70"}};function Qd({state:t,className:a}){const{icon:i,className:o}=f0[t];return m.jsx(i,{"aria-hidden":"true",className:ye("size-4 shrink-0",o,a)})}function j_({items:t,onToggle:a,summary:i=!0,className:o}){const{t:c}=Qt(),u={doing:t.filter(f=>f.state==="doing").length,todo:t.filter(f=>f.state==="todo").length,done:t.filter(f=>f.state==="done").length};return m.jsxs("div",{className:o,children:[i&&m.jsx("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:["doing","todo","done"].map(f=>m.jsxs("span",{className:"inline-flex items-center gap-1",children:[m.jsx(Qd,{state:f,className:"size-3.5"}),c(f0[f].label)," ",m.jsx("span",{className:"tabular-nums text-foreground/80",children:u[f]})]},f))}),m.jsx("ul",{className:"flex flex-col",children:t.map(f=>{const h=f.state==="done"||f.state==="cancelled";return m.jsxs("li",{className:"flex min-h-9 items-center gap-2.5 border-b border-border/40 py-1.5 last:border-0",children:[a?m.jsx("button",{type:"button",role:"checkbox","aria-checked":f.state==="done","aria-label":typeof f.title=="string"?f.title:void 0,onClick:()=>a(f.id),className:"-m-1 flex shrink-0 rounded p-1 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:m.jsx(Qd,{state:f.state})}):m.jsx(Qd,{state:f.state}),m.jsx("span",{className:ye("min-w-0 flex-1 truncate text-[13px]",h?"text-muted-foreground line-through decoration-foreground/30":"text-foreground/90"),children:f.title}),Xa(f.tag)&&m.jsx("span",{className:"shrink-0",children:f.tag}),Xa(f.meta)&&m.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:f.meta}),f.due&&m.jsx("span",{className:ye("w-14 shrink-0 text-right text-xs tabular-nums",f.due.tone&&!h?ye("font-medium",ts[f.due.tone]):"text-muted-foreground"),children:f.due.label})]},f.id)})})]})}function z_({groups:t,className:a}){return m.jsx("div",{className:ye("flex flex-col gap-4",a),children:t.map(i=>m.jsxs("section",{children:[m.jsxs("h4",{className:"mb-1.5 flex items-baseline gap-2 text-xs font-semibold text-foreground",children:[i.title,Xa(i.caption)&&m.jsx("span",{className:"font-normal text-muted-foreground",children:i.caption})]}),m.jsx("ul",{className:"flex flex-col gap-1",children:i.entries.map(o=>m.jsxs("li",{className:"grid grid-cols-[2.75rem_3px_minmax(0,1fr)] gap-x-2.5 py-1",children:[m.jsxs("span",{className:"flex flex-col pt-px text-right leading-4 tabular-nums",children:[m.jsx("span",{className:"text-xs text-foreground/80",children:o.time}),o.endTime&&m.jsx("span",{className:"text-[11px] text-muted-foreground",children:o.endTime})]}),m.jsx("span",{"aria-hidden":"true",className:ye("rounded-full",o.active?"bg-viz-6":"bg-viz-1")}),m.jsxs("div",{className:"min-w-0",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx("span",{className:"truncate text-[13px] text-foreground/90",children:o.title}),Xa(o.tag)&&m.jsx("span",{className:"shrink-0",children:o.tag})]}),Xa(o.meta)&&m.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o.meta})]})]},o.id))})]},i.id))})}function L_({entries:t,className:a}){return m.jsx("ol",{className:ye("flex flex-col",a),children:t.map((i,o)=>m.jsxs("li",{className:"relative flex gap-2.5 pb-3 last:pb-0",children:[o<t.length-1&&m.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-[11px] top-7 w-px bg-border"}),m.jsx("span",{className:"relative flex size-6 shrink-0 items-center justify-center",children:i.avatar}),m.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[m.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[m.jsx("p",{className:"min-w-0 text-[13px] leading-5 text-foreground/85",children:i.text}),m.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:i.time})]}),Xa(i.detail)&&m.jsx("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i.detail})]})]},i.id))})}function U_({items:t,className:a}){const{t:i}=Qt();return m.jsx("ul",{className:ye("flex flex-col",a),children:t.map(o=>{const c=o.days<0?"danger":o.days<=3?"warning":null,u=o.days<0?i("days overdue"):o.days===0?i("Due today"):i("days left");return m.jsxs("li",{className:"flex items-center gap-3 border-b border-border/40 py-2 last:border-0",children:[m.jsxs("div",{className:"flex w-14 shrink-0 flex-col items-center leading-none",children:[m.jsx("span",{className:ye("text-xl font-semibold tabular-nums",c?ts[c]:"text-foreground"),children:o.days===0?"0":Math.abs(o.days)}),m.jsx("span",{className:ye("mt-1 text-xs",c?ts[c]:"text-muted-foreground"),children:u})]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"truncate text-[13px] text-foreground/90",children:o.title}),Xa(o.meta)&&m.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o.meta})]})]},o.id)})})}function B_({entries:t,className:a}){return m.jsx("ol",{className:ye("flex flex-col",a),children:t.map((i,o)=>m.jsxs("li",{className:"flex items-center gap-3 border-b border-border/40 py-2 last:border-0",children:[m.jsx("span",{className:ye("w-6 shrink-0 text-[15px] font-semibold tabular-nums",o<3?"text-foreground":"text-muted-foreground"),children:String(o+1).padStart(2,"0")}),i.avatar,m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"truncate text-[13px] font-medium text-foreground/90",children:i.name}),Xa(i.meta)&&m.jsx("div",{className:"truncate text-xs text-muted-foreground",children:i.meta})]}),i.change!==void 0&&m.jsxs("span",{className:ye("inline-flex w-8 shrink-0 items-center justify-end gap-0.5 text-[11px] font-medium tabular-nums",i.change>0?"text-success-ink":i.change<0?"text-destructive-ink":"text-muted-foreground"),children:[i.change>0&&m.jsx(aC,{"aria-hidden":"true",className:"size-3",strokeWidth:2.5}),i.change<0&&m.jsx(WT,{"aria-hidden":"true",className:"size-3",strokeWidth:2.5}),i.change===0?"—":Math.abs(i.change)]}),m.jsx("span",{className:"w-16 shrink-0 text-right text-[13px] font-semibold tabular-nums text-foreground",children:i.value})]},i.id))})}function q_({items:t,locale:a,className:i}){const o=new Intl.DateTimeFormat(a,{month:"short"});return m.jsx("ul",{className:ye("flex flex-col",i),children:t.map(c=>m.jsxs("li",{className:"flex gap-3 border-b border-border/40 py-2.5 last:border-0",children:[m.jsxs("div",{className:"flex w-10 shrink-0 flex-col items-center rounded-lg bg-foreground/[0.04] py-1 leading-none",children:[m.jsx("span",{className:"text-lg font-semibold tabular-nums text-foreground",children:c.date.getDate()}),m.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o.format(c.date)})]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:c.title}),c.badge]}),c.body&&m.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:c.body}),Xa(c.meta)&&m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:c.meta})]})]},c.id))})}var ev;(function(t){t.TODO="TODO",t.IN_PROGRESS="IN_PROGRESS",t.IN_REVIEW="IN_REVIEW",t.DONE="DONE",t.CANCELLED="CANCELLED"})(ev||(ev={}));var Xn;(function(t){t[t.LOW=-1]="LOW",t[t.NORMAL=0]="NORMAL",t[t.HIGH=1]="HIGH",t[t.URGENT=2]="URGENT"})(Xn||(Xn={}));var tv;(function(t){t.ACTIVE="ACTIVE",t.MERGED="MERGED",t.ABANDONED="ABANDONED",t.HIBERNATED="HIBERNATED"})(tv||(tv={}));var nv;(function(t){t.WORKTREE="WORKTREE",t.MAIN_DIRECTORY="MAIN_DIRECTORY"})(nv||(nv={}));var Se;(function(t){t.CLAUDE_CODE="CLAUDE_CODE",t.GEMINI_CLI="GEMINI_CLI",t.CURSOR_AGENT="CURSOR_AGENT",t.CODEX="CODEX",t.QWEN_CODE="QWEN_CODE",t.KIRO_CLI="KIRO_CLI",t.OPENCODE="OPENCODE",t.PI_CODING_AGENT="PI_CODING_AGENT",t.GROK_BUILD="GROK_BUILD",t.MINION_CODE="MINION_CODE",t.DEEPSEEK_HERMES="DEEPSEEK_HERMES"})(Se||(Se={}));var Jt;(function(t){t.CLI="CLI",t.ACP="ACP"})(Jt||(Jt={}));var av;(function(t){t.PENDING="PENDING",t.RUNNING="RUNNING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELLED="CANCELLED"})(av||(av={}));var rv;(function(t){t.CHAT="CHAT",t.COMMIT_MSG="COMMIT_MSG"})(rv||(rv={}));var iv;(function(t){t.WORKSPACE="WORKSPACE",t.CONVERSATION="CONVERSATION"})(iv||(iv={}));var sv;(function(t){t.REBASE="REBASE",t.MERGE="MERGE"})(sv||(sv={}));const JA=["oss","ollama","lmstudio","amazon-bedrock"];function P_(t){return JA.includes(t)}const WA={[Se.CLAUDE_CODE]:{agentType:Se.CLAUDE_CODE,apiBaseUrl:{kind:"env",path:"ANTHROPIC_BASE_URL",placeholder:"https://api.anthropic.com"},apiKey:{kind:"env",path:"ANTHROPIC_API_KEY"},model:{kind:"config",path:"model",placeholder:"claude-sonnet-4-20250514"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"},settingsFormat:"json"},[Se.CODEX]:{agentType:Se.CODEX,apiBaseUrl:{kind:"settings",path:"openai_base_url",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gpt-5.3-codex"},reasoningEffort:{kind:"settings",path:"model_reasoning_effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"dangerouslyBypassApprovalsAndSandbox",riskKind:"bypass-approvals-and-sandbox"},fastMode:{kind:"config",path:"fastMode"},disableResponsesWebsocket:{kind:"config",path:"disableResponsesWebsocket"},settingsFormat:"toml"},[Se.GEMINI_CLI]:{agentType:Se.GEMINI_CLI,apiKey:{kind:"env",path:"GEMINI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gemini-2.5-pro"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[Se.CURSOR_AGENT]:{agentType:Se.CURSOR_AGENT,model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"force",riskKind:"force-execution"}},[Se.QWEN_CODE]:{agentType:Se.QWEN_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://dashscope.aliyuncs.com/compatible-mode/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"qwen3-coder-plus"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[Se.KIRO_CLI]:{agentType:Se.KIRO_CLI,model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"trustAllTools",riskKind:"auto-approve"}},[Se.OPENCODE]:{agentType:Se.OPENCODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[Se.PI_CODING_AGENT]:{agentType:Se.PI_CODING_AGENT,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[Se.GROK_BUILD]:{agentType:Se.GROK_BUILD,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.x.ai/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"alwaysApprove",riskKind:"auto-approve"}},[Se.MINION_CODE]:{agentType:Se.MINION_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"}},[Se.DEEPSEEK_HERMES]:{agentType:Se.DEEPSEEK_HERMES,apiBaseUrl:{kind:"env",path:"DEEPSEEK_BASE_URL",placeholder:"https://api.deepseek.com"},apiKey:{kind:"env",path:"DEEPSEEK_API_KEY"},model:{kind:"config",path:"model",placeholder:"deepseek-v4-pro"},reasoningEffort:{kind:"config",path:"effort",options:["off","low","high","max"]},executionPermission:{kind:"config",riskKind:"auto-approve"}}};function I_(t){return WA[t]}const Yl="/events",H_={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},Tr={MESSAGE_DELIVERY_INVALIDATED:"message-delivery:invalidated",TRANSLATION_INVALIDATED:"translation:invalidated",SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",SESSION_PERMISSION_REQUESTED:"session:permission_requested",SESSION_PERMISSION_INVALIDATED:"session:permission_invalidated",SESSION_RUNTIME_STATE_CHANGED:"session:runtime_state_changed",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};var On;(function(t){t.Action="Action",t.Assistant="Assistant",t.Info="Info",t.Tool="Tool",t.User="User",t.Cursor="Cursor",t.Error="Error",t.Warning="Warning"})(On||(On={}));function eR(t){const a=t.metadata?.toolName||"Tool",i=t.metadata?.action,o=t.metadata?.status,c={file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"},u=t.metadata?.toolKind?a:i?c[i]:a;return o==="success"?`${u} ✓`:o==="failed"?`${u} ✗`:o==="pending_approval"?`${u} (待审批)`:u}function ov(t){switch(t.entryType){case"user_message":case"user_feedback":return{id:t.id,timestamp:t.timestamp,type:On.User,content:t.content,...t.metadata?.deliveryId?{deliveryId:t.metadata.deliveryId}:{}};case"assistant_message":return{id:t.id,timestamp:t.timestamp,type:On.Assistant,content:t.content,...t.metadata?.textBlock?{textBlock:t.metadata.textBlock}:{}};case"next_action":return{id:t.id,timestamp:t.timestamp,type:On.Action,content:t.content};case"thinking":return{id:t.id,timestamp:t.timestamp,type:On.Info,title:"Thinking",content:t.content};case"tool_use":return{id:t.id,timestamp:t.timestamp,type:On.Tool,title:eR(t),content:t.content,isCollapsed:t.metadata?.status==="success",tool:{action:t.metadata?.action,name:t.metadata?.toolName,id:t.metadata?.toolId,kind:t.metadata?.toolKind,status:t.metadata?.status,content:t.metadata?.toolContent,locations:t.metadata?.toolLocations,inputSummary:t.metadata?.toolInputSummary,outputSummary:t.metadata?.toolOutputSummary}};case"error_message":return{id:t.id,timestamp:t.timestamp,type:On.Error,content:t.content};case"warning_message":return{id:t.id,timestamp:t.timestamp,type:On.Warning,content:t.content};case"system_message":return{id:t.id,timestamp:t.timestamp,type:On.Info,content:t.content};case"loading":return{id:t.id,timestamp:t.timestamp,type:On.Cursor,content:"",cursorActivity:{processingStartedAt:t.timestamp}};case"token_usage_info":if(t.metadata?.tokenUsage){const{totalTokens:a=0,modelContextWindow:i}=t.metadata.tokenUsage;return{id:t.id,timestamp:t.timestamp,type:On.Info,content:t.content,tokenUsage:{totalTokens:a,modelContextWindow:i}}}return null;default:return null}}const lv=new WeakMap;function tR(t){if(typeof t!="object"||t===null)return ov(t);const a=lv.get(t);if(a!==void 0)return a;const i=ov(t);return lv.set(t,i),i}function Q_(t){const a=[];for(const i of t){const o=tR(i);o!==null&&a.push(o)}return a}function K_(t){return{id:`cursor-${Date.now()}`,timestamp:t?.processingStartedAt??Date.now(),type:On.Cursor,content:"",cursorActivity:t}}const G_={[Se.CLAUDE_CODE]:[Jt.CLI,Jt.ACP],[Se.GEMINI_CLI]:[Jt.CLI,Jt.ACP],[Se.CURSOR_AGENT]:[Jt.CLI,Jt.ACP],[Se.CODEX]:[Jt.CLI,Jt.ACP],[Se.QWEN_CODE]:[Jt.ACP],[Se.KIRO_CLI]:[Jt.ACP],[Se.OPENCODE]:[Jt.ACP],[Se.PI_CODING_AGENT]:[Jt.ACP],[Se.GROK_BUILD]:[Jt.ACP],[Se.MINION_CODE]:[Jt.ACP],[Se.DEEPSEEK_HERMES]:[Jt.ACP]},nR=Object.freeze(Object.values(Se).filter(t=>t!==Se.MINION_CODE));new Set(nR);function Y_(t,a){const{paragraphs:i,...o}=a;if(!i?.length)return[{...o,content:t,start:0,end:t.length}];const c=[];let u=0;for(const[f,h]of i.entries()){if(!Number.isInteger(h.end)||h.end<=u||h.end>t.length)return[];c.push({...o,blockId:`${a.blockId}:p${f}`,state:"SEALED",translationEpoch:h.translationEpoch,content:t.slice(u,h.end),start:u,end:h.end}),u=h.end}return u<t.length&&c.push({...o,blockId:`${a.blockId}:p${i.length}`,content:t.slice(u),start:u,end:t.length}),c}function aR(t){return t.origin==="TASK_INITIAL"||t.origin==="TASK_FOLLOWUP"||t.origin==="CONVERSATION"}const rR=3;function h0(t){return t.ancestorIds??(t.parentTaskId?[t.parentTaskId]:[])}function V_(t){return h0(t).length<rR-1}function hc(t,a){return t.id===a||h0(t).includes(a)}const iR={[Se.CLAUDE_CODE]:{agentType:Se.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[Se.GEMINI_CLI]:{agentType:Se.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[Se.CURSOR_AGENT]:{agentType:Se.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[Se.CODEX]:{agentType:Se.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"},[Se.QWEN_CODE]:{agentType:Se.QWEN_CODE,label:"Qwen Code",logoSrc:"/agent-icons/qwen-code.svg"},[Se.KIRO_CLI]:{agentType:Se.KIRO_CLI,label:"Kiro CLI",logoSrc:"/agent-icons/kiro-cli.svg"},[Se.OPENCODE]:{agentType:Se.OPENCODE,label:"OpenCode",logoSrc:"/agent-icons/opencode.svg"},[Se.PI_CODING_AGENT]:{agentType:Se.PI_CODING_AGENT,label:"Pi Coding Agent",logoSrc:"/agent-icons/pi-coding-agent.svg"},[Se.GROK_BUILD]:{agentType:Se.GROK_BUILD,label:"Grok Build",logoSrc:"/agent-icons/grok-build.svg"},[Se.MINION_CODE]:{agentType:Se.MINION_CODE,label:"Minion Code"},[Se.DEEPSEEK_HERMES]:{agentType:Se.DEEPSEEK_HERMES,label:"DeepSeek Harness",logoSrc:"/agent-icons/deepseek-hermes.svg"}};function m0(t){return t?iR[t]??null:null}function sR(t,a){return m0(t)?.label??a??(t?String(t):"")}function oR({agentType:t,className:a,fallbackClassName:i}){const o=m0(t),[c,u]=S.useState(!1);return S.useEffect(()=>{u(!1)},[o?.logoSrc]),!o?.logoSrc||c?m.jsx(Ab,{"aria-hidden":"true",className:ye("shrink-0 text-muted-foreground",a,i)}):m.jsx("img",{src:o.logoSrc,alt:"","aria-hidden":"true",className:ye("shrink-0 object-contain",a),draggable:!1,onError:()=>u(!0)})}function lR(t){const a=Wk(t,9,"..");if(a===t)return t;const i=a.slice(0,-2),o=i.search(/[-_.\s][^-_.\s]*$/);return`${o>=3?i.slice(0,o):i}..`}function cR(t){return t.replace("text-","bg-")}function F_({color:t,className:a}){return m.jsx("span",{"aria-hidden":"true",className:ye("size-2 shrink-0 rounded-full",cR(t),a)})}function uR({name:t,color:a,shorten:i=!0,className:o}){return m.jsx("span",{title:t,className:ye("shrink-0 whitespace-nowrap rounded bg-foreground/[0.05] px-1 py-0.5 text-[10px] font-medium leading-none",o),children:m.jsx("span",{className:ye(a,"bg-[linear-gradient(90deg,currentColor_0.6em,var(--muted-foreground)_2.6em)] bg-clip-text [-webkit-text-fill-color:transparent]"),children:i?lR(t):t})})}const dR={sm:"size-3.5",md:"size-4",lg:"size-5"};function X_({agentType:t,label:a,showLabel:i=!0,size:o="md",className:c}){const u=a??sR(t,"Agent");return m.jsxs("span",{className:ye("inline-flex min-w-0 items-center gap-1.5",o==="sm"?"text-xs":"text-[13px]",c),title:i?void 0:u,children:[m.jsx(oR,{agentType:t,className:dR[o]}),i?m.jsx("span",{className:"truncate text-foreground/80",children:u}):m.jsx("span",{className:"sr-only",children:u})]})}function $_({name:t,className:a}){return m.jsxs("span",{title:t,className:ye("inline-flex min-w-0 items-center gap-1 text-muted-foreground",a),children:[m.jsx(kC,{"aria-hidden":"true",className:"size-3 shrink-0"}),m.jsx("span",{className:"truncate font-mono text-[11px]",children:t})]})}function Z_({additions:t=0,deletions:a=0,bar:i=!1,className:o}){const c=t+a,u=c===0?0:Math.round(t/c*5);return m.jsxs("span",{className:ye("inline-flex shrink-0 items-center gap-1.5 font-mono text-[11px] tabular-nums",o),children:[t>0&&m.jsxs("span",{className:"text-success-ink",children:["+",t]}),a>0&&m.jsxs("span",{className:"text-destructive-ink",children:["−",a]}),c===0&&m.jsx("span",{className:"text-muted-foreground",children:"0"}),i&&m.jsx("span",{"aria-hidden":"true",className:"flex gap-px",children:Array.from({length:5}).map((f,h)=>m.jsx("span",{className:ye("size-1.5 rounded-[1px]",c===0?"bg-foreground/10":h<u?"bg-success":"bg-destructive")},h))})]})}const ca={Review:"Review",Running:"Running",Pending:"Pending",Done:"Done",Cancelled:"Cancelled"},bc={[ca.Review]:{label:"Review",icon:wC,iconClass:"text-warning",accentClass:"text-warning",titleClass:"font-semibold text-foreground"},[ca.Running]:{label:"Running",icon:Ar,iconClass:"text-info",accentClass:"text-info",titleClass:"task-title-running"},[ca.Pending]:{label:"Pending",icon:Kf,iconClass:"text-muted-foreground",accentClass:"text-muted-foreground",titleClass:""},[ca.Done]:{label:"Done",icon:Wi,iconClass:"text-success/80",accentClass:"text-success",titleClass:"text-muted-foreground"},[ca.Cancelled]:{label:"Cancelled",icon:Cb,iconClass:"text-muted-foreground/70",accentClass:"text-muted-foreground/70",titleClass:"text-muted-foreground"}},J_=[ca.Review,ca.Running,ca.Pending,ca.Done,ca.Cancelled],cv=[{value:Xn.URGENT,code:"P0",label:"紧急",className:"bg-destructive/10 text-destructive-ink",iconName:"chevrons-up"},{value:Xn.HIGH,code:"P1",label:"高",className:"bg-warning/15 text-warning-ink",iconName:"signal-high"},{value:Xn.NORMAL,code:"P2",label:"普通",className:"bg-muted text-muted-foreground",iconName:"minus"},{value:Xn.LOW,code:"P3",label:"低",className:"bg-foreground/[0.06] text-muted-foreground",iconName:"chevrons-down"}];function fR(t){return cv.find(a=>a.value===t)??cv[2]}function hR({value:t,now:a,className:i}){const{t:o,locale:c}=Qt(),u=DA(),f=t instanceof Date?t:new Date(t);return m.jsx("time",{dateTime:f.toISOString(),title:f.toLocaleString(c),className:ye("shrink-0 tabular-nums text-muted-foreground",i),children:jA(f,a??u,o,c)})}function mR({status:t,className:a}){const{icon:i,iconClass:o}=bc[t];return m.jsx(i,{className:ye("size-4 shrink-0",o,a)})}function W_({status:t,className:a}){const{t:i}=Qt(),{label:o}=bc[t];return m.jsxs("span",{className:ye("inline-flex shrink-0 items-center gap-1.5 text-xs font-medium text-foreground/80 [&_svg]:size-3.5",a),children:[m.jsx(mR,{status:t}),i(o)]})}const pR={[Xn.URGENT]:"danger",[Xn.HIGH]:"warning",[Xn.NORMAL]:"neutral",[Xn.LOW]:"neutral"};function gR({priority:t,showLabel:a=!1,className:i}){const{t:o}=Qt(),c=fR(t),u=pR[c.value]??"neutral";return m.jsxs(BA,{tone:u,size:"sm",shape:"tag",title:`${c.code} · ${o(c.label)}`,className:ye("font-semibold",c.value===Xn.LOW&&"bg-foreground/[0.04]",i),children:[c.code,a&&m.jsx("span",{className:"font-medium",children:o(c.label)})]})}function eO({title:t,status:a,priority:i,project:o,updatedAt:c,now:u,active:f=!1,className:h,...p}){const{titleClass:g}=bc[a];return m.jsxs("button",{type:"button","data-sidebar-item":"","aria-current":f||void 0,title:o?`${t} · ${o.name}`:t,className:ye("task-row",XA(f),h),...p,children:[m.jsx("span",{className:ye("min-w-0 flex-1 truncate",g),children:t}),i!==void 0&&i!==Xn.NORMAL&&m.jsx(gR,{priority:i}),(o||c!==void 0)&&m.jsx("span",{className:"task-row-meta",children:m.jsxs("span",{className:"flex items-center gap-1",children:[o&&m.jsx(uR,{name:o.name,color:o.color,className:"@max-[22rem]:hidden"}),c!==void 0&&m.jsx(hR,{value:c,now:u,className:"text-[11px]"})]})})]})}function tO({status:t,count:a,defaultOpen:i=!0,sticky:o=!0,children:c,className:u}){const{t:f}=Qt(),{icon:h,label:p,accentClass:g}=bc[t];return m.jsx($A,{title:f(p),icon:m.jsx(h,{className:g}),count:a,countTone:t===ca.Review?"warning":"neutral",sticky:o,defaultOpen:i,className:ye(a>0&&"data-[state=open]:mb-4",u),children:c})}const yR={default:{variant:"primary"},destructive:{variant:"primary",tone:"danger"},outline:{variant:"secondary"},secondary:{variant:"soft"},ghost:{variant:"ghost"},link:{variant:"link"}},vR={default:{size:"lg"},xs:{size:"xs"},sm:{size:"md"},lg:{size:"xl"},icon:{size:"lg",iconOnly:!0},"icon-xs":{size:"xs",iconOnly:!0},"icon-sm":{size:"md",iconOnly:!0},"icon-lg":{size:"xl",iconOnly:!0}};function Sa({className:t,variant:a="default",size:i="default",asChild:o=!1,...c}){const u=o?a0:"button",f=a??"default",h=i??"default";return m.jsx(u,{"data-slot":"button","data-variant":f,"data-size":h,className:d0({...yR[f],...vR[h],className:t}),...c})}function Ot({className:t,...a}){return m.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:ye("animate-pulse rounded-md bg-muted motion-reduce:animate-none",t),...a})}function bR({children:t,className:a}){return m.jsx("div",{className:ye("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",a),children:t})}function nO({title:t,description:a,actions:i,className:o}){return m.jsxs("div",{className:ye("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",o),children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("h2",{className:"text-[22px] font-semibold tracking-tight text-foreground",children:t}),a&&m.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:a})]}),i&&m.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:i})]})}function aO({children:t,className:a}){return m.jsx("h3",{className:ye("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",a),children:t})}function rO({label:t,description:a,icon:i,children:o,align:c="start",controlWidth:u="fixed",className:f}){return m.jsxs("div",{className:ye("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",f),children:[m.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[i&&m.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:m.jsx(i,{size:15})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("div",{className:"text-[13px] font-medium text-foreground",children:t}),a&&m.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a})]})]}),m.jsx("div",{className:ye("shrink-0",u==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:o})]})}function iO({label:t,description:a,children:i,className:o,htmlFor:c}){return m.jsxs("div",{className:ye("space-y-1.5",o),children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:t}),a&&m.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:a})]}),i]})}function sO({icon:t,message:a,action:i,className:o}){return m.jsxs("div",{className:ye("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",o),children:[t&&m.jsx(t,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/50","aria-hidden":"true"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i&&m.jsx("div",{className:"mt-4 flex justify-center",children:i})]})}function oO({saving:t,onSave:a,onCancel:i,className:o}){const{t:c}=Qt();return m.jsx("div",{className:ye("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",o),children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),m.jsxs("div",{className:"flex items-center gap-2",children:[i&&m.jsx(Sa,{size:"sm",variant:"ghost",onClick:i,disabled:t,children:c("取消")}),m.jsx(Sa,{size:"sm",onClick:a,disabled:t,children:c(t?"保存中...":"保存")})]})]})})}function xR({rows:t=3}){return m.jsxs("div",{role:"status","aria-label":"Loading",children:[m.jsx(Ot,{className:"h-7 w-36"}),m.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:t}).map((a,i)=>m.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[m.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[m.jsx(Ot,{className:"h-4 w-32"}),m.jsx(Ot,{className:"h-3 w-64 max-w-full"})]}),m.jsx(Ot,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},i))})]})}function lO(){return m.jsxs("div",{role:"status","aria-label":"Loading",children:[m.jsx(Ot,{className:"h-7 w-36"}),m.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[m.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((t,a)=>m.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[m.jsx(Ot,{className:"h-2 w-2 rounded-full"}),m.jsxs("div",{className:"flex-1 space-y-1.5",children:[m.jsx(Ot,{className:"h-3.5 w-3/4"}),m.jsx(Ot,{className:"h-2.5 w-1/2"})]})]},a))}),m.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(Ot,{className:"h-5 w-44"}),m.jsx(Ot,{className:"h-3 w-28"})]}),m.jsx(Ot,{className:"h-8 w-24 rounded-md"})]}),m.jsxs("div",{className:"mt-8 space-y-3",children:[m.jsx(Ot,{className:"h-3 w-20"}),m.jsx(Ot,{className:"h-24 w-full rounded-lg"}),m.jsx(Ot,{className:"h-3 w-20"}),m.jsx(Ot,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function cO({cards:t=6}){return m.jsxs("div",{role:"status","aria-label":"Loading",children:[m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsx(Ot,{className:"h-7 w-36"}),m.jsx(Ot,{className:"h-8 w-44 rounded-lg"})]}),m.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:t}).map((a,i)=>m.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[m.jsx(Ot,{className:"h-10 w-10 shrink-0 rounded-full"}),m.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[m.jsx(Ot,{className:"h-4 w-2/3"}),m.jsx(Ot,{className:"h-3 w-1/2"}),m.jsx(Ot,{className:"h-3 w-3/4"})]})]},i))})]})}const SR=S.lazy(()=>cn(()=>import("./GeneralSettingsPage-DFT7Cubi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(t=>({default:t.GeneralSettingsPage}))),wR=S.lazy(()=>cn(()=>import("./TranslationSettingsPage-lLaxWCy3.js"),__vite__mapDeps([16,17,11,12,13,6,7,5,9,8,18,19])).then(t=>({default:t.TranslationSettingsPage}))),ER=S.lazy(()=>cn(()=>import("./ProviderSettingsPage-D759BSRa.js"),__vite__mapDeps([20,21,4,5,14,22,23,7,24,1,2,3,6,8,9,10,11,12,13,25,26,27,28,17,29,19,30,31,32,33,34,35])).then(t=>({default:t.ProviderSettingsPage}))),TR=S.lazy(()=>cn(()=>import("./AgentEnvironmentSettingsPage-BRihy3_Q.js"),[]).then(t=>({default:t.AgentEnvironmentSettingsPage}))),CR=S.lazy(()=>cn(()=>import("./TeamSettingsPage-BszQfKp0.js"),__vite__mapDeps([36,22,23,7,24,1,2,3,4,5,6,8,9,10,25,26,27,28,17,29,19,30,15,37,38,14,33,39])).then(t=>({default:t.TeamSettingsPage}))),kR=S.lazy(()=>cn(()=>import("./ProjectSettingsPage-CMBMkbgI.js"),__vite__mapDeps([40,41,42,28,18,19,7,8,3,4,5,43,33,44,24,23,45,31])).then(t=>({default:t.ProjectSettingsPage}))),AR=S.lazy(()=>cn(()=>import("./NotificationSettingsPage-BSMJ45yx.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,8,9,10,12,13,47,48])).then(t=>({default:t.NotificationSettingsPage}))),RR=S.lazy(()=>cn(()=>import("./McpSettingsPage-CgiyGvkH.js"),__vite__mapDeps([49,29,50,5])).then(t=>({default:t.McpSettingsPage}))),NR=S.lazy(()=>cn(()=>import("./ProfileSettingsPage-BwNThOnH.js"),__vite__mapDeps([51,52,24,23,7,22,11,53,4,33,35])).then(t=>({default:t.ProfileSettingsPage}))),uv=[{id:"general",label:"通用",icon:Py},{id:"translation",label:"语言转换",icon:Py},{id:"agent-environment",label:"Agent 环境",icon:Tb},{id:"agents",label:"Agent 配置",icon:Ab},{id:"team",label:"团队协作",icon:GC},{id:"projects",label:"项目配置",icon:TC},{id:"notifications",label:"通知",icon:iC},{id:"mcp",label:"MCP 配置",icon:lC}];function _R({tab:t}){switch(t){case"general":return m.jsx(SR,{});case"translation":return m.jsx(wR,{});case"agent-environment":return m.jsx(TR,{});case"agents":return m.jsx(ER,{});case"team":return m.jsx(CR,{});case"projects":return m.jsx(kR,{});case"notifications":return m.jsx(AR,{});case"mcp":return m.jsx(RR,{});case"agents-legacy":return m.jsx(NR,{})}}function OR(){return m.jsx(bR,{children:m.jsx(xR,{rows:3})})}function MR(){const{t}=Qt(),a=io(g=>g.settingsOpen),i=io(g=>g.settingsTab),o=io(g=>g.closeSettings),c=io(g=>g.setSettingsTab),[u,f]=S.useState(!1),h=S.useRef(!1),p=S.useRef(null);return S.useEffect(()=>{if(a){const g=requestAnimationFrame(()=>f(!0));h.current||(Vf(),h.current=!0);const x=requestAnimationFrame(()=>p.current?.focus());return()=>{cancelAnimationFrame(g),cancelAnimationFrame(x)}}else{const g=setTimeout(()=>f(!1),200);return h.current&&(dc(),h.current=!1),()=>clearTimeout(g)}},[a]),S.useEffect(()=>()=>{h.current&&(dc(),h.current=!1)},[]),S.useEffect(()=>{if(!a)return;const g=x=>{x.key==="Escape"&&eA()===1&&o()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[a,o]),!u&&!a?null:m.jsxs("div",{className:ye("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",a?"opacity-100":"opacity-0 pointer-events-none"),children:[m.jsx("div",{className:"absolute inset-0 bg-black/20",onClick:o,"aria-hidden":"true"}),m.jsxs("div",{ref:p,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":t("设置"),className:ye("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-xl bg-background shadow-overlay ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",a?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[m.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:m.jsx(LC,{size:14})}),m.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:t("设置")})]}),m.jsx("button",{onClick:o,"aria-label":t("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:m.jsx(Gf,{size:15})})]}),m.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:uv.map(g=>m.jsxs("button",{role:"tab","aria-selected":i===g.id,onClick:()=>c(g.id),className:ye("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",i===g.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[m.jsx(g.icon,{size:13,"aria-hidden":"true"}),m.jsx("span",{children:t(g.label)})]},g.id))}),m.jsxs("div",{className:"flex flex-1 min-h-0",children:[m.jsx("nav",{"aria-label":t("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:uv.map(g=>m.jsxs("button",{"aria-current":i===g.id?"page":void 0,onClick:()=>c(g.id),className:ye("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",i===g.id?"bg-background text-foreground font-medium shadow-raised ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[m.jsx(g.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),m.jsx("span",{children:t(g.label)})]},g.id))}),m.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:m.jsx(S.Suspense,{fallback:m.jsx(OR,{}),children:a&&m.jsx(_R,{tab:i})})})]})]})]})}const p0="agent-tower:desktop-titlebar",pf="agent-tower:desktop-platform",oi={desktop:"1",desktopTitlebar:"integrated"},g0=S.createContext(null),DR={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:t=>t};function jR(t){const a=new URLSearchParams(t);return a.get("desktop")===oi.desktop&&a.get("desktopTitlebar")===oi.desktopTitlebar}function y0(t){return t==="darwin"||t==="win32"||t==="linux"?t:"unknown"}function zR(){if(typeof window>"u")return"unknown";try{return y0(window.sessionStorage.getItem(pf))}catch{return"unknown"}}function LR(t){if(!(typeof window>"u"))try{t==="unknown"?window.sessionStorage.removeItem(pf):window.sessionStorage.setItem(pf,t)}catch{}}function UR(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(p0)===oi.desktopTitlebar?"integrated":"none"}catch{return"none"}}function BR(t){if(!(typeof window>"u"))try{t==="integrated"&&window.sessionStorage.setItem(p0,oi.desktopTitlebar)}catch{}}function qR(t){return jR(t)?(BR("integrated"),"integrated"):UR()}function PR(t){const a=new URLSearchParams(t),i=y0(a.get("desktopPlatform"));return a.get("desktop")===oi.desktop&&i!=="unknown"?(LR(i),i):zR()}function dv(t,a){const i=new URLSearchParams(t);i.set("desktop",oi.desktop),i.set("desktopTitlebar",oi.desktopTitlebar),a!=="unknown"&&i.set("desktopPlatform",a);const o=i.toString();return o?`?${o}`:""}function IR(t,a){if(typeof t=="string"){const i=t.indexOf("#"),o=i>=0?t.slice(0,i):t,c=i>=0?t.slice(i):"",u=o.indexOf("?"),f=u>=0?o.slice(0,u):o,h=u>=0?o.slice(u):"";return`${f}${dv(h,a)}${c}`}return{...t,search:dv(t.search??"",a)}}function HR({children:t}){const a=_r(),i=S.useMemo(()=>qR(a.search),[a.search]),o=S.useMemo(()=>PR(a.search),[a.search]),c=i==="integrated",u=c&&o==="darwin",f=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:o,hasMacTrafficLights:u,preserveDesktopSearch:h=>c?IR(h,o):h}),[o,u,c]);return m.jsx(g0.Provider,{value:f,children:t})}function v0(){return S.useContext(g0)??DR}function QR(){const t=qf(),{preserveDesktopSearch:a}=v0();return S.useMemo(()=>((o,c)=>typeof o=="number"?t(o):t(a(o),c)),[t,a])}function KR(){return Wt({queryKey:ae.agentCli.manifest,queryFn:()=>De.get("/agent-cli/manifest")})}function b0(){return Wt({queryKey:ae.agentCli.status,queryFn:()=>De.get("/agent-cli/status")})}function x0(){const t=nt();return gt({mutationFn:()=>De.post("/agent-cli/status/refresh"),onSuccess:a=>{t.setQueryData(ae.agentCli.status,a)}})}function GR(){const t=nt();return gt({mutationFn:a=>De.post("/agent-cli/install-previews",{toolId:a}),onSuccess:a=>{t.setQueryData(ae.agentCli.preview(a.id),a)}})}function YR(t,a=!0){return Wt({queryKey:t?ae.agentCli.task(t):["agent-cli","task",null],queryFn:()=>De.get(`/agent-cli/install-tasks/${t}`),enabled:!!t&&a,refetchInterval:i=>{const o=i.state.data?.status;return o==="running"||o==="verifying"||o==="cancelling"?1e3:!1}})}function VR(t,a=!0){return Wt({queryKey:t?ae.agentCli.logs(t):["agent-cli","logs",null],queryFn:()=>De.get(`/agent-cli/install-tasks/${t}/logs`),enabled:!!t&&a,refetchInterval:a&&t?1e3:!1})}function FR(){const t=nt();return gt({mutationFn:a=>De.post("/agent-cli/install-tasks",{previewId:a}),onSuccess:({task:a})=>{t.setQueryData(ae.agentCli.task(a.id),a),t.invalidateQueries({queryKey:ae.agentCli.status})}})}function XR(){const t=nt();return gt({mutationFn:a=>De.post(`/agent-cli/install-tasks/${a}/cancel`),onSuccess:a=>{t.setQueryData(ae.agentCli.task(a.id),a)}})}const S0=["codex","claude-code","cursor-agent"];function w0(t){return S0.includes(t)}function $R(t){return S0.some(a=>t?.some(i=>i.toolId===a&&i.installStatus==="installed"))}const ec=new Set(["succeeded","failed","cancelled"]),ZR="AGENT_CLI_INSTALL_LOCAL_ONLY",JR=[];function WR(t){if(!(t instanceof ns))return;const a=t.details.code;return typeof a=="string"?a:void 0}function Yi(t,a){return t instanceof ns&&(t.status===403||WR(t)===ZR)?"需要在本机 Agent Tower 打开后安装。":t instanceof Error?t.message:a}function eN(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(2)} MB`}function tN(t){return t==="darwin"?"macOS":t==="linux"?"Linux":t==="win32"?"Windows":t??"Unknown"}function nN(t){return t.map(a=>a.data.endsWith(`
|
|
14
|
+
`)?a.data:`${a.data}
|
|
15
|
+
`).join("")}function aN(t){switch(t?.installStatus){case"installed":return{label:"已安装",className:"bg-success/10 text-success-ink",icon:Wi};case"legacy_detected":return{label:"Legacy 已检测",className:"bg-warning/10 text-warning-ink",icon:Wi};case"missing":return{label:"未安装",className:"bg-muted text-muted-foreground",icon:kb};case"unsupported":return{label:"当前平台不支持",className:"bg-muted text-muted-foreground",icon:Rr};case"error":return{label:"检测失败",className:"bg-destructive/10 text-destructive-ink",icon:Rr};default:return{label:"未检测",className:"bg-muted text-muted-foreground",icon:Kf}}}function rN(t){switch(t){case"running":return"安装中";case"verifying":return"验证中";case"succeeded":return"已完成";case"failed":return"失败";case"cancelling":return"取消中";case"cancelled":return"已取消";default:return"未开始"}}function iN(t){return t?.installStatus==="installed"}function sN({status:t}){const{t:a}=Qt(),i=aN(t),o=i.icon;return m.jsxs("span",{className:ye("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",i.className),children:[m.jsx(o,{size:11,"aria-hidden":"true"}),a(i.label)]})}function oN({item:t,status:a,selected:i,disabled:o,onSelect:c,onPreview:u,previewing:f,previewDisabled:h}){const{t:p}=Qt(),g=t.install.kind==="downloaded-script"&&w0(t.id),x=iN(a),v=a?.installStatus==="unsupported";return m.jsx("div",{className:ye("rounded-lg border px-4 py-3 transition-colors",i?"border-primary bg-muted/30":"border-border bg-background"),children:m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[m.jsxs("button",{type:"button",onClick:c,className:"min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx("span",{className:"text-sm font-semibold text-foreground",children:t.displayName}),m.jsx(sN,{status:a}),t.legacy&&m.jsx("span",{className:"rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-warning-ink",children:p("迁移中")})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[m.jsx("span",{children:t.description??p("Agent CLI 工具")}),t.install.kind==="detect-only"&&m.jsx("span",{children:t.install.reason}),a?.version&&m.jsxs("span",{className:"font-mono",children:["v",a.version]}),a?.authStatus==="needs_interactive_login"&&m.jsx("span",{children:p("需要登录")})]})]}),m.jsx("div",{className:"flex shrink-0 items-center gap-2",children:g?m.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end",children:[m.jsxs(Sa,{size:"sm",variant:x?"outline":"default",onClick:u,disabled:o||h||f||v,children:[f?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s]",size:14}):m.jsx(Rb,{size:14}),p(x?"重新预览":"预览安装")]}),v&&m.jsx("span",{className:"max-w-40 text-xs text-muted-foreground",children:p("当前平台不可安装。")})]}):m.jsxs(Sa,{size:"sm",variant:"outline",disabled:!0,children:[m.jsx(of,{size:14}),p("只检测")]})})]})})}function lN({preview:t,item:a,confirmed:i,onConfirmedChange:o,onInstall:c,installing:u,disabled:f}){const{t:h}=Qt();return m.jsxs("section",{className:"rounded-lg border border-border bg-muted/20 p-4",children:[m.jsxs("div",{className:"flex items-start gap-2.5",children:[m.jsx(BC,{size:16,className:"mt-0.5 shrink-0 text-success","aria-hidden":"true"}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("h3",{className:"text-sm font-semibold text-foreground",children:h("安装预览")}),m.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:h("安装任务将使用后端 manifest 中的受控计划执行,前端只提交工具选择和预览 ID。")})]})]}),m.jsxs("dl",{className:"mt-4 grid gap-3 text-xs sm:grid-cols-2",children:[m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("平台")}),m.jsx("dd",{className:"mt-1 font-medium text-foreground",children:tN(t.platform)})]}),m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("脚本大小")}),m.jsx("dd",{className:"mt-1 font-medium text-foreground",children:eN(t.sizeBytes)})]}),m.jsxs("div",{className:"sm:col-span-2",children:[m.jsx("dt",{className:"text-muted-foreground",children:h("最终下载地址")}),m.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:t.finalUrl})]}),m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("解释器")}),m.jsxs("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:[t.interpreter.command,t.interpreter.args.length>0?` ${t.interpreter.args.join(" ")}`:""]})]}),m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("固定参数")}),m.jsx("dd",{className:"mt-1 break-all font-mono text-xs text-foreground",children:t.fixedArgs.length>0?t.fixedArgs.join(" "):h("无")})]}),m.jsxs("div",{className:"sm:col-span-2",children:[m.jsx("dt",{className:"text-muted-foreground",children:"SHA-256"}),m.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:t.sha256})]})]}),t.platform==="win32"&&m.jsx(HA,{tone:"info",size:"sm",className:"mt-4",children:h("Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。")}),a?.officialSources.length?m.jsxs("div",{className:"mt-4",children:[m.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:h("官方来源")}),m.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:a.officialSources.map(p=>m.jsxs("a",{href:p.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground hover:bg-muted",children:[p.label,m.jsx(xC,{size:11,"aria-hidden":"true"})]},p.url))})]}):null,t.redirectChain.length>0&&m.jsxs("div",{className:"mt-4",children:[m.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:h("下载链路")}),m.jsx("div",{className:"mt-2 space-y-1 rounded-md bg-background px-3 py-2",children:t.redirectChain.map((p,g)=>m.jsxs("div",{className:"flex items-start justify-between gap-3 text-[11px]",children:[m.jsxs("span",{className:"break-all text-foreground",children:[p.host,p.path]}),m.jsx("span",{className:"shrink-0 font-mono text-muted-foreground",children:p.statusCode})]},`${p.url}-${g}`))})]}),t.riskNotes.length>0&&m.jsxs("div",{className:"mt-4 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2.5",children:[m.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-warning-ink",children:[m.jsx(Rr,{size:13,"aria-hidden":"true"}),h("安装风险")]}),m.jsx("ul",{className:"mt-2 space-y-1 text-xs leading-relaxed text-foreground",children:t.riskNotes.map(p=>m.jsxs("li",{children:["• ",p]},p))})]}),m.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-2 rounded-lg border border-border bg-background px-3 py-2.5 text-xs leading-relaxed text-foreground",children:[m.jsx("input",{type:"checkbox",checked:i,onChange:p=>o(p.target.checked),className:"mt-0.5 h-4 w-4 rounded border-border"}),m.jsx("span",{children:h("我已确认官方来源、下载摘要和风险说明。")})]}),m.jsx("div",{className:"mt-4 flex justify-end",children:m.jsxs(Sa,{onClick:c,disabled:!i||u||f,children:[u?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s]",size:14}):m.jsx(Rb,{size:14}),h("确认安装")]})})]})}function cN({task:t,logs:a,onCancel:i,cancelling:o}){const{t:c}=Qt(),u=t&&!ec.has(t.status),f=t?.status==="failed",h=t?.status==="succeeded";return m.jsxs("section",{className:"rounded-lg border border-border bg-background p-4",children:[m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[u?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s] text-primary",size:16,"aria-hidden":"true"}):h?m.jsx(Wi,{className:"text-success",size:16,"aria-hidden":"true"}):f?m.jsx(kb,{className:"text-destructive",size:16,"aria-hidden":"true"}):m.jsx(HC,{className:"text-muted-foreground",size:16,"aria-hidden":"true"}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c("安装任务")}),m.jsx("p",{className:"text-xs text-muted-foreground",children:c(rN(t?.status))})]})]}),u&&m.jsxs(Sa,{size:"sm",variant:"outline",onClick:i,disabled:o,children:[o?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s]",size:14}):m.jsx(PC,{size:14}),c("取消")]})]}),t?.errorMessage&&m.jsx("div",{className:"mt-3 rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive-ink",children:t.errorMessage}),t?.errorCode==="VERIFY_FAILED"&&m.jsx("div",{className:"mt-3 rounded-md border border-warning/25 bg-warning/10 px-3 py-2 text-xs leading-relaxed text-foreground",children:c("安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。")}),m.jsx("pre",{className:"mt-4 max-h-56 overflow-auto rounded-lg bg-muted/60 p-3 font-mono text-xs leading-relaxed text-foreground scrollbar-app-thin",children:a||c("等待安装日志...")})]})}function uN({variant:t="settings",onSkip:a}){const{t:i}=Qt(),o=KR(),c=b0(),u=x0(),f=GR(),h=FR(),p=XR(),[g,x]=S.useState(null),[v,w]=S.useState(null),[k,z]=S.useState(null),[M,q]=S.useState(!1),[B,K]=S.useState(null),[W,me]=S.useState(null),he=S.useRef(!1),fe=S.useRef(null),R=S.useRef(0),Y=YR(k),ie=k?Y.data??(h.data?.task.id===k?h.data.task:void 0):void 0,Oe=ie?!ec.has(ie.status):!1,Ne=VR(k,!!k&&(Oe||!ie)),Ee=o.data??JR,ze=S.useMemo(()=>new Map((c.data?.tools??[]).map(J=>[J.toolId,J])),[c.data]),Be=S.useMemo(()=>(Ee.find(re=>w0(re.id)&&ze.get(re.id)?.installStatus!=="installed")??Ee[0])?.id??null,[Ee,ze]),Ce=g??Be,_=v?Ee.find(J=>J.id===v.toolId)??null:null,F=!!ie&&!ec.has(ie.status),Q=nN(Ne.data?.entries??[]),pe=()=>{w(null),q(!1)};S.useEffect(()=>{he.current||c.data?.stale&&(he.current=!0,u.mutate(void 0,{onError:J=>{K(Yi(J,i("检测失败")))}}))},[u,c.data?.stale,i]),S.useEffect(()=>{!ie||!ec.has(ie.status)||fe.current!==ie.id&&(fe.current=ie.id,Ne.refetch(),u.mutate(void 0,{onError:J=>{K(Yi(J,i("检测失败")))}}))},[Ne,u,ie,i]);const be=()=>{K(null),u.mutate(void 0,{onError:J=>{const re=Yi(J,i("检测失败"));K(re),ba.error(re)}})},C=J=>{R.current+=1,me(null),x(J),pe(),K(null)},I=J=>{const re=R.current+1;R.current=re,x(J),me(J),pe(),K(null),f.mutate(J,{onSuccess:ke=>{R.current!==re||ke.toolId!==J||(w(ke),q(!1))},onError:ke=>{if(R.current!==re)return;const Pe=Yi(ke,i("创建安装预览失败"));K(Pe),ba.error(Pe)},onSettled:()=>{R.current===re&&me(null)}})},H=()=>{if(!v||!_||v.toolId!==_.id||!M){q(!1),K(i("安装预览已失效,请重新预览当前工具。"));return}K(null),h.mutate(v.id,{onSuccess:J=>{z(J.task.id),w(null),q(!1),ba.success(J.reused?i("已有安装任务正在运行"):i("安装任务已启动"))},onError:J=>{const re=Yi(J,i("启动安装失败"));K(re),ba.error(re)}})},$=()=>{k&&p.mutate(k,{onError:J=>{const re=Yi(J,i("取消安装失败"));K(re),ba.error(re)}})},ee=()=>{ie?.toolId&&(z(null),fe.current=null,I(ie.toolId))};return o.isLoading||c.isLoading?m.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map((J,re)=>m.jsx("div",{className:"h-20 animate-pulse motion-reduce:animate-none rounded-lg bg-muted"},re))}):o.isError||c.isError?m.jsx("div",{role:"alert",className:"rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive-ink",children:i("Agent CLI 环境信息加载失败。")}):m.jsxs("div",{className:ye("space-y-5",t==="onboarding"&&"max-h-[min(72vh,720px)] overflow-y-auto pr-1 scrollbar-app-thin"),children:[m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx("h3",{className:"text-base font-semibold text-foreground",children:i("Agent CLI 环境")}),c.data?.stale&&m.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:i("状态待检测")})]}),m.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i("Codex、Claude Code 和 Cursor 可通过官方安装计划引导安装;Gemini CLI 首版只检测。")})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&m.jsx(Sa,{size:"sm",variant:"ghost",onClick:a,children:i("跳过")}),m.jsxs(Sa,{size:"sm",variant:"outline",onClick:be,disabled:u.isPending,children:[m.jsx(DC,{className:ye(u.isPending&&"animate-spin motion-reduce:[animation-duration:2.4s]"),size:14}),i("重新检测")]})]})]}),B&&m.jsx("div",{role:"alert",className:"rounded-lg border border-warning/25 bg-warning/10 px-4 py-3 text-sm text-foreground",children:m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Rr,{size:15,className:"mt-0.5 shrink-0 text-warning","aria-hidden":"true"}),m.jsx("span",{children:B})]})}),m.jsx("div",{className:"grid gap-3",children:Ee.map(J=>m.jsx(oN,{item:J,status:ze.get(J.id),selected:J.id===Ce,disabled:F,onSelect:()=>C(J.id),onPreview:()=>I(J.id),previewing:f.isPending&&W===J.id,previewDisabled:f.isPending},J.id))}),v&&_&&m.jsx(lN,{preview:v,item:_,confirmed:M,onConfirmedChange:q,onInstall:H,installing:h.isPending,disabled:F}),ie&&m.jsxs("div",{className:"space-y-3",children:[m.jsx(cN,{task:ie,logs:Q,onCancel:$,cancelling:p.isPending}),ie.status==="failed"&&m.jsx("div",{className:"flex justify-end",children:m.jsxs(Sa,{size:"sm",variant:"outline",onClick:ee,disabled:f.isPending,children:[m.jsx(yc,{size:14}),i("重试")]})})]})]})}const E0="agentCliEnvironmentOnboardingSkipped";function dN(){return typeof window>"u"?!0:window.localStorage.getItem(E0)==="true"}function fN(){typeof window>"u"||window.localStorage.setItem(E0,"true")}function hN(){const{t}=Qt(),a=b0(),i=x0(),[o,c]=S.useState(dN),u=S.useRef(!1),f=S.useMemo(()=>{if(o)return!1;const p=a.data;return!p||p.stale?!1:!$R(p.tools)},[o,a.data]);S.useEffect(()=>{o||u.current||!a.data?.stale||(u.current=!0,i.mutate())},[o,i,a.data?.stale]),S.useEffect(()=>{if(f)return Vf(),()=>dc()},[f]);const h=()=>{fN(),c(!0)};return f?m.jsxs("div",{className:"fixed inset-0 z-[55] flex items-center justify-center p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":t("Agent 环境引导"),children:[m.jsx("div",{className:"absolute inset-0 bg-black/20","aria-hidden":"true"}),m.jsxs("div",{className:ye("relative flex max-h-[calc(100vh-1.5rem)] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-border bg-background shadow-popover","sm:max-h-[calc(100vh-3rem)]"),children:[m.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-border/60 bg-muted/30 px-5 py-4",children:[m.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[m.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:m.jsx(Tb,{size:18})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("h2",{className:"text-base font-semibold text-foreground",children:t("配置本机 Agent CLI")}),m.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:t("当前没有检测到可用的 Codex、Claude Code 或 Cursor CLI。可以先完成安装,也可以稍后从设置里打开。")})]})]}),m.jsx("button",{type:"button",onClick:h,"aria-label":t("跳过"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:m.jsx(Gf,{size:16})})]}),m.jsx("div",{className:"min-h-0 flex-1 overflow-hidden p-5",children:m.jsx(uN,{variant:"onboarding",onSkip:h})})]})]}):null}function mN(){return m.jsx(HR,{children:m.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[m.jsx(oT,{}),m.jsx(MR,{}),m.jsx(hN,{})]})})}function pN(t,a,i={}){const o=a instanceof Error?a:new Error(gN(a));return{time:new Date().toISOString(),source:t,name:o.name,message:o.message,...o.stack?{stack:o.stack}:{},...i.componentStack?{componentStack:i.componentStack}:{},...i.metadata?{metadata:i.metadata}:{}}}function T0(t,a,i={}){try{console.error(`[error-log] ${t}`,pN(t,a,i))}catch{}}function gN(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";try{return JSON.stringify(t)??String(t)}catch{return String(t)}}class Jf extends S.Component{state={error:null};static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,i){T0(this.props.source,a,{componentStack:i.componentStack,metadata:this.props.metadata}),this.props.onError?.(a,i)}reset=()=>{this.setState({error:null})};render(){const{error:a}=this.state;return a?this.props.fallback({error:a,reset:this.reset}):this.props.children}}function yN({children:t}){const{t:a}=Qt();return m.jsx(Jf,{source:"app-root",fallback:({error:i})=>m.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:m.jsx(Rr,{size:22})}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("h1",{className:"text-base font-semibold",children:a("Something went wrong")}),m.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:a("The interface hit a rendering error. Reload the page to continue.")})]}),m.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-xs text-muted-foreground",title:i.message||i.name,children:i.message||i.name}),m.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:a("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),m.jsxs(fc,{variant:"primary",size:"sm",onClick:()=>window.location.reload(),children:[m.jsx(yc,{}),a("Reload page")]})]}),children:t})}function vN({children:t}){return m.jsx(Jf,{source:"app-shell",fallback:({error:a})=>m.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:m.jsx(Rr,{size:22})}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("h1",{className:"text-base font-semibold",children:la("Something went wrong")}),m.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:la("The interface could not be displayed. Reload the page to try again.")})]}),m.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-xs text-muted-foreground",title:a.message||a.name,children:a.message||a.name}),m.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:la("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),m.jsxs(fc,{variant:"primary",size:"sm",onClick:()=>window.location.reload(),children:[m.jsx(yc,{}),la("Reload page")]})]}),children:t})}function bN(t){if(t instanceof Error)return t.message||t.name;if(typeof t=="string")return t;if(t&&typeof t=="object"){const{status:a,statusText:i,message:o}=t;if(typeof o=="string"&&o)return o;if(typeof a=="number")return typeof i=="string"&&i?`${a} ${i}`:String(a)}return t==null?"Unknown route error":String(t)}function fv(){const t=gb(),a=qf(),{t:i}=Qt(),o=S.useRef(void 0);S.useEffect(()=>{o.current!==t&&(o.current=t,T0("router.errorElement",t,{metadata:{path:typeof window>"u"?null:window.location.pathname}}))},[t]);const c=bN(t);return m.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:m.jsx(Rr,{size:22})}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("h1",{className:"text-base font-semibold",children:i("Something went wrong")}),m.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:i("This page could not be displayed. Go back to the task board and try again.")})]}),m.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-xs text-muted-foreground",title:c,children:c}),m.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:i("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(fc,{variant:"primary",size:"sm",onClick:()=>a("/"),children:[m.jsx(tC,{}),i("Back to home")]}),m.jsxs(fc,{size:"sm",onClick:()=>window.location.reload(),children:[m.jsx(yc,{}),i("Retry")]})]})]})}const xN="/assets/agent-tower-logo-fKNk9Ce3.png",SN=`
|
|
16
|
+
@media (prefers-reduced-motion: reduce) {
|
|
17
|
+
.loading-anim-area,
|
|
18
|
+
.loading-anim-area * {
|
|
19
|
+
animation-duration: 0.01ms !important;
|
|
20
|
+
animation-iteration-count: 1 !important;
|
|
21
|
+
transition-duration: 0.01ms !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;function wN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"w-10 h-10 text-primary",children:[m.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",fill:"currentColor",className:"animate-pulse motion-reduce:animate-none"}),m.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-40"}),m.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-60"})]}),m.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:m.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-ping motion-reduce:animate-none opacity-40"})})]}),m.jsx("span",{className:"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",children:"Loading"})]})}function EN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"flex items-end gap-1 h-8 loading-anim-area",children:[0,1,2,3,4].map(t=>m.jsx("div",{className:"w-1.5 bg-primary/80 rounded-full",style:{animation:`stackRise 1.2s ease-in-out ${t*.15}s infinite`,height:"8px"}},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
25
|
+
@keyframes stackRise {
|
|
26
|
+
0%, 100% { height: 8px; opacity: 0.4; }
|
|
27
|
+
50% { height: 28px; opacity: 1; }
|
|
28
|
+
}
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
@keyframes stackRise {
|
|
31
|
+
0%, 100% { height: 16px; opacity: 0.7; }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`})]})}function TN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[m.jsx("div",{className:"absolute inset-0 border-2 border-border rounded-full"}),m.jsx("div",{className:"absolute inset-0 border-2 border-transparent border-t-primary rounded-full",style:{animation:"orbitSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite"}}),m.jsx("div",{className:"absolute inset-[6px] border border-border/60 rounded-full"}),m.jsx("div",{className:"absolute inset-[6px] border border-transparent border-b-primary/60 rounded-full",style:{animation:"orbitSpin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse"}})]}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
35
|
+
@keyframes orbitSpin {
|
|
36
|
+
to { transform: rotate(360deg); }
|
|
37
|
+
}
|
|
38
|
+
@media (prefers-reduced-motion: reduce) {
|
|
39
|
+
@keyframes orbitSpin {
|
|
40
|
+
to { transform: rotate(0deg); }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`})]})}function CN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsxs("div",{className:"flex items-center gap-0.5 px-4 py-2 bg-primary rounded-lg loading-anim-area",children:[m.jsx("span",{className:"text-primary-foreground text-xs font-mono tracking-wider",children:"loading"}),m.jsx("span",{className:"inline-block w-[7px] h-4 bg-primary-foreground/80 ml-0.5",style:{animation:"termBlink 1s steps(1) infinite"}})]}),m.jsx("style",{children:`
|
|
44
|
+
@keyframes termBlink {
|
|
45
|
+
0%, 50% { opacity: 1; }
|
|
46
|
+
51%, 100% { opacity: 0; }
|
|
47
|
+
}
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
@keyframes termBlink {
|
|
50
|
+
0%, 100% { opacity: 0.8; }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`})]})}function kN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"flex items-center gap-2 loading-anim-area",children:[0,1,2].map(t=>m.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-primary",style:{animation:`dotWave 1.4s ease-in-out ${t*.2}s infinite`}},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
54
|
+
@keyframes dotWave {
|
|
55
|
+
0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
|
|
56
|
+
40% { transform: scale(1); opacity: 1; }
|
|
57
|
+
}
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
@keyframes dotWave {
|
|
60
|
+
0%, 100% { transform: scale(1); opacity: 0.7; }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`})]})}function AN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:[0,1,2].map(t=>m.jsx("div",{className:"absolute rounded-md border border-border bg-background",style:{width:`${28-t*4}px`,height:`${28-t*4}px`,left:`${6+t*2}px`,top:`${6+t*2}px`,animation:`layerShift 2s ease-in-out ${t*.3}s infinite`,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
64
|
+
@keyframes layerShift {
|
|
65
|
+
0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
|
|
66
|
+
25% { transform: translate(-3px, -3px) rotate(-2deg); opacity: 0.8; }
|
|
67
|
+
50% { transform: translate(0, -4px) rotate(0deg); opacity: 1; }
|
|
68
|
+
75% { transform: translate(3px, -3px) rotate(2deg); opacity: 0.8; }
|
|
69
|
+
}
|
|
70
|
+
@media (prefers-reduced-motion: reduce) {
|
|
71
|
+
@keyframes layerShift {
|
|
72
|
+
0%, 100% { transform: none; opacity: 0.8; }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`})]})}function RN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"w-32 h-1 bg-border rounded-full overflow-hidden loading-anim-area",children:m.jsx("div",{className:"h-full bg-primary rounded-full",style:{animation:"progressBeam 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite"}})}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
76
|
+
@keyframes progressBeam {
|
|
77
|
+
0% { width: 0%; margin-left: 0%; }
|
|
78
|
+
50% { width: 60%; margin-left: 20%; }
|
|
79
|
+
100% { width: 0%; margin-left: 100%; }
|
|
80
|
+
}
|
|
81
|
+
@media (prefers-reduced-motion: reduce) {
|
|
82
|
+
@keyframes progressBeam {
|
|
83
|
+
0%, 100% { width: 40%; margin-left: 30%; }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`})]})}function NN(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"flex gap-2 loading-anim-area",children:[0,1,2].map(t=>m.jsxs("div",{className:"flex flex-col gap-1.5 w-16",children:[m.jsx("div",{className:"h-2 rounded-full bg-border",style:{animation:`shimmer 1.8s ease-in-out ${t*.2}s infinite`}}),[0,1].map(a=>m.jsx("div",{className:"h-6 rounded bg-muted",style:{animation:`shimmer 1.8s ease-in-out ${(t*2+a)*.15}s infinite`}},a))]},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
87
|
+
@keyframes shimmer {
|
|
88
|
+
0%, 100% { opacity: 0.4; }
|
|
89
|
+
50% { opacity: 1; }
|
|
90
|
+
}
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
@keyframes shimmer {
|
|
93
|
+
0%, 100% { opacity: 0.7; }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`})]})}function _N(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:m.jsxs("svg",{viewBox:"0 0 40 40",className:"w-10 h-10",children:[m.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--border)",strokeWidth:"2"}),m.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--primary)",strokeWidth:"2",strokeDasharray:"25 75",strokeLinecap:"round",style:{animation:"glyphRotate 1.2s linear infinite"},transform:"rotate(-90 20 20)"}),m.jsx("path",{d:"M20 10L14 16L20 22L26 16Z",fill:"var(--primary)",opacity:"0.8",style:{animation:"glyphFade 1.2s ease-in-out infinite"}})]})}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
|
|
97
|
+
@keyframes glyphRotate {
|
|
98
|
+
to { stroke-dashoffset: -100; }
|
|
99
|
+
}
|
|
100
|
+
@keyframes glyphFade {
|
|
101
|
+
0%, 100% { opacity: 0.4; transform: scale(0.9); }
|
|
102
|
+
50% { opacity: 0.9; transform: scale(1); }
|
|
103
|
+
}
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
@keyframes glyphRotate {
|
|
106
|
+
to { stroke-dashoffset: 0; }
|
|
107
|
+
}
|
|
108
|
+
@keyframes glyphFade {
|
|
109
|
+
0%, 100% { opacity: 0.8; transform: scale(1); }
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`})]})}function C0({size:t="md"}){const a=t==="lg"?{container:"w-20 h-20",img:"w-16 h-16"}:{container:"w-12 h-12",img:"w-10 h-10"};return m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsx("div",{className:`flex items-center justify-center ${a.container} loading-anim-area`,children:m.jsx("img",{src:xN,alt:"Agent Tower",className:`${a.img} object-contain rounded-xl`,style:{animation:"charcoalBreathe 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}})}),m.jsx("style",{children:`
|
|
113
|
+
@keyframes charcoalBreathe {
|
|
114
|
+
0%, 100% { transform: scale(1); opacity: 0.85; }
|
|
115
|
+
50% { transform: scale(1.08); opacity: 1; }
|
|
116
|
+
}
|
|
117
|
+
@media (prefers-reduced-motion: reduce) {
|
|
118
|
+
@keyframes charcoalBreathe {
|
|
119
|
+
0%, 100% { transform: scale(1); opacity: 1; }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`})]})}const uO=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:wN},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:EN},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:TN},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:CN},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:kN},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:AN},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:RN},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:NN},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:_N},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:C0}];function ni(){const{usesIntegratedTitlebar:t}=v0();return m.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${t?"app-region-drag":""}`,children:[m.jsx("style",{children:SN}),m.jsx(C0,{size:"lg"})]})}const ON=new Set(["general","translation","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function hv(){const t=QR(),{tab:a}=PE();return S.useEffect(()=>{const i=a&&ON.has(a)?a:"general";io.getState().openSettings(i),t("/",{replace:!0})},[t,a]),null}const MN=S.lazy(()=>cn(()=>import("./ProjectKanbanPage-DtZW0bOh.js").then(t=>t.P),__vite__mapDeps([54,22,23,7,41,42,28,18,19,8,3,4,5,55,26,27,10,37,38,56,13,6,14,33,21,57,44,47,53,29,15,45,24])).then(t=>({default:t.ProjectKanbanPage}))),mv=S.lazy(()=>cn(()=>import("./ConversationPage-C46RuN9U.js"),__vite__mapDeps([58,26,27,28,7,8,10,25,17,29,19,4,30,21,5,59,56,42,18,13,6,60,61,62,55,41,3,37,38,14,33,57,63,15,47])).then(t=>({default:t.ConversationPage}))),DN=S.lazy(()=>cn(()=>import("./DemoPage-CAZqNag-.js"),[]).then(t=>({default:t.DemoPage}))),jN=S.lazy(()=>cn(()=>import("./AgentDemoPage-CrkoVCOZ.js"),__vite__mapDeps([64,60,61,4,25,26,27,28,7,8,10,17,29,19,30,52,39,57,65,66])).then(t=>({default:t.AgentDemoPage}))),zN=S.lazy(()=>cn(()=>import("./LoadingPreviewPage-CB4VDPAZ.js"),[]).then(t=>({default:t.LoadingPreviewPage}))),LN=S.lazy(()=>cn(()=>import("./DesignSystemPage-CjCYC24B.js"),__vite__mapDeps([67,56,42,28,18,19,7,8,13,6,61,68,5,29,27,10,43,32,63,3,66,50,48,57,34,33,35,4,47,53,44,59,2,9,12,23,38])).then(t=>({default:t.DesignSystemPage}))),UN=[{path:"/",element:m.jsx(mN,{}),errorElement:m.jsx(fv,{}),children:[{errorElement:m.jsx(fv,{}),children:[{index:!0,element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(MN,{})})},{path:"conversations",element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(mv,{})})},{path:"conversations/:conversationId",element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(mv,{})})},{path:"demo",element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(DN,{})})},{path:"agent-demo",element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(jN,{})})},{path:"loading-preview",element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(zN,{})})},{path:"design-system",element:m.jsx(S.Suspense,{fallback:m.jsx(ni,{}),children:m.jsx(LN,{})})},{path:"settings",element:m.jsx(hv,{})},{path:"settings/:tab",element:m.jsx(hv,{})}]}]}],BN=MT(UN);function qN(){return m.jsx(KT,{router:BN})}const Ea=Object.create(null);Ea.open="0";Ea.close="1";Ea.ping="2";Ea.pong="3";Ea.message="4";Ea.upgrade="5";Ea.noop="6";const tc=Object.create(null);Object.keys(Ea).forEach(t=>{tc[Ea[t]]=t});const gf={type:"error",data:"parser error"},k0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",A0=typeof ArrayBuffer=="function",R0=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Wf=({type:t,data:a},i,o)=>k0&&a instanceof Blob?i?o(a):pv(a,o):A0&&(a instanceof ArrayBuffer||R0(a))?i?o(a):pv(new Blob([a]),o):o(Ea[t]+(a||"")),pv=(t,a)=>{const i=new FileReader;return i.onload=function(){const o=i.result.split(",")[1];a("b"+(o||""))},i.readAsDataURL(t)};function gv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Kd;function PN(t,a){if(k0&&t.data instanceof Blob)return t.data.arrayBuffer().then(gv).then(a);if(A0&&(t.data instanceof ArrayBuffer||R0(t.data)))return a(gv(t.data));Wf(t,!1,i=>{Kd||(Kd=new TextEncoder),a(Kd.encode(i))})}const yv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",so=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<yv.length;t++)so[yv.charCodeAt(t)]=t;const IN=t=>{let a=t.length*.75,i=t.length,o,c=0,u,f,h,p;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);const g=new ArrayBuffer(a),x=new Uint8Array(g);for(o=0;o<i;o+=4)u=so[t.charCodeAt(o)],f=so[t.charCodeAt(o+1)],h=so[t.charCodeAt(o+2)],p=so[t.charCodeAt(o+3)],x[c++]=u<<2|f>>4,x[c++]=(f&15)<<4|h>>2,x[c++]=(h&3)<<6|p&63;return g},HN=typeof ArrayBuffer=="function",eh=(t,a)=>{if(typeof t!="string")return{type:"message",data:N0(t,a)};const i=t.charAt(0);return i==="b"?{type:"message",data:QN(t.substring(1),a)}:tc[i]?t.length>1?{type:tc[i],data:t.substring(1)}:{type:tc[i]}:gf},QN=(t,a)=>{if(HN){const i=IN(t);return N0(i,a)}else return{base64:!0,data:t}},N0=(t,a)=>a==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,_0="",KN=(t,a)=>{const i=t.length,o=new Array(i);let c=0;t.forEach((u,f)=>{Wf(u,!1,h=>{o[f]=h,++c===i&&a(o.join(_0))})})},GN=(t,a)=>{const i=t.split(_0),o=[];for(let c=0;c<i.length;c++){const u=eh(i[c],a);if(o.push(u),u.type==="error")break}return o};function YN(){return new TransformStream({transform(t,a){PN(t,i=>{const o=i.length;let c;if(o<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,o);else if(o<65536){c=new Uint8Array(3);const u=new DataView(c.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{c=new Uint8Array(9);const u=new DataView(c.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(c[0]|=128),a.enqueue(c),a.enqueue(i)})}})}let Gd;function Vl(t){return t.reduce((a,i)=>a+i.length,0)}function Fl(t,a){if(t[0].length===a)return t.shift();const i=new Uint8Array(a);let o=0;for(let c=0;c<a;c++)i[c]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),i}function VN(t,a){Gd||(Gd=new TextDecoder);const i=[];let o=0,c=-1,u=!1;return new TransformStream({transform(f,h){for(i.push(f);;){if(o===0){if(Vl(i)<1)break;const p=Fl(i,1);u=(p[0]&128)===128,c=p[0]&127,c<126?o=3:c===126?o=1:o=2}else if(o===1){if(Vl(i)<2)break;const p=Fl(i,2);c=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),o=3}else if(o===2){if(Vl(i)<8)break;const p=Fl(i,8),g=new DataView(p.buffer,p.byteOffset,p.length),x=g.getUint32(0);if(x>Math.pow(2,21)-1){h.enqueue(gf);break}c=x*Math.pow(2,32)+g.getUint32(4),o=3}else{if(Vl(i)<c)break;const p=Fl(i,c);h.enqueue(eh(u?p:Gd.decode(p),a)),o=0}if(c===0||c>t){h.enqueue(gf);break}}}})}const O0=4;function Lt(t){if(t)return FN(t)}function FN(t){for(var a in Lt.prototype)t[a]=Lt.prototype[a];return t}Lt.prototype.on=Lt.prototype.addEventListener=function(t,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(a),this};Lt.prototype.once=function(t,a){function i(){this.off(t,i),a.apply(this,arguments)}return i.fn=a,this.on(t,i),this};Lt.prototype.off=Lt.prototype.removeListener=Lt.prototype.removeAllListeners=Lt.prototype.removeEventListener=function(t,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,c=0;c<i.length;c++)if(o=i[c],o===a||o.fn===a){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+t],this};Lt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),i=this._callbacks["$"+t],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(i){i=i.slice(0);for(var o=0,c=i.length;o<c;++o)i[o].apply(this,a)}return this};Lt.prototype.emitReserved=Lt.prototype.emit;Lt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Lt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const xc=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),Fn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),XN="arraybuffer";function M0(t,...a){return a.reduce((i,o)=>(t.hasOwnProperty(o)&&(i[o]=t[o]),i),{})}const $N=Fn.setTimeout,ZN=Fn.clearTimeout;function Sc(t,a){a.useNativeTimers?(t.setTimeoutFn=$N.bind(Fn),t.clearTimeoutFn=ZN.bind(Fn)):(t.setTimeoutFn=Fn.setTimeout.bind(Fn),t.clearTimeoutFn=Fn.clearTimeout.bind(Fn))}const JN=1.33;function WN(t){return typeof t=="string"?e2(t):Math.ceil((t.byteLength||t.size)*JN)}function e2(t){let a=0,i=0;for(let o=0,c=t.length;o<c;o++)a=t.charCodeAt(o),a<128?i+=1:a<2048?i+=2:a<55296||a>=57344?i+=3:(o++,i+=4);return i}function D0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function t2(t){let a="";for(let i in t)t.hasOwnProperty(i)&&(a.length&&(a+="&"),a+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return a}function n2(t){let a={},i=t.split("&");for(let o=0,c=i.length;o<c;o++){let u=i[o].split("=");a[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return a}class a2 extends Error{constructor(a,i,o){super(a),this.description=i,this.context=o,this.type="TransportError"}}class th extends Lt{constructor(a){super(),this.writable=!1,Sc(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,i,o){return super.emitReserved("error",new a2(a,i,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const i=eh(a,this.socket.binaryType);this.onPacket(i)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,i={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const i=t2(a);return i.length?"?"+i:""}}class r2 extends th{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const i=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||i()})),this.writable||(o++,this.once("drain",function(){--o||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const i=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};GN(a,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,KN(a,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=D0()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(a,i)}}let j0=!1;try{j0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const i2=j0;function s2(){}class o2 extends r2{constructor(a){if(super(a),typeof location<"u"){const i=location.protocol==="https:";let o=location.port;o||(o=i?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||o!==a.port}}doWrite(a,i){const o=this.request({method:"POST",data:a});o.on("success",i),o.on("error",(c,u)=>{this.onError("xhr post error",c,u)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(i,o)=>{this.onError("xhr poll error",i,o)}),this.pollXhr=a}}let Ji=class nc extends Lt{constructor(a,i,o){super(),this.createRequest=a,Sc(this,o),this._opts=o,this._method=o.method||"GET",this._uri=i,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var a;const i=M0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(i);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&o.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var c;o.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=nc.requestsCount++,nc.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=s2,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete nc.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Ji.requestsCount=0;Ji.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vv);else if(typeof addEventListener=="function"){const t="onpagehide"in Fn?"pagehide":"unload";addEventListener(t,vv,!1)}}function vv(){for(let t in Ji.requests)Ji.requests.hasOwnProperty(t)&&Ji.requests[t].abort()}const l2=(function(){const t=z0({xdomain:!1});return t&&t.responseType!==null})();class c2 extends o2{constructor(a){super(a);const i=a&&a.forceBase64;this.supportsBinary=l2&&!i}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Ji(z0,this.uri(),a)}}function z0(t){const a=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||i2))return new XMLHttpRequest}catch{}if(!a)try{return new Fn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const L0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class u2 extends th{get name(){return"websocket"}doOpen(){const a=this.uri(),i=this.opts.protocols,o=L0?{}:M0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,i,o)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const o=a[i],c=i===a.length-1;Wf(o,this.supportsBinary,u=>{try{this.doWrite(o,u)}catch{}c&&xc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=D0()),this.supportsBinary||(i.b64=1),this.createUri(a,i)}}const Yd=Fn.WebSocket||Fn.MozWebSocket;class d2 extends u2{createSocket(a,i,o){return L0?new Yd(a,i,o):i?new Yd(a,i):new Yd(a)}doWrite(a,i){this.ws.send(i)}}class f2 extends th{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const i=VN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=a.readable.pipeThrough(i).getReader(),c=YN();c.readable.pipeTo(a.writable),this._writer=c.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const f={type:"open"};this.query.sid&&(f.data=`{"sid":"${this.query.sid}"}`),this._writer.write(f).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const o=a[i],c=i===a.length-1;this._writer.write(o).then(()=>{c&&xc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const h2={websocket:d2,webtransport:f2,polling:c2},m2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,p2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yf(t){if(t.length>8e3)throw"URI too long";const a=t,i=t.indexOf("["),o=t.indexOf("]");i!=-1&&o!=-1&&(t=t.substring(0,i)+t.substring(i,o).replace(/:/g,";")+t.substring(o,t.length));let c=m2.exec(t||""),u={},f=14;for(;f--;)u[p2[f]]=c[f]||"";return i!=-1&&o!=-1&&(u.source=a,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=g2(u,u.path),u.queryKey=y2(u,u.query),u}function g2(t,a){const i=/\/{2,9}/g,o=a.replace(i,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&o.splice(0,1),a.slice(-1)=="/"&&o.splice(o.length-1,1),o}function y2(t,a){const i={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,c,u){c&&(i[c]=u)}),i}const vf=typeof addEventListener=="function"&&typeof removeEventListener=="function",ac=[];vf&&addEventListener("offline",()=>{ac.forEach(t=>t())},!1);class kr extends Lt{constructor(a,i){if(super(),this.binaryType=XN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(i=a,a=null),a){const o=yf(a);i.hostname=o.host,i.secure=o.protocol==="https"||o.protocol==="wss",i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=yf(i.host).host);Sc(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(o=>{const c=o.prototype.name;this.transports.push(c),this._transportsByName[c]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=n2(this.opts.query)),vf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ac.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const i=Object.assign({},this.opts.query);i.EIO=O0,i.transport=a,this.id&&(i.sid=this.id);const o=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&kr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(a);i.open(),this.setTransport(i)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",kr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=a.data,this._onError(i);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let o=0;o<this.writeBuffer.length;o++){const c=this.writeBuffer[o].data;if(c&&(i+=WN(c)),o>0&&i>this._maxPayload)return this.writeBuffer.slice(0,o);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,xc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,i,o){return this._sendPacket("message",a,i,o),this}send(a,i,o){return this._sendPacket("message",a,i,o),this}_sendPacket(a,i,o,c){if(typeof i=="function"&&(c=i,i=void 0),typeof o=="function"&&(c=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:a,data:i,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),c&&this.once("flush",c),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),a()},o=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():a()}):this.upgrading?o():a()),this}_onError(a){if(kr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),vf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=ac.indexOf(this._offlineEventListener);o!==-1&&ac.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,i),this.writeBuffer=[],this._prevBufferLen=0}}}kr.protocol=O0;class v2 extends kr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let i=this.createTransport(a),o=!1;kr.priorWebsocketSuccess=!1;const c=()=>{o||(i.send([{type:"ping",data:"probe"}]),i.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;kr.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(x(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=i.name,this.emitReserved("upgradeError",w)}}))};function u(){o||(o=!0,x(),i.close(),i=null)}const f=v=>{const w=new Error("probe error: "+v);w.transport=i.name,u(),this.emitReserved("upgradeError",w)};function h(){f("transport closed")}function p(){f("socket closed")}function g(v){i&&v.name!==i.name&&u()}const x=()=>{i.removeListener("open",c),i.removeListener("error",f),i.removeListener("close",h),this.off("close",p),this.off("upgrading",g)};i.once("open",c),i.once("error",f),i.once("close",h),this.once("close",p),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{o||i.open()},200):i.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const i=[];for(let o=0;o<a.length;o++)~this.transports.indexOf(a[o])&&i.push(a[o]);return i}}let b2=class extends v2{constructor(a,i={}){const o=typeof a=="object"?a:i;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(c=>h2[c]).filter(c=>!!c)),super(a,o)}};function x2(t,a="",i){let o=t;i=i||typeof location<"u"&&location,t==null&&(t=i.protocol+"//"+i.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=i.protocol+t:t=i.host+t),/^(https?|wss?):\/\//.test(t)||(typeof i<"u"?t=i.protocol+"//"+t:t="https://"+t),o=yf(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+a,o.href=o.protocol+"://"+u+(i&&i.port===o.port?"":":"+o.port),o}const S2=typeof ArrayBuffer=="function",w2=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,U0=Object.prototype.toString,E2=typeof Blob=="function"||typeof Blob<"u"&&U0.call(Blob)==="[object BlobConstructor]",T2=typeof File=="function"||typeof File<"u"&&U0.call(File)==="[object FileConstructor]";function nh(t){return S2&&(t instanceof ArrayBuffer||w2(t))||E2&&t instanceof Blob||T2&&t instanceof File}function rc(t,a){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let i=0,o=t.length;i<o;i++)if(rc(t[i]))return!0;return!1}if(nh(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return rc(t.toJSON(),!0);for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&rc(t[i]))return!0;return!1}function C2(t){const a=[],i=t.data,o=t;return o.data=bf(i,a),o.attachments=a.length,{packet:o,buffers:a}}function bf(t,a){if(!t)return t;if(nh(t)){const i={_placeholder:!0,num:a.length};return a.push(t),i}else if(Array.isArray(t)){const i=new Array(t.length);for(let o=0;o<t.length;o++)i[o]=bf(t[o],a);return i}else if(typeof t=="object"&&!(t instanceof Date)){const i={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=bf(t[o],a));return i}return t}function k2(t,a){return t.data=xf(t.data,a),delete t.attachments,t}function xf(t,a){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<a.length)return a[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=xf(t[i],a);else if(typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=xf(t[i],a));return t}const A2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ze;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ze||(Ze={}));class R2{constructor(a){this.replacer=a}encode(a){return(a.type===Ze.EVENT||a.type===Ze.ACK)&&rc(a)?this.encodeAsBinary({type:a.type===Ze.EVENT?Ze.BINARY_EVENT:Ze.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let i=""+a.type;return(a.type===Ze.BINARY_EVENT||a.type===Ze.BINARY_ACK)&&(i+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(i+=a.nsp+","),a.id!=null&&(i+=a.id),a.data!=null&&(i+=JSON.stringify(a.data,this.replacer)),i}encodeAsBinary(a){const i=C2(a),o=this.encodeAsString(i.packet),c=i.buffers;return c.unshift(o),c}}class ah extends Lt{constructor(a){super(),this.reviver=a}add(a){let i;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(a);const o=i.type===Ze.BINARY_EVENT;o||i.type===Ze.BINARY_ACK?(i.type=o?Ze.EVENT:Ze.ACK,this.reconstructor=new N2(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(nh(a)||a.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(a),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let i=0;const o={type:Number(a.charAt(0))};if(Ze[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Ze.BINARY_EVENT||o.type===Ze.BINARY_ACK){const u=i+1;for(;a.charAt(++i)!=="-"&&i!=a.length;);const f=a.substring(u,i);if(f!=Number(f)||a.charAt(i)!=="-")throw new Error("Illegal attachments");o.attachments=Number(f)}if(a.charAt(i+1)==="/"){const u=i+1;for(;++i&&!(a.charAt(i)===","||i===a.length););o.nsp=a.substring(u,i)}else o.nsp="/";const c=a.charAt(i+1);if(c!==""&&Number(c)==c){const u=i+1;for(;++i;){const f=a.charAt(i);if(f==null||Number(f)!=f){--i;break}if(i===a.length)break}o.id=Number(a.substring(u,i+1))}if(a.charAt(++i)){const u=this.tryParse(a.substr(i));if(ah.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,i){switch(a){case Ze.CONNECT:return bv(i);case Ze.DISCONNECT:return i===void 0;case Ze.CONNECT_ERROR:return typeof i=="string"||bv(i);case Ze.EVENT:case Ze.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&A2.indexOf(i[0])===-1);case Ze.ACK:case Ze.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class N2{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const i=k2(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function bv(t){return Object.prototype.toString.call(t)==="[object Object]"}const _2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ah,Encoder:R2,get PacketType(){return Ze}},Symbol.toStringTag,{value:"Module"}));function oa(t,a,i){return t.on(a,i),function(){t.off(a,i)}}const O2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class B0 extends Lt{constructor(a,i,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=i,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[oa(a,"open",this.onopen.bind(this)),oa(a,"packet",this.onpacket.bind(this)),oa(a,"error",this.onerror.bind(this)),oa(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...i){var o,c,u;if(O2.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(i.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const f={type:Ze.EVENT,data:i};if(f.options={},f.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const x=this.ids++,v=i.pop();this._registerAckCallback(x,v),f.id=x}const h=(c=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||c===void 0?void 0:c.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(f),this.packet(f)):this.sendBuffer.push(f)),this.flags={},this}_registerAckCallback(a,i){var o;const c=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(c===void 0){this.acks[a]=i;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===a&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},c),f=(...h)=>{this.io.clearTimeoutFn(u),i.apply(this,h)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...i){return new Promise((o,c)=>{const u=(f,h)=>f?c(f):o(h);u.withError=!0,i.push(u),this.emit(a,...i)})}_addToQueue(a){let i;typeof a[a.length-1]=="function"&&(i=a.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((c,...u)=>(this._queue[0],c!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(c)):(this._queue.shift(),i&&i(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!a||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(o=>String(o.id)===a)){const o=this.acks[a];delete this.acks[a],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case Ze.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(a);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(a);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const o=new Error(a.data.message);o.data=a.data.data,this.emitReserved("connect_error",o);break}}onevent(a){const i=a.data||[];a.id!=null&&i.push(this.ack(a.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const o of i)o.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const i=this;let o=!1;return function(...c){o||(o=!0,i.packet({type:Ze.ACK,id:a,data:c}))}}onack(a){const i=this.acks[a.id];typeof i=="function"&&(delete this.acks[a.id],i.withError&&a.data.unshift(null),i.apply(this,a.data))}onconnect(a,i){this.id=a,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const i=this._anyListeners;for(let o=0;o<i.length;o++)if(a===i[o])return i.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const i=this._anyOutgoingListeners;for(let o=0;o<i.length;o++)if(a===i[o])return i.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const o of i)o.apply(this,a.data)}}}function is(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}is.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),i=Math.floor(a*this.jitter*t);t=(Math.floor(a*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};is.prototype.reset=function(){this.attempts=0};is.prototype.setMin=function(t){this.ms=t};is.prototype.setMax=function(t){this.max=t};is.prototype.setJitter=function(t){this.jitter=t};class Sf extends Lt{constructor(a,i){var o;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(i=a,a=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Sc(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((o=i.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new is({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=a;const c=i.parser||_2;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var i;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(i=this.backoff)===null||i===void 0||i.setMin(a),this)}randomizationFactor(a){var i;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(i=this.backoff)===null||i===void 0||i.setJitter(a),this)}reconnectionDelayMax(a){var i;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(i=this.backoff)===null||i===void 0||i.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new b2(this.uri,this.opts);const i=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const c=oa(i,"open",function(){o.onopen(),a&&a()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),a?a(h):this.maybeReconnectOnOpen()},f=oa(i,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{c(),u(new Error("timeout")),i.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(c),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(oa(a,"ping",this.onping.bind(this)),oa(a,"data",this.ondata.bind(this)),oa(a,"error",this.onerror.bind(this)),oa(a,"close",this.onclose.bind(this)),oa(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(i){this.onclose("parse error",i)}}ondecoded(a){xc(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,i){let o=this.nsps[a];return o?this._autoConnect&&!o.active&&o.connect():(o=new B0(this,a,i),this.nsps[a]=o),o}_destroy(a){const i=Object.keys(this.nsps);for(const o of i)if(this.nsps[o].active)return;this._close()}_packet(a){const i=this.encoder.encode(a);for(let o=0;o<i.length;o++)this.engine.write(i[o],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,i){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(c=>{c?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",c)):a.onreconnect()}))},i);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const no={};function ic(t,a){typeof t=="object"&&(a=t,t=void 0),a=a||{};const i=x2(t,a.path||"/socket.io"),o=i.source,c=i.id,u=i.path,f=no[c]&&u in no[c].nsps,h=a.forceNew||a["force new connection"]||a.multiplex===!1||f;let p;return h?p=new Sf(o,a):(no[c]||(no[c]=new Sf(o,a)),p=no[c]),i.query&&!a.query&&(a.query=i.queryKey),p.socket(i.path,a)}Object.assign(ic,{Manager:Sf,Socket:B0,io:ic,connect:ic});class M2{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=ZC()}getSocket(){return this.socket||(this.socket=ic(`${this.baseUrl}${Yl}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${Yl} t=${Date.now()}`)}),this.socket.on("disconnect",a=>{console.log(`[Socket] Disconnected from ${Yl}: t=${Date.now()}`,a)}),this.socket.on("connect_error",a=>{console.error(`[Socket] Connection error on ${Yl}: t=${Date.now()}`,a.message)})),this.socket}connect(){const a=this.getSocket();return a.connected||a.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),a}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const bo=new M2,xv="task-cleanup-pending";function D2(){const{t}=Qt(),a=nt(),[i,o]=S.useState(()=>{try{const u=JSON.parse(sessionStorage.getItem(xv)??"[]");return Array.isArray(u)?u.filter(f=>typeof f=="string"):[]}catch{return[]}});S.useEffect(()=>{try{sessionStorage.setItem(xv,JSON.stringify(i))}catch{}},[i]);const c=HS({queries:i.map(u=>({queryKey:ae.tasks.cleanup(u),queryFn:()=>De.get(`/tasks/${u}/cleanup`),refetchInterval:f=>f.state.data?.status==="COMPLETED"?!1:3e3}))});return S.useEffect(()=>{const u=[];c.forEach((f,h)=>{const p=i[h],g=f.data;if(!g)return;const x=`task-cleanup:${p}`;g.status==="COMPLETED"?(ba.dismiss(x),u.push(p)):g.status==="FAILED"?ba.error(t("Task resource cleanup failed"),{id:x,description:g.lastError??void 0,duration:1/0,action:{label:t("Retry"),onClick:()=>{De.post(`/tasks/${p}/cleanup/retry`,{}).then(v=>{a.setQueryData(ae.tasks.cleanup(p),v)}).catch(v=>ba.error(v instanceof Error?v.message:t("Task resource cleanup failed")))}}}):ba.dismiss(x)}),u.length&&o(f=>f.filter(h=>!u.includes(h)))},[c,i,a,t]),S.useCallback(u=>o(f=>f.includes(u)?f:[...f,u]),[])}function q0(t,a,i){const o=u=>oo(u.queryKey,i),c=t.getQueriesData({predicate:o});return t.setQueriesData({predicate:o},u=>{if(!u||!Array.isArray(u.data))return u;const f=u.data.filter(h=>!hc(h,a));return f.length===u.data.length?u:{...u,data:f,total:Math.max(0,u.total-(u.data.length-f.length))}}),t.removeQueries({queryKey:ae.tasks.detail(a),exact:!0}),t.removeQueries({queryKey:ae.tasks.body(a),exact:!0}),c}function oo(t,a){return!Array.isArray(t)||t[0]!=="tasks"||t[1]!=="list"?!1:a?t[2]===a:!0}function Xl(t,a){if(t.queryKey[0]!=="tasks"||t.queryKey[1]!=="detail")return!1;const i=t.state.data;return!i||i.projectId===a}function lo(t,a){if(!Array.isArray(t)||t[0]!=="tasks"||t[1]!=="board")return!1;if(!a)return!0;const i=t[2];if(!i||typeof i!="object")return!0;const o=i.projectId;return o==null||o===a}function P0(t,a,i){const o=u=>lo(u.queryKey,i),c=t.getQueriesData({predicate:o});return t.setQueriesData({predicate:o},u=>{if(!u||!Array.isArray(u.data))return u;const f=u.data.filter(p=>!hc(p,a)),h=u.parents?.filter(p=>!hc(p,a));return f.length===u.data.length&&h?.length===u.parents?.length?u:{...u,data:f,...h?{parents:h}:{},total:Math.max(0,u.total-(u.data.length-f.length))}}),c}function j2(t,a){for(const[i,o]of a)t.setQueryData(i,o)}function z2(t,a){for(const[i,o]of a)t.setQueryData(i,o)}function fO(t){const a={};return t?.projectId&&(a.projectId=t.projectId),t?.status!=null&&(a.status=t.status),t?.page!=null&&(a.page=String(t.page)),t?.limit!=null&&(a.limit=String(t.limit)),Wt({queryKey:ae.tasks.board(t),queryFn:()=>De.get("/task-board",{params:a})})}function hO(t,a){return Wt({queryKey:ae.tasks.deletionScope(t),queryFn:()=>De.get(`/tasks/${t}/deletion-scope`),enabled:!!t&&a})}function I0(t,a){const i={queryKey:["tasks","subtasks"]},o=t.getQueriesData(i);return t.setQueriesData(i,c=>{if(!c)return c;const u=new Set(c.pages.flatMap(f=>f.data.filter(h=>hc(h,a)).map(h=>h.id)));return u.size?{...c,pages:c.pages.map(f=>({...f,data:f.data.filter(h=>!u.has(h.id)),total:Math.max(0,f.total-u.size)}))}:c}),o}function mO(t,a=!0){return QS({queryKey:ae.tasks.subtasks(t),initialPageParam:1,queryFn:({pageParam:i})=>De.get(`/tasks/${t}/subtasks`,{params:{page:String(i),limit:"100"}}),getNextPageParam:i=>i.page<i.totalPages?i.page+1:void 0,enabled:!!t&&a})}function pO(t){return Wt({queryKey:ae.tasks.detail(t),queryFn:()=>De.get(`/tasks/${t}`),enabled:!!t})}function gO(t,a=!0){return Wt({queryKey:ae.tasks.body(t),queryFn:()=>De.get(`/tasks/${t}/body`),enabled:!!t&&a})}function yO(){const t=nt();return gt({mutationFn:({id:a,...i})=>De.put(`/tasks/${a}`,i),onSuccess:a=>{t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.tasks.detail(a.id)}),t.invalidateQueries({queryKey:ae.tasks.body(a.id)})}})}function vO(){const t=nt();return gt({mutationFn:({id:a,status:i})=>De.patch(`/tasks/${a}/status`,{status:i}),onSuccess:a=>{t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.tasks.detail(a.id)})}})}function bO(){const t=nt(),a=D2();return gt({mutationFn:i=>{const{id:o,expectedSubtaskCount:c}=typeof i=="string"?{id:i}:i;return De.delete(`/tasks/${o}`,c===void 0?void 0:{params:{expectedSubtaskCount:String(c)}})},onMutate:async i=>{const o=typeof i=="string"?i:i.id;await t.cancelQueries({queryKey:ae.tasks.all});const c=q0(t,o),u=P0(t,o),f=I0(t,o);return{snapshots:c,boardSnapshots:u,subtaskSnapshots:f}},onError:(i,o,c)=>{c?.snapshots&&j2(t,c.snapshots);for(const[u,f]of c?.subtaskSnapshots??[])t.setQueryData(u,f);c?.boardSnapshots&&z2(t,c.boardSnapshots),t.invalidateQueries({queryKey:ae.tasks.all})},onSuccess:(i,o)=>{a(typeof o=="string"?o:o.id),t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.projects.all})}})}function L2(){const t=nt();S.useEffect(()=>{const a=bo.connect(),i=()=>{t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.workspaces.all})},o=async u=>{await t.cancelQueries({predicate:f=>oo(f.queryKey,u.projectId)||lo(f.queryKey,u.projectId)||Xl(f,u.projectId)}),t.invalidateQueries({predicate:f=>oo(f.queryKey,u.projectId)||lo(f.queryKey,u.projectId)}),t.invalidateQueries({queryKey:["tasks","subtasks"]}),t.invalidateQueries({queryKey:["tasks","deletion-scope"]}),t.invalidateQueries({queryKey:ae.tasks.handoff(u.taskId)}),t.invalidateQueries({queryKey:ae.workspaces.list(u.taskId)}),t.invalidateQueries({predicate:f=>Xl(f,u.projectId)}),t.invalidateQueries({queryKey:ae.tasks.stats(u.projectId)})},c=async u=>{await t.cancelQueries({predicate:f=>oo(f.queryKey,u.projectId)||lo(f.queryKey,u.projectId)||Xl(f,u.projectId)}),t.removeQueries({queryKey:ae.tasks.handoff(u.taskId)}),q0(t,u.taskId,u.projectId),P0(t,u.taskId,u.projectId),I0(t,u.taskId),t.invalidateQueries({predicate:f=>oo(f.queryKey,u.projectId)||lo(f.queryKey,u.projectId)}),t.invalidateQueries({queryKey:["tasks","subtasks"]}),t.invalidateQueries({queryKey:["tasks","deletion-scope"]}),t.invalidateQueries({predicate:f=>Xl(f,u.projectId)}),t.invalidateQueries({queryKey:ae.tasks.stats(u.projectId)}),t.invalidateQueries({queryKey:ae.projects.all})};return a.on("connect",i),a.on(Tr.TASK_UPDATED,o),a.on(Tr.TASK_DELETED,c),()=>{a.off("connect",i),a.off(Tr.TASK_UPDATED,o),a.off(Tr.TASK_DELETED,c)}},[t])}function H0(){const t=globalThis.crypto;if(typeof t.randomUUID=="function")return t.randomUUID();const a=t.getRandomValues(new Uint8Array(16));a[6]=a[6]&15|64,a[8]=a[8]&63|128;const i=Array.from(a,o=>o.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}const rh="tower:team-initial-submission:";function Q0(t){const a=sessionStorage.getItem(`${rh}${t}`);if(!a)return null;try{const i=JSON.parse(a);if(i.version!==1||i.taskId!==t||!i.body||!["AUTO","CONFIRM"].includes(i.body.mode)||typeof i.body.clientSubmissionId!="string"||!/^[0-9a-f-]{36}$/i.test(i.body.clientSubmissionId))throw new Error;return i.body}catch{throw new Error("Pending team creation is damaged. Check the original submission before creating again.")}}function U2(t,a){const i=Q0(t);if(i){const{clientSubmissionId:c,...u}=i,{clientSubmissionId:f,...h}=a;if(JSON.stringify(u)!==JSON.stringify(h)||f&&f!==c)throw new Error("Check the original team creation before changing its configuration.");return i}const o={...a,clientSubmissionId:a.clientSubmissionId??H0()};return sessionStorage.setItem(`${rh}${t}`,JSON.stringify({version:1,taskId:t,body:o})),o}function Sv(t,a){try{Q0(t)?.clientSubmissionId===a&&sessionStorage.removeItem(`${rh}${t}`)}catch{}}function B2(t,a){const i=new Map(t?.pages.flatMap(o=>o.items.map(c=>[c.id,c])));return{...a,pages:a.pages.map(o=>({...o,items:o.items.map(c=>{const u=i.get(c.id);return u&&u.revision>c.revision?u:c})}))}}function wv(t,a){return t&&B2(t,{...t,pages:t.pages.map(i=>({...i,items:i.items.map(o=>o.id===a.id?a:o)}))})}function K0(t,a){const i=["message-deliveries",aR(a)?a.sessionId:`task:${a.destination.taskId}`];t.setQueriesData({queryKey:i},o=>wv(o,a)),a.state!=="CANCELLED"&&t.setQueryData([...i,a.state==="SENT"?"sent":"pending"],o=>o?o.pages.some(c=>c.items.some(u=>u.id===a.id))?wv(o,a):{...o,pages:o.pages.map((c,u)=>u?c:{...c,items:[...c.items,a].sort((f,h)=>f.sequence-h.sequence)})}:{pages:[{items:[a],nextCursor:null}],pageParams:[""]})}const uo="tower:team-room-submission:";function $l(t){return JSON.stringify([t.content,t.mentions??[],t.attachmentIds??[],t.artifactRefs??[],t.kind??null])}function xO(t){const a=[];try{for(let i=0;i<sessionStorage.length;i++){const o=sessionStorage.key(i);if(!o?.startsWith(`${uo}${t}:`))continue;const c=JSON.parse(sessionStorage.getItem(o));typeof c.content=="string"&&typeof c.clientSubmissionId=="string"&&a.push(c)}}catch{}return a}function q2(t,a){for(let o=0;o<sessionStorage.length;o++){const c=sessionStorage.key(o);if(!c?.startsWith(`${uo}${t}:`))continue;let u;try{if(u=JSON.parse(sessionStorage.getItem(c)),!u||typeof u.content!="string"||typeof u.clientSubmissionId!="string"||c!==`${uo}${t}:${u.clientSubmissionId}`)throw new Error}catch{throw new Error("Pending room submission is unavailable or damaged. Check the original submission before sending again.")}if(a.clientSubmissionId===u.clientSubmissionId){if($l(a)!==$l(u))throw new Error("The original room submission must be checked before changing its content.");return u}if(!a.clientSubmissionId&&$l(a)===$l(u))return u}const i={...a,clientSubmissionId:a.clientSubmissionId??H0()};return sessionStorage.setItem(`${uo}${t}:${i.clientSubmissionId}`,JSON.stringify(i)),i}function P2(t,a){try{sessionStorage.removeItem(`${uo}${t}:${a}`)}catch{}}const Me={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:t=>["member-presets","detail",t],teamTemplates:["team-templates"],teamTemplateDetail:t=>["team-templates","detail",t],task:t=>["team-runs","task",t],detail:t=>["team-runs","detail",t],messages:t=>["team-runs","messages",t],messageDetail:(t,a)=>["team-runs","messages",t,a],workRequests:t=>["team-runs","work-requests",t],invocations:t=>["team-runs","invocations",t]},G0=5e3,I2=45e3;function Y0(t,a){const i=t??[],o=i.findIndex(c=>c.id===a.id);return o>=0?i.map((c,u)=>u===o?a:c):[...i,a]}function Ev(t,a){return!t||t.id!==a.teamRunId?t:{...t,messages:Y0(t.messages,a)}}function V0(t,a){const i=t.getQueryData(Me.detail(a));if(i?.taskId)return i.taskId;const o=t.getQueriesData({queryKey:Me.all});for(const[,c]of o)if(c?.id===a&&c.taskId)return c.taskId}function ss(t,a){const i=V0(t,a);t.invalidateQueries({queryKey:Me.all}),t.invalidateQueries({queryKey:Me.detail(a)}),t.invalidateQueries({queryKey:Me.workRequests(a)}),t.invalidateQueries({queryKey:Me.invocations(a)}),t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.workspaces.all}),i&&(t.invalidateQueries({queryKey:ae.tasks.detail(i)}),t.invalidateQueries({queryKey:Me.task(i)}),t.invalidateQueries({queryKey:ae.workspaces.list(i)}))}function SO(){return Wt({queryKey:Me.memberPresets,queryFn:()=>De.get("/member-presets")})}function wO(){const t=nt();return gt({mutationFn:a=>De.post("/member-presets",a),onSuccess:()=>{t.invalidateQueries({queryKey:Me.memberPresets}),t.invalidateQueries({queryKey:Me.teamTemplates})}})}function EO(){const t=nt();return gt({mutationFn:({id:a,data:i})=>De.patch(`/member-presets/${a}`,i),onSuccess:(a,i)=>{t.invalidateQueries({queryKey:Me.memberPresets}),t.invalidateQueries({queryKey:Me.memberPresetDetail(i.id)}),t.invalidateQueries({queryKey:Me.teamTemplates})}})}function TO(){const t=nt();return gt({mutationFn:a=>De.delete(`/member-presets/${a}`),onSuccess:()=>{t.invalidateQueries({queryKey:Me.memberPresets}),t.invalidateQueries({queryKey:Me.teamTemplates})}})}function CO(){return Wt({queryKey:Me.teamTemplates,queryFn:()=>De.get("/team-templates")})}function kO(){const t=nt();return gt({mutationFn:a=>De.post("/team-templates",a),onSuccess:()=>{t.invalidateQueries({queryKey:Me.teamTemplates})}})}function AO(){const t=nt();return gt({mutationFn:({id:a,data:i})=>De.patch(`/team-templates/${a}`,i),onSuccess:(a,i)=>{t.invalidateQueries({queryKey:Me.teamTemplates}),t.invalidateQueries({queryKey:Me.teamTemplateDetail(i.id)})}})}function RO(){const t=nt();return gt({mutationFn:a=>De.delete(`/team-templates/${a}`),onSuccess:()=>{t.invalidateQueries({queryKey:Me.teamTemplates})}})}function NO(){const t=nt();return gt({mutationFn:async({taskId:a,...i})=>{const o=U2(a,i);try{const c=await De.post(`/tasks/${a}/team-runs`,o);return Sv(a,o.clientSubmissionId),c}catch(c){throw c instanceof ns&&[400,401,403,404,409,422,429].includes(c.status)&&Sv(a,o.clientSubmissionId),c}},onSuccess:(a,i)=>{if("operationId"in a){K0(t,a.delivery),t.invalidateQueries({queryKey:Me.task(i.taskId)});return}t.setQueryData(Me.task(i.taskId),a),t.setQueryData(Me.detail(a.id),a),t.setQueryData(Me.messages(a.id),a.messages??[]),t.setQueryData(Me.workRequests(a.id),a.workRequests??[]),t.setQueryData(Me.invocations(a.id),a.invocations??[]),t.invalidateQueries({queryKey:Me.task(i.taskId)}),t.invalidateQueries({queryKey:Me.all}),t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.tasks.detail(i.taskId)}),t.invalidateQueries({queryKey:ae.workspaces.all}),t.invalidateQueries({queryKey:ae.workspaces.list(i.taskId)})},onError:(a,i)=>{t.invalidateQueries({queryKey:Me.task(i.taskId)}),t.invalidateQueries({queryKey:Me.all})}})}function _O(t){return Wt({queryKey:Me.task(t),queryFn:async()=>{try{return await De.get(`/tasks/${t}/team-run`)}catch(a){if(a instanceof ns&&a.status===404)return null;throw a}},enabled:!!t,retry:!1,refetchInterval:a=>a.state.data?G0:!1})}function OO(t){return Wt({queryKey:Me.messages(t),queryFn:async()=>{try{return await De.get(`/team-runs/${t}/messages`)}catch(a){if(a instanceof ns&&a.status===404)return[];throw a}},enabled:!!t,retry:!1,refetchInterval:G0})}function MO(t,a,i=!1){return Wt({queryKey:Me.messageDetail(t,a),queryFn:()=>De.get(`/team-runs/${t}/messages/${a}`),enabled:!!(t&&a&&i),retry:!1})}function DO(t){const a=nt();return gt({mutationFn:async i=>{const o=q2(t,i),c=await De.post(`/team-runs/${t}/messages`,o);return P2(t,o.clientSubmissionId),c},onSuccess:i=>{if("operationId"in i){K0(a,i.delivery),a.invalidateQueries({queryKey:Me.all});return}a.setQueryData(Me.messages(t),c=>Y0(c,i)),a.setQueryData(Me.detail(t),c=>Ev(c,i));const o=V0(a,t);o&&a.setQueryData(Me.task(o),c=>Ev(c,i)),a.invalidateQueries({queryKey:Me.all}),a.invalidateQueries({queryKey:["tasks"]}),a.invalidateQueries({queryKey:ae.workspaces.all})}})}function jO(t){const a=nt();return gt({mutationFn:i=>De.post(`/team-runs/${t}/members`,i),onSuccess:()=>{ss(a,t)}})}function zO(t){const a=nt();return gt({mutationFn:({memberId:i,data:o})=>De.patch(`/team-runs/${t}/members/${i}`,o),onSuccess:()=>{ss(a,t)}})}function LO(t){const a=nt();return gt({mutationFn:({memberId:i,stopActive:o=!0,cancelQueued:c=!0})=>De.post(`/team-runs/${t}/members/${i}/remove`,{stopActive:o,cancelQueued:c}),onSuccess:()=>{ss(a,t)}})}function UO(t){const a=nt();return gt({mutationFn:i=>De.post(`/team-runs/work-requests/${i}/approve`),onSuccess:()=>{ss(a,t)}})}function BO(t){const a=nt();return gt({mutationFn:i=>De.post(`/team-runs/work-requests/${i}/reject`),onSuccess:()=>{ss(a,t)}})}function qO(t){const a=nt();return gt({mutationFn:async({memberId:i,cancelQueued:o})=>{try{return await De.post(`/team-runs/${t}/members/${i}/stop`,{cancelQueued:o},{signal:AbortSignal.timeout(I2)})}catch(c){throw c instanceof DOMException&&c.name==="TimeoutError"?new Error("Stop request timed out before the server answered. Refresh the team status and retry."):c}},onSuccess:()=>{ss(a,t)}})}function va(t,a){return t.scopes.includes(a)}function H2(){const t=nt();S.useEffect(()=>{const a=bo.connect(),i=u=>{if(!u){t.invalidateQueries({queryKey:Me.all});return}t.invalidateQueries({queryKey:Me.detail(u.teamRunId)}),(va(u,"team-run")||va(u,"team-members"))&&t.invalidateQueries({queryKey:Me.all}),va(u,"room-messages")&&t.invalidateQueries({queryKey:Me.messages(u.teamRunId)}),va(u,"work-requests")&&t.invalidateQueries({queryKey:Me.workRequests(u.teamRunId)}),va(u,"agent-invocations")&&t.invalidateQueries({queryKey:Me.invocations(u.teamRunId)}),u.taskId&&t.invalidateQueries({queryKey:Me.task(u.taskId)}),u.taskId&&(va(u,"task")||va(u,"team-run"))&&t.invalidateQueries({queryKey:ae.tasks.detail(u.taskId)}),u.projectId&&(va(u,"task")||va(u,"team-run"))&&(t.invalidateQueries({queryKey:ae.tasks.list(u.projectId)}),t.invalidateQueries({queryKey:ae.tasks.boardAll})),va(u,"workspaces")&&(t.invalidateQueries({queryKey:ae.workspaces.all}),u.taskId&&t.invalidateQueries({queryKey:ae.workspaces.list(u.taskId)}))},o=()=>i(),c=u=>i(u);return a.on("connect",o),a.on(Tr.TEAM_RUN_INVALIDATED,c),()=>{a.off("connect",o),a.off(Tr.TEAM_RUN_INVALIDATED,c)}},[t])}const Q2=Nb(t=>({visibleContext:null,setVisibleContext:a=>t({visibleContext:a})}));function K2(t){t.invalidateQueries({queryKey:ae.git.all,refetchType:"none"}),t.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),t.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function G2(t,a){a.workingDir&&(t.invalidateQueries({queryKey:ae.git.changes(a.workingDir),refetchType:"none"}),t.invalidateQueries({queryKey:ae.git.log(a.workingDir),refetchType:"none"})),a.workspaceId&&t.invalidateQueries({queryKey:ae.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}function Tv(t,a,i){if(!(!a?.workspaceId||!a?.workingDir)){if(a.reason==="base-branch"&&(t.invalidateQueries({queryKey:ae.workspaces.detail(a.workspaceId)}),a.taskId&&t.invalidateQueries({queryKey:ae.workspaces.list(a.taskId)}),a.projectId&&t.invalidateQueries({queryKey:ae.workspaces.projectBranches(a.projectId)}),t.invalidateQueries({queryKey:ae.tasks.all}),t.invalidateQueries({queryKey:ae.workspaces.diff(a.workspaceId)}),t.invalidateQueries({queryKey:["git","diff",a.workingDir]})),!i||i.workspaceId!==a.workspaceId||i.workingDir!==a.workingDir){G2(t,a);return}if(i.tab==="changes"){t.invalidateQueries({queryKey:ae.git.changes(a.workingDir)}),t.invalidateQueries({queryKey:ae.workspaces.gitStatus(a.workspaceId)}),t.invalidateQueries({queryKey:ae.git.log(a.workingDir),refetchType:"none"});return}t.invalidateQueries({queryKey:ae.git.log(a.workingDir)}),t.invalidateQueries({queryKey:ae.git.changes(a.workingDir),refetchType:"none"}),t.invalidateQueries({queryKey:ae.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}}function Y2(){const t=nt(),a=Q2(i=>i.visibleContext);S.useEffect(()=>{const i=bo.connect(),o=()=>{K2(t);for(const u of["list","detail","project-branches"])t.invalidateQueries({queryKey:["workspaces",u]});a&&Tv(t,{workspaceId:a.workspaceId,workingDir:a.workingDir},a)},c=u=>{Tv(t,u,a)};return i.on("connect",o),i.on(Tr.WORKSPACE_GIT_CHANGED,c),()=>{i.off("connect",o),i.off(Tr.WORKSPACE_GIT_CHANGED,c)}},[t,a])}function V2(){return L2(),H2(),Y2(),null}function F2({className:t,type:a="text",...i}){return m.jsx("input",{type:a,"data-slot":"input",className:ye("w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",t),...i})}let F0=0;const PO=()=>F0;async function X0(t){F0++;const a=t.cancelQueries({queryKey:ae.roomTranslations.all});t.removeQueries({queryKey:ae.roomTranslations.all}),await a}function X2(){return Wt({queryKey:ae.accessAuth.status,queryFn:()=>De.get("/access-auth/status"),retry:!1})}function IO(t=!0){return Wt({queryKey:ae.accessAuth.settings,queryFn:()=>De.get("/access-auth/settings"),enabled:t})}function $2(){const t=nt();return gt({mutationKey:ae.accessAuth.identityChange,onMutate:()=>Promise.all([X0(t),t.cancelQueries({queryKey:ae.accessAuth.conflictRecoveryIdentity})]),onSettled:()=>t.resetQueries({queryKey:ae.accessAuth.conflictRecoveryIdentity}),mutationFn:a=>De.post("/access-auth/login",{password:a}),onSuccess:a=>{t.setQueryData(ae.accessAuth.status,a),t.invalidateQueries()}})}function HO(){const t=nt();return gt({mutationKey:ae.accessAuth.identityChange,onMutate:()=>Promise.all([X0(t),t.cancelQueries({queryKey:ae.accessAuth.conflictRecoveryIdentity})]),onSettled:()=>t.resetQueries({queryKey:ae.accessAuth.conflictRecoveryIdentity}),mutationFn:()=>De.post("/access-auth/logout",{}),onSuccess:a=>{t.setQueryData(ae.accessAuth.status,a),t.invalidateQueries()}})}function QO(){const t=nt();return gt({mutationFn:a=>De.put("/access-auth/settings",a),onSuccess:()=>{t.invalidateQueries({queryKey:ae.accessAuth.status}),t.invalidateQueries({queryKey:ae.accessAuth.settings})}})}function Z2(){return m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:m.jsx(Ar,{size:18,className:"animate-spin text-muted-foreground motion-reduce:animate-none","aria-hidden":"true"})})}function J2(){const[t,a]=S.useState(""),i=$2(),o=i.isError?la("密码不正确,请重试"):null;return m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:m.jsxs("form",{className:"w-full max-w-sm space-y-5",onSubmit:c=>{c.preventDefault();const u=t;u&&i.mutate(u)},children:[m.jsxs("div",{className:"space-y-2 text-center",children:[m.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:m.jsx(OC,{size:18,"aria-hidden":"true"})}),m.jsx("h1",{className:"text-[22px] font-semibold tracking-tight",children:"Agent Tower"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:la("输入访问密码继续")})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(F2,{type:"password",autoFocus:!0,autoComplete:"current-password",value:t,onChange:c=>{a(c.target.value),i.reset()},"aria-invalid":!!o,placeholder:la("访问密码")}),o&&m.jsx("p",{className:"text-xs text-destructive-ink",children:o})]}),m.jsxs(Sa,{className:"w-full",type:"submit",disabled:!t||i.isPending,children:[i.isPending&&m.jsx(Ar,{size:14,className:"mr-2 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),i.isPending?la("验证中..."):la("解锁")]})]})})}function W2({children:t}){const{data:a,isLoading:i,isError:o}=X2();return i?m.jsx(Z2,{}):o?m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-sm text-muted-foreground",children:la("访问状态加载失败,请刷新后重试。")}):a?.enabled&&!a.authenticated?m.jsx(J2,{}):m.jsx(m.Fragment,{children:t})}function e_(){return S.useEffect(()=>(bo.connect(),()=>bo.disconnect()),[]),m.jsxs(ck,{children:[m.jsxs(yN,{children:[m.jsx(V2,{}),m.jsx(qN,{})]}),m.jsx(Jf,{source:"toaster",fallback:()=>null,children:m.jsx(yw,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{toast:"!bg-inverse !text-inverse-foreground !border-inverse !shadow-overlay",description:"!text-inverse-muted"}}})})]})}function t_(){return m.jsx(vN,{children:m.jsx(qS,{client:vw,children:m.jsx(W2,{children:m.jsx(e_,{})})})})}const n_="/api/tunnel/bootstrap";async function a_(){const t=new URL(window.location.href),a=t.searchParams.get("token");if(!a)return;const i=await fetch(`${n_}?token=${encodeURIComponent(a)}`,{method:"POST",credentials:"same-origin"});if(!i.ok)throw new Error(`Tunnel bootstrap failed (${i.status})`);t.searchParams.delete("token"),window.history.replaceState({},"",t.toString())}async function r_(){try{await a_()}catch(t){console.error("[Tunnel] Failed to bootstrap tunnel session",t)}dS.createRoot(document.getElementById("root")).render(m.jsx(S.StrictMode,{children:m.jsx(t_,{})}))}r_();export{cO as $,uN as A,Sa as B,sA as C,n0 as D,sO as E,iO as F,Ot as G,f_ as H,F2 as I,ns as J,XA as K,uO as L,Xa as M,Sb as N,SO as O,Ff as P,CO as Q,SN as R,bR as S,wO as T,EO as U,TO as V,kO as W,Gf as X,AO as Y,RO as Z,oR as _,nk as a,Qd as a$,$C as a0,TC as a1,uC as a2,Ar as a3,fC as a4,fc as a5,BA as a6,xR as a7,iC as a8,Wi as a9,bc as aA,LA as aB,QS as aC,la as aD,GC as aE,vo as aF,_f as aG,S_ as aH,T_ as aI,E_ as aJ,C_ as aK,w_ as aL,K0 as aM,QR as aN,v0 as aO,PE as aP,LC as aQ,io as aR,$A as aS,h_ as aT,DC as aU,lO as aV,kC as aW,Co as aX,H0 as aY,s_ as aZ,Jf as a_,oO as aa,ne as ab,HC as ac,p_ as ad,Rr as ae,bo as af,Tr as ag,H_ as ah,NO as ai,HA as aj,_O as ak,OO as al,DO as am,gO as an,tv as ao,av as ap,Q2 as aq,Db as ar,nv as as,Me as at,V_ as au,yc as av,WT as aw,PC as ax,aC as ay,ca as az,u_ as b,q_ as b$,Q_ as b0,K_ as b1,e0 as b2,m_ as b3,Jt as b4,Se as b5,WA as b6,nR as b7,G_ as b8,Rb as b9,hc as bA,cn as bB,fR as bC,BC as bD,KS as bE,of as bF,Tb as bG,CA as bH,a0 as bI,$y as bJ,df as bK,g_ as bL,v_ as bM,A_ as bN,__ as bO,N_ as bP,R_ as bQ,O_ as bR,k_ as bS,M_ as bT,ZA as bU,D_ as bV,b_ as bW,AA as bX,L_ as bY,X_ as bZ,$_ as b_,Ab as ba,sR as bb,kb as bc,uf as bd,ts as be,d_ as bf,d0 as bg,Cv as bh,I_ as bi,P_ as bj,FA as bk,Z_ as bl,u0 as bm,ev as bn,hO as bo,mO as bp,Xn as bq,J_ as br,cv as bs,Wk as bt,h0 as bu,fO as bv,pO as bw,bO as bx,vO as by,yO as bz,rt as c,qA as c0,U_ as c1,B_ as c2,y_ as c3,gR as c4,F_ as c5,uR as c6,hR as c7,kA as c8,eO as c9,jO as cA,zO as cB,LO as cC,sv as cD,o_ as cE,c_ as cF,WC as cG,l_ as cH,JC as cI,On as cJ,Y_ as cK,B2 as cL,Py as cM,aR as cN,Jk as cO,uk as cP,Nb as cQ,W_ as ca,tO as cb,mR as cc,z_ as cd,j_ as ce,jA as cf,x_ as cg,NA as ch,cR as ci,lR as cj,DA as ck,C0 as cl,iR as cm,xC as cn,xN as co,Cf as cp,Ct as cq,Q0 as cr,PO as cs,qO as ct,P2 as cu,xO as cv,UO as cw,BO as cx,OC as cy,MO as cz,IO as d,ak as e,QO as f,HO as g,nO as h,rO as i,m as j,aO as k,ye as l,Wt as m,gt as n,nt as o,De as p,ae as q,S as r,tC as s,ba as t,Qt as u,uA as v,vA as w,t0 as x,lA as y,i0 as z};
|