@openscout/scout 0.2.105 → 0.2.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/chat.mjs +23 -1
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
- package/dist/client/assets/{AddProjectForm-CHNJ4NnS.js → AddProjectForm-CusDRiVO.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-B4mEvXeD.js → AdventureEvidence-CyegKk1V.js} +1 -1
- package/dist/client/assets/{AdventureReader-ZsBDQITY.js → AdventureReader-X-hbTOi0.js} +1 -1
- package/dist/client/assets/{AdventureScenery-DSxDlqG1.js → AdventureScenery-LPXSVP67.js} +1 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
- package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
- package/dist/client/assets/{AgentDetailCard-MIEBKw_S.js → AgentDetailCard-DtHT3sCo.js} +1 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BTqwmK5G.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C4rKLLdT.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-fGC-ZrJS.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BTF4_th9.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-DgSeA_vS.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-CcS23wij.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
- package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-6Kfr1uOT.js → AgentLiveActions-CfTupTEl.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
- package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
- package/dist/client/assets/{AstronautSuit-D67fIBdR.js → AstronautSuit-Cchnc4Ug.js} +1 -1
- package/dist/client/assets/{AtopView-Ck30FbzG.js → AtopView-gkEp4y__.js} +1 -1
- package/dist/client/assets/{BackToPicker-CkBhGRlD.js → BackToPicker-CUkjnoVk.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
- package/dist/client/assets/{BriefingsScreen-DTxYMr3a.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-crirZCdo.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
- package/dist/client/assets/{Canvas-CRP0KjKb.js → Canvas-X9pVSkw3.js} +1 -1
- package/dist/client/assets/{CastPicker-ZPomvOf-.js → CastPicker-BXUtPAGC.js} +1 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
- package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
- package/dist/client/assets/{CharacterFamilyPreview-ckVkecDO.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
- package/dist/client/assets/{ChatAvatar-DKBsbOqk.js → ChatAvatar-C3a_o5Hj.js} +1 -1
- package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-Co0NmqOO.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
- package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
- package/dist/client/assets/{CodeDiffPane-D-iv28LJ.js → CodeDiffPane-DuQRwpgK.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-CZ3gDdiT.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
- package/dist/client/assets/{CodeScreen-CSC-zbP9.js → CodeScreen-BXyKeL5T.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DdNAwjGW.js → CommsCanvas-THp0r_U8.js} +1 -1
- package/dist/client/assets/{CommsDeck-mGWY7Ivi.js → CommsDeck-BVmSMV2V.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-voDD9M5R.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-C33sgD48.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
- package/dist/client/assets/{CommsSelection-BL8aYD7z.js → CommsSelection-BUoRbu9o.js} +1 -1
- package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
- package/dist/client/assets/{ConversationPanels-6pprBpmq.js → ConversationPanels-D9oC0xG5.js} +2 -2
- package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
- package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
- package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
- package/dist/client/assets/{CrewSprite-Dp9KBBGY.js → CrewSprite-Dhryjx2c.js} +1 -1
- package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
- package/dist/client/assets/{DataTable-av71ehJV.js → DataTable-aH-jCyDq.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CcYGUB10.js → DispatchAftermath-66uQAorV.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DlMiEALb.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-CTkO_tQR.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
- package/dist/client/assets/{EmptyState-CYUwYyAW.js → EmptyState-CZlrHXy-.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Cxhixtks.js → FileViewerPane-BAO6mtjD.js} +1 -1
- package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
- package/dist/client/assets/{FloorContextSheet-Vj_wVZq1.js → FloorContextSheet-2_NVPQor.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-CjHSDXad.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BG4ebnX5.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
- package/dist/client/assets/{FloorReplay-BoYaGY9t.js → FloorReplay-VFzA6Kxc.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
- package/dist/client/assets/{FloorSavedWork-jbtRs-YE.js → FloorSavedWork-BeHDejWz.js} +1 -1
- package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
- package/dist/client/assets/{FollowScreen-CupyOgt4.js → FollowScreen-CFfkIbc6.js} +1 -1
- package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
- package/dist/client/assets/{HerdrSession-Dcm3vf9U.js → HerdrSession-_t7yM8vX.js} +2 -2
- package/dist/client/assets/{HomeHero-pIZtE1cC.js → HomeHero-DouPyNmz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-Dv5meXo2.js → HostAdvisorView-CnM1i8hW.js} +1 -1
- package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
- package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
- package/dist/client/assets/{JumpPalette-BmiSOEmp.js → JumpPalette-O1aJE9gR.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-B8yiM524.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-D2cnTeUd.js → LaneToolHoverCard-CJa110yk.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-BLhVHwff.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
- package/dist/client/assets/{MeshCanvas-BR25OBTJ.js → MeshCanvas-DWZHYh1A.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-ClVolr4-.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BT3ke2D1.js → MeshTopologyView-BVvtqI8q.js} +2 -2
- package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
- package/dist/client/assets/{MissionContextRail-CafjuseK.js → MissionContextRail-D62-Wis8.js} +1 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-nhy3hkxQ.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
- package/dist/client/assets/{MissionLogPane-DiUf3vWW.js → MissionLogPane-B19lYSY9.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
- package/dist/client/assets/{NewAgentModal-BQ2wQ5gp.js → NewAgentModal-Bh-L-emz.js} +1 -1
- package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
- package/dist/client/assets/{NewChatOrigin-C8ROO4ps.js → NewChatOrigin-DFbF_XvR.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BNTqYC7m.js → NodeDetailPanel-CElOEpCh.js} +1 -1
- package/dist/client/assets/{NodeMenu-CcOeFRCB.js → NodeMenu-B-jjHf1c.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-CC5mnngm.js → ObserveTextFlow-PFnG_10h.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DF6tRZL_.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C8z22pJ2.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
- package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
- package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
- package/dist/client/assets/Provider-C35yu29I.js +5 -0
- package/dist/client/assets/{RailRow-DUPqXMZh.js → RailRow-BjmWK420.js} +1 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
- package/dist/client/assets/{RenderedWorkerSprite-C8fxndAh.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
- package/dist/client/assets/{ReplayClock-DUVJjrIu.js → ReplayClock-348f17bW.js} +1 -1
- package/dist/client/assets/{ReplayLog-Bek1Vc4W.js → ReplayLog-CBnAM3ui.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-DlRg3172.js → ReplayOutpost-DyRPfNFx.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-CVUMnt6A.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-D9-s5PyB.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-D7FN-oyY.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
- package/dist/client/assets/{ReposScreen-BQ7HO1om.js → ReposScreen-uMCpt0e9.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-CJMWlvV-.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
- package/dist/client/assets/{SageModelStudio-B526NSnw.js → SageModelStudio-CNDhZhgD.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-ChkvGyEW.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
- package/dist/client/assets/{ScoutSurface-6g1f5chk.js → ScoutSurface-3_25USO_.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-BuwBdnPf.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Bs-_VwTC.js → SecondaryNav-D7dbV2qo.js} +1 -1
- package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
- package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
- package/dist/client/assets/{SessionEmbedScreen-C2wf35-P.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
- package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
- package/dist/client/assets/{SessionObserve-B64YsYhy.js → SessionObserve-DXxBvejJ.js} +9 -9
- package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
- package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-V04kD5T9.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
- package/dist/client/assets/{ShikiPane-XwFI-pCp.js → ShikiPane-CRtTYkMj.js} +1 -1
- package/dist/client/assets/{SlidePanel-BMpkXai_.js → SlidePanel-_CHAQdOa.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
- package/dist/client/assets/{SpriteAvatar-aHeF4ZQZ.js → SpriteAvatar-CpZWf54-.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DI5N3gOj.js → SproutActionSprite-BSiTS4en.js} +1 -1
- package/dist/client/assets/{StatusPill-Dw4LP7wu.js → StatusPill-2gCP6H7A.js} +1 -1
- package/dist/client/assets/{TailView-BofjmUMJ.js → TailView-CYSijNTy.js} +2 -2
- package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-CwbQhXcI.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
- package/dist/client/assets/{TerminalRelay--qOBwnbR.js → TerminalRelay-DrikpUSJ.js} +3 -3
- package/dist/client/assets/{TextDocumentSurface-BK6Qy41F.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
- package/dist/client/assets/{TmuxPeek-DpUT9Tpc.js → TmuxPeek-CXFeweMg.js} +1 -1
- package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
- package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
- package/dist/client/assets/{VoicePermissionsPanel-D35fOnQj.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
- package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
- package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
- package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
- package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
- package/dist/client/assets/{WorkFilesViewer-t8AEyx3Q.js → WorkFilesViewer-vNt01sDd.js} +1 -1
- package/dist/client/assets/{WorkRunView-_mhG_FR2.js → WorkRunView-BDkR7Edq.js} +1 -1
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
- package/dist/client/assets/{WorldCharacter-BRrj3MQN.js → WorldCharacter-CIIlutQq.js} +1 -1
- package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
- package/dist/client/assets/{WorldSky-D-RJzSa6.js → WorldSky-Jm2Z6dfW.js} +1 -1
- package/dist/client/assets/{activity-BJqFrZyB.js → activity-CIlFrfPJ.js} +1 -1
- package/dist/client/assets/{addon-fit-CHohcvS3.js → addon-fit-dFpj9Kfq.js} +1 -1
- package/dist/client/assets/{addon-webgl-CaRy2x2b.js → addon-webgl-BFCGRtGh.js} +1 -1
- package/dist/client/assets/{agent-essentials-bKWYOZaH.js → agent-essentials-BGGvT5G6.js} +1 -1
- package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
- package/dist/client/assets/{agent-specialization-BplZUa_0.js → agent-specialization-DDc7mLCW.js} +1 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
- package/dist/client/assets/{arc.es-CubLvQ4W.js → arc.es-C1SQHJ3k.js} +1 -1
- package/dist/client/assets/{arrow-left-DFfKAq0d.js → arrow-left-MVUKauwQ.js} +1 -1
- package/dist/client/assets/{arrow-right-DmAWnyAH.js → arrow-right-Bp-FpE5V.js} +1 -1
- package/dist/client/assets/{arrow-up-right-B0aLKiyF.js → arrow-up-right-BPedAgxO.js} +1 -1
- package/dist/client/assets/{book-open-BL9qvhEI.js → book-open-CV98WMSp.js} +1 -1
- package/dist/client/assets/{bot-BhAVbcCA.js → bot-B4zLQ4IN.js} +1 -1
- package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
- package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
- package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
- package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
- package/dist/client/assets/{check-g7D7-c1J.js → check-lrJ3a73a.js} +1 -1
- package/dist/client/assets/{chevron-down-CDzRQQGl.js → chevron-down-l1mrh5S9.js} +1 -1
- package/dist/client/assets/{chevron-right-DKGTLiqc.js → chevron-right-DrfqcerI.js} +1 -1
- package/dist/client/assets/{chevron-up-DX7R6KY2.js → chevron-up-CETZJzjV.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-Dvk_QpRq.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
- package/dist/client/assets/{clock-CQb4FeMf.js → clock-BV1aqPkK.js} +1 -1
- package/dist/client/assets/{code-xml-Cmadr3pQ.js → code-xml-BhcNbLWU.js} +1 -1
- package/dist/client/assets/{coffee-ljG1_krY.js → coffee-D7EAOdCk.js} +1 -1
- package/dist/client/assets/{compass-CvzkzkIh.js → compass-63TUaz5_.js} +1 -1
- package/dist/client/assets/content-B1lgE8qr.js +1 -0
- package/dist/client/assets/content-B5l11YyQ.js +1 -0
- package/dist/client/assets/content-BNZOZEpX.js +1 -0
- package/dist/client/assets/content-BRIxP155.js +1 -0
- package/dist/client/assets/content-BWd8gt8L.js +1 -0
- package/dist/client/assets/content-BfwS2jAK.js +1 -0
- package/dist/client/assets/content-C4p43_eT.js +1 -0
- package/dist/client/assets/content-CdYfaoDV.js +1 -0
- package/dist/client/assets/content-CzldLxw0.js +1 -0
- package/dist/client/assets/content-D-olnc4U.js +1 -0
- package/dist/client/assets/content-DTioimq4.js +1 -0
- package/dist/client/assets/content-LOebm3_d.js +1 -0
- package/dist/client/assets/{content-CKJ9zb7Z.js → content-nGlEZhUI.js} +1 -1
- package/dist/client/assets/{content-D1Ze_FG9.js → content-oyzDM-LK.js} +1 -1
- package/dist/client/assets/content-x1PHxED7.js +1 -0
- package/dist/client/assets/content-zX3ZY3T9.js +1 -0
- package/dist/client/assets/{conversation-icons-CIRaxmid.js → conversation-icons-Tqba2d56.js} +1 -1
- package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
- package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
- package/dist/client/assets/{copy-BGOC1tJB.js → copy-xKeM5ZtU.js} +1 -1
- package/dist/client/assets/{cpu-Q6nrHFTN.js → cpu-BOTa_WLr.js} +1 -1
- package/dist/client/assets/{createLucideIcon-ChvMq-zl.js → createLucideIcon-zZ8Hx7er.js} +1 -1
- package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
- package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
- package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
- package/dist/client/assets/discover-DJFxyV1k.js +2 -0
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
- package/dist/client/assets/{external-link-BVccgH0n.js → external-link-CUObqmgX.js} +1 -1
- package/dist/client/assets/{eye-CsGfEVR6.js → eye-LrO-cXQt.js} +1 -1
- package/dist/client/assets/{file-code-corner-Be6da5l3.js → file-code-corner-CsU7jJpu.js} +1 -1
- package/dist/client/assets/{file-text-DP6txVW-.js → file-text-CnISiiw6.js} +1 -1
- package/dist/client/assets/{flag-DAFE2wZ5.js → flag-C4wl8z2-.js} +1 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
- package/dist/client/assets/{folder-B_S7gBVr.js → folder-D5prSkzz.js} +1 -1
- package/dist/client/assets/{gauge-DQCGlE3o.js → gauge-D9_5iJEm.js} +1 -1
- package/dist/client/assets/{gestures-CofqY4Km.js → gestures-QZub3Ot9.js} +1 -1
- package/dist/client/assets/{git-branch-DcUCsWdJ.js → git-branch-B0_fPLO7.js} +1 -1
- package/dist/client/assets/{go-shortcuts-KQy-ZOpV.js → go-shortcuts-DicR7sUf.js} +1 -1
- package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
- package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
- package/dist/client/assets/{home-now-card-nano-CvU8B61b.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
- package/dist/client/assets/index-724SdE6r.js +1 -0
- package/dist/client/assets/{index-kkXUq-zf.js → index-CHD0qcfL.js} +1 -1
- package/dist/client/assets/index-CN4rBB_s.css +1 -0
- package/dist/client/assets/index-D1d98iYf.js +1 -0
- package/dist/client/assets/{index-DReVb7jZ.js → index-EsrkGBcv.js} +8 -8
- package/dist/client/assets/index-gGHPA-By.js +1 -0
- package/dist/client/assets/{inspector-panel-CLU7wjnT.js → inspector-panel-BkgUDn6G.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CJXPaHXj.js → keyboard-nav-DDHegDbx.js} +1 -1
- package/dist/client/assets/{lane-roster-store-Ch9t6lb0.js → lane-roster-store-D-RSWjb-.js} +1 -1
- package/dist/client/assets/{layers-BOwyWodP.js → layers-C8PDiMul.js} +1 -1
- package/dist/client/assets/{layout-grid-B36Qsh0y.js → layout-grid-Cor2frzj.js} +1 -1
- package/dist/client/assets/left-Bn5X7x2o.js +2 -0
- package/dist/client/assets/left-BqS0fYX1.js +1 -0
- package/dist/client/assets/left-CTCeeeD3.js +1 -0
- package/dist/client/assets/left-DhtVPVux.js +1 -0
- package/dist/client/assets/left-K39b-Wvx.js +2 -0
- package/dist/client/assets/left-KGmueNPt.js +1 -0
- package/dist/client/assets/left-P_GOYB-s.js +1 -0
- package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
- package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
- package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
- package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
- package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
- package/dist/client/assets/library-CkWNPHRp.js +1 -0
- package/dist/client/assets/{loader-circle-DNUsuPWz.js → loader-circle-OvccU82H.js} +1 -1
- package/dist/client/assets/{local-agents-I40PawYA.js → local-agents-BqnoxJrq.js} +1 -1
- package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
- package/dist/client/assets/{machine-children-CdhNzDF0.js → machine-children-DxcqCLmd.js} +1 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
- package/dist/client/assets/{mentions-Ck_Vjnyp.js → mentions-ByUvhS-v.js} +1 -1
- package/dist/client/assets/{mesh-ops-DSlvHp-D.js → mesh-ops-CiZ8xSAx.js} +1 -1
- package/dist/client/assets/{mesh-view-store-C1-mdP3P.js → mesh-view-store-DZvJC4KU.js} +1 -1
- package/dist/client/assets/{message-circle-cI5_A5mj.js → message-circle-CxRVKNE-.js} +1 -1
- package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
- package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
- package/dist/client/assets/{message-square-CJW4WRlo.js → message-square-BxesYglW.js} +1 -1
- package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
- package/dist/client/assets/{mission-control-store-p_cboAm4.js → mission-control-store-elEEsIvb.js} +1 -1
- package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
- package/dist/client/assets/{monitor-C7_cHlkC.js → monitor-DTTYEb73.js} +1 -1
- package/dist/client/assets/{nav-destinations-CU_euC-Q.js → nav-destinations-uorRqFxf.js} +1 -1
- package/dist/client/assets/{observe-CtS0l3zu.js → observe-BJqERJVj.js} +1 -1
- package/dist/client/assets/{page-status-DwFR4wSw.js → page-status-BswZLqvA.js} +1 -1
- package/dist/client/assets/{panel-right-qP17MwMl.js → panel-right-Bv7sP_fc.js} +1 -1
- package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
- package/dist/client/assets/{pause-B_hliKuR.js → pause-C2XTlkjs.js} +1 -1
- package/dist/client/assets/{persistent-state-BUsTTZFE.js → persistent-state-KRk_yb0q.js} +1 -1
- package/dist/client/assets/{pin-Oi4qHR6M.js → pin-C2mFOV1l.js} +1 -1
- package/dist/client/assets/{play-CVeRmqLH.js → play-FT6K3It1.js} +1 -1
- package/dist/client/assets/{plus-D5NLH_fM.js → plus-DFDDeGKu.js} +1 -1
- package/dist/client/assets/profile-DTmzN16I.js +1 -0
- package/dist/client/assets/{projects-inbox-CfwxCTdN.js → projects-inbox-C0FUCv_p.js} +1 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
- package/dist/client/assets/{provider-DwmCoSlc.js → provider-Dojd8quC.js} +1 -1
- package/dist/client/assets/{proxy-DgzP27W8.js → proxy-AJsmwA6h.js} +1 -1
- package/dist/client/assets/{radio-Cas2qg1D.js → radio-DRoOZsws.js} +1 -1
- package/dist/client/assets/{refresh-cw-IcD2lPoT.js → refresh-cw-BmVr7sCD.js} +1 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
- package/dist/client/assets/right-49kO-6nD.js +1 -0
- package/dist/client/assets/right-APtItA8A.js +1 -0
- package/dist/client/assets/right-BJwhPqtn.js +1 -0
- package/dist/client/assets/right-BPqrf4ek.js +1 -0
- package/dist/client/assets/right-D7djOy6K.js +1 -0
- package/dist/client/assets/right-DKOUCRob.js +1 -0
- package/dist/client/assets/right-DMNrVzg7.js +1 -0
- package/dist/client/assets/{right-cjPTwPXS.js → right-DWPVB-nK.js} +1 -1
- package/dist/client/assets/right-DppeMCy4.js +1 -0
- package/dist/client/assets/right-GAL5Mw1v.js +1 -0
- package/dist/client/assets/{rocket-DAqYvu8I.js → rocket-CGl4RTV7.js} +1 -1
- package/dist/client/assets/router-DCtl8wqb.js +1 -0
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
- package/dist/client/assets/{scope-views-Dl3ml9OZ.js → scope-views-RUWwCVAr.js} +1 -1
- package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
- package/dist/client/assets/{scoutbot-markdown-DwvGQOWo.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
- package/dist/client/assets/{scroll-text-B0tKI9Sg.js → scroll-text-DNjxhyO2.js} +1 -1
- package/dist/client/assets/{search-UsM-9-_W.js → search-DT42oyRW.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
- package/dist/client/assets/{selection-bridge-OTS2iFkt.js → selection-bridge-x3wFUjxj.js} +1 -1
- package/dist/client/assets/{send-horizontal-BlQsRK6C.js → send-horizontal-CH0-fbZE.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-C1mgqdow.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
- package/dist/client/assets/{server-DBlPW0Mp.js → server-QfsgMLk1.js} +1 -1
- package/dist/client/assets/{session-catalog-CnpZMB7C.js → session-catalog-CvSdPHPe.js} +1 -1
- package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
- package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
- package/dist/client/assets/{session-table-CGkfG5Yd.js → session-table-L-pns6Zl.js} +1 -1
- package/dist/client/assets/{sessions-view-Bge4XZ4I.js → sessions-view-Dc-QAa7O.js} +1 -1
- package/dist/client/assets/{settings-C69Zjrpq.js → settings-BVh7kldq.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-6bzeod7c.js → sliders-horizontal-782VC_yy.js} +1 -1
- package/dist/client/assets/{sparkles-Cc5lPZRv.js → sparkles-BjHq_DNK.js} +1 -1
- package/dist/client/assets/{sse-A8AyLH0g.js → sse-BCPRocpq.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
- package/dist/client/assets/{tail-events-C4WdhVeK.js → tail-events-d0yAYxR0.js} +1 -1
- package/dist/client/assets/{terminal-DMZjX1es.js → terminal-hQKQygcf.js} +1 -1
- package/dist/client/assets/{terminal-relay-mO89dX-Y.js → terminal-relay-Bxs1hp-j.js} +1 -1
- package/dist/client/assets/{terminal-takeover-CZZsnPzj.js → terminal-takeover-Ay5C2c-M.js} +1 -1
- package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
- package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
- package/dist/client/assets/{use-beside-D3cJpA5p.js → use-beside-DoRC1nt0.js} +1 -1
- package/dist/client/assets/{use-conversation-list-D5EnpVba.js → use-conversation-list-CY4JciOV.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-D_QOmjg5.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-3V3ADQ-G.js → use-mesh-node-state-BvaqtODo.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-DI9GKWlF.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-CiaZHMnk.js → use-reduced-motion-3gMYZNIp.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-CkdAHlDR.js → use-scout-dev-flags-DS_pYYQd.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-A3QGXqIy.js → useAgentHoverCard-BANmpjMh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-atkQVfGw.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DTvcwISe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
- package/dist/client/assets/{users-RLK3P5U4.js → users-BUjx36gx.js} +1 -1
- package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
- package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
- package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
- package/dist/client/assets/{wrench-B4maQJai.js → wrench-DR0i5BU7.js} +1 -1
- package/dist/client/assets/{x-rlMdRqJF.js → x-DAehov0E.js} +1 -1
- package/dist/client/assets/{xterm-B1zHHOLQ.js → xterm-BXQiLVnI.js} +1 -1
- package/dist/client/assets/{zap-B4X0OrEw.js → zap-CEjZNZbI.js} +1 -1
- package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/index.html +2 -2
- package/dist/drizzle/0020_message_reactions.sql +11 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/main.mjs +542 -150
- package/dist/node/main.mjs +131 -17
- package/dist/pairing-runtime-controller.mjs +375 -78
- package/dist/runtime/base-daemon.mjs +98 -5
- package/dist/runtime/broker-daemon.mjs +1879 -1198
- package/dist/runtime/broker-process-manager.mjs +96 -3
- package/dist/runtime/mesh-discover.mjs +96 -3
- package/dist/scout-control-plane-web.mjs +4817 -1616
- package/dist/update-helper.mjs +211 -39
- package/package.json +5 -3
- package/server.json +31 -0
- package/dist/client/assets/ActivityScreen-CcDdQTBK.js +0 -1
- package/dist/client/assets/AgentAdventures-BxrYq_2v.js +0 -1
- package/dist/client/assets/AgentAvatar-NZOqcsB2.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +0 -1
- package/dist/client/assets/AgentFloorView-A0dDRlRV.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +0 -1
- package/dist/client/assets/AgentLanesView-WZhEDBFE.js +0 -2
- package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +0 -1
- package/dist/client/assets/AgentSessions-CO1WGa8Z.js +0 -6
- package/dist/client/assets/AgentsConsole-BQOWkj35.js +0 -1
- package/dist/client/assets/AgentsScreen-BMNAj1PH.js +0 -1
- package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +0 -1
- package/dist/client/assets/BrokerScreen-CT37VQiL.js +0 -8
- package/dist/client/assets/ChannelComposer-BVItWlEz.js +0 -1
- package/dist/client/assets/ChannelSidebar-B-2spawY.js +0 -1
- package/dist/client/assets/ChatBits-CLJ71hTY.js +0 -1
- package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +0 -1
- package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +0 -1
- package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +0 -1
- package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +0 -1
- package/dist/client/assets/ConversationComposer-DNcn5U6D.js +0 -1
- package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +0 -1
- package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +0 -1
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
- package/dist/client/assets/ConversationScreen-tpj4cqWs.js +0 -2
- package/dist/client/assets/ConversationStatus-Cv-7hErW.js +0 -1
- package/dist/client/assets/CrewAvatar-zgzC3cbU.js +0 -1
- package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +0 -1
- package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +0 -1
- package/dist/client/assets/FloorTacticalHUD-BhyOqlL5.js +0 -1
- package/dist/client/assets/HarnessMark-DSvM_H7H.js +0 -1
- package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +0 -1
- package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +0 -1
- package/dist/client/assets/InviteSheet--5Zjct25.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +0 -1
- package/dist/client/assets/MeshScreen-BW1dMFWF.js +0 -1
- package/dist/client/assets/MessagesScreen-CtNMfIvC.js +0 -1
- package/dist/client/assets/MissionControlView-BjPOViGY.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +0 -1
- package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +0 -1
- package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +0 -1
- package/dist/client/assets/NewChatComposer-BEXS8vV6.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-Dh30EjAQ.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +0 -31
- package/dist/client/assets/OpsAgentsView-D3rM0udq.js +0 -1
- package/dist/client/assets/OpsScreen-DySeNQ1V.js +0 -1
- package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +0 -1
- package/dist/client/assets/ProjectsInbox-DfCXReZK.js +0 -2
- package/dist/client/assets/ProjectsRail-CELVubfJ.js +0 -1
- package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +0 -1
- package/dist/client/assets/Provider-CNZluAZb.js +0 -5
- package/dist/client/assets/RailToggle-BwmY70B8.js +0 -1
- package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +0 -9
- package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +0 -2
- package/dist/client/assets/SessionObserveEvidence-CS1aQBpQ.js +0 -1
- package/dist/client/assets/SessionRefScreen-DURV0MpF.js +0 -1
- package/dist/client/assets/SessionsScreen-D71ZR-8t.js +0 -1
- package/dist/client/assets/SettingsDrawer-Nz98oBVl.js +0 -3
- package/dist/client/assets/SettingsScreen-CYBHal6y.js +0 -1
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
- package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +0 -2
- package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +0 -1
- package/dist/client/assets/Terminal-jIqnIZZ6.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +0 -1
- package/dist/client/assets/WorkDetailScreen-Bcf_yHhU.js +0 -5
- package/dist/client/assets/WorldActorTalk-CKerDikx.js +0 -1
- package/dist/client/assets/WorldMinimap-DOptgrc4.js +0 -1
- package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
- package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +0 -2
- package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
- package/dist/client/assets/at-sign-DM7xeppo.js +0 -1
- package/dist/client/assets/chat-api-BPVC0asu.js +0 -1
- package/dist/client/assets/chat-space-model-B6Jg2CY4.js +0 -4
- package/dist/client/assets/content-0AXa0klu.js +0 -1
- package/dist/client/assets/content-BEyJ19Lx.js +0 -1
- package/dist/client/assets/content-BN5weWKW.js +0 -1
- package/dist/client/assets/content-BNokkm7C.js +0 -1
- package/dist/client/assets/content-BV4PUM9q.js +0 -1
- package/dist/client/assets/content-BxUPlcx5.js +0 -1
- package/dist/client/assets/content-CIC5sku8.js +0 -1
- package/dist/client/assets/content-CdkTyxqk.js +0 -1
- package/dist/client/assets/content-CnhhSCZq.js +0 -1
- package/dist/client/assets/content-DY3F9Vfr.js +0 -1
- package/dist/client/assets/content-DrKBYpcb.js +0 -1
- package/dist/client/assets/content-LSStQYj5.js +0 -1
- package/dist/client/assets/content-YvU-D0hF.js +0 -1
- package/dist/client/assets/content-oKQMyVnH.js +0 -1
- package/dist/client/assets/conversation-model-m8HhzroS.js +0 -1
- package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +0 -1
- package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
- package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
- package/dist/client/assets/discover-DlwbftpC.js +0 -2
- package/dist/client/assets/embed-entry-c0lwtjBG.js +0 -2
- package/dist/client/assets/home-moving-signal-BIHUGNfI.js +0 -1
- package/dist/client/assets/home-now-card-CaLgZze2.js +0 -1
- package/dist/client/assets/hooks-DaUOREpP.js +0 -2
- package/dist/client/assets/index-CGbs0SBm.css +0 -1
- package/dist/client/assets/index-CbqBwfIW.js +0 -1
- package/dist/client/assets/index-CyPMl7Up.js +0 -1
- package/dist/client/assets/index-PQpJveGO.js +0 -1
- package/dist/client/assets/left-0vBrvrBG.js +0 -2
- package/dist/client/assets/left-C6SyaqlJ.js +0 -1
- package/dist/client/assets/left-CTuXysZR.js +0 -2
- package/dist/client/assets/left-Cc6s4DT2.js +0 -1
- package/dist/client/assets/left-DF5caiyh.js +0 -1
- package/dist/client/assets/left-DgT4tWCx.js +0 -1
- package/dist/client/assets/left-R0wppTTr.js +0 -1
- package/dist/client/assets/left-advisor-C-kt8V28.js +0 -1
- package/dist/client/assets/left-agents-thnBO156.js +0 -1
- package/dist/client/assets/left-default-CT42fnpF.js +0 -1
- package/dist/client/assets/left-lanes-CSmZgciK.js +0 -1
- package/dist/client/assets/left-mission-C86x6i9h.js +0 -1
- package/dist/client/assets/library-DdhYL_9v.js +0 -1
- package/dist/client/assets/message-markup-6Tgo4qFJ.js +0 -15
- package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
- package/dist/client/assets/profile-BegEUmB7.js +0 -1
- package/dist/client/assets/projects-inbox-CKPLZN8s.css +0 -1
- package/dist/client/assets/resolve-panes-pfZTezKo.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +0 -1
- package/dist/client/assets/right-BDaCJ0CF.js +0 -1
- package/dist/client/assets/right-BP6lXRFS.js +0 -1
- package/dist/client/assets/right-Cb1VCrdj.js +0 -1
- package/dist/client/assets/right-CeFaxfBo.js +0 -1
- package/dist/client/assets/right-Ck2SrYCj.js +0 -1
- package/dist/client/assets/right-D-uv5YfF.js +0 -1
- package/dist/client/assets/right-DJMSICky.js +0 -1
- package/dist/client/assets/right-Dnljs8ah.js +0 -1
- package/dist/client/assets/right-SdCSF8PP.js +0 -1
- package/dist/client/assets/router-C-MF5-mb.js +0 -1
- package/dist/client/assets/runtime-picker-C_AVYF63.js +0 -1
- package/dist/client/assets/scout-voice-CqAyfblr.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
- package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +0 -1
- package/dist/client/assets/usePersistentState-Y8XwSTg-.js +0 -1
- package/dist/drizzle/meta/0000_snapshot.json +0 -4575
- package/dist/drizzle/meta/0001_snapshot.json +0 -4624
- package/dist/drizzle/meta/0002_snapshot.json +0 -4631
- package/dist/drizzle/meta/0003_snapshot.json +0 -4952
- package/dist/drizzle/meta/0004_snapshot.json +0 -5235
- package/dist/drizzle/meta/0005_snapshot.json +0 -5599
- package/dist/drizzle/meta/0006_snapshot.json +0 -5606
- package/dist/drizzle/meta/0007_snapshot.json +0 -5767
- package/dist/drizzle/meta/0008_snapshot.json +0 -5774
- package/dist/drizzle/meta/0009_snapshot.json +0 -6262
- package/dist/drizzle/meta/0010_snapshot.json +0 -6286
- package/dist/drizzle/meta/0011_snapshot.json +0 -6337
- package/dist/drizzle/meta/0012_snapshot.json +0 -6458
- package/dist/drizzle/meta/0013_snapshot.json +0 -6465
- package/dist/drizzle/meta/0014_snapshot.json +0 -6503
- package/dist/drizzle/meta/0015_snapshot.json +0 -6596
- package/dist/drizzle/meta/0016_snapshot.json +0 -6611
- package/dist/drizzle/meta/0017_snapshot.json +0 -6785
- package/dist/drizzle/meta/0018_snapshot.json +0 -6804
- package/dist/drizzle/meta/0019_snapshot.json +0 -6804
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,r as d}from"./index-
|
|
1
|
+
import{j as r,r as d}from"./index-EsrkGBcv.js";import{s as $}from"./colors-CFlbwC25.js";import{b as M}from"./agent-state-DDhnFEEP.js";import{A as S}from"./AgentAvatar-CrP1eXxk.js";function H({name:a,meta:i,sub:o,tone:t="neutral",agent:l,avatarName:c,avatarKind:s="user",leadingIcon:n,caret:e,active:v,selected:N,unread:g,depth:k=0,detail:u,expanded:p,activityLabel:h,worktreeLabel:m,activityTone:C="working",actions:w,pinned:x,editing:f,onClick:P,onKeyDown:y,onContextMenu:b,onPointerEnter:R,onPointerLeave:E,title:B,tabIndex:D}){const z=e?e==="open":u!==void 0?!!p:void 0,A=["rr-row",k===1&&"rr-row--child",v&&"rr-row--active",N&&"rr-row--selected",g&&"rr-row--unread",p&&"rr-row--expanded",h&&"rr-row--motion",x&&"rr-row--pinned",w&&"rr-row--has-actions"].filter(Boolean).join(" ");return r.jsxs("div",{className:A,children:[r.jsxs("button",{type:"button",className:"rr-row-head",onClick:P,onKeyDown:y,onContextMenu:b,onPointerEnter:R,onPointerLeave:E,title:B,tabIndex:D,"aria-expanded":z,children:[r.jsx(F,{icon:n,tone:t,caret:e,agent:l,avatarName:c,avatarKind:s}),r.jsxs("span",{className:"rr-row-body",children:[f?r.jsx(T,{...f}):r.jsxs("span",{className:"rr-row-name",children:[x?r.jsx("span",{className:"rr-row-pin-mark","aria-label":"Pinned",title:"Pinned",children:r.jsx(K,{})}):null,a]}),o&&r.jsx("span",{className:"rr-row-sub",children:o}),m&&r.jsx("span",{className:"rr-row-worktree",children:m}),h&&r.jsxs("span",{className:`rr-row-activity rr-row-activity--${C}`,children:[r.jsxs("span",{className:"rr-row-activity-bars","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsx("span",{className:"rr-row-activity-label",children:h})]})]}),i&&r.jsx("span",{className:"rr-row-meta",children:i})]}),w?r.jsx("div",{className:"rr-row-actions",onClick:L=>L.stopPropagation(),children:w}):null,p&&u&&r.jsx("div",{className:"rr-row-detail",children:u})]})}function T({value:a,onCommit:i,onCancel:o}){const t=d.useRef(null),[l,c]=d.useState(a),s=d.useRef(!1);d.useEffect(()=>{const e=t.current;e&&(e.focus(),e.select())},[]);const n=e=>{s.current||(s.current=!0,e?i(l):o())};return r.jsx("input",{ref:t,className:"rr-row-name rr-row-name-field",value:l,spellCheck:!1,"aria-label":"Conversation name",onChange:e=>c(e.target.value),onKeyDown:e=>{e.stopPropagation(),e.key==="Enter"?(e.preventDefault(),n(!0)):e.key==="Escape"&&(e.preventDefault(),n(!1))},onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>e.stopPropagation(),onBlur:()=>n(!0)})}function F({icon:a,tone:i,caret:o,agent:t,avatarName:l,avatarKind:c}){if(o)return r.jsx("span",{className:`rr-row-caret rr-row-caret--leading rr-row-caret--${o}`,"aria-hidden":!0,children:r.jsx(G,{open:o==="open"})});if(l||t){if(c==="channel")return r.jsx("span",{className:"rr-row-hash","aria-hidden":!0,children:"#"});const n=j(i),e=n==="active"||n==="available"||n==="working"||n==="in_turn";return r.jsx("span",{className:"rr-row-avatar-wrap","aria-hidden":!0,children:r.jsx(S,{agent:t,name:l??t?.name,placement:"row",size:20,tile:!0,presence:e})})}if(a)return r.jsx("span",{className:"rr-row-icon","aria-hidden":!0,children:a});const s=j(i);return r.jsx("span",{className:`rr-row-dot rr-row-dot--${s}`,style:s==="active"||s==="available"?{background:$(s)}:void 0,"aria-hidden":!0})}function G({open:a}){return r.jsx("svg",{className:`rr-chevron${a?" rr-chevron--open":""}`,viewBox:"0 0 12 12",width:"12",height:"12",fill:"none","aria-hidden":!0,children:r.jsx("path",{d:"M4.25 3L7.75 6L4.25 9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function j(a){return a==="channel"||a==="dm"||a==="neutral"?a:M(a)}function K(){return r.jsx("svg",{width:"9",height:"9",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":!0,children:r.jsx("path",{d:"M9.8 1.6 14.4 6.2a1 1 0 0 1-.2 1.6l-2.7 1.1-.9 3.4a.7.7 0 0 1-1.2.3L6.3 9.5 2.8 13 1.7 11.9l3.5-3.5L2.1 5.3a.7.7 0 0 1 .3-1.2l3.4-.9 1.1-2.7a1 1 0 0 1 1.6-.2Z"})})}export{H as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,j as o}from"./index-EsrkGBcv.js";/* empty css */import{D as Z}from"./DataTable-aH-jCyDq.js";import{u as ee,a as te}from"./Provider-C35yu29I.js";import{w as se,p as $,r as R,g as ne,t as oe,s as ae}from"./SessionHopMenu-E6VJZrE0.js";import{p as _,a as P}from"./api-DSqpVKC7.js";import{t as re,n as z,f as ie}from"./time-Dhsh_2EG.js";import{u as le}from"./tail-events-d0yAYxR0.js";import{o as B}from"./openContent-C6XO6kr5.js";/* empty css */import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./external-link-CUObqmgX.js";const ce=1e4,pe=500,H=1e3,ue=6e4,F="/api/tail/discover",O=`/api/tail/recent?limit=${pe}`,V=3e4,me=[{key:"status",label:"status",cls:"s-atop-col-status",kind:"text",sortable:!1,defaultWidth:96,minWidth:70,render:e=>o.jsxs("span",{className:`s-atop-status s-atop-status--${e.status}`,children:[o.jsx("span",{className:"s-atop-status-dot","aria-hidden":"true"}),e.statusLabel]})},{key:"session",label:"session",cls:"s-atop-col-agent",kind:"text",sortable:!1,defaultWidth:168,minWidth:110,maxWidth:280,render:e=>o.jsxs("div",{className:"s-atop-agent-cell",title:e.sessionId??e.refId,children:[o.jsx("span",{className:`s-atop-chip s-atop-chip--harness s-atop-chip--harness-${fe(e.source)}`,children:e.source}),o.jsx("span",{className:"s-atop-agent-id",children:e.refId.slice(0,8)})]})},{key:"project",label:"project",cls:"s-atop-col-project",kind:"text",sortable:!1,defaultWidth:200,minWidth:96,maxWidth:360,render:e=>o.jsx("span",{title:e.cwd??e.project,children:e.project})},{key:"updated",label:"updated",cls:"s-atop-col-last",kind:"time",sortable:!1,defaultWidth:86,minWidth:64,render:e=>o.jsx("span",{title:ie(e.mtimeMs),children:re(Math.max(z(e.mtimeMs)??0,z(e.lastEvent?.ts)??0))||"-"})},{key:"size",label:"size",cls:"s-atop-col-runtime",kind:"number",sortable:!1,defaultWidth:80,minWidth:64,render:e=>he(e.size)},{key:"path",label:"path",kind:"text",sortable:!1,defaultWidth:360,minWidth:160,maxWidth:800,render:e=>o.jsx("span",{title:e.transcriptPath,children:e.cwd??e.transcriptPath})}];function K(e){const r=e?.trim();if(!r)return null;const i=Y(r);return i.endsWith(".jsonl")?i.slice(0,-6):i}function Y(e){const r=e.replace(/[\\/]+$/,"");return r.split(/[\\/]/).filter(Boolean).at(-1)??r}function de(e){const i=e.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return i.pop(),i.at(-1)??""}function fe(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function he(e){if(!Number.isFinite(e)||e<0)return"-";if(e<1024)return`${e} B`;const r=e/1024;if(r<1024)return`${r.toFixed(r>=10?0:1)} KiB`;const i=r/1024;return`${i.toFixed(i>=10?0:1)} MiB`}function xe(e,r){return r?[e.refId,e.sessionId??"",e.source,e.project,e.cwd??"",e.transcriptPath,e.lastEvent?.summary??"",e.process?.command??""].join(" ").toLowerCase().includes(r.toLowerCase()):!0}function U(e){return`${e.source}\0${e.cwd??""}`}function ke(e){return`${e.source}\0${e.cwd??""}`}function je(e,r,i){if(!e?.transcripts?.length)return[];const h=new Map;for(const n of r){const l=h.get(n.sessionId);(!l||n.ts>l.ts)&&h.set(n.sessionId,n)}const x=new Map;for(const n of e.processes){if(!n.cwd)continue;const l=x.get(U(n));(!l||n.pid<l.pid)&&x.set(U(n),n)}return e.transcripts.map(n=>{const l=K(n.sessionId)??K(n.transcriptPath);if(!l)return null;const d=n.sessionId?h.get(n.sessionId)??null:null,y=x.get(ke(n))??null,S=Math.max(n.mtimeMs,d?.ts??0),f=!!y||i-S<=ue,I=n.project?.trim()||(n.cwd?Y(n.cwd):de(n.transcriptPath))||"unknown";return{refId:l,source:n.source||"unknown",project:I,cwd:n.cwd,transcriptPath:n.transcriptPath,sessionId:n.sessionId,mtimeMs:n.mtimeMs,size:n.size,status:f?"run":"idle",statusLabel:f?"active":"idle",lastEvent:d,process:y}}).filter(n=>n!==null).sort((n,l)=>{const d=Math.max(n.mtimeMs,n.lastEvent?.ts??0);return Math.max(l.mtimeMs,l.lastEvent?.ts??0)-d||n.project.localeCompare(l.project)})}function jt({navigate:e}){const{route:r}=ee(),i=te(),[h]=a.useState(()=>_(F,V)),[x,n]=a.useState(h),[l,d]=a.useState(()=>_(O,V)?.events??[]),[y,S]=a.useState(h===null),[f,I]=a.useState(""),[b,A]=a.useState("all"),[k,E]=a.useState(0),[T,W]=a.useState(null),[D,G]=a.useState(Date.now()),M=a.useRef(null),C=a.useCallback(async()=>{W(null);try{n(await P(F))}catch(t){W(t instanceof Error?t.message:String(t))}finally{S(!1)}},[]);a.useEffect(()=>{C();const t=setInterval(()=>{C()},ce);return()=>clearInterval(t)},[C]),a.useEffect(()=>{let t=!1;return(async()=>{try{const s=await P(O);t||d(s.events??[])}catch{}})(),()=>{t=!0}},[]),le(t=>{d(s=>s.length>=H?[...s.slice(s.length-H+1),t]:[...s,t])}),a.useEffect(()=>{const t=setInterval(()=>G(Date.now()),15e3);return()=>clearInterval(t)},[]);const j=a.useMemo(()=>je(x,l,D),[x,l,D]),Q=a.useMemo(()=>[...new Set(j.map(t=>t.source))].sort(),[j]),c=a.useMemo(()=>j.filter(t=>(b==="all"||t.source===b)&&xe(t,f.trim())),[j,b,f]);a.useEffect(()=>{k>=c.length&&E(Math.max(0,c.length-1))},[c.length,k]);const g=a.useCallback(t=>{t&&B(e,{view:"sessions",sessionId:t.refId},{returnTo:r})},[e,r]);a.useEffect(()=>{se()},[]);const N=a.useCallback(t=>({sessionRefs:[t.sessionId,t.refId,t.transcriptPath]}),[]),L=a.useCallback(t=>{if(!t)return;const s=u=>{const m=oe(u,null);m&&B(e,m,{returnTo:r})},p=$();if(p){s(R(p,N(t)));return}ne().then(u=>s(R(u,N(t)))).catch(()=>{})},[e,r,N]);a.useEffect(()=>{const t=s=>{const p=s.target,u=p instanceof HTMLInputElement||p instanceof HTMLTextAreaElement||(p?.isContentEditable??!1);if(s.key==="/"&&!u){s.preventDefault(),M.current?.focus();return}if(u){s.key==="Escape"&&p===M.current&&(I(""),M.current?.blur());return}if(s.key==="ArrowDown"||s.key==="j"){s.preventDefault(),E(m=>c.length===0?0:Math.min(c.length-1,m+1));return}if(s.key==="ArrowUp"||s.key==="k"){s.preventDefault(),E(m=>Math.max(0,m-1));return}if(s.key==="t"){s.preventDefault(),L(c[k]);return}(s.key==="Enter"||s.key==="o")&&(s.preventDefault(),g(c[k]))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[c,k,g,L]);const X=T?[]:c,v=a.useCallback(t=>`${t.source}:${t.transcriptPath}`,[]),w=a.useMemo(()=>new Map(c.map((t,s)=>[v(t),s])),[c,v]),q=(t,s)=>{const p=w.get(s),u=p!=null?c[p]:void 0;if(!u)return;const m=$(),J=m?R(m,N(u)):null;i(t,[{kind:"action",label:"Open session",onSelect:()=>g(u)},{kind:"separator"},...ae({target:J,navigate:e,returnTo:r})])};return o.jsxs("div",{className:"s-atop s-atop--sessions",children:[o.jsxs("div",{className:"s-atop-fbar",children:[o.jsxs("label",{className:"s-atop-search",children:[o.jsx("span",{className:"s-atop-search-prompt",children:"/"}),o.jsx("input",{ref:M,className:"s-atop-search-input",placeholder:"filter sessions",value:f,onChange:t=>I(t.target.value)}),o.jsx("kbd",{className:"s-atop-search-kbd",children:"/"})]}),o.jsx("span",{className:"s-atop-fbar-label",children:"source"}),o.jsxs("button",{type:"button",className:`s-atop-pill${b==="all"?" s-atop-pill--on":""}`,onClick:()=>A("all"),children:["all",o.jsx("span",{className:"s-atop-pill-ct",children:j.length})]}),Q.map(t=>o.jsxs("button",{type:"button",className:`s-atop-pill${b===t?" s-atop-pill--on":""}`,onClick:()=>A(t),children:[t,o.jsx("span",{className:"s-atop-pill-ct",children:j.filter(s=>s.source===t).length})]},t)),o.jsx("div",{className:"s-atop-fbar-spacer"})]}),o.jsx(Z,{rows:X,columns:me,rowId:v,storageKey:"openscout.sessions.cols",rowBindings:t=>({onMouseEnter:()=>{const s=w.get(t);s!=null&&E(s)},onFocus:()=>{const s=w.get(t);s!=null&&E(s)},onContextMenu:s=>q(s,t)}),onRowClick:t=>g(t),rowClassName:t=>w.get(v(t))===k?"s-atop-row--selected":void 0,empty:T?{title:"Discovery failed",body:T}:{title:"No raw sessions",body:f?"No sessions match the current filter.":"No transcript sessions were discovered."},loading:y,density:"compact",className:"s-atop-data-table",ariaLabel:"Raw sessions"}),o.jsxs("div",{className:"s-atop-keys",children:[o.jsxs("span",{children:[o.jsx("kbd",{children:"/"}),"filter"]}),o.jsxs("span",{children:[o.jsx("kbd",{children:"j/k"}),"select"]}),o.jsxs("span",{children:[o.jsx("kbd",{children:"enter"}),"open"]}),o.jsxs("span",{children:[o.jsx("kbd",{children:"t"}),"terminal"]}),o.jsx("span",{className:"s-atop-keys-spacer"}),o.jsxs("span",{className:"s-atop-keys-count",children:[o.jsx("strong",{children:c.length})," sessions"]})]})]})}export{jt as RawSessionsTable};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{r as d,j as n}from"./index-EsrkGBcv.js";import{a as Yo}from"./provider-Dojd8quC.js";import{u as zs,E as Gn,F as qo,B as bs,a as Yn,G as lt,H as Fs,I as $s,J as qn,K as Xn,L as Ws}from"./Provider-C35yu29I.js";import{H as Jn,A as Kn,S as Qn,o as Zn,a as ei,V as ti,b as si,c as oi}from"./direct-voice-BbLPuJ04.js";import{r as ni,a as be}from"./api-DSqpVKC7.js";import{c as Ut}from"./clipboard-e3fSpeo7.js";import{e as ii}from"./credentials-OeoF-VKJ.js";import{b as Hs,u as ri,a as ut}from"./persistent-state-KRk_yb0q.js";import{s as Oe,e as ai,S as Gs}from"./scoutbot-Bk3nyrkj.js";import{p as ci,j as li,n as ui,q as di,g as hi,s as mi,t as pi,k as Qt,e as fi,b as vi,u as gi,m as xi}from"./scout-voice-CZx60X6E.js";import{d as yi,f as Ys,n as vt}from"./time-Dhsh_2EG.js";import{S as Xo}from"./scoutbot-markdown-BKEBSbG0.js";import{L as Ne}from"./loader-circle-OvccU82H.js";import{P as Jo}from"./plus-DFDDeGKu.js";import{C as ds}from"./chevron-down-l1mrh5S9.js";import{C as bi}from"./chevron-up-CETZJzjV.js";import{c as qt}from"./createLucideIcon-zZ8Hx7er.js";import{S as Ko,e as Qo}from"./runtime-picker-DXu2bOTh.js";import{S as Si}from"./send-horizontal-CH0-fbZE.js";import{C as wi}from"./copy-xKeM5ZtU.js";import{localLiveWellSpec as ki,VoiceControlWell as Zo,gptLiveWellSpec as ji}from"./VoiceControlWell-DF3bjcYA.js";import{m as G,p as Gt,a as Ci,n as tt,i as Ei,b as en,d as tn,r as hs,t as sn,f as se,e as gt,S as Pi,g as he,h as on,j as Zt,k as nn,o as J,q as Ze,s as es,v as qs,M as Ti,w as rn,P as an,x as Ni,y as cn,z as Xs,A as Li,B as dt,C as Di,c as Ri,u as ln}from"./use-reduced-motion-3gMYZNIp.js";import{i as Te,b as Ai,r as Ii,s as Js,p as ms,d as Mi,e as un,f as Vi,h as Ke,t as Qe,j as ts,k as Ks,l as Bi,m as Oi,n as _i,o as Ui,q as Ss,u as ss,v as zi,w as Fi,x as dn,y as $i,z as Wi,A as Hi,B as Gi,C as Qs,D as Yi,F as hn,g as qi,a as Xi,c as Ji}from"./gestures-QZub3Ot9.js";import{d as Ki,E as Zs,t as eo,c as Qi,e as Zi,f as er,r as tr}from"./voice-turn-ledger-BMZxlSjg.js";import{R as to}from"./rocket-CGl4RTV7.js";import{X as sr}from"./x-DAehov0E.js";import{R as or}from"./refresh-cw-BmVr7sCD.js";import{S as nr}from"./settings-BVh7kldq.js";import{V as so}from"./fx-z37u1o2z.js";import{B as ir}from"./bot-B4zLQ4IN.js";import{d as rr}from"./types-B0PlfpKc.js";import{VoiceTurnDetails as ar}from"./VoiceTurnDetails-wAByRaNB.js";import{gptStageStops as cr,localStageStops as lr,VoiceTurnStageTrack as ur,VoiceTurnHero as dr,voiceTurnQuoteWho as hr}from"./VoiceTurnStage-edoJalLV.js";import{VoiceTurnView as mr,VoiceTurnSettle as pr}from"./VoiceTurnView-D-8g5E4r.js";/* empty css */const fr=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],vr=qt("archive",fr);const gr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],xr=qt("circle-check",gr);const yr=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],mn=qt("volume-2",yr);const br=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],pn=qt("volume-x",br);function Sr(e){return e==="x"||e==="y"?Te[e]?null:(Te[e]=!0,()=>{Te[e]=!1}):Te.x||Te.y?null:(Te.x=Te.y=!0,()=>{Te.x=Te.y=!1})}function ws(e){return Ai(e)&&"ownerSVGElement"in e}const zt=new WeakMap;let Ft;const fn=(e,t,s)=>(o,r)=>r&&r[0]?r[0][e+"Size"]:ws(o)&&"getBBox"in o?o.getBBox()[t]:o[s],wr=fn("inline","width","offsetWidth"),kr=fn("block","height","offsetHeight");function jr({target:e,borderBoxSize:t}){zt.get(e)?.forEach(s=>{s(e,{get width(){return wr(e,t)},get height(){return kr(e,t)}})})}function Cr(e){e.forEach(jr)}function Er(){typeof ResizeObserver>"u"||(Ft=new ResizeObserver(Cr))}function Pr(e,t){Ft||Er();const s=Ii(e);return s.forEach(o=>{let r=zt.get(o);r||(r=new Set,zt.set(o,r)),r.add(t),Ft?.observe(o)}),()=>{s.forEach(o=>{const r=zt.get(o);r?.delete(t),r?.size||Ft?.unobserve(o)})}}const $t=new Set;let et;function Tr(){et=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};$t.forEach(t=>t(e))},window.addEventListener("resize",et)}function Nr(e){return $t.add(e),et||Tr(),()=>{$t.delete(e),!$t.size&&typeof et=="function"&&(window.removeEventListener("resize",et),et=void 0)}}function oo(e,t){return typeof e=="function"?Nr(e):Pr(e,t)}function Lr(e){return ws(e)&&e.tagName==="svg"}function ps(e,t){e.min=t.min,e.max=t.max}function ge(e,t){ps(e.x,t.x),ps(e.y,t.y)}function no(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const vn=1e-4,Dr=1-vn,Rr=1+vn,gn=.01,Ar=0-gn,Ir=0+gn;function oe(e){return e.max-e.min}function Mr(e,t,s){return Math.abs(e-t)<=s}function io(e,t,s,o=.5){e.origin=o,e.originPoint=G(t.min,t.max,e.origin),e.scale=oe(s)/oe(t),e.translate=G(s.min,s.max,e.origin)-e.originPoint,(e.scale>=Dr&&e.scale<=Rr||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ar&&e.translate<=Ir||isNaN(e.translate))&&(e.translate=0)}function pt(e,t,s,o){io(e.x,t.x,s.x,o?o.originX:void 0),io(e.y,t.y,s.y,o?o.originY:void 0)}function ro(e,t,s,o=0){const r=o?G(s.min,s.max,o):s.min;e.min=r+t.min,e.max=e.min+oe(t)}function Vr(e,t,s,o){ro(e.x,t.x,s.x,o?.x),ro(e.y,t.y,s.y,o?.y)}function ao(e,t,s,o=0){const r=o?G(s.min,s.max,o):s.min;e.min=t.min-r,e.max=e.min+oe(t)}function Yt(e,t,s,o){ao(e.x,t.x,s.x,o?.x),ao(e.y,t.y,s.y,o?.y)}function co(e,t,s,o,r){return e-=t,e=Js(e,1/s,o),r!==void 0&&(e=Js(e,1/r,o)),e}function Br(e,t=0,s=1,o=.5,r,c=e,i=e){if(Gt.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(c.min,c.max,o);e===c&&(a-=t),e.min=co(e.min,t,s,a,r),e.max=co(e.max,t,s,a,r)}function lo(e,t,[s,o,r],c,i){Br(e,t[s],t[o],t[r],t.scale,c,i)}const Or=["x","scaleX","originX"],_r=["y","scaleY","originY"];function uo(e,t,s,o){lo(e.x,t,Or,s?s.x:void 0,o?o.x:void 0),lo(e.y,t,_r,s?s.y:void 0,o?o.y:void 0)}function ho(e){return e.translate===0&&e.scale===1}function xn(e){return ho(e.x)&&ho(e.y)}function mo(e,t){return e.min===t.min&&e.max===t.max}function Ur(e,t){return mo(e.x,t.x)&&mo(e.y,t.y)}function po(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yn(e,t){return po(e.x,t.x)&&po(e.y,t.y)}function fo(e){return oe(e.x)/oe(e.y)}function vo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Se(e){return[e("x"),e("y")]}function zr(e,t,s){let o="";const r=e.x.translate/t.x,c=e.y.translate/t.y,i=s?.z||0;if((r||c||i)&&(o=`translate3d(${r}px, ${c}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:l,rotate:h,pathRotation:m,rotateX:p,rotateY:v,skewX:b,skewY:S}=s;l&&(o=`perspective(${l}px) ${o}`),h&&(o+=`rotate(${h}deg) `),m&&(o+=`rotate(${m}deg) `),p&&(o+=`rotateX(${p}deg) `),v&&(o+=`rotateY(${v}deg) `),b&&(o+=`skewX(${b}deg) `),S&&(o+=`skewY(${S}deg) `)}const a=e.x.scale*t.x,u=e.y.scale*t.y;return(a!==1||u!==1)&&(o+=`scale(${a}, ${u})`),o||"none"}const bn=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Fr=bn.length,go=e=>typeof e=="string"?parseFloat(e):e,xo=e=>typeof e=="number"||Ci.test(e);function $r(e,t,s,o,r,c){r?(e.opacity=G(0,s.opacity??1,Wr(o)),e.opacityExit=G(t.opacity??1,0,Hr(o))):c&&(e.opacity=G(t.opacity??1,s.opacity??1,o));for(let i=0;i<Fr;i++){const a=bn[i];let u=yo(t,a),l=yo(s,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||xo(u)===xo(l)?(e[a]=Math.max(G(go(u),go(l),o),0),(Gt.test(l)||Gt.test(u))&&(e[a]+="%")):e[a]=l}(t.rotate||s.rotate)&&(e.rotate=G(t.rotate||0,s.rotate||0,o))}function yo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Wr=Sn(0,.5,Mi),Hr=Sn(.5,.95,tt);function Sn(e,t,s){return o=>o<e?0:o>t?1:s(ms(e,t,o))}function Gr(e,t,s){const o=Ei(e)?e:en(e);return o.start(un("",o,t,s)),o.animation}const Yr=(e,t)=>e.depth-t.depth;class qr{constructor(){this.children=[],this.isDirty=!1}add(t){tn(this.children,t),this.isDirty=!0}remove(t){hs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Yr),this.isDirty=!1,this.children.forEach(t)}}function Xr(e,t){const s=sn.now(),o=({timestamp:r})=>{const c=r-s;c>=t&&(gt(o),e(c-t))};return se.setup(o,!0),()=>gt(o)}class Jr{constructor(){this.members=[]}add(t){tn(this.members,t);for(let s=this.members.length-1;s>=0;s--){const o=this.members[s];if(o===t||o===this.lead||o===this.prevLead)continue;const r=o.instance;(!r||r.isConnected===!1)&&!o.snapshot&&(hs(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(hs(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){for(let s=this.members.indexOf(t)-1;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1&&o.instance?.isConnected!==!1)return this.promote(o),!0}return!1}promote(t,s){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=o.options,{layoutDependency:c}=t.options;(r===void 0||r!==c)&&(t.resumeFrom=o,s&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Wt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},os=["","X","Y","Z"],Kr=1e3;let Qr=0;function ns(e,t,s,o){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function wn(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=Ui(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",se,!(r||c))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&wn(o)}function kn({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(i={},a=t?.()){this.id=Qr++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ta),this.nodes.forEach(aa),this.nodes.forEach(ca),this.nodes.forEach(sa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new qr)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Pi),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const u=this.eventHandlers.get(i);u&&u.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=ws(i)&&!Lr(i),this.instance=i;const{layoutId:a,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),e){let h,m=0;const p=()=>this.root.updateBlockedByResize=!1;se.read(()=>{m=window.innerWidth}),e(i,()=>{const v=window.innerWidth;v!==m&&(m=v,this.root.updateBlockedByResize=!0,h&&h(),h=Xr(p,250),Wt.hasAnimatedSinceResize&&(Wt.hasAnimatedSinceResize=!1,this.nodes.forEach(wo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m,hasRelativeLayoutChanged:p,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||l.getDefaultTransition()||ma,{onLayoutAnimationStart:S,onLayoutAnimationComplete:k}=l.getProps(),P=!this.targetLayout||!yn(this.targetLayout,v),j=!m&&p;if(this.options.layoutRoot||this.resumeFrom||j||m&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...Vi(b,"layout"),onPlay:S,onComplete:k};(l.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(h,j,C.path)}else m||wo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(la),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&wn(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const m=this.path[h];m.shouldResetTransform=!0,(typeof m.latestValues.x=="string"||typeof m.latestValues.y=="string")&&(m.isLayoutDirty=!0),m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(na),this.nodes.forEach(bo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(So);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ia),this.nodes.forEach(ra),this.nodes.forEach(Zr),this.nodes.forEach(ea)):this.nodes.forEach(So),this.clearAllSnapshots();const a=sn.now();he.delta=on(0,1e3/60,a-he.timestamp),he.timestamp=a,he.isProcessing=!0,Zt.update.process(he),Zt.preRender.process(he),Zt.render.process(he),he.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oa),this.sharedNodes.forEach(ua)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!oe(this.snapshot.measuredBox.x)&&!oe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=J()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const u=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:u,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!xn(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,h=l!==this.prevTransformTemplateValue;i&&this.instance&&(a||Ke(this.latestValues)||h)&&(r(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return i&&(u=this.removeTransform(u)),pa(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return J();const a=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fa))){const{scroll:l}=this.root;l&&(Qe(a.x,l.offset.x),Qe(a.y,l.offset.y))}return a}removeElementScroll(i){const a=J();if(ge(a,i),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:h,options:m}=l;l!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&ge(a,i),Qe(a.x,h.offset.x),Qe(a.y,h.offset.y))}return a}applyTransform(i,a=!1,u){const l=u||J();ge(l,i);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(Qe(l.x,-m.scroll.offset.x),Qe(l.y,-m.scroll.offset.y)),Ke(m.latestValues)&&ts(l,m.latestValues,m.layout?.layoutBox)}return Ke(this.latestValues)&&ts(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(i){const a=J();ge(a,i);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!Ke(l.latestValues))continue;let h;l.instance&&(Ks(l.latestValues)&&l.updateSnapshot(),h=J(),ge(h,l.measurePageBox())),uo(a,l.latestValues,l.snapshot?.layoutBox,h)}return Ke(this.latestValues)&&uo(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==he.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(i||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:m}=this.options;if(!this.layout||!(h||m))return;this.resolvedRelativeTargetAt=he.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Vr(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ge(this.target,this.layout.layoutBox),Bi(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ks(this.parent.latestValues)||Oi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,u){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Yt(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),ge(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const i=this.getLead(),a=!!this.resumingFrom||this!==i;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===he.timestamp&&(u=!1),u)return;const{layout:l,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||h))return;ge(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,p=this.treeScale.y;_i(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=J());const{target:v}=i;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(no(this.prevProjectionDelta.x,this.projectionDelta.x),no(this.prevProjectionDelta.y,this.projectionDelta.y)),pt(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==p||!vo(this.projectionDelta.x,this.prevProjectionDelta.x)||!vo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ze(),this.projectionDelta=Ze(),this.projectionDeltaWithTransform=Ze()}setAnimationOrigin(i,a=!1,u){const l=this.snapshot,h=l?l.latestValues:{},m={...this.latestValues},p=Ze();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const v=J(),b=l?l.source:void 0,S=this.layout?this.layout.source:void 0,k=b!==S,P=this.getStack(),j=!P||P.members.length<=1,C=!!(k&&!j&&this.options.crossfade===!0&&!this.path.some(ha));this.animationProgress=0;let L;const N=u?.interpolateProjection(i);this.mixTargetDelta=y=>{const T=y/1e3,x=N?.(T);x?(p.x.translate=x.x,p.x.scale=G(i.x.scale,1,T),p.x.origin=i.x.origin,p.x.originPoint=i.x.originPoint,p.y.translate=x.y,p.y.scale=G(i.y.scale,1,T),p.y.origin=i.y.origin,p.y.originPoint=i.y.originPoint):(ko(p.x,i.x,T),ko(p.y,i.y,T)),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yt(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),da(this.relativeTarget,this.relativeTargetOrigin,v,T),L&&Ur(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=J()),ge(L,this.relativeTarget)),k&&(this.animationValues=m,$r(m,h,this.latestValues,T,C,j)),x&&x.rotate!==void 0&&(this.animationValues||(this.animationValues=m),this.animationValues.pathRotation=x.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{Wt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=en(0)),this.motionValue.jump(0,!1),this.currentAnimation=Gr(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Kr),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:h}=i;if(!(!a||!u||!l)){if(this!==i&&this.layout&&l&&jn(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||J();const m=oe(this.layout.layoutBox.x);u.x.min=i.target.x.min,u.x.max=u.x.min+m;const p=oe(this.layout.layoutBox.y);u.y.min=i.target.y.min,u.y.max=u.y.min+p}ge(a,u),ts(a,h),pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Jr),this.sharedNodes.get(i).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){const{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:u}=i;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&ns("z",i,l,this.animationValues);for(let h=0;h<os.length;h++)ns(`rotate${os[h]}`,i,l,this.animationValues),ns(`skew${os[h]}`,i,l,this.animationValues);i.render();for(const h in l)i.setStaticValue(h,l[h]),this.animationValues&&(this.animationValues[h]=l[h]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=es(a?.pointerEvents)||"",i.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=es(a?.pointerEvents)||""),this.hasProjected&&!Ke(this.latestValues)&&(i.transform=u?u({},""):"none",this.hasProjected=!1);return}i.visibility="";const h=l.animationValues||l.latestValues;this.applyTransformsToTarget();let m=zr(this.projectionDeltaWithTransform,this.treeScale,h);u&&(m=u(h,m)),i.transform=m;const{x:p,y:v}=this.projectionDelta;i.transformOrigin=`${p.origin*100}% ${v.origin*100}% 0`,l.animationValues?i.opacity=l===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:i.opacity=l===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const b in qs){if(h[b]===void 0)continue;const{correct:S,applyTo:k,isCSSVariable:P}=qs[b],j=m==="none"?h[b]:S(h[b],l);if(k){const C=k.length;for(let L=0;L<C;L++)i[k[L]]=j}else P?this.options.visualElement.renderState.vars[b]=j:i[b]=j}this.options.layoutId&&(i.pointerEvents=l===this?es(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(bo),this.root.sharedNodes.clear()}}}function Zr(e){e.updateLayout()}function ea(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:r}=e.options,c=t.source!==e.layout.source;if(r==="size")Se(h=>{const m=c?t.measuredBox[h]:t.layoutBox[h],p=oe(m);m.min=s[h].min,m.max=m.min+p});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";ps(c?t.measuredBox[h]:t.layoutBox[h],s[h])}else jn(r,t.layoutBox,s)&&Se(h=>{const m=c?t.measuredBox[h]:t.layoutBox[h],p=oe(s[h]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const i=Ze();pt(i,s,t.layoutBox);const a=Ze();c?pt(a,e.applyTransform(o,!0),t.measuredBox):pt(a,s,t.layoutBox);const u=!xn(i);let l=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:p}=h;if(m&&p){const v=e.options.layoutAnchor||void 0,b=J();Yt(b,t.layoutBox,m.layoutBox,v);const S=J();Yt(S,s,p.layoutBox,v),yn(b,S)||(l=!0),h.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:a,layoutDelta:i,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function ta(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sa(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oa(e){e.clearSnapshot()}function bo(e){e.clearMeasurements()}function na(e){e.isLayoutDirty=!0,e.updateLayout()}function So(e){e.isLayoutDirty=!1}function ia(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ra(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function aa(e){e.resolveTargetDelta()}function ca(e){e.calcProjection()}function la(e){e.resetSkewAndRotation()}function ua(e){e.removeLeadSnapshot()}function ko(e,t,s){e.translate=G(t.translate,0,s),e.scale=G(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function jo(e,t,s,o){e.min=G(t.min,s.min,o),e.max=G(t.max,s.max,o)}function da(e,t,s,o){jo(e.x,t.x,s.x,o),jo(e.y,t.y,s.y,o)}function ha(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ma={duration:.45,ease:[.4,0,.1,1]},Co=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Eo=Co("applewebkit/")&&!Co("chrome/")?Math.round:tt;function Po(e){e.min=Eo(e.min),e.max=Eo(e.max)}function pa(e){Po(e.x),Po(e.y)}function jn(e,t,s){return e==="position"||e==="preserve-aspect"&&!Mr(fo(t),fo(s),.2)}function fa(e){return e!==e.root&&e.scroll?.wasRoot}const va=kn({attachResizeListener:(e,t)=>Ss(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),is={current:void 0},Cn=kn({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!is.current){const e=new va({});e.mount(window),e.setOptions({layoutScroll:!0}),is.current=e}return is.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});function To(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ga(...e){return t=>{let s=!1;const o=e.map(r=>{const c=To(r,t);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let r=0;r<o.length;r++){const c=o[r];typeof c=="function"?c():To(e[r],null)}}}}function xa(...e){return d.useCallback(ga(...e),e)}class ya extends d.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(ss(s)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=s.offsetParent,r=ss(o)&&o.offsetWidth||0,c=ss(o)&&o.offsetHeight||0,i=getComputedStyle(s),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=s.offsetTop,a.left=s.offsetLeft,a.right=r-a.width-a.left,a.bottom=c-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function ba({children:e,isPresent:t,anchorX:s,anchorY:o,root:r,pop:c}){const i=d.useId(),a=d.useRef(null),u=d.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:l}=d.useContext(Ti),h=e.props?.ref??e?.ref,m=xa(a,h);return d.useInsertionEffect(()=>{const{width:p,height:v,top:b,left:S,right:k,bottom:P,direction:j}=u.current;if(t||c===!1||!a.current||!p||!v)return;const C=j==="rtl",L=s==="left"?C?`right: ${k}`:`left: ${S}`:C?`left: ${S}`:`right: ${k}`,N=o==="bottom"?`bottom: ${P}`:`top: ${b}`;a.current.dataset.motionPopId=i;const y=document.createElement("style");l&&(y.nonce=l);const T=r??document.head;return T.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${i}"] {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
width: ${p}px !important;
|
|
5
|
+
height: ${v}px !important;
|
|
6
|
+
${L}px !important;
|
|
7
|
+
${N}px !important;
|
|
8
|
+
}
|
|
9
|
+
`),()=>{a.current?.removeAttribute("data-motion-pop-id"),T.contains(y)&&T.removeChild(y)}},[t]),n.jsx(ya,{isPresent:t,childRef:a,sizeRef:u,pop:c,children:c===!1?e:d.cloneElement(e,{ref:m})})}const Sa=({children:e,initial:t,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:c,mode:i,anchorX:a,anchorY:u,root:l})=>{const h=rn(wa),m=d.useId();let p=!0,v=d.useMemo(()=>(p=!1,{id:m,initial:t,isPresent:s,custom:r,onExitComplete:b=>{h.set(b,!0);for(const S of h.values())if(!S)return;o&&o()},register:b=>(h.set(b,!1),()=>h.delete(b))}),[s,h,o]);return c&&p&&(v={...v}),d.useMemo(()=>{h.forEach((b,S)=>h.set(S,!1))},[s]),d.useEffect(()=>{!s&&!h.size&&o&&o()},[s]),e=n.jsx(ba,{pop:i==="popLayout",isPresent:s,anchorX:a,anchorY:u,root:l,children:e}),n.jsx(an.Provider,{value:v,children:e})};function wa(){return new Map}function En(e=!0){const t=d.useContext(an);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:r}=t,c=d.useId();d.useEffect(()=>{if(e)return r(c)},[e]);const i=d.useCallback(()=>e&&o&&o(c),[c,o,e]);return!s&&o?[!1,i]:[!0]}const Bt=e=>e.key||"";function No(e){const t=[];return d.Children.forEach(e,s=>{d.isValidElement(s)&&t.push(s)}),t}const ka=({children:e,custom:t,initial:s=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:c="sync",propagate:i=!1,anchorX:a="left",anchorY:u="top",root:l})=>{const[h,m]=En(i),p=d.useMemo(()=>No(e),[e]),v=i&&!h?[]:p.map(Bt),b=d.useRef(!0),S=d.useRef(p),k=rn(()=>new Map),P=d.useRef(new Set),[j,C]=d.useState(p),[L,N]=d.useState(p);Ni(()=>{b.current=!1,S.current=p;for(let x=0;x<L.length;x++){const D=Bt(L[x]);v.includes(D)?(k.delete(D),P.current.delete(D)):k.get(D)!==!0&&k.set(D,!1)}},[L,v.length,v.join("-")]);const y=[];if(p!==j){let x=[...p];for(let D=0;D<L.length;D++){const _=L[D],U=Bt(_);v.includes(U)||(x.splice(D,0,_),y.push(_))}return c==="wait"&&y.length&&(x=y),N(No(x)),C(p),null}const{forceRender:T}=d.useContext(cn);return n.jsx(n.Fragment,{children:L.map(x=>{const D=Bt(x),_=i&&!h?!1:p===L||v.includes(D),U=()=>{if(P.current.has(D))return;if(k.has(D))P.current.add(D),k.set(D,!0);else return;let O=!0;k.forEach(ce=>{ce||(O=!1)}),O&&(T?.(),N(S.current),i&&m?.(),o&&o())};return n.jsx(Sa,{isPresent:_,initial:!b.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:c,root:l,onExitComplete:_?void 0:U,anchorX:a,anchorY:u,children:x},D)})})};function ft(e,t,s,o){return Ss(e,t,zi(s),o)}const Pn=({current:e})=>e?e.ownerDocument.defaultView:null,Lo=(e,t)=>Math.abs(e-t);function ja(e,t){const s=Lo(e.x,t.x),o=Lo(e.y,t.y);return Math.sqrt(s**2+o**2)}const Do=new Set(["auto","scroll"]);class Tn{constructor(t,s,{transformPagePoint:o,contextWindow:r=window,dragSnapToOrigin:c=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ot(this.lastRawMoveEventInfo,this.transformPagePoint));const v=rs(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,S=ja(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!S)return;const{point:k}=v,{timestamp:P}=he;this.history.push({...k,timestamp:P});const{onStart:j,onMove:C}=this.handlers;b||(j&&j(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,v)},this.handlePointerMove=(v,b)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=b,this.lastMoveEventInfo=Ot(b,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(v,b)=>{this.end();const{onEnd:S,onSessionEnd:k,resumeAnimation:P}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=rs(v.type==="pointercancel"?this.lastMoveEventInfo:Ot(b,this.transformPagePoint),this.history);this.startEvent&&S&&S(v,j),k&&k(v,j)},!Fi(t))return;this.dragSnapToOrigin=c,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=r||window;const u=dn(t),l=Ot(u,this.transformPagePoint),{point:h}=l,{timestamp:m}=he;this.history=[{...h,timestamp:m}];const{onSessionStart:p}=s;p&&p(t,rs(l,this.history)),this.removeListeners=$i(ft(this.contextWindow,"pointermove",this.handlePointerMove),ft(this.contextWindow,"pointerup",this.handlePointerUp),ft(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let s=t.parentElement;for(;s;){const o=getComputedStyle(s);(Do.has(o.overflowX)||Do.has(o.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const o=t===window,r=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},c={x:r.x-s.x,y:r.y-s.y};c.x===0&&c.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(t,r),se.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),gt(this.updatePoint)}}function Ot(e,t){return t?{point:t(e.point)}:e}function Ro(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rs({point:e},t){return{point:e,delta:Ro(e,Nn(t)),offset:Ro(e,Ca(t)),velocity:Ea(t,.1)}}function Ca(e){return e[0]}function Nn(e){return e[e.length-1]}function Ea(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,o=null;const r=Nn(e);for(;s>=0&&(o=e[s],!(r.timestamp-o.timestamp>Xs(t)));)s--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&r.timestamp-o.timestamp>Xs(t)*2&&(o=e[1]);const c=Li(r.timestamp-o.timestamp);if(c===0)return{x:0,y:0};const i={x:(r.x-o.x)/c,y:(r.y-o.y)/c};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Pa(e,{min:t,max:s},o){return t!==void 0&&e<t?e=o?G(t,e,o.min):Math.max(e,t):s!==void 0&&e>s&&(e=o?G(s,e,o.max):Math.min(e,s)),e}function Ao(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function Ta(e,{top:t,left:s,bottom:o,right:r}){return{x:Ao(e.x,s,r),y:Ao(e.y,t,o)}}function Io(e,t){let s=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,o]=[o,s]),{min:s,max:o}}function Na(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function La(e,t){let s=.5;const o=oe(e),r=oe(t);return r>o?s=ms(t.min,t.max-o,e.min):o>r&&(s=ms(e.min,e.max-r,t.min)),on(0,1,s)}function Da(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const fs=.35;function Ra(e=fs){return e===!1?e=0:e===!0&&(e=fs),{x:Mo(e,"left","right"),y:Mo(e,"top","bottom")}}function Mo(e,t,s){return{min:Vo(e,t),max:Vo(e,s)}}function Vo(e,t){return typeof e=="number"?e:e[t]||0}const Aa=new WeakMap;class Ia{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const c=m=>{s&&this.snapToCursor(dn(m).point),this.stopAnimation()},i=(m,p)=>{const{drag:v,dragPropagation:b,onDragStart:S}=this.getProps();if(v&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Sr(v),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Se(P=>{let j=this.getAxisMotionValue(P).get()||0;if(Gt.test(j)){const{projection:C}=this.visualElement;if(C&&C.layout){const L=C.layout.layoutBox[P];L&&(j=oe(L)*(parseFloat(j)/100))}}this.originPoint[P]=j}),S&&se.update(()=>S(m,p),!1,!0),Qs(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},a=(m,p)=>{this.latestPointerEvent=m,this.latestPanInfo=p;const{dragPropagation:v,dragDirectionLock:b,onDirectionLock:S,onDrag:k}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:P}=p;if(b&&this.currentDirection===null){this.currentDirection=Va(P),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",p.point,P),this.updateAxis("y",p.point,P),this.visualElement.render(),k&&se.update(()=>k(m,p),!1,!0)},u=(m,p)=>{this.latestPointerEvent=m,this.latestPanInfo=p,this.stop(m,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new Tn(t,{onSessionStart:c,onStart:i,onMove:a,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:o,contextWindow:Pn(this.visualElement),element:this.visualElement.current})}stop(t,s){const o=t||this.latestPointerEvent,r=s||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!r||!o)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&se.postRender(()=>a(o,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,o){const{drag:r}=this.getProps();if(!o||!_t(t,r,this.currentDirection))return;const c=this.getAxisMotionValue(t);let i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=Pa(i,this.constraints[t],this.elastic[t])),c.set(i)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&dt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Ta(o.layoutBox,t):this.constraints=!1,this.elastic=Ra(s),r!==this.constraints&&!dt(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&Se(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=Da(o.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!dt(t))return!1;const o=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const c=Wi(o,r.root,this.visualElement.getTransformPagePoint());let i=Na(r.layout.layoutBox,c);if(s){const a=s(Hi(i));this.hasMutatedConstraints=!!a,a&&(i=Gi(a))}return i}startAnimation(t){const{drag:s,dragMomentum:o,dragElastic:r,dragTransition:c,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},l=Se(h=>{if(!_t(h,s,this.currentDirection))return;let m=u&&u[h]||{};(i===!0||i===h)&&(m={min:0,max:0});const p=r?200:1e6,v=r?40:1e7,b={type:"inertia",velocity:o?t[h]:0,bounceStiffness:p,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...c,...m};return this.startAxisValueAnimation(h,b)});return Promise.all(l).then(a)}startAxisValueAnimation(t,s){const o=this.getAxisMotionValue(t);return Qs(this.visualElement,t),o.start(un(t,o,0,s,this.visualElement,!1))}stopAnimation(){Se(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps()[s];return r||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Se(s=>{const{drag:o}=this.getProps();if(!_t(s,o,this.currentDirection))return;const{projection:r}=this.visualElement,c=this.getAxisMotionValue(s);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[s],u=c.get()||0;c.set(t[s]-G(i,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!dt(s)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Se(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const u=a.get();r[i]=La({min:u,max:u},this.constraints[i])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),Se(i=>{if(!_t(i,t,null))return;const a=this.getAxisMotionValue(i),{min:u,max:l}=this.constraints[i];a.set(G(u,l,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Aa.set(this.visualElement,this);const t=this.visualElement.current,s=ft(t,"pointerdown",l=>{const{drag:h,dragListener:m=!0}=this.getProps(),p=l.target,v=p!==t&&Yi(p);h&&m&&!v&&this.start(l)});let o;const r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),o||(o=Ma(t,l.current,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,i=c.addEventListener("measure",r);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),se.read(r);const a=Ss(window,"resize",()=>this.scalePositionWithinConstraints()),u=c.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:h})=>{this.isDragging&&h&&(Se(m=>{const p=this.getAxisMotionValue(m);p&&(this.originPoint[m]+=l[m].translate,p.set(p.get()+l[m].translate))}),this.visualElement.render())}));return()=>{a(),s(),i(),u&&u(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:c=!1,dragElastic:i=fs,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:o,dragPropagation:r,dragConstraints:c,dragElastic:i,dragMomentum:a}}}function Bo(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ma(e,t,s){const o=oo(e,Bo(s)),r=oo(t,Bo(s));return()=>{o(),r()}}function _t(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function Va(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class Ba extends hn{constructor(t){super(t),this.removeGroupControls=tt,this.removeListeners=tt,this.controls=new Ia(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const as=e=>(t,s)=>{e&&se.update(()=>e(t,s),!1,!0)};class Oa extends hn{constructor(){super(...arguments),this.removePointerDownListener=tt}onPointerDown(t){this.session=new Tn(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pn(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:as(t),onStart:as(s),onMove:as(o),onEnd:(c,i)=>{delete this.session,r&&se.postRender(()=>r(c,i))}}}mount(){this.removePointerDownListener=ft(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let cs=!1;class _a extends d.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:o,layoutId:r}=this.props,{projection:c}=t;c&&(s.group&&s.group.add(c),o&&o.register&&r&&o.register(c),cs&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:o,drag:r,isPresent:c}=this.props,{projection:i}=o;return i&&(i.isPresent=c,t.layoutDependency!==s&&i.setOptions({...i.options,layoutDependency:s}),cs=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==c?i.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?i.promote():i.relegate()||se.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:s}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=s,o.root.didUpdate(),nn.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:r}=t;cs=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ln(e){const[t,s]=En(),o=d.useContext(cn);return n.jsx(_a,{...e,layoutGroup:o,switchLayoutGroup:d.useContext(Di),isPresent:t,safeToRemove:s})}const Ua={pan:{Feature:Oa},drag:{Feature:Ba,ProjectionNode:Cn,MeasureLayout:Ln}},za={layout:{ProjectionNode:Cn,MeasureLayout:Ln}},Fa={...Xi,...qi,...Ua,...za},Dn=Ri(Fa,Ji),$a=new Set(["air-local","local","mini","node"]),Wa=new Set(["main","master","trunk"]);function Oo(e){return e.replace(/```[\s\S]*?```/g," code omitted ").replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^\s*][^*\n]*?[^\s*]|[^\s*])\*(?=[\s)\].,!?;:]|$)/g,"$1$2").replace(/(^|[\s(])_([^\s_][^_\n]*?[^\s_]|[^\s_])_(?=[\s)\].,!?;:]|$)/g,"$1$2").replace(/^\s*[-*]\s+/gm,"").replace(/\bhttps?:\/\/[^\s)]+/gi,t=>Ha(t)).replace(/\b(session|conversation|message|flight|invocation|work)(?:\s+(?:id|ref))?\s*[:#]?\s+([a-z0-9][a-z0-9._:-]{9,})\b/gi,(t,s,o)=>`${s.toLowerCase()} ending in ${vs(o)}`).replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,t=>`ID ending in ${vs(t)}`).replace(/@?([a-z][a-z0-9-]*(?:\.[a-z0-9][a-z0-9-]*){2,})\b/gi,(t,s)=>Ga(t)?t:Ya(s)).replace(/`([^`]+)`/g,(t,s)=>qa(s)).replace(/\s+/g," ").trim()}function Ha(e){try{return new URL(e).hostname.replace(/^www\./,"").replace(/\./g," dot ")}catch{return"link"}}function Ga(e){const t=e.replace(/^@/,"").toLowerCase();return/\.(com|app|dev|org|net|io|local)(?:\b|\/)/.test(t)&&!t.endsWith(".air-local")}function Ya(e){const t=e.split(".").filter(Boolean);if(t.length<2)return e;const s=[...t];for(;s.length>1&&$a.has(s.at(-1).toLowerCase());)s.pop();const[o,...r]=s,c=r.filter(i=>!Wa.has(i.toLowerCase())).map(gs).filter(Boolean);return[gs(o),...c].filter(Boolean).join(", ")}function qa(e){return/^[a-z0-9][a-z0-9._:-]{12,}$/i.test(e)?`ID ending in ${vs(e)}`:gs(e)}function vs(e){return(e.replace(/[^a-z0-9]/gi,"").slice(-4)||e.slice(-4)).split("").join(" ")}function gs(e){return e.replace(/^@/,"").replace(/[_./:-]+/g," ").replace(/\s+/g," ").trim()}async function Xa(e,t){const s=()=>fetch("/api/scoutbot/chat",{method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream"},body:JSON.stringify({body:e.body,route:e.route,uiContext:e.uiContext,...e.voiceTurn?{voiceTurn:e.voiceTurn}:{},stream:!0}),signal:e.signal});let o=await s();if(o.status===401&&await ni()&&(o=await s()),!o.ok){const u=await o.text().catch(()=>"");let l=u||`HTTP ${o.status}`;try{const h=JSON.parse(u);typeof h?.error=="string"&&h.error&&(l=h.error)}catch{}throw new Error(l)}if(!o.body)throw new Error("Scoutbot reply stream is unavailable in this browser.");let r=!1;const c=u=>{if(r||e.signal?.aborted)return;let l="message";const h=[];for(const p of u.split(`
|
|
10
|
+
`))p.startsWith("event:")?l=p.slice(6).trim():p.startsWith("data:")&&h.push(p.slice(5).replace(/^ /,""));if(h.length===0)return;let m;try{m=JSON.parse(h.join(`
|
|
11
|
+
`))}catch{return}if(l==="sentence"){typeof m.text=="string"&&m.text&&t.onSentence?.(m.text);return}if(l==="final"){r=!0,t.onFinal?.(m);return}if(l==="error"){r=!0;const p=typeof m.error=="string"&&m.error?m.error:"Scoutbot assistant failed",v=typeof m.status=="number"&&Number.isFinite(m.status)?m.status:500;t.onError?.({message:p,status:v})}},i=o.body.getReader(),a=()=>{i.cancel().catch(()=>{})};e.signal?.addEventListener("abort",a,{once:!0}),e.signal?.aborted&&a();try{const u=new TextDecoder;let l="";for(;!r&&!e.signal?.aborted;){const{done:h,value:m}=await i.read();if(h)break;l+=u.decode(m,{stream:!0}),l=l.replace(/\r\n/g,`
|
|
12
|
+
`);let p=l.indexOf(`
|
|
13
|
+
|
|
14
|
+
`);for(;p>=0;){const v=l.slice(0,p);l=l.slice(p+2),c(v),p=l.indexOf(`
|
|
15
|
+
|
|
16
|
+
`)}}if(l+=u.decode(),l.trim()&&c(l),e.signal?.aborted)throw new DOMException("Scoutbot request was cancelled.","AbortError");if(!r)throw new Error("Scoutbot reply stream ended before the reply completed.")}finally{e.signal?.removeEventListener("abort",a),a(),i.releaseLock()}}function Ja(e={},t={}){const s=e.prepare??ci,o=e.play??li,r=e.toSpoken??(y=>y),c=new AbortController,i=[];let a=!1,u=!1,l=!1,h=!1,m=!1,p=!1,v=null;const b=()=>({...e.speed!==void 0?{speed:e.speed}:{},...e.modelId?{modelId:e.modelId}:{},...e.voiceId?{voiceId:e.voiceId}:{},...e.instructions?{instructions:e.instructions}:{},...e.playback?{playback:e.playback}:{},signal:c.signal}),S=y=>{const T=i[y];if(!T||T.prepared||u)return;m||(m=!0,t.onPrepareStart?.());const x=s(T.text,b());x.catch(()=>{}),T.prepared=x};let k,P;const j=new Promise((y,T)=>{k=y,P=T}),C=()=>{const y=v;v=null,y?.()},L=async()=>{let y=0;for(;;){if(u)throw ls();if(y>=i.length){if(a)return;await new Promise(D=>{v=D});continue}S(y),S(y+1);const T=i[y],x=await T.prepared;if(u)throw ls();await o(x,{signal:c.signal,onPlaybackStart:p?void 0:()=>{p=!0,t.onPlaybackStart?.(T.text)}}),y+=1}},N=y=>{l||(l=!0,a=!0,u=!!y,c.abort(),C(),h&&(h=!1,ui()),y?P(y):k())};return L().then(()=>N(),y=>{N(y instanceof Error?y:new Error(String(y)))}),{promise:j,push:y=>{if(u||a)return;let T;try{T=r(y)}catch(x){N(x instanceof Error?x:new Error(String(x)));return}T&&(h||(di(),h=!0),i.push({text:T,prepared:null}),C())},finish:()=>{u||a||(a=!0,C())},stop:()=>{N(ls())}}}function ls(){const e=new Error("Speech stopped.");return e.name="AbortError",e}function Ka({state:e,chatExpanded:t,onToggleExpanded:s,sessionPickerOpen:o,onToggleSessionPicker:r,onStartNewChat:c,startingNewChat:i,onSwitchSession:a,switchingSessionId:u,sending:l,briefing:h,pendingAsk:m,onArchiveSession:p,archivingSessionId:v,onAssistantContextMenu:b,suggestedPrompts:S,onSelectPrompt:k}){const j=e.session.messages,C=t?j:j.slice(-4),L=t?0:Math.max(0,j.length-C.length),N=j.length,y=e.sessions.length,T=e.retention,x=j.length===0&&!m&&!l&&!h,D=i||l||h||!!u||!!v,_=e.session.createdAt?yi(e.session.createdAt):null,U=x?"Scout conversation":e.session.title&&e.session.title!=="New Scout Session"?e.session.title:`Session ${e.session.id.slice(0,8)}`,O=d.useRef(null),ce=j[j.length-1]?.id??null,le=j[j.length-1]?.body??"";return d.useEffect(()=>{const E=O.current;E&&(E.scrollTop=E.scrollHeight)},[ce,le,m,l,t,e.session.id]),n.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:[n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-[var(--scout-chrome-border-soft)] px-2.5 py-1.5",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[n.jsx("span",{className:"min-w-0 truncate text-[var(--scout-chrome-ink)]",title:e.session.id,children:U}),_&&!x&&n.jsxs("span",{className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]",children:["· ",_]}),!x&&n.jsxs("span",{className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]",children:["· ",N," msg",N===1?"":"s"]})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsxs("button",{type:"button",title:"Start a new chat (keeps this chat in Chats)","aria-label":"Start new chat",onClick:c,disabled:D,className:"flex items-center gap-1 rounded border border-lime-300/30 bg-lime-300/[0.06] px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] text-lime-100 transition-colors hover:border-lime-300/50 hover:bg-lime-300/10 disabled:cursor-not-allowed disabled:opacity-40",children:[i?n.jsx(Ne,{size:10,className:"animate-spin"}):n.jsx(Jo,{size:10}),n.jsx("span",{children:i?"Starting":"New chat"})]}),n.jsxs("button",{type:"button",title:`Switch chat (${y} total)`,"aria-label":"Switch chat",onClick:r,className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] transition-colors ${o?"border-lime-300/40 bg-lime-300/10 text-lime-100":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[n.jsx(Jn,{size:10}),n.jsx("span",{children:"Chats"}),n.jsx("span",{className:"text-[var(--scout-chrome-ink-ghost)]",children:y}),n.jsx(ds,{size:9,className:o?"rotate-180 transition-transform":"transition-transform"})]}),N>4&&n.jsxs("button",{type:"button",title:t?"Collapse chat":"View full session","aria-label":t?"Collapse chat":"View full session",onClick:s,className:"flex items-center gap-1 rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:[n.jsx("span",{children:t?"Collapse":"Full"}),t?n.jsx(bi,{size:9}):n.jsx(ds,{size:9})]})]})]}),o&&n.jsxs("div",{className:"shrink-0 border-b border-[var(--scout-chrome-border-soft)] px-2 py-1.5",children:[n.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2 px-0.5 text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[n.jsx("span",{children:"Recent chats"}),T&&T.archivedCount>0&&n.jsxs("span",{children:[T.archivedCount," archived"]})]}),n.jsx("div",{className:"flex max-h-40 flex-col gap-0.5 overflow-y-auto pr-0.5",children:e.sessions.map(E=>{const W=E.id===e.session.id,ue=u===E.id,F=v===E.id,ne=Ys(E.updatedAt)||"unknown",Z=E.title&&E.title!=="New Scout Session"?E.title:`Session ${E.id.slice(0,8)}`;return n.jsxs("div",{className:`flex items-center gap-2 rounded border px-2 py-1 text-left transition-colors ${W?"border-lime-300/40 bg-lime-300/[0.06] text-lime-100":"border-transparent text-[var(--scout-chrome-ink-faint)] hover:border-[var(--scout-chrome-border-soft)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[n.jsxs("button",{type:"button",onClick:()=>{W||a(E.id)},disabled:W||!!u||!!v,className:"flex min-w-0 flex-1 items-center gap-2 text-left disabled:cursor-not-allowed disabled:opacity-40",children:[n.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${W?"bg-lime-300":"bg-[var(--scout-chrome-ink-ghost)]"}`}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink)]",children:Z}),n.jsxs("span",{className:"shrink-0 text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[E.messageCount," msg"]}),n.jsx("span",{className:"shrink-0 text-2xs text-[var(--scout-chrome-ink-ghost)]",children:ne}),ue&&n.jsx(Ne,{size:10,className:"shrink-0 animate-spin text-lime-200"})]}),n.jsx("button",{type:"button",title:"Archive chat","aria-label":`Archive chat ${Z}`,onClick:()=>p(E.id),disabled:!!u||!!v,className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-transparent text-[var(--scout-chrome-ink-ghost)] transition-colors hover:border-[var(--scout-chrome-border-soft)] hover:bg-black/20 hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-30",children:F?n.jsx(Ne,{size:10,className:"animate-spin"}):n.jsx(vr,{size:10})})]},E.id)})})]}),n.jsxs("div",{ref:O,className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-2.5 py-2",children:[L>0&&n.jsxs("button",{type:"button",onClick:s,className:"self-start text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)] hover:text-[var(--scout-chrome-ink)]",children:["↑ ",L," earlier message",L===1?"":"s"]}),x&&n.jsx(Qa,{suggestedPrompts:S,onSelectPrompt:k}),C.map((E,W)=>{const ue=tc(C[W-1],E),F=sc(E.createdAt);return n.jsxs("div",{className:"flex flex-col gap-1",children:[ue&&n.jsx("div",{className:"self-center rounded-full bg-white/[0.06] px-2.5 py-0.5 font-mono text-2xs font-medium text-[var(--scout-chrome-ink-ghost)]",title:Ys(E.createdAt),"aria-label":F,children:F}),n.jsx(_o,{role:E.role,body:E.body,onContextMenu:E.role==="assistant"&&b?ne=>b(ne,E.body):void 0})]},E.id)}),m&&n.jsx(_o,{role:"user",body:m,pending:!0}),l&&!m&&n.jsx("p",{className:"text-[var(--scout-chrome-ink-ghost)]",children:"Reading the control plane…"}),h&&n.jsxs("div",{className:"flex items-center gap-2 rounded border border-lime-300/30 bg-lime-300/[0.06] px-2.5 py-2 font-mono text-xs leading-relaxed text-lime-100",children:[n.jsx(Ne,{size:12,className:"shrink-0 animate-spin text-lime-300","aria-hidden":"true"}),n.jsxs("div",{className:"min-w-0 flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-xs uppercase tracking-[0.14em] text-lime-300",children:"Briefing"}),n.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:"Codex is reviewing the control-plane snapshot. Voice will pick up when it lands."})]})]})]})]})}function Qa({suggestedPrompts:e=[],onSelectPrompt:t}){return n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col justify-start gap-2 px-1 py-2.5",children:[e.length>0?n.jsx("div",{className:"grid gap-1",children:e.slice(0,3).map(s=>n.jsx("button",{type:"button",onClick:()=>t?.(s),className:"min-h-7 truncate rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 px-2.5 text-left font-mono text-xs leading-snug text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:s},s))}):null,n.jsxs("div",{className:"max-w-[30rem]",children:[n.jsx("div",{className:"font-sans text-lg font-semibold leading-tight text-[var(--scout-chrome-ink)]",children:"Start with a question."}),n.jsx("p",{className:"mt-0.5 font-sans text-xs leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Paste a failed result or ask about what you are seeing. Scout replies when you ask."})]})]})}function Za({agents:e,draft:t,onDraftChange:s,onSubmit:o,sending:r,recording:c,voiceLabel:i,voiceBusy:a,voiceUnavailable:u,voiceHeld:l=!1,onMicClick:h,prominent:m=!1,autoFocus:p,focusSignal:v}){const b=d.useRef(null),S=d.useCallback(()=>{const C=b.current;C&&(C.textarea?C.textarea.focus({preventScroll:!0}):C.focus())},[]);d.useEffect(()=>{p&&S()},[p,S]),d.useEffect(()=>{v&&S()},[v,S]);let k="Start talking";u&&(k="Set up Scout voice"),c&&(k="Stop talking"),(a||l)&&(k=i);const P=a||c||l,j=["w-full resize-none rounded border font-mono text-sm leading-relaxed text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)]",m?"min-h-[88px] max-h-[170px] border-lime-300/30 bg-black/25 px-3 py-2 text-md":"min-h-[44px] max-h-[124px] border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5"].join(" ");return n.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:C=>{C.preventDefault(),o()},children:[n.jsx(Kn,{ref:b,agents:e,value:t,onChange:s,onSubmit:()=>{t.trim()&&!r&&o()},placeholder:l?"Type while live voice is on…":m?"Ask Scout about what you are seeing…":"Ask Scout…",rows:m?4:2,disabled:r,submitOnEnter:!0,className:"min-w-0",textareaClassName:j}),n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsxs("button",{type:"button",title:k,"aria-label":k,onClick:h,disabled:r||a||l,className:`flex h-8 items-center justify-center rounded border transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${c?"border-lime-300/50 bg-lime-300/10 text-lime-200":l?"border-lime-300/25 bg-lime-300/[0.05] text-lime-100/70":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"} ${P?"gap-1.5 px-3 font-mono text-xs uppercase tracking-[0.12em]":"w-9"}`,children:[a?n.jsx(Ne,{size:13,className:"animate-spin"}):c?n.jsx(Ko,{size:12,className:"fill-current"}):n.jsx(Qo,{size:13}),P&&n.jsx("span",{className:"truncate",children:i})]}),n.jsx("button",{type:"submit",title:"Send","aria-label":"Send",disabled:!t.trim()||r,className:"flex h-8 w-9 items-center justify-center rounded bg-lime-300/90 text-black transition-opacity disabled:cursor-not-allowed disabled:opacity-40",children:r?n.jsx(Ne,{size:13,className:"animate-spin"}):n.jsx(Si,{size:13})})]})]})}function _o({role:e,body:t,pending:s=!1,onContextMenu:o}){const r=e==="user",c=r?t:Oe(t),[i,a]=d.useState(!1),u=d.useCallback(()=>{Ut(c).then(()=>{a(!0),window.setTimeout(()=>a(!1),1200)}).catch(()=>{})},[c]);return n.jsxs("div",{className:"group flex flex-col gap-0.5",onContextMenu:o,children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsxs("span",{className:`text-2xs uppercase tracking-[0.12em] ${r?"text-[var(--scout-chrome-ink-ghost)]":"text-lime-300"}`,children:[r?"You":"Reply",s&&" · sending"]}),n.jsx("button",{type:"button",title:i?"Copied":"Copy message","aria-label":i?"Copied message":"Copy message",disabled:s||!c.trim(),onClick:u,className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-ghost)] opacity-70 transition hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-20 group-hover:opacity-100",children:i?n.jsx(xr,{size:11}):n.jsx(wi,{size:11})})]}),r?n.jsx("p",{className:`whitespace-pre-wrap break-words text-sm leading-relaxed text-[var(--scout-chrome-ink)] ${s?"opacity-60":""}`,children:c}):n.jsx("div",{className:s?"opacity-60":"",children:n.jsx(Xo,{text:c})})]})}const ec=5*6e4;function tc(e,t){if(!e||!xs(e.createdAt,t.createdAt))return!0;const s=vt(e.createdAt),o=vt(t.createdAt);return s===null||o===null?!0:Math.abs(o-s)>=ec}function xs(e,t){const s=vt(e),o=vt(t);if(s===null||o===null)return!1;const r=new Date(s),c=new Date(o);return r.getFullYear()===c.getFullYear()&&r.getMonth()===c.getMonth()&&r.getDate()===c.getDate()}function sc(e){const t=vt(e);if(t===null)return"";const s=new Date(t),o=new Date,r=new Date(o);r.setDate(o.getDate()-1);const c=s.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});return xs(t,o.getTime())?`Today ${c}`:xs(t,r.getTime())?`Yesterday ${c}`:s.getFullYear()===o.getFullYear()?`${s.toLocaleDateString([],{month:"short",day:"numeric"})} ${c}`:`${s.toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})} ${c}`}const Uo=[2,4,7,5,3,6,9,5,3,4,8,6,3,5,9,6,3,5,7,4,2,4,6,3],oc=Uo.map((e,t)=>{const s=t/Uo.length*Math.PI*2-Math.PI/2,o=24-e/2,r=24+e/2;return{x1:36+Math.cos(s)*o,y1:36+Math.sin(s)*o,x2:36+Math.cos(s)*r,y2:36+Math.sin(s)*r}});function nc({recording:e,sending:t,speaking:s,voiceAvailable:o,voiceProbeState:r,voiceState:c}){return s?"speaking":t?"thinking":e&&c==="processing"?"processing":e?"listening":r!=="idle"||c==="starting"||o===null?"checking":o===!1?"unavailable":"ready"}const ic={checking:{label:"Getting voice ready",helper:"Checking your microphone and speech services"},unavailable:{label:"Voice is offline",helper:"Tap to reconnect"},listening:{label:"Listening",helper:"Tap to finish your turn"},processing:{label:"Transcribing",helper:"Turning speech into text"},thinking:{label:"Scout is thinking",helper:"Your turn is in"},speaking:{label:"Scout is speaking",helper:"Tap to interrupt"},ready:{label:"Ready to listen",helper:"Tap to speak"}};function rc(e){switch(e){case"listening":return"Finish and send voice turn";case"speaking":return"Stop spoken reply";case"unavailable":return"Retry voice connection";case"checking":return"Checking voice";case"processing":return"Cancel turn";case"thinking":return"Cancel turn";case"ready":return"Start voice turn"}}function ac(e){return e==="listening"||e==="processing"?"listen":e==="thinking"?"think":e==="speaking"?"speak":null}function cc({phase:e,disabled:t,onClick:s}){const o=ln(),r=e==="listening"||e==="speaking",c=rc(e);return n.jsx(Dn.div,{animate:r&&!o?{scale:[1,1.025,1]}:{scale:1},transition:r&&!o?{duration:2.2,ease:"easeInOut",repeat:1/0}:{duration:.18},children:n.jsx("button",{type:"button",onClick:s,disabled:t,"aria-label":c,title:c,className:"group grid h-28 w-28 place-items-center rounded-full border border-[var(--dvp-dial-border)] bg-[var(--dvp-dial-bg)] text-[var(--dvp-dial-ink)] shadow-[var(--dvp-dial-shadow)] outline-none transition-[border-color,box-shadow,transform] duration-200 hover:border-[var(--dvp-dial-border-hover)] hover:shadow-[var(--dvp-dial-shadow-hover)] focus-visible:ring-2 focus-visible:ring-[var(--dvp-focus)] focus-visible:ring-offset-4 focus-visible:ring-offset-[var(--dvp-bg)] active:scale-[0.98] disabled:cursor-wait disabled:opacity-65",children:n.jsxs("svg",{viewBox:"0 0 72 72",className:"h-[72px] w-[72px]","aria-hidden":"true",children:[n.jsx("circle",{cx:36,cy:36,r:24,fill:"none",stroke:"var(--dvp-ring)",strokeWidth:.8}),oc.map((i,a)=>n.jsx("line",{x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,stroke:r?"var(--dvp-wave-active)":"var(--dvp-wave)",strokeWidth:"1.15",strokeLinecap:"round"},a)),n.jsx("circle",{cx:36,cy:36,r:7.5,fill:r?"var(--dvp-orb-active)":"var(--dvp-orb)"})]})})})}const lc=[{id:"listen",label:"Listen"},{id:"think",label:"Think"},{id:"speak",label:"Speak"}];function uc({messages:e,pendingAsk:t,partial:s,error:o,status:r,recording:c,sending:i,speaking:a,voiceAvailable:u,voiceInputSource:l,voiceProbeState:h,voiceState:m,voiceReplies:p,settingsOpen:v,setupPanel:b,settingsPanel:S,assistantModel:k,speechIdentity:P,onPrimaryAction:j,onToggleVoiceReplies:C,onToggleSettings:L,onNewChat:N,onDiscardTake:y,onOpenLive:T,showModeSwitch:x=!0,showHeading:D=!0,showTranscript:_=!0,title:U="Direct Voice",onVoicePhaseChange:O}){const ce=ln(),le=d.useRef(null),E=nc({recording:c,sending:i,speaking:a,voiceAvailable:u,voiceProbeState:h,voiceState:m}),W=ic[E],ue=E==="checking",F=u===!1?"No microphone available":l??(u===!0?"Default input from Scout Menu":"Checking microphone…"),ne=e.slice(-12),Z=s||(i&&ne.at(-1)?.body!==t?t:null),we=ne.length===0&&!Z,Ve=ac(E),Le=k?.trim()||"Turn-based voice",_e=E==="unavailable"?"bg-[var(--dvp-dot-off)]":E==="ready"||E==="checking"?"bg-[var(--dvp-dot-idle)]":"bg-[var(--dvp-accent)]",[me,de]=d.useState(null),[ee,ke]=d.useState(0);d.useEffect(()=>{if(!c){de(null),ke(0);return}const V=Date.now();de(V);const Q=window.setInterval(()=>ke(Date.now()-V),100);return()=>window.clearInterval(Q)},[c]);const pe=c&&me!==null?`${(ee/1e3).toFixed(1)}s`:void 0,je=_?null:ki({phase:E,voiceReplies:p,inputLabel:F,inputWarn:u===!1,speechIdentity:P??null,assistantModel:k,recordingClock:pe}),M=E==="listening"||E==="processing"||E==="thinking"||E==="speaking"?"row":"card",q=V=>{V==="mic"?y?.():V==="speaker"&&C()},K=V=>{V==="new-chat"?N():L()};return d.useEffect(()=>{le.current?.scrollIntoView({block:"nearest"})},[e.length,t]),d.useEffect(()=>{O?.(E)},[O,E]),n.jsxs("section",{className:`dvp-room relative flex min-h-0 w-full flex-col bg-[var(--dvp-bg)] text-[var(--dvp-ink)] ${_?"h-full overflow-hidden":"dvp-room--instrument overflow-visible"}`,"aria-label":`${U} conversation`,children:[(D||_)&&n.jsxs("header",{className:"flex min-h-14 shrink-0 items-center justify-between gap-2 border-b border-[var(--dvp-border)] px-3 py-2.5 sm:gap-4 sm:px-7",children:[D?n.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[n.jsx("h1",{className:"truncate font-[var(--font-accent-title)] text-sm font-semibold tracking-[-0.018em] text-[var(--dvp-heading)] sm:text-base",children:U}),n.jsx("span",{className:"hidden h-4 w-px bg-[var(--dvp-divider)] sm:block","aria-hidden":"true"}),n.jsxs("div",{className:"hidden min-w-0 items-center gap-2 sm:flex","aria-live":"polite",children:[n.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${_e}`,"aria-hidden":"true"}),n.jsx("span",{className:"truncate text-xs text-[var(--dvp-muted)]",children:W.label})]})]}):n.jsx("div",{className:"min-w-0 flex-1"}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 sm:gap-2",children:[x&&n.jsxs("div",{className:"flex rounded-md border border-[var(--dvp-switch-border)] bg-[var(--dvp-switch-bg)] p-0.5",role:"tablist","aria-label":"Voice mode",children:[n.jsx("button",{type:"button",role:"tab","aria-selected":"true",className:"rounded-[4px] bg-[var(--dvp-switch-active-bg)] px-2 py-1.5 text-[11px] font-medium text-[var(--dvp-switch-active-ink)] shadow-[0_1px_2px_rgba(0,0,0,0.14)] sm:px-3",children:"Local"}),n.jsx("button",{type:"button",role:"tab","aria-selected":"false",onClick:T,disabled:!T,className:"rounded-[4px] px-2 py-1.5 text-[11px] font-medium text-[var(--dvp-switch-idle)] transition-colors hover:bg-[var(--dvp-switch-hover)] hover:text-[var(--dvp-heading)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--dvp-focus)] disabled:cursor-default disabled:opacity-45 sm:px-3",children:"Live"})]}),n.jsxs("button",{type:"button",onClick:N,className:"hidden h-8 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-[var(--dvp-btn)] transition-colors hover:bg-[var(--dvp-hover)] hover:text-[var(--dvp-btn-hover-ink)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--dvp-focus)] min-[430px]:flex sm:px-2.5","aria-label":"Start a new voice conversation",title:"New conversation",children:[n.jsx(Jo,{size:14,"aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:"New chat"})]}),n.jsx("button",{type:"button",onClick:C,className:`grid h-8 w-8 place-items-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--dvp-focus)] ${p?"bg-[var(--dvp-switch-active-bg)] text-[var(--dvp-switch-active-ink)]":"text-[var(--dvp-btn)] hover:bg-[var(--dvp-hover)] hover:text-[var(--dvp-btn-hover-ink)]"}`,"aria-pressed":p,"aria-label":p?"Mute spoken replies":"Enable spoken replies",title:p?"Spoken replies on":"Spoken replies off",children:p?n.jsx(mn,{size:15}):n.jsx(pn,{size:15})}),n.jsx("button",{type:"button",onClick:L,className:`grid h-8 w-8 place-items-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--dvp-focus)] ${v?"bg-[var(--dvp-accent-soft)] text-[var(--dvp-accent-ink)]":"text-[var(--dvp-btn)] hover:bg-[var(--dvp-hover)] hover:text-[var(--dvp-btn-hover-ink)]"}`,"aria-expanded":v,"aria-label":"Voice and Scoutbot settings",title:"Voice and Scoutbot settings",children:n.jsx(Qn,{size:15})})]})]}),_?n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:n.jsx("div",{className:"mx-auto flex min-h-full w-full max-w-[880px] flex-col px-6 py-8 sm:px-10 sm:py-10 lg:px-14",children:n.jsxs("div",{className:"w-full max-w-[720px]",children:[we?n.jsxs("div",{className:"pt-1",children:[n.jsx("p",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--dvp-meta-dim)]",children:"Conversation"}),n.jsx("p",{className:"mt-2 max-w-[38ch] text-sm leading-6 text-[var(--dvp-muted)]",children:"Your voice turns and Scout’s replies will appear here."})]}):n.jsxs("div",{className:"space-y-8 sm:space-y-9",children:[ne.map(V=>{const Q=V.role==="assistant";return n.jsxs("article",{className:"max-w-[68ch]",children:[n.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[n.jsx("span",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--dvp-meta)]",children:Q?"Scout":"You"}),Q&&n.jsx("span",{className:"text-[10px] text-[var(--dvp-meta-dim)]",children:Le})]}),Q?n.jsx("div",{className:"dvp-markdown mt-1.5 text-sm leading-6 text-[var(--dvp-body)] sm:text-base sm:leading-7",children:n.jsx(Xo,{text:Oe(V.body)})}):n.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-sm leading-6 text-[var(--dvp-body)] sm:text-base sm:leading-7",children:V.body})]},V.id)}),Z&&n.jsxs("article",{className:"max-w-[68ch]","aria-live":"polite",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--dvp-accent-ink)]",children:"You"}),n.jsx("span",{className:"text-[10px] text-[var(--dvp-you-meta)]",children:s?"Listening":"Sending"})]}),n.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-sm leading-6 text-[var(--dvp-body)] sm:text-base sm:leading-7",children:Z})]})]}),n.jsx("div",{ref:le})]})})}):null,n.jsx(ka,{initial:!1,children:(b||v||o&&_)&&n.jsx(Dn.div,{initial:ce?!1:{opacity:0,y:6},animate:{opacity:1,y:0},exit:ce?void 0:{opacity:0,y:6},className:"max-h-[34vh] shrink-0 overflow-y-auto border-y border-[var(--dvp-border)] bg-[var(--dvp-well)]",children:n.jsxs("div",{className:"mx-auto w-full max-w-[880px] px-6 py-4 sm:px-10 lg:px-14",children:[o&&_&&n.jsx("p",{className:"mb-3 text-sm leading-6 text-[var(--dvp-error)]",children:o}),b,v&&S]})})}),n.jsx("div",{className:_?"shrink-0 px-5 pb-4 pt-3 sm:px-8 sm:pb-5":"dvp-instrument-stage",children:!_&&je?n.jsxs(n.Fragment,{children:[n.jsx(Zo,{spec:je,layout:M,onCta:j,onFlag:q,onTail:K}),o&&n.jsx("p",{className:"dvp-instrument-error",children:o})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-col items-center text-center",children:[n.jsx(cc,{phase:E,disabled:ue,onClick:j}),n.jsxs("div",{className:"mt-3","aria-live":"polite",children:[n.jsx("p",{className:"text-sm font-semibold text-[var(--dvp-phase)]",children:W.label}),n.jsx("p",{className:"mt-0.5 text-xs text-[var(--dvp-helper)]",children:W.helper})]})]}),_&&n.jsxs("footer",{className:"mx-auto mt-4 flex w-full max-w-[880px] flex-col items-stretch justify-between gap-2 border-t border-[var(--dvp-border)] pt-3 text-[11px] text-[var(--dvp-footer)] sm:flex-row sm:items-center sm:gap-4",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsx(Qo,{size:12,className:"shrink-0 text-[var(--dvp-mic-icon)]","aria-hidden":"true"}),n.jsxs("span",{className:"truncate",children:["Input: ",F]})]}),n.jsx("div",{className:"flex shrink-0 items-center justify-between gap-3 sm:justify-start","aria-label":`Voice turn state: ${W.label}`,children:lc.map(V=>{const Q=Ve===V.id;return n.jsx("span",{className:Q?"font-medium text-[var(--dvp-stage-active)]":"text-[var(--dvp-stage-dim)]","aria-current":Q?"step":void 0,children:V.label},V.id)})}),r&&!i&&E!=="listening"&&n.jsx("span",{className:"hidden max-w-48 truncate text-right text-[var(--dvp-stage-dim)] lg:block",children:r})]})]})})]})}function zo({icon:e,title:t,onClick:s,disabled:o,active:r,badge:c}){return n.jsxs("button",{type:"button",title:t,"aria-label":t,onClick:s,disabled:o,className:`flex shrink-0 items-center gap-1 rounded border p-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${r?"border-lime-300/50 bg-lime-300/10 text-lime-200":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[e,c&&n.jsx("span",{className:"font-mono text-3xs tracking-tight",children:c})]})}function Fo({issue:e,probeState:t,onLaunch:s,onRetry:o,onSettings:r,onDismiss:c}){const i=t==="probing"||t==="launching";return n.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/15 px-2.5 py-2 font-mono text-xs text-[var(--scout-chrome-ink)]",children:[n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(to,{size:13,className:"mt-0.5 shrink-0 text-[var(--scout-chrome-ink-faint)]"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:"Scout Voice"}),n.jsx("p",{className:"mt-1 leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Open Scout Menu to use speech."}),e&&n.jsx("p",{className:"mt-2 break-words leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:e})]}),c?n.jsx("button",{type:"button",title:"Hide voice setup","aria-label":"Hide voice setup",onClick:c,className:"shrink-0 rounded border border-transparent p-1 text-[var(--scout-chrome-ink-ghost)] transition-colors hover:border-[var(--scout-chrome-border-soft)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:n.jsx(sr,{size:11})}):null]}),n.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1.5",children:[n.jsx(us,{icon:t==="launching"?n.jsx(Ne,{size:12,className:"animate-spin"}):n.jsx(to,{size:12}),label:t==="launching"?"Opening":"Open",onClick:s,disabled:t==="probing",title:"Open Scout services"}),n.jsx(us,{icon:t==="probing"?n.jsx(Ne,{size:12,className:"animate-spin"}):n.jsx(or,{size:12}),label:"Retry",onClick:o,disabled:i,title:"Check Scout voice again"}),n.jsx(us,{icon:n.jsx(nr,{size:12}),label:"Voice",onClick:r,disabled:t==="probing",title:"Open Scoutbot voice settings"})]})]})}function us({icon:e,label:t,onClick:s,disabled:o,title:r}){return n.jsxs("button",{type:"button",title:r,onClick:s,disabled:o,className:"flex min-h-7 items-center justify-center gap-1.5 rounded border border-[var(--scout-chrome-border-soft)] px-2 text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-45",children:[e,t]})}const mt="gpt-4o-mini-tts",Ht={openai:"OpenAI",elevenlabs:"ElevenLabs",nvidia:"NVIDIA",system:"System"},ys="us-woman",xt=[{id:"us-woman",label:"US Woman",locale:"US English",presentation:"Woman",voiceName:"Marin",description:"Warm, clear, and conversational.",provider:"openai",accentFromPrompt:!1,speech:{modelId:mt,voiceId:"marin",instructions:"Speak in clear, natural American English with a warm, grounded feminine presentation. Keep the delivery conversational and responsive."}},{id:"us-man",label:"US Man",locale:"US English",presentation:"Man",voiceName:"Cedar",description:"Grounded, calm, and direct.",provider:"openai",accentFromPrompt:!1,speech:{modelId:mt,voiceId:"cedar",instructions:"Speak in clear, natural American English with a warm, grounded masculine presentation. Keep the delivery conversational and responsive."}},{id:"british-woman",label:"British Woman",locale:"British English",presentation:"Woman",voiceName:"Marin",description:"Warm with a subtle British cadence.",provider:"openai",accentFromPrompt:!0,speech:{modelId:mt,voiceId:"marin",instructions:"Speak in natural British English with a subtle contemporary British accent and a warm, grounded feminine presentation. Avoid theatrical or exaggerated delivery."}},{id:"british-man",label:"British Man",locale:"British English",presentation:"Man",voiceName:"Cedar",description:"Calm with a subtle British cadence.",provider:"openai",accentFromPrompt:!0,speech:{modelId:mt,voiceId:"cedar",instructions:"Speak in natural British English with a subtle contemporary British accent and a calm, grounded masculine presentation. Avoid theatrical or exaggerated delivery."}}],st={modelId:mt,voiceId:"marin",instructions:"Speak naturally, clearly, and conversationally."},dc={modelId:"",voiceId:"",instructions:"",playback:"host"};function hc(e){return e==="custom"||e==="device"||xt.some(t=>t.id===e)}function Rn(e,t={}){return e==="device"?dc:e==="custom"?{modelId:t.modelId?.trim()||st.modelId,voiceId:t.voiceId?.trim()||st.voiceId,instructions:t.instructions?.trim()||st.instructions}:xt.find(s=>s.id===e)?.speech??xt.find(s=>s.id===ys).speech}function mc(e,t={}){if(e==="device")return{selectionId:e,voiceLabel:"This Mac",provider:"system",providerLabel:Ht.system,modelId:"",voiceId:"",metered:!1};const s=xt.find(r=>r.id===e);if(s)return{selectionId:e,voiceLabel:s.voiceName,provider:s.provider,providerLabel:Ht[s.provider],modelId:s.speech.modelId,voiceId:s.speech.voiceId,metered:s.provider!=="system"};const o=Rn("custom",t);return{selectionId:"custom",voiceLabel:o.voiceId||"Custom",provider:"openai",providerLabel:Ht.openai,modelId:o.modelId,voiceId:o.voiceId,metered:!0}}function $o({presentation:e,voicePresetId:t,onVoicePresetId:s,speechSelectionId:o,onSpeechSelectionId:r,customSpeechModelId:c,onCustomSpeechModelId:i,customSpeechVoiceId:a,onCustomSpeechVoiceId:u,customSpeechInstructions:l,onCustomSpeechInstructions:h,voiceDefaults:m,modelDraft:p,onModelDraft:v,modelOptions:b=[],promptDraft:S,onPromptDraft:k,configLoading:P,configSaving:j,configError:C,configStatus:L,onSave:N,onReload:y}){const T=e==="direct-voice";return n.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-surface)] p-3",children:n.jsxs("div",{className:"flex flex-col gap-3",children:[T?n.jsxs("fieldset",{className:"flex flex-col gap-2",children:[n.jsx("legend",{className:"mb-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Scout voice"}),n.jsx("div",{className:"grid grid-cols-2 gap-2",role:"radiogroup","aria-label":"Scout voice",children:xt.map(x=>{const D=o===x.id;return n.jsxs("button",{type:"button",role:"radio","aria-checked":D,onClick:()=>r(x.id),className:`min-h-20 rounded border p-2.5 text-left transition ${D?"border-[var(--hud-accent)] bg-[var(--hud-accent-soft)] text-[var(--scout-chrome-ink)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)]"}`,children:[n.jsx("span",{className:"block font-mono text-xs font-bold uppercase tracking-[0.1em]",children:x.label}),n.jsxs("span",{className:"mt-1 block font-mono text-2xs leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:[x.voiceName," · ",x.description]}),n.jsxs("span",{className:"mt-1 block font-mono text-2xs leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:[Ht[x.provider]," · ",x.speech.modelId," · ",x.speech.voiceId]}),x.accentFromPrompt&&n.jsx("span",{className:"mt-1 block font-mono text-2xs leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Accent is prompted, not a separate voice."})]},x.id)})}),n.jsxs("button",{type:"button",role:"radio","aria-checked":o==="device",onClick:()=>r("device"),className:`rounded border px-2.5 py-2 text-left font-mono text-xs transition ${o==="device"?"border-[var(--hud-accent)] bg-[var(--hud-accent-soft)] text-[var(--scout-chrome-ink)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)]"}`,children:[n.jsx("span",{className:"block font-bold uppercase tracking-[0.1em]",children:"This Mac's voice"}),n.jsx("span",{className:"mt-1 block leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Speaks through Scout Menu in its own Settings › Voice pick. The only way to hear installed voices such as Kokoro."})]}),n.jsxs("button",{type:"button",role:"radio","aria-checked":o==="custom",onClick:()=>r("custom"),className:`rounded border px-2.5 py-2 text-left font-mono text-xs transition ${o==="custom"?"border-[var(--hud-accent)] bg-[var(--hud-accent-soft)] text-[var(--scout-chrome-ink)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)]"}`,children:[n.jsx("span",{className:"block font-bold uppercase tracking-[0.1em]",children:"Custom voice"}),n.jsx("span",{className:"mt-1 block leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Use any supported model, voice, and style."})]}),o==="custom"&&n.jsxs("div",{className:"grid gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] p-2.5",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[n.jsxs("label",{className:"flex flex-col gap-1 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Speech model",n.jsx("input",{value:c,onChange:x=>i(x.target.value),placeholder:"gpt-4o-mini-tts",className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]"})]}),n.jsxs("label",{className:"flex flex-col gap-1 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Voice ID",n.jsx("input",{value:a,onChange:x=>u(x.target.value),placeholder:"marin",className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]"})]})]}),n.jsxs("label",{className:"flex flex-col gap-1 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Speaking style",n.jsx("textarea",{value:l,onChange:x=>h(x.target.value),rows:3,placeholder:"Speak naturally, clearly, and conversationally.",className:"w-full resize-y rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]"})]})]}),n.jsx("p",{className:"font-mono text-2xs normal-case leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Request-based TTS, separate from GPT Live. Replies are AI-generated speech."})]}):n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Voice FX",n.jsx("select",{value:t,onChange:x=>s(x.target.value),className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)]",children:so.map(x=>n.jsxs("option",{value:x.id,children:[x.label," — ",x.family]},x.id))}),n.jsx("span",{className:"font-mono text-2xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink-ghost)]",children:so.find(x=>x.id===t)?.description??"Custom voice mood for spoken replies."})]}),n.jsxs("div",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Scout Voice",n.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)]",children:m?`${m.modelId}${m.voiceId?` / ${m.voiceId}`:""}`:"Unavailable"})]})]}),n.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Preferred model",b.length>0?n.jsx("select",{value:p,onChange:x=>v(x.target.value),className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)] bg-[var(--hud-bg)]",disabled:P||j,children:b.map(x=>n.jsx("option",{value:x.id,children:x.label},x.id))}):n.jsx("input",{value:p,onChange:x=>v(x.target.value),placeholder:"gpt-5.6-luna",className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]",disabled:P||j})]}),n.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["System Prompt",n.jsx("textarea",{value:S,onChange:x=>k(x.target.value),rows:6,className:"w-full resize-y rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink)] bg-[var(--hud-bg)]",disabled:P||j})]}),C&&n.jsx("div",{className:"font-mono text-xs leading-relaxed text-[var(--hud-status-error)]",children:C}),L&&n.jsx("div",{className:"font-mono text-xs leading-relaxed text-[var(--hud-accent)]",children:L}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{type:"button",onClick:N,disabled:P||j||!S.trim(),className:"flex items-center justify-center gap-2 rounded bg-[var(--hud-accent)] px-2.5 py-2 font-mono text-xs font-bold uppercase tracking-[0.12em] text-black transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:[(P||j)&&n.jsx(Ne,{size:13,className:"animate-spin"}),j?"Saving":"Save"]}),n.jsx("button",{type:"button",onClick:y,disabled:P||j,className:"rounded border border-[var(--scout-chrome-border-soft)] px-2.5 py-2 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] disabled:cursor-not-allowed disabled:opacity-40",children:"Reload"})]})]})})}const pc="chill-dispatcher",fc=6e4,vc=2500,gc=1.2,xc={lowCutHz:160,highCutHz:5200,bandQ:.35,saturationAmount:.035,bitcrushAmount:0,hissGain:0,hissCutoffHz:1800,presencePeakDb:1.5,presenceCenterHz:1500,presenceQ:.65,compressorThresholdDb:-15,compressorRatio:2.2,clickEnabled:!0,clickGain:.24,clickDurationMs:45,squelchTailEnabled:!0,squelchTailGain:.018,squelchTailDurationMs:95,outputGain:1,wetMix:.38};function yc(e){const t=Math.min(1,e/8);return{saturationAmount:.035+t*.025,presencePeakDb:1.5+t*1.5}}function bc(e,t){return{...e==="chill-dispatcher"?xc:{},...yc(t)}}function An(e,t,s){return new Promise((o,r)=>{const c=window.setTimeout(()=>r(new Error(s)),t);e.then(o,r).finally(()=>window.clearTimeout(c))})}async function ht(e,t={}){!e.sessionId&&!t.allowCurrentSession||await An(e.cancel(),vc,"Timed out releasing Scout voice session.").catch(()=>{})}function Sc(e){const t=e instanceof Error?e.message:String(e);return/session_cancelled|was cancelled|cancelled/i.test(t)}const Wo=new RegExp("(?:^|(?<=[\\s(`'\"<>]))(?:~\\/|\\/(?:Users|home|opt|var|etc|tmp|private)\\/)[^\\s)`'\"<>]+\\.[A-Za-z0-9]{1,8}\\b","g");function wc(e){const t=[],s=new Set;Wo.lastIndex=0;let o;for(;(o=Wo.exec(e))!==null;)s.has(o[0])||(s.add(o[0]),t.push(o[0]));return t}function Ho(e){const t=e.split("/").filter(Boolean);return t.length<=2?e:`…/${t.slice(-2).join("/")}`}function kc(){return{requesterName:"OpenScout",productName:"Scout Voice",headline:"Turn on local voice",body:"Scout voice handles local speech capture and spoken replies. Start Scout services, then return here to talk with your workspace.",actionLabel:"Return to OpenScout",logo:{url:new URL("/openscout-icon.png",window.location.href).toString(),symbolName:"sparkles"}}}const jc=["Explain what went wrong here.","Help me rewrite this message.","What should I try next?"];function Cc({height:e,forceExpanded:t=!1,fill:s=!1,presentation:o="chat",onOpenLive:r,voiceModeSwitch:c=!0,voiceTitle:i,voiceHeading:a=!0,voiceTranscript:u=!0,onVoicePhaseChange:l,onSpeechIdentityChange:h,onLedgerEvent:m}={}){const{applyScoutbotUiAction:p,agents:v,route:b,onlineCount:S}=zs(),k=Gn(),P=Yo(qo,!0),j=bs(),C=P&&(j.state==="connecting"||j.state==="live"),[L,N]=Hs("openscout.scoutbot.collapsed",!0),[y,T]=d.useState(""),[x,D]=d.useState(!1),[_,U]=d.useState(null),[O,ce]=d.useState(null),[le,E]=d.useState(null),[W,ue]=d.useState("idle"),[F,ne]=Hs("openscout.scoutbot.voiceReplies",!1),[Z]=ri("openscout.scoutbot.voiceSpeed",gc),[we,Ve]=ut("openscout.scoutbot.voicePresetId",pc),[Le,_e]=ut("openscout.scoutbot.speechProfileId",ys),[me,de]=ut("openscout.scoutbot.customSpeechModelId",st.modelId),[ee,ke]=ut("openscout.scoutbot.customSpeechVoiceId",st.voiceId),[pe,je]=ut("openscout.scoutbot.customSpeechInstructions",st.instructions),[M,q]=d.useState(!1),[K,V]=d.useState(null),[Q,De]=d.useState(""),[fe,Ue]=d.useState(!1),[Ce,yt]=d.useState(null),[ot,ze]=d.useState(null),[Fe,te]=d.useState(null),[$e,X]=d.useState(null),[Re,Be]=d.useState(!1),[bt,We]=d.useState(!1),[H,Ee]=d.useState(null),[Ae,St]=d.useState(!1),[nt,wt]=d.useState(null),[kt,jt]=d.useState(!1),[Ct,it]=d.useState(!1),[Et,ve]=d.useState(null),[R,ie]=d.useState(null),[re,Pt]=d.useState(""),[ks,js]=d.useState([]),[Tt,Nt]=d.useState(""),[Cs,Es]=d.useState(null),[Mn,He]=d.useState(!1),[Vn,Ge]=d.useState(0),[Bn,Lt]=d.useState(!1),[Xt,Ps]=d.useState(null),Ye=hc(Le)?Le:ys,ae=d.useMemo(()=>Rn(Ye,{modelId:me,voiceId:ee,instructions:pe}),[pe,me,ee,Ye]),Jt=d.useMemo(()=>mc(Ye,{modelId:me,voiceId:ee,instructions:pe}),[pe,me,ee,Ye]),Dt=d.useRef(hi()),qe=d.useRef(!1),xe=d.useRef(null),Ie=d.useRef(null),Me=d.useRef(null),ye=d.useRef(null),rt=d.useRef(F);rt.current=F;const Ts=d.useRef(m);Ts.current=m;const B=d.useCallback(f=>{Ts.current?.(f)},[]);d.useEffect(()=>(qe.current=!0,()=>{qe.current=!1,Ie.current="discard";const f=xe.current;xe.current=null,f&&ht(f,{allowCurrentSession:!0}),Me.current?.abort(),ye.current?.stop(),ye.current=null}),[]),d.useEffect(()=>{h?.(Jt)},[h,Jt]);const Y=d.useCallback(()=>{ye.current?.stop(),ye.current=null,Ue(!1)},[]),Rt=d.useCallback(f=>{if(!f)return;Y();const g=Oo(f);B({t:"prep-open",at:Date.now(),label:ae.playback==="host"?"speech on this Mac":"tts"});const w=()=>{B({t:"speak-open",at:Date.now(),text:g.slice(0,180)})},A=o==="direct-voice"?mi(g,{speed:Z,modelId:ae.modelId,voiceId:ae.voiceId,instructions:ae.instructions,playback:ae.playback,onPlaybackStart:w}):pi(g,{speed:Z,presetId:we,params:bc(we,S),onPlaybackStart:w});ye.current=A,Ue(!0),A.promise.catch(I=>{if(!Qt(I)){const $=I instanceof Error?I.message:String(I);console.warn("[scoutbot] reply speech unavailable",{message:$}),U($)}}).finally(()=>{ye.current===A&&(ye.current=null,Ue(!1),B({t:"speak-close",at:Date.now()}),B({t:"close",at:Date.now()}))})},[B,Y,Z,ae,S,o,we]),Ns=d.useCallback(f=>{rt.current&&Rt(f)},[Rt]),Ls=d.useCallback(f=>{Rt(Oe(f))},[Rt]),{openFilePreview:Ds}=zs(),Rs=Yn(),On=d.useCallback((f,g)=>{const w=window.getSelection()?.toString().trim(),A=Oe(g),I=wc(A),$=[];if(w&&($.push({kind:"action",label:"Copy selection",shortcut:"⌘C",onSelect:()=>{Ut(w)}}),$.push({kind:"separator"})),$.push({kind:"action",label:"Copy message",onSelect:()=>{Ut(A)}}),I.length>0){$.push({kind:"separator"});for(const z of I.slice(0,5)){const Je=Ho(z);$.push({kind:"action",label:`Preview ${Je}`,onSelect:()=>Ds(z)})}for(const z of I.slice(0,5)){const Je=Ho(z);$.push({kind:"action",label:`Open ${Je} in OS`,onSelect:()=>{be("/api/file/reveal",{method:"POST",body:JSON.stringify({path:z})}).catch(()=>{})}})}$.push({kind:"action",label:I.length===1?"Copy path":"Copy first path",onSelect:()=>{Ut(I[0])}})}$.push({kind:"separator"}),$.push({kind:"action",label:fe?"Say again (stop current)":"Say",onSelect:()=>Ls(g)}),Rs(f,$)},[Ds,Ls,Rs,fe]);d.useEffect(()=>()=>{Y()},[Y]);const _n=jc,Xe=d.useCallback(f=>{const g=[...f.messages].reverse().find(A=>A.role==="user"),w=[...f.messages].reverse().find(A=>A.role==="assistant");ze(g?.body??null),te(w?Oe(w.body):null)},[]),at=d.useCallback(async()=>{try{const f=await be("/api/scoutbot/session");Ee(f),Xe(f.session)}catch{Ee(null)}},[Xe]);d.useEffect(()=>{at()},[at]);const At=d.useCallback(async()=>{jt(!0),ve(null);try{const f=await be("/api/scoutbot/config");Pt(f.model),js(f.modelOptions??[]),Nt(f.systemPrompt),ie(null)}catch(f){ve(f instanceof Error?f.message:"Could not load settings.")}finally{jt(!1)}},[]);d.useEffect(()=>{Re&&At()},[At,Re]),d.useEffect(()=>{if(!Re)return;let f=!1;return be("/api/voice/defaults").then(g=>{f||Es(g)}).catch(()=>{f||Es(null)}),()=>{f=!0}},[Re]);const As=d.useCallback(async()=>{it(!0),ve(null),ie(null);try{const f=await be("/api/scoutbot/config",{method:"POST",body:JSON.stringify({model:re,systemPrompt:Tt})});Pt(f.config.model),js(f.config.modelOptions??[]),Nt(f.config.systemPrompt),ie("Saved")}catch(f){ve(f instanceof Error?f.message:"Could not save settings.")}finally{it(!1)}},[re,Tt]),Un=d.useCallback(async f=>{if(!(!f||Xt)){Ps(f),U(null),Me.current?.abort(),Y();try{const g=await be("/api/scoutbot/session/switch",{method:"POST",body:JSON.stringify({id:f})});Ee(g),Xe(g.session),Lt(!1),He(!1),window.dispatchEvent(new CustomEvent(lt,{detail:{id:g.session.id}}))}catch(g){U(g instanceof Error?g.message:"Could not switch session.")}finally{Ps(null)}}},[Y,Xt,Xe]),It=d.useCallback(async()=>{if(!Ae){if(Me.current?.abort(),H?.session.messages.length===0){T(""),U(null),He(!1),Lt(!1),X("New chat ready"),Ge(f=>f+1);return}St(!0),U(null),X("Starting new chat"),Y();try{const f=await be("/api/scoutbot/session/reset",{method:"POST"});Ee(f),T(""),ze(null),te(null),He(!1),Lt(!1),X("New chat ready"),Ge(g=>g+1),window.dispatchEvent(new CustomEvent(lt,{detail:{id:f.session.id}}))}catch(f){X(null),U(f instanceof Error?f.message:"Could not start a new chat.")}finally{St(!1)}}},[Ae,H,Y]),zn=d.useCallback(async f=>{if(!(!f||nt)){wt(f),U(null),Me.current?.abort(),Y();try{const g=await be("/api/scoutbot/session/archive",{method:"POST",body:JSON.stringify({id:f})});Ee(g),Xe(g.session),He(!1),X("session archived"),window.dispatchEvent(new CustomEvent(lt,{detail:{id:g.session.id}}))}catch(g){U(g instanceof Error?g.message:"Could not archive session.")}finally{wt(null)}}},[nt,Y,Xe]),Mt=d.useCallback((f,g)=>{ce(g),yt(f.activeInputDeviceName),E(g?null:f.lastUnavailableReason??"Scout voice service is not reachable."),ue("idle")},[]),Pe=d.useCallback(async(f=!1)=>{const g=Dt.current;ue(A=>A==="launching"?A:"probing");const w=await g.probe(f?{force:!0}:void 0);return Mt(g,w),w},[Mt]);d.useEffect(()=>{fi();const f=Dt.current,g=vi(w=>{ce(w.ok),yt(w.inputDeviceName),E(w.ok?null:w.reason),ue("idle")});return f.connectionState==="unknown"?Pe():Mt(f,f.connectionState==="connected"),g},[Mt,Pe]);const Is=d.useCallback(()=>{const f=Dt.current;U(null),ue("launching"),f.launch({source:"openscout",context:kc()}),window.setTimeout(()=>{Pe(!0)},2400)},[Pe]),Vt=d.useCallback(f=>{for(const g of ai(f))g.type!=="reminder"&&(B({t:"action",at:Date.now(),label:Ki(g)}),g.type==="ask-agent"?(X(`Sending to ${g.targetLabel}`),be("/api/scoutbot/actions/ask",{method:"POST",body:JSON.stringify({targetLabel:g.targetLabel,targetAgentId:g.targetAgentId,body:g.body,channel:g.channel})}).then(w=>{X(w.flightId?`Sent to ${w.targetAgentId??w.targetLabel} · run ${w.flightId}`:`Sent to ${w.targetAgentId??w.targetLabel}`)}).catch(w=>{X(null),U(w instanceof Error?w.message:"Could not send to agent.")})):p(g))},[p,B]),Ms=d.useCallback(f=>{const g=Oe(f);te(g),B({t:"bot-close",at:Date.now()}),Vt(f),rt.current||B({t:"close",at:Date.now()}),Ns(g)},[Vt,B,Ns]);d.useEffect(()=>{const f=()=>{X("Scoutbot replied by voice"),at()},g=()=>{X("Scoutbot chat changed"),at()};return window.addEventListener(Fs,f),window.addEventListener(lt,g),()=>{window.removeEventListener(Fs,f),window.removeEventListener(lt,g)}},[at]);const Vs=d.useCallback(async(f,g)=>{Y();const w=Ja({speed:Z,modelId:ae.modelId,voiceId:ae.voiceId,instructions:ae.instructions,playback:ae.playback,toSpoken:Oo},{onPrepareStart:()=>{Ue(!0),B({t:"prep-open",at:Date.now(),label:ae.playback==="host"?"speech on this Mac":"tts"})},onPlaybackStart:z=>{B({t:"speak-open",at:Date.now(),text:z.slice(0,180)})}}),A={promise:w.promise,stop:w.stop};ye.current=A,w.promise.catch(z=>{if(!Qt(z)){const Je=z instanceof Error?z.message:String(z);console.warn("[scoutbot] reply speech unavailable",{message:Je}),U(Je)}}).finally(()=>{ye.current===A&&(ye.current=null,Ue(!1),B({t:"speak-close",at:Date.now()}),B({t:"close",at:Date.now()}))});let I=!1,$=null;try{await Xa({body:f,route:b,uiContext:{...$s("web"),usageMode:o==="direct-voice"?"local":"chat"},signal:g.signal},{onSentence:z=>w.push(z),onFinal:z=>{I=!0,w.finish(),!g.signal.aborted&&(Ee({session:z.session,sessions:z.sessions,config:z.config}),X("Reply received"),te(Oe(z.reply.body)),B({t:"bot-close",at:Date.now()}),Vt(z.reply.body))},onError:({message:z})=>{$=new Error(z),B({t:"bot-close",at:Date.now()}),w.finish()}})}catch(z){throw w.finish(),z}if($)throw $;if(!I&&!g.signal.aborted)throw w.finish(),new Error("Scoutbot reply stream ended before the reply completed.")},[Vt,B,o,b,ae,Y,Z]),ct=d.useCallback(async(f,g)=>{const w=f.trim();if(!w||x)return;const A=new AbortController;Me.current=A,D(!0),U(null),ze(w),te(null),X("Sending"),B({t:"bot-open",at:Date.now(),label:H?.config.model??H?.session.model??"reply"}),T(I=>I.trim()===w?"":I);try{if(await ii().catch(()=>null),A.signal.aborted)return;if(g?.streamVoiceReply){await Vs(w,A);return}const I=await be("/api/scoutbot/chat",{method:"POST",body:JSON.stringify({body:w,route:b,uiContext:{...$s("web"),usageMode:o==="direct-voice"?"local":"chat"}}),signal:A.signal});if(A.signal.aborted)return;Ee({session:I.session,sessions:I.sessions,config:I.config}),X("Reply received"),Ms(I.reply.body)}catch(I){X(null),!A.signal.aborted&&!Qt(I)&&U(I instanceof Error?I.message:"Could not send.")}finally{Me.current===A&&(Me.current=null),D(!1),A.signal.aborted&&(B({t:"bot-close",at:Date.now()}),B({t:"close",at:Date.now()}))}},[B,Ms,o,b,Vs,x,H]),Bs=d.useCallback(async()=>{if(M)return;const f=Dt.current;if(Ie.current=null,U(null),De(""),V("starting"),gi(),O!==!0&&!await Pe(!0)){V(null);return}let g=null,w=!1;const A=async()=>{!g||w||(w=!0,await ht(g,{allowCurrentSession:xe.current===g}),xe.current===g&&(xe.current=null))};try{if(g=await f.startLive({onState:V,onPartial:De},{surface:o==="direct-voice"?"direct-voice":"chat-composer"}),!qe.current){await ht(g,{allowCurrentSession:!0});return}xe.current=g,q(!0),B({t:"you-open",at:Date.now()});const I=await g.result;if(await A(),!qe.current)return;if(q(!1),De(""),B({t:"you-close",at:Date.now(),text:I.text}),B({t:"host-close",at:Date.now()}),Ie.current){B({t:"close",at:Date.now()});return}if(V("done"),I.text){const $=o==="direct-voice"&&rt.current&&ae.playback!=="host";await ct(I.text,$?{streamVoiceReply:!0}:void 0)}else B({t:"close",at:Date.now()})}catch(I){const $=Ie.current;if(!qe.current)return;const z=!!$||Sc(I);if(await A(),q(!1),De(""),$==="stop-failed")return;V(z?null:"error"),B({t:"host-close",at:Date.now()}),B({t:"close",at:Date.now()}),z||U(I instanceof Error?I.message:"Scout voice recording failed.")}finally{qe.current&&await A(),Ie.current=null}},[ct,B,o,Pe,M,ae,O]),Os=d.useCallback(async()=>{const f=xe.current;if(f){V("processing"),B({t:"you-close",at:Date.now(),text:Q}),B({t:"host-open",at:Date.now(),label:"transcribe"});try{await An(f.stop(),fc,"Scout voice did not finish processing the recording.")}catch(g){const w=Ie.current==="discard";Ie.current??="stop-failed",await ht(f,{allowCurrentSession:!0}),xe.current===f&&(xe.current=null,q(!1),De(""),V(w?null:"error")),w||U(g instanceof Error?`Scout voice recording did not finish: ${g.message}`:"Scout voice recording did not finish.")}}},[B,Q]),Kt=d.useCallback(async()=>{const f=xe.current;f&&(Ie.current="discard",await ht(f,{allowCurrentSession:!0}))},[]),_s=d.useCallback(async()=>{Me.current?.abort(),Y(),await Kt()},[Kt,Y]);d.useEffect(()=>{const f=()=>N(!1);return window.addEventListener("scout:scoutbot-panel-open",f),()=>window.removeEventListener("scout:scoutbot-panel-open",f)},[N]),d.useEffect(()=>Zn(()=>N(!L)),[L,N]),d.useEffect(()=>{const f=g=>{const w=g.detail,A=w&&typeof w=="object"&&"body"in w?w.body:null;typeof A=="string"&&A.trim()&&(N(!1),ct(A))};return window.addEventListener(Gs,f),()=>window.removeEventListener(Gs,f)},[ct,N]),d.useEffect(()=>{const f=g=>{const w=g.detail,A=w&&typeof w=="object"&&"body"in w?w.body:null;typeof A=="string"&&A.trim()&&(N(!1),T(A),Ge(I=>I+1))};return window.addEventListener("scout:scoutbot-compose",f),()=>window.removeEventListener("scout:scoutbot-compose",f)},[N]);const Us=d.useMemo(()=>{const f=fe?"speaking":x?"thinking":M?"listening":"idle",g=H?.session??null,w=g&&g.messages.length>0?g.messages[g.messages.length-1]:null;return{activity:f,brief:{lastDeliveredAt:null},reminders:{dueCount:0,upcomingCount:0,due:[],next:null},voice:{available:O,setupBlocked:O===!1,replies:F},error:_,session:{title:g?.title??null,lastActivityAt:w?.createdAt??g?.updatedAt??null},conversation:{messageCount:g?.messages.length??0,loading:H===null}}},[fe,x,M,O,F,_,H]);d.useEffect(()=>{k?.publishState(Us)},[k,Us]),d.useEffect(()=>{if(!k)return;const f={focusScoutbot:()=>N(!1),triggerBrief:()=>{N(!1),Ge(g=>g+1)},triggerAskState:()=>{N(!1),Ge(g=>g+1)},toggleVoiceReplies:()=>{const g=!F;ne(g),g||Y()},openScoutbotSettings:()=>{N(!1),Be(!0)},startNewChat:()=>{N(!1),Ae||It()},dismissReminder:()=>{},askReminderStatus:()=>{N(!1),Ge(g=>g+1)}};k.registerActions(f)},[k,N,F,ne,Y,Be,Ae,It]),d.useEffect(()=>{O===!0&&We(!1)},[O]);const Fn=C?"Live call":M?K==="processing"?"Sending":"Stop":W==="probing"?"Checking Voice":W==="launching"?"Opening Scout":O===!1?"Open Scout":"Start Talking",$n=H!==null&&H.session.messages.length===0&&!x;if(o==="direct-voice")return n.jsx(uc,{messages:H?.session.messages??[],pendingAsk:x?ot:null,partial:Q,error:_,status:$e,recording:M,sending:x,speaking:fe,voiceAvailable:O,voiceInputSource:Ce,voiceProbeState:W,voiceState:K,voiceReplies:F,settingsOpen:Re,assistantModel:H?.session.model??H?.config.model??null,speechIdentity:Jt,setupPanel:O===!1?n.jsx(Fo,{issue:le,probeState:W,onLaunch:Is,onRetry:()=>{Pe(!0)},onSettings:()=>Be(!0),onDismiss:()=>We(!1)}):null,settingsPanel:n.jsx($o,{presentation:"direct-voice",voicePresetId:we,onVoicePresetId:Ve,speechSelectionId:Ye,onSpeechSelectionId:_e,customSpeechModelId:me,onCustomSpeechModelId:de,customSpeechVoiceId:ee,onCustomSpeechVoiceId:ke,customSpeechInstructions:pe,onCustomSpeechInstructions:je,voiceDefaults:Cs,modelDraft:re,onModelDraft:Pt,modelOptions:ks,promptDraft:Tt,onPromptDraft:Nt,configLoading:kt,configSaving:Ct,configError:Et,configStatus:R,onSave:()=>{As()},onReload:()=>{At()}}),onPrimaryAction:()=>{x||M&&K==="processing"?_s():fe?Y():M?Os():O===!1?Pe(!0):Bs()},onToggleVoiceReplies:()=>{const f=!F;rt.current=f,ne(f),f||Y()},onToggleSettings:()=>Be(f=>!f),onDiscardTake:()=>{Kt()},onNewChat:()=>{_s().finally(()=>{Ae||It()})},onOpenLive:r,showModeSwitch:c,showHeading:a,showTranscript:u,title:i,onVoicePhaseChange:l});if(L&&!t)return n.jsx("div",{className:"flex shrink-0 items-center border-t border-[var(--scout-chrome-border-soft)] px-3 py-1.5",children:n.jsx(ei,{})});const Wn=s?"flex h-full min-h-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]":e===void 0?"flex max-h-[60vh] shrink-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]":"flex shrink-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]",Hn=e===void 0||s?void 0:{height:`${e}px`};return n.jsxs("section",{className:Wn,style:Hn,children:[n.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-3 pt-2.5 pb-1.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("div",{className:"flex min-w-0 items-center gap-2",children:n.jsx(ir,{size:20,className:"shrink-0 text-lime-300","aria-hidden":"true"})}),n.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[n.jsx(zo,{icon:F?n.jsx(mn,{size:11}):n.jsx(pn,{size:11}),title:C?F?"Voice replies on for typed chat (live call has its own audio)":"Voice replies off for typed chat (live call has its own audio)":F?"Voice replies on (click to mute)":"Voice replies off (click to enable)",onClick:()=>{const f=!F;ne(f),f||Y()},active:F}),!t&&n.jsx(zo,{icon:n.jsx(ds,{size:11}),title:"Minimize",onClick:()=>N(!0)})]})]}),Re&&n.jsx($o,{presentation:"chat",voicePresetId:we,onVoicePresetId:Ve,speechSelectionId:Ye,onSpeechSelectionId:_e,customSpeechModelId:me,onCustomSpeechModelId:de,customSpeechVoiceId:ee,onCustomSpeechVoiceId:ke,customSpeechInstructions:pe,onCustomSpeechInstructions:je,voiceDefaults:Cs,modelDraft:re,onModelDraft:Pt,modelOptions:ks,promptDraft:Tt,onPromptDraft:Nt,configLoading:kt,configSaving:Ct,configError:Et,configStatus:R,onSave:()=>{As()},onReload:()=>{At()}})]}),n.jsx("div",{className:"flex min-h-0 flex-1 flex-col px-3 pb-1.5",children:H&&n.jsx(Ka,{state:H,chatExpanded:Mn,onToggleExpanded:()=>He(f=>!f),sessionPickerOpen:Bn,onToggleSessionPicker:()=>Lt(f=>!f),onStartNewChat:()=>{It()},startingNewChat:Ae,onSwitchSession:f=>{Un(f)},switchingSessionId:Xt,sending:x,briefing:!1,pendingAsk:x?ot:null,onArchiveSession:f=>{zn(f)},archivingSessionId:nt,onAssistantContextMenu:On,suggestedPrompts:_n,onSelectPrompt:f=>{T(f),He(!1)}})}),n.jsxs("div",{className:"flex shrink-0 flex-col gap-1.5 border-t border-[var(--scout-chrome-border-soft)] bg-black/10 px-3 pt-2 pb-2.5",children:[O===!1&&bt&&!C&&n.jsx(Fo,{issue:le,probeState:W,onLaunch:Is,onRetry:()=>{Pe(!0)},onSettings:()=>Be(!0),onDismiss:()=>We(!1)}),(Q||fe)&&!C&&n.jsxs("div",{className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 px-2.5 py-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:[n.jsx("span",{className:"min-w-0 truncate",children:fe?"Speaking reply…":Q}),fe&&n.jsx("button",{type:"button",title:"Stop spoken reply",onClick:Y,className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] p-1 text-[var(--scout-chrome-ink)] hover:bg-[var(--scout-chrome-hover)]",children:n.jsx(Ko,{size:11,className:"fill-current"})})]}),$e&&!x&&n.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:$e}),n.jsx(Za,{agents:v,draft:y,onDraftChange:T,onSubmit:()=>{ct(y)},sending:x,recording:M,voiceLabel:Fn,voiceBusy:K==="processing"||W==="probing"||W==="launching",voiceUnavailable:O===!1,voiceHeld:C,onMicClick:()=>{if(!C){if(O===!1){We(!0);return}M?Os():Bs()}},prominent:$n&&!C,autoFocus:t,focusSignal:Vn}),_&&n.jsx("div",{className:"rounded border border-red-400/30 bg-red-400/10 px-2.5 py-2 font-mono text-xs leading-relaxed text-red-200",children:_})]})]})}function Ec({dictationActive:e=!1,autoStart:t=!1}){const s=Yo(qo,!0),{enabled:o,state:r,leaseId:c,startCall:i,endCall:a}=bs(),u=d.useRef(!1),l=d.useRef(null),[h,m]=d.useState(()=>window.innerWidth>=720&&window.innerHeight>=520?"page":"compact"),p=window.webkit?.messageHandlers?.scoutRealtimeVoice;return d.useEffect(()=>{const v=()=>{m(window.innerWidth>=720&&window.innerHeight>=520?"page":"compact")};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),d.useEffect(()=>{p?.postMessage({kind:"session-state",state:r,leaseId:c})},[c,p,r]),d.useEffect(()=>{const v=()=>{if(l.current)return l.current;const S=a().finally(()=>{l.current===S&&(l.current=null)});return l.current=S,S},b=()=>{v()};return window.__scoutRealtimeVoiceStop=v,window.addEventListener(Ws,b),window.__scoutRealtimeVoiceStopRequested&&v(),()=>{window.removeEventListener(Ws,b),window.__scoutRealtimeVoiceStop===v&&delete window.__scoutRealtimeVoiceStop}},[a]),d.useEffect(()=>{!t||e||!s||!o||u.current||r!=="idle"&&r!=="ended"&&r!=="error"||(u.current=!0,i())},[t,e,s,o,i,r]),s?o?n.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[n.jsx(si,{state:r,onMinimize:p?()=>p.postMessage("minimize"):void 0,onExpand:p?()=>p.postMessage(h==="page"?"restore":"expand"):void 0,layout:h}),n.jsx(oi,{dictationActive:e,layout:h})]}):n.jsxs("div",{className:"flex h-full flex-col justify-center gap-2 p-4",children:[n.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Live voice is disabled"}),n.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Enable realtime voice in Settings → Voice. The footer Voice control starts and manages calls."})]}):n.jsxs("div",{className:"flex h-full flex-col justify-center gap-2 p-4",children:[n.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Live voice is off"}),n.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"This Scout build has live conversations disabled. Calls use the configured OpenAI API account when the feature is available."})]})}function Pc(e){const t=Math.max(0,Math.floor(e/1e3));return`${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}function Tc(e){return e?`OpenAI ${e.model} · ${e.voice} · metered`:"OpenAI realtime · metered"}function In(e){if(!e)return"on-device STT · voice host resolving…";const t=`${e.providerLabel}${e.modelId?` ${e.modelId}`:""} · ${e.voiceLabel}`;return e.metered?`on-device STT · ${t} · metered per reply`:`on-device STT · ${t} · unmetered`}const Go=e=>`${e.toFixed(1)}s`,Nc=1;function Lc(e,t){switch(e){case"listening":return"the take is recording · nothing is sent until Send";case"processing":return"turning speech into text";case"thinking":return"your turn is in";case"speaking":return t?.metered?"spoken reply · metered":"spoken reply · unmetered";default:return In(t)}}function Dc(){const{state:e,leaseId:t,enabled:s,error:o,sessionAction:r,endCall:c,startCall:i,startNewChat:a,openVoiceSettings:u,micMuted:l,playbackMuted:h,setMicMuted:m,setPlaybackMuted:p,ledger:v}=bs(),[b,S]=d.useState("gpt-live"),[k,P]=d.useState(!1),[j,C]=d.useState(null),L=d.useRef(!1),N=e==="connecting"||e==="live"||t!=null,y=N?"gpt-live":b,[T,x]=d.useState(Zs),[D,_]=d.useState("ready"),[U,O]=d.useState(!1),[ce,le]=d.useState(null),[E,W]=d.useState(null),[ue,F]=d.useState(null),[ne,Z]=d.useState(null),[we,Ve]=d.useState(0),[Le,_e]=d.useState(()=>Date.now()),me=d.useRef(null),de=e==="connecting"||e==="live";d.useEffect(()=>{const R=new AbortController;qn(R.signal).then(re=>{re.model&&re.voice&&F({model:re.model,voice:re.voice})}).catch(()=>{});const ie=Xn(re=>{re.model&&re.voice&&F({model:re.model,voice:re.voice})});return()=>{R.abort(),ie()}},[]),d.useEffect(()=>{let R=!1;return xi().then(({settings:ie})=>{R||Z(ie.inputDeviceName??"browser default")}).catch(()=>{R||Z("browser default")}),()=>{R=!0}},[]),d.useEffect(()=>{if(e==="connecting"&&(me.current=Date.now(),Ve(0)),e!=="live"&&e!=="connecting")return;const R=window.setInterval(()=>{const ie=me.current;ie&&Ve(Date.now()-ie)},250);return()=>window.clearInterval(R)},[e]);const ee=de||e==="ended"?Pc(we):void 0,ke=Tc(ue),pe=In(E),je=y==="gpt-live"?v??Zs:T,M=je.turns.at(-1),q=ce?je.turns.find(R=>R.id===ce):void 0,K=!!M?.spans.some(R=>R.end===null);d.useEffect(()=>{O(!1),le(null)},[y]),d.useEffect(()=>{if(!K)return;const R=window.setInterval(()=>_e(Date.now()),120);return()=>window.clearInterval(R)},[K]);const V=M&&K&&!q?Math.max(0,(Le-M.origin)/1e3):void 0,Q=D==="listening"||D==="processing"||D==="thinking"||D==="speaking",De=M&&!K&&M.spans.length>0?Math.max(...M.spans.map(R=>R.end??0)):null,fe=!!(y==="local-live"&&Q&&M&&De!==null&&(Le-M.origin)/1e3-De<Nc),Ce=!!(M&&!q&&(K||fe||!!(y==="gpt-live"&&e==="live"&&M&&!K))),yt=V??(M?eo(M):0),ot=Ce&&M?Qi(M,yt):null,ze=ot?.who??"open",Fe=q??M,te=q??(Ce?M:void 0),$e=U&&Fe,X=y==="gpt-live"?ue?.voice??null:E?.voiceLabel??null,Re=!!M?.spans.some(R=>R.lane==="voice"&&R.tone==="speak"&&R.end===null),Be=y==="gpt-live"?cr({state:e,floorWho:Ce?ze:"open",speakOpen:Re,voiceName:X}):lr(te,q?void 0:V,X),bt="live · billed per second · the meter is running",We=!te&&!(y==="gpt-live"&&e==="live"),H=q?"holding":Ce?ze:y==="gpt-live"?e==="live"?"live":e==="connecting"?"connecting":"ready":D==="checking"?"checking":D==="unavailable"?"offline":"ready",Ee=H==="you"||H==="live"?"open":H==="Scout"?y==="gpt-live"?"sky":"wait":H==="Scoutbot"?"wait":"dim",Ae=Ce&&V!==void 0?Go(V):te?Go(eo(te)):y==="gpt-live"&&de?ee:void 0,St=q?Zi(q):Ce?ot?.beneath??(y==="gpt-live"?bt:Lc(D,E)):y==="gpt-live"&&e==="live"?bt:y==="gpt-live"?ke:pe,nt=te&&er(te.quote)||void 0,wt=We?y==="gpt-live"?"Start a call and hold the floor.":"Tap, talk, send. The reply speaks.":te?"…":"The floor is open.",kt=M&&K?M.id:null,jt=M&&K?Math.max(0,(Le-M.origin)/1e3):void 0,Ct=y==="gpt-live"?de&&ee?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"voice-readout-clock",children:ee})," · metered"]}):e==="ended"&&ee?`last call ${ee} · metered`:ke:pe,it=async R=>{if(!(R===y||L.current)){L.current=!0,P(!0),C(null);try{if(R==="local-live"&&N&&!await c()){S("gpt-live"),C("Call cleanup is incomplete. Retry ending the API call before switching to Local.");return}O(!1),le(null),S(R)}catch{S("gpt-live"),C("Could not end the API call. Retry before switching to Local.")}finally{L.current=!1,P(!1)}}},Et=()=>{if(q){le(null),O(!0);return}O(R=>!R)},ve=ji({enabled:s,state:e,error:o,clock:de?ee:void 0,meterLine:ke,inputLabel:ne??"browser default",micMuted:l,playbackMuted:h,newChatBusy:r!==null});return N&&!de&&(ve.cta={label:"Retry ending call",tone:"end"},ve.note="Call cleanup is incomplete. End this call before starting another.",ve.noteError=!0),k&&(ve.cta={...ve.cta,label:"Ending call…",disabled:!0,busy:!0}),n.jsxs("main",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-[var(--scout-chrome-bg)]",children:[n.jsxs("header",{className:"flex min-h-14 shrink-0 items-center justify-between gap-4 border-b border-[var(--scout-chrome-border-soft)] px-4 py-2.5 sm:px-7",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[n.jsx("span",{className:"hidden shrink-0 font-mono text-[10px] font-semibold uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-ghost)] md:block",children:"Voice"}),n.jsx("h1",{className:"truncate font-[var(--font-accent-title)] text-base font-semibold tracking-[-0.018em] text-[var(--scout-chrome-ink-strong)]",children:y==="gpt-live"?"GPT Live":"Local Live"}),n.jsx("span",{className:"hidden h-4 w-px bg-[var(--scout-chrome-border-soft)] sm:block","aria-hidden":"true"}),n.jsx("span",{className:"voice-readout hidden sm:block","aria-live":"polite",children:Ct})]}),n.jsxs("div",{className:"voice-mode-switch",role:"tablist","aria-label":"Voice mode",children:[n.jsx("button",{type:"button",role:"tab","aria-selected":y==="gpt-live",disabled:k,onClick:()=>{it("gpt-live")},children:"GPT Live"}),n.jsx("button",{type:"button",role:"tab","aria-selected":y==="local-live",disabled:k,title:N?"Ends local audio and releases the call lease before switching. Provider usage confirmation is separate.":void 0,onClick:()=>{it("local-live")},children:"Local Live"})]})]}),j&&n.jsx("p",{role:"alert",className:"shrink-0 px-4 py-2 text-sm text-[var(--scout-chrome-ink-strong)]",children:j}),n.jsx("div",{className:"max-h-[40%] shrink-0 overflow-y-auto",children:n.jsx(ti,{mode:y==="gpt-live"?"api":"local",active:y==="gpt-live"?de:D==="thinking",currentLeaseId:t})}),n.jsxs("section",{className:"voice-instrument min-h-0 flex-1 overflow-hidden",children:[n.jsx("div",{className:"voice-instrument-main flex min-h-0 flex-col overflow-hidden",children:n.jsxs("div",{className:"voice-stack",children:[n.jsx(ur,{mode:y,stops:Be,connecting:y==="gpt-live"&&e==="connecting",error:y==="gpt-live"&&e==="error",continuous:y==="gpt-live"&&e==="live"}),q&&n.jsxs("p",{className:"vtl-hold",children:[n.jsx("b",{children:"holding"})," this turn ·"," ",n.jsx("button",{type:"button",onClick:()=>{le(null),O(!1)},children:"back to now"})]}),n.jsx(dr,{who:H,whoTone:Ee,clock:Ae,story:St,quote:nt,quoteWho:hr(te),placeholder:wt,turn:te,now:q?void 0:V,live:Ce&&K,lanesOpen:!!$e,onToggleLanes:Fe?Et:void 0}),$e&&Fe&&n.jsxs("div",{className:"overflow-x-auto",children:[n.jsx(mr,{turn:Fe,now:V,mode:y}),n.jsx(ar,{turn:Fe,now:V})]}),n.jsx("div",{className:"voice-stack-ctl",children:y==="gpt-live"?n.jsx(Zo,{layout:de?"row":"card",spec:ve,onCta:()=>{L.current||(N?c():s?i():u())},onFlag:R=>{R==="mic"?m(!l):R==="speaker"&&p(!h)},onTail:R=>{R==="new-chat"?a():u()}}):n.jsx(Cc,{forceExpanded:!0,presentation:"direct-voice",voiceModeSwitch:!1,voiceHeading:!1,voiceTranscript:!1,voiceTitle:"Local Live",onSpeechIdentityChange:W,onLedgerEvent:R=>x(ie=>tr(ie,R)),onVoicePhaseChange:_})})]})}),n.jsxs("aside",{className:"voice-instrument-trace flex min-h-0 flex-col",children:[n.jsx("p",{className:"voice-trace-kicker",children:"This call"}),n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:n.jsx(pr,{turns:je.turns,selectedId:ce,mode:y,liveId:kt,now:jt,onSelect:R=>{le(ie=>ie===R?null:R),O(!0)}})})]})]})]})}const Rc=rr({id:"voice",label:"Voice",route:{view:"voice"},webPath:"/voice",screen:"RealtimeVoiceScreen",embed:{path:"/embed/voice",profile:"macos.voice",rootClassName:"s-voice-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:e=>({dictationActive:e.get("dictationActive")==="1",autoStart:e.get("autoStart")==="1"})}}),fl=Object.freeze(Object.defineProperty({__proto__:null,RealtimeVoicePage:Dc,RealtimeVoiceScreen:Ec,scoutSurface:Rc},Symbol.toStringTag,{value:"Module"}));export{Dc as R,Cc as S,fl as a};
|
package/dist/client/assets/{RenderedWorkerSprite-C8fxndAh.js → RenderedWorkerSprite-Dhlyg89J.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as p}from"./index-
|
|
1
|
+
import{r as i,j as p}from"./index-EsrkGBcv.js";const v="/assets/worker-rendered-v1-DmGVMlVi.png",m="/assets/worker-thinking-v1-ujakpzrK.png",b="/assets/worker-working-v1-BROAvJ_z.png",f="/assets/worker-waiting-v1-DbTSsfJJ.png",h="/assets/pip-idle-v1-Tt-CZsRG.png",S="/assets/pip-thinking-v1-BoHWSEye.png",j="/assets/pip-working-v1-wWQLRS1z.png",R="/assets/pip-waiting-v1-DkuvJ-dN.png",d={id:"sage-worker",name:"Sage",poses:{idle:v,thinking:m,working:b,waiting:f}},W={id:"pip-worker",name:"Pip",poses:{idle:h,thinking:S,working:j,waiting:R}},_=[d,W];function x({posture:g,paused:a=!1,size:t=76,character:e=d}){const r=i.useRef(null),[l,k]=i.useState(!0),[c,u]=i.useState(()=>typeof document>"u"||!document.hidden);return i.useEffect(()=>{const s=r.current;if(!s)return;const n=new IntersectionObserver(([w])=>k(w.isIntersecting));n.observe(s);const o=()=>u(!document.hidden);return document.addEventListener("visibilitychange",o),()=>{n.disconnect(),document.removeEventListener("visibilitychange",o)}},[]),p.jsx("span",{ref:r,"aria-hidden":"true",className:`rendered-worker${a||!l||!c?" is-paused":""}`,style:{"--worker-size":`${t}px`},children:Object.entries({idle:e.poses.idle,thinking:e.poses.thinking||e.poses.idle,working:e.poses.working||e.poses.idle,waiting:e.poses.waiting||e.poses.idle}).map(([s,n])=>p.jsx("img",{src:n,alt:"",draggable:!1,width:t,height:t,className:`rendered-worker__pose is-${s}${g===s?" is-current":""}`},s))})}const E=Object.freeze(Object.defineProperty({__proto__:null,RenderedWorkerSprite:x},Symbol.toStringTag,{value:"Module"}));export{x as R,E as a,_ as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as u}from"./index-
|
|
1
|
+
import{r as f,j as u}from"./index-EsrkGBcv.js";function h({at:t,nextAt:o,start:n,duration:s,running:e}){const a=f.useRef(null);return f.useEffect(()=>{const p=performance.now();let c=0;const i=()=>{const l=e?Math.min(1,(performance.now()-p)/s):0,d=t+Math.max(0,o-t)*l,m=Math.max(0,Math.floor(d-n)),r=Math.floor(m/1e3);a.current&&(a.current.textContent=`T+ ${String(Math.floor(r/3600)).padStart(2,"0")}:${String(Math.floor(r/60)%60).padStart(2,"0")}:${String(r%60).padStart(2,"0")}.${String(m%1e3).padStart(3,"0")}`),e&&l<1&&(c=requestAnimationFrame(i))};return i(),()=>cancelAnimationFrame(c)},[t,o,n,s,e]),u.jsx("time",{ref:a,className:"adventures__elapsed-clock",title:"Playback time interpolated between recorded observations","aria-label":"Playback elapsed time"})}export{h as ReplayClock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as r}from"./index-
|
|
1
|
+
import{r as i,j as r}from"./index-EsrkGBcv.js";import{s as a}from"./observe-BJqERJVj.js";import{f as m}from"./floor-preview-text-HrORUJ7D.js";import"./api-DSqpVKC7.js";import"./agent-state-DDhnFEEP.js";import"./surface-activity-B1rgWB1i.js";function h({stops:l,index:o,onInspect:s}){const n=i.useRef(null),c=i.useRef(!0);return i.useEffect(()=>{c.current&&n.current&&(n.current.scrollTop=0)},[o,l.length]),r.jsxs("div",{className:"replay-log",ref:n,role:"region","aria-label":"Replay event log",tabIndex:0,onScroll:()=>{const e=n.current;e&&(c.current=e.scrollTop<24)},children:[l.slice(0,o+1).map((e,t)=>({stop:e,position:t})).reverse().map(({stop:e,position:t})=>r.jsxs("button",{type:"button",className:t===o?"is-current":"",onClick:()=>s(t),children:[r.jsx("time",{children:new Date(e.at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),r.jsx("span",{className:"replay-log__kind",children:e.event.tool||e.kind}),r.jsx("span",{children:m(a(e.event))||e.label})]},e.id)),l.length?null:r.jsx("p",{children:"No recorded events yet."})]})}export{h as ReplayLog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,m as ae,j as e}from"./index-DReVb7jZ.js";import{C as S}from"./CrewSprite-Dp9KBBGY.js";import{S as ye}from"./SproutActionSprite-DI5N3gOj.js";import{b as je}from"./adventure-playback-DTfkhIc0.js";import{p as ve}from"./adventure-habitats-v1-M1lcpTJh.js";/* empty css */const O={start:"Starting",think:"Thinking",read:"Reading",edit:"Editing",tool:"Running",message:"Handing off",wait:"Waiting",end:"Turn complete",stopped:"Interrupted"},oe={domes:.16,biodome:.46,hangar:.84},z={start:"domes",end:"domes",stopped:"domes",wait:"domes",message:"domes",think:"biodome",read:"biodome",edit:"hangar",tool:"hangar"},be=2172/724,N=150,ge=70,Ne=.9,we=110,Me=900,T=(t,a,n)=>Math.max(a,Math.min(n,t));function H(t,a){const n=oe[t]*a.panoramaWidth;return T(a.stageWidth/2-n,Math.min(0,a.stageWidth-a.panoramaWidth),0)}function ke(t,a){const n=new Map,r=N/2;return t.map(f=>{const u=z[f],M=(n.get(u)??0)+1;n.set(u,M);const y=H(u,a),c=oe[u]*a.panoramaWidth,k=(M%5-2)*ge;return T(c+k,r-y,a.stageWidth-r-y)})}function Ee(t,a,n){return t+H(a,n)}function Re(t,a,n){const r=Math.abs(a-t);return T(r/Ne,we,Me)/Math.max(.25,n)}function Ce(t,a){return a<t}function Se(t,a){return t==="travel"?a?"jump":"run":t==="land"?"land":"idle"}function Be(t){return t.checkpoint?1:t.routine?.32:.64}function ne(t){return t==="think"?"thought":t==="message"?"speech":null}function Te(t){return ne(t)===null}const $e=14,Le=19,Ae=22,We=12,Ie=3;function De(t,a){return Math.max(0,t-a-N-$e)}function Oe(t){const a=t-Ae-We;return T(Math.floor(a/Le),1,Ie)}const P={start:"var(--s-dim)",think:"var(--s-muted)",read:"var(--cat-sky)",edit:"var(--cat-gold)",tool:"var(--cat-purple)",message:"var(--info)",wait:"var(--color-status-warn-fg)",end:"var(--color-status-ok-fg)",stopped:"var(--color-status-error-fg)"};function B(t){const a=Math.round(t/1e3);return`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`}function Ge({stops:t,index:a,onSeek:n,playing:r,onPlayingChange:f,speed:u,onSpeedChange:M,actor:y,evidence:c,recipient:k,paused:w=!1,header:le,onInspect:$}){const F=l.useRef(null),V=l.useRef(null),G=l.useRef(null),[g,re]=l.useState({stageWidth:1080,panoramaWidth:1410}),[K,ie]=l.useState(420),[L,E]=l.useState("work"),[m,Y]=l.useState(null),[Z,q]=l.useState(null);l.useLayoutEffect(()=>{const s=F.current;if(!s)return;const o=()=>{const{width:C,height:D}=s.getBoundingClientRect(),fe=Math.max(D*1.12,D+50);re({stageWidth:C,panoramaWidth:Math.max(C,fe*be)}),ie(D)};o();const x=new ResizeObserver(o);return x.observe(s),()=>x.disconnect()},[]);const _=l.useMemo(()=>t.map(s=>s.kind),[t]),d=l.useMemo(()=>t.map(s=>je(s)),[t]),ce=l.useMemo(()=>ke(_,g),[_,g]),i=Math.max(0,Math.min(t.length-1,a)),p=t[i],h=d[i],j=_[i],v=p?Ee(ce[i],z[j],g):g.stageWidth/2,ue=p?H(z[j],g):0,J=l.useRef(v),Q=J.current,de=Ce(Q,v),R=Re(Q,v,u);l.useEffect(()=>{J.current=v},[v]);const A=r?R:260;l.useEffect(()=>{if(!r||!h){E("work");return}E("travel");const s=260/Math.max(.25,u),o=window.setTimeout(()=>E(h.checkpoint?"land":"work"),R),x=window.setTimeout(()=>E("work"),R+s);return()=>{window.clearTimeout(o),window.clearTimeout(x)}},[i,r,u,h?.checkpoint]),l.useEffect(()=>{if(!r||!h)return;if(i+1>=t.length){f(!1);return}const s=window.setTimeout(()=>n(i+1),Math.min(h.durationMs,2600)/u);return()=>window.clearTimeout(s)},[r,i,u,h,t.length,n,f]),l.useEffect(()=>{G.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},[i]);const pe=l.useMemo(()=>d.slice(0,i+1).reduce((s,o)=>s+o.durationMs,0),[d,i]),he=l.useMemo(()=>d.reduce((s,o)=>s+o.durationMs,0),[d]),me=l.useCallback(s=>{const o=V.current?.getBoundingClientRect();if(!o||t.length<2)return;const x=(s.clientX-o.left)/o.width;n(Math.max(0,Math.min(t.length-1,Math.round(x*(t.length-1)))))},[n,t.length]),W=l.useCallback(s=>{$?$(s):q(s)},[$]),b=y?ae(y.agent.name):void 0,I=k?ae(k.agent.name):void 0,_e=j==="think"&&L==="work",ee=L==="work"?ne(j):null,te=Oe(De(K,K*.38)),se=Se(L,!!h?.checkpoint),xe=w||!r;return!p||!h?null:e.jsxs("div",{className:"replay-outpost",children:[e.jsxs("div",{className:"replay-outpost__head",children:[b?e.jsx(S,{slug:b,size:26,paused:w}):null,e.jsx("div",{className:"replay-outpost__who",children:y?.agent.name??"Unknown agent"}),e.jsx("div",{className:"replay-outpost__spacer"}),le]}),e.jsxs("div",{className:"replay-outpost__stage",ref:F,children:[e.jsx("img",{className:"replay-outpost__panorama",src:ve,alt:"",draggable:!1,style:{width:g.panoramaWidth,transform:`translateX(${ue}px)`,transitionDuration:`${A}ms`}}),e.jsx("div",{className:"replay-outpost__veil"}),e.jsxs("div",{className:"replay-outpost__hud",children:[e.jsx("span",{className:"replay-outpost__hud-dot","data-failed":h.checkpoint&&j==="stopped"?"":void 0}),e.jsx("span",{className:"replay-outpost__hud-who",children:y?.agent.name??""}),e.jsxs("span",{className:"replay-outpost__hud-step",children:[i+1," / ",t.length]})]}),e.jsxs("div",{className:"replay-outpost__actor",style:{transform:`translateX(${v-N/2}px)`,transitionDuration:`${A}ms`},children:[e.jsx("div",{className:`replay-outpost__art${se==="jump"?" is-hopping":""}`,style:{transform:de?"scaleX(-1)":void 0,animationDuration:`${R}ms`},children:_e&&b?e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:b,size:N,paused:w,expression:"look-up"})}):b==="sprout"?e.jsx(ye,{action:se,size:N,paused:xe,playbackRate:u}):b?e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:b,size:N,paused:w})}):null}),e.jsx("div",{className:"replay-outpost__shadow"}),ee==="thought"?e.jsxs("div",{className:"replay-outpost__bubble is-thought",style:{"--replay-bubble-lines":te},children:[e.jsx("p",{className:"replay-outpost__bubble-text",children:p.event.text.trim()}),e.jsx("span",{className:"replay-outpost__puff is-big"}),e.jsx("span",{className:"replay-outpost__puff is-small"})]}):ee==="speech"?e.jsxs("div",{className:"replay-outpost__bubble is-speech",style:{"--replay-bubble-lines":te},children:[p.event.to&&!I?e.jsxs("span",{className:"replay-outpost__bubble-to",children:["to ",p.event.to]}):null,e.jsx("p",{className:"replay-outpost__bubble-text",children:p.event.text.trim()||h.label||p.label}),e.jsx("span",{className:"replay-outpost__tail"})]}):Te(j)?e.jsxs("div",{className:"replay-outpost__doing",children:[e.jsx("div",{className:"replay-outpost__activity",children:O[j]}),e.jsx("div",{className:"replay-outpost__target",children:h.label||p.artifact||p.label})]}):null]}),p.event.to&&I?e.jsxs("div",{className:"replay-outpost__handoff",style:{left:v+170,transitionDuration:`${A}ms`},children:[e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:I,size:78,paused:w})}),e.jsx("div",{className:"replay-outpost__shadow is-small"}),e.jsxs("div",{className:"replay-outpost__handoff-label",children:["to ",p.event.to]})]}):null]}),e.jsxs("div",{className:"replay-outpost__ridge",children:[e.jsxs("div",{className:"replay-outpost__transport",children:[e.jsx("button",{type:"button",className:"replay-outpost__play",onClick:()=>f(!r),"aria-label":r?"Pause replay":"Play replay",children:r?e.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10","aria-hidden":"true",children:[e.jsx("rect",{width:"3",height:"10",fill:"currentColor"}),e.jsx("rect",{x:"6",width:"3",height:"10",fill:"currentColor"})]}):e.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10","aria-hidden":"true",children:e.jsx("path",{d:"M0 0l9 5-9 5z",fill:"currentColor"})})}),e.jsxs("select",{className:"replay-outpost__speed",value:u,onChange:s=>M(Number(s.target.value)),"aria-label":"Replay speed",children:[e.jsx("option",{value:1,children:"1×"}),e.jsx("option",{value:2,children:"2×"}),e.jsx("option",{value:4,children:"4×"})]})]}),e.jsxs("div",{className:"replay-outpost__bars",ref:V,onClick:me,onMouseLeave:()=>Y(null),children:[t.map((s,o)=>e.jsx("div",{className:`replay-outpost__bar${o<=i?" is-seen":""}${o===i?" is-now":""}`,style:{height:`${Be(d[o])*100}%`,color:P[_[o]]},onMouseEnter:()=>Y(o),children:d[o].checkpoint?e.jsx("span",{className:"replay-outpost__flag"}):null},s.id)),m!==null&&t[m]?e.jsxs("div",{className:"replay-outpost__tip",style:{left:`${(m+.5)/t.length*100}%`},children:[e.jsxs("div",{className:"replay-outpost__tip-kind",style:{color:P[_[m]]},children:[O[_[m]]," · ",B(d[m].durationMs)]}),e.jsx("div",{className:"replay-outpost__tip-title",children:d[m].label||t[m].artifact})]}):null]}),e.jsxs("div",{className:"replay-outpost__elapsed",children:[B(pe)," ",e.jsxs("span",{children:["/ ",B(he)]})]})]}),e.jsxs("div",{className:"replay-outpost__subsurface",children:[e.jsx("div",{className:"replay-outpost__log",children:t.map((s,o)=>e.jsxs("div",{ref:o===i?G:void 0,className:`replay-outpost__row${o===i?" is-now":""}${o>i?" is-ahead":""}`,style:{color:P[_[o]]},children:[e.jsx("span",{className:"replay-outpost__at",children:B(d.slice(0,o+1).reduce((x,C)=>x+C.durationMs,0))}),e.jsx("span",{className:"replay-outpost__pip"}),e.jsxs("span",{className:"replay-outpost__text",children:[e.jsx("span",{className:"replay-outpost__title",children:d[o].label||s.artifact||s.label}),e.jsx("span",{className:"replay-outpost__activity-small",children:O[_[o]]})]}),e.jsxs("span",{className:"replay-outpost__ms",children:[Math.round(d[o].durationMs),"ms"]})]},s.id))}),e.jsxs("div",{className:"replay-outpost__satchel",children:[e.jsxs("div",{className:"replay-outpost__satchel-head",children:[e.jsx("span",{children:"Collected"}),e.jsx("span",{children:c.changed.length+c.runs.length+c.read.length})]}),!c.changed.length&&!c.runs.length&&!c.read.length?e.jsx("p",{className:"replay-outpost__satchel-empty",children:"Nothing gathered yet — the satchel fills as the run proceeds."}):null,e.jsx(U,{name:"Changed",hue:"var(--cat-gold)",count:c.changed.length,children:c.changed.map(s=>e.jsx(X,{label:s.path,onOpen:()=>W({type:"file",path:s.path,changed:!0,clue:s.clue,observations:s.observations})},s.path))}),e.jsx(U,{name:"Proved",hue:"var(--cat-purple)",count:c.runs.length,children:c.runs.map(s=>e.jsx(X,{label:s.command,note:s.outcome==="passed"?"passed":s.outcome==="failed"?"failed":void 0,failed:s.outcome==="failed",onOpen:()=>W({type:"run",id:s.id,command:s.command,outcome:s.outcome,clue:s.clue})},s.id))}),e.jsx(U,{name:"Explored",hue:"var(--cat-sky)",count:c.read.length,children:c.read.map(s=>e.jsx(X,{label:s.path,onOpen:()=>W({type:"file",path:s.path,changed:!1,clue:s.clue,observations:s.observations})},s.path))})]})]}),Z?e.jsx(Pe,{target:Z,onClose:()=>q(null)}):null]})}function U({name:t,hue:a,count:n,children:r}){return n?e.jsxs("div",{className:"replay-outpost__shelf",children:[e.jsxs("div",{className:"replay-outpost__shelf-name",style:{color:a},children:[t," ",e.jsx("span",{children:n})]}),e.jsx("ul",{className:"replay-outpost__shelf-list",children:r})]}):null}function X({label:t,note:a,failed:n,onOpen:r}){return e.jsx("li",{className:"replay-outpost__shelf-item",children:e.jsxs("button",{type:"button",className:"replay-outpost__shelf-button",onClick:r,"data-failed":n?"":void 0,children:[a?e.jsx("b",{children:a}):null,e.jsx("span",{children:t})]})})}function Pe({target:t,onClose:a}){l.useEffect(()=>{const r=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[a]);const n=t.type==="run"&&t.outcome==="failed";return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"replay-outpost__scrim",onClick:a,"aria-label":"Close"}),e.jsxs("aside",{className:"replay-outpost__reader",role:"dialog","aria-label":t.type==="file"?t.path:t.command,children:[e.jsxs("div",{className:"replay-outpost__reader-head",children:[e.jsx("div",{className:"replay-outpost__reader-kind","data-failed":n?"":void 0,children:t.type==="file"?t.changed?"Changed":"Explored":"Proved"}),e.jsx("div",{className:"replay-outpost__reader-title",children:t.type==="file"?t.path:t.command}),e.jsx("div",{className:"replay-outpost__reader-meta",children:t.type==="file"?`${t.observations} observation${t.observations===1?"":"s"}`:t.outcome}),e.jsx("button",{type:"button",className:"replay-outpost__reader-close",onClick:a,"aria-label":"Close",children:e.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9","aria-hidden":"true",children:e.jsx("path",{d:"M1 1l7 7M8 1l-7 7",stroke:"currentColor",strokeWidth:"1.4",fill:"none"})})})]}),e.jsx("div",{className:"replay-outpost__reader-body",children:t.clue||"Nothing captured for this item."})]})]})}export{Ge as ReplayOutpost};
|
|
1
|
+
import{r as l,m as ae,j as e}from"./index-EsrkGBcv.js";import{C as S}from"./CrewSprite-Dhryjx2c.js";import{S as ye}from"./SproutActionSprite-BSiTS4en.js";import{b as je}from"./adventure-playback-DTfkhIc0.js";import{p as ve}from"./adventure-habitats-v1-M1lcpTJh.js";/* empty css */const O={start:"Starting",think:"Thinking",read:"Reading",edit:"Editing",tool:"Running",message:"Handing off",wait:"Waiting",end:"Turn complete",stopped:"Interrupted"},oe={domes:.16,biodome:.46,hangar:.84},z={start:"domes",end:"domes",stopped:"domes",wait:"domes",message:"domes",think:"biodome",read:"biodome",edit:"hangar",tool:"hangar"},be=2172/724,N=150,ge=70,Ne=.9,we=110,Me=900,T=(t,a,n)=>Math.max(a,Math.min(n,t));function H(t,a){const n=oe[t]*a.panoramaWidth;return T(a.stageWidth/2-n,Math.min(0,a.stageWidth-a.panoramaWidth),0)}function ke(t,a){const n=new Map,r=N/2;return t.map(f=>{const u=z[f],M=(n.get(u)??0)+1;n.set(u,M);const y=H(u,a),c=oe[u]*a.panoramaWidth,k=(M%5-2)*ge;return T(c+k,r-y,a.stageWidth-r-y)})}function Ee(t,a,n){return t+H(a,n)}function Re(t,a,n){const r=Math.abs(a-t);return T(r/Ne,we,Me)/Math.max(.25,n)}function Ce(t,a){return a<t}function Se(t,a){return t==="travel"?a?"jump":"run":t==="land"?"land":"idle"}function Be(t){return t.checkpoint?1:t.routine?.32:.64}function ne(t){return t==="think"?"thought":t==="message"?"speech":null}function Te(t){return ne(t)===null}const $e=14,Le=19,Ae=22,We=12,Ie=3;function De(t,a){return Math.max(0,t-a-N-$e)}function Oe(t){const a=t-Ae-We;return T(Math.floor(a/Le),1,Ie)}const P={start:"var(--s-dim)",think:"var(--s-muted)",read:"var(--cat-sky)",edit:"var(--cat-gold)",tool:"var(--cat-purple)",message:"var(--info)",wait:"var(--color-status-warn-fg)",end:"var(--color-status-ok-fg)",stopped:"var(--color-status-error-fg)"};function B(t){const a=Math.round(t/1e3);return`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`}function Ge({stops:t,index:a,onSeek:n,playing:r,onPlayingChange:f,speed:u,onSpeedChange:M,actor:y,evidence:c,recipient:k,paused:w=!1,header:le,onInspect:$}){const F=l.useRef(null),V=l.useRef(null),G=l.useRef(null),[g,re]=l.useState({stageWidth:1080,panoramaWidth:1410}),[K,ie]=l.useState(420),[L,E]=l.useState("work"),[m,Y]=l.useState(null),[Z,q]=l.useState(null);l.useLayoutEffect(()=>{const s=F.current;if(!s)return;const o=()=>{const{width:C,height:D}=s.getBoundingClientRect(),fe=Math.max(D*1.12,D+50);re({stageWidth:C,panoramaWidth:Math.max(C,fe*be)}),ie(D)};o();const x=new ResizeObserver(o);return x.observe(s),()=>x.disconnect()},[]);const _=l.useMemo(()=>t.map(s=>s.kind),[t]),d=l.useMemo(()=>t.map(s=>je(s)),[t]),ce=l.useMemo(()=>ke(_,g),[_,g]),i=Math.max(0,Math.min(t.length-1,a)),p=t[i],h=d[i],j=_[i],v=p?Ee(ce[i],z[j],g):g.stageWidth/2,ue=p?H(z[j],g):0,J=l.useRef(v),Q=J.current,de=Ce(Q,v),R=Re(Q,v,u);l.useEffect(()=>{J.current=v},[v]);const A=r?R:260;l.useEffect(()=>{if(!r||!h){E("work");return}E("travel");const s=260/Math.max(.25,u),o=window.setTimeout(()=>E(h.checkpoint?"land":"work"),R),x=window.setTimeout(()=>E("work"),R+s);return()=>{window.clearTimeout(o),window.clearTimeout(x)}},[i,r,u,h?.checkpoint]),l.useEffect(()=>{if(!r||!h)return;if(i+1>=t.length){f(!1);return}const s=window.setTimeout(()=>n(i+1),Math.min(h.durationMs,2600)/u);return()=>window.clearTimeout(s)},[r,i,u,h,t.length,n,f]),l.useEffect(()=>{G.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},[i]);const pe=l.useMemo(()=>d.slice(0,i+1).reduce((s,o)=>s+o.durationMs,0),[d,i]),he=l.useMemo(()=>d.reduce((s,o)=>s+o.durationMs,0),[d]),me=l.useCallback(s=>{const o=V.current?.getBoundingClientRect();if(!o||t.length<2)return;const x=(s.clientX-o.left)/o.width;n(Math.max(0,Math.min(t.length-1,Math.round(x*(t.length-1)))))},[n,t.length]),W=l.useCallback(s=>{$?$(s):q(s)},[$]),b=y?ae(y.agent.name):void 0,I=k?ae(k.agent.name):void 0,_e=j==="think"&&L==="work",ee=L==="work"?ne(j):null,te=Oe(De(K,K*.38)),se=Se(L,!!h?.checkpoint),xe=w||!r;return!p||!h?null:e.jsxs("div",{className:"replay-outpost",children:[e.jsxs("div",{className:"replay-outpost__head",children:[b?e.jsx(S,{slug:b,size:26,paused:w}):null,e.jsx("div",{className:"replay-outpost__who",children:y?.agent.name??"Unknown agent"}),e.jsx("div",{className:"replay-outpost__spacer"}),le]}),e.jsxs("div",{className:"replay-outpost__stage",ref:F,children:[e.jsx("img",{className:"replay-outpost__panorama",src:ve,alt:"",draggable:!1,style:{width:g.panoramaWidth,transform:`translateX(${ue}px)`,transitionDuration:`${A}ms`}}),e.jsx("div",{className:"replay-outpost__veil"}),e.jsxs("div",{className:"replay-outpost__hud",children:[e.jsx("span",{className:"replay-outpost__hud-dot","data-failed":h.checkpoint&&j==="stopped"?"":void 0}),e.jsx("span",{className:"replay-outpost__hud-who",children:y?.agent.name??""}),e.jsxs("span",{className:"replay-outpost__hud-step",children:[i+1," / ",t.length]})]}),e.jsxs("div",{className:"replay-outpost__actor",style:{transform:`translateX(${v-N/2}px)`,transitionDuration:`${A}ms`},children:[e.jsx("div",{className:`replay-outpost__art${se==="jump"?" is-hopping":""}`,style:{transform:de?"scaleX(-1)":void 0,animationDuration:`${R}ms`},children:_e&&b?e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:b,size:N,paused:w,expression:"look-up"})}):b==="sprout"?e.jsx(ye,{action:se,size:N,paused:xe,playbackRate:u}):b?e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:b,size:N,paused:w})}):null}),e.jsx("div",{className:"replay-outpost__shadow"}),ee==="thought"?e.jsxs("div",{className:"replay-outpost__bubble is-thought",style:{"--replay-bubble-lines":te},children:[e.jsx("p",{className:"replay-outpost__bubble-text",children:p.event.text.trim()}),e.jsx("span",{className:"replay-outpost__puff is-big"}),e.jsx("span",{className:"replay-outpost__puff is-small"})]}):ee==="speech"?e.jsxs("div",{className:"replay-outpost__bubble is-speech",style:{"--replay-bubble-lines":te},children:[p.event.to&&!I?e.jsxs("span",{className:"replay-outpost__bubble-to",children:["to ",p.event.to]}):null,e.jsx("p",{className:"replay-outpost__bubble-text",children:p.event.text.trim()||h.label||p.label}),e.jsx("span",{className:"replay-outpost__tail"})]}):Te(j)?e.jsxs("div",{className:"replay-outpost__doing",children:[e.jsx("div",{className:"replay-outpost__activity",children:O[j]}),e.jsx("div",{className:"replay-outpost__target",children:h.label||p.artifact||p.label})]}):null]}),p.event.to&&I?e.jsxs("div",{className:"replay-outpost__handoff",style:{left:v+170,transitionDuration:`${A}ms`},children:[e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:I,size:78,paused:w})}),e.jsx("div",{className:"replay-outpost__shadow is-small"}),e.jsxs("div",{className:"replay-outpost__handoff-label",children:["to ",p.event.to]})]}):null]}),e.jsxs("div",{className:"replay-outpost__ridge",children:[e.jsxs("div",{className:"replay-outpost__transport",children:[e.jsx("button",{type:"button",className:"replay-outpost__play",onClick:()=>f(!r),"aria-label":r?"Pause replay":"Play replay",children:r?e.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10","aria-hidden":"true",children:[e.jsx("rect",{width:"3",height:"10",fill:"currentColor"}),e.jsx("rect",{x:"6",width:"3",height:"10",fill:"currentColor"})]}):e.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10","aria-hidden":"true",children:e.jsx("path",{d:"M0 0l9 5-9 5z",fill:"currentColor"})})}),e.jsxs("select",{className:"replay-outpost__speed",value:u,onChange:s=>M(Number(s.target.value)),"aria-label":"Replay speed",children:[e.jsx("option",{value:1,children:"1×"}),e.jsx("option",{value:2,children:"2×"}),e.jsx("option",{value:4,children:"4×"})]})]}),e.jsxs("div",{className:"replay-outpost__bars",ref:V,onClick:me,onMouseLeave:()=>Y(null),children:[t.map((s,o)=>e.jsx("div",{className:`replay-outpost__bar${o<=i?" is-seen":""}${o===i?" is-now":""}`,style:{height:`${Be(d[o])*100}%`,color:P[_[o]]},onMouseEnter:()=>Y(o),children:d[o].checkpoint?e.jsx("span",{className:"replay-outpost__flag"}):null},s.id)),m!==null&&t[m]?e.jsxs("div",{className:"replay-outpost__tip",style:{left:`${(m+.5)/t.length*100}%`},children:[e.jsxs("div",{className:"replay-outpost__tip-kind",style:{color:P[_[m]]},children:[O[_[m]]," · ",B(d[m].durationMs)]}),e.jsx("div",{className:"replay-outpost__tip-title",children:d[m].label||t[m].artifact})]}):null]}),e.jsxs("div",{className:"replay-outpost__elapsed",children:[B(pe)," ",e.jsxs("span",{children:["/ ",B(he)]})]})]}),e.jsxs("div",{className:"replay-outpost__subsurface",children:[e.jsx("div",{className:"replay-outpost__log",children:t.map((s,o)=>e.jsxs("div",{ref:o===i?G:void 0,className:`replay-outpost__row${o===i?" is-now":""}${o>i?" is-ahead":""}`,style:{color:P[_[o]]},children:[e.jsx("span",{className:"replay-outpost__at",children:B(d.slice(0,o+1).reduce((x,C)=>x+C.durationMs,0))}),e.jsx("span",{className:"replay-outpost__pip"}),e.jsxs("span",{className:"replay-outpost__text",children:[e.jsx("span",{className:"replay-outpost__title",children:d[o].label||s.artifact||s.label}),e.jsx("span",{className:"replay-outpost__activity-small",children:O[_[o]]})]}),e.jsxs("span",{className:"replay-outpost__ms",children:[Math.round(d[o].durationMs),"ms"]})]},s.id))}),e.jsxs("div",{className:"replay-outpost__satchel",children:[e.jsxs("div",{className:"replay-outpost__satchel-head",children:[e.jsx("span",{children:"Collected"}),e.jsx("span",{children:c.changed.length+c.runs.length+c.read.length})]}),!c.changed.length&&!c.runs.length&&!c.read.length?e.jsx("p",{className:"replay-outpost__satchel-empty",children:"Nothing gathered yet — the satchel fills as the run proceeds."}):null,e.jsx(U,{name:"Changed",hue:"var(--cat-gold)",count:c.changed.length,children:c.changed.map(s=>e.jsx(X,{label:s.path,onOpen:()=>W({type:"file",path:s.path,changed:!0,clue:s.clue,observations:s.observations})},s.path))}),e.jsx(U,{name:"Proved",hue:"var(--cat-purple)",count:c.runs.length,children:c.runs.map(s=>e.jsx(X,{label:s.command,note:s.outcome==="passed"?"passed":s.outcome==="failed"?"failed":void 0,failed:s.outcome==="failed",onOpen:()=>W({type:"run",id:s.id,command:s.command,outcome:s.outcome,clue:s.clue})},s.id))}),e.jsx(U,{name:"Explored",hue:"var(--cat-sky)",count:c.read.length,children:c.read.map(s=>e.jsx(X,{label:s.path,onOpen:()=>W({type:"file",path:s.path,changed:!1,clue:s.clue,observations:s.observations})},s.path))})]})]}),Z?e.jsx(Pe,{target:Z,onClose:()=>q(null)}):null]})}function U({name:t,hue:a,count:n,children:r}){return n?e.jsxs("div",{className:"replay-outpost__shelf",children:[e.jsxs("div",{className:"replay-outpost__shelf-name",style:{color:a},children:[t," ",e.jsx("span",{children:n})]}),e.jsx("ul",{className:"replay-outpost__shelf-list",children:r})]}):null}function X({label:t,note:a,failed:n,onOpen:r}){return e.jsx("li",{className:"replay-outpost__shelf-item",children:e.jsxs("button",{type:"button",className:"replay-outpost__shelf-button",onClick:r,"data-failed":n?"":void 0,children:[a?e.jsx("b",{children:a}):null,e.jsx("span",{children:t})]})})}function Pe({target:t,onClose:a}){l.useEffect(()=>{const r=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[a]);const n=t.type==="run"&&t.outcome==="failed";return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"replay-outpost__scrim",onClick:a,"aria-label":"Close"}),e.jsxs("aside",{className:"replay-outpost__reader",role:"dialog","aria-label":t.type==="file"?t.path:t.command,children:[e.jsxs("div",{className:"replay-outpost__reader-head",children:[e.jsx("div",{className:"replay-outpost__reader-kind","data-failed":n?"":void 0,children:t.type==="file"?t.changed?"Changed":"Explored":"Proved"}),e.jsx("div",{className:"replay-outpost__reader-title",children:t.type==="file"?t.path:t.command}),e.jsx("div",{className:"replay-outpost__reader-meta",children:t.type==="file"?`${t.observations} observation${t.observations===1?"":"s"}`:t.outcome}),e.jsx("button",{type:"button",className:"replay-outpost__reader-close",onClick:a,"aria-label":"Close",children:e.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9","aria-hidden":"true",children:e.jsx("path",{d:"M1 1l7 7M8 1l-7 7",stroke:"currentColor",strokeWidth:"1.4",fill:"none"})})})]}),e.jsx("div",{className:"replay-outpost__reader-body",children:t.clue||"Nothing captured for this item."})]})]})}export{Ge as ReplayOutpost};
|
package/dist/client/assets/{RepoDiffEmbedScreen-CVUMnt6A.js → RepoDiffEmbedScreen-BWxvRDrS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-EsrkGBcv.js";import{R as c}from"./RepoDiffViewerLazy-XGVC3WXv.js";/* empty css */const l=["unstaged","staged","branch"];function o(e){const t=e.getAll("layer").filter(r=>l.includes(r));return t.length>0?t:void 0}function p(){const e=typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search),t=e.get("path")?.trim()??"",r=e.getAll("file").map(i=>i.trim()).filter(Boolean),a=e.get("sessionId")?.trim()||void 0,n=e.get("agentId")?.trim()||void 0,d=e.get("include")==="all"||e.get("include")==="touched"?"all":"changed";return t?s.jsx(c,{path:t,layers:o(e),files:r,session:a||n?{sessionId:a,agentId:n,include:d}:null,className:"rd-embed"}):s.jsx("div",{className:"rd-viewer rd-embed","data-scout-theme":!0,children:s.jsx("div",{className:"rd-center",children:s.jsxs("div",{className:"rd-center-card",children:[s.jsx("div",{className:"rd-center-title",children:"No worktree path"}),s.jsxs("div",{className:"rd-center-body",children:["This embed needs a ",s.jsx("code",{children:"?path=<absolute-path>"})," query parameter."]})]})})})}export{p as RepoDiffEmbedScreen,p as default};
|
package/dist/client/assets/{RepoDiffPageScreen-D9-s5PyB.js → RepoDiffPageScreen-DN94irmY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-EsrkGBcv.js";import{R as l}from"./RepoDiffViewerLazy-XGVC3WXv.js";/* empty css */const f=1;function m(t=typeof performance>"u"?void 0:performance){const r=(t?.getEntriesByType?.("navigation")??[]).find(i=>typeof i.type=="string");return r?r.type==="reload":t?.navigation?.type===f}function u({path:t,layers:n,files:r,sessionId:i,agentId:o,include:s,navigate:c}){const a=t.trim();if(!a)return e.jsx("div",{className:"rd-viewer",children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-center-title",children:"No worktree path"}),e.jsxs("div",{className:"rd-center-body",children:["This page needs a ",e.jsx("code",{children:"?path=<absolute-path>"})," query parameter."]})]})})});const d=[a,n?.join(",")??"",r?.join("\0")??"",i??"",o??"",s??""].join(""),p=m();return e.jsx(l,{path:a,layers:n,files:r,session:i||o?{sessionId:i,agentId:o,include:s}:null,forceInitialLoad:p,onClose:()=>c({view:"repos"})},d)}export{u as RepoDiffPageScreen,u as default};
|