@lovelybunch/api 1.0.75-alpha.10 → 1.0.75-alpha.11
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/lib/jobs/job-scheduler.js +21 -0
- package/dist/lib/mcp-client.d.ts +39 -0
- package/dist/lib/mcp-client.js +131 -0
- package/dist/lib/slack/slack-service.d.ts +2 -0
- package/dist/lib/slack/slack-service.js +3 -0
- package/dist/routes/api/v1/ai/tools.js +49 -232
- package/dist/routes/api/v1/git/index.js +23 -0
- package/dist/routes/api/v1/proposals/[id]/route.d.ts +10 -24
- package/dist/routes/api/v1/proposals/[id]/route.js +10 -1
- package/dist/routes/api/v1/proposals/route.d.ts +2 -16
- package/dist/routes/api/v1/proposals/route.js +11 -8
- package/dist/routes/api/v1/slack/index.d.ts +3 -0
- package/dist/routes/api/v1/slack/index.js +15 -0
- package/dist/routes/api/v1/slack/route.d.ts +124 -0
- package/dist/routes/api/v1/slack/route.js +192 -0
- package/dist/routes/api/v1/tasks/[id]/route.js +10 -0
- package/dist/routes/api/v1/tasks/route.js +9 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +2 -2
- package/dist/server-with-static.js +2 -0
- package/dist/server.js +2 -0
- package/package.json +4 -4
- package/static/assets/{ActivityPage-CbmEnYhg.js → ActivityPage-D2Zn5d46.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-DLxQIqTT.js → ApiKeysSettingsPage-0lTMGFnh.js} +1 -1
- package/static/assets/{ArchitectureEditPage-CbtzgIQv.js → ArchitectureEditPage-D_zjOlNp.js} +1 -1
- package/static/assets/{ArchitecturePage-CcAMfFZ8.js → ArchitecturePage-Dl9wMPRA.js} +1 -1
- package/static/assets/{AuthSettingsPage-4Prb7nAt.js → AuthSettingsPage-DN-0d5JC.js} +1 -1
- package/static/assets/{CallbackPage-CmWv_5Nh.js → CallbackPage-pSUHwS6c.js} +1 -1
- package/static/assets/{CodePage-COC7rcwM.js → CodePage-BmEgabxr.js} +1 -1
- package/static/assets/{CollapsibleSection-C_VVeVSc.js → CollapsibleSection-C1zNDYCh.js} +1 -1
- package/static/assets/{DashboardPage-BACFVIaW.js → DashboardPage-CdFJwMmF.js} +1 -1
- package/static/assets/{GitPage-rFngEr_A.js → GitPage-ANlhUZHS.js} +2 -2
- package/static/assets/{GitSettingsPage-CDQovOqx.js → GitSettingsPage-DNxK8DVa.js} +1 -1
- package/static/assets/{IdentityPage-CS4REq2E.js → IdentityPage-9pFdjcFE.js} +1 -1
- package/static/assets/{ImplementationStepsEditor-CBIgppkZ.js → ImplementationStepsEditor-DEHSnp5F.js} +1 -1
- package/static/assets/{IntegrationsSettingsPage-B7HoraBH.js → IntegrationsSettingsPage-CwkwL5dd.js} +1 -1
- package/static/assets/{JobDetailPage-QUhWsaWV.js → JobDetailPage-BLlAzyE-.js} +1 -1
- package/static/assets/{KnowledgeDetailPage-DCJstmIr.js → KnowledgeDetailPage-CFJNJhhN.js} +1 -1
- package/static/assets/{KnowledgeEditPage-EYpFPfcJ.js → KnowledgeEditPage-DVtiPXb_.js} +1 -1
- package/static/assets/{KnowledgePage-D-7skvn5.js → KnowledgePage-CuTDH9Bh.js} +1 -1
- package/static/assets/{LoginPage-L2aoqSDT.js → LoginPage-3DBi_hwv.js} +1 -1
- package/static/assets/{McpSettingsPage-CLwqDjw_.js → McpSettingsPage-BxHz335r.js} +1 -1
- package/static/assets/{NewKnowledgePage-Fq_QD8um.js → NewKnowledgePage-9sB6TdTV.js} +1 -1
- package/static/assets/{NewSkillPage-DRcgovk0.js → NewSkillPage-BYBe6r4d.js} +1 -1
- package/static/assets/{NewTaskPage-CleA8rH5.js → NewTaskPage-BE5Yj7RD.js} +1 -1
- package/static/assets/NotificationsSettingsPage-CPtkulC9.js +1 -0
- package/static/assets/{ProjectEditPage-GIMOKgmh.js → ProjectEditPage-D9VtPWSD.js} +1 -1
- package/static/assets/{ProjectPage-DlWZOqnb.js → ProjectPage-Bk8hmnzz.js} +1 -1
- package/static/assets/{PromptsSettingsPage-DFagGfo-.js → PromptsSettingsPage-B-Li6zb3.js} +1 -1
- package/static/assets/{ResourceDetailPage-CnFRpDec.js → ResourceDetailPage-Bn4NqBh7.js} +1 -1
- package/static/assets/{ResourcesPage-Cw3fu0JE.js → ResourcesPage-CbaDzx36.js} +1 -1
- package/static/assets/{RoleEditPage-ARXq_eCs.js → RoleEditPage-BljkqDbs.js} +1 -1
- package/static/assets/{RolePage--XBBIrq8.js → RolePage-CDuVbr3S.js} +1 -1
- package/static/assets/{RulesSettingsPage-DEqaRH96.js → RulesSettingsPage-DtUPyjeR.js} +1 -1
- package/static/assets/{SchedulePage-C_B2k9P6.js → SchedulePage-DEsE75St.js} +1 -1
- package/static/assets/{SkillDetailPage-Dr6xyKAX.js → SkillDetailPage-BcISA93H.js} +1 -1
- package/static/assets/{SkillEditPage-BsHXmfEZ.js → SkillEditPage-BTEUvSu8.js} +1 -1
- package/static/assets/{SkillsPage-BrDdAAPx.js → SkillsPage-C6L7hMMN.js} +1 -1
- package/static/assets/{SkillsSettingsPage-Cvi7xaDE.js → SkillsSettingsPage-Blc14fBy.js} +1 -1
- package/static/assets/{SourceInput-DxF_GGj8.js → SourceInput-BtfMG5Wi.js} +1 -1
- package/static/assets/{TagInput-DYvHbVZq.js → TagInput-DilIgbMg.js} +1 -1
- package/static/assets/{TaskDetailPage-DzcD6t03.js → TaskDetailPage-DEx9t61F.js} +1 -1
- package/static/assets/{TaskEditPage-C7a6FOeJ.js → TaskEditPage-tdpsj4yx.js} +1 -1
- package/static/assets/{TasksPage-ChWRSO_S.js → TasksPage-DmLPtmET.js} +1 -1
- package/static/assets/{TerminalPage-CoPwn8cU.js → TerminalPage-A9Y67fNY.js} +1 -1
- package/static/assets/{TerminalSessionPage-BQBZrOJa.js → TerminalSessionPage-CDqHiRaw.js} +3 -8
- package/static/assets/{UserPreferencesPage-DjtU7veO.js → UserPreferencesPage-DxUovKgK.js} +1 -1
- package/static/assets/{UserSettingsPage-CfU8boJQ.js → UserSettingsPage-1tv40FUQ.js} +1 -1
- package/static/assets/{UtilitiesPage-sP1Crg-X.js → UtilitiesPage-CrIhyr9_.js} +1 -1
- package/static/assets/{alert-BqZa-crG.js → alert-CXesMmyn.js} +1 -1
- package/static/assets/{arrow-down-3faV_GyO.js → arrow-down-D9etuMoO.js} +1 -1
- package/static/assets/{arrow-left-FD3wQmzH.js → arrow-left-DkTfMrSs.js} +1 -1
- package/static/assets/{arrow-up-BzP0YNVk.js → arrow-up-DFr-vJJy.js} +1 -1
- package/static/assets/{badge-DRyeFib9.js → badge-HE5_fZGv.js} +1 -1
- package/static/assets/{browser-modal-vnePkRfO.js → browser-modal-88xCtQmC.js} +1 -1
- package/static/assets/{card-CuQs3dpy.js → card-B9S2Vx-U.js} +1 -1
- package/static/assets/{chevron-left-QZIoYcVa.js → chevron-left-B5rTh5xo.js} +1 -1
- package/static/assets/{chevron-up-DreyvhRd.js → chevron-up-CtmGm2DE.js} +1 -1
- package/static/assets/{chevrons-up-CsAkc9vE.js → chevrons-up-GjZHuxUC.js} +1 -1
- package/static/assets/{circle-alert-ewz28SE3.js → circle-alert-ZaSVIm5w.js} +1 -1
- package/static/assets/{circle-check-2TuD-EHs.js → circle-check-OAMs0qqg.js} +1 -1
- package/static/assets/{circle-check-big-1xNuBPkR.js → circle-check-big-Csdz5GpZ.js} +1 -1
- package/static/assets/{circle-play-C_w-qCn4.js → circle-play-DJyQPZbX.js} +1 -1
- package/static/assets/{circle-x-B_d4wjG-.js → circle-x-DTr1fuxL.js} +1 -1
- package/static/assets/{clipboard-B6vBm1BP.js → clipboard-CwF3EWpN.js} +1 -1
- package/static/assets/{clock-BIzEsx1g.js → clock-e7nPzZrg.js} +1 -1
- package/static/assets/{download-Dv-RIvKK.js → download-CmRC-PIa.js} +1 -1
- package/static/assets/{external-link-Cr8wjV6X.js → external-link-Bd24IGgw.js} +1 -1
- package/static/assets/{eye-DN958vyL.js → eye-3OOczSrt.js} +1 -1
- package/static/assets/{folder-git-2-BproRzAR.js → folder-git-2-C56Y-a-e.js} +1 -1
- package/static/assets/index-C_PmFIdi.css +2 -0
- package/static/assets/{index-Co_SJV3n.js → index-DzkC23id.js} +83 -78
- package/static/assets/{info-CzKk8mbR.js → info-DOwvZM1c.js} +1 -1
- package/static/assets/{label-h5GIKGcJ.js → label-BuTjh35X.js} +1 -1
- package/static/assets/{markdown-editor-C6il4XWv.js → markdown-editor-DjkUR4bk.js} +1 -1
- package/static/assets/message-square-BKOo6mJX.js +6 -0
- package/static/assets/{pause-BDsjEmXM.js → pause-DTfqRkj4.js} +1 -1
- package/static/assets/{play-CGsVQUJG.js → play-CsdqpNIM.js} +1 -1
- package/static/assets/{radio-group-Bsd75ahK.js → radio-group-CkPIdZF9.js} +1 -1
- package/static/assets/{refresh-cw-qE1iNkL_.js → refresh-cw-5otO2hn8.js} +1 -1
- package/static/assets/{search-dvi0J4Dr.js → search-B9lSaTJ3.js} +1 -1
- package/static/assets/{select-DylRS99W.js → select-BCvXvaCZ.js} +1 -1
- package/static/assets/{switch-CsB3wpq9.js → switch-ME5yEkkm.js} +1 -1
- package/static/assets/{tabs-Bw_4k2Rs.js → tabs-CzKrO1bf.js} +1 -1
- package/static/assets/{tag-Dh5PraRd.js → tag-BCm1ofRX.js} +1 -1
- package/static/assets/{terminal-preview-CfOb7xMx.js → terminal-preview-6VAQZGAD.js} +1 -1
- package/static/assets/{use-terminal-T_tdJTCU.js → use-terminal-D1ZnDkIm.js} +1 -1
- package/static/assets/{video-bO6uuAjA.js → video-Yeqgj72x.js} +1 -1
- package/static/assets/{zap-DHZ91NcK.js → zap-BQdeicHZ.js} +1 -1
- package/static/index.html +2 -2
- package/dist/lib/auth/auth-manager.d.ts.map +0 -1
- package/dist/lib/auth/auth-manager.js.map +0 -1
- package/dist/lib/gait-path.d.ts.map +0 -1
- package/dist/lib/gait-path.js.map +0 -1
- package/dist/lib/git-settings.d.ts.map +0 -1
- package/dist/lib/git-settings.js.map +0 -1
- package/dist/lib/git.d.ts.map +0 -1
- package/dist/lib/git.js.map +0 -1
- package/dist/lib/jobs/global-job-scheduler.d.ts.map +0 -1
- package/dist/lib/jobs/global-job-scheduler.js.map +0 -1
- package/dist/lib/jobs/job-runner.d.ts.map +0 -1
- package/dist/lib/jobs/job-runner.js.map +0 -1
- package/dist/lib/jobs/job-scheduler.d.ts.map +0 -1
- package/dist/lib/jobs/job-scheduler.js.map +0 -1
- package/dist/lib/jobs/job-store.d.ts.map +0 -1
- package/dist/lib/jobs/job-store.js.map +0 -1
- package/dist/lib/project-paths.d.ts.map +0 -1
- package/dist/lib/project-paths.js.map +0 -1
- package/dist/lib/storage/file-storage.d.ts.map +0 -1
- package/dist/lib/storage/file-storage.js.map +0 -1
- package/dist/lib/symlinks/symlink-manager.d.ts.map +0 -1
- package/dist/lib/symlinks/symlink-manager.js.map +0 -1
- package/dist/lib/symlinks/types.d.ts.map +0 -1
- package/dist/lib/symlinks/types.js.map +0 -1
- package/dist/lib/terminal/context-helper.d.ts.map +0 -1
- package/dist/lib/terminal/context-helper.js.map +0 -1
- package/dist/lib/terminal/global-manager.d.ts.map +0 -1
- package/dist/lib/terminal/global-manager.js.map +0 -1
- package/dist/lib/terminal/shell-utils.d.ts.map +0 -1
- package/dist/lib/terminal/shell-utils.js.map +0 -1
- package/dist/lib/terminal/terminal-manager.d.ts.map +0 -1
- package/dist/lib/terminal/terminal-manager.js.map +0 -1
- package/dist/lib/user-preferences.d.ts.map +0 -1
- package/dist/lib/user-preferences.js.map +0 -1
- package/dist/middleware/auth.d.ts.map +0 -1
- package/dist/middleware/auth.js.map +0 -1
- package/dist/routes/api/v1/agents/[id]/index.d.ts.map +0 -1
- package/dist/routes/api/v1/agents/[id]/index.js.map +0 -1
- package/dist/routes/api/v1/agents/[id]/route.d.ts.map +0 -1
- package/dist/routes/api/v1/agents/[id]/route.js.map +0 -1
- package/dist/routes/api/v1/agents/index.d.ts.map +0 -1
- package/dist/routes/api/v1/agents/index.js.map +0 -1
- package/dist/routes/api/v1/agents/route.d.ts.map +0 -1
- package/dist/routes/api/v1/agents/route.js.map +0 -1
- package/dist/routes/api/v1/ai/index.d.ts.map +0 -1
- package/dist/routes/api/v1/ai/index.js.map +0 -1
- package/dist/routes/api/v1/ai/route.d.ts.map +0 -1
- package/dist/routes/api/v1/ai/route.js.map +0 -1
- package/dist/routes/api/v1/api-keys/index.d.ts.map +0 -1
- package/dist/routes/api/v1/api-keys/index.js.map +0 -1
- package/dist/routes/api/v1/api-keys/route.d.ts.map +0 -1
- package/dist/routes/api/v1/api-keys/route.js.map +0 -1
- package/dist/routes/api/v1/auth/index.d.ts.map +0 -1
- package/dist/routes/api/v1/auth/index.js.map +0 -1
- package/dist/routes/api/v1/auth/route.d.ts.map +0 -1
- package/dist/routes/api/v1/auth/route.js.map +0 -1
- package/dist/routes/api/v1/auth-settings/index.d.ts.map +0 -1
- package/dist/routes/api/v1/auth-settings/index.js.map +0 -1
- package/dist/routes/api/v1/auth-settings/route.d.ts.map +0 -1
- package/dist/routes/api/v1/auth-settings/route.js.map +0 -1
- package/dist/routes/api/v1/chats/[id]/index.d.ts.map +0 -1
- package/dist/routes/api/v1/chats/[id]/index.js.map +0 -1
- package/dist/routes/api/v1/chats/[id]/route.d.ts.map +0 -1
- package/dist/routes/api/v1/chats/[id]/route.js.map +0 -1
- package/dist/routes/api/v1/chats/index.d.ts.map +0 -1
- package/dist/routes/api/v1/chats/index.js.map +0 -1
- package/dist/routes/api/v1/chats/route.d.ts.map +0 -1
- package/dist/routes/api/v1/chats/route.js.map +0 -1
- package/dist/routes/api/v1/config/index.d.ts.map +0 -1
- package/dist/routes/api/v1/config/index.js.map +0 -1
- package/dist/routes/api/v1/config/route.d.ts.map +0 -1
- package/dist/routes/api/v1/config/route.js.map +0 -1
- package/dist/routes/api/v1/context/architecture/route.d.ts.map +0 -1
- package/dist/routes/api/v1/context/architecture/route.js.map +0 -1
- package/dist/routes/api/v1/context/index.d.ts.map +0 -1
- package/dist/routes/api/v1/context/index.js.map +0 -1
- package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts.map +0 -1
- package/dist/routes/api/v1/context/knowledge/[filename]/index.js.map +0 -1
- package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts.map +0 -1
- package/dist/routes/api/v1/context/knowledge/[filename]/route.js.map +0 -1
- package/dist/routes/api/v1/context/knowledge/index.d.ts.map +0 -1
- package/dist/routes/api/v1/context/knowledge/index.js.map +0 -1
- package/dist/routes/api/v1/context/knowledge/route.d.ts.map +0 -1
- package/dist/routes/api/v1/context/knowledge/route.js.map +0 -1
- package/dist/routes/api/v1/context/project/route.d.ts.map +0 -1
- package/dist/routes/api/v1/context/project/route.js.map +0 -1
- package/dist/routes/api/v1/git/index.d.ts.map +0 -1
- package/dist/routes/api/v1/git/index.js.map +0 -1
- package/dist/routes/api/v1/jobs/[id]/route.d.ts.map +0 -1
- package/dist/routes/api/v1/jobs/[id]/route.js.map +0 -1
- package/dist/routes/api/v1/jobs/[id]/run/route.d.ts.map +0 -1
- package/dist/routes/api/v1/jobs/[id]/run/route.js.map +0 -1
- package/dist/routes/api/v1/jobs/index.d.ts.map +0 -1
- package/dist/routes/api/v1/jobs/index.js.map +0 -1
- package/dist/routes/api/v1/jobs/route.d.ts.map +0 -1
- package/dist/routes/api/v1/jobs/route.js.map +0 -1
- package/dist/routes/api/v1/jobs/status/route.d.ts.map +0 -1
- package/dist/routes/api/v1/jobs/status/route.js.map +0 -1
- package/dist/routes/api/v1/mcp/index.d.ts.map +0 -1
- package/dist/routes/api/v1/mcp/index.js.map +0 -1
- package/dist/routes/api/v1/mcp/route.d.ts.map +0 -1
- package/dist/routes/api/v1/mcp/route.js.map +0 -1
- package/dist/routes/api/v1/proposals/[id]/route.d.ts.map +0 -1
- package/dist/routes/api/v1/proposals/[id]/route.js.map +0 -1
- package/dist/routes/api/v1/proposals/index.d.ts.map +0 -1
- package/dist/routes/api/v1/proposals/index.js.map +0 -1
- package/dist/routes/api/v1/proposals/route.d.ts.map +0 -1
- package/dist/routes/api/v1/proposals/route.js.map +0 -1
- package/dist/routes/api/v1/resources/[id]/index.d.ts.map +0 -1
- package/dist/routes/api/v1/resources/[id]/index.js.map +0 -1
- package/dist/routes/api/v1/resources/[id]/route.js.map +0 -1
- package/dist/routes/api/v1/resources/[id]/thumbnail/index.d.ts.map +0 -1
- package/dist/routes/api/v1/resources/[id]/thumbnail/index.js.map +0 -1
- package/dist/routes/api/v1/resources/[id]/thumbnail/route.js.map +0 -1
- package/dist/routes/api/v1/resources/index.d.ts.map +0 -1
- package/dist/routes/api/v1/resources/index.js.map +0 -1
- package/dist/routes/api/v1/resources/route.d.ts.map +0 -1
- package/dist/routes/api/v1/resources/route.js.map +0 -1
- package/dist/routes/api/v1/symlinks/index.d.ts.map +0 -1
- package/dist/routes/api/v1/symlinks/index.js.map +0 -1
- package/dist/routes/api/v1/symlinks/route.d.ts.map +0 -1
- package/dist/routes/api/v1/symlinks/route.js.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.js.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.js.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js.map +0 -1
- package/dist/routes/api/v1/terminal/sessions/index.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/sessions/index.js.map +0 -1
- package/dist/routes/api/v1/terminal/sessions/route.d.ts.map +0 -1
- package/dist/routes/api/v1/terminal/sessions/route.js.map +0 -1
- package/dist/routes/api/v1/user/index.d.ts.map +0 -1
- package/dist/routes/api/v1/user/index.js.map +0 -1
- package/dist/routes/api/v1/user/settings/index.d.ts.map +0 -1
- package/dist/routes/api/v1/user/settings/index.js.map +0 -1
- package/dist/routes/api/v1/user/settings/route.d.ts.map +0 -1
- package/dist/routes/api/v1/user/settings/route.js.map +0 -1
- package/dist/server-with-static.d.ts.map +0 -1
- package/dist/server-with-static.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/static/assets/index-GFQ5RqVh.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-CdFJwMmF.js","assets/card-B9S2Vx-U.js","assets/badge-HE5_fZGv.js","assets/status-utils-CDkPeVfP.js","assets/label-BuTjh35X.js","assets/select-BCvXvaCZ.js","assets/chevron-up-CtmGm2DE.js","assets/use-terminal-D1ZnDkIm.js","assets/terminal-preview-6VAQZGAD.js","assets/xterm-DTxiCjtJ.js","assets/xterm-qxJ8_QYu.css","assets/circle-check-OAMs0qqg.js","assets/chevron-left-B5rTh5xo.js","assets/search-B9lSaTJ3.js","assets/zap-BQdeicHZ.js","assets/folder-git-2-C56Y-a-e.js","assets/external-link-Bd24IGgw.js","assets/play-CsdqpNIM.js","assets/clock-e7nPzZrg.js","assets/circle-check-big-Csdz5GpZ.js","assets/LoginPage-3DBi_hwv.js","assets/tabs-CzKrO1bf.js","assets/CallbackPage-pSUHwS6c.js","assets/circle-x-DTr1fuxL.js","assets/TasksPage-DmLPtmET.js","assets/TaskDetailPage-DEx9t61F.js","assets/clipboard-B9ndUJKl.js","assets/arrow-left-DkTfMrSs.js","assets/clipboard-CwF3EWpN.js","assets/info-DOwvZM1c.js","assets/download-CmRC-PIa.js","assets/TaskEditPage-tdpsj4yx.js","assets/markdown-editor-DjkUR4bk.js","assets/markdown-editor-DUEthZ0y.css","assets/CollapsibleSection-C1zNDYCh.js","assets/ImplementationStepsEditor-DEHSnp5F.js","assets/TagInput-DilIgbMg.js","assets/NewTaskPage-BE5Yj7RD.js","assets/TerminalPage-A9Y67fNY.js","assets/refresh-cw-5otO2hn8.js","assets/chevrons-up-GjZHuxUC.js","assets/circle-play-DJyQPZbX.js","assets/terminal-xj47PT8r.css","assets/TerminalSessionPage-CDqHiRaw.js","assets/radio-group-CkPIdZF9.js","assets/arrow-down-D9etuMoO.js","assets/droid-GYYyVzN-.js","assets/eye-3OOczSrt.js","assets/message-square-BKOo6mJX.js","assets/UtilitiesPage-CrIhyr9_.js","assets/CodePage-BmEgabxr.js","assets/SkillsPage-C6L7hMMN.js","assets/browser-modal-88xCtQmC.js","assets/registry-ANRa5WBi.js","assets/tag-BCm1ofRX.js","assets/SkillDetailPage-BcISA93H.js","assets/NewSkillPage-BYBe6r4d.js","assets/SkillEditPage-BTEUvSu8.js","assets/ResourcesPage-CbaDzx36.js","assets/video-Yeqgj72x.js","assets/ResourceDetailPage-Bn4NqBh7.js","assets/KnowledgePage-CuTDH9Bh.js","assets/arrow-up-DFr-vJJy.js","assets/KnowledgeDetailPage-CFJNJhhN.js","assets/KnowledgeEditPage-DVtiPXb_.js","assets/SourceInput-BtfMG5Wi.js","assets/NewKnowledgePage-9sB6TdTV.js","assets/ProjectPage-Bk8hmnzz.js","assets/ProjectEditPage-D9VtPWSD.js","assets/ArchitecturePage-Dl9wMPRA.js","assets/ArchitectureEditPage-D_zjOlNp.js","assets/RolePage-CDuVbr3S.js","assets/RoleEditPage-BljkqDbs.js","assets/IdentityPage-9pFdjcFE.js","assets/alert-CXesMmyn.js","assets/UserSettingsPage-1tv40FUQ.js","assets/AuthSettingsPage-DN-0d5JC.js","assets/switch-ME5yEkkm.js","assets/circle-alert-ZaSVIm5w.js","assets/ApiKeysSettingsPage-0lTMGFnh.js","assets/SkillsSettingsPage-Blc14fBy.js","assets/IntegrationsSettingsPage-CwkwL5dd.js","assets/GitSettingsPage-DNxK8DVa.js","assets/McpSettingsPage-BxHz335r.js","assets/PromptsSettingsPage-B-Li6zb3.js","assets/RulesSettingsPage-DtUPyjeR.js","assets/NotificationsSettingsPage-CPtkulC9.js","assets/GitPage-ANlhUZHS.js","assets/SchedulePage-DEsE75St.js","assets/pause-DTfqRkj4.js","assets/JobDetailPage-BLlAzyE-.js","assets/UserPreferencesPage-DxUovKgK.js","assets/ActivityPage-D2Zn5d46.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function AA(e,n){for(var r=0;r<n.length;r++){const i=n[r];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(i,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function ac(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gd={exports:{}},so={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -56,9 +56,9 @@ Error generating stack: `+l.message+`
|
|
|
56
56
|
* LICENSE.md file in the root directory of this source tree.
|
|
57
57
|
*
|
|
58
58
|
* @license MIT
|
|
59
|
-
*/var Tx="popstate";function IA(e={}){function n(i,o){let{pathname:s,search:c,hash:f}=i.location;return Lh("",{pathname:s,search:c,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(i,o){return typeof o=="string"?o:Ao(o)}return UA(n,r,null,e)}function ct(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function On(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function BA(){return Math.random().toString(36).substring(2,10)}function Rx(e,n){return{usr:e.state,key:e.key,idx:n}}function Lh(e,n,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?rl(n):n,state:r,key:n&&n.key||i||BA()}}function Ao({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function rl(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function UA(e,n,r,i={}){let{window:o=document.defaultView,v5Compat:s=!1}=i,c=o.history,f="POP",h=null,d=m();d==null&&(d=0,c.replaceState({...c.state,idx:d},""));function m(){return(c.state||{idx:null}).idx}function y(){f="POP";let T=m(),A=T==null?null:T-d;d=T,h&&h({action:f,location:C.location,delta:A})}function b(T,A){f="PUSH";let _=Lh(C.location,T,A);d=m()+1;let N=Rx(_,d),O=C.createHref(_);try{c.pushState(N,"",O)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;o.location.assign(O)}s&&h&&h({action:f,location:C.location,delta:1})}function w(T,A){f="REPLACE";let _=Lh(C.location,T,A);d=m();let N=Rx(_,d),O=C.createHref(_);c.replaceState(N,"",O),s&&h&&h({action:f,location:C.location,delta:0})}function k(T){return HA(T)}let C={get action(){return f},get location(){return e(o,c)},listen(T){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(Tx,y),h=T,()=>{o.removeEventListener(Tx,y),h=null}},createHref(T){return n(o,T)},createURL:k,encodeLocation(T){let A=k(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:b,replace:w,go(T){return c.go(T)}};return C}function HA(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ct(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Ao(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function x0(e,n,r="/"){return FA(e,n,r,!1)}function FA(e,n,r,i){let o=typeof n=="string"?rl(n):n,s=Or(o.pathname||"/",r);if(s==null)return null;let c=b0(e);qA(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let d=eT(s);f=WA(c[h],d,i)}return f}function b0(e,n=[],r=[],i="",o=!1){let s=(c,f,h=o,d)=>{let m={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&h)return;ct(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let y=Dr([i,m.relativePath]),b=r.concat(m);c.children&&c.children.length>0&&(ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),b0(c.children,n,b,y,h)),!(c.path==null&&!c.index)&&n.push({path:y,score:QA(y,c.index),routesMeta:b})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let h of w0(c.path))s(c,f,!0,h)}),n}function w0(e){let n=e.split("/");if(n.length===0)return[];let[r,...i]=n,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return o?[s,""]:[s];let c=w0(i.join("/")),f=[];return f.push(...c.map(h=>h===""?s:[s,h].join("/"))),o&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function qA(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:ZA(n.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var VA=/^:[\w-]+$/,$A=3,GA=2,YA=1,KA=10,XA=-2,_x=e=>e==="*";function QA(e,n){let r=e.split("/"),i=r.length;return r.some(_x)&&(i+=XA),n&&(i+=GA),r.filter(o=>!_x(o)).reduce((o,s)=>o+(VA.test(s)?$A:s===""?YA:KA),i)}function ZA(e,n){return e.length===n.length&&e.slice(0,-1).every((i,o)=>i===n[o])?e[e.length-1]-n[n.length-1]:0}function WA(e,n,r=!1){let{routesMeta:i}=e,o={},s="/",c=[];for(let f=0;f<i.length;++f){let h=i[f],d=f===i.length-1,m=s==="/"?n:n.slice(s.length)||"/",y=Fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:d},m),b=h.route;if(!y&&d&&r&&!i[i.length-1].route.index&&(y=Fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},m)),!y)return null;Object.assign(o,y.params),c.push({params:o,pathname:Dr([s,y.pathname]),pathnameBase:aT(Dr([s,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(s=Dr([s,y.pathnameBase]))}return c}function Fu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=JA(e.path,e.caseSensitive,e.end),o=n.match(r);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((d,{paramName:m,isOptional:y},b)=>{if(m==="*"){let k=f[b]||"";c=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const w=f[b];return y&&!w?d[m]=void 0:d[m]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:c,pattern:e}}function JA(e,n=!1,r=!0){On(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),i]}function eT(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return On(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Or(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function tT(e,n="/"){let{pathname:r,search:i="",hash:o=""}=typeof e=="string"?rl(e):e;return{pathname:r?r.startsWith("/")?r:nT(r,n):n,search:iT(i),hash:lT(o)}}function nT(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Wd(e,n,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rT(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function vp(e){let n=rT(e);return n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase)}function xp(e,n,r,i=!1){let o;typeof e=="string"?o=rl(e):(o={...e},ct(!o.pathname||!o.pathname.includes("?"),Wd("?","pathname","search",o)),ct(!o.pathname||!o.pathname.includes("#"),Wd("#","pathname","hash",o)),ct(!o.search||!o.search.includes("#"),Wd("#","search","hash",o)));let s=e===""||o.pathname==="",c=s?"/":o.pathname,f;if(c==null)f=r;else{let y=n.length-1;if(!i&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),y-=1;o.pathname=b.join("/")}f=y>=0?n[y]:"/"}let h=tT(o,f),d=c&&c!=="/"&&c.endsWith("/"),m=(s||c===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(d||m)&&(h.pathname+="/"),h}var Dr=e=>e.join("/").replace(/\/\/+/g,"/"),aT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function oT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var S0=["POST","PUT","PATCH","DELETE"];new Set(S0);var sT=["GET",...S0];new Set(sT);var al=x.createContext(null);al.displayName="DataRouter";var ic=x.createContext(null);ic.displayName="DataRouterState";x.createContext(!1);var E0=x.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var uT=x.createContext(new Map);uT.displayName="Fetchers";var cT=x.createContext(null);cT.displayName="Await";var Kn=x.createContext(null);Kn.displayName="Navigation";var Io=x.createContext(null);Io.displayName="Location";var Ln=x.createContext({outlet:null,matches:[],isDataRoute:!1});Ln.displayName="Route";var bp=x.createContext(null);bp.displayName="RouteError";function fT(e,{relative:n}={}){ct(il(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=x.useContext(Kn),{hash:o,pathname:s,search:c}=Uo(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Dr([r,s])),i.createHref({pathname:f,search:c,hash:o})}function il(){return x.useContext(Io)!=null}function bn(){return ct(il(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Io).location}var k0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function C0(e){x.useContext(Kn).static||x.useLayoutEffect(e)}function Bo(){let{isDataRoute:e}=x.useContext(Ln);return e?AT():dT()}function dT(){ct(il(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(al),{basename:n,navigator:r}=x.useContext(Kn),{matches:i}=x.useContext(Ln),{pathname:o}=bn(),s=JSON.stringify(vp(i)),c=x.useRef(!1);return C0(()=>{c.current=!0}),x.useCallback((h,d={})=>{if(On(c.current,k0),!c.current)return;if(typeof h=="number"){r.go(h);return}let m=xp(h,JSON.parse(s),o,d.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:Dr([n,m.pathname])),(d.replace?r.replace:r.push)(m,d.state,d)},[n,r,s,o,e])}var hT=x.createContext(null);function pT(e){let n=x.useContext(Ln).outlet;return n&&x.createElement(hT.Provider,{value:e},n)}function pB(){let{matches:e}=x.useContext(Ln),n=e[e.length-1];return n?n.params:{}}function Uo(e,{relative:n}={}){let{matches:r}=x.useContext(Ln),{pathname:i}=bn(),o=JSON.stringify(vp(r));return x.useMemo(()=>xp(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function mT(e,n){return A0(e,n)}function A0(e,n,r,i,o){ct(il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=x.useContext(Kn),{matches:c}=x.useContext(Ln),f=c[c.length-1],h=f?f.params:{},d=f?f.pathname:"/",m=f?f.pathnameBase:"/",y=f&&f.route;{let _=y&&y.path||"";T0(d,!y||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${_}">) 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.
|
|
59
|
+
*/var Tx="popstate";function IA(e={}){function n(i,o){let{pathname:s,search:c,hash:f}=i.location;return Lh("",{pathname:s,search:c,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(i,o){return typeof o=="string"?o:Ao(o)}return UA(n,r,null,e)}function ct(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function On(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function BA(){return Math.random().toString(36).substring(2,10)}function Rx(e,n){return{usr:e.state,key:e.key,idx:n}}function Lh(e,n,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?rl(n):n,state:r,key:n&&n.key||i||BA()}}function Ao({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function rl(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function UA(e,n,r,i={}){let{window:o=document.defaultView,v5Compat:s=!1}=i,c=o.history,f="POP",h=null,d=m();d==null&&(d=0,c.replaceState({...c.state,idx:d},""));function m(){return(c.state||{idx:null}).idx}function y(){f="POP";let T=m(),A=T==null?null:T-d;d=T,h&&h({action:f,location:C.location,delta:A})}function b(T,A){f="PUSH";let _=Lh(C.location,T,A);d=m()+1;let N=Rx(_,d),O=C.createHref(_);try{c.pushState(N,"",O)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;o.location.assign(O)}s&&h&&h({action:f,location:C.location,delta:1})}function w(T,A){f="REPLACE";let _=Lh(C.location,T,A);d=m();let N=Rx(_,d),O=C.createHref(_);c.replaceState(N,"",O),s&&h&&h({action:f,location:C.location,delta:0})}function k(T){return HA(T)}let C={get action(){return f},get location(){return e(o,c)},listen(T){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(Tx,y),h=T,()=>{o.removeEventListener(Tx,y),h=null}},createHref(T){return n(o,T)},createURL:k,encodeLocation(T){let A=k(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:b,replace:w,go(T){return c.go(T)}};return C}function HA(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ct(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Ao(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function x0(e,n,r="/"){return FA(e,n,r,!1)}function FA(e,n,r,i){let o=typeof n=="string"?rl(n):n,s=Or(o.pathname||"/",r);if(s==null)return null;let c=b0(e);qA(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let d=eT(s);f=WA(c[h],d,i)}return f}function b0(e,n=[],r=[],i="",o=!1){let s=(c,f,h=o,d)=>{let m={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&h)return;ct(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let y=Dr([i,m.relativePath]),b=r.concat(m);c.children&&c.children.length>0&&(ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),b0(c.children,n,b,y,h)),!(c.path==null&&!c.index)&&n.push({path:y,score:QA(y,c.index),routesMeta:b})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let h of w0(c.path))s(c,f,!0,h)}),n}function w0(e){let n=e.split("/");if(n.length===0)return[];let[r,...i]=n,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return o?[s,""]:[s];let c=w0(i.join("/")),f=[];return f.push(...c.map(h=>h===""?s:[s,h].join("/"))),o&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function qA(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:ZA(n.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var VA=/^:[\w-]+$/,$A=3,GA=2,YA=1,KA=10,XA=-2,_x=e=>e==="*";function QA(e,n){let r=e.split("/"),i=r.length;return r.some(_x)&&(i+=XA),n&&(i+=GA),r.filter(o=>!_x(o)).reduce((o,s)=>o+(VA.test(s)?$A:s===""?YA:KA),i)}function ZA(e,n){return e.length===n.length&&e.slice(0,-1).every((i,o)=>i===n[o])?e[e.length-1]-n[n.length-1]:0}function WA(e,n,r=!1){let{routesMeta:i}=e,o={},s="/",c=[];for(let f=0;f<i.length;++f){let h=i[f],d=f===i.length-1,m=s==="/"?n:n.slice(s.length)||"/",y=Fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:d},m),b=h.route;if(!y&&d&&r&&!i[i.length-1].route.index&&(y=Fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},m)),!y)return null;Object.assign(o,y.params),c.push({params:o,pathname:Dr([s,y.pathname]),pathnameBase:aT(Dr([s,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(s=Dr([s,y.pathnameBase]))}return c}function Fu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=JA(e.path,e.caseSensitive,e.end),o=n.match(r);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((d,{paramName:m,isOptional:y},b)=>{if(m==="*"){let k=f[b]||"";c=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const w=f[b];return y&&!w?d[m]=void 0:d[m]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:c,pattern:e}}function JA(e,n=!1,r=!0){On(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),i]}function eT(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return On(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Or(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function tT(e,n="/"){let{pathname:r,search:i="",hash:o=""}=typeof e=="string"?rl(e):e;return{pathname:r?r.startsWith("/")?r:nT(r,n):n,search:iT(i),hash:lT(o)}}function nT(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Wd(e,n,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rT(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function vp(e){let n=rT(e);return n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase)}function xp(e,n,r,i=!1){let o;typeof e=="string"?o=rl(e):(o={...e},ct(!o.pathname||!o.pathname.includes("?"),Wd("?","pathname","search",o)),ct(!o.pathname||!o.pathname.includes("#"),Wd("#","pathname","hash",o)),ct(!o.search||!o.search.includes("#"),Wd("#","search","hash",o)));let s=e===""||o.pathname==="",c=s?"/":o.pathname,f;if(c==null)f=r;else{let y=n.length-1;if(!i&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),y-=1;o.pathname=b.join("/")}f=y>=0?n[y]:"/"}let h=tT(o,f),d=c&&c!=="/"&&c.endsWith("/"),m=(s||c===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(d||m)&&(h.pathname+="/"),h}var Dr=e=>e.join("/").replace(/\/\/+/g,"/"),aT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function oT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var S0=["POST","PUT","PATCH","DELETE"];new Set(S0);var sT=["GET",...S0];new Set(sT);var al=x.createContext(null);al.displayName="DataRouter";var ic=x.createContext(null);ic.displayName="DataRouterState";x.createContext(!1);var E0=x.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var uT=x.createContext(new Map);uT.displayName="Fetchers";var cT=x.createContext(null);cT.displayName="Await";var Kn=x.createContext(null);Kn.displayName="Navigation";var Io=x.createContext(null);Io.displayName="Location";var Ln=x.createContext({outlet:null,matches:[],isDataRoute:!1});Ln.displayName="Route";var bp=x.createContext(null);bp.displayName="RouteError";function fT(e,{relative:n}={}){ct(il(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=x.useContext(Kn),{hash:o,pathname:s,search:c}=Uo(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Dr([r,s])),i.createHref({pathname:f,search:c,hash:o})}function il(){return x.useContext(Io)!=null}function bn(){return ct(il(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Io).location}var k0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function C0(e){x.useContext(Kn).static||x.useLayoutEffect(e)}function Bo(){let{isDataRoute:e}=x.useContext(Ln);return e?AT():dT()}function dT(){ct(il(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(al),{basename:n,navigator:r}=x.useContext(Kn),{matches:i}=x.useContext(Ln),{pathname:o}=bn(),s=JSON.stringify(vp(i)),c=x.useRef(!1);return C0(()=>{c.current=!0}),x.useCallback((h,d={})=>{if(On(c.current,k0),!c.current)return;if(typeof h=="number"){r.go(h);return}let m=xp(h,JSON.parse(s),o,d.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:Dr([n,m.pathname])),(d.replace?r.replace:r.push)(m,d.state,d)},[n,r,s,o,e])}var hT=x.createContext(null);function pT(e){let n=x.useContext(Ln).outlet;return n&&x.createElement(hT.Provider,{value:e},n)}function yB(){let{matches:e}=x.useContext(Ln),n=e[e.length-1];return n?n.params:{}}function Uo(e,{relative:n}={}){let{matches:r}=x.useContext(Ln),{pathname:i}=bn(),o=JSON.stringify(vp(r));return x.useMemo(()=>xp(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function mT(e,n){return A0(e,n)}function A0(e,n,r,i,o){ct(il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=x.useContext(Kn),{matches:c}=x.useContext(Ln),f=c[c.length-1],h=f?f.params:{},d=f?f.pathname:"/",m=f?f.pathnameBase:"/",y=f&&f.route;{let _=y&&y.path||"";T0(d,!y||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${_}">) 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.
|
|
60
60
|
|
|
61
|
-
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=bn(),w;if(n){let _=typeof n=="string"?rl(n):n;ct(m==="/"||_.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),w=_}else w=b;let k=w.pathname||"/",C=k;if(m!=="/"){let _=m.replace(/^\//,"").split("/");C="/"+k.replace(/^\//,"").split("/").slice(_.length).join("/")}let T=x0(e,{pathname:C});On(y||T!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),On(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=bT(T&&T.map(_=>Object.assign({},_,{params:Object.assign({},h,_.params),pathname:Dr([m,s.encodeLocation?s.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Dr([m,s.encodeLocation?s.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),c,r,i,o);return n&&A?x.createElement(Io.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},A):A}function gT(){let e=CT(),n=oT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:s},"ErrorBoundary")," or"," ",x.createElement("code",{style:s},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},n),r?x.createElement("pre",{style:o},r):null,c)}var yT=x.createElement(gT,null),vT=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.unstable_onError?this.props.unstable_onError(e,n):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?x.createElement(Ln.Provider,{value:this.props.routeContext},x.createElement(bp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xT({routeContext:e,match:n,children:r}){let i=x.useContext(al);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ln.Provider,{value:e},r)}function bT(e,n=[],r=null,i=null,o=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,c=r?.errors;if(c!=null){let d=s.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);ct(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let f=!1,h=-1;if(r)for(let d=0;d<s.length;d++){let m=s[d];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=d),m.route.id){let{loaderData:y,errors:b}=r,w=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||w){f=!0,h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}return s.reduceRight((d,m,y)=>{let b,w=!1,k=null,C=null;r&&(b=c&&m.route.id?c[m.route.id]:void 0,k=m.route.errorElement||yT,f&&(h<0&&y===0?(T0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):h===y&&(w=!0,C=m.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,y+1)),A=()=>{let _;return b?_=k:w?_=C:m.route.Component?_=x.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=d,x.createElement(xT,{match:m,routeContext:{outlet:d,matches:T,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?x.createElement(vT,{location:r.location,revalidation:r.revalidation,component:k,error:b,children:A(),routeContext:{outlet:null,matches:T,isDataRoute:!0},unstable_onError:i}):A()},null)}function wp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wT(e){let n=x.useContext(al);return ct(n,wp(e)),n}function ST(e){let n=x.useContext(ic);return ct(n,wp(e)),n}function ET(e){let n=x.useContext(Ln);return ct(n,wp(e)),n}function Sp(e){let n=ET(e),r=n.matches[n.matches.length-1];return ct(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function kT(){return Sp("useRouteId")}function CT(){let e=x.useContext(bp),n=ST("useRouteError"),r=Sp("useRouteError");return e!==void 0?e:n.errors?.[r]}function AT(){let{router:e}=wT("useNavigate"),n=Sp("useNavigate"),r=x.useRef(!1);return C0(()=>{r.current=!0}),x.useCallback(async(o,s={})=>{On(r.current,k0),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:n,...s}))},[e,n])}var Nx={};function T0(e,n,r){!n&&!Nx[e]&&(Nx[e]=!0,On(!1,r))}x.memo(TT);function TT({routes:e,future:n,state:r,unstable_onError:i}){return A0(e,void 0,r,i,n)}function RT({to:e,replace:n,state:r,relative:i}){ct(il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=x.useContext(Kn);On(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=x.useContext(Ln),{pathname:c}=bn(),f=Bo(),h=xp(e,vp(s),c,i==="path"),d=JSON.stringify(h);return x.useEffect(()=>{f(JSON.parse(d),{replace:n,state:r,relative:i})},[f,d,i,n,r]),null}function R0(e){return pT(e.context)}function je(e){ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _T({basename:e="/",children:n=null,location:r,navigationType:i="POP",navigator:o,static:s=!1}){ct(!il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=x.useMemo(()=>({basename:c,navigator:o,static:s,future:{}}),[c,o,s]);typeof r=="string"&&(r=rl(r));let{pathname:h="/",search:d="",hash:m="",state:y=null,key:b="default"}=r,w=x.useMemo(()=>{let k=Or(h,c);return k==null?null:{location:{pathname:k,search:d,hash:m,state:y,key:b},navigationType:i}},[c,h,d,m,y,b,i]);return On(w!=null,`<Router basename="${c}"> is not able to match the URL "${h}${d}${m}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:x.createElement(Kn.Provider,{value:f},x.createElement(Io.Provider,{children:n,value:w}))}function NT({children:e,location:n}){return mT(zh(e),n)}function zh(e,n=[]){let r=[];return x.Children.forEach(e,(i,o)=>{if(!x.isValidElement(i))return;let s=[...n,o];if(i.type===x.Fragment){r.push.apply(r,zh(i.props.children,s));return}ct(i.type===je,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ct(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=zh(i.props.children,s)),r.push(c)}),r}var Nu="get",Mu="application/x-www-form-urlencoded";function lc(e){return e!=null&&typeof e.tagName=="string"}function MT(e){return lc(e)&&e.tagName.toLowerCase()==="button"}function jT(e){return lc(e)&&e.tagName.toLowerCase()==="form"}function DT(e){return lc(e)&&e.tagName.toLowerCase()==="input"}function OT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LT(e,n){return e.button===0&&(!n||n==="_self")&&!OT(e)}function Ph(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let i=e[r];return n.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function zT(e,n){let r=Ph(e);return n&&n.forEach((i,o)=>{r.has(o)||n.getAll(o).forEach(s=>{r.append(o,s)})}),r}var mu=null;function PT(){if(mu===null)try{new FormData(document.createElement("form"),0),mu=!1}catch{mu=!0}return mu}var IT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jd(e){return e!=null&&!IT.has(e)?(On(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mu}"`),null):e}function BT(e,n){let r,i,o,s,c;if(jT(e)){let f=e.getAttribute("action");i=f?Or(f,n):null,r=e.getAttribute("method")||Nu,o=Jd(e.getAttribute("enctype"))||Mu,s=new FormData(e)}else if(MT(e)||DT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(i=h?Or(h,n):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||Nu,o=Jd(e.getAttribute("formenctype"))||Jd(f.getAttribute("enctype"))||Mu,s=new FormData(f,e),!PT()){let{name:d,type:m,value:y}=e;if(m==="image"){let b=d?`${d}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else d&&s.append(d,y)}}else{if(lc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Nu,i=null,o=Mu,c=e}return s&&o==="text/plain"&&(c=s,s=void 0),{action:i,method:r.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ep(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function UT(e,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${r}`:n&&Or(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function HT(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function FT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function qT(e,n,r){let i=await Promise.all(e.map(async o=>{let s=n.routes[o.route.id];if(s){let c=await HT(s,r);return c.links?c.links():[]}return[]}));return YT(i.flat(1).filter(FT).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Mx(e,n,r,i,o,s){let c=(h,d)=>r[d]?h.route.id!==r[d].route.id:!0,f=(h,d)=>r[d].pathname!==h.pathname||r[d].route.path?.endsWith("*")&&r[d].params["*"]!==h.params["*"];return s==="assets"?n.filter((h,d)=>c(h,d)||f(h,d)):s==="data"?n.filter((h,d)=>{let m=i.routes[h.route.id];if(!m||!m.hasLoader)return!1;if(c(h,d)||f(h,d))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function VT(e,n,{includeHydrateFallback:r}={}){return $T(e.map(i=>{let o=n.routes[i.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function $T(e){return[...new Set(e)]}function GT(e){let n={},r=Object.keys(e).sort();for(let i of r)n[i]=e[i];return n}function YT(e,n){let r=new Set;return new Set(n),e.reduce((i,o)=>{let s=JSON.stringify(GT(o));return r.has(s)||(r.add(s),i.push({key:s,link:o})),i},[])}function _0(){let e=x.useContext(al);return Ep(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function KT(){let e=x.useContext(ic);return Ep(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var kp=x.createContext(void 0);kp.displayName="FrameworkContext";function N0(){let e=x.useContext(kp);return Ep(e,"You must render this element inside a <HydratedRouter> element"),e}function XT(e,n){let r=x.useContext(kp),[i,o]=x.useState(!1),[s,c]=x.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:d,onMouseLeave:m,onTouchStart:y}=n,b=x.useRef(null);x.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=A=>{A.forEach(_=>{c(_.isIntersecting)})},T=new IntersectionObserver(C,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[e]),x.useEffect(()=>{if(i){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[i]);let w=()=>{o(!0)},k=()=>{o(!1),c(!1)};return r?e!=="intent"?[s,b,{}]:[s,b,{onFocus:co(f,w),onBlur:co(h,k),onMouseEnter:co(d,w),onMouseLeave:co(m,k),onTouchStart:co(y,w)}]:[!1,b,{}]}function co(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function QT({page:e,...n}){let{router:r}=_0(),i=x.useMemo(()=>x0(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?x.createElement(WT,{page:e,matches:i,...n}):null}function ZT(e){let{manifest:n,routeModules:r}=N0(),[i,o]=x.useState([]);return x.useEffect(()=>{let s=!1;return qT(e,n,r).then(c=>{s||o(c)}),()=>{s=!0}},[e,n,r]),i}function WT({page:e,matches:n,...r}){let i=bn(),{manifest:o,routeModules:s}=N0(),{basename:c}=_0(),{loaderData:f,matches:h}=KT(),d=x.useMemo(()=>Mx(e,n,h,o,i,"data"),[e,n,h,o,i]),m=x.useMemo(()=>Mx(e,n,h,o,i,"assets"),[e,n,h,o,i]),y=x.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let k=new Set,C=!1;if(n.forEach(A=>{let _=o.routes[A.route.id];!_||!_.hasLoader||(!d.some(N=>N.route.id===A.route.id)&&A.route.id in f&&s[A.route.id]?.shouldRevalidate||_.hasClientLoader?C=!0:k.add(A.route.id))}),k.size===0)return[];let T=UT(e,c,"data");return C&&k.size>0&&T.searchParams.set("_routes",n.filter(A=>k.has(A.route.id)).map(A=>A.route.id).join(",")),[T.pathname+T.search]},[c,f,i,o,d,n,e,s]),b=x.useMemo(()=>VT(m,o),[m,o]),w=ZT(m);return x.createElement(x.Fragment,null,y.map(k=>x.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...r})),b.map(k=>x.createElement("link",{key:k,rel:"modulepreload",href:k,...r})),w.map(({key:k,link:C})=>x.createElement("link",{key:k,nonce:r.nonce,...C})))}function JT(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var M0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{M0&&(window.__reactRouterVersion="7.8.2")}catch{}function eR({basename:e,children:n,window:r}){let i=x.useRef();i.current==null&&(i.current=IA({window:r,v5Compat:!0}));let o=i.current,[s,c]=x.useState({action:o.action,location:o.location}),f=x.useCallback(h=>{x.startTransition(()=>c(h))},[c]);return x.useLayoutEffect(()=>o.listen(f),[o,f]),x.createElement(_T,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:o})}var j0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lr=x.forwardRef(function({onClick:n,discover:r="render",prefetch:i="none",relative:o,reloadDocument:s,replace:c,state:f,target:h,to:d,preventScrollReset:m,viewTransition:y,...b},w){let{basename:k}=x.useContext(Kn),C=typeof d=="string"&&j0.test(d),T,A=!1;if(typeof d=="string"&&C&&(T=d,M0))try{let ee=new URL(window.location.href),P=d.startsWith("//")?new URL(ee.protocol+d):new URL(d),ne=Or(P.pathname,k);P.origin===ee.origin&&ne!=null?d=ne+P.search+P.hash:A=!0}catch{On(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=fT(d,{relative:o}),[N,O,z]=XT(i,b),j=aR(d,{replace:c,state:f,target:h,preventScrollReset:m,relative:o,viewTransition:y});function $(ee){n&&n(ee),ee.defaultPrevented||j(ee)}let G=x.createElement("a",{...b,...z,href:T||_,onClick:A||s?n:$,ref:JT(w,O),target:h,"data-discover":!C&&r==="render"?"true":void 0});return N&&!C?x.createElement(x.Fragment,null,G,x.createElement(QT,{page:_})):G});lr.displayName="Link";var tR=x.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:i="",end:o=!1,style:s,to:c,viewTransition:f,children:h,...d},m){let y=Uo(c,{relative:d.relative}),b=bn(),w=x.useContext(ic),{navigator:k,basename:C}=x.useContext(Kn),T=w!=null&&uR(y)&&f===!0,A=k.encodeLocation?k.encodeLocation(y).pathname:y.pathname,_=b.pathname,N=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(_=_.toLowerCase(),N=N?N.toLowerCase():null,A=A.toLowerCase()),N&&C&&(N=Or(N,C)||N);const O=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let z=_===A||!o&&_.startsWith(A)&&_.charAt(O)==="/",j=N!=null&&(N===A||!o&&N.startsWith(A)&&N.charAt(A.length)==="/"),$={isActive:z,isPending:j,isTransitioning:T},G=z?n:void 0,ee;typeof i=="function"?ee=i($):ee=[i,z?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let P=typeof s=="function"?s($):s;return x.createElement(lr,{...d,"aria-current":G,className:ee,ref:m,style:P,to:c,viewTransition:f},typeof h=="function"?h($):h)});tR.displayName="NavLink";var nR=x.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:o,state:s,method:c=Nu,action:f,onSubmit:h,relative:d,preventScrollReset:m,viewTransition:y,...b},w)=>{let k=oR(),C=sR(f,{relative:d}),T=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&j0.test(f),_=N=>{if(h&&h(N),N.defaultPrevented)return;N.preventDefault();let O=N.nativeEvent.submitter,z=O?.getAttribute("formmethod")||c;k(O||N.currentTarget,{fetcherKey:n,method:z,navigate:r,replace:o,state:s,relative:d,preventScrollReset:m,viewTransition:y})};return x.createElement("form",{ref:w,method:T,action:C,onSubmit:i?h:_,...b,"data-discover":!A&&e==="render"?"true":void 0})});nR.displayName="Form";function rR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function D0(e){let n=x.useContext(al);return ct(n,rR(e)),n}function aR(e,{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:c}={}){let f=Bo(),h=bn(),d=Uo(e,{relative:s});return x.useCallback(m=>{if(LT(m,n)){m.preventDefault();let y=r!==void 0?r:Ao(h)===Ao(d);f(e,{replace:y,state:i,preventScrollReset:o,relative:s,viewTransition:c})}},[h,f,d,r,i,n,e,o,s,c])}function mB(e){On(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=x.useRef(Ph(e)),r=x.useRef(!1),i=bn(),o=x.useMemo(()=>zT(i.search,r.current?null:n.current),[i.search]),s=Bo(),c=x.useCallback((f,h)=>{const d=Ph(typeof f=="function"?f(new URLSearchParams(o)):f);r.current=!0,s("?"+d,h)},[s,o]);return[o,c]}var iR=0,lR=()=>`__${String(++iR)}__`;function oR(){let{router:e}=D0("useSubmit"),{basename:n}=x.useContext(Kn),r=kT();return x.useCallback(async(i,o={})=>{let{action:s,method:c,encType:f,formData:h,body:d}=BT(i,n);if(o.navigate===!1){let m=o.fetcherKey||lR();await e.fetch(m,r,o.action||s,{preventScrollReset:o.preventScrollReset,formData:h,body:d,formMethod:o.method||c,formEncType:o.encType||f,flushSync:o.flushSync})}else await e.navigate(o.action||s,{preventScrollReset:o.preventScrollReset,formData:h,body:d,formMethod:o.method||c,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,n,r])}function sR(e,{relative:n}={}){let{basename:r}=x.useContext(Kn),i=x.useContext(Ln);ct(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),s={...Uo(e||".",{relative:n})},c=bn();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search),h=f.getAll("index");if(h.some(m=>m==="")){f.delete("index"),h.filter(y=>y).forEach(y=>f.append("index",y));let m=f.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Dr([r,s.pathname])),Ao(s)}function uR(e,{relative:n}={}){let r=x.useContext(E0);ct(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=D0("useViewTransitionState"),o=Uo(e,{relative:n});if(!r.isTransitioning)return!1;let s=Or(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Or(r.nextLocation.pathname,i)||r.nextLocation.pathname;return Fu(o.pathname,c)!=null||Fu(o.pathname,s)!=null}var oc=v0();const cR=ac(oc);var sc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},uc=typeof window>"u"||"Deno"in globalThis;function Vn(){}function fR(e,n){return typeof e=="function"?e(n):e}function dR(e){return typeof e=="number"&&e>=0&&e!==1/0}function hR(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Ih(e,n){return typeof e=="function"?e(n):e}function pR(e,n){return typeof e=="function"?e(n):e}function jx(e,n){const{type:r="all",exact:i,fetchStatus:o,predicate:s,queryKey:c,stale:f}=e;if(c){if(i){if(n.queryHash!==Cp(c,n.options))return!1}else if(!Ro(n.queryKey,c))return!1}if(r!=="all"){const h=n.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||o&&o!==n.state.fetchStatus||s&&!s(n))}function Dx(e,n){const{exact:r,status:i,predicate:o,mutationKey:s}=e;if(s){if(!n.options.mutationKey)return!1;if(r){if(To(n.options.mutationKey)!==To(s))return!1}else if(!Ro(n.options.mutationKey,s))return!1}return!(i&&n.state.status!==i||o&&!o(n))}function Cp(e,n){return(n?.queryKeyHashFn||To)(e)}function To(e){return JSON.stringify(e,(n,r)=>Bh(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function Ro(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Ro(e[r],n[r])):!1}function O0(e,n){if(e===n)return e;const r=Ox(e)&&Ox(n);if(r||Bh(e)&&Bh(n)){const i=r?e:Object.keys(e),o=i.length,s=r?n:Object.keys(n),c=s.length,f=r?[]:{},h=new Set(i);let d=0;for(let m=0;m<c;m++){const y=r?m:s[m];(!r&&h.has(y)||r)&&e[y]===void 0&&n[y]===void 0?(f[y]=void 0,d++):(f[y]=O0(e[y],n[y]),f[y]===e[y]&&e[y]!==void 0&&d++)}return o===c&&d===o?e:f}return n}function Ox(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bh(e){if(!Lx(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!Lx(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lx(e){return Object.prototype.toString.call(e)==="[object Object]"}function mR(e){return new Promise(n=>{setTimeout(n,e)})}function gR(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?O0(e,n):n}function yR(e,n,r=0){const i=[...e,n];return r&&i.length>r?i.slice(1):i}function vR(e,n,r=0){const i=[n,...e];return r&&i.length>r?i.slice(0,-1):i}var Ap=Symbol();function L0(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Ap?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var xR=class extends sc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!uc&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},z0=new xR,bR=class extends sc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!uc&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},qu=new bR;function wR(){let e,n;const r=new Promise((o,s)=>{e=o,n=s});r.status="pending",r.catch(()=>{});function i(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},r.reject=o=>{i({status:"rejected",reason:o}),n(o)},r}function SR(e){return Math.min(1e3*2**e,3e4)}function P0(e){return(e??"online")==="online"?qu.isOnline():!0}var I0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function B0(e){let n=!1,r=0,i;const o=wR(),s=()=>o.status!=="pending",c=C=>{s()||(b(new I0(C)),e.abort?.())},f=()=>{n=!0},h=()=>{n=!1},d=()=>z0.isFocused()&&(e.networkMode==="always"||qu.isOnline())&&e.canRun(),m=()=>P0(e.networkMode)&&e.canRun(),y=C=>{s()||(i?.(),o.resolve(C))},b=C=>{s()||(i?.(),o.reject(C))},w=()=>new Promise(C=>{i=T=>{(s()||d())&&C(T)},e.onPause?.()}).then(()=>{i=void 0,s()||e.onContinue?.()}),k=()=>{if(s())return;let C;const T=r===0?e.initialPromise:void 0;try{C=T??e.fn()}catch(A){C=Promise.reject(A)}Promise.resolve(C).then(y).catch(A=>{if(s())return;const _=e.retry??(uc?0:3),N=e.retryDelay??SR,O=typeof N=="function"?N(r,A):N,z=_===!0||typeof _=="number"&&r<_||typeof _=="function"&&_(r,A);if(n||!z){b(A);return}r++,e.onFail?.(r,A),mR(O).then(()=>d()?void 0:w()).then(()=>{n?b(A):k()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(i?.(),o),cancelRetry:f,continueRetry:h,canStart:m,start:()=>(m()?k():w().then(k),o)}}var ER=e=>setTimeout(e,0);function kR(){let e=[],n=0,r=f=>{f()},i=f=>{f()},o=ER;const s=f=>{n?e.push(f):o(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&o(()=>{i(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;n++;try{h=f()}finally{n--,n||c()}return h},batchCalls:f=>(...h)=>{s(()=>{f(...h)})},schedule:s,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{o=f}}}var Xt=kR(),U0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dR(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uc?1/0:300*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},CR=class extends U0{#e;#t;#n;#a;#r;#l;#o;constructor(e){super(),this.#o=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=TR(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=gR(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#i({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(Vn).catch(Vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>pR(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ap||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ih(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!hR(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},o=()=>{const f=L0(this.options,n),d=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#o=!1,this.options.persister?this.options.persister(f,d,this):f(d)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=B0({initialPromise:n?.initialPromise,fn:c.fetchFn,abort:r.abort.bind(r),onFail:(f,h)=>{this.#i({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof I0){if(f.silent)return this.#r.promise;if(f.revert){if(this.setState({...this.#t,fetchStatus:"idle"}),this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...AR(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Xt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function AR(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function TR(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var RR=class extends sc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const i=n.queryKey,o=n.queryHash??Cp(i,n);let s=this.get(o);return s||(s=new CR({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Xt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>jx(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>jx(e,r)):n}notify(e){Xt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Xt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Xt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_R=class extends U0{#e;#t;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||NR(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#a({type:"continue"})};this.#n=B0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#a({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#n.canStart();try{if(r)n();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#t.config.onMutate?.(e,this);const s=await this.options.onMutate?.(e);s!==this.state.context&&this.#a({type:"pending",context:s,variables:e,isPaused:i})}const o=await this.#n.start();return await this.#t.config.onSuccess?.(o,e,this.state.context,this),await this.options.onSuccess?.(o,e,this.state.context),await this.#t.config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,e,this.state.context),this.#a({type:"success",data:o}),o}catch(o){try{throw await this.#t.config.onError?.(o,e,this.state.context,this),await this.options.onError?.(o,e,this.state.context),await this.#t.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,o,e,this.state.context),o}finally{this.#a({type:"error",error:o})}}finally{this.#t.runNext(this)}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Xt.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function NR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MR=class extends sc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const i=new _R({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);const n=gu(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=gu(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=gu(e);if(typeof n=="string"){const i=this.#t.get(n)?.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=gu(e);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Xt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Dx(n,r))}findAll(e={}){return this.getAll().filter(n=>Dx(e,n))}notify(e){Xt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Xt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Vn))))}};function gu(e){return e.options.scope?.id}function zx(e){return{onFetch:(n,r)=>{const i=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,s=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const d=async()=>{let m=!1;const y=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(n.signal.aborted?m=!0:n.signal.addEventListener("abort",()=>{m=!0}),n.signal)})},b=L0(n.options,n.fetchOptions),w=async(k,C,T)=>{if(m)return Promise.reject();if(C==null&&k.pages.length)return Promise.resolve(k);const _=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:C,direction:T?"backward":"forward",meta:n.options.meta};return y(j),j})(),N=await b(_),{maxPages:O}=n.options,z=T?vR:yR;return{pages:z(k.pages,N,O),pageParams:z(k.pageParams,C,O)}};if(o&&s.length){const k=o==="backward",C=k?jR:Px,T={pages:s,pageParams:c},A=C(i,T);f=await w(T,A,k)}else{const k=e??s.length;do{const C=h===0?c[0]??i.initialPageParam:Px(i,f);if(h>0&&C==null)break;f=await w(f,C),h++}while(h<k)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(d,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=d}}}function Px(e,{pages:n,pageParams:r}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function jR(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var DR=class{#e;#t;#n;#a;#r;#l;#o;#i;constructor(e={}){this.#e=e.queryCache||new RR,this.#t=e.mutationCache||new MR,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#o=z0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=qu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#l--,this.#l===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ih(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(e,n,r){const i=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(i.queryHash)?.state.data,c=fR(n,s);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,n,r){return Xt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Xt.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return Xt.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},i=Xt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(i).then(Vn).catch(Vn)}invalidateQueries(e,n={}){return Xt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=Xt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,r);return r.throwOnError||(s=s.catch(Vn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(Vn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Ih(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vn).catch(Vn)}fetchInfiniteQuery(e){return e.behavior=zx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vn).catch(Vn)}ensureInfiniteQueryData(e){return e.behavior=zx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#a.set(To(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(i=>{Ro(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(To(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(i=>{Ro(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Cp(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ap&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},OR=x.createContext(void 0),LR=({client:e,children:n})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(OR.Provider,{value:e,children:n}));const zR={theme:"system",setTheme:()=>null},H0=x.createContext(zR);function PR({children:e,defaultTheme:n="system",storageKey:r="ui-theme",...i}){const[o,s]=x.useState(n);x.useEffect(()=>{const f=localStorage?.getItem(r);f&&s(f)},[r]),x.useEffect(()=>{const f=window.document.documentElement;if(f.classList.remove("light","dark","coconut"),o==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";f.classList.add(h);return}f.classList.add(o)},[o]);const c={theme:o,setTheme:f=>{localStorage?.setItem(r,f),s(f)}};return g.jsx(H0.Provider,{...i,value:c,children:e})}const gB=()=>{const e=x.useContext(H0);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},xt="",yB="https://app.coconut.dev";async function Bi(e,n={}){const r=`${xt}${e}`,i={headers:{"Content-Type":"application/json",...n.headers},...n},o=await fetch(r,i);if(!o.ok)throw new Error(`API request failed: ${o.status} ${o.statusText}`);return o.json()}const vB=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,F0=x.createContext(void 0);function IR({children:e}){const[n,r]=x.useState({user:null,isAuthenticated:!1,isLoading:!0,authEnabled:!1}),i=x.useCallback(async()=>{try{const h=await Bi("/api/v1/auth/status");if(!h.success){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}if(!(h.data?.enabled||!1)){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}try{const m=await Bi("/api/v1/auth/me");m.success&&m.data?.user?r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0}):r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}catch{r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}}catch(h){console.error("Failed to check auth status:",h),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1})}},[]);x.useEffect(()=>{i()},[i]);const o=x.useCallback(async(h,d)=>{const m=await Bi("/api/v1/auth/login",{method:"POST",body:JSON.stringify({email:h,password:d})});if(!m.success)throw new Error(m.error||"Login failed");r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),s=x.useCallback(async(h,d,m)=>{const y=await Bi("/api/v1/auth/register",{method:"POST",body:JSON.stringify({email:h,password:d,name:m})});if(!y.success)throw new Error(y.error||"Registration failed");r({user:y.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),c=x.useCallback(async()=>{await Bi("/api/v1/auth/logout",{method:"POST"}),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})},[]),f=x.useCallback(async()=>{try{const h=await Bi("/api/v1/auth/me");h.success&&h.data?.user&&r(d=>({...d,user:h.data.user,isAuthenticated:!0}))}catch(h){console.error("Failed to refresh user:",h)}},[]);return g.jsx(F0.Provider,{value:{...n,login:o,register:s,logout:c,refreshUser:f,checkAuthStatus:i},children:e})}function q0(){const e=x.useContext(F0);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const V0=x.createContext(null);function BR(){const e=x.useContext(V0);if(!e)throw new Error("useSidebarBadges must be used within SidebarBadgeProvider");return e}function UR({children:e,pollInterval:n=1e4}){const[r,i]=x.useState({codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0}),[o,s]=x.useState(!0),c=x.useCallback(async()=>{try{const[h,d,m]=await Promise.allSettled([fetch(`${xt}/api/v1/terminal/sessions`).then(b=>b.json()),fetch(`${xt}/api/v1/git/status`).then(b=>b.json()),fetch(`${xt}/api/v1/jobs`).then(b=>b.json())]),y={codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0};if(h.status==="fulfilled"&&h.value?.sessions){const b=h.value.sessions;y.codeSessions=b.filter(w=>w.taskId?.startsWith("cp-")||w.taskId?.startsWith("sk-")).length,y.terminalSessions=b.filter(w=>!w.taskId?.startsWith("cp-")&&!w.taskId?.startsWith("sk-")).length}if(d.status==="fulfilled"&&d.value?.success&&d.value?.data?.changes&&(y.gitChanges=d.value.data.changes.length),m.status==="fulfilled"&&m.value?.success&&m.value?.data){const b=Array.isArray(m.value.data)?m.value.data:[],w=b.filter(k=>{if(!k.runs||!Array.isArray(k.runs)||k.runs.length===0)return!1;const C=k.runs[0],T=C&&C.status==="running";return T&&console.log("[SidebarBadge] Running job detected:",{name:k.name,status:C.status,startedAt:C.startedAt,finishedAt:C.finishedAt}),T});y.runningScheduledJobs=w.length,(w.length>0||b.length>0)&&console.log("[SidebarBadge] Jobs summary:",{total:b.length,running:w.length,runningJobNames:w.map(k=>k.name)})}i(y)}catch(h){console.error("Failed to fetch sidebar badges:",h)}finally{s(!1)}},[]);x.useEffect(()=>{c()},[c]),x.useEffect(()=>{const h=setInterval(c,n);return()=>clearInterval(h)},[c,n]),x.useEffect(()=>{const h=()=>{console.log("[SidebarBadge] Tab focused, refreshing badges..."),c()};return window.addEventListener("focus",h),()=>window.removeEventListener("focus",h)},[c]);const f={badges:r,loading:o,refresh:c};return g.jsx(V0.Provider,{value:f,children:e})}function HR({children:e}){const[n]=x.useState(()=>new DR({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return g.jsx(LR,{client:n,children:g.jsx(PR,{defaultTheme:"system",storageKey:"coconut-ui-theme",children:g.jsx(IR,{children:g.jsx(UR,{children:e})})})})}const FR=1,qR=1e6;let eh=0;function VR(){return eh=(eh+1)%Number.MAX_SAFE_INTEGER,eh.toString()}const th=new Map,Ix=e=>{if(th.has(e))return;const n=setTimeout(()=>{th.delete(e),wo({type:"REMOVE_TOAST",toastId:e})},qR);th.set(e,n)},$R=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,FR)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===n.toast.id?{...r,...n.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=n;return r?Ix(r):e.toasts.forEach(i=>{Ix(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==n.toastId)}}},ju=[];let Du={toasts:[]};function wo(e){Du=$R(Du,e),ju.forEach(n=>{n(Du)})}function Uh({...e}){const n=VR(),r=o=>wo({type:"UPDATE_TOAST",toast:{...o,id:n}}),i=()=>wo({type:"DISMISS_TOAST",toastId:n});return wo({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:o=>{o||i()}}}),{id:n,dismiss:i,update:r}}function GR(){const[e,n]=x.useState(Du);return x.useEffect(()=>(ju.push(n),()=>{const r=ju.indexOf(n);r>-1&&ju.splice(r,1)}),[e]),{...e,toast:Uh,dismiss:r=>wo({type:"DISMISS_TOAST",toastId:r})}}function pe(e,n,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return n?.(o)}}function Bx(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function cc(...e){return n=>{let r=!1;const i=e.map(o=>{const s=Bx(o,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<i.length;o++){const s=i[o];typeof s=="function"?s():Bx(e[o],null)}}}}function Xe(...e){return x.useCallback(cc(...e),e)}function YR(e,n){const r=x.createContext(n),i=s=>{const{children:c,...f}=s,h=x.useMemo(()=>f,Object.values(f));return g.jsx(r.Provider,{value:h,children:c})};i.displayName=e+"Provider";function o(s){const c=x.useContext(r);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,o]}function Xn(e,n=[]){let r=[];function i(s,c){const f=x.createContext(c),h=r.length;r=[...r,c];const d=y=>{const{scope:b,children:w,...k}=y,C=b?.[e]?.[h]||f,T=x.useMemo(()=>k,Object.values(k));return g.jsx(C.Provider,{value:T,children:w})};d.displayName=s+"Provider";function m(y,b){const w=b?.[e]?.[h]||f,k=x.useContext(w);if(k)return k;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[d,m]}const o=()=>{const s=r.map(c=>x.createContext(c));return function(f){const h=f?.[e]||s;return x.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return o.scopeName=e,[i,KR(o,...n)]}function KR(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=i.reduce((f,{useScope:h,scopeName:d})=>{const y=h(s)[`__scope${d}`];return{...f,...y}},{});return x.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return r.scopeName=n.scopeName,r}function Wi(e){const n=XR(e),r=x.forwardRef((i,o)=>{const{children:s,...c}=i,f=x.Children.toArray(s),h=f.find(QR);if(h){const d=h.props.children,m=f.map(y=>y===h?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:y);return g.jsx(n,{...c,ref:o,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return g.jsx(n,{...c,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var ll=Wi("Slot");function XR(e){const n=x.forwardRef((r,i)=>{const{children:o,...s}=r;if(x.isValidElement(o)){const c=WR(o),f=ZR(s,o.props);return o.type!==x.Fragment&&(f.ref=i?cc(i,c):c),x.cloneElement(o,f)}return x.Children.count(o)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var $0=Symbol("radix.slottable");function G0(e){const n=({children:r})=>g.jsx(g.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=$0,n}function QR(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$0}function ZR(e,n){const r={...n};for(const i in n){const o=e[i],s=n[i];/^on[A-Z]/.test(i)?o&&s?r[i]=(...f)=>{const h=s(...f);return o(...f),h}:o&&(r[i]=o):i==="style"?r[i]={...o,...s}:i==="className"&&(r[i]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function WR(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Tp(e){const n=e+"CollectionProvider",[r,i]=Xn(n),[o,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:T,children:A}=C,_=fa.useRef(null),N=fa.useRef(new Map).current;return g.jsx(o,{scope:T,itemMap:N,collectionRef:_,children:A})};c.displayName=n;const f=e+"CollectionSlot",h=Wi(f),d=fa.forwardRef((C,T)=>{const{scope:A,children:_}=C,N=s(f,A),O=Xe(T,N.collectionRef);return g.jsx(h,{ref:O,children:_})});d.displayName=f;const m=e+"CollectionItemSlot",y="data-radix-collection-item",b=Wi(m),w=fa.forwardRef((C,T)=>{const{scope:A,children:_,...N}=C,O=fa.useRef(null),z=Xe(T,O),j=s(m,A);return fa.useEffect(()=>(j.itemMap.set(O,{ref:O,...N}),()=>void j.itemMap.delete(O))),g.jsx(b,{[y]:"",ref:z,children:_})});w.displayName=m;function k(C){const T=s(e+"CollectionConsumer",C);return fa.useCallback(()=>{const _=T.collectionRef.current;if(!_)return[];const N=Array.from(_.querySelectorAll(`[${y}]`));return Array.from(T.itemMap.values()).sort((j,$)=>N.indexOf(j.ref.current)-N.indexOf($.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:d,ItemSlot:w},k,i]}var JR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=JR.reduce((e,n)=>{const r=Wi(`Primitive.${n}`),i=x.forwardRef((o,s)=>{const{asChild:c,...f}=o,h=c?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...f,ref:s})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function Rp(e,n){e&&oc.flushSync(()=>e.dispatchEvent(n))}function kt(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>(...r)=>n.current?.(...r),[])}function e_(e,n=globalThis?.document){const r=kt(e);x.useEffect(()=>{const i=o=>{o.key==="Escape"&&r(o)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[r,n])}var t_="DismissableLayer",Hh="dismissableLayer.update",n_="dismissableLayer.pointerDownOutside",r_="dismissableLayer.focusOutside",Ux,Y0=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ho=x.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:f,...h}=e,d=x.useContext(Y0),[m,y]=x.useState(null),b=m?.ownerDocument??globalThis?.document,[,w]=x.useState({}),k=Xe(n,$=>y($)),C=Array.from(d.layers),[T]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),A=C.indexOf(T),_=m?C.indexOf(m):-1,N=d.layersWithOutsidePointerEventsDisabled.size>0,O=_>=A,z=i_($=>{const G=$.target,ee=[...d.branches].some(P=>P.contains(G));!O||ee||(o?.($),c?.($),$.defaultPrevented||f?.())},b),j=l_($=>{const G=$.target;[...d.branches].some(P=>P.contains(G))||(s?.($),c?.($),$.defaultPrevented||f?.())},b);return e_($=>{_===d.layers.size-1&&(i?.($),!$.defaultPrevented&&f&&($.preventDefault(),f()))},b),x.useEffect(()=>{if(m)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ux=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),Hx(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Ux)}},[m,b,r,d]),x.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),Hx())},[m,d]),x.useEffect(()=>{const $=()=>w({});return document.addEventListener(Hh,$),()=>document.removeEventListener(Hh,$)},[]),g.jsx(Fe.div,{...h,ref:k,style:{pointerEvents:N?O?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,j.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,z.onPointerDownCapture)})});Ho.displayName=t_;var a_="DismissableLayerBranch",K0=x.forwardRef((e,n)=>{const r=x.useContext(Y0),i=x.useRef(null),o=Xe(n,i);return x.useEffect(()=>{const s=i.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(Fe.div,{...e,ref:o})});K0.displayName=a_;function i_(e,n=globalThis?.document){const r=kt(e),i=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const s=f=>{if(f.target&&!i.current){let h=function(){X0(n_,r,d,{discrete:!0})};const d={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=h,n.addEventListener("click",o.current,{once:!0})):h()}else n.removeEventListener("click",o.current);i.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",s),n.removeEventListener("click",o.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function l_(e,n=globalThis?.document){const r=kt(e),i=x.useRef(!1);return x.useEffect(()=>{const o=s=>{s.target&&!i.current&&X0(r_,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Hx(){const e=new CustomEvent(Hh);document.dispatchEvent(e)}function X0(e,n,r,{discrete:i}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),i?Rp(o,s):o.dispatchEvent(s)}var o_=Ho,s_=K0,cr=globalThis?.document?x.useLayoutEffect:()=>{},u_="Portal",fc=x.forwardRef((e,n)=>{const{container:r,...i}=e,[o,s]=x.useState(!1);cr(()=>s(!0),[]);const c=r||o&&globalThis?.document?.body;return c?cR.createPortal(g.jsx(Fe.div,{...i,ref:n}),c):null});fc.displayName=u_;function c_(e,n){return x.useReducer((r,i)=>n[r][i]??r,e)}var Zt=e=>{const{present:n,children:r}=e,i=f_(n),o=typeof r=="function"?r({present:i.isPresent}):x.Children.only(r),s=Xe(i.ref,d_(o));return typeof r=="function"||i.isPresent?x.cloneElement(o,{ref:s}):null};Zt.displayName="Presence";function f_(e){const[n,r]=x.useState(),i=x.useRef(null),o=x.useRef(e),s=x.useRef("none"),c=e?"mounted":"unmounted",[f,h]=c_(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=yu(i.current);s.current=f==="mounted"?d:"none"},[f]),cr(()=>{const d=i.current,m=o.current;if(m!==e){const b=s.current,w=yu(d);e?h("MOUNT"):w==="none"||d?.display==="none"?h("UNMOUNT"):h(m&&b!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),cr(()=>{if(n){let d;const m=n.ownerDocument.defaultView??window,y=w=>{const C=yu(i.current).includes(CSS.escape(w.animationName));if(w.target===n&&C&&(h("ANIMATION_END"),!o.current)){const T=n.style.animationFillMode;n.style.animationFillMode="forwards",d=m.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=T)})}},b=w=>{w.target===n&&(s.current=yu(i.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{m.clearTimeout(d),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[n,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:x.useCallback(d=>{i.current=d?getComputedStyle(d):null,r(d)},[])}}function yu(e){return e?.animationName||"none"}function d_(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var h_=y0[" useInsertionEffect ".trim().toString()]||cr;function ol({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){const[o,s,c]=p_({defaultProp:n,onChange:r}),f=e!==void 0,h=f?e:o;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const y=m.current;y!==f&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${f?"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.`),m.current=f},[f,i])}const d=x.useCallback(m=>{if(f){const y=m_(m)?m(e):m;y!==e&&c.current?.(y)}else s(m)},[f,e,s,c]);return[h,d]}function p_({defaultProp:e,onChange:n}){const[r,i]=x.useState(e),o=x.useRef(r),s=x.useRef(n);return h_(()=>{s.current=n},[n]),x.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,i,s]}function m_(e){return typeof e=="function"}var g_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),y_="VisuallyHidden",dc=x.forwardRef((e,n)=>g.jsx(Fe.span,{...e,ref:n,style:{...g_,...e.style}}));dc.displayName=y_;var v_=dc,_p="ToastProvider",[Np,x_,b_]=Tp("Toast"),[Q0,xB]=Xn("Toast",[b_]),[w_,hc]=Q0(_p),Z0=e=>{const{__scopeToast:n,label:r="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:c}=e,[f,h]=x.useState(null),[d,m]=x.useState(0),y=x.useRef(!1),b=x.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${_p}\`. Expected non-empty \`string\`.`),g.jsx(Np.Provider,{scope:n,children:g.jsx(w_,{scope:n,label:r,duration:i,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:f,onViewportChange:h,onToastAdd:x.useCallback(()=>m(w=>w+1),[]),onToastRemove:x.useCallback(()=>m(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:b,children:c})})};Z0.displayName=_p;var W0="ToastViewport",S_=["F8"],Fh="toast.viewportPause",qh="toast.viewportResume",J0=x.forwardRef((e,n)=>{const{__scopeToast:r,hotkey:i=S_,label:o="Notifications ({hotkey})",...s}=e,c=hc(W0,r),f=x_(r),h=x.useRef(null),d=x.useRef(null),m=x.useRef(null),y=x.useRef(null),b=Xe(n,y,c.onViewportChange),w=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=c.toastCount>0;x.useEffect(()=>{const T=A=>{i.length!==0&&i.every(N=>A[N]||A.code===N)&&y.current?.focus()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[i]),x.useEffect(()=>{const T=h.current,A=y.current;if(k&&T&&A){const _=()=>{if(!c.isClosePausedRef.current){const j=new CustomEvent(Fh);A.dispatchEvent(j),c.isClosePausedRef.current=!0}},N=()=>{if(c.isClosePausedRef.current){const j=new CustomEvent(qh);A.dispatchEvent(j),c.isClosePausedRef.current=!1}},O=j=>{!T.contains(j.relatedTarget)&&N()},z=()=>{T.contains(document.activeElement)||N()};return T.addEventListener("focusin",_),T.addEventListener("focusout",O),T.addEventListener("pointermove",_),T.addEventListener("pointerleave",z),window.addEventListener("blur",_),window.addEventListener("focus",N),()=>{T.removeEventListener("focusin",_),T.removeEventListener("focusout",O),T.removeEventListener("pointermove",_),T.removeEventListener("pointerleave",z),window.removeEventListener("blur",_),window.removeEventListener("focus",N)}}},[k,c.isClosePausedRef]);const C=x.useCallback(({tabbingDirection:T})=>{const _=f().map(N=>{const O=N.ref.current,z=[O,...L_(O)];return T==="forwards"?z:z.reverse()});return(T==="forwards"?_.reverse():_).flat()},[f]);return x.useEffect(()=>{const T=y.current;if(T){const A=_=>{const N=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!N){const z=document.activeElement,j=_.shiftKey;if(_.target===T&&j){d.current?.focus();return}const ee=C({tabbingDirection:j?"backwards":"forwards"}),P=ee.findIndex(ne=>ne===z);nh(ee.slice(P+1))?_.preventDefault():j?d.current?.focus():m.current?.focus()}};return T.addEventListener("keydown",A),()=>T.removeEventListener("keydown",A)}},[f,C]),g.jsxs(s_,{ref:h,role:"region","aria-label":o.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&g.jsx(Vh,{ref:d,onFocusFromOutsideViewport:()=>{const T=C({tabbingDirection:"forwards"});nh(T)}}),g.jsx(Np.Slot,{scope:r,children:g.jsx(Fe.ol,{tabIndex:-1,...s,ref:b})}),k&&g.jsx(Vh,{ref:m,onFocusFromOutsideViewport:()=>{const T=C({tabbingDirection:"backwards"});nh(T)}})]})});J0.displayName=W0;var e1="ToastFocusProxy",Vh=x.forwardRef((e,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:i,...o}=e,s=hc(e1,r);return g.jsx(dc,{tabIndex:0,...o,ref:n,style:{position:"fixed"},onFocus:c=>{const f=c.relatedTarget;!s.viewport?.contains(f)&&i()}})});Vh.displayName=e1;var Fo="Toast",E_="toast.swipeStart",k_="toast.swipeMove",C_="toast.swipeCancel",A_="toast.swipeEnd",t1=x.forwardRef((e,n)=>{const{forceMount:r,open:i,defaultOpen:o,onOpenChange:s,...c}=e,[f,h]=ol({prop:i,defaultProp:o??!0,onChange:s,caller:Fo});return g.jsx(Zt,{present:r||f,children:g.jsx(__,{open:f,...c,ref:n,onClose:()=>h(!1),onPause:kt(e.onPause),onResume:kt(e.onResume),onSwipeStart:pe(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:pe(e.onSwipeMove,d=>{const{x:m,y}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:pe(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:pe(e.onSwipeEnd,d=>{const{x:m,y}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),h(!1)})})})});t1.displayName=Fo;var[T_,R_]=Q0(Fo,{onClose(){}}),__=x.forwardRef((e,n)=>{const{__scopeToast:r,type:i="foreground",duration:o,open:s,onClose:c,onEscapeKeyDown:f,onPause:h,onResume:d,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:b,onSwipeEnd:w,...k}=e,C=hc(Fo,r),[T,A]=x.useState(null),_=Xe(n,H=>A(H)),N=x.useRef(null),O=x.useRef(null),z=o||C.duration,j=x.useRef(0),$=x.useRef(z),G=x.useRef(0),{onToastAdd:ee,onToastRemove:P}=C,ne=kt(()=>{T?.contains(document.activeElement)&&C.viewport?.focus(),c()}),ae=x.useCallback(H=>{!H||H===1/0||(window.clearTimeout(G.current),j.current=new Date().getTime(),G.current=window.setTimeout(ne,H))},[ne]);x.useEffect(()=>{const H=C.viewport;if(H){const Q=()=>{ae($.current),d?.()},L=()=>{const K=new Date().getTime()-j.current;$.current=$.current-K,window.clearTimeout(G.current),h?.()};return H.addEventListener(Fh,L),H.addEventListener(qh,Q),()=>{H.removeEventListener(Fh,L),H.removeEventListener(qh,Q)}}},[C.viewport,z,h,d,ae]),x.useEffect(()=>{s&&!C.isClosePausedRef.current&&ae(z)},[s,z,C.isClosePausedRef,ae]),x.useEffect(()=>(ee(),()=>P()),[ee,P]);const le=x.useMemo(()=>T?s1(T):null,[T]);return C.viewport?g.jsxs(g.Fragment,{children:[le&&g.jsx(N_,{__scopeToast:r,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:le}),g.jsx(T_,{scope:r,onClose:ne,children:oc.createPortal(g.jsx(Np.ItemSlot,{scope:r,children:g.jsx(o_,{asChild:!0,onEscapeKeyDown:pe(f,()=>{C.isFocusedToastEscapeKeyDownRef.current||ne(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(Fe.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":C.swipeDirection,...k,ref:_,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:pe(e.onKeyDown,H=>{H.key==="Escape"&&(f?.(H.nativeEvent),H.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:pe(e.onPointerDown,H=>{H.button===0&&(N.current={x:H.clientX,y:H.clientY})}),onPointerMove:pe(e.onPointerMove,H=>{if(!N.current)return;const Q=H.clientX-N.current.x,L=H.clientY-N.current.y,K=!!O.current,U=["left","right"].includes(C.swipeDirection),J=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,E=U?J(0,Q):0,Z=U?0:J(0,L),oe=H.pointerType==="touch"?10:2,M={x:E,y:Z},se={originalEvent:H,delta:M};K?(O.current=M,vu(k_,y,se,{discrete:!1})):Fx(M,C.swipeDirection,oe)?(O.current=M,vu(E_,m,se,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(Q)>oe||Math.abs(L)>oe)&&(N.current=null)}),onPointerUp:pe(e.onPointerUp,H=>{const Q=O.current,L=H.target;if(L.hasPointerCapture(H.pointerId)&&L.releasePointerCapture(H.pointerId),O.current=null,N.current=null,Q){const K=H.currentTarget,U={originalEvent:H,delta:Q};Fx(Q,C.swipeDirection,C.swipeThreshold)?vu(A_,w,U,{discrete:!0}):vu(C_,b,U,{discrete:!0}),K.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),N_=e=>{const{__scopeToast:n,children:r,...i}=e,o=hc(Fo,n),[s,c]=x.useState(!1),[f,h]=x.useState(!1);return D_(()=>c(!0)),x.useEffect(()=>{const d=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(d)},[]),f?null:g.jsx(fc,{asChild:!0,children:g.jsx(dc,{...i,children:s&&g.jsxs(g.Fragment,{children:[o.label," ",r]})})})},M_="ToastTitle",n1=x.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(Fe.div,{...i,ref:n})});n1.displayName=M_;var j_="ToastDescription",r1=x.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(Fe.div,{...i,ref:n})});r1.displayName=j_;var a1="ToastAction",i1=x.forwardRef((e,n)=>{const{altText:r,...i}=e;return r.trim()?g.jsx(o1,{altText:r,asChild:!0,children:g.jsx(Mp,{...i,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${a1}\`. Expected non-empty \`string\`.`),null)});i1.displayName=a1;var l1="ToastClose",Mp=x.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e,o=R_(l1,r);return g.jsx(o1,{asChild:!0,children:g.jsx(Fe.button,{type:"button",...i,ref:n,onClick:pe(e.onClick,o.onClose)})})});Mp.displayName=l1;var o1=x.forwardRef((e,n)=>{const{__scopeToast:r,altText:i,...o}=e;return g.jsx(Fe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...o,ref:n})});function s1(e){const n=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&n.push(i.textContent),O_(i)){const o=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const c=i.dataset.radixToastAnnounceAlt;c&&n.push(c)}else n.push(...s1(i))}}),n}function vu(e,n,r,{discrete:i}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),i?Rp(o,s):o.dispatchEvent(s)}var Fx=(e,n,r=0)=>{const i=Math.abs(e.x),o=Math.abs(e.y),s=i>o;return n==="left"||n==="right"?s&&i>r:!s&&o>r};function D_(e=()=>{}){const n=kt(e);cr(()=>{let r=0,i=0;return r=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(i)}},[n])}function O_(e){return e.nodeType===e.ELEMENT_NODE}function L_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function nh(e){const n=document.activeElement;return e.some(r=>r===n?!0:(r.focus(),document.activeElement!==n))}var z_=Z0,u1=J0,c1=t1,f1=n1,d1=r1,h1=i1,p1=Mp;function m1(e){var n,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(r=m1(e[n]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function g1(){for(var e,n,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(n=m1(e))&&(i&&(i+=" "),i+=n);return i}const qx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vx=g1,pc=(e,n)=>r=>{var i;if(n?.variants==null)return Vx(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=n,c=Object.keys(o).map(d=>{const m=r?.[d],y=s?.[d];if(m===null)return null;const b=qx(m)||qx(y);return o[d][b]}),f=r&&Object.entries(r).reduce((d,m)=>{let[y,b]=m;return b===void 0||(d[y]=b),d},{}),h=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((d,m)=>{let{class:y,className:b,...w}=m;return Object.entries(w).every(k=>{let[C,T]=k;return Array.isArray(T)?T.includes({...s,...f}[C]):{...s,...f}[C]===T})?[...d,y,b]:d},[]);return Vx(e,c,h,r?.class,r?.className)};/**
|
|
61
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=bn(),w;if(n){let _=typeof n=="string"?rl(n):n;ct(m==="/"||_.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),w=_}else w=b;let k=w.pathname||"/",C=k;if(m!=="/"){let _=m.replace(/^\//,"").split("/");C="/"+k.replace(/^\//,"").split("/").slice(_.length).join("/")}let T=x0(e,{pathname:C});On(y||T!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),On(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=bT(T&&T.map(_=>Object.assign({},_,{params:Object.assign({},h,_.params),pathname:Dr([m,s.encodeLocation?s.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Dr([m,s.encodeLocation?s.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),c,r,i,o);return n&&A?x.createElement(Io.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},A):A}function gT(){let e=CT(),n=oT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:s},"ErrorBoundary")," or"," ",x.createElement("code",{style:s},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},n),r?x.createElement("pre",{style:o},r):null,c)}var yT=x.createElement(gT,null),vT=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.unstable_onError?this.props.unstable_onError(e,n):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?x.createElement(Ln.Provider,{value:this.props.routeContext},x.createElement(bp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xT({routeContext:e,match:n,children:r}){let i=x.useContext(al);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ln.Provider,{value:e},r)}function bT(e,n=[],r=null,i=null,o=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,c=r?.errors;if(c!=null){let d=s.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);ct(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let f=!1,h=-1;if(r)for(let d=0;d<s.length;d++){let m=s[d];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=d),m.route.id){let{loaderData:y,errors:b}=r,w=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||w){f=!0,h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}return s.reduceRight((d,m,y)=>{let b,w=!1,k=null,C=null;r&&(b=c&&m.route.id?c[m.route.id]:void 0,k=m.route.errorElement||yT,f&&(h<0&&y===0?(T0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):h===y&&(w=!0,C=m.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,y+1)),A=()=>{let _;return b?_=k:w?_=C:m.route.Component?_=x.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=d,x.createElement(xT,{match:m,routeContext:{outlet:d,matches:T,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?x.createElement(vT,{location:r.location,revalidation:r.revalidation,component:k,error:b,children:A(),routeContext:{outlet:null,matches:T,isDataRoute:!0},unstable_onError:i}):A()},null)}function wp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wT(e){let n=x.useContext(al);return ct(n,wp(e)),n}function ST(e){let n=x.useContext(ic);return ct(n,wp(e)),n}function ET(e){let n=x.useContext(Ln);return ct(n,wp(e)),n}function Sp(e){let n=ET(e),r=n.matches[n.matches.length-1];return ct(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function kT(){return Sp("useRouteId")}function CT(){let e=x.useContext(bp),n=ST("useRouteError"),r=Sp("useRouteError");return e!==void 0?e:n.errors?.[r]}function AT(){let{router:e}=wT("useNavigate"),n=Sp("useNavigate"),r=x.useRef(!1);return C0(()=>{r.current=!0}),x.useCallback(async(o,s={})=>{On(r.current,k0),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:n,...s}))},[e,n])}var Nx={};function T0(e,n,r){!n&&!Nx[e]&&(Nx[e]=!0,On(!1,r))}x.memo(TT);function TT({routes:e,future:n,state:r,unstable_onError:i}){return A0(e,void 0,r,i,n)}function RT({to:e,replace:n,state:r,relative:i}){ct(il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=x.useContext(Kn);On(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=x.useContext(Ln),{pathname:c}=bn(),f=Bo(),h=xp(e,vp(s),c,i==="path"),d=JSON.stringify(h);return x.useEffect(()=>{f(JSON.parse(d),{replace:n,state:r,relative:i})},[f,d,i,n,r]),null}function R0(e){return pT(e.context)}function je(e){ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _T({basename:e="/",children:n=null,location:r,navigationType:i="POP",navigator:o,static:s=!1}){ct(!il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=x.useMemo(()=>({basename:c,navigator:o,static:s,future:{}}),[c,o,s]);typeof r=="string"&&(r=rl(r));let{pathname:h="/",search:d="",hash:m="",state:y=null,key:b="default"}=r,w=x.useMemo(()=>{let k=Or(h,c);return k==null?null:{location:{pathname:k,search:d,hash:m,state:y,key:b},navigationType:i}},[c,h,d,m,y,b,i]);return On(w!=null,`<Router basename="${c}"> is not able to match the URL "${h}${d}${m}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:x.createElement(Kn.Provider,{value:f},x.createElement(Io.Provider,{children:n,value:w}))}function NT({children:e,location:n}){return mT(zh(e),n)}function zh(e,n=[]){let r=[];return x.Children.forEach(e,(i,o)=>{if(!x.isValidElement(i))return;let s=[...n,o];if(i.type===x.Fragment){r.push.apply(r,zh(i.props.children,s));return}ct(i.type===je,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ct(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=zh(i.props.children,s)),r.push(c)}),r}var Nu="get",Mu="application/x-www-form-urlencoded";function lc(e){return e!=null&&typeof e.tagName=="string"}function MT(e){return lc(e)&&e.tagName.toLowerCase()==="button"}function jT(e){return lc(e)&&e.tagName.toLowerCase()==="form"}function DT(e){return lc(e)&&e.tagName.toLowerCase()==="input"}function OT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LT(e,n){return e.button===0&&(!n||n==="_self")&&!OT(e)}function Ph(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let i=e[r];return n.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function zT(e,n){let r=Ph(e);return n&&n.forEach((i,o)=>{r.has(o)||n.getAll(o).forEach(s=>{r.append(o,s)})}),r}var mu=null;function PT(){if(mu===null)try{new FormData(document.createElement("form"),0),mu=!1}catch{mu=!0}return mu}var IT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jd(e){return e!=null&&!IT.has(e)?(On(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mu}"`),null):e}function BT(e,n){let r,i,o,s,c;if(jT(e)){let f=e.getAttribute("action");i=f?Or(f,n):null,r=e.getAttribute("method")||Nu,o=Jd(e.getAttribute("enctype"))||Mu,s=new FormData(e)}else if(MT(e)||DT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(i=h?Or(h,n):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||Nu,o=Jd(e.getAttribute("formenctype"))||Jd(f.getAttribute("enctype"))||Mu,s=new FormData(f,e),!PT()){let{name:d,type:m,value:y}=e;if(m==="image"){let b=d?`${d}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else d&&s.append(d,y)}}else{if(lc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Nu,i=null,o=Mu,c=e}return s&&o==="text/plain"&&(c=s,s=void 0),{action:i,method:r.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ep(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function UT(e,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${r}`:n&&Or(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function HT(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function FT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function qT(e,n,r){let i=await Promise.all(e.map(async o=>{let s=n.routes[o.route.id];if(s){let c=await HT(s,r);return c.links?c.links():[]}return[]}));return YT(i.flat(1).filter(FT).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Mx(e,n,r,i,o,s){let c=(h,d)=>r[d]?h.route.id!==r[d].route.id:!0,f=(h,d)=>r[d].pathname!==h.pathname||r[d].route.path?.endsWith("*")&&r[d].params["*"]!==h.params["*"];return s==="assets"?n.filter((h,d)=>c(h,d)||f(h,d)):s==="data"?n.filter((h,d)=>{let m=i.routes[h.route.id];if(!m||!m.hasLoader)return!1;if(c(h,d)||f(h,d))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function VT(e,n,{includeHydrateFallback:r}={}){return $T(e.map(i=>{let o=n.routes[i.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function $T(e){return[...new Set(e)]}function GT(e){let n={},r=Object.keys(e).sort();for(let i of r)n[i]=e[i];return n}function YT(e,n){let r=new Set;return new Set(n),e.reduce((i,o)=>{let s=JSON.stringify(GT(o));return r.has(s)||(r.add(s),i.push({key:s,link:o})),i},[])}function _0(){let e=x.useContext(al);return Ep(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function KT(){let e=x.useContext(ic);return Ep(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var kp=x.createContext(void 0);kp.displayName="FrameworkContext";function N0(){let e=x.useContext(kp);return Ep(e,"You must render this element inside a <HydratedRouter> element"),e}function XT(e,n){let r=x.useContext(kp),[i,o]=x.useState(!1),[s,c]=x.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:d,onMouseLeave:m,onTouchStart:y}=n,b=x.useRef(null);x.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=A=>{A.forEach(_=>{c(_.isIntersecting)})},T=new IntersectionObserver(C,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[e]),x.useEffect(()=>{if(i){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[i]);let w=()=>{o(!0)},k=()=>{o(!1),c(!1)};return r?e!=="intent"?[s,b,{}]:[s,b,{onFocus:co(f,w),onBlur:co(h,k),onMouseEnter:co(d,w),onMouseLeave:co(m,k),onTouchStart:co(y,w)}]:[!1,b,{}]}function co(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function QT({page:e,...n}){let{router:r}=_0(),i=x.useMemo(()=>x0(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?x.createElement(WT,{page:e,matches:i,...n}):null}function ZT(e){let{manifest:n,routeModules:r}=N0(),[i,o]=x.useState([]);return x.useEffect(()=>{let s=!1;return qT(e,n,r).then(c=>{s||o(c)}),()=>{s=!0}},[e,n,r]),i}function WT({page:e,matches:n,...r}){let i=bn(),{manifest:o,routeModules:s}=N0(),{basename:c}=_0(),{loaderData:f,matches:h}=KT(),d=x.useMemo(()=>Mx(e,n,h,o,i,"data"),[e,n,h,o,i]),m=x.useMemo(()=>Mx(e,n,h,o,i,"assets"),[e,n,h,o,i]),y=x.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let k=new Set,C=!1;if(n.forEach(A=>{let _=o.routes[A.route.id];!_||!_.hasLoader||(!d.some(N=>N.route.id===A.route.id)&&A.route.id in f&&s[A.route.id]?.shouldRevalidate||_.hasClientLoader?C=!0:k.add(A.route.id))}),k.size===0)return[];let T=UT(e,c,"data");return C&&k.size>0&&T.searchParams.set("_routes",n.filter(A=>k.has(A.route.id)).map(A=>A.route.id).join(",")),[T.pathname+T.search]},[c,f,i,o,d,n,e,s]),b=x.useMemo(()=>VT(m,o),[m,o]),w=ZT(m);return x.createElement(x.Fragment,null,y.map(k=>x.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...r})),b.map(k=>x.createElement("link",{key:k,rel:"modulepreload",href:k,...r})),w.map(({key:k,link:C})=>x.createElement("link",{key:k,nonce:r.nonce,...C})))}function JT(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var M0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{M0&&(window.__reactRouterVersion="7.8.2")}catch{}function eR({basename:e,children:n,window:r}){let i=x.useRef();i.current==null&&(i.current=IA({window:r,v5Compat:!0}));let o=i.current,[s,c]=x.useState({action:o.action,location:o.location}),f=x.useCallback(h=>{x.startTransition(()=>c(h))},[c]);return x.useLayoutEffect(()=>o.listen(f),[o,f]),x.createElement(_T,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:o})}var j0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lr=x.forwardRef(function({onClick:n,discover:r="render",prefetch:i="none",relative:o,reloadDocument:s,replace:c,state:f,target:h,to:d,preventScrollReset:m,viewTransition:y,...b},w){let{basename:k}=x.useContext(Kn),C=typeof d=="string"&&j0.test(d),T,A=!1;if(typeof d=="string"&&C&&(T=d,M0))try{let ee=new URL(window.location.href),P=d.startsWith("//")?new URL(ee.protocol+d):new URL(d),ne=Or(P.pathname,k);P.origin===ee.origin&&ne!=null?d=ne+P.search+P.hash:A=!0}catch{On(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=fT(d,{relative:o}),[N,O,z]=XT(i,b),j=aR(d,{replace:c,state:f,target:h,preventScrollReset:m,relative:o,viewTransition:y});function $(ee){n&&n(ee),ee.defaultPrevented||j(ee)}let G=x.createElement("a",{...b,...z,href:T||_,onClick:A||s?n:$,ref:JT(w,O),target:h,"data-discover":!C&&r==="render"?"true":void 0});return N&&!C?x.createElement(x.Fragment,null,G,x.createElement(QT,{page:_})):G});lr.displayName="Link";var tR=x.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:i="",end:o=!1,style:s,to:c,viewTransition:f,children:h,...d},m){let y=Uo(c,{relative:d.relative}),b=bn(),w=x.useContext(ic),{navigator:k,basename:C}=x.useContext(Kn),T=w!=null&&uR(y)&&f===!0,A=k.encodeLocation?k.encodeLocation(y).pathname:y.pathname,_=b.pathname,N=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(_=_.toLowerCase(),N=N?N.toLowerCase():null,A=A.toLowerCase()),N&&C&&(N=Or(N,C)||N);const O=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let z=_===A||!o&&_.startsWith(A)&&_.charAt(O)==="/",j=N!=null&&(N===A||!o&&N.startsWith(A)&&N.charAt(A.length)==="/"),$={isActive:z,isPending:j,isTransitioning:T},G=z?n:void 0,ee;typeof i=="function"?ee=i($):ee=[i,z?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let P=typeof s=="function"?s($):s;return x.createElement(lr,{...d,"aria-current":G,className:ee,ref:m,style:P,to:c,viewTransition:f},typeof h=="function"?h($):h)});tR.displayName="NavLink";var nR=x.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:o,state:s,method:c=Nu,action:f,onSubmit:h,relative:d,preventScrollReset:m,viewTransition:y,...b},w)=>{let k=oR(),C=sR(f,{relative:d}),T=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&j0.test(f),_=N=>{if(h&&h(N),N.defaultPrevented)return;N.preventDefault();let O=N.nativeEvent.submitter,z=O?.getAttribute("formmethod")||c;k(O||N.currentTarget,{fetcherKey:n,method:z,navigate:r,replace:o,state:s,relative:d,preventScrollReset:m,viewTransition:y})};return x.createElement("form",{ref:w,method:T,action:C,onSubmit:i?h:_,...b,"data-discover":!A&&e==="render"?"true":void 0})});nR.displayName="Form";function rR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function D0(e){let n=x.useContext(al);return ct(n,rR(e)),n}function aR(e,{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:c}={}){let f=Bo(),h=bn(),d=Uo(e,{relative:s});return x.useCallback(m=>{if(LT(m,n)){m.preventDefault();let y=r!==void 0?r:Ao(h)===Ao(d);f(e,{replace:y,state:i,preventScrollReset:o,relative:s,viewTransition:c})}},[h,f,d,r,i,n,e,o,s,c])}function vB(e){On(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=x.useRef(Ph(e)),r=x.useRef(!1),i=bn(),o=x.useMemo(()=>zT(i.search,r.current?null:n.current),[i.search]),s=Bo(),c=x.useCallback((f,h)=>{const d=Ph(typeof f=="function"?f(new URLSearchParams(o)):f);r.current=!0,s("?"+d,h)},[s,o]);return[o,c]}var iR=0,lR=()=>`__${String(++iR)}__`;function oR(){let{router:e}=D0("useSubmit"),{basename:n}=x.useContext(Kn),r=kT();return x.useCallback(async(i,o={})=>{let{action:s,method:c,encType:f,formData:h,body:d}=BT(i,n);if(o.navigate===!1){let m=o.fetcherKey||lR();await e.fetch(m,r,o.action||s,{preventScrollReset:o.preventScrollReset,formData:h,body:d,formMethod:o.method||c,formEncType:o.encType||f,flushSync:o.flushSync})}else await e.navigate(o.action||s,{preventScrollReset:o.preventScrollReset,formData:h,body:d,formMethod:o.method||c,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,n,r])}function sR(e,{relative:n}={}){let{basename:r}=x.useContext(Kn),i=x.useContext(Ln);ct(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),s={...Uo(e||".",{relative:n})},c=bn();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search),h=f.getAll("index");if(h.some(m=>m==="")){f.delete("index"),h.filter(y=>y).forEach(y=>f.append("index",y));let m=f.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Dr([r,s.pathname])),Ao(s)}function uR(e,{relative:n}={}){let r=x.useContext(E0);ct(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=D0("useViewTransitionState"),o=Uo(e,{relative:n});if(!r.isTransitioning)return!1;let s=Or(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Or(r.nextLocation.pathname,i)||r.nextLocation.pathname;return Fu(o.pathname,c)!=null||Fu(o.pathname,s)!=null}var oc=v0();const cR=ac(oc);var sc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},uc=typeof window>"u"||"Deno"in globalThis;function Vn(){}function fR(e,n){return typeof e=="function"?e(n):e}function dR(e){return typeof e=="number"&&e>=0&&e!==1/0}function hR(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Ih(e,n){return typeof e=="function"?e(n):e}function pR(e,n){return typeof e=="function"?e(n):e}function jx(e,n){const{type:r="all",exact:i,fetchStatus:o,predicate:s,queryKey:c,stale:f}=e;if(c){if(i){if(n.queryHash!==Cp(c,n.options))return!1}else if(!Ro(n.queryKey,c))return!1}if(r!=="all"){const h=n.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||o&&o!==n.state.fetchStatus||s&&!s(n))}function Dx(e,n){const{exact:r,status:i,predicate:o,mutationKey:s}=e;if(s){if(!n.options.mutationKey)return!1;if(r){if(To(n.options.mutationKey)!==To(s))return!1}else if(!Ro(n.options.mutationKey,s))return!1}return!(i&&n.state.status!==i||o&&!o(n))}function Cp(e,n){return(n?.queryKeyHashFn||To)(e)}function To(e){return JSON.stringify(e,(n,r)=>Bh(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function Ro(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Ro(e[r],n[r])):!1}function O0(e,n){if(e===n)return e;const r=Ox(e)&&Ox(n);if(r||Bh(e)&&Bh(n)){const i=r?e:Object.keys(e),o=i.length,s=r?n:Object.keys(n),c=s.length,f=r?[]:{},h=new Set(i);let d=0;for(let m=0;m<c;m++){const y=r?m:s[m];(!r&&h.has(y)||r)&&e[y]===void 0&&n[y]===void 0?(f[y]=void 0,d++):(f[y]=O0(e[y],n[y]),f[y]===e[y]&&e[y]!==void 0&&d++)}return o===c&&d===o?e:f}return n}function Ox(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bh(e){if(!Lx(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!Lx(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lx(e){return Object.prototype.toString.call(e)==="[object Object]"}function mR(e){return new Promise(n=>{setTimeout(n,e)})}function gR(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?O0(e,n):n}function yR(e,n,r=0){const i=[...e,n];return r&&i.length>r?i.slice(1):i}function vR(e,n,r=0){const i=[n,...e];return r&&i.length>r?i.slice(0,-1):i}var Ap=Symbol();function L0(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Ap?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var xR=class extends sc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!uc&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},z0=new xR,bR=class extends sc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!uc&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},qu=new bR;function wR(){let e,n;const r=new Promise((o,s)=>{e=o,n=s});r.status="pending",r.catch(()=>{});function i(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},r.reject=o=>{i({status:"rejected",reason:o}),n(o)},r}function SR(e){return Math.min(1e3*2**e,3e4)}function P0(e){return(e??"online")==="online"?qu.isOnline():!0}var I0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function B0(e){let n=!1,r=0,i;const o=wR(),s=()=>o.status!=="pending",c=C=>{s()||(b(new I0(C)),e.abort?.())},f=()=>{n=!0},h=()=>{n=!1},d=()=>z0.isFocused()&&(e.networkMode==="always"||qu.isOnline())&&e.canRun(),m=()=>P0(e.networkMode)&&e.canRun(),y=C=>{s()||(i?.(),o.resolve(C))},b=C=>{s()||(i?.(),o.reject(C))},w=()=>new Promise(C=>{i=T=>{(s()||d())&&C(T)},e.onPause?.()}).then(()=>{i=void 0,s()||e.onContinue?.()}),k=()=>{if(s())return;let C;const T=r===0?e.initialPromise:void 0;try{C=T??e.fn()}catch(A){C=Promise.reject(A)}Promise.resolve(C).then(y).catch(A=>{if(s())return;const _=e.retry??(uc?0:3),N=e.retryDelay??SR,O=typeof N=="function"?N(r,A):N,z=_===!0||typeof _=="number"&&r<_||typeof _=="function"&&_(r,A);if(n||!z){b(A);return}r++,e.onFail?.(r,A),mR(O).then(()=>d()?void 0:w()).then(()=>{n?b(A):k()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(i?.(),o),cancelRetry:f,continueRetry:h,canStart:m,start:()=>(m()?k():w().then(k),o)}}var ER=e=>setTimeout(e,0);function kR(){let e=[],n=0,r=f=>{f()},i=f=>{f()},o=ER;const s=f=>{n?e.push(f):o(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&o(()=>{i(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;n++;try{h=f()}finally{n--,n||c()}return h},batchCalls:f=>(...h)=>{s(()=>{f(...h)})},schedule:s,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{o=f}}}var Xt=kR(),U0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dR(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uc?1/0:300*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},CR=class extends U0{#e;#t;#n;#a;#r;#l;#o;constructor(e){super(),this.#o=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=TR(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=gR(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#i({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(Vn).catch(Vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>pR(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ap||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ih(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!hR(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},o=()=>{const f=L0(this.options,n),d=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#o=!1,this.options.persister?this.options.persister(f,d,this):f(d)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=B0({initialPromise:n?.initialPromise,fn:c.fetchFn,abort:r.abort.bind(r),onFail:(f,h)=>{this.#i({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof I0){if(f.silent)return this.#r.promise;if(f.revert){if(this.setState({...this.#t,fetchStatus:"idle"}),this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...AR(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Xt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function AR(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function TR(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var RR=class extends sc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const i=n.queryKey,o=n.queryHash??Cp(i,n);let s=this.get(o);return s||(s=new CR({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Xt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>jx(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>jx(e,r)):n}notify(e){Xt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Xt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Xt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_R=class extends U0{#e;#t;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||NR(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#a({type:"continue"})};this.#n=B0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#a({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#n.canStart();try{if(r)n();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#t.config.onMutate?.(e,this);const s=await this.options.onMutate?.(e);s!==this.state.context&&this.#a({type:"pending",context:s,variables:e,isPaused:i})}const o=await this.#n.start();return await this.#t.config.onSuccess?.(o,e,this.state.context,this),await this.options.onSuccess?.(o,e,this.state.context),await this.#t.config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,e,this.state.context),this.#a({type:"success",data:o}),o}catch(o){try{throw await this.#t.config.onError?.(o,e,this.state.context,this),await this.options.onError?.(o,e,this.state.context),await this.#t.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,o,e,this.state.context),o}finally{this.#a({type:"error",error:o})}}finally{this.#t.runNext(this)}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Xt.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function NR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MR=class extends sc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const i=new _R({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);const n=gu(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=gu(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=gu(e);if(typeof n=="string"){const i=this.#t.get(n)?.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=gu(e);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Xt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Dx(n,r))}findAll(e={}){return this.getAll().filter(n=>Dx(e,n))}notify(e){Xt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Xt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Vn))))}};function gu(e){return e.options.scope?.id}function zx(e){return{onFetch:(n,r)=>{const i=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,s=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const d=async()=>{let m=!1;const y=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(n.signal.aborted?m=!0:n.signal.addEventListener("abort",()=>{m=!0}),n.signal)})},b=L0(n.options,n.fetchOptions),w=async(k,C,T)=>{if(m)return Promise.reject();if(C==null&&k.pages.length)return Promise.resolve(k);const _=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:C,direction:T?"backward":"forward",meta:n.options.meta};return y(j),j})(),N=await b(_),{maxPages:O}=n.options,z=T?vR:yR;return{pages:z(k.pages,N,O),pageParams:z(k.pageParams,C,O)}};if(o&&s.length){const k=o==="backward",C=k?jR:Px,T={pages:s,pageParams:c},A=C(i,T);f=await w(T,A,k)}else{const k=e??s.length;do{const C=h===0?c[0]??i.initialPageParam:Px(i,f);if(h>0&&C==null)break;f=await w(f,C),h++}while(h<k)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(d,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=d}}}function Px(e,{pages:n,pageParams:r}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function jR(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var DR=class{#e;#t;#n;#a;#r;#l;#o;#i;constructor(e={}){this.#e=e.queryCache||new RR,this.#t=e.mutationCache||new MR,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#o=z0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=qu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#l--,this.#l===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ih(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(e,n,r){const i=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(i.queryHash)?.state.data,c=fR(n,s);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,n,r){return Xt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Xt.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return Xt.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},i=Xt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(i).then(Vn).catch(Vn)}invalidateQueries(e,n={}){return Xt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=Xt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,r);return r.throwOnError||(s=s.catch(Vn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(Vn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Ih(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vn).catch(Vn)}fetchInfiniteQuery(e){return e.behavior=zx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vn).catch(Vn)}ensureInfiniteQueryData(e){return e.behavior=zx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#a.set(To(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(i=>{Ro(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(To(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(i=>{Ro(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Cp(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ap&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},OR=x.createContext(void 0),LR=({client:e,children:n})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(OR.Provider,{value:e,children:n}));const zR={theme:"system",setTheme:()=>null},H0=x.createContext(zR);function PR({children:e,defaultTheme:n="system",storageKey:r="ui-theme",...i}){const[o,s]=x.useState(n);x.useEffect(()=>{const f=localStorage?.getItem(r);f&&s(f)},[r]),x.useEffect(()=>{const f=window.document.documentElement;if(f.classList.remove("light","dark","coconut"),o==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";f.classList.add(h);return}f.classList.add(o)},[o]);const c={theme:o,setTheme:f=>{localStorage?.setItem(r,f),s(f)}};return g.jsx(H0.Provider,{...i,value:c,children:e})}const xB=()=>{const e=x.useContext(H0);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},xt="",bB="https://app.coconut.dev";async function Bi(e,n={}){const r=`${xt}${e}`,i={headers:{"Content-Type":"application/json",...n.headers},...n},o=await fetch(r,i);if(!o.ok)throw new Error(`API request failed: ${o.status} ${o.statusText}`);return o.json()}const wB=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,F0=x.createContext(void 0);function IR({children:e}){const[n,r]=x.useState({user:null,isAuthenticated:!1,isLoading:!0,authEnabled:!1}),i=x.useCallback(async()=>{try{const h=await Bi("/api/v1/auth/status");if(!h.success){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}if(!(h.data?.enabled||!1)){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}try{const m=await Bi("/api/v1/auth/me");m.success&&m.data?.user?r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0}):r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}catch{r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}}catch(h){console.error("Failed to check auth status:",h),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1})}},[]);x.useEffect(()=>{i()},[i]);const o=x.useCallback(async(h,d)=>{const m=await Bi("/api/v1/auth/login",{method:"POST",body:JSON.stringify({email:h,password:d})});if(!m.success)throw new Error(m.error||"Login failed");r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),s=x.useCallback(async(h,d,m)=>{const y=await Bi("/api/v1/auth/register",{method:"POST",body:JSON.stringify({email:h,password:d,name:m})});if(!y.success)throw new Error(y.error||"Registration failed");r({user:y.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),c=x.useCallback(async()=>{await Bi("/api/v1/auth/logout",{method:"POST"}),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})},[]),f=x.useCallback(async()=>{try{const h=await Bi("/api/v1/auth/me");h.success&&h.data?.user&&r(d=>({...d,user:h.data.user,isAuthenticated:!0}))}catch(h){console.error("Failed to refresh user:",h)}},[]);return g.jsx(F0.Provider,{value:{...n,login:o,register:s,logout:c,refreshUser:f,checkAuthStatus:i},children:e})}function q0(){const e=x.useContext(F0);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const V0=x.createContext(null);function BR(){const e=x.useContext(V0);if(!e)throw new Error("useSidebarBadges must be used within SidebarBadgeProvider");return e}function UR({children:e,pollInterval:n=1e4}){const[r,i]=x.useState({codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0}),[o,s]=x.useState(!0),c=x.useCallback(async()=>{try{const[h,d,m]=await Promise.allSettled([fetch(`${xt}/api/v1/terminal/sessions`).then(b=>b.json()),fetch(`${xt}/api/v1/git/status`).then(b=>b.json()),fetch(`${xt}/api/v1/jobs`).then(b=>b.json())]),y={codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0};if(h.status==="fulfilled"&&h.value?.sessions){const b=h.value.sessions;y.codeSessions=b.filter(w=>w.taskId?.startsWith("cp-")||w.taskId?.startsWith("sk-")).length,y.terminalSessions=b.filter(w=>!w.taskId?.startsWith("cp-")&&!w.taskId?.startsWith("sk-")).length}if(d.status==="fulfilled"&&d.value?.success&&d.value?.data?.changes&&(y.gitChanges=d.value.data.changes.length),m.status==="fulfilled"&&m.value?.success&&m.value?.data){const b=Array.isArray(m.value.data)?m.value.data:[],w=b.filter(k=>{if(!k.runs||!Array.isArray(k.runs)||k.runs.length===0)return!1;const C=k.runs[0],T=C&&C.status==="running";return T&&console.log("[SidebarBadge] Running job detected:",{name:k.name,status:C.status,startedAt:C.startedAt,finishedAt:C.finishedAt}),T});y.runningScheduledJobs=w.length,(w.length>0||b.length>0)&&console.log("[SidebarBadge] Jobs summary:",{total:b.length,running:w.length,runningJobNames:w.map(k=>k.name)})}i(y)}catch(h){console.error("Failed to fetch sidebar badges:",h)}finally{s(!1)}},[]);x.useEffect(()=>{c()},[c]),x.useEffect(()=>{const h=setInterval(c,n);return()=>clearInterval(h)},[c,n]),x.useEffect(()=>{const h=()=>{console.log("[SidebarBadge] Tab focused, refreshing badges..."),c()};return window.addEventListener("focus",h),()=>window.removeEventListener("focus",h)},[c]);const f={badges:r,loading:o,refresh:c};return g.jsx(V0.Provider,{value:f,children:e})}function HR({children:e}){const[n]=x.useState(()=>new DR({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return g.jsx(LR,{client:n,children:g.jsx(PR,{defaultTheme:"system",storageKey:"coconut-ui-theme",children:g.jsx(IR,{children:g.jsx(UR,{children:e})})})})}const FR=1,qR=1e6;let eh=0;function VR(){return eh=(eh+1)%Number.MAX_SAFE_INTEGER,eh.toString()}const th=new Map,Ix=e=>{if(th.has(e))return;const n=setTimeout(()=>{th.delete(e),wo({type:"REMOVE_TOAST",toastId:e})},qR);th.set(e,n)},$R=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,FR)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===n.toast.id?{...r,...n.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=n;return r?Ix(r):e.toasts.forEach(i=>{Ix(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==n.toastId)}}},ju=[];let Du={toasts:[]};function wo(e){Du=$R(Du,e),ju.forEach(n=>{n(Du)})}function Uh({...e}){const n=VR(),r=o=>wo({type:"UPDATE_TOAST",toast:{...o,id:n}}),i=()=>wo({type:"DISMISS_TOAST",toastId:n});return wo({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:o=>{o||i()}}}),{id:n,dismiss:i,update:r}}function GR(){const[e,n]=x.useState(Du);return x.useEffect(()=>(ju.push(n),()=>{const r=ju.indexOf(n);r>-1&&ju.splice(r,1)}),[e]),{...e,toast:Uh,dismiss:r=>wo({type:"DISMISS_TOAST",toastId:r})}}function pe(e,n,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return n?.(o)}}function Bx(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function cc(...e){return n=>{let r=!1;const i=e.map(o=>{const s=Bx(o,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<i.length;o++){const s=i[o];typeof s=="function"?s():Bx(e[o],null)}}}}function Xe(...e){return x.useCallback(cc(...e),e)}function YR(e,n){const r=x.createContext(n),i=s=>{const{children:c,...f}=s,h=x.useMemo(()=>f,Object.values(f));return g.jsx(r.Provider,{value:h,children:c})};i.displayName=e+"Provider";function o(s){const c=x.useContext(r);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,o]}function Xn(e,n=[]){let r=[];function i(s,c){const f=x.createContext(c),h=r.length;r=[...r,c];const d=y=>{const{scope:b,children:w,...k}=y,C=b?.[e]?.[h]||f,T=x.useMemo(()=>k,Object.values(k));return g.jsx(C.Provider,{value:T,children:w})};d.displayName=s+"Provider";function m(y,b){const w=b?.[e]?.[h]||f,k=x.useContext(w);if(k)return k;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[d,m]}const o=()=>{const s=r.map(c=>x.createContext(c));return function(f){const h=f?.[e]||s;return x.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return o.scopeName=e,[i,KR(o,...n)]}function KR(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=i.reduce((f,{useScope:h,scopeName:d})=>{const y=h(s)[`__scope${d}`];return{...f,...y}},{});return x.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return r.scopeName=n.scopeName,r}function Wi(e){const n=XR(e),r=x.forwardRef((i,o)=>{const{children:s,...c}=i,f=x.Children.toArray(s),h=f.find(QR);if(h){const d=h.props.children,m=f.map(y=>y===h?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:y);return g.jsx(n,{...c,ref:o,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return g.jsx(n,{...c,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var ll=Wi("Slot");function XR(e){const n=x.forwardRef((r,i)=>{const{children:o,...s}=r;if(x.isValidElement(o)){const c=WR(o),f=ZR(s,o.props);return o.type!==x.Fragment&&(f.ref=i?cc(i,c):c),x.cloneElement(o,f)}return x.Children.count(o)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var $0=Symbol("radix.slottable");function G0(e){const n=({children:r})=>g.jsx(g.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=$0,n}function QR(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$0}function ZR(e,n){const r={...n};for(const i in n){const o=e[i],s=n[i];/^on[A-Z]/.test(i)?o&&s?r[i]=(...f)=>{const h=s(...f);return o(...f),h}:o&&(r[i]=o):i==="style"?r[i]={...o,...s}:i==="className"&&(r[i]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function WR(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Tp(e){const n=e+"CollectionProvider",[r,i]=Xn(n),[o,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:T,children:A}=C,_=fa.useRef(null),N=fa.useRef(new Map).current;return g.jsx(o,{scope:T,itemMap:N,collectionRef:_,children:A})};c.displayName=n;const f=e+"CollectionSlot",h=Wi(f),d=fa.forwardRef((C,T)=>{const{scope:A,children:_}=C,N=s(f,A),O=Xe(T,N.collectionRef);return g.jsx(h,{ref:O,children:_})});d.displayName=f;const m=e+"CollectionItemSlot",y="data-radix-collection-item",b=Wi(m),w=fa.forwardRef((C,T)=>{const{scope:A,children:_,...N}=C,O=fa.useRef(null),z=Xe(T,O),j=s(m,A);return fa.useEffect(()=>(j.itemMap.set(O,{ref:O,...N}),()=>void j.itemMap.delete(O))),g.jsx(b,{[y]:"",ref:z,children:_})});w.displayName=m;function k(C){const T=s(e+"CollectionConsumer",C);return fa.useCallback(()=>{const _=T.collectionRef.current;if(!_)return[];const N=Array.from(_.querySelectorAll(`[${y}]`));return Array.from(T.itemMap.values()).sort((j,$)=>N.indexOf(j.ref.current)-N.indexOf($.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:d,ItemSlot:w},k,i]}var JR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=JR.reduce((e,n)=>{const r=Wi(`Primitive.${n}`),i=x.forwardRef((o,s)=>{const{asChild:c,...f}=o,h=c?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...f,ref:s})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function Rp(e,n){e&&oc.flushSync(()=>e.dispatchEvent(n))}function kt(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>(...r)=>n.current?.(...r),[])}function e_(e,n=globalThis?.document){const r=kt(e);x.useEffect(()=>{const i=o=>{o.key==="Escape"&&r(o)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[r,n])}var t_="DismissableLayer",Hh="dismissableLayer.update",n_="dismissableLayer.pointerDownOutside",r_="dismissableLayer.focusOutside",Ux,Y0=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ho=x.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:f,...h}=e,d=x.useContext(Y0),[m,y]=x.useState(null),b=m?.ownerDocument??globalThis?.document,[,w]=x.useState({}),k=Xe(n,$=>y($)),C=Array.from(d.layers),[T]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),A=C.indexOf(T),_=m?C.indexOf(m):-1,N=d.layersWithOutsidePointerEventsDisabled.size>0,O=_>=A,z=i_($=>{const G=$.target,ee=[...d.branches].some(P=>P.contains(G));!O||ee||(o?.($),c?.($),$.defaultPrevented||f?.())},b),j=l_($=>{const G=$.target;[...d.branches].some(P=>P.contains(G))||(s?.($),c?.($),$.defaultPrevented||f?.())},b);return e_($=>{_===d.layers.size-1&&(i?.($),!$.defaultPrevented&&f&&($.preventDefault(),f()))},b),x.useEffect(()=>{if(m)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ux=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),Hx(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Ux)}},[m,b,r,d]),x.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),Hx())},[m,d]),x.useEffect(()=>{const $=()=>w({});return document.addEventListener(Hh,$),()=>document.removeEventListener(Hh,$)},[]),g.jsx(Fe.div,{...h,ref:k,style:{pointerEvents:N?O?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,j.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,z.onPointerDownCapture)})});Ho.displayName=t_;var a_="DismissableLayerBranch",K0=x.forwardRef((e,n)=>{const r=x.useContext(Y0),i=x.useRef(null),o=Xe(n,i);return x.useEffect(()=>{const s=i.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(Fe.div,{...e,ref:o})});K0.displayName=a_;function i_(e,n=globalThis?.document){const r=kt(e),i=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const s=f=>{if(f.target&&!i.current){let h=function(){X0(n_,r,d,{discrete:!0})};const d={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=h,n.addEventListener("click",o.current,{once:!0})):h()}else n.removeEventListener("click",o.current);i.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",s),n.removeEventListener("click",o.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function l_(e,n=globalThis?.document){const r=kt(e),i=x.useRef(!1);return x.useEffect(()=>{const o=s=>{s.target&&!i.current&&X0(r_,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Hx(){const e=new CustomEvent(Hh);document.dispatchEvent(e)}function X0(e,n,r,{discrete:i}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),i?Rp(o,s):o.dispatchEvent(s)}var o_=Ho,s_=K0,cr=globalThis?.document?x.useLayoutEffect:()=>{},u_="Portal",fc=x.forwardRef((e,n)=>{const{container:r,...i}=e,[o,s]=x.useState(!1);cr(()=>s(!0),[]);const c=r||o&&globalThis?.document?.body;return c?cR.createPortal(g.jsx(Fe.div,{...i,ref:n}),c):null});fc.displayName=u_;function c_(e,n){return x.useReducer((r,i)=>n[r][i]??r,e)}var Zt=e=>{const{present:n,children:r}=e,i=f_(n),o=typeof r=="function"?r({present:i.isPresent}):x.Children.only(r),s=Xe(i.ref,d_(o));return typeof r=="function"||i.isPresent?x.cloneElement(o,{ref:s}):null};Zt.displayName="Presence";function f_(e){const[n,r]=x.useState(),i=x.useRef(null),o=x.useRef(e),s=x.useRef("none"),c=e?"mounted":"unmounted",[f,h]=c_(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=yu(i.current);s.current=f==="mounted"?d:"none"},[f]),cr(()=>{const d=i.current,m=o.current;if(m!==e){const b=s.current,w=yu(d);e?h("MOUNT"):w==="none"||d?.display==="none"?h("UNMOUNT"):h(m&&b!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),cr(()=>{if(n){let d;const m=n.ownerDocument.defaultView??window,y=w=>{const C=yu(i.current).includes(CSS.escape(w.animationName));if(w.target===n&&C&&(h("ANIMATION_END"),!o.current)){const T=n.style.animationFillMode;n.style.animationFillMode="forwards",d=m.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=T)})}},b=w=>{w.target===n&&(s.current=yu(i.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{m.clearTimeout(d),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[n,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:x.useCallback(d=>{i.current=d?getComputedStyle(d):null,r(d)},[])}}function yu(e){return e?.animationName||"none"}function d_(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var h_=y0[" useInsertionEffect ".trim().toString()]||cr;function ol({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){const[o,s,c]=p_({defaultProp:n,onChange:r}),f=e!==void 0,h=f?e:o;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const y=m.current;y!==f&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${f?"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.`),m.current=f},[f,i])}const d=x.useCallback(m=>{if(f){const y=m_(m)?m(e):m;y!==e&&c.current?.(y)}else s(m)},[f,e,s,c]);return[h,d]}function p_({defaultProp:e,onChange:n}){const[r,i]=x.useState(e),o=x.useRef(r),s=x.useRef(n);return h_(()=>{s.current=n},[n]),x.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,i,s]}function m_(e){return typeof e=="function"}var g_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),y_="VisuallyHidden",dc=x.forwardRef((e,n)=>g.jsx(Fe.span,{...e,ref:n,style:{...g_,...e.style}}));dc.displayName=y_;var v_=dc,_p="ToastProvider",[Np,x_,b_]=Tp("Toast"),[Q0,SB]=Xn("Toast",[b_]),[w_,hc]=Q0(_p),Z0=e=>{const{__scopeToast:n,label:r="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:c}=e,[f,h]=x.useState(null),[d,m]=x.useState(0),y=x.useRef(!1),b=x.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${_p}\`. Expected non-empty \`string\`.`),g.jsx(Np.Provider,{scope:n,children:g.jsx(w_,{scope:n,label:r,duration:i,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:f,onViewportChange:h,onToastAdd:x.useCallback(()=>m(w=>w+1),[]),onToastRemove:x.useCallback(()=>m(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:b,children:c})})};Z0.displayName=_p;var W0="ToastViewport",S_=["F8"],Fh="toast.viewportPause",qh="toast.viewportResume",J0=x.forwardRef((e,n)=>{const{__scopeToast:r,hotkey:i=S_,label:o="Notifications ({hotkey})",...s}=e,c=hc(W0,r),f=x_(r),h=x.useRef(null),d=x.useRef(null),m=x.useRef(null),y=x.useRef(null),b=Xe(n,y,c.onViewportChange),w=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=c.toastCount>0;x.useEffect(()=>{const T=A=>{i.length!==0&&i.every(N=>A[N]||A.code===N)&&y.current?.focus()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[i]),x.useEffect(()=>{const T=h.current,A=y.current;if(k&&T&&A){const _=()=>{if(!c.isClosePausedRef.current){const j=new CustomEvent(Fh);A.dispatchEvent(j),c.isClosePausedRef.current=!0}},N=()=>{if(c.isClosePausedRef.current){const j=new CustomEvent(qh);A.dispatchEvent(j),c.isClosePausedRef.current=!1}},O=j=>{!T.contains(j.relatedTarget)&&N()},z=()=>{T.contains(document.activeElement)||N()};return T.addEventListener("focusin",_),T.addEventListener("focusout",O),T.addEventListener("pointermove",_),T.addEventListener("pointerleave",z),window.addEventListener("blur",_),window.addEventListener("focus",N),()=>{T.removeEventListener("focusin",_),T.removeEventListener("focusout",O),T.removeEventListener("pointermove",_),T.removeEventListener("pointerleave",z),window.removeEventListener("blur",_),window.removeEventListener("focus",N)}}},[k,c.isClosePausedRef]);const C=x.useCallback(({tabbingDirection:T})=>{const _=f().map(N=>{const O=N.ref.current,z=[O,...L_(O)];return T==="forwards"?z:z.reverse()});return(T==="forwards"?_.reverse():_).flat()},[f]);return x.useEffect(()=>{const T=y.current;if(T){const A=_=>{const N=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!N){const z=document.activeElement,j=_.shiftKey;if(_.target===T&&j){d.current?.focus();return}const ee=C({tabbingDirection:j?"backwards":"forwards"}),P=ee.findIndex(ne=>ne===z);nh(ee.slice(P+1))?_.preventDefault():j?d.current?.focus():m.current?.focus()}};return T.addEventListener("keydown",A),()=>T.removeEventListener("keydown",A)}},[f,C]),g.jsxs(s_,{ref:h,role:"region","aria-label":o.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&g.jsx(Vh,{ref:d,onFocusFromOutsideViewport:()=>{const T=C({tabbingDirection:"forwards"});nh(T)}}),g.jsx(Np.Slot,{scope:r,children:g.jsx(Fe.ol,{tabIndex:-1,...s,ref:b})}),k&&g.jsx(Vh,{ref:m,onFocusFromOutsideViewport:()=>{const T=C({tabbingDirection:"backwards"});nh(T)}})]})});J0.displayName=W0;var e1="ToastFocusProxy",Vh=x.forwardRef((e,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:i,...o}=e,s=hc(e1,r);return g.jsx(dc,{tabIndex:0,...o,ref:n,style:{position:"fixed"},onFocus:c=>{const f=c.relatedTarget;!s.viewport?.contains(f)&&i()}})});Vh.displayName=e1;var Fo="Toast",E_="toast.swipeStart",k_="toast.swipeMove",C_="toast.swipeCancel",A_="toast.swipeEnd",t1=x.forwardRef((e,n)=>{const{forceMount:r,open:i,defaultOpen:o,onOpenChange:s,...c}=e,[f,h]=ol({prop:i,defaultProp:o??!0,onChange:s,caller:Fo});return g.jsx(Zt,{present:r||f,children:g.jsx(__,{open:f,...c,ref:n,onClose:()=>h(!1),onPause:kt(e.onPause),onResume:kt(e.onResume),onSwipeStart:pe(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:pe(e.onSwipeMove,d=>{const{x:m,y}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:pe(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:pe(e.onSwipeEnd,d=>{const{x:m,y}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),h(!1)})})})});t1.displayName=Fo;var[T_,R_]=Q0(Fo,{onClose(){}}),__=x.forwardRef((e,n)=>{const{__scopeToast:r,type:i="foreground",duration:o,open:s,onClose:c,onEscapeKeyDown:f,onPause:h,onResume:d,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:b,onSwipeEnd:w,...k}=e,C=hc(Fo,r),[T,A]=x.useState(null),_=Xe(n,H=>A(H)),N=x.useRef(null),O=x.useRef(null),z=o||C.duration,j=x.useRef(0),$=x.useRef(z),G=x.useRef(0),{onToastAdd:ee,onToastRemove:P}=C,ne=kt(()=>{T?.contains(document.activeElement)&&C.viewport?.focus(),c()}),ae=x.useCallback(H=>{!H||H===1/0||(window.clearTimeout(G.current),j.current=new Date().getTime(),G.current=window.setTimeout(ne,H))},[ne]);x.useEffect(()=>{const H=C.viewport;if(H){const Q=()=>{ae($.current),d?.()},L=()=>{const K=new Date().getTime()-j.current;$.current=$.current-K,window.clearTimeout(G.current),h?.()};return H.addEventListener(Fh,L),H.addEventListener(qh,Q),()=>{H.removeEventListener(Fh,L),H.removeEventListener(qh,Q)}}},[C.viewport,z,h,d,ae]),x.useEffect(()=>{s&&!C.isClosePausedRef.current&&ae(z)},[s,z,C.isClosePausedRef,ae]),x.useEffect(()=>(ee(),()=>P()),[ee,P]);const le=x.useMemo(()=>T?s1(T):null,[T]);return C.viewport?g.jsxs(g.Fragment,{children:[le&&g.jsx(N_,{__scopeToast:r,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:le}),g.jsx(T_,{scope:r,onClose:ne,children:oc.createPortal(g.jsx(Np.ItemSlot,{scope:r,children:g.jsx(o_,{asChild:!0,onEscapeKeyDown:pe(f,()=>{C.isFocusedToastEscapeKeyDownRef.current||ne(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(Fe.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":C.swipeDirection,...k,ref:_,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:pe(e.onKeyDown,H=>{H.key==="Escape"&&(f?.(H.nativeEvent),H.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:pe(e.onPointerDown,H=>{H.button===0&&(N.current={x:H.clientX,y:H.clientY})}),onPointerMove:pe(e.onPointerMove,H=>{if(!N.current)return;const Q=H.clientX-N.current.x,L=H.clientY-N.current.y,K=!!O.current,U=["left","right"].includes(C.swipeDirection),J=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,E=U?J(0,Q):0,Z=U?0:J(0,L),oe=H.pointerType==="touch"?10:2,M={x:E,y:Z},se={originalEvent:H,delta:M};K?(O.current=M,vu(k_,y,se,{discrete:!1})):Fx(M,C.swipeDirection,oe)?(O.current=M,vu(E_,m,se,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(Q)>oe||Math.abs(L)>oe)&&(N.current=null)}),onPointerUp:pe(e.onPointerUp,H=>{const Q=O.current,L=H.target;if(L.hasPointerCapture(H.pointerId)&&L.releasePointerCapture(H.pointerId),O.current=null,N.current=null,Q){const K=H.currentTarget,U={originalEvent:H,delta:Q};Fx(Q,C.swipeDirection,C.swipeThreshold)?vu(A_,w,U,{discrete:!0}):vu(C_,b,U,{discrete:!0}),K.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),N_=e=>{const{__scopeToast:n,children:r,...i}=e,o=hc(Fo,n),[s,c]=x.useState(!1),[f,h]=x.useState(!1);return D_(()=>c(!0)),x.useEffect(()=>{const d=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(d)},[]),f?null:g.jsx(fc,{asChild:!0,children:g.jsx(dc,{...i,children:s&&g.jsxs(g.Fragment,{children:[o.label," ",r]})})})},M_="ToastTitle",n1=x.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(Fe.div,{...i,ref:n})});n1.displayName=M_;var j_="ToastDescription",r1=x.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(Fe.div,{...i,ref:n})});r1.displayName=j_;var a1="ToastAction",i1=x.forwardRef((e,n)=>{const{altText:r,...i}=e;return r.trim()?g.jsx(o1,{altText:r,asChild:!0,children:g.jsx(Mp,{...i,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${a1}\`. Expected non-empty \`string\`.`),null)});i1.displayName=a1;var l1="ToastClose",Mp=x.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e,o=R_(l1,r);return g.jsx(o1,{asChild:!0,children:g.jsx(Fe.button,{type:"button",...i,ref:n,onClick:pe(e.onClick,o.onClose)})})});Mp.displayName=l1;var o1=x.forwardRef((e,n)=>{const{__scopeToast:r,altText:i,...o}=e;return g.jsx(Fe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...o,ref:n})});function s1(e){const n=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&n.push(i.textContent),O_(i)){const o=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const c=i.dataset.radixToastAnnounceAlt;c&&n.push(c)}else n.push(...s1(i))}}),n}function vu(e,n,r,{discrete:i}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),i?Rp(o,s):o.dispatchEvent(s)}var Fx=(e,n,r=0)=>{const i=Math.abs(e.x),o=Math.abs(e.y),s=i>o;return n==="left"||n==="right"?s&&i>r:!s&&o>r};function D_(e=()=>{}){const n=kt(e);cr(()=>{let r=0,i=0;return r=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(i)}},[n])}function O_(e){return e.nodeType===e.ELEMENT_NODE}function L_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function nh(e){const n=document.activeElement;return e.some(r=>r===n?!0:(r.focus(),document.activeElement!==n))}var z_=Z0,u1=J0,c1=t1,f1=n1,d1=r1,h1=i1,p1=Mp;function m1(e){var n,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(r=m1(e[n]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function g1(){for(var e,n,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(n=m1(e))&&(i&&(i+=" "),i+=n);return i}const qx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vx=g1,pc=(e,n)=>r=>{var i;if(n?.variants==null)return Vx(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=n,c=Object.keys(o).map(d=>{const m=r?.[d],y=s?.[d];if(m===null)return null;const b=qx(m)||qx(y);return o[d][b]}),f=r&&Object.entries(r).reduce((d,m)=>{let[y,b]=m;return b===void 0||(d[y]=b),d},{}),h=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((d,m)=>{let{class:y,className:b,...w}=m;return Object.entries(w).every(k=>{let[C,T]=k;return Array.isArray(T)?T.includes({...s,...f}[C]):{...s,...f}[C]===T})?[...d,y,b]:d},[]);return Vx(e,c,h,r?.class,r?.className)};/**
|
|
62
62
|
* @license lucide-react v0.542.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
@@ -88,243 +88,248 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const V_=[["path",{d:"
|
|
91
|
+
*/const V_=[["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"}]],$_=Ne("bell",V_);/**
|
|
92
92
|
* @license lucide-react v0.542.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const G_=[["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"}]],So=Ne("bot",G_);/**
|
|
97
97
|
* @license lucide-react v0.542.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Y_=[["path",{d:"
|
|
101
|
+
*/const Y_=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],K_=Ne("brain",Y_);/**
|
|
102
102
|
* @license lucide-react v0.542.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const X_=[["path",{d:"
|
|
106
|
+
*/const X_=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Q_=Ne("calendar-clock",X_);/**
|
|
107
107
|
* @license lucide-react v0.542.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const Z_=[["path",{d:"
|
|
111
|
+
*/const Z_=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],W_=Ne("calendar",Z_);/**
|
|
112
112
|
* @license lucide-react v0.542.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const J_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jp=Ne("check",J_);/**
|
|
117
117
|
* @license lucide-react v0.542.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const eN=[["path",{d:"
|
|
121
|
+
*/const eN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tN=Ne("chevron-down",eN);/**
|
|
122
122
|
* @license lucide-react v0.542.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const nN=[["
|
|
126
|
+
*/const nN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],rN=Ne("chevron-right",nN);/**
|
|
127
127
|
* @license lucide-react v0.542.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const aN=[["
|
|
131
|
+
*/const aN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iN=Ne("circle",aN);/**
|
|
132
132
|
* @license lucide-react v0.542.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const lN=[["
|
|
136
|
+
*/const lN=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],oN=Ne("code",lN);/**
|
|
137
137
|
* @license lucide-react v0.542.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const sN=[["
|
|
141
|
+
*/const sN=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],uN=Ne("copy",sN);/**
|
|
142
142
|
* @license lucide-react v0.542.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const cN=[["path",{d:"
|
|
146
|
+
*/const cN=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],fN=Ne("expand",cN);/**
|
|
147
147
|
* @license lucide-react v0.542.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const dN=[["path",{d:"
|
|
151
|
+
*/const dN=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]],hN=Ne("file-plus-2",dN);/**
|
|
152
152
|
* @license lucide-react v0.542.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const pN=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Vu=Ne("file-text",pN);/**
|
|
157
157
|
* @license lucide-react v0.542.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const mN=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Gx=Ne("file",mN);/**
|
|
162
162
|
* @license lucide-react v0.542.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const gN=[["path",{d:"
|
|
166
|
+
*/const gN=[["path",{d:"M15 2a2 2 0 0 1 1.414.586l4 4A2 2 0 0 1 21 8v7a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",key:"1vo8kb"}],["path",{d:"M15 2v4a2 2 0 0 0 2 2h4",key:"sud9ri"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],yN=Ne("files",gN);/**
|
|
167
167
|
* @license lucide-react v0.542.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const vN=[["path",{d:"
|
|
171
|
+
*/const vN=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],xN=Ne("folder-open",vN);/**
|
|
172
172
|
* @license lucide-react v0.542.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const bN=[["path",{d:"M20
|
|
176
|
+
*/const bN=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],wN=Ne("folder-tree",bN);/**
|
|
177
177
|
* @license lucide-react v0.542.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const SN=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ou=Ne("folder",SN);/**
|
|
182
182
|
* @license lucide-react v0.542.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const EN=[["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"}]],v1=Ne("git-branch",EN);/**
|
|
187
187
|
* @license lucide-react v0.542.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const kN=[["path",{d:"
|
|
191
|
+
*/const kN=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],CN=Ne("history",kN);/**
|
|
192
192
|
* @license lucide-react v0.542.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const AN=[["path",{d:"
|
|
196
|
+
*/const AN=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],TN=Ne("house",AN);/**
|
|
197
197
|
* @license lucide-react v0.542.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const RN=[["path",{d:"
|
|
201
|
+
*/const RN=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]],_N=Ne("id-card",RN);/**
|
|
202
202
|
* @license lucide-react v0.542.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const NN=[["path",{d:"
|
|
206
|
+
*/const NN=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],MN=Ne("key",NN);/**
|
|
207
207
|
* @license lucide-react v0.542.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const jN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$u=Ne("loader-circle",jN);/**
|
|
212
212
|
* @license lucide-react v0.542.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const DN=[["path",{d:"
|
|
216
|
+
*/const DN=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ON=Ne("log-out",DN);/**
|
|
217
217
|
* @license lucide-react v0.542.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const LN=[["path",{d:"
|
|
221
|
+
*/const LN=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],zN=Ne("menu",LN);/**
|
|
222
222
|
* @license lucide-react v0.542.0 - ISC
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the ISC license.
|
|
225
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const
|
|
226
|
+
*/const PN=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],rh=Ne("message-circle",PN);/**
|
|
227
227
|
* @license lucide-react v0.542.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const IN=[["
|
|
231
|
+
*/const IN=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],BN=Ne("network",IN);/**
|
|
232
232
|
* @license lucide-react v0.542.0 - ISC
|
|
233
233
|
*
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
235
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const UN=[["rect",{width:"
|
|
236
|
+
*/const UN=[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]],HN=Ne("notebook",UN);/**
|
|
237
237
|
* @license lucide-react v0.542.0 - ISC
|
|
238
238
|
*
|
|
239
239
|
* This source code is licensed under the ISC license.
|
|
240
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const FN=[["
|
|
241
|
+
*/const FN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],qN=Ne("panel-left",FN);/**
|
|
242
242
|
* @license lucide-react v0.542.0 - ISC
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the ISC license.
|
|
245
245
|
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const VN=[["path",{d:"
|
|
246
|
+
*/const VN=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],$N=Ne("plug",VN);/**
|
|
247
247
|
* @license lucide-react v0.542.0 - ISC
|
|
248
248
|
*
|
|
249
249
|
* This source code is licensed under the ISC license.
|
|
250
250
|
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const GN=[["path",{d:"
|
|
251
|
+
*/const GN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],YN=Ne("plus",GN);/**
|
|
252
252
|
* @license lucide-react v0.542.0 - ISC
|
|
253
253
|
*
|
|
254
254
|
* This source code is licensed under the ISC license.
|
|
255
255
|
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const KN=[["path",{d:"
|
|
256
|
+
*/const KN=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],XN=Ne("save",KN);/**
|
|
257
257
|
* @license lucide-react v0.542.0 - ISC
|
|
258
258
|
*
|
|
259
259
|
* This source code is licensed under the ISC license.
|
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const QN=[["
|
|
261
|
+
*/const QN=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ZN=Ne("send",QN);/**
|
|
262
262
|
* @license lucide-react v0.542.0 - ISC
|
|
263
263
|
*
|
|
264
264
|
* This source code is licensed under the ISC license.
|
|
265
265
|
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const WN=[["
|
|
266
|
+
*/const WN=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],JN=Ne("server",WN);/**
|
|
267
267
|
* @license lucide-react v0.542.0 - ISC
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the ISC license.
|
|
270
270
|
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const eM=[["path",{d:"
|
|
271
|
+
*/const eM=[["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"}]],tM=Ne("settings",eM);/**
|
|
272
272
|
* @license lucide-react v0.542.0 - ISC
|
|
273
273
|
*
|
|
274
274
|
* This source code is licensed under the ISC license.
|
|
275
275
|
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const nM=[["
|
|
276
|
+
*/const nM=[["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"}]],rM=Ne("shield",nM);/**
|
|
277
277
|
* @license lucide-react v0.542.0 - ISC
|
|
278
278
|
*
|
|
279
279
|
* This source code is licensed under the ISC license.
|
|
280
280
|
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const aM=[["
|
|
281
|
+
*/const aM=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],iM=Ne("sliders-horizontal",aM);/**
|
|
282
282
|
* @license lucide-react v0.542.0 - ISC
|
|
283
283
|
*
|
|
284
284
|
* This source code is licensed under the ISC license.
|
|
285
285
|
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const
|
|
286
|
+
*/const lM=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Lu=Ne("sparkles",lM);/**
|
|
287
287
|
* @license lucide-react v0.542.0 - ISC
|
|
288
288
|
*
|
|
289
289
|
* This source code is licensed under the ISC license.
|
|
290
290
|
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const oM=[["
|
|
291
|
+
*/const oM=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],sM=Ne("square-pen",oM);/**
|
|
292
292
|
* @license lucide-react v0.542.0 - ISC
|
|
293
293
|
*
|
|
294
294
|
* This source code is licensed under the ISC license.
|
|
295
295
|
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const uM=[["
|
|
296
|
+
*/const uM=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],cM=Ne("square",uM);/**
|
|
297
297
|
* @license lucide-react v0.542.0 - ISC
|
|
298
298
|
*
|
|
299
299
|
* This source code is licensed under the ISC license.
|
|
300
300
|
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
-
*/const fM=[["path",{d:"
|
|
301
|
+
*/const fM=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],dM=Ne("terminal",fM);/**
|
|
302
302
|
* @license lucide-react v0.542.0 - ISC
|
|
303
303
|
*
|
|
304
304
|
* This source code is licensed under the ISC license.
|
|
305
305
|
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/const hM=[["path",{d:"
|
|
306
|
+
*/const hM=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],pM=Ne("trash-2",hM);/**
|
|
307
307
|
* @license lucide-react v0.542.0 - ISC
|
|
308
308
|
*
|
|
309
309
|
* This source code is licensed under the ISC license.
|
|
310
310
|
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
-
*/const mM=[["path",{d:"
|
|
311
|
+
*/const mM=[["path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4",key:"foxbe7"}],["path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3",key:"18arnh"}],["path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35",key:"ywahnh"}],["path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14",key:"ft0feo"}]],gM=Ne("tree-palm",mM);/**
|
|
312
312
|
* @license lucide-react v0.542.0 - ISC
|
|
313
313
|
*
|
|
314
314
|
* This source code is licensed under the ISC license.
|
|
315
315
|
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
-
*/const yM=[["path",{d:"
|
|
316
|
+
*/const yM=[["path",{d:"M11.5 15H7a4 4 0 0 0-4 4v2",key:"15lzij"}],["path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1817ys"}],["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}]],vM=Ne("user-pen",yM);/**
|
|
317
317
|
* @license lucide-react v0.542.0 - ISC
|
|
318
318
|
*
|
|
319
319
|
* This source code is licensed under the ISC license.
|
|
320
320
|
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
-
*/const xM=[["path",{d:"
|
|
321
|
+
*/const xM=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],bM=Ne("user",xM);/**
|
|
322
322
|
* @license lucide-react v0.542.0 - ISC
|
|
323
323
|
*
|
|
324
324
|
* This source code is licensed under the ISC license.
|
|
325
325
|
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/const wM=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yi=Ne("x",wM),Dp="-",SM=e=>{const n=kM(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{const f=c.split(Dp);return f[0]===""&&f.length!==1&&f.shift(),x1(f,n)||EM(c)},getConflictingClassGroupIds:(c,f)=>{const h=r[c]||[];return f&&i[c]?[...h,...i[c]]:h}}},x1=(e,n)=>{if(e.length===0)return n.classGroupId;const r=e[0],i=n.nextPart.get(r),o=i?x1(e.slice(1),i):void 0;if(o)return o;if(n.validators.length===0)return;const s=e.join(Dp);return n.validators.find(({validator:c})=>c(s))?.classGroupId},Yx=/^\[(.+)\]$/,EM=e=>{if(Yx.test(e)){const n=Yx.exec(e)[1],r=n?.substring(0,n.indexOf(":"));if(r)return"arbitrary.."+r}},kM=e=>{const{theme:n,classGroups:r}=e,i={nextPart:new Map,validators:[]};for(const o in r)$h(r[o],i,o,n);return i},$h=(e,n,r,i)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?n:Kx(n,o);s.classGroupId=r;return}if(typeof o=="function"){if(CM(o)){$h(o(i),n,r,i);return}n.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,c])=>{$h(c,Kx(n,s),r,i)})})},Kx=(e,n)=>{let r=e;return n.split(Dp).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},CM=e=>e.isThemeGetter,AM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=new Map,i=new Map;const o=(s,c)=>{r.set(s,c),n++,n>e&&(n=0,i=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=i.get(s))!==void 0)return o(s,c),c},set(s,c){r.has(s)?r.set(s,c):o(s,c)}}},Gh="!",Yh=":",TM=Yh.length,RM=e=>{const{prefix:n,experimentalParseClassName:r}=e;let i=o=>{const s=[];let c=0,f=0,h=0,d;for(let k=0;k<o.length;k++){let C=o[k];if(c===0&&f===0){if(C===Yh){s.push(o.slice(h,k)),h=k+TM;continue}if(C==="/"){d=k;continue}}C==="["?c++:C==="]"?c--:C==="("?f++:C===")"&&f--}const m=s.length===0?o:o.substring(h),y=_M(m),b=y!==m,w=d&&d>h?d-h:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:w}};if(n){const o=n+Yh,s=i;i=c=>c.startsWith(o)?s(c.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const o=i;i=s=>r({className:s,parseClassName:o})}return i},_M=e=>e.endsWith(Gh)?e.substring(0,e.length-1):e.startsWith(Gh)?e.substring(1):e,NM=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const o=[];let s=[];return i.forEach(c=>{c[0]==="["||n[c]?(o.push(...s.sort(),c),s=[]):s.push(c)}),o.push(...s.sort()),o}},MM=e=>({cache:AM(e.cacheSize),parseClassName:RM(e),sortModifiers:NM(e),...SM(e)}),jM=/\s+/,DM=(e,n)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:s}=n,c=[],f=e.trim().split(jM);let h="";for(let d=f.length-1;d>=0;d-=1){const m=f[d],{isExternal:y,modifiers:b,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:C}=r(m);if(y){h=m+(h.length>0?" "+h:h);continue}let T=!!C,A=i(T?k.substring(0,C):k);if(!A){if(!T){h=m+(h.length>0?" "+h:h);continue}if(A=i(k),!A){h=m+(h.length>0?" "+h:h);continue}T=!1}const _=s(b).join(":"),N=w?_+Gh:_,O=N+A;if(c.includes(O))continue;c.push(O);const z=o(A,T);for(let j=0;j<z.length;++j){const $=z[j];c.push(N+$)}h=m+(h.length>0?" "+h:h)}return h};function OM(){let e=0,n,r,i="";for(;e<arguments.length;)(n=arguments[e++])&&(r=b1(n))&&(i&&(i+=" "),i+=r);return i}const b1=e=>{if(typeof e=="string")return e;let n,r="";for(let i=0;i<e.length;i++)e[i]&&(n=b1(e[i]))&&(r&&(r+=" "),r+=n);return r};function LM(e,...n){let r,i,o,s=c;function c(h){const d=n.reduce((m,y)=>y(m),e());return r=MM(d),i=r.cache.get,o=r.cache.set,s=f,f(h)}function f(h){const d=i(h);if(d)return d;const m=DM(h,r);return o(h,m),m}return function(){return s(OM.apply(null,arguments))}}const Tt=e=>{const n=r=>r[e]||[];return n.isThemeGetter=!0,n},w1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,S1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zM=/^\d+\/\d+$/,PM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IM=/\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$/,BM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ui=e=>zM.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>!!e&&Number.isInteger(Number(e)),ah=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),jr=e=>PM.test(e),FM=()=>!0,qM=e=>IM.test(e)&&!BM.test(e),E1=()=>!1,VM=e=>UM.test(e),$M=e=>HM.test(e),GM=e=>!ge(e)&&!ye(e),YM=e=>sl(e,A1,E1),ge=e=>w1.test(e),Ua=e=>sl(e,T1,qM),ih=e=>sl(e,WM,Pe),Xx=e=>sl(e,k1,E1),KM=e=>sl(e,C1,$M),xu=e=>sl(e,R1,VM),ye=e=>S1.test(e),fo=e=>ul(e,T1),XM=e=>ul(e,JM),Qx=e=>ul(e,k1),QM=e=>ul(e,A1),ZM=e=>ul(e,C1),bu=e=>ul(e,R1,!0),sl=(e,n,r)=>{const i=w1.exec(e);return i?i[1]?n(i[1]):r(i[2]):!1},ul=(e,n,r=!1)=>{const i=S1.exec(e);return i?i[1]?n(i[1]):r:!1},k1=e=>e==="position"||e==="percentage",C1=e=>e==="image"||e==="url",A1=e=>e==="length"||e==="size"||e==="bg-size",T1=e=>e==="length",WM=e=>e==="number",JM=e=>e==="family-name",R1=e=>e==="shadow",ej=()=>{const e=Tt("color"),n=Tt("font"),r=Tt("text"),i=Tt("font-weight"),o=Tt("tracking"),s=Tt("leading"),c=Tt("breakpoint"),f=Tt("container"),h=Tt("spacing"),d=Tt("radius"),m=Tt("shadow"),y=Tt("inset-shadow"),b=Tt("text-shadow"),w=Tt("drop-shadow"),k=Tt("blur"),C=Tt("perspective"),T=Tt("aspect"),A=Tt("ease"),_=Tt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...O(),ye,ge],j=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],G=()=>[ye,ge,h],ee=()=>[Ui,"full","auto",...G()],P=()=>[ua,"none","subgrid",ye,ge],ne=()=>["auto",{span:["full",ua,ye,ge]},ua,ye,ge],ae=()=>[ua,"auto",ye,ge],le=()=>["auto","min","max","fr",ye,ge],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...G()],K=()=>[Ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],U=()=>[e,ye,ge],J=()=>[...O(),Qx,Xx,{position:[ye,ge]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",QM,YM,{size:[ye,ge]}],oe=()=>[ah,fo,Ua],M=()=>["","none","full",d,ye,ge],se=()=>["",Pe,fo,Ua],Se=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Pe,ah,Qx,Xx],Ee=()=>["","none",k,ye,ge],Qe=()=>["none",Pe,ye,ge],bt=()=>["none",Pe,ye,ge],Rt=()=>[Pe,ye,ge],It=()=>[Ui,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[jr],breakpoint:[jr],color:[FM],container:[jr],"drop-shadow":[jr],ease:["in","out","in-out"],font:[GM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[jr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[jr],shadow:[jr],spacing:["px",Pe],text:[jr],"text-shadow":[jr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ui,ge,ye,T]}],container:["container"],columns:[{columns:[Pe,ge,ye,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:z()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{start:ee()}],end:[{end:ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[ua,"auto",ye,ge]}],basis:[{basis:[Ui,"full","auto",f,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Ui,"auto","initial","none",ge]}],grow:[{grow:["",Pe,ye,ge]}],shrink:[{shrink:["",Pe,ye,ge]}],order:[{order:[ua,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[f,"screen",...K()]}],"min-w":[{"min-w":[f,"screen","none",...K()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,fo,Ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ye,ih]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ah,ge]}],"font-family":[{font:[XM,ge,n]}],"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:[o,ye,ge]}],"line-clamp":[{"line-clamp":[Pe,"none",ye,ih]}],leading:[{leading:[s,...G()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ye,Ua]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Pe,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],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",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ua,ye,ge],radial:["",ye,ge],conic:[ua,ye,ge]},ZM,KM]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ye,ge]}],"outline-w":[{outline:["",Pe,fo,Ua]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",m,bu,xu]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",y,bu,xu]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Pe,Ua]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",b,bu,xu]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Pe,ye,ge]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:Ee()}],brightness:[{brightness:[Pe,ye,ge]}],contrast:[{contrast:[Pe,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",w,bu,xu]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Pe,ye,ge]}],"hue-rotate":[{"hue-rotate":[Pe,ye,ge]}],invert:[{invert:["",Pe,ye,ge]}],saturate:[{saturate:[Pe,ye,ge]}],sepia:[{sepia:["",Pe,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ye,ge]}],ease:[{ease:["linear","initial",A,ye,ge]}],delay:[{delay:[Pe,ye,ge]}],animate:[{animate:["none",_,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ye,ge]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:bt()}],"scale-x":[{"scale-x":bt()}],"scale-y":[{"scale-y":bt()}],"scale-z":[{"scale-z":bt()}],"scale-3d":["scale-3d"],skew:[{skew:Rt()}],"skew-x":[{"skew-x":Rt()}],"skew-y":[{"skew-y":Rt()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:It()}],"translate-x":[{"translate-x":It()}],"translate-y":[{"translate-y":It()}],"translate-z":[{"translate-z":It()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"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",ye,ge]}],"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":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",ye,ge]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Pe,fo,Ua,ih]}],stroke:[{stroke:["none",...U()]}],"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"]}},tj=LM(ej);function fe(...e){return tj(g1(e))}const nj=z_,_1=x.forwardRef(({className:e,...n},r)=>g.jsx(u1,{ref:r,className:fe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));_1.displayName=u1.displayName;const rj=pc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),N1=x.forwardRef(({className:e,variant:n,...r},i)=>g.jsx(c1,{ref:i,className:fe(rj({variant:n}),e),...r}));N1.displayName=c1.displayName;const aj=x.forwardRef(({className:e,...n},r)=>g.jsx(h1,{ref:r,className:fe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}));aj.displayName=h1.displayName;const M1=x.forwardRef(({className:e,...n},r)=>g.jsx(p1,{ref:r,className:fe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...n,children:g.jsx(Yi,{className:"h-4 w-4"})}));M1.displayName=p1.displayName;const j1=x.forwardRef(({className:e,...n},r)=>g.jsx(f1,{ref:r,className:fe("text-sm font-semibold",e),...n}));j1.displayName=f1.displayName;const D1=x.forwardRef(({className:e,...n},r)=>g.jsx(d1,{ref:r,className:fe("text-sm opacity-90",e),...n}));D1.displayName=d1.displayName;function ij(){const{toasts:e}=GR();return g.jsxs(nj,{children:[e.map(function({id:n,title:r,description:i,action:o,...s}){return g.jsxs(N1,{...s,children:[g.jsxs("div",{className:"grid gap-1",children:[r&&g.jsx(j1,{children:r}),i&&g.jsx(D1,{children:i})]}),o,g.jsx(M1,{})]},n)}),g.jsx(_1,{})]})}function lj({children:e}){const{isAuthenticated:n,authEnabled:r,isLoading:i}=q0(),o=bn();return i?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx($u,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?n?g.jsx(g.Fragment,{children:e}):g.jsx(RT,{to:"/login",state:{from:o},replace:!0}):g.jsx(g.Fragment,{children:e})}function oj(){return g.jsx("div",{className:"flex items-center justify-center min-h-screen",children:g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[g.jsx($u,{className:"h-8 w-8 animate-spin text-primary"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})}const lh=768;function O1(){const[e,n]=x.useState(void 0);return x.useEffect(()=>{const r=window.matchMedia(`(max-width: ${lh-1}px)`),i=()=>{n(window.innerWidth<lh)};return r.addEventListener("change",i),n(window.innerWidth<lh),()=>r.removeEventListener("change",i)},[]),!!e}const Op=pc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),pt=x.forwardRef(({className:e,variant:n,size:r,asChild:i=!1,...o},s)=>{const c=i?ll:"button";return g.jsx(c,{className:fe(Op({variant:n,size:r,className:e})),ref:s,...o})});pt.displayName="Button";const L1=x.forwardRef(({className:e,type:n,...r},i)=>g.jsx("input",{type:n,className:fe("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));L1.displayName="Input";var sj="Separator",Zx="horizontal",uj=["horizontal","vertical"],z1=x.forwardRef((e,n)=>{const{decorative:r,orientation:i=Zx,...o}=e,s=cj(i)?i:Zx,f=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return g.jsx(Fe.div,{"data-orientation":s,...f,...o,ref:n})});z1.displayName=sj;function cj(e){return uj.includes(e)}var P1=z1;const I1=x.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...i},o)=>g.jsx(P1,{ref:o,decorative:r,orientation:n,className:fe("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));I1.displayName=P1.displayName;var fj=y0[" useId ".trim().toString()]||(()=>{}),dj=0;function $a(e){const[n,r]=x.useState(fj());return cr(()=>{r(i=>i??String(dj++))},[e]),e||(n?`radix-${n}`:"")}var oh="focusScope.autoFocusOnMount",sh="focusScope.autoFocusOnUnmount",Wx={bubbles:!1,cancelable:!0},hj="FocusScope",Lp=x.forwardRef((e,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[f,h]=x.useState(null),d=kt(o),m=kt(s),y=x.useRef(null),b=Xe(n,C=>h(C)),w=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let C=function(N){if(w.paused||!f)return;const O=N.target;f.contains(O)?y.current=O:da(y.current,{select:!0})},T=function(N){if(w.paused||!f)return;const O=N.relatedTarget;O!==null&&(f.contains(O)||da(y.current,{select:!0}))},A=function(N){if(document.activeElement===document.body)for(const z of N)z.removedNodes.length>0&&da(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",T);const _=new MutationObserver(A);return f&&_.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",T),_.disconnect()}}},[i,f,w.paused]),x.useEffect(()=>{if(f){eb.add(w);const C=document.activeElement;if(!f.contains(C)){const A=new CustomEvent(oh,Wx);f.addEventListener(oh,d),f.dispatchEvent(A),A.defaultPrevented||(pj(xj(B1(f)),{select:!0}),document.activeElement===C&&da(f))}return()=>{f.removeEventListener(oh,d),setTimeout(()=>{const A=new CustomEvent(sh,Wx);f.addEventListener(sh,m),f.dispatchEvent(A),A.defaultPrevented||da(C??document.body,{select:!0}),f.removeEventListener(sh,m),eb.remove(w)},0)}}},[f,d,m,w]);const k=x.useCallback(C=>{if(!r&&!i||w.paused)return;const T=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,A=document.activeElement;if(T&&A){const _=C.currentTarget,[N,O]=mj(_);N&&O?!C.shiftKey&&A===O?(C.preventDefault(),r&&da(N,{select:!0})):C.shiftKey&&A===N&&(C.preventDefault(),r&&da(O,{select:!0})):A===_&&C.preventDefault()}},[r,i,w.paused]);return g.jsx(Fe.div,{tabIndex:-1,...c,ref:b,onKeyDown:k})});Lp.displayName=hj;function pj(e,{select:n=!1}={}){const r=document.activeElement;for(const i of e)if(da(i,{select:n}),document.activeElement!==r)return}function mj(e){const n=B1(e),r=Jx(n,e),i=Jx(n.reverse(),e);return[r,i]}function B1(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Jx(e,n){for(const r of e)if(!gj(r,{upTo:n}))return r}function gj(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function yj(e){return e instanceof HTMLInputElement&&"select"in e}function da(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&yj(e)&&n&&e.select()}}var eb=vj();function vj(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=tb(e,n),e.unshift(n)},remove(n){e=tb(e,n),e[0]?.resume()}}}function tb(e,n){const r=[...e],i=r.indexOf(n);return i!==-1&&r.splice(i,1),r}function xj(e){return e.filter(n=>n.tagName!=="A")}var uh=0;function U1(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nb()),document.body.insertAdjacentElement("beforeend",e[1]??nb()),uh++,()=>{uh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),uh--}},[])}function nb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var or=function(){return or=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},or.apply(this,arguments)};function H1(e,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)n.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]]);return r}function bj(e,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,s;i<o;i++)(s||!(i in n))&&(s||(s=Array.prototype.slice.call(n,0,i)),s[i]=n[i]);return e.concat(s||Array.prototype.slice.call(n))}var zu="right-scroll-bar-position",Pu="width-before-scroll-bar",wj="with-scroll-bars-hidden",Sj="--removed-body-scroll-bar-size";function ch(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Ej(e,n){var r=x.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(i){var o=r.value;o!==i&&(r.value=i,r.callback(i,o))}}}})[0];return r.callback=n,r.facade}var kj=typeof window<"u"?x.useLayoutEffect:x.useEffect,rb=new WeakMap;function Cj(e,n){var r=Ej(null,function(i){return e.forEach(function(o){return ch(o,i)})});return kj(function(){var i=rb.get(r);if(i){var o=new Set(i),s=new Set(e),c=r.current;o.forEach(function(f){s.has(f)||ch(f,null)}),s.forEach(function(f){o.has(f)||ch(f,c)})}rb.set(r,e)},[e]),r}function Aj(e){return e}function Tj(e,n){n===void 0&&(n=Aj);var r=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var c=n(s,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(s){for(i=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(s),c=r}var h=function(){var m=c;c=[],m.forEach(s)},d=function(){return Promise.resolve().then(h)};d(),r={push:function(m){c.push(m),d()},filter:function(m){return c=c.filter(m),r}}}};return o}function Rj(e){e===void 0&&(e={});var n=Tj(null);return n.options=or({async:!0,ssr:!1},e),n}var F1=function(e){var n=e.sideCar,r=H1(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,or({},r))};F1.isSideCarExport=!0;function _j(e,n){return e.useMedium(n),F1}var q1=Rj(),fh=function(){},mc=x.forwardRef(function(e,n){var r=x.useRef(null),i=x.useState({onScrollCapture:fh,onWheelCapture:fh,onTouchMoveCapture:fh}),o=i[0],s=i[1],c=e.forwardProps,f=e.children,h=e.className,d=e.removeScrollBar,m=e.enabled,y=e.shards,b=e.sideCar,w=e.noRelative,k=e.noIsolation,C=e.inert,T=e.allowPinchZoom,A=e.as,_=A===void 0?"div":A,N=e.gapMode,O=H1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=b,j=Cj([r,n]),$=or(or({},O),o);return x.createElement(x.Fragment,null,m&&x.createElement(z,{sideCar:q1,removeScrollBar:d,shards:y,noRelative:w,noIsolation:k,inert:C,setCallbacks:s,allowPinchZoom:!!T,lockRef:r,gapMode:N}),c?x.cloneElement(x.Children.only(f),or(or({},$),{ref:j})):x.createElement(_,or({},$,{className:h,ref:j}),f))});mc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mc.classNames={fullWidth:Pu,zeroRight:zu};var Nj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=Nj();return n&&e.setAttribute("nonce",n),e}function jj(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Dj(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Oj=function(){var e=0,n=null;return{add:function(r){e==0&&(n=Mj())&&(jj(n,r),Dj(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Lj=function(){var e=Oj();return function(n,r){x.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},V1=function(){var e=Lj(),n=function(r){var i=r.styles,o=r.dynamic;return e(i,o),null};return n},zj={left:0,top:0,right:0,gap:0},dh=function(e){return parseInt(e||"",10)||0},Pj=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[dh(r),dh(i),dh(o)]},Ij=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zj;var n=Pj(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-r+n[2]-n[0])}},Bj=V1(),Ki="data-scroll-locked",Uj=function(e,n,r,i){var o=e.left,s=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
327
|
-
|
|
326
|
+
*/const wM=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],SM=Ne("wrench",wM);/**
|
|
327
|
+
* @license lucide-react v0.542.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const EM=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yi=Ne("x",EM),Dp="-",kM=e=>{const n=AM(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{const f=c.split(Dp);return f[0]===""&&f.length!==1&&f.shift(),x1(f,n)||CM(c)},getConflictingClassGroupIds:(c,f)=>{const h=r[c]||[];return f&&i[c]?[...h,...i[c]]:h}}},x1=(e,n)=>{if(e.length===0)return n.classGroupId;const r=e[0],i=n.nextPart.get(r),o=i?x1(e.slice(1),i):void 0;if(o)return o;if(n.validators.length===0)return;const s=e.join(Dp);return n.validators.find(({validator:c})=>c(s))?.classGroupId},Yx=/^\[(.+)\]$/,CM=e=>{if(Yx.test(e)){const n=Yx.exec(e)[1],r=n?.substring(0,n.indexOf(":"));if(r)return"arbitrary.."+r}},AM=e=>{const{theme:n,classGroups:r}=e,i={nextPart:new Map,validators:[]};for(const o in r)$h(r[o],i,o,n);return i},$h=(e,n,r,i)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?n:Kx(n,o);s.classGroupId=r;return}if(typeof o=="function"){if(TM(o)){$h(o(i),n,r,i);return}n.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,c])=>{$h(c,Kx(n,s),r,i)})})},Kx=(e,n)=>{let r=e;return n.split(Dp).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},TM=e=>e.isThemeGetter,RM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=new Map,i=new Map;const o=(s,c)=>{r.set(s,c),n++,n>e&&(n=0,i=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=i.get(s))!==void 0)return o(s,c),c},set(s,c){r.has(s)?r.set(s,c):o(s,c)}}},Gh="!",Yh=":",_M=Yh.length,NM=e=>{const{prefix:n,experimentalParseClassName:r}=e;let i=o=>{const s=[];let c=0,f=0,h=0,d;for(let k=0;k<o.length;k++){let C=o[k];if(c===0&&f===0){if(C===Yh){s.push(o.slice(h,k)),h=k+_M;continue}if(C==="/"){d=k;continue}}C==="["?c++:C==="]"?c--:C==="("?f++:C===")"&&f--}const m=s.length===0?o:o.substring(h),y=MM(m),b=y!==m,w=d&&d>h?d-h:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:w}};if(n){const o=n+Yh,s=i;i=c=>c.startsWith(o)?s(c.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const o=i;i=s=>r({className:s,parseClassName:o})}return i},MM=e=>e.endsWith(Gh)?e.substring(0,e.length-1):e.startsWith(Gh)?e.substring(1):e,jM=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const o=[];let s=[];return i.forEach(c=>{c[0]==="["||n[c]?(o.push(...s.sort(),c),s=[]):s.push(c)}),o.push(...s.sort()),o}},DM=e=>({cache:RM(e.cacheSize),parseClassName:NM(e),sortModifiers:jM(e),...kM(e)}),OM=/\s+/,LM=(e,n)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:s}=n,c=[],f=e.trim().split(OM);let h="";for(let d=f.length-1;d>=0;d-=1){const m=f[d],{isExternal:y,modifiers:b,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:C}=r(m);if(y){h=m+(h.length>0?" "+h:h);continue}let T=!!C,A=i(T?k.substring(0,C):k);if(!A){if(!T){h=m+(h.length>0?" "+h:h);continue}if(A=i(k),!A){h=m+(h.length>0?" "+h:h);continue}T=!1}const _=s(b).join(":"),N=w?_+Gh:_,O=N+A;if(c.includes(O))continue;c.push(O);const z=o(A,T);for(let j=0;j<z.length;++j){const $=z[j];c.push(N+$)}h=m+(h.length>0?" "+h:h)}return h};function zM(){let e=0,n,r,i="";for(;e<arguments.length;)(n=arguments[e++])&&(r=b1(n))&&(i&&(i+=" "),i+=r);return i}const b1=e=>{if(typeof e=="string")return e;let n,r="";for(let i=0;i<e.length;i++)e[i]&&(n=b1(e[i]))&&(r&&(r+=" "),r+=n);return r};function PM(e,...n){let r,i,o,s=c;function c(h){const d=n.reduce((m,y)=>y(m),e());return r=DM(d),i=r.cache.get,o=r.cache.set,s=f,f(h)}function f(h){const d=i(h);if(d)return d;const m=LM(h,r);return o(h,m),m}return function(){return s(zM.apply(null,arguments))}}const Tt=e=>{const n=r=>r[e]||[];return n.isThemeGetter=!0,n},w1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,S1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IM=/^\d+\/\d+$/,BM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UM=/\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$/,HM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ui=e=>IM.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>!!e&&Number.isInteger(Number(e)),ah=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),jr=e=>BM.test(e),VM=()=>!0,$M=e=>UM.test(e)&&!HM.test(e),E1=()=>!1,GM=e=>FM.test(e),YM=e=>qM.test(e),KM=e=>!ge(e)&&!ye(e),XM=e=>sl(e,A1,E1),ge=e=>w1.test(e),Ua=e=>sl(e,T1,$M),ih=e=>sl(e,ej,Pe),Xx=e=>sl(e,k1,E1),QM=e=>sl(e,C1,YM),xu=e=>sl(e,R1,GM),ye=e=>S1.test(e),fo=e=>ul(e,T1),ZM=e=>ul(e,tj),Qx=e=>ul(e,k1),WM=e=>ul(e,A1),JM=e=>ul(e,C1),bu=e=>ul(e,R1,!0),sl=(e,n,r)=>{const i=w1.exec(e);return i?i[1]?n(i[1]):r(i[2]):!1},ul=(e,n,r=!1)=>{const i=S1.exec(e);return i?i[1]?n(i[1]):r:!1},k1=e=>e==="position"||e==="percentage",C1=e=>e==="image"||e==="url",A1=e=>e==="length"||e==="size"||e==="bg-size",T1=e=>e==="length",ej=e=>e==="number",tj=e=>e==="family-name",R1=e=>e==="shadow",nj=()=>{const e=Tt("color"),n=Tt("font"),r=Tt("text"),i=Tt("font-weight"),o=Tt("tracking"),s=Tt("leading"),c=Tt("breakpoint"),f=Tt("container"),h=Tt("spacing"),d=Tt("radius"),m=Tt("shadow"),y=Tt("inset-shadow"),b=Tt("text-shadow"),w=Tt("drop-shadow"),k=Tt("blur"),C=Tt("perspective"),T=Tt("aspect"),A=Tt("ease"),_=Tt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...O(),ye,ge],j=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],G=()=>[ye,ge,h],ee=()=>[Ui,"full","auto",...G()],P=()=>[ua,"none","subgrid",ye,ge],ne=()=>["auto",{span:["full",ua,ye,ge]},ua,ye,ge],ae=()=>[ua,"auto",ye,ge],le=()=>["auto","min","max","fr",ye,ge],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...G()],K=()=>[Ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],U=()=>[e,ye,ge],J=()=>[...O(),Qx,Xx,{position:[ye,ge]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",WM,XM,{size:[ye,ge]}],oe=()=>[ah,fo,Ua],M=()=>["","none","full",d,ye,ge],se=()=>["",Pe,fo,Ua],Se=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Pe,ah,Qx,Xx],Ee=()=>["","none",k,ye,ge],Qe=()=>["none",Pe,ye,ge],bt=()=>["none",Pe,ye,ge],Rt=()=>[Pe,ye,ge],It=()=>[Ui,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[jr],breakpoint:[jr],color:[VM],container:[jr],"drop-shadow":[jr],ease:["in","out","in-out"],font:[KM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[jr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[jr],shadow:[jr],spacing:["px",Pe],text:[jr],"text-shadow":[jr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ui,ge,ye,T]}],container:["container"],columns:[{columns:[Pe,ge,ye,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:z()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{start:ee()}],end:[{end:ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[ua,"auto",ye,ge]}],basis:[{basis:[Ui,"full","auto",f,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Ui,"auto","initial","none",ge]}],grow:[{grow:["",Pe,ye,ge]}],shrink:[{shrink:["",Pe,ye,ge]}],order:[{order:[ua,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[f,"screen",...K()]}],"min-w":[{"min-w":[f,"screen","none",...K()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,fo,Ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ye,ih]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ah,ge]}],"font-family":[{font:[ZM,ge,n]}],"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:[o,ye,ge]}],"line-clamp":[{"line-clamp":[Pe,"none",ye,ih]}],leading:[{leading:[s,...G()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ye,Ua]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Pe,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],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",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ua,ye,ge],radial:["",ye,ge],conic:[ua,ye,ge]},JM,QM]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ye,ge]}],"outline-w":[{outline:["",Pe,fo,Ua]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",m,bu,xu]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",y,bu,xu]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Pe,Ua]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",b,bu,xu]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Pe,ye,ge]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:Ee()}],brightness:[{brightness:[Pe,ye,ge]}],contrast:[{contrast:[Pe,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",w,bu,xu]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Pe,ye,ge]}],"hue-rotate":[{"hue-rotate":[Pe,ye,ge]}],invert:[{invert:["",Pe,ye,ge]}],saturate:[{saturate:[Pe,ye,ge]}],sepia:[{sepia:["",Pe,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ye,ge]}],ease:[{ease:["linear","initial",A,ye,ge]}],delay:[{delay:[Pe,ye,ge]}],animate:[{animate:["none",_,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ye,ge]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:bt()}],"scale-x":[{"scale-x":bt()}],"scale-y":[{"scale-y":bt()}],"scale-z":[{"scale-z":bt()}],"scale-3d":["scale-3d"],skew:[{skew:Rt()}],"skew-x":[{"skew-x":Rt()}],"skew-y":[{"skew-y":Rt()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:It()}],"translate-x":[{"translate-x":It()}],"translate-y":[{"translate-y":It()}],"translate-z":[{"translate-z":It()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"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",ye,ge]}],"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":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",ye,ge]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Pe,fo,Ua,ih]}],stroke:[{stroke:["none",...U()]}],"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"]}},rj=PM(nj);function fe(...e){return rj(g1(e))}const aj=z_,_1=x.forwardRef(({className:e,...n},r)=>g.jsx(u1,{ref:r,className:fe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));_1.displayName=u1.displayName;const ij=pc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),N1=x.forwardRef(({className:e,variant:n,...r},i)=>g.jsx(c1,{ref:i,className:fe(ij({variant:n}),e),...r}));N1.displayName=c1.displayName;const lj=x.forwardRef(({className:e,...n},r)=>g.jsx(h1,{ref:r,className:fe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}));lj.displayName=h1.displayName;const M1=x.forwardRef(({className:e,...n},r)=>g.jsx(p1,{ref:r,className:fe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...n,children:g.jsx(Yi,{className:"h-4 w-4"})}));M1.displayName=p1.displayName;const j1=x.forwardRef(({className:e,...n},r)=>g.jsx(f1,{ref:r,className:fe("text-sm font-semibold",e),...n}));j1.displayName=f1.displayName;const D1=x.forwardRef(({className:e,...n},r)=>g.jsx(d1,{ref:r,className:fe("text-sm opacity-90",e),...n}));D1.displayName=d1.displayName;function oj(){const{toasts:e}=GR();return g.jsxs(aj,{children:[e.map(function({id:n,title:r,description:i,action:o,...s}){return g.jsxs(N1,{...s,children:[g.jsxs("div",{className:"grid gap-1",children:[r&&g.jsx(j1,{children:r}),i&&g.jsx(D1,{children:i})]}),o,g.jsx(M1,{})]},n)}),g.jsx(_1,{})]})}function sj({children:e}){const{isAuthenticated:n,authEnabled:r,isLoading:i}=q0(),o=bn();return i?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx($u,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?n?g.jsx(g.Fragment,{children:e}):g.jsx(RT,{to:"/login",state:{from:o},replace:!0}):g.jsx(g.Fragment,{children:e})}function uj(){return g.jsx("div",{className:"flex items-center justify-center min-h-screen",children:g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[g.jsx($u,{className:"h-8 w-8 animate-spin text-primary"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})}const lh=768;function O1(){const[e,n]=x.useState(void 0);return x.useEffect(()=>{const r=window.matchMedia(`(max-width: ${lh-1}px)`),i=()=>{n(window.innerWidth<lh)};return r.addEventListener("change",i),n(window.innerWidth<lh),()=>r.removeEventListener("change",i)},[]),!!e}const Op=pc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),pt=x.forwardRef(({className:e,variant:n,size:r,asChild:i=!1,...o},s)=>{const c=i?ll:"button";return g.jsx(c,{className:fe(Op({variant:n,size:r,className:e})),ref:s,...o})});pt.displayName="Button";const L1=x.forwardRef(({className:e,type:n,...r},i)=>g.jsx("input",{type:n,className:fe("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));L1.displayName="Input";var cj="Separator",Zx="horizontal",fj=["horizontal","vertical"],z1=x.forwardRef((e,n)=>{const{decorative:r,orientation:i=Zx,...o}=e,s=dj(i)?i:Zx,f=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return g.jsx(Fe.div,{"data-orientation":s,...f,...o,ref:n})});z1.displayName=cj;function dj(e){return fj.includes(e)}var P1=z1;const I1=x.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...i},o)=>g.jsx(P1,{ref:o,decorative:r,orientation:n,className:fe("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));I1.displayName=P1.displayName;var hj=y0[" useId ".trim().toString()]||(()=>{}),pj=0;function $a(e){const[n,r]=x.useState(hj());return cr(()=>{r(i=>i??String(pj++))},[e]),e||(n?`radix-${n}`:"")}var oh="focusScope.autoFocusOnMount",sh="focusScope.autoFocusOnUnmount",Wx={bubbles:!1,cancelable:!0},mj="FocusScope",Lp=x.forwardRef((e,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[f,h]=x.useState(null),d=kt(o),m=kt(s),y=x.useRef(null),b=Xe(n,C=>h(C)),w=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let C=function(N){if(w.paused||!f)return;const O=N.target;f.contains(O)?y.current=O:da(y.current,{select:!0})},T=function(N){if(w.paused||!f)return;const O=N.relatedTarget;O!==null&&(f.contains(O)||da(y.current,{select:!0}))},A=function(N){if(document.activeElement===document.body)for(const z of N)z.removedNodes.length>0&&da(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",T);const _=new MutationObserver(A);return f&&_.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",T),_.disconnect()}}},[i,f,w.paused]),x.useEffect(()=>{if(f){eb.add(w);const C=document.activeElement;if(!f.contains(C)){const A=new CustomEvent(oh,Wx);f.addEventListener(oh,d),f.dispatchEvent(A),A.defaultPrevented||(gj(wj(B1(f)),{select:!0}),document.activeElement===C&&da(f))}return()=>{f.removeEventListener(oh,d),setTimeout(()=>{const A=new CustomEvent(sh,Wx);f.addEventListener(sh,m),f.dispatchEvent(A),A.defaultPrevented||da(C??document.body,{select:!0}),f.removeEventListener(sh,m),eb.remove(w)},0)}}},[f,d,m,w]);const k=x.useCallback(C=>{if(!r&&!i||w.paused)return;const T=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,A=document.activeElement;if(T&&A){const _=C.currentTarget,[N,O]=yj(_);N&&O?!C.shiftKey&&A===O?(C.preventDefault(),r&&da(N,{select:!0})):C.shiftKey&&A===N&&(C.preventDefault(),r&&da(O,{select:!0})):A===_&&C.preventDefault()}},[r,i,w.paused]);return g.jsx(Fe.div,{tabIndex:-1,...c,ref:b,onKeyDown:k})});Lp.displayName=mj;function gj(e,{select:n=!1}={}){const r=document.activeElement;for(const i of e)if(da(i,{select:n}),document.activeElement!==r)return}function yj(e){const n=B1(e),r=Jx(n,e),i=Jx(n.reverse(),e);return[r,i]}function B1(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Jx(e,n){for(const r of e)if(!vj(r,{upTo:n}))return r}function vj(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xj(e){return e instanceof HTMLInputElement&&"select"in e}function da(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xj(e)&&n&&e.select()}}var eb=bj();function bj(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=tb(e,n),e.unshift(n)},remove(n){e=tb(e,n),e[0]?.resume()}}}function tb(e,n){const r=[...e],i=r.indexOf(n);return i!==-1&&r.splice(i,1),r}function wj(e){return e.filter(n=>n.tagName!=="A")}var uh=0;function U1(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nb()),document.body.insertAdjacentElement("beforeend",e[1]??nb()),uh++,()=>{uh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),uh--}},[])}function nb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var or=function(){return or=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},or.apply(this,arguments)};function H1(e,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)n.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]]);return r}function Sj(e,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,s;i<o;i++)(s||!(i in n))&&(s||(s=Array.prototype.slice.call(n,0,i)),s[i]=n[i]);return e.concat(s||Array.prototype.slice.call(n))}var zu="right-scroll-bar-position",Pu="width-before-scroll-bar",Ej="with-scroll-bars-hidden",kj="--removed-body-scroll-bar-size";function ch(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Cj(e,n){var r=x.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(i){var o=r.value;o!==i&&(r.value=i,r.callback(i,o))}}}})[0];return r.callback=n,r.facade}var Aj=typeof window<"u"?x.useLayoutEffect:x.useEffect,rb=new WeakMap;function Tj(e,n){var r=Cj(null,function(i){return e.forEach(function(o){return ch(o,i)})});return Aj(function(){var i=rb.get(r);if(i){var o=new Set(i),s=new Set(e),c=r.current;o.forEach(function(f){s.has(f)||ch(f,null)}),s.forEach(function(f){o.has(f)||ch(f,c)})}rb.set(r,e)},[e]),r}function Rj(e){return e}function _j(e,n){n===void 0&&(n=Rj);var r=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var c=n(s,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(s){for(i=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(s),c=r}var h=function(){var m=c;c=[],m.forEach(s)},d=function(){return Promise.resolve().then(h)};d(),r={push:function(m){c.push(m),d()},filter:function(m){return c=c.filter(m),r}}}};return o}function Nj(e){e===void 0&&(e={});var n=_j(null);return n.options=or({async:!0,ssr:!1},e),n}var F1=function(e){var n=e.sideCar,r=H1(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,or({},r))};F1.isSideCarExport=!0;function Mj(e,n){return e.useMedium(n),F1}var q1=Nj(),fh=function(){},mc=x.forwardRef(function(e,n){var r=x.useRef(null),i=x.useState({onScrollCapture:fh,onWheelCapture:fh,onTouchMoveCapture:fh}),o=i[0],s=i[1],c=e.forwardProps,f=e.children,h=e.className,d=e.removeScrollBar,m=e.enabled,y=e.shards,b=e.sideCar,w=e.noRelative,k=e.noIsolation,C=e.inert,T=e.allowPinchZoom,A=e.as,_=A===void 0?"div":A,N=e.gapMode,O=H1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=b,j=Tj([r,n]),$=or(or({},O),o);return x.createElement(x.Fragment,null,m&&x.createElement(z,{sideCar:q1,removeScrollBar:d,shards:y,noRelative:w,noIsolation:k,inert:C,setCallbacks:s,allowPinchZoom:!!T,lockRef:r,gapMode:N}),c?x.cloneElement(x.Children.only(f),or(or({},$),{ref:j})):x.createElement(_,or({},$,{className:h,ref:j}),f))});mc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mc.classNames={fullWidth:Pu,zeroRight:zu};var jj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=jj();return n&&e.setAttribute("nonce",n),e}function Oj(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Lj(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var zj=function(){var e=0,n=null;return{add:function(r){e==0&&(n=Dj())&&(Oj(n,r),Lj(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Pj=function(){var e=zj();return function(n,r){x.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},V1=function(){var e=Pj(),n=function(r){var i=r.styles,o=r.dynamic;return e(i,o),null};return n},Ij={left:0,top:0,right:0,gap:0},dh=function(e){return parseInt(e||"",10)||0},Bj=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[dh(r),dh(i),dh(o)]},Uj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ij;var n=Bj(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-r+n[2]-n[0])}},Hj=V1(),Ki="data-scroll-locked",Fj=function(e,n,r,i){var o=e.left,s=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
332
|
+
.`.concat(Ej,` {
|
|
328
333
|
overflow: hidden `).concat(i,`;
|
|
329
334
|
padding-right: `).concat(f,"px ").concat(i,`;
|
|
330
335
|
}
|
|
@@ -358,50 +363,50 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
358
363
|
}
|
|
359
364
|
|
|
360
365
|
body[`).concat(Ki,`] {
|
|
361
|
-
`).concat(
|
|
366
|
+
`).concat(kj,": ").concat(f,`px;
|
|
362
367
|
}
|
|
363
|
-
`)},ab=function(){var e=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(e)?e:0},
|
|
368
|
+
`)},ab=function(){var e=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(e)?e:0},qj=function(){x.useEffect(function(){return document.body.setAttribute(Ki,(ab()+1).toString()),function(){var e=ab()-1;e<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,e.toString())}},[])},Vj=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,o=i===void 0?"margin":i;qj();var s=x.useMemo(function(){return Uj(o)},[o]);return x.createElement(Hj,{styles:Fj(s,!n,o,r?"":"!important")})},Kh=!1;if(typeof window<"u")try{var wu=Object.defineProperty({},"passive",{get:function(){return Kh=!0,!0}});window.addEventListener("test",wu,wu),window.removeEventListener("test",wu,wu)}catch{Kh=!1}var Hi=Kh?{passive:!1}:!1,$j=function(e){return e.tagName==="TEXTAREA"},$1=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!$j(e)&&r[n]==="visible")},Gj=function(e){return $1(e,"overflowY")},Yj=function(e){return $1(e,"overflowX")},ib=function(e,n){var r=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=G1(e,i);if(o){var s=Y1(e,i),c=s[1],f=s[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},Kj=function(e){var n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[n,r,i]},Xj=function(e){var n=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[n,r,i]},G1=function(e,n){return e==="v"?Gj(n):Yj(n)},Y1=function(e,n){return e==="v"?Kj(n):Xj(n)},Qj=function(e,n){return e==="h"&&n==="rtl"?-1:1},Zj=function(e,n,r,i,o){var s=Qj(e,window.getComputedStyle(n).direction),c=s*i,f=r.target,h=n.contains(f),d=!1,m=c>0,y=0,b=0;do{if(!f)break;var w=Y1(e,f),k=w[0],C=w[1],T=w[2],A=C-T-s*k;(k||A)&&G1(e,f)&&(y+=A,b+=k);var _=f.parentNode;f=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!h&&f!==document.body||h&&(n.contains(f)||n===f));return(m&&Math.abs(y)<1||!m&&Math.abs(b)<1)&&(d=!0),d},Su=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lb=function(e){return[e.deltaX,e.deltaY]},ob=function(e){return e&&"current"in e?e.current:e},Wj=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Jj=function(e){return`
|
|
364
369
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
365
370
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
366
|
-
`)},
|
|
371
|
+
`)},eD=0,Fi=[];function tD(e){var n=x.useRef([]),r=x.useRef([0,0]),i=x.useRef(),o=x.useState(eD++)[0],s=x.useState(V1)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=Sj([e.lockRef.current],(e.shards||[]).map(ob),!0).filter(Boolean);return C.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=x.useCallback(function(C,T){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!c.current.allowPinchZoom;var A=Su(C),_=r.current,N="deltaX"in C?C.deltaX:_[0]-A[0],O="deltaY"in C?C.deltaY:_[1]-A[1],z,j=C.target,$=Math.abs(N)>Math.abs(O)?"h":"v";if("touches"in C&&$==="h"&&j.type==="range")return!1;var G=ib($,j);if(!G)return!0;if(G?z=$:(z=$==="v"?"h":"v",G=ib($,j)),!G)return!1;if(!i.current&&"changedTouches"in C&&(N||O)&&(i.current=z),!z)return!0;var ee=i.current||z;return Zj(ee,T,C,ee==="h"?N:O)},[]),h=x.useCallback(function(C){var T=C;if(!(!Fi.length||Fi[Fi.length-1]!==s)){var A="deltaY"in T?lb(T):Su(T),_=n.current.filter(function(z){return z.name===T.type&&(z.target===T.target||T.target===z.shadowParent)&&Wj(z.delta,A)})[0];if(_&&_.should){T.cancelable&&T.preventDefault();return}if(!_){var N=(c.current.shards||[]).map(ob).filter(Boolean).filter(function(z){return z.contains(T.target)}),O=N.length>0?f(T,N[0]):!c.current.noIsolation;O&&T.cancelable&&T.preventDefault()}}},[]),d=x.useCallback(function(C,T,A,_){var N={name:C,delta:T,target:A,should:_,shadowParent:nD(A)};n.current.push(N),setTimeout(function(){n.current=n.current.filter(function(O){return O!==N})},1)},[]),m=x.useCallback(function(C){r.current=Su(C),i.current=void 0},[]),y=x.useCallback(function(C){d(C.type,lb(C),C.target,f(C,e.lockRef.current))},[]),b=x.useCallback(function(C){d(C.type,Su(C),C.target,f(C,e.lockRef.current))},[]);x.useEffect(function(){return Fi.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Hi),document.addEventListener("touchmove",h,Hi),document.addEventListener("touchstart",m,Hi),function(){Fi=Fi.filter(function(C){return C!==s}),document.removeEventListener("wheel",h,Hi),document.removeEventListener("touchmove",h,Hi),document.removeEventListener("touchstart",m,Hi)}},[]);var w=e.removeScrollBar,k=e.inert;return x.createElement(x.Fragment,null,k?x.createElement(s,{styles:Jj(o)}):null,w?x.createElement(Vj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nD(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const rD=Mj(q1,tD);var zp=x.forwardRef(function(e,n){return x.createElement(mc,or({},e,{ref:n,sideCar:rD}))});zp.classNames=mc.classNames;var aD=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},qi=new WeakMap,Eu=new WeakMap,ku={},hh=0,K1=function(e){return e&&(e.host||K1(e.parentNode))},iD=function(e,n){return n.map(function(r){if(e.contains(r))return r;var i=K1(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},lD=function(e,n,r,i){var o=iD(n,Array.isArray(e)?e:[e]);ku[r]||(ku[r]=new WeakMap);var s=ku[r],c=[],f=new Set,h=new Set(o),d=function(y){!y||f.has(y)||(f.add(y),d(y.parentNode))};o.forEach(d);var m=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(b){if(f.has(b))m(b);else try{var w=b.getAttribute(i),k=w!==null&&w!=="false",C=(qi.get(b)||0)+1,T=(s.get(b)||0)+1;qi.set(b,C),s.set(b,T),c.push(b),C===1&&k&&Eu.set(b,!0),T===1&&b.setAttribute(r,"true"),k||b.setAttribute(i,"true")}catch(A){console.error("aria-hidden: cannot operate on ",b,A)}})};return m(n),f.clear(),hh++,function(){c.forEach(function(y){var b=qi.get(y)-1,w=s.get(y)-1;qi.set(y,b),s.set(y,w),b||(Eu.has(y)||y.removeAttribute(i),Eu.delete(y)),w||y.removeAttribute(r)}),hh--,hh||(qi=new WeakMap,qi=new WeakMap,Eu=new WeakMap,ku={})}},X1=function(e,n,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=aD(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),lD(i,o,r,"aria-hidden")):function(){return null}},gc="Dialog",[Q1,Z1]=Xn(gc),[oD,Qn]=Q1(gc),W1=e=>{const{__scopeDialog:n,children:r,open:i,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,f=x.useRef(null),h=x.useRef(null),[d,m]=ol({prop:i,defaultProp:o??!1,onChange:s,caller:gc});return g.jsx(oD,{scope:n,triggerRef:f,contentRef:h,contentId:$a(),titleId:$a(),descriptionId:$a(),open:d,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(y=>!y),[m]),modal:c,children:r})};W1.displayName=gc;var J1="DialogTrigger",ew=x.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,o=Qn(J1,r),s=Xe(n,o.triggerRef);return g.jsx(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bp(o.open),...i,ref:s,onClick:pe(e.onClick,o.onOpenToggle)})});ew.displayName=J1;var Pp="DialogPortal",[sD,tw]=Q1(Pp,{forceMount:void 0}),nw=e=>{const{__scopeDialog:n,forceMount:r,children:i,container:o}=e,s=Qn(Pp,n);return g.jsx(sD,{scope:n,forceMount:r,children:x.Children.map(i,c=>g.jsx(Zt,{present:r||s.open,children:g.jsx(fc,{asChild:!0,container:o,children:c})}))})};nw.displayName=Pp;var Gu="DialogOverlay",rw=x.forwardRef((e,n)=>{const r=tw(Gu,e.__scopeDialog),{forceMount:i=r.forceMount,...o}=e,s=Qn(Gu,e.__scopeDialog);return s.modal?g.jsx(Zt,{present:i||s.open,children:g.jsx(cD,{...o,ref:n})}):null});rw.displayName=Gu;var uD=Wi("DialogOverlay.RemoveScroll"),cD=x.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,o=Qn(Gu,r);return g.jsx(zp,{as:uD,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(Fe.div,{"data-state":Bp(o.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),Ga="DialogContent",aw=x.forwardRef((e,n)=>{const r=tw(Ga,e.__scopeDialog),{forceMount:i=r.forceMount,...o}=e,s=Qn(Ga,e.__scopeDialog);return g.jsx(Zt,{present:i||s.open,children:s.modal?g.jsx(fD,{...o,ref:n}):g.jsx(dD,{...o,ref:n})})});aw.displayName=Ga;var fD=x.forwardRef((e,n)=>{const r=Qn(Ga,e.__scopeDialog),i=x.useRef(null),o=Xe(n,r.contentRef,i);return x.useEffect(()=>{const s=i.current;if(s)return X1(s)},[]),g.jsx(iw,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&s.preventDefault()}),onFocusOutside:pe(e.onFocusOutside,s=>s.preventDefault())})}),dD=x.forwardRef((e,n)=>{const r=Qn(Ga,e.__scopeDialog),i=x.useRef(!1),o=x.useRef(!1);return g.jsx(iw,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||r.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;r.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),iw=x.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,f=Qn(Ga,r),h=x.useRef(null),d=Xe(n,h);return U1(),g.jsxs(g.Fragment,{children:[g.jsx(Lp,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(Ho,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Bp(f.open),...c,ref:d,onDismiss:()=>f.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(pD,{titleId:f.titleId}),g.jsx(gD,{contentRef:h,descriptionId:f.descriptionId})]})]})}),Ip="DialogTitle",lw=x.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,o=Qn(Ip,r);return g.jsx(Fe.h2,{id:o.titleId,...i,ref:n})});lw.displayName=Ip;var ow="DialogDescription",sw=x.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,o=Qn(ow,r);return g.jsx(Fe.p,{id:o.descriptionId,...i,ref:n})});sw.displayName=ow;var uw="DialogClose",cw=x.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,o=Qn(uw,r);return g.jsx(Fe.button,{type:"button",...i,ref:n,onClick:pe(e.onClick,()=>o.onOpenChange(!1))})});cw.displayName=uw;function Bp(e){return e?"open":"closed"}var fw="DialogTitleWarning",[hD,dw]=YR(fw,{contentName:Ga,titleName:Ip,docsSlug:"dialog"}),pD=({titleId:e})=>{const n=dw(fw),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
367
372
|
|
|
368
373
|
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
369
374
|
|
|
370
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},hD="DialogDescriptionWarning",pD=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dw(hD).contentName}}.`;return x.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},Up=W1,hw=ew,Hp=nw,qo=rw,Vo=aw,$o=lw,Go=sw,yc=cw;const pw=Up,mD=Hp,mw=x.forwardRef(({className:e,...n},r)=>g.jsx(qo,{className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));mw.displayName=qo.displayName;const gD=pc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Fp=x.forwardRef(({side:e="right",className:n,children:r,...i},o)=>g.jsxs(mD,{children:[g.jsx(mw,{}),g.jsxs(Vo,{ref:o,className:fe(gD({side:e}),n),...i,children:[r,g.jsxs(yc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(Yi,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fp.displayName=Vo.displayName;const qp=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col space-y-2 text-center sm:text-left",e),...n});qp.displayName="SheetHeader";const Vp=x.forwardRef(({className:e,...n},r)=>g.jsx($o,{ref:r,className:fe("text-lg font-semibold text-foreground",e),...n}));Vp.displayName=$o.displayName;const gw=x.forwardRef(({className:e,...n},r)=>g.jsx(Go,{ref:r,className:fe("text-sm text-muted-foreground",e),...n}));gw.displayName=Go.displayName;function sb({className:e,...n}){return g.jsx("div",{className:fe("animate-pulse rounded-md bg-muted",e),...n})}const yD=["top","right","bottom","left"],ya=Math.min,yn=Math.max,Yu=Math.round,Cu=Math.floor,ur=e=>({x:e,y:e}),vD={left:"right",right:"left",bottom:"top",top:"bottom"},xD={start:"end",end:"start"};function Xh(e,n,r){return yn(e,ya(n,r))}function Lr(e,n){return typeof e=="function"?e(n):e}function zr(e){return e.split("-")[0]}function cl(e){return e.split("-")[1]}function $p(e){return e==="x"?"y":"x"}function Gp(e){return e==="y"?"height":"width"}const bD=new Set(["top","bottom"]);function sr(e){return bD.has(zr(e))?"y":"x"}function Yp(e){return $p(sr(e))}function wD(e,n,r){r===void 0&&(r=!1);const i=cl(e),o=Yp(e),s=Gp(o);let c=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=Ku(c)),[c,Ku(c)]}function SD(e){const n=Ku(e);return[Qh(e),n,Qh(n)]}function Qh(e){return e.replace(/start|end/g,n=>xD[n])}const ub=["left","right"],cb=["right","left"],ED=["top","bottom"],kD=["bottom","top"];function CD(e,n,r){switch(e){case"top":case"bottom":return r?n?cb:ub:n?ub:cb;case"left":case"right":return n?ED:kD;default:return[]}}function AD(e,n,r,i){const o=cl(e);let s=CD(zr(e),r==="start",i);return o&&(s=s.map(c=>c+"-"+o),n&&(s=s.concat(s.map(Qh)))),s}function Ku(e){return e.replace(/left|right|bottom|top/g,n=>vD[n])}function TD(e){return{top:0,right:0,bottom:0,left:0,...e}}function yw(e){return typeof e!="number"?TD(e):{top:e,right:e,bottom:e,left:e}}function Xu(e){const{x:n,y:r,width:i,height:o}=e;return{width:i,height:o,top:r,left:n,right:n+i,bottom:r+o,x:n,y:r}}function fb(e,n,r){let{reference:i,floating:o}=e;const s=sr(n),c=Yp(n),f=Gp(c),h=zr(n),d=s==="y",m=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,b=i[f]/2-o[f]/2;let w;switch(h){case"top":w={x:m,y:i.y-o.height};break;case"bottom":w={x:m,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y};break;case"left":w={x:i.x-o.width,y};break;default:w={x:i.x,y:i.y}}switch(cl(n)){case"start":w[c]-=b*(r&&d?-1:1);break;case"end":w[c]+=b*(r&&d?-1:1);break}return w}const RD=async(e,n,r)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:c}=r,f=s.filter(Boolean),h=await(c.isRTL==null?void 0:c.isRTL(n));let d=await c.getElementRects({reference:e,floating:n,strategy:o}),{x:m,y}=fb(d,i,h),b=i,w={},k=0;for(let C=0;C<f.length;C++){const{name:T,fn:A}=f[C],{x:_,y:N,data:O,reset:z}=await A({x:m,y,initialPlacement:i,placement:b,strategy:o,middlewareData:w,rects:d,platform:c,elements:{reference:e,floating:n}});m=_??m,y=N??y,w={...w,[T]:{...w[T],...O}},z&&k<=50&&(k++,typeof z=="object"&&(z.placement&&(b=z.placement),z.rects&&(d=z.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:o}):z.rects),{x:m,y}=fb(d,b,h)),C=-1)}return{x:m,y,placement:b,strategy:o,middlewareData:w}};async function _o(e,n){var r;n===void 0&&(n={});const{x:i,y:o,platform:s,rects:c,elements:f,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:b=!1,padding:w=0}=Lr(n,e),k=yw(w),T=f[b?y==="floating"?"reference":"floating":y],A=Xu(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(T)))==null||r?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:d,rootBoundary:m,strategy:h})),_=y==="floating"?{x:i,y:o,width:c.floating.width,height:c.floating.height}:c.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},z=Xu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:_,offsetParent:N,strategy:h}):_);return{top:(A.top-z.top+k.top)/O.y,bottom:(z.bottom-A.bottom+k.bottom)/O.y,left:(A.left-z.left+k.left)/O.x,right:(z.right-A.right+k.right)/O.x}}const _D=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:i,placement:o,rects:s,platform:c,elements:f,middlewareData:h}=n,{element:d,padding:m=0}=Lr(e,n)||{};if(d==null)return{};const y=yw(m),b={x:r,y:i},w=Yp(o),k=Gp(w),C=await c.getDimensions(d),T=w==="y",A=T?"top":"left",_=T?"bottom":"right",N=T?"clientHeight":"clientWidth",O=s.reference[k]+s.reference[w]-b[w]-s.floating[k],z=b[w]-s.reference[w],j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d));let $=j?j[N]:0;(!$||!await(c.isElement==null?void 0:c.isElement(j)))&&($=f.floating[N]||s.floating[k]);const G=O/2-z/2,ee=$/2-C[k]/2-1,P=ya(y[A],ee),ne=ya(y[_],ee),ae=P,le=$-C[k]-ne,H=$/2-C[k]/2+G,Q=Xh(ae,H,le),L=!h.arrow&&cl(o)!=null&&H!==Q&&s.reference[k]/2-(H<ae?P:ne)-C[k]/2<0,K=L?H<ae?H-ae:H-le:0;return{[w]:b[w]+K,data:{[w]:Q,centerOffset:H-Q-K,...L&&{alignmentOffset:K}},reset:L}}}),ND=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,i;const{placement:o,middlewareData:s,rects:c,initialPlacement:f,platform:h,elements:d}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:C=!0,...T}=Lr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const A=zr(o),_=sr(f),N=zr(f)===f,O=await(h.isRTL==null?void 0:h.isRTL(d.floating)),z=b||(N||!C?[Ku(f)]:SD(f)),j=k!=="none";!b&&j&&z.push(...AD(f,C,k,O));const $=[f,...z],G=await _o(n,T),ee=[];let P=((i=s.flip)==null?void 0:i.overflows)||[];if(m&&ee.push(G[A]),y){const H=wD(o,c,O);ee.push(G[H[0]],G[H[1]])}if(P=[...P,{placement:o,overflows:ee}],!ee.every(H=>H<=0)){var ne,ae;const H=(((ne=s.flip)==null?void 0:ne.index)||0)+1,Q=$[H];if(Q&&(!(y==="alignment"?_!==sr(Q):!1)||P.every(U=>sr(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:H,overflows:P},reset:{placement:Q}};let L=(ae=P.filter(K=>K.overflows[0]<=0).sort((K,U)=>K.overflows[1]-U.overflows[1])[0])==null?void 0:ae.placement;if(!L)switch(w){case"bestFit":{var le;const K=(le=P.filter(U=>{if(j){const J=sr(U.placement);return J===_||J==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(J=>J>0).reduce((J,E)=>J+E,0)]).sort((U,J)=>U[1]-J[1])[0])==null?void 0:le[0];K&&(L=K);break}case"initialPlacement":L=f;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function db(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function hb(e){return yD.some(n=>e[n]>=0)}const MD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:i="referenceHidden",...o}=Lr(e,n);switch(i){case"referenceHidden":{const s=await _o(n,{...o,elementContext:"reference"}),c=db(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:hb(c)}}}case"escaped":{const s=await _o(n,{...o,altBoundary:!0}),c=db(s,r.floating);return{data:{escapedOffsets:c,escaped:hb(c)}}}default:return{}}}}},vw=new Set(["left","top"]);async function jD(e,n){const{placement:r,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=zr(r),f=cl(r),h=sr(r)==="y",d=vw.has(c)?-1:1,m=s&&h?-1:1,y=Lr(n,e);let{mainAxis:b,crossAxis:w,alignmentAxis:k}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof k=="number"&&(w=f==="end"?k*-1:k),h?{x:w*m,y:b*d}:{x:b*d,y:w*m}}const DD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,i;const{x:o,y:s,placement:c,middlewareData:f}=n,h=await jD(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:o+h.x,y:s+h.y,data:{...h,placement:c}}}}},OD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:i,placement:o}=n,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:T=>{let{x:A,y:_}=T;return{x:A,y:_}}},...h}=Lr(e,n),d={x:r,y:i},m=await _o(n,h),y=sr(zr(o)),b=$p(y);let w=d[b],k=d[y];if(s){const T=b==="y"?"top":"left",A=b==="y"?"bottom":"right",_=w+m[T],N=w-m[A];w=Xh(_,w,N)}if(c){const T=y==="y"?"top":"left",A=y==="y"?"bottom":"right",_=k+m[T],N=k-m[A];k=Xh(_,k,N)}const C=f.fn({...n,[b]:w,[y]:k});return{...C,data:{x:C.x-r,y:C.y-i,enabled:{[b]:s,[y]:c}}}}}},LD=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:i,placement:o,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:h=!0,crossAxis:d=!0}=Lr(e,n),m={x:r,y:i},y=sr(o),b=$p(y);let w=m[b],k=m[y];const C=Lr(f,n),T=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(h){const N=b==="y"?"height":"width",O=s.reference[b]-s.floating[N]+T.mainAxis,z=s.reference[b]+s.reference[N]-T.mainAxis;w<O?w=O:w>z&&(w=z)}if(d){var A,_;const N=b==="y"?"width":"height",O=vw.has(zr(o)),z=s.reference[y]-s.floating[N]+(O&&((A=c.offset)==null?void 0:A[y])||0)+(O?0:T.crossAxis),j=s.reference[y]+s.reference[N]+(O?0:((_=c.offset)==null?void 0:_[y])||0)-(O?T.crossAxis:0);k<z?k=z:k>j&&(k=j)}return{[b]:w,[y]:k}}}},zD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,i;const{placement:o,rects:s,platform:c,elements:f}=n,{apply:h=()=>{},...d}=Lr(e,n),m=await _o(n,d),y=zr(o),b=cl(o),w=sr(o)==="y",{width:k,height:C}=s.floating;let T,A;y==="top"||y==="bottom"?(T=y,A=b===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(A=y,T=b==="end"?"top":"bottom");const _=C-m.top-m.bottom,N=k-m.left-m.right,O=ya(C-m[T],_),z=ya(k-m[A],N),j=!n.middlewareData.shift;let $=O,G=z;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(G=N),(i=n.middlewareData.shift)!=null&&i.enabled.y&&($=_),j&&!b){const P=yn(m.left,0),ne=yn(m.right,0),ae=yn(m.top,0),le=yn(m.bottom,0);w?G=k-2*(P!==0||ne!==0?P+ne:yn(m.left,m.right)):$=C-2*(ae!==0||le!==0?ae+le:yn(m.top,m.bottom))}await h({...n,availableWidth:G,availableHeight:$});const ee=await c.getDimensions(f.floating);return k!==ee.width||C!==ee.height?{reset:{rects:!0}}:{}}}};function vc(){return typeof window<"u"}function fl(e){return xw(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function dr(e){var n;return(n=(xw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function xw(e){return vc()?e instanceof Node||e instanceof vn(e).Node:!1}function Gn(e){return vc()?e instanceof Element||e instanceof vn(e).Element:!1}function fr(e){return vc()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function pb(e){return!vc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const PD=new Set(["inline","contents"]);function Yo(e){const{overflow:n,overflowX:r,overflowY:i,display:o}=Yn(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!PD.has(o)}const ID=new Set(["table","td","th"]);function BD(e){return ID.has(fl(e))}const UD=[":popover-open",":modal"];function xc(e){return UD.some(n=>{try{return e.matches(n)}catch{return!1}})}const HD=["transform","translate","scale","rotate","perspective"],FD=["transform","translate","scale","rotate","perspective","filter"],qD=["paint","layout","strict","content"];function Kp(e){const n=Xp(),r=Gn(e)?Yn(e):e;return HD.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||FD.some(i=>(r.willChange||"").includes(i))||qD.some(i=>(r.contain||"").includes(i))}function VD(e){let n=va(e);for(;fr(n)&&!Ji(n);){if(Kp(n))return n;if(xc(n))return null;n=va(n)}return null}function Xp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const $D=new Set(["html","body","#document"]);function Ji(e){return $D.has(fl(e))}function Yn(e){return vn(e).getComputedStyle(e)}function bc(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function va(e){if(fl(e)==="html")return e;const n=e.assignedSlot||e.parentNode||pb(e)&&e.host||dr(e);return pb(n)?n.host:n}function bw(e){const n=va(e);return Ji(n)?e.ownerDocument?e.ownerDocument.body:e.body:fr(n)&&Yo(n)?n:bw(n)}function No(e,n,r){var i;n===void 0&&(n=[]),r===void 0&&(r=!0);const o=bw(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),c=vn(o);if(s){const f=Zh(c);return n.concat(c,c.visualViewport||[],Yo(o)?o:[],f&&r?No(f):[])}return n.concat(o,No(o,[],r))}function Zh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ww(e){const n=Yn(e);let r=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=fr(e),s=o?e.offsetWidth:r,c=o?e.offsetHeight:i,f=Yu(r)!==s||Yu(i)!==c;return f&&(r=s,i=c),{width:r,height:i,$:f}}function Qp(e){return Gn(e)?e:e.contextElement}function Xi(e){const n=Qp(e);if(!fr(n))return ur(1);const r=n.getBoundingClientRect(),{width:i,height:o,$:s}=ww(n);let c=(s?Yu(r.width):r.width)/i,f=(s?Yu(r.height):r.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const GD=ur(0);function Sw(e){const n=vn(e);return!Xp()||!n.visualViewport?GD:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function YD(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==vn(e)?!1:n}function Ya(e,n,r,i){n===void 0&&(n=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Qp(e);let c=ur(1);n&&(i?Gn(i)&&(c=Xi(i)):c=Xi(e));const f=YD(s,r,i)?Sw(s):ur(0);let h=(o.left+f.x)/c.x,d=(o.top+f.y)/c.y,m=o.width/c.x,y=o.height/c.y;if(s){const b=vn(s),w=i&&Gn(i)?vn(i):i;let k=b,C=Zh(k);for(;C&&i&&w!==k;){const T=Xi(C),A=C.getBoundingClientRect(),_=Yn(C),N=A.left+(C.clientLeft+parseFloat(_.paddingLeft))*T.x,O=A.top+(C.clientTop+parseFloat(_.paddingTop))*T.y;h*=T.x,d*=T.y,m*=T.x,y*=T.y,h+=N,d+=O,k=vn(C),C=Zh(k)}}return Xu({width:m,height:y,x:h,y:d})}function Zp(e,n){const r=bc(e).scrollLeft;return n?n.left+r:Ya(dr(e)).left+r}function Ew(e,n,r){r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=i.left+n.scrollLeft-(r?0:Zp(e,i)),s=i.top+n.scrollTop;return{x:o,y:s}}function KD(e){let{elements:n,rect:r,offsetParent:i,strategy:o}=e;const s=o==="fixed",c=dr(i),f=n?xc(n.floating):!1;if(i===c||f&&s)return r;let h={scrollLeft:0,scrollTop:0},d=ur(1);const m=ur(0),y=fr(i);if((y||!y&&!s)&&((fl(i)!=="body"||Yo(c))&&(h=bc(i)),fr(i))){const w=Ya(i);d=Xi(i),m.x=w.x+i.clientLeft,m.y=w.y+i.clientTop}const b=c&&!y&&!s?Ew(c,h,!0):ur(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-h.scrollLeft*d.x+m.x+b.x,y:r.y*d.y-h.scrollTop*d.y+m.y+b.y}}function XD(e){return Array.from(e.getClientRects())}function QD(e){const n=dr(e),r=bc(e),i=e.ownerDocument.body,o=yn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=yn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+Zp(e);const f=-r.scrollTop;return Yn(i).direction==="rtl"&&(c+=yn(n.clientWidth,i.clientWidth)-o),{width:o,height:s,x:c,y:f}}function ZD(e,n){const r=vn(e),i=dr(e),o=r.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,h=0;if(o){s=o.width,c=o.height;const d=Xp();(!d||d&&n==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}return{width:s,height:c,x:f,y:h}}const WD=new Set(["absolute","fixed"]);function JD(e,n){const r=Ya(e,!0,n==="fixed"),i=r.top+e.clientTop,o=r.left+e.clientLeft,s=fr(e)?Xi(e):ur(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,h=o*s.x,d=i*s.y;return{width:c,height:f,x:h,y:d}}function mb(e,n,r){let i;if(n==="viewport")i=ZD(e,r);else if(n==="document")i=QD(dr(e));else if(Gn(n))i=JD(n,r);else{const o=Sw(e);i={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Xu(i)}function kw(e,n){const r=va(e);return r===n||!Gn(r)||Ji(r)?!1:Yn(r).position==="fixed"||kw(r,n)}function eO(e,n){const r=n.get(e);if(r)return r;let i=No(e,[],!1).filter(f=>Gn(f)&&fl(f)!=="body"),o=null;const s=Yn(e).position==="fixed";let c=s?va(e):e;for(;Gn(c)&&!Ji(c);){const f=Yn(c),h=Kp(c);!h&&f.position==="fixed"&&(o=null),(s?!h&&!o:!h&&f.position==="static"&&!!o&&WD.has(o.position)||Yo(c)&&!h&&kw(e,c))?i=i.filter(m=>m!==c):o=f,c=va(c)}return n.set(e,i),i}function tO(e){let{element:n,boundary:r,rootBoundary:i,strategy:o}=e;const c=[...r==="clippingAncestors"?xc(n)?[]:eO(n,this._c):[].concat(r),i],f=c[0],h=c.reduce((d,m)=>{const y=mb(n,m,o);return d.top=yn(y.top,d.top),d.right=ya(y.right,d.right),d.bottom=ya(y.bottom,d.bottom),d.left=yn(y.left,d.left),d},mb(n,f,o));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function nO(e){const{width:n,height:r}=ww(e);return{width:n,height:r}}function rO(e,n,r){const i=fr(n),o=dr(n),s=r==="fixed",c=Ya(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const h=ur(0);function d(){h.x=Zp(o)}if(i||!i&&!s)if((fl(n)!=="body"||Yo(o))&&(f=bc(n)),i){const w=Ya(n,!0,s,n);h.x=w.x+n.clientLeft,h.y=w.y+n.clientTop}else o&&d();s&&!i&&o&&d();const m=o&&!i&&!s?Ew(o,f):ur(0),y=c.left+f.scrollLeft-h.x-m.x,b=c.top+f.scrollTop-h.y-m.y;return{x:y,y:b,width:c.width,height:c.height}}function ph(e){return Yn(e).position==="static"}function gb(e,n){if(!fr(e)||Yn(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return dr(e)===r&&(r=r.ownerDocument.body),r}function Cw(e,n){const r=vn(e);if(xc(e))return r;if(!fr(e)){let o=va(e);for(;o&&!Ji(o);){if(Gn(o)&&!ph(o))return o;o=va(o)}return r}let i=gb(e,n);for(;i&&BD(i)&&ph(i);)i=gb(i,n);return i&&Ji(i)&&ph(i)&&!Kp(i)?r:i||VD(e)||r}const aO=async function(e){const n=this.getOffsetParent||Cw,r=this.getDimensions,i=await r(e.floating);return{reference:rO(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function iO(e){return Yn(e).direction==="rtl"}const lO={convertOffsetParentRelativeRectToViewportRelativeRect:KD,getDocumentElement:dr,getClippingRect:tO,getOffsetParent:Cw,getElementRects:aO,getClientRects:XD,getDimensions:nO,getScale:Xi,isElement:Gn,isRTL:iO};function Aw(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function oO(e,n){let r=null,i;const o=dr(e);function s(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),s();const d=e.getBoundingClientRect(),{left:m,top:y,width:b,height:w}=d;if(f||n(),!b||!w)return;const k=Cu(y),C=Cu(o.clientWidth-(m+b)),T=Cu(o.clientHeight-(y+w)),A=Cu(m),N={rootMargin:-k+"px "+-C+"px "+-T+"px "+-A+"px",threshold:yn(0,ya(1,h))||1};let O=!0;function z(j){const $=j[0].intersectionRatio;if($!==h){if(!O)return c();$?c(!1,$):i=setTimeout(()=>{c(!1,1e-7)},1e3)}$===1&&!Aw(d,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(z,{...N,root:o.ownerDocument})}catch{r=new IntersectionObserver(z,N)}r.observe(e)}return c(!0),s}function sO(e,n,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,d=Qp(e),m=o||s?[...d?No(d):[],...No(n)]:[];m.forEach(A=>{o&&A.addEventListener("scroll",r,{passive:!0}),s&&A.addEventListener("resize",r)});const y=d&&f?oO(d,r):null;let b=-1,w=null;c&&(w=new ResizeObserver(A=>{let[_]=A;_&&_.target===d&&w&&(w.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=w)==null||N.observe(n)})),r()}),d&&!h&&w.observe(d),w.observe(n));let k,C=h?Ya(e):null;h&&T();function T(){const A=Ya(e);C&&!Aw(C,A)&&r(),C=A,k=requestAnimationFrame(T)}return r(),()=>{var A;m.forEach(_=>{o&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),y?.(),(A=w)==null||A.disconnect(),w=null,h&&cancelAnimationFrame(k)}}const uO=DD,cO=OD,fO=ND,dO=zD,hO=MD,yb=_D,pO=LD,mO=(e,n,r)=>{const i=new Map,o={platform:lO,...r},s={...o.platform,_c:i};return RD(e,n,{...o,platform:s})};var gO=typeof document<"u",yO=function(){},Iu=gO?x.useLayoutEffect:yO;function Qu(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,i,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(i=r;i--!==0;)if(!Qu(e[i],n[i]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){const s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!Qu(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function Tw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vb(e,n){const r=Tw(e);return Math.round(n*r)/r}function mh(e){const n=x.useRef(e);return Iu(()=>{n.current=e}),n}function vO(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:h,open:d}=e,[m,y]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,w]=x.useState(i);Qu(b,i)||w(i);const[k,C]=x.useState(null),[T,A]=x.useState(null),_=x.useCallback(U=>{U!==j.current&&(j.current=U,C(U))},[]),N=x.useCallback(U=>{U!==$.current&&($.current=U,A(U))},[]),O=s||k,z=c||T,j=x.useRef(null),$=x.useRef(null),G=x.useRef(m),ee=h!=null,P=mh(h),ne=mh(o),ae=mh(d),le=x.useCallback(()=>{if(!j.current||!$.current)return;const U={placement:n,strategy:r,middleware:b};ne.current&&(U.platform=ne.current),mO(j.current,$.current,U).then(J=>{const E={...J,isPositioned:ae.current!==!1};H.current&&!Qu(G.current,E)&&(G.current=E,oc.flushSync(()=>{y(E)}))})},[b,n,r,ne,ae]);Iu(()=>{d===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,y(U=>({...U,isPositioned:!1})))},[d]);const H=x.useRef(!1);Iu(()=>(H.current=!0,()=>{H.current=!1}),[]),Iu(()=>{if(O&&(j.current=O),z&&($.current=z),O&&z){if(P.current)return P.current(O,z,le);le()}},[O,z,le,P,ee]);const Q=x.useMemo(()=>({reference:j,floating:$,setReference:_,setFloating:N}),[_,N]),L=x.useMemo(()=>({reference:O,floating:z}),[O,z]),K=x.useMemo(()=>{const U={position:r,left:0,top:0};if(!L.floating)return U;const J=vb(L.floating,m.x),E=vb(L.floating,m.y);return f?{...U,transform:"translate("+J+"px, "+E+"px)",...Tw(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:J,top:E}},[r,f,L.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:le,refs:Q,elements:L,floatingStyles:K}),[m,le,Q,L,K])}const xO=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:o}=typeof e=="function"?e(r):e;return i&&n(i)?i.current!=null?yb({element:i.current,padding:o}).fn(r):{}:i?yb({element:i,padding:o}).fn(r):{}}}},bO=(e,n)=>({...uO(e),options:[e,n]}),wO=(e,n)=>({...cO(e),options:[e,n]}),SO=(e,n)=>({...pO(e),options:[e,n]}),EO=(e,n)=>({...fO(e),options:[e,n]}),kO=(e,n)=>({...dO(e),options:[e,n]}),CO=(e,n)=>({...hO(e),options:[e,n]}),AO=(e,n)=>({...xO(e),options:[e,n]});var TO="Arrow",Rw=x.forwardRef((e,n)=>{const{children:r,width:i=10,height:o=5,...s}=e;return g.jsx(Fe.svg,{...s,ref:n,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rw.displayName=TO;var RO=Rw;function _w(e){const[n,r]=x.useState(void 0);return cr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,f;if("borderBoxSize"in s){const h=s.borderBoxSize,d=Array.isArray(h)?h[0]:h;c=d.inlineSize,f=d.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),n}var Wp="Popper",[Nw,wc]=Xn(Wp),[_O,Mw]=Nw(Wp),jw=e=>{const{__scopePopper:n,children:r}=e,[i,o]=x.useState(null);return g.jsx(_O,{scope:n,anchor:i,onAnchorChange:o,children:r})};jw.displayName=Wp;var Dw="PopperAnchor",Ow=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:i,...o}=e,s=Mw(Dw,r),c=x.useRef(null),f=Xe(n,c),h=x.useRef(null);return x.useEffect(()=>{const d=h.current;h.current=i?.current||c.current,d!==h.current&&s.onAnchorChange(h.current)}),i?null:g.jsx(Fe.div,{...o,ref:f})});Ow.displayName=Dw;var Jp="PopperContent",[NO,MO]=Nw(Jp),Lw=x.forwardRef((e,n)=>{const{__scopePopper:r,side:i="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:k,...C}=e,T=Mw(Jp,r),[A,_]=x.useState(null),N=Xe(n,xe=>_(xe)),[O,z]=x.useState(null),j=_w(O),$=j?.width??0,G=j?.height??0,ee=i+(s!=="center"?"-"+s:""),P=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ne=Array.isArray(d)?d:[d],ae=ne.length>0,le={padding:P,boundary:ne.filter(DO),altBoundary:ae},{refs:H,floatingStyles:Q,placement:L,isPositioned:K,middlewareData:U}=vO({strategy:"fixed",placement:ee,whileElementsMounted:(...xe)=>sO(...xe,{animationFrame:w==="always"}),elements:{reference:T.anchor},middleware:[bO({mainAxis:o+G,alignmentAxis:c}),h&&wO({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?SO():void 0,...le}),h&&EO({...le}),kO({...le,apply:({elements:xe,rects:Ee,availableWidth:Qe,availableHeight:bt})=>{const{width:Rt,height:It}=Ee.reference,Gt=xe.floating.style;Gt.setProperty("--radix-popper-available-width",`${Qe}px`),Gt.setProperty("--radix-popper-available-height",`${bt}px`),Gt.setProperty("--radix-popper-anchor-width",`${Rt}px`),Gt.setProperty("--radix-popper-anchor-height",`${It}px`)}}),O&&AO({element:O,padding:f}),OO({arrowWidth:$,arrowHeight:G}),b&&CO({strategy:"referenceHidden",...le})]}),[J,E]=Iw(L),Z=kt(k);cr(()=>{K&&Z?.()},[K,Z]);const oe=U.arrow?.x,M=U.arrow?.y,se=U.arrow?.centerOffset!==0,[Se,he]=x.useState();return cr(()=>{A&&he(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:K?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(NO,{scope:r,placedSide:J,onArrowChange:z,arrowX:oe,arrowY:M,shouldHideArrow:se,children:g.jsx(Fe.div,{"data-side":J,"data-align":E,...C,ref:N,style:{...C.style,animation:K?void 0:"none"}})})})});Lw.displayName=Jp;var zw="PopperArrow",jO={top:"bottom",right:"left",bottom:"top",left:"right"},Pw=x.forwardRef(function(n,r){const{__scopePopper:i,...o}=n,s=MO(zw,i),c=jO[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(RO,{...o,ref:r,style:{...o.style,display:"block"}})})});Pw.displayName=zw;function DO(e){return e!==null}var OO=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:i,middlewareData:o}=n,c=o.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[d,m]=Iw(r),y={start:"0%",center:"50%",end:"100%"}[m],b=(o.arrow?.x??0)+f/2,w=(o.arrow?.y??0)+h/2;let k="",C="";return d==="bottom"?(k=c?y:`${b}px`,C=`${-h}px`):d==="top"?(k=c?y:`${b}px`,C=`${i.floating.height+h}px`):d==="right"?(k=`${-h}px`,C=c?y:`${w}px`):d==="left"&&(k=`${i.floating.width+h}px`,C=c?y:`${w}px`),{data:{x:k,y:C}}}});function Iw(e){const[n,r="center"]=e.split("-");return[n,r]}var Bw=jw,Uw=Ow,Hw=Lw,Fw=Pw,[Sc,bB]=Xn("Tooltip",[wc]),Ec=wc(),qw="TooltipProvider",LO=700,Wh="tooltip.open",[zO,em]=Sc(qw),Vw=e=>{const{__scopeTooltip:n,delayDuration:r=LO,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:s}=e,c=x.useRef(!0),f=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),g.jsx(zO,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(h.current),c.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(d=>{f.current=d},[]),disableHoverableContent:o,children:s})};Vw.displayName=qw;var Mo="Tooltip",[PO,kc]=Sc(Mo),$w=e=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,h=em(Mo,e.__scopeTooltip),d=Ec(n),[m,y]=x.useState(null),b=$a(),w=x.useRef(0),k=c??h.disableHoverableContent,C=f??h.delayDuration,T=x.useRef(!1),[A,_]=ol({prop:i,defaultProp:o??!1,onChange:$=>{$?(h.onOpen(),document.dispatchEvent(new CustomEvent(Wh))):h.onClose(),s?.($)},caller:Mo}),N=x.useMemo(()=>A?T.current?"delayed-open":"instant-open":"closed",[A]),O=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,T.current=!1,_(!0)},[_]),z=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,_(!1)},[_]),j=x.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{T.current=!0,_(!0),w.current=0},C)},[C,_]);return x.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),g.jsx(Bw,{...d,children:g.jsx(PO,{scope:n,contentId:b,open:A,stateAttribute:N,trigger:m,onTriggerChange:y,onTriggerEnter:x.useCallback(()=>{h.isOpenDelayedRef.current?j():O()},[h.isOpenDelayedRef,j,O]),onTriggerLeave:x.useCallback(()=>{k?z():(window.clearTimeout(w.current),w.current=0)},[z,k]),onOpen:O,onClose:z,disableHoverableContent:k,children:r})})};$w.displayName=Mo;var Jh="TooltipTrigger",Gw=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,o=kc(Jh,r),s=em(Jh,r),c=Ec(r),f=x.useRef(null),h=Xe(n,f,o.onTriggerChange),d=x.useRef(!1),m=x.useRef(!1),y=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Uw,{asChild:!0,...c,children:g.jsx(Fe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:h,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:pe(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:pe(e.onBlur,o.onClose),onClick:pe(e.onClick,o.onClose)})})});Gw.displayName=Jh;var IO="TooltipPortal",[wB,BO]=Sc(IO,{forceMount:void 0}),el="TooltipContent",Yw=x.forwardRef((e,n)=>{const r=BO(el,e.__scopeTooltip),{forceMount:i=r.forceMount,side:o="top",...s}=e,c=kc(el,e.__scopeTooltip);return g.jsx(Zt,{present:i||c.open,children:c.disableHoverableContent?g.jsx(Kw,{side:o,...s,ref:n}):g.jsx(UO,{side:o,...s,ref:n})})}),UO=x.forwardRef((e,n)=>{const r=kc(el,e.__scopeTooltip),i=em(el,e.__scopeTooltip),o=x.useRef(null),s=Xe(n,o),[c,f]=x.useState(null),{trigger:h,onClose:d}=r,m=o.current,{onPointerInTransitChange:y}=i,b=x.useCallback(()=>{f(null),y(!1)},[y]),w=x.useCallback((k,C)=>{const T=k.currentTarget,A={x:k.clientX,y:k.clientY},_=$O(A,T.getBoundingClientRect()),N=GO(A,_),O=YO(C.getBoundingClientRect()),z=XO([...N,...O]);f(z),y(!0)},[y]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(h&&m){const k=T=>w(T,m),C=T=>w(T,h);return h.addEventListener("pointerleave",k),m.addEventListener("pointerleave",C),()=>{h.removeEventListener("pointerleave",k),m.removeEventListener("pointerleave",C)}}},[h,m,w,b]),x.useEffect(()=>{if(c){const k=C=>{const T=C.target,A={x:C.clientX,y:C.clientY},_=h?.contains(T)||m?.contains(T),N=!KO(A,c);_?b():N&&(b(),d())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[h,m,c,d,b]),g.jsx(Kw,{...e,ref:s})}),[HO,FO]=Sc(Mo,{isInside:!1}),qO=G0("TooltipContent"),Kw=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:i,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,h=kc(el,r),d=Ec(r),{onClose:m}=h;return x.useEffect(()=>(document.addEventListener(Wh,m),()=>document.removeEventListener(Wh,m)),[m]),x.useEffect(()=>{if(h.trigger){const y=b=>{b.target?.contains(h.trigger)&&m()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,m]),g.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:m,children:g.jsxs(Hw,{"data-state":h.stateAttribute,...d,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(qO,{children:i}),g.jsx(HO,{scope:r,isInside:!0,children:g.jsx(v_,{id:h.contentId,role:"tooltip",children:o||i})})]})})});Yw.displayName=el;var Xw="TooltipArrow",VO=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,o=Ec(r);return FO(Xw,r).isInside?null:g.jsx(Fw,{...o,...i,ref:n})});VO.displayName=Xw;function $O(e,n){const r=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,i,o,s)){case s:return"left";case o:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function GO(e,n,r=5){const i=[];switch(n){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function YO(e){const{top:n,right:r,bottom:i,left:o}=e;return[{x:o,y:n},{x:r,y:n},{x:r,y:i},{x:o,y:i}]}function KO(e,n){const{x:r,y:i}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],h=n[c],d=f.x,m=f.y,y=h.x,b=h.y;m>i!=b>i&&r<(y-d)*(i-m)/(b-m)+d&&(o=!o)}return o}function XO(e){const n=e.slice();return n.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),QO(n)}function QO(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const o=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}n.pop();const r=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))r.pop();else break}r.push(o)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var ZO=Vw,WO=$w,JO=Gw,Qw=Yw;const e4=ZO,t4=WO,n4=JO,Zw=x.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(Qw,{ref:i,sideOffset:n,className:fe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Zw.displayName=Qw.displayName;const r4="sidebar_state",a4=3600*24*7,i4="16rem",l4="18rem",o4="3rem",s4="b",Ww=x.createContext(null);function Cc(){const e=x.useContext(Ww);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Jw=x.forwardRef(({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:o,children:s,...c},f)=>{const h=O1(),[d,m]=x.useState(!1),[y,b]=x.useState(e),w=n??y,k=x.useCallback(_=>{const N=typeof _=="function"?_(w):_;r?r(N):b(N),document.cookie=`${r4}=${N}; path=/; max-age=${a4}`},[r,w]),C=x.useCallback(()=>h?m(_=>!_):k(_=>!_),[h,k,m]);x.useEffect(()=>{const _=N=>{N.key===s4&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),C())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[C]);const T=w?"expanded":"collapsed",A=x.useMemo(()=>({state:T,open:w,setOpen:k,isMobile:h,openMobile:d,setOpenMobile:m,toggleSidebar:C}),[T,w,k,h,d,m,C]);return g.jsx(Ww.Provider,{value:A,children:g.jsx(e4,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":i4,"--sidebar-width-icon":o4,...o},className:fe("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:f,...c,children:s})})})});Jw.displayName="SidebarProvider";const eS=x.forwardRef(({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:o,...s},c)=>{const{isMobile:f,state:h,openMobile:d,setOpenMobile:m}=Cc();return r==="none"?g.jsx("div",{className:fe("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:c,...s,children:o}):f?g.jsx(pw,{open:d,onOpenChange:m,...s,children:g.jsxs(Fp,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":l4},side:e,children:[g.jsxs(qp,{className:"sr-only",children:[g.jsx(Vp,{children:"Sidebar"}),g.jsx(gw,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):g.jsxs("div",{ref:c,className:"group peer hidden text-sidebar-foreground md:block","data-state":h,"data-collapsible":h==="collapsed"?r:"","data-variant":n,"data-side":e,children:[g.jsx("div",{className:fe("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:fe("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});eS.displayName="Sidebar";const tS=x.forwardRef(({className:e,onClick:n,...r},i)=>{const{toggleSidebar:o}=Cc();return g.jsxs(pt,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:fe("h-7 w-7",e),onClick:s=>{n?.(s),o()},...r,children:[g.jsx(HN,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});tS.displayName="SidebarTrigger";const u4=x.forwardRef(({className:e,...n},r)=>{const{toggleSidebar:i}=Cc();return g.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:fe("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})});u4.displayName="SidebarRail";const nS=x.forwardRef(({className:e,...n},r)=>g.jsx("main",{ref:r,className:fe("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...n}));nS.displayName="SidebarInset";const c4=x.forwardRef(({className:e,...n},r)=>g.jsx(L1,{ref:r,"data-sidebar":"input",className:fe("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...n}));c4.displayName="SidebarInput";const rS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"header",className:fe("flex flex-col gap-2 p-2",e),...n}));rS.displayName="SidebarHeader";const aS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"footer",className:fe("flex flex-col gap-2 p-2",e),...n}));aS.displayName="SidebarFooter";const f4=x.forwardRef(({className:e,...n},r)=>g.jsx(I1,{ref:r,"data-sidebar":"separator",className:fe("mx-2 w-auto bg-sidebar-border",e),...n}));f4.displayName="SidebarSeparator";const iS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"content",className:fe("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n}));iS.displayName="SidebarContent";const yo=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group",className:fe("relative flex w-full min-w-0 flex-col p-2",e),...n}));yo.displayName="SidebarGroup";const Bu=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const o=n?ll:"div";return g.jsx(o,{ref:i,"data-sidebar":"group-label",className:fe("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Bu.displayName="SidebarGroupLabel";const d4=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const o=n?ll:"button";return g.jsx(o,{ref:i,"data-sidebar":"group-action",className:fe("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});d4.displayName="SidebarGroupAction";const vo=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group-content",className:fe("w-full text-sm",e),...n}));vo.displayName="SidebarGroupContent";const Va=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu",className:fe("flex w-full min-w-0 flex-col gap-1",e),...n}));Va.displayName="SidebarMenu";const ha=x.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,"data-sidebar":"menu-item",className:fe("group/menu-item relative",e),...n}));ha.displayName="SidebarMenuItem";const h4=pc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-active data-[active=true]:font-medium data-[active=true]:text-sidebar-active-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),pa=x.forwardRef(({asChild:e=!1,isActive:n=!1,variant:r="default",size:i="default",tooltip:o,className:s,...c},f)=>{const h=e?ll:"button",{isMobile:d,state:m}=Cc(),y=g.jsx(h,{ref:f,"data-sidebar":"menu-button","data-size":i,"data-active":n,className:fe(h4({variant:r,size:i}),s),...c});return o?(typeof o=="string"&&(o={children:o}),g.jsxs(t4,{children:[g.jsx(n4,{asChild:!0,children:y}),g.jsx(Zw,{side:"right",align:"center",hidden:m!=="collapsed"||d,...o})]})):y});pa.displayName="SidebarMenuButton";const p4=x.forwardRef(({className:e,asChild:n=!1,showOnHover:r=!1,...i},o)=>{const s=n?ll:"button";return g.jsx(s,{ref:o,"data-sidebar":"menu-action",className:fe("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-active-foreground md:opacity-0",e),...i})});p4.displayName="SidebarMenuAction";const ep=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:fe("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...n}));ep.displayName="SidebarMenuBadge";const m4=x.forwardRef(({className:e,showIcon:n=!1,...r},i)=>{const o=x.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:fe("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[n&&g.jsx(sb,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(sb,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});m4.displayName="SidebarMenuSkeleton";const lS=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:fe("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...n}));lS.displayName="SidebarMenuSub";const oS=x.forwardRef(({...e},n)=>g.jsx("li",{ref:n,...e}));oS.displayName="SidebarMenuSubItem";const sS=x.forwardRef(({asChild:e=!1,size:n="md",isActive:r,className:i,...o},s)=>{const c=e?ll:"a";return g.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:fe("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-active data-[active=true]:text-sidebar-active-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o})});sS.displayName="SidebarMenuSubButton";const g4="1.0.75-alpha.10",y4={version:g4};function v4({className:e}){return g.jsxs("svg",{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",className:e,children:[g.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),g.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),g.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),g.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}function Ha(e,n){if(n==="/")return e==="/";const r=e.match(/^\/terminal\/([^/]+)/);if(r){const i=r[1];if(n==="/agents")return i.startsWith("cp-")||i.startsWith("sk-");if(n==="/terminal")return!i.startsWith("cp-")&&!i.startsWith("sk-")}return e===n||e.startsWith(n+"/")}const x4=[{title:"Home",url:"/",icon:CN},{title:"Tasks",url:"/tasks",icon:fN},{title:"Skills",url:"/skills",icon:iN}],b4=[{title:"Agents",url:"/agents",icon:So},{title:"Jobs",url:"/schedule",icon:K_},{title:"Utilities",url:"/utilities",icon:bM}],w4=[{title:"Knowledge",url:"/knowledge",icon:G_},{title:"Resources",url:"/resources",icon:yN}],xb=[{title:"Overview",url:"/context/project",icon:Vu},{title:"Architecture",url:"/context/architecture",icon:ZN},{title:"Role",url:"/context/role",icon:gM}],S4=[{title:"Source Control",url:"/git",icon:v1},{title:"Terminal",url:"/terminal",icon:cM},{title:"Identity",url:"/identity",icon:TN},{title:"Activity",url:"/activity",icon:q_}],E4=[{title:"Documentation",url:"https://docs.coconut.dev/studio",icon:BN,external:!0},{title:"Settings",url:"/settings/user",icon:JN}];function k4(){const{badges:e}=BR(),n=bn(),[r,i]=x.useState(!1);return x.useEffect(()=>{xb.some(s=>Ha(n.pathname,s.url))&&i(!0)},[n.pathname]),g.jsxs(eS,{className:"bg-sidebar border-r border-sidebar-border",children:[g.jsx(rS,{children:g.jsx(Va,{children:g.jsx(ha,{children:g.jsx(pa,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:g.jsxs(lr,{to:"/",children:[g.jsx(v4,{className:"size-8"}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs("span",{className:"font-semibold",children:[g.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),g.jsx("span",{children:" Studio"})]}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",y4.version]})]})]})})})})}),g.jsxs(iS,{children:[g.jsx(yo,{children:g.jsx(vo,{children:g.jsx(Va,{children:x4.map(o=>g.jsx(ha,{children:g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title))})})}),g.jsxs(yo,{children:[g.jsx(Bu,{children:"Work"}),g.jsx(vo,{children:g.jsx(Va,{children:b4.map(o=>{let s=0;return o.title==="Agents"&&e.codeSessions>0?s=e.codeSessions:o.title==="Jobs"&&e.runningScheduledJobs>0&&(s=e.runningScheduledJobs),g.jsxs(ha,{children:[g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})}),s>0&&g.jsx(ep,{className:"bg-blue-600 text-white dark:bg-blue-500",children:s})]},o.title)})})})]}),g.jsxs(yo,{children:[g.jsx(Bu,{children:"Assets"}),g.jsx(vo,{children:g.jsxs(Va,{children:[w4.map(o=>g.jsx(ha,{children:g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title)),g.jsxs(ha,{children:[g.jsxs(pa,{onClick:()=>i(o=>!o),"data-state":r?"open":"closed",className:"w-full",children:[g.jsx(xN,{}),g.jsx("span",{children:"Context"}),g.jsx(J_,{className:`ml-auto size-4 shrink-0 transition-transform duration-200 ${r?"rotate-180":""}`})]}),r&&g.jsx(lS,{children:xb.map(o=>g.jsx(oS,{children:g.jsx(sS,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title))})]})]})})]}),g.jsxs(yo,{children:[g.jsx(Bu,{children:"System"}),g.jsx(vo,{children:g.jsx(Va,{children:S4.map(o=>{let s=0;return o.title==="Source Control"&&e.gitChanges>0?s=e.gitChanges:o.title==="Terminal"&&e.terminalSessions>0&&(s=e.terminalSessions),g.jsxs(ha,{children:[g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})}),s>0&&g.jsx(ep,{className:"bg-blue-600 text-white dark:bg-blue-500",children:s})]},o.title)})})})]})]}),g.jsx(aS,{children:g.jsx(Va,{children:E4.map(o=>g.jsx(ha,{children:g.jsx(pa,{asChild:!0,isActive:!o.external&&Ha(n.pathname,o.url==="/settings/user"?"/settings":o.url),children:o.external?g.jsxs("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]}):g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title))})})]})}function C4(e){const n=e.match(/\bres-\d+-[a-z0-9]+\b/g);return n?[...new Set(n)]:[]}const Ac=Up,SB=hw,A4=Hp,uS=x.forwardRef(({className:e,...n},r)=>g.jsx(qo,{ref:r,className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));uS.displayName=qo.displayName;const Ko=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(A4,{children:[g.jsx(uS,{}),g.jsxs(Vo,{ref:i,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(yc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(Yi,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ko.displayName=Vo.displayName;const Xo=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});Xo.displayName="DialogHeader";const cS=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});cS.displayName="DialogFooter";const Qo=x.forwardRef(({className:e,...n},r)=>g.jsx($o,{ref:r,className:fe("text-lg font-semibold leading-none tracking-tight",e),...n}));Qo.displayName=$o.displayName;const xo=x.forwardRef(({className:e,...n},r)=>g.jsx(Go,{ref:r,className:fe("text-sm text-muted-foreground",e),...n}));xo.displayName=Go.displayName;function gh({className:e,...n}){return g.jsx("kbd",{"data-slot":"kbd",className:fe("inline-flex h-5 items-center justify-center rounded border border-muted-foreground/30 bg-muted/50 px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-sm",e),...n})}function EB({className:e,...n}){return g.jsx("span",{"data-slot":"kbd-group",className:fe("inline-flex items-center gap-0.5",e),...n})}function kB(){}function CB(){}function AB(e){const n=[],r=String(e||"");let i=r.indexOf(","),o=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const c=r.slice(o,i).trim();(c||!s)&&n.push(c),o=i+1,i=r.indexOf(",",o)}return n}function T4(e,n){const r=n||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const R4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N4={};function bb(e,n){return(N4.jsx?_4:R4).test(e)}const M4=/[ \t\n\f\r]/g;function j4(e){return typeof e=="object"?e.type==="text"?wb(e.value):!1:wb(e)}function wb(e){return e.replace(M4,"")===""}class Zo{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}Zo.prototype.normal={};Zo.prototype.property={};Zo.prototype.space=void 0;function fS(e,n){const r={},i={};for(const o of e)Object.assign(r,o.property),Object.assign(i,o.normal);return new Zo(r,i,n)}function tp(e){return e.toLowerCase()}class on{constructor(n,r){this.attribute=r,this.property=n}}on.prototype.attribute="";on.prototype.booleanish=!1;on.prototype.boolean=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.commaSeparated=!1;on.prototype.defined=!1;on.prototype.mustUseProperty=!1;on.prototype.number=!1;on.prototype.overloadedBoolean=!1;on.prototype.property="";on.prototype.spaceSeparated=!1;on.prototype.space=void 0;let D4=0;const Le=Xa(),Et=Xa(),np=Xa(),ce=Xa(),lt=Xa(),Qi=Xa(),gn=Xa();function Xa(){return 2**++D4}const rp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Et,commaOrSpaceSeparated:gn,commaSeparated:Qi,number:ce,overloadedBoolean:np,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(rp);class tm extends on{constructor(n,r,i,o){let s=-1;if(super(n,r),Sb(this,"space",o),typeof i=="number")for(;++s<yh.length;){const c=yh[s];Sb(this,yh[s],(i&rp[c])===rp[c])}}}tm.prototype.defined=!0;function Sb(e,n,r){r&&(e[n]=r)}function dl(e){const n={},r={};for(const[i,o]of Object.entries(e.properties)){const s=new tm(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[tp(i)]=i,r[tp(s.attribute)]=i}return new Zo(n,r,e.space)}const dS=dl({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:lt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ce,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:lt,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:Et,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function hS(e,n){return n in e?e[n]:n}function pS(e,n){return hS(e,n.toLowerCase())}const O4=dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qi,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:lt,autoFocus:Le,autoPlay:Le,blocking:lt,capture:null,charSet:null,checked:Le,cite:null,className:lt,cols:ce,colSpan:null,content:null,contentEditable:Et,controls:Le,controlsList:lt,coords:ce|Qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:np,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:lt,height:ce,hidden:np,high:ce,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:lt,itemRef:lt,itemScope:Le,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:ce,pattern:null,ping:lt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:lt,required:Le,reversed:Le,rows:ce,rowSpan:ce,sandbox:lt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:Et,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:pS}),L4=dl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gn,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qi,g2:Qi,glyphName:Qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ce,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hS}),mS=dl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),gS=dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pS}),yS=dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),z4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},P4=/[A-Z]/g,Eb=/-[a-z]/g,I4=/^data[-\w.:]+$/i;function B4(e,n){const r=tp(n);let i=n,o=on;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&I4.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Eb,H4);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Eb.test(s)){let c=s.replace(P4,U4);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=tm}return new o(i,n)}function U4(e){return"-"+e.toLowerCase()}function H4(e){return e.charAt(1).toUpperCase()}const F4=fS([dS,O4,mS,gS,yS],"html"),nm=fS([dS,L4,mS,gS,yS],"svg");function TB(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function q4(e){return e.join(" ").trim()}var Vi={},vh,kb;function V4(){if(kb)return vh;kb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
371
|
-
`,d="/",m="*",y="",b="comment",w="declaration";vh=function(C,T){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];T=T||{};var A=1,_=1;function N(le){var H=le.match(n);H&&(A+=H.length);var Q=le.lastIndexOf(h);_=~Q?le.length-Q:_+le.length}function O(){var le={line:A,column:_};return function(H){return H.position=new z(le),G(),H}}function z(le){this.start=le,this.end={line:A,column:_},this.source=T.source}z.prototype.content=C;function j(le){var H=new Error(T.source+":"+A+":"+_+": "+le);if(H.reason=le,H.filename=T.source,H.line=A,H.column=_,H.source=C,!T.silent)throw H}function $(le){var H=le.exec(C);if(H){var Q=H[0];return N(Q),C=C.slice(Q.length),H}}function G(){$(r)}function ee(le){var H;for(le=le||[];H=P();)H!==!1&&le.push(H);return le}function P(){var le=O();if(!(d!=C.charAt(0)||m!=C.charAt(1))){for(var H=2;y!=C.charAt(H)&&(m!=C.charAt(H)||d!=C.charAt(H+1));)++H;if(H+=2,y===C.charAt(H-1))return j("End of comment missing");var Q=C.slice(2,H-2);return _+=2,N(Q),C=C.slice(H),_+=2,le({type:b,comment:Q})}}function ne(){var le=O(),H=$(i);if(H){if(P(),!$(o))return j("property missing ':'");var Q=$(s),L=le({type:w,property:k(H[0].replace(e,y)),value:Q?k(Q[0].replace(e,y)):y});return $(c),L}}function ae(){var le=[];ee(le);for(var H;H=ne();)H!==!1&&(le.push(H),ee(le));return le}return G(),ae()};function k(C){return C?C.replace(f,y):y}return vh}var Cb;function $4(){if(Cb)return Vi;Cb=1;var e=Vi&&Vi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=r;var n=e(V4());function r(i,o){var s=null;if(!i||typeof i!="string")return s;var c=(0,n.default)(i),f=typeof o=="function";return c.forEach(function(h){if(h.type==="declaration"){var d=h.property,m=h.value;f?o(d,m,h):m&&(s=s||{},s[d]=m)}}),s}return Vi}var ho={},Ab;function G4(){if(Ab)return ho;Ab=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(d){return!d||r.test(d)||e.test(d)},c=function(d,m){return m.toUpperCase()},f=function(d,m){return"".concat(m,"-")},h=function(d,m){return m===void 0&&(m={}),s(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(o,f):d=d.replace(i,f),d.replace(n,c))};return ho.camelCase=h,ho}var po,Tb;function Y4(){if(Tb)return po;Tb=1;var e=po&&po.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e($4()),r=G4();function i(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,h){f&&h&&(c[(0,r.camelCase)(f,s)]=h)}),c}return i.default=i,po=i,po}var K4=Y4();const X4=ac(K4),vS=xS("end"),rm=xS("start");function xS(e){return n;function n(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function bS(e){const n=rm(e),r=vS(e);if(n&&r)return{start:n,end:r}}function Eo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rb(e.position):"start"in e||"end"in e?Rb(e):"line"in e||"column"in e?ap(e):""}function ap(e){return _b(e&&e.line)+":"+_b(e&&e.column)}function Rb(e){return ap(e&&e.start)+"-"+ap(e&&e.end)}function _b(e){return e&&typeof e=="number"?e:1}class $t extends Error{constructor(n,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let o="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?s.ruleId=i:(s.source=i.slice(0,h),s.ruleId=i.slice(h+1))}if(!s.place&&s.ancestors&&s.ancestors){const h=s.ancestors[s.ancestors.length-1];h&&(s.place=h.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Eo(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const am={}.hasOwnProperty,Q4=new Map,Z4=/[A-Z]/g,W4=new Set(["table","tbody","thead","tfoot","tr"]),J4=new Set(["td","th"]),wS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function e3(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=s3(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=o3(r,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?nm:F4,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=SS(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function SS(e,n,r){if(n.type==="element")return t3(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return n3(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return a3(e,n,r);if(n.type==="mdxjsEsm")return r3(e,n);if(n.type==="root")return i3(e,n,r);if(n.type==="text")return l3(e,n)}function t3(e,n,r){const i=e.schema;let o=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=nm,e.schema=o),e.ancestors.push(n);const s=kS(e,n.tagName,!1),c=u3(e,n);let f=lm(e,n);return W4.has(n.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!j4(h):!0})),ES(e,c,s,n),im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function n3(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}jo(e,n.position)}function r3(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);jo(e,n.position)}function a3(e,n,r){const i=e.schema;let o=i;n.name==="svg"&&i.space==="html"&&(o=nm,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:kS(e,n.name,!0),c=c3(e,n),f=lm(e,n);return ES(e,c,s,n),im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function i3(e,n,r){const i={};return im(i,lm(e,n)),e.create(n,e.Fragment,i,r)}function l3(e,n){return n.value}function ES(e,n,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=i)}function im(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function o3(e,n,r){return i;function i(o,s,c,f){const d=Array.isArray(c.children)?r:n;return f?d(s,c,f):d(s,c)}}function s3(e,n){return r;function r(i,o,s,c){const f=Array.isArray(s.children),h=rm(i);return n(o,s,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function u3(e,n){const r={};let i,o;for(o in n.properties)if(o!=="children"&&am.call(n.properties,o)){const s=f3(e,o,n.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&J4.has(n.tagName)?i=f:r[c]=f}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function c3(e,n){const r={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else jo(e,n.position);else{const o=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else jo(e,n.position);else s=i.value===null?!0:i.value;r[o]=s}return r}function lm(e,n){const r=[];let i=-1;const o=e.passKeys?new Map:Q4;for(;++i<n.children.length;){const s=n.children[i];let c;if(e.passKeys){const h=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(h){const d=o.get(h)||0;c=h+"-"+d,o.set(h,d+1)}}const f=SS(e,s,c);f!==void 0&&r.push(f)}return r}function f3(e,n,r){const i=B4(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?T4(r):q4(r)),i.property==="style"){let o=typeof r=="object"?r:d3(e,String(r));return e.stylePropertyNameCase==="css"&&(o=h3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?z4[i.property]||i.property:i.attribute,r]}}function d3(e,n){try{return X4(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new $t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=wS+"#cannot-parse-style-attribute",o}}function kS(e,n,r){let i;if(!r)i={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const f=bb(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}i=c}else i=bb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const o=i.value;return am.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);jo(e)}function jo(e,n){const r=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=wS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function h3(e){const n={};let r;for(r in e)am.call(e,r)&&(n[p3(r)]=e[r]);return n}function p3(e){let n=e.replace(Z4,m3);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function m3(e){return"-"+e.toLowerCase()}const xh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},g3={};function om(e,n){const r=g3,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return CS(e,i,o)}function CS(e,n,r){if(y3(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nb(e.children,n,r)}return Array.isArray(e)?Nb(e,n,r):""}function Nb(e,n,r){const i=[];let o=-1;for(;++o<e.length;)i[o]=CS(e[o],n,r);return i.join("")}function y3(e){return!!(e&&typeof e=="object")}const Mb=document.createElement("i");function sm(e){const n="&"+e+";";Mb.innerHTML=n;const r=Mb.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function xn(e,n,r,i){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(n,r),e.splice(...c);else for(r&&e.splice(n,r);s<i.length;)c=i.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function jn(e,n){return e.length>0?(xn(e,e.length,0,n),e):n}const jb={}.hasOwnProperty;function AS(e){const n={};let r=-1;for(;++r<e.length;)v3(n,e[r]);return n}function v3(e,n){let r;for(r in n){const o=(jb.call(e,r)?e[r]:void 0)||(e[r]={}),s=n[r];let c;if(s)for(c in s){jb.call(o,c)||(o[c]=[]);const f=s[c];x3(o[c],Array.isArray(f)?f:f?[f]:[])}}}function x3(e,n){let r=-1;const i=[];for(;++r<n.length;)(n[r].add==="after"?e:i).push(n[r]);xn(e,0,0,i)}function TS(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function $n(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qt=xa(/[A-Za-z]/),Vt=xa(/[\dA-Za-z]/),b3=xa(/[#-'*+\--9=?A-Z^-~]/);function Zu(e){return e!==null&&(e<32||e===127)}const ip=xa(/\d/),w3=xa(/[\dA-Fa-f]/),S3=xa(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function at(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const Tc=xa(new RegExp("\\p{P}|\\p{S}","u")),Ka=xa(/\s/);function xa(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function hl(e){const n=[];let r=-1,i=0,o=0;for(;++r<e.length;){const s=e.charCodeAt(r);let c="";if(s===37&&Vt(e.charCodeAt(r+1))&&Vt(e.charCodeAt(r+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(i,r),encodeURIComponent(c)),i=r+o+1,c=""),o&&(r+=o,o=0)}return n.join("")+e.slice(i)}function Ve(e,n,r,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(h){return He(h)?(e.enter(r),f(h)):n(h)}function f(h){return He(h)&&s++<o?(e.consume(h),f):(e.exit(r),n(h))}}const E3={tokenize:k3};function k3(e){const n=e.attempt(this.parser.constructs.contentInitial,i,o);let r;return n;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ve(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ce(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const C3={tokenize:A3},Db={tokenize:T3};function A3(e){const n=this,r=[];let i=0,o,s,c;return f;function f(N){if(i<r.length){const O=r[i];return n.containerState=O[1],e.attempt(O[0].continuation,h,d)(N)}return d(N)}function h(N){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&_();const O=n.events.length;let z=O,j;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){j=n.events[z][1].end;break}A(i);let $=O;for(;$<n.events.length;)n.events[$][1].end={...j},$++;return xn(n.events,z+1,0,n.events.slice(O)),n.events.length=$,d(N)}return f(N)}function d(N){if(i===r.length){if(!o)return b(N);if(o.currentConstruct&&o.currentConstruct.concrete)return k(N);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Db,m,y)(N)}function m(N){return o&&_(),A(i),b(N)}function y(N){return n.parser.lazy[n.now().line]=i!==r.length,c=n.now().offset,k(N)}function b(N){return n.containerState={},e.attempt(Db,w,k)(N)}function w(N){return i++,r.push([n.currentConstruct,n.containerState]),b(N)}function k(N){if(N===null){o&&_(),A(0),e.consume(N);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(N)}function C(N){if(N===null){T(e.exit("chunkFlow"),!0),A(0),e.consume(N);return}return Ce(N)?(e.consume(N),T(e.exit("chunkFlow")),i=0,n.interrupt=void 0,f):(e.consume(N),C)}function T(N,O){const z=n.sliceStream(N);if(O&&z.push(null),N.previous=s,s&&(s.next=N),s=N,o.defineSkip(N.start),o.write(z),n.parser.lazy[N.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<c&&(!o.events[j][1].end||o.events[j][1].end.offset>c))return;const $=n.events.length;let G=$,ee,P;for(;G--;)if(n.events[G][0]==="exit"&&n.events[G][1].type==="chunkFlow"){if(ee){P=n.events[G][1].end;break}ee=!0}for(A(i),j=$;j<n.events.length;)n.events[j][1].end={...P},j++;xn(n.events,G+1,0,n.events.slice($)),n.events.length=j}}function A(N){let O=r.length;for(;O-- >N;){const z=r[O];n.containerState=z[1],z[0].exit.call(n,e)}r.length=N}function _(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function T3(e,n,r){return Ve(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tl(e){if(e===null||at(e)||Ka(e))return 1;if(Tc(e))return 2}function Rc(e,n,r){const i=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!i.includes(s)&&(n=s(n,r),i.push(s))}return n}const lp={name:"attention",resolveAll:R3,tokenize:_3};function R3(e,n){let r=-1,i,o,s,c,f,h,d,m;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[i][1].end},b={...e[r][1].start};Ob(y,-h),Ob(b,h),c={type:h>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:b},s={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},o={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[r][1].start={...f.end},d=[],e[i][1].end.offset-e[i][1].start.offset&&(d=jn(d,[["enter",e[i][1],n],["exit",e[i][1],n]])),d=jn(d,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),d=jn(d,Rc(n.parser.constructs.insideSpan.null,e.slice(i+1,r),n)),d=jn(d,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,d=jn(d,[["enter",e[r][1],n],["exit",e[r][1],n]])):m=0,xn(e,i-1,r-i+3,d),r=i+d.length-m-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function _3(e,n){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=tl(i);let s;return c;function c(h){return s=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===s)return e.consume(h),f;const d=e.exit("attentionSequence"),m=tl(h),y=!m||m===2&&o||r.includes(h),b=!o||o===2&&m||r.includes(i);return d._open=!!(s===42?y:y&&(o||!b)),d._close=!!(s===42?b:b&&(m||!y)),n(h)}}function Ob(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const N3={name:"autolink",tokenize:M3};function M3(e,n,r){let i=0;return o;function o(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(w){return Qt(w)?(e.consume(w),c):w===64?r(w):d(w)}function c(w){return w===43||w===45||w===46||Vt(w)?(i=1,f(w)):d(w)}function f(w){return w===58?(e.consume(w),i=0,h):(w===43||w===45||w===46||Vt(w))&&i++<32?(e.consume(w),f):(i=0,d(w))}function h(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):w===null||w===32||w===60||Zu(w)?r(w):(e.consume(w),h)}function d(w){return w===64?(e.consume(w),m):b3(w)?(e.consume(w),d):r(w)}function m(w){return Vt(w)?y(w):r(w)}function y(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):b(w)}function b(w){if((w===45||Vt(w))&&i++<63){const k=w===45?b:y;return e.consume(w),k}return r(w)}}const Wo={partial:!0,tokenize:j3};function j3(e,n,r){return i;function i(s){return He(s)?Ve(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ce(s)?n(s):r(s)}}const RS={continuation:{tokenize:O3},exit:L3,name:"blockQuote",tokenize:D3};function D3(e,n,r){const i=this;return o;function o(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return r(c)}function s(c){return He(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function O3(e,n,r){const i=this;return o;function o(c){return He(c)?Ve(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(RS,n,r)(c)}}function L3(e){e.exit("blockQuote")}const _S={name:"characterEscape",tokenize:z3};function z3(e,n,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return S3(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(s)}}const NS={name:"characterReference",tokenize:P3};function P3(e,n,r){const i=this;let o=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),h}function h(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,c=Vt,m(y))}function d(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=w3,m):(e.enter("characterReferenceValue"),s=7,c=ip,m(y))}function m(y){if(y===59&&o){const b=e.exit("characterReferenceValue");return c===Vt&&!sm(i.sliceSerialize(b))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&o++<s?(e.consume(y),m):r(y)}}const Lb={partial:!0,tokenize:B3},zb={concrete:!0,name:"codeFenced",tokenize:I3};function I3(e,n,r){const i=this,o={partial:!0,tokenize:z};let s=0,c=0,f;return h;function h(j){return d(j)}function d(j){const $=i.events[i.events.length-1];return s=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===f?(c++,e.consume(j),m):c<3?r(j):(e.exit("codeFencedFenceSequence"),He(j)?Ve(e,y,"whitespace")(j):y(j))}function y(j){return j===null||Ce(j)?(e.exit("codeFencedFence"),i.interrupt?n(j):e.check(Lb,C,O)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||Ce(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(j)):He(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,w,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),b)}function w(j){return j===null||Ce(j)?y(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===null||Ce(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(j)):j===96&&j===f?r(j):(e.consume(j),k)}function C(j){return e.attempt(o,O,T)(j)}function T(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),A}function A(j){return s>0&&He(j)?Ve(e,_,"linePrefix",s+1)(j):_(j)}function _(j){return j===null||Ce(j)?e.check(Lb,C,O)(j):(e.enter("codeFlowValue"),N(j))}function N(j){return j===null||Ce(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),N)}function O(j){return e.exit("codeFenced"),n(j)}function z(j,$,G){let ee=0;return P;function P(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),ne}function ne(Q){return j.enter("codeFencedFence"),He(Q)?Ve(j,ae,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):ae(Q)}function ae(Q){return Q===f?(j.enter("codeFencedFenceSequence"),le(Q)):G(Q)}function le(Q){return Q===f?(ee++,j.consume(Q),le):ee>=c?(j.exit("codeFencedFenceSequence"),He(Q)?Ve(j,H,"whitespace")(Q):H(Q)):G(Q)}function H(Q){return Q===null||Ce(Q)?(j.exit("codeFencedFence"),$(Q)):G(Q)}}}function B3(e,n,r){const i=this;return o;function o(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}const bh={name:"codeIndented",tokenize:H3},U3={partial:!0,tokenize:F3};function H3(e,n,r){const i=this;return o;function o(d){return e.enter("codeIndented"),Ve(e,s,"linePrefix",5)(d)}function s(d){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(d):r(d)}function c(d){return d===null?h(d):Ce(d)?e.attempt(U3,c,h)(d):(e.enter("codeFlowValue"),f(d))}function f(d){return d===null||Ce(d)?(e.exit("codeFlowValue"),c(d)):(e.consume(d),f)}function h(d){return e.exit("codeIndented"),n(d)}}function F3(e,n,r){const i=this;return o;function o(c){return i.parser.lazy[i.now().line]?r(c):Ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ve(e,s,"linePrefix",5)(c)}function s(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Ce(c)?o(c):r(c)}}const q3={name:"codeText",previous:$3,resolve:V3,tokenize:G3};function V3(e){let n=e.length-4,r=3,i,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=r;++i<n;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(i=r-1,n++;++i<=n;)o===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(o=i):(i===n||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),n-=i-o-2,i=o+2),o=void 0);return e}function $3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function G3(e,n,r){let i=0,o,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),h(y))}function h(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),h):y===96?(s=e.enter("codeTextSequence"),o=0,m(y)):Ce(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("codeTextData"),d(y))}function d(y){return y===null||y===32||y===96||Ce(y)?(e.exit("codeTextData"),h(y)):(e.consume(y),d)}function m(y){return y===96?(e.consume(y),o++,m):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(s.type="codeTextData",d(y))}}class Y3{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,r,i){const o=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&mo(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),mo(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),mo(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);mo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);mo(this.left,r.reverse())}}}function mo(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function MS(e){const n={};let r=-1,i,o,s,c,f,h,d;const m=new Y3(e);for(;++r<m.length;){for(;r in n;)r=n[r];if(i=m.get(r),r&&i[1].type==="chunkFlow"&&m.get(r-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,s=0,s<h.length&&h[s][1].type==="lineEndingBlank"&&(s+=2),s<h.length&&h[s][1].type==="content"))for(;++s<h.length&&h[s][1].type!=="content";)h[s][1].type==="chunkText"&&(h[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,K3(m,r)),r=n[r],d=!0);else if(i[1]._container){for(s=r,o=void 0;s--;)if(c=m.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(i[1].end={...m.get(o)[1].start},f=m.slice(o,r),f.unshift(i),m.splice(o,r-o+1,f))}}return xn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!d}function K3(e,n){const r=e.get(n)[1],i=e.get(n)[2];let o=n-1;const s=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],d={};let m,y,b=-1,w=r,k=0,C=0;const T=[C];for(;w;){for(;e.get(++o)[1]!==w;);s.push(o),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),y&&c.defineSkip(w.start),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=w,w=w.next}for(w=r;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(C=b+1,T.push(C),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(c.events=[],w?(w._tokenizer=void 0,w.previous=void 0):T.pop(),b=T.length;b--;){const A=f.slice(T[b],T[b+1]),_=s.pop();h.push([_,_+A.length-1]),e.splice(_,2,A)}for(h.reverse(),b=-1;++b<h.length;)d[k+h[b][0]]=k+h[b][1],k+=h[b][1]-h[b][0]-1;return d}const X3={resolve:Z3,tokenize:W3},Q3={partial:!0,tokenize:J3};function Z3(e){return MS(e),e}function W3(e,n){let r;return i;function i(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):Ce(f)?e.check(Q3,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function J3(e,n,r){const i=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ve(e,s,"linePrefix")}function s(c){if(c===null||Ce(c))return r(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,r,n)(c)}}function jS(e,n,r,i,o,s,c,f,h){const d=h||Number.POSITIVE_INFINITY;let m=0;return y;function y(A){return A===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(A),e.exit(s),b):A===null||A===32||A===41||Zu(A)?r(A):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(A))}function b(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(o),e.exit(i),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),w(A))}function w(A){return A===62?(e.exit("chunkString"),e.exit(f),b(A)):A===null||A===60||Ce(A)?r(A):(e.consume(A),A===92?k:w)}function k(A){return A===60||A===62||A===92?(e.consume(A),w):w(A)}function C(A){return!m&&(A===null||A===41||at(A))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),n(A)):m<d&&A===40?(e.consume(A),m++,C):A===41?(e.consume(A),m--,C):A===null||A===32||A===40||Zu(A)?r(A):(e.consume(A),A===92?T:C)}function T(A){return A===40||A===41||A===92?(e.consume(A),C):C(A)}}function DS(e,n,r,i,o,s){const c=this;let f=0,h;return d;function d(w){return e.enter(i),e.enter(o),e.consume(w),e.exit(o),e.enter(s),m}function m(w){return f>999||w===null||w===91||w===93&&!h||w===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(w):w===93?(e.exit(s),e.enter(o),e.consume(w),e.exit(o),e.exit(i),n):Ce(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===null||w===91||w===93||Ce(w)||f++>999?(e.exit("chunkString"),m(w)):(e.consume(w),h||(h=!He(w)),w===92?b:y)}function b(w){return w===91||w===92||w===93?(e.consume(w),f++,y):y(w)}}function OS(e,n,r,i,o,s){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(i),e.enter(o),e.consume(b),e.exit(o),c=b===40?41:b,h):r(b)}function h(b){return b===c?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),n):(e.enter(s),d(b))}function d(b){return b===c?(e.exit(s),h(c)):b===null?r(b):Ce(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ve(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===c||b===null||Ce(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?y:m)}function y(b){return b===c||b===92?(e.consume(b),m):m(b)}}function ko(e,n){let r;return i;function i(o){return Ce(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,i):He(o)?Ve(e,i,r?"linePrefix":"lineSuffix")(o):n(o)}}const eL={name:"definition",tokenize:nL},tL={partial:!0,tokenize:rL};function nL(e,n,r){const i=this;let o;return s;function s(w){return e.enter("definition"),c(w)}function c(w){return DS.call(i,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function f(w){return o=$n(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),h):r(w)}function h(w){return at(w)?ko(e,d)(w):d(w)}function d(w){return jS(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(tL,y,y)(w)}function y(w){return He(w)?Ve(e,b,"whitespace")(w):b(w)}function b(w){return w===null||Ce(w)?(e.exit("definition"),i.parser.defined.push(o),n(w)):r(w)}}function rL(e,n,r){return i;function i(f){return at(f)?ko(e,o)(f):r(f)}function o(f){return OS(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return He(f)?Ve(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ce(f)?n(f):r(f)}}const aL={name:"hardBreakEscape",tokenize:iL};function iL(e,n,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ce(s)?(e.exit("hardBreakEscape"),n(s)):r(s)}}const lL={name:"headingAtx",resolve:oL,tokenize:sL};function oL(e,n){let r=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},xn(e,i,r-i+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function sL(e,n,r){let i=0;return o;function o(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||at(m)?(e.exit("atxHeadingSequence"),f(m)):r(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ce(m)?(e.exit("atxHeading"),n(m)):He(m)?Ve(e,f,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),f(m))}function d(m){return m===null||m===35||at(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),d)}}const uL=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Pb=["pre","script","style","textarea"],cL={concrete:!0,name:"htmlFlow",resolveTo:hL,tokenize:pL},fL={partial:!0,tokenize:gL},dL={partial:!0,tokenize:mL};function hL(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function pL(e,n,r){const i=this;let o,s,c,f,h;return d;function d(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),y}function y(M){return M===33?(e.consume(M),b):M===47?(e.consume(M),s=!0,C):M===63?(e.consume(M),o=3,i.interrupt?n:E):Qt(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function b(M){return M===45?(e.consume(M),o=2,w):M===91?(e.consume(M),o=5,f=0,k):Qt(M)?(e.consume(M),o=4,i.interrupt?n:E):r(M)}function w(M){return M===45?(e.consume(M),i.interrupt?n:E):r(M)}function k(M){const se="CDATA[";return M===se.charCodeAt(f++)?(e.consume(M),f===se.length?i.interrupt?n:ae:k):r(M)}function C(M){return Qt(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function T(M){if(M===null||M===47||M===62||at(M)){const se=M===47,Se=c.toLowerCase();return!se&&!s&&Pb.includes(Se)?(o=1,i.interrupt?n(M):ae(M)):uL.includes(c.toLowerCase())?(o=6,se?(e.consume(M),A):i.interrupt?n(M):ae(M)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(M):s?_(M):N(M))}return M===45||Vt(M)?(e.consume(M),c+=String.fromCharCode(M),T):r(M)}function A(M){return M===62?(e.consume(M),i.interrupt?n:ae):r(M)}function _(M){return He(M)?(e.consume(M),_):P(M)}function N(M){return M===47?(e.consume(M),P):M===58||M===95||Qt(M)?(e.consume(M),O):He(M)?(e.consume(M),N):P(M)}function O(M){return M===45||M===46||M===58||M===95||Vt(M)?(e.consume(M),O):z(M)}function z(M){return M===61?(e.consume(M),j):He(M)?(e.consume(M),z):N(M)}function j(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),h=M,$):He(M)?(e.consume(M),j):G(M)}function $(M){return M===h?(e.consume(M),h=null,ee):M===null||Ce(M)?r(M):(e.consume(M),$)}function G(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||at(M)?z(M):(e.consume(M),G)}function ee(M){return M===47||M===62||He(M)?N(M):r(M)}function P(M){return M===62?(e.consume(M),ne):r(M)}function ne(M){return M===null||Ce(M)?ae(M):He(M)?(e.consume(M),ne):r(M)}function ae(M){return M===45&&o===2?(e.consume(M),L):M===60&&o===1?(e.consume(M),K):M===62&&o===4?(e.consume(M),Z):M===63&&o===3?(e.consume(M),E):M===93&&o===5?(e.consume(M),J):Ce(M)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(fL,oe,le)(M)):M===null||Ce(M)?(e.exit("htmlFlowData"),le(M)):(e.consume(M),ae)}function le(M){return e.check(dL,H,oe)(M)}function H(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Q}function Q(M){return M===null||Ce(M)?le(M):(e.enter("htmlFlowData"),ae(M))}function L(M){return M===45?(e.consume(M),E):ae(M)}function K(M){return M===47?(e.consume(M),c="",U):ae(M)}function U(M){if(M===62){const se=c.toLowerCase();return Pb.includes(se)?(e.consume(M),Z):ae(M)}return Qt(M)&&c.length<8?(e.consume(M),c+=String.fromCharCode(M),U):ae(M)}function J(M){return M===93?(e.consume(M),E):ae(M)}function E(M){return M===62?(e.consume(M),Z):M===45&&o===2?(e.consume(M),E):ae(M)}function Z(M){return M===null||Ce(M)?(e.exit("htmlFlowData"),oe(M)):(e.consume(M),Z)}function oe(M){return e.exit("htmlFlow"),n(M)}}function mL(e,n,r){const i=this;return o;function o(c){return Ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):r(c)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}function gL(e,n,r){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Wo,n,r)}}const yL={name:"htmlText",tokenize:vL};function vL(e,n,r){const i=this;let o,s,c;return f;function f(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),h}function h(E){return E===33?(e.consume(E),d):E===47?(e.consume(E),z):E===63?(e.consume(E),N):Qt(E)?(e.consume(E),G):r(E)}function d(E){return E===45?(e.consume(E),m):E===91?(e.consume(E),s=0,k):Qt(E)?(e.consume(E),_):r(E)}function m(E){return E===45?(e.consume(E),w):r(E)}function y(E){return E===null?r(E):E===45?(e.consume(E),b):Ce(E)?(c=y,K(E)):(e.consume(E),y)}function b(E){return E===45?(e.consume(E),w):y(E)}function w(E){return E===62?L(E):E===45?b(E):y(E)}function k(E){const Z="CDATA[";return E===Z.charCodeAt(s++)?(e.consume(E),s===Z.length?C:k):r(E)}function C(E){return E===null?r(E):E===93?(e.consume(E),T):Ce(E)?(c=C,K(E)):(e.consume(E),C)}function T(E){return E===93?(e.consume(E),A):C(E)}function A(E){return E===62?L(E):E===93?(e.consume(E),A):C(E)}function _(E){return E===null||E===62?L(E):Ce(E)?(c=_,K(E)):(e.consume(E),_)}function N(E){return E===null?r(E):E===63?(e.consume(E),O):Ce(E)?(c=N,K(E)):(e.consume(E),N)}function O(E){return E===62?L(E):N(E)}function z(E){return Qt(E)?(e.consume(E),j):r(E)}function j(E){return E===45||Vt(E)?(e.consume(E),j):$(E)}function $(E){return Ce(E)?(c=$,K(E)):He(E)?(e.consume(E),$):L(E)}function G(E){return E===45||Vt(E)?(e.consume(E),G):E===47||E===62||at(E)?ee(E):r(E)}function ee(E){return E===47?(e.consume(E),L):E===58||E===95||Qt(E)?(e.consume(E),P):Ce(E)?(c=ee,K(E)):He(E)?(e.consume(E),ee):L(E)}function P(E){return E===45||E===46||E===58||E===95||Vt(E)?(e.consume(E),P):ne(E)}function ne(E){return E===61?(e.consume(E),ae):Ce(E)?(c=ne,K(E)):He(E)?(e.consume(E),ne):ee(E)}function ae(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),o=E,le):Ce(E)?(c=ae,K(E)):He(E)?(e.consume(E),ae):(e.consume(E),H)}function le(E){return E===o?(e.consume(E),o=void 0,Q):E===null?r(E):Ce(E)?(c=le,K(E)):(e.consume(E),le)}function H(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||at(E)?ee(E):(e.consume(E),H)}function Q(E){return E===47||E===62||at(E)?ee(E):r(E)}function L(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),n):r(E)}function K(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),U}function U(E){return He(E)?Ve(e,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):J(E)}function J(E){return e.enter("htmlTextData"),c(E)}}const um={name:"labelEnd",resolveAll:SL,resolveTo:EL,tokenize:kL},xL={tokenize:CL},bL={tokenize:AL},wL={tokenize:TL};function SL(e){let n=-1;const r=[];for(;++n<e.length;){const i=e[n][1];if(r.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",n+=o}}return e.length!==r.length&&xn(e,0,e.length,r),e}function EL(e,n){let r=e.length,i=0,o,s,c,f;for(;r--;)if(o=e[r][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=r,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(c=r);const h={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,n],["enter",d,n]],f=jn(f,e.slice(s+1,s+i+3)),f=jn(f,[["enter",m,n]]),f=jn(f,Rc(n.parser.constructs.insideSpan.null,e.slice(s+i+4,c-3),n)),f=jn(f,[["exit",m,n],e[c-2],e[c-1],["exit",d,n]]),f=jn(f,e.slice(c+1)),f=jn(f,[["exit",h,n]]),xn(e,s,e.length,f),e}function kL(e,n,r){const i=this;let o=i.events.length,s,c;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return f;function f(b){return s?s._inactive?y(b):(c=i.parser.defined.includes($n(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),h):r(b)}function h(b){return b===40?e.attempt(xL,m,c?m:y)(b):b===91?e.attempt(bL,m,c?d:y)(b):c?m(b):y(b)}function d(b){return e.attempt(wL,m,y)(b)}function m(b){return n(b)}function y(b){return s._balanced=!0,r(b)}}function CL(e,n,r){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return at(y)?ko(e,s)(y):s(y)}function s(y){return y===41?m(y):jS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return at(y)?ko(e,h)(y):m(y)}function f(y){return r(y)}function h(y){return y===34||y===39||y===40?OS(e,d,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):m(y)}function d(y){return at(y)?ko(e,m)(y):m(y)}function m(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):r(y)}}function AL(e,n,r){const i=this;return o;function o(f){return DS.call(i,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return i.parser.defined.includes($n(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(f):r(f)}function c(f){return r(f)}}function TL(e,n,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):r(s)}}const RL={name:"labelStartImage",resolveAll:um.resolveAll,tokenize:_L};function _L(e,n,r){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(f):n(f)}}const NL={name:"labelStartLink",resolveAll:um.resolveAll,tokenize:ML};function ML(e,n,r){const i=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):n(c)}}const wh={name:"lineEnding",tokenize:jL};function jL(e,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ve(e,n,"linePrefix")}}const Uu={name:"thematicBreak",tokenize:DL};function DL(e,n,r){let i=0,o;return s;function s(d){return e.enter("thematicBreak"),c(d)}function c(d){return o=d,f(d)}function f(d){return d===o?(e.enter("thematicBreakSequence"),h(d)):i>=3&&(d===null||Ce(d))?(e.exit("thematicBreak"),n(d)):r(d)}function h(d){return d===o?(e.consume(d),i++,h):(e.exit("thematicBreakSequence"),He(d)?Ve(e,f,"whitespace")(d):f(d))}}const ln={continuation:{tokenize:PL},exit:BL,name:"list",tokenize:zL},OL={partial:!0,tokenize:UL},LL={partial:!0,tokenize:IL};function zL(e,n,r){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:ip(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(Uu,r,d)(w):d(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(w)}return r(w)}function h(w){return ip(w)&&++c<10?(e.consume(w),h):(!i.interrupt||c<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),d(w)):r(w)}function d(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(Wo,i.interrupt?r:m,e.attempt(OL,b,y))}function m(w){return i.containerState.initialBlankLine=!0,s++,b(w)}function y(w){return He(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),b):r(w)}function b(w){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(w)}}function PL(e,n,r){const i=this;return i.containerState._closeFlow=void 0,e.check(Wo,o,s);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ve(e,n,"listItemIndent",i.containerState.size+1)(f)}function s(f){return i.containerState.furtherBlankLines||!He(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(LL,n,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ve(e,e.attempt(ln,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function IL(e,n,r){const i=this;return Ve(e,o,"listItemIndent",i.containerState.size+1);function o(s){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(s):r(s)}}function BL(e){e.exit(this.containerState.type)}function UL(e,n,r){const i=this;return Ve(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=i.events[i.events.length-1];return!He(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const Ib={name:"setextUnderline",resolveTo:HL,tokenize:FL};function HL(e,n){let r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[i][1],n]),e[i][1].end={...e[s][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function FL(e,n,r){const i=this;let o;return s;function s(d){let m=i.events.length,y;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){y=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),o=d,c(d)):r(d)}function c(d){return e.enter("setextHeadingLineSequence"),f(d)}function f(d){return d===o?(e.consume(d),f):(e.exit("setextHeadingLineSequence"),He(d)?Ve(e,h,"lineSuffix")(d):h(d))}function h(d){return d===null||Ce(d)?(e.exit("setextHeadingLine"),n(d)):r(d)}}const qL={tokenize:VL};function VL(e){const n=this,r=e.attempt(Wo,i,e.attempt(this.parser.constructs.flowInitial,o,Ve(e,e.attempt(this.parser.constructs.flow,o,e.attempt(X3,o)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const $L={resolveAll:zS()},GL=LS("string"),YL=LS("text");function LS(e){return{resolveAll:zS(e==="text"?KL:void 0),tokenize:n};function n(r){const i=this,o=this.parser.constructs[e],s=r.attempt(o,c,f);return c;function c(m){return d(m)?s(m):f(m)}function f(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),h}function h(m){return d(m)?(r.exit("data"),s(m)):(r.consume(m),h)}function d(m){if(m===null)return!0;const y=o[m];let b=-1;if(y)for(;++b<y.length;){const w=y[b];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function zS(e){return n;function n(r,i){let o=-1,s;for(;++o<=r.length;)s===void 0?r[o]&&r[o][1].type==="data"&&(s=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==s+2&&(r[s][1].end=r[o-1][1].end,r.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(r,i):r}}function KL(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=n.sliceStream(i);let s=o.length,c=-1,f=0,h;for(;s--;){const d=o[s];if(typeof d=="string"){for(c=d.length;d.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(d===-2)h=!0,f++;else if(d!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(f=0),f){const d={type:r===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:i.start._bufferIndex+c,_index:i.start._index+s,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...d.start},i.start.offset===i.end.offset?Object.assign(i,d):(e.splice(r,0,["enter",d,n],["exit",d,n]),r+=2)}r++}return e}const XL={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:RS},QL={91:eL},ZL={[-2]:bh,[-1]:bh,32:bh},WL={35:lL,42:Uu,45:[Ib,Uu],60:cL,61:Ib,95:Uu,96:zb,126:zb},JL={38:NS,92:_S},ez={[-5]:wh,[-4]:wh,[-3]:wh,33:RL,38:NS,42:lp,60:[N3,yL],91:NL,92:[aL,_S],93:um,95:lp,96:q3},tz={null:[lp,$L]},nz={null:[42,95]},rz={null:[]},az=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nz,contentInitial:QL,disable:rz,document:XL,flow:WL,flowInitial:ZL,insideSpan:tz,string:JL,text:ez},Symbol.toStringTag,{value:"Module"}));function iz(e,n,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},s=[];let c=[],f=[];const h={attempt:$(z),check:$(j),consume:_,enter:N,exit:O,interrupt:$(j,{interrupt:!0})},d={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:w,write:y};let m=n.tokenize.call(d,h);return n.resolveAll&&s.push(n),d;function y(ne){return c=jn(c,ne),T(),c[c.length-1]!==null?[]:(G(n,0),d.events=Rc(s,d.events,d),d.events)}function b(ne,ae){return oz(w(ne),ae)}function w(ne){return lz(c,ne)}function k(){const{_bufferIndex:ne,_index:ae,line:le,column:H,offset:Q}=i;return{_bufferIndex:ne,_index:ae,line:le,column:H,offset:Q}}function C(ne){o[ne.line]=ne.column,P()}function T(){let ne;for(;i._index<c.length;){const ae=c[i._index];if(typeof ae=="string")for(ne=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ne&&i._bufferIndex<ae.length;)A(ae.charCodeAt(i._bufferIndex));else A(ae)}}function A(ne){m=m(ne)}function _(ne){Ce(ne)?(i.line++,i.column=1,i.offset+=ne===-3?2:1,P()):ne!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),d.previous=ne}function N(ne,ae){const le=ae||{};return le.type=ne,le.start=k(),d.events.push(["enter",le,d]),f.push(le),le}function O(ne){const ae=f.pop();return ae.end=k(),d.events.push(["exit",ae,d]),ae}function z(ne,ae){G(ne,ae.from)}function j(ne,ae){ae.restore()}function $(ne,ae){return le;function le(H,Q,L){let K,U,J,E;return Array.isArray(H)?oe(H):"tokenize"in H?oe([H]):Z(H);function Z(he){return xe;function xe(Ee){const Qe=Ee!==null&&he[Ee],bt=Ee!==null&&he.null,Rt=[...Array.isArray(Qe)?Qe:Qe?[Qe]:[],...Array.isArray(bt)?bt:bt?[bt]:[]];return oe(Rt)(Ee)}}function oe(he){return K=he,U=0,he.length===0?L:M(he[U])}function M(he){return xe;function xe(Ee){return E=ee(),J=he,he.partial||(d.currentConstruct=he),he.name&&d.parser.constructs.disable.null.includes(he.name)?Se():he.tokenize.call(ae?Object.assign(Object.create(d),ae):d,h,se,Se)(Ee)}}function se(he){return ne(J,E),Q}function Se(he){return E.restore(),++U<K.length?M(K[U]):L}}}function G(ne,ae){ne.resolveAll&&!s.includes(ne)&&s.push(ne),ne.resolve&&xn(d.events,ae,d.events.length-ae,ne.resolve(d.events.slice(ae),d)),ne.resolveTo&&(d.events=ne.resolveTo(d.events,d))}function ee(){const ne=k(),ae=d.previous,le=d.currentConstruct,H=d.events.length,Q=Array.from(f);return{from:H,restore:L};function L(){i=ne,d.previous=ae,d.currentConstruct=le,d.events.length=H,f=Q,P()}}function P(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function lz(e,n){const r=n.start._index,i=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(r===o)c=[e[r].slice(i,s)];else{if(c=e.slice(r,o),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function oz(e,n){let r=-1;const i=[];let o;for(;++r<e.length;){const s=e[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
375
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},mD="DialogDescriptionWarning",gD=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dw(mD).contentName}}.`;return x.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},Up=W1,hw=ew,Hp=nw,qo=rw,Vo=aw,$o=lw,Go=sw,yc=cw;const pw=Up,yD=Hp,mw=x.forwardRef(({className:e,...n},r)=>g.jsx(qo,{className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));mw.displayName=qo.displayName;const vD=pc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Fp=x.forwardRef(({side:e="right",className:n,children:r,...i},o)=>g.jsxs(yD,{children:[g.jsx(mw,{}),g.jsxs(Vo,{ref:o,className:fe(vD({side:e}),n),...i,children:[r,g.jsxs(yc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(Yi,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fp.displayName=Vo.displayName;const qp=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col space-y-2 text-center sm:text-left",e),...n});qp.displayName="SheetHeader";const Vp=x.forwardRef(({className:e,...n},r)=>g.jsx($o,{ref:r,className:fe("text-lg font-semibold text-foreground",e),...n}));Vp.displayName=$o.displayName;const gw=x.forwardRef(({className:e,...n},r)=>g.jsx(Go,{ref:r,className:fe("text-sm text-muted-foreground",e),...n}));gw.displayName=Go.displayName;function sb({className:e,...n}){return g.jsx("div",{className:fe("animate-pulse rounded-md bg-muted",e),...n})}const xD=["top","right","bottom","left"],ya=Math.min,yn=Math.max,Yu=Math.round,Cu=Math.floor,ur=e=>({x:e,y:e}),bD={left:"right",right:"left",bottom:"top",top:"bottom"},wD={start:"end",end:"start"};function Xh(e,n,r){return yn(e,ya(n,r))}function Lr(e,n){return typeof e=="function"?e(n):e}function zr(e){return e.split("-")[0]}function cl(e){return e.split("-")[1]}function $p(e){return e==="x"?"y":"x"}function Gp(e){return e==="y"?"height":"width"}const SD=new Set(["top","bottom"]);function sr(e){return SD.has(zr(e))?"y":"x"}function Yp(e){return $p(sr(e))}function ED(e,n,r){r===void 0&&(r=!1);const i=cl(e),o=Yp(e),s=Gp(o);let c=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=Ku(c)),[c,Ku(c)]}function kD(e){const n=Ku(e);return[Qh(e),n,Qh(n)]}function Qh(e){return e.replace(/start|end/g,n=>wD[n])}const ub=["left","right"],cb=["right","left"],CD=["top","bottom"],AD=["bottom","top"];function TD(e,n,r){switch(e){case"top":case"bottom":return r?n?cb:ub:n?ub:cb;case"left":case"right":return n?CD:AD;default:return[]}}function RD(e,n,r,i){const o=cl(e);let s=TD(zr(e),r==="start",i);return o&&(s=s.map(c=>c+"-"+o),n&&(s=s.concat(s.map(Qh)))),s}function Ku(e){return e.replace(/left|right|bottom|top/g,n=>bD[n])}function _D(e){return{top:0,right:0,bottom:0,left:0,...e}}function yw(e){return typeof e!="number"?_D(e):{top:e,right:e,bottom:e,left:e}}function Xu(e){const{x:n,y:r,width:i,height:o}=e;return{width:i,height:o,top:r,left:n,right:n+i,bottom:r+o,x:n,y:r}}function fb(e,n,r){let{reference:i,floating:o}=e;const s=sr(n),c=Yp(n),f=Gp(c),h=zr(n),d=s==="y",m=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,b=i[f]/2-o[f]/2;let w;switch(h){case"top":w={x:m,y:i.y-o.height};break;case"bottom":w={x:m,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y};break;case"left":w={x:i.x-o.width,y};break;default:w={x:i.x,y:i.y}}switch(cl(n)){case"start":w[c]-=b*(r&&d?-1:1);break;case"end":w[c]+=b*(r&&d?-1:1);break}return w}const ND=async(e,n,r)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:c}=r,f=s.filter(Boolean),h=await(c.isRTL==null?void 0:c.isRTL(n));let d=await c.getElementRects({reference:e,floating:n,strategy:o}),{x:m,y}=fb(d,i,h),b=i,w={},k=0;for(let C=0;C<f.length;C++){const{name:T,fn:A}=f[C],{x:_,y:N,data:O,reset:z}=await A({x:m,y,initialPlacement:i,placement:b,strategy:o,middlewareData:w,rects:d,platform:c,elements:{reference:e,floating:n}});m=_??m,y=N??y,w={...w,[T]:{...w[T],...O}},z&&k<=50&&(k++,typeof z=="object"&&(z.placement&&(b=z.placement),z.rects&&(d=z.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:o}):z.rects),{x:m,y}=fb(d,b,h)),C=-1)}return{x:m,y,placement:b,strategy:o,middlewareData:w}};async function _o(e,n){var r;n===void 0&&(n={});const{x:i,y:o,platform:s,rects:c,elements:f,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:b=!1,padding:w=0}=Lr(n,e),k=yw(w),T=f[b?y==="floating"?"reference":"floating":y],A=Xu(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(T)))==null||r?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:d,rootBoundary:m,strategy:h})),_=y==="floating"?{x:i,y:o,width:c.floating.width,height:c.floating.height}:c.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},z=Xu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:_,offsetParent:N,strategy:h}):_);return{top:(A.top-z.top+k.top)/O.y,bottom:(z.bottom-A.bottom+k.bottom)/O.y,left:(A.left-z.left+k.left)/O.x,right:(z.right-A.right+k.right)/O.x}}const MD=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:i,placement:o,rects:s,platform:c,elements:f,middlewareData:h}=n,{element:d,padding:m=0}=Lr(e,n)||{};if(d==null)return{};const y=yw(m),b={x:r,y:i},w=Yp(o),k=Gp(w),C=await c.getDimensions(d),T=w==="y",A=T?"top":"left",_=T?"bottom":"right",N=T?"clientHeight":"clientWidth",O=s.reference[k]+s.reference[w]-b[w]-s.floating[k],z=b[w]-s.reference[w],j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d));let $=j?j[N]:0;(!$||!await(c.isElement==null?void 0:c.isElement(j)))&&($=f.floating[N]||s.floating[k]);const G=O/2-z/2,ee=$/2-C[k]/2-1,P=ya(y[A],ee),ne=ya(y[_],ee),ae=P,le=$-C[k]-ne,H=$/2-C[k]/2+G,Q=Xh(ae,H,le),L=!h.arrow&&cl(o)!=null&&H!==Q&&s.reference[k]/2-(H<ae?P:ne)-C[k]/2<0,K=L?H<ae?H-ae:H-le:0;return{[w]:b[w]+K,data:{[w]:Q,centerOffset:H-Q-K,...L&&{alignmentOffset:K}},reset:L}}}),jD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,i;const{placement:o,middlewareData:s,rects:c,initialPlacement:f,platform:h,elements:d}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:C=!0,...T}=Lr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const A=zr(o),_=sr(f),N=zr(f)===f,O=await(h.isRTL==null?void 0:h.isRTL(d.floating)),z=b||(N||!C?[Ku(f)]:kD(f)),j=k!=="none";!b&&j&&z.push(...RD(f,C,k,O));const $=[f,...z],G=await _o(n,T),ee=[];let P=((i=s.flip)==null?void 0:i.overflows)||[];if(m&&ee.push(G[A]),y){const H=ED(o,c,O);ee.push(G[H[0]],G[H[1]])}if(P=[...P,{placement:o,overflows:ee}],!ee.every(H=>H<=0)){var ne,ae;const H=(((ne=s.flip)==null?void 0:ne.index)||0)+1,Q=$[H];if(Q&&(!(y==="alignment"?_!==sr(Q):!1)||P.every(U=>sr(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:H,overflows:P},reset:{placement:Q}};let L=(ae=P.filter(K=>K.overflows[0]<=0).sort((K,U)=>K.overflows[1]-U.overflows[1])[0])==null?void 0:ae.placement;if(!L)switch(w){case"bestFit":{var le;const K=(le=P.filter(U=>{if(j){const J=sr(U.placement);return J===_||J==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(J=>J>0).reduce((J,E)=>J+E,0)]).sort((U,J)=>U[1]-J[1])[0])==null?void 0:le[0];K&&(L=K);break}case"initialPlacement":L=f;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function db(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function hb(e){return xD.some(n=>e[n]>=0)}const DD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:i="referenceHidden",...o}=Lr(e,n);switch(i){case"referenceHidden":{const s=await _o(n,{...o,elementContext:"reference"}),c=db(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:hb(c)}}}case"escaped":{const s=await _o(n,{...o,altBoundary:!0}),c=db(s,r.floating);return{data:{escapedOffsets:c,escaped:hb(c)}}}default:return{}}}}},vw=new Set(["left","top"]);async function OD(e,n){const{placement:r,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=zr(r),f=cl(r),h=sr(r)==="y",d=vw.has(c)?-1:1,m=s&&h?-1:1,y=Lr(n,e);let{mainAxis:b,crossAxis:w,alignmentAxis:k}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof k=="number"&&(w=f==="end"?k*-1:k),h?{x:w*m,y:b*d}:{x:b*d,y:w*m}}const LD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,i;const{x:o,y:s,placement:c,middlewareData:f}=n,h=await OD(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:o+h.x,y:s+h.y,data:{...h,placement:c}}}}},zD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:i,placement:o}=n,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:T=>{let{x:A,y:_}=T;return{x:A,y:_}}},...h}=Lr(e,n),d={x:r,y:i},m=await _o(n,h),y=sr(zr(o)),b=$p(y);let w=d[b],k=d[y];if(s){const T=b==="y"?"top":"left",A=b==="y"?"bottom":"right",_=w+m[T],N=w-m[A];w=Xh(_,w,N)}if(c){const T=y==="y"?"top":"left",A=y==="y"?"bottom":"right",_=k+m[T],N=k-m[A];k=Xh(_,k,N)}const C=f.fn({...n,[b]:w,[y]:k});return{...C,data:{x:C.x-r,y:C.y-i,enabled:{[b]:s,[y]:c}}}}}},PD=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:i,placement:o,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:h=!0,crossAxis:d=!0}=Lr(e,n),m={x:r,y:i},y=sr(o),b=$p(y);let w=m[b],k=m[y];const C=Lr(f,n),T=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(h){const N=b==="y"?"height":"width",O=s.reference[b]-s.floating[N]+T.mainAxis,z=s.reference[b]+s.reference[N]-T.mainAxis;w<O?w=O:w>z&&(w=z)}if(d){var A,_;const N=b==="y"?"width":"height",O=vw.has(zr(o)),z=s.reference[y]-s.floating[N]+(O&&((A=c.offset)==null?void 0:A[y])||0)+(O?0:T.crossAxis),j=s.reference[y]+s.reference[N]+(O?0:((_=c.offset)==null?void 0:_[y])||0)-(O?T.crossAxis:0);k<z?k=z:k>j&&(k=j)}return{[b]:w,[y]:k}}}},ID=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,i;const{placement:o,rects:s,platform:c,elements:f}=n,{apply:h=()=>{},...d}=Lr(e,n),m=await _o(n,d),y=zr(o),b=cl(o),w=sr(o)==="y",{width:k,height:C}=s.floating;let T,A;y==="top"||y==="bottom"?(T=y,A=b===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(A=y,T=b==="end"?"top":"bottom");const _=C-m.top-m.bottom,N=k-m.left-m.right,O=ya(C-m[T],_),z=ya(k-m[A],N),j=!n.middlewareData.shift;let $=O,G=z;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(G=N),(i=n.middlewareData.shift)!=null&&i.enabled.y&&($=_),j&&!b){const P=yn(m.left,0),ne=yn(m.right,0),ae=yn(m.top,0),le=yn(m.bottom,0);w?G=k-2*(P!==0||ne!==0?P+ne:yn(m.left,m.right)):$=C-2*(ae!==0||le!==0?ae+le:yn(m.top,m.bottom))}await h({...n,availableWidth:G,availableHeight:$});const ee=await c.getDimensions(f.floating);return k!==ee.width||C!==ee.height?{reset:{rects:!0}}:{}}}};function vc(){return typeof window<"u"}function fl(e){return xw(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function dr(e){var n;return(n=(xw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function xw(e){return vc()?e instanceof Node||e instanceof vn(e).Node:!1}function Gn(e){return vc()?e instanceof Element||e instanceof vn(e).Element:!1}function fr(e){return vc()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function pb(e){return!vc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const BD=new Set(["inline","contents"]);function Yo(e){const{overflow:n,overflowX:r,overflowY:i,display:o}=Yn(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!BD.has(o)}const UD=new Set(["table","td","th"]);function HD(e){return UD.has(fl(e))}const FD=[":popover-open",":modal"];function xc(e){return FD.some(n=>{try{return e.matches(n)}catch{return!1}})}const qD=["transform","translate","scale","rotate","perspective"],VD=["transform","translate","scale","rotate","perspective","filter"],$D=["paint","layout","strict","content"];function Kp(e){const n=Xp(),r=Gn(e)?Yn(e):e;return qD.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||VD.some(i=>(r.willChange||"").includes(i))||$D.some(i=>(r.contain||"").includes(i))}function GD(e){let n=va(e);for(;fr(n)&&!Ji(n);){if(Kp(n))return n;if(xc(n))return null;n=va(n)}return null}function Xp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const YD=new Set(["html","body","#document"]);function Ji(e){return YD.has(fl(e))}function Yn(e){return vn(e).getComputedStyle(e)}function bc(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function va(e){if(fl(e)==="html")return e;const n=e.assignedSlot||e.parentNode||pb(e)&&e.host||dr(e);return pb(n)?n.host:n}function bw(e){const n=va(e);return Ji(n)?e.ownerDocument?e.ownerDocument.body:e.body:fr(n)&&Yo(n)?n:bw(n)}function No(e,n,r){var i;n===void 0&&(n=[]),r===void 0&&(r=!0);const o=bw(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),c=vn(o);if(s){const f=Zh(c);return n.concat(c,c.visualViewport||[],Yo(o)?o:[],f&&r?No(f):[])}return n.concat(o,No(o,[],r))}function Zh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ww(e){const n=Yn(e);let r=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=fr(e),s=o?e.offsetWidth:r,c=o?e.offsetHeight:i,f=Yu(r)!==s||Yu(i)!==c;return f&&(r=s,i=c),{width:r,height:i,$:f}}function Qp(e){return Gn(e)?e:e.contextElement}function Xi(e){const n=Qp(e);if(!fr(n))return ur(1);const r=n.getBoundingClientRect(),{width:i,height:o,$:s}=ww(n);let c=(s?Yu(r.width):r.width)/i,f=(s?Yu(r.height):r.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const KD=ur(0);function Sw(e){const n=vn(e);return!Xp()||!n.visualViewport?KD:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function XD(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==vn(e)?!1:n}function Ya(e,n,r,i){n===void 0&&(n=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Qp(e);let c=ur(1);n&&(i?Gn(i)&&(c=Xi(i)):c=Xi(e));const f=XD(s,r,i)?Sw(s):ur(0);let h=(o.left+f.x)/c.x,d=(o.top+f.y)/c.y,m=o.width/c.x,y=o.height/c.y;if(s){const b=vn(s),w=i&&Gn(i)?vn(i):i;let k=b,C=Zh(k);for(;C&&i&&w!==k;){const T=Xi(C),A=C.getBoundingClientRect(),_=Yn(C),N=A.left+(C.clientLeft+parseFloat(_.paddingLeft))*T.x,O=A.top+(C.clientTop+parseFloat(_.paddingTop))*T.y;h*=T.x,d*=T.y,m*=T.x,y*=T.y,h+=N,d+=O,k=vn(C),C=Zh(k)}}return Xu({width:m,height:y,x:h,y:d})}function Zp(e,n){const r=bc(e).scrollLeft;return n?n.left+r:Ya(dr(e)).left+r}function Ew(e,n,r){r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=i.left+n.scrollLeft-(r?0:Zp(e,i)),s=i.top+n.scrollTop;return{x:o,y:s}}function QD(e){let{elements:n,rect:r,offsetParent:i,strategy:o}=e;const s=o==="fixed",c=dr(i),f=n?xc(n.floating):!1;if(i===c||f&&s)return r;let h={scrollLeft:0,scrollTop:0},d=ur(1);const m=ur(0),y=fr(i);if((y||!y&&!s)&&((fl(i)!=="body"||Yo(c))&&(h=bc(i)),fr(i))){const w=Ya(i);d=Xi(i),m.x=w.x+i.clientLeft,m.y=w.y+i.clientTop}const b=c&&!y&&!s?Ew(c,h,!0):ur(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-h.scrollLeft*d.x+m.x+b.x,y:r.y*d.y-h.scrollTop*d.y+m.y+b.y}}function ZD(e){return Array.from(e.getClientRects())}function WD(e){const n=dr(e),r=bc(e),i=e.ownerDocument.body,o=yn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=yn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+Zp(e);const f=-r.scrollTop;return Yn(i).direction==="rtl"&&(c+=yn(n.clientWidth,i.clientWidth)-o),{width:o,height:s,x:c,y:f}}function JD(e,n){const r=vn(e),i=dr(e),o=r.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,h=0;if(o){s=o.width,c=o.height;const d=Xp();(!d||d&&n==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}return{width:s,height:c,x:f,y:h}}const eO=new Set(["absolute","fixed"]);function tO(e,n){const r=Ya(e,!0,n==="fixed"),i=r.top+e.clientTop,o=r.left+e.clientLeft,s=fr(e)?Xi(e):ur(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,h=o*s.x,d=i*s.y;return{width:c,height:f,x:h,y:d}}function mb(e,n,r){let i;if(n==="viewport")i=JD(e,r);else if(n==="document")i=WD(dr(e));else if(Gn(n))i=tO(n,r);else{const o=Sw(e);i={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Xu(i)}function kw(e,n){const r=va(e);return r===n||!Gn(r)||Ji(r)?!1:Yn(r).position==="fixed"||kw(r,n)}function nO(e,n){const r=n.get(e);if(r)return r;let i=No(e,[],!1).filter(f=>Gn(f)&&fl(f)!=="body"),o=null;const s=Yn(e).position==="fixed";let c=s?va(e):e;for(;Gn(c)&&!Ji(c);){const f=Yn(c),h=Kp(c);!h&&f.position==="fixed"&&(o=null),(s?!h&&!o:!h&&f.position==="static"&&!!o&&eO.has(o.position)||Yo(c)&&!h&&kw(e,c))?i=i.filter(m=>m!==c):o=f,c=va(c)}return n.set(e,i),i}function rO(e){let{element:n,boundary:r,rootBoundary:i,strategy:o}=e;const c=[...r==="clippingAncestors"?xc(n)?[]:nO(n,this._c):[].concat(r),i],f=c[0],h=c.reduce((d,m)=>{const y=mb(n,m,o);return d.top=yn(y.top,d.top),d.right=ya(y.right,d.right),d.bottom=ya(y.bottom,d.bottom),d.left=yn(y.left,d.left),d},mb(n,f,o));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function aO(e){const{width:n,height:r}=ww(e);return{width:n,height:r}}function iO(e,n,r){const i=fr(n),o=dr(n),s=r==="fixed",c=Ya(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const h=ur(0);function d(){h.x=Zp(o)}if(i||!i&&!s)if((fl(n)!=="body"||Yo(o))&&(f=bc(n)),i){const w=Ya(n,!0,s,n);h.x=w.x+n.clientLeft,h.y=w.y+n.clientTop}else o&&d();s&&!i&&o&&d();const m=o&&!i&&!s?Ew(o,f):ur(0),y=c.left+f.scrollLeft-h.x-m.x,b=c.top+f.scrollTop-h.y-m.y;return{x:y,y:b,width:c.width,height:c.height}}function ph(e){return Yn(e).position==="static"}function gb(e,n){if(!fr(e)||Yn(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return dr(e)===r&&(r=r.ownerDocument.body),r}function Cw(e,n){const r=vn(e);if(xc(e))return r;if(!fr(e)){let o=va(e);for(;o&&!Ji(o);){if(Gn(o)&&!ph(o))return o;o=va(o)}return r}let i=gb(e,n);for(;i&&HD(i)&&ph(i);)i=gb(i,n);return i&&Ji(i)&&ph(i)&&!Kp(i)?r:i||GD(e)||r}const lO=async function(e){const n=this.getOffsetParent||Cw,r=this.getDimensions,i=await r(e.floating);return{reference:iO(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function oO(e){return Yn(e).direction==="rtl"}const sO={convertOffsetParentRelativeRectToViewportRelativeRect:QD,getDocumentElement:dr,getClippingRect:rO,getOffsetParent:Cw,getElementRects:lO,getClientRects:ZD,getDimensions:aO,getScale:Xi,isElement:Gn,isRTL:oO};function Aw(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function uO(e,n){let r=null,i;const o=dr(e);function s(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),s();const d=e.getBoundingClientRect(),{left:m,top:y,width:b,height:w}=d;if(f||n(),!b||!w)return;const k=Cu(y),C=Cu(o.clientWidth-(m+b)),T=Cu(o.clientHeight-(y+w)),A=Cu(m),N={rootMargin:-k+"px "+-C+"px "+-T+"px "+-A+"px",threshold:yn(0,ya(1,h))||1};let O=!0;function z(j){const $=j[0].intersectionRatio;if($!==h){if(!O)return c();$?c(!1,$):i=setTimeout(()=>{c(!1,1e-7)},1e3)}$===1&&!Aw(d,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(z,{...N,root:o.ownerDocument})}catch{r=new IntersectionObserver(z,N)}r.observe(e)}return c(!0),s}function cO(e,n,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,d=Qp(e),m=o||s?[...d?No(d):[],...No(n)]:[];m.forEach(A=>{o&&A.addEventListener("scroll",r,{passive:!0}),s&&A.addEventListener("resize",r)});const y=d&&f?uO(d,r):null;let b=-1,w=null;c&&(w=new ResizeObserver(A=>{let[_]=A;_&&_.target===d&&w&&(w.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=w)==null||N.observe(n)})),r()}),d&&!h&&w.observe(d),w.observe(n));let k,C=h?Ya(e):null;h&&T();function T(){const A=Ya(e);C&&!Aw(C,A)&&r(),C=A,k=requestAnimationFrame(T)}return r(),()=>{var A;m.forEach(_=>{o&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),y?.(),(A=w)==null||A.disconnect(),w=null,h&&cancelAnimationFrame(k)}}const fO=LD,dO=zD,hO=jD,pO=ID,mO=DD,yb=MD,gO=PD,yO=(e,n,r)=>{const i=new Map,o={platform:sO,...r},s={...o.platform,_c:i};return ND(e,n,{...o,platform:s})};var vO=typeof document<"u",xO=function(){},Iu=vO?x.useLayoutEffect:xO;function Qu(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,i,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(i=r;i--!==0;)if(!Qu(e[i],n[i]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){const s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!Qu(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function Tw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vb(e,n){const r=Tw(e);return Math.round(n*r)/r}function mh(e){const n=x.useRef(e);return Iu(()=>{n.current=e}),n}function bO(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:h,open:d}=e,[m,y]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,w]=x.useState(i);Qu(b,i)||w(i);const[k,C]=x.useState(null),[T,A]=x.useState(null),_=x.useCallback(U=>{U!==j.current&&(j.current=U,C(U))},[]),N=x.useCallback(U=>{U!==$.current&&($.current=U,A(U))},[]),O=s||k,z=c||T,j=x.useRef(null),$=x.useRef(null),G=x.useRef(m),ee=h!=null,P=mh(h),ne=mh(o),ae=mh(d),le=x.useCallback(()=>{if(!j.current||!$.current)return;const U={placement:n,strategy:r,middleware:b};ne.current&&(U.platform=ne.current),yO(j.current,$.current,U).then(J=>{const E={...J,isPositioned:ae.current!==!1};H.current&&!Qu(G.current,E)&&(G.current=E,oc.flushSync(()=>{y(E)}))})},[b,n,r,ne,ae]);Iu(()=>{d===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,y(U=>({...U,isPositioned:!1})))},[d]);const H=x.useRef(!1);Iu(()=>(H.current=!0,()=>{H.current=!1}),[]),Iu(()=>{if(O&&(j.current=O),z&&($.current=z),O&&z){if(P.current)return P.current(O,z,le);le()}},[O,z,le,P,ee]);const Q=x.useMemo(()=>({reference:j,floating:$,setReference:_,setFloating:N}),[_,N]),L=x.useMemo(()=>({reference:O,floating:z}),[O,z]),K=x.useMemo(()=>{const U={position:r,left:0,top:0};if(!L.floating)return U;const J=vb(L.floating,m.x),E=vb(L.floating,m.y);return f?{...U,transform:"translate("+J+"px, "+E+"px)",...Tw(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:J,top:E}},[r,f,L.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:le,refs:Q,elements:L,floatingStyles:K}),[m,le,Q,L,K])}const wO=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:o}=typeof e=="function"?e(r):e;return i&&n(i)?i.current!=null?yb({element:i.current,padding:o}).fn(r):{}:i?yb({element:i,padding:o}).fn(r):{}}}},SO=(e,n)=>({...fO(e),options:[e,n]}),EO=(e,n)=>({...dO(e),options:[e,n]}),kO=(e,n)=>({...gO(e),options:[e,n]}),CO=(e,n)=>({...hO(e),options:[e,n]}),AO=(e,n)=>({...pO(e),options:[e,n]}),TO=(e,n)=>({...mO(e),options:[e,n]}),RO=(e,n)=>({...wO(e),options:[e,n]});var _O="Arrow",Rw=x.forwardRef((e,n)=>{const{children:r,width:i=10,height:o=5,...s}=e;return g.jsx(Fe.svg,{...s,ref:n,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rw.displayName=_O;var NO=Rw;function _w(e){const[n,r]=x.useState(void 0);return cr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,f;if("borderBoxSize"in s){const h=s.borderBoxSize,d=Array.isArray(h)?h[0]:h;c=d.inlineSize,f=d.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),n}var Wp="Popper",[Nw,wc]=Xn(Wp),[MO,Mw]=Nw(Wp),jw=e=>{const{__scopePopper:n,children:r}=e,[i,o]=x.useState(null);return g.jsx(MO,{scope:n,anchor:i,onAnchorChange:o,children:r})};jw.displayName=Wp;var Dw="PopperAnchor",Ow=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:i,...o}=e,s=Mw(Dw,r),c=x.useRef(null),f=Xe(n,c),h=x.useRef(null);return x.useEffect(()=>{const d=h.current;h.current=i?.current||c.current,d!==h.current&&s.onAnchorChange(h.current)}),i?null:g.jsx(Fe.div,{...o,ref:f})});Ow.displayName=Dw;var Jp="PopperContent",[jO,DO]=Nw(Jp),Lw=x.forwardRef((e,n)=>{const{__scopePopper:r,side:i="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:k,...C}=e,T=Mw(Jp,r),[A,_]=x.useState(null),N=Xe(n,xe=>_(xe)),[O,z]=x.useState(null),j=_w(O),$=j?.width??0,G=j?.height??0,ee=i+(s!=="center"?"-"+s:""),P=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ne=Array.isArray(d)?d:[d],ae=ne.length>0,le={padding:P,boundary:ne.filter(LO),altBoundary:ae},{refs:H,floatingStyles:Q,placement:L,isPositioned:K,middlewareData:U}=bO({strategy:"fixed",placement:ee,whileElementsMounted:(...xe)=>cO(...xe,{animationFrame:w==="always"}),elements:{reference:T.anchor},middleware:[SO({mainAxis:o+G,alignmentAxis:c}),h&&EO({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?kO():void 0,...le}),h&&CO({...le}),AO({...le,apply:({elements:xe,rects:Ee,availableWidth:Qe,availableHeight:bt})=>{const{width:Rt,height:It}=Ee.reference,Gt=xe.floating.style;Gt.setProperty("--radix-popper-available-width",`${Qe}px`),Gt.setProperty("--radix-popper-available-height",`${bt}px`),Gt.setProperty("--radix-popper-anchor-width",`${Rt}px`),Gt.setProperty("--radix-popper-anchor-height",`${It}px`)}}),O&&RO({element:O,padding:f}),zO({arrowWidth:$,arrowHeight:G}),b&&TO({strategy:"referenceHidden",...le})]}),[J,E]=Iw(L),Z=kt(k);cr(()=>{K&&Z?.()},[K,Z]);const oe=U.arrow?.x,M=U.arrow?.y,se=U.arrow?.centerOffset!==0,[Se,he]=x.useState();return cr(()=>{A&&he(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:K?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(jO,{scope:r,placedSide:J,onArrowChange:z,arrowX:oe,arrowY:M,shouldHideArrow:se,children:g.jsx(Fe.div,{"data-side":J,"data-align":E,...C,ref:N,style:{...C.style,animation:K?void 0:"none"}})})})});Lw.displayName=Jp;var zw="PopperArrow",OO={top:"bottom",right:"left",bottom:"top",left:"right"},Pw=x.forwardRef(function(n,r){const{__scopePopper:i,...o}=n,s=DO(zw,i),c=OO[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(NO,{...o,ref:r,style:{...o.style,display:"block"}})})});Pw.displayName=zw;function LO(e){return e!==null}var zO=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:i,middlewareData:o}=n,c=o.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[d,m]=Iw(r),y={start:"0%",center:"50%",end:"100%"}[m],b=(o.arrow?.x??0)+f/2,w=(o.arrow?.y??0)+h/2;let k="",C="";return d==="bottom"?(k=c?y:`${b}px`,C=`${-h}px`):d==="top"?(k=c?y:`${b}px`,C=`${i.floating.height+h}px`):d==="right"?(k=`${-h}px`,C=c?y:`${w}px`):d==="left"&&(k=`${i.floating.width+h}px`,C=c?y:`${w}px`),{data:{x:k,y:C}}}});function Iw(e){const[n,r="center"]=e.split("-");return[n,r]}var Bw=jw,Uw=Ow,Hw=Lw,Fw=Pw,[Sc,EB]=Xn("Tooltip",[wc]),Ec=wc(),qw="TooltipProvider",PO=700,Wh="tooltip.open",[IO,em]=Sc(qw),Vw=e=>{const{__scopeTooltip:n,delayDuration:r=PO,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:s}=e,c=x.useRef(!0),f=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),g.jsx(IO,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(h.current),c.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(d=>{f.current=d},[]),disableHoverableContent:o,children:s})};Vw.displayName=qw;var Mo="Tooltip",[BO,kc]=Sc(Mo),$w=e=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,h=em(Mo,e.__scopeTooltip),d=Ec(n),[m,y]=x.useState(null),b=$a(),w=x.useRef(0),k=c??h.disableHoverableContent,C=f??h.delayDuration,T=x.useRef(!1),[A,_]=ol({prop:i,defaultProp:o??!1,onChange:$=>{$?(h.onOpen(),document.dispatchEvent(new CustomEvent(Wh))):h.onClose(),s?.($)},caller:Mo}),N=x.useMemo(()=>A?T.current?"delayed-open":"instant-open":"closed",[A]),O=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,T.current=!1,_(!0)},[_]),z=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,_(!1)},[_]),j=x.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{T.current=!0,_(!0),w.current=0},C)},[C,_]);return x.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),g.jsx(Bw,{...d,children:g.jsx(BO,{scope:n,contentId:b,open:A,stateAttribute:N,trigger:m,onTriggerChange:y,onTriggerEnter:x.useCallback(()=>{h.isOpenDelayedRef.current?j():O()},[h.isOpenDelayedRef,j,O]),onTriggerLeave:x.useCallback(()=>{k?z():(window.clearTimeout(w.current),w.current=0)},[z,k]),onOpen:O,onClose:z,disableHoverableContent:k,children:r})})};$w.displayName=Mo;var Jh="TooltipTrigger",Gw=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,o=kc(Jh,r),s=em(Jh,r),c=Ec(r),f=x.useRef(null),h=Xe(n,f,o.onTriggerChange),d=x.useRef(!1),m=x.useRef(!1),y=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Uw,{asChild:!0,...c,children:g.jsx(Fe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:h,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:pe(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:pe(e.onBlur,o.onClose),onClick:pe(e.onClick,o.onClose)})})});Gw.displayName=Jh;var UO="TooltipPortal",[kB,HO]=Sc(UO,{forceMount:void 0}),el="TooltipContent",Yw=x.forwardRef((e,n)=>{const r=HO(el,e.__scopeTooltip),{forceMount:i=r.forceMount,side:o="top",...s}=e,c=kc(el,e.__scopeTooltip);return g.jsx(Zt,{present:i||c.open,children:c.disableHoverableContent?g.jsx(Kw,{side:o,...s,ref:n}):g.jsx(FO,{side:o,...s,ref:n})})}),FO=x.forwardRef((e,n)=>{const r=kc(el,e.__scopeTooltip),i=em(el,e.__scopeTooltip),o=x.useRef(null),s=Xe(n,o),[c,f]=x.useState(null),{trigger:h,onClose:d}=r,m=o.current,{onPointerInTransitChange:y}=i,b=x.useCallback(()=>{f(null),y(!1)},[y]),w=x.useCallback((k,C)=>{const T=k.currentTarget,A={x:k.clientX,y:k.clientY},_=YO(A,T.getBoundingClientRect()),N=KO(A,_),O=XO(C.getBoundingClientRect()),z=ZO([...N,...O]);f(z),y(!0)},[y]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(h&&m){const k=T=>w(T,m),C=T=>w(T,h);return h.addEventListener("pointerleave",k),m.addEventListener("pointerleave",C),()=>{h.removeEventListener("pointerleave",k),m.removeEventListener("pointerleave",C)}}},[h,m,w,b]),x.useEffect(()=>{if(c){const k=C=>{const T=C.target,A={x:C.clientX,y:C.clientY},_=h?.contains(T)||m?.contains(T),N=!QO(A,c);_?b():N&&(b(),d())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[h,m,c,d,b]),g.jsx(Kw,{...e,ref:s})}),[qO,VO]=Sc(Mo,{isInside:!1}),$O=G0("TooltipContent"),Kw=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:i,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,h=kc(el,r),d=Ec(r),{onClose:m}=h;return x.useEffect(()=>(document.addEventListener(Wh,m),()=>document.removeEventListener(Wh,m)),[m]),x.useEffect(()=>{if(h.trigger){const y=b=>{b.target?.contains(h.trigger)&&m()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,m]),g.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:m,children:g.jsxs(Hw,{"data-state":h.stateAttribute,...d,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx($O,{children:i}),g.jsx(qO,{scope:r,isInside:!0,children:g.jsx(v_,{id:h.contentId,role:"tooltip",children:o||i})})]})})});Yw.displayName=el;var Xw="TooltipArrow",GO=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,o=Ec(r);return VO(Xw,r).isInside?null:g.jsx(Fw,{...o,...i,ref:n})});GO.displayName=Xw;function YO(e,n){const r=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,i,o,s)){case s:return"left";case o:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function KO(e,n,r=5){const i=[];switch(n){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function XO(e){const{top:n,right:r,bottom:i,left:o}=e;return[{x:o,y:n},{x:r,y:n},{x:r,y:i},{x:o,y:i}]}function QO(e,n){const{x:r,y:i}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],h=n[c],d=f.x,m=f.y,y=h.x,b=h.y;m>i!=b>i&&r<(y-d)*(i-m)/(b-m)+d&&(o=!o)}return o}function ZO(e){const n=e.slice();return n.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),WO(n)}function WO(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const o=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}n.pop();const r=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))r.pop();else break}r.push(o)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var JO=Vw,e4=$w,t4=Gw,Qw=Yw;const n4=JO,r4=e4,a4=t4,Zw=x.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(Qw,{ref:i,sideOffset:n,className:fe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Zw.displayName=Qw.displayName;const i4="sidebar_state",l4=3600*24*7,o4="16rem",s4="18rem",u4="3rem",c4="b",Ww=x.createContext(null);function Cc(){const e=x.useContext(Ww);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Jw=x.forwardRef(({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:o,children:s,...c},f)=>{const h=O1(),[d,m]=x.useState(!1),[y,b]=x.useState(e),w=n??y,k=x.useCallback(_=>{const N=typeof _=="function"?_(w):_;r?r(N):b(N),document.cookie=`${i4}=${N}; path=/; max-age=${l4}`},[r,w]),C=x.useCallback(()=>h?m(_=>!_):k(_=>!_),[h,k,m]);x.useEffect(()=>{const _=N=>{N.key===c4&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),C())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[C]);const T=w?"expanded":"collapsed",A=x.useMemo(()=>({state:T,open:w,setOpen:k,isMobile:h,openMobile:d,setOpenMobile:m,toggleSidebar:C}),[T,w,k,h,d,m,C]);return g.jsx(Ww.Provider,{value:A,children:g.jsx(n4,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":o4,"--sidebar-width-icon":u4,...o},className:fe("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:f,...c,children:s})})})});Jw.displayName="SidebarProvider";const eS=x.forwardRef(({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:o,...s},c)=>{const{isMobile:f,state:h,openMobile:d,setOpenMobile:m}=Cc();return r==="none"?g.jsx("div",{className:fe("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:c,...s,children:o}):f?g.jsx(pw,{open:d,onOpenChange:m,...s,children:g.jsxs(Fp,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":s4},side:e,children:[g.jsxs(qp,{className:"sr-only",children:[g.jsx(Vp,{children:"Sidebar"}),g.jsx(gw,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):g.jsxs("div",{ref:c,className:"group peer hidden text-sidebar-foreground md:block","data-state":h,"data-collapsible":h==="collapsed"?r:"","data-variant":n,"data-side":e,children:[g.jsx("div",{className:fe("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:fe("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});eS.displayName="Sidebar";const tS=x.forwardRef(({className:e,onClick:n,...r},i)=>{const{toggleSidebar:o}=Cc();return g.jsxs(pt,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:fe("h-7 w-7",e),onClick:s=>{n?.(s),o()},...r,children:[g.jsx(qN,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});tS.displayName="SidebarTrigger";const f4=x.forwardRef(({className:e,...n},r)=>{const{toggleSidebar:i}=Cc();return g.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:fe("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})});f4.displayName="SidebarRail";const nS=x.forwardRef(({className:e,...n},r)=>g.jsx("main",{ref:r,className:fe("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...n}));nS.displayName="SidebarInset";const d4=x.forwardRef(({className:e,...n},r)=>g.jsx(L1,{ref:r,"data-sidebar":"input",className:fe("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...n}));d4.displayName="SidebarInput";const rS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"header",className:fe("flex flex-col gap-2 p-2",e),...n}));rS.displayName="SidebarHeader";const aS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"footer",className:fe("flex flex-col gap-2 p-2",e),...n}));aS.displayName="SidebarFooter";const h4=x.forwardRef(({className:e,...n},r)=>g.jsx(I1,{ref:r,"data-sidebar":"separator",className:fe("mx-2 w-auto bg-sidebar-border",e),...n}));h4.displayName="SidebarSeparator";const iS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"content",className:fe("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n}));iS.displayName="SidebarContent";const yo=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group",className:fe("relative flex w-full min-w-0 flex-col p-2",e),...n}));yo.displayName="SidebarGroup";const Bu=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const o=n?ll:"div";return g.jsx(o,{ref:i,"data-sidebar":"group-label",className:fe("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Bu.displayName="SidebarGroupLabel";const p4=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const o=n?ll:"button";return g.jsx(o,{ref:i,"data-sidebar":"group-action",className:fe("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});p4.displayName="SidebarGroupAction";const vo=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group-content",className:fe("w-full text-sm",e),...n}));vo.displayName="SidebarGroupContent";const Va=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu",className:fe("flex w-full min-w-0 flex-col gap-1",e),...n}));Va.displayName="SidebarMenu";const ha=x.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,"data-sidebar":"menu-item",className:fe("group/menu-item relative",e),...n}));ha.displayName="SidebarMenuItem";const m4=pc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-active data-[active=true]:font-medium data-[active=true]:text-sidebar-active-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),pa=x.forwardRef(({asChild:e=!1,isActive:n=!1,variant:r="default",size:i="default",tooltip:o,className:s,...c},f)=>{const h=e?ll:"button",{isMobile:d,state:m}=Cc(),y=g.jsx(h,{ref:f,"data-sidebar":"menu-button","data-size":i,"data-active":n,className:fe(m4({variant:r,size:i}),s),...c});return o?(typeof o=="string"&&(o={children:o}),g.jsxs(r4,{children:[g.jsx(a4,{asChild:!0,children:y}),g.jsx(Zw,{side:"right",align:"center",hidden:m!=="collapsed"||d,...o})]})):y});pa.displayName="SidebarMenuButton";const g4=x.forwardRef(({className:e,asChild:n=!1,showOnHover:r=!1,...i},o)=>{const s=n?ll:"button";return g.jsx(s,{ref:o,"data-sidebar":"menu-action",className:fe("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-active-foreground md:opacity-0",e),...i})});g4.displayName="SidebarMenuAction";const ep=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:fe("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...n}));ep.displayName="SidebarMenuBadge";const y4=x.forwardRef(({className:e,showIcon:n=!1,...r},i)=>{const o=x.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:fe("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[n&&g.jsx(sb,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(sb,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});y4.displayName="SidebarMenuSkeleton";const lS=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:fe("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...n}));lS.displayName="SidebarMenuSub";const oS=x.forwardRef(({...e},n)=>g.jsx("li",{ref:n,...e}));oS.displayName="SidebarMenuSubItem";const sS=x.forwardRef(({asChild:e=!1,size:n="md",isActive:r,className:i,...o},s)=>{const c=e?ll:"a";return g.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:fe("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-active data-[active=true]:text-sidebar-active-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o})});sS.displayName="SidebarMenuSubButton";const v4="1.0.75-alpha.11",x4={version:v4};function b4({className:e}){return g.jsxs("svg",{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",className:e,children:[g.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),g.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),g.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),g.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}function Ha(e,n){if(n==="/")return e==="/";const r=e.match(/^\/terminal\/([^/]+)/);if(r){const i=r[1];if(n==="/agents")return i.startsWith("cp-")||i.startsWith("sk-");if(n==="/terminal")return!i.startsWith("cp-")&&!i.startsWith("sk-")}return e===n||e.startsWith(n+"/")}const w4=[{title:"Home",url:"/",icon:TN},{title:"Tasks",url:"/tasks",icon:hN},{title:"Skills",url:"/skills",icon:oN}],S4=[{title:"Agents",url:"/agents",icon:So},{title:"Jobs",url:"/schedule",icon:Q_},{title:"Utilities",url:"/utilities",icon:SM}],E4=[{title:"Knowledge",url:"/knowledge",icon:K_},{title:"Resources",url:"/resources",icon:xN}],xb=[{title:"Overview",url:"/context/project",icon:Vu},{title:"Architecture",url:"/context/architecture",icon:JN},{title:"Role",url:"/context/role",icon:vM}],k4=[{title:"Source Control",url:"/git",icon:v1},{title:"Terminal",url:"/terminal",icon:dM},{title:"Identity",url:"/identity",icon:_N},{title:"Activity",url:"/activity",icon:q_}],C4=[{title:"Documentation",url:"https://docs.coconut.dev/studio",icon:HN,external:!0},{title:"Settings",url:"/settings/user",icon:tM}];function A4(){const{badges:e}=BR(),n=bn(),[r,i]=x.useState(!1);return x.useEffect(()=>{xb.some(s=>Ha(n.pathname,s.url))&&i(!0)},[n.pathname]),g.jsxs(eS,{className:"bg-sidebar border-r border-sidebar-border",children:[g.jsx(rS,{children:g.jsx(Va,{children:g.jsx(ha,{children:g.jsx(pa,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:g.jsxs(lr,{to:"/",children:[g.jsx(b4,{className:"size-8"}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs("span",{className:"font-semibold",children:[g.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),g.jsx("span",{children:" Studio"})]}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",x4.version]})]})]})})})})}),g.jsxs(iS,{children:[g.jsx(yo,{children:g.jsx(vo,{children:g.jsx(Va,{children:w4.map(o=>g.jsx(ha,{children:g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title))})})}),g.jsxs(yo,{children:[g.jsx(Bu,{children:"Work"}),g.jsx(vo,{children:g.jsx(Va,{children:S4.map(o=>{let s=0;return o.title==="Agents"&&e.codeSessions>0?s=e.codeSessions:o.title==="Jobs"&&e.runningScheduledJobs>0&&(s=e.runningScheduledJobs),g.jsxs(ha,{children:[g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})}),s>0&&g.jsx(ep,{className:"bg-blue-600 text-white dark:bg-blue-500",children:s})]},o.title)})})})]}),g.jsxs(yo,{children:[g.jsx(Bu,{children:"Assets"}),g.jsx(vo,{children:g.jsxs(Va,{children:[E4.map(o=>g.jsx(ha,{children:g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title)),g.jsxs(ha,{children:[g.jsxs(pa,{onClick:()=>i(o=>!o),"data-state":r?"open":"closed",className:"w-full",children:[g.jsx(wN,{}),g.jsx("span",{children:"Context"}),g.jsx(tN,{className:`ml-auto size-4 shrink-0 transition-transform duration-200 ${r?"rotate-180":""}`})]}),r&&g.jsx(lS,{children:xb.map(o=>g.jsx(oS,{children:g.jsx(sS,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title))})]})]})})]}),g.jsxs(yo,{children:[g.jsx(Bu,{children:"System"}),g.jsx(vo,{children:g.jsx(Va,{children:k4.map(o=>{let s=0;return o.title==="Source Control"&&e.gitChanges>0?s=e.gitChanges:o.title==="Terminal"&&e.terminalSessions>0&&(s=e.terminalSessions),g.jsxs(ha,{children:[g.jsx(pa,{asChild:!0,isActive:Ha(n.pathname,o.url),children:g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})}),s>0&&g.jsx(ep,{className:"bg-blue-600 text-white dark:bg-blue-500",children:s})]},o.title)})})})]})]}),g.jsx(aS,{children:g.jsx(Va,{children:C4.map(o=>g.jsx(ha,{children:g.jsx(pa,{asChild:!0,isActive:!o.external&&Ha(n.pathname,o.url==="/settings/user"?"/settings":o.url),children:o.external?g.jsxs("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]}):g.jsxs(lr,{to:o.url,children:[g.jsx(o.icon,{}),g.jsx("span",{children:o.title})]})})},o.title))})})]})}function T4(e){const n=e.match(/\bres-\d+-[a-z0-9]+\b/g);return n?[...new Set(n)]:[]}const Ac=Up,CB=hw,R4=Hp,uS=x.forwardRef(({className:e,...n},r)=>g.jsx(qo,{ref:r,className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));uS.displayName=qo.displayName;const Ko=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(R4,{children:[g.jsx(uS,{}),g.jsxs(Vo,{ref:i,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(yc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(Yi,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ko.displayName=Vo.displayName;const Xo=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});Xo.displayName="DialogHeader";const cS=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});cS.displayName="DialogFooter";const Qo=x.forwardRef(({className:e,...n},r)=>g.jsx($o,{ref:r,className:fe("text-lg font-semibold leading-none tracking-tight",e),...n}));Qo.displayName=$o.displayName;const xo=x.forwardRef(({className:e,...n},r)=>g.jsx(Go,{ref:r,className:fe("text-sm text-muted-foreground",e),...n}));xo.displayName=Go.displayName;function gh({className:e,...n}){return g.jsx("kbd",{"data-slot":"kbd",className:fe("inline-flex h-5 items-center justify-center rounded border border-muted-foreground/30 bg-muted/50 px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-sm",e),...n})}function AB({className:e,...n}){return g.jsx("span",{"data-slot":"kbd-group",className:fe("inline-flex items-center gap-0.5",e),...n})}function TB(){}function RB(){}function _B(e){const n=[],r=String(e||"");let i=r.indexOf(","),o=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const c=r.slice(o,i).trim();(c||!s)&&n.push(c),o=i+1,i=r.indexOf(",",o)}return n}function _4(e,n){const r=n||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const N4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j4={};function bb(e,n){return(j4.jsx?M4:N4).test(e)}const D4=/[ \t\n\f\r]/g;function O4(e){return typeof e=="object"?e.type==="text"?wb(e.value):!1:wb(e)}function wb(e){return e.replace(D4,"")===""}class Zo{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}Zo.prototype.normal={};Zo.prototype.property={};Zo.prototype.space=void 0;function fS(e,n){const r={},i={};for(const o of e)Object.assign(r,o.property),Object.assign(i,o.normal);return new Zo(r,i,n)}function tp(e){return e.toLowerCase()}class on{constructor(n,r){this.attribute=r,this.property=n}}on.prototype.attribute="";on.prototype.booleanish=!1;on.prototype.boolean=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.commaSeparated=!1;on.prototype.defined=!1;on.prototype.mustUseProperty=!1;on.prototype.number=!1;on.prototype.overloadedBoolean=!1;on.prototype.property="";on.prototype.spaceSeparated=!1;on.prototype.space=void 0;let L4=0;const Le=Xa(),Et=Xa(),np=Xa(),ce=Xa(),lt=Xa(),Qi=Xa(),gn=Xa();function Xa(){return 2**++L4}const rp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Et,commaOrSpaceSeparated:gn,commaSeparated:Qi,number:ce,overloadedBoolean:np,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(rp);class tm extends on{constructor(n,r,i,o){let s=-1;if(super(n,r),Sb(this,"space",o),typeof i=="number")for(;++s<yh.length;){const c=yh[s];Sb(this,yh[s],(i&rp[c])===rp[c])}}}tm.prototype.defined=!0;function Sb(e,n,r){r&&(e[n]=r)}function dl(e){const n={},r={};for(const[i,o]of Object.entries(e.properties)){const s=new tm(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[tp(i)]=i,r[tp(s.attribute)]=i}return new Zo(n,r,e.space)}const dS=dl({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:lt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ce,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:lt,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:Et,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function hS(e,n){return n in e?e[n]:n}function pS(e,n){return hS(e,n.toLowerCase())}const z4=dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qi,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:lt,autoFocus:Le,autoPlay:Le,blocking:lt,capture:null,charSet:null,checked:Le,cite:null,className:lt,cols:ce,colSpan:null,content:null,contentEditable:Et,controls:Le,controlsList:lt,coords:ce|Qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:np,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:lt,height:ce,hidden:np,high:ce,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:lt,itemRef:lt,itemScope:Le,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:ce,pattern:null,ping:lt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:lt,required:Le,reversed:Le,rows:ce,rowSpan:ce,sandbox:lt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:Et,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:pS}),P4=dl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gn,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qi,g2:Qi,glyphName:Qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ce,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hS}),mS=dl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),gS=dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pS}),yS=dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),I4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},B4=/[A-Z]/g,Eb=/-[a-z]/g,U4=/^data[-\w.:]+$/i;function H4(e,n){const r=tp(n);let i=n,o=on;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&U4.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Eb,q4);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Eb.test(s)){let c=s.replace(B4,F4);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=tm}return new o(i,n)}function F4(e){return"-"+e.toLowerCase()}function q4(e){return e.charAt(1).toUpperCase()}const V4=fS([dS,z4,mS,gS,yS],"html"),nm=fS([dS,P4,mS,gS,yS],"svg");function NB(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function $4(e){return e.join(" ").trim()}var Vi={},vh,kb;function G4(){if(kb)return vh;kb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
376
|
+
`,d="/",m="*",y="",b="comment",w="declaration";vh=function(C,T){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];T=T||{};var A=1,_=1;function N(le){var H=le.match(n);H&&(A+=H.length);var Q=le.lastIndexOf(h);_=~Q?le.length-Q:_+le.length}function O(){var le={line:A,column:_};return function(H){return H.position=new z(le),G(),H}}function z(le){this.start=le,this.end={line:A,column:_},this.source=T.source}z.prototype.content=C;function j(le){var H=new Error(T.source+":"+A+":"+_+": "+le);if(H.reason=le,H.filename=T.source,H.line=A,H.column=_,H.source=C,!T.silent)throw H}function $(le){var H=le.exec(C);if(H){var Q=H[0];return N(Q),C=C.slice(Q.length),H}}function G(){$(r)}function ee(le){var H;for(le=le||[];H=P();)H!==!1&&le.push(H);return le}function P(){var le=O();if(!(d!=C.charAt(0)||m!=C.charAt(1))){for(var H=2;y!=C.charAt(H)&&(m!=C.charAt(H)||d!=C.charAt(H+1));)++H;if(H+=2,y===C.charAt(H-1))return j("End of comment missing");var Q=C.slice(2,H-2);return _+=2,N(Q),C=C.slice(H),_+=2,le({type:b,comment:Q})}}function ne(){var le=O(),H=$(i);if(H){if(P(),!$(o))return j("property missing ':'");var Q=$(s),L=le({type:w,property:k(H[0].replace(e,y)),value:Q?k(Q[0].replace(e,y)):y});return $(c),L}}function ae(){var le=[];ee(le);for(var H;H=ne();)H!==!1&&(le.push(H),ee(le));return le}return G(),ae()};function k(C){return C?C.replace(f,y):y}return vh}var Cb;function Y4(){if(Cb)return Vi;Cb=1;var e=Vi&&Vi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=r;var n=e(G4());function r(i,o){var s=null;if(!i||typeof i!="string")return s;var c=(0,n.default)(i),f=typeof o=="function";return c.forEach(function(h){if(h.type==="declaration"){var d=h.property,m=h.value;f?o(d,m,h):m&&(s=s||{},s[d]=m)}}),s}return Vi}var ho={},Ab;function K4(){if(Ab)return ho;Ab=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(d){return!d||r.test(d)||e.test(d)},c=function(d,m){return m.toUpperCase()},f=function(d,m){return"".concat(m,"-")},h=function(d,m){return m===void 0&&(m={}),s(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(o,f):d=d.replace(i,f),d.replace(n,c))};return ho.camelCase=h,ho}var po,Tb;function X4(){if(Tb)return po;Tb=1;var e=po&&po.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(Y4()),r=K4();function i(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,h){f&&h&&(c[(0,r.camelCase)(f,s)]=h)}),c}return i.default=i,po=i,po}var Q4=X4();const Z4=ac(Q4),vS=xS("end"),rm=xS("start");function xS(e){return n;function n(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function bS(e){const n=rm(e),r=vS(e);if(n&&r)return{start:n,end:r}}function Eo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rb(e.position):"start"in e||"end"in e?Rb(e):"line"in e||"column"in e?ap(e):""}function ap(e){return _b(e&&e.line)+":"+_b(e&&e.column)}function Rb(e){return ap(e&&e.start)+"-"+ap(e&&e.end)}function _b(e){return e&&typeof e=="number"?e:1}class $t extends Error{constructor(n,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let o="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?s.ruleId=i:(s.source=i.slice(0,h),s.ruleId=i.slice(h+1))}if(!s.place&&s.ancestors&&s.ancestors){const h=s.ancestors[s.ancestors.length-1];h&&(s.place=h.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Eo(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const am={}.hasOwnProperty,W4=new Map,J4=/[A-Z]/g,e3=new Set(["table","tbody","thead","tfoot","tr"]),t3=new Set(["td","th"]),wS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function n3(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=c3(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=u3(r,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?nm:V4,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=SS(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function SS(e,n,r){if(n.type==="element")return r3(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return a3(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return l3(e,n,r);if(n.type==="mdxjsEsm")return i3(e,n);if(n.type==="root")return o3(e,n,r);if(n.type==="text")return s3(e,n)}function r3(e,n,r){const i=e.schema;let o=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=nm,e.schema=o),e.ancestors.push(n);const s=kS(e,n.tagName,!1),c=f3(e,n);let f=lm(e,n);return e3.has(n.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!O4(h):!0})),ES(e,c,s,n),im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function a3(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}jo(e,n.position)}function i3(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);jo(e,n.position)}function l3(e,n,r){const i=e.schema;let o=i;n.name==="svg"&&i.space==="html"&&(o=nm,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:kS(e,n.name,!0),c=d3(e,n),f=lm(e,n);return ES(e,c,s,n),im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function o3(e,n,r){const i={};return im(i,lm(e,n)),e.create(n,e.Fragment,i,r)}function s3(e,n){return n.value}function ES(e,n,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=i)}function im(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function u3(e,n,r){return i;function i(o,s,c,f){const d=Array.isArray(c.children)?r:n;return f?d(s,c,f):d(s,c)}}function c3(e,n){return r;function r(i,o,s,c){const f=Array.isArray(s.children),h=rm(i);return n(o,s,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function f3(e,n){const r={};let i,o;for(o in n.properties)if(o!=="children"&&am.call(n.properties,o)){const s=h3(e,o,n.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&t3.has(n.tagName)?i=f:r[c]=f}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function d3(e,n){const r={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else jo(e,n.position);else{const o=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else jo(e,n.position);else s=i.value===null?!0:i.value;r[o]=s}return r}function lm(e,n){const r=[];let i=-1;const o=e.passKeys?new Map:W4;for(;++i<n.children.length;){const s=n.children[i];let c;if(e.passKeys){const h=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(h){const d=o.get(h)||0;c=h+"-"+d,o.set(h,d+1)}}const f=SS(e,s,c);f!==void 0&&r.push(f)}return r}function h3(e,n,r){const i=H4(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?_4(r):$4(r)),i.property==="style"){let o=typeof r=="object"?r:p3(e,String(r));return e.stylePropertyNameCase==="css"&&(o=m3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?I4[i.property]||i.property:i.attribute,r]}}function p3(e,n){try{return Z4(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new $t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=wS+"#cannot-parse-style-attribute",o}}function kS(e,n,r){let i;if(!r)i={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const f=bb(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}i=c}else i=bb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const o=i.value;return am.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);jo(e)}function jo(e,n){const r=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=wS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function m3(e){const n={};let r;for(r in e)am.call(e,r)&&(n[g3(r)]=e[r]);return n}function g3(e){let n=e.replace(J4,y3);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function y3(e){return"-"+e.toLowerCase()}const xh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},v3={};function om(e,n){const r=v3,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return CS(e,i,o)}function CS(e,n,r){if(x3(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nb(e.children,n,r)}return Array.isArray(e)?Nb(e,n,r):""}function Nb(e,n,r){const i=[];let o=-1;for(;++o<e.length;)i[o]=CS(e[o],n,r);return i.join("")}function x3(e){return!!(e&&typeof e=="object")}const Mb=document.createElement("i");function sm(e){const n="&"+e+";";Mb.innerHTML=n;const r=Mb.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function xn(e,n,r,i){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(n,r),e.splice(...c);else for(r&&e.splice(n,r);s<i.length;)c=i.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function jn(e,n){return e.length>0?(xn(e,e.length,0,n),e):n}const jb={}.hasOwnProperty;function AS(e){const n={};let r=-1;for(;++r<e.length;)b3(n,e[r]);return n}function b3(e,n){let r;for(r in n){const o=(jb.call(e,r)?e[r]:void 0)||(e[r]={}),s=n[r];let c;if(s)for(c in s){jb.call(o,c)||(o[c]=[]);const f=s[c];w3(o[c],Array.isArray(f)?f:f?[f]:[])}}}function w3(e,n){let r=-1;const i=[];for(;++r<n.length;)(n[r].add==="after"?e:i).push(n[r]);xn(e,0,0,i)}function TS(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function $n(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qt=xa(/[A-Za-z]/),Vt=xa(/[\dA-Za-z]/),S3=xa(/[#-'*+\--9=?A-Z^-~]/);function Zu(e){return e!==null&&(e<32||e===127)}const ip=xa(/\d/),E3=xa(/[\dA-Fa-f]/),k3=xa(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function at(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const Tc=xa(new RegExp("\\p{P}|\\p{S}","u")),Ka=xa(/\s/);function xa(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function hl(e){const n=[];let r=-1,i=0,o=0;for(;++r<e.length;){const s=e.charCodeAt(r);let c="";if(s===37&&Vt(e.charCodeAt(r+1))&&Vt(e.charCodeAt(r+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(i,r),encodeURIComponent(c)),i=r+o+1,c=""),o&&(r+=o,o=0)}return n.join("")+e.slice(i)}function Ve(e,n,r,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(h){return He(h)?(e.enter(r),f(h)):n(h)}function f(h){return He(h)&&s++<o?(e.consume(h),f):(e.exit(r),n(h))}}const C3={tokenize:A3};function A3(e){const n=e.attempt(this.parser.constructs.contentInitial,i,o);let r;return n;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ve(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ce(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const T3={tokenize:R3},Db={tokenize:_3};function R3(e){const n=this,r=[];let i=0,o,s,c;return f;function f(N){if(i<r.length){const O=r[i];return n.containerState=O[1],e.attempt(O[0].continuation,h,d)(N)}return d(N)}function h(N){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&_();const O=n.events.length;let z=O,j;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){j=n.events[z][1].end;break}A(i);let $=O;for(;$<n.events.length;)n.events[$][1].end={...j},$++;return xn(n.events,z+1,0,n.events.slice(O)),n.events.length=$,d(N)}return f(N)}function d(N){if(i===r.length){if(!o)return b(N);if(o.currentConstruct&&o.currentConstruct.concrete)return k(N);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Db,m,y)(N)}function m(N){return o&&_(),A(i),b(N)}function y(N){return n.parser.lazy[n.now().line]=i!==r.length,c=n.now().offset,k(N)}function b(N){return n.containerState={},e.attempt(Db,w,k)(N)}function w(N){return i++,r.push([n.currentConstruct,n.containerState]),b(N)}function k(N){if(N===null){o&&_(),A(0),e.consume(N);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(N)}function C(N){if(N===null){T(e.exit("chunkFlow"),!0),A(0),e.consume(N);return}return Ce(N)?(e.consume(N),T(e.exit("chunkFlow")),i=0,n.interrupt=void 0,f):(e.consume(N),C)}function T(N,O){const z=n.sliceStream(N);if(O&&z.push(null),N.previous=s,s&&(s.next=N),s=N,o.defineSkip(N.start),o.write(z),n.parser.lazy[N.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<c&&(!o.events[j][1].end||o.events[j][1].end.offset>c))return;const $=n.events.length;let G=$,ee,P;for(;G--;)if(n.events[G][0]==="exit"&&n.events[G][1].type==="chunkFlow"){if(ee){P=n.events[G][1].end;break}ee=!0}for(A(i),j=$;j<n.events.length;)n.events[j][1].end={...P},j++;xn(n.events,G+1,0,n.events.slice($)),n.events.length=j}}function A(N){let O=r.length;for(;O-- >N;){const z=r[O];n.containerState=z[1],z[0].exit.call(n,e)}r.length=N}function _(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function _3(e,n,r){return Ve(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tl(e){if(e===null||at(e)||Ka(e))return 1;if(Tc(e))return 2}function Rc(e,n,r){const i=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!i.includes(s)&&(n=s(n,r),i.push(s))}return n}const lp={name:"attention",resolveAll:N3,tokenize:M3};function N3(e,n){let r=-1,i,o,s,c,f,h,d,m;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[i][1].end},b={...e[r][1].start};Ob(y,-h),Ob(b,h),c={type:h>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:b},s={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},o={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[r][1].start={...f.end},d=[],e[i][1].end.offset-e[i][1].start.offset&&(d=jn(d,[["enter",e[i][1],n],["exit",e[i][1],n]])),d=jn(d,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),d=jn(d,Rc(n.parser.constructs.insideSpan.null,e.slice(i+1,r),n)),d=jn(d,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,d=jn(d,[["enter",e[r][1],n],["exit",e[r][1],n]])):m=0,xn(e,i-1,r-i+3,d),r=i+d.length-m-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function M3(e,n){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=tl(i);let s;return c;function c(h){return s=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===s)return e.consume(h),f;const d=e.exit("attentionSequence"),m=tl(h),y=!m||m===2&&o||r.includes(h),b=!o||o===2&&m||r.includes(i);return d._open=!!(s===42?y:y&&(o||!b)),d._close=!!(s===42?b:b&&(m||!y)),n(h)}}function Ob(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const j3={name:"autolink",tokenize:D3};function D3(e,n,r){let i=0;return o;function o(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(w){return Qt(w)?(e.consume(w),c):w===64?r(w):d(w)}function c(w){return w===43||w===45||w===46||Vt(w)?(i=1,f(w)):d(w)}function f(w){return w===58?(e.consume(w),i=0,h):(w===43||w===45||w===46||Vt(w))&&i++<32?(e.consume(w),f):(i=0,d(w))}function h(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):w===null||w===32||w===60||Zu(w)?r(w):(e.consume(w),h)}function d(w){return w===64?(e.consume(w),m):S3(w)?(e.consume(w),d):r(w)}function m(w){return Vt(w)?y(w):r(w)}function y(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):b(w)}function b(w){if((w===45||Vt(w))&&i++<63){const k=w===45?b:y;return e.consume(w),k}return r(w)}}const Wo={partial:!0,tokenize:O3};function O3(e,n,r){return i;function i(s){return He(s)?Ve(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ce(s)?n(s):r(s)}}const RS={continuation:{tokenize:z3},exit:P3,name:"blockQuote",tokenize:L3};function L3(e,n,r){const i=this;return o;function o(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return r(c)}function s(c){return He(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function z3(e,n,r){const i=this;return o;function o(c){return He(c)?Ve(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(RS,n,r)(c)}}function P3(e){e.exit("blockQuote")}const _S={name:"characterEscape",tokenize:I3};function I3(e,n,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return k3(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(s)}}const NS={name:"characterReference",tokenize:B3};function B3(e,n,r){const i=this;let o=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),h}function h(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,c=Vt,m(y))}function d(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=E3,m):(e.enter("characterReferenceValue"),s=7,c=ip,m(y))}function m(y){if(y===59&&o){const b=e.exit("characterReferenceValue");return c===Vt&&!sm(i.sliceSerialize(b))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&o++<s?(e.consume(y),m):r(y)}}const Lb={partial:!0,tokenize:H3},zb={concrete:!0,name:"codeFenced",tokenize:U3};function U3(e,n,r){const i=this,o={partial:!0,tokenize:z};let s=0,c=0,f;return h;function h(j){return d(j)}function d(j){const $=i.events[i.events.length-1];return s=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===f?(c++,e.consume(j),m):c<3?r(j):(e.exit("codeFencedFenceSequence"),He(j)?Ve(e,y,"whitespace")(j):y(j))}function y(j){return j===null||Ce(j)?(e.exit("codeFencedFence"),i.interrupt?n(j):e.check(Lb,C,O)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||Ce(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(j)):He(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,w,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),b)}function w(j){return j===null||Ce(j)?y(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===null||Ce(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(j)):j===96&&j===f?r(j):(e.consume(j),k)}function C(j){return e.attempt(o,O,T)(j)}function T(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),A}function A(j){return s>0&&He(j)?Ve(e,_,"linePrefix",s+1)(j):_(j)}function _(j){return j===null||Ce(j)?e.check(Lb,C,O)(j):(e.enter("codeFlowValue"),N(j))}function N(j){return j===null||Ce(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),N)}function O(j){return e.exit("codeFenced"),n(j)}function z(j,$,G){let ee=0;return P;function P(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),ne}function ne(Q){return j.enter("codeFencedFence"),He(Q)?Ve(j,ae,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):ae(Q)}function ae(Q){return Q===f?(j.enter("codeFencedFenceSequence"),le(Q)):G(Q)}function le(Q){return Q===f?(ee++,j.consume(Q),le):ee>=c?(j.exit("codeFencedFenceSequence"),He(Q)?Ve(j,H,"whitespace")(Q):H(Q)):G(Q)}function H(Q){return Q===null||Ce(Q)?(j.exit("codeFencedFence"),$(Q)):G(Q)}}}function H3(e,n,r){const i=this;return o;function o(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}const bh={name:"codeIndented",tokenize:q3},F3={partial:!0,tokenize:V3};function q3(e,n,r){const i=this;return o;function o(d){return e.enter("codeIndented"),Ve(e,s,"linePrefix",5)(d)}function s(d){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(d):r(d)}function c(d){return d===null?h(d):Ce(d)?e.attempt(F3,c,h)(d):(e.enter("codeFlowValue"),f(d))}function f(d){return d===null||Ce(d)?(e.exit("codeFlowValue"),c(d)):(e.consume(d),f)}function h(d){return e.exit("codeIndented"),n(d)}}function V3(e,n,r){const i=this;return o;function o(c){return i.parser.lazy[i.now().line]?r(c):Ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ve(e,s,"linePrefix",5)(c)}function s(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Ce(c)?o(c):r(c)}}const $3={name:"codeText",previous:Y3,resolve:G3,tokenize:K3};function G3(e){let n=e.length-4,r=3,i,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=r;++i<n;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(i=r-1,n++;++i<=n;)o===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(o=i):(i===n||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),n-=i-o-2,i=o+2),o=void 0);return e}function Y3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function K3(e,n,r){let i=0,o,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),h(y))}function h(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),h):y===96?(s=e.enter("codeTextSequence"),o=0,m(y)):Ce(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("codeTextData"),d(y))}function d(y){return y===null||y===32||y===96||Ce(y)?(e.exit("codeTextData"),h(y)):(e.consume(y),d)}function m(y){return y===96?(e.consume(y),o++,m):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(s.type="codeTextData",d(y))}}class X3{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,r,i){const o=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&mo(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),mo(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),mo(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);mo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);mo(this.left,r.reverse())}}}function mo(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function MS(e){const n={};let r=-1,i,o,s,c,f,h,d;const m=new X3(e);for(;++r<m.length;){for(;r in n;)r=n[r];if(i=m.get(r),r&&i[1].type==="chunkFlow"&&m.get(r-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,s=0,s<h.length&&h[s][1].type==="lineEndingBlank"&&(s+=2),s<h.length&&h[s][1].type==="content"))for(;++s<h.length&&h[s][1].type!=="content";)h[s][1].type==="chunkText"&&(h[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,Q3(m,r)),r=n[r],d=!0);else if(i[1]._container){for(s=r,o=void 0;s--;)if(c=m.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(i[1].end={...m.get(o)[1].start},f=m.slice(o,r),f.unshift(i),m.splice(o,r-o+1,f))}}return xn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!d}function Q3(e,n){const r=e.get(n)[1],i=e.get(n)[2];let o=n-1;const s=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],d={};let m,y,b=-1,w=r,k=0,C=0;const T=[C];for(;w;){for(;e.get(++o)[1]!==w;);s.push(o),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),y&&c.defineSkip(w.start),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=w,w=w.next}for(w=r;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(C=b+1,T.push(C),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(c.events=[],w?(w._tokenizer=void 0,w.previous=void 0):T.pop(),b=T.length;b--;){const A=f.slice(T[b],T[b+1]),_=s.pop();h.push([_,_+A.length-1]),e.splice(_,2,A)}for(h.reverse(),b=-1;++b<h.length;)d[k+h[b][0]]=k+h[b][1],k+=h[b][1]-h[b][0]-1;return d}const Z3={resolve:J3,tokenize:eL},W3={partial:!0,tokenize:tL};function J3(e){return MS(e),e}function eL(e,n){let r;return i;function i(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):Ce(f)?e.check(W3,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function tL(e,n,r){const i=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ve(e,s,"linePrefix")}function s(c){if(c===null||Ce(c))return r(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,r,n)(c)}}function jS(e,n,r,i,o,s,c,f,h){const d=h||Number.POSITIVE_INFINITY;let m=0;return y;function y(A){return A===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(A),e.exit(s),b):A===null||A===32||A===41||Zu(A)?r(A):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(A))}function b(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(o),e.exit(i),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),w(A))}function w(A){return A===62?(e.exit("chunkString"),e.exit(f),b(A)):A===null||A===60||Ce(A)?r(A):(e.consume(A),A===92?k:w)}function k(A){return A===60||A===62||A===92?(e.consume(A),w):w(A)}function C(A){return!m&&(A===null||A===41||at(A))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),n(A)):m<d&&A===40?(e.consume(A),m++,C):A===41?(e.consume(A),m--,C):A===null||A===32||A===40||Zu(A)?r(A):(e.consume(A),A===92?T:C)}function T(A){return A===40||A===41||A===92?(e.consume(A),C):C(A)}}function DS(e,n,r,i,o,s){const c=this;let f=0,h;return d;function d(w){return e.enter(i),e.enter(o),e.consume(w),e.exit(o),e.enter(s),m}function m(w){return f>999||w===null||w===91||w===93&&!h||w===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(w):w===93?(e.exit(s),e.enter(o),e.consume(w),e.exit(o),e.exit(i),n):Ce(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===null||w===91||w===93||Ce(w)||f++>999?(e.exit("chunkString"),m(w)):(e.consume(w),h||(h=!He(w)),w===92?b:y)}function b(w){return w===91||w===92||w===93?(e.consume(w),f++,y):y(w)}}function OS(e,n,r,i,o,s){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(i),e.enter(o),e.consume(b),e.exit(o),c=b===40?41:b,h):r(b)}function h(b){return b===c?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),n):(e.enter(s),d(b))}function d(b){return b===c?(e.exit(s),h(c)):b===null?r(b):Ce(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ve(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===c||b===null||Ce(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?y:m)}function y(b){return b===c||b===92?(e.consume(b),m):m(b)}}function ko(e,n){let r;return i;function i(o){return Ce(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,i):He(o)?Ve(e,i,r?"linePrefix":"lineSuffix")(o):n(o)}}const nL={name:"definition",tokenize:aL},rL={partial:!0,tokenize:iL};function aL(e,n,r){const i=this;let o;return s;function s(w){return e.enter("definition"),c(w)}function c(w){return DS.call(i,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function f(w){return o=$n(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),h):r(w)}function h(w){return at(w)?ko(e,d)(w):d(w)}function d(w){return jS(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(rL,y,y)(w)}function y(w){return He(w)?Ve(e,b,"whitespace")(w):b(w)}function b(w){return w===null||Ce(w)?(e.exit("definition"),i.parser.defined.push(o),n(w)):r(w)}}function iL(e,n,r){return i;function i(f){return at(f)?ko(e,o)(f):r(f)}function o(f){return OS(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return He(f)?Ve(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ce(f)?n(f):r(f)}}const lL={name:"hardBreakEscape",tokenize:oL};function oL(e,n,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ce(s)?(e.exit("hardBreakEscape"),n(s)):r(s)}}const sL={name:"headingAtx",resolve:uL,tokenize:cL};function uL(e,n){let r=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},xn(e,i,r-i+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function cL(e,n,r){let i=0;return o;function o(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||at(m)?(e.exit("atxHeadingSequence"),f(m)):r(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ce(m)?(e.exit("atxHeading"),n(m)):He(m)?Ve(e,f,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),f(m))}function d(m){return m===null||m===35||at(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),d)}}const fL=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Pb=["pre","script","style","textarea"],dL={concrete:!0,name:"htmlFlow",resolveTo:mL,tokenize:gL},hL={partial:!0,tokenize:vL},pL={partial:!0,tokenize:yL};function mL(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function gL(e,n,r){const i=this;let o,s,c,f,h;return d;function d(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),y}function y(M){return M===33?(e.consume(M),b):M===47?(e.consume(M),s=!0,C):M===63?(e.consume(M),o=3,i.interrupt?n:E):Qt(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function b(M){return M===45?(e.consume(M),o=2,w):M===91?(e.consume(M),o=5,f=0,k):Qt(M)?(e.consume(M),o=4,i.interrupt?n:E):r(M)}function w(M){return M===45?(e.consume(M),i.interrupt?n:E):r(M)}function k(M){const se="CDATA[";return M===se.charCodeAt(f++)?(e.consume(M),f===se.length?i.interrupt?n:ae:k):r(M)}function C(M){return Qt(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function T(M){if(M===null||M===47||M===62||at(M)){const se=M===47,Se=c.toLowerCase();return!se&&!s&&Pb.includes(Se)?(o=1,i.interrupt?n(M):ae(M)):fL.includes(c.toLowerCase())?(o=6,se?(e.consume(M),A):i.interrupt?n(M):ae(M)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(M):s?_(M):N(M))}return M===45||Vt(M)?(e.consume(M),c+=String.fromCharCode(M),T):r(M)}function A(M){return M===62?(e.consume(M),i.interrupt?n:ae):r(M)}function _(M){return He(M)?(e.consume(M),_):P(M)}function N(M){return M===47?(e.consume(M),P):M===58||M===95||Qt(M)?(e.consume(M),O):He(M)?(e.consume(M),N):P(M)}function O(M){return M===45||M===46||M===58||M===95||Vt(M)?(e.consume(M),O):z(M)}function z(M){return M===61?(e.consume(M),j):He(M)?(e.consume(M),z):N(M)}function j(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),h=M,$):He(M)?(e.consume(M),j):G(M)}function $(M){return M===h?(e.consume(M),h=null,ee):M===null||Ce(M)?r(M):(e.consume(M),$)}function G(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||at(M)?z(M):(e.consume(M),G)}function ee(M){return M===47||M===62||He(M)?N(M):r(M)}function P(M){return M===62?(e.consume(M),ne):r(M)}function ne(M){return M===null||Ce(M)?ae(M):He(M)?(e.consume(M),ne):r(M)}function ae(M){return M===45&&o===2?(e.consume(M),L):M===60&&o===1?(e.consume(M),K):M===62&&o===4?(e.consume(M),Z):M===63&&o===3?(e.consume(M),E):M===93&&o===5?(e.consume(M),J):Ce(M)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(hL,oe,le)(M)):M===null||Ce(M)?(e.exit("htmlFlowData"),le(M)):(e.consume(M),ae)}function le(M){return e.check(pL,H,oe)(M)}function H(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Q}function Q(M){return M===null||Ce(M)?le(M):(e.enter("htmlFlowData"),ae(M))}function L(M){return M===45?(e.consume(M),E):ae(M)}function K(M){return M===47?(e.consume(M),c="",U):ae(M)}function U(M){if(M===62){const se=c.toLowerCase();return Pb.includes(se)?(e.consume(M),Z):ae(M)}return Qt(M)&&c.length<8?(e.consume(M),c+=String.fromCharCode(M),U):ae(M)}function J(M){return M===93?(e.consume(M),E):ae(M)}function E(M){return M===62?(e.consume(M),Z):M===45&&o===2?(e.consume(M),E):ae(M)}function Z(M){return M===null||Ce(M)?(e.exit("htmlFlowData"),oe(M)):(e.consume(M),Z)}function oe(M){return e.exit("htmlFlow"),n(M)}}function yL(e,n,r){const i=this;return o;function o(c){return Ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):r(c)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}function vL(e,n,r){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Wo,n,r)}}const xL={name:"htmlText",tokenize:bL};function bL(e,n,r){const i=this;let o,s,c;return f;function f(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),h}function h(E){return E===33?(e.consume(E),d):E===47?(e.consume(E),z):E===63?(e.consume(E),N):Qt(E)?(e.consume(E),G):r(E)}function d(E){return E===45?(e.consume(E),m):E===91?(e.consume(E),s=0,k):Qt(E)?(e.consume(E),_):r(E)}function m(E){return E===45?(e.consume(E),w):r(E)}function y(E){return E===null?r(E):E===45?(e.consume(E),b):Ce(E)?(c=y,K(E)):(e.consume(E),y)}function b(E){return E===45?(e.consume(E),w):y(E)}function w(E){return E===62?L(E):E===45?b(E):y(E)}function k(E){const Z="CDATA[";return E===Z.charCodeAt(s++)?(e.consume(E),s===Z.length?C:k):r(E)}function C(E){return E===null?r(E):E===93?(e.consume(E),T):Ce(E)?(c=C,K(E)):(e.consume(E),C)}function T(E){return E===93?(e.consume(E),A):C(E)}function A(E){return E===62?L(E):E===93?(e.consume(E),A):C(E)}function _(E){return E===null||E===62?L(E):Ce(E)?(c=_,K(E)):(e.consume(E),_)}function N(E){return E===null?r(E):E===63?(e.consume(E),O):Ce(E)?(c=N,K(E)):(e.consume(E),N)}function O(E){return E===62?L(E):N(E)}function z(E){return Qt(E)?(e.consume(E),j):r(E)}function j(E){return E===45||Vt(E)?(e.consume(E),j):$(E)}function $(E){return Ce(E)?(c=$,K(E)):He(E)?(e.consume(E),$):L(E)}function G(E){return E===45||Vt(E)?(e.consume(E),G):E===47||E===62||at(E)?ee(E):r(E)}function ee(E){return E===47?(e.consume(E),L):E===58||E===95||Qt(E)?(e.consume(E),P):Ce(E)?(c=ee,K(E)):He(E)?(e.consume(E),ee):L(E)}function P(E){return E===45||E===46||E===58||E===95||Vt(E)?(e.consume(E),P):ne(E)}function ne(E){return E===61?(e.consume(E),ae):Ce(E)?(c=ne,K(E)):He(E)?(e.consume(E),ne):ee(E)}function ae(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),o=E,le):Ce(E)?(c=ae,K(E)):He(E)?(e.consume(E),ae):(e.consume(E),H)}function le(E){return E===o?(e.consume(E),o=void 0,Q):E===null?r(E):Ce(E)?(c=le,K(E)):(e.consume(E),le)}function H(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||at(E)?ee(E):(e.consume(E),H)}function Q(E){return E===47||E===62||at(E)?ee(E):r(E)}function L(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),n):r(E)}function K(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),U}function U(E){return He(E)?Ve(e,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):J(E)}function J(E){return e.enter("htmlTextData"),c(E)}}const um={name:"labelEnd",resolveAll:kL,resolveTo:CL,tokenize:AL},wL={tokenize:TL},SL={tokenize:RL},EL={tokenize:_L};function kL(e){let n=-1;const r=[];for(;++n<e.length;){const i=e[n][1];if(r.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",n+=o}}return e.length!==r.length&&xn(e,0,e.length,r),e}function CL(e,n){let r=e.length,i=0,o,s,c,f;for(;r--;)if(o=e[r][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=r,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(c=r);const h={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,n],["enter",d,n]],f=jn(f,e.slice(s+1,s+i+3)),f=jn(f,[["enter",m,n]]),f=jn(f,Rc(n.parser.constructs.insideSpan.null,e.slice(s+i+4,c-3),n)),f=jn(f,[["exit",m,n],e[c-2],e[c-1],["exit",d,n]]),f=jn(f,e.slice(c+1)),f=jn(f,[["exit",h,n]]),xn(e,s,e.length,f),e}function AL(e,n,r){const i=this;let o=i.events.length,s,c;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return f;function f(b){return s?s._inactive?y(b):(c=i.parser.defined.includes($n(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),h):r(b)}function h(b){return b===40?e.attempt(wL,m,c?m:y)(b):b===91?e.attempt(SL,m,c?d:y)(b):c?m(b):y(b)}function d(b){return e.attempt(EL,m,y)(b)}function m(b){return n(b)}function y(b){return s._balanced=!0,r(b)}}function TL(e,n,r){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return at(y)?ko(e,s)(y):s(y)}function s(y){return y===41?m(y):jS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return at(y)?ko(e,h)(y):m(y)}function f(y){return r(y)}function h(y){return y===34||y===39||y===40?OS(e,d,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):m(y)}function d(y){return at(y)?ko(e,m)(y):m(y)}function m(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):r(y)}}function RL(e,n,r){const i=this;return o;function o(f){return DS.call(i,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return i.parser.defined.includes($n(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(f):r(f)}function c(f){return r(f)}}function _L(e,n,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):r(s)}}const NL={name:"labelStartImage",resolveAll:um.resolveAll,tokenize:ML};function ML(e,n,r){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(f):n(f)}}const jL={name:"labelStartLink",resolveAll:um.resolveAll,tokenize:DL};function DL(e,n,r){const i=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):n(c)}}const wh={name:"lineEnding",tokenize:OL};function OL(e,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ve(e,n,"linePrefix")}}const Uu={name:"thematicBreak",tokenize:LL};function LL(e,n,r){let i=0,o;return s;function s(d){return e.enter("thematicBreak"),c(d)}function c(d){return o=d,f(d)}function f(d){return d===o?(e.enter("thematicBreakSequence"),h(d)):i>=3&&(d===null||Ce(d))?(e.exit("thematicBreak"),n(d)):r(d)}function h(d){return d===o?(e.consume(d),i++,h):(e.exit("thematicBreakSequence"),He(d)?Ve(e,f,"whitespace")(d):f(d))}}const ln={continuation:{tokenize:BL},exit:HL,name:"list",tokenize:IL},zL={partial:!0,tokenize:FL},PL={partial:!0,tokenize:UL};function IL(e,n,r){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:ip(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(Uu,r,d)(w):d(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(w)}return r(w)}function h(w){return ip(w)&&++c<10?(e.consume(w),h):(!i.interrupt||c<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),d(w)):r(w)}function d(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(Wo,i.interrupt?r:m,e.attempt(zL,b,y))}function m(w){return i.containerState.initialBlankLine=!0,s++,b(w)}function y(w){return He(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),b):r(w)}function b(w){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(w)}}function BL(e,n,r){const i=this;return i.containerState._closeFlow=void 0,e.check(Wo,o,s);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ve(e,n,"listItemIndent",i.containerState.size+1)(f)}function s(f){return i.containerState.furtherBlankLines||!He(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(PL,n,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ve(e,e.attempt(ln,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function UL(e,n,r){const i=this;return Ve(e,o,"listItemIndent",i.containerState.size+1);function o(s){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(s):r(s)}}function HL(e){e.exit(this.containerState.type)}function FL(e,n,r){const i=this;return Ve(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=i.events[i.events.length-1];return!He(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const Ib={name:"setextUnderline",resolveTo:qL,tokenize:VL};function qL(e,n){let r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[i][1],n]),e[i][1].end={...e[s][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function VL(e,n,r){const i=this;let o;return s;function s(d){let m=i.events.length,y;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){y=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),o=d,c(d)):r(d)}function c(d){return e.enter("setextHeadingLineSequence"),f(d)}function f(d){return d===o?(e.consume(d),f):(e.exit("setextHeadingLineSequence"),He(d)?Ve(e,h,"lineSuffix")(d):h(d))}function h(d){return d===null||Ce(d)?(e.exit("setextHeadingLine"),n(d)):r(d)}}const $L={tokenize:GL};function GL(e){const n=this,r=e.attempt(Wo,i,e.attempt(this.parser.constructs.flowInitial,o,Ve(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Z3,o)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const YL={resolveAll:zS()},KL=LS("string"),XL=LS("text");function LS(e){return{resolveAll:zS(e==="text"?QL:void 0),tokenize:n};function n(r){const i=this,o=this.parser.constructs[e],s=r.attempt(o,c,f);return c;function c(m){return d(m)?s(m):f(m)}function f(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),h}function h(m){return d(m)?(r.exit("data"),s(m)):(r.consume(m),h)}function d(m){if(m===null)return!0;const y=o[m];let b=-1;if(y)for(;++b<y.length;){const w=y[b];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function zS(e){return n;function n(r,i){let o=-1,s;for(;++o<=r.length;)s===void 0?r[o]&&r[o][1].type==="data"&&(s=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==s+2&&(r[s][1].end=r[o-1][1].end,r.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(r,i):r}}function QL(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=n.sliceStream(i);let s=o.length,c=-1,f=0,h;for(;s--;){const d=o[s];if(typeof d=="string"){for(c=d.length;d.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(d===-2)h=!0,f++;else if(d!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(f=0),f){const d={type:r===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:i.start._bufferIndex+c,_index:i.start._index+s,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...d.start},i.start.offset===i.end.offset?Object.assign(i,d):(e.splice(r,0,["enter",d,n],["exit",d,n]),r+=2)}r++}return e}const ZL={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:RS},WL={91:nL},JL={[-2]:bh,[-1]:bh,32:bh},ez={35:sL,42:Uu,45:[Ib,Uu],60:dL,61:Ib,95:Uu,96:zb,126:zb},tz={38:NS,92:_S},nz={[-5]:wh,[-4]:wh,[-3]:wh,33:NL,38:NS,42:lp,60:[j3,xL],91:jL,92:[lL,_S],93:um,95:lp,96:$3},rz={null:[lp,YL]},az={null:[42,95]},iz={null:[]},lz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:az,contentInitial:WL,disable:iz,document:ZL,flow:ez,flowInitial:JL,insideSpan:rz,string:tz,text:nz},Symbol.toStringTag,{value:"Module"}));function oz(e,n,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},s=[];let c=[],f=[];const h={attempt:$(z),check:$(j),consume:_,enter:N,exit:O,interrupt:$(j,{interrupt:!0})},d={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:w,write:y};let m=n.tokenize.call(d,h);return n.resolveAll&&s.push(n),d;function y(ne){return c=jn(c,ne),T(),c[c.length-1]!==null?[]:(G(n,0),d.events=Rc(s,d.events,d),d.events)}function b(ne,ae){return uz(w(ne),ae)}function w(ne){return sz(c,ne)}function k(){const{_bufferIndex:ne,_index:ae,line:le,column:H,offset:Q}=i;return{_bufferIndex:ne,_index:ae,line:le,column:H,offset:Q}}function C(ne){o[ne.line]=ne.column,P()}function T(){let ne;for(;i._index<c.length;){const ae=c[i._index];if(typeof ae=="string")for(ne=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ne&&i._bufferIndex<ae.length;)A(ae.charCodeAt(i._bufferIndex));else A(ae)}}function A(ne){m=m(ne)}function _(ne){Ce(ne)?(i.line++,i.column=1,i.offset+=ne===-3?2:1,P()):ne!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),d.previous=ne}function N(ne,ae){const le=ae||{};return le.type=ne,le.start=k(),d.events.push(["enter",le,d]),f.push(le),le}function O(ne){const ae=f.pop();return ae.end=k(),d.events.push(["exit",ae,d]),ae}function z(ne,ae){G(ne,ae.from)}function j(ne,ae){ae.restore()}function $(ne,ae){return le;function le(H,Q,L){let K,U,J,E;return Array.isArray(H)?oe(H):"tokenize"in H?oe([H]):Z(H);function Z(he){return xe;function xe(Ee){const Qe=Ee!==null&&he[Ee],bt=Ee!==null&&he.null,Rt=[...Array.isArray(Qe)?Qe:Qe?[Qe]:[],...Array.isArray(bt)?bt:bt?[bt]:[]];return oe(Rt)(Ee)}}function oe(he){return K=he,U=0,he.length===0?L:M(he[U])}function M(he){return xe;function xe(Ee){return E=ee(),J=he,he.partial||(d.currentConstruct=he),he.name&&d.parser.constructs.disable.null.includes(he.name)?Se():he.tokenize.call(ae?Object.assign(Object.create(d),ae):d,h,se,Se)(Ee)}}function se(he){return ne(J,E),Q}function Se(he){return E.restore(),++U<K.length?M(K[U]):L}}}function G(ne,ae){ne.resolveAll&&!s.includes(ne)&&s.push(ne),ne.resolve&&xn(d.events,ae,d.events.length-ae,ne.resolve(d.events.slice(ae),d)),ne.resolveTo&&(d.events=ne.resolveTo(d.events,d))}function ee(){const ne=k(),ae=d.previous,le=d.currentConstruct,H=d.events.length,Q=Array.from(f);return{from:H,restore:L};function L(){i=ne,d.previous=ae,d.currentConstruct=le,d.events.length=H,f=Q,P()}}function P(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function sz(e,n){const r=n.start._index,i=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(r===o)c=[e[r].slice(i,s)];else{if(c=e.slice(r,o),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function uz(e,n){let r=-1;const i=[];let o;for(;++r<e.length;){const s=e[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
372
377
|
`;break}case-3:{c=`\r
|
|
373
|
-
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,i.push(c)}return i.join("")}function sz(e){const i={constructs:AS([az,...(e||{}).extensions||[]]),content:o(E3),defined:[],document:o(C3),flow:o(qL),lazy:{},string:o(GL),text:o(YL)};return i;function o(s){return c;function c(f){return iz(i,s,f)}}}function uz(e){for(;!MS(e););return e}const Bb=/[\0\t\n\r]/g;function cz(){let e=1,n="",r=!0,i;return o;function o(s,c,f){const h=[];let d,m,y,b,w;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,n="",r&&(s.charCodeAt(0)===65279&&y++,r=void 0);y<s.length;){if(Bb.lastIndex=y,d=Bb.exec(s),b=d&&d.index!==void 0?d.index:s.length,w=s.charCodeAt(b),!d){n=s.slice(y);break}if(w===10&&y===b&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),y<b&&(h.push(s.slice(y,b)),e+=b-y),w){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}y=b+1}return f&&(i&&h.push(-5),n&&h.push(n),h.push(null)),h}}const fz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dz(e){return e.replace(fz,hz)}function hz(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),s=o===120||o===88;return TS(r.slice(s?2:1),s?16:10)}return sm(r)||e}const PS={}.hasOwnProperty;function pz(e,n,r){return typeof n!="string"&&(r=n,n=void 0),mz(r)(uz(sz(r).document().write(cz()(e,n,!0))))}function mz(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Jt),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:s(Zn),blockQuote:s(bt),characterEscape:ee,characterReference:ee,codeFenced:s(Rt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Rt,c),codeText:s(It,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:s(Gt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(ba),hardBreakEscape:s(Wn),hardBreakTrailing:s(Wn),htmlFlow:s(Dt,c),htmlFlowData:ee,htmlText:s(Dt,c),htmlTextData:ee,image:s(Br),label:c,link:s(Jt),listItem:s(mr),listItemValue:b,listOrdered:s(wn,y),listUnordered:s(wn),paragraph:s(Wa),reference:M,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Zn),strong:s(wa),thematicBreak:s(Ur)},exit:{atxHeading:h(),atxHeadingSequence:z,autolink:h(),autolinkEmail:Qe,autolinkProtocol:Ee,blockQuote:h(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:he,characterReference:xe,codeFenced:h(T),codeFencedFence:C,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:P,codeIndented:h(A),codeText:h(Q),codeTextData:P,data:P,definition:h(),definitionDestinationString:O,definitionLabelString:_,definitionTitleString:N,emphasis:h(),hardBreakEscape:h(ae),hardBreakTrailing:h(ae),htmlFlow:h(le),htmlFlowData:P,htmlText:h(H),htmlTextData:P,image:h(K),label:J,labelText:U,lineEnding:ne,link:h(L),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:se,resourceDestinationString:E,resourceTitleString:Z,resource:oe,setextHeading:h(G),setextHeadingLineSequence:$,setextHeadingText:j,strong:h(),thematicBreak:h()}};IS(n,(e||{}).mdastExtensions||[]);const r={};return i;function i(W){let ue={type:"root",children:[]};const ke={stack:[ue],tokenStack:[],config:n,enter:f,exit:d,buffer:c,resume:m,data:r},Ae=[];let Ye=-1;for(;++Ye<W.length;)if(W[Ye][1].type==="listOrdered"||W[Ye][1].type==="listUnordered")if(W[Ye][0]==="enter")Ae.push(Ye);else{const Yt=Ae.pop();Ye=o(W,Yt,Ye)}for(Ye=-1;++Ye<W.length;){const Yt=n[W[Ye][0]];PS.call(Yt,W[Ye][1].type)&&Yt[W[Ye][1].type].call(Object.assign({sliceSerialize:W[Ye][2].sliceSerialize},ke),W[Ye][1])}if(ke.tokenStack.length>0){const Yt=ke.tokenStack[ke.tokenStack.length-1];(Yt[1]||Ub).call(ke,void 0,Yt[0])}for(ue.position={start:ca(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:ca(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<n.transforms.length;)ue=n.transforms[Ye](ue)||ue;return ue}function o(W,ue,ke){let Ae=ue-1,Ye=-1,Yt=!1,Pn,Bt,sn,Ot;for(;++Ae<=ke;){const mt=W[Ae];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?Ye++:Ye--,Ot=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Pn&&!Ot&&!Ye&&!sn&&(sn=Ae),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Ye&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||Ye===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Pn){let Ut=Ae;for(Bt=void 0;Ut--;){const X=W[Ut];if(X[1].type==="lineEnding"||X[1].type==="lineEndingBlank"){if(X[0]==="exit")continue;Bt&&(W[Bt][1].type="lineEndingBlank",Yt=!0),X[1].type="lineEnding",Bt=Ut}else if(!(X[1].type==="linePrefix"||X[1].type==="blockQuotePrefix"||X[1].type==="blockQuotePrefixWhitespace"||X[1].type==="blockQuoteMarker"||X[1].type==="listItemIndent"))break}sn&&(!Bt||sn<Bt)&&(Pn._spread=!0),Pn.end=Object.assign({},Bt?W[Bt][1].start:mt[1].end),W.splice(Bt||Ae,0,["exit",Pn,mt[2]]),Ae++,ke++}if(mt[1].type==="listItemPrefix"){const Ut={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Pn=Ut,W.splice(Ae,0,["enter",Ut,mt[2]]),Ae++,ke++,sn=void 0,Ot=!0}}}return W[ue][1]._spread=Yt,ke}function s(W,ue){return ke;function ke(Ae){f.call(this,W(Ae),Ae),ue&&ue.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(W,ue,ke){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ue,ke||void 0]),W.position={start:ca(ue.start),end:void 0}}function h(W){return ue;function ue(ke){W&&W.call(this,ke),d.call(this,ke)}}function d(W,ue){const ke=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==W.type&&(ue?ue.call(this,W,Ae[0]):(Ae[1]||Ub).call(this,W,Ae[0]));else throw new Error("Cannot close `"+W.type+"` ("+Eo({start:W.start,end:W.end})+"): it’s not open");ke.position.end=ca(W.end)}function m(){return om(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(W){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function w(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=W}function k(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=W}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W.replace(/(\r?\n|\r)$/g,"")}function _(W){const ue=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ue,ke.identifier=$n(this.sliceSerialize(W)).toLowerCase()}function N(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.title=W}function O(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.url=W}function z(W){const ue=this.stack[this.stack.length-1];if(!ue.depth){const ke=this.sliceSerialize(W).length;ue.depth=ke}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function $(W){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(W){const ke=this.stack[this.stack.length-1].children;let Ae=ke[ke.length-1];(!Ae||Ae.type!=="text")&&(Ae=Ja(),Ae.position={start:ca(W.start),end:void 0},ke.push(Ae)),this.stack.push(Ae)}function P(W){const ue=this.stack.pop();ue.value+=this.sliceSerialize(W),ue.position.end=ca(W.end)}function ne(W){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=ue.children[ue.children.length-1];ke.position.end=ca(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ue.type)&&(ee.call(this,W),P.call(this,W))}function ae(){this.data.atHardBreak=!0}function le(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W}function H(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W}function Q(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ue,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function K(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ue,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(W){const ue=this.sliceSerialize(W),ke=this.stack[this.stack.length-2];ke.label=dz(ue),ke.identifier=$n(ue).toLowerCase()}function J(){const W=this.stack[this.stack.length-1],ue=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Ae=W.children;ke.children=Ae}else ke.alt=ue}function E(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.url=W}function Z(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.title=W}function oe(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function se(W){const ue=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ue,ke.identifier=$n(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function Se(W){this.data.characterReferenceType=W.type}function he(W){const ue=this.sliceSerialize(W),ke=this.data.characterReferenceType;let Ae;ke?(Ae=TS(ue,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=sm(ue);const Ye=this.stack[this.stack.length-1];Ye.value+=Ae}function xe(W){const ue=this.stack.pop();ue.position.end=ca(W.end)}function Ee(W){P.call(this,W);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(W)}function Qe(W){P.call(this,W);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(W)}function bt(){return{type:"blockquote",children:[]}}function Rt(){return{type:"code",lang:null,meta:null,value:""}}function It(){return{type:"inlineCode",value:""}}function Gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ba(){return{type:"emphasis",children:[]}}function Zn(){return{type:"heading",depth:0,children:[]}}function Wn(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function Br(){return{type:"image",title:null,url:"",alt:null}}function Jt(){return{type:"link",title:null,url:"",children:[]}}function wn(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function mr(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Wa(){return{type:"paragraph",children:[]}}function wa(){return{type:"strong",children:[]}}function Ja(){return{type:"text",value:""}}function Ur(){return{type:"thematicBreak"}}}function ca(e){return{line:e.line,column:e.column,offset:e.offset}}function IS(e,n){let r=-1;for(;++r<n.length;){const i=n[r];Array.isArray(i)?IS(e,i):gz(e,i)}}function gz(e,n){let r;for(r in n)if(PS.call(n,r))switch(r){case"canContainEols":{const i=n[r];i&&e[r].push(...i);break}case"transforms":{const i=n[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=n[r];i&&Object.assign(e[r],i);break}}}function Ub(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Eo({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Eo({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Eo({start:n.start,end:n.end})+") is still open")}function yz(e){const n=this;n.parser=r;function r(i){return pz(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function vz(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function xz(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
|
|
374
|
-
`}]}function
|
|
375
|
-
`:"",i={};n.lang&&(i.className=["language-"+n.lang]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function
|
|
378
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,i.push(c)}return i.join("")}function cz(e){const i={constructs:AS([lz,...(e||{}).extensions||[]]),content:o(C3),defined:[],document:o(T3),flow:o($L),lazy:{},string:o(KL),text:o(XL)};return i;function o(s){return c;function c(f){return oz(i,s,f)}}}function fz(e){for(;!MS(e););return e}const Bb=/[\0\t\n\r]/g;function dz(){let e=1,n="",r=!0,i;return o;function o(s,c,f){const h=[];let d,m,y,b,w;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,n="",r&&(s.charCodeAt(0)===65279&&y++,r=void 0);y<s.length;){if(Bb.lastIndex=y,d=Bb.exec(s),b=d&&d.index!==void 0?d.index:s.length,w=s.charCodeAt(b),!d){n=s.slice(y);break}if(w===10&&y===b&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),y<b&&(h.push(s.slice(y,b)),e+=b-y),w){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}y=b+1}return f&&(i&&h.push(-5),n&&h.push(n),h.push(null)),h}}const hz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pz(e){return e.replace(hz,mz)}function mz(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),s=o===120||o===88;return TS(r.slice(s?2:1),s?16:10)}return sm(r)||e}const PS={}.hasOwnProperty;function gz(e,n,r){return typeof n!="string"&&(r=n,n=void 0),yz(r)(fz(cz(r).document().write(dz()(e,n,!0))))}function yz(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Jt),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:s(Zn),blockQuote:s(bt),characterEscape:ee,characterReference:ee,codeFenced:s(Rt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Rt,c),codeText:s(It,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:s(Gt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(ba),hardBreakEscape:s(Wn),hardBreakTrailing:s(Wn),htmlFlow:s(Dt,c),htmlFlowData:ee,htmlText:s(Dt,c),htmlTextData:ee,image:s(Br),label:c,link:s(Jt),listItem:s(mr),listItemValue:b,listOrdered:s(wn,y),listUnordered:s(wn),paragraph:s(Wa),reference:M,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Zn),strong:s(wa),thematicBreak:s(Ur)},exit:{atxHeading:h(),atxHeadingSequence:z,autolink:h(),autolinkEmail:Qe,autolinkProtocol:Ee,blockQuote:h(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:he,characterReference:xe,codeFenced:h(T),codeFencedFence:C,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:P,codeIndented:h(A),codeText:h(Q),codeTextData:P,data:P,definition:h(),definitionDestinationString:O,definitionLabelString:_,definitionTitleString:N,emphasis:h(),hardBreakEscape:h(ae),hardBreakTrailing:h(ae),htmlFlow:h(le),htmlFlowData:P,htmlText:h(H),htmlTextData:P,image:h(K),label:J,labelText:U,lineEnding:ne,link:h(L),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:se,resourceDestinationString:E,resourceTitleString:Z,resource:oe,setextHeading:h(G),setextHeadingLineSequence:$,setextHeadingText:j,strong:h(),thematicBreak:h()}};IS(n,(e||{}).mdastExtensions||[]);const r={};return i;function i(W){let ue={type:"root",children:[]};const ke={stack:[ue],tokenStack:[],config:n,enter:f,exit:d,buffer:c,resume:m,data:r},Ae=[];let Ye=-1;for(;++Ye<W.length;)if(W[Ye][1].type==="listOrdered"||W[Ye][1].type==="listUnordered")if(W[Ye][0]==="enter")Ae.push(Ye);else{const Yt=Ae.pop();Ye=o(W,Yt,Ye)}for(Ye=-1;++Ye<W.length;){const Yt=n[W[Ye][0]];PS.call(Yt,W[Ye][1].type)&&Yt[W[Ye][1].type].call(Object.assign({sliceSerialize:W[Ye][2].sliceSerialize},ke),W[Ye][1])}if(ke.tokenStack.length>0){const Yt=ke.tokenStack[ke.tokenStack.length-1];(Yt[1]||Ub).call(ke,void 0,Yt[0])}for(ue.position={start:ca(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:ca(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<n.transforms.length;)ue=n.transforms[Ye](ue)||ue;return ue}function o(W,ue,ke){let Ae=ue-1,Ye=-1,Yt=!1,Pn,Bt,sn,Ot;for(;++Ae<=ke;){const mt=W[Ae];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?Ye++:Ye--,Ot=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Pn&&!Ot&&!Ye&&!sn&&(sn=Ae),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Ye&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||Ye===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Pn){let Ut=Ae;for(Bt=void 0;Ut--;){const X=W[Ut];if(X[1].type==="lineEnding"||X[1].type==="lineEndingBlank"){if(X[0]==="exit")continue;Bt&&(W[Bt][1].type="lineEndingBlank",Yt=!0),X[1].type="lineEnding",Bt=Ut}else if(!(X[1].type==="linePrefix"||X[1].type==="blockQuotePrefix"||X[1].type==="blockQuotePrefixWhitespace"||X[1].type==="blockQuoteMarker"||X[1].type==="listItemIndent"))break}sn&&(!Bt||sn<Bt)&&(Pn._spread=!0),Pn.end=Object.assign({},Bt?W[Bt][1].start:mt[1].end),W.splice(Bt||Ae,0,["exit",Pn,mt[2]]),Ae++,ke++}if(mt[1].type==="listItemPrefix"){const Ut={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Pn=Ut,W.splice(Ae,0,["enter",Ut,mt[2]]),Ae++,ke++,sn=void 0,Ot=!0}}}return W[ue][1]._spread=Yt,ke}function s(W,ue){return ke;function ke(Ae){f.call(this,W(Ae),Ae),ue&&ue.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(W,ue,ke){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ue,ke||void 0]),W.position={start:ca(ue.start),end:void 0}}function h(W){return ue;function ue(ke){W&&W.call(this,ke),d.call(this,ke)}}function d(W,ue){const ke=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==W.type&&(ue?ue.call(this,W,Ae[0]):(Ae[1]||Ub).call(this,W,Ae[0]));else throw new Error("Cannot close `"+W.type+"` ("+Eo({start:W.start,end:W.end})+"): it’s not open");ke.position.end=ca(W.end)}function m(){return om(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(W){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function w(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=W}function k(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=W}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W.replace(/(\r?\n|\r)$/g,"")}function _(W){const ue=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ue,ke.identifier=$n(this.sliceSerialize(W)).toLowerCase()}function N(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.title=W}function O(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.url=W}function z(W){const ue=this.stack[this.stack.length-1];if(!ue.depth){const ke=this.sliceSerialize(W).length;ue.depth=ke}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function $(W){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(W){const ke=this.stack[this.stack.length-1].children;let Ae=ke[ke.length-1];(!Ae||Ae.type!=="text")&&(Ae=Ja(),Ae.position={start:ca(W.start),end:void 0},ke.push(Ae)),this.stack.push(Ae)}function P(W){const ue=this.stack.pop();ue.value+=this.sliceSerialize(W),ue.position.end=ca(W.end)}function ne(W){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=ue.children[ue.children.length-1];ke.position.end=ca(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ue.type)&&(ee.call(this,W),P.call(this,W))}function ae(){this.data.atHardBreak=!0}function le(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W}function H(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W}function Q(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ue,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function K(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ue,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(W){const ue=this.sliceSerialize(W),ke=this.stack[this.stack.length-2];ke.label=pz(ue),ke.identifier=$n(ue).toLowerCase()}function J(){const W=this.stack[this.stack.length-1],ue=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Ae=W.children;ke.children=Ae}else ke.alt=ue}function E(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.url=W}function Z(){const W=this.resume(),ue=this.stack[this.stack.length-1];ue.title=W}function oe(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function se(W){const ue=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ue,ke.identifier=$n(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function Se(W){this.data.characterReferenceType=W.type}function he(W){const ue=this.sliceSerialize(W),ke=this.data.characterReferenceType;let Ae;ke?(Ae=TS(ue,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=sm(ue);const Ye=this.stack[this.stack.length-1];Ye.value+=Ae}function xe(W){const ue=this.stack.pop();ue.position.end=ca(W.end)}function Ee(W){P.call(this,W);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(W)}function Qe(W){P.call(this,W);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(W)}function bt(){return{type:"blockquote",children:[]}}function Rt(){return{type:"code",lang:null,meta:null,value:""}}function It(){return{type:"inlineCode",value:""}}function Gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ba(){return{type:"emphasis",children:[]}}function Zn(){return{type:"heading",depth:0,children:[]}}function Wn(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function Br(){return{type:"image",title:null,url:"",alt:null}}function Jt(){return{type:"link",title:null,url:"",children:[]}}function wn(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function mr(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Wa(){return{type:"paragraph",children:[]}}function wa(){return{type:"strong",children:[]}}function Ja(){return{type:"text",value:""}}function Ur(){return{type:"thematicBreak"}}}function ca(e){return{line:e.line,column:e.column,offset:e.offset}}function IS(e,n){let r=-1;for(;++r<n.length;){const i=n[r];Array.isArray(i)?IS(e,i):vz(e,i)}}function vz(e,n){let r;for(r in n)if(PS.call(n,r))switch(r){case"canContainEols":{const i=n[r];i&&e[r].push(...i);break}case"transforms":{const i=n[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=n[r];i&&Object.assign(e[r],i);break}}}function Ub(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Eo({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Eo({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Eo({start:n.start,end:n.end})+") is still open")}function xz(e){const n=this;n.parser=r;function r(i){return gz(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function bz(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function wz(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
|
|
379
|
+
`}]}function Sz(e,n){const r=n.value?n.value+`
|
|
380
|
+
`:"",i={};n.lang&&(i.className=["language-"+n.lang]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function Ez(e,n){const r={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function kz(e,n){const r={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Cz(e,n){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),o=hl(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let c,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(i,f);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,h);const d={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(n,d),e.applyData(n,d)}function Az(e,n){const r={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Tz(e,n){if(e.options.allowDangerousHtml){const r={type:"raw",value:n.value};return e.patch(n,r),e.applyData(n,r)}}function BS(e,n){const r=n.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=i:o.push({type:"text",value:i}),o}function Rz(e,n){const r=String(n.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return BS(e,n);const o={src:hl(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function _z(e,n){const r={src:hl(n.url)};n.alt!==null&&n.alt!==void 0&&(r.alt=n.alt),n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,i),e.applyData(n,i)}function Nz(e,n){const r={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(n,i),e.applyData(n,i)}function Mz(e,n){const r=String(n.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return BS(e,n);const o={href:hl(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function jz(e,n){const r={href:hl(n.url)};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Dz(e,n,r){const i=e.all(n),o=r?Oz(r):US(n),s={},c=[];if(typeof n.checked=="boolean"){const m=i[0];let y;m&&m.type==="element"&&m.tagName==="p"?y=m:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const m=i[f];(o||f!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
376
381
|
`}),m.type==="element"&&m.tagName==="p"&&!o?c.push(...m.children):c.push(m)}const h=i[i.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
377
|
-
`});const d={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,d),e.applyData(n,d)}function
|
|
382
|
+
`});const d={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,d),e.applyData(n,d)}function Oz(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let i=-1;for(;!n&&++i<r.length;)n=US(r[i])}return n}function US(e){const n=e.spread;return n??e.children.length>1}function Lz(e,n){const r={},i=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++o<i.length;){const c=i[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(n,s),e.applyData(n,s)}function zz(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Pz(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}function Iz(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Bz(e,n){const r=e.all(n),i=r.shift(),o=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(n.children[0],c),o.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=rm(n.children[1]),h=vS(n.children[n.children.length-1]);f&&h&&(c.position={start:f,end:h}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function Uz(e,n,r){const i=r?r.children:void 0,s=(i?i.indexOf(n):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:n.children.length;let h=-1;const d=[];for(;++h<f;){const y=n.children[h],b={},w=c?c[h]:void 0;w&&(b.align=w);let k={type:"element",tagName:s,properties:b,children:[]};y&&(k.children=e.all(y),e.patch(y,k),k=e.applyData(y,k)),d.push(k)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(n,m),e.applyData(n,m)}function Hz(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}const Hb=9,Fb=32;function Fz(e){const n=String(e),r=/\r?\n|\r/g;let i=r.exec(n),o=0;const s=[];for(;i;)s.push(qb(n.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=r.exec(n);return s.push(qb(n.slice(o),o>0,!1)),s.join("")}function qb(e,n,r){let i=0,o=e.length;if(n){let s=e.codePointAt(i);for(;s===Hb||s===Fb;)i++,s=e.codePointAt(i)}if(r){let s=e.codePointAt(o-1);for(;s===Hb||s===Fb;)o--,s=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function qz(e,n){const r={type:"text",value:Fz(String(n.value))};return e.patch(n,r),e.applyData(n,r)}function Vz(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}const $z={blockquote:bz,break:wz,code:Sz,delete:Ez,emphasis:kz,footnoteReference:Cz,heading:Az,html:Tz,imageReference:Rz,image:_z,inlineCode:Nz,linkReference:Mz,link:jz,listItem:Dz,list:Lz,paragraph:zz,root:Pz,strong:Iz,table:Bz,tableCell:Hz,tableRow:Uz,text:qz,thematicBreak:Vz,toml:Au,yaml:Au,definition:Au,footnoteDefinition:Au};function Au(){}const HS=-1,_c=0,Co=1,Wu=2,cm=3,fm=4,dm=5,hm=6,FS=7,qS=8,Vb=typeof self=="object"?self:globalThis,Gz=(e,n)=>{const r=(o,s)=>(e.set(s,o),o),i=o=>{if(e.has(o))return e.get(o);const[s,c]=n[o];switch(s){case _c:case HS:return r(c,o);case Co:{const f=r([],o);for(const h of c)f.push(i(h));return f}case Wu:{const f=r({},o);for(const[h,d]of c)f[i(h)]=i(d);return f}case cm:return r(new Date(c),o);case fm:{const{source:f,flags:h}=c;return r(new RegExp(f,h),o)}case dm:{const f=r(new Map,o);for(const[h,d]of c)f.set(i(h),i(d));return f}case hm:{const f=r(new Set,o);for(const h of c)f.add(i(h));return f}case FS:{const{name:f,message:h}=c;return r(new Vb[f](h),o)}case qS:return r(BigInt(c),o);case"BigInt":return r(Object(BigInt(c)),o);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new Vb[s](c),o)};return i},$b=e=>Gz(new Map,e)(0),$i="",{toString:Yz}={},{keys:Kz}=Object,go=e=>{const n=typeof e;if(n!=="object"||!e)return[_c,n];const r=Yz.call(e).slice(8,-1);switch(r){case"Array":return[Co,$i];case"Object":return[Wu,$i];case"Date":return[cm,$i];case"RegExp":return[fm,$i];case"Map":return[dm,$i];case"Set":return[hm,$i];case"DataView":return[Co,r]}return r.includes("Array")?[Co,r]:r.includes("Error")?[FS,r]:[Wu,r]},Tu=([e,n])=>e===_c&&(n==="function"||n==="symbol"),Xz=(e,n,r,i)=>{const o=(c,f)=>{const h=i.push(c)-1;return r.set(f,h),h},s=c=>{if(r.has(c))return r.get(c);let[f,h]=go(c);switch(f){case _c:{let m=c;switch(h){case"bigint":f=qS,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return o([HS],c)}return o([f,m],c)}case Co:{if(h){let b=c;return h==="DataView"?b=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(b=new Uint8Array(c)),o([h,[...b]],c)}const m=[],y=o([f,m],c);for(const b of c)m.push(s(b));return y}case Wu:{if(h)switch(h){case"BigInt":return o([h,c.toString()],c);case"Boolean":case"Number":case"String":return o([h,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const m=[],y=o([f,m],c);for(const b of Kz(c))(e||!Tu(go(c[b])))&&m.push([s(b),s(c[b])]);return y}case cm:return o([f,c.toISOString()],c);case fm:{const{source:m,flags:y}=c;return o([f,{source:m,flags:y}],c)}case dm:{const m=[],y=o([f,m],c);for(const[b,w]of c)(e||!(Tu(go(b))||Tu(go(w))))&&m.push([s(b),s(w)]);return y}case hm:{const m=[],y=o([f,m],c);for(const b of c)(e||!Tu(go(b)))&&m.push(s(b));return y}}const{message:d}=c;return o([f,{name:h,message:d}],c)};return s},Gb=(e,{json:n,lossy:r}={})=>{const i=[];return Xz(!(n||r),!!n,new Map,i)(e),i},Do=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?$b(Gb(e,n)):structuredClone(e):(e,n)=>$b(Gb(e,n));function Qz(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}function Zz(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Wz(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Qz,i=e.options.footnoteBackLabel||Zz,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[h]);if(!d)continue;const m=e.all(d),y=String(d.identifier).toUpperCase(),b=hl(y.toLowerCase());let w=0;const k=[],C=e.footnoteCounts.get(y);for(;C!==void 0&&++w<=C;){k.length>0&&k.push({type:"text",value:" "});let _=typeof r=="string"?r:r(h,w);typeof _=="string"&&(_={type:"text",value:_}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,w),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const _=T.children[T.children.length-1];_&&_.type==="text"?_.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else m.push(...k);const A={type:"element",tagName:"li",properties:{id:n+"fn-"+b},children:e.wrap(m,!0)};e.patch(d,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Do(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
378
383
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
379
|
-
`}]}}const Nc=(function(e){if(e==null)return
|
|
384
|
+
`}]}}const Nc=(function(e){if(e==null)return nP;if(typeof e=="function")return Mc(e);if(typeof e=="object")return Array.isArray(e)?Jz(e):eP(e);if(typeof e=="string")return tP(e);throw new Error("Expected function, string, or object as test")});function Jz(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=Nc(e[r]);return Mc(i);function i(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function eP(e){const n=e;return Mc(r);function r(i){const o=i;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function tP(e){return Mc(n);function n(r){return r&&r.type===e}}function Mc(e){return n;function n(r,i,o){return!!(rP(r)&&e.call(this,r,typeof i=="number"?i:void 0,o||void 0))}}function nP(){return!0}function rP(e){return e!==null&&typeof e=="object"&&"type"in e}const VS=[],aP=!0,op=!1,iP="skip";function $S(e,n,r,i){let o;typeof n=="function"&&typeof r!="function"?(i=r,r=n):o=n;const s=Nc(o),c=i?-1:1;f(e,void 0,[])();function f(h,d,m){const y=h&&typeof h=="object"?h:{};if(typeof y.type=="string"){const w=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(h.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=VS,k,C,T;if((!n||s(h,d,m[m.length-1]||void 0))&&(w=lP(r(h,m)),w[0]===op))return w;if("children"in h&&h.children){const A=h;if(A.children&&w[0]!==iP)for(C=(i?A.children.length:-1)+c,T=m.concat(A);C>-1&&C<A.children.length;){const _=A.children[C];if(k=f(_,C,T)(),k[0]===op)return k;C=typeof k[1]=="number"?k[1]:C+c}}return w}}}function lP(e){return Array.isArray(e)?e:typeof e=="number"?[aP,e]:e==null?VS:[e]}function pm(e,n,r,i){let o,s,c;typeof n=="function"&&typeof r!="function"?(s=void 0,c=n,o=r):(s=n,c=r,o=i),$S(e,s,f,o);function f(h,d){const m=d[d.length-1],y=m?m.children.indexOf(h):void 0;return c(h,y,m)}}const sp={}.hasOwnProperty,oP={};function sP(e,n){const r=n||oP,i=new Map,o=new Map,s=new Map,c={...$z,...r.handlers},f={all:d,applyData:cP,definitionById:i,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:h,options:r,patch:uP,wrap:dP};return pm(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const y=m.type==="definition"?i:o,b=String(m.identifier).toUpperCase();y.has(b)||y.set(b,m)}}),f;function h(m,y){const b=m.type,w=f.handlers[b];if(sp.call(f.handlers,b)&&w)return w(f,m,y);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in m){const{children:C,...T}=m,A=Do(T);return A.children=f.all(m),A}return Do(m)}return(f.options.unknownHandler||fP)(f,m,y)}function d(m){const y=[];if("children"in m){const b=m.children;let w=-1;for(;++w<b.length;){const k=f.one(b[w],m);if(k){if(w&&b[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Yb(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=Yb(C.value))}Array.isArray(k)?y.push(...k):y.push(k)}}}return y}}function uP(e,n){e.position&&(n.position=bS(e))}function cP(e,n){let r=n;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const c="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:c}}r.type==="element"&&s&&Object.assign(r.properties,Do(s)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function fP(e,n){const r=n.data||{},i="value"in n&&!(sp.call(r,"hProperties")||sp.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function dP(e,n){const r=[];let i=-1;for(n&&r.push({type:"text",value:`
|
|
380
385
|
`});++i<e.length;)i&&r.push({type:"text",value:`
|
|
381
386
|
`}),r.push(e[i]);return n&&e.length>0&&r.push({type:"text",value:`
|
|
382
|
-
`}),r}function Yb(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}function Kb(e,n){const r=
|
|
383
|
-
`},o),s}function fP(e,n){return e&&"run"in e?async function(r,i){const o=Kb(r,{file:i,...n});await e.run(o,i)}:function(r,i){return Kb(r,{file:i,...e||n})}}function Xb(e){if(e)throw e}var Sh,Qb;function dP(){if(Qb)return Sh;Qb=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},s=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var m=e.call(d,"constructor"),y=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!m&&!y)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},c=function(d,m){r&&m.name==="__proto__"?r(d,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):d[m.name]=m.newValue},f=function(d,m){if(m==="__proto__")if(e.call(d,m)){if(i)return i(d,m).value}else return;return d[m]};return Sh=function h(){var d,m,y,b,w,k,C=arguments[0],T=1,A=arguments.length,_=!1;for(typeof C=="boolean"&&(_=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<A;++T)if(d=arguments[T],d!=null)for(m in d)y=f(C,m),b=f(d,m),C!==b&&(_&&b&&(s(b)||(w=o(b)))?(w?(w=!1,k=y&&o(y)?y:[]):k=y&&s(y)?y:{},c(C,{name:m,newValue:h(_,k,b)})):typeof b<"u"&&c(C,{name:m,newValue:b}));return C},Sh}var hP=dP();const Eh=ac(hP);function up(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function pP(){const e=[],n={run:r,use:i};return n;function r(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(h,...d){const m=e[++s];let y=-1;if(h){c(h);return}for(;++y<o.length;)(d[y]===null||d[y]===void 0)&&(d[y]=o[y]);o=d,m?mP(m,f)(...d):c(null,...d)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function mP(e,n){let r;return i;function i(...c){const f=e.length>c.length;let h;f&&c.push(o);try{h=e.apply(this,c)}catch(d){const m=d;if(f&&r)throw m;return o(m)}f||(h&&h.then&&typeof h.then=="function"?h.then(s,o):h instanceof Error?o(h):s(h))}function o(c,...f){r||(r=!0,n(c,...f))}function s(c){o(null,c)}}const ir={basename:gP,dirname:yP,extname:vP,join:xP,sep:"/"};function gP(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Jo(e);let r=0,i=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else i<0&&(s=!0,i=o+1);return i<0?"":e.slice(r,i)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(i=o):(f=-1,i=c));return r===i?i=c:i<0&&(i=e.length),e.slice(r,i)}function yP(e){if(Jo(e),e.length===0)return".";let n=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){n=r;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function vP(e){Jo(e);let n=e.length,r=-1,i=0,o=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){i=n+1;break}continue}r<0&&(c=!0,r=n+1),f===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||r<0||s===0||s===1&&o===r-1&&o===i+1?"":e.slice(o,r)}function xP(...e){let n=-1,r;for(;++n<e.length;)Jo(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":bP(r)}function bP(e){Jo(e);const n=e.codePointAt(0)===47;let r=wP(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function wP(e,n){let r="",i=0,o=-1,s=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",i=0):(r=r.slice(0,h),i=r.length-1-r.lastIndexOf("/")),o=c,s=0;continue}}else if(r.length>0){r="",i=0,o=c,s=0;continue}}n&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(o+1,c):r=e.slice(o+1,c),i=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return r}function Jo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const SP={cwd:EP};function EP(){return"/"}function cp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kP(e){if(typeof e=="string")e=new URL(e);else if(!cp(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return CP(e)}function CP(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const i=n.codePointAt(r+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const kh=["history","path","basename","stem","extname","dirname"];class GS{constructor(n){let r;n?cp(n)?r={path:n}:typeof n=="string"||AP(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":SP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<kh.length;){const s=kh[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let o;for(o in r)kh.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?ir.basename(this.path):void 0}set basename(n){Ah(n,"basename"),Ch(n,"basename"),this.path=ir.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ir.dirname(this.path):void 0}set dirname(n){Zb(this.basename,"dirname"),this.path=ir.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ir.extname(this.path):void 0}set extname(n){if(Ch(n,"extname"),Zb(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ir.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){cp(n)&&(n=kP(n)),Ah(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ir.basename(this.path,this.extname):void 0}set stem(n){Ah(n,"stem"),Ch(n,"stem"),this.path=ir.join(this.dirname||"",n+(this.extname||""))}fail(n,r,i){const o=this.message(n,r,i);throw o.fatal=!0,o}info(n,r,i){const o=this.message(n,r,i);return o.fatal=void 0,o}message(n,r,i){const o=new $t(n,r,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ch(e,n){if(e&&e.includes(ir.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ir.sep+"`")}function Ah(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Zb(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function AP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TP=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),RP={}.hasOwnProperty;class mm extends TP{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=pP()}copy(){const n=new mm;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];n.use(...i)}return n.data(Eh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(_h("data",this.frozen),this.namespace[n]=r,this):RP.call(this.namespace,n)&&this.namespace[n]||void 0:n?(_h("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=r.call(n,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Ru(n),i=this.parser||this.Parser;return Th("parse",i),i(String(r),r)}process(n,r){const i=this;return this.freeze(),Th("process",this.parser||this.Parser),Rh("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(s,c){const f=Ru(n),h=i.parse(f);i.run(h,f,function(m,y,b){if(m||!y||!b)return d(m);const w=y,k=i.stringify(w,b);MP(k)?b.value=k:b.result=k,d(m,b)});function d(m,y){m||!y?c(m):s?s(y):r(void 0,y)}}}processSync(n){let r=!1,i;return this.freeze(),Th("processSync",this.parser||this.Parser),Rh("processSync",this.compiler||this.Compiler),this.process(n,o),Jb("processSync","process",r),i;function o(s,c){r=!0,Xb(s),i=c}}run(n,r,i){Wb(n),this.freeze();const o=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(c,f){const h=Ru(r);o.run(n,h,d);function d(m,y,b){const w=y||n;m?f(m):c?c(w):i(void 0,w,b)}}}runSync(n,r){let i=!1,o;return this.run(n,r,s),Jb("runSync","run",i),o;function s(c,f){Xb(c),o=f,i=!0}}stringify(n,r){this.freeze();const i=Ru(r),o=this.compiler||this.Compiler;return Rh("stringify",o),Wb(n),o(n,i)}use(n,...r){const i=this.attachers,o=this.namespace;if(_h("use",this.frozen),n!=null)if(typeof n=="function")h(n,r);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(d){if(typeof d=="function")h(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[m,...y]=d;h(m,y)}else c(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function c(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(d.plugins),d.settings&&(o.settings=Eh(!0,o.settings,d.settings))}function f(d){let m=-1;if(d!=null)if(Array.isArray(d))for(;++m<d.length;){const y=d[m];s(y)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function h(d,m){let y=-1,b=-1;for(;++y<i.length;)if(i[y][0]===d){b=y;break}if(b===-1)i.push([d,...m]);else if(m.length>0){let[w,...k]=m;const C=i[b][1];up(C)&&up(w)&&(w=Eh(!0,C,w)),i[b]=[d,w,...k]}}}}const _P=new mm().freeze();function Th(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Rh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _h(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Wb(e){if(!up(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jb(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ru(e){return NP(e)?e:new GS(e)}function NP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MP(e){return typeof e=="string"||jP(e)}function jP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",e0=[],t0={allowDangerousHtml:!0},OP=/^(https?|ircs?|mailto|xmpp)$/i,LP=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zP(e){const n=PP(e),r=IP(e);return BP(n.runSync(n.parse(r),r),e)}function PP(e){const n=e.rehypePlugins||e0,r=e.remarkPlugins||e0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...t0}:t0;return _P().use(yz).use(r).use(fP,i).use(n)}function IP(e){const n=e.children||"",r=new GS;return typeof n=="string"&&(r.value=n),r}function BP(e,n){const r=n.allowedElements,i=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,h=n.urlTransform||UP;for(const m of LP)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+DP+m.id,void 0);return pm(e,d),e3(e,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(m,y,b){if(m.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let w;for(w in xh)if(Object.hasOwn(xh,w)&&Object.hasOwn(m.properties,w)){const k=m.properties[w],C=xh[w];(C===null||C.includes(m.tagName))&&(m.properties[w]=h(String(k||""),w,m))}}if(m.type==="element"){let w=r?!r.includes(m.tagName):s?s.includes(m.tagName):!1;if(!w&&i&&typeof y=="number"&&(w=!i(m,y,b)),w&&b&&typeof y=="number")return f&&m.children?b.children.splice(y,1,...m.children):b.children.splice(y,1),y}}}function UP(e){const n=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||r!==-1&&n>r||i!==-1&&n>i||OP.test(e.slice(0,n))?e:""}function n0(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=r.indexOf(n);for(;o!==-1;)i++,o=r.indexOf(n,o+n.length);return i}function HP(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FP(e,n,r){const o=Nc((r||{}).ignore||[]),s=qP(n);let c=-1;for(;++c<s.length;)$S(e,"text",f);function f(d,m){let y=-1,b;for(;++y<m.length;){const w=m[y],k=b?b.children:void 0;if(o(w,k?k.indexOf(w):void 0,b))return;b=w}if(b)return h(d,m)}function h(d,m){const y=m[m.length-1],b=s[c][0],w=s[c][1];let k=0;const T=y.children.indexOf(d);let A=!1,_=[];b.lastIndex=0;let N=b.exec(d.value);for(;N;){const O=N.index,z={index:N.index,input:N.input,stack:[...m,d]};let j=w(...N,z);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?b.lastIndex=O+1:(k!==O&&_.push({type:"text",value:d.value.slice(k,O)}),Array.isArray(j)?_.push(...j):j&&_.push(j),k=O+N[0].length,A=!0),!b.global)break;N=b.exec(d.value)}return A?(k<d.value.length&&_.push({type:"text",value:d.value.slice(k)}),y.children.splice(T,1,..._)):_=[d],T+_.length}}function qP(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const o=r[i];n.push([VP(o[0]),$P(o[1])])}return n}function VP(e){return typeof e=="string"?new RegExp(HP(e),"g"):e}function $P(e){return typeof e=="function"?e:function(){return e}}const Nh="phrasing",Mh=["autolink","link","image","label"];function GP(){return{transforms:[JP],enter:{literalAutolink:KP,literalAutolinkEmail:jh,literalAutolinkHttp:jh,literalAutolinkWww:jh},exit:{literalAutolink:WP,literalAutolinkEmail:ZP,literalAutolinkHttp:XP,literalAutolinkWww:QP}}}function YP(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:Mh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:Mh},{character:":",before:"[ps]",after:"\\/",inConstruct:Nh,notInConstruct:Mh}]}}function KP(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jh(e){this.config.enter.autolinkProtocol.call(this,e)}function XP(e){this.config.exit.autolinkProtocol.call(this,e)}function QP(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function ZP(e){this.config.exit.autolinkEmail.call(this,e)}function WP(e){this.exit(e)}function JP(e){FP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,e5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),t5]],{ignore:["link","linkReference"]})}function e5(e,n,r,i,o){let s="";if(!YS(o)||(/^w/i.test(n)&&(r=n+r,n="",s="http://"),!n5(r)))return!1;const c=r5(r+i);if(!c[0])return!1;const f={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function t5(e,n,r,i){return!YS(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function n5(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function r5(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],i=r.indexOf(")");const o=n0(e,"(");let s=n0(e,")");for(;i!==-1&&o>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function YS(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ka(r)||Tc(r))&&(!n||r!==47)}KS.peek=d5;function a5(){this.buffer()}function i5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function l5(){this.buffer()}function o5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function s5(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$n(this.sliceSerialize(e)).toLowerCase(),r.label=n}function u5(e){this.exit(e)}function c5(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$n(this.sliceSerialize(e)).toLowerCase(),r.label=n}function f5(e){this.exit(e)}function d5(){return"["}function KS(e,n,r,i){const o=r.createTracker(i);let s=o.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return s+=o.move(r.safe(r.associationId(e),{after:"]",before:s})),f(),c(),s+=o.move("]"),s}function h5(){return{enter:{gfmFootnoteCallString:a5,gfmFootnoteCall:i5,gfmFootnoteDefinitionLabelString:l5,gfmFootnoteDefinition:o5},exit:{gfmFootnoteCallString:s5,gfmFootnoteCall:u5,gfmFootnoteDefinitionLabelString:c5,gfmFootnoteDefinition:f5}}}function p5(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:KS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,o,s,c){const f=s.createTracker(c);let h=f.move("[^");const d=s.enter("footnoteDefinition"),m=s.enter("label");return h+=f.move(s.safe(s.associationId(i),{before:h,after:"]"})),m(),h+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),h+=f.move((n?`
|
|
384
|
-
`:" ")+s.indentLines(s.containerFlow(i,f.current()),n?XS:
|
|
385
|
-
`)}function
|
|
386
|
-
`&&
|
|
387
|
-
`}function
|
|
387
|
+
`}),r}function Yb(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}function Kb(e,n){const r=sP(e,n),i=r.one(e,void 0),o=Wz(r),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
388
|
+
`},o),s}function hP(e,n){return e&&"run"in e?async function(r,i){const o=Kb(r,{file:i,...n});await e.run(o,i)}:function(r,i){return Kb(r,{file:i,...e||n})}}function Xb(e){if(e)throw e}var Sh,Qb;function pP(){if(Qb)return Sh;Qb=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},s=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var m=e.call(d,"constructor"),y=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!m&&!y)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},c=function(d,m){r&&m.name==="__proto__"?r(d,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):d[m.name]=m.newValue},f=function(d,m){if(m==="__proto__")if(e.call(d,m)){if(i)return i(d,m).value}else return;return d[m]};return Sh=function h(){var d,m,y,b,w,k,C=arguments[0],T=1,A=arguments.length,_=!1;for(typeof C=="boolean"&&(_=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<A;++T)if(d=arguments[T],d!=null)for(m in d)y=f(C,m),b=f(d,m),C!==b&&(_&&b&&(s(b)||(w=o(b)))?(w?(w=!1,k=y&&o(y)?y:[]):k=y&&s(y)?y:{},c(C,{name:m,newValue:h(_,k,b)})):typeof b<"u"&&c(C,{name:m,newValue:b}));return C},Sh}var mP=pP();const Eh=ac(mP);function up(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function gP(){const e=[],n={run:r,use:i};return n;function r(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(h,...d){const m=e[++s];let y=-1;if(h){c(h);return}for(;++y<o.length;)(d[y]===null||d[y]===void 0)&&(d[y]=o[y]);o=d,m?yP(m,f)(...d):c(null,...d)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function yP(e,n){let r;return i;function i(...c){const f=e.length>c.length;let h;f&&c.push(o);try{h=e.apply(this,c)}catch(d){const m=d;if(f&&r)throw m;return o(m)}f||(h&&h.then&&typeof h.then=="function"?h.then(s,o):h instanceof Error?o(h):s(h))}function o(c,...f){r||(r=!0,n(c,...f))}function s(c){o(null,c)}}const ir={basename:vP,dirname:xP,extname:bP,join:wP,sep:"/"};function vP(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Jo(e);let r=0,i=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else i<0&&(s=!0,i=o+1);return i<0?"":e.slice(r,i)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(i=o):(f=-1,i=c));return r===i?i=c:i<0&&(i=e.length),e.slice(r,i)}function xP(e){if(Jo(e),e.length===0)return".";let n=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){n=r;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function bP(e){Jo(e);let n=e.length,r=-1,i=0,o=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){i=n+1;break}continue}r<0&&(c=!0,r=n+1),f===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||r<0||s===0||s===1&&o===r-1&&o===i+1?"":e.slice(o,r)}function wP(...e){let n=-1,r;for(;++n<e.length;)Jo(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":SP(r)}function SP(e){Jo(e);const n=e.codePointAt(0)===47;let r=EP(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function EP(e,n){let r="",i=0,o=-1,s=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",i=0):(r=r.slice(0,h),i=r.length-1-r.lastIndexOf("/")),o=c,s=0;continue}}else if(r.length>0){r="",i=0,o=c,s=0;continue}}n&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(o+1,c):r=e.slice(o+1,c),i=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return r}function Jo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const kP={cwd:CP};function CP(){return"/"}function cp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function AP(e){if(typeof e=="string")e=new URL(e);else if(!cp(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return TP(e)}function TP(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const i=n.codePointAt(r+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const kh=["history","path","basename","stem","extname","dirname"];class GS{constructor(n){let r;n?cp(n)?r={path:n}:typeof n=="string"||RP(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":kP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<kh.length;){const s=kh[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let o;for(o in r)kh.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?ir.basename(this.path):void 0}set basename(n){Ah(n,"basename"),Ch(n,"basename"),this.path=ir.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ir.dirname(this.path):void 0}set dirname(n){Zb(this.basename,"dirname"),this.path=ir.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ir.extname(this.path):void 0}set extname(n){if(Ch(n,"extname"),Zb(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ir.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){cp(n)&&(n=AP(n)),Ah(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ir.basename(this.path,this.extname):void 0}set stem(n){Ah(n,"stem"),Ch(n,"stem"),this.path=ir.join(this.dirname||"",n+(this.extname||""))}fail(n,r,i){const o=this.message(n,r,i);throw o.fatal=!0,o}info(n,r,i){const o=this.message(n,r,i);return o.fatal=void 0,o}message(n,r,i){const o=new $t(n,r,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ch(e,n){if(e&&e.includes(ir.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ir.sep+"`")}function Ah(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Zb(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function RP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _P=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),NP={}.hasOwnProperty;class mm extends _P{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=gP()}copy(){const n=new mm;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];n.use(...i)}return n.data(Eh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(_h("data",this.frozen),this.namespace[n]=r,this):NP.call(this.namespace,n)&&this.namespace[n]||void 0:n?(_h("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=r.call(n,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Ru(n),i=this.parser||this.Parser;return Th("parse",i),i(String(r),r)}process(n,r){const i=this;return this.freeze(),Th("process",this.parser||this.Parser),Rh("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(s,c){const f=Ru(n),h=i.parse(f);i.run(h,f,function(m,y,b){if(m||!y||!b)return d(m);const w=y,k=i.stringify(w,b);DP(k)?b.value=k:b.result=k,d(m,b)});function d(m,y){m||!y?c(m):s?s(y):r(void 0,y)}}}processSync(n){let r=!1,i;return this.freeze(),Th("processSync",this.parser||this.Parser),Rh("processSync",this.compiler||this.Compiler),this.process(n,o),Jb("processSync","process",r),i;function o(s,c){r=!0,Xb(s),i=c}}run(n,r,i){Wb(n),this.freeze();const o=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(c,f){const h=Ru(r);o.run(n,h,d);function d(m,y,b){const w=y||n;m?f(m):c?c(w):i(void 0,w,b)}}}runSync(n,r){let i=!1,o;return this.run(n,r,s),Jb("runSync","run",i),o;function s(c,f){Xb(c),o=f,i=!0}}stringify(n,r){this.freeze();const i=Ru(r),o=this.compiler||this.Compiler;return Rh("stringify",o),Wb(n),o(n,i)}use(n,...r){const i=this.attachers,o=this.namespace;if(_h("use",this.frozen),n!=null)if(typeof n=="function")h(n,r);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(d){if(typeof d=="function")h(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[m,...y]=d;h(m,y)}else c(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function c(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(d.plugins),d.settings&&(o.settings=Eh(!0,o.settings,d.settings))}function f(d){let m=-1;if(d!=null)if(Array.isArray(d))for(;++m<d.length;){const y=d[m];s(y)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function h(d,m){let y=-1,b=-1;for(;++y<i.length;)if(i[y][0]===d){b=y;break}if(b===-1)i.push([d,...m]);else if(m.length>0){let[w,...k]=m;const C=i[b][1];up(C)&&up(w)&&(w=Eh(!0,C,w)),i[b]=[d,w,...k]}}}}const MP=new mm().freeze();function Th(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Rh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _h(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Wb(e){if(!up(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jb(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ru(e){return jP(e)?e:new GS(e)}function jP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function DP(e){return typeof e=="string"||OP(e)}function OP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const LP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",e0=[],t0={allowDangerousHtml:!0},zP=/^(https?|ircs?|mailto|xmpp)$/i,PP=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function IP(e){const n=BP(e),r=UP(e);return HP(n.runSync(n.parse(r),r),e)}function BP(e){const n=e.rehypePlugins||e0,r=e.remarkPlugins||e0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...t0}:t0;return MP().use(xz).use(r).use(hP,i).use(n)}function UP(e){const n=e.children||"",r=new GS;return typeof n=="string"&&(r.value=n),r}function HP(e,n){const r=n.allowedElements,i=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,h=n.urlTransform||FP;for(const m of PP)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+LP+m.id,void 0);return pm(e,d),n3(e,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(m,y,b){if(m.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let w;for(w in xh)if(Object.hasOwn(xh,w)&&Object.hasOwn(m.properties,w)){const k=m.properties[w],C=xh[w];(C===null||C.includes(m.tagName))&&(m.properties[w]=h(String(k||""),w,m))}}if(m.type==="element"){let w=r?!r.includes(m.tagName):s?s.includes(m.tagName):!1;if(!w&&i&&typeof y=="number"&&(w=!i(m,y,b)),w&&b&&typeof y=="number")return f&&m.children?b.children.splice(y,1,...m.children):b.children.splice(y,1),y}}}function FP(e){const n=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||r!==-1&&n>r||i!==-1&&n>i||zP.test(e.slice(0,n))?e:""}function n0(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=r.indexOf(n);for(;o!==-1;)i++,o=r.indexOf(n,o+n.length);return i}function qP(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function VP(e,n,r){const o=Nc((r||{}).ignore||[]),s=$P(n);let c=-1;for(;++c<s.length;)$S(e,"text",f);function f(d,m){let y=-1,b;for(;++y<m.length;){const w=m[y],k=b?b.children:void 0;if(o(w,k?k.indexOf(w):void 0,b))return;b=w}if(b)return h(d,m)}function h(d,m){const y=m[m.length-1],b=s[c][0],w=s[c][1];let k=0;const T=y.children.indexOf(d);let A=!1,_=[];b.lastIndex=0;let N=b.exec(d.value);for(;N;){const O=N.index,z={index:N.index,input:N.input,stack:[...m,d]};let j=w(...N,z);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?b.lastIndex=O+1:(k!==O&&_.push({type:"text",value:d.value.slice(k,O)}),Array.isArray(j)?_.push(...j):j&&_.push(j),k=O+N[0].length,A=!0),!b.global)break;N=b.exec(d.value)}return A?(k<d.value.length&&_.push({type:"text",value:d.value.slice(k)}),y.children.splice(T,1,..._)):_=[d],T+_.length}}function $P(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const o=r[i];n.push([GP(o[0]),YP(o[1])])}return n}function GP(e){return typeof e=="string"?new RegExp(qP(e),"g"):e}function YP(e){return typeof e=="function"?e:function(){return e}}const Nh="phrasing",Mh=["autolink","link","image","label"];function KP(){return{transforms:[t5],enter:{literalAutolink:QP,literalAutolinkEmail:jh,literalAutolinkHttp:jh,literalAutolinkWww:jh},exit:{literalAutolink:e5,literalAutolinkEmail:JP,literalAutolinkHttp:ZP,literalAutolinkWww:WP}}}function XP(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:Mh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:Mh},{character:":",before:"[ps]",after:"\\/",inConstruct:Nh,notInConstruct:Mh}]}}function QP(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jh(e){this.config.enter.autolinkProtocol.call(this,e)}function ZP(e){this.config.exit.autolinkProtocol.call(this,e)}function WP(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function JP(e){this.config.exit.autolinkEmail.call(this,e)}function e5(e){this.exit(e)}function t5(e){VP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,n5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),r5]],{ignore:["link","linkReference"]})}function n5(e,n,r,i,o){let s="";if(!YS(o)||(/^w/i.test(n)&&(r=n+r,n="",s="http://"),!a5(r)))return!1;const c=i5(r+i);if(!c[0])return!1;const f={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function r5(e,n,r,i){return!YS(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function a5(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function i5(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],i=r.indexOf(")");const o=n0(e,"(");let s=n0(e,")");for(;i!==-1&&o>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function YS(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ka(r)||Tc(r))&&(!n||r!==47)}KS.peek=p5;function l5(){this.buffer()}function o5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function s5(){this.buffer()}function u5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function c5(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$n(this.sliceSerialize(e)).toLowerCase(),r.label=n}function f5(e){this.exit(e)}function d5(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=$n(this.sliceSerialize(e)).toLowerCase(),r.label=n}function h5(e){this.exit(e)}function p5(){return"["}function KS(e,n,r,i){const o=r.createTracker(i);let s=o.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return s+=o.move(r.safe(r.associationId(e),{after:"]",before:s})),f(),c(),s+=o.move("]"),s}function m5(){return{enter:{gfmFootnoteCallString:l5,gfmFootnoteCall:o5,gfmFootnoteDefinitionLabelString:s5,gfmFootnoteDefinition:u5},exit:{gfmFootnoteCallString:c5,gfmFootnoteCall:f5,gfmFootnoteDefinitionLabelString:d5,gfmFootnoteDefinition:h5}}}function g5(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:KS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,o,s,c){const f=s.createTracker(c);let h=f.move("[^");const d=s.enter("footnoteDefinition"),m=s.enter("label");return h+=f.move(s.safe(s.associationId(i),{before:h,after:"]"})),m(),h+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),h+=f.move((n?`
|
|
389
|
+
`:" ")+s.indentLines(s.containerFlow(i,f.current()),n?XS:y5))),d(),h}}function y5(e,n,r){return n===0?e:XS(e,n,r)}function XS(e,n,r){return(r?"":" ")+e}const v5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];QS.peek=E5;function x5(){return{canContainEols:["delete"],enter:{strikethrough:w5},exit:{strikethrough:S5}}}function b5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:v5}],handlers:{delete:QS}}}function w5(e){this.enter({type:"delete",children:[]},e)}function S5(e){this.exit(e)}function QS(e,n,r,i){const o=r.createTracker(i),s=r.enter("strikethrough");let c=o.move("~~");return c+=r.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function E5(){return"~"}function k5(e){return e.length}function C5(e,n){const r=n||{},i=(r.align||[]).concat(),o=r.stringLength||k5,s=[],c=[],f=[],h=[];let d=0,m=-1;for(;++m<e.length;){const C=[],T=[];let A=-1;for(e[m].length>d&&(d=e[m].length);++A<e[m].length;){const _=A5(e[m][A]);if(r.alignDelimiters!==!1){const N=o(_);T[A]=N,(h[A]===void 0||N>h[A])&&(h[A]=N)}C.push(_)}c[m]=C,f[m]=T}let y=-1;if(typeof i=="object"&&"length"in i)for(;++y<d;)s[y]=r0(i[y]);else{const C=r0(i);for(;++y<d;)s[y]=C}y=-1;const b=[],w=[];for(;++y<d;){const C=s[y];let T="",A="";C===99?(T=":",A=":"):C===108?T=":":C===114&&(A=":");let _=r.alignDelimiters===!1?1:Math.max(1,h[y]-T.length-A.length);const N=T+"-".repeat(_)+A;r.alignDelimiters!==!1&&(_=T.length+_+A.length,_>h[y]&&(h[y]=_),w[y]=_),b[y]=N}c.splice(1,0,b),f.splice(1,0,w),m=-1;const k=[];for(;++m<c.length;){const C=c[m],T=f[m];y=-1;const A=[];for(;++y<d;){const _=C[y]||"";let N="",O="";if(r.alignDelimiters!==!1){const z=h[y]-(T[y]||0),j=s[y];j===114?N=" ".repeat(z):j===99?z%2?(N=" ".repeat(z/2+.5),O=" ".repeat(z/2-.5)):(N=" ".repeat(z/2),O=N):O=" ".repeat(z)}r.delimiterStart!==!1&&!y&&A.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&_==="")&&(r.delimiterStart!==!1||y)&&A.push(" "),r.alignDelimiters!==!1&&A.push(N),A.push(_),r.alignDelimiters!==!1&&A.push(O),r.padding!==!1&&A.push(" "),(r.delimiterEnd!==!1||y!==d-1)&&A.push("|")}k.push(r.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return k.join(`
|
|
390
|
+
`)}function A5(e){return e==null?"":String(e)}function r0(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function T5(e,n,r,i){const o=r.enter("blockquote"),s=r.createTracker(i);s.move("> "),s.shift(2);const c=r.indentLines(r.containerFlow(e,s.current()),R5);return o(),c}function R5(e,n,r){return">"+(r?"":" ")+e}function _5(e,n){return a0(e,n.inConstruct,!0)&&!a0(e,n.notInConstruct,!1)}function a0(e,n,r){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return r;let i=-1;for(;++i<n.length;)if(e.includes(n[i]))return!0;return!1}function i0(e,n,r,i){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
|
|
391
|
+
`&&_5(r.stack,r.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
392
|
+
`}function N5(e,n){const r=String(e);let i=r.indexOf(n),o=i,s=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++s>c&&(c=s):s=1,o=i+n.length,i=r.indexOf(n,o);return c}function M5(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function j5(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function D5(e,n,r,i){const o=j5(r),s=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(M5(e,r)){const y=r.enter("codeIndented"),b=r.indentLines(s,O5);return y(),b}const f=r.createTracker(i),h=o.repeat(Math.max(N5(s,o)+1,3)),d=r.enter("codeFenced");let m=f.move(h);if(e.lang){const y=r.enter(`codeFencedLang${c}`);m+=f.move(r.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),y()}if(e.lang&&e.meta){const y=r.enter(`codeFencedMeta${c}`);m+=f.move(" "),m+=f.move(r.safe(e.meta,{before:m,after:`
|
|
388
393
|
`,encode:["`"],...f.current()})),y()}return m+=f.move(`
|
|
389
394
|
`),s&&(m+=f.move(s+`
|
|
390
|
-
`)),m+=f.move(h),d(),m}function
|
|
391
|
-
`,...h.current()}))),f(),e.title&&(f=r.enter(`title${s}`),d+=h.move(" "+o),d+=h.move(r.safe(e.title,{before:d,after:o,...h.current()})),d+=h.move(o),f()),c(),d}function
|
|
395
|
+
`)),m+=f.move(h),d(),m}function O5(e,n,r){return(r?"":" ")+e}function gm(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function L5(e,n,r,i){const o=gm(r),s=o==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const h=r.createTracker(i);let d=h.move("[");return d+=h.move(r.safe(r.associationId(e),{before:d,after:"]",...h.current()})),d+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),d+=h.move("<"),d+=h.move(r.safe(e.url,{before:d,after:">",...h.current()})),d+=h.move(">")):(f=r.enter("destinationRaw"),d+=h.move(r.safe(e.url,{before:d,after:e.title?" ":`
|
|
396
|
+
`,...h.current()}))),f(),e.title&&(f=r.enter(`title${s}`),d+=h.move(" "+o),d+=h.move(r.safe(e.title,{before:d,after:o,...h.current()})),d+=h.move(o),f()),c(),d}function z5(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Oo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ju(e,n,r){const i=tl(e),o=tl(n);return i===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ZS.peek=P5;function ZS(e,n,r,i){const o=z5(r),s=r.enter("emphasis"),c=r.createTracker(i),f=c.move(o);let h=c.move(r.containerPhrasing(e,{after:o,before:f,...c.current()}));const d=h.charCodeAt(0),m=Ju(i.before.charCodeAt(i.before.length-1),d,o);m.inside&&(h=Oo(d)+h.slice(1));const y=h.charCodeAt(h.length-1),b=Ju(i.after.charCodeAt(0),y,o);b.inside&&(h=h.slice(0,-1)+Oo(y));const w=c.move(o);return s(),r.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},f+h+w}function P5(e,n,r){return r.options.emphasis||"*"}function I5(e,n){let r=!1;return pm(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,op}),!!((!e.depth||e.depth<3)&&om(e)&&(n.options.setext||r))}function B5(e,n,r,i){const o=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(i);if(I5(e,r)){const m=r.enter("headingSetext"),y=r.enter("phrasing"),b=r.containerPhrasing(e,{...s.current(),before:`
|
|
392
397
|
`,after:`
|
|
393
398
|
`});return y(),m(),b+`
|
|
394
399
|
`+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
395
400
|
`))+1))}const c="#".repeat(o),f=r.enter("headingAtx"),h=r.enter("phrasing");s.move(c+" ");let d=r.containerPhrasing(e,{before:"# ",after:`
|
|
396
|
-
`,...s.current()});return/^[\t ]/.test(d)&&(d=Oo(d.charCodeAt(0))+d.slice(1)),d=d?c+" "+d:c,r.options.closeAtx&&(d+=" "+c),h(),f(),d}WS.peek=
|
|
401
|
+
`,...s.current()});return/^[\t ]/.test(d)&&(d=Oo(d.charCodeAt(0))+d.slice(1)),d=d?c+" "+d:c,r.options.closeAtx&&(d+=" "+c),h(),f(),d}WS.peek=U5;function WS(e){return e.value||""}function U5(){return"<"}JS.peek=H5;function JS(e,n,r,i){const o=gm(r),s=o==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const h=r.createTracker(i);let d=h.move("![");return d+=h.move(r.safe(e.alt,{before:d,after:"]",...h.current()})),d+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),d+=h.move("<"),d+=h.move(r.safe(e.url,{before:d,after:">",...h.current()})),d+=h.move(">")):(f=r.enter("destinationRaw"),d+=h.move(r.safe(e.url,{before:d,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=r.enter(`title${s}`),d+=h.move(" "+o),d+=h.move(r.safe(e.title,{before:d,after:o,...h.current()})),d+=h.move(o),f()),d+=h.move(")"),c(),d}function H5(){return"!"}eE.peek=F5;function eE(e,n,r,i){const o=e.referenceType,s=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(i);let h=f.move("![");const d=r.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(d+"]["),c();const m=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=m,s(),o==="full"||!d||d!==y?h+=f.move(y+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function F5(){return"!"}tE.peek=q5;function tE(e,n,r){let i=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<r.unsafe.length;){const c=r.unsafe[s],f=r.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(i);){let d=h.index;i.charCodeAt(d)===10&&i.charCodeAt(d-1)===13&&d--,i=i.slice(0,d)+" "+i.slice(h.index+1)}}return o+i+o}function q5(){return"`"}function nE(e,n){const r=om(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}rE.peek=V5;function rE(e,n,r,i){const o=gm(r),s=o==='"'?"Quote":"Apostrophe",c=r.createTracker(i);let f,h;if(nE(e,r)){const m=r.stack;r.stack=[],f=r.enter("autolink");let y=c.move("<");return y+=c.move(r.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),r.stack=m,y}f=r.enter("link"),h=r.enter("label");let d=c.move("[");return d+=c.move(r.containerPhrasing(e,{before:d,after:"](",...c.current()})),d+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(r.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(h=r.enter("destinationRaw"),d+=c.move(r.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=r.enter(`title${s}`),d+=c.move(" "+o),d+=c.move(r.safe(e.title,{before:d,after:o,...c.current()})),d+=c.move(o),h()),d+=c.move(")"),f(),d}function V5(e,n,r){return nE(e,r)?"<":"["}aE.peek=$5;function aE(e,n,r,i){const o=e.referenceType,s=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(i);let h=f.move("[");const d=r.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(d+"]["),c();const m=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:h,after:"]",...f.current()});return c(),r.stack=m,s(),o==="full"||!d||d!==y?h+=f.move(y+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function $5(){return"["}function ym(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function G5(e){const n=ym(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Y5(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function iE(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function K5(e,n,r,i){const o=r.enter("list"),s=r.bulletCurrent;let c=e.ordered?Y5(r):ym(r);const f=e.ordered?c==="."?")":".":G5(r);let h=n&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),iE(r)===c&&m){let y=-1;for(;++y<e.children.length;){const b=e.children[y];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),r.bulletCurrent=c;const d=r.containerFlow(e,i);return r.bulletLastUsed=c,r.bulletCurrent=s,o(),d}function X5(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Q5(e,n,r,i){const o=X5(r);let s=r.bulletCurrent||ym(r);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(i);f.move(s+" ".repeat(c-s.length)),f.shift(c);const h=r.enter("listItem"),d=r.indentLines(r.containerFlow(e,f.current()),m);return h(),d;function m(y,b,w){return b?(w?"":" ".repeat(c))+y:(w?s:s+" ".repeat(c-s.length))+y}}function Z5(e,n,r,i){const o=r.enter("paragraph"),s=r.enter("phrasing"),c=r.containerPhrasing(e,i);return s(),o(),c}const W5=Nc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function J5(e,n,r,i){return(e.children.some(function(c){return W5(c)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function e6(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}lE.peek=t6;function lE(e,n,r,i){const o=e6(r),s=r.enter("strong"),c=r.createTracker(i),f=c.move(o+o);let h=c.move(r.containerPhrasing(e,{after:o,before:f,...c.current()}));const d=h.charCodeAt(0),m=Ju(i.before.charCodeAt(i.before.length-1),d,o);m.inside&&(h=Oo(d)+h.slice(1));const y=h.charCodeAt(h.length-1),b=Ju(i.after.charCodeAt(0),y,o);b.inside&&(h=h.slice(0,-1)+Oo(y));const w=c.move(o+o);return s(),r.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},f+h+w}function t6(e,n,r){return r.options.strong||"*"}function n6(e,n,r,i){return r.safe(e.value,i)}function r6(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function a6(e,n,r){const i=(iE(r)+(r.options.ruleSpaces?" ":"")).repeat(r6(r));return r.options.ruleSpaces?i.slice(0,-1):i}const oE={blockquote:T5,break:i0,code:D5,definition:L5,emphasis:ZS,hardBreak:i0,heading:B5,html:WS,image:JS,imageReference:eE,inlineCode:tE,link:rE,linkReference:aE,list:K5,listItem:Q5,paragraph:Z5,root:J5,strong:lE,text:n6,thematicBreak:a6};function i6(){return{enter:{table:l6,tableData:l0,tableHeader:l0,tableRow:s6},exit:{codeText:u6,table:o6,tableData:Dh,tableHeader:Dh,tableRow:Dh}}}function l6(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function o6(e){this.exit(e),this.data.inTable=void 0}function s6(e){this.enter({type:"tableRow",children:[]},e)}function Dh(e){this.exit(e)}function l0(e){this.enter({type:"tableCell",children:[]},e)}function u6(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,c6));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function c6(e,n){return n==="|"?n:e}function f6(e){const n=e||{},r=n.tableCellPadding,i=n.tablePipeAlign,o=n.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
397
402
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:h,tableRow:f}};function c(w,k,C,T){return d(m(w,C,T),w.align)}function f(w,k,C,T){const A=y(w,C,T),_=d([A]);return _.slice(0,_.indexOf(`
|
|
398
|
-
`))}function h(w,k,C,T){const A=C.enter("tableCell"),_=C.enter("phrasing"),N=C.containerPhrasing(w,{...T,before:s,after:s});return _(),A(),N}function d(w,k){return E5(w,{align:k,alignDelimiters:i,padding:r,stringLength:o})}function m(w,k,C){const T=w.children;let A=-1;const _=[],N=k.enter("table");for(;++A<T.length;)_[A]=y(T[A],k,C);return N(),_}function y(w,k,C){const T=w.children;let A=-1;const _=[],N=k.enter("tableRow");for(;++A<T.length;)_[A]=h(T[A],w,k,C);return N(),_}function b(w,k,C){let T=oE.inlineCode(w,k,C);return C.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function c6(){return{exit:{taskListCheckValueChecked:o0,taskListCheckValueUnchecked:o0,paragraph:d6}}}function f6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:h6}}}function o0(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function d6(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const o=n.children;let s=-1,c;for(;++s<o.length;){const f=o[s];if(f.type==="paragraph"){c=f;break}}c===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function h6(e,n,r,i){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(i);s&&f.move(c);let h=oE.listItem(e,n,r,{...i,...f.current()});return s&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),h;function d(m){return m+c}}function p6(){return[GP(),h5(),y5(),r6(),c6()]}function m6(e){return{extensions:[YP(),p5(e),v5(),u6(e),f6()]}}const g6={tokenize:S6,partial:!0},sE={tokenize:E6,partial:!0},uE={tokenize:k6,partial:!0},cE={tokenize:C6,partial:!0},y6={tokenize:A6,partial:!0},fE={name:"wwwAutolink",tokenize:b6,previous:hE},dE={name:"protocolAutolink",tokenize:w6,previous:pE},Pr={name:"emailAutolink",tokenize:x6,previous:mE},hr={};function v6(){return{text:hr}}let Fa=48;for(;Fa<123;)hr[Fa]=Pr,Fa++,Fa===58?Fa=65:Fa===91&&(Fa=97);hr[43]=Pr;hr[45]=Pr;hr[46]=Pr;hr[95]=Pr;hr[72]=[Pr,dE];hr[104]=[Pr,dE];hr[87]=[Pr,fE];hr[119]=[Pr,fE];function x6(e,n,r){const i=this;let o,s;return c;function c(y){return!fp(y)||!mE.call(i,i.previous)||vm(i.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return fp(y)?(e.consume(y),f):y===64?(e.consume(y),h):r(y)}function h(y){return y===46?e.check(y6,m,d)(y):y===45||y===95||Vt(y)?(s=!0,e.consume(y),h):m(y)}function d(y){return e.consume(y),o=!0,h}function m(y){return s&&o&&Qt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):r(y)}}function b6(e,n,r){const i=this;return o;function o(c){return c!==87&&c!==119||!hE.call(i,i.previous)||vm(i.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(g6,e.attempt(sE,e.attempt(uE,s),r),r)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function w6(e,n,r){const i=this;let o="",s=!1;return c;function c(y){return(y===72||y===104)&&pE.call(i,i.previous)&&!vm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),e.consume(y),f):r(y)}function f(y){if(Qt(y)&&o.length<5)return o+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(y),h}return r(y)}function h(y){return y===47?(e.consume(y),s?d:(s=!0,h)):r(y)}function d(y){return y===null||Zu(y)||at(y)||Ka(y)||Tc(y)?r(y):e.attempt(sE,e.attempt(uE,m),r)(y)}function m(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function S6(e,n,r){let i=0;return o;function o(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),o):c===46&&i===3?(e.consume(c),s):r(c)}function s(c){return c===null?r(c):n(c)}}function E6(e,n,r){let i,o,s;return c;function c(d){return d===46||d===95?e.check(cE,h,f)(d):d===null||at(d)||Ka(d)||d!==45&&Tc(d)?h(d):(s=!0,e.consume(d),c)}function f(d){return d===95?i=!0:(o=i,i=void 0),e.consume(d),c}function h(d){return o||i||!s?r(d):n(d)}}function k6(e,n){let r=0,i=0;return o;function o(c){return c===40?(r++,e.consume(c),o):c===41&&i<r?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(cE,n,s)(c):c===null||at(c)||Ka(c)?n(c):(e.consume(c),o)}function s(c){return c===41&&i++,e.consume(c),o}}function C6(e,n,r){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),s):f===93?(e.consume(f),o):f===60||f===null||at(f)||Ka(f)?n(f):r(f)}function o(f){return f===null||f===40||f===91||at(f)||Ka(f)?n(f):i(f)}function s(f){return Qt(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),i):Qt(f)?(e.consume(f),c):r(f)}}function A6(e,n,r){return i;function i(s){return e.consume(s),o}function o(s){return Vt(s)?r(s):n(s)}}function hE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||at(e)}function pE(e){return!Qt(e)}function mE(e){return!(e===47||fp(e))}function fp(e){return e===43||e===45||e===46||e===95||Vt(e)}function vm(e){let n=e.length,r=!1;for(;n--;){const i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const T6={tokenize:L6,partial:!0};function R6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:j6,continuation:{tokenize:D6},exit:O6}},text:{91:{name:"gfmFootnoteCall",tokenize:M6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_6,resolveTo:N6}}}}function _6(e,n,r){const i=this;let o=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;o--;){const h=i.events[o][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return r(h);const d=$n(i.sliceSerialize({start:c.end,end:i.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),n(h))}}function N6(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[r+1],e[r+2],["enter",i,n],e[r+3],e[r+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(r,e.length-r+1,...f),e}function M6(e,n,r){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),h}function h(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(y){if(s>999||y===93&&!c||y===null||y===91||at(y))return r(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes($n(i.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(y)}return at(y)||(c=!0),s++,e.consume(y),y===92?m:d}function m(y){return y===91||y===92||y===93?(e.consume(y),s++,d):d(y)}}function j6(e,n,r){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,c=0,f;return h;function h(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(k)}function m(k){if(c>999||k===93&&!f||k===null||k===91||at(k))return r(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=$n(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return at(k)||(f=!0),c++,e.consume(k),k===92?y:m}function y(k){return k===91||k===92||k===93?(e.consume(k),c++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(s)||o.push(s),Ve(e,w,"gfmFootnoteDefinitionWhitespace")):r(k)}function w(k){return n(k)}}function D6(e,n,r){return e.check(Wo,n,e.attempt(T6,n,r))}function O6(e){e.exit("gfmFootnoteDefinition")}function L6(e,n,r){const i=this;return Ve(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):r(s)}}function z6(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:o};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let d=h;for(;d--;)if(c[d][0]==="exit"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[d][1].end.offset-c[d][1].start.offset){c[h][1].type="strikethroughSequence",c[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[d][1].start),end:Object.assign({},c[h][1].end)},y={type:"strikethroughText",start:Object.assign({},c[d][1].end),end:Object.assign({},c[h][1].start)},b=[["enter",m,f],["enter",c[d][1],f],["exit",c[d][1],f],["enter",y,f]],w=f.parser.constructs.insideSpan.null;w&&xn(b,b.length,0,Rc(w,c.slice(d+1,h),f)),xn(b,b.length,0,[["exit",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",m,f]]),xn(c,d-1,h-d+3,b),h=d+b.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function s(c,f,h){const d=this.previous,m=this.events;let y=0;return b;function b(k){return d===126&&m[m.length-1][1].type!=="characterEscape"?h(k):(c.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const C=tl(d);if(k===126)return y>1?h(k):(c.consume(k),y++,w);if(y<2&&!r)return h(k);const T=c.exit("strikethroughSequenceTemporary"),A=tl(k);return T._open=!A||A===2&&!!C,T._close=!C||C===2&&!!A,f(k)}}}class P6{constructor(){this.map=[]}add(n,r,i){I6(this,n,r,i)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];i.push(n.slice()),n.length=0;let o=i.pop();for(;o;){for(const s of o)n.push(s);o=i.pop()}this.map.length=0}}function I6(e,n,r,i){let o=0;if(!(r===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=r,e.map[o][2].push(...i);return}o+=1}e.map.push([n,r,i])}}function B6(e,n){let r=!1;const i=[];for(;n<e.length;){const o=e[n];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return i}function U6(){return{flow:{null:{name:"table",tokenize:H6,resolveAll:F6}}}}function H6(e,n,r){const i=this;let o=0,s=0,c;return f;function f(P){let ne=i.events.length-1;for(;ne>-1;){const H=i.events[ne][1].type;if(H==="lineEnding"||H==="linePrefix")ne--;else break}const ae=ne>-1?i.events[ne][1].type:null,le=ae==="tableHead"||ae==="tableRow"?j:h;return le===j&&i.parser.lazy[i.now().line]?r(P):le(P)}function h(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(c=!0,s+=1),m(P)}function m(P){return P===null?r(P):Ce(P)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),w):r(P):He(P)?Ve(e,m,"whitespace")(P):(s+=1,c&&(c=!1,o+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),y(P)))}function y(P){return P===null||P===124||at(P)?(e.exit("data"),m(P)):(e.consume(P),P===92?b:y)}function b(P){return P===92||P===124?(e.consume(P),y):y(P)}function w(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(P):(e.enter("tableDelimiterRow"),c=!1,He(P)?Ve(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):k(P))}function k(P){return P===45||P===58?T(P):P===124?(c=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),C):z(P)}function C(P){return He(P)?Ve(e,T,"whitespace")(P):T(P)}function T(P){return P===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),A):P===45?(s+=1,A(P)):P===null||Ce(P)?O(P):z(P)}function A(P){return P===45?(e.enter("tableDelimiterFiller"),_(P)):z(P)}function _(P){return P===45?(e.consume(P),_):P===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(P))}function N(P){return He(P)?Ve(e,O,"whitespace")(P):O(P)}function O(P){return P===124?k(P):P===null||Ce(P)?!c||o!==s?z(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):z(P)}function z(P){return r(P)}function j(P){return e.enter("tableRow"),$(P)}function $(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),$):P===null||Ce(P)?(e.exit("tableRow"),n(P)):He(P)?Ve(e,$,"whitespace")(P):(e.enter("data"),G(P))}function G(P){return P===null||P===124||at(P)?(e.exit("data"),$(P)):(e.consume(P),P===92?ee:G)}function ee(P){return P===92||P===124?(e.consume(P),G):G(P)}}function F6(e,n){let r=-1,i=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,d,m,y;const b=new P6;for(;++r<e.length;){const w=e[r],k=w[1];w[0]==="enter"?k.type==="tableHead"?(f=!1,h!==0&&(s0(b,n,h,d,m),m=void 0,h=0),d={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(r,0,[["enter",d,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,y=void 0,s=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(r,0,[["enter",m,n]])),o=k.type==="tableDelimiterRow"?2:m?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],y=_u(b,n,s,o,void 0,y),s=[0,0,0,0]),c[2]=r)):k.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(c[0]=c[1],y=_u(b,n,s,o,void 0,y)),s=c,c=[s[1],r,0,0])):k.type==="tableHead"?(f=!0,h=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=r,s[1]!==0?(c[0]=c[1],y=_u(b,n,s,o,r,y)):c[1]!==0&&(y=_u(b,n,c,o,r,y)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=r)}for(h!==0&&s0(b,n,h,d,m),b.consume(n.events),r=-1;++r<n.events.length;){const w=n.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=B6(n.events,r))}return e}function _u(e,n,r,i,o,s){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(s.end=Object.assign({},Gi(n.events,r[0])),e.add(r[0],0,[["exit",s,n]]));const h=Gi(n.events,r[1]);if(s={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",s,n]]),r[2]!==0){const d=Gi(n.events,r[2]),m=Gi(n.events,r[3]),y={type:f,start:Object.assign({},d),end:Object.assign({},m)};if(e.add(r[2],0,[["enter",y,n]]),i!==2){const b=n.events[r[2]],w=n.events[r[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,C=r[3]-r[2]-1;e.add(k,C,[])}}e.add(r[3]+1,0,[["exit",y,n]])}return o!==void 0&&(s.end=Object.assign({},Gi(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function s0(e,n,r,i,o){const s=[],c=Gi(n.events,r);o&&(o.end=Object.assign({},c),s.push(["exit",o,n])),i.end=Object.assign({},c),s.push(["exit",i,n]),e.add(r+1,0,s)}function Gi(e,n){const r=e[n],i=r[0]==="enter"?"start":"end";return r[1][i]}const q6={name:"tasklistCheck",tokenize:$6};function V6(){return{text:{91:q6}}}function $6(e,n,r){const i=this;return o;function o(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),s)}function s(h){return at(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):r(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(h)}function f(h){return Ce(h)?n(h):He(h)?e.check({tokenize:G6},n,r)(h):r(h)}}function G6(e,n,r){return Ve(e,i,"whitespace");function i(o){return o===null?r(o):n(o)}}function Y6(e){return AS([v6(),R6(),z6(e),U6(),V6()])}const K6={};function X6(e){const n=this,r=e||K6,i=n.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(Y6(r)),s.push(p6()),c.push(m6(r))}const qa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],u0={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...qa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...qa],h2:[["className","sr-only"]],img:[...qa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...qa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...qa],table:[...qa],ul:[...qa,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ma={}.hasOwnProperty;function Q6(e,n){let r={type:"root",children:[]};const i={schema:n?{...u0,...n}:u0,stack:[]},o=gE(i,e);return o&&(Array.isArray(o)?o.length===1?r=o[0]:r.children=o:r=o),r}function gE(e,n){if(n&&typeof n=="object"){const r=n;switch(typeof r.type=="string"?r.type:""){case"comment":return Z6(e,r);case"doctype":return W6(e,r);case"element":return J6(e,r);case"root":return eI(e,r);case"text":return tI(e,r)}}}function Z6(e,n){if(e.schema.allowComments){const r=typeof n.value=="string"?n.value:"",i=r.indexOf("-->"),s={type:"comment",value:i<0?r:r.slice(0,i)};return es(s,n),s}}function W6(e,n){if(e.schema.allowDoctypes){const r={type:"doctype"};return es(r,n),r}}function J6(e,n){const r=typeof n.tagName=="string"?n.tagName:"";e.stack.push(r);const i=yE(e,n.children),o=nI(e,n.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&ma.call(e.schema.ancestors,r))){const f=e.schema.ancestors[r];let h=-1;for(s=!1;++h<f.length;)e.stack.includes(f[h])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?i:void 0;const c={type:"element",tagName:r,properties:o,children:i};return es(c,n),c}function eI(e,n){const i={type:"root",children:yE(e,n.children)};return es(i,n),i}function tI(e,n){const i={type:"text",value:typeof n.value=="string"?n.value:""};return es(i,n),i}function yE(e,n){const r=[];if(Array.isArray(n)){const i=n;let o=-1;for(;++o<i.length;){const s=gE(e,i[o]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function nI(e,n){const r=e.stack[e.stack.length-1],i=e.schema.attributes,o=e.schema.required,s=i&&ma.call(i,r)?i[r]:void 0,c=i&&ma.call(i,"*")?i["*"]:void 0,f=n&&typeof n=="object"?n:{},h={};let d;for(d in f)if(ma.call(f,d)){const m=f[d];let y=c0(e,f0(s,d),d,m);y==null&&(y=c0(e,f0(c,d),d,m)),y!=null&&(h[d]=y)}if(o&&ma.call(o,r)){const m=o[r];for(d in m)ma.call(m,d)&&!ma.call(h,d)&&(h[d]=m[d])}return h}function c0(e,n,r,i){return n?Array.isArray(i)?rI(e,n,r,i):vE(e,n,r,i):void 0}function rI(e,n,r,i){let o=-1;const s=[];for(;++o<i.length;){const c=vE(e,n,r,i[o]);(typeof c=="number"||typeof c=="string")&&s.push(c)}return s}function vE(e,n,r,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&aI(e,r,i)){if(typeof n=="object"&&n.length>1){let o=!1,s=0;for(;++s<n.length;){const c=n[s];if(c&&typeof c=="object"&&"flags"in c){if(c.test(String(i))){o=!0;break}}else if(c===i){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+i:i}}function aI(e,n,r){const i=e.schema.protocols&&ma.call(e.schema.protocols,n)?e.schema.protocols[n]:void 0;if(!i||i.length===0)return!0;const o=String(r),s=o.indexOf(":"),c=o.indexOf("?"),f=o.indexOf("#"),h=o.indexOf("/");if(s<0||h>-1&&s>h||c>-1&&s>c||f>-1&&s>f)return!0;let d=-1;for(;++d<i.length;){const m=i[d];if(s===m.length&&o.slice(0,m.length)===m)return!0}return!1}function es(e,n){const r=bS(n);n.data&&(e.data=Do(n.data)),r&&(e.position=r)}function f0(e,n){let r,i=-1;if(e)for(;++i<e.length;){const o=e[i],s=typeof o=="string"?o:o[0];if(s===n)return o;s==="data*"&&(r=o)}if(n.length>4&&n.slice(0,4).toLowerCase()==="data")return r}function iI(e){return function(n){return Q6(n,e)}}const ts=x.forwardRef(({children:e,className:n,...r},i)=>g.jsx("div",{ref:i,className:fe("prose prose-sm max-w-none dark:prose-invert","prose-headings:font-semibold prose-headings:text-foreground","prose-h1:text-2xl prose-h1:mb-4 prose-h1:mt-6 first:prose-h1:mt-0","prose-h2:text-xl prose-h2:mb-3 prose-h2:mt-5","prose-h3:text-lg prose-h3:mb-2 prose-h3:mt-4","prose-p:text-sm prose-p:leading-relaxed prose-p:text-foreground prose-p:mb-4","prose-code:text-xs prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-foreground","prose-pre:bg-muted prose-pre:text-sm prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto","prose-blockquote:border-l-4 prose-blockquote:border-muted-foreground prose-blockquote:pl-4 prose-blockquote:italic prose-blockquote:text-muted-foreground","prose-ul:text-sm prose-ul:mb-4 prose-ul:list-disc prose-ul:pl-6","prose-ol:text-sm prose-ol:mb-4 prose-ol:list-decimal prose-ol:pl-6","prose-li:text-sm prose-li:leading-relaxed prose-li:text-foreground prose-li:mb-1 prose-li:marker:text-muted-foreground","prose-table:text-sm prose-table:border-collapse prose-table:w-full","prose-th:text-xs prose-th:font-semibold prose-th:text-muted-foreground prose-th:border prose-th:border-border prose-th:p-2 prose-th:bg-muted/50","prose-td:text-sm prose-td:border prose-td:border-border prose-td:p-2","prose-strong:text-foreground prose-strong:font-semibold","prose-em:text-foreground prose-em:italic","prose-hr:border-border prose-hr:my-6",n),...r,children:g.jsx(zP,{remarkPlugins:[X6],rehypePlugins:[iI],components:{input:({type:o,checked:s,...c})=>o==="checkbox"?g.jsx("input",{type:"checkbox",checked:s,disabled:!0,className:"mr-2 h-4 w-4 rounded border-2 border-muted-foreground bg-background accent-primary flex-shrink-0 mt-0.5",...c}):g.jsx("input",{type:o,...c}),li:({children:o,...s})=>x.Children.toArray(o).some(f=>x.isValidElement(f)&&f.props&&f.props.type==="checkbox")?g.jsx("li",{className:"flex items-start gap-1 list-none pl-0",...s,children:o}):g.jsx("li",{...s,children:o}),a:({href:o,children:s,...c})=>g.jsx("a",{href:o,className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...c,children:s}),img:({src:o,alt:s,...c})=>{let f=o;return o?.startsWith("../images/")&&(f=`/api/v1/context/images/${o.replace("../images/","")}`),g.jsx("img",{src:f,alt:s||"",className:"max-w-full h-auto rounded-lg",loading:"lazy",...c})}},children:e})}));ts.displayName="MarkdownViewer";var xE="AlertDialog",[lI,RB]=Xn(xE,[Z1]),Ir=Z1(),bE=e=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return g.jsx(Up,{...i,...r,modal:!0})};bE.displayName=xE;var oI="AlertDialogTrigger",wE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(hw,{...o,...i,ref:n})});wE.displayName=oI;var sI="AlertDialogPortal",SE=e=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return g.jsx(Hp,{...i,...r})};SE.displayName=sI;var uI="AlertDialogOverlay",EE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(qo,{...o,...i,ref:n})});EE.displayName=uI;var Zi="AlertDialogContent",[cI,fI]=lI(Zi),dI=G0("AlertDialogContent"),kE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,children:i,...o}=e,s=Ir(r),c=x.useRef(null),f=Xe(n,c),h=x.useRef(null);return g.jsx(fD,{contentName:Zi,titleName:CE,docsSlug:"alert-dialog",children:g.jsx(cI,{scope:r,cancelRef:h,children:g.jsxs(Vo,{role:"alertdialog",...s,...o,ref:f,onOpenAutoFocus:pe(o.onOpenAutoFocus,d=>{d.preventDefault(),h.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[g.jsx(dI,{children:i}),g.jsx(pI,{contentRef:c})]})})})});kE.displayName=Zi;var CE="AlertDialogTitle",AE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx($o,{...o,...i,ref:n})});AE.displayName=CE;var TE="AlertDialogDescription",RE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(Go,{...o,...i,ref:n})});RE.displayName=TE;var hI="AlertDialogAction",_E=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(yc,{...o,...i,ref:n})});_E.displayName=hI;var NE="AlertDialogCancel",ME=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,{cancelRef:o}=fI(NE,r),s=Ir(r),c=Xe(n,o);return g.jsx(yc,{...s,...i,ref:c})});ME.displayName=NE;var pI=({contentRef:e})=>{const n=`\`${Zi}\` requires a description for the component to be accessible for screen reader users.
|
|
403
|
+
`))}function h(w,k,C,T){const A=C.enter("tableCell"),_=C.enter("phrasing"),N=C.containerPhrasing(w,{...T,before:s,after:s});return _(),A(),N}function d(w,k){return C5(w,{align:k,alignDelimiters:i,padding:r,stringLength:o})}function m(w,k,C){const T=w.children;let A=-1;const _=[],N=k.enter("table");for(;++A<T.length;)_[A]=y(T[A],k,C);return N(),_}function y(w,k,C){const T=w.children;let A=-1;const _=[],N=k.enter("tableRow");for(;++A<T.length;)_[A]=h(T[A],w,k,C);return N(),_}function b(w,k,C){let T=oE.inlineCode(w,k,C);return C.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function d6(){return{exit:{taskListCheckValueChecked:o0,taskListCheckValueUnchecked:o0,paragraph:p6}}}function h6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:m6}}}function o0(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function p6(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const o=n.children;let s=-1,c;for(;++s<o.length;){const f=o[s];if(f.type==="paragraph"){c=f;break}}c===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function m6(e,n,r,i){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(i);s&&f.move(c);let h=oE.listItem(e,n,r,{...i,...f.current()});return s&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),h;function d(m){return m+c}}function g6(){return[KP(),m5(),x5(),i6(),d6()]}function y6(e){return{extensions:[XP(),g5(e),b5(),f6(e),h6()]}}const v6={tokenize:k6,partial:!0},sE={tokenize:C6,partial:!0},uE={tokenize:A6,partial:!0},cE={tokenize:T6,partial:!0},x6={tokenize:R6,partial:!0},fE={name:"wwwAutolink",tokenize:S6,previous:hE},dE={name:"protocolAutolink",tokenize:E6,previous:pE},Pr={name:"emailAutolink",tokenize:w6,previous:mE},hr={};function b6(){return{text:hr}}let Fa=48;for(;Fa<123;)hr[Fa]=Pr,Fa++,Fa===58?Fa=65:Fa===91&&(Fa=97);hr[43]=Pr;hr[45]=Pr;hr[46]=Pr;hr[95]=Pr;hr[72]=[Pr,dE];hr[104]=[Pr,dE];hr[87]=[Pr,fE];hr[119]=[Pr,fE];function w6(e,n,r){const i=this;let o,s;return c;function c(y){return!fp(y)||!mE.call(i,i.previous)||vm(i.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return fp(y)?(e.consume(y),f):y===64?(e.consume(y),h):r(y)}function h(y){return y===46?e.check(x6,m,d)(y):y===45||y===95||Vt(y)?(s=!0,e.consume(y),h):m(y)}function d(y){return e.consume(y),o=!0,h}function m(y){return s&&o&&Qt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):r(y)}}function S6(e,n,r){const i=this;return o;function o(c){return c!==87&&c!==119||!hE.call(i,i.previous)||vm(i.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(v6,e.attempt(sE,e.attempt(uE,s),r),r)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function E6(e,n,r){const i=this;let o="",s=!1;return c;function c(y){return(y===72||y===104)&&pE.call(i,i.previous)&&!vm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),e.consume(y),f):r(y)}function f(y){if(Qt(y)&&o.length<5)return o+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(y),h}return r(y)}function h(y){return y===47?(e.consume(y),s?d:(s=!0,h)):r(y)}function d(y){return y===null||Zu(y)||at(y)||Ka(y)||Tc(y)?r(y):e.attempt(sE,e.attempt(uE,m),r)(y)}function m(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function k6(e,n,r){let i=0;return o;function o(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),o):c===46&&i===3?(e.consume(c),s):r(c)}function s(c){return c===null?r(c):n(c)}}function C6(e,n,r){let i,o,s;return c;function c(d){return d===46||d===95?e.check(cE,h,f)(d):d===null||at(d)||Ka(d)||d!==45&&Tc(d)?h(d):(s=!0,e.consume(d),c)}function f(d){return d===95?i=!0:(o=i,i=void 0),e.consume(d),c}function h(d){return o||i||!s?r(d):n(d)}}function A6(e,n){let r=0,i=0;return o;function o(c){return c===40?(r++,e.consume(c),o):c===41&&i<r?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(cE,n,s)(c):c===null||at(c)||Ka(c)?n(c):(e.consume(c),o)}function s(c){return c===41&&i++,e.consume(c),o}}function T6(e,n,r){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),s):f===93?(e.consume(f),o):f===60||f===null||at(f)||Ka(f)?n(f):r(f)}function o(f){return f===null||f===40||f===91||at(f)||Ka(f)?n(f):i(f)}function s(f){return Qt(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),i):Qt(f)?(e.consume(f),c):r(f)}}function R6(e,n,r){return i;function i(s){return e.consume(s),o}function o(s){return Vt(s)?r(s):n(s)}}function hE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||at(e)}function pE(e){return!Qt(e)}function mE(e){return!(e===47||fp(e))}function fp(e){return e===43||e===45||e===46||e===95||Vt(e)}function vm(e){let n=e.length,r=!1;for(;n--;){const i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const _6={tokenize:P6,partial:!0};function N6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:O6,continuation:{tokenize:L6},exit:z6}},text:{91:{name:"gfmFootnoteCall",tokenize:D6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:M6,resolveTo:j6}}}}function M6(e,n,r){const i=this;let o=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;o--;){const h=i.events[o][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return r(h);const d=$n(i.sliceSerialize({start:c.end,end:i.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),n(h))}}function j6(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[r+1],e[r+2],["enter",i,n],e[r+3],e[r+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(r,e.length-r+1,...f),e}function D6(e,n,r){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),h}function h(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(y){if(s>999||y===93&&!c||y===null||y===91||at(y))return r(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes($n(i.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(y)}return at(y)||(c=!0),s++,e.consume(y),y===92?m:d}function m(y){return y===91||y===92||y===93?(e.consume(y),s++,d):d(y)}}function O6(e,n,r){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,c=0,f;return h;function h(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(k)}function m(k){if(c>999||k===93&&!f||k===null||k===91||at(k))return r(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=$n(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return at(k)||(f=!0),c++,e.consume(k),k===92?y:m}function y(k){return k===91||k===92||k===93?(e.consume(k),c++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(s)||o.push(s),Ve(e,w,"gfmFootnoteDefinitionWhitespace")):r(k)}function w(k){return n(k)}}function L6(e,n,r){return e.check(Wo,n,e.attempt(_6,n,r))}function z6(e){e.exit("gfmFootnoteDefinition")}function P6(e,n,r){const i=this;return Ve(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):r(s)}}function I6(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:o};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let d=h;for(;d--;)if(c[d][0]==="exit"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[d][1].end.offset-c[d][1].start.offset){c[h][1].type="strikethroughSequence",c[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[d][1].start),end:Object.assign({},c[h][1].end)},y={type:"strikethroughText",start:Object.assign({},c[d][1].end),end:Object.assign({},c[h][1].start)},b=[["enter",m,f],["enter",c[d][1],f],["exit",c[d][1],f],["enter",y,f]],w=f.parser.constructs.insideSpan.null;w&&xn(b,b.length,0,Rc(w,c.slice(d+1,h),f)),xn(b,b.length,0,[["exit",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",m,f]]),xn(c,d-1,h-d+3,b),h=d+b.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function s(c,f,h){const d=this.previous,m=this.events;let y=0;return b;function b(k){return d===126&&m[m.length-1][1].type!=="characterEscape"?h(k):(c.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const C=tl(d);if(k===126)return y>1?h(k):(c.consume(k),y++,w);if(y<2&&!r)return h(k);const T=c.exit("strikethroughSequenceTemporary"),A=tl(k);return T._open=!A||A===2&&!!C,T._close=!C||C===2&&!!A,f(k)}}}class B6{constructor(){this.map=[]}add(n,r,i){U6(this,n,r,i)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];i.push(n.slice()),n.length=0;let o=i.pop();for(;o;){for(const s of o)n.push(s);o=i.pop()}this.map.length=0}}function U6(e,n,r,i){let o=0;if(!(r===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=r,e.map[o][2].push(...i);return}o+=1}e.map.push([n,r,i])}}function H6(e,n){let r=!1;const i=[];for(;n<e.length;){const o=e[n];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return i}function F6(){return{flow:{null:{name:"table",tokenize:q6,resolveAll:V6}}}}function q6(e,n,r){const i=this;let o=0,s=0,c;return f;function f(P){let ne=i.events.length-1;for(;ne>-1;){const H=i.events[ne][1].type;if(H==="lineEnding"||H==="linePrefix")ne--;else break}const ae=ne>-1?i.events[ne][1].type:null,le=ae==="tableHead"||ae==="tableRow"?j:h;return le===j&&i.parser.lazy[i.now().line]?r(P):le(P)}function h(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(c=!0,s+=1),m(P)}function m(P){return P===null?r(P):Ce(P)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),w):r(P):He(P)?Ve(e,m,"whitespace")(P):(s+=1,c&&(c=!1,o+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),y(P)))}function y(P){return P===null||P===124||at(P)?(e.exit("data"),m(P)):(e.consume(P),P===92?b:y)}function b(P){return P===92||P===124?(e.consume(P),y):y(P)}function w(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(P):(e.enter("tableDelimiterRow"),c=!1,He(P)?Ve(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):k(P))}function k(P){return P===45||P===58?T(P):P===124?(c=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),C):z(P)}function C(P){return He(P)?Ve(e,T,"whitespace")(P):T(P)}function T(P){return P===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),A):P===45?(s+=1,A(P)):P===null||Ce(P)?O(P):z(P)}function A(P){return P===45?(e.enter("tableDelimiterFiller"),_(P)):z(P)}function _(P){return P===45?(e.consume(P),_):P===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(P))}function N(P){return He(P)?Ve(e,O,"whitespace")(P):O(P)}function O(P){return P===124?k(P):P===null||Ce(P)?!c||o!==s?z(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):z(P)}function z(P){return r(P)}function j(P){return e.enter("tableRow"),$(P)}function $(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),$):P===null||Ce(P)?(e.exit("tableRow"),n(P)):He(P)?Ve(e,$,"whitespace")(P):(e.enter("data"),G(P))}function G(P){return P===null||P===124||at(P)?(e.exit("data"),$(P)):(e.consume(P),P===92?ee:G)}function ee(P){return P===92||P===124?(e.consume(P),G):G(P)}}function V6(e,n){let r=-1,i=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,d,m,y;const b=new B6;for(;++r<e.length;){const w=e[r],k=w[1];w[0]==="enter"?k.type==="tableHead"?(f=!1,h!==0&&(s0(b,n,h,d,m),m=void 0,h=0),d={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(r,0,[["enter",d,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,y=void 0,s=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(r,0,[["enter",m,n]])),o=k.type==="tableDelimiterRow"?2:m?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],y=_u(b,n,s,o,void 0,y),s=[0,0,0,0]),c[2]=r)):k.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(c[0]=c[1],y=_u(b,n,s,o,void 0,y)),s=c,c=[s[1],r,0,0])):k.type==="tableHead"?(f=!0,h=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=r,s[1]!==0?(c[0]=c[1],y=_u(b,n,s,o,r,y)):c[1]!==0&&(y=_u(b,n,c,o,r,y)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=r)}for(h!==0&&s0(b,n,h,d,m),b.consume(n.events),r=-1;++r<n.events.length;){const w=n.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=H6(n.events,r))}return e}function _u(e,n,r,i,o,s){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(s.end=Object.assign({},Gi(n.events,r[0])),e.add(r[0],0,[["exit",s,n]]));const h=Gi(n.events,r[1]);if(s={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",s,n]]),r[2]!==0){const d=Gi(n.events,r[2]),m=Gi(n.events,r[3]),y={type:f,start:Object.assign({},d),end:Object.assign({},m)};if(e.add(r[2],0,[["enter",y,n]]),i!==2){const b=n.events[r[2]],w=n.events[r[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,C=r[3]-r[2]-1;e.add(k,C,[])}}e.add(r[3]+1,0,[["exit",y,n]])}return o!==void 0&&(s.end=Object.assign({},Gi(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function s0(e,n,r,i,o){const s=[],c=Gi(n.events,r);o&&(o.end=Object.assign({},c),s.push(["exit",o,n])),i.end=Object.assign({},c),s.push(["exit",i,n]),e.add(r+1,0,s)}function Gi(e,n){const r=e[n],i=r[0]==="enter"?"start":"end";return r[1][i]}const $6={name:"tasklistCheck",tokenize:Y6};function G6(){return{text:{91:$6}}}function Y6(e,n,r){const i=this;return o;function o(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),s)}function s(h){return at(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):r(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(h)}function f(h){return Ce(h)?n(h):He(h)?e.check({tokenize:K6},n,r)(h):r(h)}}function K6(e,n,r){return Ve(e,i,"whitespace");function i(o){return o===null?r(o):n(o)}}function X6(e){return AS([b6(),N6(),I6(e),F6(),G6()])}const Q6={};function Z6(e){const n=this,r=e||Q6,i=n.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(X6(r)),s.push(g6()),c.push(y6(r))}const qa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],u0={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...qa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...qa],h2:[["className","sr-only"]],img:[...qa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...qa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...qa],table:[...qa],ul:[...qa,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ma={}.hasOwnProperty;function W6(e,n){let r={type:"root",children:[]};const i={schema:n?{...u0,...n}:u0,stack:[]},o=gE(i,e);return o&&(Array.isArray(o)?o.length===1?r=o[0]:r.children=o:r=o),r}function gE(e,n){if(n&&typeof n=="object"){const r=n;switch(typeof r.type=="string"?r.type:""){case"comment":return J6(e,r);case"doctype":return e9(e,r);case"element":return t9(e,r);case"root":return n9(e,r);case"text":return r9(e,r)}}}function J6(e,n){if(e.schema.allowComments){const r=typeof n.value=="string"?n.value:"",i=r.indexOf("-->"),s={type:"comment",value:i<0?r:r.slice(0,i)};return es(s,n),s}}function e9(e,n){if(e.schema.allowDoctypes){const r={type:"doctype"};return es(r,n),r}}function t9(e,n){const r=typeof n.tagName=="string"?n.tagName:"";e.stack.push(r);const i=yE(e,n.children),o=a9(e,n.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&ma.call(e.schema.ancestors,r))){const f=e.schema.ancestors[r];let h=-1;for(s=!1;++h<f.length;)e.stack.includes(f[h])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?i:void 0;const c={type:"element",tagName:r,properties:o,children:i};return es(c,n),c}function n9(e,n){const i={type:"root",children:yE(e,n.children)};return es(i,n),i}function r9(e,n){const i={type:"text",value:typeof n.value=="string"?n.value:""};return es(i,n),i}function yE(e,n){const r=[];if(Array.isArray(n)){const i=n;let o=-1;for(;++o<i.length;){const s=gE(e,i[o]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function a9(e,n){const r=e.stack[e.stack.length-1],i=e.schema.attributes,o=e.schema.required,s=i&&ma.call(i,r)?i[r]:void 0,c=i&&ma.call(i,"*")?i["*"]:void 0,f=n&&typeof n=="object"?n:{},h={};let d;for(d in f)if(ma.call(f,d)){const m=f[d];let y=c0(e,f0(s,d),d,m);y==null&&(y=c0(e,f0(c,d),d,m)),y!=null&&(h[d]=y)}if(o&&ma.call(o,r)){const m=o[r];for(d in m)ma.call(m,d)&&!ma.call(h,d)&&(h[d]=m[d])}return h}function c0(e,n,r,i){return n?Array.isArray(i)?i9(e,n,r,i):vE(e,n,r,i):void 0}function i9(e,n,r,i){let o=-1;const s=[];for(;++o<i.length;){const c=vE(e,n,r,i[o]);(typeof c=="number"||typeof c=="string")&&s.push(c)}return s}function vE(e,n,r,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&l9(e,r,i)){if(typeof n=="object"&&n.length>1){let o=!1,s=0;for(;++s<n.length;){const c=n[s];if(c&&typeof c=="object"&&"flags"in c){if(c.test(String(i))){o=!0;break}}else if(c===i){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+i:i}}function l9(e,n,r){const i=e.schema.protocols&&ma.call(e.schema.protocols,n)?e.schema.protocols[n]:void 0;if(!i||i.length===0)return!0;const o=String(r),s=o.indexOf(":"),c=o.indexOf("?"),f=o.indexOf("#"),h=o.indexOf("/");if(s<0||h>-1&&s>h||c>-1&&s>c||f>-1&&s>f)return!0;let d=-1;for(;++d<i.length;){const m=i[d];if(s===m.length&&o.slice(0,m.length)===m)return!0}return!1}function es(e,n){const r=bS(n);n.data&&(e.data=Do(n.data)),r&&(e.position=r)}function f0(e,n){let r,i=-1;if(e)for(;++i<e.length;){const o=e[i],s=typeof o=="string"?o:o[0];if(s===n)return o;s==="data*"&&(r=o)}if(n.length>4&&n.slice(0,4).toLowerCase()==="data")return r}function o9(e){return function(n){return W6(n,e)}}const ts=x.forwardRef(({children:e,className:n,...r},i)=>g.jsx("div",{ref:i,className:fe("prose prose-sm max-w-none dark:prose-invert","prose-headings:font-semibold prose-headings:text-foreground","prose-h1:text-2xl prose-h1:mb-4 prose-h1:mt-6 first:prose-h1:mt-0","prose-h2:text-xl prose-h2:mb-3 prose-h2:mt-5","prose-h3:text-lg prose-h3:mb-2 prose-h3:mt-4","prose-p:text-sm prose-p:leading-relaxed prose-p:text-foreground prose-p:mb-4","prose-code:text-xs prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-foreground","prose-pre:bg-muted prose-pre:text-sm prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto","prose-blockquote:border-l-4 prose-blockquote:border-muted-foreground prose-blockquote:pl-4 prose-blockquote:italic prose-blockquote:text-muted-foreground","prose-ul:text-sm prose-ul:mb-4 prose-ul:list-disc prose-ul:pl-6","prose-ol:text-sm prose-ol:mb-4 prose-ol:list-decimal prose-ol:pl-6","prose-li:text-sm prose-li:leading-relaxed prose-li:text-foreground prose-li:mb-1 prose-li:marker:text-muted-foreground","prose-table:text-sm prose-table:border-collapse prose-table:w-full","prose-th:text-xs prose-th:font-semibold prose-th:text-muted-foreground prose-th:border prose-th:border-border prose-th:p-2 prose-th:bg-muted/50","prose-td:text-sm prose-td:border prose-td:border-border prose-td:p-2","prose-strong:text-foreground prose-strong:font-semibold","prose-em:text-foreground prose-em:italic","prose-hr:border-border prose-hr:my-6",n),...r,children:g.jsx(IP,{remarkPlugins:[Z6],rehypePlugins:[o9],components:{input:({type:o,checked:s,...c})=>o==="checkbox"?g.jsx("input",{type:"checkbox",checked:s,disabled:!0,className:"mr-2 h-4 w-4 rounded border-2 border-muted-foreground bg-background accent-primary flex-shrink-0 mt-0.5",...c}):g.jsx("input",{type:o,...c}),li:({children:o,...s})=>x.Children.toArray(o).some(f=>x.isValidElement(f)&&f.props&&f.props.type==="checkbox")?g.jsx("li",{className:"flex items-start gap-1 list-none pl-0",...s,children:o}):g.jsx("li",{...s,children:o}),a:({href:o,children:s,...c})=>g.jsx("a",{href:o,className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...c,children:s}),img:({src:o,alt:s,...c})=>{let f=o;return o?.startsWith("../images/")&&(f=`/api/v1/context/images/${o.replace("../images/","")}`),g.jsx("img",{src:f,alt:s||"",className:"max-w-full h-auto rounded-lg",loading:"lazy",...c})}},children:e})}));ts.displayName="MarkdownViewer";var xE="AlertDialog",[s9,MB]=Xn(xE,[Z1]),Ir=Z1(),bE=e=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return g.jsx(Up,{...i,...r,modal:!0})};bE.displayName=xE;var u9="AlertDialogTrigger",wE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(hw,{...o,...i,ref:n})});wE.displayName=u9;var c9="AlertDialogPortal",SE=e=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return g.jsx(Hp,{...i,...r})};SE.displayName=c9;var f9="AlertDialogOverlay",EE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(qo,{...o,...i,ref:n})});EE.displayName=f9;var Zi="AlertDialogContent",[d9,h9]=s9(Zi),p9=G0("AlertDialogContent"),kE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,children:i,...o}=e,s=Ir(r),c=x.useRef(null),f=Xe(n,c),h=x.useRef(null);return g.jsx(hD,{contentName:Zi,titleName:CE,docsSlug:"alert-dialog",children:g.jsx(d9,{scope:r,cancelRef:h,children:g.jsxs(Vo,{role:"alertdialog",...s,...o,ref:f,onOpenAutoFocus:pe(o.onOpenAutoFocus,d=>{d.preventDefault(),h.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[g.jsx(p9,{children:i}),g.jsx(g9,{contentRef:c})]})})})});kE.displayName=Zi;var CE="AlertDialogTitle",AE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx($o,{...o,...i,ref:n})});AE.displayName=CE;var TE="AlertDialogDescription",RE=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(Go,{...o,...i,ref:n})});RE.displayName=TE;var m9="AlertDialogAction",_E=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=Ir(r);return g.jsx(yc,{...o,...i,ref:n})});_E.displayName=m9;var NE="AlertDialogCancel",ME=x.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,{cancelRef:o}=h9(NE,r),s=Ir(r),c=Xe(n,o);return g.jsx(yc,{...s,...i,ref:c})});ME.displayName=NE;var g9=({contentRef:e})=>{const n=`\`${Zi}\` requires a description for the component to be accessible for screen reader users.
|
|
399
404
|
|
|
400
405
|
You can add a description to the \`${Zi}\` by passing a \`${TE}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
401
406
|
|
|
402
407
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Zi}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
403
408
|
|
|
404
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return x.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},mI=bE,gI=wE,yI=SE,jE=EE,DE=kE,OE=_E,LE=ME,zE=AE,PE=RE;const vI=mI,xI=gI,bI=yI,IE=x.forwardRef(({className:e,...n},r)=>g.jsx(jE,{className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));IE.displayName=jE.displayName;const BE=x.forwardRef(({className:e,...n},r)=>g.jsxs(bI,{children:[g.jsx(IE,{}),g.jsx(DE,{ref:r,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n})]}));BE.displayName=DE.displayName;const UE=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col space-y-2 text-center sm:text-left",e),...n});UE.displayName="AlertDialogHeader";const HE=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});HE.displayName="AlertDialogFooter";const FE=x.forwardRef(({className:e,...n},r)=>g.jsx(zE,{ref:r,className:fe("text-lg font-semibold",e),...n}));FE.displayName=zE.displayName;const qE=x.forwardRef(({className:e,...n},r)=>g.jsx(PE,{ref:r,className:fe("text-sm text-muted-foreground",e),...n}));qE.displayName=PE.displayName;const VE=x.forwardRef(({className:e,...n},r)=>g.jsx(OE,{ref:r,className:fe(Op(),e),...n}));VE.displayName=OE.displayName;const $E=x.forwardRef(({className:e,...n},r)=>g.jsx(LE,{ref:r,className:fe(Op({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));$E.displayName=LE.displayName;function wI(e){const n=x.useRef({value:e,previous:e});return x.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var jc="Checkbox",[SI,_B]=Xn(jc),[EI,xm]=SI(jc);function kI(e){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:o,disabled:s,form:c,name:f,onCheckedChange:h,required:d,value:m="on",internal_do_not_use_render:y}=e,[b,w]=ol({prop:r,defaultProp:o??!1,onChange:h,caller:jc}),[k,C]=x.useState(null),[T,A]=x.useState(null),_=x.useRef(!1),N=k?!!c||!!k.closest("form"):!0,O={checked:b,disabled:s,setChecked:w,control:k,setControl:C,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:_,required:d,defaultChecked:ga(o)?!1:o,isFormControl:N,bubbleInput:T,setBubbleInput:A};return g.jsx(EI,{scope:n,...O,children:CI(y)?y(O):i})}var GE="CheckboxTrigger",YE=x.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...i},o)=>{const{control:s,value:c,disabled:f,checked:h,required:d,setControl:m,setChecked:y,hasConsumerStoppedPropagationRef:b,isFormControl:w,bubbleInput:k}=xm(GE,e),C=Xe(o,m),T=x.useRef(h);return x.useEffect(()=>{const A=s?.form;if(A){const _=()=>y(T.current);return A.addEventListener("reset",_),()=>A.removeEventListener("reset",_)}},[s,y]),g.jsx(Fe.button,{type:"button",role:"checkbox","aria-checked":ga(h)?"mixed":h,"aria-required":d,"data-state":WE(h),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:C,onKeyDown:pe(n,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:pe(r,A=>{y(_=>ga(_)?!0:!_),k&&w&&(b.current=A.isPropagationStopped(),b.current||A.stopPropagation())})})});YE.displayName=GE;var bm=x.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:i,checked:o,defaultChecked:s,required:c,disabled:f,value:h,onCheckedChange:d,form:m,...y}=e;return g.jsx(kI,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:f,required:c,onCheckedChange:d,name:i,form:m,value:h,internal_do_not_use_render:({isFormControl:b})=>g.jsxs(g.Fragment,{children:[g.jsx(YE,{...y,ref:n,__scopeCheckbox:r}),b&&g.jsx(ZE,{__scopeCheckbox:r})]})})});bm.displayName=jc;var KE="CheckboxIndicator",XE=x.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:i,...o}=e,s=xm(KE,r);return g.jsx(Zt,{present:i||ga(s.checked)||s.checked===!0,children:g.jsx(Fe.span,{"data-state":WE(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:n,style:{pointerEvents:"none",...e.style}})})});XE.displayName=KE;var QE="CheckboxBubbleInput",ZE=x.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:f,disabled:h,name:d,value:m,form:y,bubbleInput:b,setBubbleInput:w}=xm(QE,e),k=Xe(r,w),C=wI(s),T=_w(i);x.useEffect(()=>{const _=b;if(!_)return;const N=window.HTMLInputElement.prototype,z=Object.getOwnPropertyDescriptor(N,"checked").set,j=!o.current;if(C!==s&&z){const $=new Event("click",{bubbles:j});_.indeterminate=ga(s),z.call(_,ga(s)?!1:s),_.dispatchEvent($)}},[b,C,s,o]);const A=x.useRef(ga(s)?!1:s);return g.jsx(Fe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??A.current,required:f,disabled:h,name:d,value:m,form:y,...n,tabIndex:-1,ref:k,style:{...n.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ZE.displayName=QE;function CI(e){return typeof e=="function"}function ga(e){return e==="indeterminate"}function WE(e){return ga(e)?"indeterminate":e?"checked":"unchecked"}const Hu=x.forwardRef(({className:e,...n},r)=>g.jsx(bm,{ref:r,className:fe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:g.jsx(XE,{className:fe("flex items-center justify-center text-current"),children:g.jsx(jp,{className:"h-4 w-4"})})}));Hu.displayName=bm.displayName;var AI=x.createContext(void 0);function wm(e){const n=x.useContext(AI);return e||n||"ltr"}function TI(e,[n,r]){return Math.min(r,Math.max(n,e))}function RI(e,n){return x.useReducer((r,i)=>n[r][i]??r,e)}var Sm="ScrollArea",[JE,NB]=Xn(Sm),[_I,zn]=JE(Sm),ek=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,type:i="hover",dir:o,scrollHideDelay:s=600,...c}=e,[f,h]=x.useState(null),[d,m]=x.useState(null),[y,b]=x.useState(null),[w,k]=x.useState(null),[C,T]=x.useState(null),[A,_]=x.useState(0),[N,O]=x.useState(0),[z,j]=x.useState(!1),[$,G]=x.useState(!1),ee=Xe(n,ne=>h(ne)),P=wm(o);return g.jsx(_I,{scope:r,type:i,dir:P,scrollHideDelay:s,scrollArea:f,viewport:d,onViewportChange:m,content:y,onContentChange:b,scrollbarX:w,onScrollbarXChange:k,scrollbarXEnabled:z,onScrollbarXEnabledChange:j,scrollbarY:C,onScrollbarYChange:T,scrollbarYEnabled:$,onScrollbarYEnabledChange:G,onCornerWidthChange:_,onCornerHeightChange:O,children:g.jsx(Fe.div,{dir:P,...c,ref:ee,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});ek.displayName=Sm;var tk="ScrollAreaViewport",nk=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,children:i,nonce:o,...s}=e,c=zn(tk,r),f=x.useRef(null),h=Xe(n,f,c.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(Fe.div,{"data-radix-scroll-area-viewport":"",...s,ref:h,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});nk.displayName=tk;var pr="ScrollAreaScrollbar",Em=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=zn(pr,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=o,f=e.orientation==="horizontal";return x.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),o.type==="hover"?g.jsx(NI,{...i,ref:n,forceMount:r}):o.type==="scroll"?g.jsx(MI,{...i,ref:n,forceMount:r}):o.type==="auto"?g.jsx(rk,{...i,ref:n,forceMount:r}):o.type==="always"?g.jsx(km,{...i,ref:n}):null});Em.displayName=pr;var NI=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=zn(pr,e.__scopeScrollArea),[s,c]=x.useState(!1);return x.useEffect(()=>{const f=o.scrollArea;let h=0;if(f){const d=()=>{window.clearTimeout(h),c(!0)},m=()=>{h=window.setTimeout(()=>c(!1),o.scrollHideDelay)};return f.addEventListener("pointerenter",d),f.addEventListener("pointerleave",m),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",d),f.removeEventListener("pointerleave",m)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(Zt,{present:r||s,children:g.jsx(rk,{"data-state":s?"visible":"hidden",...i,ref:n})})}),MI=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=zn(pr,e.__scopeScrollArea),s=e.orientation==="horizontal",c=Oc(()=>h("SCROLL_END"),100),[f,h]=RI("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(f==="idle"){const d=window.setTimeout(()=>h("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[f,o.scrollHideDelay,h]),x.useEffect(()=>{const d=o.viewport,m=s?"scrollLeft":"scrollTop";if(d){let y=d[m];const b=()=>{const w=d[m];y!==w&&(h("SCROLL"),c()),y=w};return d.addEventListener("scroll",b),()=>d.removeEventListener("scroll",b)}},[o.viewport,s,h,c]),g.jsx(Zt,{present:r||f!=="hidden",children:g.jsx(km,{"data-state":f==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:pe(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:pe(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),rk=x.forwardRef((e,n)=>{const r=zn(pr,e.__scopeScrollArea),{forceMount:i,...o}=e,[s,c]=x.useState(!1),f=e.orientation==="horizontal",h=Oc(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,m=r.viewport.offsetHeight<r.viewport.scrollHeight;c(f?d:m)}},10);return nl(r.viewport,h),nl(r.content,h),g.jsx(Zt,{present:i||s,children:g.jsx(km,{"data-state":s?"visible":"hidden",...o,ref:n})})}),km=x.forwardRef((e,n)=>{const{orientation:r="vertical",...i}=e,o=zn(pr,e.__scopeScrollArea),s=x.useRef(null),c=x.useRef(0),[f,h]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=sk(f.viewport,f.content),m={...i,sizes:f,onSizesChange:h,hasThumb:d>0&&d<1,onThumbChange:b=>s.current=b,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:b=>c.current=b};function y(b,w){return PI(b,c.current,f,w)}return r==="horizontal"?g.jsx(jI,{...m,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){const b=o.viewport.scrollLeft,w=d0(b,f,o.dir);s.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{o.viewport&&(o.viewport.scrollLeft=b)},onDragScroll:b=>{o.viewport&&(o.viewport.scrollLeft=y(b,o.dir))}}):r==="vertical"?g.jsx(DI,{...m,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){const b=o.viewport.scrollTop,w=d0(b,f);s.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{o.viewport&&(o.viewport.scrollTop=b)},onDragScroll:b=>{o.viewport&&(o.viewport.scrollTop=y(b))}}):null}),jI=x.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...o}=e,s=zn(pr,e.__scopeScrollArea),[c,f]=x.useState(),h=x.useRef(null),d=Xe(n,h,s.onScrollbarXChange);return x.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),g.jsx(ik,{"data-orientation":"horizontal",...o,ref:d,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Dc(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,y)=>{if(s.viewport){const b=s.viewport.scrollLeft+m.deltaX;e.onWheelScroll(b),ck(b,y)&&m.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:tc(c.paddingLeft),paddingEnd:tc(c.paddingRight)}})}})}),DI=x.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...o}=e,s=zn(pr,e.__scopeScrollArea),[c,f]=x.useState(),h=x.useRef(null),d=Xe(n,h,s.onScrollbarYChange);return x.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),g.jsx(ik,{"data-orientation":"vertical",...o,ref:d,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Dc(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,y)=>{if(s.viewport){const b=s.viewport.scrollTop+m.deltaY;e.onWheelScroll(b),ck(b,y)&&m.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:tc(c.paddingTop),paddingEnd:tc(c.paddingBottom)}})}})}),[OI,ak]=JE(pr),ik=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,sizes:i,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:d,onWheelScroll:m,onResize:y,...b}=e,w=zn(pr,r),[k,C]=x.useState(null),T=Xe(n,ee=>C(ee)),A=x.useRef(null),_=x.useRef(""),N=w.viewport,O=i.content-i.viewport,z=kt(m),j=kt(h),$=Oc(y,10);function G(ee){if(A.current){const P=ee.clientX-A.current.left,ne=ee.clientY-A.current.top;d({x:P,y:ne})}}return x.useEffect(()=>{const ee=P=>{const ne=P.target;k?.contains(ne)&&z(P,O)};return document.addEventListener("wheel",ee,{passive:!1}),()=>document.removeEventListener("wheel",ee,{passive:!1})},[N,k,O,z]),x.useEffect(j,[i,j]),nl(k,$),nl(w.content,$),g.jsx(OI,{scope:r,scrollbar:k,hasThumb:o,onThumbChange:kt(s),onThumbPointerUp:kt(c),onThumbPositionChange:j,onThumbPointerDown:kt(f),children:g.jsx(Fe.div,{...b,ref:T,style:{position:"absolute",...b.style},onPointerDown:pe(e.onPointerDown,ee=>{ee.button===0&&(ee.target.setPointerCapture(ee.pointerId),A.current=k.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),G(ee))}),onPointerMove:pe(e.onPointerMove,G),onPointerUp:pe(e.onPointerUp,ee=>{const P=ee.target;P.hasPointerCapture(ee.pointerId)&&P.releasePointerCapture(ee.pointerId),document.body.style.webkitUserSelect=_.current,w.viewport&&(w.viewport.style.scrollBehavior=""),A.current=null})})})}),ec="ScrollAreaThumb",lk=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=ak(ec,e.__scopeScrollArea);return g.jsx(Zt,{present:r||o.hasThumb,children:g.jsx(LI,{ref:n,...i})})}),LI=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,style:i,...o}=e,s=zn(ec,r),c=ak(ec,r),{onThumbPositionChange:f}=c,h=Xe(n,y=>c.onThumbChange(y)),d=x.useRef(void 0),m=Oc(()=>{d.current&&(d.current(),d.current=void 0)},100);return x.useEffect(()=>{const y=s.viewport;if(y){const b=()=>{if(m(),!d.current){const w=II(y,f);d.current=w,f()}};return f(),y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[s.viewport,m,f]),g.jsx(Fe.div,{"data-state":c.hasThumb?"visible":"hidden",...o,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:pe(e.onPointerDownCapture,y=>{const w=y.target.getBoundingClientRect(),k=y.clientX-w.left,C=y.clientY-w.top;c.onThumbPointerDown({x:k,y:C})}),onPointerUp:pe(e.onPointerUp,c.onThumbPointerUp)})});lk.displayName=ec;var Cm="ScrollAreaCorner",ok=x.forwardRef((e,n)=>{const r=zn(Cm,e.__scopeScrollArea),i=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&i?g.jsx(zI,{...e,ref:n}):null});ok.displayName=Cm;var zI=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,...i}=e,o=zn(Cm,r),[s,c]=x.useState(0),[f,h]=x.useState(0),d=!!(s&&f);return nl(o.scrollbarX,()=>{const m=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(m),h(m)}),nl(o.scrollbarY,()=>{const m=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(m),c(m)}),d?g.jsx(Fe.div,{...i,ref:n,style:{width:s,height:f,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function tc(e){return e?parseInt(e,10):0}function sk(e,n){const r=e/n;return isNaN(r)?0:r}function Dc(e){const n=sk(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-r)*n;return Math.max(i,18)}function PI(e,n,r,i="ltr"){const o=Dc(r),s=o/2,c=n||s,f=o-c,h=r.scrollbar.paddingStart+c,d=r.scrollbar.size-r.scrollbar.paddingEnd-f,m=r.content-r.viewport,y=i==="ltr"?[0,m]:[m*-1,0];return uk([h,d],y)(e)}function d0(e,n,r="ltr"){const i=Dc(n),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=n.scrollbar.size-o,c=n.content-n.viewport,f=s-i,h=r==="ltr"?[0,c]:[c*-1,0],d=TI(e,h);return uk([0,c],[0,f])(d)}function uk(e,n){return r=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(r-e[0])}}function ck(e,n){return e>0&&e<n}var II=(e,n=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},i=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},c=r.left!==s.left,f=r.top!==s.top;(c||f)&&n(),r=s,i=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(i)};function Oc(e,n){const r=kt(e),i=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),x.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,n)},[r,n])}function nl(e,n){const r=kt(n);cr(()=>{let i=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(i),o.unobserve(e)}}},[e,r])}var fk=ek,BI=nk,UI=ok;const Lo=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(fk,{ref:i,className:fe("relative overflow-hidden",e),...r,children:[g.jsx(BI,{className:"h-full w-full rounded-[inherit]",children:n}),g.jsx(dk,{}),g.jsx(UI,{})]}));Lo.displayName=fk.displayName;const dk=x.forwardRef(({className:e,orientation:n="vertical",...r},i)=>g.jsx(Em,{ref:i,orientation:n,className:fe("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:g.jsx(lk,{className:"relative flex-1 rounded-full bg-border"})}));dk.displayName=Em.displayName;async function hk(){const n=[...[{id:"project-md",name:"project.md",path:".nut/context/project.md",relativePath:"context/project.md",type:"context",content:"Loading..."},{id:"architecture-md",name:"architecture.md",path:".nut/context/architecture.md",relativePath:"context/architecture.md",type:"context",content:"Loading..."},{id:"role-md",name:"role.md",path:".nut/context/role.md",relativePath:"context/role.md",type:"context",content:"Loading..."}]];try{const r=await fetch(`${xt}/api/v1/knowledge`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.documents)){const o=i.documents.filter(s=>typeof s?.filename=="string").map(s=>({id:`knowledge-${s.filename.replace(".md","")}`,name:s.filename,path:`.nut/knowledge/${s.filename}`,relativePath:`knowledge/${s.filename}`,type:"knowledge",content:"Loading..."}));n.push(...o)}}}catch(r){console.error("Error fetching knowledge documents:",r)}try{const r=await fetch(`${xt}/api/v1/tasks`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.data)){const o=i.data.filter(s=>typeof s?.id=="string"&&(typeof s.title=="string"||typeof s.intent=="string")).map(s=>({id:`task-${s.id}`,name:`${s.id}: ${s.title||s.intent}`,path:`.nut/tasks/${s.id}.md`,relativePath:`tasks/${s.id}.md`,type:"task",content:"Loading..."}));n.push(...o)}}}catch(r){console.error("Error fetching tasks:",r)}return n}async function dp(e){if(e.content&&e.content!=="Loading...")return e;try{let n=null;if(e.name==="project.md"?n="/api/v1/context/project":e.name==="architecture.md"?n="/api/v1/context/architecture":e.name==="role.md"?n="/api/v1/context/role":e.type==="knowledge"?n=`/api/v1/knowledge/${e.path?.split("/").pop()?.replace(".md","")||e.relativePath?.split("/").pop()?.replace(".md","")||e.name.replace(".md","")}`:e.type==="task"&&(n=`/api/v1/tasks/${e.id.replace("task-","")}`),n){const r=await fetch(`${xt}${n}`);if(r.ok)if(e.type==="task"){const o=(await r.json()).data;if(o&&(typeof o.title=="string"||typeof o.intent=="string"))return{...e,content:`# ${o.title||o.intent}
|
|
409
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return x.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},y9=bE,v9=wE,x9=SE,jE=EE,DE=kE,OE=_E,LE=ME,zE=AE,PE=RE;const b9=y9,w9=v9,S9=x9,IE=x.forwardRef(({className:e,...n},r)=>g.jsx(jE,{className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));IE.displayName=jE.displayName;const BE=x.forwardRef(({className:e,...n},r)=>g.jsxs(S9,{children:[g.jsx(IE,{}),g.jsx(DE,{ref:r,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n})]}));BE.displayName=DE.displayName;const UE=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col space-y-2 text-center sm:text-left",e),...n});UE.displayName="AlertDialogHeader";const HE=({className:e,...n})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});HE.displayName="AlertDialogFooter";const FE=x.forwardRef(({className:e,...n},r)=>g.jsx(zE,{ref:r,className:fe("text-lg font-semibold",e),...n}));FE.displayName=zE.displayName;const qE=x.forwardRef(({className:e,...n},r)=>g.jsx(PE,{ref:r,className:fe("text-sm text-muted-foreground",e),...n}));qE.displayName=PE.displayName;const VE=x.forwardRef(({className:e,...n},r)=>g.jsx(OE,{ref:r,className:fe(Op(),e),...n}));VE.displayName=OE.displayName;const $E=x.forwardRef(({className:e,...n},r)=>g.jsx(LE,{ref:r,className:fe(Op({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));$E.displayName=LE.displayName;function E9(e){const n=x.useRef({value:e,previous:e});return x.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var jc="Checkbox",[k9,jB]=Xn(jc),[C9,xm]=k9(jc);function A9(e){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:o,disabled:s,form:c,name:f,onCheckedChange:h,required:d,value:m="on",internal_do_not_use_render:y}=e,[b,w]=ol({prop:r,defaultProp:o??!1,onChange:h,caller:jc}),[k,C]=x.useState(null),[T,A]=x.useState(null),_=x.useRef(!1),N=k?!!c||!!k.closest("form"):!0,O={checked:b,disabled:s,setChecked:w,control:k,setControl:C,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:_,required:d,defaultChecked:ga(o)?!1:o,isFormControl:N,bubbleInput:T,setBubbleInput:A};return g.jsx(C9,{scope:n,...O,children:T9(y)?y(O):i})}var GE="CheckboxTrigger",YE=x.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...i},o)=>{const{control:s,value:c,disabled:f,checked:h,required:d,setControl:m,setChecked:y,hasConsumerStoppedPropagationRef:b,isFormControl:w,bubbleInput:k}=xm(GE,e),C=Xe(o,m),T=x.useRef(h);return x.useEffect(()=>{const A=s?.form;if(A){const _=()=>y(T.current);return A.addEventListener("reset",_),()=>A.removeEventListener("reset",_)}},[s,y]),g.jsx(Fe.button,{type:"button",role:"checkbox","aria-checked":ga(h)?"mixed":h,"aria-required":d,"data-state":WE(h),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:C,onKeyDown:pe(n,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:pe(r,A=>{y(_=>ga(_)?!0:!_),k&&w&&(b.current=A.isPropagationStopped(),b.current||A.stopPropagation())})})});YE.displayName=GE;var bm=x.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:i,checked:o,defaultChecked:s,required:c,disabled:f,value:h,onCheckedChange:d,form:m,...y}=e;return g.jsx(A9,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:f,required:c,onCheckedChange:d,name:i,form:m,value:h,internal_do_not_use_render:({isFormControl:b})=>g.jsxs(g.Fragment,{children:[g.jsx(YE,{...y,ref:n,__scopeCheckbox:r}),b&&g.jsx(ZE,{__scopeCheckbox:r})]})})});bm.displayName=jc;var KE="CheckboxIndicator",XE=x.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:i,...o}=e,s=xm(KE,r);return g.jsx(Zt,{present:i||ga(s.checked)||s.checked===!0,children:g.jsx(Fe.span,{"data-state":WE(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:n,style:{pointerEvents:"none",...e.style}})})});XE.displayName=KE;var QE="CheckboxBubbleInput",ZE=x.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:f,disabled:h,name:d,value:m,form:y,bubbleInput:b,setBubbleInput:w}=xm(QE,e),k=Xe(r,w),C=E9(s),T=_w(i);x.useEffect(()=>{const _=b;if(!_)return;const N=window.HTMLInputElement.prototype,z=Object.getOwnPropertyDescriptor(N,"checked").set,j=!o.current;if(C!==s&&z){const $=new Event("click",{bubbles:j});_.indeterminate=ga(s),z.call(_,ga(s)?!1:s),_.dispatchEvent($)}},[b,C,s,o]);const A=x.useRef(ga(s)?!1:s);return g.jsx(Fe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??A.current,required:f,disabled:h,name:d,value:m,form:y,...n,tabIndex:-1,ref:k,style:{...n.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ZE.displayName=QE;function T9(e){return typeof e=="function"}function ga(e){return e==="indeterminate"}function WE(e){return ga(e)?"indeterminate":e?"checked":"unchecked"}const Hu=x.forwardRef(({className:e,...n},r)=>g.jsx(bm,{ref:r,className:fe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:g.jsx(XE,{className:fe("flex items-center justify-center text-current"),children:g.jsx(jp,{className:"h-4 w-4"})})}));Hu.displayName=bm.displayName;var R9=x.createContext(void 0);function wm(e){const n=x.useContext(R9);return e||n||"ltr"}function _9(e,[n,r]){return Math.min(r,Math.max(n,e))}function N9(e,n){return x.useReducer((r,i)=>n[r][i]??r,e)}var Sm="ScrollArea",[JE,DB]=Xn(Sm),[M9,zn]=JE(Sm),ek=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,type:i="hover",dir:o,scrollHideDelay:s=600,...c}=e,[f,h]=x.useState(null),[d,m]=x.useState(null),[y,b]=x.useState(null),[w,k]=x.useState(null),[C,T]=x.useState(null),[A,_]=x.useState(0),[N,O]=x.useState(0),[z,j]=x.useState(!1),[$,G]=x.useState(!1),ee=Xe(n,ne=>h(ne)),P=wm(o);return g.jsx(M9,{scope:r,type:i,dir:P,scrollHideDelay:s,scrollArea:f,viewport:d,onViewportChange:m,content:y,onContentChange:b,scrollbarX:w,onScrollbarXChange:k,scrollbarXEnabled:z,onScrollbarXEnabledChange:j,scrollbarY:C,onScrollbarYChange:T,scrollbarYEnabled:$,onScrollbarYEnabledChange:G,onCornerWidthChange:_,onCornerHeightChange:O,children:g.jsx(Fe.div,{dir:P,...c,ref:ee,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});ek.displayName=Sm;var tk="ScrollAreaViewport",nk=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,children:i,nonce:o,...s}=e,c=zn(tk,r),f=x.useRef(null),h=Xe(n,f,c.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(Fe.div,{"data-radix-scroll-area-viewport":"",...s,ref:h,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});nk.displayName=tk;var pr="ScrollAreaScrollbar",Em=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=zn(pr,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=o,f=e.orientation==="horizontal";return x.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),o.type==="hover"?g.jsx(j9,{...i,ref:n,forceMount:r}):o.type==="scroll"?g.jsx(D9,{...i,ref:n,forceMount:r}):o.type==="auto"?g.jsx(rk,{...i,ref:n,forceMount:r}):o.type==="always"?g.jsx(km,{...i,ref:n}):null});Em.displayName=pr;var j9=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=zn(pr,e.__scopeScrollArea),[s,c]=x.useState(!1);return x.useEffect(()=>{const f=o.scrollArea;let h=0;if(f){const d=()=>{window.clearTimeout(h),c(!0)},m=()=>{h=window.setTimeout(()=>c(!1),o.scrollHideDelay)};return f.addEventListener("pointerenter",d),f.addEventListener("pointerleave",m),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",d),f.removeEventListener("pointerleave",m)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(Zt,{present:r||s,children:g.jsx(rk,{"data-state":s?"visible":"hidden",...i,ref:n})})}),D9=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=zn(pr,e.__scopeScrollArea),s=e.orientation==="horizontal",c=Oc(()=>h("SCROLL_END"),100),[f,h]=N9("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(f==="idle"){const d=window.setTimeout(()=>h("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[f,o.scrollHideDelay,h]),x.useEffect(()=>{const d=o.viewport,m=s?"scrollLeft":"scrollTop";if(d){let y=d[m];const b=()=>{const w=d[m];y!==w&&(h("SCROLL"),c()),y=w};return d.addEventListener("scroll",b),()=>d.removeEventListener("scroll",b)}},[o.viewport,s,h,c]),g.jsx(Zt,{present:r||f!=="hidden",children:g.jsx(km,{"data-state":f==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:pe(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:pe(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),rk=x.forwardRef((e,n)=>{const r=zn(pr,e.__scopeScrollArea),{forceMount:i,...o}=e,[s,c]=x.useState(!1),f=e.orientation==="horizontal",h=Oc(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,m=r.viewport.offsetHeight<r.viewport.scrollHeight;c(f?d:m)}},10);return nl(r.viewport,h),nl(r.content,h),g.jsx(Zt,{present:i||s,children:g.jsx(km,{"data-state":s?"visible":"hidden",...o,ref:n})})}),km=x.forwardRef((e,n)=>{const{orientation:r="vertical",...i}=e,o=zn(pr,e.__scopeScrollArea),s=x.useRef(null),c=x.useRef(0),[f,h]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=sk(f.viewport,f.content),m={...i,sizes:f,onSizesChange:h,hasThumb:d>0&&d<1,onThumbChange:b=>s.current=b,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:b=>c.current=b};function y(b,w){return B9(b,c.current,f,w)}return r==="horizontal"?g.jsx(O9,{...m,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){const b=o.viewport.scrollLeft,w=d0(b,f,o.dir);s.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{o.viewport&&(o.viewport.scrollLeft=b)},onDragScroll:b=>{o.viewport&&(o.viewport.scrollLeft=y(b,o.dir))}}):r==="vertical"?g.jsx(L9,{...m,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){const b=o.viewport.scrollTop,w=d0(b,f);s.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{o.viewport&&(o.viewport.scrollTop=b)},onDragScroll:b=>{o.viewport&&(o.viewport.scrollTop=y(b))}}):null}),O9=x.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...o}=e,s=zn(pr,e.__scopeScrollArea),[c,f]=x.useState(),h=x.useRef(null),d=Xe(n,h,s.onScrollbarXChange);return x.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),g.jsx(ik,{"data-orientation":"horizontal",...o,ref:d,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Dc(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,y)=>{if(s.viewport){const b=s.viewport.scrollLeft+m.deltaX;e.onWheelScroll(b),ck(b,y)&&m.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:tc(c.paddingLeft),paddingEnd:tc(c.paddingRight)}})}})}),L9=x.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...o}=e,s=zn(pr,e.__scopeScrollArea),[c,f]=x.useState(),h=x.useRef(null),d=Xe(n,h,s.onScrollbarYChange);return x.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),g.jsx(ik,{"data-orientation":"vertical",...o,ref:d,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Dc(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,y)=>{if(s.viewport){const b=s.viewport.scrollTop+m.deltaY;e.onWheelScroll(b),ck(b,y)&&m.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:tc(c.paddingTop),paddingEnd:tc(c.paddingBottom)}})}})}),[z9,ak]=JE(pr),ik=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,sizes:i,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:d,onWheelScroll:m,onResize:y,...b}=e,w=zn(pr,r),[k,C]=x.useState(null),T=Xe(n,ee=>C(ee)),A=x.useRef(null),_=x.useRef(""),N=w.viewport,O=i.content-i.viewport,z=kt(m),j=kt(h),$=Oc(y,10);function G(ee){if(A.current){const P=ee.clientX-A.current.left,ne=ee.clientY-A.current.top;d({x:P,y:ne})}}return x.useEffect(()=>{const ee=P=>{const ne=P.target;k?.contains(ne)&&z(P,O)};return document.addEventListener("wheel",ee,{passive:!1}),()=>document.removeEventListener("wheel",ee,{passive:!1})},[N,k,O,z]),x.useEffect(j,[i,j]),nl(k,$),nl(w.content,$),g.jsx(z9,{scope:r,scrollbar:k,hasThumb:o,onThumbChange:kt(s),onThumbPointerUp:kt(c),onThumbPositionChange:j,onThumbPointerDown:kt(f),children:g.jsx(Fe.div,{...b,ref:T,style:{position:"absolute",...b.style},onPointerDown:pe(e.onPointerDown,ee=>{ee.button===0&&(ee.target.setPointerCapture(ee.pointerId),A.current=k.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),G(ee))}),onPointerMove:pe(e.onPointerMove,G),onPointerUp:pe(e.onPointerUp,ee=>{const P=ee.target;P.hasPointerCapture(ee.pointerId)&&P.releasePointerCapture(ee.pointerId),document.body.style.webkitUserSelect=_.current,w.viewport&&(w.viewport.style.scrollBehavior=""),A.current=null})})})}),ec="ScrollAreaThumb",lk=x.forwardRef((e,n)=>{const{forceMount:r,...i}=e,o=ak(ec,e.__scopeScrollArea);return g.jsx(Zt,{present:r||o.hasThumb,children:g.jsx(P9,{ref:n,...i})})}),P9=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,style:i,...o}=e,s=zn(ec,r),c=ak(ec,r),{onThumbPositionChange:f}=c,h=Xe(n,y=>c.onThumbChange(y)),d=x.useRef(void 0),m=Oc(()=>{d.current&&(d.current(),d.current=void 0)},100);return x.useEffect(()=>{const y=s.viewport;if(y){const b=()=>{if(m(),!d.current){const w=U9(y,f);d.current=w,f()}};return f(),y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[s.viewport,m,f]),g.jsx(Fe.div,{"data-state":c.hasThumb?"visible":"hidden",...o,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:pe(e.onPointerDownCapture,y=>{const w=y.target.getBoundingClientRect(),k=y.clientX-w.left,C=y.clientY-w.top;c.onThumbPointerDown({x:k,y:C})}),onPointerUp:pe(e.onPointerUp,c.onThumbPointerUp)})});lk.displayName=ec;var Cm="ScrollAreaCorner",ok=x.forwardRef((e,n)=>{const r=zn(Cm,e.__scopeScrollArea),i=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&i?g.jsx(I9,{...e,ref:n}):null});ok.displayName=Cm;var I9=x.forwardRef((e,n)=>{const{__scopeScrollArea:r,...i}=e,o=zn(Cm,r),[s,c]=x.useState(0),[f,h]=x.useState(0),d=!!(s&&f);return nl(o.scrollbarX,()=>{const m=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(m),h(m)}),nl(o.scrollbarY,()=>{const m=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(m),c(m)}),d?g.jsx(Fe.div,{...i,ref:n,style:{width:s,height:f,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function tc(e){return e?parseInt(e,10):0}function sk(e,n){const r=e/n;return isNaN(r)?0:r}function Dc(e){const n=sk(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-r)*n;return Math.max(i,18)}function B9(e,n,r,i="ltr"){const o=Dc(r),s=o/2,c=n||s,f=o-c,h=r.scrollbar.paddingStart+c,d=r.scrollbar.size-r.scrollbar.paddingEnd-f,m=r.content-r.viewport,y=i==="ltr"?[0,m]:[m*-1,0];return uk([h,d],y)(e)}function d0(e,n,r="ltr"){const i=Dc(n),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=n.scrollbar.size-o,c=n.content-n.viewport,f=s-i,h=r==="ltr"?[0,c]:[c*-1,0],d=_9(e,h);return uk([0,c],[0,f])(d)}function uk(e,n){return r=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(r-e[0])}}function ck(e,n){return e>0&&e<n}var U9=(e,n=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},i=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},c=r.left!==s.left,f=r.top!==s.top;(c||f)&&n(),r=s,i=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(i)};function Oc(e,n){const r=kt(e),i=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),x.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,n)},[r,n])}function nl(e,n){const r=kt(n);cr(()=>{let i=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(i),o.unobserve(e)}}},[e,r])}var fk=ek,H9=nk,F9=ok;const Lo=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(fk,{ref:i,className:fe("relative overflow-hidden",e),...r,children:[g.jsx(H9,{className:"h-full w-full rounded-[inherit]",children:n}),g.jsx(dk,{}),g.jsx(F9,{})]}));Lo.displayName=fk.displayName;const dk=x.forwardRef(({className:e,orientation:n="vertical",...r},i)=>g.jsx(Em,{ref:i,orientation:n,className:fe("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:g.jsx(lk,{className:"relative flex-1 rounded-full bg-border"})}));dk.displayName=Em.displayName;async function hk(){const n=[...[{id:"project-md",name:"project.md",path:".nut/context/project.md",relativePath:"context/project.md",type:"context",content:"Loading..."},{id:"architecture-md",name:"architecture.md",path:".nut/context/architecture.md",relativePath:"context/architecture.md",type:"context",content:"Loading..."},{id:"role-md",name:"role.md",path:".nut/context/role.md",relativePath:"context/role.md",type:"context",content:"Loading..."}]];try{const r=await fetch(`${xt}/api/v1/knowledge`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.documents)){const o=i.documents.filter(s=>typeof s?.filename=="string").map(s=>({id:`knowledge-${s.filename.replace(".md","")}`,name:s.filename,path:`.nut/knowledge/${s.filename}`,relativePath:`knowledge/${s.filename}`,type:"knowledge",content:"Loading..."}));n.push(...o)}}}catch(r){console.error("Error fetching knowledge documents:",r)}try{const r=await fetch(`${xt}/api/v1/tasks`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.data)){const o=i.data.filter(s=>typeof s?.id=="string"&&(typeof s.title=="string"||typeof s.intent=="string")).map(s=>({id:`task-${s.id}`,name:`${s.id}: ${s.title||s.intent}`,path:`.nut/tasks/${s.id}.md`,relativePath:`tasks/${s.id}.md`,type:"task",content:"Loading..."}));n.push(...o)}}}catch(r){console.error("Error fetching tasks:",r)}return n}async function dp(e){if(e.content&&e.content!=="Loading...")return e;try{let n=null;if(e.name==="project.md"?n="/api/v1/context/project":e.name==="architecture.md"?n="/api/v1/context/architecture":e.name==="role.md"?n="/api/v1/context/role":e.type==="knowledge"?n=`/api/v1/knowledge/${e.path?.split("/").pop()?.replace(".md","")||e.relativePath?.split("/").pop()?.replace(".md","")||e.name.replace(".md","")}`:e.type==="task"&&(n=`/api/v1/tasks/${e.id.replace("task-","")}`),n){const r=await fetch(`${xt}${n}`);if(r.ok)if(e.type==="task"){const o=(await r.json()).data;if(o&&(typeof o.title=="string"||typeof o.intent=="string"))return{...e,content:`# ${o.title||o.intent}
|
|
405
410
|
|
|
406
411
|
${o.content||"No content available"}`}}else{const o=(await r.json()).document?.content;return{...e,content:typeof o=="string"&&o.length>0?o:"Content not available"}}}}catch(n){console.error(`Error loading content for ${e.name}:`,n)}return{...e,content:e.content??"Content could not be loaded."}}function h0({open:e,onOpenChange:n,onSelectionConfirm:r,initialSelection:i=[]}){const[o,s]=x.useState([]),[c,f]=x.useState(i),[h,d]=x.useState(null),[m,y]=x.useState(!1);x.useEffect(()=>{e&&(b(),f(i))},[e,i]);const b=async()=>{y(!0);try{const N=await hk();s(N)}catch(N){console.error("Error loading context files:",N)}finally{y(!1)}},w=async N=>{if(N.content&&N.content!=="Loading...")return N;try{return await dp(N)}catch(O){console.error("Error loading file content via API:",O)}try{let O="Content could not be loaded.";return N.name==="project.md"?O=`# Coconut - Project Context
|
|
407
412
|
|
|
@@ -446,11 +451,11 @@ project-root/
|
|
|
446
451
|
│ ├── context/ # Project context
|
|
447
452
|
│ └── knowledge/ # Team knowledge
|
|
448
453
|
└── your-actual-code/ # Your project files
|
|
449
|
-
\`\`\``),{...N,content:O}}catch(O){return console.error("Fallback content generation failed:",O),{...N,content:"Error loading content"}}},k=async N=>{const O=await w(N);d(O)},C=(N,O)=>{f(z=>O?[...z,N]:z.filter(j=>j!==N))},T=()=>{const N=o.filter(O=>c.includes(O.id));r({files:N,selectedIds:c}),n(!1)},A=N=>{switch(N){case"context":case"knowledge":return g.jsx(Vu,{className:"h-4 w-4"});case"agent":return g.jsx(So,{className:"h-4 w-4"});case"task":return g.jsx(Gx,{className:"h-4 w-4"});default:return g.jsx(Gx,{className:"h-4 w-4"})}},_=o.reduce((N,O)=>{let z="context";return O.type==="knowledge"?z="knowledge":O.type==="task"&&(z="tasks"),N[z]||(N[z]=[]),N[z].push(O),N},{});return g.jsx(Ac,{open:e,onOpenChange:n,children:g.jsxs(Ko,{className:"max-w-7xl h-[80vh] flex flex-col",children:[g.jsx(Xo,{children:g.jsx(Qo,{children:"Select Context Files"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsx("div",{className:"mb-2 text-sm font-medium",children:"Project Context"}),g.jsx(Lo,{className:"h-full",children:m?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx($u,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading files..."})]})}):o.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"text-center text-muted-foreground",children:[g.jsx(mN,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No context files available"})]})}):g.jsxs("div",{className:"space-y-1",children:[_.context&&g.jsxs("div",{className:"space-y-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Context"})]}),_.context.map(N=>g.jsxs("div",{className:fe("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",h?.id===N.id&&"bg-muted"),onClick:()=>k(N),children:[g.jsx(Hu,{checked:c.includes(N.id),onCheckedChange:O=>C(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),_.knowledge&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Knowledge"})]}),_.knowledge.map(N=>g.jsxs("div",{className:fe("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",h?.id===N.id&&"bg-muted"),onClick:()=>k(N),children:[g.jsx(Hu,{checked:c.includes(N.id),onCheckedChange:O=>C(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),_.tasks&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Tasks"})]}),_.tasks.map(N=>g.jsxs("div",{className:fe("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",h?.id===N.id&&"bg-muted"),onClick:()=>k(N),children:[g.jsx(Hu,{checked:c.includes(N.id),onCheckedChange:O=>C(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",title:N.name,children:N.name.length>30?`${N.name.substring(0,30)}...`:N.name})]},N.id))]})]})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:h?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[A(h.type),g.jsx("span",{className:"font-medium",children:h.name}),g.jsx("span",{className:"text-xs text-muted-foreground",children:h.relativePath})]})}),g.jsx(Lo,{className:"flex-1 border rounded-md p-4",children:h.content==="Loading..."?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx($u,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading content..."})]})}):g.jsx(ts,{className:"[&_.prose]:max-w-none",children:h.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(Vu,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select a file to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsxs("div",{className:"text-sm text-muted-foreground",children:[c.length," file",c.length!==1?"s":""," selected"]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(pt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(pt,{onClick:T,children:"Use Selected Context"})]})]})]})})}function p0({open:e,onOpenChange:n,onSelect:r,initialSelectedId:i=null}){const[o,s]=x.useState([]),[c,f]=x.useState(!1),[h,d]=x.useState(i);x.useEffect(()=>{e&&(d(i),f(!0),fetch(`${xt}/api/v1/skills`).then(async b=>{if(!b.ok)throw new Error("Failed to load skills");const w=await b.json();s(w.documents||[])}).catch(()=>s([])).finally(()=>f(!1)))},[e,i]);const m=x.useMemo(()=>o.find(b=>b.id===h)||null,[o,h]),y=()=>{m&&(r(m),n(!1))};return g.jsx(Ac,{open:e,onOpenChange:n,children:g.jsxs(Ko,{className:"max-w-4xl h-[80vh] flex flex-col",children:[g.jsx(Xo,{children:g.jsx(Qo,{children:"Select a Skill"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsxs("div",{className:"mb-2 text-sm font-medium flex items-center gap-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Skills"})]}),g.jsx(Lo,{className:"h-full",children:c?g.jsx("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):o.length===0?g.jsx("div",{className:"py-8 text-sm text-muted-foreground text-center",children:"No skills found"}):g.jsx("div",{className:"space-y-1",children:o.map(b=>{const w=h===b.id;return g.jsxs("button",{onClick:()=>d(b.id),className:fe("w-full text-left p-2 rounded-md hover:bg-muted flex items-center gap-2",w&&"bg-muted"),children:[g.jsx("input",{type:"radio",checked:w,onChange:()=>d(b.id),className:"h-4 w-4"}),g.jsx(So,{className:"h-4 w-4"}),g.jsx("span",{className:"text-sm truncate flex-1",children:b.name})]},b.id)})})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:m?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(So,{className:"h-4 w-4"}),g.jsx("span",{className:"font-medium",children:m.name}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:[".nut/skills/",m.id,"/SKILL.md"]})]})}),g.jsx(Lo,{className:"flex-1 border rounded-md p-4",children:g.jsx(ts,{className:"[&_.prose]:max-w-none",children:m.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(So,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select a skill to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsx("div",{className:"text-sm text-muted-foreground",children:m?`Selected: ${m.name}`:"No skill selected"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(pt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(pt,{onClick:y,disabled:!m,children:"Use Skill"})]})]})]})})}const pk=x.forwardRef(({className:e,...n},r)=>g.jsx("textarea",{className:fe("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));pk.displayName="Textarea";const HI=/```knowledge_action\s*\n([\s\S]*?)```/gi;function hp(e){if(!e||typeof e!="object")return!1;const n=e;return!(typeof n.action!="string"||n.action!=="create"&&n.action!=="update"||typeof n.title!="string"||typeof n.content!="string"||n.action==="update"&&typeof n.filename!="string")}function pp(e){const n=e.metadata?{...e.metadata,tags:Array.isArray(e.metadata.tags)?e.metadata.tags:e.metadata.tags?[e.metadata.tags].flat().map(String):[],sources:Array.isArray(e.metadata.sources)?e.metadata.sources:e.metadata.sources?[e.metadata.sources].flat().map(String):[],related:Array.isArray(e.metadata.related)?e.metadata.related:[],audience:Array.isArray(e.metadata.audience)?e.metadata.audience:[]}:void 0;return{...e,metadata:n}}function FI(e){if(!e)return[];const n=Array.isArray(e)?e:[e],r=[];for(const i of n)hp(i)&&r.push(pp(i));return r}function qI(e){const n=e.trimEnd();if(!n.endsWith("}"))return null;let r=0,i=!1,o=!1;for(let s=n.length-1;s>=0;s--){const c=n[s];if(i){o?o=!1:c==="\\"?o=!0:c==='"'&&(i=!1);continue}if(c==='"'){i=!0;continue}if(c==="}"){r+=1;continue}if(c==="{"&&(r-=1,r===0)){const f=n.slice(s);try{const h=JSON.parse(f),d=FI(h);if(d.length>0)return{cleaned:n.slice(0,s).trimEnd(),actions:d}}catch(h){console.error("Failed to parse trailing knowledge action payload:",h)}return null}}return null}function VI(e){const n=[];let i=e.replace(HI,(o,s)=>{try{const c=JSON.parse(s.trim());Array.isArray(c)?c.forEach(f=>{hp(f)&&n.push(pp(f))}):hp(c)&&n.push(pp(c))}catch(c){console.error("Failed to parse knowledge_action block:",c)}return""}).replace(/\n{3,}/g,`
|
|
454
|
+
\`\`\``),{...N,content:O}}catch(O){return console.error("Fallback content generation failed:",O),{...N,content:"Error loading content"}}},k=async N=>{const O=await w(N);d(O)},C=(N,O)=>{f(z=>O?[...z,N]:z.filter(j=>j!==N))},T=()=>{const N=o.filter(O=>c.includes(O.id));r({files:N,selectedIds:c}),n(!1)},A=N=>{switch(N){case"context":case"knowledge":return g.jsx(Vu,{className:"h-4 w-4"});case"agent":return g.jsx(So,{className:"h-4 w-4"});case"task":return g.jsx(Gx,{className:"h-4 w-4"});default:return g.jsx(Gx,{className:"h-4 w-4"})}},_=o.reduce((N,O)=>{let z="context";return O.type==="knowledge"?z="knowledge":O.type==="task"&&(z="tasks"),N[z]||(N[z]=[]),N[z].push(O),N},{});return g.jsx(Ac,{open:e,onOpenChange:n,children:g.jsxs(Ko,{className:"max-w-7xl h-[80vh] flex flex-col",children:[g.jsx(Xo,{children:g.jsx(Qo,{children:"Select Context Files"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsx("div",{className:"mb-2 text-sm font-medium",children:"Project Context"}),g.jsx(Lo,{className:"h-full",children:m?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx($u,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading files..."})]})}):o.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"text-center text-muted-foreground",children:[g.jsx(yN,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No context files available"})]})}):g.jsxs("div",{className:"space-y-1",children:[_.context&&g.jsxs("div",{className:"space-y-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Context"})]}),_.context.map(N=>g.jsxs("div",{className:fe("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",h?.id===N.id&&"bg-muted"),onClick:()=>k(N),children:[g.jsx(Hu,{checked:c.includes(N.id),onCheckedChange:O=>C(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),_.knowledge&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Knowledge"})]}),_.knowledge.map(N=>g.jsxs("div",{className:fe("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",h?.id===N.id&&"bg-muted"),onClick:()=>k(N),children:[g.jsx(Hu,{checked:c.includes(N.id),onCheckedChange:O=>C(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),_.tasks&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Tasks"})]}),_.tasks.map(N=>g.jsxs("div",{className:fe("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",h?.id===N.id&&"bg-muted"),onClick:()=>k(N),children:[g.jsx(Hu,{checked:c.includes(N.id),onCheckedChange:O=>C(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",title:N.name,children:N.name.length>30?`${N.name.substring(0,30)}...`:N.name})]},N.id))]})]})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:h?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[A(h.type),g.jsx("span",{className:"font-medium",children:h.name}),g.jsx("span",{className:"text-xs text-muted-foreground",children:h.relativePath})]})}),g.jsx(Lo,{className:"flex-1 border rounded-md p-4",children:h.content==="Loading..."?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx($u,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading content..."})]})}):g.jsx(ts,{className:"[&_.prose]:max-w-none",children:h.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(Vu,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select a file to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsxs("div",{className:"text-sm text-muted-foreground",children:[c.length," file",c.length!==1?"s":""," selected"]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(pt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(pt,{onClick:T,children:"Use Selected Context"})]})]})]})})}function p0({open:e,onOpenChange:n,onSelect:r,initialSelectedId:i=null}){const[o,s]=x.useState([]),[c,f]=x.useState(!1),[h,d]=x.useState(i);x.useEffect(()=>{e&&(d(i),f(!0),fetch(`${xt}/api/v1/skills`).then(async b=>{if(!b.ok)throw new Error("Failed to load skills");const w=await b.json();s(w.documents||[])}).catch(()=>s([])).finally(()=>f(!1)))},[e,i]);const m=x.useMemo(()=>o.find(b=>b.id===h)||null,[o,h]),y=()=>{m&&(r(m),n(!1))};return g.jsx(Ac,{open:e,onOpenChange:n,children:g.jsxs(Ko,{className:"max-w-4xl h-[80vh] flex flex-col",children:[g.jsx(Xo,{children:g.jsx(Qo,{children:"Select a Skill"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsxs("div",{className:"mb-2 text-sm font-medium flex items-center gap-2",children:[g.jsx(Ou,{className:"h-3 w-3"}),g.jsx("span",{children:"Skills"})]}),g.jsx(Lo,{className:"h-full",children:c?g.jsx("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):o.length===0?g.jsx("div",{className:"py-8 text-sm text-muted-foreground text-center",children:"No skills found"}):g.jsx("div",{className:"space-y-1",children:o.map(b=>{const w=h===b.id;return g.jsxs("button",{onClick:()=>d(b.id),className:fe("w-full text-left p-2 rounded-md hover:bg-muted flex items-center gap-2",w&&"bg-muted"),children:[g.jsx("input",{type:"radio",checked:w,onChange:()=>d(b.id),className:"h-4 w-4"}),g.jsx(So,{className:"h-4 w-4"}),g.jsx("span",{className:"text-sm truncate flex-1",children:b.name})]},b.id)})})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:m?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(So,{className:"h-4 w-4"}),g.jsx("span",{className:"font-medium",children:m.name}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:[".nut/skills/",m.id,"/SKILL.md"]})]})}),g.jsx(Lo,{className:"flex-1 border rounded-md p-4",children:g.jsx(ts,{className:"[&_.prose]:max-w-none",children:m.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(So,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select a skill to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsx("div",{className:"text-sm text-muted-foreground",children:m?`Selected: ${m.name}`:"No skill selected"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(pt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(pt,{onClick:y,disabled:!m,children:"Use Skill"})]})]})]})})}const pk=x.forwardRef(({className:e,...n},r)=>g.jsx("textarea",{className:fe("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));pk.displayName="Textarea";const q9=/```knowledge_action\s*\n([\s\S]*?)```/gi;function hp(e){if(!e||typeof e!="object")return!1;const n=e;return!(typeof n.action!="string"||n.action!=="create"&&n.action!=="update"||typeof n.title!="string"||typeof n.content!="string"||n.action==="update"&&typeof n.filename!="string")}function pp(e){const n=e.metadata?{...e.metadata,tags:Array.isArray(e.metadata.tags)?e.metadata.tags:e.metadata.tags?[e.metadata.tags].flat().map(String):[],sources:Array.isArray(e.metadata.sources)?e.metadata.sources:e.metadata.sources?[e.metadata.sources].flat().map(String):[],related:Array.isArray(e.metadata.related)?e.metadata.related:[],audience:Array.isArray(e.metadata.audience)?e.metadata.audience:[]}:void 0;return{...e,metadata:n}}function V9(e){if(!e)return[];const n=Array.isArray(e)?e:[e],r=[];for(const i of n)hp(i)&&r.push(pp(i));return r}function $9(e){const n=e.trimEnd();if(!n.endsWith("}"))return null;let r=0,i=!1,o=!1;for(let s=n.length-1;s>=0;s--){const c=n[s];if(i){o?o=!1:c==="\\"?o=!0:c==='"'&&(i=!1);continue}if(c==='"'){i=!0;continue}if(c==="}"){r+=1;continue}if(c==="{"&&(r-=1,r===0)){const f=n.slice(s);try{const h=JSON.parse(f),d=V9(h);if(d.length>0)return{cleaned:n.slice(0,s).trimEnd(),actions:d}}catch(h){console.error("Failed to parse trailing knowledge action payload:",h)}return null}}return null}function G9(e){const n=[];let i=e.replace(q9,(o,s)=>{try{const c=JSON.parse(s.trim());Array.isArray(c)?c.forEach(f=>{hp(f)&&n.push(pp(f))}):hp(c)&&n.push(pp(c))}catch(c){console.error("Failed to parse knowledge_action block:",c)}return""}).replace(/\n{3,}/g,`
|
|
450
455
|
|
|
451
|
-
`).trim();if(n.length===0){const o
|
|
456
|
+
`).trim();if(n.length===0){const o=$9(i);o&&(n.push(...o.actions),i=o.cleaned)}return{cleanedContent:i,actions:n}}function Y9(e){return e.action==="create"?`Proposed new knowledge document "${e.title}"`:`Proposed updates to ${e.filename||e.title}`}function K9(e,n){const r=e.split(`
|
|
452
457
|
`),i=n.split(`
|
|
453
|
-
`),o=r.length,s=i.length,c=Array.from({length:o+1},()=>Array(s+1).fill(0));for(let m=o-1;m>=0;m--)for(let y=s-1;y>=0;y--)r[m]===i[y]?c[m][y]=c[m+1][y+1]+1:c[m][y]=Math.max(c[m+1][y],c[m][y+1]);const f=[];let h=0,d=0;for(;h<o&&d<s;)r[h]===i[d]?(f.push({type:"context",value:r[h]}),h++,d++):c[h+1][d]>=c[h][d+1]?(f.push({type:"removed",value:r[h]}),h++):(f.push({type:"added",value:i[d]}),d++);for(;h<o;)f.push({type:"removed",value:r[h]}),h++;for(;d<s;)f.push({type:"added",value:i[d]}),d++;return f}function YI({original:e,updated:n}){const r=x.useMemo(()=>GI(e??"",n??""),[e,n]);return g.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md bg-background",children:g.jsx("pre",{className:"text-xs leading-5 font-mono p-4 space-y-1",children:r.map((i,o)=>{const s=i.type==="added"?"+":i.type==="removed"?"-":" ",c=i.type==="added"?"bg-green-100 dark:bg-green-950/40 text-green-900 dark:text-green-200 border-l-2 border-green-500":i.type==="removed"?"bg-red-100 dark:bg-red-950/40 text-red-900 dark:text-red-200 border-l-2 border-red-500":"text-muted-foreground";return g.jsxs("div",{className:fe("px-2 py-1 whitespace-pre-wrap break-words rounded-sm",c),children:[s," ",i.value]},o)})})})}function KI({action:e,onApply:n,fetchDocumentContent:r}){const[i,o]=x.useState(!1),[s,c]=x.useState(null),[f,h]=x.useState(null),[d,m]=x.useState(!1),[y,b]=x.useState(!1),[w,k]=x.useState("idle"),[C,T]=x.useState(null),A=e.action==="create"?"Preview document":"View diff",_=e.action==="create"?"Add to knowledge":`Update ${e.filename||"document"}`,N=async()=>{if(h(null),e.action==="update"){if(!e.filename){h("Filename is required to load the existing document."),o(!0);return}o(!0),m(!0);try{const j=await r(e.filename);if(!j){h("Could not load the existing knowledge document.");return}c({mode:"diff",original:j,updated:e.content})}catch(j){h(j instanceof Error?j.message:"Failed to load preview.")}finally{m(!1)}}else c({mode:"content",updated:e.content}),o(!0)},O=async()=>{T(null),k("idle"),b(!0);try{await n(e),k("success")}catch(j){k("error"),T(j instanceof Error?j.message:"Failed to update knowledge document.")}finally{b(!1)}},z=()=>{o(!1),c(null),h(null)};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"border border-dashed border-primary/40 bg-primary/5 text-sm rounded-md p-3 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"font-medium leading-tight",children:$I(e)}),e.summary&&g.jsx("p",{className:"text-xs text-muted-foreground leading-snug",children:e.summary})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(pt,{variant:"outline",size:"sm",onClick:N,disabled:d,children:d?"Loading…":A}),g.jsx(pt,{size:"sm",onClick:O,disabled:y||w==="success",children:y?"Applying…":_})]})]}),w==="success"&&g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Knowledge document saved."}),w==="error"&&C&&g.jsx("p",{className:"text-xs text-destructive",children:C})]}),g.jsx(Ac,{open:i,onOpenChange:j=>j?o(!0):z(),children:g.jsxs(Ko,{className:"max-w-3xl",children:[g.jsxs(Xo,{children:[g.jsx(Qo,{children:e.action==="create"?e.title:`Proposed changes for ${e.filename||e.title}`}),f&&g.jsx(xo,{className:"text-destructive",children:f}),d&&!f&&g.jsx(xo,{children:"Loading preview…"}),s?.mode==="diff"&&!d&&!f&&g.jsx(xo,{children:"Review differences before updating the knowledge document."}),s?.mode==="content"&&!d&&!f&&g.jsx(xo,{children:"Review the drafted knowledge content before saving."})]}),!d&&!f&&s&&(s.mode==="diff"&&s.original?g.jsx(YI,{original:s.original,updated:s.updated}):g.jsx("div",{className:"border rounded-md p-4 max-h-[60vh] overflow-auto bg-background",children:g.jsx(ts,{className:"text-sm [&_.prose]:text-sm",children:s.updated})})),g.jsx(cS,{children:g.jsx(pt,{variant:"outline",size:"sm",onClick:z,children:"Close"})})]})})]})}function XI({isOpen:e,onToggle:n,contextInfo:r,discussDocument:i,onDiscussDocumentHandled:o,pendingPrompt:s,onPendingPromptHandled:c,openInFullScreen:f,onFullScreenHandled:h,fullScreenNoEscape:d}){const[m,y]=x.useState(""),[b,w]=x.useState([]),[k,C]=x.useState(!1),[T,A]=x.useState(!1),_=O1(),N=Bo(),[O,z]=x.useState(!1),[j,$]=x.useState([]),[G,ee]=x.useState(!1),[P,ne]=x.useState(!1),[ae,le]=x.useState([]),[H,Q]=x.useState([]),L=x.useRef([]),K=x.useRef(new Map),U=x.useRef(!0),[J,E]=x.useState([]),Z=J.length,[oe,M]=x.useState(!1),[se,Se]=x.useState(null),[he,xe]=x.useState(!1),[Ee,Qe]=x.useState(!1),[bt,Rt]=x.useState(null),[It,Gt]=x.useState(null),[ba,Zn]=x.useState(!1),Wn=x.useRef(0);x.useEffect(()=>{b.length>0&&b.length!==Wn.current&&Zn(!0)},[b.length]),x.useEffect(()=>{const X=de=>{if(de.key==="Escape"){if(T){Ot();return}if(Ee&&!d){Qe(!1);return}}if((de.metaKey||de.ctrlKey)&&de.shiftKey&&de.key.toLowerCase()==="k"){de.preventDefault(),ne(!0);return}if((de.metaKey||de.ctrlKey)&&de.shiftKey&&de.key.toLowerCase()==="n"){de.preventDefault(),(b.length>0||J.length>0||se)&&(Jt.current&&(Jt.current.abort(),Jt.current=null),C(!1),A(!1),w([]),E([]),Q([]),L.current=[],Se(null),xe(!1),y(""),Gt(null),Zn(!1),Wn.current=0);return}if((de.metaKey||de.ctrlKey)&&de.shiftKey&&de.key.toLowerCase()==="e"){de.preventDefault(),Qe(ve=>!ve);return}};if(e)return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[e,Ee,T,b.length,J.length,se]);const Dt=x.useRef(null),Br=x.useRef(null),Jt=x.useRef(null),wn=x.useRef(null);x.useEffect(()=>{e&&setTimeout(()=>wn.current?.focus(),100)},[e]);const mr=x.useCallback((X=!1)=>{try{Br.current?Br.current.scrollTop=Br.current.scrollHeight:Dt.current&&Dt.current.scrollIntoView({behavior:X?"auto":"smooth"})}catch{console.error("Error scrolling to bottom")}},[]);x.useEffect(()=>{mr(T)},[b,k,T,mr]),x.useEffect(()=>()=>{U.current=!1},[]),x.useEffect(()=>{L.current=H},[H]),x.useEffect(()=>{let X=!1;return(async()=>{try{const ve=await hk();if(X)return;le(ve);const be=K.current;ve.forEach(Te=>{const Je=be.get(Te.id);Je&&Je.content&&Je.content!=="Loading..."&&(!Te.content||Te.content==="Loading...")?be.set(Te.id,Je):be.set(Te.id,Te)})}catch(ve){X||console.error("Error loading context file list:",ve)}})(),()=>{X=!0}},[]);const Wa=x.useCallback(X=>{const de=K.current.get(X);if(de)return de;const ve=ae.find(be=>be.id===X);return ve?(K.current.set(X,ve),ve):null},[ae]),wa=x.useCallback(X=>{if(X.startsWith("knowledge-")){const ve=`${X.replace("knowledge-","")}.md`;return{id:X,name:ve,type:"knowledge",path:`.nut/knowledge/${ve}`,relativePath:`knowledge/${ve}`,content:"Loading..."}}if(X.startsWith("task-")){const de=X.replace("task-","");return{id:X,name:`${de}.md`,type:"task",path:`.nut/tasks/${de}.md`,relativePath:`tasks/${de}.md`,content:"Loading..."}}return X==="project-md"?{id:X,name:"project.md",type:"context",path:".nut/context/project.md",relativePath:"context/project.md",content:"Loading..."}:X==="architecture-md"?{id:X,name:"architecture.md",type:"context",path:".nut/context/architecture.md",relativePath:"context/architecture.md",content:"Loading..."}:null},[]),Ja=x.useCallback(async X=>{const de=X.filter((be,Te,Je)=>Je.indexOf(be)===Te),ve=[];for(const be of de){let Te=Wa(be);if(Te||(Te=wa(be),Te&&K.current.set(be,Te)),!!Te){if(Te.content&&Te.content!=="Loading..."){K.current.set(be,Te),ve.push(Te);continue}try{const Je=await dp(Te);K.current.set(be,Je),ve.push(Je)}catch(Je){console.error(`Error ensuring content for context file ${Te.name}:`,Je),ve.push(Te)}}}return ve},[wa,Wa]),Ur=x.useCallback(async X=>{if(X.length===0){E([]);return}try{const de=await Ja(X);if(!U.current)return;const ve=new Map(de.map(Te=>[Te.id,Te])),be=X.map(Te=>ve.get(Te)).filter(Te=>!!Te);E(be)}catch(de){console.error("Error synchronizing selected context files:",de)}},[Ja]);x.useEffect(()=>{if(i&&e){const X={id:i.id,name:i.name,type:i.type||"knowledge",path:i.path,relativePath:i.path,content:"Loading..."};if(!L.current.includes(i.id)){const de=[...L.current,i.id];Q(de),L.current=de,K.current.set(i.id,X),E(ve=>ve.some(be=>be.id===i.id)?ve:[...ve,X]),Ur(de).catch(ve=>{console.error("Error syncing context after discuss document:",ve)})}o?.()}},[i,e,o,Ur]),x.useEffect(()=>{s&&e&&(y(s),c?.())},[s,e,c]),x.useEffect(()=>{f&&(Qe(!0),h?.(),setTimeout(()=>wn.current?.focus(),100))},[f,h]),x.useEffect(()=>{const X=()=>{Qe(de=>!de),setTimeout(()=>wn.current?.focus(),100)};return window.addEventListener("toggle-assistant-fullscreen",X),()=>{window.removeEventListener("toggle-assistant-fullscreen",X)}},[]);const W=async()=>{if(b.length!==0)try{const X=!!It,de=X?`${xt}/api/v1/chats/${It}`:`${xt}/api/v1/chats`,be=await fetch(de,{method:X?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:b,model:"anthropic/claude-sonnet-4.5",context:r})});if(!be.ok){const Je=await be.json();throw new Error(Je.error||"Failed to save chat")}const Te=await be.json();!X&&Te.chatId&&Gt(Te.chatId),Zn(!1),Wn.current=b.length,console.log("Chat saved:",Te.chatId||It)}catch(X){console.error("Error saving chat:",X)}},ue=async()=>{ee(!0);try{const X=await fetch(`${xt}/api/v1/chats`);if(!X.ok)throw new Error("Failed to load chat history");const de=await X.json();$(de.chats)}catch(X){console.error("Error loading chat history:",X)}finally{ee(!1)}},ke=async X=>{try{const de=await fetch(`${xt}/api/v1/chats/${X}`);if(!de.ok)throw new Error("Failed to load chat");const ve=await de.json();w(ve.chat.messages),Gt(X),Zn(!1),Wn.current=ve.chat.messages.length,z(!1)}catch(de){console.error("Error loading chat:",de)}},Ae=async X=>{try{if(!(await fetch(`${xt}/api/v1/chats/${X}`,{method:"DELETE"})).ok)throw new Error("Failed to delete chat");await ue()}catch(de){console.error("Error deleting chat:",de)}},Ye=()=>{T&&Ot(),w([]),E([]),Q([]),L.current=[],Se(null),xe(!1),y(""),Gt(null),Zn(!1),Wn.current=0},Yt=async(X,de)=>{try{await navigator.clipboard.writeText(X),Rt(de),setTimeout(()=>Rt(null),2e3)}catch(ve){console.error("Failed to copy message:",ve)}},Pn=async X=>{try{const de=X.endsWith(".md")?X.slice(0,-3):X,ve=await fetch(`${xt}/api/v1/knowledge/${de}`);return ve.ok?(await ve.json()).document?.content||null:(console.error("Failed to fetch knowledge document:",ve.statusText),null)}catch(de){return console.error("Error fetching knowledge document:",de),null}},Bt=async X=>{const de={tool:"knowledge_documents",arguments:{operation:X.action==="create"?"create":"update",title:X.title,content:X.content,filename:X.filename,metadata:X.metadata,summary:X.summary}};try{const ve=await fetch(`${xt}/api/v1/mcp/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(de)}),be=await ve.json();if(!ve.ok||!be.success)throw new Error(be.error||"Knowledge tool execution failed");const Te=be.data?.filename||X.filename||X.title,Je=X.action==="create"?"added to the knowledge base":"updated in the knowledge base";w(Ht=>[...Ht,{role:"system",content:`Knowledge document ${Te} ${Je}.`}])}catch(ve){throw console.error("Error applying knowledge action:",ve),ve instanceof Error?ve:new Error("Failed to apply knowledge action")}},sn=async()=>{if(!m.trim()||T)return;const X=m,ve=!b.some($e=>$e.role==="user");let be;ve&&se&&!he&&(be=`--- System Persona ---
|
|
458
|
+
`),o=r.length,s=i.length,c=Array.from({length:o+1},()=>Array(s+1).fill(0));for(let m=o-1;m>=0;m--)for(let y=s-1;y>=0;y--)r[m]===i[y]?c[m][y]=c[m+1][y+1]+1:c[m][y]=Math.max(c[m+1][y],c[m][y+1]);const f=[];let h=0,d=0;for(;h<o&&d<s;)r[h]===i[d]?(f.push({type:"context",value:r[h]}),h++,d++):c[h+1][d]>=c[h][d+1]?(f.push({type:"removed",value:r[h]}),h++):(f.push({type:"added",value:i[d]}),d++);for(;h<o;)f.push({type:"removed",value:r[h]}),h++;for(;d<s;)f.push({type:"added",value:i[d]}),d++;return f}function X9({original:e,updated:n}){const r=x.useMemo(()=>K9(e??"",n??""),[e,n]);return g.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md bg-background",children:g.jsx("pre",{className:"text-xs leading-5 font-mono p-4 space-y-1",children:r.map((i,o)=>{const s=i.type==="added"?"+":i.type==="removed"?"-":" ",c=i.type==="added"?"bg-green-100 dark:bg-green-950/40 text-green-900 dark:text-green-200 border-l-2 border-green-500":i.type==="removed"?"bg-red-100 dark:bg-red-950/40 text-red-900 dark:text-red-200 border-l-2 border-red-500":"text-muted-foreground";return g.jsxs("div",{className:fe("px-2 py-1 whitespace-pre-wrap break-words rounded-sm",c),children:[s," ",i.value]},o)})})})}function Q9({action:e,onApply:n,fetchDocumentContent:r}){const[i,o]=x.useState(!1),[s,c]=x.useState(null),[f,h]=x.useState(null),[d,m]=x.useState(!1),[y,b]=x.useState(!1),[w,k]=x.useState("idle"),[C,T]=x.useState(null),A=e.action==="create"?"Preview document":"View diff",_=e.action==="create"?"Add to knowledge":`Update ${e.filename||"document"}`,N=async()=>{if(h(null),e.action==="update"){if(!e.filename){h("Filename is required to load the existing document."),o(!0);return}o(!0),m(!0);try{const j=await r(e.filename);if(!j){h("Could not load the existing knowledge document.");return}c({mode:"diff",original:j,updated:e.content})}catch(j){h(j instanceof Error?j.message:"Failed to load preview.")}finally{m(!1)}}else c({mode:"content",updated:e.content}),o(!0)},O=async()=>{T(null),k("idle"),b(!0);try{await n(e),k("success")}catch(j){k("error"),T(j instanceof Error?j.message:"Failed to update knowledge document.")}finally{b(!1)}},z=()=>{o(!1),c(null),h(null)};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"border border-dashed border-primary/40 bg-primary/5 text-sm rounded-md p-3 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"font-medium leading-tight",children:Y9(e)}),e.summary&&g.jsx("p",{className:"text-xs text-muted-foreground leading-snug",children:e.summary})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(pt,{variant:"outline",size:"sm",onClick:N,disabled:d,children:d?"Loading…":A}),g.jsx(pt,{size:"sm",onClick:O,disabled:y||w==="success",children:y?"Applying…":_})]})]}),w==="success"&&g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Knowledge document saved."}),w==="error"&&C&&g.jsx("p",{className:"text-xs text-destructive",children:C})]}),g.jsx(Ac,{open:i,onOpenChange:j=>j?o(!0):z(),children:g.jsxs(Ko,{className:"max-w-3xl",children:[g.jsxs(Xo,{children:[g.jsx(Qo,{children:e.action==="create"?e.title:`Proposed changes for ${e.filename||e.title}`}),f&&g.jsx(xo,{className:"text-destructive",children:f}),d&&!f&&g.jsx(xo,{children:"Loading preview…"}),s?.mode==="diff"&&!d&&!f&&g.jsx(xo,{children:"Review differences before updating the knowledge document."}),s?.mode==="content"&&!d&&!f&&g.jsx(xo,{children:"Review the drafted knowledge content before saving."})]}),!d&&!f&&s&&(s.mode==="diff"&&s.original?g.jsx(X9,{original:s.original,updated:s.updated}):g.jsx("div",{className:"border rounded-md p-4 max-h-[60vh] overflow-auto bg-background",children:g.jsx(ts,{className:"text-sm [&_.prose]:text-sm",children:s.updated})})),g.jsx(cS,{children:g.jsx(pt,{variant:"outline",size:"sm",onClick:z,children:"Close"})})]})})]})}function Z9({isOpen:e,onToggle:n,contextInfo:r,discussDocument:i,onDiscussDocumentHandled:o,pendingPrompt:s,onPendingPromptHandled:c,openInFullScreen:f,onFullScreenHandled:h,fullScreenNoEscape:d}){const[m,y]=x.useState(""),[b,w]=x.useState([]),[k,C]=x.useState(!1),[T,A]=x.useState(!1),_=O1(),N=Bo(),[O,z]=x.useState(!1),[j,$]=x.useState([]),[G,ee]=x.useState(!1),[P,ne]=x.useState(!1),[ae,le]=x.useState([]),[H,Q]=x.useState([]),L=x.useRef([]),K=x.useRef(new Map),U=x.useRef(!0),[J,E]=x.useState([]),Z=J.length,[oe,M]=x.useState(!1),[se,Se]=x.useState(null),[he,xe]=x.useState(!1),[Ee,Qe]=x.useState(!1),[bt,Rt]=x.useState(null),[It,Gt]=x.useState(null),[ba,Zn]=x.useState(!1),Wn=x.useRef(0);x.useEffect(()=>{b.length>0&&b.length!==Wn.current&&Zn(!0)},[b.length]),x.useEffect(()=>{const X=de=>{if(de.key==="Escape"){if(T){Ot();return}if(Ee&&!d){Qe(!1);return}}if((de.metaKey||de.ctrlKey)&&de.shiftKey&&de.key.toLowerCase()==="k"){de.preventDefault(),ne(!0);return}if((de.metaKey||de.ctrlKey)&&de.shiftKey&&de.key.toLowerCase()==="n"){de.preventDefault(),(b.length>0||J.length>0||se)&&(Jt.current&&(Jt.current.abort(),Jt.current=null),C(!1),A(!1),w([]),E([]),Q([]),L.current=[],Se(null),xe(!1),y(""),Gt(null),Zn(!1),Wn.current=0);return}if((de.metaKey||de.ctrlKey)&&de.shiftKey&&de.key.toLowerCase()==="e"){de.preventDefault(),Qe(ve=>!ve);return}};if(e)return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[e,Ee,T,b.length,J.length,se]);const Dt=x.useRef(null),Br=x.useRef(null),Jt=x.useRef(null),wn=x.useRef(null);x.useEffect(()=>{e&&setTimeout(()=>wn.current?.focus(),100)},[e]);const mr=x.useCallback((X=!1)=>{try{Br.current?Br.current.scrollTop=Br.current.scrollHeight:Dt.current&&Dt.current.scrollIntoView({behavior:X?"auto":"smooth"})}catch{console.error("Error scrolling to bottom")}},[]);x.useEffect(()=>{mr(T)},[b,k,T,mr]),x.useEffect(()=>()=>{U.current=!1},[]),x.useEffect(()=>{L.current=H},[H]),x.useEffect(()=>{let X=!1;return(async()=>{try{const ve=await hk();if(X)return;le(ve);const be=K.current;ve.forEach(Te=>{const Je=be.get(Te.id);Je&&Je.content&&Je.content!=="Loading..."&&(!Te.content||Te.content==="Loading...")?be.set(Te.id,Je):be.set(Te.id,Te)})}catch(ve){X||console.error("Error loading context file list:",ve)}})(),()=>{X=!0}},[]);const Wa=x.useCallback(X=>{const de=K.current.get(X);if(de)return de;const ve=ae.find(be=>be.id===X);return ve?(K.current.set(X,ve),ve):null},[ae]),wa=x.useCallback(X=>{if(X.startsWith("knowledge-")){const ve=`${X.replace("knowledge-","")}.md`;return{id:X,name:ve,type:"knowledge",path:`.nut/knowledge/${ve}`,relativePath:`knowledge/${ve}`,content:"Loading..."}}if(X.startsWith("task-")){const de=X.replace("task-","");return{id:X,name:`${de}.md`,type:"task",path:`.nut/tasks/${de}.md`,relativePath:`tasks/${de}.md`,content:"Loading..."}}return X==="project-md"?{id:X,name:"project.md",type:"context",path:".nut/context/project.md",relativePath:"context/project.md",content:"Loading..."}:X==="architecture-md"?{id:X,name:"architecture.md",type:"context",path:".nut/context/architecture.md",relativePath:"context/architecture.md",content:"Loading..."}:null},[]),Ja=x.useCallback(async X=>{const de=X.filter((be,Te,Je)=>Je.indexOf(be)===Te),ve=[];for(const be of de){let Te=Wa(be);if(Te||(Te=wa(be),Te&&K.current.set(be,Te)),!!Te){if(Te.content&&Te.content!=="Loading..."){K.current.set(be,Te),ve.push(Te);continue}try{const Je=await dp(Te);K.current.set(be,Je),ve.push(Je)}catch(Je){console.error(`Error ensuring content for context file ${Te.name}:`,Je),ve.push(Te)}}}return ve},[wa,Wa]),Ur=x.useCallback(async X=>{if(X.length===0){E([]);return}try{const de=await Ja(X);if(!U.current)return;const ve=new Map(de.map(Te=>[Te.id,Te])),be=X.map(Te=>ve.get(Te)).filter(Te=>!!Te);E(be)}catch(de){console.error("Error synchronizing selected context files:",de)}},[Ja]);x.useEffect(()=>{if(i&&e){const X={id:i.id,name:i.name,type:i.type||"knowledge",path:i.path,relativePath:i.path,content:"Loading..."};if(!L.current.includes(i.id)){const de=[...L.current,i.id];Q(de),L.current=de,K.current.set(i.id,X),E(ve=>ve.some(be=>be.id===i.id)?ve:[...ve,X]),Ur(de).catch(ve=>{console.error("Error syncing context after discuss document:",ve)})}o?.()}},[i,e,o,Ur]),x.useEffect(()=>{s&&e&&(y(s),c?.())},[s,e,c]),x.useEffect(()=>{f&&(Qe(!0),h?.(),setTimeout(()=>wn.current?.focus(),100))},[f,h]),x.useEffect(()=>{const X=()=>{Qe(de=>!de),setTimeout(()=>wn.current?.focus(),100)};return window.addEventListener("toggle-assistant-fullscreen",X),()=>{window.removeEventListener("toggle-assistant-fullscreen",X)}},[]);const W=async()=>{if(b.length!==0)try{const X=!!It,de=X?`${xt}/api/v1/chats/${It}`:`${xt}/api/v1/chats`,be=await fetch(de,{method:X?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:b,model:"anthropic/claude-sonnet-4.5",context:r})});if(!be.ok){const Je=await be.json();throw new Error(Je.error||"Failed to save chat")}const Te=await be.json();!X&&Te.chatId&&Gt(Te.chatId),Zn(!1),Wn.current=b.length,console.log("Chat saved:",Te.chatId||It)}catch(X){console.error("Error saving chat:",X)}},ue=async()=>{ee(!0);try{const X=await fetch(`${xt}/api/v1/chats`);if(!X.ok)throw new Error("Failed to load chat history");const de=await X.json();$(de.chats)}catch(X){console.error("Error loading chat history:",X)}finally{ee(!1)}},ke=async X=>{try{const de=await fetch(`${xt}/api/v1/chats/${X}`);if(!de.ok)throw new Error("Failed to load chat");const ve=await de.json();w(ve.chat.messages),Gt(X),Zn(!1),Wn.current=ve.chat.messages.length,z(!1)}catch(de){console.error("Error loading chat:",de)}},Ae=async X=>{try{if(!(await fetch(`${xt}/api/v1/chats/${X}`,{method:"DELETE"})).ok)throw new Error("Failed to delete chat");await ue()}catch(de){console.error("Error deleting chat:",de)}},Ye=()=>{T&&Ot(),w([]),E([]),Q([]),L.current=[],Se(null),xe(!1),y(""),Gt(null),Zn(!1),Wn.current=0},Yt=async(X,de)=>{try{await navigator.clipboard.writeText(X),Rt(de),setTimeout(()=>Rt(null),2e3)}catch(ve){console.error("Failed to copy message:",ve)}},Pn=async X=>{try{const de=X.endsWith(".md")?X.slice(0,-3):X,ve=await fetch(`${xt}/api/v1/knowledge/${de}`);return ve.ok?(await ve.json()).document?.content||null:(console.error("Failed to fetch knowledge document:",ve.statusText),null)}catch(de){return console.error("Error fetching knowledge document:",de),null}},Bt=async X=>{const de={tool:"knowledge_documents",arguments:{operation:X.action==="create"?"create":"update",title:X.title,content:X.content,filename:X.filename,metadata:X.metadata,summary:X.summary}};try{const ve=await fetch(`${xt}/api/v1/mcp/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(de)}),be=await ve.json();if(!ve.ok||!be.success)throw new Error(be.error||"Knowledge tool execution failed");const Te=be.data?.filename||X.filename||X.title,Je=X.action==="create"?"added to the knowledge base":"updated in the knowledge base";w(Ht=>[...Ht,{role:"system",content:`Knowledge document ${Te} ${Je}.`}])}catch(ve){throw console.error("Error applying knowledge action:",ve),ve instanceof Error?ve:new Error("Failed to apply knowledge action")}},sn=async()=>{if(!m.trim()||T)return;const X=m,ve=!b.some($e=>$e.role==="user");let be;ve&&se&&!he&&(be=`--- System Persona ---
|
|
454
459
|
You MUST adopt and consistently act as the following skill persona for this entire conversation.
|
|
455
460
|
- Follow its goals, tone, constraints, and tools.
|
|
456
461
|
- Prioritize the skill's specified focus areas in your reasoning and responses.
|
|
@@ -459,7 +464,7 @@ You MUST adopt and consistently act as the following skill persona for this enti
|
|
|
459
464
|
Skill: ${se.name} (.nut/skills/${se.id}/SKILL.md)
|
|
460
465
|
|
|
461
466
|
${se.content}
|
|
462
|
-
--- End System Persona ---`,xe(!0));const Je=(await Promise.all(J.map(async $e=>{if($e.content&&$e.content!=="Loading..."&&$e.content!=="Content not available")return $e;try{const en=await dp($e);return K.current.set($e.id,en),en}catch(en){return console.error(`Failed to load content for ${$e.name}:`,en),$e}}))).filter($e=>$e.content&&$e.content!=="Loading..."&&$e.content!=="Content not available").map($e=>({name:$e.name,path:$e.path,type:$e.type,content:$e.content})),Ht={role:"user",content:m};w($e=>[...$e,Ht]),y(""),C(!0),A(!0);const Sa=new AbortController;Jt.current=Sa;try{const en=[...b,Ht].filter(ot=>ot.role==="user"||ot.role==="assistant").map((ot,st,gt)=>st===gt.length-1&&ot.role==="user"?{role:ot.role,content:X}:ot),In={message:X,history:en,context:r?.type,contextContent:r?.content,skillPersona:be,attachedContextFiles:Je.length>0?Je:void 0},Bn=await fetch(`${xt}/api/v1/ai`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(In),signal:Sa.signal});if(!Bn.ok){let ot="Failed to get AI response";try{const st=await Bn.json();ot=st.error||st.message||ot,st.status&&(ot=`${ot} (${st.status})`)}catch{ot=`${Bn.statusText||ot} (${Bn.status})`}throw new Error(ot)}if(Bn.body){const ot=Bn.body.getReader(),st=new TextDecoder;let gt="",Jn=!1;try{for(;;){const{done:Un,value:ei}=await ot.read();if(Un)break;gt+=st.decode(ei,{stream:!0}),Jn?w(gr=>{const Sn=[...gr];return Sn[Sn.length-1]={role:"assistant",content:gt},Sn}):(w(gr=>[...gr,{role:"assistant",content:gt}]),C(!1),Jn=!0)}gt.trim()||console.warn("Stream completed with no content")}catch(Un){if(!(Un instanceof DOMException&&Un.name==="AbortError")){console.error("Streaming error:",Un);const ei=`Sorry, I encountered a streaming error: ${Un instanceof Error?Un.message:"Unknown error"}`;w(Jn?gr=>{const Sn=[...gr];return Sn[Sn.length-1]?.role==="assistant"&&(Sn[Sn.length-1]={role:"assistant",content:ei}),Sn}:gr=>[...gr,{role:"assistant",content:ei}])}}}}catch($e){if($e instanceof DOMException&&$e.name==="AbortError")w(en=>{const In=[...en],Bn=In[In.length-1];return Bn?.role==="assistant"&&!Bn.content&&In.pop(),In});else{console.error("Error calling AI:",$e);const en={role:"assistant",content:`Sorry, I encountered an error: ${$e instanceof Error?$e.message:"Unknown error"}`};w(In=>[...In,en])}}finally{Jt.current=null,C(!1),A(!1)}},Ot=()=>{Jt.current&&(Jt.current.abort(),Jt.current=null),C(!1),A(!1)},mt=X=>{X.files.forEach(be=>{const Te=K.current.get(be.id);(!Te||Te.content!==be.content)&&K.current.set(be.id,be)}),Q(X.selectedIds),L.current=X.selectedIds;const de=new Map(X.files.map(be=>[be.id,be])),ve=X.selectedIds.map(be=>{const Te=de.get(be);if(Te)return Te;const Je=K.current.get(be);return Je||ae.find(Ht=>Ht.id===be)||null}).filter(be=>be!==null);E(ve),Ur(X.selectedIds).catch(be=>{console.error("Error syncing context after manual selection:",be)})},Ut=g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex h-full w-full flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between p-4 border-b flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Lu,{className:fe(Ee?"h-6 w-6":"h-5 w-5")}),g.jsx("div",{children:g.jsx("h2",{className:fe("font-semibold leading-tight",Ee?"text-xl":"text-lg"),children:"Coconut Assistant"})})]}),g.jsx("div",{className:fe("flex items-center gap-1",_&&"mr-8"),children:Ee&&!d?g.jsx(pt,{onClick:()=>Qe(!1),size:"icon",variant:"ghost",className:"h-8 w-8",title:"Exit Expanded View (Esc)",children:g.jsx(Yi,{className:"h-4 w-4"})}):Ee?null:g.jsx(pt,{onClick:()=>{Qe(!0),setTimeout(()=>wn.current?.focus(),100)},size:"icon",variant:"outline",className:"h-8 w-8",title:"Expand View (⌘⇧L)",children:g.jsx(uN,{className:"h-4 w-4"})})})]}),g.jsx("div",{className:"px-4 py-2 border-b flex-shrink-0",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs(pt,{onClick:()=>{z(!O),O||ue()},size:"sm",variant:"outline",className:"h-8 shrink-0 gap-1.5",title:O?"View Chat":"Chat History",children:[g.jsx(EN,{className:"h-4 w-4"}),O?"View Chat":"History"]}),g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsxs(pt,{onClick:W,disabled:b.length===0||!ba,size:"sm",variant:"outline",className:"h-8 shrink-0 gap-1.5",title:"Save Chat",children:[g.jsx(YN,{className:"h-4 w-4"}),"Save"]}),g.jsxs(vI,{children:[g.jsx(xI,{asChild:!0,children:g.jsxs(pt,{disabled:b.length===0&&J.length===0&&!se,size:"sm",variant:"outline",className:"h-8 shrink-0 gap-1.5 bg-red-500 text-white border-red-500 hover:bg-red-600 hover:text-white hover:border-red-600",title:"New Chat (⌘⇧N)",children:[g.jsx(lM,{className:"h-4 w-4"}),"New"]})}),g.jsxs(BE,{children:[g.jsxs(UE,{children:[g.jsx(FE,{children:"Clear Chat"}),g.jsx(qE,{children:"This clears all messages, removes selected context files, and resets the selected agent. This action cannot be undone."})]}),g.jsxs(HE,{children:[g.jsx($E,{children:"Cancel"}),g.jsx(VE,{onClick:Ye,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Clear Chat"})]})]})]})]})]})}),O&&g.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-2 min-h-0",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"font-medium",children:"Chat History"}),g.jsx(pt,{onClick:()=>z(!1),size:"sm",variant:"ghost",children:g.jsx(Yi,{className:"h-4 w-4"})})]}),G?g.jsx("div",{className:"text-center text-muted-foreground py-8",children:g.jsxs("div",{className:"flex items-center justify-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):j.length===0?g.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[g.jsx(rh,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No saved chats yet"})]}):g.jsx("div",{className:"space-y-2",children:j.map(X=>g.jsx("div",{className:"border rounded-lg p-3 bg-muted/30 hover:bg-muted/60 cursor-pointer group transition-colors",onClick:()=>ke(X.id),children:g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsxs("div",{className:"flex items-start gap-2.5 flex-1 min-w-0",children:[g.jsx("div",{className:"mt-0.5 shrink-0 w-7 h-7 rounded-md bg-primary/10 flex items-center justify-center",children:g.jsx(rh,{className:"h-3.5 w-3.5 text-primary/70"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h4",{className:"text-sm font-medium truncate",children:X.title}),g.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx(Q_,{className:"h-3 w-3"}),new Date(X.updatedAt).toLocaleDateString()]}),g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx(rh,{className:"h-3 w-3"}),X.messages.length]}),g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx(Lu,{className:"h-3 w-3"}),X.model.split("/")[1]||X.model]})]})]})]}),g.jsx(pt,{onClick:de=>{de.stopPropagation(),Ae(X.id)},size:"icon",variant:"ghost",className:"h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:g.jsx(dM,{className:"h-3 w-3"})})]})},X.id))})]}),!O&&g.jsxs("div",{ref:Br,className:fe("flex-1 w-full overflow-y-auto space-y-4 min-h-0",Ee?"p-6 max-w-4xl mx-auto":"p-4"),children:[b.length===0&&g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground py-12 px-2",children:[g.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-6",children:g.jsx(Lu,{className:"h-5 w-5 text-primary"})}),g.jsx("h3",{className:"text-base font-semibold text-foreground mb-1",children:"Coconut Assistant"}),g.jsx("p",{className:"text-sm text-muted-foreground/70 mb-4 text-center max-w-[260px]",children:"Try one of these to get started, or type your own question below."}),g.jsx("div",{className:"flex flex-col gap-2 w-full max-w-[280px]",children:["What's been happening?","Search the knowledge base for...","Create an image showing...","Help me research...","Add the following task..."].map(X=>g.jsx("button",{onClick:()=>{y(X),setTimeout(()=>{const de=wn.current;de&&(de.focus(),de.setSelectionRange(X.length,X.length))},0)},className:"text-sm text-left text-primary-foreground/70 hover:text-primary-foreground bg-primary rounded-xl px-4 py-2.5 transition-colors",children:X.trim()},X))}),g.jsxs("p",{className:"mt-4 text-xs text-muted-foreground/50 flex items-center gap-1.5",children:[g.jsx(gh,{className:"text-[10px] px-1.5 h-4",children:"⌘"}),g.jsx(gh,{className:"text-[10px] px-1.5 h-4",children:"⇧"}),g.jsx(gh,{className:"text-[10px] px-1.5 h-4",children:"L"}),"to go full screen"]})]}),b.map((X,de)=>{const ve=X.role==="assistant",be=ve?VI(X.content):{cleanedContent:X.content,actions:[]},Te=ve?be.cleanedContent.length>0?be.cleanedContent:be.actions.length>0?"Proposed knowledge update available below.":X.content:X.content;return g.jsx("div",{className:fe(X.role==="user"?fe("rounded-2xl bg-primary text-primary-foreground p-3 min-w-[80px] max-w-[85%] ml-auto",Ee&&"max-w-[70%]"):X.role==="system"?"rounded-lg bg-muted/50 text-muted-foreground text-center text-xs py-2 px-3 mx-auto max-w-[90%]":"px-1 mr-auto w-full"),children:ve?g.jsxs("div",{className:"space-y-2",children:[g.jsx(ts,{className:"text-sm [&_.prose]:text-sm [&_.prose-p]:text-sm [&_.prose-li]:text-sm [&_.prose-code]:text-xs",children:Te}),(()=>{const Je=C4(X.content);return Je.length===0?null:g.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:Je.map(Ht=>g.jsx("div",{className:"block cursor-pointer",onClick:()=>N(`/resources/${Ht}`),children:g.jsx("img",{src:`${xt}/api/v1/resources/${Ht}/thumbnail`,alt:Ht,className:"w-32 h-24 object-cover rounded-lg border hover:opacity-80 transition-opacity",onError:Sa=>{Sa.target.style.display="none"}})},Ht))})})(),be.actions.map((Je,Ht)=>g.jsx(KI,{action:Je,onApply:Bt,fetchDocumentContent:Pn},`${de}-knowledge-${Ht}`)),!k&&X.content.length>0&&g.jsx("div",{className:"flex justify-start gap-1",children:g.jsx(pt,{onClick:()=>Yt(X.content,de),size:"icon",variant:"ghost",className:"h-5 w-5 opacity-60 hover:opacity-100",title:bt===de?"Copied!":"Copy message",children:bt===de?g.jsx(jp,{className:"h-3 w-3"}):g.jsx(oN,{className:"h-3 w-3"})})})]}):g.jsx("div",{className:"text-sm",children:X.content})},de)}),k&&g.jsx("div",{className:"px-1 mr-auto",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}),g.jsx("div",{ref:Dt})]}),!O&&g.jsx("div",{className:"border-t flex-shrink-0 w-full",children:g.jsxs("div",{className:fe(Ee?"px-6 pb-6 pt-3 max-w-4xl mx-auto":"px-4 pb-4 pt-2"),children:[g.jsx("div",{className:"mb-2",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"flex-1 min-w-0",children:Z>0?g.jsx("div",{className:"flex flex-wrap gap-1",children:J.map(X=>g.jsxs("div",{className:fe("flex items-center gap-1 text-xs px-2 py-1 rounded-md","bg-primary/10 text-primary"),children:[g.jsx("span",{children:X.name}),g.jsx("button",{onClick:de=>{de.stopPropagation();const ve=L.current.filter(be=>be!==X.id);Q(ve),L.current=ve,E(be=>be.filter(Te=>Te.id!==X.id)),Ur(ve).catch(be=>{console.error("Error syncing context after removal:",be)})},className:fe("ml-1 rounded-full p-0.5 transition-colors","hover:bg-primary/20"),disabled:!1,title:"Remove from context",children:g.jsx(Yi,{className:"h-3 w-3"})})]},X.id))}):g.jsxs("button",{onClick:()=>ne(!0),className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",disabled:!1,children:[g.jsx($N,{className:"h-3.5 w-3.5"}),"Add context"]})}),g.jsx("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:g.jsx(pt,{onClick:()=>ne(!0),size:"icon",variant:"ghost",className:"h-6 w-6",title:"Select Context Files (⌘⇧K)",disabled:!1,children:g.jsx(ON,{className:"h-4 w-4"})})})]})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(pk,{ref:wn,value:m,onChange:X=>y(X.target.value),onKeyDown:X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),sn())},placeholder:"How can I help?",className:fe("flex-1 resize-none",Ee?"min-h-[3rem] max-h-40":"min-h-[2.5rem] max-h-32"),"aria-label":"Assistant message input"}),T?g.jsx(pt,{onClick:Ot,size:"icon",variant:"outline",className:"shrink-0",title:"Stop response (Esc)","aria-label":"Stop response",children:g.jsx(sM,{className:"h-4 w-4"})}):g.jsx(pt,{onClick:sn,disabled:!m.trim(),size:"icon",className:"shrink-0",children:g.jsx(XN,{className:"h-4 w-4"})})]})]})})]})});return _?g.jsxs(g.Fragment,{children:[g.jsx(pw,{open:e,onOpenChange:n,children:g.jsxs(Fp,{side:"right",className:"w-96 h-full p-0 bg-sidebar border-l border-sidebar-border",children:[g.jsx(qp,{className:"sr-only",children:g.jsx(Vp,{children:"Assistant"})}),Ut]})}),g.jsx(h0,{open:P,onOpenChange:ne,onSelectionConfirm:mt,initialSelection:H}),g.jsx(p0,{open:oe,onOpenChange:M,initialSelectedId:se?.id||null,onSelect:X=>{const de={id:X.id,name:X.name,content:X.content||""};Se(de),w(ve=>[...ve,{role:"system",content:`${de.name} selected.`}])}})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:fe("fixed inset-y-0 right-0 z-10 h-dvh bg-sidebar border-l border-sidebar-border transition-all duration-300 ease-in-out",e?"w-96":"w-0 overflow-hidden"),children:g.jsx("div",{className:"w-96 h-full",children:Ut})}),g.jsx(Ac,{open:Ee,onOpenChange:X=>{!X&&d||Qe(X)},children:g.jsxs(Ko,{className:fe("p-0 gap-0 [&>button]:hidden",d?"w-screen h-screen max-w-none max-h-none rounded-none":"max-w-[96vw] w-[96vw] max-h-[96vh] h-[96vh]"),onPointerDownOutside:d?X=>X.preventDefault():void 0,onEscapeKeyDown:d?X=>X.preventDefault():void 0,children:[g.jsx(Xo,{className:"sr-only",children:g.jsx(Qo,{children:"Assistant"})}),g.jsx("div",{className:"h-full w-full flex flex-col bg-background rounded-lg overflow-hidden",children:Ut})]})}),g.jsx(h0,{open:P,onOpenChange:ne,onSelectionConfirm:mt,initialSelection:H}),g.jsx(p0,{open:oe,onOpenChange:M,initialSelectedId:se?.id||null,onSelect:X=>{const de={id:X.id,name:X.name,content:X.content||""};Se(de),w(ve=>[...ve,{role:"system",content:`${de.name} selected.`}])}})]})}var Oh="rovingFocusGroup.onEntryFocus",QI={bubbles:!1,cancelable:!0},ns="RovingFocusGroup",[mp,mk,ZI]=Tp(ns),[WI,gk]=Xn(ns,[ZI]),[JI,e8]=WI(ns),yk=x.forwardRef((e,n)=>g.jsx(mp.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(mp.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(t8,{...e,ref:n})})}));yk.displayName=ns;var t8=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...y}=e,b=x.useRef(null),w=Xe(n,b),k=wm(s),[C,T]=ol({prop:c,defaultProp:f??null,onChange:h,caller:ns}),[A,_]=x.useState(!1),N=kt(d),O=mk(r),z=x.useRef(!1),[j,$]=x.useState(0);return x.useEffect(()=>{const G=b.current;if(G)return G.addEventListener(Oh,N),()=>G.removeEventListener(Oh,N)},[N]),g.jsx(JI,{scope:r,orientation:i,dir:k,loop:o,currentTabStopId:C,onItemFocus:x.useCallback(G=>T(G),[T]),onItemShiftTab:x.useCallback(()=>_(!0),[]),onFocusableItemAdd:x.useCallback(()=>$(G=>G+1),[]),onFocusableItemRemove:x.useCallback(()=>$(G=>G-1),[]),children:g.jsx(Fe.div,{tabIndex:A||j===0?-1:0,"data-orientation":i,...y,ref:w,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{z.current=!0}),onFocus:pe(e.onFocus,G=>{const ee=!z.current;if(G.target===G.currentTarget&&ee&&!A){const P=new CustomEvent(Oh,QI);if(G.currentTarget.dispatchEvent(P),!P.defaultPrevented){const ne=O().filter(L=>L.focusable),ae=ne.find(L=>L.active),le=ne.find(L=>L.id===C),Q=[ae,le,...ne].filter(Boolean).map(L=>L.ref.current);bk(Q,m)}}z.current=!1}),onBlur:pe(e.onBlur,()=>_(!1))})})}),vk="RovingFocusGroupItem",xk=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:o=!1,tabStopId:s,children:c,...f}=e,h=$a(),d=s||h,m=e8(vk,r),y=m.currentTabStopId===d,b=mk(r),{onFocusableItemAdd:w,onFocusableItemRemove:k,currentTabStopId:C}=m;return x.useEffect(()=>{if(i)return w(),()=>k()},[i,w,k]),g.jsx(mp.ItemSlot,{scope:r,id:d,focusable:i,active:o,children:g.jsx(Fe.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...f,ref:n,onMouseDown:pe(e.onMouseDown,T=>{i?m.onItemFocus(d):T.preventDefault()}),onFocus:pe(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:pe(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){m.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const A=a8(T,m.orientation,m.dir);if(A!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let N=b().filter(O=>O.focusable).map(O=>O.ref.current);if(A==="last")N.reverse();else if(A==="prev"||A==="next"){A==="prev"&&N.reverse();const O=N.indexOf(T.currentTarget);N=m.loop?i8(N,O+1):N.slice(O+1)}setTimeout(()=>bk(N))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:C!=null}):c})})});xk.displayName=vk;var n8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function r8(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function a8(e,n,r){const i=r8(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return n8[i]}function bk(e,n=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:n}),document.activeElement!==r))return}function i8(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var l8=yk,o8=xk,gp=["Enter"," "],s8=["ArrowDown","PageUp","Home"],wk=["ArrowUp","PageDown","End"],u8=[...s8,...wk],c8={ltr:[...gp,"ArrowRight"],rtl:[...gp,"ArrowLeft"]},f8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rs="Menu",[zo,d8,h8]=Tp(rs),[Qa,Sk]=Xn(rs,[h8,wc,gk]),Lc=wc(),Ek=gk(),[p8,Za]=Qa(rs),[m8,as]=Qa(rs),kk=e=>{const{__scopeMenu:n,open:r=!1,children:i,dir:o,onOpenChange:s,modal:c=!0}=e,f=Lc(n),[h,d]=x.useState(null),m=x.useRef(!1),y=kt(s),b=wm(o);return x.useEffect(()=>{const w=()=>{m.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>m.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),g.jsx(Bw,{...f,children:g.jsx(p8,{scope:n,open:r,onOpenChange:y,content:h,onContentChange:d,children:g.jsx(m8,{scope:n,onClose:x.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:m,dir:b,modal:c,children:i})})})};kk.displayName=rs;var g8="MenuAnchor",Am=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,o=Lc(r);return g.jsx(Uw,{...o,...i,ref:n})});Am.displayName=g8;var Tm="MenuPortal",[y8,Ck]=Qa(Tm,{forceMount:void 0}),Ak=e=>{const{__scopeMenu:n,forceMount:r,children:i,container:o}=e,s=Za(Tm,n);return g.jsx(y8,{scope:n,forceMount:r,children:g.jsx(Zt,{present:r||s.open,children:g.jsx(fc,{asChild:!0,container:o,children:i})})})};Ak.displayName=Tm;var Dn="MenuContent",[v8,Rm]=Qa(Dn),Tk=x.forwardRef((e,n)=>{const r=Ck(Dn,e.__scopeMenu),{forceMount:i=r.forceMount,...o}=e,s=Za(Dn,e.__scopeMenu),c=as(Dn,e.__scopeMenu);return g.jsx(zo.Provider,{scope:e.__scopeMenu,children:g.jsx(Zt,{present:i||s.open,children:g.jsx(zo.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(x8,{...o,ref:n}):g.jsx(b8,{...o,ref:n})})})})}),x8=x.forwardRef((e,n)=>{const r=Za(Dn,e.__scopeMenu),i=x.useRef(null),o=Xe(n,i);return x.useEffect(()=>{const s=i.current;if(s)return X1(s)},[]),g.jsx(_m,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),b8=x.forwardRef((e,n)=>{const r=Za(Dn,e.__scopeMenu);return g.jsx(_m,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),w8=Wi("MenuContent.ScrollLock"),_m=x.forwardRef((e,n)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:w,disableOutsideScroll:k,...C}=e,T=Za(Dn,r),A=as(Dn,r),_=Lc(r),N=Ek(r),O=d8(r),[z,j]=x.useState(null),$=x.useRef(null),G=Xe(n,$,T.onContentChange),ee=x.useRef(0),P=x.useRef(""),ne=x.useRef(0),ae=x.useRef(null),le=x.useRef("right"),H=x.useRef(0),Q=k?zp:x.Fragment,L=k?{as:w8,allowPinchZoom:!0}:void 0,K=J=>{const E=P.current+J,Z=O().filter(xe=>!xe.disabled),oe=document.activeElement,M=Z.find(xe=>xe.ref.current===oe)?.textValue,se=Z.map(xe=>xe.textValue),Se=D8(se,E,M),he=Z.find(xe=>xe.textValue===Se)?.ref.current;(function xe(Ee){P.current=Ee,window.clearTimeout(ee.current),Ee!==""&&(ee.current=window.setTimeout(()=>xe(""),1e3))})(E),he&&setTimeout(()=>he.focus())};x.useEffect(()=>()=>window.clearTimeout(ee.current),[]),U1();const U=x.useCallback(J=>le.current===ae.current?.side&&L8(J,ae.current?.area),[]);return g.jsx(v8,{scope:r,searchRef:P,onItemEnter:x.useCallback(J=>{U(J)&&J.preventDefault()},[U]),onItemLeave:x.useCallback(J=>{U(J)||($.current?.focus(),j(null))},[U]),onTriggerLeave:x.useCallback(J=>{U(J)&&J.preventDefault()},[U]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:x.useCallback(J=>{ae.current=J},[]),children:g.jsx(Q,{...L,children:g.jsx(Lp,{asChild:!0,trapped:o,onMountAutoFocus:pe(s,J=>{J.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:w,children:g.jsx(l8,{asChild:!0,...N,dir:A.dir,orientation:"vertical",loop:i,currentTabStopId:z,onCurrentTabStopIdChange:j,onEntryFocus:pe(h,J=>{A.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(Hw,{role:"menu","aria-orientation":"vertical","data-state":qk(T.open),"data-radix-menu-content":"",dir:A.dir,..._,...C,ref:G,style:{outline:"none",...C.style},onKeyDown:pe(C.onKeyDown,J=>{const Z=J.target.closest("[data-radix-menu-content]")===J.currentTarget,oe=J.ctrlKey||J.altKey||J.metaKey,M=J.key.length===1;Z&&(J.key==="Tab"&&J.preventDefault(),!oe&&M&&K(J.key));const se=$.current;if(J.target!==se||!u8.includes(J.key))return;J.preventDefault();const he=O().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);wk.includes(J.key)&&he.reverse(),M8(he)}),onBlur:pe(e.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(ee.current),P.current="")}),onPointerMove:pe(e.onPointerMove,Po(J=>{const E=J.target,Z=H.current!==J.clientX;if(J.currentTarget.contains(E)&&Z){const oe=J.clientX>H.current?"right":"left";le.current=oe,H.current=J.clientX}}))})})})})})})});Tk.displayName=Dn;var S8="MenuGroup",Nm=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(Fe.div,{role:"group",...i,ref:n})});Nm.displayName=S8;var E8="MenuLabel",Rk=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(Fe.div,{...i,ref:n})});Rk.displayName=E8;var nc="MenuItem",m0="menu.itemSelect",zc=x.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:i,...o}=e,s=x.useRef(null),c=as(nc,e.__scopeMenu),f=Rm(nc,e.__scopeMenu),h=Xe(n,s),d=x.useRef(!1),m=()=>{const y=s.current;if(!r&&y){const b=new CustomEvent(m0,{bubbles:!0,cancelable:!0});y.addEventListener(m0,w=>i?.(w),{once:!0}),Rp(y,b),b.defaultPrevented?d.current=!1:c.onClose()}};return g.jsx(_k,{...o,ref:h,disabled:r,onClick:pe(e.onClick,m),onPointerDown:y=>{e.onPointerDown?.(y),d.current=!0},onPointerUp:pe(e.onPointerUp,y=>{d.current||y.currentTarget?.click()}),onKeyDown:pe(e.onKeyDown,y=>{const b=f.searchRef.current!=="";r||b&&y.key===" "||gp.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});zc.displayName=nc;var _k=x.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:i=!1,textValue:o,...s}=e,c=Rm(nc,r),f=Ek(r),h=x.useRef(null),d=Xe(n,h),[m,y]=x.useState(!1),[b,w]=x.useState("");return x.useEffect(()=>{const k=h.current;k&&w((k.textContent??"").trim())},[s.children]),g.jsx(zo.ItemSlot,{scope:r,disabled:i,textValue:o??b,children:g.jsx(o8,{asChild:!0,...f,focusable:!i,children:g.jsx(Fe.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:d,onPointerMove:pe(e.onPointerMove,Po(k=>{i?c.onItemLeave(k):(c.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,Po(k=>c.onItemLeave(k))),onFocus:pe(e.onFocus,()=>y(!0)),onBlur:pe(e.onBlur,()=>y(!1))})})})}),k8="MenuCheckboxItem",Nk=x.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:i,...o}=e;return g.jsx(Lk,{scope:e.__scopeMenu,checked:r,children:g.jsx(zc,{role:"menuitemcheckbox","aria-checked":rc(r)?"mixed":r,...o,ref:n,"data-state":jm(r),onSelect:pe(o.onSelect,()=>i?.(rc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Nk.displayName=k8;var Mk="MenuRadioGroup",[C8,A8]=Qa(Mk,{value:void 0,onValueChange:()=>{}}),jk=x.forwardRef((e,n)=>{const{value:r,onValueChange:i,...o}=e,s=kt(i);return g.jsx(C8,{scope:e.__scopeMenu,value:r,onValueChange:s,children:g.jsx(Nm,{...o,ref:n})})});jk.displayName=Mk;var Dk="MenuRadioItem",Ok=x.forwardRef((e,n)=>{const{value:r,...i}=e,o=A8(Dk,e.__scopeMenu),s=r===o.value;return g.jsx(Lk,{scope:e.__scopeMenu,checked:s,children:g.jsx(zc,{role:"menuitemradio","aria-checked":s,...i,ref:n,"data-state":jm(s),onSelect:pe(i.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Ok.displayName=Dk;var Mm="MenuItemIndicator",[Lk,T8]=Qa(Mm,{checked:!1}),zk=x.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:i,...o}=e,s=T8(Mm,r);return g.jsx(Zt,{present:i||rc(s.checked)||s.checked===!0,children:g.jsx(Fe.span,{...o,ref:n,"data-state":jm(s.checked)})})});zk.displayName=Mm;var R8="MenuSeparator",Pk=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(Fe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})});Pk.displayName=R8;var _8="MenuArrow",Ik=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,o=Lc(r);return g.jsx(Fw,{...o,...i,ref:n})});Ik.displayName=_8;var N8="MenuSub",[MB,Bk]=Qa(N8),bo="MenuSubTrigger",Uk=x.forwardRef((e,n)=>{const r=Za(bo,e.__scopeMenu),i=as(bo,e.__scopeMenu),o=Bk(bo,e.__scopeMenu),s=Rm(bo,e.__scopeMenu),c=x.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=s,d={__scopeMenu:e.__scopeMenu},m=x.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return x.useEffect(()=>m,[m]),x.useEffect(()=>{const y=f.current;return()=>{window.clearTimeout(y),h(null)}},[f,h]),g.jsx(Am,{asChild:!0,...d,children:g.jsx(_k,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":qk(r.open),...e,ref:cc(n,o.onTriggerChange),onClick:y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,Po(y=>{s.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:pe(e.onPointerLeave,Po(y=>{m();const b=r.content?.getBoundingClientRect();if(b){const w=r.content?.dataset.side,k=w==="right",C=k?-5:5,T=b[k?"left":"right"],A=b[k?"right":"left"];s.onPointerGraceIntentChange({area:[{x:y.clientX+C,y:y.clientY},{x:T,y:b.top},{x:A,y:b.top},{x:A,y:b.bottom},{x:T,y:b.bottom}],side:w}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(y),y.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,y=>{const b=s.searchRef.current!=="";e.disabled||b&&y.key===" "||c8[i.dir].includes(y.key)&&(r.onOpenChange(!0),r.content?.focus(),y.preventDefault())})})})});Uk.displayName=bo;var Hk="MenuSubContent",Fk=x.forwardRef((e,n)=>{const r=Ck(Dn,e.__scopeMenu),{forceMount:i=r.forceMount,...o}=e,s=Za(Dn,e.__scopeMenu),c=as(Dn,e.__scopeMenu),f=Bk(Hk,e.__scopeMenu),h=x.useRef(null),d=Xe(n,h);return g.jsx(zo.Provider,{scope:e.__scopeMenu,children:g.jsx(Zt,{present:i||s.open,children:g.jsx(zo.Slot,{scope:e.__scopeMenu,children:g.jsx(_m,{id:f.contentId,"aria-labelledby":f.triggerId,...o,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&h.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:pe(e.onFocusOutside,m=>{m.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:pe(e.onKeyDown,m=>{const y=m.currentTarget.contains(m.target),b=f8[c.dir].includes(m.key);y&&b&&(s.onOpenChange(!1),f.trigger?.focus(),m.preventDefault())})})})})})});Fk.displayName=Hk;function qk(e){return e?"open":"closed"}function rc(e){return e==="indeterminate"}function jm(e){return rc(e)?"indeterminate":e?"checked":"unchecked"}function M8(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function j8(e,n){return e.map((r,i)=>e[(n+i)%e.length])}function D8(e,n,r){const o=n.length>1&&Array.from(n).every(d=>d===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=j8(e,Math.max(s,0));o.length===1&&(c=c.filter(d=>d!==r));const h=c.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return h!==r?h:void 0}function O8(e,n){const{x:r,y:i}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],h=n[c],d=f.x,m=f.y,y=h.x,b=h.y;m>i!=b>i&&r<(y-d)*(i-m)/(b-m)+d&&(o=!o)}return o}function L8(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return O8(r,n)}function Po(e){return n=>n.pointerType==="mouse"?e(n):void 0}var z8=kk,P8=Am,I8=Ak,B8=Tk,U8=Nm,H8=Rk,F8=zc,q8=Nk,V8=jk,$8=Ok,G8=zk,Y8=Pk,K8=Ik,X8=Uk,Q8=Fk,Pc="DropdownMenu",[Z8,jB]=Xn(Pc,[Sk]),Wt=Sk(),[W8,Vk]=Z8(Pc),$k=e=>{const{__scopeDropdownMenu:n,children:r,dir:i,open:o,defaultOpen:s,onOpenChange:c,modal:f=!0}=e,h=Wt(n),d=x.useRef(null),[m,y]=ol({prop:o,defaultProp:s??!1,onChange:c,caller:Pc});return g.jsx(W8,{scope:n,triggerId:$a(),triggerRef:d,contentId:$a(),open:m,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(b=>!b),[y]),modal:f,children:g.jsx(z8,{...h,open:m,onOpenChange:y,dir:i,modal:f,children:r})})};$k.displayName=Pc;var Gk="DropdownMenuTrigger",Yk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...o}=e,s=Vk(Gk,r),c=Wt(r);return g.jsx(P8,{asChild:!0,...c,children:g.jsx(Fe.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:cc(n,s.triggerRef),onPointerDown:pe(e.onPointerDown,f=>{!i&&f.button===0&&f.ctrlKey===!1&&(s.onOpenToggle(),s.open||f.preventDefault())}),onKeyDown:pe(e.onKeyDown,f=>{i||(["Enter"," "].includes(f.key)&&s.onOpenToggle(),f.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});Yk.displayName=Gk;var J8="DropdownMenuPortal",Kk=e=>{const{__scopeDropdownMenu:n,...r}=e,i=Wt(n);return g.jsx(I8,{...i,...r})};Kk.displayName=J8;var Xk="DropdownMenuContent",Qk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Vk(Xk,r),s=Wt(r),c=x.useRef(!1);return g.jsx(B8,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...i,ref:n,onCloseAutoFocus:pe(e.onCloseAutoFocus,f=>{c.current||o.triggerRef.current?.focus(),c.current=!1,f.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,f=>{const h=f.detail.originalEvent,d=h.button===0&&h.ctrlKey===!0,m=h.button===2||d;(!o.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qk.displayName=Xk;var e9="DropdownMenuGroup",t9=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(U8,{...o,...i,ref:n})});t9.displayName=e9;var n9="DropdownMenuLabel",Zk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(H8,{...o,...i,ref:n})});Zk.displayName=n9;var r9="DropdownMenuItem",Wk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(F8,{...o,...i,ref:n})});Wk.displayName=r9;var a9="DropdownMenuCheckboxItem",Jk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(q8,{...o,...i,ref:n})});Jk.displayName=a9;var i9="DropdownMenuRadioGroup",l9=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(V8,{...o,...i,ref:n})});l9.displayName=i9;var o9="DropdownMenuRadioItem",eC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx($8,{...o,...i,ref:n})});eC.displayName=o9;var s9="DropdownMenuItemIndicator",tC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(G8,{...o,...i,ref:n})});tC.displayName=s9;var u9="DropdownMenuSeparator",nC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(Y8,{...o,...i,ref:n})});nC.displayName=u9;var c9="DropdownMenuArrow",f9=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(K8,{...o,...i,ref:n})});f9.displayName=c9;var d9="DropdownMenuSubTrigger",rC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(X8,{...o,...i,ref:n})});rC.displayName=d9;var h9="DropdownMenuSubContent",aC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(Q8,{...o,...i,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aC.displayName=h9;var p9=$k,m9=Yk,g9=Kk,iC=Qk,lC=Zk,oC=Wk,sC=Jk,uC=eC,cC=tC,fC=nC,dC=rC,hC=aC;const y9=p9,v9=m9,x9=x.forwardRef(({className:e,inset:n,children:r,...i},o)=>g.jsxs(dC,{ref:o,className:fe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...i,children:[r,g.jsx(tN,{className:"ml-auto h-4 w-4"})]}));x9.displayName=dC.displayName;const b9=x.forwardRef(({className:e,...n},r)=>g.jsx(hC,{ref:r,className:fe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));b9.displayName=hC.displayName;const pC=x.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(g9,{children:g.jsx(iC,{ref:i,sideOffset:n,className:fe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));pC.displayName=iC.displayName;const mC=x.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(oC,{ref:i,className:fe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...r}));mC.displayName=oC.displayName;const w9=x.forwardRef(({className:e,children:n,checked:r,...i},o)=>g.jsxs(sC,{ref:o,className:fe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...i,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(cC,{children:g.jsx(jp,{className:"h-4 w-4"})})}),n]}));w9.displayName=sC.displayName;const S9=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(uC,{ref:i,className:fe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(cC,{children:g.jsx(rN,{className:"h-2 w-2 fill-current"})})}),n]}));S9.displayName=uC.displayName;const gC=x.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(lC,{ref:i,className:fe("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));gC.displayName=lC.displayName;const yC=x.forwardRef(({className:e,...n},r)=>g.jsx(fC,{ref:r,className:fe("-mx-1 my-1 h-px bg-muted",e),...n}));yC.displayName=fC.displayName;function E9(){const[e,n]=x.useState(!1),[r,i]=x.useState(null),[o,s]=x.useState(null),[c,f]=x.useState(null),[h,d]=x.useState("Coconut"),[m,y]=x.useState(null),[b,w]=x.useState(null),[k,C]=x.useState(!1),T=bn(),A=Bo(),_=T.pathname,{user:N,logout:O,authEnabled:z}=q0(),j=new URLSearchParams(T.search),$=j.get("hideNav")==="true",G=j.get("hideAssistant")==="true",ee=j.get("expandAssistant")==="true",P=j.get("fullScreenNoEscape")==="true";x.useEffect(()=>{if(G){n(!1);return}if(P||ee){n(!0),C(!0);return}const H=localStorage.getItem("ai-sidebar-open");H!==null&&n(JSON.parse(H))},[]),x.useEffect(()=>{const H=Q=>{const L=Q.detail;L&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),y(L))};return window.addEventListener("discuss-in-chat",H),()=>{window.removeEventListener("discuss-in-chat",H)}},[]),x.useEffect(()=>{const H=Q=>{const L=Q.detail;L?.prompt&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),w(L.prompt))};return window.addEventListener("customize-prompt-in-assistant",H),()=>{window.removeEventListener("customize-prompt-in-assistant",H)}},[]),x.useEffect(()=>{const H=()=>{n(!0),localStorage.setItem("ai-sidebar-open","true"),C(!0)};return window.addEventListener("open-assistant-expanded",H),()=>{window.removeEventListener("open-assistant-expanded",H)}},[]),x.useEffect(()=>{const H=Q=>{if((Q.metaKey||Q.ctrlKey)&&Q.shiftKey&&Q.key==="l"){Q.preventDefault(),e||(n(!0),localStorage.setItem("ai-sidebar-open","true")),window.dispatchEvent(new CustomEvent("toggle-assistant-fullscreen"));return}(Q.metaKey||Q.ctrlKey)&&Q.key==="l"&&(Q.preventDefault(),ne())};return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}},[e]),x.useEffect(()=>{const H=async()=>{try{const L=await fetch(`${xt}/api/v1/config`);if(L.ok){const K=await L.json();if(K.success&&K.data?.coconut){const{firstName:U,lastName:J}=K.data.coconut;U&&J?d(`${U} ${J}`):(U||J)&&d(U||J)}}}catch(L){console.error("Error fetching config:",L)}};H();const Q=()=>{H()};return window.addEventListener("config-updated",Q),()=>{window.removeEventListener("config-updated",Q)}},[]);const ne=()=>{const H=!e;n(H),localStorage.setItem("ai-sidebar-open",JSON.stringify(H))},ae=async()=>{try{await O(),Uh({title:"Logged out",description:"You have been logged out successfully"}),A("/login")}catch(H){console.error("Logout error:",H),Uh({title:"Error",description:"Failed to logout",variant:"destructive"})}};x.useEffect(()=>{(async()=>{try{const Q=await fetch(`${xt}/api/v1/context/project`);if(Q.ok){const L=await Q.text();s(L)}else s(null)}catch(Q){console.error("Error fetching project context:",Q),s(null)}if(_.includes("/context/architecture")||_.includes("/tasks"))try{const Q=await fetch(`${xt}/api/v1/context/architecture`);if(Q.ok){const L=await Q.text();f(L)}else f(null)}catch(Q){console.error("Error fetching architecture context:",Q),f(null)}else f(null);if(_.includes("/tasks")&&(_.includes("/edit")||_.match(/\/tasks\/[^/]+$/))){const L=_.match(/\/tasks\/([^/]+)(?:\/edit)?/)?.[1];if(L)try{const U=await(await fetch(`${xt}/api/v1/tasks/${L}`)).json();if(U.success){const J=U.data,E=`Task ID: ${L}
|
|
467
|
+
--- End System Persona ---`,xe(!0));const Je=(await Promise.all(J.map(async $e=>{if($e.content&&$e.content!=="Loading..."&&$e.content!=="Content not available")return $e;try{const en=await dp($e);return K.current.set($e.id,en),en}catch(en){return console.error(`Failed to load content for ${$e.name}:`,en),$e}}))).filter($e=>$e.content&&$e.content!=="Loading..."&&$e.content!=="Content not available").map($e=>({name:$e.name,path:$e.path,type:$e.type,content:$e.content})),Ht={role:"user",content:m};w($e=>[...$e,Ht]),y(""),C(!0),A(!0);const Sa=new AbortController;Jt.current=Sa;try{const en=[...b,Ht].filter(ot=>ot.role==="user"||ot.role==="assistant").map((ot,st,gt)=>st===gt.length-1&&ot.role==="user"?{role:ot.role,content:X}:ot),In={message:X,history:en,context:r?.type,contextContent:r?.content,skillPersona:be,attachedContextFiles:Je.length>0?Je:void 0},Bn=await fetch(`${xt}/api/v1/ai`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(In),signal:Sa.signal});if(!Bn.ok){let ot="Failed to get AI response";try{const st=await Bn.json();ot=st.error||st.message||ot,st.status&&(ot=`${ot} (${st.status})`)}catch{ot=`${Bn.statusText||ot} (${Bn.status})`}throw new Error(ot)}if(Bn.body){const ot=Bn.body.getReader(),st=new TextDecoder;let gt="",Jn=!1;try{for(;;){const{done:Un,value:ei}=await ot.read();if(Un)break;gt+=st.decode(ei,{stream:!0}),Jn?w(gr=>{const Sn=[...gr];return Sn[Sn.length-1]={role:"assistant",content:gt},Sn}):(w(gr=>[...gr,{role:"assistant",content:gt}]),C(!1),Jn=!0)}gt.trim()||console.warn("Stream completed with no content")}catch(Un){if(!(Un instanceof DOMException&&Un.name==="AbortError")){console.error("Streaming error:",Un);const ei=`Sorry, I encountered a streaming error: ${Un instanceof Error?Un.message:"Unknown error"}`;w(Jn?gr=>{const Sn=[...gr];return Sn[Sn.length-1]?.role==="assistant"&&(Sn[Sn.length-1]={role:"assistant",content:ei}),Sn}:gr=>[...gr,{role:"assistant",content:ei}])}}}}catch($e){if($e instanceof DOMException&&$e.name==="AbortError")w(en=>{const In=[...en],Bn=In[In.length-1];return Bn?.role==="assistant"&&!Bn.content&&In.pop(),In});else{console.error("Error calling AI:",$e);const en={role:"assistant",content:`Sorry, I encountered an error: ${$e instanceof Error?$e.message:"Unknown error"}`};w(In=>[...In,en])}}finally{Jt.current=null,C(!1),A(!1)}},Ot=()=>{Jt.current&&(Jt.current.abort(),Jt.current=null),C(!1),A(!1)},mt=X=>{X.files.forEach(be=>{const Te=K.current.get(be.id);(!Te||Te.content!==be.content)&&K.current.set(be.id,be)}),Q(X.selectedIds),L.current=X.selectedIds;const de=new Map(X.files.map(be=>[be.id,be])),ve=X.selectedIds.map(be=>{const Te=de.get(be);if(Te)return Te;const Je=K.current.get(be);return Je||ae.find(Ht=>Ht.id===be)||null}).filter(be=>be!==null);E(ve),Ur(X.selectedIds).catch(be=>{console.error("Error syncing context after manual selection:",be)})},Ut=g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex h-full w-full flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between p-4 border-b flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Lu,{className:fe(Ee?"h-6 w-6":"h-5 w-5")}),g.jsx("div",{children:g.jsx("h2",{className:fe("font-semibold leading-tight",Ee?"text-xl":"text-lg"),children:"Coconut Assistant"})})]}),g.jsx("div",{className:fe("flex items-center gap-1",_&&"mr-8"),children:Ee&&!d?g.jsx(pt,{onClick:()=>Qe(!1),size:"icon",variant:"ghost",className:"h-8 w-8",title:"Exit Expanded View (Esc)",children:g.jsx(Yi,{className:"h-4 w-4"})}):Ee?null:g.jsx(pt,{onClick:()=>{Qe(!0),setTimeout(()=>wn.current?.focus(),100)},size:"icon",variant:"outline",className:"h-8 w-8",title:"Expand View (⌘⇧L)",children:g.jsx(fN,{className:"h-4 w-4"})})})]}),g.jsx("div",{className:"px-4 py-2 border-b flex-shrink-0",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs(pt,{onClick:()=>{z(!O),O||ue()},size:"sm",variant:"outline",className:"h-8 shrink-0 gap-1.5",title:O?"View Chat":"Chat History",children:[g.jsx(CN,{className:"h-4 w-4"}),O?"View Chat":"History"]}),g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsxs(pt,{onClick:W,disabled:b.length===0||!ba,size:"sm",variant:"outline",className:"h-8 shrink-0 gap-1.5",title:"Save Chat",children:[g.jsx(XN,{className:"h-4 w-4"}),"Save"]}),g.jsxs(b9,{children:[g.jsx(w9,{asChild:!0,children:g.jsxs(pt,{disabled:b.length===0&&J.length===0&&!se,size:"sm",variant:"outline",className:"h-8 shrink-0 gap-1.5 bg-red-500 text-white border-red-500 hover:bg-red-600 hover:text-white hover:border-red-600",title:"New Chat (⌘⇧N)",children:[g.jsx(sM,{className:"h-4 w-4"}),"New"]})}),g.jsxs(BE,{children:[g.jsxs(UE,{children:[g.jsx(FE,{children:"Clear Chat"}),g.jsx(qE,{children:"This clears all messages, removes selected context files, and resets the selected agent. This action cannot be undone."})]}),g.jsxs(HE,{children:[g.jsx($E,{children:"Cancel"}),g.jsx(VE,{onClick:Ye,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Clear Chat"})]})]})]})]})]})}),O&&g.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-2 min-h-0",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"font-medium",children:"Chat History"}),g.jsx(pt,{onClick:()=>z(!1),size:"sm",variant:"ghost",children:g.jsx(Yi,{className:"h-4 w-4"})})]}),G?g.jsx("div",{className:"text-center text-muted-foreground py-8",children:g.jsxs("div",{className:"flex items-center justify-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):j.length===0?g.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[g.jsx(rh,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No saved chats yet"})]}):g.jsx("div",{className:"space-y-2",children:j.map(X=>g.jsx("div",{className:"border rounded-lg p-3 bg-muted/30 hover:bg-muted/60 cursor-pointer group transition-colors",onClick:()=>ke(X.id),children:g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsxs("div",{className:"flex items-start gap-2.5 flex-1 min-w-0",children:[g.jsx("div",{className:"mt-0.5 shrink-0 w-7 h-7 rounded-md bg-primary/10 flex items-center justify-center",children:g.jsx(rh,{className:"h-3.5 w-3.5 text-primary/70"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h4",{className:"text-sm font-medium truncate",children:X.title}),g.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx(W_,{className:"h-3 w-3"}),new Date(X.updatedAt).toLocaleDateString()]}),g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx(rh,{className:"h-3 w-3"}),X.messages.length]}),g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx(Lu,{className:"h-3 w-3"}),X.model.split("/")[1]||X.model]})]})]})]}),g.jsx(pt,{onClick:de=>{de.stopPropagation(),Ae(X.id)},size:"icon",variant:"ghost",className:"h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:g.jsx(pM,{className:"h-3 w-3"})})]})},X.id))})]}),!O&&g.jsxs("div",{ref:Br,className:fe("flex-1 w-full overflow-y-auto space-y-4 min-h-0",Ee?"p-6 max-w-4xl mx-auto":"p-4"),children:[b.length===0&&g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground py-12 px-2",children:[g.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-6",children:g.jsx(Lu,{className:"h-5 w-5 text-primary"})}),g.jsx("h3",{className:"text-base font-semibold text-foreground mb-1",children:"Coconut Assistant"}),g.jsx("p",{className:"text-sm text-muted-foreground/70 mb-4 text-center max-w-[260px]",children:"Try one of these to get started, or type your own question below."}),g.jsx("div",{className:"flex flex-col gap-2 w-full max-w-[280px]",children:["What's been happening?","Search the knowledge base for...","Create an image showing...","Help me research...","Add the following task..."].map(X=>g.jsx("button",{onClick:()=>{y(X),setTimeout(()=>{const de=wn.current;de&&(de.focus(),de.setSelectionRange(X.length,X.length))},0)},className:"text-sm text-left text-primary-foreground/70 hover:text-primary-foreground bg-primary rounded-xl px-4 py-2.5 transition-colors",children:X.trim()},X))}),g.jsxs("p",{className:"mt-4 text-xs text-muted-foreground/50 flex items-center gap-1.5",children:[g.jsx(gh,{className:"text-[10px] px-1.5 h-4",children:"⌘"}),g.jsx(gh,{className:"text-[10px] px-1.5 h-4",children:"⇧"}),g.jsx(gh,{className:"text-[10px] px-1.5 h-4",children:"L"}),"to go full screen"]})]}),b.map((X,de)=>{const ve=X.role==="assistant",be=ve?G9(X.content):{cleanedContent:X.content,actions:[]},Te=ve?be.cleanedContent.length>0?be.cleanedContent:be.actions.length>0?"Proposed knowledge update available below.":X.content:X.content;return g.jsx("div",{className:fe(X.role==="user"?fe("rounded-2xl bg-primary text-primary-foreground p-3 min-w-[80px] max-w-[85%] ml-auto",Ee&&"max-w-[70%]"):X.role==="system"?"rounded-lg bg-muted/50 text-muted-foreground text-center text-xs py-2 px-3 mx-auto max-w-[90%]":"px-1 mr-auto w-full"),children:ve?g.jsxs("div",{className:"space-y-2",children:[g.jsx(ts,{className:"text-sm [&_.prose]:text-sm [&_.prose-p]:text-sm [&_.prose-li]:text-sm [&_.prose-code]:text-xs",children:Te}),(()=>{const Je=T4(X.content);return Je.length===0?null:g.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:Je.map(Ht=>g.jsx("div",{className:"block cursor-pointer",onClick:()=>N(`/resources/${Ht}`),children:g.jsx("img",{src:`${xt}/api/v1/resources/${Ht}/thumbnail`,alt:Ht,className:"w-32 h-24 object-cover rounded-lg border hover:opacity-80 transition-opacity",onError:Sa=>{Sa.target.style.display="none"}})},Ht))})})(),be.actions.map((Je,Ht)=>g.jsx(Q9,{action:Je,onApply:Bt,fetchDocumentContent:Pn},`${de}-knowledge-${Ht}`)),!k&&X.content.length>0&&g.jsx("div",{className:"flex justify-start gap-1",children:g.jsx(pt,{onClick:()=>Yt(X.content,de),size:"icon",variant:"ghost",className:"h-5 w-5 opacity-60 hover:opacity-100",title:bt===de?"Copied!":"Copy message",children:bt===de?g.jsx(jp,{className:"h-3 w-3"}):g.jsx(uN,{className:"h-3 w-3"})})})]}):g.jsx("div",{className:"text-sm",children:X.content})},de)}),k&&g.jsx("div",{className:"px-1 mr-auto",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}),g.jsx("div",{ref:Dt})]}),!O&&g.jsx("div",{className:"border-t flex-shrink-0 w-full",children:g.jsxs("div",{className:fe(Ee?"px-6 pb-6 pt-3 max-w-4xl mx-auto":"px-4 pb-4 pt-2"),children:[g.jsx("div",{className:"mb-2",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"flex-1 min-w-0",children:Z>0?g.jsx("div",{className:"flex flex-wrap gap-1",children:J.map(X=>g.jsxs("div",{className:fe("flex items-center gap-1 text-xs px-2 py-1 rounded-md","bg-primary/10 text-primary"),children:[g.jsx("span",{children:X.name}),g.jsx("button",{onClick:de=>{de.stopPropagation();const ve=L.current.filter(be=>be!==X.id);Q(ve),L.current=ve,E(be=>be.filter(Te=>Te.id!==X.id)),Ur(ve).catch(be=>{console.error("Error syncing context after removal:",be)})},className:fe("ml-1 rounded-full p-0.5 transition-colors","hover:bg-primary/20"),disabled:!1,title:"Remove from context",children:g.jsx(Yi,{className:"h-3 w-3"})})]},X.id))}):g.jsxs("button",{onClick:()=>ne(!0),className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",disabled:!1,children:[g.jsx(YN,{className:"h-3.5 w-3.5"}),"Add context"]})}),g.jsx("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:g.jsx(pt,{onClick:()=>ne(!0),size:"icon",variant:"ghost",className:"h-6 w-6",title:"Select Context Files (⌘⇧K)",disabled:!1,children:g.jsx(zN,{className:"h-4 w-4"})})})]})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(pk,{ref:wn,value:m,onChange:X=>y(X.target.value),onKeyDown:X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),sn())},placeholder:"How can I help?",className:fe("flex-1 resize-none",Ee?"min-h-[3rem] max-h-40":"min-h-[2.5rem] max-h-32"),"aria-label":"Assistant message input"}),T?g.jsx(pt,{onClick:Ot,size:"icon",variant:"outline",className:"shrink-0",title:"Stop response (Esc)","aria-label":"Stop response",children:g.jsx(cM,{className:"h-4 w-4"})}):g.jsx(pt,{onClick:sn,disabled:!m.trim(),size:"icon",className:"shrink-0",children:g.jsx(ZN,{className:"h-4 w-4"})})]})]})})]})});return _?g.jsxs(g.Fragment,{children:[g.jsx(pw,{open:e,onOpenChange:n,children:g.jsxs(Fp,{side:"right",className:"w-96 h-full p-0 bg-sidebar border-l border-sidebar-border",children:[g.jsx(qp,{className:"sr-only",children:g.jsx(Vp,{children:"Assistant"})}),Ut]})}),g.jsx(h0,{open:P,onOpenChange:ne,onSelectionConfirm:mt,initialSelection:H}),g.jsx(p0,{open:oe,onOpenChange:M,initialSelectedId:se?.id||null,onSelect:X=>{const de={id:X.id,name:X.name,content:X.content||""};Se(de),w(ve=>[...ve,{role:"system",content:`${de.name} selected.`}])}})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:fe("fixed inset-y-0 right-0 z-10 h-dvh bg-sidebar border-l border-sidebar-border transition-all duration-300 ease-in-out",e?"w-96":"w-0 overflow-hidden"),children:g.jsx("div",{className:"w-96 h-full",children:Ut})}),g.jsx(Ac,{open:Ee,onOpenChange:X=>{!X&&d||Qe(X)},children:g.jsxs(Ko,{className:fe("p-0 gap-0 [&>button]:hidden",d?"w-screen h-screen max-w-none max-h-none rounded-none":"max-w-[96vw] w-[96vw] max-h-[96vh] h-[96vh]"),onPointerDownOutside:d?X=>X.preventDefault():void 0,onEscapeKeyDown:d?X=>X.preventDefault():void 0,children:[g.jsx(Xo,{className:"sr-only",children:g.jsx(Qo,{children:"Assistant"})}),g.jsx("div",{className:"h-full w-full flex flex-col bg-background rounded-lg overflow-hidden",children:Ut})]})}),g.jsx(h0,{open:P,onOpenChange:ne,onSelectionConfirm:mt,initialSelection:H}),g.jsx(p0,{open:oe,onOpenChange:M,initialSelectedId:se?.id||null,onSelect:X=>{const de={id:X.id,name:X.name,content:X.content||""};Se(de),w(ve=>[...ve,{role:"system",content:`${de.name} selected.`}])}})]})}var Oh="rovingFocusGroup.onEntryFocus",W9={bubbles:!1,cancelable:!0},ns="RovingFocusGroup",[mp,mk,J9]=Tp(ns),[e8,gk]=Xn(ns,[J9]),[t8,n8]=e8(ns),yk=x.forwardRef((e,n)=>g.jsx(mp.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(mp.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(r8,{...e,ref:n})})}));yk.displayName=ns;var r8=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...y}=e,b=x.useRef(null),w=Xe(n,b),k=wm(s),[C,T]=ol({prop:c,defaultProp:f??null,onChange:h,caller:ns}),[A,_]=x.useState(!1),N=kt(d),O=mk(r),z=x.useRef(!1),[j,$]=x.useState(0);return x.useEffect(()=>{const G=b.current;if(G)return G.addEventListener(Oh,N),()=>G.removeEventListener(Oh,N)},[N]),g.jsx(t8,{scope:r,orientation:i,dir:k,loop:o,currentTabStopId:C,onItemFocus:x.useCallback(G=>T(G),[T]),onItemShiftTab:x.useCallback(()=>_(!0),[]),onFocusableItemAdd:x.useCallback(()=>$(G=>G+1),[]),onFocusableItemRemove:x.useCallback(()=>$(G=>G-1),[]),children:g.jsx(Fe.div,{tabIndex:A||j===0?-1:0,"data-orientation":i,...y,ref:w,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{z.current=!0}),onFocus:pe(e.onFocus,G=>{const ee=!z.current;if(G.target===G.currentTarget&&ee&&!A){const P=new CustomEvent(Oh,W9);if(G.currentTarget.dispatchEvent(P),!P.defaultPrevented){const ne=O().filter(L=>L.focusable),ae=ne.find(L=>L.active),le=ne.find(L=>L.id===C),Q=[ae,le,...ne].filter(Boolean).map(L=>L.ref.current);bk(Q,m)}}z.current=!1}),onBlur:pe(e.onBlur,()=>_(!1))})})}),vk="RovingFocusGroupItem",xk=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:o=!1,tabStopId:s,children:c,...f}=e,h=$a(),d=s||h,m=n8(vk,r),y=m.currentTabStopId===d,b=mk(r),{onFocusableItemAdd:w,onFocusableItemRemove:k,currentTabStopId:C}=m;return x.useEffect(()=>{if(i)return w(),()=>k()},[i,w,k]),g.jsx(mp.ItemSlot,{scope:r,id:d,focusable:i,active:o,children:g.jsx(Fe.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...f,ref:n,onMouseDown:pe(e.onMouseDown,T=>{i?m.onItemFocus(d):T.preventDefault()}),onFocus:pe(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:pe(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){m.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const A=l8(T,m.orientation,m.dir);if(A!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let N=b().filter(O=>O.focusable).map(O=>O.ref.current);if(A==="last")N.reverse();else if(A==="prev"||A==="next"){A==="prev"&&N.reverse();const O=N.indexOf(T.currentTarget);N=m.loop?o8(N,O+1):N.slice(O+1)}setTimeout(()=>bk(N))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:C!=null}):c})})});xk.displayName=vk;var a8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function i8(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function l8(e,n,r){const i=i8(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return a8[i]}function bk(e,n=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:n}),document.activeElement!==r))return}function o8(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var s8=yk,u8=xk,gp=["Enter"," "],c8=["ArrowDown","PageUp","Home"],wk=["ArrowUp","PageDown","End"],f8=[...c8,...wk],d8={ltr:[...gp,"ArrowRight"],rtl:[...gp,"ArrowLeft"]},h8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rs="Menu",[zo,p8,m8]=Tp(rs),[Qa,Sk]=Xn(rs,[m8,wc,gk]),Lc=wc(),Ek=gk(),[g8,Za]=Qa(rs),[y8,as]=Qa(rs),kk=e=>{const{__scopeMenu:n,open:r=!1,children:i,dir:o,onOpenChange:s,modal:c=!0}=e,f=Lc(n),[h,d]=x.useState(null),m=x.useRef(!1),y=kt(s),b=wm(o);return x.useEffect(()=>{const w=()=>{m.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>m.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),g.jsx(Bw,{...f,children:g.jsx(g8,{scope:n,open:r,onOpenChange:y,content:h,onContentChange:d,children:g.jsx(y8,{scope:n,onClose:x.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:m,dir:b,modal:c,children:i})})})};kk.displayName=rs;var v8="MenuAnchor",Am=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,o=Lc(r);return g.jsx(Uw,{...o,...i,ref:n})});Am.displayName=v8;var Tm="MenuPortal",[x8,Ck]=Qa(Tm,{forceMount:void 0}),Ak=e=>{const{__scopeMenu:n,forceMount:r,children:i,container:o}=e,s=Za(Tm,n);return g.jsx(x8,{scope:n,forceMount:r,children:g.jsx(Zt,{present:r||s.open,children:g.jsx(fc,{asChild:!0,container:o,children:i})})})};Ak.displayName=Tm;var Dn="MenuContent",[b8,Rm]=Qa(Dn),Tk=x.forwardRef((e,n)=>{const r=Ck(Dn,e.__scopeMenu),{forceMount:i=r.forceMount,...o}=e,s=Za(Dn,e.__scopeMenu),c=as(Dn,e.__scopeMenu);return g.jsx(zo.Provider,{scope:e.__scopeMenu,children:g.jsx(Zt,{present:i||s.open,children:g.jsx(zo.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(w8,{...o,ref:n}):g.jsx(S8,{...o,ref:n})})})})}),w8=x.forwardRef((e,n)=>{const r=Za(Dn,e.__scopeMenu),i=x.useRef(null),o=Xe(n,i);return x.useEffect(()=>{const s=i.current;if(s)return X1(s)},[]),g.jsx(_m,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),S8=x.forwardRef((e,n)=>{const r=Za(Dn,e.__scopeMenu);return g.jsx(_m,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),E8=Wi("MenuContent.ScrollLock"),_m=x.forwardRef((e,n)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:w,disableOutsideScroll:k,...C}=e,T=Za(Dn,r),A=as(Dn,r),_=Lc(r),N=Ek(r),O=p8(r),[z,j]=x.useState(null),$=x.useRef(null),G=Xe(n,$,T.onContentChange),ee=x.useRef(0),P=x.useRef(""),ne=x.useRef(0),ae=x.useRef(null),le=x.useRef("right"),H=x.useRef(0),Q=k?zp:x.Fragment,L=k?{as:E8,allowPinchZoom:!0}:void 0,K=J=>{const E=P.current+J,Z=O().filter(xe=>!xe.disabled),oe=document.activeElement,M=Z.find(xe=>xe.ref.current===oe)?.textValue,se=Z.map(xe=>xe.textValue),Se=L8(se,E,M),he=Z.find(xe=>xe.textValue===Se)?.ref.current;(function xe(Ee){P.current=Ee,window.clearTimeout(ee.current),Ee!==""&&(ee.current=window.setTimeout(()=>xe(""),1e3))})(E),he&&setTimeout(()=>he.focus())};x.useEffect(()=>()=>window.clearTimeout(ee.current),[]),U1();const U=x.useCallback(J=>le.current===ae.current?.side&&P8(J,ae.current?.area),[]);return g.jsx(b8,{scope:r,searchRef:P,onItemEnter:x.useCallback(J=>{U(J)&&J.preventDefault()},[U]),onItemLeave:x.useCallback(J=>{U(J)||($.current?.focus(),j(null))},[U]),onTriggerLeave:x.useCallback(J=>{U(J)&&J.preventDefault()},[U]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:x.useCallback(J=>{ae.current=J},[]),children:g.jsx(Q,{...L,children:g.jsx(Lp,{asChild:!0,trapped:o,onMountAutoFocus:pe(s,J=>{J.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:w,children:g.jsx(s8,{asChild:!0,...N,dir:A.dir,orientation:"vertical",loop:i,currentTabStopId:z,onCurrentTabStopIdChange:j,onEntryFocus:pe(h,J=>{A.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(Hw,{role:"menu","aria-orientation":"vertical","data-state":qk(T.open),"data-radix-menu-content":"",dir:A.dir,..._,...C,ref:G,style:{outline:"none",...C.style},onKeyDown:pe(C.onKeyDown,J=>{const Z=J.target.closest("[data-radix-menu-content]")===J.currentTarget,oe=J.ctrlKey||J.altKey||J.metaKey,M=J.key.length===1;Z&&(J.key==="Tab"&&J.preventDefault(),!oe&&M&&K(J.key));const se=$.current;if(J.target!==se||!f8.includes(J.key))return;J.preventDefault();const he=O().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);wk.includes(J.key)&&he.reverse(),D8(he)}),onBlur:pe(e.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(ee.current),P.current="")}),onPointerMove:pe(e.onPointerMove,Po(J=>{const E=J.target,Z=H.current!==J.clientX;if(J.currentTarget.contains(E)&&Z){const oe=J.clientX>H.current?"right":"left";le.current=oe,H.current=J.clientX}}))})})})})})})});Tk.displayName=Dn;var k8="MenuGroup",Nm=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(Fe.div,{role:"group",...i,ref:n})});Nm.displayName=k8;var C8="MenuLabel",Rk=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(Fe.div,{...i,ref:n})});Rk.displayName=C8;var nc="MenuItem",m0="menu.itemSelect",zc=x.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:i,...o}=e,s=x.useRef(null),c=as(nc,e.__scopeMenu),f=Rm(nc,e.__scopeMenu),h=Xe(n,s),d=x.useRef(!1),m=()=>{const y=s.current;if(!r&&y){const b=new CustomEvent(m0,{bubbles:!0,cancelable:!0});y.addEventListener(m0,w=>i?.(w),{once:!0}),Rp(y,b),b.defaultPrevented?d.current=!1:c.onClose()}};return g.jsx(_k,{...o,ref:h,disabled:r,onClick:pe(e.onClick,m),onPointerDown:y=>{e.onPointerDown?.(y),d.current=!0},onPointerUp:pe(e.onPointerUp,y=>{d.current||y.currentTarget?.click()}),onKeyDown:pe(e.onKeyDown,y=>{const b=f.searchRef.current!=="";r||b&&y.key===" "||gp.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});zc.displayName=nc;var _k=x.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:i=!1,textValue:o,...s}=e,c=Rm(nc,r),f=Ek(r),h=x.useRef(null),d=Xe(n,h),[m,y]=x.useState(!1),[b,w]=x.useState("");return x.useEffect(()=>{const k=h.current;k&&w((k.textContent??"").trim())},[s.children]),g.jsx(zo.ItemSlot,{scope:r,disabled:i,textValue:o??b,children:g.jsx(u8,{asChild:!0,...f,focusable:!i,children:g.jsx(Fe.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:d,onPointerMove:pe(e.onPointerMove,Po(k=>{i?c.onItemLeave(k):(c.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,Po(k=>c.onItemLeave(k))),onFocus:pe(e.onFocus,()=>y(!0)),onBlur:pe(e.onBlur,()=>y(!1))})})})}),A8="MenuCheckboxItem",Nk=x.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:i,...o}=e;return g.jsx(Lk,{scope:e.__scopeMenu,checked:r,children:g.jsx(zc,{role:"menuitemcheckbox","aria-checked":rc(r)?"mixed":r,...o,ref:n,"data-state":jm(r),onSelect:pe(o.onSelect,()=>i?.(rc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Nk.displayName=A8;var Mk="MenuRadioGroup",[T8,R8]=Qa(Mk,{value:void 0,onValueChange:()=>{}}),jk=x.forwardRef((e,n)=>{const{value:r,onValueChange:i,...o}=e,s=kt(i);return g.jsx(T8,{scope:e.__scopeMenu,value:r,onValueChange:s,children:g.jsx(Nm,{...o,ref:n})})});jk.displayName=Mk;var Dk="MenuRadioItem",Ok=x.forwardRef((e,n)=>{const{value:r,...i}=e,o=R8(Dk,e.__scopeMenu),s=r===o.value;return g.jsx(Lk,{scope:e.__scopeMenu,checked:s,children:g.jsx(zc,{role:"menuitemradio","aria-checked":s,...i,ref:n,"data-state":jm(s),onSelect:pe(i.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Ok.displayName=Dk;var Mm="MenuItemIndicator",[Lk,_8]=Qa(Mm,{checked:!1}),zk=x.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:i,...o}=e,s=_8(Mm,r);return g.jsx(Zt,{present:i||rc(s.checked)||s.checked===!0,children:g.jsx(Fe.span,{...o,ref:n,"data-state":jm(s.checked)})})});zk.displayName=Mm;var N8="MenuSeparator",Pk=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(Fe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})});Pk.displayName=N8;var M8="MenuArrow",Ik=x.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,o=Lc(r);return g.jsx(Fw,{...o,...i,ref:n})});Ik.displayName=M8;var j8="MenuSub",[OB,Bk]=Qa(j8),bo="MenuSubTrigger",Uk=x.forwardRef((e,n)=>{const r=Za(bo,e.__scopeMenu),i=as(bo,e.__scopeMenu),o=Bk(bo,e.__scopeMenu),s=Rm(bo,e.__scopeMenu),c=x.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=s,d={__scopeMenu:e.__scopeMenu},m=x.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return x.useEffect(()=>m,[m]),x.useEffect(()=>{const y=f.current;return()=>{window.clearTimeout(y),h(null)}},[f,h]),g.jsx(Am,{asChild:!0,...d,children:g.jsx(_k,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":qk(r.open),...e,ref:cc(n,o.onTriggerChange),onClick:y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,Po(y=>{s.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:pe(e.onPointerLeave,Po(y=>{m();const b=r.content?.getBoundingClientRect();if(b){const w=r.content?.dataset.side,k=w==="right",C=k?-5:5,T=b[k?"left":"right"],A=b[k?"right":"left"];s.onPointerGraceIntentChange({area:[{x:y.clientX+C,y:y.clientY},{x:T,y:b.top},{x:A,y:b.top},{x:A,y:b.bottom},{x:T,y:b.bottom}],side:w}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(y),y.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,y=>{const b=s.searchRef.current!=="";e.disabled||b&&y.key===" "||d8[i.dir].includes(y.key)&&(r.onOpenChange(!0),r.content?.focus(),y.preventDefault())})})})});Uk.displayName=bo;var Hk="MenuSubContent",Fk=x.forwardRef((e,n)=>{const r=Ck(Dn,e.__scopeMenu),{forceMount:i=r.forceMount,...o}=e,s=Za(Dn,e.__scopeMenu),c=as(Dn,e.__scopeMenu),f=Bk(Hk,e.__scopeMenu),h=x.useRef(null),d=Xe(n,h);return g.jsx(zo.Provider,{scope:e.__scopeMenu,children:g.jsx(Zt,{present:i||s.open,children:g.jsx(zo.Slot,{scope:e.__scopeMenu,children:g.jsx(_m,{id:f.contentId,"aria-labelledby":f.triggerId,...o,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&h.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:pe(e.onFocusOutside,m=>{m.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:pe(e.onKeyDown,m=>{const y=m.currentTarget.contains(m.target),b=h8[c.dir].includes(m.key);y&&b&&(s.onOpenChange(!1),f.trigger?.focus(),m.preventDefault())})})})})})});Fk.displayName=Hk;function qk(e){return e?"open":"closed"}function rc(e){return e==="indeterminate"}function jm(e){return rc(e)?"indeterminate":e?"checked":"unchecked"}function D8(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function O8(e,n){return e.map((r,i)=>e[(n+i)%e.length])}function L8(e,n,r){const o=n.length>1&&Array.from(n).every(d=>d===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=O8(e,Math.max(s,0));o.length===1&&(c=c.filter(d=>d!==r));const h=c.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return h!==r?h:void 0}function z8(e,n){const{x:r,y:i}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],h=n[c],d=f.x,m=f.y,y=h.x,b=h.y;m>i!=b>i&&r<(y-d)*(i-m)/(b-m)+d&&(o=!o)}return o}function P8(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return z8(r,n)}function Po(e){return n=>n.pointerType==="mouse"?e(n):void 0}var I8=kk,B8=Am,U8=Ak,H8=Tk,F8=Nm,q8=Rk,V8=zc,$8=Nk,G8=jk,Y8=Ok,K8=zk,X8=Pk,Q8=Ik,Z8=Uk,W8=Fk,Pc="DropdownMenu",[J8,LB]=Xn(Pc,[Sk]),Wt=Sk(),[eI,Vk]=J8(Pc),$k=e=>{const{__scopeDropdownMenu:n,children:r,dir:i,open:o,defaultOpen:s,onOpenChange:c,modal:f=!0}=e,h=Wt(n),d=x.useRef(null),[m,y]=ol({prop:o,defaultProp:s??!1,onChange:c,caller:Pc});return g.jsx(eI,{scope:n,triggerId:$a(),triggerRef:d,contentId:$a(),open:m,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(b=>!b),[y]),modal:f,children:g.jsx(I8,{...h,open:m,onOpenChange:y,dir:i,modal:f,children:r})})};$k.displayName=Pc;var Gk="DropdownMenuTrigger",Yk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...o}=e,s=Vk(Gk,r),c=Wt(r);return g.jsx(B8,{asChild:!0,...c,children:g.jsx(Fe.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:cc(n,s.triggerRef),onPointerDown:pe(e.onPointerDown,f=>{!i&&f.button===0&&f.ctrlKey===!1&&(s.onOpenToggle(),s.open||f.preventDefault())}),onKeyDown:pe(e.onKeyDown,f=>{i||(["Enter"," "].includes(f.key)&&s.onOpenToggle(),f.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});Yk.displayName=Gk;var tI="DropdownMenuPortal",Kk=e=>{const{__scopeDropdownMenu:n,...r}=e,i=Wt(n);return g.jsx(U8,{...i,...r})};Kk.displayName=tI;var Xk="DropdownMenuContent",Qk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Vk(Xk,r),s=Wt(r),c=x.useRef(!1);return g.jsx(H8,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...i,ref:n,onCloseAutoFocus:pe(e.onCloseAutoFocus,f=>{c.current||o.triggerRef.current?.focus(),c.current=!1,f.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,f=>{const h=f.detail.originalEvent,d=h.button===0&&h.ctrlKey===!0,m=h.button===2||d;(!o.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qk.displayName=Xk;var nI="DropdownMenuGroup",rI=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(F8,{...o,...i,ref:n})});rI.displayName=nI;var aI="DropdownMenuLabel",Zk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(q8,{...o,...i,ref:n})});Zk.displayName=aI;var iI="DropdownMenuItem",Wk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(V8,{...o,...i,ref:n})});Wk.displayName=iI;var lI="DropdownMenuCheckboxItem",Jk=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx($8,{...o,...i,ref:n})});Jk.displayName=lI;var oI="DropdownMenuRadioGroup",sI=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(G8,{...o,...i,ref:n})});sI.displayName=oI;var uI="DropdownMenuRadioItem",eC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(Y8,{...o,...i,ref:n})});eC.displayName=uI;var cI="DropdownMenuItemIndicator",tC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(K8,{...o,...i,ref:n})});tC.displayName=cI;var fI="DropdownMenuSeparator",nC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(X8,{...o,...i,ref:n})});nC.displayName=fI;var dI="DropdownMenuArrow",hI=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(Q8,{...o,...i,ref:n})});hI.displayName=dI;var pI="DropdownMenuSubTrigger",rC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(Z8,{...o,...i,ref:n})});rC.displayName=pI;var mI="DropdownMenuSubContent",aC=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,o=Wt(r);return g.jsx(W8,{...o,...i,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aC.displayName=mI;var gI=$k,yI=Yk,vI=Kk,iC=Qk,lC=Zk,oC=Wk,sC=Jk,uC=eC,cC=tC,fC=nC,dC=rC,hC=aC;const xI=gI,bI=yI,wI=x.forwardRef(({className:e,inset:n,children:r,...i},o)=>g.jsxs(dC,{ref:o,className:fe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...i,children:[r,g.jsx(rN,{className:"ml-auto h-4 w-4"})]}));wI.displayName=dC.displayName;const SI=x.forwardRef(({className:e,...n},r)=>g.jsx(hC,{ref:r,className:fe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));SI.displayName=hC.displayName;const pC=x.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(vI,{children:g.jsx(iC,{ref:i,sideOffset:n,className:fe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));pC.displayName=iC.displayName;const mC=x.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(oC,{ref:i,className:fe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...r}));mC.displayName=oC.displayName;const EI=x.forwardRef(({className:e,children:n,checked:r,...i},o)=>g.jsxs(sC,{ref:o,className:fe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...i,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(cC,{children:g.jsx(jp,{className:"h-4 w-4"})})}),n]}));EI.displayName=sC.displayName;const kI=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(uC,{ref:i,className:fe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(cC,{children:g.jsx(iN,{className:"h-2 w-2 fill-current"})})}),n]}));kI.displayName=uC.displayName;const gC=x.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(lC,{ref:i,className:fe("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));gC.displayName=lC.displayName;const yC=x.forwardRef(({className:e,...n},r)=>g.jsx(fC,{ref:r,className:fe("-mx-1 my-1 h-px bg-muted",e),...n}));yC.displayName=fC.displayName;function CI(){const[e,n]=x.useState(!1),[r,i]=x.useState(null),[o,s]=x.useState(null),[c,f]=x.useState(null),[h,d]=x.useState("Coconut"),[m,y]=x.useState(null),[b,w]=x.useState(null),[k,C]=x.useState(!1),T=bn(),A=Bo(),_=T.pathname,{user:N,logout:O,authEnabled:z}=q0(),j=new URLSearchParams(T.search),$=j.get("hideNav")==="true",G=j.get("hideAssistant")==="true",ee=j.get("expandAssistant")==="true",P=j.get("fullScreenNoEscape")==="true";x.useEffect(()=>{if(G){n(!1);return}if(P||ee){n(!0),C(!0);return}const H=localStorage.getItem("ai-sidebar-open");H!==null&&n(JSON.parse(H))},[]),x.useEffect(()=>{const H=Q=>{const L=Q.detail;L&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),y(L))};return window.addEventListener("discuss-in-chat",H),()=>{window.removeEventListener("discuss-in-chat",H)}},[]),x.useEffect(()=>{const H=Q=>{const L=Q.detail;L?.prompt&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),w(L.prompt))};return window.addEventListener("customize-prompt-in-assistant",H),()=>{window.removeEventListener("customize-prompt-in-assistant",H)}},[]),x.useEffect(()=>{const H=()=>{n(!0),localStorage.setItem("ai-sidebar-open","true"),C(!0)};return window.addEventListener("open-assistant-expanded",H),()=>{window.removeEventListener("open-assistant-expanded",H)}},[]),x.useEffect(()=>{const H=Q=>{if((Q.metaKey||Q.ctrlKey)&&Q.shiftKey&&Q.key==="l"){Q.preventDefault(),e||(n(!0),localStorage.setItem("ai-sidebar-open","true")),window.dispatchEvent(new CustomEvent("toggle-assistant-fullscreen"));return}(Q.metaKey||Q.ctrlKey)&&Q.key==="l"&&(Q.preventDefault(),ne())};return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}},[e]),x.useEffect(()=>{const H=async()=>{try{const L=await fetch(`${xt}/api/v1/config`);if(L.ok){const K=await L.json();if(K.success&&K.data?.coconut){const{firstName:U,lastName:J}=K.data.coconut;U&&J?d(`${U} ${J}`):(U||J)&&d(U||J)}}}catch(L){console.error("Error fetching config:",L)}};H();const Q=()=>{H()};return window.addEventListener("config-updated",Q),()=>{window.removeEventListener("config-updated",Q)}},[]);const ne=()=>{const H=!e;n(H),localStorage.setItem("ai-sidebar-open",JSON.stringify(H))},ae=async()=>{try{await O(),Uh({title:"Logged out",description:"You have been logged out successfully"}),A("/login")}catch(H){console.error("Logout error:",H),Uh({title:"Error",description:"Failed to logout",variant:"destructive"})}};x.useEffect(()=>{(async()=>{try{const Q=await fetch(`${xt}/api/v1/context/project`);if(Q.ok){const L=await Q.text();s(L)}else s(null)}catch(Q){console.error("Error fetching project context:",Q),s(null)}if(_.includes("/context/architecture")||_.includes("/tasks"))try{const Q=await fetch(`${xt}/api/v1/context/architecture`);if(Q.ok){const L=await Q.text();f(L)}else f(null)}catch(Q){console.error("Error fetching architecture context:",Q),f(null)}else f(null);if(_.includes("/tasks")&&(_.includes("/edit")||_.match(/\/tasks\/[^/]+$/))){const L=_.match(/\/tasks\/([^/]+)(?:\/edit)?/)?.[1];if(L)try{const U=await(await fetch(`${xt}/api/v1/tasks/${L}`)).json();if(U.success){const J=U.data,E=`Task ID: ${L}
|
|
463
468
|
Title: ${J.title||J.intent}
|
|
464
469
|
Status: ${J.status}
|
|
465
470
|
Priority: ${J.metadata?.priority||"medium"}
|
|
@@ -469,4 +474,4 @@ ${J.content||""}`;i(E)}else i(null)}catch(K){console.error("Error fetching task:
|
|
|
469
474
|
${o}`,r&&`=== TASK CONTENT ===
|
|
470
475
|
${r}`].filter(Boolean),J=U.length>0?U.join(`
|
|
471
476
|
|
|
472
|
-
`):null;return{type:_.includes("/edit")?"tasks-edit":"tasks-view",content:J,displayId:Q,contextFiles:K}}return{type:"tasks",content:o,contextFiles:"project.md"}}return _.includes("/context")?_.includes("/architecture")?{type:"context-architecture",content:c,contextFiles:"architecture.md"}:_.includes("/project")?{type:"context-project",content:o,contextFiles:"project.md"}:_.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:_.includes("/settings")?_.includes("/skills")?{type:"settings-skills",content:null}:_.includes("/integrations")?{type:"settings-integrations",content:null}:_.includes("/prompts")?{type:"settings-prompts",content:null}:_.includes("/rules")?{type:"settings-rules",content:null}:_.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:_.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return g.jsx(Jw,{defaultOpen:!$,children:g.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[g.jsx(k4,{}),g.jsxs(nS,{className:fe("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[g.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[g.jsx(tS,{className:"-ml-1"}),g.jsxs("div",{className:"flex items-center justify-between flex-1",children:[g.jsx("h1",{className:"text-lg font-semibold",children:h||"Coconut"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(pt,{onClick:ne,size:"icon",className:"h-8 w-8 rounded-full",children:g.jsx(Lu,{className:"h-4 w-4"})}),z&&N&&g.jsxs(y9,{children:[g.jsx(v9,{asChild:!0,children:g.jsx(pt,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:g.jsx(vM,{className:"h-4 w-4"})})}),g.jsxs(pC,{align:"end",children:[g.jsx(gC,{children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:N.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:N.email})]})}),g.jsx(yC,{}),g.jsxs(mC,{onClick:ae,children:[g.jsx(jN,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),g.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:g.jsx(R0,{})})]}),g.jsx(XI,{isOpen:e,onToggle:ne,contextInfo:le(),discussDocument:m,onDiscussDocumentHandled:()=>y(null),pendingPrompt:b,onPendingPromptHandled:()=>w(null),openInFullScreen:k,onFullScreenHandled:()=>C(!1),fullScreenNoEscape:P})]})})}const k9=[{title:"Coconut Profile",href:"/settings/user",icon:pM,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:rM,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:tM,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:_N,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:Vu,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:qN,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:v1,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:PN,description:"Model Context Protocol configuration and settings"}];function C9(){const e=bn();return g.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[g.jsx("aside",{className:"lg:w-1/5",children:g.jsx("nav",{className:"flex overflow-x-auto pb-2 gap-1 lg:flex-col lg:gap-0 lg:space-y-1 lg:overflow-visible lg:pb-0",children:k9.map(n=>g.jsxs(lr,{to:n.href,className:fe("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-2 sm:px-3 lg:px-4 py-2 hover:bg-accent justify-start flex-shrink-0",e.pathname===n.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[g.jsx(n.icon,{className:"h-4 w-4 lg:mr-2"}),g.jsx("span",{className:"hidden lg:inline",children:n.title})]},n.href))})}),g.jsx("div",{className:"flex-1 lg:max-w-2xl",children:g.jsx("div",{className:"space-y-6",children:g.jsx(R0,{})})})]})}const A9=x.lazy(()=>De(()=>import("./DashboardPage-BACFVIaW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),T9=x.lazy(()=>De(()=>import("./LoginPage-L2aoqSDT.js"),__vite__mapDeps([20,4,1,21]))),R9=x.lazy(()=>De(()=>import("./CallbackPage-CmWv_5Nh.js"),__vite__mapDeps([22,11,23]))),_9=x.lazy(()=>De(()=>import("./TasksPage-ChWRSO_S.js"),__vite__mapDeps([24,1,2,5,6,3,13]))),N9=x.lazy(()=>De(()=>import("./TaskDetailPage-DzcD6t03.js"),__vite__mapDeps([25,26,1,2,4,5,6,3,27,28,29,30,18]))),M9=x.lazy(()=>De(()=>import("./TaskEditPage-C7a6FOeJ.js"),__vite__mapDeps([31,4,5,6,1,32,33,34,35,36,2,27])).then(e=>({default:e.TaskEditPage}))),j9=x.lazy(()=>De(()=>import("./NewTaskPage-CleA8rH5.js"),__vite__mapDeps([37,1,4,32,33,5,6,34,35,36,2,27])).then(e=>({default:e.NewTaskPage}))),D9=x.lazy(()=>De(()=>import("./TerminalPage-CoPwn8cU.js"),__vite__mapDeps([38,1,7,8,9,10,39,40,6,17,41,42]))),O9=x.lazy(()=>De(()=>import("./TerminalSessionPage-BQBZrOJa.js"),__vite__mapDeps([43,1,2,5,6,44,34,4,7,9,10,45,46,39,17,47,14,42]))),L9=x.lazy(()=>De(()=>import("./UtilitiesPage-sP1Crg-X.js"),__vite__mapDeps([48,1,7,41,17]))),z9=x.lazy(()=>De(()=>import("./CodePage-COC7rcwM.js"),__vite__mapDeps([49,1,2,7,8,9,10,5,6,46,39,40,17]))),P9=x.lazy(()=>De(()=>import("./SkillsPage-BrDdAAPx.js"),__vite__mapDeps([50,1,2,26,51,52,13,53]))),I9=x.lazy(()=>De(()=>import("./SkillDetailPage-Dr6xyKAX.js"),__vite__mapDeps([54,1,2,27]))),B9=x.lazy(()=>De(()=>import("./NewSkillPage-DRcgovk0.js"),__vite__mapDeps([55,1,4,2,26,27,28]))),U9=x.lazy(()=>De(()=>import("./SkillEditPage-BsHXmfEZ.js"),__vite__mapDeps([56,1,4,2,26,27,28]))),H9=x.lazy(()=>De(()=>import("./ResourcesPage-Cw3fu0JE.js"),__vite__mapDeps([57,1,4,2,26,5,6,52,58,30,12,53,13]))),F9=x.lazy(()=>De(()=>import("./ResourceDetailPage-CnFRpDec.js"),__vite__mapDeps([59,2,26,27,58,30,53]))),q9=x.lazy(()=>De(()=>import("./KnowledgePage-D-7skvn5.js"),__vite__mapDeps([60,1,2,26,51,52,13,61,45]))),V9=x.lazy(()=>De(()=>import("./KnowledgeDetailPage-DCJstmIr.js"),__vite__mapDeps([62,1,2,26,27,53,16]))),$9=x.lazy(()=>De(()=>import("./KnowledgeEditPage-EYpFPfcJ.js"),__vite__mapDeps([63,1,4,32,33,36,2,64,16,27]))),G9=x.lazy(()=>De(()=>import("./NewKnowledgePage-Fq_QD8um.js"),__vite__mapDeps([65,1,4,32,33,36,2,64,16,27]))),Y9=x.lazy(()=>De(()=>import("./ProjectPage-DlWZOqnb.js"),__vite__mapDeps([66,1,2,26,16]))),K9=x.lazy(()=>De(()=>import("./ProjectEditPage-GIMOKgmh.js"),__vite__mapDeps([67,1,4,5,6,32,33,27,19]))),X9=x.lazy(()=>De(()=>import("./ArchitecturePage-CcAMfFZ8.js"),__vite__mapDeps([68,1,26]))),Q9=x.lazy(()=>De(()=>import("./ArchitectureEditPage-CbtzgIQv.js"),__vite__mapDeps([69,1,4,32,33,27,19]))),Z9=x.lazy(()=>De(()=>import("./RolePage--XBBIrq8.js"),__vite__mapDeps([70,1,26]))),W9=x.lazy(()=>De(()=>import("./RoleEditPage-ARXq_eCs.js"),__vite__mapDeps([71,1,32,33,27,19]))),J9=x.lazy(()=>De(()=>import("./IdentityPage-CS4REq2E.js"),__vite__mapDeps([72,1,4,2,5,6,73,21,14,47,28]))),g0=x.lazy(()=>De(()=>import("./UserSettingsPage-CfU8boJQ.js"),__vite__mapDeps([74,1,4,5,6,28]))),eB=x.lazy(()=>De(()=>import("./AuthSettingsPage-4Prb7nAt.js"),__vite__mapDeps([75,1,4,5,6,76,2,77]))),tB=x.lazy(()=>De(()=>import("./ApiKeysSettingsPage-DLxQIqTT.js"),__vite__mapDeps([78,1,4,2,73,29,77]))),nB=x.lazy(()=>De(()=>import("./SkillsSettingsPage-Cvi7xaDE.js"),__vite__mapDeps([79,1,16]))),rB=x.lazy(()=>De(()=>import("./IntegrationsSettingsPage-B7HoraBH.js"),__vite__mapDeps([80,1,4,5,6]))),aB=x.lazy(()=>De(()=>import("./GitSettingsPage-CDQovOqx.js"),__vite__mapDeps([81,1,4,44,39,16,11,23]))),iB=x.lazy(()=>De(()=>import("./McpSettingsPage-CLwqDjw_.js"),__vite__mapDeps([82,1,4,2,76,73,51,52,13,77,19]))),lB=x.lazy(()=>De(()=>import("./PromptsSettingsPage-DFagGfo-.js"),__vite__mapDeps([83,1,4,5,6,2,47,30]))),oB=x.lazy(()=>De(()=>import("./RulesSettingsPage-DEqaRH96.js"),__vite__mapDeps([84,1,4,2]))),sB=x.lazy(()=>De(()=>import("./GitPage-rFngEr_A.js"),__vite__mapDeps([85,1,4,21,11,23,45,61,39,77,6,15]))),uB=x.lazy(()=>De(()=>import("./SchedulePage-C_B2k9P6.js"),__vite__mapDeps([86,1,2,5,6,4,76,21,39,17,87,18]))),cB=x.lazy(()=>De(()=>import("./JobDetailPage-QUhWsaWV.js"),__vite__mapDeps([88,26,1,2,27,17,28,39,6,87,18]))),fB=x.lazy(()=>De(()=>import("./UserPreferencesPage-DjtU7veO.js"),__vite__mapDeps([89,1,4,5,6]))),dB=x.lazy(()=>De(()=>import("./ActivityPage-CbmEnYhg.js"),__vite__mapDeps([90,1,2,39])));function hB(){return g.jsxs(HR,{children:[g.jsx(eR,{children:g.jsx(x.Suspense,{fallback:g.jsx(oj,{}),children:g.jsxs(NT,{children:[g.jsx(je,{path:"/login",element:g.jsx(T9,{})}),g.jsx(je,{path:"/auth/github/callback",element:g.jsx(R9,{})}),g.jsxs(je,{path:"/",element:g.jsx(lj,{children:g.jsx(E9,{})}),children:[g.jsx(je,{index:!0,element:g.jsx(A9,{})}),g.jsx(je,{path:"tasks",element:g.jsx(_9,{})}),g.jsx(je,{path:"tasks/new",element:g.jsx(j9,{})}),g.jsx(je,{path:"tasks/:id",element:g.jsx(N9,{})}),g.jsx(je,{path:"tasks/:id/edit",element:g.jsx(M9,{})}),g.jsx(je,{path:"agents",element:g.jsx(z9,{})}),g.jsx(je,{path:"utilities",element:g.jsx(L9,{})}),g.jsx(je,{path:"terminal",element:g.jsx(D9,{})}),g.jsx(je,{path:"terminal/:taskId",element:g.jsx(O9,{})}),g.jsx(je,{path:"git",element:g.jsx(sB,{})}),g.jsx(je,{path:"schedule",element:g.jsx(uB,{})}),g.jsx(je,{path:"schedule/:id",element:g.jsx(cB,{})}),g.jsx(je,{path:"identity",element:g.jsx(J9,{})}),g.jsx(je,{path:"skills",element:g.jsx(P9,{})}),g.jsx(je,{path:"skills/new",element:g.jsx(B9,{})}),g.jsx(je,{path:"skills/:id",element:g.jsx(I9,{})}),g.jsx(je,{path:"skills/:id/edit",element:g.jsx(U9,{})}),g.jsx(je,{path:"activity",element:g.jsx(dB,{})}),g.jsx(je,{path:"resources",element:g.jsx(H9,{})}),g.jsx(je,{path:"resources/:id",element:g.jsx(F9,{})}),g.jsx(je,{path:"context/project",element:g.jsx(Y9,{})}),g.jsx(je,{path:"context/project/edit",element:g.jsx(K9,{})}),g.jsx(je,{path:"context/architecture",element:g.jsx(X9,{})}),g.jsx(je,{path:"context/architecture/edit",element:g.jsx(Q9,{})}),g.jsx(je,{path:"context/role",element:g.jsx(Z9,{})}),g.jsx(je,{path:"context/role/edit",element:g.jsx(W9,{})}),g.jsx(je,{path:"knowledge",element:g.jsx(q9,{})}),g.jsx(je,{path:"knowledge/new",element:g.jsx(G9,{})}),g.jsx(je,{path:"knowledge/:filename",element:g.jsx(V9,{})}),g.jsx(je,{path:"knowledge/:filename/edit",element:g.jsx($9,{})}),g.jsxs(je,{path:"settings",element:g.jsx(C9,{}),children:[g.jsx(je,{index:!0,element:g.jsx(g0,{})}),g.jsx(je,{path:"user",element:g.jsx(g0,{})}),g.jsx(je,{path:"preferences",element:g.jsx(fB,{})}),g.jsx(je,{path:"authentication",element:g.jsx(eB,{})}),g.jsx(je,{path:"api-keys",element:g.jsx(tB,{})}),g.jsx(je,{path:"skills",element:g.jsx(nB,{})}),g.jsx(je,{path:"integrations",element:g.jsx(rB,{})}),g.jsx(je,{path:"git",element:g.jsx(aB,{})}),g.jsx(je,{path:"mcp",element:g.jsx(iB,{})}),g.jsx(je,{path:"prompts",element:g.jsx(lB,{})}),g.jsx(je,{path:"rules",element:g.jsx(oB,{})})]})]})]})})}),g.jsx(ij,{})]})}LA.createRoot(document.getElementById("root")).render(g.jsx(x.StrictMode,{children:g.jsx(hB,{})}));export{vM as $,xt as A,pt as B,tN as C,Ac as D,pB as E,Vu as F,v1 as G,lM as H,L1 as I,vI as J,EB as K,lr as L,rh as M,xI as N,dM as O,$N as P,BE as Q,UE as R,Lo as S,cM as T,FE as U,qE as V,HE as W,Yi as X,$E as Y,VE as Z,ts as _,GR as a,gB as a$,SB as a0,cS as a1,I1 as a2,YN as a3,aj as a4,y9 as a5,v9 as a6,pC as a7,gC as a8,yC as a9,TB as aA,AB as aB,sm as aC,pm as aD,nm as aE,op as aF,rP as aG,B4 as aH,kB as aI,T4 as aJ,q4 as aK,j4 as aL,F4 as aM,tp as aN,rm as aO,vS as aP,Do as aQ,_P as aR,yz as aS,fP as aT,GS as aU,CB as aV,e3 as aW,xh as aX,fa as aY,$t as aZ,n0 as a_,mC as aa,vB as ab,ZN as ac,w9 as ad,Hu as ae,bM as af,BR as ag,jp as ah,oN as ai,ol as aj,Xn as ak,Tp as al,pe as am,Fe as an,Xe as ao,wm as ap,TI as aq,_w as ar,wI as as,Gx as at,zP as au,iI as av,X6 as aw,yN as ax,Nc as ay,ac as az,Ko as b,PN as b0,Bi as b1,_N as b2,pc as b3,wc as b4,Bw as b5,$a as b6,cr as b7,g_ as b8,Uw as b9,fc as ba,oc as bb,kt as bc,X1 as bd,U1 as be,zp as bf,Wi as bg,Lp as bh,Ho as bi,Hw as bj,Fw as bk,gk as bl,l8 as bm,o8 as bn,Zt as bo,rN as bp,yB as bq,K_ as br,EN as bs,q_ as bt,Ne as c,Xo as d,fe as e,Qo as f,xo as g,Lu as h,tM as i,g as j,So as k,iN as l,JN as m,Q_ as n,fN as o,J_ as p,pk as q,x as r,gh as s,G_ as t,Bo as u,bn as v,q0 as w,$u as x,Uh as y,mB as z};
|
|
477
|
+
`):null;return{type:_.includes("/edit")?"tasks-edit":"tasks-view",content:J,displayId:Q,contextFiles:K}}return{type:"tasks",content:o,contextFiles:"project.md"}}return _.includes("/context")?_.includes("/architecture")?{type:"context-architecture",content:c,contextFiles:"architecture.md"}:_.includes("/project")?{type:"context-project",content:o,contextFiles:"project.md"}:_.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:_.includes("/settings")?_.includes("/skills")?{type:"settings-skills",content:null}:_.includes("/integrations")?{type:"settings-integrations",content:null}:_.includes("/prompts")?{type:"settings-prompts",content:null}:_.includes("/rules")?{type:"settings-rules",content:null}:_.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:_.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return g.jsx(Jw,{defaultOpen:!$,children:g.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[g.jsx(A4,{}),g.jsxs(nS,{className:fe("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[g.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[g.jsx(tS,{className:"-ml-1"}),g.jsxs("div",{className:"flex items-center justify-between flex-1",children:[g.jsx("h1",{className:"text-lg font-semibold",children:h||"Coconut"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(pt,{onClick:ne,size:"icon",className:"h-8 w-8 rounded-full",children:g.jsx(Lu,{className:"h-4 w-4"})}),z&&N&&g.jsxs(xI,{children:[g.jsx(bI,{asChild:!0,children:g.jsx(pt,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:g.jsx(bM,{className:"h-4 w-4"})})}),g.jsxs(pC,{align:"end",children:[g.jsx(gC,{children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:N.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:N.email})]})}),g.jsx(yC,{}),g.jsxs(mC,{onClick:ae,children:[g.jsx(ON,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),g.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:g.jsx(R0,{})})]}),g.jsx(Z9,{isOpen:e,onToggle:ne,contextInfo:le(),discussDocument:m,onDiscussDocumentHandled:()=>y(null),pendingPrompt:b,onPendingPromptHandled:()=>w(null),openInFullScreen:k,onFullScreenHandled:()=>C(!1),fullScreenNoEscape:P})]})})}const AI=[{title:"Coconut Profile",href:"/settings/user",icon:gM,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:iM,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:rM,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:MN,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:Vu,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:$N,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:v1,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:BN,description:"Model Context Protocol configuration and settings"},{title:"Notifications",href:"/settings/notifications",icon:$_,description:"Configure Slack notifications for Coconut events"}];function TI(){const e=bn();return g.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[g.jsx("aside",{className:"lg:w-1/5",children:g.jsx("nav",{className:"flex overflow-x-auto pb-2 gap-1 lg:flex-col lg:gap-0 lg:space-y-1 lg:overflow-visible lg:pb-0",children:AI.map(n=>g.jsxs(lr,{to:n.href,className:fe("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-2 sm:px-3 lg:px-4 py-2 hover:bg-accent justify-start flex-shrink-0",e.pathname===n.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[g.jsx(n.icon,{className:"h-4 w-4 lg:mr-2"}),g.jsx("span",{className:"hidden lg:inline",children:n.title})]},n.href))})}),g.jsx("div",{className:"flex-1 lg:max-w-2xl",children:g.jsx("div",{className:"space-y-6",children:g.jsx(R0,{})})})]})}const RI=x.lazy(()=>De(()=>import("./DashboardPage-CdFJwMmF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),_I=x.lazy(()=>De(()=>import("./LoginPage-3DBi_hwv.js"),__vite__mapDeps([20,4,1,21]))),NI=x.lazy(()=>De(()=>import("./CallbackPage-pSUHwS6c.js"),__vite__mapDeps([22,11,23]))),MI=x.lazy(()=>De(()=>import("./TasksPage-DmLPtmET.js"),__vite__mapDeps([24,1,2,5,6,3,13]))),jI=x.lazy(()=>De(()=>import("./TaskDetailPage-DEx9t61F.js"),__vite__mapDeps([25,26,1,2,4,5,6,3,27,28,29,30,18]))),DI=x.lazy(()=>De(()=>import("./TaskEditPage-tdpsj4yx.js"),__vite__mapDeps([31,4,5,6,1,32,33,34,35,36,2,27])).then(e=>({default:e.TaskEditPage}))),OI=x.lazy(()=>De(()=>import("./NewTaskPage-BE5Yj7RD.js"),__vite__mapDeps([37,1,4,32,33,5,6,34,35,36,2,27])).then(e=>({default:e.NewTaskPage}))),LI=x.lazy(()=>De(()=>import("./TerminalPage-A9Y67fNY.js"),__vite__mapDeps([38,1,7,8,9,10,39,40,6,17,41,42]))),zI=x.lazy(()=>De(()=>import("./TerminalSessionPage-CDqHiRaw.js"),__vite__mapDeps([43,1,2,5,6,44,34,4,7,9,10,45,46,39,17,47,14,48,42]))),PI=x.lazy(()=>De(()=>import("./UtilitiesPage-CrIhyr9_.js"),__vite__mapDeps([49,1,7,41,17]))),II=x.lazy(()=>De(()=>import("./CodePage-BmEgabxr.js"),__vite__mapDeps([50,1,2,7,8,9,10,5,6,46,39,40,17]))),BI=x.lazy(()=>De(()=>import("./SkillsPage-C6L7hMMN.js"),__vite__mapDeps([51,1,2,26,52,53,13,54]))),UI=x.lazy(()=>De(()=>import("./SkillDetailPage-BcISA93H.js"),__vite__mapDeps([55,1,2,27]))),HI=x.lazy(()=>De(()=>import("./NewSkillPage-BYBe6r4d.js"),__vite__mapDeps([56,1,4,2,26,27,28]))),FI=x.lazy(()=>De(()=>import("./SkillEditPage-BTEUvSu8.js"),__vite__mapDeps([57,1,4,2,26,27,28]))),qI=x.lazy(()=>De(()=>import("./ResourcesPage-CbaDzx36.js"),__vite__mapDeps([58,1,4,2,26,5,6,53,59,30,12,54,13]))),VI=x.lazy(()=>De(()=>import("./ResourceDetailPage-Bn4NqBh7.js"),__vite__mapDeps([60,2,26,27,59,30,54]))),$I=x.lazy(()=>De(()=>import("./KnowledgePage-CuTDH9Bh.js"),__vite__mapDeps([61,1,2,26,52,53,13,62,45]))),GI=x.lazy(()=>De(()=>import("./KnowledgeDetailPage-CFJNJhhN.js"),__vite__mapDeps([63,1,2,26,27,54,16]))),YI=x.lazy(()=>De(()=>import("./KnowledgeEditPage-DVtiPXb_.js"),__vite__mapDeps([64,1,4,32,33,36,2,65,16,27]))),KI=x.lazy(()=>De(()=>import("./NewKnowledgePage-9sB6TdTV.js"),__vite__mapDeps([66,1,4,32,33,36,2,65,16,27]))),XI=x.lazy(()=>De(()=>import("./ProjectPage-Bk8hmnzz.js"),__vite__mapDeps([67,1,2,26,16]))),QI=x.lazy(()=>De(()=>import("./ProjectEditPage-D9VtPWSD.js"),__vite__mapDeps([68,1,4,5,6,32,33,27,19]))),ZI=x.lazy(()=>De(()=>import("./ArchitecturePage-Dl9wMPRA.js"),__vite__mapDeps([69,1,26]))),WI=x.lazy(()=>De(()=>import("./ArchitectureEditPage-D_zjOlNp.js"),__vite__mapDeps([70,1,4,32,33,27,19]))),JI=x.lazy(()=>De(()=>import("./RolePage-CDuVbr3S.js"),__vite__mapDeps([71,1,26]))),eB=x.lazy(()=>De(()=>import("./RoleEditPage-BljkqDbs.js"),__vite__mapDeps([72,1,32,33,27,19]))),tB=x.lazy(()=>De(()=>import("./IdentityPage-9pFdjcFE.js"),__vite__mapDeps([73,1,4,2,5,6,74,21,14,47,28]))),g0=x.lazy(()=>De(()=>import("./UserSettingsPage-1tv40FUQ.js"),__vite__mapDeps([75,1,4,5,6,28]))),nB=x.lazy(()=>De(()=>import("./AuthSettingsPage-DN-0d5JC.js"),__vite__mapDeps([76,1,4,5,6,77,2,78]))),rB=x.lazy(()=>De(()=>import("./ApiKeysSettingsPage-0lTMGFnh.js"),__vite__mapDeps([79,1,4,2,74,29,78]))),aB=x.lazy(()=>De(()=>import("./SkillsSettingsPage-Blc14fBy.js"),__vite__mapDeps([80,1,16]))),iB=x.lazy(()=>De(()=>import("./IntegrationsSettingsPage-CwkwL5dd.js"),__vite__mapDeps([81,1,4,5,6]))),lB=x.lazy(()=>De(()=>import("./GitSettingsPage-DNxK8DVa.js"),__vite__mapDeps([82,1,4,44,39,16,11,23]))),oB=x.lazy(()=>De(()=>import("./McpSettingsPage-BxHz335r.js"),__vite__mapDeps([83,1,4,2,77,74,52,53,13,78,19]))),sB=x.lazy(()=>De(()=>import("./PromptsSettingsPage-B-Li6zb3.js"),__vite__mapDeps([84,1,4,5,6,2,47,30]))),uB=x.lazy(()=>De(()=>import("./RulesSettingsPage-DtUPyjeR.js"),__vite__mapDeps([85,1,4,2]))),cB=x.lazy(()=>De(()=>import("./NotificationsSettingsPage-CPtkulC9.js"),__vite__mapDeps([86,1,4,77,5,6,48,11,23,39]))),fB=x.lazy(()=>De(()=>import("./GitPage-ANlhUZHS.js"),__vite__mapDeps([87,1,4,21,11,23,45,62,39,78,6,15]))),dB=x.lazy(()=>De(()=>import("./SchedulePage-DEsE75St.js"),__vite__mapDeps([88,1,2,5,6,4,77,21,39,17,89,18]))),hB=x.lazy(()=>De(()=>import("./JobDetailPage-BLlAzyE-.js"),__vite__mapDeps([90,26,1,2,27,17,28,39,6,89,18]))),pB=x.lazy(()=>De(()=>import("./UserPreferencesPage-DxUovKgK.js"),__vite__mapDeps([91,1,4,5,6]))),mB=x.lazy(()=>De(()=>import("./ActivityPage-D2Zn5d46.js"),__vite__mapDeps([92,1,2,39])));function gB(){return g.jsxs(HR,{children:[g.jsx(eR,{children:g.jsx(x.Suspense,{fallback:g.jsx(uj,{}),children:g.jsxs(NT,{children:[g.jsx(je,{path:"/login",element:g.jsx(_I,{})}),g.jsx(je,{path:"/auth/github/callback",element:g.jsx(NI,{})}),g.jsxs(je,{path:"/",element:g.jsx(sj,{children:g.jsx(CI,{})}),children:[g.jsx(je,{index:!0,element:g.jsx(RI,{})}),g.jsx(je,{path:"tasks",element:g.jsx(MI,{})}),g.jsx(je,{path:"tasks/new",element:g.jsx(OI,{})}),g.jsx(je,{path:"tasks/:id",element:g.jsx(jI,{})}),g.jsx(je,{path:"tasks/:id/edit",element:g.jsx(DI,{})}),g.jsx(je,{path:"agents",element:g.jsx(II,{})}),g.jsx(je,{path:"utilities",element:g.jsx(PI,{})}),g.jsx(je,{path:"terminal",element:g.jsx(LI,{})}),g.jsx(je,{path:"terminal/:taskId",element:g.jsx(zI,{})}),g.jsx(je,{path:"git",element:g.jsx(fB,{})}),g.jsx(je,{path:"schedule",element:g.jsx(dB,{})}),g.jsx(je,{path:"schedule/:id",element:g.jsx(hB,{})}),g.jsx(je,{path:"identity",element:g.jsx(tB,{})}),g.jsx(je,{path:"skills",element:g.jsx(BI,{})}),g.jsx(je,{path:"skills/new",element:g.jsx(HI,{})}),g.jsx(je,{path:"skills/:id",element:g.jsx(UI,{})}),g.jsx(je,{path:"skills/:id/edit",element:g.jsx(FI,{})}),g.jsx(je,{path:"activity",element:g.jsx(mB,{})}),g.jsx(je,{path:"resources",element:g.jsx(qI,{})}),g.jsx(je,{path:"resources/:id",element:g.jsx(VI,{})}),g.jsx(je,{path:"context/project",element:g.jsx(XI,{})}),g.jsx(je,{path:"context/project/edit",element:g.jsx(QI,{})}),g.jsx(je,{path:"context/architecture",element:g.jsx(ZI,{})}),g.jsx(je,{path:"context/architecture/edit",element:g.jsx(WI,{})}),g.jsx(je,{path:"context/role",element:g.jsx(JI,{})}),g.jsx(je,{path:"context/role/edit",element:g.jsx(eB,{})}),g.jsx(je,{path:"knowledge",element:g.jsx($I,{})}),g.jsx(je,{path:"knowledge/new",element:g.jsx(KI,{})}),g.jsx(je,{path:"knowledge/:filename",element:g.jsx(GI,{})}),g.jsx(je,{path:"knowledge/:filename/edit",element:g.jsx(YI,{})}),g.jsxs(je,{path:"settings",element:g.jsx(TI,{}),children:[g.jsx(je,{index:!0,element:g.jsx(g0,{})}),g.jsx(je,{path:"user",element:g.jsx(g0,{})}),g.jsx(je,{path:"preferences",element:g.jsx(pB,{})}),g.jsx(je,{path:"authentication",element:g.jsx(nB,{})}),g.jsx(je,{path:"api-keys",element:g.jsx(rB,{})}),g.jsx(je,{path:"skills",element:g.jsx(aB,{})}),g.jsx(je,{path:"integrations",element:g.jsx(iB,{})}),g.jsx(je,{path:"git",element:g.jsx(lB,{})}),g.jsx(je,{path:"mcp",element:g.jsx(oB,{})}),g.jsx(je,{path:"prompts",element:g.jsx(sB,{})}),g.jsx(je,{path:"rules",element:g.jsx(uB,{})}),g.jsx(je,{path:"notifications",element:g.jsx(cB,{})})]})]})]})})}),g.jsx(oj,{})]})}LA.createRoot(document.getElementById("root")).render(g.jsx(x.StrictMode,{children:g.jsx(gB,{})}));export{bM as $,xt as A,pt as B,rN as C,Ac as D,yB as E,Vu as F,v1 as G,sM as H,L1 as I,b9 as J,AB as K,lr as L,rh as M,w9 as N,pM as O,YN as P,BE as Q,UE as R,Lo as S,dM as T,FE as U,qE as V,HE as W,Yi as X,$E as Y,VE as Z,ts as _,GR as a,xB as a$,CB as a0,cS as a1,I1 as a2,XN as a3,lj as a4,xI as a5,bI as a6,pC as a7,gC as a8,yC as a9,NB as aA,_B as aB,sm as aC,pm as aD,nm as aE,op as aF,iP as aG,H4 as aH,TB as aI,_4 as aJ,$4 as aK,O4 as aL,V4 as aM,tp as aN,rm as aO,vS as aP,Do as aQ,MP as aR,xz as aS,hP as aT,GS as aU,RB as aV,n3 as aW,xh as aX,fa as aY,$t as aZ,n0 as a_,mC as aa,wB as ab,JN as ac,EI as ad,Hu as ae,SM as af,BR as ag,jp as ah,uN as ai,ol as aj,Xn as ak,Tp as al,pe as am,Fe as an,Xe as ao,wm as ap,_9 as aq,_w as ar,E9 as as,Gx as at,IP as au,o9 as av,Z6 as aw,xN as ax,Nc as ay,ac as az,Ko as b,BN as b0,Bi as b1,MN as b2,pc as b3,wc as b4,Bw as b5,$a as b6,cr as b7,g_ as b8,Uw as b9,fc as ba,oc as bb,kt as bc,X1 as bd,U1 as be,zp as bf,Wi as bg,Lp as bh,Ho as bi,Hw as bj,Fw as bk,gk as bl,s8 as bm,u8 as bn,Zt as bo,iN as bp,ZN as bq,$_ as br,bB as bs,Q_ as bt,CN as bu,q_ as bv,Ne as c,Xo as d,fe as e,Qo as f,xo as g,Lu as h,rM as i,g as j,So as k,oN as l,tM as m,W_ as n,hN as o,tN as p,pk as q,x as r,gh as s,K_ as t,Bo as u,bn as v,q0 as w,$u as x,Uh as y,vB as z};
|