titan-agent 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -2
- package/dist/agent/agent.js +55 -10
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/contextManager.js +1 -1
- package/dist/agent/contextManager.js.map +1 -1
- package/dist/agent/honestyGuard.js +66 -0
- package/dist/agent/honestyGuard.js.map +1 -0
- package/dist/agent/selfCritique.js +101 -0
- package/dist/agent/selfCritique.js.map +1 -0
- package/dist/agent/toolSearch.js +9 -2
- package/dist/agent/toolSearch.js.map +1 -1
- package/dist/agent/trajectoryLogger.js +19 -2
- package/dist/agent/trajectoryLogger.js.map +1 -1
- package/dist/analytics/collector.js +1 -1
- package/dist/analytics/collector.js.map +1 -1
- package/dist/config/schema.js +32 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/eval/harness.js +4 -1
- package/dist/eval/harness.js.map +1 -1
- package/dist/gateway/server.js +24 -8
- package/dist/gateway/server.js.map +1 -1
- package/dist/gateway/slashCommands.js +31 -0
- package/dist/gateway/slashCommands.js.map +1 -1
- package/dist/mcp/agentTools.js +135 -0
- package/dist/mcp/agentTools.js.map +1 -0
- package/dist/mcp/server.js +19 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/memory/graph.js +2 -0
- package/dist/memory/graph.js.map +1 -1
- package/dist/providers/errorTaxonomy.js +4 -0
- package/dist/providers/errorTaxonomy.js.map +1 -1
- package/dist/providers/moa.js +151 -0
- package/dist/providers/moa.js.map +1 -0
- package/dist/providers/modelCapabilities.js +65 -2
- package/dist/providers/modelCapabilities.js.map +1 -1
- package/dist/providers/ollama.js +1 -0
- package/dist/providers/ollama.js.map +1 -1
- package/dist/providers/openai_compat.js +14 -2
- package/dist/providers/openai_compat.js.map +1 -1
- package/dist/providers/router.js +3 -1
- package/dist/providers/router.js.map +1 -1
- package/dist/utils/benchMode.js +8 -0
- package/dist/utils/benchMode.js.map +1 -0
- package/dist/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/package.json +26 -26
- package/ui/dist/assets/AboutYouMemory-57X5SqHQ.js +1 -0
- package/ui/dist/assets/AuditPanel-AyB8ciLZ.js +1 -0
- package/ui/dist/assets/AutonomyPanel-wmVPr-n3.js +1 -0
- package/ui/dist/assets/AutopilotPanel-CbLy4lJP.js +1 -0
- package/ui/dist/assets/AutoresearchPanel-DxRO1rBF.js +1 -0
- package/ui/dist/assets/BackupPanel-BUh9rQ-3.js +1 -0
- package/ui/dist/assets/BrowserPanel-OqKwGrIL.js +1 -0
- package/ui/dist/assets/CPActivity-DGfS7EY3.js +1 -0
- package/ui/dist/assets/CPAgentDetail-p0Kvzhhb.js +1 -0
- package/ui/dist/assets/CPAgents-B6wSSQZM.js +1 -0
- package/ui/dist/assets/CPApprovals-CYv9Do0i.js +1 -0
- package/ui/dist/assets/CPCosts-Dx6Q71rN.js +1 -0
- package/ui/dist/assets/CPDashboard-DA8-tE-l.js +1 -0
- package/ui/dist/assets/CPFiles-BJ49tzai.js +1 -0
- package/ui/dist/assets/CPGoals-h0dKL5V_.js +1 -0
- package/ui/dist/assets/CPInbox-CDvefgNH.js +1 -0
- package/ui/dist/assets/CPIssueDetail-CnmLzzDD.js +1 -0
- package/ui/dist/assets/CPIssues-DknAIMyl.js +1 -0
- package/ui/dist/assets/CPLayout-C2nqgkmY.js +2 -0
- package/ui/dist/assets/CPOrg-tDbHFphX.js +1 -0
- package/ui/dist/assets/CPRuns-UlrIURqG.js +1 -0
- package/ui/dist/assets/CPSocial-B-gHgvEw.js +1 -0
- package/ui/dist/assets/CPVoice-CJy938ZF.js +1 -0
- package/ui/dist/assets/ChannelsPanel-DLbxg1zO.js +1 -0
- package/ui/dist/assets/CheckpointsPanel-BB6TT0aE.js +1 -0
- package/ui/dist/assets/CommandPostHub-fIslwU_t.js +2 -0
- package/ui/dist/assets/ConfirmDialog-6hcNjmAh.js +9 -0
- package/ui/dist/assets/CronPanel-DLpw3Y25.js +1 -0
- package/ui/dist/assets/DataTable-KVqtDzvP.js +1 -0
- package/ui/dist/assets/DreamPanel-lcMXpbEb.js +5 -0
- package/ui/dist/assets/EmptyState-D-Dg8B8r.js +1 -0
- package/ui/dist/assets/EvalHarnessPanel-BKzRiiQw.js +2 -0
- package/ui/dist/assets/EvalPanel-Dtodacmj.js +1 -0
- package/ui/dist/assets/FileViewer-DjcVKkO2.js +60 -0
- package/ui/dist/assets/FilesPanel-BI90Pplh.js +1 -0
- package/ui/dist/assets/FleetPanel-tr0wjAwr.js +1 -0
- package/ui/dist/assets/HomelabPanel-m8vMm5rE.js +1 -0
- package/ui/dist/assets/InfraView-3WriJnyE.js +2 -0
- package/ui/dist/assets/IntegrationsPanel-BmL70fOw.js +1 -0
- package/ui/dist/assets/IntelligenceView-BGVxCKD3.js +2 -0
- package/ui/dist/assets/LearningPanel-CrYLQ6eV.js +1 -0
- package/ui/dist/assets/LiveStudio-CnW3eZYF.js +2 -0
- package/ui/dist/assets/LogsPanel-DbShr4Ic.js +1 -0
- package/ui/dist/assets/McpPanel-uMYEsPI4.js +1 -0
- package/ui/dist/assets/MemoryGraphPanel-C7-Z8f0v.js +1 -0
- package/ui/dist/assets/MemoryTaxonomyPanel-KrxN8U1G.js +1 -0
- package/ui/dist/assets/MemoryWikiPanel-DI3q6IHC.js +1 -0
- package/ui/dist/assets/MeshPanel-D4-g2tlu.js +1 -0
- package/ui/dist/assets/MissionCanvas-D8cjakJe.js +61 -0
- package/ui/dist/assets/MissionChat-BvqCUf1E.js +3 -0
- package/ui/dist/assets/MissionLibrary-CZoJQ9WD.js +1 -0
- package/ui/dist/assets/MissionStart-CXCq-_AD.js +1 -0
- package/ui/dist/assets/NvidiaPanel-BfI1K5Pg.js +1 -0
- package/ui/dist/assets/OrganismPanel-B7Gm9pP-.js +1 -0
- package/ui/dist/assets/OverviewPanel-B9tKWRK2.js +1 -0
- package/ui/dist/assets/PageHeader-CH85uoZG.js +1 -0
- package/ui/dist/assets/PersonaProfilesPanel-BPi8fl-U.js +3 -0
- package/ui/dist/assets/PersonasPanel-Dwr7sycT.js +1 -0
- package/ui/dist/assets/PhoneDeskPanel-D7qc6wUI.js +1 -0
- package/ui/dist/assets/RecipesPanel-DcqPWRSU.js +1 -0
- package/ui/dist/assets/SecurityPanel-Bv_B9Ahf.js +1 -0
- package/ui/dist/assets/SelfImprovePanel-Ca4rGwEG.js +1 -0
- package/ui/dist/assets/SelfProposalsPanel-DteMSASq.js +1 -0
- package/ui/dist/assets/SessionsPanel-BdbbKTbL.js +1 -0
- package/ui/dist/assets/SessionsTab-BJipiVJs.js +1 -0
- package/ui/dist/assets/SettingsPanel-mV7ykOCc.js +1 -0
- package/ui/dist/assets/SettingsView-Bu_wYTT5.js +2 -0
- package/ui/dist/assets/SkeletonLoader-9H7QWa9E.js +1 -0
- package/ui/dist/assets/SkillsPanel-CHwX2kDR.js +1 -0
- package/ui/dist/assets/SomaView-Bpsm4ZW7.js +5 -0
- package/ui/dist/assets/SomaView-Dghh9om4.css +1 -0
- package/ui/dist/assets/StatCard-wmSgMAM3.js +1 -0
- package/ui/dist/assets/TeamsPanel-XJiHxdDX.js +1 -0
- package/ui/dist/assets/TelemetryPanel-_pmGVxpO.js +1 -0
- package/ui/dist/assets/TitanCanvas-Cb7KG80W.css +1 -0
- package/ui/dist/assets/TitanCanvas-CmLy7p2N.js +883 -0
- package/ui/dist/assets/ToolsView-PHizHZBx.js +2 -0
- package/ui/dist/assets/TraceViewer-CYAzIcfB.js +1 -0
- package/ui/dist/assets/TracesPanel-CRSN_dzK.js +1 -0
- package/ui/dist/assets/TrainingPanel-B9rcuMsV.js +1 -0
- package/ui/dist/assets/VoiceOverlay-BL_ns1ZA.js +7 -0
- package/ui/dist/assets/VramPanel-BNPQ06_9.js +1 -0
- package/ui/dist/assets/WatchView-BgAkNnur.js +13 -0
- package/ui/dist/assets/WorkTab-RRpPpEOg.js +1 -0
- package/ui/dist/assets/WorkflowBuilderPanel-BPHIH8pf.js +1 -0
- package/ui/dist/assets/WorkflowsPanel-DqtmT0NB.js +1 -0
- package/ui/dist/assets/approvalHeadline-BRg3ReTi.js +1 -0
- package/ui/dist/assets/archive-DcK9HrbE.js +1 -0
- package/ui/dist/assets/arrow-left-4c2FnES1.js +1 -0
- package/ui/dist/assets/book-open-Ds_yciQm.js +1 -0
- package/ui/dist/assets/bot-CWDCc265.js +1 -0
- package/ui/dist/assets/chart-column-hhZMdCgB.js +1 -0
- package/ui/dist/assets/chevron-right-A_pvnRh_.js +1 -0
- package/ui/dist/assets/circle-check-big-C-JUM7wb.js +1 -0
- package/ui/dist/assets/circle-stop-yZuG9ZAE.js +1 -0
- package/ui/dist/assets/clipboard-list-C2HUEjZc.js +1 -0
- package/ui/dist/assets/clock-DSPgndSD.js +1 -0
- package/ui/dist/assets/clsx-CjueKrWZ.js +1 -0
- package/ui/dist/assets/createLucideIcon-qnlrxww7.js +1 -0
- package/ui/dist/assets/database-C1SgHa8T.js +1 -0
- package/ui/dist/assets/dollar-sign-D9siqK91.js +1 -0
- package/ui/dist/assets/download-CJZWQNfV.js +1 -0
- package/ui/dist/assets/external-link-CpQLWKKE.js +1 -0
- package/ui/dist/assets/file-text-BbGTi-Po.js +1 -0
- package/ui/dist/assets/flask-conical-B1YVft4E.js +1 -0
- package/ui/dist/assets/folder-EbR-w2Mq.js +1 -0
- package/ui/dist/assets/funnel-D2Dkn8Pf.js +1 -0
- package/ui/dist/assets/git-branch-CQ2yNSzU.js +1 -0
- package/ui/dist/assets/git-pull-request-BxL5wlGX.js +1 -0
- package/ui/dist/assets/index-Cz8190xO.css +2 -0
- package/ui/dist/assets/index-WI-E4I3h.js +243 -0
- package/ui/dist/assets/jsx-runtime-B15e6lOy.js +1 -0
- package/ui/dist/assets/layers-BPu5SRjI.js +1 -0
- package/ui/dist/assets/legacy-BIzifT-t.js +3 -0
- package/ui/dist/assets/lightbulb-BY7CpMte.js +1 -0
- package/ui/dist/assets/link-VDQkrGJw.js +1 -0
- package/ui/dist/assets/list-todo-DfnNUV_T.js +1 -0
- package/ui/dist/assets/message-square-BpzrINHz.js +1 -0
- package/ui/dist/assets/mic-De6oZFaV.js +1 -0
- package/ui/dist/assets/missions-y-qg_f9b.js +1 -0
- package/ui/dist/assets/network-CM7y1ats.js +1 -0
- package/ui/dist/assets/pause-C4TDJSfA.js +1 -0
- package/ui/dist/assets/pencil-Dd_vzHE-.js +1 -0
- package/ui/dist/assets/play-9WxZWVHA.js +1 -0
- package/ui/dist/assets/plug-Dm25Wbrc.js +1 -0
- package/ui/dist/assets/plus-CHryCIkk.js +1 -0
- package/ui/dist/assets/radio-D-XnoAVu.js +1 -0
- package/ui/dist/assets/refresh-cw-Disd5wRB.js +1 -0
- package/ui/dist/assets/rotate-ccw-Cw1T2W1T.js +1 -0
- package/ui/dist/assets/save-DP7oNar2.js +1 -0
- package/ui/dist/assets/search-aNVcX-nv.js +1 -0
- package/ui/dist/assets/send-D7iQD57b.js +1 -0
- package/ui/dist/assets/server-DFfeYjoM.js +1 -0
- package/ui/dist/assets/settings-5NWXzgyY.js +1 -0
- package/ui/dist/assets/shared-DLz_Jtg3.js +1 -0
- package/ui/dist/assets/shield-check-Cd50jCAn.js +1 -0
- package/ui/dist/assets/square-DlcoJ1ZM.js +1 -0
- package/ui/dist/assets/terminal-DgFz2Vsf.js +1 -0
- package/ui/dist/assets/test-tube-BimtS92_.js +1 -0
- package/ui/dist/assets/toggle-right-BMaR-sfT.js +1 -0
- package/ui/dist/assets/trash-2-CwUv7ww1.js +1 -0
- package/ui/dist/assets/trending-up-Ba9TwEow.js +1 -0
- package/ui/dist/assets/trophy-Gfv1QC45.js +1 -0
- package/ui/dist/assets/volume-2-BVlfVl2U.js +1 -0
- package/ui/dist/assets/wifi-off-CWLeusSV.js +1 -0
- package/ui/dist/assets/zoom-out-DeggJ7RM.js +1 -0
- package/ui/dist/index.html +4 -2
- package/ui/dist/sw.js +1 -1
- package/ui/dist/assets/AboutYouMemory-CZKEOd_O.js +0 -11
- package/ui/dist/assets/AuditPanel-Bu71N5Er.js +0 -1
- package/ui/dist/assets/AutonomyPanel-DB-39dX4.js +0 -11
- package/ui/dist/assets/AutopilotPanel-Cj8oKxWv.js +0 -1
- package/ui/dist/assets/AutoresearchPanel-3s8pjm6Z.js +0 -6
- package/ui/dist/assets/BackupPanel-EUQJMJE7.js +0 -1
- package/ui/dist/assets/BrowserPanel-Beo4F5Ar.js +0 -6
- package/ui/dist/assets/Button-MdXmb4_n.js +0 -1
- package/ui/dist/assets/CPActivity-B1Se9VVc.js +0 -1
- package/ui/dist/assets/CPAgentDetail-BYji6tT8.js +0 -1
- package/ui/dist/assets/CPAgents-BSUKucTe.js +0 -1
- package/ui/dist/assets/CPApprovals-B4v0em6e.js +0 -1
- package/ui/dist/assets/CPCosts-9ikh61Kv.js +0 -1
- package/ui/dist/assets/CPDashboard-sOok2T5v.js +0 -1
- package/ui/dist/assets/CPFiles-DB2nY5JE.js +0 -1
- package/ui/dist/assets/CPGoals-8Z1yOY8e.js +0 -1
- package/ui/dist/assets/CPInbox-Cq6-UY8F.js +0 -11
- package/ui/dist/assets/CPIssueDetail-NAGfmJg8.js +0 -1
- package/ui/dist/assets/CPIssues-BzX6Rckx.js +0 -1
- package/ui/dist/assets/CPLayout-BcRM6QSg.js +0 -2
- package/ui/dist/assets/CPOrg-B7DQ4UQP.js +0 -1
- package/ui/dist/assets/CPRuns-D-cpPw_M.js +0 -1
- package/ui/dist/assets/CPSocial-DshtmcK0.js +0 -11
- package/ui/dist/assets/CPVoice-DfXRnQVU.js +0 -1
- package/ui/dist/assets/ChannelsPanel-BnaTOeyf.js +0 -1
- package/ui/dist/assets/CheckpointsPanel-C62naE4U.js +0 -1
- package/ui/dist/assets/CommandPostHub-B_L1CAss.js +0 -24
- package/ui/dist/assets/ConfirmDialog-VErHWAbo.js +0 -1
- package/ui/dist/assets/CronPanel-BwMrrZ5d.js +0 -1
- package/ui/dist/assets/DataTable-BCqSUuN7.js +0 -1
- package/ui/dist/assets/DreamPanel-BNAcCLBB.js +0 -15
- package/ui/dist/assets/EmptyState-D9kQf1PX.js +0 -1
- package/ui/dist/assets/EvalHarnessPanel-BaMLdBNm.js +0 -2
- package/ui/dist/assets/EvalPanel-CW-SSjtg.js +0 -1
- package/ui/dist/assets/FileViewer-BL00nsd7.js +0 -61
- package/ui/dist/assets/FilesPanel-CeC6YUSd.js +0 -16
- package/ui/dist/assets/FleetPanel-EyWF7l3W.js +0 -1
- package/ui/dist/assets/HomelabPanel-BRfKRYe7.js +0 -6
- package/ui/dist/assets/InfraView-Jmqhg_Yc.js +0 -2
- package/ui/dist/assets/InlineEditableField-DgMrLDj1.js +0 -1
- package/ui/dist/assets/Input-CBTwa_Iw.js +0 -1
- package/ui/dist/assets/IntegrationsPanel-DQL-7Ec6.js +0 -1
- package/ui/dist/assets/IntelligenceView-DxD78qfP.js +0 -2
- package/ui/dist/assets/LearningPanel-C_JzSbJU.js +0 -1
- package/ui/dist/assets/LiveStudio-Db5yeaWo.js +0 -7
- package/ui/dist/assets/LogsPanel-CpinKwaZ.js +0 -1
- package/ui/dist/assets/McpPanel-D-MqN_f-.js +0 -1
- package/ui/dist/assets/MemoryGraphPanel-BnD5jRqf.js +0 -1
- package/ui/dist/assets/MemoryTaxonomyPanel-BBI202dd.js +0 -6
- package/ui/dist/assets/MemoryWikiPanel-Dn3XZHL0.js +0 -6
- package/ui/dist/assets/MeshPanel-C-mRJpr0.js +0 -11
- package/ui/dist/assets/MissionCanvas-CbZW83Ch.js +0 -72
- package/ui/dist/assets/MissionChat-Bs75jPAD.js +0 -7
- package/ui/dist/assets/MissionLibrary-BxQ6SxPe.js +0 -5
- package/ui/dist/assets/MissionStart-CBuBPasl.js +0 -1
- package/ui/dist/assets/Modal-ybPGvlQs.js +0 -9
- package/ui/dist/assets/NvidiaPanel-DdG13OX4.js +0 -1
- package/ui/dist/assets/OrganismPanel-xZWUJKyr.js +0 -1
- package/ui/dist/assets/OverviewPanel-B45ZYhJV.js +0 -1
- package/ui/dist/assets/PageHeader-DdrbS1aq.js +0 -1
- package/ui/dist/assets/PersonaProfilesPanel-CKER-EU5.js +0 -8
- package/ui/dist/assets/PersonasPanel-CMMQ3nh3.js +0 -1
- package/ui/dist/assets/PhoneDeskPanel-Bw_Y-cVE.js +0 -11
- package/ui/dist/assets/RecipesPanel-DzMcxpJJ.js +0 -1
- package/ui/dist/assets/SecurityPanel-BCq3Fzbr.js +0 -1
- package/ui/dist/assets/SelfImprovePanel-YE3hT8jK.js +0 -1
- package/ui/dist/assets/SelfProposalsPanel-DXuqBM6p.js +0 -1
- package/ui/dist/assets/SessionsPanel-DORz5goR.js +0 -1
- package/ui/dist/assets/SessionsTab-qYHDOuC8.js +0 -1
- package/ui/dist/assets/SettingsPanel-BbwPu1i7.js +0 -1
- package/ui/dist/assets/SettingsView-zgqkDDBJ.js +0 -2
- package/ui/dist/assets/SkeletonLoader-r6OGXaU9.js +0 -1
- package/ui/dist/assets/SkillsPanel-BjEOBMRo.js +0 -11
- package/ui/dist/assets/SomaView-BtCkeWfZ.css +0 -1
- package/ui/dist/assets/SomaView-DLzApZVW.js +0 -5
- package/ui/dist/assets/StatCard-DLq8aBps.js +0 -1
- package/ui/dist/assets/StatusBadge-BqlvIbdj.js +0 -1
- package/ui/dist/assets/Tabs-DdUThlp1.js +0 -1
- package/ui/dist/assets/TeamsPanel-uIIKoU7I.js +0 -1
- package/ui/dist/assets/TelemetryPanel-dVr3yQQr.js +0 -1
- package/ui/dist/assets/TitanCanvas-BfitWg9R.css +0 -1
- package/ui/dist/assets/TitanCanvas-xHAJqwG2.js +0 -945
- package/ui/dist/assets/ToolsView-CG1mZdiy.js +0 -2
- package/ui/dist/assets/Tooltip-C2tXJcrN.js +0 -6
- package/ui/dist/assets/TraceViewer-BIMD_Osr.js +0 -1
- package/ui/dist/assets/TracesPanel-nMUiyMj5.js +0 -1
- package/ui/dist/assets/TrainingPanel-CT5R4HWm.js +0 -1
- package/ui/dist/assets/VoiceOverlay-Br4QnCtw.js +0 -17
- package/ui/dist/assets/VramPanel-CdnJYytg.js +0 -1
- package/ui/dist/assets/WatchView-TNU6Ns1Q.js +0 -13
- package/ui/dist/assets/WorkTab-wTlX_UKP.js +0 -1
- package/ui/dist/assets/WorkflowBuilderPanel-CDpVt5ux.js +0 -6
- package/ui/dist/assets/WorkflowsPanel-zsFqsLdn.js +0 -11
- package/ui/dist/assets/approvalHeadline-DB9SgR-9.js +0 -1
- package/ui/dist/assets/archive-Bh689DNg.js +0 -6
- package/ui/dist/assets/arrow-left-WkVYLm80.js +0 -6
- package/ui/dist/assets/book-open-ohEXgUsS.js +0 -6
- package/ui/dist/assets/bot-DvEcyQcD.js +0 -6
- package/ui/dist/assets/chart-column-w3goFd5f.js +0 -6
- package/ui/dist/assets/check-CuRYh4Zh.js +0 -6
- package/ui/dist/assets/chevron-right-DbLSHmff.js +0 -6
- package/ui/dist/assets/circle-check-big-Bkba568b.js +0 -6
- package/ui/dist/assets/circle-stop-Bx2ohEg8.js +0 -6
- package/ui/dist/assets/clipboard-list-Dj9tORnu.js +0 -6
- package/ui/dist/assets/clock-JyQAYy6X.js +0 -6
- package/ui/dist/assets/clsx-B-dksMZM.js +0 -1
- package/ui/dist/assets/dollar-sign-XxwPAA2a.js +0 -6
- package/ui/dist/assets/download-D1izVEOL.js +0 -6
- package/ui/dist/assets/external-link-DZ_rZsIt.js +0 -6
- package/ui/dist/assets/file-text-Cfawu8Bs.js +0 -6
- package/ui/dist/assets/flask-conical-Ql8QxhgY.js +0 -6
- package/ui/dist/assets/folder-DAdIw-Pb.js +0 -6
- package/ui/dist/assets/funnel-FycfZcXo.js +0 -6
- package/ui/dist/assets/git-branch-C2qrhGGu.js +0 -6
- package/ui/dist/assets/index-Cml2x9pA.js +0 -507
- package/ui/dist/assets/index-yWybhcfI.css +0 -1
- package/ui/dist/assets/layers-yzjtGlHB.js +0 -6
- package/ui/dist/assets/legacy-D21WSMF1.js +0 -3
- package/ui/dist/assets/lightbulb-BZJNK69S.js +0 -6
- package/ui/dist/assets/link-CnFkBkaY.js +0 -6
- package/ui/dist/assets/list-todo-BlgfQHup.js +0 -6
- package/ui/dist/assets/message-square-CRsG9u6_.js +0 -6
- package/ui/dist/assets/mic-B32RHc7Y.js +0 -6
- package/ui/dist/assets/missions-1iw8Z2_0.js +0 -1
- package/ui/dist/assets/network-C9RXQGrV.js +0 -6
- package/ui/dist/assets/pause-BT1Bc2q3.js +0 -6
- package/ui/dist/assets/pencil-BK5IU6o0.js +0 -6
- package/ui/dist/assets/play-Cl1nC_gc.js +0 -6
- package/ui/dist/assets/plug-DvcpOalj.js +0 -6
- package/ui/dist/assets/plus-Dpo1qfrl.js +0 -6
- package/ui/dist/assets/radio-C5c9IyqX.js +0 -6
- package/ui/dist/assets/refresh-cw-C-iZkzuS.js +0 -6
- package/ui/dist/assets/rotate-ccw-qzrB3SNw.js +0 -6
- package/ui/dist/assets/save-DwR9wQVu.js +0 -6
- package/ui/dist/assets/search-D10l0m3-.js +0 -6
- package/ui/dist/assets/send-DtXGsaFW.js +0 -6
- package/ui/dist/assets/server-BzisF3LL.js +0 -6
- package/ui/dist/assets/settings-Dbwd1_-c.js +0 -6
- package/ui/dist/assets/shield-check-CXlDJyAW.js +0 -6
- package/ui/dist/assets/square-BBC-JKzY.js +0 -11
- package/ui/dist/assets/terminal-DaBIlWEM.js +0 -6
- package/ui/dist/assets/test-tube-CDATRD5t.js +0 -11
- package/ui/dist/assets/toggle-right-DTmrC5RD.js +0 -11
- package/ui/dist/assets/trash-2-CTeyjxD_.js +0 -6
- package/ui/dist/assets/trending-up-CXPRjRV4.js +0 -6
- package/ui/dist/assets/trophy-DbVdXRtU.js +0 -6
- package/ui/dist/assets/volume-2-DYDBmm3M.js +0 -6
- package/ui/dist/assets/wifi-off-BBuIGbiP.js +0 -6
- package/ui/dist/assets/zoom-out-D47_pRAO.js +0 -16
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{a as e,c as t,n,r,t as i}from"./jsx-runtime-B15e6lOy.js";function a(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var o=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c={};function l(e,t){return((t||c).jsx?s:o).test(e)}var u=/[ \t\n\f\r]/g;function d(e){return typeof e==`object`?e.type===`text`?f(e.value):!1:f(e)}function f(e){return e.replace(u,``)===``}var p=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};p.prototype.normal={},p.prototype.property={},p.prototype.space=void 0;function m(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new p(n,r,t)}function h(e){return e.toLowerCase()}var g=class{constructor(e,t){this.attribute=t,this.property=e}};g.prototype.attribute=``,g.prototype.booleanish=!1,g.prototype.boolean=!1,g.prototype.commaOrSpaceSeparated=!1,g.prototype.commaSeparated=!1,g.prototype.defined=!1,g.prototype.mustUseProperty=!1,g.prototype.number=!1,g.prototype.overloadedBoolean=!1,g.prototype.property=``,g.prototype.spaceSeparated=!1,g.prototype.space=void 0;var _=e({boolean:()=>y,booleanish:()=>b,commaOrSpaceSeparated:()=>T,commaSeparated:()=>w,number:()=>S,overloadedBoolean:()=>x,spaceSeparated:()=>C}),v=0,y=E(),b=E(),x=E(),S=E(),C=E(),w=E(),T=E();function E(){return 2**++v}var D=Object.keys(_),O=class extends g{constructor(e,t,n,r){let i=-1;if(super(e,t),k(this,`space`,r),typeof n==`number`)for(;++i<D.length;){let e=D[i];k(this,D[i],(n&_[e])===_[e])}}};O.prototype.defined=!0;function k(e,t,n){n&&(e[t]=n)}function A(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new O(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[h(r)]=r,n[h(a.attribute)]=r}return new p(t,n,e.space)}var ee=A({properties:{ariaActiveDescendant:null,ariaAtomic:b,ariaAutoComplete:null,ariaBusy:b,ariaChecked:b,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:C,ariaCurrent:null,ariaDescribedBy:C,ariaDetails:null,ariaDisabled:b,ariaDropEffect:C,ariaErrorMessage:null,ariaExpanded:b,ariaFlowTo:C,ariaGrabbed:b,ariaHasPopup:null,ariaHidden:b,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C,ariaLevel:S,ariaLive:null,ariaModal:b,ariaMultiLine:b,ariaMultiSelectable:b,ariaOrientation:null,ariaOwns:C,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:b,ariaReadOnly:b,ariaRelevant:null,ariaRequired:b,ariaRoleDescription:C,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:b,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function j(e,t){return t in e?e[t]:t}function M(e,t){return j(e,t.toLowerCase())}var te=A({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:w,acceptCharset:C,accessKey:C,action:null,allow:null,allowFullScreen:y,allowPaymentRequest:y,allowUserMedia:y,alt:null,as:null,async:y,autoCapitalize:null,autoComplete:C,autoFocus:y,autoPlay:y,blocking:C,capture:null,charSet:null,checked:y,cite:null,className:C,cols:S,colSpan:null,content:null,contentEditable:b,controls:y,controlsList:C,coords:S|w,crossOrigin:null,data:null,dateTime:null,decoding:null,default:y,defer:y,dir:null,dirName:null,disabled:y,download:x,draggable:b,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:y,formTarget:null,headers:C,height:S,hidden:x,high:S,href:null,hrefLang:null,htmlFor:C,httpEquiv:C,id:null,imageSizes:null,imageSrcSet:null,inert:y,inputMode:null,integrity:null,is:null,isMap:y,itemId:null,itemProp:C,itemRef:C,itemScope:y,itemType:C,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:y,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:y,muted:y,name:null,nonce:null,noModule:y,noValidate:y,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:y,optimum:S,pattern:null,ping:C,placeholder:null,playsInline:y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:y,referrerPolicy:null,rel:C,required:y,reversed:y,rows:S,rowSpan:S,sandbox:C,scope:null,scoped:y,seamless:y,selected:y,shadowRootClonable:y,shadowRootDelegatesFocus:y,shadowRootMode:null,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:b,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:y,useMap:null,value:b,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:y,declare:y,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:y,noHref:y,noShade:y,noWrap:y,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:b,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:y,disableRemotePlayback:y,prefix:null,property:null,results:S,security:null,unselectable:null},space:`html`,transform:M}),ne=A({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:T,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:C,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:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:y,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,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:w,g2:w,glyphName:w,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:T,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,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:S,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:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:T,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:T,rev:T,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:T,requiredFeatures:T,requiredFonts:T,requiredFormats:T,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:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:T,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:T,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:T,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:j}),N=A({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),P=A({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:M}),F=A({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),re={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`},ie=/[A-Z]/g,ae=/-[a-z]/g,oe=/^data[-\w.:]+$/i;function se(e,t){let n=h(t),r=t,i=g;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&oe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ae,le);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ae.test(e)){let n=e.replace(ie,ce);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=O}return new i(r,t)}function ce(e){return`-`+e.toLowerCase()}function le(e){return e.charAt(1).toUpperCase()}var ue=m([ee,te,N,P,F],`html`),I=m([ee,ne,N,P,F],`svg`);function de(e){return e.join(` `).trim()}var fe=r(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
2
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(!(e.charAt(0)!=`/`||e.charAt(1)!=`*`)){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pe=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(fe());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),me=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),he=r(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pe()),r=me();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),ge=ve(`end`),_e=ve(`start`);function ve(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ye(e){let t=_e(e),n=ge(e);if(t&&n)return{start:t,end:n}}function be(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Se(e.position):`start`in e||`end`in e?Se(e):`line`in e||`column`in e?xe(e):``}function xe(e){return Ce(e&&e.line)+`:`+Ce(e&&e.column)}function Se(e){return xe(e&&e.start)+`-`+xe(e&&e.end)}function Ce(e){return e&&typeof e==`number`?e:1}var L=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=be(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};L.prototype.file=``,L.prototype.name=``,L.prototype.reason=``,L.prototype.message=``,L.prototype.stack=``,L.prototype.column=void 0,L.prototype.line=void 0,L.prototype.ancestors=void 0,L.prototype.cause=void 0,L.prototype.fatal=void 0,L.prototype.place=void 0,L.prototype.ruleId=void 0,L.prototype.source=void 0;var we=t(he(),1),Te={}.hasOwnProperty,Ee=new Map,De=/[A-Z]/g,Oe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ke=new Set([`td`,`th`]);function Ae(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Ve(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Be(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?I:ue,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=je(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function je(e,t,n){if(t.type===`element`)return Me(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ne(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Fe(e,t,n);if(t.type===`mdxjsEsm`)return Pe(e,t);if(t.type===`root`)return Ie(e,t,n);if(t.type===`text`)return Le(e,t)}function Me(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=I,e.schema=i),e.ancestors.push(t);let a=qe(e,t.tagName,!1),o=He(e,t),s=We(e,t);return Oe.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!d(e):!0})),Re(e,o,a,t),ze(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ne(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Je(e,t.position)}function Pe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Je(e,t.position)}function Fe(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=I,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:qe(e,t.name,!0),o=Ue(e,t),s=We(e,t);return Re(e,o,a,t),ze(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ie(e,t,n){let r={};return ze(r,We(e,t)),e.create(t,e.Fragment,r,n)}function Le(e,t){return t.value}function Re(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ze(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Be(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Ve(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_e(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function He(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Te.call(t.properties,i)){let a=Ge(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ke.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Ue(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Je(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Je(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function We(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ee;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=je(e,a,o);s!==void 0&&n.push(s)}return n}function Ge(e,t,n){let r=se(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?a(n):de(n)),r.property===`style`){let t=typeof n==`object`?n:Ke(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Ye(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?re[r.property]||r.property:r.attribute,n]}}function Ke(e,t){try{return(0,we.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new L("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function qe(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=l(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=l(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Te.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Je(e)}function Je(e,t){let n=new L("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function Ye(e){let t={},n;for(n in e)Te.call(e,n)&&(t[Xe(n)]=e[n]);return t}function Xe(e){let t=e.replace(De,Ze);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Ze(e){return`-`+e.toLowerCase()}var Qe={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`]},$e={};function et(e,t){let n=t||$e;return tt(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function tt(e,t,n){if(rt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return nt(e.children,t,n)}return Array.isArray(e)?nt(e,t,n):``}function nt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=tt(e[i],t,n);return r.join(``)}function rt(e){return!!(e&&typeof e==`object`)}var it=document.createElement(`i`);function at(e){let t=`&`+e+`;`;it.innerHTML=t;let n=it.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function R(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function z(e,t){return e.length>0?(R(e,e.length,0,t),e):t}var ot={}.hasOwnProperty;function st(e){let t={},n=-1;for(;++n<e.length;)ct(t,e[n]);return t}function ct(e,t){let n;for(n in t){let r=(ot.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ot.call(r,a)||(r[a]=[]);let e=i[a];lt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function lt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);R(e,0,0,r)}function ut(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function B(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var V=K(/[A-Za-z]/),H=K(/[\dA-Za-z]/),dt=K(/[#-'*+\--9=?A-Z^-~]/);function ft(e){return e!==null&&(e<32||e===127)}var pt=K(/\d/),mt=K(/[\dA-Fa-f]/),ht=K(/[!-/:-@[-`{-~]/);function U(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}var gt=K(/\p{P}|\p{S}/u),_t=K(/\s/);function K(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function q(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&H(e.charCodeAt(n+1))&&H(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function J(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return G(r)?(e.enter(n),s(r)):t(r)}function s(r){return G(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var vt={tokenize:yt};function yt(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return U(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var bt={tokenize:St},xt={tokenize:Ct};function St(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return R(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xt,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(xt,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return U(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;R(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ct(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function wt(e){if(e===null||W(e)||_t(e))return 1;if(gt(e))return 2}function Tt(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Et={name:`attention`,resolveAll:Dt,tokenize:Ot};function Dt(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};kt(d,-c),kt(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=z(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=z(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=z(l,Tt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=z(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=z(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,R(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Ot(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=wt(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=wt(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function kt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var At={name:`autolink`,tokenize:jt};function jt(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return V(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||H(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||H(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||ft(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):dt(t)?(e.consume(t),l):n(t)}function u(e){return H(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||H(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Mt={partial:!0,tokenize:Nt};function Nt(e,t,n){return r;function r(t){return G(t)?J(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||U(e)?t(e):n(e)}}var Pt={continuation:{tokenize:It},exit:Lt,name:`blockQuote`,tokenize:Ft};function Ft(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return G(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function It(e,t,n){let r=this;return i;function i(t){return G(t)?J(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Pt,t,n)(r)}}function Lt(e){e.exit(`blockQuote`)}var Rt={name:`characterEscape`,tokenize:zt};function zt(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ht(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Bt={name:`characterReference`,tokenize:Vt};function Vt(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=H,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=mt,u):(e.enter(`characterReferenceValue`),a=7,o=pt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===H&&!at(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ht={partial:!0,tokenize:Gt},Ut={concrete:!0,name:`codeFenced`,tokenize:Wt};function Wt(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),G(t)?J(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||U(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ht,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),J(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||U(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&G(t)?J(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||U(t)?e.check(Ht,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||U(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),G(t)?J(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),G(t)?J(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||U(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Gt(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Kt={name:`codeIndented`,tokenize:Jt},qt={partial:!0,tokenize:Yt};function Jt(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),J(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):U(t)?e.attempt(qt,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||U(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Yt(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):J(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):U(e)?i(e):n(e)}}var Xt={name:`codeText`,previous:Qt,resolve:Zt,tokenize:$t};function Zt(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Qt(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function $t(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||U(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var en=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&tn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),tn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),tn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);tn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);tn(this.left,t.reverse())}}};function tn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function nn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new en(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,rn(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return R(e,0,1/0,u.slice(0)),!l}function rn(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var an={resolve:sn,tokenize:cn},on={partial:!0,tokenize:ln};function sn(e){return nn(e),e}function cn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):U(t)?e.check(on,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ln(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,a,`linePrefix`)}function a(i){if(i===null||U(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function un(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||ft(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||U(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||W(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||ft(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function dn(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):U(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||U(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!G(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function fn(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||U(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function pn(e,t){let n;return r;function r(i){return U(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):G(i)?J(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var mn={name:`definition`,tokenize:gn},hn={partial:!0,tokenize:_n};function gn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return dn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=B(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return W(t)?pn(e,l)(t):l(t)}function l(t){return un(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(hn,d,d)(t)}function d(t){return G(t)?J(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||U(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function _n(e,t,n){return r;function r(t){return W(t)?pn(e,i)(t):n(t)}function i(t){return fn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return G(t)?J(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||U(e)?t(e):n(e)}}var vn={name:`hardBreakEscape`,tokenize:yn};function yn(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return U(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var bn={name:`headingAtx`,resolve:xn,tokenize:Sn};function xn(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},R(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Sn(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||W(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||U(n)?(e.exit(`atxHeading`),t(n)):G(n)?J(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||W(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Cn=`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`.split(`.`),wn=[`pre`,`script`,`style`,`textarea`],Tn={concrete:!0,name:`htmlFlow`,resolveTo:On,tokenize:kn},En={partial:!0,tokenize:jn},Dn={partial:!0,tokenize:An};function On(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function kn(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):V(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):V(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return V(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||W(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&wn.includes(l)?(i=1,r.interrupt?t(s):O(s)):Cn.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||H(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return G(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||V(t)?(e.consume(t),b):G(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||H(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):G(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):G(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||U(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||W(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||G(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||U(t)?O(t):G(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),P):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),ne):U(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(En,F,k)(t)):t===null||U(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Dn,A,F)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||U(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),N):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return wn.includes(n)?(e.consume(t),P):O(t)}return V(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function ne(t){return t===93?(e.consume(t),N):O(t)}function N(t){return t===62?(e.consume(t),P):t===45&&i===2?(e.consume(t),N):O(t)}function P(t){return t===null||U(t)?(e.exit(`htmlFlowData`),F(t)):(e.consume(t),P)}function F(n){return e.exit(`htmlFlow`),t(n)}}function An(e,t,n){let r=this;return i;function i(t){return U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function jn(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Mt,t,n)}}var Mn={name:`htmlText`,tokenize:Nn};function Nn(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):V(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):V(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):U(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):U(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):U(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):U(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return V(t)?(e.consume(t),S):n(t)}function S(t){return t===45||H(t)?(e.consume(t),S):C(t)}function C(t){return U(t)?(o=C,M(t)):G(t)?(e.consume(t),C):j(t)}function w(t){return t===45||H(t)?(e.consume(t),w):t===47||t===62||W(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||V(t)?(e.consume(t),E):U(t)?(o=T,M(t)):G(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||H(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):U(t)?(o=D,M(t)):G(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):U(t)?(o=O,M(t)):G(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):U(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||W(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||W(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return G(t)?J(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(t){return e.enter(`htmlTextData`),o(t)}}var Pn={name:`labelEnd`,resolveAll:Rn,resolveTo:zn,tokenize:Bn},Fn={tokenize:Vn},In={tokenize:Hn},Ln={tokenize:Un};function Rn(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&R(e,0,e.length,n),e}function zn(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=z(s,e.slice(a+1,a+r+3)),s=z(s,[[`enter`,u,t]]),s=z(s,Tt(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=z(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=z(s,e.slice(o+1)),s=z(s,[[`exit`,c,t]]),R(e,a,e.length,s),e}function Bn(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(B(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Fn,u,o?u:d)(t):t===91?e.attempt(In,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ln,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Vn(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return W(t)?pn(e,a)(t):a(t)}function a(t){return t===41?u(t):un(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return W(t)?pn(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?fn(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return W(t)?pn(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Hn(e,t,n){let r=this;return i;function i(t){return dn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(B(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Un(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Wn={name:`labelStartImage`,resolveAll:Pn.resolveAll,tokenize:Gn};function Gn(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Kn={name:`labelStartLink`,resolveAll:Pn.resolveAll,tokenize:qn};function qn(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Jn={name:`lineEnding`,tokenize:Yn};function Yn(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}}var Xn={name:`thematicBreak`,tokenize:Zn};function Zn(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||U(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),G(t)?J(e,s,`whitespace`)(t):s(t))}}var Y={continuation:{tokenize:tr},exit:rr,name:`list`,tokenize:er},Qn={partial:!0,tokenize:ir},$n={partial:!0,tokenize:nr};function er(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:pt(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Xn,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return pt(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Mt,r.interrupt?n:u,e.attempt(Qn,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return G(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function tr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Mt,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!G(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($n,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,J(e,e.attempt(Y,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function nr(e,t,n){let r=this;return J(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function rr(e){e.exit(this.containerState.type)}function ir(e,t,n){let r=this;return J(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!G(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var ar={name:`setextUnderline`,resolveTo:or,tokenize:sr};function or(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function sr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),G(t)?J(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||U(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var cr={tokenize:lr};function lr(e){let t=this,n=e.attempt(Mt,r,e.attempt(this.parser.constructs.flowInitial,i,J(e,e.attempt(this.parser.constructs.flow,i,e.attempt(an,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ur={resolveAll:mr()},dr=pr(`string`),fr=pr(`text`);function pr(e){return{resolveAll:mr(e===`text`?hr:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function mr(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function hr(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var gr=e({attentionMarkers:()=>wr,contentInitial:()=>vr,disable:()=>Tr,document:()=>_r,flow:()=>br,flowInitial:()=>yr,insideSpan:()=>Cr,string:()=>xr,text:()=>Sr}),_r={42:Y,43:Y,45:Y,48:Y,49:Y,50:Y,51:Y,52:Y,53:Y,54:Y,55:Y,56:Y,57:Y,62:Pt},vr={91:mn},yr={[-2]:Kt,[-1]:Kt,32:Kt},br={35:bn,42:Xn,45:[ar,Xn],60:Tn,61:ar,95:Xn,96:Ut,126:Ut},xr={38:Bt,92:Rt},Sr={[-5]:Jn,[-4]:Jn,[-3]:Jn,33:Wn,38:Bt,42:Et,60:[At,Mn],91:Kn,92:[vn,Rt],93:Pn,95:Et,96:Xt},Cr={null:[Et,ur]},wr={null:[42,95]},Tr={null:[]};function Er(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=z(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Tt(a,l.events,l),l.events):[]}function f(e,t){return Or(p(e),t)}function p(e){return Dr(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){U(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&R(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Dr(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Or(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
|
+
`;break;case-3:o=`\r
|
|
4
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function kr(e){let t={constructs:st([gr,...(e||{}).extensions||[]]),content:n(vt),defined:[],document:n(bt),flow:n(cr),lazy:{},string:n(dr),text:n(fr)};return t;function n(e){return n;function n(n){return Er(t,e,n)}}}function Ar(e){for(;!nn(e););return e}var jr=/[\0\t\n\r]/g;function Mr(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(jr.lastIndex=u,c=jr.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Nr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pr(e){return e.replace(Nr,Fr)}function Fr(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return ut(n.slice(t?2:1),t?16:10)}return at(n)||e}var Ir={}.hasOwnProperty;function Lr(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Rr(n)(Ar(kr(n).document().write(Mr()(e,t,!0))))}function Rr(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(ue),characterEscape:T,characterReference:T,codeFenced:a(I),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(I,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(xe),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(Se),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Ce),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(M),label:ne,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:N,resourceTitleString:P,resource:F,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};zr(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Ir.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Vr).call(a,void 0,e[0])}for(r.position={start:X(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:X(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:X(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Vr).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+be({start:e.start,end:e.end})+`): it’s not open`);n.position.end=X(e.end)}function u(){return et(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=B(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=L(),n.position={start:X(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=X(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=X(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Pr(t),n.identifier=B(t).toLowerCase()}function ne(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function F(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=B(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=ut(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=at(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=X(e.end)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[]}}function I(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Se(){return{type:`paragraph`,children:[]}}function Ce(){return{type:`strong`,children:[]}}function L(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function X(e){return{line:e.line,column:e.column,offset:e.offset}}function zr(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?zr(e,r):Br(e,r)}}function Br(e,t){let n;for(n in t)if(Ir.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Vr(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+be({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+be({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+be({start:t.start,end:t.end})+`) is still open`)}function Hr(e){let t=this;t.parser=n;function n(n){return Lr(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Ur(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Wr(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
5
|
+
`}]}function Gr(e,t){let n=t.value?t.value+`
|
|
6
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Kr(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qr(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jr(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=q(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Yr(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xr(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zr(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Qr(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zr(e,t);let i={src:q(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function $r(e,t){let n={src:q(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ei(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ti(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zr(e,t);let i={href:q(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ni(e,t){let n={href:q(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ri(e,t,n){let r=e.all(t),i=n?ii(n):ai(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
7
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function ii(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ai(n[r])}return t}function ai(e){return e.spread??e.children.length>1}function oi(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function si(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ci(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function li(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ui(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_e(t.children[1]),o=ge(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function di(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function fi(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var pi=9,mi=32;function hi(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(gi(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(gi(t.slice(i),i>0,!1)),a.join(``)}function gi(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===pi||t===mi;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===pi||t===mi;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function _i(e,t){let n={type:`text`,value:hi(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vi(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var yi={blockquote:Ur,break:Wr,code:Gr,delete:Kr,emphasis:qr,footnoteReference:Jr,heading:Yr,html:Xr,imageReference:Qr,image:$r,inlineCode:ei,linkReference:ti,link:ni,listItem:ri,list:oi,paragraph:si,root:ci,strong:li,table:ui,tableCell:fi,tableRow:di,text:_i,thematicBreak:vi,toml:bi,yaml:bi,definition:bi,footnoteDefinition:bi};function bi(){}var xi=typeof self==`object`?self:globalThis,Si=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new xi[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new xi[a](o),i)};return r},Ci=e=>Si(new Map,e)(0),Z=``,{toString:wi}={},{keys:Ti}=Object,Ei=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=wi.call(e).slice(8,-1);switch(n){case`Array`:return[1,Z];case`Object`:return[2,Z];case`Date`:return[3,Z];case`RegExp`:return[4,Z];case`Map`:return[5,Z];case`Set`:return[6,Z];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Di=([e,t])=>e===0&&(t===`function`||t===`symbol`),Oi=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Ei(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Ti(r))(e||!Di(Ei(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Di(Ei(n))||Di(Ei(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Di(Ei(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},ki=(e,{json:t,lossy:n}={})=>{let r=[];return Oi(!(t||n),!!t,new Map,r)(e),r},Ai=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Ci(ki(e,t)):structuredClone(e):(e,t)=>Ci(ki(e,t));function ji(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Mi(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Ni(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ji,r=e.options.footnoteBackLabel||Mi,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=q(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Ai(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
9
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
10
|
+
`}]}}var Pi=(function(e){if(e==null)return zi;if(typeof e==`function`)return Ri(e);if(typeof e==`object`)return Array.isArray(e)?Fi(e):Ii(e);if(typeof e==`string`)return Li(e);throw Error(`Expected function, string, or object as test`)});function Fi(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Pi(e[n]);return Ri(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ii(e){let t=e;return Ri(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Li(e){return Ri(t);function t(t){return t&&t.type===e}}function Ri(e){return t;function t(t,n,r){return!!(Bi(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function zi(){return!0}function Bi(e){return typeof e==`object`&&!!e&&`type`in e}function Vi(e){return e}var Hi=[];function Ui(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Pi(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Vi(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Hi,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Wi(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Wi(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Hi:[e]}function Gi(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Ui(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Ki={}.hasOwnProperty,qi={};function Ji(e,t){let n=t||qi,r=new Map,i=new Map,a={all:s,applyData:Xi,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...yi,...n.handlers},one:o,options:n,patch:Yi,wrap:Qi};return Gi(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Ki.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Ai(n);return r.children=a.all(e),r}return Ai(e)}return(a.options.unknownHandler||Zi)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=$i(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=$i(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Yi(e,t){e.position&&(t.position=ye(e))}function Xi(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Ai(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Zi(e,t){let n=t.data||{},r=`value`in t&&!(Ki.call(n,`hProperties`)||Ki.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Qi(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
11
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
12
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
13
|
+
`}),n}function $i(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ea(e,t){let n=Ji(e,t),r=n.one(e,void 0),i=Ni(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
14
|
+
`},i)),a}function ta(e,t){return e&&`run`in e?async function(n,r){let i=ea(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ea(n,{file:r,...e||t})}}function na(e){if(e)throw e}var ra=t(r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function ia(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function aa(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?oa(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function oa(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Q={basename:sa,dirname:ca,extname:la,join:ua,sep:`/`};function sa(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);pa(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ca(e){if(pa(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function la(e){pa(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ua(...e){let t=-1,n;for(;++t<e.length;)pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:da(n)}function da(e){pa(e);let t=e.codePointAt(0)===47,n=fa(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function fa(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function pa(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ma={cwd:ha};function ha(){return`/`}function ga(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function _a(e){if(typeof e==`string`)e=new URL(e);else if(!ga(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return va(e)}function va(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var ya=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],ba=class{constructor(e){let t;t=e?ga(e)?{path:e}:typeof e==`string`||wa(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ma.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ya.length;){let e=ya[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)ya.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Q.basename(this.path):void 0}set basename(e){Sa(e,`basename`),xa(e,`basename`),this.path=Q.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Q.dirname(this.path):void 0}set dirname(e){Ca(this.basename,`dirname`),this.path=Q.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Q.extname(this.path):void 0}set extname(e){if(xa(e,`extname`),Ca(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Q.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ga(e)&&(e=_a(e)),Sa(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Q.basename(this.path,this.extname):void 0}set stem(e){Sa(e,`stem`),xa(e,`stem`),this.path=Q.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new L(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function xa(e,t){if(e&&e.includes(Q.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Q.sep+"`")}function Sa(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Ca(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function wa(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ta=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Ea={}.hasOwnProperty,Da=new class e extends Ta{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=aa()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,ra.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Aa(`data`,this.frozen),this.namespace[e]=t,this):Ea.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Aa(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Na(e),n=this.parser||this.Parser;return Oa(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Oa(`process`,this.parser||this.Parser),ka(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Na(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Fa(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Oa(`processSync`,this.parser||this.Parser),ka(`processSync`,this.compiler||this.Compiler),this.process(e,r),Ma(`processSync`,`process`,t),n;function r(e,r){t=!0,na(e),n=r}}run(e,t,n){ja(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Na(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Ma(`runSync`,`run`,n),r;function i(e,t){na(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Na(t),r=this.compiler||this.Compiler;return ka(`stringify`,r),ja(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Aa(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,ra.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ia(o)&&ia(r)&&(r=(0,ra.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Oa(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function ka(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Aa(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ja(e){if(!ia(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Ma(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Na(e){return Pa(e)?e:new ba(e)}function Pa(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Fa(e){return typeof e==`string`||Ia(e)}function Ia(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var $=i(),La=t(n(),1),Ra=[],za={allowDangerousHtml:!0},Ba=/^(https?|ircs?|mailto|xmpp)$/i,Va=[{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 Ha(e){let t=Ua(e),n=Wa(e);return Ga(t.runSync(t.parse(n),n),e)}function Ua(e){let t=e.rehypePlugins||Ra,n=e.remarkPlugins||Ra,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...za}:za;return Da().use(Hr).use(n).use(ta,r).use(t)}function Wa(e){let t=e.children||``,n=new ba;return typeof t==`string`?n.value=t:``+t,n}function Ga(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ka;for(let e of Va)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Gi(e,l),Ae(e,{Fragment:$.Fragment,components:i,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Qe)if(Object.hasOwn(Qe,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Qe[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ka(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ba.test(e.slice(0,t))?e:``}function qa(e){let t=e.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,``);t=t.replace(/<script\b[^>]*\/?>/gi,``),t=t.replace(/\son[a-z]+\s*=\s*"[^"]*"/gi,``),t=t.replace(/\son[a-z]+\s*=\s*'[^']*'/gi,``),t=t.replace(/\son[a-z]+\s*=\s*[^"'\s>]+/gi,``),t=t.replace(/(href|src|action)\s*=\s*"javascript:[^"]*"/gi,`$1="#"`),t=t.replace(/(href|src|action)\s*=\s*'javascript:[^']*'/gi,`$1='#'`);let n=[`<meta name="referrer" content="no-referrer">`,`<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: blob:; img-src * data: blob:; font-src * data:; style-src 'self' 'unsafe-inline' *; script-src 'none'; frame-src 'none'; object-src 'none';">`,`<base target="_blank">`].join(`
|
|
15
|
+
`);t=t.replace(/<img\b([^>]*?)\bsrc\s*=\s*(["'])([^"']*?)\2([^>]*?)\/?>/gi,(e,t,n,r,i)=>/^data:image\//i.test(r)||/^blob:/i.test(r)||!/^https?:\/\//i.test(r)&&!/^\/\//.test(r)&&!/^tdi:\/\//i.test(r)?`<img${t} src="${r}"${i}>`:[`<figure class="titan-img-missing">`,` <div class="titan-img-missing__icon" aria-hidden="true">⚙</div>`,` <figcaption class="titan-img-missing__caption">${((/\balt\s*=\s*"([^"]*)"/i.exec(t+i)||/\balt\s*=\s*'([^']*)'/i.exec(t+i))?.[1]??``).trim().replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)||`Image unavailable`}</figcaption>`,` <div class="titan-img-missing__sub">Image source unavailable</div>`,`</figure>`].join(`
|
|
16
|
+
`));let r=t.trim(),i=/<head\b[^>]*>/i.exec(r);if(i){let e=i.index+i[0].length;return r.slice(0,e)+`
|
|
17
|
+
`+n+r.slice(e)}let a=/<html\b[^>]*>/i.exec(r);if(a){let e=a.index+a[0].length;return r.slice(0,e)+`\n<head>${n}</head>`+r.slice(e)}return`<!DOCTYPE html><html><head>${n}</head><body>${r}</body></html>`}function Ja({state:e,onClose:t}){La.useEffect(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);let n=(0,La.useMemo)(()=>{if(!e.file)return null;let{content:t,mimeType:n,encoding:r}=e.file;if(r===`base64`)return`data:${n};base64,${t}`;try{return`data:${n};base64,${btoa(unescape(encodeURIComponent(t)))}`}catch{return null}},[e.file]),r=(0,La.useMemo)(()=>{let t=e.ref,n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1):t},[e.ref]);return(0,$.jsx)(`div`,{className:`fixed inset-0 z-40 flex items-center justify-center bg-bg-deep/80 backdrop-blur-sm p-4 md:p-8`,onClick:t,children:(0,$.jsxs)(`div`,{className:`relative w-full max-w-4xl h-full max-h-[90vh] bg-bg-secondary border border-border rounded-2xl overflow-hidden flex flex-col shadow-2xl`,onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3 border-b border-border bg-bg/40 shrink-0`,children:[(0,$.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-bg-tertiary flex items-center justify-center text-base`,children:Qa(e.file?.mimeType)}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,$.jsx)(`div`,{className:`text-sm font-semibold truncate`,title:e.ref,children:r}),(0,$.jsxs)(`div`,{className:`text-[11px] text-text-muted truncate`,children:[e.ref,e.file&&(0,$.jsxs)($.Fragment,{children:[` · `,e.file.mimeType,` · `,$a(e.file.sizeBytes),e.file.truncated&&(0,$.jsx)(`span`,{className:`text-warn`,children:` · truncated to 5 MB`})]})]})]}),n&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`px-3 py-1.5 text-xs bg-bg-tertiary border border-border rounded-full text-text-secondary hover:text-text`,title:`Open in a new browser tab`,children:`Open ↗`}),(0,$.jsx)(`a`,{href:n,download:r,className:`px-3 py-1.5 text-xs bg-bg-tertiary border border-border rounded-full text-text-secondary hover:text-text`,title:`Save to your computer`,children:`Download`})]}),(0,$.jsx)(`button`,{onClick:t,className:`w-8 h-8 rounded-full bg-bg-tertiary border border-border text-text-muted hover:text-text flex items-center justify-center text-sm`,title:`Close (Esc)`,children:`✕`})]}),(0,$.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[e.loading&&(0,$.jsx)(`div`,{className:`h-full flex items-center justify-center text-text-muted text-sm`,children:`Loading…`}),e.error&&(0,$.jsxs)(`div`,{className:`h-full flex flex-col items-center justify-center gap-2 text-center px-6`,children:[(0,$.jsx)(`div`,{className:`text-error font-semibold`,children:`Couldn't open this file`}),(0,$.jsx)(`div`,{className:`text-xs text-text-muted max-w-md`,children:e.error}),(0,$.jsxs)(`div`,{className:`text-[11px] text-text-muted mt-2`,children:[`The agent referenced `,(0,$.jsx)(`code`,{className:`text-text-secondary`,children:e.ref}),` but the file may have been moved, deleted, or written outside the gateway's reach.`]})]}),e.file&&(0,$.jsx)(Ya,{file:e.file})]})]})})}function Ya({file:e}){let{content:t,mimeType:n,encoding:r}=e;return n===`text/markdown`?(0,$.jsx)(`div`,{className:`px-6 md:px-10 py-6 prose prose-sm md:prose-base max-w-none markdown-body`,style:{background:`var(--theme-paper, #f7f5ee)`,color:`var(--theme-ink, #1a1f2e)`,fontFamily:`var(--theme-font-display, ui-serif, Georgia, serif)`},children:(0,$.jsx)(Ha,{children:t})}):n===`text/html`?(0,$.jsx)(Xa,{html:qa(t)}):n.startsWith(`image/`)?(0,$.jsx)(`div`,{className:`h-full flex items-center justify-center bg-bg-deep/40 p-4`,children:(0,$.jsx)(`img`,{src:r===`base64`?`data:${n};base64,${t}`:``,alt:e.ref,className:`max-w-full max-h-full object-contain`})}):n===`application/pdf`?(0,$.jsx)(`iframe`,{title:`PDF preview`,src:r===`base64`?`data:${n};base64,${t}`:``,className:`w-full h-full bg-white border-0`}):r===`utf-8`?(0,$.jsx)(`pre`,{className:`px-6 py-5 text-xs text-text whitespace-pre-wrap font-mono leading-relaxed`,children:t}):(0,$.jsxs)(`div`,{className:`h-full flex flex-col items-center justify-center gap-2 text-center px-6`,children:[(0,$.jsx)(`div`,{className:`text-text font-semibold`,children:`No inline preview for this file type`}),(0,$.jsxs)(`div`,{className:`text-xs text-text-muted`,children:[`Type: `,(0,$.jsx)(`code`,{className:`text-text-secondary`,children:n})]}),(0,$.jsxs)(`div`,{className:`text-[11px] text-text-muted`,children:[`Use the `,(0,$.jsx)(`b`,{children:`Download`}),` button up top to save it.`]})]})}function Xa({html:e}){let t=La.useRef(null);return La.useEffect(()=>{let n=t.current;if(!n)return;let r=n.shadowRoot??n.attachShadow({mode:`open`}),i=/<body\b[^>]*>([\s\S]*?)<\/body>/i.exec(e),a=/<head\b[^>]*>([\s\S]*?)<\/head>/i.exec(e);r.innerHTML=`<style>
|
|
18
|
+
:host { all: initial; display: block; width: 100%; height: 100%; background: var(--theme-paper, #fdfaf3); color: var(--theme-ink, #1a1f2e); overflow: auto; }
|
|
19
|
+
.titan-doc-root { padding: 24px 32px; font-family: var(--theme-font-display, Georgia, "Iowan Old Style", serif); line-height: 1.6; max-width: 900px; margin: 0 auto; }
|
|
20
|
+
.titan-doc-root img { max-width: 100%; height: auto; }
|
|
21
|
+
.titan-doc-root a { color: var(--theme-accent, #6a3d12); }
|
|
22
|
+
.titan-img-missing {
|
|
23
|
+
display: block;
|
|
24
|
+
margin: 18px auto;
|
|
25
|
+
padding: 22px 24px;
|
|
26
|
+
max-width: 540px;
|
|
27
|
+
background: linear-gradient(180deg, var(--theme-paper, #ede1c6) 0%, var(--theme-paper-line, #e0d2af) 100%);
|
|
28
|
+
border: 1px solid var(--theme-metal-dark, #b8a070);
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 1px 2px var(--theme-shadow, rgba(60,40,20,0.18));
|
|
31
|
+
text-align: center;
|
|
32
|
+
color: var(--theme-ink-soft, #5a3818);
|
|
33
|
+
font-family: var(--theme-font-display, Georgia, "Iowan Old Style", serif);
|
|
34
|
+
}
|
|
35
|
+
.titan-img-missing .titan-img-missing__icon {
|
|
36
|
+
font-size: 28px;
|
|
37
|
+
line-height: 1;
|
|
38
|
+
margin-bottom: 6px;
|
|
39
|
+
color: var(--theme-metal-dark, #8a5a2a);
|
|
40
|
+
}
|
|
41
|
+
.titan-img-missing .titan-img-missing__caption {
|
|
42
|
+
font-style: italic;
|
|
43
|
+
font-size: 14px;
|
|
44
|
+
line-height: 1.45;
|
|
45
|
+
color: var(--theme-ink-soft, #5a3818);
|
|
46
|
+
margin: 0;
|
|
47
|
+
}
|
|
48
|
+
.titan-img-missing .titan-img-missing__sub {
|
|
49
|
+
margin-top: 6px;
|
|
50
|
+
font-size: 11px;
|
|
51
|
+
color: var(--theme-metal-dark, #8a6a3a);
|
|
52
|
+
letter-spacing: 0.04em;
|
|
53
|
+
text-transform: uppercase;
|
|
54
|
+
}
|
|
55
|
+
</style>${a?Array.from(a[1].matchAll(/<style\b[^>]*>[\s\S]*?<\/style>/gi)).map(e=>e[0]).join(`
|
|
56
|
+
`):``}<div class="titan-doc-root">${i?i[1]:e}</div>`;let o=e=>{let t=(e.getAttribute(`alt`)||``).trim()||`Image unavailable`,n=document.createElement(`figure`);n.className=`titan-img-missing`,n.innerHTML=`
|
|
57
|
+
<div class="titan-img-missing__icon" aria-hidden="true">⚙</div>
|
|
58
|
+
<figcaption class="titan-img-missing__caption">${Za(t)}</figcaption>
|
|
59
|
+
<div class="titan-img-missing__sub">Image source unavailable</div>
|
|
60
|
+
`,e.replaceWith(n)};r.querySelectorAll(`img`).forEach(e=>{let t=e;if(!(t.complete&&t.naturalWidth>0)){if(t.complete&&t.naturalWidth===0){o(t);return}t.addEventListener(`error`,()=>o(t),{once:!0}),t.addEventListener(`load`,()=>{t.naturalWidth===0&&o(t)},{once:!0})}})},[e]),(0,$.jsx)(`div`,{ref:t,className:`w-full h-full overflow-auto`,style:{background:`var(--theme-paper, #fdfaf3)`}})}function Za(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function Qa(e){return e?e===`text/markdown`?`📝`:e===`text/html`?`🌐`:e===`application/pdf`?`📕`:e.startsWith(`image/`)?`🖼️`:e===`application/json`?`⚙️`:`📄`:`📄`}function $a(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`}export{Ja as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./createLucideIcon-qnlrxww7.js";import{t as i}from"./arrow-left-4c2FnES1.js";import{n as a,t as o}from"./pencil-Dd_vzHE-.js";import{t as s}from"./chevron-right-A_pvnRh_.js";import{t as ee}from"./clock-DSPgndSD.js";import{t as c}from"./database-C1SgHa8T.js";import{t as te}from"./download-CJZWQNfV.js";import{t as l}from"./file-text-BbGTi-Po.js";import{t as ne}from"./plus-CHryCIkk.js";import{t as re}from"./refresh-cw-Disd5wRB.js";import{t as ie}from"./save-DP7oNar2.js";import{t as ae}from"./settings-5NWXzgyY.js";import{t as u}from"./trash-2-CwUv7ww1.js";import{Cn as d,On as f,Q as oe,Qn as p,S as se,a as ce,at as le,bn as ue,s as m,zt as de}from"./index-WI-E4I3h.js";var fe=r(`file`,[[`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`}]]),h=r(`folder-open`,[[`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`}]]),pe=r(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`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`}]]),g=e(t(),1),_=n();function v(){let{toast:e}=ce(),[t,n]=(0,g.useState)([]),[r,v]=(0,g.useState)(``),[y,b]=(0,g.useState)(``),[x,me]=(0,g.useState)([]),[S,C]=(0,g.useState)(null),[he,w]=(0,g.useState)(!0),[ge,T]=(0,g.useState)(!1),[E,D]=(0,g.useState)(!1),[O,k]=(0,g.useState)(``),[A,j]=(0,g.useState)(!1),[_e,M]=(0,g.useState)(!1),[ve,N]=(0,g.useState)(!1),[P,F]=(0,g.useState)(``),[I,L]=(0,g.useState)(null),[R,z]=(0,g.useState)(``),B=(0,g.useRef)(null),[V,H]=(0,g.useState)(null),[U,W]=(0,g.useState)(``);(0,g.useEffect)(()=>{de().then(e=>{n(e.roots),e.roots.length>0&&!r&&v(e.roots[0].path)}).catch(()=>{})},[]);let G=(0,g.useCallback)(async e=>{w(!0);try{let t=await ue(e??y,r||void 0);me(t.entries)}catch(e){W(`Couldn't load this folder — ${e.message}`)}w(!1)},[y,r]);(0,g.useEffect)(()=>{r&&G(y)},[y,r]);let K=e=>{b(e),C(null),D(!1)},ye=()=>{let e=y.split(`/`).filter(Boolean);e.pop(),K(e.join(`/`))},be=async e=>{if(e.type===`directory`){K(e.path);return}T(!0),D(!1);try{let t=await d(e.path,r||void 0);C(t)}catch(t){W(`Couldn't open ${e.name} — ${t.message}`)}T(!1)},xe=async()=>{if(S){j(!0),W(``);try{await p(S.path,O,r||void 0),C({...S,content:O,size:new Blob([O]).size}),D(!1),e(`success`,`File saved`)}catch(e){W(e.message)}j(!1)}},q=async()=>{if(P.trim()){W(``);try{await p(y?`${y}/${P.trim()}`:P.trim(),``,r||void 0),M(!1),F(``),e(`success`,`File created`),G()}catch(e){W(e.message)}}},J=async()=>{if(P.trim()){W(``);try{await oe(y?`${y}/${P.trim()}`:P.trim(),r||void 0),N(!1),F(``),e(`success`,`Folder created`),G()}catch(e){W(e.message)}}},Y=async t=>{if(!R.trim()||R===t.name){L(null);return}W(``);try{let n=t.path.split(`/`).slice(0,-1).join(`/`),i=n?`${n}/${R.trim()}`:R.trim();await f(t.path,i,r||void 0),L(null),e(`success`,`Renamed`),G()}catch(e){W(e.message)}},X=async()=>{if(V){W(``);try{await le(V.path,r||void 0),e(`success`,`Deleted ${V.name}`),H(null),S?.path===V.path&&C(null),G()}catch(e){W(e.message),H(null)}}};(0,g.useEffect)(()=>{I&&B.current&&B.current.focus()},[I]);let Z=e=>e===0?`0 B`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Se=e=>{if(!e)return``;try{let t=new Date(e),n=Date.now()-t.getTime();return n<36e5?`${Math.round(n/6e4)}m ago`:n<864e5?`${Math.round(n/36e5)}h ago`:n<6048e5?`${Math.round(n/864e5)}d ago`:t.toLocaleDateString()}catch{return``}},Q=e=>e.endsWith(`.json`)||e.endsWith(`.jsonl`)?(0,_.jsx)(c,{size:14,className:`text-yellow-400`}):e.endsWith(`.md`)?(0,_.jsx)(l,{size:14,className:`text-blue-400`}):e.endsWith(`.db`)?(0,_.jsx)(c,{size:14,className:`text-purple-400`}):e.endsWith(`.log`)?(0,_.jsx)(l,{size:14,className:`text-[var(--text-muted)]`}):e===`titan.json`?(0,_.jsx)(ae,{size:14,className:`text-[var(--accent)]`}):(0,_.jsx)(fe,{size:14,className:`text-[var(--text-muted)]`}),Ce=e=>e.endsWith(`.json`)||e.endsWith(`.jsonl`)?`json`:e.endsWith(`.md`)?`markdown`:e.endsWith(`.ts`)||e.endsWith(`.tsx`)?`typescript`:e.endsWith(`.js`)?`javascript`:e.endsWith(`.yaml`)||e.endsWith(`.yml`)?`yaml`:`text`,$=y?y.split(`/`).filter(Boolean):[],we=t.find(e=>e.path===r)?.label||`~/.titan`;return(0,_.jsxs)(`div`,{className:`space-y-4`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(h,{className:`w-6 h-6 text-[var(--accent)]`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`text-xl font-bold text-[var(--text)]`,children:`File Manager`}),(0,_.jsx)(`p`,{className:`text-sm text-[var(--text-muted)]`,children:`Browse, edit, and manage TITAN files`})]})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsxs)(`button`,{onClick:()=>{M(!0),F(``)},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-[var(--border)] text-xs text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors`,title:`New File`,children:[(0,_.jsx)(ne,{size:12}),` File`]}),(0,_.jsxs)(`button`,{onClick:()=>{N(!0),F(``)},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-[var(--border)] text-xs text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors`,title:`New Folder`,children:[(0,_.jsx)(pe,{size:12}),` Folder`]}),(0,_.jsx)(`button`,{onClick:()=>G(),className:`p-2 rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors`,children:(0,_.jsx)(re,{size:14})})]})]}),U&&(0,_.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-red-500/10 border border-red-500/20 rounded-lg text-sm text-red-400`,children:[(0,_.jsx)(`span`,{children:U}),(0,_.jsx)(`button`,{onClick:()=>W(``),children:(0,_.jsx)(m,{size:14})})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[t.length>1&&(0,_.jsx)(`select`,{value:r,onChange:e=>{v(e.target.value),b(``),C(null)},className:`px-2 py-1.5 rounded-md border border-[var(--border)] bg-[var(--bg-secondary)] text-[var(--text)] text-xs`,children:t.map(e=>(0,_.jsx)(`option`,{value:e.path,children:e.label},e.path))}),(0,_.jsxs)(`div`,{className:`flex-1 flex items-center gap-1 bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg px-3 py-2 overflow-x-auto`,children:[(0,_.jsxs)(`button`,{onClick:()=>K(``),className:`flex items-center gap-1 text-[var(--accent)] hover:underline flex-shrink-0`,children:[(0,_.jsx)(se,{size:14}),` `,we]}),$.map((e,t)=>(0,_.jsxs)(`span`,{className:`flex items-center gap-1 flex-shrink-0`,children:[(0,_.jsx)(s,{size:12,className:`text-[var(--text-muted)]`}),(0,_.jsx)(`button`,{onClick:()=>K($.slice(0,t+1).join(`/`)),className:t===$.length-1?`text-[var(--text)] font-medium`:`text-[var(--accent)] hover:underline`,children:e})]},t))]})]}),(0,_.jsxs)(`div`,{className:`flex gap-4`,style:{height:`calc(100vh - 280px)`},children:[(0,_.jsxs)(`div`,{className:`${S?`w-1/3`:`w-full`} bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg overflow-hidden flex flex-col transition-all`,children:[y&&(0,_.jsxs)(`button`,{onClick:ye,className:`flex items-center gap-2 px-4 py-2 text-sm text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] border-b border-[var(--border)] transition-colors`,children:[(0,_.jsx)(i,{size:14}),` Back`]}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:he?(0,_.jsx)(`div`,{className:`p-4 text-[var(--text-muted)] text-sm`,children:`Loading...`}):x.length===0?(0,_.jsxs)(`div`,{className:`p-8 text-center text-[var(--text-muted)]`,children:[(0,_.jsx)(h,{className:`w-10 h-10 mx-auto mb-2 opacity-50`}),(0,_.jsx)(`p`,{className:`text-sm`,children:`Empty directory`})]}):x.map(e=>(0,_.jsxs)(`div`,{className:`group w-full flex items-center gap-3 px-4 py-2.5 text-left hover:bg-[var(--bg-tertiary)] border-b border-[var(--border)]/30 transition-colors cursor-pointer ${S?.path===e.path?`bg-[var(--accent)]/10 border-l-2 border-l-[var(--accent)]`:``}`,onClick:()=>I!==e.path&&be(e),children:[e.type===`directory`?(0,_.jsx)(h,{size:14,className:`text-[var(--accent)] flex-shrink-0`}):Q(e.name),(0,_.jsx)(`div`,{className:`flex-1 min-w-0`,children:I===e.path?(0,_.jsx)(`input`,{ref:B,value:R,onChange:e=>z(e.target.value),onKeyDown:t=>{t.key===`Enter`&&Y(e),t.key===`Escape`&&L(null)},onBlur:()=>Y(e),className:`text-sm bg-[var(--bg-tertiary)] border border-[var(--accent)] rounded px-1.5 py-0.5 text-[var(--text)] w-full outline-none`,onClick:e=>e.stopPropagation()}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`p`,{className:`text-sm truncate ${e.type===`directory`?`text-[var(--accent)] font-medium`:`text-[var(--text)]`}`,children:e.name}),(0,_.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-[var(--text-muted)]`,children:[e.type===`file`&&(0,_.jsx)(`span`,{children:Z(e.size)}),e.modified&&(0,_.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,_.jsx)(ee,{size:10}),` `,Se(e.modified)]})]})]})}),I!==e.path&&(0,_.jsxs)(`div`,{className:`flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0`,children:[(0,_.jsx)(`button`,{onClick:t=>{t.stopPropagation(),L(e.path),z(e.name)},className:`p-1 rounded text-[var(--text-muted)] hover:text-[var(--accent)] hover:bg-[var(--bg-secondary)]`,title:`Rename`,children:(0,_.jsx)(o,{size:12})}),(0,_.jsx)(`button`,{onClick:t=>{t.stopPropagation(),H(e)},className:`p-1 rounded text-[var(--text-muted)] hover:text-red-400 hover:bg-red-500/10`,title:`Delete`,children:(0,_.jsx)(u,{size:12})})]}),e.type===`directory`&&I!==e.path&&(0,_.jsx)(s,{size:14,className:`text-[var(--text-muted)] flex-shrink-0`})]},e.path))})]}),S&&(0,_.jsxs)(`div`,{className:`flex-1 bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg overflow-hidden flex flex-col`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2 border-b border-[var(--border)] bg-[var(--bg-tertiary)]`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[Q(S.path),(0,_.jsx)(`span`,{className:`text-sm font-medium text-[var(--text)] truncate`,children:S.path.split(`/`).pop()}),(0,_.jsx)(`span`,{className:`text-[10px] text-[var(--text-muted)] flex-shrink-0`,children:Z(S.size)}),S.truncated&&(0,_.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-[var(--warning)]/15 text-[var(--warning)] border border-[var(--warning)]/20 flex-shrink-0`,children:`Truncated (1MB limit)`}),E&&(0,_.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-[var(--accent)]/15 text-[var(--accent)] border border-[var(--accent)]/20 flex-shrink-0`,children:`Editing`})]}),(0,_.jsx)(`div`,{className:`flex gap-1.5`,children:E?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`button`,{onClick:xe,disabled:A,className:`flex items-center gap-1 px-2 py-1 rounded text-xs bg-[var(--accent)] text-white hover:opacity-90 disabled:opacity-50`,children:[(0,_.jsx)(ie,{size:12}),` `,A?`Saving...`:`Save`]}),(0,_.jsxs)(`button`,{onClick:()=>{D(!1),k(``)},className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--bg-secondary)]`,children:[(0,_.jsx)(m,{size:12}),` Cancel`]})]}):(0,_.jsxs)(_.Fragment,{children:[!S.truncated&&(0,_.jsx)(`button`,{onClick:()=>{D(!0),k(S.content)},className:`flex items-center gap-1 p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--accent)] hover:bg-[var(--bg-secondary)] transition-colors`,title:`Edit`,children:(0,_.jsx)(o,{size:14})}),(0,_.jsx)(`button`,{onClick:()=>{let e=new Blob([S.content],{type:`text/plain`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=S.path.split(`/`).pop()||`file.txt`,t.click()},className:`p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--bg-secondary)] transition-colors`,title:`Download`,children:(0,_.jsx)(te,{size:14})}),(0,_.jsx)(`button`,{onClick:()=>{C(null),D(!1)},className:`text-xs text-[var(--text-muted)] hover:text-[var(--text)] px-1`,children:`Close`})]})})]}),(0,_.jsx)(`div`,{className:`flex-1 overflow-auto`,children:ge?(0,_.jsx)(`div`,{className:`p-4 text-[var(--text-muted)] text-sm`,children:`Loading file...`}):E?(0,_.jsx)(`textarea`,{value:O,onChange:e=>k(e.target.value),className:`w-full h-full p-4 text-xs font-mono text-[var(--text-secondary)] bg-transparent resize-none outline-none leading-relaxed`,spellCheck:!1}):Ce(S.path)===`json`?(0,_.jsx)(`pre`,{className:`p-4 text-xs font-mono text-[var(--text-secondary)] whitespace-pre-wrap break-words leading-relaxed`,children:(()=>{try{return JSON.stringify(JSON.parse(S.content),null,2)}catch{return S.content}})()}):(0,_.jsx)(`pre`,{className:`p-4 text-xs font-mono text-[var(--text-secondary)] whitespace-pre-wrap break-words leading-relaxed`,children:S.content})})]})]}),_e&&(0,_.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>M(!1),children:(0,_.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-xl p-5 w-80 space-y-4`,onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold text-[var(--text)]`,children:`New File`}),(0,_.jsx)(`input`,{autoFocus:!0,value:P,onChange:e=>F(e.target.value),onKeyDown:e=>e.key===`Enter`&&q(),placeholder:`filename.txt`,className:`w-full px-3 py-2 rounded-md border border-[var(--border)] bg-[var(--bg-tertiary)] text-sm text-[var(--text)] outline-none focus:border-[var(--accent)]`}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(`button`,{onClick:()=>M(!1),className:`px-3 py-1.5 text-xs text-[var(--text-muted)] hover:text-[var(--text)]`,children:`Cancel`}),(0,_.jsxs)(`button`,{onClick:q,className:`flex items-center gap-1 px-3 py-1.5 text-xs bg-[var(--accent)] text-white rounded-md hover:opacity-90`,children:[(0,_.jsx)(a,{size:12}),` Create`]})]})]})}),ve&&(0,_.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>N(!1),children:(0,_.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-xl p-5 w-80 space-y-4`,onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold text-[var(--text)]`,children:`New Folder`}),(0,_.jsx)(`input`,{autoFocus:!0,value:P,onChange:e=>F(e.target.value),onKeyDown:e=>e.key===`Enter`&&J(),placeholder:`folder-name`,className:`w-full px-3 py-2 rounded-md border border-[var(--border)] bg-[var(--bg-tertiary)] text-sm text-[var(--text)] outline-none focus:border-[var(--accent)]`}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(`button`,{onClick:()=>N(!1),className:`px-3 py-1.5 text-xs text-[var(--text-muted)] hover:text-[var(--text)]`,children:`Cancel`}),(0,_.jsxs)(`button`,{onClick:J,className:`flex items-center gap-1 px-3 py-1.5 text-xs bg-[var(--accent)] text-white rounded-md hover:opacity-90`,children:[(0,_.jsx)(a,{size:12}),` Create`]})]})]})}),V&&(0,_.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50`,onClick:()=>H(null),children:(0,_.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-xl p-5 w-80 space-y-4`,onClick:e=>e.stopPropagation(),children:[(0,_.jsxs)(`h3`,{className:`text-sm font-semibold text-[var(--text)]`,children:[`Delete `,V.type===`directory`?`Folder`:`File`,`?`]}),(0,_.jsxs)(`p`,{className:`text-xs text-[var(--text-muted)]`,children:[`Are you sure you want to delete `,(0,_.jsx)(`span`,{className:`font-mono text-[var(--text)]`,children:V.name}),`? This cannot be undone.`]}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(`button`,{onClick:()=>H(null),className:`px-3 py-1.5 text-xs text-[var(--text-muted)] hover:text-[var(--text)]`,children:`Cancel`}),(0,_.jsxs)(`button`,{onClick:X,className:`flex items-center gap-1 px-3 py-1.5 text-xs bg-red-500 text-white rounded-md hover:opacity-90`,children:[(0,_.jsx)(u,{size:12}),` Delete`]})]})]})})]})}export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./radio-D-XnoAVu.js";import{t as i}from"./refresh-cw-Disd5wRB.js";import{Vt as a,a as o}from"./index-WI-E4I3h.js";import{t as s}from"./PageHeader-CH85uoZG.js";var c=e(t(),1),l=n();function u(){let{toast:e}=o(),[t,n]=(0,c.useState)([]),[u,d]=(0,c.useState)(!0),f=(0,c.useCallback)(async()=>{d(!0);try{let e=await a();n(e.nodes||[])}catch(t){e(`error`,`Couldn't load fleet nodes — try again. (${t.message})`)}d(!1)},[e]);return(0,c.useEffect)(()=>{f()},[f]),(0,l.jsxs)(`div`,{className:`space-y-4`,children:[(0,l.jsx)(s,{title:`Fleet Router`,breadcrumbs:[{label:`Admin`,href:`/overview`},{label:`Mesh`},{label:`Fleet`}]}),(0,l.jsx)(`div`,{className:`flex gap-2`,children:(0,l.jsxs)(`button`,{onClick:f,disabled:u,className:`flex items-center gap-2 px-3 py-2 rounded-lg bg-[#27272a] text-[#a1a1aa] text-sm font-medium hover:bg-[#3f3f46] disabled:opacity-50`,children:[(0,l.jsx)(i,{className:`w-4 h-4 ${u?`animate-spin`:``}`}),` Refresh`]})}),(0,l.jsx)(`div`,{className:`space-y-2`,children:t.map(e=>(0,l.jsxs)(`div`,{className:`flex items-center justify-between p-3 rounded-lg bg-[#0a0a0f] border border-[#27272a]`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsx)(r,{className:`w-4 h-4 ${e.status===`online`?`text-emerald-400`:e.status===`busy`?`text-amber-400`:`text-red-400`}`}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`div`,{className:`text-sm text-[#e4e4e7]`,children:e.name}),(0,l.jsxs)(`div`,{className:`text-xs text-[#52525b]`,children:[e.address,` • `,e.capabilities.join(`, `)]})]})]}),(0,l.jsx)(`div`,{className:`text-xs text-[#52525b]`,children:e.status})]},e.id))})]})}export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./createLucideIcon-qnlrxww7.js";import{t as i}from"./chart-column-hhZMdCgB.js";import{t as a}from"./circle-check-big-C-JUM7wb.js";import{t as o}from"./clock-DSPgndSD.js";import{t as s}from"./dollar-sign-D9siqK91.js";import{t as c}from"./message-square-BpzrINHz.js";import{t as l}from"./network-CM7y1ats.js";import{t as u}from"./refresh-cw-Disd5wRB.js";import{t as d}from"./server-DFfeYjoM.js";import{t as f}from"./wifi-off-CWLeusSV.js";import{A as p,H as m,I as h,O as g,f as _,l as v,o as y,u as b,w as x}from"./index-WI-E4I3h.js";import{t as S}from"./PageHeader-CH85uoZG.js";import{t as ee}from"./SkeletonLoader-9H7QWa9E.js";import{t as C}from"./StatCard-wmSgMAM3.js";var w=r(`kanban`,[[`path`,{d:`M6 5v11`,key:`mdvv1e`}],[`path`,{d:`M12 5v6`,key:`14ar3b`}],[`path`,{d:`M18 5v14`,key:`7ji314`}]]),T=e(t(),1),E=n(),D=15e3;function O(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${r}m`:n>0?`${n}h ${r}m`:`${r}m`}function k(e){return e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.round(e)} MB`}function A(e){return k(e/1024/1024)}function j(e){let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function M({status:e}){return(0,E.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full shadow-lg ${{online:`bg-success shadow-success/40`,offline:`bg-error shadow-error/40`,working:`bg-warning shadow-warning/40 animate-pulse`,unknown:`bg-text-muted shadow-none`}[e]}`})}function N({title:e,icon:t,children:n}){return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,E.jsx)(t,{className:`h-4 w-4 text-accent-hover`}),(0,E.jsx)(`h3`,{className:`text-sm font-semibold uppercase tracking-wider text-text-secondary`,children:e})]}),n]})}function P(){let[e,t]=(0,T.useState)(!0),[n,r]=(0,T.useState)([]),[k,P]=(0,T.useState)(null),[F,I]=(0,T.useState)(null),[L,R]=(0,T.useState)(null),[z,B]=(0,T.useState)([]),[V,H]=(0,T.useState)([]),[U,W]=(0,T.useState)([]),[G,K]=(0,T.useState)([]),[q,J]=(0,T.useState)([]),[Y,X]=(0,T.useState)(new Date),Z=(0,T.useCallback)(async()=>{try{let[e,t,n,i,a,o,s,c,l]=await Promise.all([m(`/api/homelab/machines`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/vram`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/stats`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/activity/summary`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/command-post/agents`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/command-post/issues`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/command-post/activity?limit=15`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/command-post/budgets`).then(e=>e.ok?e.json():null).catch(()=>null),m(`/api/mesh/peers`).then(e=>e.ok?e.json():null).catch(()=>null)]);Array.isArray(e?.machines)&&r(e.machines.map(e=>({name:String(e.name??`Unknown`),ip:String(e.ip??``),role:String(e.role??``),online:e.online===!0}))),t&&P(t),n&&I(n),i&&R(i),Array.isArray(a)&&B(a);let u=Array.isArray(o)?o:o?.issues??[];H(u);let d=Array.isArray(s)?s:s?.feed??s?.activity??[];W(d),Array.isArray(c)&&K(c);let f=l?.peers??(Array.isArray(l)?l:[]);J(f),X(new Date)}finally{t(!1)}},[]);if((0,T.useEffect)(()=>{Z();let e=setInterval(Z,D);return()=>clearInterval(e)},[Z]),e)return(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsx)(S,{title:`Homelab`,breadcrumbs:[{label:`Monitoring`},{label:`Homelab`}]}),(0,E.jsx)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:(0,E.jsx)(ee,{variant:`metric`,count:8})})]});let Q=!!k&&typeof k.totalVRAM==`number`&&Number.isFinite(k.totalVRAM)&&k.totalVRAM>0&&typeof k.usedVRAM==`number`&&Number.isFinite(k.usedVRAM),$=Q?Math.round(k.usedVRAM/k.totalVRAM*100):0,te=e=>V.filter(t=>t.status===e);return(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(S,{title:`Homelab`,breadcrumbs:[{label:`Monitoring`},{label:`Homelab`}],actions:(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxs)(`button`,{onClick:Z,className:`flex items-center gap-1.5 rounded-lg bg-bg-tertiary px-3 py-1.5 text-xs text-text-secondary hover:bg-border hover:text-text transition-colors`,children:[(0,E.jsx)(u,{className:`h-3.5 w-3.5`}),` Refresh`]}),(0,E.jsxs)(`span`,{className:`text-[10px] text-text-muted`,children:[`Updated `,Y.toLocaleTimeString()]})]})}),F&&(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,E.jsx)(C,{title:`Uptime`,value:O(F.uptime??0),icon:(0,E.jsx)(o,{className:`h-4 w-4`})}),(0,E.jsx)(C,{title:`Total Requests`,value:(F.totalRequests??0).toLocaleString(),icon:(0,E.jsx)(y,{className:`h-4 w-4`})}),(0,E.jsx)(C,{title:`Active Sessions`,value:F.activeSessions??0,icon:(0,E.jsx)(c,{className:`h-4 w-4`})}),(0,E.jsx)(C,{title:`Active Model`,value:F.model?.split(`/`).pop()??`unknown`,icon:(0,E.jsx)(g,{className:`h-4 w-4`}),subtitle:F.provider})]}),(0,E.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,E.jsx)(N,{title:`Machines`,icon:d,children:(0,E.jsx)(`div`,{className:`grid gap-2`,children:n.map(e=>(0,E.jsxs)(`div`,{className:`flex items-center justify-between rounded-xl border border-border bg-bg-secondary px-4 py-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(M,{status:e.online===null?`unknown`:e.online?`online`:`offline`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-sm font-medium text-text`,children:e.name}),(0,E.jsx)(`p`,{className:`text-[11px] text-text-muted`,children:e.role})]})]}),(0,E.jsxs)(`div`,{className:`text-right`,children:[(0,E.jsx)(`p`,{className:`text-xs font-mono text-text-secondary`,children:e.ip}),(0,E.jsx)(`p`,{className:`text-[10px] text-text-muted`,children:e.online?`Online`:e.online===!1?`Offline`:`Checking...`})]})]},e.ip))})}),(0,E.jsx)(N,{title:`GPU / VRAM`,icon:x,children:Q?(0,E.jsxs)(`div`,{className:`rounded-xl border border-border bg-bg-secondary p-4 space-y-3`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex justify-between text-xs mb-1`,children:[(0,E.jsx)(`span`,{className:`text-text-secondary`,children:`VRAM Usage`}),(0,E.jsxs)(`span`,{className:`text-text-muted`,children:[A(k.usedVRAM),` / `,A(k.totalVRAM),` (`,$,`%)`]})]}),(0,E.jsx)(`div`,{className:`h-3 rounded-full bg-bg-tertiary overflow-hidden`,children:(0,E.jsx)(`div`,{className:`h-full rounded-full transition-all ${$>90?`bg-error`:$>70?`bg-warning`:`bg-accent`}`,style:{width:`${$}%`}})})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,E.jsx)(M,{status:k.state===`idle`?`online`:`working`}),(0,E.jsx)(`span`,{className:`text-text-secondary capitalize`,children:k.state})]}),k.models?.length>0&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-[10px] font-medium uppercase tracking-wider text-text-muted mb-1`,children:`Loaded Models`}),k.models.map(e=>(0,E.jsxs)(`div`,{className:`flex justify-between text-xs py-0.5`,children:[(0,E.jsx)(`span`,{className:`text-text-secondary`,children:e.name}),(0,E.jsx)(`span`,{className:`text-text-muted font-mono`,children:A(e.vram)})]},e.id))]}),k.leases?.length>0&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-[10px] font-medium uppercase tracking-wider text-text-muted mb-1`,children:`Active Leases`}),k.leases.map(e=>(0,E.jsxs)(`div`,{className:`flex justify-between text-xs py-0.5`,children:[(0,E.jsx)(`span`,{className:`text-text-secondary`,children:e.service}),(0,E.jsxs)(`span`,{className:`text-text-muted font-mono`,children:[e.requiredMB,` MB`]})]},e.leaseId))]})]}):(0,E.jsx)(`div`,{className:`rounded-xl border border-border bg-bg-secondary p-4 text-center text-xs text-text-muted`,children:`No GPU detected on this gateway host. VRAM orchestration is inactive.`})})]}),L&&(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-5`,children:[(0,E.jsx)(C,{title:`Tool Calls (24h)`,value:L.toolCallsLast24h,icon:(0,E.jsx)(y,{className:`h-4 w-4`})}),(0,E.jsx)(C,{title:`Active Goals`,value:L.activeGoals,icon:(0,E.jsx)(i,{className:`h-4 w-4`})}),(0,E.jsx)(C,{title:`Autopilot`,value:L.autopilotEnabled?`On`:`Off`,icon:(0,E.jsx)(h,{className:`h-4 w-4`}),subtitle:`${L.autopilotRunsToday} runs today`}),(0,E.jsx)(C,{title:`Knowledge Graph`,value:L.graphStats.entities,icon:(0,E.jsx)(l,{className:`h-4 w-4`}),subtitle:`${L.graphStats.edges} edges`}),(0,E.jsx)(C,{title:`System Status`,value:L.status===`idle`?`Idle`:L.status,icon:L.status===`idle`?(0,E.jsx)(a,{className:`h-4 w-4`}):(0,E.jsx)(h,{className:`h-4 w-4`})})]}),(0,E.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,E.jsx)(N,{title:`Mesh Network`,icon:l,children:(0,E.jsx)(`div`,{className:`rounded-xl border border-border bg-bg-secondary p-4`,children:q.length>0?(0,E.jsx)(`div`,{className:`space-y-2`,children:q.map(e=>(0,E.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(v,{className:`h-3.5 w-3.5 text-success`}),(0,E.jsx)(`span`,{className:`text-text-secondary`,children:e.host||e.nodeId.slice(0,12)})]}),(0,E.jsxs)(`span`,{className:`text-text-muted`,children:[e.models?.length??0,` models`]})]},e.nodeId))}):(0,E.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-text-muted`,children:[(0,E.jsx)(f,{className:`h-3.5 w-3.5`}),`No mesh peers connected`]})})}),(0,E.jsx)(N,{title:`Active Agents`,icon:b,children:(0,E.jsx)(`div`,{className:`rounded-xl border border-border bg-bg-secondary p-4`,children:z.length>0?(0,E.jsx)(`div`,{className:`space-y-2`,children:z.map(e=>{let t=e.status===`active`||e.status===`running`;return(0,E.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(M,{status:e.lastHeartbeat&&Date.now()-new Date(e.lastHeartbeat).getTime()>36e5?`offline`:t?`working`:`online`}),(0,E.jsx)(`span`,{className:`text-text font-medium`,children:e.name||e.id.slice(0,12)}),e.role&&(0,E.jsxs)(`span`,{className:`text-text-muted`,children:[`(`,e.role,`)`]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`span`,{className:`capitalize text-text-secondary`,children:e.status}),e.lastHeartbeat&&(0,E.jsx)(`span`,{className:`text-text-muted`,children:j(e.lastHeartbeat)})]})]},e.id)})}):(0,E.jsx)(`p`,{className:`text-xs text-text-muted`,children:`No agents registered`})})})]}),(0,E.jsx)(N,{title:`Task Board`,icon:w,children:(0,E.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[`todo`,`in_progress`,`done`].map(e=>{let t=e===`in_progress`?`In Progress`:e.charAt(0).toUpperCase()+e.slice(1),n=te(e);return(0,E.jsxs)(`div`,{className:`rounded-xl border border-border bg-bg-secondary/50 p-3 min-h-[120px]`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,E.jsx)(`p`,{className:`text-[10px] font-semibold uppercase tracking-wider ${e===`todo`?`text-text-muted`:e===`in_progress`?`text-warning`:`text-success`}`,children:t}),(0,E.jsxs)(`span`,{className:`text-[10px] text-text-muted`,children:[`(`,n?.length,`)`]})]}),n?.length>0?(0,E.jsxs)(`div`,{className:`space-y-1.5`,children:[n.slice(0,8).map(e=>(0,E.jsxs)(`div`,{className:`rounded-lg border border-border bg-bg p-2 text-xs`,children:[(0,E.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,E.jsx)(`span`,{className:`text-accent font-semibold shrink-0`,children:e.id.slice(0,6)}),(0,E.jsx)(`span`,{className:`text-text-secondary`,children:e.title||e.description||`Untitled`})]}),e.assigneeAgentId&&(0,E.jsxs)(`p`,{className:`text-[10px] text-text-muted mt-0.5`,children:[`→ `,e.assigneeAgentId]})]},e.id)),n?.length>8&&(0,E.jsxs)(`p`,{className:`text-[10px] text-text-muted text-center`,children:[`+`,n?.length-8,` more`]})]}):(0,E.jsx)(`p`,{className:`text-[10px] text-text-muted italic text-center py-4`,children:`Empty`})]},e)})})}),(0,E.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,E.jsx)(N,{title:`Live Activity`,icon:h,children:(0,E.jsx)(`div`,{className:`rounded-xl border border-border bg-bg-secondary p-3 max-h-[320px] overflow-y-auto`,children:U.length>0?(0,E.jsx)(`div`,{className:`space-y-0`,children:U.slice(0,15).map((e,t)=>{let n=e.timestamp?new Date(e.timestamp).toLocaleTimeString():``,r=e.type||`event`,i=r.includes(`agent`),a=r.includes(`tool`);return(0,E.jsxs)(`div`,{className:`flex gap-2.5 py-1.5 border-b border-border/50 last:border-0 text-xs`,children:[(0,E.jsx)(`span`,{className:`text-text-muted shrink-0 w-[52px] text-[10px]`,children:n}),(0,E.jsx)(`span`,{className:`shrink-0 rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase ${a?`bg-accent/15 text-accent`:i?`bg-success/15 text-success`:`bg-warning/15 text-warning`}`,children:r.slice(0,10)}),(0,E.jsx)(`span`,{className:`text-text-secondary truncate`,children:e.message||e.detail||e.content||``})]},t)})}):(0,E.jsx)(`p`,{className:`text-xs text-text-muted italic text-center py-6`,children:`No recent activity`})})}),(0,E.jsx)(N,{title:`Budget Tracking`,icon:s,children:(0,E.jsx)(`div`,{className:`rounded-xl border border-border bg-bg-secondary p-4`,children:G.length>0?(0,E.jsx)(`div`,{className:`space-y-3`,children:G.map(e=>{let t=e.limitUsd>0?Math.round(e.currentSpend/e.limitUsd*100):0;return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex justify-between text-xs mb-1`,children:[(0,E.jsx)(`span`,{className:`text-text-secondary font-medium`,children:e.name}),(0,E.jsxs)(`span`,{className:`text-text-muted`,children:[`$`,e.currentSpend.toFixed(2),` / $`,e.limitUsd.toFixed(2),` (`,e.period,`)`]})]}),(0,E.jsx)(`div`,{className:`h-2 rounded-full bg-bg-tertiary overflow-hidden`,children:(0,E.jsx)(`div`,{className:`h-full rounded-full transition-all ${t>90?`bg-error`:t>70?`bg-warning`:`bg-success`}`,style:{width:`${Math.min(t,100)}%`}})})]},e.id)})}):(0,E.jsx)(`p`,{className:`text-xs text-text-muted`,children:`No budget policies configured`})})})]}),F?.health&&(0,E.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl border border-border bg-bg-secondary px-4 py-3`,children:[F.health.ollamaHealthy?(0,E.jsx)(a,{className:`h-4 w-4 text-success`}):(0,E.jsx)(p,{className:`h-4 w-4 text-error`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-xs font-medium text-text`,children:`Ollama`}),(0,E.jsx)(`p`,{className:`text-[10px] text-text-muted`,children:F.health.ollamaHealthy?`Healthy`:`Unhealthy`})]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl border border-border bg-bg-secondary px-4 py-3`,children:[F.health.ttsHealthy?(0,E.jsx)(a,{className:`h-4 w-4 text-success`}):(0,E.jsx)(_,{className:`h-4 w-4 text-warning`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-xs font-medium text-text`,children:`TTS`}),(0,E.jsx)(`p`,{className:`text-[10px] text-text-muted`,children:F.health.ttsHealthy?`Healthy`:`Unavailable`})]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl border border-border bg-bg-secondary px-4 py-3`,children:[(0,E.jsx)(h,{className:`h-4 w-4 text-accent`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-xs font-medium text-text`,children:`LLM Requests`}),(0,E.jsxs)(`p`,{className:`text-[10px] text-text-muted`,children:[F.health.activeLlmRequests,` active`]})]})]})]})]})}export{P as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomelabPanel-m8vMm5rE.js","assets/jsx-runtime-B15e6lOy.js","assets/createLucideIcon-qnlrxww7.js","assets/chart-column-hhZMdCgB.js","assets/circle-check-big-C-JUM7wb.js","assets/clock-DSPgndSD.js","assets/dollar-sign-D9siqK91.js","assets/message-square-BpzrINHz.js","assets/network-CM7y1ats.js","assets/refresh-cw-Disd5wRB.js","assets/server-DFfeYjoM.js","assets/wifi-off-CWLeusSV.js","assets/index-WI-E4I3h.js","assets/index-Cz8190xO.css","assets/PageHeader-CH85uoZG.js","assets/chevron-right-A_pvnRh_.js","assets/SkeletonLoader-9H7QWa9E.js","assets/clsx-CjueKrWZ.js","assets/StatCard-wmSgMAM3.js","assets/NvidiaPanel-BfI1K5Pg.js","assets/external-link-CpQLWKKE.js","assets/save-DP7oNar2.js","assets/search-aNVcX-nv.js","assets/FilesPanel-BI90Pplh.js","assets/arrow-left-4c2FnES1.js","assets/pencil-Dd_vzHE-.js","assets/database-C1SgHa8T.js","assets/download-CJZWQNfV.js","assets/file-text-BbGTi-Po.js","assets/plus-CHryCIkk.js","assets/settings-5NWXzgyY.js","assets/trash-2-CwUv7ww1.js","assets/LogsPanel-DbShr4Ic.js","assets/TelemetryPanel-_pmGVxpO.js","assets/git-branch-CQ2yNSzU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{sr as r}from"./index-WI-E4I3h.js";import{t as i}from"./clsx-CjueKrWZ.js";var a=e(t(),1),o=n(),s=(0,a.lazy)(()=>r(()=>import(`./HomelabPanel-m8vMm5rE.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))),c=(0,a.lazy)(()=>r(()=>import(`./NvidiaPanel-BfI1K5Pg.js`),__vite__mapDeps([19,1,4,2,20,9,21,22,12,13,14,15]))),l=(0,a.lazy)(()=>r(()=>import(`./FilesPanel-BI90Pplh.js`),__vite__mapDeps([23,1,2,24,25,15,5,26,27,28,29,9,21,30,31,12,13]))),u=(0,a.lazy)(()=>r(()=>import(`./LogsPanel-DbShr4Ic.js`),__vite__mapDeps([32,1,9,2,12,13,14,15]))),d=(0,a.lazy)(()=>r(()=>import(`./TelemetryPanel-_pmGVxpO.js`),__vite__mapDeps([33,1,3,2,5,34,10,12,13,18]))),f=[{id:`homelab`,label:`Homelab`},{id:`gpu`,label:`GPU / NVIDIA`},{id:`files`,label:`Files`},{id:`logs`,label:`Logs`},{id:`telemetry`,label:`Telemetry`}];function p(){let[e,t]=(0,a.useState)(`homelab`);return(0,o.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,o.jsxs)(`div`,{className:`shrink-0 px-5 pt-4 pb-0`,children:[(0,o.jsx)(`h1`,{className:`text-sm font-semibold text-text mb-3`,children:`Infrastructure`}),(0,o.jsx)(`div`,{className:`flex items-center gap-0.5 border-b border-border/50`,children:f.map(n=>(0,o.jsxs)(`button`,{onClick:()=>t(n.id),className:i(`px-3 py-2 text-xs font-medium transition-colors relative`,e===n.id?`text-accent`:`text-text-muted hover:text-text-secondary`),children:[n.label,e===n.id&&(0,o.jsx)(`div`,{className:`absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full`})]},n.id))})]}),(0,o.jsx)(`div`,{className:`flex-1 min-h-0 overflow-auto p-5`,children:(0,o.jsxs)(a.Suspense,{fallback:(0,o.jsx)(`div`,{className:`skeleton-shimmer h-40 rounded-lg`}),children:[e===`homelab`&&(0,o.jsx)(s,{}),e===`gpu`&&(0,o.jsx)(c,{}),e===`files`&&(0,o.jsx)(l,{}),e===`logs`&&(0,o.jsx)(u,{}),e===`telemetry`&&(0,o.jsx)(d,{})]})})]})}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./chevron-right-A_pvnRh_.js";import{t as i}from"./circle-check-big-C-JUM7wb.js";import{t as a}from"./plug-Dm25Wbrc.js";import{t as o}from"./save-DP7oNar2.js";import{At as s,D as c,E as l,H as u,M as d,P as f,Yn as p}from"./index-WI-E4I3h.js";import{t as m}from"./PageHeader-CH85uoZG.js";var h=e(t(),1),g=n(),_=[{id:`anthropic`,label:`Anthropic`,fieldKey:`anthropicKey`,fieldType:`key`,placeholder:`sk-ant-...`},{id:`openai`,label:`OpenAI`,fieldKey:`openaiKey`,fieldType:`key`,placeholder:`sk-...`},{id:`google`,label:`Google AI`,fieldKey:`googleKey`,fieldType:`key`,placeholder:`AIza...`},{id:`groq`,label:`Groq`,fieldKey:`groqKey`,fieldType:`key`,placeholder:`gsk_...`},{id:`mistral`,label:`Mistral`,fieldKey:`mistralKey`,fieldType:`key`,placeholder:`API key`},{id:`openrouter`,label:`OpenRouter`,fieldKey:`openrouterKey`,fieldType:`key`,placeholder:`sk-or-...`},{id:`fireworks`,label:`Fireworks AI`,fieldKey:`fireworksKey`,fieldType:`key`,placeholder:`API key`},{id:`xai`,label:`xAI (Grok)`,fieldKey:`xaiKey`,fieldType:`key`,placeholder:`xai-...`},{id:`together`,label:`Together AI`,fieldKey:`togetherKey`,fieldType:`key`,placeholder:`API key`},{id:`deepseek`,label:`DeepSeek`,fieldKey:`deepseekKey`,fieldType:`key`,placeholder:`sk-...`},{id:`perplexity`,label:`Perplexity`,fieldKey:`perplexityKey`,fieldType:`key`,placeholder:`pplx-...`},{id:`ollama`,label:`Ollama`,fieldKey:`ollamaUrl`,fieldType:`url`,placeholder:`http://localhost:11434`}];function v({configured:e}){return(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium ${e?`bg-success/10 text-success`:`bg-border-light/20 text-text-muted`}`,children:[(0,g.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full ${e?`bg-success`:`bg-border-light`}`}),e?`Configured`:`Not configured`]})}function y({provider:e,configured:t,currentUrl:n,onSave:i,saving:a}){let[s,u]=(0,h.useState)(!1),[d,p]=(0,h.useState)(e.fieldType===`url`&&n||``),[m,_]=(0,h.useState)(!1),y=e.fieldType===`key`,b=a===e.id;return(0,g.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary`,children:[(0,g.jsxs)(`button`,{onClick:()=>u(!s),className:`flex w-full items-center justify-between px-4 py-3 text-left`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-3`,children:[s?(0,g.jsx)(f,{className:`h-4 w-4 text-text-muted`}):(0,g.jsx)(r,{className:`h-4 w-4 text-text-muted`}),(0,g.jsx)(`span`,{className:`text-sm font-medium text-text`,children:e.label})]}),(0,g.jsx)(v,{configured:t})]}),s&&(0,g.jsxs)(`div`,{className:`border-t border-bg-tertiary px-4 py-4 space-y-3`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`label`,{className:`mb-1 block text-xs text-text-muted`,children:y?`API Key`:`Base URL`}),(0,g.jsxs)(`div`,{className:`relative`,children:[(0,g.jsx)(`input`,{id:`integration-${e.id}`,name:`integration-${e.id}`,type:y&&!m?`password`:`text`,value:d,onChange:e=>p(e.target.value),placeholder:e.placeholder,className:`w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-accent`}),y&&(0,g.jsx)(`button`,{type:`button`,onClick:()=>_(!m),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary`,children:m?(0,g.jsx)(c,{className:`h-4 w-4`}):(0,g.jsx)(l,{className:`h-4 w-4`})})]})]}),(0,g.jsx)(`div`,{className:`flex justify-end`,children:(0,g.jsxs)(`button`,{onClick:()=>i(e.fieldKey,d),disabled:b||!d,className:`flex items-center gap-2 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50`,children:[(0,g.jsx)(o,{className:`h-3.5 w-3.5`}),b?`Saving...`:`Save`]})})]})]})}function b(){let[e,t]=(0,h.useState)({}),[n,r]=(0,h.useState)({clientIdSet:!1,clientSecretSet:!1}),[f,b]=(0,h.useState)(!0),[x,S]=(0,h.useState)(null),[C,w]=(0,h.useState)(null),[T,E]=(0,h.useState)(``),[D,O]=(0,h.useState)(``),[k,A]=(0,h.useState)(!1);(0,h.useEffect)(()=>{(async()=>{try{let e=await s();if(e.providers&&t(e.providers),e.oauth?.google){let t=e.oauth.google;try{let e=await(await u(`/api/auth/google/status`)).json();t.connected=e.connected,t.email=e.email}catch{}r(t)}}catch(e){N(`error`,`Couldn't load integrations — try again. (${e instanceof Error?e.message:`unknown error`})`)}finally{b(!1)}})()},[]);let j=()=>{window.location.href=`/api/auth/google/start`},M=async()=>{try{await u(`/api/auth/google/disconnect`,{method:`POST`}),r(e=>({...e,connected:!1,email:void 0})),N(`success`,`Google account disconnected`)}catch{N(`error`,`Failed to disconnect`)}},N=(e,t)=>{w({type:e,message:t}),setTimeout(()=>w(null),3e3)},P=async(e,n)=>{let r=_.find(t=>t.fieldKey===e)?.id||e;S(r);try{await p({[e]:n});let r=await s();r.providers&&t(r.providers),N(`success`,`${_.find(t=>t.fieldKey===e)?.label||`Provider`} saved`)}catch(e){N(`error`,e instanceof Error?e.message:`Failed to save`)}finally{S(null)}};return f?(0,g.jsx)(`div`,{className:`space-y-4`,children:Array.from({length:4}).map((e,t)=>(0,g.jsx)(`div`,{className:`h-14 animate-pulse rounded-xl border border-border bg-bg-secondary`},t))}):(0,g.jsxs)(`div`,{className:`space-y-6`,children:[(0,g.jsx)(m,{title:`Integrations`,subtitle:`Configure LLM providers and external service connections`,breadcrumbs:[{label:`Admin`,href:`/overview`},{label:`Tools`},{label:`Integrations`}]}),C&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${C.type===`success`?`border-success/50 text-success`:`border-error/50 text-error`}`,children:[C.type===`success`?(0,g.jsx)(i,{className:`h-4 w-4`}):(0,g.jsx)(d,{className:`h-4 w-4`}),C.message]}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wider text-text-muted mb-3`,children:`LLM Providers`}),(0,g.jsx)(`div`,{className:`space-y-2`,children:_.map(t=>{let n=e[t.id];return(0,g.jsx)(y,{provider:t,configured:t.id===`ollama`?!!n?.baseUrl:!!n?.configured,currentUrl:t.fieldType===`url`?n?.baseUrl||``:void 0,onSave:P,saving:x},t.id)})})]}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wider text-text-muted mb-3`,children:`Google Services (OAuth)`}),(0,g.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary p-6 space-y-4`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`h3`,{className:`text-sm font-medium text-text`,children:`Google OAuth 2.0`}),(0,g.jsx)(`p`,{className:`text-xs text-text-muted mt-0.5`,children:n.connected&&n.email?`Connected as ${n.email}`:`Gmail, Drive, Calendar, Docs, Sheets, Tasks`})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(v,{configured:!!n.connected}),n.clientIdSet&&!n.connected&&(0,g.jsxs)(`button`,{onClick:j,className:`flex items-center gap-1.5 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-accent/80 transition-colors`,children:[(0,g.jsx)(a,{className:`h-3.5 w-3.5`}),`Connect Google`]}),n.connected&&(0,g.jsx)(`button`,{onClick:M,className:`flex items-center gap-1.5 rounded-lg border border-red-500/30 px-3 py-1.5 text-xs font-medium text-red-400 hover:bg-red-500/10 transition-colors`,children:`Disconnect`})]})]}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`label`,{className:`mb-1 block text-xs text-text-muted`,children:`Client ID`}),(0,g.jsx)(`input`,{id:`integration-google-client-id`,name:`integration-google-client-id`,type:`text`,value:T,onChange:e=>E(e.target.value),placeholder:n.clientIdSet?`(configured)`:`your-client-id.apps.googleusercontent.com`,className:`w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent`})]}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`label`,{className:`mb-1 block text-xs text-text-muted`,children:`Client Secret`}),(0,g.jsxs)(`div`,{className:`relative`,children:[(0,g.jsx)(`input`,{id:`integration-google-client-secret`,name:`integration-google-client-secret`,type:k?`text`:`password`,value:D,onChange:e=>O(e.target.value),placeholder:n.clientSecretSet?`(configured)`:`GOCSPX-...`,className:`w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-accent`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>A(!k),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary`,children:k?(0,g.jsx)(c,{className:`h-4 w-4`}):(0,g.jsx)(l,{className:`h-4 w-4`})})]})]}),(0,g.jsx)(`div`,{className:`flex justify-end`,children:(0,g.jsxs)(`button`,{onClick:async()=>{S(`oauth`);try{let e={};T&&(e.googleOAuthClientId=T),D&&(e.googleOAuthClientSecret=D),await p(e);let t=await s();t.oauth?.google&&r(t.oauth.google),N(`success`,`Google OAuth settings saved`),E(``),O(``)}catch(e){N(`error`,e instanceof Error?e.message:`Failed to save`)}finally{S(null)}},disabled:x===`oauth`||!T&&!D,className:`flex items-center gap-2 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50`,children:[(0,g.jsx)(o,{className:`h-3.5 w-3.5`}),x===`oauth`?`Saving...`:`Save OAuth Settings`]})})]})]})]})}export{b as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AutopilotPanel-CbLy4lJP.js","assets/jsx-runtime-B15e6lOy.js","assets/index-WI-E4I3h.js","assets/createLucideIcon-qnlrxww7.js","assets/index-Cz8190xO.css","assets/PageHeader-CH85uoZG.js","assets/chevron-right-A_pvnRh_.js","assets/WorkflowsPanel-DqtmT0NB.js","assets/book-open-Ds_yciQm.js","assets/shared-DLz_Jtg3.js","assets/pencil-Dd_vzHE-.js","assets/clsx-CjueKrWZ.js","assets/ConfirmDialog-6hcNjmAh.js","assets/EmptyState-D-Dg8B8r.js","assets/SkeletonLoader-9H7QWa9E.js","assets/DataTable-KVqtDzvP.js","assets/StatCard-wmSgMAM3.js","assets/clock-DSPgndSD.js","assets/pause-C4TDJSfA.js","assets/play-9WxZWVHA.js","assets/plus-CHryCIkk.js","assets/refresh-cw-Disd5wRB.js","assets/toggle-right-BMaR-sfT.js","assets/trash-2-CwUv7ww1.js","assets/LearningPanel-CrYLQ6eV.js","assets/database-C1SgHa8T.js","assets/lightbulb-BY7CpMte.js","assets/trending-up-Ba9TwEow.js","assets/MemoryGraphPanel-C7-Z8f0v.js","assets/zoom-out-DeggJ7RM.js","assets/network-CM7y1ats.js","assets/search-aNVcX-nv.js","assets/SelfImprovePanel-Ca4rGwEG.js","assets/bot-CWDCc265.js","assets/circle-check-big-C-JUM7wb.js","assets/radio-D-XnoAVu.js","assets/settings-5NWXzgyY.js","assets/terminal-DgFz2Vsf.js","assets/trophy-Gfv1QC45.js","assets/PersonasPanel-Dwr7sycT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{sr as r}from"./index-WI-E4I3h.js";import{t as i}from"./clsx-CjueKrWZ.js";var a=e(t(),1),o=n(),s=(0,a.lazy)(()=>r(()=>import(`./AutopilotPanel-CbLy4lJP.js`),__vite__mapDeps([0,1,2,3,4,5,6]))),c=(0,a.lazy)(()=>r(()=>import(`./WorkflowsPanel-DqtmT0NB.js`),__vite__mapDeps([7,1,3,8,6,9,10,2,4,11,5,12,13,14,15,16,17,18,19,20,21,22,23]))),l=(0,a.lazy)(()=>r(()=>import(`./LearningPanel-CrYLQ6eV.js`),__vite__mapDeps([24,1,8,3,25,26,21,27,2,4,5,6]))),u=(0,a.lazy)(()=>r(()=>import(`./MemoryGraphPanel-C7-Z8f0v.js`),__vite__mapDeps([28,1,29,3,30,21,31,23,2,4,12,11]))),d=(0,a.lazy)(()=>r(()=>import(`./SelfImprovePanel-Ca4rGwEG.js`),__vite__mapDeps([32,1,33,3,6,34,17,19,35,21,36,37,23,27,38,2,4,5]))),f=(0,a.lazy)(()=>r(()=>import(`./PersonasPanel-Dwr7sycT.js`),__vite__mapDeps([39,1,2,3,4]))),p=[{id:`autopilot`,label:`Autopilot`},{id:`workflows`,label:`Workflows`},{id:`learning`,label:`Learning`},{id:`memory`,label:`Memory & Graph`},{id:`self-improve`,label:`Self-Improve`},{id:`personas`,label:`Personas`}];function m(){let[e,t]=(0,a.useState)(`autopilot`);return(0,o.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,o.jsxs)(`div`,{className:`shrink-0 px-5 pt-4 pb-0`,children:[(0,o.jsx)(`h1`,{className:`text-sm font-semibold text-text mb-3`,children:`Intelligence`}),(0,o.jsx)(`div`,{className:`flex items-center gap-0.5 border-b border-border/50`,children:p.map(n=>(0,o.jsxs)(`button`,{onClick:()=>t(n.id),className:i(`px-3 py-2 text-xs font-medium transition-colors relative`,e===n.id?`text-accent`:`text-text-muted hover:text-text-secondary`),children:[n.label,e===n.id&&(0,o.jsx)(`div`,{className:`absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full`})]},n.id))})]}),(0,o.jsx)(`div`,{className:`flex-1 min-h-0 overflow-auto p-5`,children:(0,o.jsxs)(a.Suspense,{fallback:(0,o.jsx)(`div`,{className:`skeleton-shimmer h-40 rounded-lg`}),children:[e===`autopilot`&&(0,o.jsx)(s,{}),e===`workflows`&&(0,o.jsx)(c,{}),e===`learning`&&(0,o.jsx)(l,{}),e===`memory`&&(0,o.jsx)(u,{}),e===`self-improve`&&(0,o.jsx)(d,{}),e===`personas`&&(0,o.jsx)(f,{})]})})]})}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./book-open-Ds_yciQm.js";import{t as i}from"./database-C1SgHa8T.js";import{t as a}from"./lightbulb-BY7CpMte.js";import{t as o}from"./refresh-cw-Disd5wRB.js";import{t as s}from"./trending-up-Ba9TwEow.js";import{H as c,c as l,f as u}from"./index-WI-E4I3h.js";import{t as d}from"./PageHeader-CH85uoZG.js";var f=e(t(),1),p=n();function m(e){return e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`${Math.floor(e/86400)}d ${Math.floor(e%86400/3600)}h`}function h(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(1)}K`:`${(e/1e6).toFixed(2)}M`}function g({icon:e,label:t,value:n,color:r,sub:i}){return(0,p.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary p-4`,children:[(0,p.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,p.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded-md`,style:{backgroundColor:r+`15`},children:(0,p.jsx)(e,{className:`h-3.5 w-3.5`,style:{color:r}})}),(0,p.jsx)(`p`,{className:`text-xs text-text-muted`,children:t})]}),(0,p.jsx)(`p`,{className:`text-2xl font-bold text-text`,children:n}),i&&(0,p.jsx)(`p`,{className:`text-[10px] text-text-muted mt-1`,children:i})]})}function _(){let[e,t]=(0,f.useState)(null),[n,_]=(0,f.useState)(null),[v,y]=(0,f.useState)(null),[b,x]=(0,f.useState)(!0),S=()=>{x(!0),Promise.all([c(`/api/learning`).then(e=>e.ok?e.json():null).catch(()=>null),c(`/api/stats`).then(e=>e.ok?e.json():null).catch(()=>null),c(`/api/graphiti`).then(e=>e.ok?e.json():null).catch(()=>null)]).then(([e,n,r])=>{t(e),_(n),y(r?{nodeCount:r.nodeCount||0,edgeCount:r.edgeCount||0,episodeCount:r.episodeCount||0}:null)}).finally(()=>x(!1))};return(0,f.useEffect)(()=>{S()},[]),b?(0,p.jsxs)(`div`,{className:`space-y-4`,children:[(0,p.jsx)(`div`,{className:`h-10 animate-pulse rounded-xl bg-bg-secondary`}),(0,p.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-3`,children:Array.from({length:8}).map((e,t)=>(0,p.jsx)(`div`,{className:`h-24 animate-pulse rounded-xl bg-bg-secondary`},t))})]}):(0,p.jsxs)(`div`,{className:`space-y-6`,children:[(0,p.jsx)(d,{title:`Learning`,subtitle:`Knowledge base, tool mastery, and memory systems`,breadcrumbs:[{label:`Admin`,href:`/overview`},{label:`Memory`},{label:`Learning`}],actions:(0,p.jsxs)(`button`,{onClick:S,className:`flex items-center gap-1.5 rounded-lg bg-bg-tertiary px-3 py-1.5 text-xs text-text-secondary hover:bg-border hover:text-text transition-colors`,children:[(0,p.jsx)(o,{className:`h-3.5 w-3.5`}),` Refresh`]})}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wider text-text-muted mb-3`,children:`Knowledge Base`}),(0,p.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-3`,children:[(0,p.jsx)(g,{icon:r,label:`Knowledge Entries`,value:e?.knowledgeEntries??0,color:`#6366f1`,sub:`Facts, patterns, corrections`}),(0,p.jsx)(g,{icon:l,label:`Tools Tracked`,value:e?.toolsTracked??0,color:`#22d3ee`,sub:`Success rates learned`}),(0,p.jsx)(g,{icon:u,label:`Error Patterns`,value:e?.errorPatterns??0,color:`#f59e0b`,sub:`Known failure modes`}),(0,p.jsx)(g,{icon:a,label:`Corrections`,value:e?.corrections??0,color:`#34d399`,sub:`User-taught improvements`})]})]}),v&&(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wider text-text-muted mb-3`,children:`Memory Graph`}),(0,p.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,p.jsx)(g,{icon:i,label:`Entities`,value:v.nodeCount,color:`#818cf8`,sub:`People, topics, projects`}),(0,p.jsx)(g,{icon:s,label:`Relationships`,value:v.edgeCount,color:`#22d3ee`,sub:`Connections between entities`}),(0,p.jsx)(g,{icon:r,label:`Episodes`,value:v.episodeCount,color:`#34d399`,sub:`Conversation memories`})]})]}),n&&(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-wider text-text-muted mb-3`,children:`System`}),(0,p.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-3`,children:[(0,p.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary p-4`,children:[(0,p.jsx)(`p`,{className:`text-xs text-text-muted`,children:`Tokens Used`}),(0,p.jsx)(`p`,{className:`text-xl font-bold text-text`,children:h(n.totalTokens)})]}),(0,p.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary p-4`,children:[(0,p.jsx)(`p`,{className:`text-xs text-text-muted`,children:`Requests`}),(0,p.jsx)(`p`,{className:`text-xl font-bold text-text`,children:n.totalRequests})]}),(0,p.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary p-4`,children:[(0,p.jsx)(`p`,{className:`text-xs text-text-muted`,children:`Uptime`}),(0,p.jsx)(`p`,{className:`text-xl font-bold text-text`,children:m(n.uptime)})]}),(0,p.jsxs)(`div`,{className:`rounded-xl border border-bg-tertiary bg-bg-secondary p-4`,children:[(0,p.jsx)(`p`,{className:`text-xs text-text-muted`,children:`Memory`}),(0,p.jsxs)(`p`,{className:`text-xl font-bold text-text`,children:[n.memoryMB,`MB`]})]})]})]})]})}export{_ as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./createLucideIcon-qnlrxww7.js";import{t as i}from"./git-branch-CQ2yNSzU.js";import{t as a}from"./radio-D-XnoAVu.js";import{H as o,ar as s,ir as c}from"./index-WI-E4I3h.js";import{t as l}from"./PageHeader-CH85uoZG.js";var u=r(`file-diff`,[[`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:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),d=e(t(),1),f=500;function p(){try{return localStorage.getItem(`titan-token`)||localStorage.getItem(`titan_token`)||``}catch{return``}}function m(e){let[t,n]=(0,d.useState)([]),[r,i]=(0,d.useState)(!1),a=(0,d.useRef)(null),o=(0,d.useCallback)(()=>{if(a.current&&=(a.current.close(),null),n([]),i(!1),!e)return;let t=new URLSearchParams({sessionId:e}),r=p();r&&t.set(`token`,r);let o=new EventSource(`/api/studio/stream?${t.toString()}`);a.current=o,o.onopen=()=>i(!0),o.onerror=()=>i(!1),o.onmessage=e=>{try{let t=JSON.parse(e.data);if(t.type===`ready`){i(!0);return}t.type===`event`&&n(e=>{let n=[...e,t];return n.length>f&&n.splice(0,n.length-f),n})}catch{}}},[e]);return(0,d.useEffect)(()=>(o(),()=>{a.current?.close(),a.current=null}),[o]),{frames:t,connected:r}}var h=n();function g(){let{sessionId:e}=s(),t=c(),n=e||null,[r,f]=(0,d.useState)([]),{frames:p,connected:g}=m(n);(0,d.useEffect)(()=>{let e=()=>o(`/api/studio/sessions`,{headers:{"Content-Type":`application/json`}}).then(e=>e.json()).then(e=>f(e.sessions||[])).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let _=(0,d.useMemo)(()=>p.filter(e=>e.raw?.diff),[p]),v=_[_.length-1],y=(0,d.useMemo)(()=>{let e=new Map;for(let t of p)t.raw?.filePath&&e.set(t.raw.filePath,t);return[...e.values()]},[p]);return(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsx)(l,{title:`Live Studio`,breadcrumbs:[{label:`Admin`,href:`/overview`},{label:`Live Studio`}]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,h.jsx)(a,{size:16,className:g?`text-green-400`:`text-[var(--text-muted)]`}),(0,h.jsx)(`span`,{className:`text-[var(--text-secondary)]`,children:g?`Watching live`:n?`Connecting…`:`Idle`}),(0,h.jsxs)(`select`,{value:n||``,onChange:e=>t(e.target.value?`/studio/${e.target.value}`:`/studio`),className:`ml-auto bg-[var(--bg-secondary)] border border-[var(--border)] rounded px-2 py-1 text-xs text-[var(--text)]`,children:[(0,h.jsx)(`option`,{value:``,children:`Select a session…`}),r.map(e=>(0,h.jsxs)(`option`,{value:e.sessionId,children:[e.sessionId,` (`,e.count,`)`]},e.sessionId))]})]}),n?(0,h.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,h.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-2 max-h-[68vh] overflow-auto`,children:[(0,h.jsxs)(`p`,{className:`text-[10px] uppercase tracking-wide text-[var(--text-muted)] px-2 py-1`,children:[`Steps (`,p.length,`)`]}),p.length===0&&(0,h.jsx)(`p`,{className:`text-xs text-[var(--text-muted)] px-2`,children:`Waiting for activity…`}),p.map((e,t)=>(0,h.jsxs)(`div`,{className:`flex items-start gap-2 px-2 py-1.5 text-xs border-b border-[var(--border)] last:border-0`,children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:e.icon||`•`}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`div`,{className:`text-[var(--text)] truncate`,children:e.captionControl||e.captionTitan||e.topic}),e.raw?.tool&&(0,h.jsxs)(`div`,{className:`text-[10px] text-[var(--text-muted)]`,children:[e.raw.tool,e.raw.success===!1?` · failed`:``,e.raw.durationMs?` · ${e.raw.durationMs}ms`:``]})]}),e.replay&&(0,h.jsx)(`span`,{className:`text-[9px] text-[var(--text-muted)]`,children:`replay`})]},t))]}),(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-2 max-h-[44vh] overflow-auto`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1`,children:[(0,h.jsx)(u,{size:14,className:`text-[var(--text-secondary)]`}),(0,h.jsx)(`span`,{className:`text-xs text-[var(--text-secondary)] truncate`,children:v?.raw?.filePath||`No diff yet`})]}),v?.raw?.diff?(0,h.jsx)(`pre`,{className:`text-[11px] leading-relaxed font-mono px-2 overflow-auto`,children:v.raw.diff.split(`
|
|
2
|
+
`).map((e,t)=>(0,h.jsx)(`div`,{className:e.startsWith(`+`)?`text-green-400`:e.startsWith(`-`)?`text-red-400`:`text-[var(--text-muted)]`,children:e||` `},t))}):(0,h.jsx)(`p`,{className:`text-xs text-[var(--text-muted)] px-2 py-3`,children:`File diffs appear here as TITAN edits.`})]}),(0,h.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-2`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1`,children:[(0,h.jsx)(i,{size:14,className:`text-[var(--text-secondary)]`}),(0,h.jsxs)(`span`,{className:`text-xs text-[var(--text-secondary)]`,children:[`Changed files (`,y.length,`)`]})]}),y.length===0?(0,h.jsx)(`p`,{className:`text-xs text-[var(--text-muted)] px-2`,children:`None yet.`}):y.map((e,t)=>(0,h.jsx)(`div`,{className:`text-xs px-2 py-1 text-[var(--text-secondary)] truncate`,children:e.raw?.filePath},t))]})]})]}):(0,h.jsx)(`div`,{className:`text-[var(--text-muted)] text-sm p-6 text-center border border-[var(--border)] rounded-lg`,children:`Pick a session to watch TITAN work — its steps stream on the left, file diffs on the right.`})]})}export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./refresh-cw-Disd5wRB.js";import{Gt as i}from"./index-WI-E4I3h.js";import{t as a}from"./PageHeader-CH85uoZG.js";var o=e(t(),1),s=n(),c={debug:`bg-text-muted/20 text-text-secondary`,info:`bg-info/20 text-info`,warn:`bg-warning/20 text-warning`,warning:`bg-warning/20 text-warning`,error:`bg-error/20 text-error`};function l(){let[e,t]=(0,o.useState)([]),[n,l]=(0,o.useState)(!0),[u,d]=(0,o.useState)(null),[f,p]=(0,o.useState)(``),[m,h]=(0,o.useState)(100),[g,_]=(0,o.useState)(!1),v=(0,o.useRef)(null),y=(0,o.useCallback)(async()=>{try{let e=await i(f||void 0,m);t(e),d(null)}catch(e){d(e instanceof Error?e.message:`Failed to fetch logs`)}finally{l(!1)}},[f,m]);return(0,o.useEffect)(()=>{y()},[y]),(0,o.useEffect)(()=>(g?v.current=setInterval(y,5e3):v.current&&=(clearInterval(v.current),null),()=>{v.current&&clearInterval(v.current)}),[g,y]),n?(0,s.jsx)(`div`,{className:`h-96 animate-pulse rounded-xl border border-border bg-bg-secondary`}):(0,s.jsxs)(`div`,{className:`space-y-4`,children:[(0,s.jsx)(a,{title:`Logs`,subtitle:`Recent gateway and skill activity`,breadcrumbs:[{label:`Admin`,href:`/overview`},{label:`System`},{label:`Logs`}]}),(0,s.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,s.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),className:`rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent`,children:[(0,s.jsx)(`option`,{value:``,children:`All levels`}),(0,s.jsx)(`option`,{value:`debug`,children:`Debug`}),(0,s.jsx)(`option`,{value:`info`,children:`Info`}),(0,s.jsx)(`option`,{value:`warn`,children:`Warn`}),(0,s.jsx)(`option`,{value:`error`,children:`Error`})]}),(0,s.jsxs)(`select`,{value:m,onChange:e=>h(Number(e.target.value)),className:`rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent`,children:[(0,s.jsx)(`option`,{value:50,children:`50 entries`}),(0,s.jsx)(`option`,{value:100,children:`100 entries`}),(0,s.jsx)(`option`,{value:200,children:`200 entries`})]}),(0,s.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-text-secondary`,children:[(0,s.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>_(e.target.checked),className:`h-4 w-4 rounded border-border accent-accent`}),`Auto-refresh (5s)`]}),(0,s.jsx)(`button`,{onClick:y,className:`ml-auto rounded-lg p-2 text-text-secondary transition-colors hover:bg-bg-tertiary hover:text-text`,title:`Refresh`,children:(0,s.jsx)(r,{className:`h-4 w-4`})})]}),u&&(0,s.jsx)(`div`,{className:`rounded-lg border border-error/50 bg-bg-secondary px-4 py-2 text-sm text-error`,children:u}),(0,s.jsx)(`div`,{className:`max-h-[600px] overflow-y-auto rounded-xl border border-border bg-bg-secondary`,children:e.length===0?(0,s.jsx)(`p`,{className:`px-4 py-12 text-center text-text-muted`,children:`No logs found`}):(0,s.jsx)(`div`,{className:`divide-y divide-border`,children:e.map((e,t)=>(0,s.jsxs)(`div`,{className:`flex items-start gap-3 px-4 py-2.5`,children:[(0,s.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-text-muted`,children:new Date(e.timestamp).toLocaleTimeString()}),(0,s.jsx)(`span`,{className:`shrink-0 rounded px-1.5 py-0.5 text-xs font-medium uppercase ${c[e.level]??c.debug}`,children:e.level}),(0,s.jsx)(`span`,{className:`min-w-0 break-all text-sm text-text`,children:e.message})]},t))})})]})}export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,n as t,t as n}from"./jsx-runtime-B15e6lOy.js";import{t as r}from"./plug-Dm25Wbrc.js";import{t as i}from"./plus-CHryCIkk.js";import{n as a,t as o}from"./test-tube-BimtS92_.js";import{t as s}from"./refresh-cw-Disd5wRB.js";import{t as c}from"./server-DFfeYjoM.js";import{t as l}from"./trash-2-CwUv7ww1.js";import{Bn as u,Dn as d,Hn as f,Kt as p,T as m,V as h,a as g,qt as _}from"./index-WI-E4I3h.js";import{t as v}from"./PageHeader-CH85uoZG.js";import{t as y}from"./ConfirmDialog-6hcNjmAh.js";var b=e(t(),1),x=n();function S(){let{toast:e}=g(),[t,n]=(0,b.useState)([]),[S,C]=(0,b.useState)([]),[w,T]=(0,b.useState)(!0),[E,D]=(0,b.useState)(!1),[O,k]=(0,b.useState)(null),[A,j]=(0,b.useState)(null),[M,N]=(0,b.useState)(null),[P,F]=(0,b.useState)({id:``,name:``,description:``,type:`stdio`,command:``,args:``,url:``}),I=async()=>{T(!0);try{let[e,t]=await Promise.all([p(),_()]);n(e),C(t)}catch(t){e(`error`,`Couldn't load MCP servers — try again. (${t.message})`)}T(!1)};(0,b.useEffect)(()=>{I()},[]);let L=async()=>{try{await h({id:P.id,name:P.name,description:P.description,type:P.type,...P.type===`stdio`?{command:P.command,args:P.args.split(/\s+/).filter(Boolean)}:{url:P.url}}),D(!1),F({id:``,name:``,description:``,type:`stdio`,command:``,args:``,url:``}),I(),e(`success`,`MCP server added.`)}catch(t){e(`error`,`Couldn't add MCP server — ${t.message}`)}},R=async t=>{try{await h({presetId:t}),I(),e(`success`,`MCP server added.`)}catch(t){e(`error`,`Couldn't add MCP server — ${t.message}`)}},z=async t=>{try{await d(t),I(),e(`success`,`MCP server removed.`)}catch(t){e(`error`,`Couldn't remove MCP server — try again. (${t.message})`)}},B=async(t,n)=>{try{await f(t,n),I(),e(`success`,n?`MCP server enabled.`:`MCP server disabled.`)}catch(t){e(`error`,`Couldn't update MCP server — try again. (${t.message})`)}},V=async e=>{k(e),j(null);try{let t=await u(e);j({id:e,...t})}catch(t){j({id:e,ok:!1,tools:0,error:t.message})}k(null)},H=e=>e===`connected`?`text-[var(--success)]`:e===`error`?`text-[var(--error)]`:`text-[var(--text-muted)]`,U=e=>e===`connected`?`bg-[var(--success)]`:e===`error`?`bg-[var(--error)]`:`bg-[var(--text-muted)]`,W=S.filter(e=>!t.some(t=>t.id===e.id));return(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(v,{title:`MCP Connections`,subtitle:`Connect to external tools via Model Context Protocol`,breadcrumbs:[{label:`Admin`,href:`/overview`},{label:`Tools`},{label:`MCP`}],actions:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{onClick:I,className:`px-3 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors`,children:(0,x.jsx)(s,{size:14})}),(0,x.jsxs)(`button`,{onClick:()=>D(!E),className:`flex items-center gap-2 px-3 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] transition-colors`,children:[(0,x.jsx)(i,{size:14}),` Add Server`]})]})}),(0,x.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4`,children:[(0,x.jsx)(`p`,{className:`text-sm text-[var(--text-muted)]`,children:`Configured Servers`}),(0,x.jsx)(`p`,{className:`text-2xl font-bold text-[var(--text)]`,children:t.length})]}),(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4`,children:[(0,x.jsx)(`p`,{className:`text-sm text-[var(--text-muted)]`,children:`Connected`}),(0,x.jsx)(`p`,{className:`text-2xl font-bold text-[var(--success)]`,children:t.filter(e=>e.status===`connected`).length})]}),(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4`,children:[(0,x.jsx)(`p`,{className:`text-sm text-[var(--text-muted)]`,children:`External Tools`}),(0,x.jsx)(`p`,{className:`text-2xl font-bold text-[var(--accent)]`,children:t.reduce((e,t)=>e+t.toolCount,0)})]})]}),E&&(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4 space-y-4`,children:[(0,x.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--text)]`,children:`Add MCP Server`}),W.length>0&&(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`p`,{className:`text-xs text-[var(--text-muted)] mb-2`,children:`Quick Add Presets`}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:W.map(e=>(0,x.jsxs)(`button`,{onClick:()=>R(e.id),className:`flex items-center gap-2 px-3 py-1.5 text-xs rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors`,children:[(0,x.jsx)(c,{size:12}),` `,e.name]},e.id))})]}),(0,x.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-3`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`ID`}),(0,x.jsx)(`input`,{id:`mcp-server-id`,name:`mcp-server-id`,value:P.id,onChange:e=>F({...P,id:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,placeholder:`my-server`})]}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`Name`}),(0,x.jsx)(`input`,{id:`mcp-server-name`,name:`mcp-server-name`,value:P.name,onChange:e=>F({...P,name:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,placeholder:`My MCP Server`})]}),(0,x.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`Description`}),(0,x.jsx)(`input`,{id:`mcp-server-description`,name:`mcp-server-description`,value:P.description,onChange:e=>F({...P,description:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,placeholder:`What does this server do?`})]}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`Type`}),(0,x.jsxs)(`select`,{id:`mcp-server-type`,name:`mcp-server-type`,value:P.type,onChange:e=>F({...P,type:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,children:[(0,x.jsx)(`option`,{value:`stdio`,children:`stdio (local process)`}),(0,x.jsx)(`option`,{value:`http`,children:`HTTP (remote server)`})]})]}),P.type===`stdio`?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`Command`}),(0,x.jsx)(`input`,{id:`mcp-server-command`,name:`mcp-server-command`,value:P.command,onChange:e=>F({...P,command:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,placeholder:`npx @modelcontextprotocol/server-xxx`})]}),(0,x.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`Arguments (space-separated)`}),(0,x.jsx)(`input`,{id:`mcp-server-args`,name:`mcp-server-args`,value:P.args,onChange:e=>F({...P,args:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,placeholder:`--port 3000`})]})]}):(0,x.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,x.jsx)(`label`,{className:`text-xs text-[var(--text-muted)]`,children:`Server URL`}),(0,x.jsx)(`input`,{id:`mcp-server-url`,name:`mcp-server-url`,value:P.url,onChange:e=>F({...P,url:e.target.value}),className:`w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]`,placeholder:`http://localhost:3000/mcp`})]})]}),(0,x.jsxs)(`div`,{className:`flex gap-2`,children:[(0,x.jsx)(`button`,{onClick:L,disabled:!P.id||!P.name,className:`px-4 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] disabled:opacity-40 transition-colors`,children:`Add Server`}),(0,x.jsx)(`button`,{onClick:()=>D(!1),className:`px-4 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors`,children:`Cancel`})]})]}),w?(0,x.jsx)(`div`,{className:`text-[var(--text-muted)] text-sm`,children:`Loading MCP servers...`}):t.length===0?(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-8 text-center`,children:[(0,x.jsx)(r,{className:`w-10 h-10 text-[var(--text-muted)] mx-auto mb-3`}),(0,x.jsx)(`p`,{className:`text-[var(--text-secondary)] mb-1`,children:`No MCP servers configured`}),(0,x.jsx)(`p`,{className:`text-xs text-[var(--text-muted)]`,children:`Add an MCP server to connect TITAN to external tools like databases, APIs, and services.`})]}):(0,x.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4`,children:[(0,x.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,x.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,x.jsx)(`div`,{className:`mt-0.5`,children:e.type===`stdio`?(0,x.jsx)(c,{size:18,className:`text-[var(--text-muted)]`}):(0,x.jsx)(m,{size:18,className:`text-[var(--text-muted)]`})}),(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`font-medium text-[var(--text)]`,children:e.name}),(0,x.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,x.jsx)(`span`,{className:`w-2 h-2 rounded-full ${U(e.status)}`}),(0,x.jsx)(`span`,{className:H(e.status),children:e.status})]}),e.toolCount>0&&(0,x.jsxs)(`span`,{className:`text-xs px-1.5 py-0.5 rounded bg-[var(--accent)]/10 text-[var(--accent)]`,children:[e.toolCount,` tools`]})]}),(0,x.jsx)(`p`,{className:`text-xs text-[var(--text-muted)] mt-0.5`,children:e.description}),(0,x.jsx)(`p`,{className:`text-xs text-[var(--text-muted)] mt-1 font-mono`,children:e.type===`stdio`?`${e.command} ${(e.args||[]).join(` `)}`:e.url})]})]}),(0,x.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,x.jsx)(`button`,{onClick:()=>V(e.id),disabled:O===e.id,title:`Test connection`,className:`p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--bg-tertiary)] transition-colors disabled:opacity-40`,children:(0,x.jsx)(o,{size:14,className:O===e.id?`animate-pulse`:``})}),(0,x.jsx)(`button`,{onClick:()=>B(e.id,!e.enabled),title:e.enabled?`Disable`:`Enable`,className:`p-1.5 rounded-md transition-colors hover:bg-[var(--bg-tertiary)] ${e.enabled?`text-[var(--success)]`:`text-[var(--text-muted)]`}`,children:(0,x.jsx)(a,{size:14})}),(0,x.jsx)(`button`,{onClick:()=>N(e.id),title:`Remove`,className:`p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--error)] hover:bg-[var(--bg-tertiary)] transition-colors`,children:(0,x.jsx)(l,{size:14})})]})]}),A?.id===e.id&&(0,x.jsx)(`div`,{className:`mt-3 px-3 py-2 rounded-md text-xs ${A.ok?`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`:`bg-red-500/10 text-red-400 border border-red-500/20`}`,children:A.ok?`Connected successfully — ${A.tools} tools discovered`:`Connection failed: ${A.error}`})]},e.id))}),(0,x.jsxs)(`div`,{className:`bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4`,children:[(0,x.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--text)] mb-2`,children:`About MCP`}),(0,x.jsxs)(`p`,{className:`text-xs text-[var(--text-muted)] leading-relaxed`,children:[`Model Context Protocol (MCP) is the universal standard for connecting AI agents to external tools. TITAN acts as both an MCP `,(0,x.jsx)(`strong`,{className:`text-[var(--text-secondary)]`,children:`server`}),` (exposing its tools to other agents) and an MCP `,(0,x.jsx)(`strong`,{className:`text-[var(--text-secondary)]`,children:`client`}),` (connecting to external MCP servers). Add any MCP-compatible server and its tools automatically become available in TITAN.`]})]}),(0,x.jsx)(y,{open:M!==null,title:`Remove MCP server?`,message:`This removes "${M}" and its tools from TITAN. This can't be undone.`,confirmLabel:`Remove`,onConfirm:async()=>{let e=M;N(null),e&&await z(e)},onCancel:()=>N(null)})]})}export{S as default};
|