@openscout/scout 0.2.106 → 0.2.108
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 +79 -16
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-C1H-vL0L.js +1 -0
- package/dist/client/assets/{AddProjectForm-CusDRiVO.js → AddProjectForm-4sVXmjfN.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-CyegKk1V.js → AdventureEvidence-D5wq1vu8.js} +1 -1
- package/dist/client/assets/{AdventureReader-X-hbTOi0.js → AdventureReader-BICypcDY.js} +1 -1
- package/dist/client/assets/{AdventureScenery-LPXSVP67.js → AdventureScenery-CGEcG0zV.js} +1 -1
- package/dist/client/assets/AgentAdventures-5yBt-Zl3.js +1 -0
- package/dist/client/assets/{AgentAvatar-CrP1eXxk.js → AgentAvatar-Dn8TUv5W.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-C0D9WNyL.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-BzcBdC_s.js +1 -0
- package/dist/client/assets/{AgentDetailCard-DtHT3sCo.js → AgentDetailCard-CI-ufaEP.js} +1 -1
- package/dist/client/assets/AgentFloorView-D8tlGlgy.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-CjoIa6jA.js → AgentFloorWorld-DqmnQexg.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-BnRhfcFy.js +1 -0
- package/dist/client/assets/{AgentLaneCard-BaZ2g-f8.js → AgentLaneCard-pppHFROz.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-TF1SlJSc.js → AgentLaneChrome-RptImDFc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-EzEPsn3g.js → AgentLaneDetailSheet-BqbwGskh.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-dpp7YvrX.js → AgentLaneSummaryResize-DaIgwyVh.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-De6C4ZOw.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-Ry-aqDTr.js → AgentLanesPreflight-BQfj2twF.js} +1 -1
- package/dist/client/assets/{AgentLanesView-BJi9xXz6.js → AgentLanesView-CiISx7pu.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-CfTupTEl.js → AgentLiveActions-CkRGkv13.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-CijN_4tN.js +1 -0
- package/dist/client/assets/{AgentSessions-B1gOhDBf.js → AgentSessions-ghjQcSrh.js} +2 -2
- package/dist/client/assets/AgentsConsole-D8upjDpn.js +1 -0
- package/dist/client/assets/AgentsScreen-C17BFqjf.js +1 -0
- package/dist/client/assets/AgentsSubnav-_1GVC4hj.js +1 -0
- package/dist/client/assets/{AstronautSuit-Cchnc4Ug.js → AstronautSuit-Dzu4GOMR.js} +1 -1
- package/dist/client/assets/{AtopView-gkEp4y__.js → AtopView-DJK5b3lZ.js} +1 -1
- package/dist/client/assets/{BackToPicker-CUkjnoVk.js → BackToPicker-BPU7kbXq.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-CTvFw523.js +1 -0
- package/dist/client/assets/{BriefingsScreen-B1HlBMGZ.js → BriefingsScreen-DpVC3OUk.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-Dk242Yh_.js → BrokerMetadataPanel-glRVdwkU.js} +1 -1
- package/dist/client/assets/BrokerScreen-CqKsBwEx.js +8 -0
- package/dist/client/assets/{CastPicker-BXUtPAGC.js → CastPicker-Y29K5kKk.js} +1 -1
- package/dist/client/assets/ChannelComposer-D4EY9jVW.js +1 -0
- package/dist/client/assets/{ChannelSidebar-e9DOPulb.js → ChannelSidebar-CVmykV4d.js} +1 -1
- package/dist/client/assets/{CharacterFamilyPreview-DMfw7UM_.js → CharacterFamilyPreview-Bj8oMD-5.js} +1 -1
- package/dist/client/assets/{ChatAvatar-C3a_o5Hj.js → ChatAvatar-BsAOShUr.js} +1 -1
- package/dist/client/assets/{ChatBits-CsvxbToF.js → ChatBits-Cq54CmyB.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-FEmQ_G9J.js → ChatCollapsedStrip-B0DdrOo2.js} +1 -1
- package/dist/client/assets/{ChatRichInput-DhtwFxQE.js → ChatRichInput-DYJRhGTP.js} +1 -1
- package/dist/client/assets/ChatRightPanel-D94Lw7ud.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-Cp532VmZ.js +1 -0
- package/dist/client/assets/{ChatSpaceTheme-CUH8bTZc.js → ChatSpaceTheme-DPzYpw-v.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-DuQRwpgK.js → CodeDiffPane-DCgMUi39.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-ZQ6gSBpg.js → CodeProjectPicker-Dq787L77.js} +1 -1
- package/dist/client/assets/{CodeScreen-BXyKeL5T.js → CodeScreen-BN4TkiR0.js} +1 -1
- package/dist/client/assets/{CommsCanvas-THp0r_U8.js → CommsCanvas-Dh056d91.js} +1 -1
- package/dist/client/assets/{CommsDeck-BVmSMV2V.js → CommsDeck-CRXKIerH.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-DxoOaLF_.js → CommsFlowGraph-Cc48o9u_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-Vi8ziCPg.js → CommsFlowMap-Ckasql5e.js} +1 -1
- package/dist/client/assets/{CommsSelection-BUoRbu9o.js → CommsSelection-CuphnUny.js} +1 -1
- package/dist/client/assets/{ComposerAttachments-DW0AIb8k.js → ComposerAttachments-9uYp_Lh5.js} +1 -1
- package/dist/client/assets/ConversationComposer-hYtLurqy.js +1 -0
- package/dist/client/assets/ConversationFeedRows-Bu0ZJcy8.js +1 -0
- package/dist/client/assets/ConversationHeader-L9738YVP.js +1 -0
- package/dist/client/assets/{ConversationPanels-D9oC0xG5.js → ConversationPanels-D6KuqvGu.js} +2 -2
- package/dist/client/assets/ConversationScreen-Pzxy9x4m.js +2 -0
- package/dist/client/assets/ConversationStatus-BEefIbXq.js +1 -0
- package/dist/client/assets/{CrewAvatar-kTznzqcO.js → CrewAvatar-a_C_F9r_.js} +1 -1
- package/dist/client/assets/{CrewSprite-Dhryjx2c.js → CrewSprite-CguHb2Ny.js} +1 -1
- package/dist/client/assets/{CrewStage-vdO0qm3D.js → CrewStage-IPpS3Oja.js} +1 -1
- package/dist/client/assets/{CrewWorkspaces-DCBzAAS4.js → CrewWorkspaces-BTPtcEcx.js} +1 -1
- package/dist/client/assets/{DataTable-aH-jCyDq.js → DataTable-DnL_8SAu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-66uQAorV.js → DispatchAftermath-CoAYaL3B.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DJr0v0D_.js → DocumentFocusViewer-mxzPxQQW.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-BBa70EhJ.js → EmbeddableSurfacesLab-BAZ_eRMc.js} +1 -1
- package/dist/client/assets/{EmptyState-CZlrHXy-.js → EmptyState-DLiLgtPK.js} +1 -1
- package/dist/client/assets/{FileViewerPane-BAO6mtjD.js → FileViewerPane-Dc7AoVod.js} +1 -1
- package/dist/client/assets/{FleetRollCallHud-C5q2567n.js → FleetRollCallHud-VhpxVcGO.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-C1kASP3J.js +1 -0
- package/dist/client/assets/{FloorContextSheet-2_NVPQor.js → FloorContextSheet-BfrXNoBn.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-BU1pPu8K.js → FloorExchangePanel-DsG1cRzu.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-cLW2UGNP.js → FloorMessagePasses-Cm3LbkHd.js} +1 -1
- package/dist/client/assets/{FloorReplay-VFzA6Kxc.js → FloorReplay-Bg7kA-tR.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-Ba9HubO2.js +1 -0
- package/dist/client/assets/{FloorSavedWork-BeHDejWz.js → FloorSavedWork-BDOvV3mA.js} +1 -1
- package/dist/client/assets/{FloorTacticalHUD-CO-iiFpb.js → FloorTacticalHUD-4d-Hr-YL.js} +1 -1
- package/dist/client/assets/{FollowScreen-CFfkIbc6.js → FollowScreen-DFVSlsQV.js} +1 -1
- package/dist/client/assets/{HarnessMark-C4naWc16.js → HarnessMark-CP-PWk2W.js} +1 -1
- package/dist/client/assets/HarnessesScreen-j-91IoOo.js +1 -0
- package/dist/client/assets/{HerdrSession-_t7yM8vX.js → HerdrSession-H2mmxeTK.js} +1 -1
- package/dist/client/assets/{HomeHero-DouPyNmz.js → HomeHero-g4H3Ctxg.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CnM1i8hW.js → HostAdvisorView-Cyt3b5Fq.js} +1 -1
- package/dist/client/assets/{InviteLandingScreen-CEjG2E34.js → InviteLandingScreen-C3DtAGD4.js} +1 -1
- package/dist/client/assets/{InviteSheet-CwxZtWCl.js → InviteSheet-BiGMNpsE.js} +1 -1
- package/dist/client/assets/{JumpPalette-O1aJE9gR.js → JumpPalette-goXAVByA.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-32n9baT-.js → KnowledgeSearchInspector-BbOQIqdF.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-DC8yX-kA.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-CJa110yk.js → LaneToolHoverCard-B8Am_1DC.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-CngYIxdI.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-TbrNHRj_.js → LaneTraceEventFocus-BRR_jcl9.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DWZHYh1A.js → MeshCanvas-DzkuY_XI.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-iswYFpIb.js → MeshCanvasMinimap-BrscEPAH.js} +1 -1
- package/dist/client/assets/MeshScreen-CAtRB8K6.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BVvtqI8q.js → MeshTopologyView-B1I2dAhu.js} +2 -2
- package/dist/client/assets/{MessageEmbeds-ksPazAKH.js → MessageEmbeds-B-FbWI7a.js} +1 -1
- package/dist/client/assets/MessagesScreen-hq7D3Lfi.js +1 -0
- package/dist/client/assets/{MissionContextRail-D62-Wis8.js → MissionContextRail-ClR8amG1.js} +1 -1
- package/dist/client/assets/MissionControlView-D6gbMrgx.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-C1zys3Jv.js → MissionFocusOverlay-CzeNgI9Q.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-CB3cgeYr.js +1 -0
- package/dist/client/assets/{MissionLogPane-B19lYSY9.js → MissionLogPane-2PMEoG44.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-BnlrAWT8.js +1 -0
- package/dist/client/assets/NativeAreaScreen-DSR5Tf6F.js +1 -0
- package/dist/client/assets/NativeAreaScreen-fGsxyeC3.js +1 -0
- package/dist/client/assets/{NewAgentModal-Bh-L-emz.js → NewAgentModal-4b_3aoZE.js} +1 -1
- package/dist/client/assets/{NewChatComposer-C97-iTMK.js → NewChatComposer-D-VB5vdt.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-DFbF_XvR.js → NewChatOrigin-BYsEu9dZ.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-CElOEpCh.js → NodeDetailPanel-9NaEnZAQ.js} +1 -1
- package/dist/client/assets/{NodeMenu-B-jjHf1c.js → NodeMenu-BgJMmffZ.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-B7Qt69Ms.js → ObserveEmbedScreen-W7Q5HbXP.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-PFnG_10h.js → ObserveTextFlow-C0oQEerY.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-CUTIoLZJ.js → ObservedTopologyPanel-Ci7emnnj.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-Di9qdmI0.js +22 -0
- package/dist/client/assets/OpsAgentsView-DVotOMg2.js +1 -0
- package/dist/client/assets/OpsScreen-C955zgr3.js +1 -0
- package/dist/client/assets/OpsSubnav-CjMVj7Sk.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-B1VqGSmu.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-DHuMKJj-.js → ProjectAgentProfileBar-DhVU7zew.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-CJk-Dx4t.js +1 -0
- package/dist/client/assets/ProjectsInbox-B7kap8nR.js +2 -0
- package/dist/client/assets/ProjectsRail-BhSaqbv0.js +1 -0
- package/dist/client/assets/ProjectsScreen-CSb7nwjb.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-pEJutIO8.js +1 -0
- package/dist/client/assets/{Provider-C35yu29I.js → Provider-BEXAZWd9.js} +2 -2
- package/dist/client/assets/{RailRow-BjmWK420.js → RailRow-Ddz90weI.js} +1 -1
- package/dist/client/assets/RawSessionsTable-TdKlJIPl.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-BU5KmlNo.js +8 -0
- package/dist/client/assets/{RenderedWorkerSprite-Dhlyg89J.js → RenderedWorkerSprite-BNhFXMIo.js} +1 -1
- package/dist/client/assets/{ReplayClock-348f17bW.js → ReplayClock-wLpb4VqN.js} +1 -1
- package/dist/client/assets/{ReplayLog-CBnAM3ui.js → ReplayLog-IUyQdklN.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-DyRPfNFx.js → ReplayOutpost-C4djhjZJ.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-BWxvRDrS.js → RepoDiffEmbedScreen-BmQX_8E-.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DN94irmY.js → RepoDiffPageScreen-B9oAjrC6.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-_4JVXBIW.js → RepoDiffViewer-Ch_lIMt-.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-DL6A2o_z.js +2 -0
- package/dist/client/assets/{ReposScreen-uMCpt0e9.js → ReposScreen-D-E7fSAB.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-q6QRc7_o.js → RiggedWorkerCharacter-CF6fhzGd.js} +1 -1
- package/dist/client/assets/{SageModelStudio-CNDhZhgD.js → SageModelStudio-CSet_ITs.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-CUaU4R6T.js → ScoutDeckSurface-BJ-fl8AX.js} +1 -1
- package/dist/client/assets/{ScoutSurface-3_25USO_.js → ScoutSurface-BvFRdce6.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-CRqhYe0a.js → ScoutbotFxLab-CfPzycZ7.js} +1 -1
- package/dist/client/assets/{SecondaryNav-D7dbV2qo.js → SecondaryNav-1FjBDWuY.js} +1 -1
- package/dist/client/assets/{SessionContextStrip-CXfs9hUD.js → SessionContextStrip-BoiIxXvS.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-D0zFmou-.js → SessionEmbedScreen-BizGNGOz.js} +1 -1
- package/dist/client/assets/{SessionHopMenu-E6VJZrE0.js → SessionHopMenu-DX6PJPNk.js} +1 -1
- package/dist/client/assets/{SessionObserve-DXxBvejJ.js → SessionObserve-Dw3bVQYF.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-Cuj_KHxR.js → SessionObserveEvidence-uD1OX-R5.js} +1 -1
- package/dist/client/assets/SessionRefScreen-Ch9H-qVk.js +1 -0
- package/dist/client/assets/SessionsScreen-DUeP23Xy.js +1 -0
- package/dist/client/assets/{SettingsDrawer-juCpnbH6.js → SettingsDrawer-BVrP6J52.js} +3 -3
- package/dist/client/assets/SettingsScreen-BcJ05LE5.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-DNEiaOUh.js → SharedFloorCharacter-dnamlt1p.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-H-e2TVj9.js +2 -0
- package/dist/client/assets/{ShikiPane-CRtTYkMj.js → ShikiPane-CDiIT_qn.js} +1 -1
- package/dist/client/assets/{SlidePanel-_CHAQdOa.js → SlidePanel-D5oPQocF.js} +1 -1
- package/dist/client/assets/{SpaceSwitcher-BLgSCf_T.js → SpaceSwitcher-WccPJ0fS.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-CpZWf54-.js → SpriteAvatar-D53GaaK3.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-BSiTS4en.js → SproutActionSprite-BrFCmgWS.js} +1 -1
- package/dist/client/assets/{StatusPill-2gCP6H7A.js → StatusPill-jT--OXbn.js} +1 -1
- package/dist/client/assets/{TailView-CYSijNTy.js → TailView-B44cSuyl.js} +2 -2
- package/dist/client/assets/Terminal-D0PanmIk.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-Eddi4sts.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-Cq4OD_xN.js → TerminalHeaderMount-CYYcKxQ-.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-D52m7Vd8.js → TextDocumentSurface-DBslUq9k.js} +1 -1
- package/dist/client/assets/{TmuxPeek-CXFeweMg.js → TmuxPeek-Ctw5yYO5.js} +1 -1
- package/dist/client/assets/{VoiceControlWell-DF3bjcYA.js → VoiceControlWell-BkjuWjYu.js} +1 -1
- package/dist/client/assets/{VoicePathDiagram-CmpHWfO-.js → VoicePathDiagram-u0i6ntbx.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Ok2nfxHw.js → VoicePermissionsPanel-9Nuw-xCr.js} +1 -1
- package/dist/client/assets/{VoiceTurnDetails-wAByRaNB.js → VoiceTurnDetails-kS7lfbmt.js} +1 -1
- package/dist/client/assets/{VoiceTurnStage-edoJalLV.js → VoiceTurnStage-DLY6aYDg.js} +1 -1
- package/dist/client/assets/{VoiceTurnView-D-8g5E4r.js → VoiceTurnView-CF4tIldB.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-zQkNVy2F.js → WorkDetailScreen-BrrkENYq.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-vNt01sDd.js → WorkFilesViewer-B63sKRYZ.js} +1 -1
- package/dist/client/assets/{WorkRunView-BDkR7Edq.js → WorkRunView-DLIzAsc3.js} +1 -1
- package/dist/client/assets/WorldActorTalk-CHhFTiQV.js +1 -0
- package/dist/client/assets/{WorldCharacter-CIIlutQq.js → WorldCharacter-CJGx2DVy.js} +1 -1
- package/dist/client/assets/{WorldMinimap-B6HNgcDe.js → WorldMinimap-DL12pBw3.js} +1 -1
- package/dist/client/assets/{WorldSky-Jm2Z6dfW.js → WorldSky-BlPNvGLo.js} +1 -1
- package/dist/client/assets/{activity-CIlFrfPJ.js → activity-CXkZ620t.js} +1 -1
- package/dist/client/assets/{addon-fit-dFpj9Kfq.js → addon-fit-G3qi01sy.js} +1 -1
- package/dist/client/assets/{addon-webgl-BFCGRtGh.js → addon-webgl-Bo7kSgOB.js} +1 -1
- package/dist/client/assets/{agent-essentials-BGGvT5G6.js → agent-essentials-DnfdGmIX.js} +1 -1
- package/dist/client/assets/{agent-specialization-DDc7mLCW.js → agent-specialization-DYX_DSlY.js} +1 -1
- package/dist/client/assets/{arc.es-C1SQHJ3k.js → arc.es-CLA3XI14.js} +1 -1
- package/dist/client/assets/arrow-down--OUDFWIq.js +1 -0
- package/dist/client/assets/{arrow-left-MVUKauwQ.js → arrow-left-DNjQHf4C.js} +1 -1
- package/dist/client/assets/{arrow-right-Bp-FpE5V.js → arrow-right-A_yyXwoH.js} +1 -1
- package/dist/client/assets/arrow-up-DFy-9ghF.js +1 -0
- package/dist/client/assets/{arrow-up-right-BPedAgxO.js → arrow-up-right-DUW1A1Hb.js} +1 -1
- package/dist/client/assets/{book-open-CV98WMSp.js → book-open-B_idZgTF.js} +1 -1
- package/dist/client/assets/{bot-B4zLQ4IN.js → bot-BNv_ZJzi.js} +1 -1
- package/dist/client/assets/{chat-api-DSJMBYoT.js → chat-api-BHGHALv2.js} +1 -1
- package/dist/client/assets/{chat-message-markup-91DIry6R.js → chat-message-markup-esR-YLtN.js} +1 -1
- package/dist/client/assets/{chat-transport-DNS5CB2I.js → chat-transport-CtxnPLMU.js} +1 -1
- package/dist/client/assets/{check-lrJ3a73a.js → check-BM6QtbB7.js} +1 -1
- package/dist/client/assets/{chevron-down-l1mrh5S9.js → chevron-down-DEDSNJNY.js} +1 -1
- package/dist/client/assets/{chevron-right-DrfqcerI.js → chevron-right-B02kAw12.js} +1 -1
- package/dist/client/assets/{chevron-up-CETZJzjV.js → chevron-up-CzveykKG.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-DbVLgbWX.js → chunk-HRAB3GC3-DVhUsgOw.js} +1 -1
- package/dist/client/assets/chunk-JTPDIGGW-hdpdYwXb.js +46 -0
- package/dist/client/assets/chunk-T65CQEWV-G_Z0lqtn.js +1 -0
- package/dist/client/assets/chunk-YOZR3KYS-apgUnfXh.js +2 -0
- package/dist/client/assets/{clock-BV1aqPkK.js → clock-8tb9t2t9.js} +1 -1
- package/dist/client/assets/{code-xml-BhcNbLWU.js → code-xml-E9gBuiVs.js} +1 -1
- package/dist/client/assets/{coffee-D7EAOdCk.js → coffee-D0YEK6-l.js} +1 -1
- package/dist/client/assets/{compass-63TUaz5_.js → compass-EmGkpxIe.js} +1 -1
- package/dist/client/assets/content-B-rn1rka.js +1 -0
- package/dist/client/assets/content-BHV-ZU8_.js +1 -0
- package/dist/client/assets/content-BI9yWpWC.js +1 -0
- package/dist/client/assets/content-BLVuukzF.js +1 -0
- package/dist/client/assets/content-BP3cQkAj.js +1 -0
- package/dist/client/assets/content-BRY-UTkP.js +1 -0
- package/dist/client/assets/content-BXTmYOPB.js +1 -0
- package/dist/client/assets/content-C3DZ77HZ.js +1 -0
- package/dist/client/assets/content-CPchclaV.js +1 -0
- package/dist/client/assets/{content-nGlEZhUI.js → content-CVqPTQnr.js} +1 -1
- package/dist/client/assets/content-CjAERU44.js +1 -0
- package/dist/client/assets/content-CoYG0nWL.js +1 -0
- package/dist/client/assets/content-DK1KeRPw.js +1 -0
- package/dist/client/assets/content-iWBSSXa6.js +1 -0
- package/dist/client/assets/content-ryJeaQk8.js +1 -0
- package/dist/client/assets/content-srNyLgDt.js +1 -0
- package/dist/client/assets/{conversation-icons-Tqba2d56.js → conversation-icons-Dxn9N1Kx.js} +1 -1
- package/dist/client/assets/conversation-motion-features-BfmPlONx.js +1 -0
- package/dist/client/assets/{copy-xKeM5ZtU.js → copy-C1XrY27_.js} +1 -1
- package/dist/client/assets/{cpu-BOTa_WLr.js → cpu-DVZ_LhPn.js} +1 -1
- package/dist/client/assets/{createLucideIcon-zZ8Hx7er.js → createLucideIcon-CKbjXlwv.js} +1 -1
- package/dist/client/assets/direct-voice-DAOUU-kc.js +10 -0
- package/dist/client/assets/discover-BNa3BPr_.js +2 -0
- package/dist/client/assets/embed-entry-gK3z8Yxi.js +2 -0
- package/dist/client/assets/{external-link-CUObqmgX.js → external-link-Df1R34rX.js} +1 -1
- package/dist/client/assets/{eye-LrO-cXQt.js → eye-CD-_aphP.js} +1 -1
- package/dist/client/assets/{file-code-corner-CsU7jJpu.js → file-code-corner-DtMWHBN3.js} +1 -1
- package/dist/client/assets/{file-text-CnISiiw6.js → file-text-BOJQiS8p.js} +1 -1
- package/dist/client/assets/{flag-C4wl8z2-.js → flag-CeKO8NoD.js} +1 -1
- package/dist/client/assets/{folder-D5prSkzz.js → folder-C2emmTHq.js} +1 -1
- package/dist/client/assets/{gauge-D9_5iJEm.js → gauge-BR5CrhRM.js} +1 -1
- package/dist/client/assets/{gestures-QZub3Ot9.js → gestures-Dh8szhcU.js} +1 -1
- package/dist/client/assets/{git-branch-B0_fPLO7.js → git-branch-C45vy8qT.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DicR7sUf.js → go-shortcuts--25Qg0lD.js} +1 -1
- package/dist/client/assets/{home-moving-signal-rpMhsOJB.js → home-moving-signal-BiiyEKEb.js} +1 -1
- package/dist/client/assets/home-now-card-DaCpqUZe.js +1 -0
- package/dist/client/assets/{home-now-card-nano-B5Dv3-pb.js → home-now-card-nano-wbxgyY4q.js} +1 -1
- package/dist/client/assets/hooks-JNwYSH18.js +2 -0
- package/dist/client/assets/{index-EsrkGBcv.js → index-BFbLvCJn.js} +2 -2
- package/dist/client/assets/index-BRNHY2fp.css +1 -0
- package/dist/client/assets/index-BrXaMEdK.js +1 -0
- package/dist/client/assets/index-CXzJ_hGx.js +1 -0
- package/dist/client/assets/{index-CHD0qcfL.js → index-V8FYEUpD.js} +1 -1
- package/dist/client/assets/index-mYtyYeAe.js +1 -0
- package/dist/client/assets/{inspector-panel-BkgUDn6G.js → inspector-panel-BgU5xUln.js} +2 -2
- package/dist/client/assets/{keyboard-nav-DDHegDbx.js → keyboard-nav-CEe-ApvZ.js} +1 -1
- package/dist/client/assets/{lane-roster-store-D-RSWjb-.js → lane-roster-store-MraynTHP.js} +1 -1
- package/dist/client/assets/{layers-C8PDiMul.js → layers-ClmyjwpB.js} +1 -1
- package/dist/client/assets/{layout-grid-Cor2frzj.js → layout-grid-DG2-JaPn.js} +1 -1
- package/dist/client/assets/left-B66YR0c5.js +1 -0
- package/dist/client/assets/left-BP5P8lzw.js +2 -0
- package/dist/client/assets/left-BbCKRDbW.js +1 -0
- package/dist/client/assets/left-CaY5FK2k.js +1 -0
- package/dist/client/assets/left-CemrfeSs.js +1 -0
- package/dist/client/assets/left-DcYA26sH.js +1 -0
- package/dist/client/assets/left-DdMMaqFT.js +2 -0
- package/dist/client/assets/left-advisor-DBml48M5.js +1 -0
- package/dist/client/assets/left-agents-DowYF2ag.js +1 -0
- package/dist/client/assets/left-default-Bifaeg_V.js +1 -0
- package/dist/client/assets/left-lanes-BGhjdqpD.js +1 -0
- package/dist/client/assets/left-mission-CvXPUovR.js +1 -0
- package/dist/client/assets/library-CnC8uzJt.js +1 -0
- package/dist/client/assets/{loader-circle-OvccU82H.js → loader-circle-CCG7hG7z.js} +1 -1
- package/dist/client/assets/{local-agents-BqnoxJrq.js → local-agents-BMcFlY_x.js} +1 -1
- package/dist/client/assets/{log-in-7SnYqW5w.js → log-in-VL9mdgeE.js} +1 -1
- package/dist/client/assets/{machine-children-DxcqCLmd.js → machine-children-DvCiQxwA.js} +1 -1
- package/dist/client/assets/{mentions-ByUvhS-v.js → mentions-s5oW4aQU.js} +1 -1
- package/dist/client/assets/{mesh-ops-CiZ8xSAx.js → mesh-ops-9SzD3sPw.js} +1 -1
- package/dist/client/assets/{mesh-view-store-DZvJC4KU.js → mesh-view-store-CVqzYz4K.js} +1 -1
- package/dist/client/assets/{message-circle-CxRVKNE-.js → message-circle-BB3rFCVD.js} +1 -1
- package/dist/client/assets/{message-markup-Zwo3t4cI.js → message-markup-D1C7GzHo.js} +1 -1
- package/dist/client/assets/{message-square-BxesYglW.js → message-square-BwqBIfv5.js} +1 -1
- package/dist/client/assets/{mission-control-store-elEEsIvb.js → mission-control-store-e8F85JhP.js} +1 -1
- package/dist/client/assets/{monitor-DTTYEb73.js → monitor-M0VSmHQ-.js} +1 -1
- package/dist/client/assets/{nav-destinations-uorRqFxf.js → nav-destinations-B3R5zxFX.js} +1 -1
- package/dist/client/assets/{observe-BJqERJVj.js → observe-M3rLosT5.js} +1 -1
- package/dist/client/assets/{page-status-BswZLqvA.js → page-status-BIuh3C5p.js} +1 -1
- package/dist/client/assets/{panel-right-Bv7sP_fc.js → panel-right-WKLdPm0F.js} +1 -1
- package/dist/client/assets/{paperclip-BjcuP_Hx.js → paperclip-DLf_ABSv.js} +1 -1
- package/dist/client/assets/{pause-C2XTlkjs.js → pause-7mmEEvVx.js} +1 -1
- package/dist/client/assets/{persistent-state-KRk_yb0q.js → persistent-state-3mbBFRDO.js} +1 -1
- package/dist/client/assets/{pin-C2mFOV1l.js → pin-q_0gAA6i.js} +1 -1
- package/dist/client/assets/{play-FT6K3It1.js → play-N5-hnPCV.js} +1 -1
- package/dist/client/assets/{plus-DFDDeGKu.js → plus-B0hdY0fF.js} +1 -1
- package/dist/client/assets/profile-B7ZGToTo.js +1 -0
- package/dist/client/assets/{projects-inbox-C0FUCv_p.js → projects-inbox-CMFBjQt0.js} +1 -1
- package/dist/client/assets/{proxy-AJsmwA6h.js → proxy-k0ILOVkK.js} +1 -1
- package/dist/client/assets/{radio-DRoOZsws.js → radio-Bjqmv997.js} +1 -1
- package/dist/client/assets/{refresh-cw-BmVr7sCD.js → refresh-cw-BcqctLqo.js} +1 -1
- package/dist/client/assets/resolve-panes-wzGu9d8o.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-C8SOo5oZ.js +1 -0
- package/dist/client/assets/right-9rMRZN_r.js +1 -0
- package/dist/client/assets/right-BHZq648O.js +1 -0
- package/dist/client/assets/{right-DWPVB-nK.js → right-BNJzCaH9.js} +1 -1
- package/dist/client/assets/right-CAd7lTvY.js +1 -0
- package/dist/client/assets/right-Cc57bCTW.js +1 -0
- package/dist/client/assets/right-DY49Prjj.js +1 -0
- package/dist/client/assets/right-DfU47xKY.js +1 -0
- package/dist/client/assets/right-Dr7vxdZl.js +1 -0
- package/dist/client/assets/right-DsE4aR3A.js +1 -0
- package/dist/client/assets/right-zlkRjnkv.js +1 -0
- package/dist/client/assets/{rocket-CGl4RTV7.js → rocket-BahsdUe6.js} +1 -1
- package/dist/client/assets/router-CJIx83Ia.js +1 -0
- package/dist/client/assets/runtime-picker-IRcTkMZ5.js +1 -0
- package/dist/client/assets/{scope-views-RUWwCVAr.js → scope-views-KDtZoLUC.js} +1 -1
- package/dist/client/assets/{scout-voice-CZx60X6E.js → scout-voice-Cdh6pCsb.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-BKEBSbG0.js → scoutbot-markdown-7PRQHaAc.js} +1 -1
- package/dist/client/assets/{scroll-text-DNjxhyO2.js → scroll-text-CA0QxBHu.js} +1 -1
- package/dist/client/assets/{search-DT42oyRW.js → search-Bv2IONmc.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-Bmb-oRvD.js +1 -0
- package/dist/client/assets/{selection-bridge-x3wFUjxj.js → selection-bridge-CthAuPRw.js} +1 -1
- package/dist/client/assets/{send-horizontal-CH0-fbZE.js → send-horizontal-_Tf_It04.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-DoKCDBJ4.js → send-to-agent-session-CWDHHgFB.js} +1 -1
- package/dist/client/assets/{server-QfsgMLk1.js → server-U_l8A83n.js} +1 -1
- package/dist/client/assets/{session-catalog-CvSdPHPe.js → session-catalog-Dx4tl3sx.js} +1 -1
- package/dist/client/assets/{session-recap-queue-41l2XVkI.js → session-recap-queue-GeicPLsQ.js} +1 -1
- package/dist/client/assets/{session-table-L-pns6Zl.js → session-table-BI62J4NP.js} +1 -1
- package/dist/client/assets/{sessions-view-Dc-QAa7O.js → sessions-view-lGMwwZY7.js} +1 -1
- package/dist/client/assets/{settings-BVh7kldq.js → settings-bo9X410k.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-782VC_yy.js → sliders-horizontal-CPSx6wd2.js} +1 -1
- package/dist/client/assets/{sparkles-BjHq_DNK.js → sparkles-Br-bA2aZ.js} +1 -1
- package/dist/client/assets/{sse-BCPRocpq.js → sse-BVxO0zNp.js} +1 -1
- package/dist/client/assets/{tail-events-d0yAYxR0.js → tail-events-C6NWFB1N.js} +1 -1
- package/dist/client/assets/{terminal-hQKQygcf.js → terminal-DMBAZjPP.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bxs1hp-j.js → terminal-relay-CpGHpDa8.js} +1 -1
- package/dist/client/assets/{terminal-takeover-Ay5C2c-M.js → terminal-takeover-CXwdoZ5j.js} +1 -1
- package/dist/client/assets/{triangle-alert-CHoRGdVO.js → triangle-alert-BZikHKuT.js} +1 -1
- package/dist/client/assets/use-beside-DopIbJwf.js +1 -0
- package/dist/client/assets/{use-conversation-list-CY4JciOV.js → use-conversation-list-CGtcpdPd.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-CymmXWH4.js → use-fleet-active-asks-DAHOPYPV.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-BvaqtODo.js → use-mesh-node-state-BlWIPTc4.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-BSYaqH_0.js → use-mesh-ops-items-pKWBro7o.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-3gMYZNIp.js → use-reduced-motion-DkdIQBwh.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-CduUFb7l.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-BANmpjMh.js → useAgentHoverCard-DNlXPYQf.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-LJGNYG3U.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-D6pJRxUg.js → useEmbedHeadline-BeeBDb7E.js} +1 -1
- package/dist/client/assets/{usePierreRuntime-BAQdiN0L.js → usePierreRuntime-DUXZ-DTK.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-DoMvU_2R.js +1 -0
- package/dist/client/assets/{users-BUjx36gx.js → users-BQPEIUfd.js} +1 -1
- package/dist/client/assets/{wrench-DR0i5BU7.js → wrench-C-wjicn5.js} +1 -1
- package/dist/client/assets/{x-DAehov0E.js → x-BcfhXYiF.js} +1 -1
- package/dist/client/assets/{xterm-BXQiLVnI.js → xterm-qXD45dc0.js} +1 -1
- package/dist/client/assets/{zap-CEjZNZbI.js → zap-BqL8ttGz.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +1 -1
- package/package.json +29 -5
- package/server.json +31 -0
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +0 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +0 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +0 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +0 -1
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +0 -1
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +0 -1
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +0 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +0 -8
- package/dist/client/assets/Canvas-X9pVSkw3.js +0 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +0 -1
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +0 -1
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +0 -1
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +0 -1
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +0 -1
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +0 -2
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +0 -1
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +0 -1
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +0 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +0 -1
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +0 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +0 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +0 -1
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +0 -1
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +0 -1
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +0 -31
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +0 -1
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +0 -1
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +0 -1
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +0 -2
- package/dist/client/assets/ProjectsRail-CDWocin_.js +0 -1
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +0 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +0 -16
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +0 -2
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +0 -1
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +0 -1
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +0 -1
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +0 -2
- package/dist/client/assets/Terminal-Bi97yb5s.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +0 -1
- package/dist/client/assets/TerminalRelay-DrikpUSJ.js +0 -46
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +0 -1
- package/dist/client/assets/content-B1lgE8qr.js +0 -1
- package/dist/client/assets/content-B5l11YyQ.js +0 -1
- package/dist/client/assets/content-BNZOZEpX.js +0 -1
- package/dist/client/assets/content-BRIxP155.js +0 -1
- package/dist/client/assets/content-BWd8gt8L.js +0 -1
- package/dist/client/assets/content-BfwS2jAK.js +0 -1
- package/dist/client/assets/content-C4p43_eT.js +0 -1
- package/dist/client/assets/content-CdYfaoDV.js +0 -1
- package/dist/client/assets/content-CzldLxw0.js +0 -1
- package/dist/client/assets/content-D-olnc4U.js +0 -1
- package/dist/client/assets/content-DTioimq4.js +0 -1
- package/dist/client/assets/content-LOebm3_d.js +0 -1
- package/dist/client/assets/content-oyzDM-LK.js +0 -1
- package/dist/client/assets/content-x1PHxED7.js +0 -1
- package/dist/client/assets/content-zX3ZY3T9.js +0 -1
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +0 -1
- package/dist/client/assets/direct-voice-BbLPuJ04.js +0 -2
- package/dist/client/assets/discover-DJFxyV1k.js +0 -2
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +0 -2
- package/dist/client/assets/home-now-card-ByE6Umcx.js +0 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +0 -2
- package/dist/client/assets/index-724SdE6r.js +0 -1
- package/dist/client/assets/index-CN4rBB_s.css +0 -1
- package/dist/client/assets/index-D1d98iYf.js +0 -1
- package/dist/client/assets/index-gGHPA-By.js +0 -1
- package/dist/client/assets/left-Bn5X7x2o.js +0 -2
- package/dist/client/assets/left-BqS0fYX1.js +0 -1
- package/dist/client/assets/left-CTCeeeD3.js +0 -1
- package/dist/client/assets/left-DhtVPVux.js +0 -1
- package/dist/client/assets/left-K39b-Wvx.js +0 -2
- package/dist/client/assets/left-KGmueNPt.js +0 -1
- package/dist/client/assets/left-P_GOYB-s.js +0 -1
- package/dist/client/assets/left-advisor-B0N47De2.js +0 -1
- package/dist/client/assets/left-agents-CsSNc51Y.js +0 -1
- package/dist/client/assets/left-default-BlO5LP2T.js +0 -1
- package/dist/client/assets/left-lanes-C4PhaJE6.js +0 -1
- package/dist/client/assets/left-mission-BjTE5vPa.js +0 -1
- package/dist/client/assets/library-CkWNPHRp.js +0 -1
- package/dist/client/assets/profile-DTmzN16I.js +0 -1
- package/dist/client/assets/provider-Dojd8quC.js +0 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +0 -1
- package/dist/client/assets/right-49kO-6nD.js +0 -1
- package/dist/client/assets/right-APtItA8A.js +0 -1
- package/dist/client/assets/right-BJwhPqtn.js +0 -1
- package/dist/client/assets/right-BPqrf4ek.js +0 -1
- package/dist/client/assets/right-D7djOy6K.js +0 -1
- package/dist/client/assets/right-DKOUCRob.js +0 -1
- package/dist/client/assets/right-DMNrVzg7.js +0 -1
- package/dist/client/assets/right-DppeMCy4.js +0 -1
- package/dist/client/assets/right-GAL5Mw1v.js +0 -1
- package/dist/client/assets/router-DCtl8wqb.js +0 -1
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +0 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +0 -1
- package/dist/client/assets/use-beside-DoRC1nt0.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +0 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +0 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
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};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RepoDiffViewer-_4JVXBIW.js","assets/index-EsrkGBcv.js","assets/index-CN4rBB_s.css","assets/ui-LM8pS8qE.js","assets/usePierreRuntime-BAQdiN0L.js","assets/chunk-HRAB3GC3-DbVLgbWX.js","assets/chevron-down-l1mrh5S9.js","assets/createLucideIcon-zZ8Hx7er.js","assets/check-lrJ3a73a.js","assets/loader-circle-OvccU82H.js","assets/send-horizontal-CH0-fbZE.js","assets/file-code-corner-CsU7jJpu.js","assets/code-xml-BhcNbLWU.js","assets/x-DAehov0E.js","assets/cache-DGBo3vIf.js","assets/api-DSqpVKC7.js","assets/message-square-BxesYglW.js","assets/refresh-cw-BmVr7sCD.js","assets/plus-DFDDeGKu.js","assets/repo-diff-DyYmQMSA.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as e,r as i,_ as s}from"./index-EsrkGBcv.js";/* empty css */const a=i.lazy(()=>s(()=>import("./RepoDiffViewer-_4JVXBIW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(r=>({default:r.RepoDiffViewer})));function t(){return e.jsx("div",{className:"rd-viewer","data-scout-theme":!0,children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-spinner","aria-hidden":!0}),e.jsx("div",{className:"rd-center-title",children:"Opening diff viewer…"})]})})})}function c(r){return e.jsx(i.Suspense,{fallback:e.jsx(t,{}),children:e.jsx(a,{...r})})}export{c as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as s}from"./index-EsrkGBcv.js";import{a as g}from"./api-DSqpVKC7.js";import{u as k}from"./sse-BCPRocpq.js";import{u as I}from"./tail-events-d0yAYxR0.js";import{B as N}from"./BackToPicker-CUkjnoVk.js";import{ConversationScreen as S}from"./ConversationScreen-CUfsQ4MR.js";import{S as R,a as y}from"./SessionObserve-DXxBvejJ.js";import{SessionRefObserveHeader as w,sessionRefObserveOriginLabel as E}from"./SessionObserveEvidence-Cuj_KHxR.js";import{c as T,a as C,b as O,s as f}from"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./index-BWHgHrtv.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.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"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.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"./ComposerAttachments-DW0AIb8k.js";import"./machine-scope-DJt9RZ2w.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.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"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-ksPazAKH.js";import"./AgentAvatar-CrP1eXxk.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-C-ZWscKj.js";import"./AstronautSuit-Cchnc4Ug.js";import"./panel-right-Bv7sP_fc.js";import"./CommsFlowGraph-DxoOaLF_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-THp0r_U8.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Vi8ziCPg.js";import"./CommsSelection-BUoRbu9o.js";/* empty css */import"./use-conversation-list-CY4JciOV.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DoRC1nt0.js";import"./ConversationComposer-CUQyArlk.js";import"./zap-CEjZNZbI.js";import"./ConversationFeedRows-DWiOfT-y.js";import"./ConversationPanels-D9oC0xG5.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./activity-CIlFrfPJ.js";import"./message-circle-CxRVKNE-.js";import"./ConversationStatus--IPm2nGh.js";import"./check-lrJ3a73a.js";import"./sparkles-BjHq_DNK.js";import"./triangle-alert-CHoRGdVO.js";import"./SessionContextStrip-CXfs9hUD.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-CJa110yk.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-E6VJZrE0.js";import"./external-link-CUObqmgX.js";import"./ObservedTopologyPanel-CUTIoLZJ.js";import"./ObserveTextFlow-PFnG_10h.js";import"./wrench-DR0i5BU7.js";function v(r){const o=r?.trim()??"",t=o.split(/[\\/]/).filter(Boolean).at(-1)??o;return t.endsWith(".jsonl")?t.slice(0,-6):t}function F(r){return r.startsWith("native:process:")}function x(r){const[o,t]=m.useState(()=>({sessionRef:r,lookup:null,loading:!0,error:null})),i=m.useRef(null),p=m.useRef(null);p.current||(p.current=T(a=>g(`/api/session-ref/${encodeURIComponent(a)}`),({sessionRef:a,result:n})=>{if(n.ok){t({sessionRef:a,lookup:n.lookup,loading:!1,error:null});return}t({sessionRef:a,lookup:null,loading:!1,error:n.error instanceof Error?n.error.message:String(n.error)})}));const l=m.useCallback(async()=>{await p.current.request(r)},[r]);m.useEffect(()=>(t({sessionRef:r,lookup:null,loading:!0,error:null}),l(),()=>{p.current?.invalidate(),i.current&&(clearTimeout(i.current),i.current=null)}),[l,r]);const{lookup:e,loading:u,error:d}=C(o,r),c=m.useCallback(()=>{i.current||(i.current=setTimeout(()=>{i.current=null,l()},1e3))},[l]);return k(a=>{const n=[r,e?.refId,e?.kind==="conversation"?e.conversationId:null,e?.session?.agentId,e?.kind==="observe"?e.observe.agentId:null,e?.kind==="observe"?e.observe.sessionId:null];O(a,n)&&c()}),I(a=>{const n=v(a.sessionId),j=v(r),h=e?.kind==="observe"?v(e.observe.sessionId??e.observe.refId):"",b=e?.kind==="observe"?v(e.observe.data.metadata?.session?.externalSessionId):"";!f(n,j)&&(!h||!f(n,h))&&(!b||!f(n,b))||c()}),m.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),{lookup:e,loading:u,error:d}}function Ms({sessionRef:r}){const{lookup:o,loading:t,error:i}=x(r);return o?.kind==="observe"?s.jsx(y,{data:o.observe.data,agentId:o.observe.agentId??o.session?.agentId??void 0,sessionId:o.observe.sessionId??o.observe.refId,surface:"context",observeSource:o.observe.source,observeFidelity:o.observe.fidelity}):s.jsx("aside",{className:"s-observe-rail s-observe-rail--context",children:s.jsxs("div",{children:[s.jsx("div",{className:"s-observe-rail-label",children:o?.kind==="conversation"?"Conversation":"Session context"}),s.jsx("div",{className:"s-observe-empty",children:t?"Resolving session reference":i?"Session context unavailable":"No observe context captured for this session"})]})})}function Ws({sessionRef:r,navigate:o,machineId:t,renderBeforeContent:i,showObserveRail:p=!0,onLookup:l}){const{lookup:e,loading:u,error:d}=x(r);if(m.useEffect(()=>{e&&l?.(e)},[e,l]),e?.kind==="conversation")return s.jsxs(s.Fragment,{children:[i?.(e),s.jsx(S,{conversationId:e.conversationId,navigate:o})]});if(e?.kind==="observe")return s.jsxs(s.Fragment,{children:[i?.(e),s.jsx(w,{session:e.session,observe:e.observe,machineId:t,navigate:o}),s.jsx(R,{data:e.observe.data,agentId:e.observe.agentId??e.session?.agentId??void 0,sessionId:e.observe.sessionId??e.observe.refId,conversationId:e.session?.id??null,showRail:p,observeSource:e.observe.source,observeFidelity:e.observe.fidelity,originLabel:E(e.observe),defaultPresentation:"conversation"})]});if(u)return s.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:s.jsx("section",{className:"s-thread-overview",children:s.jsxs("div",{className:"s-thread-overview-copy",children:[s.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[s.jsx("h2",{className:"s-page-title",children:"Session"}),s.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),s.jsxs("p",{className:"s-thread-overview-summary s-session-ref-loading",children:[s.jsx("span",{className:"s-session-ref-loading-dot"}),s.jsx("span",{className:"s-session-ref-loading-dot"}),s.jsx("span",{className:"s-session-ref-loading-dot"}),"Resolving session reference"]})]})})});const c=F(r);return s.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:s.jsx("section",{className:"s-thread-overview",children:s.jsxs("div",{className:"s-thread-overview-copy",children:[s.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[s.jsx("h2",{className:"s-page-title",children:c?"Process trace unavailable":"Session not found"}),s.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),s.jsx("p",{className:"s-thread-overview-summary",children:c?"This is a live process handle, not a transcript session. No replayable session archive is attached yet.":"This session may have ended or the archive is not available on this machine."}),d&&s.jsx("p",{className:"s-session-ref-error-detail",children:d}),s.jsx("div",{className:"s-session-ref-nav-hint",children:s.jsx(N,{slot:"sessions",fallback:{view:"sessions"},navigate:o})})]})})})}export{Ms as SessionRefContextRail,Ws as SessionRefScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-EsrkGBcv.js";import{RawSessionsTable as t}from"./RawSessionsTable-DzT90hWu.js";/* empty css */import"./DataTable-aH-jCyDq.js";/* empty css */import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./api-DSqpVKC7.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"./time-Dhsh_2EG.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"./SessionHopMenu-E6VJZrE0.js";import"./openContent-C6XO6kr5.js";import"./external-link-CUObqmgX.js";import"./tail-events-d0yAYxR0.js";function io({navigate:o}){return r.jsx(t,{navigate:o})}export{io as SessionsScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i,r as d}from"./index-EsrkGBcv.js";import{E as it}from"./EmptyState-CZlrHXy-.js";import{S as B}from"./StatusPill-2gCP6H7A.js";import{a as M}from"./api-DSqpVKC7.js";import{p as Rt}from"./status-tone-BM_zuRy1.js";import{t as ot}from"./time-Dhsh_2EG.js";import{AgentConfigurationScreen as Mt}from"./AgentConfigurationScreen-1L0IQm2w.js";import{S as At}from"./SettingsDrawer-juCpnbH6.js";/* empty css */import"./CastPicker-BXUtPAGC.js";import"./CrewAvatar-kTznzqcO.js";import"./HarnessMark-C4naWc16.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"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./check-lrJ3a73a.js";import"./NewChatComposer-C97-iTMK.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.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"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.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"./openContent-C6XO6kr5.js";import"./AgentsSubnav-DwNX4yy0.js";import"./SecondaryNav-D7dbV2qo.js";import"./secondaryNavConfig-CS1svh6n.js";import"./nav-destinations-uorRqFxf.js";import"./message-square-BxesYglW.js";import"./terminal-hQKQygcf.js";import"./compass-63TUaz5_.js";import"./settings-BVh7kldq.js";import"./git-branch-B0_fPLO7.js";import"./scroll-text-DNjxhyO2.js";import"./refresh-cw-BmVr7sCD.js";import"./bot-B4zLQ4IN.js";import"./wrench-DR0i5BU7.js";import"./server-QfsgMLk1.js";import"./cpu-BOTa_WLr.js";import"./credentials-OeoF-VKJ.js";import"./AgentAvatar-CrP1eXxk.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewStage-vdO0qm3D.js";import"./VoicePermissionsPanel-Ok2nfxHw.js";import"./monitor-DTTYEb73.js";import"./copy-xKeM5ZtU.js";import"./sparkles-BjHq_DNK.js";var k=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(k||{});const Ct=[0,1],dt=[1,0],ht=[2,3],ft=[3,2],It={L:Ct,M:dt,Q:ht,H:ft},zt=/^\d*$/,Ft=/^[A-Z0-9 $%*+./:-]*$/,L="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",T=1,q=40,at=3,Bt=3,I=40,Lt=10,mt=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],pt=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class _t{constructor(e,s,n,r){if(this.version=e,this.ecc=s,e<T||e>q)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;const o=Array.from({length:this.size}).fill(!1);for(let c=0;c<this.size;c++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let c=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);const h=this.getPenaltyScore();h<c&&(r=u,c=h),this.applyMask(u)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,s){return e>=0&&e<this.size&&s>=0&&s<this.size&&this.modules[s][e]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,k.Timing),this.setFunctionModule(n,6,n%2===0,k.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),s=e.length;for(let n=0;n<s;n++)for(let r=0;r<s;r++)n===0&&r===0||n===0&&r===s-1||n===s-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const s=this.ecc[1]<<3|e;let n=s;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const r=(s<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,x(r,o));this.setFunctionModule(8,7,x(r,6)),this.setFunctionModule(8,8,x(r,7)),this.setFunctionModule(7,8,x(r,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,x(r,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,x(r,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,x(r,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^(e>>>11)*7973;const s=this.version<<12|e;for(let n=0;n<18;n++){const r=x(s,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,r),this.setFunctionModule(a,o,r)}}drawFinderPattern(e,s){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),a=e+r,c=s+n;a>=0&&a<this.size&&c>=0&&c<this.size&&this.setFunctionModule(a,c,o!==2&&o!==4,k.Position)}}drawAlignmentPattern(e,s){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,s+n,Math.max(Math.abs(r),Math.abs(n))!==1,k.Alignment)}setFunctionModule(e,s,n,r=k.Function){this.modules[s][e]=n,this.types[s][e]=r}addEccAndInterleave(e){const s=this.version,n=this.ecc;if(e.length!==z(s,n))throw new RangeError("Invalid argument");const r=pt[n[0]][s],o=mt[n[0]][s],a=Math.floor(O(s)/8),c=r-a%r,u=Math.floor(a/r),h=[],p=Yt(o);for(let f=0,b=0;f<r;f++){const g=e.slice(b,b+u-o+(f<c?0:1));b+=g.length;const E=Gt(g,p);f<c&&g.push(0),h.push(g.concat(E))}const m=[];for(let f=0;f<h[0].length;f++)h.forEach((b,g)=>{(f!==u-o||g>=c)&&m.push(b[f])});return m}drawCodewords(e){if(e.length!==Math.floor(O(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const a=n-o,u=(n+1&2)===0?this.size-1-r:r;!this.types[u][a]&&s<e.length*8&&(this.modules[u][a]=x(e[s>>>3],7-(s&7)),s++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+s)%2===0;break;case 1:r=s%2===0;break;case 2:r=n%3===0;break;case 3:r=(n+s)%3===0;break;case 4:r=(Math.floor(n/3)+Math.floor(s/2))%2===0;break;case 5:r=n*s%2+n*s%3===0;break;case 6:r=(n*s%2+n*s%3)%2===0;break;case 7:r=((n+s)%2+n*s%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[s][n]&&r&&(this.modules[s][n]=!this.modules[s][n])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let a=!1,c=0;const u=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[o][h]===a?(c++,c===5?e+=at:c>5&&e++):(this.finderPenaltyAddHistory(c,u),a||(e+=this.finderPenaltyCountPatterns(u)*I),a=this.modules[o][h],c=1);e+=this.finderPenaltyTerminateAndCount(a,c,u)*I}for(let o=0;o<this.size;o++){let a=!1,c=0;const u=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[h][o]===a?(c++,c===5?e+=at:c>5&&e++):(this.finderPenaltyAddHistory(c,u),a||(e+=this.finderPenaltyCountPatterns(u)*I),a=this.modules[h][o],c=1);e+=this.finderPenaltyTerminateAndCount(a,c,u)*I}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const c=this.modules[o][a];c===this.modules[o][a+1]&&c===this.modules[o+1][a]&&c===this.modules[o+1][a+1]&&(e+=Bt)}let s=0;for(const o of this.modules)s=o.reduce((a,c)=>a+(c?1:0),s);const n=this.size*this.size,r=Math.ceil(Math.abs(s*20-n*10)/n)-1;return e+=r*Lt,e}getAlignmentPatternPositions(){if(this.version===1)return[];{const e=Math.floor(this.version/7)+2,s=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=s)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){const s=e[1],n=s>0&&e[2]===s&&e[3]===s*3&&e[4]===s&&e[5]===s;return(n&&e[0]>=s*4&&e[6]>=s?1:0)+(n&&e[6]>=s*4&&e[0]>=s?1:0)}finderPenaltyTerminateAndCount(e,s,n){return e&&(this.finderPenaltyAddHistory(s,n),s=0),s+=this.size,this.finderPenaltyAddHistory(s,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,s){s[0]===0&&(e+=this.size),s.pop(),s.unshift(e)}}function N(t,e,s){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let n=e-1;n>=0;n--)s.push(t>>>n&1)}function x(t,e){return(t>>>e&1)!==0}class V{constructor(e,s,n){if(this.mode=e,this.numChars=s,this.bitData=n,s<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const $t=[1,10,12,14],Ot=[2,9,11,13],Ut=[4,8,16,16];function gt(t,e){return t[Math.floor((e+7)/17)+1]}function yt(t){const e=[];for(const s of t)N(s,8,e);return new V(Ut,t.length,e)}function Dt(t){if(!bt(t))throw new RangeError("String contains non-numeric characters");const e=[];for(let s=0;s<t.length;){const n=Math.min(t.length-s,3);N(Number.parseInt(t.substring(s,s+n),10),n*3+1,e),s+=n}return new V($t,t.length,e)}function Tt(t){if(!vt(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const e=[];let s;for(s=0;s+2<=t.length;s+=2){let n=L.indexOf(t.charAt(s))*45;n+=L.indexOf(t.charAt(s+1)),N(n,11,e)}return s<t.length&&N(L.indexOf(t.charAt(s)),6,e),new V(Ot,t.length,e)}function qt(t){return t===""?[]:bt(t)?[Dt(t)]:vt(t)?[Tt(t)]:[yt(Ht(t))]}function bt(t){return zt.test(t)}function vt(t){return Ft.test(t)}function Vt(t,e){let s=0;for(const n of t){const r=gt(n.mode,e);if(n.numChars>=1<<r)return Number.POSITIVE_INFINITY;s+=4+r+n.bitData.length}return s}function Ht(t){t=encodeURI(t);const e=[];for(let s=0;s<t.length;s++)t.charAt(s)!=="%"?e.push(t.charCodeAt(s)):(e.push(Number.parseInt(t.substring(s+1,s+3),16)),s+=2);return e}function O(t){if(t<T||t>q)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){const s=Math.floor(t/7)+2;e-=(25*s-10)*s-55,t>=7&&(e-=36)}return e}function z(t,e){return Math.floor(O(t)/8)-mt[e[0]][t]*pt[e[0]][t]}function Yt(t){if(t<1||t>255)throw new RangeError("Degree out of range");const e=[];for(let n=0;n<t-1;n++)e.push(0);e.push(1);let s=1;for(let n=0;n<t;n++){for(let r=0;r<e.length;r++)e[r]=U(e[r],s),r+1<e.length&&(e[r]^=e[r+1]);s=U(s,2)}return e}function Gt(t,e){const s=e.map(n=>0);for(const n of t){const r=n^s.shift();s.push(0),e.forEach((o,a)=>s[a]^=U(o,r))}return s}function U(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let s=0;for(let n=7;n>=0;n--)s=s<<1^(s>>>7)*285,s^=(e>>>n&1)*t;return s}function Wt(t,e,s=1,n=40,r=-1,o=!0){if(!(T<=s&&s<=n&&n<=q)||r<-1||r>7)throw new RangeError("Invalid value");let a,c;for(a=s;;a++){const m=z(a,e)*8,f=Vt(t,a);if(f<=m){c=f;break}if(a>=n)throw new RangeError("Data too long")}for(const m of[dt,ht,ft])o&&c<=z(a,m)*8&&(e=m);const u=[];for(const m of t){N(m.mode[0],4,u),N(m.numChars,gt(m.mode,a),u);for(const f of m.getData())u.push(f)}const h=z(a,e)*8;N(0,Math.min(4,h-u.length),u),N(0,(8-u.length%8)%8,u);for(let m=236;u.length<h;m^=253)N(m,8,u);const p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new _t(a,e,p,r)}function Xt(t,e){const{ecc:s="L",boostEcc:n=!1,minVersion:r=1,maxVersion:o=40,maskPattern:a=-1,border:c=1}=e||{},u=typeof t=="string"?qt(t):Array.isArray(t)?[yt(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);const h=Wt(u,It[s],r,o,a,n),p=Jt({version:h.version,maskPattern:h.mask,size:h.size,data:h.modules,types:h.types},c);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function Jt(t,e=1){if(!e)return t;const{size:s}=t,n=s+e*2;t.size=n,t.data.forEach(o=>{for(let a=0;a<e;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<e;o++)t.data.unshift(Array.from({length:n},a=>!1)),t.data.push(Array.from({length:n},a=>!1));const r=k.Border;t.types.forEach(o=>{for(let a=0;a<e;a++)o.unshift(r),o.push(r)});for(let o=0;o<e;o++)t.types.unshift(Array.from({length:n},a=>r)),t.types.push(Array.from({length:n},a=>r));return t}function lt(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Kt(t,e={}){const s=Xt(t,e),{pixelSize:n=10,whiteColor:r="white",blackColor:o="black"}=e,a=s.size*n,c=s.size*n;let u=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${c} ${a}">`;const h=[];for(let p=0;p<s.size;p++)for(let m=0;m<s.size;m++){const f=m*n,b=p*n;s.data[p][m]&&h.push(`M${f},${b}h${n}v${n}h-${n}z`)}return u+=`<rect fill="${lt(r)}" width="${c}" height="${a}"/>`,u+=`<path fill="${lt(o)}" d="${h.join("")}"/>`,u+="</svg>",u}const Zt="scout",Qt="pair";function _(t){const e=typeof t=="string"?t.trim():"";return e?`${Zt}://${Qt}?payload=${encodeURIComponent(e)}`:null}function te(t){const e=ee(t),s=_(t);if(!e)return{default:s,lan:null,tailnet:null};const n=xt(e.relay,e.fallbackRelays??[]),r=n.find(se),o=n.find(ne);return{default:s,lan:r?_(JSON.stringify(ct(e,r))):null,tailnet:o?_(JSON.stringify(ct(e,o))):null}}function ee(t){const e=typeof t=="string"?t.trim():"";if(!e)return null;try{const s=JSON.parse(e);return!s||typeof s!="object"||typeof s.relay!="string"?null:s}catch{return null}}function ct(t,e){const s=xt(e,[t.relay,...Array.isArray(t.fallbackRelays)?t.fallbackRelays:[]]),n={...t,relay:s[0]};return s.length>1?n.fallbackRelays=s.slice(1):delete n.fallbackRelays,n}function xt(t,e){const s=[],n=new Set;for(const r of[t,...e]){if(typeof r!="string")continue;const o=r.trim();!o||n.has(o)||(n.add(o),s.push(o))}return s}function se(t){const e=Nt(t);if(!e)return!1;if(e.endsWith(".local"))return!0;const s=wt(e);if(!s)return!1;const[n,r]=s;return n===10||n===192&&r===168||n===172&&r>=16&&r<=31||n===169&&r===254}function ne(t){const e=Nt(t);if(!e)return!1;if(e.endsWith(".ts.net"))return!0;const s=wt(e);if(!s)return!1;const[n,r]=s;return n===100&&r>=64&&r<=127}function Nt(t){try{return new URL(t).hostname.toLowerCase()}catch{return""}}function wt(t){const e=t.split(".");if(e.length!==4)return null;const s=e.map(n=>{if(!/^\d+$/.test(n))return Number.NaN;const r=Number(n);return r>=0&&r<=255?r:Number.NaN});return s.every(Number.isFinite)?s:null}function re(t){return t?t.replace(/^wss?:\/\//,"").replace(/:\d+$/,""):null}function ut(t){return t?t.length<=18?t:`${t.slice(0,10)}...${t.slice(-6)}`:null}function ie(t,e){if(!t)return null;const s=Math.max(0,Math.floor((t-e)/1e3));if(s===0)return null;if(s<60)return`${s}s`;const n=Math.floor(s/60),r=s%60;return r>0?`${n}m ${r}s`:`${n}m`}function D({value:t}){const[e,s]=d.useState(!1),n=d.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})},[t]);return i.jsx("button",{type:"button",className:"sys-copy-btn",onClick:n,title:"Copy",children:e?i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"20 6 9 17 4 12"})}):i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),i.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})}function $({label:t,value:e}){return i.jsxs("span",{className:"sys-settings-route-link",children:[i.jsx("a",{className:"sys-settings-link",href:e,title:e,"aria-label":`Open Scout ${t} pairing link`,children:i.jsx("code",{children:t})}),i.jsx(D,{value:e})]})}function oe({agentId:t,navigate:e}){return d.useEffect(()=>{e({view:"agents-v2",agentId:t,tab:"config"})},[t,e]),null}function Fs({navigate:t,section:e,agentId:s}){if(e==="agents"&&s)return i.jsx(oe,{agentId:s,navigate:t});if(e==="agents")return i.jsx(Mt,{navigate:t,selectedAgentId:s});if(e===void 0||e==="appearance"||e==="operator"||e==="comms"||e==="credentials"||e==="voice"||e==="devices"||e==="about"){const n=e??"appearance";return i.jsx(At,{section:n,onSectionChange:r=>t({view:"settings",section:r})})}return i.jsx(ae,{})}function ae(){const[t,e]=d.useState(null),[s,n]=d.useState(""),[r,o]=d.useState(""),[a,c]=d.useState(!0),[u,h]=d.useState(!1),[p,m]=d.useState(!1),[f,b]=d.useState(null),[g,E]=d.useState(null),[H,A]=d.useState(null),[C,Y]=d.useState(null),[jt,G]=d.useState(()=>Date.now()),[W,X]=d.useState(null),J=d.useRef(null),w=d.useRef(0),K=d.useRef(null);d.useEffect(()=>{J.current=t},[t]),d.useEffect(()=>{K.current=f},[f]),d.useEffect(()=>{!t||window.location.hash!=="#trusted-peers"||window.requestAnimationFrame(()=>{document.getElementById("trusted-peers")?.scrollIntoView({block:"start"})})},[t]);const j=d.useCallback(async(l="initial")=>{if(l==="background"&&K.current)return;const v=++w.current;!(J.current!==null)&&l!=="background"?(c(!0),E(null)):h(!0);try{const R=await M(l==="manual"?"/api/pairing-state/refresh":"/api/pairing-state");if(v!==w.current)return;e(R),E(null),Y(Date.now())}catch(R){if(v!==w.current)return;E(R instanceof Error?R.message:String(R))}finally{v===w.current&&(c(!1),h(!1))}},[]),Z=d.useCallback(async()=>{try{const l=await M("/api/user");o(l.name),n(l.name),A(null)}catch(l){A(l instanceof Error?l.message:String(l))}},[]),Q=d.useRef(!1);d.useEffect(()=>{j("initial"),Z()},[j,Z]),d.useEffect(()=>{const l=setInterval(()=>{j("background")},1e4);return()=>clearInterval(l)},[j]),d.useEffect(()=>{if(!t?.pairing?.expiresAt)return;G(Date.now());const l=setInterval(()=>{G(Date.now())},1e3);return()=>clearInterval(l)},[t?.pairing?.expiresAt]);const tt=d.useCallback(async()=>{m(!0),A(null);try{const l=await M("/api/user",{method:"POST",body:JSON.stringify({name:s})});o(l.name),n(l.name)}catch(l){A(l instanceof Error?l.message:String(l))}finally{m(!1)}},[s]),S=d.useCallback(async l=>{const v=++w.current;b(l),E(null);try{const P=await M("/api/pairing/control",{method:"POST",body:JSON.stringify({action:l})});if(v!==w.current)return;e(P),Y(Date.now())}catch(P){if(v!==w.current)return;E(P instanceof Error?P.message:String(P))}finally{v===w.current&&b(null)}},[]);d.useEffect(()=>{!t||t.isRunning||Q.current||(Q.current=!0,S("start"))},[t,S]);const Et=d.useCallback(async l=>{X(l);try{await M(`/api/pairing/peers/${encodeURIComponent(l)}`,{method:"DELETE"}),j("manual")}catch{}finally{X(null)}},[j]),et=d.useMemo(()=>{const l=t?.pairing?.qrValue?.trim();return l?Kt(l,{border:2,ecc:"M",pixelSize:8}):null},[t?.pairing?.qrValue]),y=d.useMemo(()=>te(t?.pairing?.qrValue),[t?.pairing?.qrValue]),kt=!!(y.lan||y.tailnet||y.default),F=re(t?.pairing?.relay??t?.relay??null),st=ie(t?.pairing?.expiresAt,jt),nt=(t?.trustedPeers.find(l=>l.fingerprint===t.connectedPeerFingerprint)??null)?.name??ut(t?.connectedPeerFingerprint??null),Pt=Rt(t),rt=s.trim()!==r,St=!a&&!t&&!!g;return i.jsxs("div",{className:"sys-surface-page sys-settings-page",children:[i.jsxs("div",{className:"sys-page-head",children:[i.jsxs("div",{className:"sys-page-title-group",children:[i.jsx("h2",{className:"sys-page-title",children:"Settings"}),i.jsx("p",{className:"sys-page-subtitle",children:"Identity, pairing, and trusted devices."})]}),i.jsxs("div",{className:"sys-page-actions",children:[t&&i.jsx(B,{tone:Pt,children:t.statusLabel}),i.jsx("div",{className:"sys-sync-note",children:a?"Loading...":g&&t?`Snapshot from ${C?ot(C):"earlier"}`:C?`Updated ${ot(C)}`:""}),i.jsx("button",{type:"button",className:"s-btn",disabled:a||u||!!f,onClick:()=>{j("manual")},children:u?"Refreshing...":"Refresh"})]})]}),g&&t&&i.jsxs("div",{className:"sys-banner sys-banner-warning",children:[i.jsx("strong",{children:"Refresh failed."}),i.jsx("span",{children:g})]}),H&&i.jsxs("div",{className:"sys-banner sys-banner-warning",children:[i.jsx("strong",{children:"Identity error."}),i.jsx("span",{children:H})]}),a&&!t&&i.jsx(it,{title:"Loading settings",body:"Checking relay status and trusted peers."}),St&&i.jsx(it,{className:"sys-state-card-error",title:"Pairing unavailable",body:g,action:i.jsx("button",{type:"button",className:"s-btn",onClick:()=>{j("manual")},children:"Try again"})}),i.jsxs("div",{className:"sys-settings-hero",children:[i.jsx("div",{className:"sys-settings-qr-col",children:et?i.jsxs("div",{className:"sys-settings-qr-frame",children:[i.jsx("div",{className:"s-qr",dangerouslySetInnerHTML:{__html:et}}),st&&i.jsxs("span",{className:"sys-settings-qr-expires",children:["Expires in ",st]})]}):i.jsx("div",{className:"sys-settings-qr-empty",children:i.jsx("span",{className:"sys-settings-qr-empty-label",children:"Generating QR..."})})}),i.jsxs("div",{className:"sys-settings-info-col",children:[i.jsxs("div",{className:"sys-input-row",children:[i.jsx("input",{className:"sys-input",type:"text",placeholder:"Your name",value:s,onChange:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&rt&&!p&&tt()}}),i.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!rt||p,onClick:()=>{tt()},children:p?"Saving...":"Save"})]}),i.jsxs("div",{className:"sys-settings-kv-list",children:[t?.identityFingerprint&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Fingerprint"}),i.jsxs("span",{className:"sys-settings-kv-value",children:[i.jsx("code",{children:t.identityFingerprint}),i.jsx(D,{value:t.identityFingerprint})]})]}),F&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Relay"}),i.jsxs("span",{className:"sys-settings-kv-value",children:[i.jsx("code",{children:F}),i.jsx(D,{value:F})]})]}),kt&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Links"}),i.jsxs("span",{className:"sys-settings-kv-value sys-settings-link-list",children:[y.lan&&i.jsx($,{label:"LAN",value:y.lan}),y.tailnet&&i.jsx($,{label:"TSN",value:y.tailnet}),!y.lan&&!y.tailnet&&y.default&&i.jsx($,{label:"PAIR",value:y.default})]})]}),t?.statusDetail&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Status"}),i.jsx("span",{className:"sys-settings-kv-value sys-settings-kv-nowrap",children:t.statusDetail})]}),nt&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Connected"}),i.jsx("span",{className:"sys-settings-kv-value",children:nt})]}),t?.secure&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Security"}),i.jsx("span",{className:"sys-settings-kv-value",children:i.jsx(B,{tone:"success",children:"Noise XX"})})]})]}),t&&i.jsx("div",{className:"sys-inline-actions sys-settings-controls",children:t.isRunning?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"s-btn",disabled:!!f,onClick:()=>{S("restart")},children:f==="restart"?"Restarting...":"Restart"}),i.jsx("button",{type:"button",className:"s-btn",disabled:!!f,onClick:()=>{S("stop")},children:f==="stop"?"Stopping...":"Stop"})]}):i.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!!f,onClick:()=>{S("start")},children:f==="start"?"Starting...":"Start pairing"})})]})]}),t&&i.jsxs("section",{className:"sys-settings-peers",id:"trusted-peers",children:[i.jsx("div",{className:"sys-section-head",children:i.jsxs("div",{children:[i.jsx("h3",{className:"sys-section-title",children:"Trusted peers"}),i.jsxs("p",{className:"sys-section-subtitle",children:[t.trustedPeers.length," device",t.trustedPeers.length!==1?"s":""," paired with this broker."]})]})}),t.trustedPeers.length===0?i.jsxs("div",{className:"sys-list-empty",children:[i.jsx("h3",{children:"No trusted peers"}),i.jsx("p",{children:"Devices appear here after completing pairing."})]}):i.jsxs("table",{className:"sys-peers-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Device"}),i.jsx("th",{children:"Fingerprint"}),i.jsx("th",{children:"Paired"}),i.jsx("th",{children:"Last seen"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:t.trustedPeers.map(l=>{const v=l.fingerprint===t.connectedPeerFingerprint;return i.jsxs("tr",{className:v?"sys-peers-row-connected":"",children:[i.jsx("td",{children:i.jsxs("span",{className:"sys-peers-name",children:[l.name??ut(l.fingerprint)??"Peer",v&&i.jsx(B,{tone:"success",className:"sys-peers-badge",children:"Connected"})]})}),i.jsx("td",{children:i.jsx("code",{className:"sys-peers-fp",children:l.fingerprint})}),i.jsx("td",{children:l.pairedAtLabel??"—"}),i.jsx("td",{children:l.lastSeenLabel??"—"}),i.jsx("td",{children:i.jsx("button",{type:"button",className:"sys-peers-remove",disabled:W===l.fingerprint,onClick:()=>{Et(l.fingerprint)},title:"Remove peer",children:W===l.fingerprint?"...":"Remove"})})]},l.fingerprint)})})]})]})]})}export{Fs as SettingsScreen};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SageModelStudio-CNDhZhgD.js","assets/index-EsrkGBcv.js","assets/index-CN4rBB_s.css","assets/SageModelStudio-768dRQr4.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as a,k as Gt,m as Ee,j as e,_ as Re}from"./index-EsrkGBcv.js";import{a as Ie}from"./api-DSqpVKC7.js";import{u as we,p as $e,z as Zt,W as De,w as Oe,c as We,a as Fe,t as Le,C as ze,Z as ue}from"./WorldMinimap-B6HNgcDe.js";import{WorldSky as He}from"./WorldSky-Jm2Z6dfW.js";import{WorldActorTalk as Ye}from"./WorldActorTalk-BvSg_b1y.js";import{f as Xe,F as Be}from"./FloorExchangePanel-BU1pPu8K.js";import{CharacterFamilyPreview as Ke}from"./CharacterFamilyPreview-DMfw7UM_.js";import{w as he}from"./RenderedWorkerSprite-Dhlyg89J.js";import{f as Ge}from"./floor-preview-text-HrORUJ7D.js";import{FloorMessagePasses as Ze}from"./FloorMessagePasses-cLW2UGNP.js";import{f as Ue}from"./floor-character-name-CqJPOlXb.js";import{WorkRunView as qe}from"./WorkRunView-BDkR7Edq.js";import{b as Dt}from"./agent-lane-detail-Ti3trpfH.js";import{f as Je}from"./floor-memory-YMM8AlLY.js";import{f as Ve}from"./floor-context-model-rWKqaKmV.js";import{f as $t}from"./agent-floor-actor-DW8zLht0.js";import{b as pe}from"./shared-work-artifacts-DfNl9KTo.js";import{u as Qe}from"./Provider-C35yu29I.js";import{SharedFloorCharacter as to}from"./SharedFloorCharacter-DNEiaOUh.js";import{j as eo}from"./agent-lanes-model-DMAdqCmK.js";import{F as oo}from"./file-code-corner-CsU7jJpu.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"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./index-724SdE6r.js";import"./NewChatComposer-C97-iTMK.js";import"./media-blobs-Bi8pxr1u.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.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"./send-to-agent-session-DoKCDBJ4.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.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"./floor-message-passes-CO3Ix_wR.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./CrewSprite-Dhryjx2c.js";import"./SpriteAvatar-CpZWf54-.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./WorldCharacter-CIIlutQq.js";import"./RiggedWorkerCharacter-q6QRc7_o.js";function so(){const[r,i]=a.useState([]);return a.useEffect(()=>{let h=!1,d;const x=async()=>{try{const w=await Ie("/api/world/messages");h||i(w)}catch{}h||(d=setTimeout(x,3e3))};return x(),()=>{h=!0,clearTimeout(d)}},[]),r}const ro=5;function no(r,i){return Math.hypot(r,i)>=ro}function ao(r,i,h,d,x){const w=we(i/d,h/d,x);return{x:Math.max($,Math.round(r.x+w.x)),y:Math.max($,Math.round(r.y+w.y))}}const St=715,Ot=Math.round(St*809/647),io=647/809,Wt=.22,Ut=.78,Ft=.36,qt=.58,co=.16,me=.981,fe=64,je=84,lo=84,uo=132,ho=95,ge=.12,po=.85,mo=.5,xe=[6,-5,3,-3,5],Z=205,Ct=60,$=30,fo=(Ut-Wt)*St/((qt-Ft)*Ot);function ke(r){const i=Math.max(1,Math.min(r,Math.floor(Math.sqrt(r*fo))));return{columns:i,rows:Math.max(1,Math.ceil(Math.max(r,1)/i))}}function go(r,i){let h=0,d=$;for(const x of r)d>$&&d+x>i&&(h++,d=$),d+=x+Z;return r.length?h+1:0}function xo(r,i){const h=r.length,d=Math.min(i,h);if(d<=1)return[];const x=(b,M)=>{let g=0;for(let k=b;k<M;k++)g+=r[k]+(k>b?Z:0);return g},w=Array.from({length:h+1},()=>Array(d+1).fill(1/0)),N=Array.from({length:h+1},()=>Array(d+1).fill(0));w[0][0]=0;for(let b=1;b<=h;b++)for(let M=1;M<=Math.min(b,d);M++)for(let g=b-1;g>=M-1;g--){const k=Math.max(w[g][M-1],x(g,b));k<w[b][M]&&(w[b][M]=k,N[b][M]=g)}const j=[];let P=h;for(let b=d;b>1;b--)P=N[P][b],j.unshift(P);return j}function yo(r){const{columns:i,rows:h}=ke(r),d=(Ut-Wt)*St,x=(qt-Ft)*Ot,w=Math.max(1,i*uo/d,h*ho/x);return Math.round(Ot*w)}function bo(r,i,h){const{columns:d,rows:x}=ke(r),w=Wt*i,N=(Ut-Wt)*i,j=Ft*h,P=(qt-Ft)*h;return Array.from({length:r},(b,M)=>{const g=Math.floor(M/d),k=M%d,T=Math.min(d,r-g*d),U=x===1?mo:ge+(po-ge)*(g/(x-1)),_=(1-U)*co*N,S=N-_*2-je,q=d>1?S*(T-1)/(d-1):0,V=T>1?q/(T-1):0,F=Math.max(0,S-q),Q=T>1?(g%2===1?1:-1)*Math.min(F/2,V/4):0;return{x:Math.round(w+_+(S-q)/2+Q+k*V),y:Math.round(j+U*P-lo+xe[(k+g)%xe.length])}})}function wo(r){const i=(r.facts?.cwd||Dt(r).cwd||"").trim();if(!i.startsWith("/"))return"";const h=[];for(const d of i.split("/"))d===".."?h.pop():d&&d!=="."&&h.push(d);return`/${h.join("/")}`}function jo(r,i,h){const d=new Map;for(const n of r){const p=wo(n),m=JSON.stringify(p?["workspace",p]:["lane",n.id]),y=d.get(m)??{cwd:p,lanes:new Map};y.lanes.set(n.id,n),d.set(m,y)}const x={groups:i?.groups.map(n=>({...n,laneIds:[...n.laneIds]}))??[]};for(const[n,p]of d){let m=x.groups.find(y=>y.key===n);m||(m={key:n,laneIds:[],height:Ot},x.groups.push(m));for(const y of p.lanes.keys())m.laneIds.includes(y)||m.laneIds.push(y);m.height=Math.max(m.height,yo(m.laneIds.length))}const w=h?.positions??{},N=h?.targetAspect&&Number.isFinite(h.targetAspect)&&h.targetAspect>0?h.targetAspect:1.5,j=n=>Math.round(n.height*io),P=n=>Math.round(n*me)+fe,b=new Map,M=[],g=x.groups.filter(n=>{const p=w[n.key];if(!p)return!0;const m=Math.round(p.x),y=Math.round(p.y);return b.set(n.key,{x:m,y}),M.push({x:m,y,right:m+j(n),bottom:y+P(n.height)}),!1});M.sort((n,p)=>n.x-p.x||n.y-p.y);const k=(n,p,m,y)=>{const ft=p+P(y);return M.find(L=>n<L.right&&L.x<n+m&&p<L.bottom&&L.y<ft)},T=Math.max(St,...g.map(j)),U=g.reduce((n,p)=>n+(j(p)+Z)*(P(p.height)+Ct),0),_=Math.max(T+Z,Math.sqrt(U*N)),S=$+_,q=g.map(j),V=new Set(xo(q,go(q,S))),F=[];for(let n=0;n<g.length;n++)(V.has(n)||F.length===0)&&F.push([]),F[F.length-1].push(n);const Q=F.map(n=>n.reduce((p,m)=>p+j(g[m])+Z,-Z)),ht=Math.max(0,...Q);let At=0,E=$+Math.round(Math.max(0,ht-(Q[0]??0))/2),R=E,v=0,Y=$;for(let n=0;n<g.length;n++){const p=g[n],m=j(p);V.has(n)?(At++,Y+=v+Ct,E=$+Math.round(Math.max(0,ht-Q[At])/2),R=E,v=0):R>E&&R+m>S&&(Y+=v+Ct,R=E,v=0);for(let y=k(R,Y,m,p.height);y;y=k(R,Y,m,p.height))y.right+Z+m<=S?R=y.right+Z:(Y=Math.max(Y+v+Ct,y.bottom+Ct),R=E,v=0);b.set(p.key,{x:R,y:Y}),R+=m+Z,v=Math.max(v,P(p.height))}const pt=[];let mt=$*2+St,nt=320;for(const n of x.groups){const p=b.get(n.key),m=j(n);mt=Math.max(mt,p.x+m+$),nt=Math.max(nt,p.y+Math.round(n.height*me)+fe+$);const y=d.get(n.key);if(!y)continue;const ft=bo(n.laneIds.length,m,n.height),L=n.laneIds.flatMap((gt,xt)=>{const Nt=y.lanes.get(gt);if(!Nt)return[];const{x:at,y:tt}=ft[xt];return[{lane:Nt,x:at,y:tt,centerX:p.x+at+je/2,centerY:p.y+tt+70}]});pt.push({key:n.key,cwd:y.cwd,lanes:L.map(gt=>gt.lane),x:p.x,y:p.y,width:m,height:n.height,actors:L})}return{memory:x,groups:pt,worldWidth:mt,worldHeight:nt}}const Me="openscout:world-island-layout:v1";function ko(){try{const r=globalThis.localStorage?.getItem(Me);if(!r)return{};const i=JSON.parse(r);if(!i||typeof i!="object")return{};const h={};for(const[d,x]of Object.entries(i)){if(!x||typeof x!="object")continue;const{x:w,y:N}=x;typeof w=="number"&&Number.isFinite(w)&&typeof N=="number"&&Number.isFinite(N)&&(h[d]={x:w,y:N})}return h}catch{return{}}}function ye(r){try{globalThis.localStorage?.setItem(Me,JSON.stringify(r))}catch{}}const Mo="/assets/world-outposts-v1-DOt0i98W.png",_o="/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png",Po=a.lazy(()=>Re(()=>import("./SageModelStudio-CNDhZhgD.js"),__vite__mapDeps([0,1,2,3])));function be(r){return r>=1?`${Number(r.toFixed(r<10?1:0))}:1`:`1:${Math.round(1/r).toLocaleString()}`}function Co(r){let i=0;for(const h of r)i=i*31+h.charCodeAt(0)>>>0;return{outpostPosition:`${i%3*50}% center`,skyPosition:`${i%100}% ${18+i%58}%`}}function Zs({lanes:r,now:i,onActor:h}){const{openFilePreview:d}=Qe(),x=so(),[w,N]=a.useState(null),[j,P]=a.useState(null),[b,M]=a.useState(!1),[g,k]=a.useState(null),[T,U]=a.useState([]),[_,S]=a.useState(null),[q,V]=a.useState(null),[F,Q]=a.useState(!1),[ht,At]=a.useState(!0),[E,R]=a.useState("crew"),v=a.useRef({});for(const t of[...r].sort((o,c)=>o.id.localeCompare(c.id)))if(!v.current[t.id]){const o=Object.values(v.current);v.current[t.id]=Ee(t.agent.name)??Gt.find(c=>!o.includes(c.slug))?.slug??Gt[o.length%Gt.length].slug}const[Y,pt]=a.useState(!1),[mt,nt]=a.useState(!1),[n,p]=a.useState(!0),m=a.useRef([]);for(const t of r){if(m.current.length>=he.length)break;m.current.includes(t.id)||m.current.push(t.id)}const[y,ft]=a.useState(!1),[L,gt]=a.useState(!1),[xt,Nt]=a.useState(!1),[at,tt]=a.useState(!1),[it,_e]=a.useState(!1),Tt=a.useRef(null),[et,Pe]=a.useState({width:900,height:500}),[X,Jt]=a.useState(null),[z,Ce]=a.useState("flat"),[B,Vt]=a.useState(1),[K,Lt]=a.useState({x:0,y:0}),[yt,Se]=a.useState({}),[zt,Ht]=a.useState(null),ct=a.useRef(null),lt=a.useRef(!1),[Yt,vt]=a.useState(ko),[Qt,Xt]=a.useState(null),dt=a.useRef(null),D=a.useRef(null);a.useEffect(()=>{if(!Tt.current)return;const t=new ResizeObserver(([o])=>Pe({width:o.contentRect.width,height:o.contentRect.height}));return t.observe(Tt.current),()=>t.disconnect()},[b]);const te=a.useRef(void 0),J=a.useMemo(()=>jo(r,te.current,{positions:Yt,targetAspect:et.width/Math.max(et.height,1)}),[r,Yt,et]);a.useEffect(()=>{te.current=J.memory},[J]);const H=new Map(J.groups.map(t=>[t.key,t]));[...H];const Et=H,ot=r.find(t=>t.id===g)??null,Ae=ot?pe(r).filter(t=>t.owners.some(o=>o.id===ot.id)):[],bt=new Map;for(const t of Ae)for(const o of t.owners)o.id!==g&&bt.set(o.id,{lane:o,reason:"Shared file activity"});const ut=Je(r),ee=[...new Map(ut.map(({parent:t})=>[t.id,t])).values()],Rt=t=>Ue(t).label;for(const t of ut)t.child.id===g&&bt.set(t.parent.id,{lane:t.parent,reason:"Parent session"}),t.parent.id===g&&bt.set(t.child.id,{lane:t.child,reason:"Child session"});const oe=new Set(bt.keys());_&&_.forEach(t=>oe.add(t));const se=Xe(r,i,x),wt=new Map;for(const t of se)wt.set([t.from,t.to].sort().join(":"),[t.from,t.to]);for(const{parent:t,child:o}of ut){const c=[t.id,o.id].sort().join(":");wt.has(c)||wt.set(c,[t.id,o.id])}const re=!!_&&[...wt.values()].some(t=>t.every(o=>_.includes(o)));a.useEffect(()=>{_&&!re&&S(null)},[re,_]);const ne=t=>{k(null),S(t)},jt=new Map(J.groups.flatMap(t=>t.actors.map(o=>[o.lane.id,{x:o.centerX+(yt[o.lane.id]?.x??0),y:o.centerY+(yt[o.lane.id]?.y??0)}]))),kt=g?jt.get(g):null;ot&&Ve([ot],i,["tool","message","ask"]).slice(0,3),ot&&$t(ot,i);const O=J.worldWidth,W=J.worldHeight,ae=z==="iso"?Math.sqrt(3)/2*(O+W):O,ie=z==="iso"?(O+W)/2:W,ce=Math.min((et.width-36)/ae,(et.height-70)/ie),G=Math.max(.12,ce)*B,A=a.useRef({zoom:B,pan:K});A.current={zoom:B,pan:K};const Mt=(t,o)=>{const c=Math.max(.12,ce)*o;return We(t,{width:ae*c,height:ie*c},et)},Bt=t=>{A.current=t,Vt(t.zoom),Lt(t.pan)},_t=a.useRef(null),st=()=>{_t.current!==null&&(cancelAnimationFrame(_t.current),_t.current=null)},It=t=>{st();const o={zoom:t.zoom,pan:Mt(t.pan,t.zoom)};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){Bt(o);return}const c={zoom:A.current.zoom,pan:A.current.pan},s=performance.now(),f=C=>{const l=Math.min(1,(C-s)/ze),u=Le(c,o,l);u.pan=Mt(u.pan,u.zoom),Bt(u),_t.current=l<1?requestAnimationFrame(f):null};_t.current=requestAnimationFrame(f)};a.useEffect(()=>st,[]);const Ne=(t,o)=>{st();const c=Zt(A.current.zoom,A.current.pan,t,o);c.pan=Mt(c.pan,c.zoom),Bt(c)};a.useEffect(()=>{const t=Tt.current;if(!t)return;const o=c=>{if(c.target.closest(".shared-floor__inspect"))return;c.preventDefault();const s=t.getBoundingClientRect();Ne(Oe(c.deltaY,c.deltaMode),{x:c.clientX-s.left-s.width/2,y:c.clientY-s.top-s.height/2})};return t.addEventListener("wheel",o,{passive:!1}),()=>t.removeEventListener("wheel",o)});const Kt=Fe(B),Te=a.useMemo(()=>J.groups.map(t=>{const o=$e(t.x+t.width/2-O/2,t.y+t.height/2-W/2,z);return{x:o.x*G+K.x,y:o.y*G+K.y,spread:t.width*G}}),[J.groups,z,G,K,O,W]),Pt=t=>{S(null),k(t.id),h(t)},le=t=>{U(o=>o.includes(t.id)?o.filter(c=>c!==t.id):[...o,t.id]),Pt(t)};return a.useEffect(()=>{U(t=>{const o=t.filter(c=>r.some(s=>s.id===c));return o.length===t.length?t:o})},[r]),a.useEffect(()=>{if(!g&&!_&&T.length===0)return;const t=o=>{o.key==="Escape"&&(k(null),S(null),U([]))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[g,_,T.length]),b?e.jsxs("div",{className:"shared-floor shared-floor__experiment",children:[e.jsx("button",{className:"shared-floor__back",type:"button",onClick:()=>M(!1),children:"← Back to world"}),e.jsx(qe,{lanes:r,now:i,onActor:h})]}):e.jsxs("div",{className:`shared-floor is-map is-${z}${ot||_?" has-selection":""}${L?" has-boundaries":""}${it?" is-paused":""}`,children:[j?e.jsx(Ye,{...j,onSent:()=>{N(j.lane.id),k(j.lane.id)},onTalk:()=>P({...j,compose:!0,voice:!1}),onDictate:()=>P({...j,compose:!0,voice:!0}),onProfile:()=>{Pt(j.lane),P(null)},onClose:()=>P(null)},j.lane.id):null,mt?e.jsx(a.Suspense,{fallback:e.jsx("div",{role:"status",children:"Loading 3D studio…"}),children:e.jsx(Po,{onClose:()=>nt(!1)})}):null,_?e.jsx(Be,{pair:_,lanes:r,now:i,onClose:()=>S(null),onFile:d,onSpeaker:V},_.join(":")):null,Y?e.jsx(Ke,{onClose:()=>pt(!1)}):null,e.jsxs("div",{className:"shared-floor__teams",children:[e.jsxs("button",{type:"button","aria-expanded":xt,onClick:()=>Nt(!xt),children:["Agent teams",ut.length?` · ${ut.length}`:""]}),xt?e.jsxs("section",{"aria-label":"Agent families",children:[e.jsx("strong",{children:"Parent → subagents"}),ee.length?ee.map(t=>e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>Pt(t),children:Rt(t)}),ut.filter(o=>o.parent.id===t.id).map(({child:o})=>e.jsxs("button",{className:"shared-floor__team-child",type:"button",onClick:()=>Pt(o),children:["↳ ",Rt(o),e.jsx("small",{children:$t(o,i).label})]},o.id))]},t.id)):e.jsx("p",{children:"No parent links reported in this roster yet."})]}):null]}),e.jsxs("div",{className:"shared-floor__layers",children:[e.jsx("button",{type:"button","aria-expanded":at,onClick:()=>tt(!at),children:"Layers"}),at?e.jsxs("div",{children:[e.jsxs("div",{className:"shared-floor__layout-actions",role:"group","aria-label":"Island layout",children:[e.jsx("button",{type:"button",onClick:()=>{ye({}),vt({})},children:"Auto-arrange islands"}),e.jsx("small",{children:"Drag an island's backdrop to place it; auto-arrange repacks."})]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Work surfaces",checked:y,onChange:t=>ft(t.target.checked)}),"Work surfaces"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Boundaries",checked:L,onChange:t=>gt(t.target.checked)}),"Boundaries"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Playful motion",checked:F,onChange:t=>Q(t.target.checked)}),"Playful motion"]}),e.jsxs("label",{children:["Characters",e.jsxs("select",{"aria-label":"Map character style",value:E,onChange:t=>R(t.target.value),children:[e.jsx("option",{value:"crew",children:"Crew"}),e.jsx("option",{value:"chip",children:"Pixel Chip"}),e.jsx("option",{value:"prototype",children:"Prototype rigs"})]})]}),E==="prototype"?e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Character rig",checked:ht,onChange:t=>At(t.target.checked)}),"Character rig"]}):null,e.jsx("button",{type:"button",onClick:()=>{pt(!0),tt(!1)},children:"Preview character family →"}),e.jsx("button",{type:"button",onClick:()=>{nt(!0),tt(!1)},children:"3D character studio →"}),E==="prototype"?e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Rendered characters",checked:n,onChange:t=>p(t.target.checked)}),"Rendered characters"]}):null,e.jsx("button",{type:"button",className:"shared-floor__run-link",onClick:()=>{tt(!1),M(!0)},children:"Try Work run →"})]}):null]}),e.jsxs("div",{className:"shared-floor__camera","aria-label":"Map camera",children:[e.jsx("button",{type:"button","aria-pressed":it,onClick:()=>_e(!it),children:it?"Resume":"Pause"}),e.jsx("div",{role:"group","aria-label":"Map projection",children:["flat","iso"].map(t=>e.jsx("button",{type:"button","aria-pressed":z===t,onClick:()=>Ce(t),children:t==="iso"?"Iso":"Flat"},t))}),e.jsx("button",{type:"button","aria-label":"Zoom shared map out",onClick:()=>It(Zt(A.current.zoom,A.current.pan,1/ue)),children:"−"}),e.jsx("button",{type:"button",onClick:()=>It({zoom:1,pan:{x:0,y:0}}),children:"Fit"}),e.jsx("button",{type:"button","aria-label":"Zoom shared map in",onClick:()=>It(Zt(A.current.zoom,A.current.pan,ue)),children:"+"}),e.jsx("output",{className:"shared-floor__zoom-readout","aria-label":`Zoom ${be(B)}`,children:be(B)})]}),e.jsx(De,{width:O,height:W,projection:z,size:et,scale:G,zoom:B,pan:K,onPan:t=>{st(),Lt(Mt(t,A.current.zoom))},onZoom:t=>{st(),Vt(t)},onLocate:t=>It({zoom:A.current.zoom,pan:t}),workspaces:[...H].map(([t,o])=>({id:t,label:`Locate workspace ${o.cwd||"unknown"}, ${o.lanes.length} actors`,x:o.x+o.width/2,y:o.y+o.height/2}))}),X&&H.has(X)?e.jsxs("aside",{className:"shared-floor__workspace-panel","aria-label":"Workspace details",children:[e.jsxs("header",{children:[e.jsx("strong",{children:H.get(X).cwd.split("/").filter(Boolean).at(-1)||"Workspace"}),e.jsx("button",{type:"button","aria-label":"Close workspace details",onClick:()=>Jt(null),children:"×"})]}),e.jsx("p",{children:H.get(X).cwd}),e.jsx("h4",{children:"Reported branches"}),e.jsx("small",{children:[...new Set(H.get(X).lanes.map(t=>t.facts?.branch||Dt(t).branch).filter(Boolean))].join(" · ")||"Branch not reported"}),e.jsx("h4",{children:"Actors in this workspace"}),H.get(X).lanes.map(t=>e.jsxs("button",{className:"shared-floor__workspace-actor",type:"button",onClick:()=>Pt(t),children:[e.jsxs("span",{className:"shared-floor__workspace-actor-heading",children:[e.jsx("strong",{children:Rt(t)}),e.jsx("small",{children:$t(t,i).label})]}),e.jsx("span",{className:"shared-floor__workspace-runtime",children:[t.agent.harness,t.facts?.model||Dt(t).model].filter(Boolean).join(" · ")||"Runtime not reported"}),e.jsx("span",{className:"shared-floor__workspace-task",children:Ge(t.facts?.currentTask)||"No task reported"}),e.jsxs("span",{className:"shared-floor__workspace-runtime",children:[t.facts?.branch||Dt(t).branch||"Branch not reported"," · ",t.id.slice(-5)]})]},t.id))]}):null,e.jsxs("div",{className:"shared-floor__viewport",ref:Tt,onPointerDown:t=>{t.button!==0||t.target.closest("button")||(st(),D.current={x:t.clientX,y:t.clientY,px:A.current.pan.x,py:A.current.pan.y},t.currentTarget.setPointerCapture(t.pointerId))},onPointerMove:t=>{D.current&&Lt(Mt({x:D.current.px+t.clientX-D.current.x,y:D.current.py+t.clientY-D.current.y},B))},onPointerUp:t=>{D.current&&Math.hypot(t.clientX-D.current.x,t.clientY-D.current.y)<4&&(k(null),S(null)),D.current=null},onPointerCancel:()=>{D.current=null},children:[e.jsx(He,{zoom:B,pan:K,beacons:Te,beaconStrength:Kt.beacons}),e.jsxs("div",{className:"shared-floor__benches",style:{opacity:Kt.world,visibility:Kt.world>0?void 0:"hidden",width:O,height:W,transform:`translate(${K.x}px, ${K.y}px) scale(${G})${z==="iso"?" matrix(0.8660254, 0.5, -0.8660254, 0.5, 0, 0)":""}`,marginLeft:-O/2,marginTop:-W/2},children:[e.jsx("svg",{className:"floor-exchange-links",width:O,height:W,"aria-label":"Agent exchange links",children:[...wt].map(([t,o])=>{const c=jt.get(o[0]),s=jt.get(o[1]);if(!c||!s)return null;const f=o.map(u=>{const I=r.find(rt=>rt.id===u);return I?Rt(I):"Actor"}).join(" and "),C=se.some(u=>o.includes(u.from)&&o.includes(u.to)),l=`M ${c.x} ${c.y} Q ${(c.x+s.x)/2} ${Math.min(c.y,s.y)-30} ${s.x} ${s.y}`;return e.jsxs("g",{role:"button",tabIndex:0,"aria-label":`${C?"Open exchanges":"Inspect relationship"} between ${f}`,className:`${C?"is-exchange":"is-family"}${_?.includes(o[0])&&_.includes(o[1])?" is-active":""}`,onPointerDown:u=>u.stopPropagation(),onClick:u=>{u.stopPropagation(),ne(o)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),ne(o))},children:[e.jsxs("title",{children:[C?"Recent exchanges":"Parent relationship"," · ",f]}),e.jsx("path",{className:"exchange-line",d:l}),e.jsx("path",{className:"exchange-hit",d:l})]},t)})}),e.jsx(Ze,{broker:x,lanes:r,now:i,positions:jt,paused:it}),kt?e.jsx("svg",{className:"shared-floor__connections",width:O,height:W,"aria-hidden":"true",children:[...bt].map(([t,o])=>{const c=jt.get(t);return c?e.jsx("path",{className:o.reason==="Shared file activity"?"is-shared":"is-lineage",d:`M ${kt.x} ${kt.y} Q ${(kt.x+c.x)/2} ${Math.min(kt.y,c.y)-35} ${c.x} ${c.y}`},t):null})}):null,[...H].map(([t,o])=>{const c=Co(t);return e.jsxs("section",{className:`shared-floor__island${o.actors.length>1||y?" has-place":""}${X===t?" is-open":""}${Qt===t?" is-dragging":""}`,"aria-label":o.cwd||"Agent gathering",style:{left:Et.get(t).x,top:Et.get(t).y,height:Et.get(t).height,width:Et.get(t).width,zIndex:Qt===t?5:void 0},onPointerDown:s=>{if(s.button!==0||s.target.closest("button"))return;const f=s.currentTarget.getBoundingClientRect(),C=(s.clientX-f.left)/f.width-.5,l=(s.clientY-f.top)/f.height-.5;if(C*C+l*l>.25)return;s.stopPropagation(),st();const u={};for(const[I,rt]of H)I!==t&&(u[I]={x:rt.x,y:rt.y});dt.current={key:t,sx:s.clientX,sy:s.clientY,baseX:o.x,baseY:o.y,moved:!1,before:Yt,hold:u},s.currentTarget.setPointerCapture(s.pointerId)},onPointerMove:s=>{const f=dt.current;if(!f||f.key!==t)return;s.stopPropagation();const C=s.clientX-f.sx,l=s.clientY-f.sy;!f.moved&&!no(C,l)||(f.moved=!0,Xt(t),f.last=ao({x:f.baseX,y:f.baseY},C,l,G,z),vt({...f.hold,[t]:f.last}))},onPointerUp:s=>{const f=dt.current;if(!f||f.key!==t)return;if(s.stopPropagation(),dt.current=null,Xt(null),s.currentTarget.hasPointerCapture(s.pointerId)&&s.currentTarget.releasePointerCapture(s.pointerId),!f.moved){k(null),S(null);return}const C={...f.before,[t]:f.last??{x:f.baseX,y:f.baseY}};ye(C),vt(C)},onPointerCancel:()=>{const s=dt.current;!s||s.key!==t||(dt.current=null,Xt(null),vt(s.before))},children:[e.jsxs("div",{className:"shared-floor__place-presentation",children:[e.jsx("div",{className:"shared-floor__sky","aria-hidden":"true",style:{backgroundImage:`url(${_o})`,backgroundPosition:c.skyPosition}}),e.jsx("div",{className:"shared-floor__outpost","aria-hidden":"true",style:{backgroundImage:`url(${Mo})`,backgroundPosition:c.outpostPosition}}),e.jsx("span",{className:"shared-floor__label-anchor","aria-hidden":"true"}),e.jsxs("button",{type:"button",className:"shared-floor__gathering-label","aria-expanded":X===t,onPointerDown:s=>s.stopPropagation(),onClick:()=>Jt(X===t?null:t),children:[e.jsx("strong",{children:o.cwd==="~"?"Home":o.cwd.split("/").filter(Boolean).at(-1)||"Unassigned"}),e.jsx("small",{children:o.cwd||"Workspace not reported"})]})]}),y?e.jsxs("div",{className:"shared-floor__optional-table",children:[e.jsx("span",{children:o.cwd.split("/").filter(Boolean).at(-1)||"Workspace"}),e.jsx("div",{children:pe(o.lanes).slice(0,4).map(s=>e.jsxs("button",{type:"button",title:s.path,"aria-label":`Preview ${s.path}`,disabled:!s.resolvedPath,onClick:()=>s.resolvedPath&&d(s.resolvedPath),children:[e.jsx(oo,{size:25}),e.jsx("small",{children:s.path.split("/").at(-1)})]},s.id))})]}):null,e.jsx("div",{className:"shared-floor__crew",children:o.actors.map(({lane:s,x:f,y:C})=>e.jsxs("div",{className:`shared-floor__wanderer${g===s.id?" is-selected":""}${T.includes(s.id)?" is-pinned":""}${oe.has(s.id)?" is-connected":""}${q===s.id?" is-speaking":""}`,style:{left:f+(yt[s.id]?.x??0),top:C+(yt[s.id]?.y??0),zIndex:zt===s.id?10:T.includes(s.id)?7+T.indexOf(s.id):void 0},"data-dragging":zt===s.id||void 0,onPointerDown:l=>{if(l.button!==0)return;if(l.shiftKey||l.altKey||l.metaKey||l.ctrlKey){l.stopPropagation(),lt.current=!0;const I=l.currentTarget.getBoundingClientRect();P({lane:s,x:I.left+I.width/2,y:I.bottom+32,compose:!0,voice:l.shiftKey});return}l.stopPropagation(),lt.current=!1;const u=yt[s.id]??{x:0,y:0};ct.current={id:s.id,sx:l.clientX,sy:l.clientY,...u,baseX:o.x+f,baseY:o.y+C,moved:!1},l.currentTarget.setPointerCapture(l.pointerId)},onPointerMove:l=>{const u=ct.current;if(!u||u.id!==s.id)return;l.stopPropagation();const I=l.clientX-u.sx,rt=l.clientY-u.sy;if(!u.moved&&Math.hypot(I,rt)<5)return;u.moved=!0,Ht(s.id);const de=we(I/G,rt/G,z);Se(ve=>({...ve,[s.id]:{x:Math.max(0,Math.min(O-84,u.baseX+u.x+de.x))-u.baseX,y:Math.max(20,Math.min(W-120,u.baseY+u.y+de.y))-u.baseY}}))},onPointerUp:l=>{ct.current?.id===s.id&&(l.stopPropagation(),ct.current.moved||le(s),lt.current=!0,ct.current=null,Ht(null),l.currentTarget.hasPointerCapture(l.pointerId)&&l.currentTarget.releasePointerCapture(l.pointerId))},onContextMenu:l=>{l.preventDefault(),l.stopPropagation();const u=l.currentTarget.getBoundingClientRect();P({lane:s,x:u.left+u.width/2,y:u.bottom+32,compose:!1})},onPointerCancel:()=>{ct.current=null,lt.current=!0,Ht(null)},onClickCapture:l=>{lt.current&&(l.stopPropagation(),lt.current=!1)},children:[w===s.id?e.jsxs("span",{className:"shared-floor__talk-follow",title:"Message accepted · following observed agent status",children:["↗ You ",e.jsx("span",{children:$t(s,i).label})]}):null,e.jsx(to,{crewSlug:E!=="prototype"?v.current[s.id]:void 0,pixelCrew:E==="chip",rigged:ht,lane:s,now:i,paused:it||zt===s.id,playful:F,character:n?he[m.current.indexOf(s.id)]:void 0,displayName:eo(s.agent)?s.agent.harness||"Agent":void 0,pinned:T.includes(s.id),onActor:le})]},s.id))})]},t)})]})]})]})}export{Zs as SharedWorkFloor};
|