@openscout/scout 0.2.92 → 0.2.95
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/NOTICE +14 -0
- package/README.md +164 -348
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/ActivityScreen--eANwuxa.js +1 -0
- package/dist/client/assets/{AddProjectForm-CpyytDf2.js → AddProjectForm-CcD6qvV8.js} +1 -1
- package/dist/client/assets/AgentAvatar-CYhf6twS.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-BTI24HQX.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-srmN6-vj.js +1 -0
- package/dist/client/assets/{AgentDetailCard-BTiOmh-a.js → AgentDetailCard-UqPNpcvB.js} +1 -1
- package/dist/client/assets/AgentFloorView-XXNgI5Cj.js +1 -0
- package/dist/client/assets/AgentInfoScreen-CimdOnZ9.js +1 -0
- package/dist/client/assets/{AgentLaneCard-lfRNb7JD.js → AgentLaneCard-Z-aOBR3W.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-Dlwrbq3g.js → AgentLaneChrome-CyhA1reW.js} +1 -1
- package/dist/client/assets/AgentLaneDetailSheet-BNzjMjIH.js +4 -0
- package/dist/client/assets/{AgentLaneSummaryResize-6SOEWUnr.js → AgentLaneSummaryResize-Box8-_rS.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-C3uOiOzd.js → AgentLanesPreflight-5B6sXvRB.js} +1 -1
- package/dist/client/assets/AgentLanesView-DHyzVBk6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-BJ5dIfL3.js → AgentLiveActions-BwuzOE8h.js} +1 -1
- package/dist/client/assets/AgentSessions-CsZwoukw.js +6 -0
- package/dist/client/assets/AgentsConsole-KCao4XmX.js +1 -0
- package/dist/client/assets/AgentsScreen-CtPAmwRX.js +1 -0
- package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +1 -0
- package/dist/client/assets/AstronautSuit-Ckx7lu7G.js +1 -0
- package/dist/client/assets/AtopView-DYlpgEHf.js +1 -0
- package/dist/client/assets/{BackToPicker-D1LV6Cqp.js → BackToPicker-4JaeRvDm.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-D6-xqrpo.js +1 -0
- package/dist/client/assets/BriefingsScreen-DKxSDEmk.js +1 -0
- package/dist/client/assets/{BrokerMetadataPanel-BhjECqOK.js → BrokerMetadataPanel-BbREmsbK.js} +1 -1
- package/dist/client/assets/BrokerScreen-fbPIouMw.js +5 -0
- package/dist/client/assets/CastPicker-BcA2vDDV.js +1 -0
- package/dist/client/assets/CastPicker-zXsnkTIy.css +1 -0
- package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +1 -0
- package/dist/client/assets/{CodeDiffPane-Bx_2VAzv.js → CodeDiffPane-Cn8Y9hAt.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-C1yOJKvs.js → CodeProjectPicker-nPFktrco.js} +1 -1
- package/dist/client/assets/CodeScreen-BlAxtxE5.js +1 -0
- package/dist/client/assets/ConversationComposer-2HjbGPL9.js +1 -0
- package/dist/client/assets/ConversationFeedRows-C6wUqJrx.js +1 -0
- package/dist/client/assets/ConversationHeader-C8vfXaTF.js +1 -0
- package/dist/client/assets/ConversationPanels-CNCIbpqU.js +6 -0
- package/dist/client/assets/ConversationScreen-BNULZAp2.js +2 -0
- package/dist/client/assets/ConversationScreen-CkWnKXt6.css +1 -0
- package/dist/client/assets/ConversationStatus-DZuyKsWN.js +1 -0
- package/dist/client/assets/CrewAvatar-CTIuxp4G.js +1 -0
- package/dist/client/assets/CrewAvatar-D0c9z5Qr.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +1 -0
- package/dist/client/assets/{DataTable-CJbbgBdA.js → DataTable-6IDhanr5.js} +1 -1
- package/dist/client/assets/DispatchAftermath-DC1u9itO.js +1 -0
- package/dist/client/assets/DocumentFocusViewer-DZVhS7as.js +1 -0
- package/dist/client/assets/{EmbeddableSurfacesLab-BdsYRDky.js → EmbeddableSurfacesLab-BKUFJMCV.js} +1 -1
- package/dist/client/assets/{EmptyState-BRY5jTpz.js → EmptyState-CeBl0iGd.js} +1 -1
- package/dist/client/assets/{FileViewerPane-9Bveqm9c.js → FileViewerPane-DQlpNt2S.js} +2 -2
- package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +1 -0
- package/dist/client/assets/FollowScreen-BXHOp3gb.js +1 -0
- package/dist/client/assets/{HarnessMark-BPAphNjx.js → HarnessMark-D5CA5uSp.js} +1 -1
- package/dist/client/assets/HarnessesScreen-DhFXq1qz.js +1 -0
- package/dist/client/assets/{HerdrSession-BujfGzrP.js → HerdrSession-BRhs5LIR.js} +1 -1
- package/dist/client/assets/HomeHero-7JwycwFY.css +1 -0
- package/dist/client/assets/HomeHero-DMABJuze.js +1 -0
- package/dist/client/assets/HostAdvisorView-RAociATV.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-B4ZY24xE.js → KnowledgeSearchInspector-CZPyVNSw.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-mGTKIg00.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-B7KdvQvf.js → LaneToolHoverCard-D_DMlBeT.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-BEHg3LmH.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-mkMw2wJU.js → LaneTraceEventFocus-DVimcizS.js} +1 -1
- package/dist/client/assets/{MeshCanvas-CpKcWxKy.js → MeshCanvas-BOuZx4AM.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-C9IoGHbe.js → MeshCanvasMinimap-wL-1N94e.js} +1 -1
- package/dist/client/assets/MeshScreen-DMY9Bmh5.js +1 -0
- package/dist/client/assets/{MeshTopologyView-DFzr0IZM.js → MeshTopologyView-DiDcX5f4.js} +2 -2
- package/dist/client/assets/MessagesScreen-Eulveud3.js +1 -0
- package/dist/client/assets/{MissionContextRail-Y8QxUZGE.js → MissionContextRail-DrNKXG5u.js} +1 -1
- package/dist/client/assets/MissionControlView-ByBlHVN8.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-D1i6R6Zt.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-DN9NcCML.js +1 -0
- package/dist/client/assets/MissionLogPane-DSeIv3Xo.js +1 -0
- package/dist/client/assets/NewAgentModal-V7yK6J6j.js +1 -0
- package/dist/client/assets/NewChatComposer-hlWT-nbR.js +19 -0
- package/dist/client/assets/{NewChatOrigin-DmuJ32wa.js → NewChatOrigin-DdpzE4kz.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-l_Q3ts2q.js +2 -0
- package/dist/client/assets/ObserveTextFlow-BSEtYTxU.js +2 -0
- package/dist/client/assets/ObservedTopologyPanel-CdGUXxGR.js +2 -0
- package/dist/client/assets/OpenScoutAppShell-DN8dOSK4.js +79 -0
- package/dist/client/assets/OpsAgentsView-ntGr4pz4.js +1 -0
- package/dist/client/assets/OpsScreen-Ppen_Lmj.js +1 -0
- package/dist/client/assets/OpsSubnav-GAKsoSor.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-BLVg5EeA.js → ProjectAgentProfileBar-BQET-qrY.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Ck8mThtx.js +1 -0
- package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +2 -0
- package/dist/client/assets/ProjectsRail-DCfNMmnW.js +1 -0
- package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +1 -0
- package/dist/client/assets/Provider-B2xuo3rf.js +1 -0
- package/dist/client/assets/RailRow-B-GycCBx.js +1 -0
- package/dist/client/assets/RailRow-B0sRaJc6.css +1 -0
- package/dist/client/assets/RawSessionsTable-AQThi6sm.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-BCDXFE3D.js → RepoDiffEmbedScreen-DXWoRF_c.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-m62FiWXC.js → RepoDiffPageScreen-D_274ExO.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-DbedmHDX.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-C0--fPtk.js +2 -0
- package/dist/client/assets/ReposScreen-D39_YG4H.js +6 -0
- package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +1 -0
- package/dist/client/assets/{ScoutSurface-CkgT7A-c.js → ScoutSurface-UsRy0t-I.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-D-kV5j4T.js → ScoutbotFxLab-Fmdfboxs.js} +1 -1
- package/dist/client/assets/{SecondaryNav-_wyKjwNf.js → SecondaryNav-o2RL9H8H.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CJZmIBV7.js → SessionEmbedScreen-RD5XOx7R.js} +1 -1
- package/dist/client/assets/{SessionObserve-yYA8Gy5s.js → SessionObserve-Dsd0j05N.js} +9 -9
- package/dist/client/assets/{SessionObserveEvidence-cHdjYOJe.js → SessionObserveEvidence-DopQYDkD.js} +1 -1
- package/dist/client/assets/SessionRefScreen-B_cTv47v.js +1 -0
- package/dist/client/assets/SessionsScreen-Bq0Z77On.js +1 -0
- package/dist/client/assets/SettingsDrawer-R8a0TlJD.css +1 -0
- package/dist/client/assets/SettingsDrawer-_AwuopMS.js +3 -0
- package/dist/client/assets/SettingsScreen-Cw4DDfJP.js +1 -0
- package/dist/client/assets/{ShikiPane-dBS9hD-z.js → ShikiPane-BfHc_3pM.js} +1 -1
- package/dist/client/assets/{SlidePanel-CH-3-8_2.js → SlidePanel-C-q7XwTa.js} +1 -1
- package/dist/client/assets/SpriteAvatar-Bs68ZENy.js +1 -0
- package/dist/client/assets/{StatusPill-C8m9ZymF.js → StatusPill-ZZQwxB1a.js} +1 -1
- package/dist/client/assets/{TailView-B0BSopPs.js → TailView-Q4FVMsUH.js} +2 -2
- package/dist/client/assets/Terminal-D7zqHwHV.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-CXIJ7qv6.js +1 -0
- package/dist/client/assets/TerminalHeaderMount-BnBLOPbb.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-BWJCGBZf.js → TextDocumentSurface-CKQP-cBT.js} +1 -1
- package/dist/client/assets/{TmuxPeek-B4QdHbGm.js → TmuxPeek-V9dGESfO.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Dd4ITJy_.js → VoicePermissionsPanel-k7sbLXx2.js} +1 -1
- package/dist/client/assets/WorkDetailScreen-60p9litn.js +5 -0
- package/dist/client/assets/WorkFilesViewer-BjJS7GyM.js +1 -0
- package/dist/client/assets/{activity-CC8JzJNH.js → activity-Bj3Hnbj3.js} +1 -1
- package/dist/client/assets/{addon-fit-CaZ-uLrg.js → addon-fit-BL-NTWRU.js} +1 -1
- package/dist/client/assets/{addon-webgl-B8utL3bM.js → addon-webgl-CIMgmNjg.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-CxtYZWPZ.css → agent-autocomplete-C7xwIcwd.css} +1 -1
- package/dist/client/assets/agent-autocomplete-DXlvdc4b.js +10 -0
- package/dist/client/assets/{agent-essentials-B3wcxg_v.js → agent-essentials-BOMHR0_U.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-q4cwzLX4.js → agent-lane-card-model-CTLxf3R4.js} +1 -1
- package/dist/client/assets/agent-lane-detail-ppJId6Jc.js +2 -0
- package/dist/client/assets/{agent-lane-preview-C33Dwpn7.js → agent-lane-preview-BhplDYGf.js} +1 -1
- package/dist/client/assets/{agent-lanes-BDNktFBZ.css → agent-lanes-DlqcEf0l.css} +1 -1
- package/dist/client/assets/{agent-lanes-model-VYQ5a68i.js → agent-lanes-model-AfrjRNK5.js} +2 -2
- package/dist/client/assets/agent-specialization-BIPIBW8u.js +1 -0
- package/dist/client/assets/api-Co9aQ2Jw.js +1 -0
- package/dist/client/assets/{api-BkjHJfgJ.js → api-HFH8wFyb.js} +1 -1
- package/dist/client/assets/{arc.es-uFv9UrHn.js → arc.es-IR5r6sj_.js} +1 -1
- package/dist/client/assets/archive-BjcGiAy8.js +1 -0
- package/dist/client/assets/{arrow-down-w1HPzDSE.js → arrow-down-BydciYFZ.js} +1 -1
- package/dist/client/assets/{arrow-left-B-3GJ7ct.js → arrow-left-CghA0kTw.js} +1 -1
- package/dist/client/assets/arrow-right-iJFv3jNh.js +1 -0
- package/dist/client/assets/{arrow-up-right-G6bJXxhK.js → arrow-up-right-CCfZXPqD.js} +1 -1
- package/dist/client/assets/{bot-DzCOGKi6.js → bot-B5sub1-i.js} +1 -1
- package/dist/client/assets/broker-display-Q75fupqG.js +2 -0
- package/dist/client/assets/{cache-Dr0why2k.js → cache-CeWH_KzJ.js} +1 -1
- package/dist/client/assets/{check-BX8nRgop.js → check-C18YQC90.js} +1 -1
- package/dist/client/assets/{chevron-down-B3VVRJcV.js → chevron-down-Mp9mu_yd.js} +1 -1
- package/dist/client/assets/{chevron-right-BYMV1511.js → chevron-right-CzH-TaSF.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-dRd2eQMJ.js → chunk-HRAB3GC3-swV8PA2k.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-BjX67kHU.js → chunk-JTPDIGGW-BKXqcLKw.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-kP6nJjkU.js → chunk-T65CQEWV-vYbNJ8E6.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-C13bZPVd.js → chunk-YOZR3KYS-U65yUmqt.js} +1 -1
- package/dist/client/assets/{clock-B9ukVaVn.js → clock-B4PTFi5m.js} +1 -1
- package/dist/client/assets/{code-xml-BFc3TMSm.js → code-xml-Jtxsp5d1.js} +1 -1
- package/dist/client/assets/collapsed-strip-raJWthAH.css +1 -0
- package/dist/client/assets/compass-0_54-vz3.js +1 -0
- package/dist/client/assets/content-6RvWTrtk.js +1 -0
- package/dist/client/assets/content-BCgwMUqz.js +1 -0
- package/dist/client/assets/content-Bf2VLhx0.js +1 -0
- package/dist/client/assets/content-BrU_38-m.js +1 -0
- package/dist/client/assets/content-BvvJN8rN.js +1 -0
- package/dist/client/assets/content-CAeEqYPw.js +1 -0
- package/dist/client/assets/content-CHghn-rT.js +1 -0
- package/dist/client/assets/{content-Uqt8AG-s.css → content-CINHz-rZ.css} +1 -1
- package/dist/client/assets/content-CI_Z9DXk.js +1 -0
- package/dist/client/assets/content-CbyKONhW.js +1 -0
- package/dist/client/assets/content-Czogvp43.js +1 -0
- package/dist/client/assets/content-DFk0zNzX.js +1 -0
- package/dist/client/assets/content-DHe4DgkA.js +1 -0
- package/dist/client/assets/content-DMbawvqU.js +1 -0
- package/dist/client/assets/content-DTz7cKjo.js +1 -0
- package/dist/client/assets/content-E3kudY-W.js +1 -0
- package/dist/client/assets/content-LpO0aO_U.js +1 -0
- package/dist/client/assets/{conversation-icons-gpsv650H.js → conversation-icons-BV10B2Me.js} +1 -1
- package/dist/client/assets/conversation-model-CwF6Y9gx.js +1 -0
- package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +1 -0
- package/dist/client/assets/{copy-BFmOcWof.js → copy-Dtpx4FOE.js} +1 -1
- package/dist/client/assets/cpu-BjVis9mc.js +1 -0
- package/dist/client/assets/{createLucideIcon-CFBn0Sdk.js → createLucideIcon-DXpqZP7I.js} +1 -1
- package/dist/client/assets/credentials-BTce3VP1.js +1 -0
- package/dist/client/assets/ctx-panel-D_HJ3nhb.css +1 -0
- package/dist/client/assets/discover-CHbrEItO.js +2 -0
- package/dist/client/assets/embed-entry-vil28MyU.js +2 -0
- package/dist/client/assets/{external-link-B1TI5yIt.js → external-link-Ckiyzjwo.js} +1 -1
- package/dist/client/assets/{eye-1J4yOUoG.js → eye-CpfyvdLq.js} +1 -1
- package/dist/client/assets/file-code-corner-7mo7EviR.js +1 -0
- package/dist/client/assets/{file-text-DcYSrI4v.js → file-text-KijGBnME.js} +1 -1
- package/dist/client/assets/gauge-y-Xg8Mrv.js +1 -0
- package/dist/client/assets/gestures-Bq9XnSqY.js +1 -0
- package/dist/client/assets/git-branch-BQ_x8KZL.js +1 -0
- package/dist/client/assets/harnesses-screen-2z36fJKE.css +1 -0
- package/dist/client/assets/home-moving-signal-DMguaRWR.css +1 -0
- package/dist/client/assets/home-moving-signal-DtRpiNa0.js +1 -0
- package/dist/client/assets/home-now-card-DFb4GOgM.js +1 -0
- package/dist/client/assets/{home-now-card-nano-y1EhBvVL.js → home-now-card-nano-D--m9jpq.js} +1 -1
- package/dist/client/assets/hooks-9d1SoaQA.js +2 -0
- package/dist/client/assets/host-advisor-B2Fqs5Dd.css +1 -0
- package/dist/client/assets/index-BVlMw8x_.js +1 -0
- package/dist/client/assets/index-CZ-05hKz.js +10 -0
- package/dist/client/assets/index-Cn0GR-q1.js +1 -0
- package/dist/client/assets/index-DosI4AG9.js +1 -0
- package/dist/client/assets/index-i7TMxlwW.css +1 -0
- package/dist/client/assets/index-wLwc74Pu.css +1 -0
- package/dist/client/assets/inspector-panel-C-EhEDYy.js +2 -0
- package/dist/client/assets/{keyboard-nav-h1IdakpD.js → keyboard-nav-DFhAJkW3.js} +1 -1
- package/dist/client/assets/{lane-observe-BA3g9aVd.js → lane-observe-vfyACHi0.js} +1 -1
- package/dist/client/assets/{lane-roster-store-71vFgAem.js → lane-roster-store-gUBsydNf.js} +1 -1
- package/dist/client/assets/layers-CGou-LwV.js +1 -0
- package/dist/client/assets/layout-grid-BrZt31QH.js +1 -0
- package/dist/client/assets/left-B_o51JV6.js +1 -0
- package/dist/client/assets/left-BpgWnaah.js +1 -0
- package/dist/client/assets/left-CwHZCGO3.js +2 -0
- package/dist/client/assets/left-CwLs0okF.js +1 -0
- package/dist/client/assets/left-Cx0kv6pe.js +1 -0
- package/dist/client/assets/left-DA0amyfu.js +1 -0
- package/dist/client/assets/left-DH44V4I_.css +1 -0
- package/dist/client/assets/left-R2OOE7VG.css +1 -0
- package/dist/client/assets/left-advisor-DU3s01gk.js +1 -0
- package/dist/client/assets/left-agents-qL5PpUY-.js +1 -0
- package/dist/client/assets/left-default-uvuvDmt0.js +1 -0
- package/dist/client/assets/left-lanes-DnNLgec8.js +1 -0
- package/dist/client/assets/left-mission-DN3-NLPC.js +1 -0
- package/dist/client/assets/left-z-6CkuBe.js +2 -0
- package/dist/client/assets/library-DIo5NiGP.js +1 -0
- package/dist/client/assets/{loader-circle-d6PKL_KD.js → loader-circle-BiohlpM3.js} +1 -1
- package/dist/client/assets/{local-agents-B5pq17tZ.js → local-agents-wUIaBcEr.js} +1 -1
- package/dist/client/assets/{mentions-agCGDgyA.js → mentions-CcPFMbmZ.js} +1 -1
- package/dist/client/assets/mesh-buckets-ByyFXdKT.js +1 -0
- package/dist/client/assets/{mesh-ops-5pZCYptW.js → mesh-ops-CvGyjK84.js} +1 -1
- package/dist/client/assets/mesh-roster-n2nDpEmA.js +1 -0
- package/dist/client/assets/{mesh-screen-BSDUjrnV.css → mesh-screen-D1Yvo8fU.css} +1 -1
- package/dist/client/assets/{mesh-view-store-KJzABIkN.js → mesh-view-store-BpxGm71b.js} +1 -1
- package/dist/client/assets/{message-circle-CJO-pi7b.js → message-circle-B2ddzBrX.js} +1 -1
- package/dist/client/assets/{message-markup-CyRDLdOn.js → message-markup-RkfmDfME.js} +1 -1
- package/dist/client/assets/{message-square-D1hMsMj_.js → message-square-D9YYWE0x.js} +1 -1
- package/dist/client/assets/message-visibility-DwxgcgYK.js +1 -0
- package/dist/client/assets/mission-control-CnU7dNt1.css +1 -0
- package/dist/client/assets/{mission-control-store-Ce6dOvnZ.js → mission-control-store-Bf4b54MV.js} +1 -1
- package/dist/client/assets/{observe-BSWVM8YA.js → observe-CJRIvOCn.js} +1 -1
- package/dist/client/assets/{operator-attention-BwSPeheT.js → operator-attention-RqieiSY8.js} +1 -1
- package/dist/client/assets/{page-status-D2FQLJOX.js → page-status-BptpTdQ-.js} +1 -1
- package/dist/client/assets/{paperclip-iZmDMOS5.js → paperclip-B1UNGl5d.js} +1 -1
- package/dist/client/assets/perf-PX8Rx0EP.js +1 -0
- package/dist/client/assets/persistent-state-YI-WHSCF.js +1 -0
- package/dist/client/assets/{plus-gZ0T0eBI.js → plus-CuU_X0-8.js} +1 -1
- package/dist/client/assets/profile-rY8jO38P.js +1 -0
- package/dist/client/assets/projects-inbox-BBs1hG13.css +1 -0
- package/dist/client/assets/projects-inbox-D-zAb9Gp.js +1 -0
- package/dist/client/assets/proxy-DnLpZIi9.js +1 -0
- package/dist/client/assets/{radio-RMLfV4EO.js → radio-Dm1ItnA4.js} +1 -1
- package/dist/client/assets/{refresh-cw-C4x1x6b_.js → refresh-cw-BRn9Oxxl.js} +1 -1
- package/dist/client/assets/resolve-panes-DO6LkwhQ.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +1 -0
- package/dist/client/assets/right-BJltPRnd.js +1 -0
- package/dist/client/assets/right-BbyYdzHn.js +1 -0
- package/dist/client/assets/right-Beh3nCUB.js +1 -0
- package/dist/client/assets/right-C1yumXNx.js +1 -0
- package/dist/client/assets/{right-D-k9Z1Fe.js → right-CJnB_Bg7.js} +2 -2
- package/dist/client/assets/right-CPP7GyOm.js +1 -0
- package/dist/client/assets/right-D3aTKf1F.js +1 -0
- package/dist/client/assets/right-DI1B79nR.js +1 -0
- package/dist/client/assets/right-DtsRNX5b.js +1 -0
- package/dist/client/assets/right-Shpw_xDy.js +1 -0
- package/dist/client/assets/{rocket-CMM-IdLy.js → rocket-DOwXHKWA.js} +1 -1
- package/dist/client/assets/router-DJj2WbDg.js +1 -0
- package/dist/client/assets/{scope-views-BIfMTXU4.js → scope-views-A4_vP97W.js} +1 -1
- package/dist/client/assets/scout-voice-BhPzrc6P.js +1 -0
- package/dist/client/assets/{scoutbot-BTIErYHo.js → scoutbot-BJIamJOH.js} +2 -2
- package/dist/client/assets/scoutbot-markdown-jh7tzFB1.js +6 -0
- package/dist/client/assets/{scroll-text-DPPYrqB9.js → scroll-text-DO0GQzvN.js} +1 -1
- package/dist/client/assets/{search-DAyagUtF.js → search-D1tJSAWe.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-B9IF8wXl.js +1 -0
- package/dist/client/assets/{selection-bridge-BXw09aRF.js → selection-bridge-i2S9zpf8.js} +1 -1
- package/dist/client/assets/{send-horizontal-IcG46D2M.js → send-horizontal-CgLppsIC.js} +1 -1
- package/dist/client/assets/{server-BySujhDV.js → server-Dymv5Emh.js} +1 -1
- package/dist/client/assets/{session-catalog-ClS9xf6i.js → session-catalog-DNaOEzoQ.js} +1 -1
- package/dist/client/assets/{session-table-BdpHs1GN.js → session-table-PTQVoTyc.js} +1 -1
- package/dist/client/assets/settings-2fC_G9nX.js +1 -0
- package/dist/client/assets/{sliders-horizontal-R5pWUUcH.js → sliders-horizontal-BPSMHhbm.js} +1 -1
- package/dist/client/assets/{sparkles-DJOBD_8l.js → sparkles-Dy8p5xN8.js} +1 -1
- package/dist/client/assets/sse-CiOSzE5n.js +1 -0
- package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +1 -0
- package/dist/client/assets/{tail-display-BRcJltQa.js → tail-display-DcliDVkW.js} +1 -1
- package/dist/client/assets/{tail-events-BdvqZHLr.js → tail-events-BMQmSx1n.js} +1 -1
- package/dist/client/assets/{terminal-relay-TffuSPGs.js → terminal-relay-9lhzEp2V.js} +1 -1
- package/dist/client/assets/terminal-screen-BLk4PAYt.css +1 -0
- package/dist/client/assets/terminal-sessions-BQ6t92tJ.js +1 -0
- package/dist/client/assets/{terminal-takeover-BOFPRPjR.js → terminal-takeover-DANQfTcy.js} +1 -1
- package/dist/client/assets/{terminal-DJPUp_Qn.js → terminal-yN9xN-h9.js} +1 -1
- package/dist/client/assets/{runtime-picker--IW3cRry.js → text-CnZ0e1-V.js} +1 -1
- package/dist/client/assets/text-rLpBg4_z.css +1 -0
- package/dist/client/assets/use-conversation-list-D9BNLfnW.js +1 -0
- package/dist/client/assets/{use-fleet-active-asks-BHzeBZSW.js → use-fleet-active-asks-BeAdcl09.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-KmaauBr_.js → use-mesh-ops-items-BIvIHlqe.js} +1 -1
- package/dist/client/assets/use-reduced-motion-CKkhq9c5.js +1 -0
- package/dist/client/assets/{use-scout-dev-flags-BJbw87PK.js → use-scout-dev-flags-B2KCzPxn.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-C6o0tlat.js → useAgentHoverCard-CHBsxcbp.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +1 -0
- package/dist/client/assets/{usePierreRuntime-Cm7-qdm0.js → usePierreRuntime-DUuXH5yp.js} +1 -1
- package/dist/client/assets/{wrench-CvRjjByE.js → wrench-YcXMlsh2.js} +1 -1
- package/dist/client/assets/{x-C8ayPBtj.js → x-e3h2hDsp.js} +1 -1
- package/dist/client/assets/{xterm-B0ci4Q9a.js → xterm-Byp1Hep_.js} +1 -1
- package/dist/client/assets/zap-nMcjPoWB.js +1 -0
- package/dist/client/favicon-16.png +0 -0
- package/dist/client/favicon-32.png +0 -0
- package/dist/client/favicon.ico +0 -0
- package/dist/client/favicon.svg +20 -47
- package/dist/client/index.html +5 -5
- package/dist/client/openscout-icon.png +0 -0
- package/dist/client/site.webmanifest +2 -2
- package/dist/client/web-app-icon-192.png +0 -0
- package/dist/client/web-app-icon-512.png +0 -0
- package/dist/main.mjs +20095 -78203
- package/dist/node/main.mjs +322 -252
- package/dist/pairing-runtime-controller.mjs +1032 -804
- package/dist/runtime/base-daemon.mjs +49 -121
- package/dist/runtime/broker-daemon.mjs +1105 -281
- package/dist/runtime/broker-process-manager.mjs +6 -0
- package/dist/runtime/mesh-discover.mjs +6 -0
- package/dist/scout-control-plane-web.mjs +3326 -1912
- package/package.json +27 -5
- package/dist/client/assets/ActivityScreen-DkUP7V7M.js +0 -1
- package/dist/client/assets/AgentAvatar-D8ZtMluU.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BlGI6fuM.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CfaDVCVt.js +0 -1
- package/dist/client/assets/AgentFloorView-DjNLILLt.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DG5dlHb_.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-BzYzBfcW.js +0 -4
- package/dist/client/assets/AgentLanesEmbedScreen-Crxx1srt.js +0 -1
- package/dist/client/assets/AgentLanesView-ChNlmY-F.js +0 -2
- package/dist/client/assets/AgentSessions-DpY0htZV.js +0 -6
- package/dist/client/assets/AgentsConsole-CHyXrjhm.js +0 -1
- package/dist/client/assets/AgentsScreen-BhCjX2lD.js +0 -1
- package/dist/client/assets/AgentsSubnav-az_VDkri.js +0 -1
- package/dist/client/assets/AtopView-BjjPM8OX.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-B7qJ90Np.js +0 -6
- package/dist/client/assets/BriefingsScreen-CW6N829d.js +0 -1
- package/dist/client/assets/BrokerScreen-X3z50712.js +0 -5
- package/dist/client/assets/ChatCollapsedStrip-DNR9osDy.js +0 -1
- package/dist/client/assets/CodeScreen-CIKK1LcZ.js +0 -1
- package/dist/client/assets/ContextMenu-CHIuVKz7.js +0 -1
- package/dist/client/assets/ConversationComposer-Bf7Ga_49.js +0 -1
- package/dist/client/assets/ConversationFeedRows-Cm1Lgo43.js +0 -1
- package/dist/client/assets/ConversationHeader-B_GXrKR0.js +0 -1
- package/dist/client/assets/ConversationPanels-BTBbEvrP.js +0 -2
- package/dist/client/assets/ConversationScreen-B3l2m3JI.js +0 -1
- package/dist/client/assets/ConversationScreen-yIKEsm-8.css +0 -1
- package/dist/client/assets/ConversationStatus-BqhUHD85.js +0 -1
- package/dist/client/assets/DispatchAftermath-BDA9CrOd.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-B9vodVmG.js +0 -1
- package/dist/client/assets/FleetSearch-Bj9SCl2f.js +0 -1
- package/dist/client/assets/FleetSearch-EXOe8ulE.css +0 -1
- package/dist/client/assets/FlightObserveScreen-BVMdsiCC.js +0 -1
- package/dist/client/assets/FollowScreen-BifwHWOV.js +0 -1
- package/dist/client/assets/HarnessesScreen-fMnbnrD4.js +0 -1
- package/dist/client/assets/HomeHero-BgM6S39l.js +0 -1
- package/dist/client/assets/HomeHero-DEl-WBsT.css +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-Ch_WENUC.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-H3AnN-vN.js +0 -1
- package/dist/client/assets/MeshScreen-48QkJSDI.js +0 -1
- package/dist/client/assets/MessageComposerSuggestions-FdVHnT_q.js +0 -1
- package/dist/client/assets/MessagesScreen-BMOOfbWX.js +0 -1
- package/dist/client/assets/MissionControlView-BpsHKu1F.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-BPnAEA3F.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-iOZ6ds9L.js +0 -1
- package/dist/client/assets/MissionLogPane-B0csI89E.js +0 -1
- package/dist/client/assets/NewAgentModal-DBHJR9Qm.js +0 -1
- package/dist/client/assets/NewChatComposer-Hd7pI5Ac.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-DyArn7Id.js +0 -2
- package/dist/client/assets/ObserveTextFlow-CkMrtT8s.js +0 -2
- package/dist/client/assets/ObservedTopologyPanel-CaSZZP05.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-BtlKkiuF.js +0 -87
- package/dist/client/assets/OpsAgentsView-CnqrwbC2.js +0 -1
- package/dist/client/assets/OpsScreen-DOlmlVkP.js +0 -1
- package/dist/client/assets/OpsSubnav-Dj3ShAKv.js +0 -1
- package/dist/client/assets/PlanView-BLGdWDx6.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Dv1sVnQl.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-0-GDhsPT.js +0 -1
- package/dist/client/assets/ProjectsInbox-B3DpAI5b.js +0 -2
- package/dist/client/assets/ProjectsRail-BDl7U9Jq.js +0 -1
- package/dist/client/assets/ProjectsScreen-Dl2FcGrR.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BcGC5mHE.js +0 -1
- package/dist/client/assets/Provider-cJCdHAxu.js +0 -1
- package/dist/client/assets/RailRow-CLcVmywd.js +0 -1
- package/dist/client/assets/RailRow-Cf9LOiEj.css +0 -1
- package/dist/client/assets/RawSessionsTable-DBto4Ts-.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-DXEU5v3g.js +0 -1
- package/dist/client/assets/RepoDiffViewer-PaNeZMhJ.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-CWE5GxMP.js +0 -2
- package/dist/client/assets/ReposScreen-Cksv1cAD.js +0 -6
- package/dist/client/assets/ScoutDeckSurface-BCjPl7C4.js +0 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DkiRCHuK.js +0 -2
- package/dist/client/assets/ScoutbotRealtimeVoiceCall-1ixiEn1L.js +0 -1
- package/dist/client/assets/SessionRefScreen-OkTY7Szg.js +0 -1
- package/dist/client/assets/SessionsScreen-B-GFjxIA.js +0 -1
- package/dist/client/assets/SettingsDrawer-Co11RFX0.js +0 -3
- package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +0 -1
- package/dist/client/assets/SettingsScreen-Cn09nq5_.js +0 -1
- package/dist/client/assets/SpriteAvatar-DS6Tmyua.js +0 -1
- package/dist/client/assets/Terminal-U8gjIdm3.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-CTmdE7us.js +0 -1
- package/dist/client/assets/WorkDetailScreen-mJs0mb99.js +0 -5
- package/dist/client/assets/WorkFilesViewer-ODzLXKxj.js +0 -1
- package/dist/client/assets/agent-identity-BxCsXnDp.js +0 -1
- package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +0 -2
- package/dist/client/assets/api-h5zurxmi.js +0 -1
- package/dist/client/assets/broker-display-pp33bLsu.js +0 -2
- package/dist/client/assets/collapsed-strip-Dz-of2SM.css +0 -1
- package/dist/client/assets/content-B8gahuBy.js +0 -1
- package/dist/client/assets/content-BIqX06OQ.js +0 -1
- package/dist/client/assets/content-BKDZ6Fxe.js +0 -1
- package/dist/client/assets/content-C15Ya-iu.js +0 -1
- package/dist/client/assets/content-CDE9tJDF.js +0 -1
- package/dist/client/assets/content-CSAfI-PX.js +0 -1
- package/dist/client/assets/content-CTF9D60D.js +0 -1
- package/dist/client/assets/content-CbAGkYQO.js +0 -1
- package/dist/client/assets/content-CtqLJOVp.js +0 -1
- package/dist/client/assets/content-Dvs1KRfo.js +0 -1
- package/dist/client/assets/content-DyJdVZjI.js +0 -1
- package/dist/client/assets/content-Ji7ATaf7.js +0 -1
- package/dist/client/assets/content-eqZXKWcP.js +0 -1
- package/dist/client/assets/content-iyyQKwvA.js +0 -1
- package/dist/client/assets/content-pDE7Fpb9.js +0 -1
- package/dist/client/assets/content-pPSd2dua.js +0 -1
- package/dist/client/assets/conversation-model-CHwHZNw-.js +0 -1
- package/dist/client/assets/conversation-motion-features-DXtKlmuM.js +0 -1
- package/dist/client/assets/ctx-panel-B4s49N9e.css +0 -1
- package/dist/client/assets/discover-DKf0aTr_.js +0 -2
- package/dist/client/assets/embed-entry-RlQUTtc4.js +0 -2
- package/dist/client/assets/gestures-CcEOV6Sr.js +0 -1
- package/dist/client/assets/harnesses-screen-DBZoTZz8.css +0 -1
- package/dist/client/assets/home-moving-signal-Bh2FugbH.js +0 -1
- package/dist/client/assets/home-moving-signal-CAa0V91u.css +0 -1
- package/dist/client/assets/home-now-card-ByRH5fFx.js +0 -1
- package/dist/client/assets/hooks-DUZwL3Aq.js +0 -2
- package/dist/client/assets/index-BBznYVWk.css +0 -1
- package/dist/client/assets/index-BTuq-8Iv.js +0 -1
- package/dist/client/assets/index-CmwGCxUk.js +0 -1
- package/dist/client/assets/index-CvF09yvf.css +0 -1
- package/dist/client/assets/index-DmFAhGPj.js +0 -10
- package/dist/client/assets/index-Dtaswdsh.js +0 -1
- package/dist/client/assets/inspector-panel-DzgS5_Mv.js +0 -2
- package/dist/client/assets/left-8NITBvFX.js +0 -1
- package/dist/client/assets/left-B2HEqrTM.js +0 -2
- package/dist/client/assets/left-Bk3XnxPD.css +0 -1
- package/dist/client/assets/left-CCoobxPS.css +0 -1
- package/dist/client/assets/left-CTYUvXbe.js +0 -1
- package/dist/client/assets/left-CwDRT50z.js +0 -2
- package/dist/client/assets/left-CxlDLJlw.js +0 -1
- package/dist/client/assets/left-XFXxNd4g.js +0 -1
- package/dist/client/assets/left-agents-Ck4Xn-R8.js +0 -1
- package/dist/client/assets/left-default-BeOyS0bR.js +0 -1
- package/dist/client/assets/left-lanes-DZp3jJMo.js +0 -1
- package/dist/client/assets/left-mission-CuKFQ5xL.js +0 -1
- package/dist/client/assets/left-p1hkO6P0.js +0 -1
- package/dist/client/assets/left-plan-3rrFENhp.js +0 -2
- package/dist/client/assets/library-E--gKzEZ.js +0 -1
- package/dist/client/assets/mesh-buckets-CfAukILK.js +0 -1
- package/dist/client/assets/message-visibility-kJM8XcSG.js +0 -1
- package/dist/client/assets/mission-control-m3BTDQ9l.css +0 -1
- package/dist/client/assets/model-Co0zkMIc.js +0 -1
- package/dist/client/assets/plan-view-D56fneVF.css +0 -1
- package/dist/client/assets/profile-Dxj3VVOM.js +0 -1
- package/dist/client/assets/projects-inbox-COZ23dLR.css +0 -1
- package/dist/client/assets/projects-inbox-Dzt_GQDv.js +0 -1
- package/dist/client/assets/resolve-panes-C9gF0w4e.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-DxbY5RCH.js +0 -1
- package/dist/client/assets/right-5L7Tn0zG.js +0 -1
- package/dist/client/assets/right-CYtkMmRu.js +0 -1
- package/dist/client/assets/right-CreoQzPP.js +0 -1
- package/dist/client/assets/right-D9xFfy2b.js +0 -1
- package/dist/client/assets/right-DI7zHADe.js +0 -1
- package/dist/client/assets/right-DUbJ3WVc.js +0 -1
- package/dist/client/assets/right-DiybhsiK.js +0 -1
- package/dist/client/assets/right-Jh_1Q88s.js +0 -1
- package/dist/client/assets/right-udr1qTJG.js +0 -1
- package/dist/client/assets/router-Cn_s9IGH.js +0 -1
- package/dist/client/assets/runtime-picker-vhm0gtLs.css +0 -1
- package/dist/client/assets/scout-voice-CwbOz6EN.js +0 -1
- package/dist/client/assets/secondaryNavConfig-Dw3gS1jR.js +0 -1
- package/dist/client/assets/sse-CxXt4tqI.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +0 -1
- package/dist/client/assets/terminal-screen-BqVnCwl0.css +0 -1
- package/dist/client/assets/terminal-sessions-AmSgHklm.js +0 -1
- package/dist/client/assets/text-DsBWV_4k.js +0 -1
- package/dist/client/assets/use-conversation-list-C-dPcjQe.js +0 -1
- package/dist/client/assets/use-reduced-motion-CYqhYqHO.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-DjHBrgnS.js +0 -1
- package/dist/highlights-eq9cgrbb.scm +0 -604
- package/dist/highlights-ghv9g403.scm +0 -205
- package/dist/highlights-hk7bwhj4.scm +0 -284
- package/dist/highlights-r812a2qc.scm +0 -150
- package/dist/highlights-x6tmsnaa.scm +0 -115
- package/dist/injections-73j83es3.scm +0 -27
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- /package/dist/client/assets/{document-focus-viewer-BSC_JwVE.css → DocumentFocusViewer-BSC_JwVE.css} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{w as X,l as je,n as ye,C as se,r as c,q as fe,j as e,u as te,a6 as Se,v as Ne}from"./index-CZ-05hKz.js";import{a as we,h as ke}from"./router-DJj2WbDg.js";import{a as W}from"./api-Co9aQ2Jw.js";import{g as Ce,a as Ae,e as Ee,s as Te,b as Re,d as Oe,c as $e}from"./credentials-BTce3VP1.js";import{u as J,n as Ie,v as Pe,w as Le,x as Me}from"./Provider-B2xuo3rf.js";import{t as De}from"./time-Dhsh_2EG.js";import{j as _e,k as Ve,l as ze}from"./scout-voice-BhPzrc6P.js";import{u as He}from"./keyboard-nav-DFhAJkW3.js";import{C as Q}from"./CrewAvatar-CTIuxp4G.js";import{C as Fe}from"./CastPicker-BcA2vDDV.js";import{p as ae}from"./AgentAvatar-CYhf6twS.js";import{S as ne}from"./SpriteAvatar-Bs68ZENy.js";import{VoiceHostStatusBanner as Be,VoicePermissionsPanel as Ue}from"./VoicePermissionsPanel-k7sbLXx2.js";import{u as Ke}from"./chunk-HRAB3GC3-swV8PA2k.js";import{C as V}from"./check-C18YQC90.js";import{c as ee}from"./createLucideIcon-DXpqZP7I.js";import{R as We}from"./refresh-cw-BRn9Oxxl.js";import{C as qe}from"./copy-Dtpx4FOE.js";import{b as Ge}from"./DocumentFocusViewer-DZVhS7as.js";import{S as Ye}from"./sparkles-Dy8p5xN8.js";const Xe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ze=ee("monitor",Xe);const Qe=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Je=ee("moon",Qe);const es=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],ss=ee("sun",es);function ts(a){const[s,n]=c.useState(0),i=c.useRef([]);return c.useEffect(()=>{if(a<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const u=()=>{i.current.push(window.setTimeout(()=>{n(1),i.current.push(window.setTimeout(()=>n(2),40)),i.current.push(window.setTimeout(()=>n(1),90)),i.current.push(window.setTimeout(()=>{n(0),u()},130))},2600+Math.random()*4200))};u();const h=i.current;return()=>{h.forEach(v=>window.clearTimeout(v)),h.length=0}},[a]),a<3?0:s}function as({slug:a,open:s=!1,onToggle:n,coin:i=56,figure:u=240,hue:h,state:v="idle",interactive:p=!0,className:y,style:d,children:o}){const t=a.toLowerCase(),l=se[t]??se.milo,g=je[t],w=X.find(_=>_.slug===t)??X[0],O=ts(g?g.roles.length+1:1),x=g&&O>0?ye[O]?.role:void 0,[S,A,P]=l.coin,f=i/P,I=u*l.w/l.h,E=u/l.h,L=s?I:i,R=s?u:i,z=s?I:l.w*f,H=s?u:l.h*f,D=s?0:-S*f,r=s?0:-A*f,b=c.useMemo(()=>fe(h??null,l.ink),[h,l.ink]),M=g?g.patch[2]*(s?E:f):0,F=g?g.patch[3]*(s?E:f):0,G=g?(s?0:D)+g.patch[0]*(s?E:f):0,Y=g?(s?0:r)+g.patch[1]*(s?E:f):0;return e.jsxs("div",{className:`xc-stage-wrapper ${y||""}`,style:d,"data-open":s?"true":"false",children:[e.jsxs("div",{className:"xc-stage",role:p?"button":void 0,tabIndex:p?0:void 0,"aria-label":`${w.name} (${s?"Full body breakout":"Coin disc"})`,onClick:p?n:void 0,onKeyDown:p&&n?_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),n())}:void 0,style:{width:L,height:R,borderRadius:s?"16px":"50%"},children:[e.jsx("span",{className:"xc-stage-ground",style:{background:b,opacity:s?.92:1,borderRadius:s?"16px":"50%"}}),e.jsx("img",{src:te(`${t}-bust.webp`),alt:w.name,className:"xc-stage-img",style:{width:z,height:H,left:D,top:r}}),g&&x&&e.jsx("img",{src:te(`${g.dir}/${x}.webp`),alt:"",className:"xc-stage-patch",style:{width:M,height:F,left:G,top:Y}})]}),o]})}const ns=[195,125,300,45,355,210];function is(a){return`oklch(0.80 0.14 ${a})`}function j({label:a,right:s}){return e.jsxs("div",{className:"s-settings-section-rule",children:[e.jsx("span",{className:"s-settings-section-label",children:a}),e.jsx("span",{className:"s-settings-section-line"}),s&&e.jsx("span",{className:"s-settings-section-right",children:s})]})}function k({label:a,hint:s,children:n}){return e.jsxs("div",{className:"s-settings-field",children:[e.jsx("label",{className:"s-settings-field-label",children:a}),n,s&&e.jsx("span",{className:"s-settings-field-hint",children:s})]})}function B({value:a,onChange:s,mono:n}){return e.jsx("input",{className:`s-settings-input${n?" s-settings-input--mono":""}`,value:a,onChange:i=>s(i.target.value)})}function ie({value:a,onChange:s,rows:n=3}){return e.jsx("textarea",{className:"s-settings-textarea",value:a,onChange:i=>s(i.target.value),rows:n})}function ls({value:a,onChange:s,min:n,max:i,step:u=1,unit:h=""}){return e.jsxs("div",{className:"s-settings-slider-wrap",children:[e.jsx("input",{type:"range",min:n,max:i,step:u,value:a,onChange:v=>s(Number(v.target.value))}),e.jsxs("span",{className:"s-settings-slider-value",children:[a," ",h]})]})}function U({value:a,onChange:s,options:n,stacked:i,columns:u}){return e.jsx("div",{className:i?"s-settings-option-stacked":"s-settings-option-grid",style:i?void 0:{gridTemplateColumns:`repeat(${u??n.length}, 1fr)`},children:n.map(h=>e.jsxs("button",{className:`s-settings-option-btn${a===h.id?" s-settings-option-btn--active":""}`,onClick:()=>s(h.id),children:[e.jsx("span",{className:"s-settings-option-label",children:h.label}),e.jsx("span",{className:"s-settings-option-sub",children:h.sub})]},h.id))})}const rs=[{id:"system",label:"System",sub:"Follow this device",icon:Ze},{id:"light",label:"Light",sub:"Bright workspace",icon:ss},{id:"dark",label:"Dark",sub:"Low-light workspace",icon:Je}],os=[{id:"scout",label:"Scout",sub:"Control-room navigation"},{id:"slack",label:"Slack",sub:"Workspace rail and channel-style lists"}],le=[{id:"scout",label:"Scout",sub:"Near-neutral control room",spec:"SLATE · LIME"},{id:"graphite",label:"Graphite",sub:"Monochrome technical chassis",spec:"BLACK · SLATE"},{id:"polar",label:"Polar",sub:"Nord-inspired arctic slate",spec:"POLAR · FROST"},{id:"solar",label:"Solar",sub:"Solarized-inspired measured contrast",spec:"TEAL · PAPER"}],re=[{id:"hudson",label:"Rounded",sub:"Soft corners and luminous chrome",spec:"8PX"},{id:"editorial",label:"Compact",sub:"Tighter corners and flatter hierarchy",spec:"4PX"},{id:"drafting",label:"Square",sub:"Zero-radius technical grid",spec:"0PX"}],oe=[{id:"soft",label:"Soft",sub:"Quiet separators"},{id:"balanced",label:"Defined",sub:"Clear structure"},{id:"strong",label:"Strong",sub:"High separation"}],ce=[{id:"theme",label:"Theme"},{id:"lime",label:"Lime"},{id:"cyan",label:"Cyan"},{id:"violet",label:"Violet"},{id:"amber",label:"Amber"}],cs=[{id:"crew",label:"Crew Cast",sub:"Rendered character art with 4-slot status ring & eye animation",spec:"4-SLOT CAST"},{id:"sprite",label:"Generative",sub:"Deterministic 7×7 creatures from name hashes",spec:"PRNG VECTOR"},{id:"chip",label:"Pixel Chip",sub:"Pixel portraits of the chip cast; everyone else stays generative",spec:"PIXEL ART"}],de=cs,ue=[{id:"compact",label:"Compact",sub:"More rows per screen; the name carries"},{id:"regular",label:"Regular",sub:"Scout's default balance"},{id:"large",label:"Large",sub:"Faces legible at a glance"}],ds=["milo","vex","sprout"];function Z({className:a,theme:s,template:n,palette:i,contrast:u,accent:h,children:v}){return e.jsx("div",{className:a,"data-scout-theme":s,"data-scout-theme-mode":s,"data-scout-palette":i,"data-scout-contrast":u,"data-scout-accent":h,"data-hudson-theme":s,"data-hudson-template":n,children:v})}function us({palette:a,theme:s,template:n}){return e.jsxs(Z,{className:"s-settings-palette-sample",theme:s,template:n,palette:a,contrast:"balanced",accent:"theme",children:[e.jsxs("span",{className:"s-settings-palette-rail",children:[e.jsx("i",{}),e.jsx("i",{"data-active":!0}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsxs("span",{className:"s-settings-palette-list",children:[e.jsx("i",{}),e.jsx("i",{"data-selected":!0}),e.jsx("i",{})]}),e.jsxs("span",{className:"s-settings-palette-detail",children:[e.jsx("i",{"data-title":!0}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{"data-action":!0})]})]})}function hs({theme:a,template:s,palette:n,contrast:i,accent:u}){return e.jsxs(Z,{className:"s-settings-live-preview",theme:a,template:s,palette:n,contrast:i,accent:u,children:[e.jsxs("div",{className:"s-settings-live-preview-bar",children:[e.jsxs("span",{children:[e.jsx("i",{})," SCOUT"]}),e.jsxs("span",{className:"s-settings-live-preview-state",children:[e.jsx("i",{})," WORKING"]})]}),e.jsxs("div",{className:"s-settings-live-preview-shell",children:[e.jsxs("div",{className:"s-settings-live-preview-rail","aria-hidden":"true",children:[e.jsx("i",{"data-active":!0}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsxs("div",{className:"s-settings-live-preview-list",children:[e.jsx("span",{className:"s-settings-live-preview-kicker",children:"CONVERSATIONS"}),e.jsxs("span",{className:"s-settings-live-preview-row","data-selected":!0,children:[e.jsx("i",{}),e.jsx("b",{children:"Openscout"}),e.jsx("small",{children:"now"})]}),e.jsxs("span",{className:"s-settings-live-preview-row",children:[e.jsx("i",{}),e.jsx("b",{children:"Hudson"}),e.jsx("small",{children:"8m"})]}),e.jsxs("span",{className:"s-settings-live-preview-row",children:[e.jsx("i",{}),e.jsx("b",{children:"Scout"}),e.jsx("small",{children:"1h"})]})]}),e.jsxs("div",{className:"s-settings-live-preview-detail",children:[e.jsx("span",{className:"s-settings-live-preview-kicker",children:"ACTIVE FLIGHT"}),e.jsx("strong",{children:"Theme system review"}),e.jsx("p",{children:"Separating palette, interface shape, and contrast keeps every choice honest."}),e.jsxs("div",{className:"s-settings-live-preview-event",children:[e.jsx("i",{})," Agent is working · updated now"]}),e.jsx("button",{type:"button",tabIndex:-1,children:"Open trace"})]})]})]})}function ms(){const a=Ke(),{appearanceDetails:s,updateAppearanceDetails:n}=J();if(!a)return e.jsx("div",{className:"s-settings-inline-note",children:"Theme controls are unavailable in this embedded surface."});const i=a.resolvedTheme??"dark",u=Se(a.template)??"hudson",h=le.find(t=>t.id===s.palette)?.label??"Scout",v=re.find(t=>t.id===u)?.label??"Rounded",p=oe.find(t=>t.id===s.contrast)?.label??"Defined",y=ce.find(t=>t.id===s.accent)?.label??"Theme",d=de.find(t=>t.id===s.avatarStyle)?.label??"Generative",o=ue.find(t=>t.id===s.avatarSize)?.label??"Regular";return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"App layout",right:`currently ${s.shell}`}),e.jsx("div",{className:"s-settings-shell-grid",role:"group","aria-label":"App layout",children:os.map(t=>{const l=s.shell===t.id;return e.jsxs("button",{type:"button",className:"s-settings-shell-choice","data-shell":t.id,"data-active":l||void 0,"aria-pressed":l,onClick:()=>n({shell:t.id}),children:[e.jsxs("span",{className:"s-settings-shell-sample","aria-hidden":"true",children:[e.jsx("i",{"data-part":"top"}),e.jsx("i",{"data-part":"rail"}),e.jsxs("i",{"data-part":"list",children:[e.jsx("b",{}),e.jsx("b",{}),e.jsx("b",{})]}),e.jsxs("i",{"data-part":"content",children:[e.jsx("b",{}),e.jsx("b",{}),e.jsx("b",{})]})]}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub})]})]},t.id)})}),e.jsx(j,{label:"Color mode",right:`currently ${i}`}),e.jsx("div",{className:"s-settings-theme-mode-grid",role:"group","aria-label":"Color mode",children:rs.map(t=>{const l=t.icon,g=a.theme===t.id,w=t.id==="system"?`Follow this device · resolves to ${a.resolvedTheme??"…"}`:t.sub;return e.jsxs("button",{type:"button",className:"s-settings-theme-mode","data-active":g||void 0,"aria-pressed":g,onClick:()=>a.setTheme(t.id),children:[e.jsx(l,{size:18,strokeWidth:1.7,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:t.label}),e.jsx("small",{children:w})]}),g?e.jsx(V,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]},t.id)})}),e.jsxs("div",{className:"s-settings-appearance-workbench",children:[e.jsxs("div",{className:"s-settings-appearance-controls",children:[e.jsx(j,{label:"Color theme",right:`currently ${h.toLowerCase()}`}),e.jsx("div",{className:"s-settings-palette-grid",role:"group","aria-label":"Color theme",children:le.map(t=>{const l=s.palette===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({palette:t.id}),children:[e.jsx(us,{palette:t.id,theme:i,template:u}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{children:t.spec})]})]},t.id)})}),e.jsx(j,{label:"Interface shape",right:`currently ${v.toLowerCase()}`}),e.jsx("div",{className:"s-settings-interface-grid",role:"group","aria-label":"Interface shape",children:re.map(t=>{const l=u===t.id;return e.jsxs("button",{type:"button",className:"s-settings-interface-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>a.setTemplate(t.id),children:[e.jsx(Z,{className:"s-settings-shape-sample",theme:i,template:t.id,palette:s.palette,contrast:s.contrast,accent:s.accent,children:e.jsx("i",{children:e.jsx("i",{})})}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{children:t.spec})]})]},t.id)})}),e.jsx(j,{label:"Separation",right:`currently ${p.toLowerCase()}`}),e.jsx("div",{className:"s-settings-contrast-grid",role:"group","aria-label":"Interface contrast",children:oe.map(t=>{const l=s.contrast===t.id;return e.jsxs("button",{type:"button",className:"s-settings-contrast-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({contrast:t.id}),children:[e.jsxs("span",{className:"s-settings-contrast-lines","data-level":t.id,"aria-hidden":!0,children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsx("strong",{children:t.label}),e.jsx("small",{children:t.sub})]},t.id)})}),e.jsx(j,{label:"Signal accent",right:`currently ${y.toLowerCase()}`}),e.jsx("div",{className:"s-settings-accent-row",role:"group","aria-label":"Signal accent",children:ce.map(t=>{const l=s.accent===t.id;return e.jsxs("button",{type:"button",className:"s-settings-accent-choice","data-accent-option":t.id,"data-active":l||void 0,"aria-pressed":l,"aria-label":`${t.label} accent`,onClick:()=>n({accent:t.id}),children:[e.jsx(Z,{className:"s-settings-accent-dot",theme:i,template:u,palette:s.palette,contrast:s.contrast,accent:t.id,children:e.jsx("i",{})}),e.jsx("span",{children:t.label}),l?e.jsx(V,{size:13,"aria-hidden":!0}):null]},t.id)})}),e.jsx(j,{label:"Avatar system",right:`currently ${d.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-grid",role:"group","aria-label":"Avatar system",children:de.map(t=>{const l=s.avatarStyle===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice s-settings-avatar-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({avatarStyle:t.id}),children:[e.jsx("div",{className:"s-settings-avatar-preview",children:t.id==="crew"?e.jsx(Q,{slug:"milo",size:38,ring:!1,badge:!1}):t.id==="chip"?e.jsx(Q,{slug:"milo",size:38,chip:!0,ring:!1,badge:!1}):e.jsx(ne,{name:"Milo",size:38})}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsxs("span",{children:[t.spec,(()=>{const g=Ne(t.id);return g?` · ${g.covered} of ${g.total} cast`:" · every agent"})()]})]})]},t.id)})}),e.jsx(j,{label:"Avatar size",right:`currently ${o.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-size-row",role:"group","aria-label":"Avatar size",children:ue.map(t=>{const l=s.avatarSize===t.id,g=ae("row",t.id)??24;return e.jsxs("button",{type:"button",className:"s-settings-avatar-size-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({avatarSize:t.id}),children:[e.jsx("span",{className:"s-settings-avatar-size-sample","aria-hidden":!0,children:ds.map(w=>s.avatarStyle==="sprite"?e.jsx(ne,{name:w,size:g},w):e.jsx(Q,{slug:w,size:g,chip:s.avatarStyle==="chip",ring:!1,badge:!1},w))}),e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{className:"s-settings-avatar-size-spec",children:`${g}PX ROW · ${ae("inspector",t.id)}PX TILE`})]},t.id)})}),e.jsxs("div",{className:"s-settings-appearance-note",children:[e.jsx("strong",{children:"Saved on this device"}),e.jsx("span",{children:"Layout, mode, palette, shape, separation, and accent stay in sync across tabs. URL overrides remain available for embeds and visual QA."})]})]}),e.jsxs("aside",{className:"s-settings-preview-column","aria-label":"Live appearance preview",children:[e.jsx(j,{label:"Live specimen",right:i}),e.jsx(hs,{theme:i,template:u,palette:s.palette,contrast:s.contrast,accent:s.accent}),e.jsxs("dl",{className:"s-settings-theme-readout",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Palette"}),e.jsx("dd",{children:h})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Shape"}),e.jsx("dd",{children:v})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Separation"}),e.jsx("dd",{children:p})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Accent"}),e.jsx("dd",{children:y})]})]}),e.jsx("p",{className:"s-settings-preview-note",children:"Each control changes one visual axis. Success, warning, and failure colors keep their meaning."})]})]})]})}function gs({profile:a,update:s}){const{appearanceDetails:n,updateAppearanceDetails:i}=J(),[u,h]=c.useState(n.operatorCharacter||"milo"),v=u,[p,y]=c.useState(!0),d=X.find(t=>t.slug.toLowerCase()===v.toLowerCase())??X[0],o=t=>{h(t),i({operatorCharacter:t})};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Operator Character Stage",right:"cast mascot & identity"}),e.jsxs("div",{className:"s-settings-stage-hero-card","data-open":p?"true":"false",children:[e.jsxs("div",{className:"s-settings-stage-hero-header",children:[e.jsxs("div",{className:"s-settings-stage-hero-badge",children:[e.jsx("span",{className:"s-settings-stage-live-dot"}),e.jsx("span",{className:"s-settings-stage-badge-text",children:p?"FULL FIGURE BREAKOUT":"COIN DISC FRAMING"})]}),e.jsx("button",{type:"button",className:"s-settings-stage-toggle-btn",onClick:()=>y(t=>!t),title:p?"Collapse to coin framing":"Break out to full body figure",children:p?e.jsxs(e.Fragment,{children:[e.jsx(Ge,{size:13,"aria-hidden":!0}),e.jsx("span",{children:"Coin Framing"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{size:13,"aria-hidden":!0}),e.jsx("span",{children:"Breakout Figure"})]})})]}),e.jsxs("div",{className:"s-settings-stage-hero-body",children:[e.jsxs("div",{className:"s-settings-stage-art-col",children:[e.jsx(as,{slug:v,open:p,onToggle:()=>y(t=>!t),coin:64,figure:256,state:"working"}),e.jsx("span",{className:"s-settings-stage-click-hint",children:p?"Click avatar to collapse":"Click avatar to break out"})]}),e.jsxs("div",{className:"s-settings-stage-meta-col",children:[e.jsxs("div",{className:"s-settings-stage-title-row",children:[e.jsx("span",{className:"s-settings-stage-char-name",children:d.name}),e.jsx("span",{className:"s-settings-stage-char-title",children:d.title})]}),e.jsx("div",{className:"s-settings-stage-kernel-pill",children:e.jsx("code",{children:d.kernel})}),e.jsx("p",{className:"s-settings-stage-blurb",children:d.blurb}),e.jsxs("div",{className:"s-settings-stage-identity-group",children:[e.jsxs("div",{className:"s-settings-stage-operator-id",children:[e.jsx("strong",{children:a.name||"Operator"}),e.jsxs("span",{children:[a.handle||"@you"," · ",a.pronouns||"—"]})]}),e.jsxs("div",{className:"s-settings-hue-wrap",children:[e.jsx("span",{className:"s-settings-field-label",children:"Stage & Identity Hue"}),e.jsx("div",{className:"s-settings-hue-row",children:ns.map(t=>e.jsx("button",{type:"button",onClick:()=>s({hue:t}),className:`s-settings-hue-dot${a.hue===t?" s-settings-hue-dot--active":""}`,style:{background:is(t)},title:`Hue ${t}°`},t))})]})]})]})]})]}),e.jsxs(e.Fragment,{children:[e.jsx(j,{label:"Your character mascot",right:`currently ${d.name.toLowerCase()}`}),e.jsx("div",{className:"s-settings-cast-grid-wrap",children:e.jsx(Fe,{selectedSlug:v,onSelect:o})})]}),e.jsx(k,{label:"Display name",hint:"Shown when agents address you.",children:e.jsx(B,{value:a.name,onChange:t=>s({name:t})})}),e.jsx(k,{label:"Handle",hint:"Used in @mentions across threads.",children:e.jsx(B,{value:a.handle,onChange:t=>s({handle:t}),mono:!0})}),e.jsx(k,{label:"Pronouns",children:e.jsx(B,{value:a.pronouns,onChange:t=>s({pronouns:t})})}),e.jsx(j,{label:"How agents understand you",right:"shipped as system prompt context"}),e.jsx(k,{label:"Operator bio",hint:"How you want to be worked with. Agents read this before asking you things.",children:e.jsx(ie,{value:a.bio,onChange:t=>s({bio:t}),rows:4})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Timezone",children:e.jsx(B,{value:a.timezone,onChange:t=>s({timezone:t}),mono:!0})}),e.jsx(k,{label:"Working hours",children:e.jsx(B,{value:a.workingHours,onChange:t=>s({workingHours:t}),mono:!0})})]}),e.jsx(j,{label:"Ephemeral agent names",right:"rotation pool for one-off agents"}),e.jsx(k,{label:"Name pool",hint:a.provisionalAgentNames.length>0?`${a.provisionalAgentNamesResolvedCount} names active (${a.provisionalAgentNamesSource}). Preview: ${a.provisionalAgentNamesPreview.join(", ")}${a.provisionalAgentNamesResolvedCount>a.provisionalAgentNamesPreview.length?", …":""}`:"Leave empty to use Scout's built-in rotation. One short name per line.",children:e.jsx(ie,{value:a.provisionalAgentNames.join(`
|
|
2
|
+
`),onChange:t=>s({provisionalAgentNames:t.split(/\r?\n/u).map(l=>l.trim()).filter(Boolean)}),rows:6})}),e.jsx(k,{label:"Pool mode",hint:"Replace uses only your list. Add to defaults prepends yours, then Scout's built-in names.",children:e.jsx(U,{value:a.provisionalAgentNamesMode,onChange:t=>s({provisionalAgentNamesMode:t}),options:[{id:"replace",label:"Replace",sub:"your list only"},{id:"extend",label:"Add to defaults",sub:"yours first, then Scout"}],columns:2})})]})}function ps({profile:a,update:s}){return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Interrupt policy"}),e.jsx(k,{label:"When agents can ping you directly",hint:"Blocking-only means only asks that truly stall work. Others get batched.",children:e.jsx(U,{value:a.interruptThreshold,onChange:n=>s({interruptThreshold:n}),options:[{id:"always",label:"Always",sub:"any ask, any time"},{id:"blocking-only",label:"Blocking only",sub:"stuck agents · default"},{id:"batched",label:"Batched",sub:"grouped every 15m"},{id:"never",label:"Never",sub:"queue only, I'll check in"}]})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Batch window (min)",children:e.jsx(ls,{value:a.batchWindow,min:5,max:60,step:5,onChange:n=>s({batchWindow:n}),unit:"min"})}),e.jsx(k,{label:"Quiet hours",children:e.jsx(B,{value:a.quietHours,onChange:n=>s({quietHours:n}),mono:!0})})]}),e.jsx(j,{label:"Where to reach you"}),e.jsx(k,{label:"Preferred channel",children:e.jsx(U,{value:a.channel,onChange:n=>s({channel:n}),options:[{id:"here",label:"Here only",sub:"desktop app"},{id:"mobile",label:"Mobile only",sub:"paired phone"},{id:"here+mobile",label:"Both",sub:"whichever is active"}]})}),e.jsx(j,{label:"Tone calibration",right:"how agents write to you"}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Verbosity",children:e.jsx(U,{stacked:!0,value:a.verbosity,onChange:n=>s({verbosity:n}),options:[{id:"terse",label:"Terse",sub:"one-liners, answers only"},{id:"normal",label:"Normal",sub:"context + answer"},{id:"detailed",label:"Detailed",sub:"show reasoning"}]})}),e.jsx(k,{label:"Tone",children:e.jsx(U,{stacked:!0,value:a.tone,onChange:n=>s({tone:n}),options:[{id:"direct",label:"Direct",sub:"no hedging"},{id:"warm",label:"Warm",sub:"friendly, conversational"},{id:"formal",label:"Formal",sub:"business-like"}]})})]})]})}function bs({clientCredentials:a,serverCredentials:s,reloadCredentials:n}){const[i,u]=c.useState(""),[h,v]=c.useState(!1),[p,y]=c.useState(null),d=s?.openai??null,o=!!d?.configured,t=d?.source==="env"?"OPENAI_API_KEY":d?.source==="local-config"?"local Scout config":d?.source==="local-store"?"local OpenScout store":"missing",l=d?.source==="local-store"&&a?.configured?"local OpenScout store + HudVault mirror":t,g=d?.preview??a?.preview??null,w=async()=>{v(!0),y(null);try{const x=i.trim();await Te(x);let S=null;try{await Re(x)}catch(A){S=A instanceof Error?A.message:"HudVault save failed."}u(""),await n(),y(S?`Saved to local OpenScout store. Browser mirror failed: ${S}`:"Saved to local OpenScout store and Hudson Vault.")}catch(x){y(x instanceof Error?x.message:"Could not save key.")}finally{v(!1)}},O=async()=>{v(!0),y(null);try{const[x,S]=await Promise.allSettled([Oe(),$e()]);u(""),await n(),x.status==="rejected"||S.status==="rejected"?y("Cleared what I could; one credential store did not respond."):y(d?.source==="env"||d?.source==="local-config"?"Removed saved key. Server fallback is still configured.":"Removed saved key.")}catch(x){y(x instanceof Error?x.message:"Could not clear key.")}finally{v(!1)}};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Model providers",right:o?`configured · ${l}`:"missing"}),e.jsx("div",{className:"s-settings-relay-card",children:e.jsxs("div",{children:[e.jsxs("div",{className:"s-settings-relay-title",children:["OpenAI · ",e.jsxs("span",{className:"s-settings-device-status",style:{color:o?"var(--green)":"var(--dim)"},children:["●"," ",o?"ready":"missing"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[g??"No key stored"," · ",l]}),e.jsx("div",{className:"s-settings-relay-desc",children:"Scout stores user-entered keys in the local OpenScout credential store and keeps a HudVault mirror for this browser profile."})]})}),e.jsx(k,{label:"OpenAI API key",hint:"Saved locally. Existing keys are never shown again.",children:e.jsx("input",{className:"s-settings-input s-settings-input--mono",type:"password",value:i,placeholder:o?"Saved key configured":"sk-...",autoComplete:"off",spellCheck:!1,onChange:x=>u(x.target.value)})}),p&&e.jsx("div",{className:"s-settings-field-hint",children:p}),e.jsxs("div",{className:"s-settings-button-row",children:[e.jsx("button",{type:"button",className:"s-btn",disabled:h||!i.trim(),onClick:()=>{w()},children:h?"Saving":"Save key"}),e.jsx("button",{type:"button",className:"s-btn",disabled:h||!(a?.configured||d?.source==="local-store"),onClick:()=>{O()},children:"Clear saved key"})]})]})}const vs=[{id:"auto",label:"Auto",sub:"Parakeet when warm, Apple fallback"},{id:"parakeet",label:"Parakeet",sub:"on-device, best quality"},{id:"apple",label:"Apple Speech",sub:"instant, no model warmup"}];function xs(){const a=ke(Ie,!0),[s,n]=c.useState(null),[i,u]=c.useState(null),[h,v]=c.useState([]),[p,y]=c.useState([]),[d,o]=c.useState(!0),[t,l]=c.useState(!1),[g,w]=c.useState(!1),[O,x]=c.useState(null),S=c.useCallback(async()=>{o(!0);try{const[r,b,M]=await Promise.all([_e(),Ve(12).catch(()=>[]),Pe().catch(()=>null)]);n(r.settings),v(r.devices),y(b),u(M),x(null)}catch(r){x(r instanceof Error?r.message:String(r))}finally{o(!1)}},[]);c.useEffect(()=>{S()},[S]);const A=c.useCallback(async r=>{l(!0),x(null);try{const b=await ze(r);n(b.settings),v(b.devices)}catch(b){x(b instanceof Error?b.message:String(b))}finally{l(!1)}},[]),P=c.useCallback(async r=>{w(!0),x(null);try{const b=await Le(r);u(b),Me(b)}catch(b){x(b instanceof Error?b.message:String(b))}finally{w(!1)}},[]);if(d&&!s)return e.jsx("div",{className:"s-settings-field-hint",children:"Loading voice settings…"});const f=s?.inputDeviceId??h.find(r=>r.isDefault)?.id??"",I=s?.permissions?.find(r=>r.kind==="microphone")??null,E=s?.permissions?.find(r=>r.kind==="speechRecognition")??null,L=(s?.permissions?.length??0)>0||h.length>0,R=a&&i?.enabled===!0,z=g||!a||!i||i.locked,H=a?i?i.locked?`Controlled by OPENSCOUT_REALTIME_VOICE_ENABLED · ${i.enabled?"on":"off"}`:R?"Ready. Use Voice in the footer to start a call.":"Off. No microphone or OpenAI connection runs in the background.":"Live voice settings are temporarily unavailable.":"Unavailable in this build.",D=[L?null:"Scout voice host is offline. Launch Scout Menu on this Mac — the browser does not capture audio.",I?.status==="denied"||I?.status==="restricted"?I?.status==="restricted"?"Microphone access is restricted on this Mac.":"Microphone access is off for Scout Menu. Choose Retry access to reopen the macOS permission pane.":I?.canRequest?"Microphone has not been requested yet. Request access or tap the mic in chat to show the macOS prompt.":null,!E?.granted&&(E?.status==="denied"||E?.status==="restricted")?E?.status==="restricted"?"Speech recognition is restricted on this Mac.":"Speech recognition is off for Scout Menu. Open Privacy & Security → Speech Recognition to change it.":null,s?.modelReady?null:"Parakeet may download on first use. Apple Speech stays available while the model warms.","Dictation requires Scout Menu running. The browser does not capture audio.","If transcription hangs on Processing, wait up to 60 seconds or tap the mic again to cancel."].filter(r=>!!r);return e.jsxs("div",{className:"s-settings-col-gap",children:[O&&e.jsx("div",{className:"s-settings-field-hint",style:{color:"var(--amber)"},children:O}),e.jsx(j,{label:"Realtime conversation",right:"operator control"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":R||void 0,"data-unavailable":!a||void 0,children:[e.jsxs("span",{className:"s-settings-realtime-voice-copy",children:[e.jsx("strong",{children:"Enable live voice on this Scout"}),e.jsx("span",{children:"Allows live conversations with Scoutbot. Microphone audio and OpenAI usage begin only when you explicitly start a call."}),e.jsx("em",{children:H})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":R,"aria-label":"Enable live voice on this Scout",disabled:z,"data-checked":R||void 0,className:"s-settings-switch",onClick:()=>{P(!R)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:R?"On":"Off"})]})]}),e.jsx(Be,{hostOnline:L,micPermission:I,speechPermission:E,modelReady:s?.modelReady}),e.jsx(j,{label:"Scout Menu permissions",right:"voice host"}),e.jsx(Ue,{permissions:s?.permissions,hostOnline:L,disabled:t||d,onError:r=>x(r),onRefresh:S}),e.jsx(j,{label:"Transcription"}),e.jsx(k,{label:"Engine",hint:s?.modelReady?"Parakeet is warm and ready.":s?.modelInstalled?"Parakeet is installed; first dictation may warm the model.":"Parakeet downloads on first use. Apple Speech stays available meanwhile.",children:e.jsx(U,{value:s?.preference??"auto",onChange:r=>{n(b=>b&&{...b,preference:r}),A({preference:r})},options:vs,columns:3})}),e.jsx(k,{label:"Microphone input",hint:"Scout Menu uses the macOS system default input unless you pick a device here. The browser never captures audio.",children:h.length>0?e.jsx("select",{className:"s-settings-input",value:f,disabled:t,onChange:r=>{const b=r.target.value||null;n(M=>M&&{...M,inputDeviceId:b,inputDeviceName:h.find(F=>F.id===b)?.name??null}),A({inputDeviceId:b})},children:h.map(r=>e.jsxs("option",{value:r.id,children:[r.name,r.isDefault?" (system default)":""]},r.id))}):e.jsx("div",{className:"s-settings-field-hint",children:"Scout Menu is not reporting microphones. Launch Scout Menu, grant mic access, then refresh."})}),e.jsx(j,{label:"Diagnostics"}),e.jsx("ul",{className:"s-settings-field-hint",style:{margin:0,paddingLeft:"1.1rem",display:"grid",gap:"0.35rem"},children:D.map(r=>e.jsx("li",{children:r},r))}),e.jsx(j,{label:"Recent sessions",right:p.length?`${p.length} shown`:"none"}),p.length===0?e.jsx("div",{className:"s-settings-field-hint",children:"No recent dictation sessions on this web server. History fills as you use the mic in chat."}):e.jsx("div",{className:"s-settings-col-gap",style:{gap:"0.35rem"},children:p.map(r=>e.jsx("div",{className:"s-settings-device-row",style:{alignItems:"flex-start"},children:e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{className:"s-settings-device-name",style:{fontFamily:"var(--mono)"},children:[r.status," · ",r.lastEvent??"started"]}),e.jsxs("div",{className:"s-settings-device-meta",children:[r.surface," · ",De(r.updatedAt),r.error?` · ${r.error}`:""]}),r.lastTranscript?e.jsx("div",{className:"s-settings-field-hint",style:{marginTop:"0.2rem"},children:r.lastTranscript.length>96?`${r.lastTranscript.slice(0,96)}…`:r.lastTranscript}):null]})},r.sessionId))}),e.jsx("div",{className:"s-settings-button-row",children:e.jsx("button",{type:"button",className:"s-btn",disabled:d||t,onClick:()=>{S()},children:d?"Refreshing…":"Refresh"})})]})}const js={desktop:"◻",mobile:"▯",tablet:"▭"};function ys({device:a}){const s=a.status==="this-device"?"var(--accent)":a.status==="online"?"var(--green)":"var(--dim)";return e.jsxs("div",{className:"s-settings-device-row",children:[e.jsx("span",{className:"s-settings-device-icon",children:js[a.kind]??"□"}),e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-device-name",children:a.name}),e.jsxs("div",{className:"s-settings-device-meta",children:[a.kind," · via ",a.relay," · ",a.lastSeen]})]}),e.jsxs("span",{className:"s-settings-device-status",style:{color:s},children:["●"," ",a.status==="this-device"?"this device":a.status]}),e.jsx("button",{className:"s-btn",disabled:a.status==="this-device",children:a.status==="this-device"?"—":"Unpair"})]})}function fs({pairing:a}){const s=[{id:"local",name:"This machine",kind:"desktop",status:"this-device",relay:"local",lastSeen:"now"}];if(a?.trustedPeers)for(const n of a.trustedPeers){const i=n.fingerprint===a.connectedPeerFingerprint;s.push({id:n.fingerprint,name:n.name??"Paired device",kind:"mobile",status:i?"online":"offline",relay:"tailscale",lastSeen:n.lastSeenLabel??"—"})}return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:`Paired devices · ${s.length}`}),e.jsx("div",{className:"s-settings-col-gap",style:{gap:10},children:s.map(n=>e.jsx(ys,{device:n},n.id))}),e.jsx(j,{label:"Relay"}),e.jsxs("div",{className:"s-settings-relay-card",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"s-settings-relay-title",children:["Relay · ",e.jsxs("span",{className:"s-settings-device-status",style:{color:a?.isRunning?"var(--green)":"var(--dim)"},children:["●"," ",a?.isRunning?"connected":"offline"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[a?.relay??"not configured"," · tailscale"]}),e.jsx("div",{className:"s-settings-relay-desc",children:"Agents route through your relay to reach mobile when the app is backgrounded. End-to-end encrypted; keys never leave your devices."})]}),e.jsx("button",{className:"s-btn",children:"Configure"})]})]})}function q(a,s,n=!1){if(!a&&!s)return"Not reported";const i=a||"detached";return s?`${i} @ ${s}${n?" (modified)":""}`:i}function ge(){return navigator.userAgentData?.platform||navigator.platform||"Unknown"}function C({label:a,value:s,detail:n}){return e.jsxs("div",{className:"s-settings-about-fact",children:[e.jsx("dt",{children:a}),e.jsxs("dd",{children:[e.jsx("code",{children:s}),n?e.jsx("span",{children:n}):null]})]})}function he(a){const{build:s,mesh:n}=a,i=n?.health.build??null,u=n?.localNode?n.nodes[n.localNode.id]?.host:void 0,h=ge();return["OpenScout troubleshooting report",`Collected: ${a.collectedAt.toISOString()}`,"","[Web]",`Observed: ${a.buildCollectedAt?.toISOString()??"unknown"}`,`Version: ${s?.version??"unknown"}`,`Mode: ${s?.mode??"unknown"}`,`Source: ${q(s?.branch,s?.commit,s?.dirty===!0)}`,`Server: ${s?.server?`${s.server.engine} ${s.server.engineVersion}`:"unknown"}`,`Server platform: ${s?.server?`${s.server.platform}/${s.server.arch}`:"unknown"}`,"","[Broker]",`Observed: ${a.meshCollectedAt?.toISOString()??"unknown"}`,`Reachable: ${n?.health.reachable===void 0?"unknown":n.health.reachable?"yes":"no"}`,`Healthy: ${n?.health.ok===void 0?"unknown":n.health.ok?"yes":"no"}`,`Error: ${n?.health.error??"none reported"}`,`Package: ${i?.packageName??"unknown"}`,`Version: ${i?.version??"unknown"}`,`Mode: ${i?.mode??"unknown"}`,`Source: ${q(i?.branch,i?.commit)}`,`Build: ${i?.buildNumber??i?.buildId??"not reported"}`,`Node: ${n?.health.nodeId??"unknown"}`,`Broker URL: ${n?.brokerUrl??"unknown"}`,"","[Host]",`Name: ${n?.localNode?.name??"unknown"}`,`Scout version: ${u?.scoutVersion??"not reported"}`,`System: ${u?.os??"unknown"}`,`Architecture: ${u?.arch??s?.server?.arch??"unknown"}`,"","[Browser]",`Platform: ${h}`,`User agent: ${navigator.userAgent}`,`Origin: ${window.location.origin}`].join(`
|
|
3
|
+
`)}async function Ss(a){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(a);return}const s=document.createElement("textarea");s.value=a,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select();const n=document.execCommand("copy");if(s.remove(),!n)throw new Error("Clipboard access is unavailable")}function Ns(){const[a,s]=c.useState(null),[n,i]=c.useState(!0),[u,h]=c.useState(null),[v,p]=c.useState("idle"),y=c.useCallback(async(x=!1)=>{i(!0),h(null),p("idle");const[S,A]=await Promise.allSettled([W(x?"/api/build?refresh=1":"/api/build"),W("/api/mesh")]),P=new Date;if(s(f=>({build:S.status==="fulfilled"?S.value:f?.build??null,mesh:A.status==="fulfilled"?A.value:f?.mesh??null,collectedAt:P,buildCollectedAt:S.status==="fulfilled"?P:f?.buildCollectedAt??null,meshCollectedAt:A.status==="fulfilled"?P:f?.meshCollectedAt??null})),S.status==="rejected"||A.status==="rejected"){const f=[S.status==="rejected"?"web build":null,A.status==="rejected"?"broker":null].filter(Boolean).join(" and ");h(`Could not refresh ${f} details. Last reported values are kept when available.`)}i(!1)},[]);c.useEffect(()=>{y()},[y]);const d=a?.build??null,o=a?.mesh??null,t=o?.health.build??null,l=o?.localNode?o.nodes[o.localNode.id]?.host:void 0,g=ge(),w=o===null?"not reported":o.health.reachable?o.health.ok?"healthy":"degraded":"unreachable",O=c.useCallback(()=>{a&&Ss(he(a)).then(()=>{p("copied"),setTimeout(()=>p("idle"),1800)}).catch(()=>{p("error")})},[a]);return n&&!a?e.jsx("div",{className:"s-settings-loading",children:"Collecting version details…"}):e.jsxs("div",{className:"s-settings-about",children:[e.jsxs("div",{className:"s-settings-about-summary",children:[e.jsxs("div",{children:[e.jsx("span",{className:"s-settings-about-product",children:"OpenScout Web"}),e.jsx("strong",{children:d?.version?`v${d.version}`:"Version unavailable"}),e.jsxs("span",{className:"s-settings-about-source",children:[d?.mode??"unknown mode"," · ",q(d?.branch,d?.commit,d?.dirty===!0)]}),e.jsxs("span",{className:"s-settings-about-collected",children:["Snapshot collected ",a?.collectedAt.toLocaleString()??"—"]})]}),e.jsxs("div",{className:"s-settings-about-actions",children:[e.jsxs("button",{type:"button",className:"s-btn",onClick:()=>{y(!0)},disabled:n,children:[e.jsx(We,{size:13,"aria-hidden":!0}),n?"Refreshing…":"Refresh"]}),e.jsxs("button",{type:"button",className:"s-btn s-settings-about-copy",onClick:O,disabled:!a,children:[v==="copied"?e.jsx(V,{size:13,"aria-hidden":!0}):e.jsx(qe,{size:13,"aria-hidden":!0}),v==="copied"?"Copied report":v==="error"?"Copy failed":"Copy report"]})]})]}),u?e.jsx("div",{className:"s-settings-about-warning",role:"status",children:u}):null,v==="error"&&a?e.jsxs("div",{className:"s-settings-about-copy-fallback",role:"alert",children:[e.jsx("strong",{children:"Clipboard access was denied."}),e.jsx("span",{children:"Select and copy the report below."}),e.jsx("textarea",{readOnly:!0,value:he(a),"aria-label":"OpenScout troubleshooting report"})]}):null,e.jsx(j,{label:"Web application",right:"release and source identity"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Package version",value:d?.version??"Unknown",detail:`Observed ${a?.buildCollectedAt?.toLocaleString()??"at an unknown time"}. Use this when comparing releases.`}),e.jsx(C,{label:"Run mode",value:d?.mode??"Unknown"}),e.jsx(C,{label:"Source checkout",value:q(d?.branch,d?.commit,d?.dirty===!0),detail:"A dev SHA identifies the running checkout; it is not the release version."}),e.jsx(C,{label:"Server engine",value:d?.server?`${d.server.engine} ${d.server.engineVersion}`:"Not reported",detail:d?.server?`Node compatibility ${d.server.nodeVersion} · ${d.server.platform}/${d.server.arch}`:void 0})]}),e.jsx(j,{label:"Broker",right:w}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Status",value:w,detail:[`Observed ${a?.meshCollectedAt?.toLocaleString()??"at an unknown time"}.`,o?.health.error].filter(Boolean).join(" ")}),e.jsx(C,{label:"Package",value:t?.packageName??"Not reported"}),e.jsx(C,{label:"Version",value:t?.version??"Not reported"}),e.jsx(C,{label:"Source",value:q(t?.branch,t?.commit)}),e.jsx(C,{label:"Build",value:t?.buildNumber??t?.buildId??"Not reported"}),e.jsx(C,{label:"Node",value:o?.health.nodeId??"Not reported",detail:o?.brokerUrl})]}),e.jsx(j,{label:"Host and browser",right:"troubleshooting context"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Host",value:o?.localNode?.name??"Not reported"}),e.jsx(C,{label:"Host Scout",value:l?.scoutVersion??"Not reported"}),e.jsx(C,{label:"Host system",value:[l?.os,l?.arch??d?.server?.arch].filter(Boolean).join(" · ")||"Not reported"}),e.jsx(C,{label:"Browser platform",value:g}),e.jsx(C,{label:"Browser",value:navigator.userAgent}),e.jsx(C,{label:"Page origin",value:window.location.origin})]}),e.jsx("p",{className:"s-settings-about-note",children:"Native app and CLI versions are shown only when those components report them. Scout does not infer a version from a nearby checkout."})]})}const K=[{id:"appearance",label:"Appearance",sub:"mode · workspace style"},{id:"operator",label:"Operator",sub:"identity · bio · hours"},{id:"comms",label:"Communication",sub:"how agents reach you"},{id:"voice",label:"Voice",sub:"realtime · permissions · dictation"},{id:"credentials",label:"Credentials",sub:"model provider keys"},{id:"devices",label:"Paired devices",sub:"relay · connected"},{id:"about",label:"About",sub:"versions · build · runtime"}],me={appearance:"Appearance",operator:"Operator identity",comms:"Communication",voice:"Voice",credentials:"Credentials",devices:"Paired devices",about:"About OpenScout"},ws={appearance:"Choose how Scout looks on this device. Changes apply immediately across the workspace.",operator:"Your identity, availability, and the context agents receive when they work with you.",comms:"Set interruption rules, delivery channels, response style, and quiet hours.",voice:"Configure dictation, realtime voice, permissions, and input devices.",credentials:"Manage model-provider credentials stored by this Scout installation.",devices:"Review the relay and devices currently connected to this Scout workspace.",about:"Exact release, source, broker, host, and browser details for troubleshooting."},ks={name:"",handle:"",pronouns:"",hue:195,bio:"",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,workingHours:"08:00 – 18:00",interruptThreshold:"blocking-only",batchWindow:15,channel:"here+mobile",verbosity:"terse",tone:"direct",quietHours:"22:00 – 07:00",provisionalAgentNames:[],provisionalAgentNamesMode:"replace",provisionalAgentNamesResolvedCount:0,provisionalAgentNamesPreview:[],provisionalAgentNamesSource:"default"};function pe({open:a,onClose:s,section:n,onSectionChange:i,presentation:u}){const{refreshOnboarding:h}=J(),{ref:v,onKeyDown:p}=He(a&&u==="drawer"),[y,d]=c.useState("appearance"),o=n??y,t=c.useCallback(m=>{i?i(m):d(m)},[i]),[l,g]=c.useState(ks),[w,O]=c.useState(null),[x,S]=c.useState(null),[A,P]=c.useState(null),[f,I]=c.useState(!1),[E,L]=c.useState("saved"),R=c.useRef(null),z=c.useRef(!0),H=c.useRef(null);c.useEffect(()=>()=>{z.current=!1},[]);const D=c.useCallback(async()=>{const[m,$]=await Promise.allSettled([Ce(),Ae()]),T=m.status==="fulfilled"?m.value:null;let N=$.status==="fulfilled"?$.value:null;T?.configured&&!N?.openai.configured&&(N=await Ee().catch(()=>N)),S(T),P(N)},[]),r=c.useCallback(async()=>{try{const m=W("/api/user"),$=Promise.race([W("/api/pairing-state"),new Promise((Cs,xe)=>setTimeout(()=>xe(new Error("timeout")),3e3))]),[T,N]=await Promise.allSettled([m,$]);T.status==="fulfilled"&&g(T.value),N.status==="fulfilled"&&O(N.value),await D()}finally{I(!0)}},[D]);c.useEffect(()=>{a&&o!=="appearance"&&o!=="about"&&!f&&r()},[f,a,r,o]),c.useEffect(()=>{if(!a||!window.matchMedia("(max-width: 760px)").matches)return;const m=window.requestAnimationFrame(()=>{H.current?.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>window.cancelAnimationFrame(m)},[a,o]);const b=c.useCallback(m=>{const T=(K.findIndex(N=>N.id===o)+m+K.length)%K.length;t(K[T].id)},[o]),M=c.useCallback(m=>{if(p(m),u==="drawer"&&m.key==="Escape"){m.preventDefault(),s();return}m.target?.closest(".s-settings-rail")&&(m.key==="ArrowDown"?(m.preventDefault(),b(1)):m.key==="ArrowUp"&&(m.preventDefault(),b(-1)))},[b,s,p,u]),F=c.useCallback(m=>{R.current&&clearTimeout(R.current),L("saving"),R.current=setTimeout(()=>{W("/api/user",{method:"POST",body:JSON.stringify(m)}).then(()=>h()).then(()=>{z.current&&L("saved")}).catch(()=>{z.current&&L("error")})},400)},[h]),G=c.useCallback(m=>{g($=>{const T={...$,...m};return F(T),T})},[F]),Y=e.jsx("nav",{className:"s-settings-rail","aria-label":"Settings pages",children:K.map(m=>{const $=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-settings-rail-label",children:m.label}),e.jsx("span",{className:"s-settings-rail-sub",children:m.sub})]}),T=`s-settings-rail-btn${o===m.id?" s-settings-rail-btn--active":""}`;return u==="page"?e.jsx("a",{ref:o===m.id?N=>{H.current=N}:void 0,href:we({view:"settings",section:m.id}),"aria-current":o===m.id?"page":void 0,className:T,onClick:N=>{N.button!==0||N.metaKey||N.ctrlKey||N.shiftKey||N.altKey||(N.preventDefault(),t(m.id))},children:$},m.id):e.jsx("button",{ref:o===m.id?N=>{H.current=N}:void 0,onClick:()=>t(m.id),"aria-current":o===m.id?"page":void 0,className:T,children:$},m.id)})}),_=e.jsx("main",{className:"s-settings-content",id:`settings-${o}`,"data-settings-section":o,tabIndex:-1,children:o==="appearance"?e.jsx(ms,{}):o==="about"?e.jsx(Ns,{}):f?e.jsxs(e.Fragment,{children:[o==="operator"&&e.jsx(gs,{profile:l,update:G}),o==="comms"&&e.jsx(ps,{profile:l,update:G}),o==="credentials"&&e.jsx(bs,{clientCredentials:x,serverCredentials:A,reloadCredentials:D}),o==="voice"&&e.jsx(xs,{}),o==="devices"&&e.jsx(fs,{pairing:w})]}):e.jsx("div",{className:"s-settings-loading",children:"Loading settings…"})});return u==="page"?e.jsxs("section",{className:"s-settings-page","aria-labelledby":"settings-page-title",children:[e.jsxs("header",{className:"s-settings-page-header",children:[e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-page-kicker",children:"Settings"}),e.jsx("h1",{id:"settings-page-title",children:me[o]}),e.jsx("p",{children:ws[o]})]}),o==="about"?e.jsxs("div",{className:"s-settings-page-save-state","data-state":"neutral",children:[e.jsx("span",{"aria-hidden":"true"}),"Diagnostic snapshot"]}):e.jsxs("div",{className:"s-settings-page-save-state","data-state":E,role:"status","aria-live":"polite",children:[e.jsx("span",{"aria-hidden":"true"}),E==="saving"?"Saving changes…":E==="error"?"Couldn’t save changes":"Saved automatically"]})]}),e.jsxs("div",{className:"s-settings-page-layout",children:[Y,_]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`s-settings-scrim ${a?"s-settings-scrim--open":"s-settings-scrim--closed"}`,onClick:s}),e.jsxs("div",{ref:v,role:"dialog","aria-modal":"true","aria-label":"Settings",className:`s-settings-drawer ${a?"s-settings-drawer--open":"s-settings-drawer--closed"}`,onKeyDown:M,children:[e.jsxs("div",{className:"s-settings-header",children:[e.jsxs("div",{className:"s-settings-header-title",children:["⚙"," SETTINGS"]}),e.jsx("span",{className:"s-settings-header-sep",children:"/"}),e.jsx("span",{className:"s-settings-header-section",children:me[o]}),e.jsx("span",{style:{flex:1}}),e.jsx("span",{className:"s-settings-header-hint",children:"ESC to close"}),e.jsx("button",{className:"s-settings-close",onClick:s,children:"×"})]}),Y,_,e.jsxs("div",{className:"s-settings-footer",children:[e.jsxs("span",{className:"s-settings-footer-sync",children:["●"," synced"]}),e.jsx("span",{children:"·"}),e.jsx("span",{children:"changes apply instantly to every agent in your fleet"}),e.jsx("span",{style:{flex:1}}),e.jsx("button",{className:"s-btn",onClick:s,children:"Done"})]})]})]})}function be(a){return e.jsx(pe,{...a,presentation:"drawer"})}function ve({section:a="appearance",onSectionChange:s}){return e.jsx(pe,{open:!0,onClose:()=>{},section:a,onSectionChange:s,presentation:"page"})}const qs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"})),Gs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"}));export{ve as S,qs as a,Gs as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i,r as d}from"./index-CZ-05hKz.js";import{E as it}from"./EmptyState-CeBl0iGd.js";import{S as B}from"./StatusPill-ZZQwxB1a.js";import{a as M}from"./api-Co9aQ2Jw.js";import{p as Rt}from"./status-tone-BM_zuRy1.js";import{t as ot}from"./time-Dhsh_2EG.js";import{AgentConfigurationScreen as Mt}from"./AgentConfigurationScreen-BTI24HQX.js";import{S as At}from"./SettingsDrawer-_AwuopMS.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./CastPicker-BcA2vDDV.js";import"./CrewAvatar-CTIuxp4G.js";import"./HarnessMark-D5CA5uSp.js";import"./check-C18YQC90.js";import"./createLucideIcon-DXpqZP7I.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./colors-BtO5_zlx.js";import"./index-BVlMw8x_.js";import"./NewChatOrigin-DdpzE4kz.js";import"./keyboard-nav-DFhAJkW3.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./file-text-KijGBnME.js";import"./Provider-B2xuo3rf.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./openContent-C6XO6kr5.js";import"./AgentsSubnav-CDMjKeYC.js";import"./SecondaryNav-o2RL9H8H.js";import"./secondaryNavConfig-B9IF8wXl.js";import"./message-square-D9YYWE0x.js";import"./compass-0_54-vz3.js";import"./settings-2fC_G9nX.js";import"./terminal-yN9xN-h9.js";import"./git-branch-BQ_x8KZL.js";import"./scroll-text-DO0GQzvN.js";import"./refresh-cw-BRn9Oxxl.js";import"./bot-B5sub1-i.js";import"./wrench-YcXMlsh2.js";import"./server-Dymv5Emh.js";import"./cpu-BjVis9mc.js";import"./credentials-BTce3VP1.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./VoicePermissionsPanel-k7sbLXx2.js";import"./copy-Dtpx4FOE.js";import"./sparkles-Dy8p5xN8.js";var k=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(k||{});const Ct=[0,1],dt=[1,0],ht=[2,3],ft=[3,2],It={L:Ct,M:dt,Q:ht,H:ft},zt=/^\d*$/,Ft=/^[A-Z0-9 $%*+./:-]*$/,L="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",T=1,q=40,at=3,Bt=3,I=40,Lt=10,mt=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],pt=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class _t{constructor(e,s,n,r){if(this.version=e,this.ecc=s,e<T||e>q)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;const o=Array.from({length:this.size}).fill(!1);for(let c=0;c<this.size;c++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let c=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);const h=this.getPenaltyScore();h<c&&(r=u,c=h),this.applyMask(u)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,s){return e>=0&&e<this.size&&s>=0&&s<this.size&&this.modules[s][e]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,k.Timing),this.setFunctionModule(n,6,n%2===0,k.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),s=e.length;for(let n=0;n<s;n++)for(let r=0;r<s;r++)n===0&&r===0||n===0&&r===s-1||n===s-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const s=this.ecc[1]<<3|e;let n=s;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const r=(s<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,x(r,o));this.setFunctionModule(8,7,x(r,6)),this.setFunctionModule(8,8,x(r,7)),this.setFunctionModule(7,8,x(r,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,x(r,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,x(r,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,x(r,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^(e>>>11)*7973;const s=this.version<<12|e;for(let n=0;n<18;n++){const r=x(s,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,r),this.setFunctionModule(a,o,r)}}drawFinderPattern(e,s){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),a=e+r,c=s+n;a>=0&&a<this.size&&c>=0&&c<this.size&&this.setFunctionModule(a,c,o!==2&&o!==4,k.Position)}}drawAlignmentPattern(e,s){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,s+n,Math.max(Math.abs(r),Math.abs(n))!==1,k.Alignment)}setFunctionModule(e,s,n,r=k.Function){this.modules[s][e]=n,this.types[s][e]=r}addEccAndInterleave(e){const s=this.version,n=this.ecc;if(e.length!==z(s,n))throw new RangeError("Invalid argument");const r=pt[n[0]][s],o=mt[n[0]][s],a=Math.floor(O(s)/8),c=r-a%r,u=Math.floor(a/r),h=[],p=Yt(o);for(let f=0,b=0;f<r;f++){const g=e.slice(b,b+u-o+(f<c?0:1));b+=g.length;const E=Gt(g,p);f<c&&g.push(0),h.push(g.concat(E))}const m=[];for(let f=0;f<h[0].length;f++)h.forEach((b,g)=>{(f!==u-o||g>=c)&&m.push(b[f])});return m}drawCodewords(e){if(e.length!==Math.floor(O(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const a=n-o,u=(n+1&2)===0?this.size-1-r:r;!this.types[u][a]&&s<e.length*8&&(this.modules[u][a]=x(e[s>>>3],7-(s&7)),s++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+s)%2===0;break;case 1:r=s%2===0;break;case 2:r=n%3===0;break;case 3:r=(n+s)%3===0;break;case 4:r=(Math.floor(n/3)+Math.floor(s/2))%2===0;break;case 5:r=n*s%2+n*s%3===0;break;case 6:r=(n*s%2+n*s%3)%2===0;break;case 7:r=((n+s)%2+n*s%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[s][n]&&r&&(this.modules[s][n]=!this.modules[s][n])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let a=!1,c=0;const u=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[o][h]===a?(c++,c===5?e+=at:c>5&&e++):(this.finderPenaltyAddHistory(c,u),a||(e+=this.finderPenaltyCountPatterns(u)*I),a=this.modules[o][h],c=1);e+=this.finderPenaltyTerminateAndCount(a,c,u)*I}for(let o=0;o<this.size;o++){let a=!1,c=0;const u=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[h][o]===a?(c++,c===5?e+=at:c>5&&e++):(this.finderPenaltyAddHistory(c,u),a||(e+=this.finderPenaltyCountPatterns(u)*I),a=this.modules[h][o],c=1);e+=this.finderPenaltyTerminateAndCount(a,c,u)*I}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const c=this.modules[o][a];c===this.modules[o][a+1]&&c===this.modules[o+1][a]&&c===this.modules[o+1][a+1]&&(e+=Bt)}let s=0;for(const o of this.modules)s=o.reduce((a,c)=>a+(c?1:0),s);const n=this.size*this.size,r=Math.ceil(Math.abs(s*20-n*10)/n)-1;return e+=r*Lt,e}getAlignmentPatternPositions(){if(this.version===1)return[];{const e=Math.floor(this.version/7)+2,s=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=s)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){const s=e[1],n=s>0&&e[2]===s&&e[3]===s*3&&e[4]===s&&e[5]===s;return(n&&e[0]>=s*4&&e[6]>=s?1:0)+(n&&e[6]>=s*4&&e[0]>=s?1:0)}finderPenaltyTerminateAndCount(e,s,n){return e&&(this.finderPenaltyAddHistory(s,n),s=0),s+=this.size,this.finderPenaltyAddHistory(s,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,s){s[0]===0&&(e+=this.size),s.pop(),s.unshift(e)}}function N(t,e,s){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let n=e-1;n>=0;n--)s.push(t>>>n&1)}function x(t,e){return(t>>>e&1)!==0}class V{constructor(e,s,n){if(this.mode=e,this.numChars=s,this.bitData=n,s<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const $t=[1,10,12,14],Ot=[2,9,11,13],Ut=[4,8,16,16];function gt(t,e){return t[Math.floor((e+7)/17)+1]}function yt(t){const e=[];for(const s of t)N(s,8,e);return new V(Ut,t.length,e)}function Dt(t){if(!bt(t))throw new RangeError("String contains non-numeric characters");const e=[];for(let s=0;s<t.length;){const n=Math.min(t.length-s,3);N(Number.parseInt(t.substring(s,s+n),10),n*3+1,e),s+=n}return new V($t,t.length,e)}function Tt(t){if(!vt(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const e=[];let s;for(s=0;s+2<=t.length;s+=2){let n=L.indexOf(t.charAt(s))*45;n+=L.indexOf(t.charAt(s+1)),N(n,11,e)}return s<t.length&&N(L.indexOf(t.charAt(s)),6,e),new V(Ot,t.length,e)}function qt(t){return t===""?[]:bt(t)?[Dt(t)]:vt(t)?[Tt(t)]:[yt(Ht(t))]}function bt(t){return zt.test(t)}function vt(t){return Ft.test(t)}function Vt(t,e){let s=0;for(const n of t){const r=gt(n.mode,e);if(n.numChars>=1<<r)return Number.POSITIVE_INFINITY;s+=4+r+n.bitData.length}return s}function Ht(t){t=encodeURI(t);const e=[];for(let s=0;s<t.length;s++)t.charAt(s)!=="%"?e.push(t.charCodeAt(s)):(e.push(Number.parseInt(t.substring(s+1,s+3),16)),s+=2);return e}function O(t){if(t<T||t>q)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){const s=Math.floor(t/7)+2;e-=(25*s-10)*s-55,t>=7&&(e-=36)}return e}function z(t,e){return Math.floor(O(t)/8)-mt[e[0]][t]*pt[e[0]][t]}function Yt(t){if(t<1||t>255)throw new RangeError("Degree out of range");const e=[];for(let n=0;n<t-1;n++)e.push(0);e.push(1);let s=1;for(let n=0;n<t;n++){for(let r=0;r<e.length;r++)e[r]=U(e[r],s),r+1<e.length&&(e[r]^=e[r+1]);s=U(s,2)}return e}function Gt(t,e){const s=e.map(n=>0);for(const n of t){const r=n^s.shift();s.push(0),e.forEach((o,a)=>s[a]^=U(o,r))}return s}function U(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let s=0;for(let n=7;n>=0;n--)s=s<<1^(s>>>7)*285,s^=(e>>>n&1)*t;return s}function Wt(t,e,s=1,n=40,r=-1,o=!0){if(!(T<=s&&s<=n&&n<=q)||r<-1||r>7)throw new RangeError("Invalid value");let a,c;for(a=s;;a++){const m=z(a,e)*8,f=Vt(t,a);if(f<=m){c=f;break}if(a>=n)throw new RangeError("Data too long")}for(const m of[dt,ht,ft])o&&c<=z(a,m)*8&&(e=m);const u=[];for(const m of t){N(m.mode[0],4,u),N(m.numChars,gt(m.mode,a),u);for(const f of m.getData())u.push(f)}const h=z(a,e)*8;N(0,Math.min(4,h-u.length),u),N(0,(8-u.length%8)%8,u);for(let m=236;u.length<h;m^=253)N(m,8,u);const p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new _t(a,e,p,r)}function Xt(t,e){const{ecc:s="L",boostEcc:n=!1,minVersion:r=1,maxVersion:o=40,maskPattern:a=-1,border:c=1}=e||{},u=typeof t=="string"?qt(t):Array.isArray(t)?[yt(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);const h=Wt(u,It[s],r,o,a,n),p=Jt({version:h.version,maskPattern:h.mask,size:h.size,data:h.modules,types:h.types},c);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function Jt(t,e=1){if(!e)return t;const{size:s}=t,n=s+e*2;t.size=n,t.data.forEach(o=>{for(let a=0;a<e;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<e;o++)t.data.unshift(Array.from({length:n},a=>!1)),t.data.push(Array.from({length:n},a=>!1));const r=k.Border;t.types.forEach(o=>{for(let a=0;a<e;a++)o.unshift(r),o.push(r)});for(let o=0;o<e;o++)t.types.unshift(Array.from({length:n},a=>r)),t.types.push(Array.from({length:n},a=>r));return t}function lt(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Kt(t,e={}){const s=Xt(t,e),{pixelSize:n=10,whiteColor:r="white",blackColor:o="black"}=e,a=s.size*n,c=s.size*n;let u=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${c} ${a}">`;const h=[];for(let p=0;p<s.size;p++)for(let m=0;m<s.size;m++){const f=m*n,b=p*n;s.data[p][m]&&h.push(`M${f},${b}h${n}v${n}h-${n}z`)}return u+=`<rect fill="${lt(r)}" width="${c}" height="${a}"/>`,u+=`<path fill="${lt(o)}" d="${h.join("")}"/>`,u+="</svg>",u}const Zt="scout",Qt="pair";function _(t){const e=typeof t=="string"?t.trim():"";return e?`${Zt}://${Qt}?payload=${encodeURIComponent(e)}`:null}function te(t){const e=ee(t),s=_(t);if(!e)return{default:s,lan:null,tailnet:null};const n=xt(e.relay,e.fallbackRelays??[]),r=n.find(se),o=n.find(ne);return{default:s,lan:r?_(JSON.stringify(ct(e,r))):null,tailnet:o?_(JSON.stringify(ct(e,o))):null}}function ee(t){const e=typeof t=="string"?t.trim():"";if(!e)return null;try{const s=JSON.parse(e);return!s||typeof s!="object"||typeof s.relay!="string"?null:s}catch{return null}}function ct(t,e){const s=xt(e,[t.relay,...Array.isArray(t.fallbackRelays)?t.fallbackRelays:[]]),n={...t,relay:s[0]};return s.length>1?n.fallbackRelays=s.slice(1):delete n.fallbackRelays,n}function xt(t,e){const s=[],n=new Set;for(const r of[t,...e]){if(typeof r!="string")continue;const o=r.trim();!o||n.has(o)||(n.add(o),s.push(o))}return s}function se(t){const e=Nt(t);if(!e)return!1;if(e.endsWith(".local"))return!0;const s=wt(e);if(!s)return!1;const[n,r]=s;return n===10||n===192&&r===168||n===172&&r>=16&&r<=31||n===169&&r===254}function ne(t){const e=Nt(t);if(!e)return!1;if(e.endsWith(".ts.net"))return!0;const s=wt(e);if(!s)return!1;const[n,r]=s;return n===100&&r>=64&&r<=127}function Nt(t){try{return new URL(t).hostname.toLowerCase()}catch{return""}}function wt(t){const e=t.split(".");if(e.length!==4)return null;const s=e.map(n=>{if(!/^\d+$/.test(n))return Number.NaN;const r=Number(n);return r>=0&&r<=255?r:Number.NaN});return s.every(Number.isFinite)?s:null}function re(t){return t?t.replace(/^wss?:\/\//,"").replace(/:\d+$/,""):null}function ut(t){return t?t.length<=18?t:`${t.slice(0,10)}...${t.slice(-6)}`:null}function ie(t,e){if(!t)return null;const s=Math.max(0,Math.floor((t-e)/1e3));if(s===0)return null;if(s<60)return`${s}s`;const n=Math.floor(s/60),r=s%60;return r>0?`${n}m ${r}s`:`${n}m`}function D({value:t}){const[e,s]=d.useState(!1),n=d.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})},[t]);return i.jsx("button",{type:"button",className:"sys-copy-btn",onClick:n,title:"Copy",children:e?i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"20 6 9 17 4 12"})}):i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),i.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})}function $({label:t,value:e}){return i.jsxs("span",{className:"sys-settings-route-link",children:[i.jsx("a",{className:"sys-settings-link",href:e,title:e,"aria-label":`Open Scout ${t} pairing link`,children:i.jsx("code",{children:t})}),i.jsx(D,{value:e})]})}function oe({agentId:t,navigate:e}){return d.useEffect(()=>{e({view:"agents-v2",agentId:t,tab:"config"})},[t,e]),null}function Ns({navigate:t,section:e,agentId:s}){if(e==="agents"&&s)return i.jsx(oe,{agentId:s,navigate:t});if(e==="agents")return i.jsx(Mt,{navigate:t,selectedAgentId:s});if(e===void 0||e==="appearance"||e==="operator"||e==="comms"||e==="credentials"||e==="voice"||e==="devices"||e==="about"){const n=e??"appearance";return i.jsx(At,{section:n,onSectionChange:r=>t({view:"settings",section:r})})}return i.jsx(ae,{})}function ae(){const[t,e]=d.useState(null),[s,n]=d.useState(""),[r,o]=d.useState(""),[a,c]=d.useState(!0),[u,h]=d.useState(!1),[p,m]=d.useState(!1),[f,b]=d.useState(null),[g,E]=d.useState(null),[H,A]=d.useState(null),[C,Y]=d.useState(null),[jt,G]=d.useState(()=>Date.now()),[W,X]=d.useState(null),J=d.useRef(null),w=d.useRef(0),K=d.useRef(null);d.useEffect(()=>{J.current=t},[t]),d.useEffect(()=>{K.current=f},[f]),d.useEffect(()=>{!t||window.location.hash!=="#trusted-peers"||window.requestAnimationFrame(()=>{document.getElementById("trusted-peers")?.scrollIntoView({block:"start"})})},[t]);const j=d.useCallback(async(l="initial")=>{if(l==="background"&&K.current)return;const v=++w.current;!(J.current!==null)&&l!=="background"?(c(!0),E(null)):h(!0);try{const R=await M(l==="manual"?"/api/pairing-state/refresh":"/api/pairing-state");if(v!==w.current)return;e(R),E(null),Y(Date.now())}catch(R){if(v!==w.current)return;E(R instanceof Error?R.message:String(R))}finally{v===w.current&&(c(!1),h(!1))}},[]),Z=d.useCallback(async()=>{try{const l=await M("/api/user");o(l.name),n(l.name),A(null)}catch(l){A(l instanceof Error?l.message:String(l))}},[]),Q=d.useRef(!1);d.useEffect(()=>{j("initial"),Z()},[j,Z]),d.useEffect(()=>{const l=setInterval(()=>{j("background")},1e4);return()=>clearInterval(l)},[j]),d.useEffect(()=>{if(!t?.pairing?.expiresAt)return;G(Date.now());const l=setInterval(()=>{G(Date.now())},1e3);return()=>clearInterval(l)},[t?.pairing?.expiresAt]);const tt=d.useCallback(async()=>{m(!0),A(null);try{const l=await M("/api/user",{method:"POST",body:JSON.stringify({name:s})});o(l.name),n(l.name)}catch(l){A(l instanceof Error?l.message:String(l))}finally{m(!1)}},[s]),S=d.useCallback(async l=>{const v=++w.current;b(l),E(null);try{const P=await M("/api/pairing/control",{method:"POST",body:JSON.stringify({action:l})});if(v!==w.current)return;e(P),Y(Date.now())}catch(P){if(v!==w.current)return;E(P instanceof Error?P.message:String(P))}finally{v===w.current&&b(null)}},[]);d.useEffect(()=>{!t||t.isRunning||Q.current||(Q.current=!0,S("start"))},[t,S]);const Et=d.useCallback(async l=>{X(l);try{await M(`/api/pairing/peers/${encodeURIComponent(l)}`,{method:"DELETE"}),j("manual")}catch{}finally{X(null)}},[j]),et=d.useMemo(()=>{const l=t?.pairing?.qrValue?.trim();return l?Kt(l,{border:2,ecc:"M",pixelSize:8}):null},[t?.pairing?.qrValue]),y=d.useMemo(()=>te(t?.pairing?.qrValue),[t?.pairing?.qrValue]),kt=!!(y.lan||y.tailnet||y.default),F=re(t?.pairing?.relay??t?.relay??null),st=ie(t?.pairing?.expiresAt,jt),nt=(t?.trustedPeers.find(l=>l.fingerprint===t.connectedPeerFingerprint)??null)?.name??ut(t?.connectedPeerFingerprint??null),Pt=Rt(t),rt=s.trim()!==r,St=!a&&!t&&!!g;return i.jsxs("div",{className:"sys-surface-page sys-settings-page",children:[i.jsxs("div",{className:"sys-page-head",children:[i.jsxs("div",{className:"sys-page-title-group",children:[i.jsx("h2",{className:"sys-page-title",children:"Settings"}),i.jsx("p",{className:"sys-page-subtitle",children:"Identity, pairing, and trusted devices."})]}),i.jsxs("div",{className:"sys-page-actions",children:[t&&i.jsx(B,{tone:Pt,children:t.statusLabel}),i.jsx("div",{className:"sys-sync-note",children:a?"Loading...":g&&t?`Snapshot from ${C?ot(C):"earlier"}`:C?`Updated ${ot(C)}`:""}),i.jsx("button",{type:"button",className:"s-btn",disabled:a||u||!!f,onClick:()=>{j("manual")},children:u?"Refreshing...":"Refresh"})]})]}),g&&t&&i.jsxs("div",{className:"sys-banner sys-banner-warning",children:[i.jsx("strong",{children:"Refresh failed."}),i.jsx("span",{children:g})]}),H&&i.jsxs("div",{className:"sys-banner sys-banner-warning",children:[i.jsx("strong",{children:"Identity error."}),i.jsx("span",{children:H})]}),a&&!t&&i.jsx(it,{title:"Loading settings",body:"Checking relay status and trusted peers."}),St&&i.jsx(it,{className:"sys-state-card-error",title:"Pairing unavailable",body:g,action:i.jsx("button",{type:"button",className:"s-btn",onClick:()=>{j("manual")},children:"Try again"})}),i.jsxs("div",{className:"sys-settings-hero",children:[i.jsx("div",{className:"sys-settings-qr-col",children:et?i.jsxs("div",{className:"sys-settings-qr-frame",children:[i.jsx("div",{className:"s-qr",dangerouslySetInnerHTML:{__html:et}}),st&&i.jsxs("span",{className:"sys-settings-qr-expires",children:["Expires in ",st]})]}):i.jsx("div",{className:"sys-settings-qr-empty",children:i.jsx("span",{className:"sys-settings-qr-empty-label",children:"Generating QR..."})})}),i.jsxs("div",{className:"sys-settings-info-col",children:[i.jsxs("div",{className:"sys-input-row",children:[i.jsx("input",{className:"sys-input",type:"text",placeholder:"Your name",value:s,onChange:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&rt&&!p&&tt()}}),i.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!rt||p,onClick:()=>{tt()},children:p?"Saving...":"Save"})]}),i.jsxs("div",{className:"sys-settings-kv-list",children:[t?.identityFingerprint&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Fingerprint"}),i.jsxs("span",{className:"sys-settings-kv-value",children:[i.jsx("code",{children:t.identityFingerprint}),i.jsx(D,{value:t.identityFingerprint})]})]}),F&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Relay"}),i.jsxs("span",{className:"sys-settings-kv-value",children:[i.jsx("code",{children:F}),i.jsx(D,{value:F})]})]}),kt&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Links"}),i.jsxs("span",{className:"sys-settings-kv-value sys-settings-link-list",children:[y.lan&&i.jsx($,{label:"LAN",value:y.lan}),y.tailnet&&i.jsx($,{label:"TSN",value:y.tailnet}),!y.lan&&!y.tailnet&&y.default&&i.jsx($,{label:"PAIR",value:y.default})]})]}),t?.statusDetail&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Status"}),i.jsx("span",{className:"sys-settings-kv-value sys-settings-kv-nowrap",children:t.statusDetail})]}),nt&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Connected"}),i.jsx("span",{className:"sys-settings-kv-value",children:nt})]}),t?.secure&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Security"}),i.jsx("span",{className:"sys-settings-kv-value",children:i.jsx(B,{tone:"success",children:"Noise XX"})})]})]}),t&&i.jsx("div",{className:"sys-inline-actions sys-settings-controls",children:t.isRunning?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"s-btn",disabled:!!f,onClick:()=>{S("restart")},children:f==="restart"?"Restarting...":"Restart"}),i.jsx("button",{type:"button",className:"s-btn",disabled:!!f,onClick:()=>{S("stop")},children:f==="stop"?"Stopping...":"Stop"})]}):i.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!!f,onClick:()=>{S("start")},children:f==="start"?"Starting...":"Start pairing"})})]})]}),t&&i.jsxs("section",{className:"sys-settings-peers",id:"trusted-peers",children:[i.jsx("div",{className:"sys-section-head",children:i.jsxs("div",{children:[i.jsx("h3",{className:"sys-section-title",children:"Trusted peers"}),i.jsxs("p",{className:"sys-section-subtitle",children:[t.trustedPeers.length," device",t.trustedPeers.length!==1?"s":""," paired with this broker."]})]})}),t.trustedPeers.length===0?i.jsxs("div",{className:"sys-list-empty",children:[i.jsx("h3",{children:"No trusted peers"}),i.jsx("p",{children:"Devices appear here after completing pairing."})]}):i.jsxs("table",{className:"sys-peers-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Device"}),i.jsx("th",{children:"Fingerprint"}),i.jsx("th",{children:"Paired"}),i.jsx("th",{children:"Last seen"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:t.trustedPeers.map(l=>{const v=l.fingerprint===t.connectedPeerFingerprint;return i.jsxs("tr",{className:v?"sys-peers-row-connected":"",children:[i.jsx("td",{children:i.jsxs("span",{className:"sys-peers-name",children:[l.name??ut(l.fingerprint)??"Peer",v&&i.jsx(B,{tone:"success",className:"sys-peers-badge",children:"Connected"})]})}),i.jsx("td",{children:i.jsx("code",{className:"sys-peers-fp",children:l.fingerprint})}),i.jsx("td",{children:l.pairedAtLabel??"—"}),i.jsx("td",{children:l.lastSeenLabel??"—"}),i.jsx("td",{children:i.jsx("button",{type:"button",className:"sys-peers-remove",disabled:W===l.fingerprint,onClick:()=>{Et(l.fingerprint)},title:"Remove peer",children:W===l.fingerprint?"...":"Remove"})})]},l.fingerprint)})})]})]})]})}export{Ns as SettingsScreen};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scss-D5BDwBP9.js","assets/css-CLj8gQPS.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/ruby-B13GW9FM.js","assets/sql-CRqJ_cUM.js","assets/typescript-BPQ3VLAy.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/cpp-DIPi6g--.js","assets/c-BIGW1oBm.js","assets/shellscript-Yzrsuije.js","assets/yaml-Buea-lGh.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as X,j as J,_ as C}from"./index-DmFAhGPj.js";var R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t){return tt(t)}function tt(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?En(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=tt(t[n]);return e}function En(t){let e={};for(let n in t)e[n]=tt(t[n]);return e}function Mt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Bt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Bt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,s,o,i)=>{let l=n[parseInt(s||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Gt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Dt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function ut(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},pe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Ln(t),e)}static createFromParsedTheme(t,e){return In(t,e)}_cachedMatchRoot=new $t(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Tn(t.parent,s.parentScopes));return r?new Ut(r.fontStyle,r.foreground,r.background):null}},Me=class fe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new fe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new fe(n,e[r]);return n}push(e){return new fe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Tn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Pn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Pn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ut=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Ln(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ut(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ut(i.settings.background)&&(u=i.settings.background);for(let h=0,p=l.length;h<p;h++){let d=l[h].trim().split(" "),S=d[d.length-1],y=null;d.length>1&&(y=d.slice(0,d.length-1),y.reverse()),n[r++]=new xn(S,y,s,a,c,u)}}return n}var xn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},I=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(I||{});function In(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Gt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Nn(e),i=new Ut(n,o.getId(r),o.getId(s)),l=new Mn(new Fe(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pe(o,i,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},On=Object.freeze([]),Fe=class Ft{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||On,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ft(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Mn=class We{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(We._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new We(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Gt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,n,r,s,o))}},z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=B.getLanguageId(e),r=B.getTokenType(e),s=B.getFontStyle(e),o=B.getForeground(e),i=B.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),p=B.getForeground(e),f=B.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),i!==0&&(p=i),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function ge(t,e){const n=[],r=Bn(t);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(ht(s)){const a=[];do a.push(s),s=r.next();while(ht(s));return c=>e(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(h=>h(u))}}function ht(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Wt(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Dn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)$n(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $n(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?de({baseGrammar:o,selfGrammar:s},r):ze(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(t.scopeName);if(i)for(const l of i)r.add(new te(l))}function ze(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];me([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&me(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&me(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function me(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?Mt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const i=zt(o);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:ze(i.ruleName,{...e,repository:s},n);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};i.kind===4?ze(i.ruleName,a,n):de(a,n)}else i.kind===4?n.add(new Dn(i.scopeName,i.ruleName)):n.add(new te(i.scopeName));break}}}var Un=class{kind=0},Fn=class{kind=1},Wn=class{constructor(t){this.ruleName=t}kind=2},zn=class{constructor(t){this.scopeName=t}kind=3},Hn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function zt(t){if(t==="$base")return new Un;if(t==="$self")return new Fn;const e=t.indexOf("#");if(e===-1)return new zn(t);if(e===0)return new Wn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hn(n,r)}}var Vn=/\\(\d+)/,ft=/\\(\d+)/g,qn=-1,Ht=-2;var oe=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Bt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Kn=class extends oe{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends oe{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends oe{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends oe{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,l,a,c){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this._end=new ne(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends oe{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,l,a){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(i,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Vt=class x{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Kn(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Mt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,n,r),x._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,x._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)s[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=x.getCompiledRuleId(e[i],n,r)),s[l]=x.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){const l=e[o];let a=-1;if(l.include){const c=zt(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let d=f.repository[p];d&&(a=x.getCompiledRuleId(d,n,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=x.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof dt||c instanceof He||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ne=class qt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vn.test(this.source):this.hasBackReferences=!1}clone(){return new qt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return ft.lastIndex=0,this.source.replace(ft,(s,o)=>jt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",s[o+1]="A"):a==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",s[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new pt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new pt(t,r,this._items.map(s=>s.ruleId))}},pt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
import{r as X,j as J,_ as C}from"./index-CZ-05hKz.js";var R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t){return tt(t)}function tt(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?En(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=tt(t[n]);return e}function En(t){let e={};for(let n in t)e[n]=tt(t[n]);return e}function Mt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Bt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Bt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,s,o,i)=>{let l=n[parseInt(s||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Gt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Dt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function ut(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},pe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Ln(t),e)}static createFromParsedTheme(t,e){return In(t,e)}_cachedMatchRoot=new $t(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Tn(t.parent,s.parentScopes));return r?new Ut(r.fontStyle,r.foreground,r.background):null}},Me=class fe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new fe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new fe(n,e[r]);return n}push(e){return new fe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Tn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Pn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Pn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ut=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Ln(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ut(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ut(i.settings.background)&&(u=i.settings.background);for(let h=0,p=l.length;h<p;h++){let d=l[h].trim().split(" "),S=d[d.length-1],y=null;d.length>1&&(y=d.slice(0,d.length-1),y.reverse()),n[r++]=new xn(S,y,s,a,c,u)}}return n}var xn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},I=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(I||{});function In(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Gt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Nn(e),i=new Ut(n,o.getId(r),o.getId(s)),l=new Mn(new Fe(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pe(o,i,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},On=Object.freeze([]),Fe=class Ft{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||On,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ft(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Mn=class We{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(We._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new We(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Gt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,n,r,s,o))}},z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=B.getLanguageId(e),r=B.getTokenType(e),s=B.getFontStyle(e),o=B.getForeground(e),i=B.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),p=B.getForeground(e),f=B.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),i!==0&&(p=i),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function ge(t,e){const n=[],r=Bn(t);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(ht(s)){const a=[];do a.push(s),s=r.next();while(ht(s));return c=>e(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(h=>h(u))}}function ht(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Wt(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Dn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)$n(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $n(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?de({baseGrammar:o,selfGrammar:s},r):ze(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(t.scopeName);if(i)for(const l of i)r.add(new te(l))}function ze(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];me([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&me(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&me(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function me(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?Mt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const i=zt(o);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:ze(i.ruleName,{...e,repository:s},n);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};i.kind===4?ze(i.ruleName,a,n):de(a,n)}else i.kind===4?n.add(new Dn(i.scopeName,i.ruleName)):n.add(new te(i.scopeName));break}}}var Un=class{kind=0},Fn=class{kind=1},Wn=class{constructor(t){this.ruleName=t}kind=2},zn=class{constructor(t){this.scopeName=t}kind=3},Hn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function zt(t){if(t==="$base")return new Un;if(t==="$self")return new Fn;const e=t.indexOf("#");if(e===-1)return new zn(t);if(e===0)return new Wn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hn(n,r)}}var Vn=/\\(\d+)/,ft=/\\(\d+)/g,qn=-1,Ht=-2;var oe=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Bt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Kn=class extends oe{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends oe{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends oe{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends oe{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,l,a,c){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this._end=new ne(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends oe{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,l,a){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(i,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Vt=class x{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Kn(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Mt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,n,r),x._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,x._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)s[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=x.getCompiledRuleId(e[i],n,r)),s[l]=x.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){const l=e[o];let a=-1;if(l.include){const c=zt(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let d=f.repository[p];d&&(a=x.getCompiledRuleId(d,n,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=x.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof dt||c instanceof He||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ne=class qt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vn.test(this.source):this.hasBackReferences=!1}clone(){return new qt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return ft.lastIndex=0,this.source.replace(ft,(s,o)=>jt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",s[o+1]="A"):a==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",s[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new pt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new pt(t,r,this._items.map(s=>s.ruleId))}},pt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
3
3
|
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Be=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Xn=class Ve{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Be(e,8),this._embeddedLanguagesMatcher=new Jn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ve._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Be(0,0);_getBasicScopeAttributes=new $t(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Be(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ve.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Jn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>jt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},gt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Kt(t,e,n,r,s,o,i,l){const a=e.content.length;let c=!1,u=-1;if(i){const f=Qn(t,e,n,r,s,o);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new gt(s,!0);p()}return new gt(s,!1);function p(){const f=Zn(t,e,n,r,s,u);if(!f){o.produce(s,a),c=!0;return}const d=f.captureIndices,S=f.matchedRuleId,y=d&&d.length>0?d[0].end>r:!1;if(S===qn){const _=s.getRule(t);o.produce(s,d[0].start),s=s.withContentNameScopesList(s.nameScopesList),Z(t,e,n,s,o,_.endCaptures,d),o.produce(s,d[0].end);const m=s;if(s=s.parent,u=m.getAnchorPos(),!y&&m.getEnterPos()===r){s=m,o.produce(s,a),c=!0;return}}else{const _=t.getRule(S);o.produce(s,d[0].start);const m=s,b=_.getName(e.content,d),k=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(S,r,u,d[0].end===a,null,k,k),_ instanceof He){const E=_;Z(t,e,n,s,o,E.beginCaptures,d),o.produce(s,d[0].end),u=d[0].end;const N=E.getContentName(e.content,d),$=k.pushAttributed(N,t);if(s=s.withContentNameScopesList($),E.endHasBackReferences&&(s=s.withEndRule(E.getEndWithResolvedBackReferences(e.content,d))),!y&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(_ instanceof _e){const E=_;Z(t,e,n,s,o,E.beginCaptures,d),o.produce(s,d[0].end),u=d[0].end;const N=E.getContentName(e.content,d),$=k.pushAttributed(N,t);if(s=s.withContentNameScopesList($),E.whileHasBackReferences&&(s=s.withEndRule(E.getWhileWithResolvedBackReferences(e.content,d))),!y&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(Z(t,e,n,s,o,_.captures,d),o.produce(s,d[0].end),s=s.pop(),!y){s=s.safePop(),o.produce(s,a),c=!0;return}}d[0].end>r&&(r=d[0].end,n=!1)}}function Qn(t,e,n,r,s,o){let i=s.beginRuleCapturedEOL?0:-1;const l=[];for(let a=s;a;a=a.pop()){const c=a.getRule(t);c instanceof _e&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=nr(a.rule,t,a.stack.endRule,n,r===i),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Ht){s=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(a.stack,h.captureIndices[0].start),Z(t,e,n,a.stack,o,a.rule.whileCaptures,h.captureIndices),o.produce(a.stack,h.captureIndices[0].end),i=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{s=a.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:i,isFirstLine:n}}function Zn(t,e,n,r,s,o){const i=er(t,e,n,r,s,o),l=t.getInjections();if(l.length===0)return i;const a=tr(l,t,e,n,r,s,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function er(t,e,n,r,s,o){const i=s.getRule(t),{ruleScanner:l,findOptions:a}=Yt(i,t,s.endRule,n,r===o),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function tr(t,e,n,r,s,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let p=0,f=t.length;p<f;p++){const d=t[p];if(!d.matcher(h))continue;const S=e.getRule(d.ruleId),{ruleScanner:y,findOptions:_}=Yt(S,e,null,r,s===i),m=y.findNextMatchSync(n,s,_);if(!m)continue;const b=m.captureIndices[0].start;if(!(b>=l)&&(l=b,a=m.captureIndices,c=m.ruleId,u=d.priority,l===s))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Yt(t,e,n,r,s){return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function nr(t,e,n,r,s){return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function Z(t,e,n,r,s,o,i){if(o.length===0)return;const l=e.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let h=0;h<a;h++){const p=o[h];if(p===null)continue;const f=i[h];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,f.start):s.produce(r,f.start),p.retokenizeCapturedWithRuleId){const S=p.getName(l,i),y=r.contentNameScopesList.pushAttributed(S,t),_=p.getContentName(l,i),m=y.pushAttributed(_,t),b=r.push(p.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,m),k=t.createOnigString(l.substring(0,f.end));Kt(t,k,n&&f.start===0,f.start,b,s,!1,0),Wt(k);continue}const d=p.getName(l,i);if(d!==null){const y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(d,t);c.push(new rr(y,f.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var rr=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function sr(t,e,n,r,s,o,i,l){return new ir(t,e,n,r,s,o,i,l)}function mt(t,e,n,r,s){const o=ge(e,ye),i=Vt.getCompiledRuleId(n,r,s.repository);for(const l of o)t.push({debugSelector:e,matcher:l.matcher,ruleId:i,grammar:s,priority:l.priority})}function ye(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(or(e[s],r))return n=s+1,!0;return!1})}function or(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var ir=class{constructor(t,e,n,r,s,o,i,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Xn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=_t(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const a of Object.keys(s)){const c=ge(a,ye);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const s=r.injections;if(s)for(let i in s)mt(e,i,s[i],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&mt(e,a,l,this,l)}})}return e.sort((s,o)=>s.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=_t(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Vt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===qe.NULL){s=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=z.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null);let f;p?f=ee.createRootAndLookUpScopeName(p,h,this):f=ee.createRoot("unknown",h),e=new qe(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
|
|
4
4
|
`;const o=this.createOnigString(t),i=o.content.length,l=new lr(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Kt(this,o,s,0,e,l,!0,r);return Wt(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function _t(t,e){return t=Rn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ee=class D{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(const o of n)s=Me.push(s,o.scopeNames),r=new D(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new D(null,new Me(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const s=r.getMetadataForScope(e),o=new Me(null,e),i=r.themeProvider.themeMatch(o),l=D.mergeAttributes(n,s,i);return new D(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return D.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),z.set(e,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return D._pushAttributed(this,e,n);const r=e.split(/ /g);let s=this;for(const o of r)s=D._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){const s=r.getMetadataForScope(n),o=e.scopePath.push(n),i=r.themeProvider.themeMatch(o),l=D.mergeAttributes(e.tokenAttributes,s,i);return new D(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},qe=class F{constructor(e,n,r,s,o,i,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new F(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:F._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ee.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){F._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,i,l){return new F(this,e,n,r,s,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new F(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=ee.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new F(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ee.fromExtension(r,n.contentNameScopesList))}},ar=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ge(n,ye).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ge(n,ye).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},lr=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(o)&&(r=z.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=z.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},cr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,sr(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ur=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new cr(pe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(pe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new ar(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,s,o){const i=new jn(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(e,n,r,s,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,s=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,n=0,r=null,s=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,s,o)}},Ke=qe.NULL;function be(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function U(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function hr(t){return Array.isArray(t)?t:[t]}async function Xt(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ke(t){return!t||["plaintext","txt","text","plain"].includes(t)}function fr(t){return t==="ansi"||ke(t)}function Re(t){return t==="none"}function dr(t){return Re(t)}const pr=/(\r?\n)/g;function Ae(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(pr);let r=0;const s=[];for(let o=0;o<n.length;o+=2){const i=e?n[o]+(n[o+1]||""):n[o];s.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}const yt={light:"#333333",dark:"#bbbbbb"},bt={light:"#fffffe",dark:"#1e1e1e"},St="__shiki_resolved";function nt(t){if(t?.[St])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?yt.light:yt.dark),n||(n=e.type==="light"?bt.light:bt.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const o=new Map;function i(l){if(o.has(l))return o.get(l);s+=1;const a=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?i(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=i(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=i(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=i(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,St,{enumerable:!1,writable:!1,value:!0}),e}async function Jt(t){return[...new Set((await Promise.all(t.filter(e=>!fr(e)).map(async e=>await Xt(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Qt(t){return(await Promise.all(t.map(async e=>dr(e)?null:nt(await Xt(e))))).filter(e=>!!e)}function Zt(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new R(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var gr=class extends ur{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=nt(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=pe.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Zt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(const s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const r of t)this.resolveEmbeddedLanguages(r);const e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){const r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([l])=>l).includes(i)):!1).filter(s=>!n.includes(s));throw new R(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[r,s]of e)this._resolver.addLanguage(s);for(const[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},mr=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let r=1;r<=e.length;r++){const s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let Q=0;function _r(t){Q+=1,t.warnings!==!1&&Q>=10&&Q%10===0&&console.warn(`[Shiki] ${Q} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new R("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(nt),s=new gr(new mr(t.engine,n),r,n,t.langAlias);let o;function i(m){return Zt(m,t.langAlias)}function l(m){y();const b=s.getGrammar(typeof m=="string"?m:m.name);if(!b)throw new R(`Language \`${m}\` not found, you may need to load it first`);return b}function a(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const b=s.getTheme(m);if(!b)throw new R(`Theme \`${m}\` not found, you may need to load it first`);return b}function c(m){y();const b=a(m);return o!==m&&(s.setTheme(b),o=m),{theme:b,colorMap:s.getColorMap()}}function u(){return y(),s.getLoadedThemes()}function h(){return y(),s.getLoadedLanguages()}function p(...m){y(),s.loadLanguages(m.flat(1))}async function f(...m){return p(await Jt(m))}function d(...m){y();for(const b of m.flat(1))s.loadTheme(b)}async function S(...m){return y(),d(await Qt(m))}function y(){if(e)throw new R("Shiki instance has been disposed")}function _(){e||(e=!0,s.dispose(),Q-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:i,loadLanguage:f,loadLanguageSync:p,loadTheme:S,loadThemeSync:d,dispose:_,[Symbol.dispose]:_}}async function yr(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([Qt(t.themes||[]),Jt(t.langs||[]),t.engine]);return _r({...t,themes:e,langs:n,engine:r})}const en=new WeakMap;function Ee(t,e){en.set(t,e)}function se(t){return en.get(t)}var Te=class tn{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new tn(Object.fromEntries(hr(n).map(r=>[r,Ke])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return br(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function br(t){const e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function Sr(t,e){if(!(t instanceof Te))throw new R("Invalid grammar state");return t.getInternalStack(e)}const wr=/,/,Cr=/ /;function nn(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n;if(ke(t.resolveLangAlias(n.lang||"text"))||Re(r))return Ae(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=t.setTheme(r),i=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return kr(e,i,s,o,n)}function vr(...t){if(t.length===2)return se(t[1]);const[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(ke(s)||Re(o))throw new R("Plain language does not have grammar state");if(s==="ansi")throw new R("ANSI language does not have grammar state");const{theme:i,colorMap:l}=e.setTheme(o),a=e.getLanguage(s);return new Te(rt(n,a,i,l,r).stateStack,a.name,i.name)}function kr(t,e,n,r,s){const o=rt(t,e,n,r,s),i=new Te(o.stateStack,e.name,n.name);return Ee(o.tokens,i),o.tokens}function rt(t,e,n,r,s){const o=be(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500,includeExplanation:a=!1}=s,c=Ae(t);let u=s.grammarState?Sr(s.grammarState,n.name)??Ke:s.grammarContextCode!=null?rt(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ke,h=[];const p=[];for(let f=0,d=c.length;f<d;f++){const[S,y]=c[f];if(S===""){h=[],p.push([]);continue}if(i>0&&S.length>=i){h=[],p.push([{content:S,offset:y,color:"",fontStyle:0}]);continue}let _,m,b;a&&a!=="tokenType"&&(_=e.tokenizeLine(S,u,l),m=_.tokens,b=0);const k=e.tokenizeLine2(S,u,l),E=k.tokens.length/2;for(let N=0;N<E;N++){const $=k.tokens[2*N],xe=N+1<E?k.tokens[2*N+2]:S.length;if($===xe)continue;const Ie=k.tokens[2*N+1],vn=U(r[z.getForeground(Ie)],o),kn=z.getFontStyle(Ie),ae={content:S.substring($,xe),offset:y+$,color:vn,fontStyle:kn};if(a==="tokenType")ae.type=z.getTokenType(Ie);else if(a){const lt=[];if(a!=="scopeName")for(const j of n.settings){let V;switch(typeof j.scope){case"string":V=j.scope.split(wr).map(Ne=>Ne.trim());break;case"object":V=j.scope;break;default:continue}lt.push({settings:j,selectors:V.map(Ne=>Ne.split(Cr))})}ae.explanation=[];let ct=0;for(;$+ct<xe;){const j=m[b],V=S.substring(j.startIndex,j.endIndex);ct+=V.length,ae.explanation.push({content:V,scopes:a==="scopeName"?Rr(j.scopes):Ar(lt,j.scopes)}),b+=1}}h.push(ae)}p.push(h),h=[],u=k.ruleStack}return{tokens:p,stateStack:u}}function Rr(t){return t.map(e=>({scopeName:e}))}function Ar(t,e){const n=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];n[r]={scopeName:o,themeMatches:Tr(t,o,e.slice(0,r))}}return n}function wt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Er(t,e,n){if(!wt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)wt(t[r],n[s])&&(r-=1),s-=1;return r===-1}function Tr(t,e,n){const r=[];for(const{selectors:s,settings:o}of t)for(const i of s)if(Er(i,e,n)){r.push(o);break}return r}function rn(t,e,n,r=nn){const s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{const u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:se(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=Pr(...o.map(c=>c.tokens)),l=i[0].map((c,u)=>c.map((h,p)=>{const f={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=h.explanation),i.forEach((d,S)=>{const{content:y,explanation:_,offset:m,...b}=d[u][p];f.variants[s[S].color]=b}),f})),a=o[0].state?new Te(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return a&&Ee(l,a),l}function Pr(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const s=t.map(a=>a[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const i=s.map(()=>0),l=s.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=s[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}const Lr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ie{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ie.prototype.normal={};ie.prototype.property={};ie.prototype.space=void 0;function sn(t,e){const n={},r={};for(const s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new ie(n,r,e)}function Ye(t){return t.toLowerCase()}class O{constructor(e,n){this.attribute=n,this.property=e}}O.prototype.attribute="";O.prototype.booleanish=!1;O.prototype.boolean=!1;O.prototype.commaOrSpaceSeparated=!1;O.prototype.commaSeparated=!1;O.prototype.defined=!1;O.prototype.mustUseProperty=!1;O.prototype.number=!1;O.prototype.overloadedBoolean=!1;O.prototype.property="";O.prototype.spaceSeparated=!1;O.prototype.space=void 0;let xr=0;const w=H(),A=H(),Xe=H(),g=H(),v=H(),q=H(),M=H();function H(){return 2**++xr}const Je=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:A,commaOrSpaceSeparated:M,commaSeparated:q,number:g,overloadedBoolean:Xe,spaceSeparated:v},Symbol.toStringTag,{value:"Module"})),De=Object.keys(Je);class st extends O{constructor(e,n,r,s){let o=-1;if(super(e,n),Ct(this,"space",s),typeof r=="number")for(;++o<De.length;){const i=De[o];Ct(this,De[o],(r&Je[i])===Je[i])}}}st.prototype.defined=!0;function Ct(t,e,n){n&&(t[e]=n)}function Y(t){const e={},n={};for(const[r,s]of Object.entries(t.properties)){const o=new st(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Ye(r)]=r,n[Ye(o.attribute)]=r}return new ie(e,n,t.space)}const on=Y({properties:{ariaActiveDescendant:null,ariaAtomic:A,ariaAutoComplete:null,ariaBusy:A,ariaChecked:A,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:v,ariaCurrent:null,ariaDescribedBy:v,ariaDetails:null,ariaDisabled:A,ariaDropEffect:v,ariaErrorMessage:null,ariaExpanded:A,ariaFlowTo:v,ariaGrabbed:A,ariaHasPopup:null,ariaHidden:A,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:v,ariaLevel:g,ariaLive:null,ariaModal:A,ariaMultiLine:A,ariaMultiSelectable:A,ariaOrientation:null,ariaOwns:v,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:A,ariaReadOnly:A,ariaRelevant:null,ariaRequired:A,ariaRoleDescription:v,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:A,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function an(t,e){return e in t?t[e]:e}function ln(t,e){return an(t,e.toLowerCase())}const Ir=Y({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:v,accessKey:v,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:v,autoFocus:w,autoPlay:w,blocking:v,capture:null,charSet:null,checked:w,cite:null,className:v,cols:g,colSpan:null,content:null,contentEditable:A,controls:w,controlsList:v,coords:g|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:Xe,draggable:A,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:v,height:g,hidden:Xe,high:g,href:null,hrefLang:null,htmlFor:v,httpEquiv:v,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:v,itemRef:v,itemScope:w,itemType:v,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,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:w,optimum:g,pattern:null,ping:v,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:v,required:w,reversed:w,rows:g,rowSpan:g,sandbox:v,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:A,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:A,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:v,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:A,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:ln}),Nr=Y({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:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:v,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:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,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:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,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:g,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:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:v,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,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:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:an}),cn=Y({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),un=Y({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ln}),hn=Y({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Or=/[A-Z]/g,vt=/-[a-z]/g,Mr=/^data[-\w.:]+$/i;function Br(t,e){const n=Ye(e);let r=e,s=O;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Mr.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(vt,Gr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!vt.test(o)){let i=o.replace(Or,Dr);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}s=st}return new s(r,e)}function Dr(t){return"-"+t.toLowerCase()}function Gr(t){return t.charAt(1).toUpperCase()}const jr=sn([on,Ir,cn,un,hn],"html"),fn=sn([on,Nr,cn,un,hn],"svg"),kt={}.hasOwnProperty;function $r(t,e){const n=e||{};function r(s,...o){let i=r.invalid;const l=r.handlers;if(s&&kt.call(s,t)){const a=String(s[t]);i=kt.call(l,a)?l[a]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ur=/["&'<>`]/g,Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zr=/[|\\{}()[\]^$+*?.]/g,Rt=new WeakMap;function Hr(t,e){if(t=t.replace(e.subset?Vr(e.subset):Ur,r),e.subset||e.escapeOnly)return t;return t.replace(Fr,n).replace(Wr,r);function n(s,o,i){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),e)}function r(s,o,i){return e.format(s.charCodeAt(0),i.charCodeAt(o+1),e)}}function Vr(t){let e=Rt.get(t);return e||(e=qr(t),Rt.set(t,e)),e}function qr(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(zr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Kr=/[\dA-Fa-f]/;function Yr(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Kr.test(String.fromCharCode(e))?r:r+";"}const Xr=/\d/;function Jr(t,e,n){const r="&#"+String(t);return n&&e&&!Xr.test(String.fromCharCode(e))?r:r+";"}const Qr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ge={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Zr=["cent","copy","divide","gt","lt","not","para","times"],dn={}.hasOwnProperty,Qe={};let ce;for(ce in Ge)dn.call(Ge,ce)&&(Qe[Ge[ce]]=ce);const es=/[^\dA-Za-z]/;function ts(t,e,n,r){const s=String.fromCharCode(t);if(dn.call(Qe,s)){const o=Qe[s],i="&"+o;return n&&Qr.includes(o)&&!Zr.includes(o)&&(!r||e&&e!==61&&es.test(String.fromCharCode(e)))?i:i+";"}return""}function ns(t,e,n){let r=Yr(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=ts(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const o=Jr(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function K(t,e){return Hr(t,Object.assign({format:ns},e))}const rs=/^>|^->|<!--|-->|--!>|<!-$/g,ss=[">"],os=["<",">"];function is(t,e,n,r){return r.settings.bogusComments?"<?"+K(t.value,Object.assign({},r.settings.characterReferences,{subset:ss}))+">":"<!--"+t.value.replace(rs,s)+"-->";function s(o){return K(o,Object.assign({},r.settings.characterReferences,{subset:os}))}}function as(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function At(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function ls(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function cs(t){return t.join(" ").trim()}const us=/[ \t\n\f\r]/g;function ot(t){return typeof t=="object"?t.type==="text"?Et(t.value):!1:Et(t)}function Et(t){return t.replace(us,"")===""}const P=gn(1),pn=gn(-1),hs=[];function gn(t){return e;function e(n,r,s){const o=n?n.children:hs;let i=(r||0)+t,l=o[i];if(!s)for(;l&&ot(l);)i+=t,l=o[i];return l}}const fs={}.hasOwnProperty;function mn(t){return e;function e(n,r,s){return fs.call(t,n.tagName)&&t[n.tagName](n,r,s)}}const it=mn({body:ps,caption:je,colgroup:je,dd:ys,dt:_s,head:je,html:ds,li:ms,optgroup:bs,option:Ss,p:gs,rp:Tt,rt:Tt,tbody:Cs,td:Pt,tfoot:vs,th:Pt,thead:ws,tr:ks});function je(t,e,n){const r=P(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ot(r.value.charAt(0)))}function ds(t,e,n){const r=P(n,e);return!r||r.type!=="comment"}function ps(t,e,n){const r=P(n,e);return!r||r.type!=="comment"}function gs(t,e,n){const r=P(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ms(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="li"}function _s(t,e,n){const r=P(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ys(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Tt(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bs(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ss(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ws(t,e,n){const r=P(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Cs(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function vs(t,e,n){return!P(n,e)}function ks(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Pt(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Rs=mn({body:Ts,colgroup:Ps,head:Es,html:As,tbody:Ls});function As(t){const e=P(t,-1);return!e||e.type!=="comment"}function Es(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Ts(t){const e=P(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ot(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ps(t,e,n){const r=pn(n,e),s=P(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&it(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Ls(t,e,n){const r=pn(n,e),s=P(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&it(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const ue={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as w}from"./index-
|
|
1
|
+
import{r as s,j as w}from"./index-CZ-05hKz.js";const K=e=>e==="right"?"railOccupantRight":"railOccupantBottom";function N(e,n,r,l){s.useEffect(()=>{if(!r||typeof window>"u"||typeof document>"u")return;const d=K(e),o=document.body.dataset[d];document.body.dataset[d]=n,window.dispatchEvent(new CustomEvent("hudson:rail:claim",{detail:{owner:n,side:e}})),o&&o!==n&&window.dispatchEvent(new CustomEvent("hudson:rail:preempted",{detail:{owner:o,side:e,by:n}}));const m=f=>{const a=f.detail;a&&a.side===e&&a.owner!==n&&l?.()},v=f=>{const a=f.detail;a&&a.side===e&&a.owner===n&&l?.()};return window.addEventListener("hudson:rail:claim",m),window.addEventListener("hudson:rail:preempted",v),()=>{window.removeEventListener("hudson:rail:claim",m),window.removeEventListener("hudson:rail:preempted",v),document.body.dataset[d]===n&&delete document.body.dataset[d],window.dispatchEvent(new CustomEvent("hudson:rail:release",{detail:{owner:n,side:e}}))}},[e,n,r,l])}const k=620,B=360,$=280,H=900,X=720;function q(e,n,r,l){if(typeof window>"u")return n;try{const d=window.localStorage.getItem(e);if(d==null)return n;const o=Number(d);return Number.isFinite(o)?Math.min(l,Math.max(r,o)):n}catch{return n}}const z=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function P({open:e,onClose:n,side:r="right",owner:l,defaultSize:d,minSize:o=$,maxSize:m,resizable:v=!1,backdrop:f=!0,scrollLock:a=!1,focusTrap:A=!1,ariaLabel:_,className:F,layer:j="default",children:C}){const I=d??(r==="right"?k:B),h=m??(r==="right"?H:X),y=`slidepanel.size.${l}.${r}`,[E,L]=s.useState(()=>q(y,I,o,h)),S=s.useRef(E);S.current=E;const[g,R]=s.useState(!1),b=s.useRef(null),D=s.useRef(null),p=s.useCallback(()=>n(),[n]);N(r,l,e,p),s.useEffect(()=>{if(!e)return;const t=i=>{i.key==="Escape"&&(i.preventDefault(),p())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,p]),s.useEffect(()=>{if(!e||!a)return;const t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e,a]),s.useEffect(()=>{if(!e)return;D.current=document.activeElement;const t=b.current;return t?((t.querySelector(z)??t).focus(),()=>{D.current?.focus?.()}):void 0},[e]),s.useEffect(()=>{if(!g)return;const t=u=>{if(r==="right"){const c=window.innerWidth-u.clientX;L(Math.min(h,Math.max(o,c)))}else{const c=window.innerHeight-u.clientY;L(Math.min(h,Math.max(o,c)))}},i=()=>{R(!1);try{window.localStorage.setItem(y,String(S.current))}catch{}};return window.addEventListener("pointermove",t),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",i),()=>{window.removeEventListener("pointermove",t),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",i)}},[g,r,o,h,y]);const O=t=>{if(!A||t.key!=="Tab")return;const i=b.current;if(!i)return;const u=Array.from(i.querySelectorAll(z));if(u.length===0){t.preventDefault(),i.focus();return}const c=u[0],T=u[u.length-1],x=document.activeElement;t.shiftKey?(x===c||!i.contains(x))&&(t.preventDefault(),T.focus()):x===T&&(t.preventDefault(),c.focus())};if(!e)return null;const U=r==="right"?{width:E}:{height:E},M=j==="elevated";return w.jsxs(w.Fragment,{children:[f&&w.jsx("div",{className:`s-slide-backdrop${M?" s-slide-backdrop--elevated":""}`,"data-side":r,onClick:p,"aria-hidden":"true"}),w.jsxs("aside",{ref:b,className:["s-slide",`s-slide--${r}`,g?"s-slide--resizing":"",M?"s-slide--elevated":"",F].filter(Boolean).join(" "),role:"dialog","aria-modal":"true","aria-label":_,tabIndex:-1,onKeyDown:O,style:U,children:[v&&w.jsx("div",{className:`s-slide-resize s-slide-resize--${r}`,onPointerDown:t=>{t.preventDefault(),R(!0)},role:"separator","aria-orientation":r==="right"?"vertical":"horizontal","aria-label":"Resize panel"}),C]})]})}export{P as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as T,r as _,s as H,j as l}from"./index-CZ-05hKz.js";import{n as M}from"./colors-BtO5_zlx.js";const N=7,e=10,R=N*e;function D({name:i,size:n,hue:x,tone:p,salt:t,spectrum:s,tile:h=!1,glow:a,corner:d,cornerPulse:m,className:g,title:f}){const u=_.useMemo(()=>H(i,{hue:x,salt:t,spectrum:s,tone:p}),[i,x,t,s,p?.l,p?.c]),b=a??(n!=null&&n>=40),y={position:"relative",display:"inline-grid",placeItems:"center",...n!=null?{width:n,height:n}:{width:"100%",height:"100%"},borderRadius:h?"26%":void 0,background:h?u.palette.soft:void 0,boxSizing:"border-box"};return l.jsxs("span",{className:g,style:y,title:f,children:[l.jsx(C,{sprite:u,glow:b,inset:h}),d&&l.jsx("span",{"aria-hidden":!0,style:{position:"absolute",right:"-4%",bottom:"-4%",width:"28%",height:"28%",minWidth:6,minHeight:6,borderRadius:"999px",background:d,boxShadow:m?`0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000)), 0 0 0 4px color-mix(in oklab, ${d} 32%, transparent)`:"0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000))"}})]})}function C({sprite:i,glow:n=!1,inset:x=!1}){const{cells:p,palette:t}=i,s=e*.07,h=e*.2,a=e*.24,d=.05,m=.085,g=p.length,f=c=>{const o=g>1?c/(g-1):0;return{d:d-(d+m)*o,t:o}},u=c=>Math.max(.06,Math.min(.97,c)),b=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.bodyL+o)} ${t.bodyC+r*.012} ${t.hue})`},S=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.accentL+o)} ${t.accentC+r*.012} ${t.accentHue})`},y=[n?`drop-shadow(0 1px 3.5px color-mix(in oklab, ${t.glow} 68%, transparent))`:null,`drop-shadow(0 0.35px 0.5px oklch(0.16 0.04 ${t.hue} / 0.55))`].filter(Boolean).join(" ");return l.jsx("svg",{viewBox:`0 0 ${R} ${R}`,shapeRendering:"geometricPrecision",style:{display:"block",width:x?"72%":"100%",height:"auto",aspectRatio:"1 / 1",overflow:"visible",filter:y},children:p.flatMap((c,o)=>c.map((r,k)=>{if(r==="off")return null;const w=k*e,v=o*e,$=`${o}-${k}`;if(r==="eye"){const j=w+e/2,E=v+e*.52;return l.jsxs("g",{className:"sprite-cell sprite-cell--eye",children:[l.jsx("rect",{x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:t.sclera}),l.jsx("circle",{cx:j,cy:E,r:a,fill:t.ink}),l.jsx("ellipse",{cx:j-a*.33,cy:E-a*.36,rx:a*.34,ry:a*.34,fill:t.sclera,opacity:.9})]},$)}const A=r==="accent"?S(o):r==="mouth"?t.ink:b(o),I=r==="accent"?"sprite-cell sprite-cell--accent":"sprite-cell";return l.jsx("rect",{className:I,x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:A},$)}))})}const L={in_turn:{l:.75,c:.16},in_flight:{l:.72,c:.14},needs_attention:{l:.78,c:.16},callable:{l:.73,c:.13},blocked:{l:.5,c:.02}};function F(i){const n=i.harness?.trim().toLowerCase();return{hue:n?T[n]:void 0,tone:L[M(i.state??null)]}}export{D as S,F as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./index-
|
|
1
|
+
import{j as n}from"./index-CZ-05hKz.js";import{t as r,a as e}from"./status-tone-BM_zuRy1.js";function f({tone:s,children:t,variant:o="chip",className:i,title:a}){const l=o==="pill"?"s-pill":"sys-chip",p=o==="pill"?`s-pill-${r(s)}`:`sys-chip-${e(s)}`,c=i?`${l} ${p} ${i}`:`${l} ${p}`;return n.jsx("span",{className:c,title:a,children:t})}export{f as S};
|