yepanywhere 0.9.1 → 0.9.2
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/bundled/@yep-anywhere/shared/dist/__tests__/model-prices.test.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/model-prices.test.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts +2 -2
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.js +5 -5
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.d.ts +21 -0
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.js +22 -1
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.d.ts +2 -2
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.d.ts +41 -0
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.js +280 -0
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.js +5 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.js +59 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.d.ts +46 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.js +45 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +4 -2
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/index.js +3 -1
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/model-prices.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/model-prices.js +9 -2
- package/bundled/@yep-anywhere/shared/dist/model-prices.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/pdfjs.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/pdfjs.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/pdfjs.js +7 -0
- package/bundled/@yep-anywhere/shared/dist/pdfjs.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.js +7 -10
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.js.map +1 -1
- package/bundled/@yep-anywhere/shared/package.json +1 -1
- package/client-dist/assets/{AboutSettings-CHsaLshd.js → AboutSettings-CCzudbSj.js} +1 -1
- package/client-dist/assets/{ActivityPage-CBVcBckm.js → ActivityPage-Bn0LbMgE.js} +1 -1
- package/client-dist/assets/{AgentContextSettings-DLLaiwUX.js → AgentContextSettings-DI8jQVIx.js} +1 -1
- package/client-dist/assets/{AgentsPage-C3_U9MGs.js → AgentsPage-Ci_iJt8T.js} +1 -1
- package/client-dist/assets/App-rFnK5pnF.js +2 -0
- package/client-dist/assets/AppearanceSettings-DTYVt0W5.js +2 -0
- package/client-dist/assets/{AppsSettings-B1BIWKaz.js → AppsSettings-hbh_sguk.js} +1 -1
- package/client-dist/assets/{AttachmentChip-CQTl9l1O.js → AttachmentChip-BFve3lTD.js} +1 -1
- package/client-dist/assets/{AuthContext-BQK10GgC.js → AuthContext-DmXjW0be.js} +1 -1
- package/client-dist/assets/{BangCommandDisplayObject-BDGW0BZN.js → BangCommandDisplayObject-BH2KRGnc.js} +1 -1
- package/client-dist/assets/{BangCommandsPage-C1-n2iHi.js → BangCommandsPage-MfkuL8yS.js} +1 -1
- package/client-dist/assets/{BrowserDebugToolbarButton-CRE47FFy.js → BrowserDebugToolbarButton-BPghQu17.js} +1 -1
- package/client-dist/assets/{CacheMissBillingSettings-BspB12sl.js → CacheMissBillingSettings-rUgC-_DD.js} +1 -1
- package/client-dist/assets/{CodexUpdatePrompt-BXTqvclk.js → CodexUpdatePrompt-mT9K-f1e.js} +1 -1
- package/client-dist/assets/{CommittedRangeInput-bK7EXtAc.js → CommittedRangeInput-BwuV6Q6c.js} +1 -1
- package/client-dist/assets/{CommittedRangeNumberInput-bGOjN2Xv.js → CommittedRangeNumberInput-C5YSVltB.js} +1 -1
- package/client-dist/assets/{ComputerControlSettings-BLA4wsEA.js → ComputerControlSettings-MWIdP7SS.js} +1 -1
- package/client-dist/assets/{ConversationPreviewPage-rxHQQOck.js → ConversationPreviewPage-B47r7mUF.js} +2 -2
- package/client-dist/assets/{DevelopmentSettings-CFo3ctnP.js → DevelopmentSettings-BEAy_xq-.js} +1 -1
- package/client-dist/assets/{DevicesSettings-DPdJOmEQ.js → DevicesSettings-DKQOZkRN.js} +1 -1
- package/client-dist/assets/{EmulatorPage-RPHDvihL.js → EmulatorPage-DlsPq3nR.js} +1 -1
- package/client-dist/assets/{EmulatorSettings-8dHy0xqk.js → EmulatorSettings-C6Ye1k_Y.js} +1 -1
- package/client-dist/assets/{EnvironmentSettings-DaFyodJV.js → EnvironmentSettings-ou8UNqTa.js} +1 -1
- package/client-dist/assets/{FilePage-BwbKyIGF.js → FilePage-Cw2PaO5H.js} +1 -1
- package/client-dist/assets/{FilterDropdown-BiB5gAUh.js → FilterDropdown-CACc6ysA.js} +1 -1
- package/client-dist/assets/{FloatingActionButton-DEiaqWhv.js → FloatingActionButton-Bl1Eumxh.js} +1 -1
- package/client-dist/assets/{GitStatusPage-CSXr__tv.js → GitStatusPage-CLTkgnDI.js} +1 -1
- package/client-dist/assets/{GlobalSessionsPage-C-CbcZjC.js → GlobalSessionsPage-Bvzs4zmW.js} +1 -1
- package/client-dist/assets/{HeartbeatTextArea-DWZZh0eE.js → HeartbeatTextArea-CtP5kx9R.js} +1 -1
- package/client-dist/assets/{HostIdentityContext-DbEx7dor.js → HostIdentityContext-DA7dMF-y.js} +1 -1
- package/client-dist/assets/{HostsPage-BRlkrB-8.js → HostsPage-CBOYGC2-.js} +1 -1
- package/client-dist/assets/{InboxContext-DtjKccKZ.js → InboxContext-8PXoTbK1.js} +1 -1
- package/client-dist/assets/{InboxPage-DFaLlFm5.js → InboxPage-DWl7uzdw.js} +1 -1
- package/client-dist/assets/{IssueSettings-CHjLBTZK.js → IssueSettings-BVljRpuD.js} +1 -1
- package/client-dist/assets/{IssuesPage-CfYD-jwK.js → IssuesPage-BFxgsMkf.js} +1 -1
- package/client-dist/assets/{LifecycleWebhooksSettings-Ir3_1MvY.js → LifecycleWebhooksSettings-Qw_dN3F3.js} +1 -1
- package/client-dist/assets/{LocalAccessSettings-BVh3wBDY.js → LocalAccessSettings-SWirs75o.js} +1 -1
- package/client-dist/assets/LocalMediaModal-B3KXtyEB.css +1 -0
- package/client-dist/assets/LocalMediaModal-B9eHVx6y.js +14 -0
- package/client-dist/assets/{LoginPage-irZxKYu1.js → LoginPage-CYWqVJ95.js} +1 -1
- package/client-dist/assets/{MessageAge-CKdiBg7K.js → MessageAge-CaPpa1nH.js} +1 -1
- package/client-dist/assets/{MessageDeliverySettings-BJ6Hgu1F.js → MessageDeliverySettings-BUSuGKlc.js} +1 -1
- package/client-dist/assets/MessageInput-a13ZPAHv.js +3 -0
- package/client-dist/assets/{MessageInputToolbar-CvUMMGJv.js → MessageInputToolbar-CQGTnVea.js} +3 -3
- package/client-dist/assets/MessageList-C7kAuWKg.js +4 -0
- package/client-dist/assets/{Modal-DOzUIhWU.js → Modal-ClSjJagX.js} +2 -2
- package/client-dist/assets/{ModelSettings-SWaaTKgm.js → ModelSettings-Dnd4yzmI.js} +1 -1
- package/client-dist/assets/{NavigationLayout-D8BMwd7T.js → NavigationLayout-BTFsWVtE.js} +2 -2
- package/client-dist/assets/{NewSessionPage-BBFzYBNs.js → NewSessionPage-BfiAS-Mo.js} +1 -1
- package/client-dist/assets/{NotificationsSettings-0iotA0wy.js → NotificationsSettings-B1ugQIp-.js} +1 -1
- package/client-dist/assets/{PageHeader-Ca3PbaMb.js → PageHeader-BjwH2pWD.js} +1 -1
- package/client-dist/assets/{PerformanceSettings-BgDJMjlN.js → PerformanceSettings-jJYF9SPY.js} +1 -1
- package/client-dist/assets/{ProjectSessionDefaultsModal-LEaPwpSM.js → ProjectSessionDefaultsModal-G_0uxJEv.js} +1 -1
- package/client-dist/assets/{ProjectTemplatesSettings-fPlh8ZpJ.js → ProjectTemplatesSettings-BQTCV3-3.js} +1 -1
- package/client-dist/assets/{ProjectsPage-CiQ3rBB_.js → ProjectsPage-suTd8s9l.js} +1 -1
- package/client-dist/assets/ProviderBadge-P0VTI71n.js +1 -0
- package/client-dist/assets/{ProviderChildSessionDetail-CSAbaZtr.js → ProviderChildSessionDetail-D0472EW8.js} +13 -13
- package/client-dist/assets/ProviderChildSessionPage-9__sgY14.js +1 -0
- package/client-dist/assets/{ProvidersSettings-B327MdUT.js → ProvidersSettings-Bwzy73Rk.js} +1 -1
- package/client-dist/assets/{RecapAfterSecondsControl-DWG9fB4u.js → RecapAfterSecondsControl-CxuXyFSr.js} +1 -1
- package/client-dist/assets/{RelayProtocol-DOWXVB0k.js → RelayProtocol-BpdH0COG.js} +1 -1
- package/client-dist/assets/{RemoteAccessSettings-CBSIP-qP.js → RemoteAccessSettings-Dn7KB5nK.js} +1 -1
- package/client-dist/assets/{RemoteExecutorsSettings-DDAqEB42.js → RemoteExecutorsSettings-Cjl4Y2rB.js} +1 -1
- package/client-dist/assets/{SchemaValidationContext-DLNGXai_.js → SchemaValidationContext-57RCj4c4.js} +1 -1
- package/client-dist/assets/{SearchPreview-BCP67hKg.js → SearchPreview-OzVFWPJZ.js} +1 -1
- package/client-dist/assets/{SessionHeader.module-CHO2T3eQ.js → SessionHeader.module-BpaFAQ-S.js} +1 -1
- package/client-dist/assets/SessionPage-BYthaEfZ.js +50 -0
- package/client-dist/assets/SessionPage-CXXEAwu2.css +1 -0
- package/client-dist/assets/{SettingsItem-BWF_CyTI.js → SettingsItem-C9Vh5p7F.js} +1 -1
- package/client-dist/assets/{SettingsSection-DbOwfvBD.js → SettingsSection-BaPzETK6.js} +1 -1
- package/client-dist/assets/{SourceControlSettings-BopLkzc6.js → SourceControlSettings-DnqLg0db.js} +1 -1
- package/client-dist/assets/{SourceFileHeaderActions-HoUciheJ.js → SourceFileHeaderActions-PjhUGnn6.js} +1 -1
- package/client-dist/assets/SpeechControlMenu-BYVdEa3C.js +2 -0
- package/client-dist/assets/{SpeechSettings-B4mB2LIj.js → SpeechSettings-B6LkqfSK.js} +1 -1
- package/client-dist/assets/{SpeechSmartTurnControls-tb5zP_85.js → SpeechSmartTurnControls-LPq9wBaM.js} +1 -1
- package/client-dist/assets/{StorageSettings-B5A0CtTo.js → StorageSettings-DtsJnYaz.js} +1 -1
- package/client-dist/assets/{ThinkingControls-BEweLRqu.js → ThinkingControls-DXbxdJRi.js} +1 -1
- package/client-dist/assets/{ToolbarSettings-CJbxOope.js → ToolbarSettings-Nb2BKpnk.js} +1 -1
- package/client-dist/assets/{UsersSettings-NWqRSGov.js → UsersSettings-BdvqmyqK.js} +1 -1
- package/client-dist/assets/ViewerModePage-DzRIpuYF.js +1 -0
- package/client-dist/assets/{VoiceInputButton-0BzvkjjK.js → VoiceInputButton-CCgovfyf.js} +1 -1
- package/client-dist/assets/{WorkstreamsPage-oM6jTLsK.js → WorkstreamsPage-dlEUllSL.js} +1 -1
- package/client-dist/assets/{YaServerProvider-BNTM9_P9.js → YaServerProvider-CN3tC5UL.js} +1 -1
- package/client-dist/assets/{YepAnywhereLogo-C4H1sg3q.js → YepAnywhereLogo-5zFKWjQq.js} +1 -1
- package/client-dist/assets/{abnfDiagram-VCTEODGH-DIBSwOuB.js → abnfDiagram-VCTEODGH-BWHUBcV3.js} +1 -1
- package/client-dist/assets/{arc-Blz12Cef.js → arc-DKsIJWGD.js} +1 -1
- package/client-dist/assets/{architectureDiagram-5GKGNRK7-CtTnQhBI.js → architectureDiagram-5GKGNRK7-BuLImqW3.js} +1 -1
- package/client-dist/assets/{attachmentFileNames-DwaA5IPB.js → attachmentFileNames-CBV_5g65.js} +1 -1
- package/client-dist/assets/{blockDiagram-I7D4REHJ-BanTkGM6.js → blockDiagram-I7D4REHJ-CJ4Gh6sL.js} +1 -1
- package/client-dist/assets/{c4Diagram-7LVT6UL2-C4p1KgTp.js → c4Diagram-7LVT6UL2-WR43XvCI.js} +1 -1
- package/client-dist/assets/channel-PV8AAsuo.js +1 -0
- package/client-dist/assets/{chunk-2Q5K7J3B-CJSvy8go.js → chunk-2Q5K7J3B-CiP4m_EA.js} +1 -1
- package/client-dist/assets/{chunk-5VM5RSS4-BVg02Giz.js → chunk-5VM5RSS4-BUAhj1h9.js} +1 -1
- package/client-dist/assets/{chunk-F27PBJKO-f_VOUJ8l.js → chunk-F27PBJKO-BUZNwiGx.js} +1 -1
- package/client-dist/assets/{chunk-IMKFNOWR-P5H0uE4d.js → chunk-IMKFNOWR-CX1a0BCE.js} +1 -1
- package/client-dist/assets/{chunk-JWPE2WC7-BpEGNu2X.js → chunk-JWPE2WC7-C6tL-mLF.js} +1 -1
- package/client-dist/assets/{chunk-POPQ4Y6H-oZudgMt7.js → chunk-POPQ4Y6H-BzijGGWv.js} +1 -1
- package/client-dist/assets/{chunk-SVP7TREG-dMWNgoWs.js → chunk-SVP7TREG-CsZImJKI.js} +1 -1
- package/client-dist/assets/{chunk-TICWLB2K-D8VqJUFw.js → chunk-TICWLB2K-TwCtuDc1.js} +1 -1
- package/client-dist/assets/{chunk-XXDRQBXY-ZwkKkcDz.js → chunk-XXDRQBXY-C-2EoNns.js} +1 -1
- package/client-dist/assets/classDiagram-ZZMXUADV-DvtSxfma.js +1 -0
- package/client-dist/assets/classDiagram-v2-VYDZK3BY-DvtSxfma.js +1 -0
- package/client-dist/assets/{client-D_ikArFV.js → client-Ci_HPGfl.js} +1 -1
- package/client-dist/assets/{compactSettingsControls-CzgNQCH3.js → compactSettingsControls-C9mLZh5H.js} +1 -1
- package/client-dist/assets/{cose-bilkent-JH36ORCC-DrtmDj3A.js → cose-bilkent-JH36ORCC-CmbEx2jT.js} +1 -1
- package/client-dist/assets/{cynefin-OW5HDTMX-CYhxgFq5.js → cynefin-OW5HDTMX-BSQHHXFU.js} +1 -1
- package/client-dist/assets/{cynefinDiagram-5FMLGOSQ-BXvBp5eq.js → cynefinDiagram-5FMLGOSQ-C-62JZJD.js} +1 -1
- package/client-dist/assets/{dagre-GXQ25YYZ-CdvzhCPS.js → dagre-GXQ25YYZ-BBERQe_A.js} +1 -1
- package/client-dist/assets/{diagram-S7CK7UJ4-DSGzzHN1.js → diagram-S7CK7UJ4-muw11lmG.js} +1 -1
- package/client-dist/assets/{diagram-UQ7AKVKN-Bk4fbl1S.js → diagram-UQ7AKVKN-DpePWzAe.js} +1 -1
- package/client-dist/assets/{diagram-VSXAHHWV-BAOCj4oX.js → diagram-VSXAHHWV-DHX6AHUY.js} +1 -1
- package/client-dist/assets/{diagram-VX7I27RA-KHmeuEjq.js → diagram-VX7I27RA-DYmR6NH_.js} +1 -1
- package/client-dist/assets/{diagram-Z3DM3KII-D6GpIAdx.js → diagram-Z3DM3KII-BC1SenHB.js} +1 -1
- package/client-dist/assets/{ebnfDiagram-PWID7BFC-Bm_JuhNL.js → ebnfDiagram-PWID7BFC-EVpri6Ma.js} +1 -1
- package/client-dist/assets/{erDiagram-RLTQ6QDP-u5Ryj9Z_.js → erDiagram-RLTQ6QDP-DthztUaa.js} +1 -1
- package/client-dist/assets/{flowDiagram-HODETNUW-C9A7e1yC.js → flowDiagram-HODETNUW-DEpC5nMx.js} +1 -1
- package/client-dist/assets/{frontendReload-DN8qVYjF.js → frontendReload-CBdyvvdy.js} +1 -1
- package/client-dist/assets/{ganttDiagram-EL5Y4UJY-BEIN_FhZ.js → ganttDiagram-EL5Y4UJY-Csqji8t1.js} +1 -1
- package/client-dist/assets/{gitGraphDiagram-WWUBYQGX-Cu5ow6Ls.js → gitGraphDiagram-WWUBYQGX-DVX1SDIE.js} +1 -1
- package/client-dist/assets/{hostStorage-C37tOOJa.js → hostStorage-D1KAm3U1.js} +1 -1
- package/client-dist/assets/{index-_2WVhpKj.js → index-BESqiBDI.js} +1 -1
- package/client-dist/assets/index-BkOdUxq4.js +2 -0
- package/client-dist/assets/index-CPb-36gi.css +1 -0
- package/client-dist/assets/{index-YAR5D3xY.js → index-CoR-vzsb.js} +1 -1
- package/client-dist/assets/index-Cv3tQXyE.js +1 -0
- package/client-dist/assets/{index-LT-lzpNS.js → index-DSFMItgO.js} +1 -1
- package/client-dist/assets/index-umZg0LZ6.js +81 -0
- package/client-dist/assets/{infoDiagram-27XIBGKW-ILfv0Qu_.js → infoDiagram-27XIBGKW-CHm3qsd2.js} +1 -1
- package/client-dist/assets/{ishikawaDiagram-5VMMS53U-D1P8nenz.js → ishikawaDiagram-5VMMS53U-tBRZwz-_.js} +1 -1
- package/client-dist/assets/{journeyDiagram-3NMN7TZE-CXP61NqX.js → journeyDiagram-3NMN7TZE-EJic7nqD.js} +1 -1
- package/client-dist/assets/{kanban-definition-UXKFOSKX-2x79Nimu.js → kanban-definition-UXKFOSKX-DtzL6eeO.js} +1 -1
- package/client-dist/assets/{layout-D7AfOq-G.js → layout-gb-Axsoq.js} +1 -1
- package/client-dist/assets/{linear-B_4Bripc.js → linear-CAe4xGbR.js} +1 -1
- package/client-dist/assets/{mermaid.core-y_avJe8E.js → mermaid.core-BCu1nv8H.js} +5 -5
- package/client-dist/assets/{mindmap-definition-YA3MSWOX-DwMJuV6d.js → mindmap-definition-YA3MSWOX-C7-KSPtJ.js} +1 -1
- package/client-dist/assets/{pegDiagram-XKGWAZYB-43LaxzRF.js → pegDiagram-XKGWAZYB-iWVH9rbY.js} +1 -1
- package/client-dist/assets/{pieDiagram-E7YTZNPT-DAOi_afd.js → pieDiagram-E7YTZNPT-VKD6PLHa.js} +1 -1
- package/client-dist/assets/{providerChildSessions-BpJF5D9s.css → providerChildSessions-Cd7oK6KQ.css} +1 -1
- package/client-dist/assets/providerChildSessions-DbLFSybt.js +77 -0
- package/client-dist/assets/{quadrantDiagram-AXDQQJYC-BRPBWWpv.js → quadrantDiagram-AXDQQJYC-AXFugcFl.js} +1 -1
- package/client-dist/assets/{railroadDiagram-O6MQD6OU-xAuDG62P.js → railroadDiagram-O6MQD6OU-D6oZy6Al.js} +1 -1
- package/client-dist/assets/{recentProjectPathLinks-B6pQxzWg.js → recentProjectPathLinks-D0Dx6YXT.js} +1 -1
- package/client-dist/assets/{registerServiceWorker-fKJh5dWO.js → registerServiceWorker-B8K2KVOY.js} +1 -1
- package/client-dist/assets/{relayEndpoints-DRyKx83V.js → relayEndpoints-BTq9xppf.js} +1 -1
- package/client-dist/assets/{remoteRoutePaths-BxKY1U2z.js → remoteRoutePaths-D8htA0xa.js} +1 -1
- package/client-dist/assets/{requirementDiagram-BXWQKSXE-BJvybhuU.js → requirementDiagram-BXWQKSXE-Eqtb74It.js} +1 -1
- package/client-dist/assets/{sankeyDiagram-P5KCCOFB-aAAflmwo.js → sankeyDiagram-P5KCCOFB-CxvDiZ1R.js} +1 -1
- package/client-dist/assets/{sequenceDiagram-WJ2MYXX4-CP3BPtU-.js → sequenceDiagram-WJ2MYXX4-BbpkgW2L.js} +1 -1
- package/client-dist/assets/{sessionNavigationState-MSOOrZi4.js → sessionNavigationState-BXejf2ZW.js} +1 -1
- package/client-dist/assets/sessionRouteLayer-D9T2QT8G.js +1 -0
- package/client-dist/assets/{sizeCapture-INFHLROL-BwAQ5zb3.js → sizeCapture-INFHLROL-DcuwWD5r.js} +1 -1
- package/client-dist/assets/{sourceControlNavigationState-t_nQLZvO.js → sourceControlNavigationState-BJbTzWTE.js} +1 -1
- package/client-dist/assets/{speechDraftTransaction-8sgF4uer.js → speechDraftTransaction-WhqFE1h9.js} +1 -1
- package/client-dist/assets/{stateDiagram-D77RDMKH-B8llvNN3.js → stateDiagram-D77RDMKH-Cidpq73w.js} +1 -1
- package/client-dist/assets/stateDiagram-v2-MP3YSRHH-DFqKXxjz.js +1 -0
- package/client-dist/assets/{swimlanes-42K2YHIH-qqdgDD32.js → swimlanes-42K2YHIH-Ba8C7MwG.js} +1 -1
- package/client-dist/assets/swimlanesDiagram-VR7AAH4N-3pW2TcAt.js +8 -0
- package/client-dist/assets/{timeline-definition-24CTP7MA-EBxDGVBl.js → timeline-definition-24CTP7MA-CKefGvUK.js} +1 -1
- package/client-dist/assets/{useAcliCommentarySetting-JMx-BSAu.js → useAcliCommentarySetting-CBKAl7qr.js} +2 -2
- package/client-dist/assets/{useActivityBusState-CnG-LXsr.js → useActivityBusState-C0dor9p7.js} +1 -1
- package/client-dist/assets/{useBackgroundRevalidation-7vLWDD_M.js → useBackgroundRevalidation-C79HAUP3.js} +1 -1
- package/client-dist/assets/{useCodexUpdateStatus-CAR1HkyO.js → useCodexUpdateStatus-CEZO_f2Y.js} +1 -1
- package/client-dist/assets/{useConnectedDevices-DxgKt21O.js → useConnectedDevices-Ds-DuUDc.js} +1 -1
- package/client-dist/assets/{useDocumentTitle-bldu9XOq.js → useDocumentTitle-Xz5t-nlB.js} +1 -1
- package/client-dist/assets/{useEmulators-BPiSdRjQ.js → useEmulators-qS_cCZ3I.js} +1 -1
- package/client-dist/assets/{useFileActivity-D0JXhEz7.js → useFileActivity-BoW4X3DY.js} +1 -1
- package/client-dist/assets/{useFloatingActionButtonEnabled-Dp_hZuYb.js → useFloatingActionButtonEnabled-2_hw7nSa.js} +1 -1
- package/client-dist/assets/{useForkSummaryAutoOpen-Cty_gTm1.js → useForkSummaryAutoOpen-CS33Irpf.js} +1 -1
- package/client-dist/assets/{useGeneratedTitleLength-BpbPYGRf.js → useGeneratedTitleLength-D856ktVg.js} +1 -1
- package/client-dist/assets/{useKeepMobileKeyboardOpenAfterDelivery-BWCiVVkU.js → useKeepMobileKeyboardOpenAfterDelivery-Ba77SbWF.js} +1 -1
- package/client-dist/assets/{useModelSettings-CeABGid0.js → useModelSettings-BdlYk1DT.js} +1 -1
- package/client-dist/assets/{useNotifyInApp-CuUBcZeR.js → useNotifyInApp-DcWe3dh4.js} +1 -1
- package/client-dist/assets/{useOnboarding-BDCBf2Fp.js → useOnboarding-CoE3WF8a.js} +1 -1
- package/client-dist/assets/{useProviders-45TZLkhy.js → useProviders-CeN1PclA.js} +1 -1
- package/client-dist/assets/{useQuestionAsideSetting-B0bjoe-z.js → useQuestionAsideSetting-CPFw1u0y.js} +1 -1
- package/client-dist/assets/{useRecentSessions-COrEGQJH.js → useRecentSessions-ieTzzJu4.js} +1 -1
- package/client-dist/assets/{useRelativeNow-XM1dKxcx.js → useRelativeNow-Ca6QGcPa.js} +1 -1
- package/client-dist/assets/{useReloadNotifications-JBj22syT.js → useReloadNotifications-Dm1jmdIb.js} +1 -1
- package/client-dist/assets/{useRemoteExecutors-Bzvi8gRe.js → useRemoteExecutors-zBAQnQXH.js} +1 -1
- package/client-dist/assets/{useSidebarWidth-CITe0sSV.js → useSidebarWidth-CBCcbSLg.js} +1 -1
- package/client-dist/assets/{useSourceControlCleanLanding-B-8NTKPa.js → useSourceControlCleanLanding-VDlft5tr.js} +1 -1
- package/client-dist/assets/{useStableToolPreviewRendering-CeH1PY9S.js → useStableToolPreviewRendering-hbVp38Jd.js} +1 -1
- package/client-dist/assets/{useStreamingEnabled-C535nHwb.js → useStreamingEnabled-hU1g8i7_.js} +1 -1
- package/client-dist/assets/{useTabTitleActivityPreference-NekVdSEZ.js → useTabTitleActivityPreference-DhREY7m2.js} +1 -1
- package/client-dist/assets/{useVhostAccess-CHT40zJ3.js → useVhostAccess-DUtn_sH1.js} +1 -1
- package/client-dist/assets/{useWorkflowTags-Bl7Czynw.js → useWorkflowTags-DxbEBqtf.js} +1 -1
- package/client-dist/assets/{vennDiagram-4TSXK5OY-BRLuM0pk.js → vennDiagram-4TSXK5OY-CSGBq-Ur.js} +1 -1
- package/client-dist/assets/{wardleyDiagram-VM6X3IG4-D5cPV-h-.js → wardleyDiagram-VM6X3IG4-DIMvcaMb.js} +1 -1
- package/client-dist/assets/{xychartDiagram-S5SC5T6Z-M2QslymW.js → xychartDiagram-S5SC5T6Z-TYXSqT3w.js} +1 -1
- package/client-dist/index.html +3 -3
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +19 -10
- package/dist/app.js.map +1 -1
- package/dist/artifacts/ArtifactServer.d.ts +0 -1
- package/dist/artifacts/ArtifactServer.d.ts.map +1 -1
- package/dist/artifacts/ArtifactServer.js +41 -9
- package/dist/artifacts/ArtifactServer.js.map +1 -1
- package/dist/auth/limitedUserPolicy.d.ts +9 -5
- package/dist/auth/limitedUserPolicy.d.ts.map +1 -1
- package/dist/auth/limitedUserPolicy.js +64 -35
- package/dist/auth/limitedUserPolicy.js.map +1 -1
- package/dist/auth/principal.d.ts +6 -0
- package/dist/auth/principal.d.ts.map +1 -1
- package/dist/auth/principal.js +6 -0
- package/dist/auth/principal.js.map +1 -1
- package/dist/frontend/static.d.ts.map +1 -1
- package/dist/frontend/static.js +2 -1
- package/dist/frontend/static.js.map +1 -1
- package/dist/middleware/authenticated-transport.d.ts +13 -0
- package/dist/middleware/authenticated-transport.d.ts.map +1 -1
- package/dist/middleware/authenticated-transport.js +12 -0
- package/dist/middleware/authenticated-transport.js.map +1 -1
- package/dist/middleware/limited-users.d.ts +9 -5
- package/dist/middleware/limited-users.d.ts.map +1 -1
- package/dist/middleware/limited-users.js +37 -23
- package/dist/middleware/limited-users.js.map +1 -1
- package/dist/routes/file-edit.d.ts +4 -1
- package/dist/routes/file-edit.d.ts.map +1 -1
- package/dist/routes/file-edit.js +22 -6
- package/dist/routes/file-edit.js.map +1 -1
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/files.js +19 -5
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/pdfjs.d.ts +9 -0
- package/dist/routes/pdfjs.d.ts.map +1 -0
- package/dist/routes/pdfjs.js +34 -0
- package/dist/routes/pdfjs.js.map +1 -0
- package/dist/routes/recents.d.ts +4 -1
- package/dist/routes/recents.d.ts.map +1 -1
- package/dist/routes/recents.js +7 -0
- package/dist/routes/recents.js.map +1 -1
- package/dist/routes/settings.d.ts +7 -2
- package/dist/routes/settings.d.ts.map +1 -1
- package/dist/routes/settings.js +43 -1
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/ws-relay-handlers.d.ts +12 -0
- package/dist/routes/ws-relay-handlers.d.ts.map +1 -1
- package/dist/routes/ws-relay-handlers.js +25 -4
- package/dist/routes/ws-relay-handlers.js.map +1 -1
- package/dist/routes/ws-relay.d.ts.map +1 -1
- package/dist/routes/ws-relay.js +8 -0
- package/dist/routes/ws-relay.js.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.d.ts.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.js +5 -3
- package/dist/sdk/providers/codex-model-catalog.js.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts +4 -1
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts +4 -1
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/Personality.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/Personality.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppDisplayMode.d.ts +2 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppDisplayMode.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/{ThreadRollbackParams.js → McpAppDisplayMode.js} +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppDisplayMode.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppUi.d.ts +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppUi.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/{ThreadRollbackResponse.js → McpAppUi.js} +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppUi.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/Thread.d.ts +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkResponse.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts +6 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeParams.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartParams.d.ts +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartResponse.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts +7 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/index.d.ts +0 -2
- package/dist/sdk/providers/codex-protocol/index.d.ts.map +1 -1
- package/dist/sdk/providers/codex.d.ts +7 -2
- package/dist/sdk/providers/codex.d.ts.map +1 -1
- package/dist/sdk/providers/codex.js +21 -20
- package/dist/sdk/providers/codex.js.map +1 -1
- package/dist/services/ArtifactRebuildService.d.ts +11 -14
- package/dist/services/ArtifactRebuildService.d.ts.map +1 -1
- package/dist/services/ArtifactRebuildService.js +15 -7
- package/dist/services/ArtifactRebuildService.js.map +1 -1
- package/dist/services/PdfjsAssetCache.d.ts +20 -0
- package/dist/services/PdfjsAssetCache.d.ts.map +1 -0
- package/dist/services/PdfjsAssetCache.js +131 -0
- package/dist/services/PdfjsAssetCache.js.map +1 -0
- package/package.json +3 -3
- package/client-dist/assets/App-DYWU2-wq.js +0 -2
- package/client-dist/assets/AppearanceSettings-Ci0wlAx3.js +0 -2
- package/client-dist/assets/LocalMediaModal-DOcizK52.css +0 -1
- package/client-dist/assets/LocalMediaModal-DyDpC0dk.js +0 -12
- package/client-dist/assets/MessageInput-leX__dbU.js +0 -3
- package/client-dist/assets/MessageList-DDA4Q_Gj.js +0 -4
- package/client-dist/assets/ProviderBadge-BKZVllDn.js +0 -1
- package/client-dist/assets/ProviderChildSessionPage-vpu5u3YA.js +0 -1
- package/client-dist/assets/SessionPage-BJ5qaa-G.js +0 -50
- package/client-dist/assets/SessionPage-BiV0X3n1.css +0 -1
- package/client-dist/assets/SpeechControlMenu-DEDIWl9h.js +0 -2
- package/client-dist/assets/ViewerModePage-Dyq_I7ws.js +0 -1
- package/client-dist/assets/channel-DwT-nHaK.js +0 -1
- package/client-dist/assets/classDiagram-ZZMXUADV-DdlhZ-2W.js +0 -1
- package/client-dist/assets/classDiagram-v2-VYDZK3BY-DdlhZ-2W.js +0 -1
- package/client-dist/assets/index-BY-TgOY-.js +0 -81
- package/client-dist/assets/index-BgkZrNQv.js +0 -1
- package/client-dist/assets/index-BrCZcBcO.js +0 -2
- package/client-dist/assets/index-wA2zlxt-.css +0 -1
- package/client-dist/assets/providerChildSessions-DVWCZpC4.js +0 -78
- package/client-dist/assets/stateDiagram-v2-MP3YSRHH-CD7vRqY6.js +0 -1
- package/client-dist/assets/swimlanesDiagram-VR7AAH4N-NBdWyLIY.js +0 -8
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackParams.d.ts +0 -14
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackParams.d.ts.map +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackParams.js.map +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackResponse.d.ts +0 -12
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackResponse.d.ts.map +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackResponse.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as w,r as u,j as t}from"./index-
|
|
1
|
+
import{u as w,r as u,j as t}from"./index-umZg0LZ6.js";import{u as Q,a as z,E as P,b as M,g as T}from"./useEmulators-qS_cCZ3I.js";import{a as U}from"./frontendReload-CBdyvvdy.js";import{S as c}from"./SettingsItem-C9Vh5p7F.js";import{u as _,b as W,H as A}from"./index-BkOdUxq4.js";import{S as $}from"./SettingsSection-BaPzETK6.js";import"./react-runtime-D-UPQ57m.js";import"./client-Ci_HPGfl.js";import"./RelayProtocol-BpdH0COG.js";import"./Modal-ClSjJagX.js";import"./remoteRoutePaths-D8htA0xa.js";import"./PageHeader-BjwH2pWD.js";import"./LocalMediaModal-B9eHVx6y.js";import"./newSessionPrefill-DKcy0abh.js";import"./relay-url-j3kYm5KO.js";import"./appHref-ByaEnJGJ.js";import"./SessionHeader.module-BpaFAQ-S.js";import"./HostIdentityContext-DA7dMF-y.js";import"./NavigationLayout-BTFsWVtE.js";import"./useSidebarWidth-CBCcbSLg.js";import"./useFileActivity-BoW4X3DY.js";import"./providerChildSessions-DbLFSybt.js";import"./katex-Dv2p4YRM.js";import"./index-CoR-vzsb.js";import"./ProviderBadge-P0VTI71n.js";import"./YepAnywhereLogo-5zFKWjQq.js";import"./index-Cv3tQXyE.js";const Y=["high","medium","low"];function q(s,l,i){return i!=null&&i.length?i.includes("start"):s==="emulator"&&l==="stopped"}function G(s,l,i){return i!=null&&i.length?i.includes("stop"):s==="emulator"&&l!=="stopped"}function fe(){const{t:s}=w();_(s("emulatorSectionTitle"));const{emulators:l,loading:i,error:f,startEmulator:F,stopEmulator:k,refresh:H}=Q(),{maxFps:p,setMaxFps:h,maxWidth:g,setMaxWidth:x,quality:m,setQuality:j,adaptiveFps:b,setAdaptiveFps:N}=z(),{settings:r,isLoading:v,error:y,updateSetting:n}=U(),[E,O]=u.useState(""),[C,o]=u.useState(null),d=(r==null?void 0:r.chromeOsHosts)??[],I=u.useMemo(()=>r?{maxFps:p,maxWidth:g,quality:m,adaptiveFps:b,deviceBridgeEnabled:r.deviceBridgeEnabled??!1,chromeOsHosts:r.chromeOsHosts??[]}:null,[r,p,g,m,b]),R=u.useCallback(e=>{h(e.maxFps),x(e.maxWidth),j(e.quality),N(e.adaptiveFps),n("deviceBridgeEnabled",e.deviceBridgeEnabled),n("chromeOsHosts",e.chromeOsHosts),o(null)},[h,x,j,N,n]);W(I,R);const L=async()=>{const e=E.trim();if(!e){o(s("emulatorHostAliasRequired"));return}if(/\s/.test(e)){o(s("emulatorHostAliasNoSpaces"));return}const S=Array.from(new Set([...d,e]));try{await n("chromeOsHosts",S),O(""),o(null),await H()}catch(a){o(a instanceof Error?a.message:s("emulatorHostAliasSaveFailed"))}},B=async e=>{const S=d.filter(a=>a.toLowerCase()!==e.toLowerCase());try{await n("chromeOsHosts",S),o(null),await H()}catch(a){o(a instanceof Error?a.message:s("emulatorHostAliasRemoveFailed"))}},D=(r==null?void 0:r.deviceBridgeEnabled)??!1;return t.jsxs($,{children:[t.jsx("p",{className:"settings-description",children:s("emulatorSectionDescription")}),t.jsx("div",{className:"settings-group",children:t.jsx(c,{label:s("emulatorEnableTitle"),description:s("emulatorEnableDescription"),children:t.jsxs("label",{className:"toggle-switch",children:[t.jsx("input",{type:"checkbox",checked:D,onChange:e=>{n("deviceBridgeEnabled",e.target.checked)},disabled:v}),t.jsx("span",{className:"toggle-slider"})]})})}),D?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"settings-group",children:[t.jsx("h3",{children:s("emulatorStreamQualityTitle")}),t.jsx("p",{className:"settings-description",children:s("emulatorStreamQualityDescription")}),t.jsx(c,{label:s("emulatorFrameRateTitle"),description:s("emulatorFrameRateDescription"),children:t.jsx("div",{className:"font-size-selector",children:P.map(e=>t.jsxs("button",{type:"button",className:`font-size-option ${p===e?"active":""}`,onClick:()=>h(e),children:[e," fps"]},e))})}),t.jsx(c,{label:s("emulatorResolutionTitle"),description:s("emulatorResolutionDescription"),children:t.jsx("div",{className:"font-size-selector",children:M.map(e=>t.jsxs("button",{type:"button",className:`font-size-option ${g===e?"active":""}`,onClick:()=>x(e),children:[e,"p"]},e))})}),t.jsx(c,{label:s("emulatorQualityTitle"),description:s("emulatorQualityDescription"),valueText:T(m),children:t.jsx("div",{className:"font-size-selector",children:Y.map(e=>t.jsx("button",{type:"button",className:`font-size-option ${m===e?"active":""}`,onClick:()=>j(e),children:T(e)},e))})}),t.jsx(c,{label:s("emulatorAdaptiveFpsTitle"),description:s("emulatorAdaptiveFpsDescription"),children:t.jsxs("label",{className:"toggle-switch",children:[t.jsx("input",{type:"checkbox",checked:b,onChange:e=>N(e.target.checked)}),t.jsx("span",{className:"toggle-slider"})]})})]}),t.jsxs("div",{className:"settings-group",children:[t.jsx("h3",{children:s("emulatorChromeOsHostsTitle")}),t.jsxs("p",{className:"settings-description",children:[s("emulatorChromeOsHostsDescription"),t.jsx("code",{children:" chromeroot"}),s("emulatorChromeOsHostsDescriptionSuffix")]}),t.jsx(c,{label:s("emulatorAddHostAliasTitle"),description:s("emulatorAddHostAliasDescription"),children:t.jsxs("form",{className:"settings-item-actions",onSubmit:e=>{e.preventDefault(),L()},children:[t.jsx("input",{type:"text",name:"chromeosHost",placeholder:s("emulatorHostAliasPlaceholder"),className:"settings-select",autoComplete:"off",value:E,onChange:e=>O(e.target.value)}),t.jsx("button",{type:"submit",className:"settings-button",disabled:v,children:s("projectsAddConfirm")})]})}),t.jsxs(A,{children:[C&&t.jsx("p",{className:"settings-error",children:C}),y&&t.jsx("p",{className:"settings-error",children:y}),d.length===0?t.jsx("p",{className:"settings-muted",children:s("emulatorNoChromeOsHosts")}):d.map(e=>t.jsxs("div",{className:"settings-item",children:[t.jsxs("div",{className:"settings-item-info",children:[t.jsx("span",{className:"settings-item-label",children:e}),t.jsxs("span",{className:"settings-item-description",children:["Device ID: chromeos:",e]})]}),t.jsx("div",{className:"settings-item-action",children:t.jsx("button",{type:"button",className:"settings-button",onClick:()=>{B(e)},disabled:v,children:s("emulatorRemove")})})]},e))]})]}),t.jsx(A,{children:t.jsxs("div",{className:"settings-group",children:[t.jsx("h3",{children:s("emulatorDiscoveredDevicesTitle")}),i&&t.jsx("p",{className:"settings-muted",children:s("projectsLoading")}),f&&t.jsx("p",{className:"settings-error",children:f}),!i&&l.length===0&&t.jsx("p",{className:"settings-muted",children:s("emulatorNoDevicesFound")}),l.map(e=>t.jsxs("div",{className:"settings-item",children:[t.jsxs("div",{className:"settings-item-info",children:[t.jsx("span",{className:"settings-item-label",children:e.label||e.avd||e.id}),t.jsxs("span",{className:"settings-item-description",children:[e.type," - ",e.id," - ",e.state]})]}),t.jsx("div",{className:"settings-item-action",children:G(e.type,e.state,e.actions)?t.jsx("button",{type:"button",className:"settings-button",onClick:()=>k(e.id),children:s("emulatorStop")}):q(e.type,e.state,e.actions)?t.jsx("button",{type:"button",className:"settings-button",onClick:()=>F(e.id),children:s("emulatorStart")}):null})]},e.id))]})})]}):null]})}export{fe as EmulatorSettings};
|
package/client-dist/assets/{EnvironmentSettings-DaFyodJV.js → EnvironmentSettings-ou8UNqTa.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as m,r as l,j as t}from"./index-
|
|
1
|
+
import{u as m,r as l,j as t}from"./index-umZg0LZ6.js";import{a as f}from"./client-Ci_HPGfl.js";import{S as x}from"./SettingsItem-C9Vh5p7F.js";import{u as j,j as S,H as h}from"./index-BkOdUxq4.js";import{S as N}from"./SettingsSection-BaPzETK6.js";import"./react-runtime-D-UPQ57m.js";import"./RelayProtocol-BpdH0COG.js";import"./PageHeader-BjwH2pWD.js";import"./LocalMediaModal-B9eHVx6y.js";import"./Modal-ClSjJagX.js";import"./remoteRoutePaths-D8htA0xa.js";import"./newSessionPrefill-DKcy0abh.js";import"./relay-url-j3kYm5KO.js";import"./appHref-ByaEnJGJ.js";import"./SessionHeader.module-BpaFAQ-S.js";import"./HostIdentityContext-DA7dMF-y.js";import"./frontendReload-CBdyvvdy.js";import"./NavigationLayout-BTFsWVtE.js";import"./useSidebarWidth-CBCcbSLg.js";import"./useFileActivity-BoW4X3DY.js";import"./providerChildSessions-DbLFSybt.js";import"./katex-Dv2p4YRM.js";import"./index-CoR-vzsb.js";import"./ProviderBadge-P0VTI71n.js";import"./YepAnywhereLogo-5zFKWjQq.js";import"./index-Cv3tQXyE.js";const E="_filter_a5a08_3",w="_group_a5a08_17",b="_groupTitle_a5a08_21",T="_row_a5a08_29",B="_unset_a5a08_36",U="_head_a5a08_40",V="_name_a5a08_47",$="_secretBadge_a5a08_54",A="_value_a5a08_64",C="_valueUnset_a5a08_72",I="_description_a5a08_78",L="_note_a5a08_85",n={filter:E,group:w,groupTitle:b,row:T,unset:B,head:U,name:V,secretBadge:$,value:A,valueUnset:C,description:I,note:L};function M(e){const s=[],i=new Map;for(const r of e){let a=i.get(r.group);a||(a={group:r.group,entries:[]},i.set(r.group,a),s.push(a)),a.entries.push(r)}return s}function pe(){const{t:e}=m();j(e("environmentSectionTitle"));const[s,i]=l.useState(null),[r,a]=l.useState(!1),[c,v]=l.useState(!1),u=S();l.useEffect(()=>{let o=!1;return f.getEnvSettings().then(p=>{o||i(p.entries)}).catch(()=>{o||a(!0)}),()=>{o=!0}},[]);const d=l.useMemo(()=>(s==null?void 0:s.filter(o=>u||c||o.set))??[],[s,u,c]),g=l.useMemo(()=>M(d),[d]),_=(s==null?void 0:s.filter(o=>o.set).length)??0;return t.jsxs(N,{description:e("environmentSectionDescription"),children:[t.jsxs(h,{children:[r&&t.jsx("p",{className:"settings-warning",children:e("environmentLoadError")}),!r&&s===null&&t.jsx("p",{children:e("environmentLoading")}),!r&&s&&t.jsxs("label",{className:n.filter,children:[t.jsx("span",{children:e("environmentShowLabel")}),t.jsxs("select",{className:"settings-select",value:c?"all":"set",onChange:o=>v(o.target.value==="all"),children:[t.jsx("option",{value:"set",children:e("environmentShowSet",{count:_})}),t.jsx("option",{value:"all",children:e("environmentShowAll",{count:s.length})})]})]}),!r&&s&&!c&&g.length===0&&t.jsx("p",{className:"settings-empty",children:e("environmentEmptySet")})]}),g.map(o=>t.jsxs("div",{className:`settings-group ${n.group}`,children:[t.jsx(h,{children:t.jsx("h3",{className:n.groupTitle,children:o.group})}),o.entries.map(p=>t.jsx(H,{entry:p},p.name))]},o.group))]})}function H({entry:e}){const{t:s}=m();return t.jsxs(x,{label:e.name,description:e.description,keywords:[e.group,e.note].filter(i=>!!i),layout:"custom",baseClassName:n.row,className:e.set?void 0:n.unset,children:[t.jsxs("div",{className:n.head,children:[t.jsx("code",{className:n.name,children:e.name}),e.secret&&t.jsx("span",{className:n.secretBadge,children:s("environmentSecretBadge")}),t.jsx(R,{entry:e})]}),t.jsx("p",{className:n.description,children:e.description}),e.note&&t.jsx("p",{className:n.note,children:e.note})]})}function R({entry:e}){const{t:s}=m();return e.set?e.value===""?t.jsx("span",{className:`${n.value} ${n.valueUnset}`,children:s("environmentValueEmpty")}):t.jsx("code",{className:n.value,children:e.value}):t.jsx("span",{className:`${n.value} ${n.valueUnset}`,children:s("environmentValueNotSet")})}export{pe as EnvironmentSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as f,a as j,b as h,j as e,L as o}from"./index-
|
|
1
|
+
import{u as f,a as j,b as h,j as e,L as o}from"./index-umZg0LZ6.js";import{G as u,F as g,B as x}from"./providerChildSessions-DbLFSybt.js";import{u as v,S as P}from"./NavigationLayout-BTFsWVtE.js";import{u as b}from"./Modal-ClSjJagX.js";import"./react-runtime-D-UPQ57m.js";import"./client-Ci_HPGfl.js";import"./RelayProtocol-BpdH0COG.js";import"./LocalMediaModal-B9eHVx6y.js";import"./newSessionPrefill-DKcy0abh.js";import"./relay-url-j3kYm5KO.js";import"./appHref-ByaEnJGJ.js";import"./katex-Dv2p4YRM.js";import"./remoteRoutePaths-D8htA0xa.js";import"./index-CoR-vzsb.js";import"./ProviderBadge-P0VTI71n.js";import"./frontendReload-CBdyvvdy.js";import"./useSidebarWidth-CBCcbSLg.js";import"./useFileActivity-BoW4X3DY.js";import"./YepAnywhereLogo-5zFKWjQq.js";function q(){const{t:i}=f(),{openSidebar:r}=v(),a=b(),{projectId:s}=j(),[t]=h(),n=t.get("path"),c=l(t.get("line")),d=l(t.get("lineEnd")),p=N(t.get("diff")),m=t.get("view")==="range"?"range":"full";return s?n?e.jsx(u,{projectId:s,children:e.jsx("div",{className:"file-page",children:e.jsx("div",{className:"file-page-content",children:e.jsx(g,{projectId:s,filePath:n,lineNumber:c,lineEnd:d,viewMode:m,diffMode:p,standalone:!0,headerLeading:e.jsxs(e.Fragment,{children:[e.jsx(P,{label:i("actionOpenSidebar"),newSessionLabel:i("sidebarNewSession"),onActivate:r}),e.jsx(o,{to:`${a}/projects/${s}`,className:"file-viewer-action",title:i("fileBackToProject"),"aria-label":i("fileBackToProject"),children:e.jsx(x,{})})]})})})})}):e.jsx("div",{className:"file-page file-page-error",children:e.jsxs("div",{className:"file-page-error-content",children:[e.jsx("h1",{children:i("fileInvalidUrl")}),e.jsx("p",{children:i("fileMissingPath")}),e.jsx(o,{to:`${a}/projects/${s}`,className:"file-page-back-link",children:i("fileGoToProject")})]})}):e.jsx("div",{className:"file-page file-page-error",children:e.jsxs("div",{className:"file-page-error-content",children:[e.jsx("h1",{children:i("fileInvalidUrl")}),e.jsx("p",{children:i("fileMissingProjectId")}),e.jsx(o,{to:`${a}/projects`,className:"file-page-back-link",children:i("fileGoToProjects")})]})})}function N(i){return i==="worktree"||i==="cumulative"?i:void 0}function l(i){if(!i)return;const r=Number(i);if(!(!Number.isInteger(r)||r<1))return r}export{q as FilePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as M,r as c,j as t,ax as T}from"./index-
|
|
1
|
+
import{u as M,r as c,j as t,ax as T}from"./index-umZg0LZ6.js";const $="_container_1m95j_12",q="_button_1m95j_17",G="_buttonLabel_1m95j_34",H="_chevron_1m95j_41",J="_chip_1m95j_50",Q="_hasSelection_1m95j_48",U="_fullWidth_1m95j_74",V="_optionIcon_1m95j_84",X="_overlay_1m95j_96",Y="_sheet_1m95j_106",Z="_header_1m95j_127",ee="_title_1m95j_135",ne="_options_1m95j_141",te="_option_1m95j_84",se="_selected_1m95j_170",oe="_checkbox_1m95j_174",re="_checked_1m95j_188",ce="_checkboxSpacer_1m95j_194",le="_singleSelect_1m95j_201",ae="_colorDot_1m95j_206",ie="_labelWrapper_1m95j_213",de="_meta_1m95j_221",ue="_label_1m95j_213",he="_description_1m95j_231",_e="_count_1m95j_237",me="_clear_1m95j_245",pe="_divider_1m95j_253",je="_groupLabel_1m95j_259",fe="_dropdown_1m95j_268",be="_model_1m95j_279",xe="_alignRight_1m95j_330",n={container:$,button:q,buttonLabel:G,chevron:H,chip:J,hasSelection:Q,fullWidth:U,optionIcon:V,overlay:X,sheet:Y,header:Z,title:ee,options:ne,option:te,selected:se,checkbox:oe,checked:re,checkboxSpacer:ce,singleSelect:le,colorDot:ae,labelWrapper:ie,meta:de,label:ue,description:he,count:_e,clear:me,divider:pe,groupLabel:je,dropdown:fe,model:be,alignRight:xe},y=769;function a(...l){return l.filter(Boolean).join(" ")}function ke({label:l,options:f,selected:o,onChange:i,multiSelect:u=!0,placeholder:N,placeholderContent:L,triggerContent:S,triggerTitle:v,align:E="left",fullWidth:k=!1,triggerVariant:C="default",panelVariant:D="default",triggerClassName:B,className:g=""}){const{t:h}=M(),[r,p]=c.useState(!1),[d,W]=c.useState(()=>window.innerWidth>=y),j=c.useRef(null),_=c.useRef(null),R=()=>{var e;(e=j.current)==null||e.blur(),p(s=>!s)},I=f.some(e=>e.clearSelection),O=e=>{if(e.disabled)return;if(e.clearSelection){i([]),p(!1);return}const{value:s}=e;u?o.includes(s)?i(o.filter(x=>x!==s)):i([...o,s]):(o.includes(s)?i([]):i([s]),p(!1))},P=()=>{i([])},m=c.useCallback(()=>{p(!1)},[]);c.useEffect(()=>{const e=()=>{W(window.innerWidth>=y)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),c.useEffect(()=>{if(!r)return;const e=s=>{s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),m())};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[r,m]),c.useEffect(()=>{if(!r||!d)return;const e=s=>{_.current&&!_.current.contains(s.target)&&j.current&&!j.current.contains(s.target)&&m()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r,d,m]),c.useEffect(()=>{if(r&&!d)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[r,d]),c.useEffect(()=>{var e;r&&((e=_.current)==null||e.focus({preventScroll:!0}))},[r]);const F=e=>{e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),m())},z=(()=>{if(o.length===0)return L??N??l;if(o.length===1){const e=f.find(s=>s.value===o[0]);return(e==null?void 0:e.label)||l}return`${l} (${o.length})`})(),b=D==="model",w=t.jsxs(t.Fragment,{children:[u&&o.length>0&&!I&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:a(n.option,n.clear),onClick:P,children:t.jsx("span",{className:n.label,children:h("filterClearAll")})}),t.jsx("div",{className:n.divider})]}),f.map(e=>{const s=e.clearSelection?o.length===0:o.includes(e.value),x=u&&!e.clearSelection;return t.jsxs(c.Fragment,{children:[(e.dividerBefore||e.groupLabelBefore)&&t.jsx("div",{className:n.divider}),e.groupLabelBefore&&t.jsx("div",{className:n.groupLabel,children:e.groupLabelBefore}),t.jsxs("button",{type:"button",className:a(n.option,s&&n.selected,!u&&n.singleSelect,b&&n.model),onClick:()=>O(e),disabled:e.disabled,"aria-pressed":s,children:[x&&t.jsx("span",{className:a(n.checkbox,s&&n.checked),"aria-hidden":"true",children:s&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}),u&&e.clearSelection&&t.jsx("span",{className:n.checkboxSpacer,"aria-hidden":"true"}),e.color&&t.jsx("span",{className:n.colorDot,style:{backgroundColor:e.color},"aria-hidden":"true"}),e.icon&&t.jsx("span",{className:a(n.optionIcon,b&&n.model),"aria-hidden":"true",children:e.icon}),t.jsxs("span",{className:n.labelWrapper,children:[t.jsx("span",{className:n.label,children:e.label}),e.description&&t.jsx("span",{className:n.description,children:e.description})]}),e.meta&&t.jsx("span",{className:n.meta,children:e.meta}),e.count!==void 0&&t.jsx("span",{className:n.count,children:e.count})]})]},e.value)})]}),A=r&&!d?T.createPortal(t.jsx("div",{className:n.overlay,onClick:F,onMouseDown:e=>e.stopPropagation(),children:t.jsxs("div",{ref:_,className:a(n.sheet,g),role:"dialog",tabIndex:-1,"aria-label":h("filterByLabel",{label:l}),children:[t.jsx("div",{className:n.header,children:t.jsx("span",{className:n.title,children:l})}),t.jsx("div",{className:n.options,children:w})]})}),document.body):null,K=r&&d?t.jsx("div",{ref:_,className:a(n.dropdown,E==="right"&&n.alignRight,b&&n.model),role:"dialog",tabIndex:-1,"aria-label":h("filterByLabel",{label:l}),children:t.jsx("div",{className:n.options,children:w})}):null;return t.jsxs("div",{className:a(n.container,k&&n.fullWidth,g),children:[t.jsxs("button",{ref:j,type:"button",className:a(n.button,o.length>0&&n.hasSelection,k&&n.fullWidth,C==="chip"&&n.chip,B),onClick:R,title:v??h("filterByLabel",{label:l}),"aria-label":v??h("filterByLabel",{label:l}),"aria-haspopup":"listbox","aria-expanded":r,children:[t.jsx("span",{className:n.buttonLabel,children:S??z}),t.jsx("svg",{className:n.chevron,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),K,A]})}export{ke as F};
|
package/client-dist/assets/{FloatingActionButton-DEiaqWhv.js → FloatingActionButton-Bl1Eumxh.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,u as re,d as Te,e as Ce,j as o,aG as ye}from"./index-
|
|
1
|
+
import{r as n,u as re,d as Te,e as Ce,j as o,aG as ye}from"./index-umZg0LZ6.js";import{r as Re}from"./types-BHkriVjU.js";import{g as De,a as Pe}from"./newSessionDefaults-C6a9Cpc6.js";import{g as Ee}from"./useModelSettings-BdlYk1DT.js";import{u as Me,b as Ne,c as je}from"./useProviders-CeN1PclA.js";import{a as we}from"./frontendReload-CBdyvvdy.js";import{u as ke,f as ee,c as Be,h as Le}from"./speechDraftTransaction-WhqFE1h9.js";import{D as Ke,a as Fe,S as We,c as Ae,e as _e,s as $e}from"./useSidebarWidth-CBCcbSLg.js";import{u as Ve,V as Oe}from"./VoiceInputButton-CCgovfyf.js";import{u as Ue}from"./useFloatingActionButtonEnabled-2_hw7nSa.js";import{s as He}from"./newSessionPrefill-DKcy0abh.js";import{u as ze}from"./Modal-ClSjJagX.js";import{b as Ge}from"./client-Ci_HPGfl.js";import{g as te,a as qe,b as Xe,c as Je,d as X,e as Qe,t as Ye,m as Ze,f as et,r as ne}from"./YaServerProvider-CN3tC5UL.js";import{P as tt}from"./ProviderBadge-P0VTI71n.js";import"./react-runtime-D-UPQ57m.js";import"./deviceDetection-BVPclkty.js";import"./remoteRoutePaths-D8htA0xa.js";import"./RelayProtocol-BpdH0COG.js";function nt(){const{providers:c,loading:a}=Me(),{settings:p,isLoading:v}=we();return n.useMemo(()=>{if(a||v||c.length===0)return null;const I=new Set(Ne(c).map(T=>T.name)),h=p==null?void 0:p.newSessionDefaults,j=h!=null&&h.provider&&I.has(h.provider)?h.provider:null,x=c.find(T=>T.name===j)??je(c);if(!x)return null;const m=De(h,x.name,{model:x.name==="claude"?Re(Ee()):void 0});return{provider:x.name,modelId:Pe(x.name,x.models??[],m.model)}},[c,a,p,v])}const rt=830,st=100,J=24,it=80;function ot(c,a){const p=c-a,v=Math.min(p,rt);return(p-v)/2}function ct(){const c=Ve();return n.useMemo(()=>{if(c<Ke)return null;const a=Fe(),v=c<a+600?We:a,I=ot(c,v),h=st+J*2;if(I<h)return null;const j=J,x=Math.min(I-J*2,300);return{visible:!0,right:j,bottom:it,maxWidth:x}},[c])}function at(){return`speech-target-${ye()}`}function lt(){const{t:c}=re(),a=nt();return a?o.jsx("span",{className:"composer-model-chip-static",title:c("floatingComposerModelChipTitle"),children:o.jsx(tt,{provider:a.provider,model:a.modelId??void 0})}):null}function Mt(){const{t:c}=re(),a=Te(),p=Ce(),v=ze(),I=Ge(),h=n.useMemo(()=>Ae(I),[I]),j=ct(),{floatingActionButtonEnabled:x}=Ue(),[m,T]=n.useState(!1),[g,se,d]=ke(h),[w,K]=n.useState(""),y=n.useRef(w);y.current=w;const[U,Q]=n.useState(null),A=n.useRef(null),[,_]=n.useState(0),R=n.useRef(null),D=n.useRef(null),H=n.useRef(null),l=n.useRef(null),u=n.useRef(null),S=n.useRef(new Map),P=n.useRef(null),M=n.useRef(null),$=n.useRef(null),z=n.useRef(!1),V=n.useRef(null),F=l.current,O=te(g,w,F),W=F?qe(g,O,F.end,F.replaceEnd??F.end):Xe(g,O,g.length),k=_e(p.pathname);n.useEffect(()=>{k&&$e(k)},[k]),n.useEffect(()=>{var e,t;m&&((e=R.current)==null||e.focus(),(t=D.current)==null||t.prewarm())},[m]),n.useLayoutEffect(()=>{const e=V.current,t=R.current;!e||!t||g!==e.value||t.value!==e.value||(V.current=null,e.restore(t))},[g]),n.useEffect(()=>{if(!m)return;const e=t=>{H.current&&!H.current.contains(t.target)&&T(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[m]);const B=n.useCallback(e=>{const t=typeof e=="string"?e:void 0,r=D.current;if(t===void 0&&((r==null?void 0:r.isListening)===!0||A.current!==null)){$.current=Je(d.getDraft(),y.current,l.current),r!=null&&r.isListening&&r.stopAndFinalize();return}const s=(t??g).trim();if(s){if(He(I,s),d.clearDraft(),T(!1),k){a(`${v}/new-session?projectId=${encodeURIComponent(k)}`);return}a(`${v}/new-session`)}},[g,k,a,d,v,I]),ie=e=>{var t;if(!(e.key==="Enter"&&e.nativeEvent.isComposing)){if(e.key==="Escape"&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&(U==="transcribing"||U==="finalizing")){e.preventDefault(),e.stopPropagation(),pe();return}if(e.key==="Escape"&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&((t=D.current)!=null&&t.isListening)){e.preventDefault(),e.stopPropagation(),D.current.toggle();return}e.key==="Enter"&&!e.shiftKey?(e.preventDefault(),B()):e.key==="Escape"&&T(!1)}},oe=n.useCallback(()=>{T(!0)},[]),ce=n.useCallback(()=>{const e=R.current,t=d.getDraft(),r=Math.max(0,Math.min((e==null?void 0:e.selectionStart)??t.length,t.length)),s=Math.max(r,Math.min((e==null?void 0:e.selectionEnd)??r,t.length)),i=at(),f=et(r,s);u.current=i,l.current=f,S.current.set(i,f),V.current=null,P.current=null,z.current=!1,e&&(ee(e),e.setSelectionRange(r,s)),y.current="",K("")},[d]),b=n.useCallback(()=>{const e=M.current;e!==null&&(clearTimeout(e.timer),M.current=null)},[]);n.useEffect(()=>b,[b]);const E=n.useCallback((e,t)=>{var Z;const r=e!==void 0,s=R.current,i=l.current;if(!s||!i)return;const f=s.selectionStart,L=s.selectionEnd,xe=C=>f===L?A.current==="listening"?ne(C,f,L):X(C):C.replaceSelectedAtMs===void 0&&C.end===f&&C.replaceEnd===L?C:ne(C,f,L);f===L&&b();const Ie=y.current.trim().length>0;if(r&&(Ie||P.current!==null)){P.current={draft:t??d.getDraft(),start:f,end:L};return}const q=xe(i);A.current==="listening"&&q!==i&&((Z=D.current)==null||Z.beginInsertionBoundary()),l.current=q,u.current&&S.current.set(u.current,q),_(C=>C+1)},[b,d]),G=n.useCallback(()=>{if(b(),!l.current)return;const e=X(l.current);l.current=e,u.current&&S.current.set(u.current,e),_(t=>t+1)},[b]),ae=n.useCallback(()=>{window.setTimeout(()=>E(!0),0)},[E]),N=n.useCallback((e,t)=>{const r=Be({textareaRef:R,getDraft:d.getDraft,setDraft:d.setDraft,setInterimTranscript:i=>{y.current=i,K(i)},speechInsertionRangeRef:l,activeSpeechTargetIdRef:u,speechInsertionRangesRef:S,pendingTextareaSelectionRef:V,pendingSpeechRetargetRef:P,onInsertionBoundary:()=>{var i;return(i=D.current)==null?void 0:i.beginInsertionBoundary()},onSpeechTargetChanged:()=>_(i=>i+1),onSmartTurnSend:B,composerEditedDuringSpeech:()=>z.current},e,t),s=t==null?void 0:t.speechTargetId;return s&&s!==u.current&&S.current.delete(s)&&_(i=>i+1),r},[d,B]),le=n.useCallback((e,t)=>{const r=t!=null&&t.speechTargetId?S.current.get(t.speechTargetId)??null:l.current,s=t!=null&&t.smartTurnCommand||P.current?0:Qe(r);if(s>0){b();const i=setTimeout(()=>{const f=M.current;!f||f.timer!==i||(M.current=null,N(f.transcript,f.metadata))},s);M.current={timer:i,transcript:e,metadata:t};return}return b(),N(e,t)},[b,N]),Y=n.useCallback(()=>{const e=M.current;e!==null&&(clearTimeout(e.timer),M.current=null,N(e.transcript,e.metadata))},[N]),ue=n.useCallback(()=>{const e=te(d.getDraft(),y.current,l.current);return Y(),e&&N(e),P.current=null,y.current="",K(""),ee(R.current),!!e},[N,d,Y]),de=n.useCallback(e=>{y.current=e,K(e)},[]),fe=n.useCallback((e,t)=>{if(A.current=e,e==="listening"&&E(),e===null){const r=u.current;r&&S.current.delete(r),l.current=null,u.current=null,P.current=null;const s=$.current;$.current=null,t==="completed"&&s!==null&&B(s)}Q(e)},[E,B]),pe=n.useCallback(()=>{var t;(t=D.current)==null||t.cancelProcessing(),b();const e=u.current;e&&S.current.delete(e),l.current=null,u.current=null,P.current=null,$.current=null,Q(null),K("")},[b]),he=n.useCallback(()=>{const e=d.getDraft();return{draftKey:h,speechTargetId:u.current??void 0,textBeforeCursor:Ye(e,l.current,R.current)}},[d,h]),me=/\/sessions\/[^/]+/.test(p.pathname),ge=!x||!j||p.pathname.endsWith("/new-session")||me,{right:be,bottom:Se,maxWidth:ve}=j??{right:24,bottom:80,maxWidth:200};return o.jsxs("div",{ref:H,className:`fab-container ${m?"fab-expanded":"fab-collapsed"}`,style:{right:`${be}px`,bottom:`${Se}px`,width:`${ve}px`,display:ge?"none":void 0},children:[m&&o.jsxs("div",{className:"fab-input-panel",children:[o.jsxs("div",{className:`speech-draft-field ${O?"has-interim":""}`,children:[o.jsxs("div",{className:"speech-draft-inline",children:[O&&o.jsxs("div",{className:"speech-draft-mirror","aria-hidden":"true",children:[o.jsx("span",{children:W.before}),W.separatorBefore,o.jsx("span",{className:"speech-interim-inline",children:W.transcript}),o.jsx("span",{className:"speech-interim-caret"}),W.separatorAfter,o.jsx("span",{children:W.after})]}),o.jsx("textarea",{ref:R,value:g,onChange:e=>{const t=e.target.value;if(b(),S.current.size>0){const r=new Map;for(const[s,i]of S.current)r.set(s,X(Ze(g,t,i)));S.current=r,l.current=u.current!==null?r.get(u.current)??null:null}u.current!==null&&Le(g,t)&&(z.current=!0),E(!0,t),se(t)},onKeyDown:ie,onSelect:E,onPointerUp:E,onClick:ae,onKeyUp:E,onCut:G,onCopy:G,onPaste:G,placeholder:c("fabPlaceholder"),className:"fab-textarea",rows:3})]}),w&&o.jsx("div",{className:"speech-interim-status",role:"status","aria-live":"polite","aria-label":"Tentative speech transcript",children:w})]}),o.jsxs("div",{className:"fab-input-toolbar",children:[o.jsx(lt,{}),o.jsx(Oe,{ref:D,onTranscript:le,onInterimTranscript:de,onListeningStart:ce,onListeningStop:ue,onPendingSpeechChange:fe,getTranscriptionContext:he,className:"toolbar-button"}),o.jsx("button",{type:"button",className:"fab-submit",onClick:B,disabled:!(g.trim()||U!==null||w),"aria-label":c("fabGoToNewSession"),children:"↵"})]})]}),o.jsx("button",{type:"button",className:`fab-button ${m?"fab-button-active":""}`,onClick:m?()=>T(!1):oe,"aria-label":c(m?"fabClose":"fabNewSession"),children:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:m?"fab-icon-rotated":"",children:[o.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),o.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})}export{Mt as FloatingActionButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bn=Object.defineProperty;var On=(e,t,n)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Oe=(e,t,n)=>On(e,typeof t!="symbol"?t+"":t,n);import{u as sn,r as a,d as ws,j as s,ax as nn,bA as Hn,bB as In,bp as Zt,aK as rt,U as on,L as an,e as es,b as ts,s as He,au as Un,bC as Wn,P as zn,bD as Gn,bE as Kn,at as qn,bF as Vn,bG as Yn,bH as Xn,bI as Jn,bJ as Qn,bK as Zn,bL as eo,bM as to,bN as so,bO as no}from"./index-BY-TgOY-.js";import{P as oo}from"./PageHeader-Ca3PbaMb.js";import{a as rn,H as Es,u as ao,b as io}from"./NavigationLayout-D8BMwd7T.js";import{u as ss,b as ro,M as wt,e as co}from"./Modal-DOzUIhWU.js";import{z as Ls,E as lo,I as St,u as Bt,J as uo,K as ho,L as mo,C as Xt,N as fo,O as go,P as cn,U as yt,V as Ft,W as At,F as bs,X as ln,Y as un,Z as po,_ as $t,$ as dn,a0 as xo,a1 as vo,a2 as bo,G as Ts,a3 as _o,a4 as So,a5 as wo,a6 as yo}from"./providerChildSessions-DVWCZpC4.js";import{u as Co}from"./useDocumentTitle-bldu9XOq.js";import{a as he,b as hn,$ as Ms,a0 as jo}from"./client-D_ikArFV.js";import{y as ko}from"./LocalMediaModal-DyDpC0dk.js";import{r as No,s as Ps}from"./useSidebarWidth-CITe0sSV.js";import{u as Ro}from"./useRelativeNow-XM1dKxcx.js";import{c as Eo,a as Lo}from"./frontendReload-DN8qVYjF.js";import{u as To}from"./useSourceControlCleanLanding-B-8NTKPa.js";import{MainContent as Mo}from"./index-BgkZrNQv.js";import{a as mn}from"./appHref-ByaEnJGJ.js";import{p as Po}from"./sourceControlNavigationState-t_nQLZvO.js";import{S as fn}from"./SourceFileHeaderActions-HoUciheJ.js";import{u as Fo,g as Ao,a as $o}from"./useProviders-45TZLkhy.js";import"./react-runtime-D-UPQ57m.js";import"./SessionHeader.module-CHO2T3eQ.js";import"./HostIdentityContext-DbEx7dor.js";import"./useFileActivity-D0JXhEz7.js";import"./index-YAR5D3xY.js";import"./remoteRoutePaths-BxKY1U2z.js";import"./RelayProtocol-DOWXVB0k.js";import"./ProviderBadge-BKZVllDn.js";import"./YepAnywhereLogo-C4H1sg3q.js";import"./katex-Dv2p4YRM.js";import"./relay-url-j3kYm5KO.js";import"./newSessionPrefill-DKcy0abh.js";import"./types-BHkriVjU.js";const Do="_container_132g3_23",Bo="_button_132g3_31",Oo="_text_132g3_51",Ho="_chevron_132g3_66",Io="_dropdown_132g3_77",Uo="_options_132g3_91",Wo="_option_132g3_91",zo="_selected_132g3_114",Go="_name_132g3_118",Ko="_meta_132g3_126",qo="_overlay_132g3_132",Vo="_sheet_132g3_142",Yo="_header_132g3_162",Xo="_title_132g3_167",ze={container:Do,button:Bo,text:Oo,chevron:Ho,dropdown:Io,options:Uo,option:Wo,selected:zo,name:Go,meta:Ko,overlay:qo,sheet:Vo,header:Yo,title:Xo},Fs=769;function Jo({currentProjectId:e,currentProjectName:t,onProjectChange:n}){const{t:o}=sn(),[i,r]=a.useState(!1),[u,l]=a.useState(()=>window.innerWidth>=Fs),c=a.useRef(null),m=a.useRef(null),d=ws(),_=ss(),{projects:w,loading:v}=rn(),p=w.find(b=>b.id===e),x=p?Es(p):t??o("projectSelectorFallback"),k=()=>{var b;(b=c.current)==null||b.blur(),r(!0)},g=b=>{b.id!==e&&(n?n(b):d(`${_}/new-session?projectId=${encodeURIComponent(b.id)}`)),r(!1)},C=a.useCallback(()=>{r(!1)},[]);a.useEffect(()=>{const b=()=>{l(window.innerWidth>=Fs)};return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),a.useEffect(()=>{if(!i)return;const b=G=>{G.key==="Escape"&&(G.preventDefault(),G.stopPropagation(),C())};return document.addEventListener("keydown",b,!0),()=>document.removeEventListener("keydown",b,!0)},[i,C]),a.useEffect(()=>{if(!i||!u)return;const b=G=>{m.current&&!m.current.contains(G.target)&&c.current&&!c.current.contains(G.target)&&C()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[i,u,C]),a.useEffect(()=>{if(i&&!u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[i,u]),a.useEffect(()=>{var b;i&&((b=m.current)==null||b.focus())},[i]);const L=b=>{b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),C())};if(!v&&w.length<=1)return s.jsx("span",{className:"session-title",children:x});const y=s.jsx("div",{className:ze.options,children:w.map(b=>{const G=b.id===e;return s.jsxs("button",{type:"button",className:`${ze.option} ${G?ze.selected:""}`,onClick:()=>g(b),children:[s.jsx("span",{className:ze.name,children:Es(b)}),s.jsx("span",{className:ze.meta,children:o("projectSelectorSessionsCount",{count:b.sessionCount})})]},b.id)})}),S=i&&!u?nn.createPortal(s.jsx("div",{className:ze.overlay,onClick:L,onMouseDown:b=>b.stopPropagation(),children:s.jsxs("div",{ref:m,className:ze.sheet,role:"dialog",tabIndex:-1,"aria-label":o("projectSelectorSelectProject"),children:[s.jsx("div",{className:ze.header,children:s.jsx("span",{className:ze.title,children:o("projectSelectorSelectProject")})}),y]})}),document.body):null,j=i&&u?s.jsx("div",{ref:m,className:ze.dropdown,role:"dialog",tabIndex:-1,"aria-label":o("projectSelectorSelectProject"),children:y}):null;return s.jsxs("div",{className:`project-selector-container ${ze.container}`,children:[s.jsxs("button",{ref:c,type:"button",className:`project-selector-button ${ze.button}`,onClick:k,title:o("projectSelectorChangeProject"),"aria-haspopup":"listbox","aria-expanded":i,children:[s.jsx("span",{className:`project-selector-text ${ze.text}`,children:x}),s.jsx("svg",{className:ze.chevron,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),j,S]})}function Qo(){return document.visibilityState==="visible"&&document.hasFocus()}function Zo(e){return document.addEventListener("visibilitychange",e),window.addEventListener("focus",e),window.addEventListener("blur",e),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e),window.removeEventListener("blur",e)}}function ea(){return a.useSyncExternalStore(Zo,Qo,()=>!1)}function ta({projectId:e,status:t,routeRetentionKey:n,supportsRemoteCheck:o,supportsPull:i,supportsPush:r,supportsIntegrationOptions:u,onRefreshStatus:l,t:c}){const[m,d]=a.useState(null),[_,w]=a.useState(!1),[v,p]=a.useState(null),[x,k]=a.useState(null),[g,C]=a.useState(!1),[L,y]=a.useState(null),[S,j]=a.useState(null),[b,G]=a.useState(!1),[P,R]=a.useState(null),[E,I]=a.useState(null),[H,ee]=a.useState(!1),[M,V]=a.useState(null);a.useEffect(()=>{d(null),p(null),w(!1),k(null),y(null),C(!1),j(null),R(null),G(!1),I(null),V(null),ee(!1)},[e]);const N=_||g||b,A=ia(x,S),K=A?`${A.ahead}:${A.behind}:${A.upstream??""}`:"";a.useEffect(()=>{if(!e||!u||!K){I(null),V(null),ee(!1);return}let F=!1;return ee(!0),I(null),V(null),he.getGitIntegrationOptions(e).then(me=>{F||I(me)}).catch(me=>{F||V(me instanceof Error?me.message:c("gitStatusAutoOptionsFailed"))}).finally(()=>{F||ee(!1)}),()=>{F=!0}},[K,e,u,c]);const te=a.useCallback(async()=>{if(!(!e||!o||N)){w(!0),d(null),p(null),k(null),y(null),j(null),R(null),I(null),V(null);try{const F=await he.checkGitRemote(e);d(F),F.status==="checked"&&await l()}catch(F){p(F instanceof Error?F.message:c("gitStatusRemoteCheckFailed"))}finally{w(!1)}}},[N,l,e,o,c]),se=a.useCallback(async()=>{if(!(!e||!i||N)){C(!0),k(null),y(null),d(null),p(null),j(null),R(null),I(null),V(null);try{const F=await he.pullGit(e);k(F),F.status==="pulled"&&(n&&Ls(n),await l())}catch(F){y(F instanceof Error?F.message:c("gitStatusPullFailed"))}finally{C(!1)}}},[N,l,e,n,i,c]),X=a.useCallback(async()=>{if(!(!e||!r||N)){G(!0),j(null),R(null),d(null),p(null),k(null),y(null),I(null),V(null);try{const F=await he.pushGit(e);j(F),(F.status==="pushed"||F.status==="published"||F.status==="up-to-date")&&(n&&Ls(n),await l())}catch(F){R(F instanceof Error?F.message:c("gitStatusPushFailed"))}finally{G(!1)}}},[N,l,e,n,r,c]),J=v??na(m,c),Y=v||((m==null?void 0:m.status)??"checked")!=="checked"?"warning":m||t!=null&&t.checkedRemoteAt?"success":null,f=L??oa(x,c),O=L||x&&x.status!=="pulled"?"warning":x?"success":null,W=P??aa(S,c),T=P||S&&!["pushed","published","up-to-date"].includes(S.status)?"warning":S?"success":null,D=J||f||W,U=J?Y:f?O:W?T:null;return{supportsRemoteCheck:o,supportsPull:i,supportsPush:r,supportsIntegrationOptions:u,isRunning:N,isCheckingRemote:_,isPulling:g,isPushing:b,handleCheckRemote:te,handlePull:se,handlePush:X,checkedRemoteAt:(S==null?void 0:S.checkedRemoteAt)??(x==null?void 0:x.checkedRemoteAt)??(m==null?void 0:m.checkedRemoteAt)??(t==null?void 0:t.checkedRemoteAt)??null,checkFeedback:J,checkFeedbackTone:Y,pullFeedback:f,pullFeedbackTone:O,pushFeedback:W,pushFeedbackTone:T,actionFeedback:D,actionFeedbackTone:U,divergedActionStatus:A,integrationOptions:E,isLoadingIntegrationOptions:H,integrationOptionsError:M}}function sa(e,t,n){if(!e)return n("gitStatusRemoteUnknown");const o=Date.parse(e);if(!Number.isFinite(o))return e;const i=Math.max(0,t-o),r=60*1e3,u=60*r,l=24*u;return i<r?n("gitStatusRemoteJustNow"):i<u?n("gitStatusRemoteMinutesAgo",{count:Math.floor(i/r)}):i<l?n("gitStatusRemoteHoursAgo",{count:Math.floor(i/u)}):new Date(o).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function na(e,t){switch(e==null?void 0:e.status){case"checked":return t("gitStatusRemoteCheckSuccess");case"busy":return t("gitStatusRemoteCheckBusy");case"not-a-git-repo":return t("gitStatusRemoteCheckNotRepo");case"failed":return t("gitStatusRemoteCheckFailed");default:return""}}function oa(e,t){switch(e==null?void 0:e.status){case"pulled":return gn(e.commitsAdvanced)?e.commitsAdvanced===0?t("gitStatusPullAlreadyUpToDate"):t(e.commitsAdvanced===1?"gitStatusPullSuccessSingle":"gitStatusPullSuccessMultiple",{count:e.commitsAdvanced}):t("gitStatusPullSuccess");case"busy":return t("gitStatusPullBusy");case"not-a-git-repo":return t("gitStatusPullNotRepo");case"failed":return Jt(e.gitStatus)?t("gitStatusPullDiverged",{ahead:e.gitStatus.ahead,behind:e.gitStatus.behind}):t("gitStatusPullFailed");default:return""}}function aa(e,t){switch(e==null?void 0:e.status){case"pushed":return gn(e.commitsAdvanced)?t(e.commitsAdvanced===1?"gitStatusPushSuccessSingle":"gitStatusPushSuccessMultiple",{count:e.commitsAdvanced}):t("gitStatusPushSuccess");case"published":return t("gitStatusPushPublished");case"up-to-date":return t("gitStatusPushAlreadyUpToDate");case"busy":return t("gitStatusPushBusy");case"no-upstream":return t("gitStatusPushNoUpstream");case"rejected":return Jt(e.gitStatus)?t("gitStatusPushDiverged",{ahead:e.gitStatus.ahead,behind:e.gitStatus.behind}):t("gitStatusPushRejected");case"not-a-git-repo":return t("gitStatusPushNotRepo");case"failed":return t("gitStatusPushFailed");default:return""}}function gn(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Jt(e){return!!(e&&e.ahead>0&&e.behind>0)}function ia(e,t){return(e==null?void 0:e.status)==="failed"&&Jt(e.gitStatus)?e.gitStatus:(t==null?void 0:t.status)==="rejected"&&Jt(t.gitStatus)?t.gitStatus:null}function ns(e,t=!1){var m;const[n,o]=a.useState([]),[i,r]=a.useState([]),[u,l]=a.useState([]),c=a.useCallback(async()=>{if(!e){o([]),r([]),l([]);return}try{const d=await he.listReviewComments(e);o(d.comments),r(d.batches)}catch{}if(t)try{l(await he.listReviewSiteStates(e))}catch{}else l([])},[t,e]);return a.useEffect(()=>{if(e)return c(),lo(e,()=>{c()})},[e,c]),{pending:n.filter(d=>d.status==="pending"),archived:n.filter(d=>d.status==="archived"),batches:i,recentReviewSessionId:i.length>0?((m=i[i.length-1])==null?void 0:m.targetSessionId)??null:null,siteStates:u,refresh:c}}const ra={loading:!0,error:null,generation:null,headSha:null,baseSha:null,files:[],directories:[],truncated:!1,totalFiles:null};function ca(e,t){return e!==null&&e.tracked===t.tracked&&e.untracked===t.untracked&&e.ignored===t.ignored&&la(e.expandedPrefixes,t.expandedPrefixes)&&(e.filesystemScan??"bounded")===(t.filesystemScan??"bounded")}function la(e,t){return e===t||e!==void 0&&t!==void 0&&e.length===t.length&&e.every((n,o)=>n===t[o])}function ua(e){const t={tracked:!1,untracked:!1,ignored:!1},n=new Set;let o=!1,i=!1;for(const r of e)if(t.tracked||(t.tracked=r.coverage.tracked),t.untracked||(t.untracked=r.coverage.untracked),t.ignored||(t.ignored=r.coverage.ignored),i||(i=r.coverage.filesystemScan==="complete"),r.coverage.expandedPrefixes===void 0)o=!0;else for(const u of r.coverage.expandedPrefixes)n.add(u);return{...t,...o?{}:{expandedPrefixes:[...n].sort()},...i?{filesystemScan:"complete"}:{}}}function da(e){if(!e||typeof e!="object"||!("type"in e))return!1;const t=e.type;return t==="git-worktree-snapshot"||t==="git-worktree-delta"}function ha(e,t){return e!==null&&e.epoch===t.epoch&&t.sequence===e.sequence+1}class ma{constructor(t,n,o){Oe(this,"listeners",new Set);Oe(this,"leases",new Map);Oe(this,"files",new Map);Oe(this,"directories",new Map);Oe(this,"snapshot",ra);Oe(this,"stream",null);Oe(this,"activeCoverage",null);Oe(this,"nextLeaseId",1);Oe(this,"getSnapshot",()=>this.snapshot);Oe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));this.projectId=t,this.transport=n,this.onEmpty=o}retain(t){const n=this.nextLeaseId++;return this.leases.set(n,{coverage:{...t,...t.expandedPrefixes?{expandedPrefixes:[...t.expandedPrefixes]}:{}}}),this.syncStream(),()=>{var o;if(this.leases.delete(n)){if(this.leases.size===0){(o=this.stream)==null||o.close(),this.stream=null,this.activeCoverage=null,this.onEmpty();return}this.syncStream()}}}syncStream(){var o;const t=ua(this.leases.values());if(ca(this.activeCoverage,t)&&this.stream)return;(o=this.stream)==null||o.close(),this.activeCoverage=t;const n=Hn(this.transport,{subscribe:({transport:i,handlers:r})=>i.subscribeWorktree(this.projectId,t,r),onEvent:i=>{this.stream!==n||!da(i.data)||this.applyEvent(i.data)},onError:i=>{this.stream===n&&this.publish({...this.snapshot,loading:this.snapshot.generation===null,error:i})}},{autoStart:!1,inactivityTimeoutMs:In});this.stream=n,this.snapshot.generation===null&&this.publish({...this.snapshot,loading:!0,error:null}),n.start()}applyEvent(t){if(t.type==="git-worktree-snapshot"){this.applySnapshot(t);return}this.applyDelta(t)}applySnapshot(t){this.files.clear();for(const n of t.files)this.files.set(n.path,n);this.directories.clear();for(const n of t.directories??[])this.directories.set(n.path,n);this.publish({loading:!1,error:null,generation:t.generation,headSha:t.headSha,baseSha:t.baseSha,files:[...this.files.values()],directories:[...this.directories.values()],truncated:t.truncated,totalFiles:t.totalFiles??null})}applyDelta(t){var n,o;if(!ha(this.snapshot.generation,t.generation)){if(((n=this.snapshot.generation)==null?void 0:n.epoch)===t.generation.epoch&&t.generation.sequence<=this.snapshot.generation.sequence)return;(o=this.stream)==null||o.restart();return}for(const i of t.changes)i.changeType==="delete"?this.files.delete(i.path):i.file&&this.files.set(i.path,i.file);for(const i of t.directoryChanges??[])i.changeType==="delete"?this.directories.delete(i.path):i.directory&&this.directories.set(i.path,i.directory);this.publish({loading:!1,error:null,generation:t.generation,headSha:t.headSha,baseSha:t.baseSha,files:[...this.files.values()],directories:[...this.directories.values()],truncated:t.truncated??this.snapshot.truncated,totalFiles:t.totalFiles===void 0?this.snapshot.totalFiles:t.totalFiles})}publish(t){if(this.snapshot===t)return;this.snapshot=t;const n=Array.from(this.listeners);for(const o of n)o()}}const zt=new Map;function fa(e,t){return`${e}\0${t}`}function ga(e,t,n){const o=fa(e,t),i=zt.get(o);if(i)return i;let r;return r=new ma(t,n,()=>{zt.get(o)===r&&zt.delete(o)}),zt.set(o,r),r}const pa={loading:!1,error:null,generation:null,headSha:null,baseSha:null,files:[],directories:[],truncated:!1,totalFiles:null},_s=a.createContext(!1);function pn(e,t,n,o,i=!1,r=5e3){const u=ro(),l=a.useContext(_s),c=o??l,m=a.useMemo(()=>n?ga(u.sourceKey,e,u.transport):null,[n,e,u.sourceKey,u.transport]),{expandedPrefixes:d,filesystemScan:_,ignored:w,tracked:v,untracked:p}=t,x=d==null?void 0:d.join("\0");a.useEffect(()=>{if(!(!m||c))return m.retain({ignored:w,tracked:v,untracked:p,...x===void 0?{}:{expandedPrefixes:x===""?[]:x.split("\0")},..._===void 0?{}:{filesystemScan:_}})},[x,_,w,c,m,v,p]);const k=a.useSyncExternalStore((m==null?void 0:m.subscribe)??xa,(m==null?void 0:m.getSnapshot)??As,As),g=a.useRef({store:m,snapshot:k}),C=a.useRef(c),L=a.useRef(null),y=a.useRef(!1),[,S]=a.useState(0),j=C.current&&!c;C.current=c,(g.current.store!==m||!c&&(!i||j||y.current)||g.current.snapshot.generation===null)&&(g.current={store:m,snapshot:k},y.current=!1,L.current=null);const b=!c&&i&&g.current.snapshot!==k;return a.useEffect(()=>{if(!b){L.current=null;return}const G=Date.now();L.current??(L.current=G+r);const P=setTimeout(()=>{y.current=!0,L.current=null,S(R=>R+1)},Math.max(0,L.current-G));return()=>clearTimeout(P)},[r,b]),g.current.snapshot}function xa(){return()=>{}}function As(){return pa}const va="_revisionsHidden_1l9me_1",ba="_handleGlyph_1l9me_7",hs={revisionsHidden:va,handleGlyph:ba},Gt=0,Kt=420,Mt=220,_a=380,$s=16,Sa=12,wa=26;function Ds({layout:e,containerWidth:t,revisionWidth:n,gapWidth:o,handleWidth:i}){const r=e==="history"?n+o:0;return Math.max(Mt,Math.floor(t-r-o/2-i/2))}function ya({containerWidth:e,gapWidth:t,naturalDetailWidth:n,currentFilesWidth:o,defaultFilesWidth:i,filesMax:r}){const u=Math.min(o,i);return Vt(Math.floor(e-t-n),u,r)}function ys({layout:e,enabled:t=!0,revisionPaneVisible:n=!0,initialFilesWidth:o,naturalDetailWidth:i,className:r,children:u,t:l}){const c=a.useRef(null),m=a.useRef(n),d=a.useRef(300),_=a.useRef(!1),w=a.useRef(null),v=a.useRef(null),p=a.useRef(null),x=a.useRef(!1),k=o??(e==="history"?340:_a),[g,C]=a.useState(()=>({revisions:300,files:k})),[L,y]=a.useState(!n),[S,j]=a.useState(null),[b,G]=a.useState(null),P=L?0:g.revisions,R=b?Ds({layout:e,containerWidth:b.containerWidth,revisionWidth:P,gapWidth:b.gapWidth,handleWidth:b.handleWidth}):void 0;a.useEffect(()=>{m.current!==n&&(m.current=n,y(!n))},[n]),a.useLayoutEffect(()=>{const N=c.current;if(!N)return;const A=()=>{const te=getComputedStyle(N),se=Number.parseFloat(te.columnGap),X=N.querySelector(".source-pane-splitter-handle"),J={containerWidth:N.clientWidth,gapWidth:Number.isFinite(se)?se:Sa,handleWidth:(X==null?void 0:X.offsetWidth)||wa};J.containerWidth<=0||G(Y=>Y&&Y.containerWidth===J.containerWidth&&Y.gapWidth===J.gapWidth&&Y.handleWidth===J.handleWidth?Y:J)};if(A(),typeof ResizeObserver>"u")return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A);const K=new ResizeObserver(A);return K.observe(N),()=>K.disconnect()},[]),a.useLayoutEffect(()=>{R!==void 0&&C(N=>N.files<=R?N:{...N,files:R})},[R]),a.useLayoutEffect(()=>{e!=="files"||i===void 0||b===null||R===void 0||C(N=>{const A=ya({containerWidth:b.containerWidth,gapWidth:b.gapWidth,naturalDetailWidth:i,currentFilesWidth:N.files,defaultFilesWidth:k,filesMax:R});return A===N.files?N:{...N,files:A}})},[k,R,e,b,i]),a.useEffect(()=>{if(!S)return;const N=c.current;if(!N)return;const A=X=>{const J=X-S.startX;let Y;if(S.boundary==="revisions"){const f=Vt(S.startWidths.revisions+J,Gt,Kt),O=b?Math.min(S.startWidths.files,Ds({layout:e,containerWidth:b.containerWidth,revisionWidth:f,gapWidth:b.gapWidth,handleWidth:b.handleWidth})):S.startWidths.files;Y={revisions:f,files:O},f>0&&(d.current=f),N.classList.toggle(hs.revisionsHidden,f===0),N.style.setProperty("--source-revision-column-width",`${f}px`),N.style.setProperty("--source-files-column-width",`${O}px`)}else{const f=Vt(S.startWidths.files+J,Mt,R??S.startWidths.files);Y={...S.startWidths,files:f},N.style.setProperty("--source-files-column-width",`${f}px`)}p.current=Y},K=()=>{w.current=null;const X=v.current;v.current=null,X!==null&&A(X)},te=X=>{const J=X.clientX-S.startX;if(Math.abs(J)>3&&(_.current=!0),v.current=X.clientX,w.current===null){if(typeof window.requestAnimationFrame!="function"){K();return}w.current=window.requestAnimationFrame(K)}},se=()=>{w.current!==null&&(window.cancelAnimationFrame(w.current),w.current=null),K();const X=p.current??S.startWidths;C(X),S.boundary==="revisions"&&y(X.revisions===0),x.current=_.current,window.setTimeout(()=>{x.current=!1},0),p.current=null,j(null)};return window.addEventListener("pointermove",te),window.addEventListener("pointerup",se,{once:!0}),window.addEventListener("pointercancel",se,{once:!0}),document.body.classList.add("source-pane-resizing"),()=>{w.current!==null&&(window.cancelAnimationFrame(w.current),w.current=null),v.current=null,p.current=null,window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",se),window.removeEventListener("pointercancel",se),document.body.classList.remove("source-pane-resizing")}},[S,R,e,b]);const E=(N,A)=>{const K=Vt(A,N==="revisions"?Gt:Mt,N==="revisions"?Kt:R??g.files);N==="revisions"&&(K>0&&(d.current=K),y(K===0)),C(te=>({...te,[N]:K}))},I=(N,A)=>{if(N.button!==0)return;N.preventDefault(),_.current=!1,v.current=null;const K=A==="revisions"?{...g,revisions:P}:g;p.current=K,j({boundary:A,startX:N.clientX,startWidths:K})},H=()=>{if(x.current){x.current=!1;return}if(P===0){const N=d.current;C(A=>({...A,revisions:N})),y(!1);return}d.current=P,y(!0)},ee=(N,A)=>{if(A==="revisions"&&(N.key==="Enter"||N.key===" ")){N.preventDefault(),H();return}const K=A==="revisions"?P:g.files,te=A==="revisions"?Gt:Mt,se=A==="revisions"?Kt:R??K,X=N.key==="ArrowLeft"?K-$s:N.key==="ArrowRight"?K+$s:N.key==="Home"?te:N.key==="End"?se:null;X!==null&&(N.preventDefault(),E(A,X))},M={"--source-revision-column-width":`${P}px`,"--source-files-column-width":`${g.files}px`},V=e==="history"&&n?["revisions","files"]:["files"];return s.jsxs("div",{ref:c,className:`${r} ${e==="history"&&P===0?hs.revisionsHidden:""}`.trimEnd(),style:M,children:[u,t&&V.map(N=>s.jsxs("div",{className:`source-pane-splitter source-pane-splitter-${N} ${(S==null?void 0:S.boundary)===N?"dragging":""}`,children:[s.jsx("span",{className:"source-pane-splitter-guide","aria-hidden":"true"}),["top","bottom"].map(A=>s.jsx("hr",{className:`source-pane-splitter-handle ${hs.handleGlyph} ${A}`,"aria-label":l(N==="revisions"?"sourceResizeRevisionPane":"sourceResizeFilePane"),"aria-orientation":"vertical","aria-valuemin":N==="revisions"?Gt:Mt,"aria-valuemax":N==="revisions"?Kt:R,"aria-valuenow":N==="revisions"?P:g.files,title:N==="revisions"?l(P===0?"sourceShowRevisionPane":"sourceHideRevisionPane"):void 0,tabIndex:0,onPointerDown:K=>I(K,N),onClick:N==="revisions"?H:void 0,onKeyDown:K=>ee(K,N)},A))]},N))]})}function Vt(e,t,n){return Math.min(n,Math.max(t,e))}const Ca="_outline_g5nwk_1",ja="_group_g5nwk_8",ka="_groupButton_g5nwk_13",Na="_disclosure_g5nwk_36",Ra="_groupLabel_g5nwk_43",Ea="_groupStatuses_g5nwk_52",La="_groupCount_g5nwk_59",Ta="_children_g5nwk_70",Ma="_sectionDivider_g5nwk_77",Pa="_sectionDividerButton_g5nwk_101",Fa="_sectionDisclosure_g5nwk_115",Ke={outline:Ca,group:ja,groupButton:ka,disclosure:Na,groupLabel:Ra,groupStatuses:Ea,groupCount:La,children:Ta,sectionDivider:Ma,sectionDividerButton:Pa,sectionDisclosure:Fa};function os(e,t){const n=t==null?void 0:t.trim();if(!n)return null;const o=e.toLowerCase().indexOf(n.toLowerCase());if(o<0)return null;const i=o+n.length;return{start:o,end:i,prefix:e.slice(0,o),text:e.slice(o,i),suffix:e.slice(i)}}const Aa="_withMatch_rc7xr_1",$a="_matchPrefix_rc7xr_6",Da="_matchSuffix_rc7xr_7",Ba="_match_rc7xr_6",Oa="_wrapMatchOnNarrow_rc7xr_41",Nt={withMatch:Aa,matchPrefix:$a,matchSuffix:Da,match:Ba,wrapMatchOnNarrow:Oa};function bt({text:e,query:t,wrapMatchOnNarrow:n=!1,className:o,...i}){const r=os(e,t),u=[r?Nt.withMatch:"",r&&n?Nt.wrapMatchOnNarrow:"",o].filter(Boolean).join(" ");return r?s.jsxs("span",{...i,className:u,children:[r.prefix&&s.jsx("span",{className:Nt.matchPrefix,children:r.prefix}),s.jsx("mark",{className:Nt.match,children:r.text}),r.suffix&&s.jsx("span",{className:Nt.matchSuffix,children:r.suffix})]}):s.jsx("span",{...i,className:u,children:e})}const Ha="_path_yev28_1",Ia="_pathWithMatch_yev28_12",Ua="_reviewStates_yev28_31",Wa="_reviewState_yev28_31",za="_open_yev28_47",Ga="_addressed_yev28_51",Ka="_changed_yev28_55",qa="_unchanged_yev28_59",Va="_unavailable_yev28_60",nt={path:Ha,pathWithMatch:Ia,reviewStates:Ua,reviewState:Wa,open:za,addressed:Ga,changed:Ka,unchanged:qa,unavailable:Va};function as({path:e,children:t,...n}){const o=Zt(e);return s.jsx("button",{...n,...o,children:t})}function is({children:e,query:t,fullPath:n,className:o,...i}){const r=typeof e=="string"?e:null,u=[nt.path,r&&os(r,t)?nt.pathWithMatch:"",o].filter(Boolean).join(" ");return r?s.jsx(bt,{...i,className:u,"data-source-path":n??r,text:r,query:t,wrapMatchOnNarrow:!0}):s.jsx("span",{...i,className:u,children:e})}const Ya={M:"sourceFileStatusModified",A:"sourceFileStatusAdded",D:"sourceFileStatusDeleted",R:"sourceFileStatusRenamed",C:"sourceFileStatusCopied",T:"sourceFileStatusTypeChanged",U:"sourceFileStatusUnmerged","?":"sourceFileStatusUntracked"};function Ot({status:e,t}){const n=t(Ya[e]??"sourceFileStatusChanged"),o=`${e} — ${n}`,i=Zt(o);return s.jsx("span",{className:`git-status-badge git-status-${e.toLowerCase()}`,role:"img","aria-label":o,...i,children:e})}function xn({states:e,t}){if(e.length===0)return null;const n=e.filter(m=>m.state==="open").length,o=e.length-n,i=e.filter(m=>m.changeStatus==="changed").length,r=e.filter(m=>m.changeStatus==="unchanged").length,u=e.length-i-r,l=n>0?{label:t("sourceReviewStateOpen"),count:n,className:nt.open}:{label:t("sourceReviewStateAddressed"),count:o,className:nt.addressed},c=i>0?{label:t("sourceReviewSourceChanged"),count:i,className:nt.changed}:r>0?{label:t("sourceReviewSourceUnchanged"),count:r,className:nt.unchanged}:{label:t("sourceReviewSourceUnavailable"),count:u,className:nt.unavailable};return s.jsxs("span",{className:nt.reviewStates,children:[s.jsx(Bs,{...l,t}),s.jsx(Bs,{...c,t})]})}function Bs({label:e,count:t,className:n,t:o}){const i=o("sourceReviewSiteStateCount",{state:e,count:t}),r=Zt(i);return s.jsxs("span",{className:`${nt.reviewState} ${n}`,...r,children:[e," ",t]})}const Xa=14,Os=29,vn=[];function Ja(e){return Cs(bn(e,vn))}function Ss({children:e,expanded:t,onToggle:n}){return n?s.jsxs("button",{type:"button",className:`${Ke.sectionDivider} ${Ke.sectionDividerButton}`,"aria-expanded":t,onClick:n,children:[s.jsx("span",{className:Ke.sectionDisclosure,"aria-hidden":"true",children:t?"▾":"▸"}),s.jsx("span",{children:e})]}):s.jsx("div",{className:Ke.sectionDivider,children:s.jsx("span",{children:e})})}function Pt({items:e,directories:t=vn,expandedDirectories:n,onToggleDirectory:o,scopeKey:i,query:r,className:u,activeItemId:l,focusRequest:c=0,toggleAllOnEnter:m=!1,renderFile:d,t:_,onKeyDown:w,...v}){const p=a.useRef(null),x=a.useRef(0),k=a.useRef(null),g=a.useRef(new Map),[C,L]=a.useState({}),[y,S]=a.useState(Xa),j=((r==null?void 0:r.trim().length)??0)>0,b=a.useMemo(()=>j?e.map(P=>({kind:"file",item:P,visiblePath:P.displayPath,pathProps:Sn(P)})):Qa(e,t,i),[t,e,i,j]);a.useLayoutEffect(()=>{g.current.clear(),L({})},[]),a.useLayoutEffect(()=>{const P=p.current;if(!P)return;const R=ms(P),E=()=>{const H=(R==null?void 0:R.clientHeight)??P.clientHeight;H>0&&S(Math.max(1,Math.floor(H/Os)))};if(E(),typeof ResizeObserver>"u")return;const I=new ResizeObserver(E);return I.observe(R??P),()=>I.disconnect()},[]),a.useLayoutEffect(()=>{var M;const P=Yt(b).filter(V=>!V.directory);if(P.length===0)return;const R=p.current,E=R?((M=ms(R))==null?void 0:M.clientHeight)??R.clientHeight:0,I=E>0?Math.max(1,Math.floor(E/Os)):y;let H=Math.max(0,I-b.length),ee=!1;for(const V of P){if(g.current.has(V.key))continue;const N=V.children.length,A=N<=H;g.current.set(V.key,A),A&&(H-=N),ee=!0}ee&&L(V=>({...V}))},[y,b]),a.useLayoutEffect(()=>{if(c<=x.current||l===null||l===void 0||!e.some(R=>R.id===l))return;x.current=c,k.current=l;const P=Yt(b).filter(R=>!R.directory&&R.items.some(E=>E.id===l));P.length!==0&&L(R=>({...R,...Object.fromEntries(P.map(E=>[E.key,!0]))}))},[l,b,c,e]),a.useLayoutEffect(()=>{const P=k.current,R=p.current;if(!P||!R)return;const E=Array.from(R.querySelectorAll("[data-source-outline-id]")).find(H=>H.dataset.sourceOutlineId===P),I=E==null?void 0:E.closest("[data-source-list-item]");I&&(k.current=null,I.focus({preventScroll:!0}),ti(I,ms(R)))});const G=P=>{if(m&&P.key==="Enter"&&!P.altKey&&!P.ctrlKey&&!P.metaKey&&!P.shiftKey&&P.target instanceof HTMLElement&&P.target.closest("[data-source-list-item]")){if(P.preventDefault(),St(),P.repeat)return;const R=Yt(b).filter(I=>!I.directory),E=R.some(I=>!(C[I.key]??g.current.get(I.key)??!1));R.length>0&&L(I=>({...I,...Object.fromEntries(R.map(H=>[H.key,E||H.items.some(ee=>ee.id===l)]))}));return}w==null||w(P)};return s.jsx("ul",{...v,ref:p,className:[Ke.outline,u].filter(Boolean).join(" "),onKeyDown:G,children:wn(b,C,g.current,(P,R)=>L(E=>({...E,[P]:!R})),n,o,d,_)})}function Qa(e,t,n){return _n(bn(e,t),"",n)}function bn(e,t){const n={files:[],directories:new Map};for(const o of e){const i=o.path.split("/").filter(Boolean);if(i.length<=1){n.files.push(o);continue}let r=n;for(const u of i.slice(0,-1)){let l=r.directories.get(u);l||(l={files:[],directories:new Map},r.directories.set(u,l)),r=l}r.files.push(o)}for(const o of t){const i=o.path.split("/").filter(Boolean);if(i.length===0)continue;let r=n;for(const u of i){let l=r.directories.get(u);l||(l={files:[],directories:new Map},r.directories.set(u,l)),r=l}r.directory=o}return n}function _n(e,t,n){const o=e.files.map(i=>({kind:"file",item:i,visiblePath:Za(i,t),pathProps:Sn(i)}));for(const[i,r]of e.directories){let u=r,l=`${t}${i}/`;for(;!u.directory&&u.files.length===0&&u.directories.size===1;){const m=u.directories.entries().next().value;if(!m)break;l+=`${m[0]}/`,u=m[1]}const c=Cs(u);o.push({kind:"group",key:`${n}\0${l}`,path:l,items:c,children:_n(u,l,n),statuses:ei(c),count:u.directory?u.files.length:c.length,...u.directory?{directory:u.directory}:{}})}return o}function Sn(e){return{"data-source-outline-id":e.id,"data-source-outline-path":e.displayPath}}function Za(e,t){return t?e.displayPath.split(" → ").map(n=>n.startsWith(t)?n.slice(t.length):n).join(" → "):e.displayPath}function Cs(e){return[...e.files,...Array.from(e.directories.values()).flatMap(Cs)]}function ei(e){const t=[],n=new Set;for(const o of e)for(const i of o.statuses??[])n.has(i)||(n.add(i),t.push(i));return t}function Yt(e){return e.flatMap(t=>t.kind==="group"?[t,...Yt(t.children)]:[])}function wn(e,t,n,o,i,r,u,l){return e.map(c=>{var v,p,x,k;if(c.kind==="file")return u(c.item,c.visiblePath,c.pathProps);const m=!!(c.directory&&i&&r),d=m&&c.directory?(i==null?void 0:i.has(c.directory.path))===!0:t[c.key]??n.get(c.key)??!1,_=((v=c.directory)==null?void 0:v.pending)===!0&&d,w=c.directory?l(_?"sourceLoadingUntrackedFolder":d?"sourceCollapseDirectory":"sourceExpandDirectory",{path:c.path}):l(d?"sourceCollapsePathGroup":"sourceExpandPathGroup",{path:c.path,count:c.count});return s.jsxs("li",{className:Ke.group,children:[s.jsxs("button",{type:"button",className:Ke.groupButton,"data-source-list-item":!0,"aria-expanded":d,"aria-label":w,title:w,onClick:()=>{m&&c.directory&&r?r(c.directory.path,!d):o(c.key,d)},children:[s.jsx("span",{className:Ke.disclosure,"aria-hidden":"true",children:_?"…":d?"▾":"▸"}),s.jsx("span",{className:Ke.groupLabel,children:c.path}),c.statuses.length>0&&s.jsx("span",{className:Ke.groupStatuses,children:c.statuses.map(g=>s.jsx(Ot,{status:g,t:l},g))}),!((p=c.directory)!=null&&p.pending)&&s.jsxs("span",{className:Ke.groupCount,title:(x=c.directory)!=null&&x.truncated?l("sourceUntrackedFolderTruncated",{count:c.count}):void 0,children:[c.count,(k=c.directory)!=null&&k.truncated?"+":""]})]}),d&&c.children.length>0&&s.jsx("ul",{className:Ke.children,children:wn(c.children,t,n,o,i,r,u,l)})]},c.key)})}function ms(e){let t=e;for(;t;){const n=getComputedStyle(t).overflowY;if(n==="auto"||n==="scroll")return t;t=t.parentElement}return e.parentElement}function ti(e,t){if(!t)return;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();n.top<o.top?t.scrollTop-=o.top-n.top:n.bottom>o.bottom&&(t.scrollTop+=n.bottom-o.bottom)}class yn{constructor(t){Oe(this,"normalized");Oe(this,"queryCache",new Map);this.files=t,this.normalized=t.map(n=>n.toLowerCase())}search(t){const n=t.trim().toLowerCase();if(!n)return this.files;let o=this.queryCache.get(n);return o||(o=(this.longestCachedPrefix(n)??Array.from({length:this.files.length},(r,u)=>u)).filter(r=>{var u;return(u=this.normalized[r])==null?void 0:u.includes(n)}),this.queryCache.set(n,o)),o.map(i=>this.files[i])}longestCachedPrefix(t){for(let n=t.length-1;n>0;n--){const o=this.queryCache.get(t.slice(0,n));if(o)return o}return null}}const si="_inventory_o49d4_1",ni="_sectionControls_o49d4_5",oi="_sectionToggle_o49d4_15",ai="_activeSectionToggle_o49d4_36",ii="_truncated_o49d4_42",ri="_detail_o49d4_69",ci="_detailModes_o49d4_88",li="_activeMode_o49d4_116",Je={inventory:si,sectionControls:ni,sectionToggle:oi,activeSectionToggle:ai,truncated:ii,detail:ri,detailModes:ci,activeMode:li},ui="_root_1k07w_7",di="_header_1k07w_15",hi="_pathGroup_1k07w_27",mi="_path_1k07w_27",fi="_pathCopy_1k07w_45",gi="_lines_1k07w_50",pi="_run_1k07w_58",xi="_scrollable_1k07w_63",vi="_row_1k07w_67",bi="_hasReviewComment_1k07w_88",_i="_gutter_1k07w_92",Si="_commitLink_1k07w_106",wi="_authorColored_1k07w_113",yi="_uncommitted_1k07w_126",Ci="_gutterLoading_1k07w_130",ji="_lineNumber_1k07w_135",ki="_code_1k07w_156",Ni="_truncated_1k07w_176",Ri="_provenanceStatus_1k07w_182",Ei="_provenanceError_1k07w_188",Li="_contentError_1k07w_189",Se={root:ui,header:di,pathGroup:hi,path:mi,pathCopy:fi,lines:gi,run:pi,scrollable:xi,row:vi,hasReviewComment:bi,gutter:_i,commitLink:Si,authorColored:wi,uncommitted:yi,gutterLoading:Ci,lineNumber:ji,code:ki,truncated:Ni,provenanceStatus:Ri,provenanceError:Ei,contentError:Li},Ti=68,Mi=44,Pi=2,Fi=128,Ai=320,mt=new Map;function $i({projectId:e,path:t,lines:n,typography:o}){let i=2166136261,r=0;for(const u of n){for(let l=0;l<u.length;l+=1)i^=u.charCodeAt(l),i=Math.imul(i,16777619);i^=10,i=Math.imul(i,16777619),r+=u.length+1}return`${e}\0${t}\0${n.length}:${r}:${i>>>0}\0${o}`}function Di(e,t=0){const n=getComputedStyle(e);return[n.fontFamily,n.fontSize,n.lineHeight,n.fontWeight,n.fontStretch,n.fontVariationSettings,n.letterSpacing,n.getPropertyValue("tab-size"),t].join("|")}function Bi(e,t){const n=mt.get(e);if(n!==void 0)return mt.delete(e),mt.set(e,n),n;const o=Math.max(0,Math.ceil(t()));for(mt.set(e,o);mt.size>Fi;){const i=mt.keys().next().value;if(i===void 0)break;mt.delete(i)}return o}function Oi(e,t){var c,m;const n=Array.from(e.querySelectorAll("[data-blame-code]")),o=Bi(t,()=>n.reduce((d,_)=>Math.max(d,Hi(_)),0)),i=e.querySelector("[data-blame-row]"),r=((c=i==null?void 0:i.querySelector("[data-blame-gutter]"))==null?void 0:c.offsetWidth)||Ti,u=((m=i==null?void 0:i.querySelector("[data-blame-lineno]"))==null?void 0:m.offsetWidth)||Mi,l=e.offsetWidth-e.clientWidth||Pi;return Math.max(Ai,Math.ceil(r+u+o+l))}function Hi(e){var o;const t=document.createRange();t.selectNodeContents(e);const n=((o=t.getBoundingClientRect)==null?void 0:o.call(t).width)??0;return t.detach(),n>0?n:e.scrollWidth}const _t=360;function Ii(e,t){const n=[];return e.forEach((o,i)=>{var m;const r=((m=t==null?void 0:t[i])==null?void 0:m.line)===i+1?t[i]:void 0,u=r?`${r.uncommitted?"uncommitted":"sha"}:${r.sha}`:`unknown:${i}`,l={content:o,index:i,line:r},c=n.at(-1);(c==null?void 0:c.identity)===u?c.rows.push(l):n.push({identity:u,key:`${u}:${i}`,rows:[l]})}),n}function Cn(e){return`${e.author}\0${e.authorColorSeed??""}`}function Ui(e){const t=new Map;for(const u of e){if(u.uncommitted)continue;const l=Cn(u);t.has(l)||t.set(l,u.authorColorSeed??Gi(u.author))}if(t.size<=1)return new Map;const n=[...t].sort(([u,l],[c,m])=>l-m||u.localeCompare(c)),o=new Map,i=[],r=new Set;for(const[u,l]of n){const c=zi(l,_t);if(r.size===_t){o.set(u,c);continue}const m=Array.from({length:_t},(v,p)=>p).filter(v=>!r.has(v));let d=m[0]??c,_=-1,w=Number.POSITIVE_INFINITY;for(const v of m){const p=i.length===0?_t:Math.min(...i.map(k=>Hs(v,k))),x=Hs(v,c);(p>_||p===_&&x<w)&&(d=v,_=p,w=x)}o.set(u,d),i.push(d),r.add(d)}return o}function Hs(e,t){const n=Math.abs(e-t);return Math.min(n,_t-n)}function Wi(e){return 360/_t*e}function zi(e,t){return(Math.round(e)%t+t)%t}function Gi(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Dt({projectId:e,path:t,rev:n,onOpenCommit:o,onToggleBlame:i,onContentWidthChange:r,captureReviewProjections:u=!1,t:l}){const[c,m]=a.useState(null),[d,_]=a.useState(null),[w,v]=a.useState(!0),[p,x]=a.useState(!0),[k,g]=a.useState(null),[C,L]=a.useState(null),[y,S]=a.useState(null),[j,b]=a.useState(0),G=a.useRef(null),P=Bt(l),{pending:R,defaultSession:E,busy:I,error:H,addToReview:ee,submitNow:M}=uo(e,t,u);a.useEffect(()=>{let T=!1;return v(!0),x(!0),g(null),L(null),m(null),_(null),S(null),n?v(!1):he.getFile(e,t,!1).then(U=>{T||(m(U),v(!1))}).catch(U=>{T||(g(U instanceof Error?U.message:l("fileViewerLoadFailed")),v(!1))}),(n?he.getGitBlame(e,t,n):he.getGitBlame(e,t)).then(U=>{T||(_(U),x(!1))}).catch(U=>{T||(L(U instanceof Error?U.message:l("sourceBlameLoadFailed")),x(!1))}),()=>{T=!0}},[e,t,n,l]);const V=a.useMemo(()=>d!=null&&d.highlightedHtml?Qi(d.highlightedHtml):null,[d]),N=a.useMemo(()=>(c==null?void 0:c.content)!==void 0?Xi(c.content):(d==null?void 0:d.lines.map(T=>T.content))??[],[d==null?void 0:d.lines,c==null?void 0:c.content]),A=a.useMemo(()=>Ii(N,d==null?void 0:d.lines),[d==null?void 0:d.lines,N]),K=a.useMemo(()=>Ui((d==null?void 0:d.lines)??[]),[d==null?void 0:d.lines]),te=`calc(${Math.max(1,String(N.length).length)}ch + 0.65rem)`;a.useEffect(()=>{const T=new MutationObserver(()=>{b(D=>D+1)});return T.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]}),()=>T.disconnect()},[]),a.useLayoutEffect(()=>{const T=G.current;if(!T||w||!r)return;const D=Di(T.querySelector("[data-blame-code]")??T,j),U=V?`highlight:${(d==null?void 0:d.highlightedLanguage)??"unknown"}`:"plain",F=$i({projectId:e,path:t,lines:N,typography:`${D}|${U}`});r(t,Oi(T,F))},[d==null?void 0:d.highlightedLanguage,V,N,w,r,t,e,j]);const se=a.useMemo(()=>{const T=new Set;for(const D of R){if(D.anchor.side!=="new"||D.anchor.newLine===null)continue;const U=d==null?void 0:d.lines[D.anchor.newLine-1];if(!U||U.line!==D.anchor.newLine)continue;(D.anchor.revision.kind==="uncommitted"?U.uncommitted:!U.uncommitted&&D.anchor.revision.kind==="sha"&&D.anchor.revision.sha===U.sha)&&T.add(D.anchor.newLine)}return T},[d==null?void 0:d.lines,R]),X=a.useCallback(T=>[{label:l("sourceOpenCommit"),disabled:T.uncommitted||!o,onSelect:()=>{T.uncommitted||o==null||o(T.sha)}},{label:l("sourceCopyCommitHash"),onSelect:()=>{rt(T.sha)}}],[o,l]),J=T=>S({index:T}),Y=T=>{if(!d)return null;const D=d.lines[T];if(!D)return null;const{snippet:U,offset:F}=Is(d.lines,T);return{path:t,revision:D.uncommitted?{kind:"uncommitted",savedAt:new Date().toISOString()}:{kind:"sha",sha:D.sha},side:"new",oldLine:null,newLine:D.line,snippet:U,snippetAnchorOffset:F,...u?{projection:{...n?{kind:"revision",revision:d.rev}:{kind:"worktree"},path:t,side:"new"}}:{}}},f=y&&d?d.lines[y.index]:null,O=T=>A.map(D=>{var F;const U=D.rows.filter(({index:me})=>T==="all"?!0:T==="before"?y!==null&&me<=y.index:y!==null&&me>y.index);return U.length===0?null:s.jsx("div",{className:`${Se.run} ${(F=U[0])!=null&&F.line?Se.scrollable:""}`,children:U.map(({content:me,index:re,line:le})=>{const ye=re+1,ae=le?X(le):[],ue=le?K.get(Cn(le)):void 0,ce=ue===void 0?void 0:{"--blame-author-hue":`${Wi(ue)}deg`};return s.jsxs("div",{"data-blame-row":"",className:`${Se.row} ${se.has(ye)?`${Se.hasReviewComment} has-review-comment`:""}`,children:[le!=null&&le.uncommitted?s.jsx("span",{className:`${Se.gutter} ${Se.uncommitted}`,"data-blame-gutter":"uncommitted",title:l("sourceBlameNotCommitted"),children:"·····"}):le?s.jsx("button",{type:"button",className:`${Se.gutter} ${Se.commitLink} ${ue===void 0?"":Se.authorColored}`,"data-blame-gutter":"commit",style:ce,title:Yi(le),...P.targetProps(ae,()=>o?o(le.sha):void rt(le.sha)),children:le.shortSha.slice(0,5)}):s.jsx("span",{className:`${Se.gutter} ${Se.gutterLoading}`,"data-blame-gutter":"loading",title:l("sourceBlameLoading"),children:"·····"}),s.jsx("button",{type:"button",className:Se.lineNumber,"data-blame-lineno":"",disabled:!le,onClick:()=>J(re),children:ye}),s.jsx(qi,{content:me,highlightedHtml:V==null?void 0:V[re],enabled:!!le,onOpen:()=>J(re)})]},ye)})},`${D.key}:${T}`)}),W=y&&f&&d?s.jsx(ho,{projectId:e,anchorLabel:`${t}:${f.line}`,snippet:Is(d.lines,y.index).snippet,busy:I,error:H,onCancel:()=>S(null),onAddToReview:async T=>{const D=Y(y.index);D&&await ee(D,T)&&S(null)},defaultSession:E,onSubmit:async(T,D)=>{const U=Y(y.index);if(!U)return;await M(U,T,D,l("sourceReviewSubmitQueued"),D==="new"?E==null?void 0:E.newSession:void 0)==="navigated"&&S(null)},t:l},y.index):null;return w&&!d?s.jsx("section",{className:`blame-view ${Se.root}`,children:s.jsx("div",{className:"git-diff-loading",children:l("gitStatusLoading")})}):k&&C&&!d?s.jsx("section",{className:`blame-view ${Se.root}`,children:s.jsx("div",{className:"git-diff-error",children:k})}):s.jsxs("section",{className:`blame-view ${Se.root}`,ref:G,children:[s.jsxs("div",{className:Se.header,children:[s.jsxs("span",{className:Se.pathGroup,"data-blame-path-group":"",children:[s.jsx("span",{className:Se.path,title:t,children:t}),s.jsx(Xt,{value:t,title:l("sourceCopyPath"),className:`source-detail-action source-detail-icon-action ${Se.pathCopy}`,icon:"path"})]}),s.jsx(fo,{projectId:e,path:t,rev:n,dirtyLabel:l("fileRevisionDirty"),uncommittedLabel:l("fileRevisionUncommitted")}),i&&s.jsx("button",{type:"button",className:"source-detail-action source-detail-icon-action active",title:l("sourceToggleBlame"),"aria-label":l("sourceToggleBlame"),"aria-pressed":"true",onClick:i,children:s.jsx(Ki,{})}),p&&s.jsx("span",{className:Se.provenanceStatus,role:"status",children:l("sourceBlameLoading")}),s.jsx(Xt,{value:(c==null?void 0:c.content)??"",title:l("sourceCopyRawContent"),className:"source-detail-action source-detail-icon-action",disabled:(c==null?void 0:c.content)===void 0||!c.metadata.isText,icon:"content"})]}),k&&s.jsx("div",{className:`git-diff-error ${Se.contentError}`,children:k}),C&&s.jsx("div",{className:Se.provenanceError,role:"status",children:l("sourceBlameUnavailable")}),c&&!c.metadata.isText&&!d&&s.jsx("div",{className:"git-status-empty",children:l("fileViewerBinary")}),s.jsx("div",{className:Se.lines,style:{"--blame-line-number-column-width":te},children:s.jsx(go,{before:O(y?"before":"all"),editor:W,after:y?O("after"):null})}),P.menu,((d==null?void 0:d.truncated)||(c==null?void 0:c.contentTruncated))&&s.jsx("div",{className:Se.truncated,children:l("sourceBlameTruncated")})]})}function Ki(){return s.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7"}),s.jsx("path",{d:"M3 4v5h5"}),s.jsx("path",{d:"M12 7v5l3 2"})]})}function qi({content:e,highlightedHtml:t,enabled:n,onOpen:o}){const i={className:`${Se.code} blame-line-target`,"data-blame-code":"",role:n?"button":void 0,tabIndex:n?0:void 0,onClick:r=>{n&&!Vi(r.currentTarget)&&o(r.currentTarget)},onKeyDown:r=>{!n||r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),o(r.currentTarget))}};return t?s.jsx("span",{...i,dangerouslySetInnerHTML:{__html:t}}):s.jsx("span",{...i,children:e||" "})}function Vi(e){const t=window.getSelection();return!!(t&&!t.isCollapsed&&t.toString().length>0&&t.containsNode(e,!0))}function Yi(e){const t=Ji(e.authorTime);return[e.sha,e.author,t,e.summary].filter(Boolean).join(" · ")}function Xi(e){if(!e)return[];const t=e.split(`
|
|
1
|
+
var Bn=Object.defineProperty;var On=(e,t,n)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Oe=(e,t,n)=>On(e,typeof t!="symbol"?t+"":t,n);import{u as sn,r as a,d as ws,j as s,ax as nn,by as Hn,bz as In,bp as Zt,aK as rt,U as on,L as an,e as es,b as ts,s as He,au as Un,bA as Wn,P as zn,bB as Gn,bC as Kn,at as qn,bD as Vn,bE as Yn,bF as Xn,bG as Jn,bH as Qn,bI as Zn,bJ as eo,bK as to,bL as so,bM as no}from"./index-umZg0LZ6.js";import{P as oo}from"./PageHeader-BjwH2pWD.js";import{a as rn,H as Es,u as ao,b as io}from"./NavigationLayout-BTFsWVtE.js";import{u as ss,b as ro,M as wt,e as co}from"./Modal-ClSjJagX.js";import{E as Ls,I as lo,J as St,u as Bt,K as uo,L as ho,N as mo,C as Xt,O as fo,P as go,U as cn,V as yt,W as Ft,X as At,F as bs,Y as ln,Z as un,_ as po,$ as $t,a0 as dn,a1 as xo,a2 as vo,a3 as bo,G as Ts,a4 as _o,a5 as So,a6 as wo,a7 as yo}from"./providerChildSessions-DbLFSybt.js";import{u as Co}from"./useDocumentTitle-Xz5t-nlB.js";import{a as he,b as hn,$ as Ms,a0 as jo}from"./client-Ci_HPGfl.js";import{y as ko}from"./LocalMediaModal-B9eHVx6y.js";import{r as No,s as Ps}from"./useSidebarWidth-CBCcbSLg.js";import{u as Ro}from"./useRelativeNow-Ca6QGcPa.js";import{c as Eo,a as Lo}from"./frontendReload-CBdyvvdy.js";import{u as To}from"./useSourceControlCleanLanding-VDlft5tr.js";import{MainContent as Mo}from"./index-Cv3tQXyE.js";import{a as mn}from"./appHref-ByaEnJGJ.js";import{p as Po}from"./sourceControlNavigationState-BJbTzWTE.js";import{S as fn}from"./SourceFileHeaderActions-PjhUGnn6.js";import{u as Fo,g as Ao,a as $o}from"./useProviders-CeN1PclA.js";import"./react-runtime-D-UPQ57m.js";import"./SessionHeader.module-BpaFAQ-S.js";import"./HostIdentityContext-DA7dMF-y.js";import"./useFileActivity-BoW4X3DY.js";import"./index-CoR-vzsb.js";import"./remoteRoutePaths-D8htA0xa.js";import"./RelayProtocol-BpdH0COG.js";import"./ProviderBadge-P0VTI71n.js";import"./YepAnywhereLogo-5zFKWjQq.js";import"./katex-Dv2p4YRM.js";import"./newSessionPrefill-DKcy0abh.js";import"./relay-url-j3kYm5KO.js";import"./types-BHkriVjU.js";const Do="_container_132g3_23",Bo="_button_132g3_31",Oo="_text_132g3_51",Ho="_chevron_132g3_66",Io="_dropdown_132g3_77",Uo="_options_132g3_91",Wo="_option_132g3_91",zo="_selected_132g3_114",Go="_name_132g3_118",Ko="_meta_132g3_126",qo="_overlay_132g3_132",Vo="_sheet_132g3_142",Yo="_header_132g3_162",Xo="_title_132g3_167",ze={container:Do,button:Bo,text:Oo,chevron:Ho,dropdown:Io,options:Uo,option:Wo,selected:zo,name:Go,meta:Ko,overlay:qo,sheet:Vo,header:Yo,title:Xo},Fs=769;function Jo({currentProjectId:e,currentProjectName:t,onProjectChange:n}){const{t:o}=sn(),[i,r]=a.useState(!1),[u,l]=a.useState(()=>window.innerWidth>=Fs),c=a.useRef(null),m=a.useRef(null),d=ws(),_=ss(),{projects:w,loading:v}=rn(),p=w.find(b=>b.id===e),x=p?Es(p):t??o("projectSelectorFallback"),k=()=>{var b;(b=c.current)==null||b.blur(),r(!0)},g=b=>{b.id!==e&&(n?n(b):d(`${_}/new-session?projectId=${encodeURIComponent(b.id)}`)),r(!1)},C=a.useCallback(()=>{r(!1)},[]);a.useEffect(()=>{const b=()=>{l(window.innerWidth>=Fs)};return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),a.useEffect(()=>{if(!i)return;const b=G=>{G.key==="Escape"&&(G.preventDefault(),G.stopPropagation(),C())};return document.addEventListener("keydown",b,!0),()=>document.removeEventListener("keydown",b,!0)},[i,C]),a.useEffect(()=>{if(!i||!u)return;const b=G=>{m.current&&!m.current.contains(G.target)&&c.current&&!c.current.contains(G.target)&&C()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[i,u,C]),a.useEffect(()=>{if(i&&!u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[i,u]),a.useEffect(()=>{var b;i&&((b=m.current)==null||b.focus())},[i]);const L=b=>{b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),C())};if(!v&&w.length<=1)return s.jsx("span",{className:"session-title",children:x});const y=s.jsx("div",{className:ze.options,children:w.map(b=>{const G=b.id===e;return s.jsxs("button",{type:"button",className:`${ze.option} ${G?ze.selected:""}`,onClick:()=>g(b),children:[s.jsx("span",{className:ze.name,children:Es(b)}),s.jsx("span",{className:ze.meta,children:o("projectSelectorSessionsCount",{count:b.sessionCount})})]},b.id)})}),S=i&&!u?nn.createPortal(s.jsx("div",{className:ze.overlay,onClick:L,onMouseDown:b=>b.stopPropagation(),children:s.jsxs("div",{ref:m,className:ze.sheet,role:"dialog",tabIndex:-1,"aria-label":o("projectSelectorSelectProject"),children:[s.jsx("div",{className:ze.header,children:s.jsx("span",{className:ze.title,children:o("projectSelectorSelectProject")})}),y]})}),document.body):null,j=i&&u?s.jsx("div",{ref:m,className:ze.dropdown,role:"dialog",tabIndex:-1,"aria-label":o("projectSelectorSelectProject"),children:y}):null;return s.jsxs("div",{className:`project-selector-container ${ze.container}`,children:[s.jsxs("button",{ref:c,type:"button",className:`project-selector-button ${ze.button}`,onClick:k,title:o("projectSelectorChangeProject"),"aria-haspopup":"listbox","aria-expanded":i,children:[s.jsx("span",{className:`project-selector-text ${ze.text}`,children:x}),s.jsx("svg",{className:ze.chevron,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),j,S]})}function Qo(){return document.visibilityState==="visible"&&document.hasFocus()}function Zo(e){return document.addEventListener("visibilitychange",e),window.addEventListener("focus",e),window.addEventListener("blur",e),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e),window.removeEventListener("blur",e)}}function ea(){return a.useSyncExternalStore(Zo,Qo,()=>!1)}function ta({projectId:e,status:t,routeRetentionKey:n,supportsRemoteCheck:o,supportsPull:i,supportsPush:r,supportsIntegrationOptions:u,onRefreshStatus:l,t:c}){const[m,d]=a.useState(null),[_,w]=a.useState(!1),[v,p]=a.useState(null),[x,k]=a.useState(null),[g,C]=a.useState(!1),[L,y]=a.useState(null),[S,j]=a.useState(null),[b,G]=a.useState(!1),[P,R]=a.useState(null),[E,I]=a.useState(null),[H,ee]=a.useState(!1),[M,V]=a.useState(null);a.useEffect(()=>{d(null),p(null),w(!1),k(null),y(null),C(!1),j(null),R(null),G(!1),I(null),V(null),ee(!1)},[e]);const N=_||g||b,A=ia(x,S),K=A?`${A.ahead}:${A.behind}:${A.upstream??""}`:"";a.useEffect(()=>{if(!e||!u||!K){I(null),V(null),ee(!1);return}let F=!1;return ee(!0),I(null),V(null),he.getGitIntegrationOptions(e).then(me=>{F||I(me)}).catch(me=>{F||V(me instanceof Error?me.message:c("gitStatusAutoOptionsFailed"))}).finally(()=>{F||ee(!1)}),()=>{F=!0}},[K,e,u,c]);const te=a.useCallback(async()=>{if(!(!e||!o||N)){w(!0),d(null),p(null),k(null),y(null),j(null),R(null),I(null),V(null);try{const F=await he.checkGitRemote(e);d(F),F.status==="checked"&&await l()}catch(F){p(F instanceof Error?F.message:c("gitStatusRemoteCheckFailed"))}finally{w(!1)}}},[N,l,e,o,c]),se=a.useCallback(async()=>{if(!(!e||!i||N)){C(!0),k(null),y(null),d(null),p(null),j(null),R(null),I(null),V(null);try{const F=await he.pullGit(e);k(F),F.status==="pulled"&&(n&&Ls(n),await l())}catch(F){y(F instanceof Error?F.message:c("gitStatusPullFailed"))}finally{C(!1)}}},[N,l,e,n,i,c]),X=a.useCallback(async()=>{if(!(!e||!r||N)){G(!0),j(null),R(null),d(null),p(null),k(null),y(null),I(null),V(null);try{const F=await he.pushGit(e);j(F),(F.status==="pushed"||F.status==="published"||F.status==="up-to-date")&&(n&&Ls(n),await l())}catch(F){R(F instanceof Error?F.message:c("gitStatusPushFailed"))}finally{G(!1)}}},[N,l,e,n,r,c]),J=v??na(m,c),Y=v||((m==null?void 0:m.status)??"checked")!=="checked"?"warning":m||t!=null&&t.checkedRemoteAt?"success":null,f=L??oa(x,c),O=L||x&&x.status!=="pulled"?"warning":x?"success":null,W=P??aa(S,c),T=P||S&&!["pushed","published","up-to-date"].includes(S.status)?"warning":S?"success":null,D=J||f||W,U=J?Y:f?O:W?T:null;return{supportsRemoteCheck:o,supportsPull:i,supportsPush:r,supportsIntegrationOptions:u,isRunning:N,isCheckingRemote:_,isPulling:g,isPushing:b,handleCheckRemote:te,handlePull:se,handlePush:X,checkedRemoteAt:(S==null?void 0:S.checkedRemoteAt)??(x==null?void 0:x.checkedRemoteAt)??(m==null?void 0:m.checkedRemoteAt)??(t==null?void 0:t.checkedRemoteAt)??null,checkFeedback:J,checkFeedbackTone:Y,pullFeedback:f,pullFeedbackTone:O,pushFeedback:W,pushFeedbackTone:T,actionFeedback:D,actionFeedbackTone:U,divergedActionStatus:A,integrationOptions:E,isLoadingIntegrationOptions:H,integrationOptionsError:M}}function sa(e,t,n){if(!e)return n("gitStatusRemoteUnknown");const o=Date.parse(e);if(!Number.isFinite(o))return e;const i=Math.max(0,t-o),r=60*1e3,u=60*r,l=24*u;return i<r?n("gitStatusRemoteJustNow"):i<u?n("gitStatusRemoteMinutesAgo",{count:Math.floor(i/r)}):i<l?n("gitStatusRemoteHoursAgo",{count:Math.floor(i/u)}):new Date(o).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function na(e,t){switch(e==null?void 0:e.status){case"checked":return t("gitStatusRemoteCheckSuccess");case"busy":return t("gitStatusRemoteCheckBusy");case"not-a-git-repo":return t("gitStatusRemoteCheckNotRepo");case"failed":return t("gitStatusRemoteCheckFailed");default:return""}}function oa(e,t){switch(e==null?void 0:e.status){case"pulled":return gn(e.commitsAdvanced)?e.commitsAdvanced===0?t("gitStatusPullAlreadyUpToDate"):t(e.commitsAdvanced===1?"gitStatusPullSuccessSingle":"gitStatusPullSuccessMultiple",{count:e.commitsAdvanced}):t("gitStatusPullSuccess");case"busy":return t("gitStatusPullBusy");case"not-a-git-repo":return t("gitStatusPullNotRepo");case"failed":return Jt(e.gitStatus)?t("gitStatusPullDiverged",{ahead:e.gitStatus.ahead,behind:e.gitStatus.behind}):t("gitStatusPullFailed");default:return""}}function aa(e,t){switch(e==null?void 0:e.status){case"pushed":return gn(e.commitsAdvanced)?t(e.commitsAdvanced===1?"gitStatusPushSuccessSingle":"gitStatusPushSuccessMultiple",{count:e.commitsAdvanced}):t("gitStatusPushSuccess");case"published":return t("gitStatusPushPublished");case"up-to-date":return t("gitStatusPushAlreadyUpToDate");case"busy":return t("gitStatusPushBusy");case"no-upstream":return t("gitStatusPushNoUpstream");case"rejected":return Jt(e.gitStatus)?t("gitStatusPushDiverged",{ahead:e.gitStatus.ahead,behind:e.gitStatus.behind}):t("gitStatusPushRejected");case"not-a-git-repo":return t("gitStatusPushNotRepo");case"failed":return t("gitStatusPushFailed");default:return""}}function gn(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Jt(e){return!!(e&&e.ahead>0&&e.behind>0)}function ia(e,t){return(e==null?void 0:e.status)==="failed"&&Jt(e.gitStatus)?e.gitStatus:(t==null?void 0:t.status)==="rejected"&&Jt(t.gitStatus)?t.gitStatus:null}function ns(e,t=!1){var m;const[n,o]=a.useState([]),[i,r]=a.useState([]),[u,l]=a.useState([]),c=a.useCallback(async()=>{if(!e){o([]),r([]),l([]);return}try{const d=await he.listReviewComments(e);o(d.comments),r(d.batches)}catch{}if(t)try{l(await he.listReviewSiteStates(e))}catch{}else l([])},[t,e]);return a.useEffect(()=>{if(e)return c(),lo(e,()=>{c()})},[e,c]),{pending:n.filter(d=>d.status==="pending"),archived:n.filter(d=>d.status==="archived"),batches:i,recentReviewSessionId:i.length>0?((m=i[i.length-1])==null?void 0:m.targetSessionId)??null:null,siteStates:u,refresh:c}}const ra={loading:!0,error:null,generation:null,headSha:null,baseSha:null,files:[],directories:[],truncated:!1,totalFiles:null};function ca(e,t){return e!==null&&e.tracked===t.tracked&&e.untracked===t.untracked&&e.ignored===t.ignored&&la(e.expandedPrefixes,t.expandedPrefixes)&&(e.filesystemScan??"bounded")===(t.filesystemScan??"bounded")}function la(e,t){return e===t||e!==void 0&&t!==void 0&&e.length===t.length&&e.every((n,o)=>n===t[o])}function ua(e){const t={tracked:!1,untracked:!1,ignored:!1},n=new Set;let o=!1,i=!1;for(const r of e)if(t.tracked||(t.tracked=r.coverage.tracked),t.untracked||(t.untracked=r.coverage.untracked),t.ignored||(t.ignored=r.coverage.ignored),i||(i=r.coverage.filesystemScan==="complete"),r.coverage.expandedPrefixes===void 0)o=!0;else for(const u of r.coverage.expandedPrefixes)n.add(u);return{...t,...o?{}:{expandedPrefixes:[...n].sort()},...i?{filesystemScan:"complete"}:{}}}function da(e){if(!e||typeof e!="object"||!("type"in e))return!1;const t=e.type;return t==="git-worktree-snapshot"||t==="git-worktree-delta"}function ha(e,t){return e!==null&&e.epoch===t.epoch&&t.sequence===e.sequence+1}class ma{constructor(t,n,o){Oe(this,"listeners",new Set);Oe(this,"leases",new Map);Oe(this,"files",new Map);Oe(this,"directories",new Map);Oe(this,"snapshot",ra);Oe(this,"stream",null);Oe(this,"activeCoverage",null);Oe(this,"nextLeaseId",1);Oe(this,"getSnapshot",()=>this.snapshot);Oe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));this.projectId=t,this.transport=n,this.onEmpty=o}retain(t){const n=this.nextLeaseId++;return this.leases.set(n,{coverage:{...t,...t.expandedPrefixes?{expandedPrefixes:[...t.expandedPrefixes]}:{}}}),this.syncStream(),()=>{var o;if(this.leases.delete(n)){if(this.leases.size===0){(o=this.stream)==null||o.close(),this.stream=null,this.activeCoverage=null,this.onEmpty();return}this.syncStream()}}}syncStream(){var o;const t=ua(this.leases.values());if(ca(this.activeCoverage,t)&&this.stream)return;(o=this.stream)==null||o.close(),this.activeCoverage=t;const n=Hn(this.transport,{subscribe:({transport:i,handlers:r})=>i.subscribeWorktree(this.projectId,t,r),onEvent:i=>{this.stream!==n||!da(i.data)||this.applyEvent(i.data)},onError:i=>{this.stream===n&&this.publish({...this.snapshot,loading:this.snapshot.generation===null,error:i})}},{autoStart:!1,inactivityTimeoutMs:In});this.stream=n,this.snapshot.generation===null&&this.publish({...this.snapshot,loading:!0,error:null}),n.start()}applyEvent(t){if(t.type==="git-worktree-snapshot"){this.applySnapshot(t);return}this.applyDelta(t)}applySnapshot(t){this.files.clear();for(const n of t.files)this.files.set(n.path,n);this.directories.clear();for(const n of t.directories??[])this.directories.set(n.path,n);this.publish({loading:!1,error:null,generation:t.generation,headSha:t.headSha,baseSha:t.baseSha,files:[...this.files.values()],directories:[...this.directories.values()],truncated:t.truncated,totalFiles:t.totalFiles??null})}applyDelta(t){var n,o;if(!ha(this.snapshot.generation,t.generation)){if(((n=this.snapshot.generation)==null?void 0:n.epoch)===t.generation.epoch&&t.generation.sequence<=this.snapshot.generation.sequence)return;(o=this.stream)==null||o.restart();return}for(const i of t.changes)i.changeType==="delete"?this.files.delete(i.path):i.file&&this.files.set(i.path,i.file);for(const i of t.directoryChanges??[])i.changeType==="delete"?this.directories.delete(i.path):i.directory&&this.directories.set(i.path,i.directory);this.publish({loading:!1,error:null,generation:t.generation,headSha:t.headSha,baseSha:t.baseSha,files:[...this.files.values()],directories:[...this.directories.values()],truncated:t.truncated??this.snapshot.truncated,totalFiles:t.totalFiles===void 0?this.snapshot.totalFiles:t.totalFiles})}publish(t){if(this.snapshot===t)return;this.snapshot=t;const n=Array.from(this.listeners);for(const o of n)o()}}const zt=new Map;function fa(e,t){return`${e}\0${t}`}function ga(e,t,n){const o=fa(e,t),i=zt.get(o);if(i)return i;let r;return r=new ma(t,n,()=>{zt.get(o)===r&&zt.delete(o)}),zt.set(o,r),r}const pa={loading:!1,error:null,generation:null,headSha:null,baseSha:null,files:[],directories:[],truncated:!1,totalFiles:null},_s=a.createContext(!1);function pn(e,t,n,o,i=!1,r=5e3){const u=ro(),l=a.useContext(_s),c=o??l,m=a.useMemo(()=>n?ga(u.sourceKey,e,u.transport):null,[n,e,u.sourceKey,u.transport]),{expandedPrefixes:d,filesystemScan:_,ignored:w,tracked:v,untracked:p}=t,x=d==null?void 0:d.join("\0");a.useEffect(()=>{if(!(!m||c))return m.retain({ignored:w,tracked:v,untracked:p,...x===void 0?{}:{expandedPrefixes:x===""?[]:x.split("\0")},..._===void 0?{}:{filesystemScan:_}})},[x,_,w,c,m,v,p]);const k=a.useSyncExternalStore((m==null?void 0:m.subscribe)??xa,(m==null?void 0:m.getSnapshot)??As,As),g=a.useRef({store:m,snapshot:k}),C=a.useRef(c),L=a.useRef(null),y=a.useRef(!1),[,S]=a.useState(0),j=C.current&&!c;C.current=c,(g.current.store!==m||!c&&(!i||j||y.current)||g.current.snapshot.generation===null)&&(g.current={store:m,snapshot:k},y.current=!1,L.current=null);const b=!c&&i&&g.current.snapshot!==k;return a.useEffect(()=>{if(!b){L.current=null;return}const G=Date.now();L.current??(L.current=G+r);const P=setTimeout(()=>{y.current=!0,L.current=null,S(R=>R+1)},Math.max(0,L.current-G));return()=>clearTimeout(P)},[r,b]),g.current.snapshot}function xa(){return()=>{}}function As(){return pa}const va="_revisionsHidden_1l9me_1",ba="_handleGlyph_1l9me_7",hs={revisionsHidden:va,handleGlyph:ba},Gt=0,Kt=420,Mt=220,_a=380,$s=16,Sa=12,wa=26;function Ds({layout:e,containerWidth:t,revisionWidth:n,gapWidth:o,handleWidth:i}){const r=e==="history"?n+o:0;return Math.max(Mt,Math.floor(t-r-o/2-i/2))}function ya({containerWidth:e,gapWidth:t,naturalDetailWidth:n,currentFilesWidth:o,defaultFilesWidth:i,filesMax:r}){const u=Math.min(o,i);return Vt(Math.floor(e-t-n),u,r)}function ys({layout:e,enabled:t=!0,revisionPaneVisible:n=!0,initialFilesWidth:o,naturalDetailWidth:i,className:r,children:u,t:l}){const c=a.useRef(null),m=a.useRef(n),d=a.useRef(300),_=a.useRef(!1),w=a.useRef(null),v=a.useRef(null),p=a.useRef(null),x=a.useRef(!1),k=o??(e==="history"?340:_a),[g,C]=a.useState(()=>({revisions:300,files:k})),[L,y]=a.useState(!n),[S,j]=a.useState(null),[b,G]=a.useState(null),P=L?0:g.revisions,R=b?Ds({layout:e,containerWidth:b.containerWidth,revisionWidth:P,gapWidth:b.gapWidth,handleWidth:b.handleWidth}):void 0;a.useEffect(()=>{m.current!==n&&(m.current=n,y(!n))},[n]),a.useLayoutEffect(()=>{const N=c.current;if(!N)return;const A=()=>{const te=getComputedStyle(N),se=Number.parseFloat(te.columnGap),X=N.querySelector(".source-pane-splitter-handle"),J={containerWidth:N.clientWidth,gapWidth:Number.isFinite(se)?se:Sa,handleWidth:(X==null?void 0:X.offsetWidth)||wa};J.containerWidth<=0||G(Y=>Y&&Y.containerWidth===J.containerWidth&&Y.gapWidth===J.gapWidth&&Y.handleWidth===J.handleWidth?Y:J)};if(A(),typeof ResizeObserver>"u")return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A);const K=new ResizeObserver(A);return K.observe(N),()=>K.disconnect()},[]),a.useLayoutEffect(()=>{R!==void 0&&C(N=>N.files<=R?N:{...N,files:R})},[R]),a.useLayoutEffect(()=>{e!=="files"||i===void 0||b===null||R===void 0||C(N=>{const A=ya({containerWidth:b.containerWidth,gapWidth:b.gapWidth,naturalDetailWidth:i,currentFilesWidth:N.files,defaultFilesWidth:k,filesMax:R});return A===N.files?N:{...N,files:A}})},[k,R,e,b,i]),a.useEffect(()=>{if(!S)return;const N=c.current;if(!N)return;const A=X=>{const J=X-S.startX;let Y;if(S.boundary==="revisions"){const f=Vt(S.startWidths.revisions+J,Gt,Kt),O=b?Math.min(S.startWidths.files,Ds({layout:e,containerWidth:b.containerWidth,revisionWidth:f,gapWidth:b.gapWidth,handleWidth:b.handleWidth})):S.startWidths.files;Y={revisions:f,files:O},f>0&&(d.current=f),N.classList.toggle(hs.revisionsHidden,f===0),N.style.setProperty("--source-revision-column-width",`${f}px`),N.style.setProperty("--source-files-column-width",`${O}px`)}else{const f=Vt(S.startWidths.files+J,Mt,R??S.startWidths.files);Y={...S.startWidths,files:f},N.style.setProperty("--source-files-column-width",`${f}px`)}p.current=Y},K=()=>{w.current=null;const X=v.current;v.current=null,X!==null&&A(X)},te=X=>{const J=X.clientX-S.startX;if(Math.abs(J)>3&&(_.current=!0),v.current=X.clientX,w.current===null){if(typeof window.requestAnimationFrame!="function"){K();return}w.current=window.requestAnimationFrame(K)}},se=()=>{w.current!==null&&(window.cancelAnimationFrame(w.current),w.current=null),K();const X=p.current??S.startWidths;C(X),S.boundary==="revisions"&&y(X.revisions===0),x.current=_.current,window.setTimeout(()=>{x.current=!1},0),p.current=null,j(null)};return window.addEventListener("pointermove",te),window.addEventListener("pointerup",se,{once:!0}),window.addEventListener("pointercancel",se,{once:!0}),document.body.classList.add("source-pane-resizing"),()=>{w.current!==null&&(window.cancelAnimationFrame(w.current),w.current=null),v.current=null,p.current=null,window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",se),window.removeEventListener("pointercancel",se),document.body.classList.remove("source-pane-resizing")}},[S,R,e,b]);const E=(N,A)=>{const K=Vt(A,N==="revisions"?Gt:Mt,N==="revisions"?Kt:R??g.files);N==="revisions"&&(K>0&&(d.current=K),y(K===0)),C(te=>({...te,[N]:K}))},I=(N,A)=>{if(N.button!==0)return;N.preventDefault(),_.current=!1,v.current=null;const K=A==="revisions"?{...g,revisions:P}:g;p.current=K,j({boundary:A,startX:N.clientX,startWidths:K})},H=()=>{if(x.current){x.current=!1;return}if(P===0){const N=d.current;C(A=>({...A,revisions:N})),y(!1);return}d.current=P,y(!0)},ee=(N,A)=>{if(A==="revisions"&&(N.key==="Enter"||N.key===" ")){N.preventDefault(),H();return}const K=A==="revisions"?P:g.files,te=A==="revisions"?Gt:Mt,se=A==="revisions"?Kt:R??K,X=N.key==="ArrowLeft"?K-$s:N.key==="ArrowRight"?K+$s:N.key==="Home"?te:N.key==="End"?se:null;X!==null&&(N.preventDefault(),E(A,X))},M={"--source-revision-column-width":`${P}px`,"--source-files-column-width":`${g.files}px`},V=e==="history"&&n?["revisions","files"]:["files"];return s.jsxs("div",{ref:c,className:`${r} ${e==="history"&&P===0?hs.revisionsHidden:""}`.trimEnd(),style:M,children:[u,t&&V.map(N=>s.jsxs("div",{className:`source-pane-splitter source-pane-splitter-${N} ${(S==null?void 0:S.boundary)===N?"dragging":""}`,children:[s.jsx("span",{className:"source-pane-splitter-guide","aria-hidden":"true"}),["top","bottom"].map(A=>s.jsx("hr",{className:`source-pane-splitter-handle ${hs.handleGlyph} ${A}`,"aria-label":l(N==="revisions"?"sourceResizeRevisionPane":"sourceResizeFilePane"),"aria-orientation":"vertical","aria-valuemin":N==="revisions"?Gt:Mt,"aria-valuemax":N==="revisions"?Kt:R,"aria-valuenow":N==="revisions"?P:g.files,title:N==="revisions"?l(P===0?"sourceShowRevisionPane":"sourceHideRevisionPane"):void 0,tabIndex:0,onPointerDown:K=>I(K,N),onClick:N==="revisions"?H:void 0,onKeyDown:K=>ee(K,N)},A))]},N))]})}function Vt(e,t,n){return Math.min(n,Math.max(t,e))}const Ca="_outline_g5nwk_1",ja="_group_g5nwk_8",ka="_groupButton_g5nwk_13",Na="_disclosure_g5nwk_36",Ra="_groupLabel_g5nwk_43",Ea="_groupStatuses_g5nwk_52",La="_groupCount_g5nwk_59",Ta="_children_g5nwk_70",Ma="_sectionDivider_g5nwk_77",Pa="_sectionDividerButton_g5nwk_101",Fa="_sectionDisclosure_g5nwk_115",Ke={outline:Ca,group:ja,groupButton:ka,disclosure:Na,groupLabel:Ra,groupStatuses:Ea,groupCount:La,children:Ta,sectionDivider:Ma,sectionDividerButton:Pa,sectionDisclosure:Fa};function os(e,t){const n=t==null?void 0:t.trim();if(!n)return null;const o=e.toLowerCase().indexOf(n.toLowerCase());if(o<0)return null;const i=o+n.length;return{start:o,end:i,prefix:e.slice(0,o),text:e.slice(o,i),suffix:e.slice(i)}}const Aa="_withMatch_rc7xr_1",$a="_matchPrefix_rc7xr_6",Da="_matchSuffix_rc7xr_7",Ba="_match_rc7xr_6",Oa="_wrapMatchOnNarrow_rc7xr_41",Nt={withMatch:Aa,matchPrefix:$a,matchSuffix:Da,match:Ba,wrapMatchOnNarrow:Oa};function bt({text:e,query:t,wrapMatchOnNarrow:n=!1,className:o,...i}){const r=os(e,t),u=[r?Nt.withMatch:"",r&&n?Nt.wrapMatchOnNarrow:"",o].filter(Boolean).join(" ");return r?s.jsxs("span",{...i,className:u,children:[r.prefix&&s.jsx("span",{className:Nt.matchPrefix,children:r.prefix}),s.jsx("mark",{className:Nt.match,children:r.text}),r.suffix&&s.jsx("span",{className:Nt.matchSuffix,children:r.suffix})]}):s.jsx("span",{...i,className:u,children:e})}const Ha="_path_yev28_1",Ia="_pathWithMatch_yev28_12",Ua="_reviewStates_yev28_31",Wa="_reviewState_yev28_31",za="_open_yev28_47",Ga="_addressed_yev28_51",Ka="_changed_yev28_55",qa="_unchanged_yev28_59",Va="_unavailable_yev28_60",nt={path:Ha,pathWithMatch:Ia,reviewStates:Ua,reviewState:Wa,open:za,addressed:Ga,changed:Ka,unchanged:qa,unavailable:Va};function as({path:e,children:t,...n}){const o=Zt(e);return s.jsx("button",{...n,...o,children:t})}function is({children:e,query:t,fullPath:n,className:o,...i}){const r=typeof e=="string"?e:null,u=[nt.path,r&&os(r,t)?nt.pathWithMatch:"",o].filter(Boolean).join(" ");return r?s.jsx(bt,{...i,className:u,"data-source-path":n??r,text:r,query:t,wrapMatchOnNarrow:!0}):s.jsx("span",{...i,className:u,children:e})}const Ya={M:"sourceFileStatusModified",A:"sourceFileStatusAdded",D:"sourceFileStatusDeleted",R:"sourceFileStatusRenamed",C:"sourceFileStatusCopied",T:"sourceFileStatusTypeChanged",U:"sourceFileStatusUnmerged","?":"sourceFileStatusUntracked"};function Ot({status:e,t}){const n=t(Ya[e]??"sourceFileStatusChanged"),o=`${e} — ${n}`,i=Zt(o);return s.jsx("span",{className:`git-status-badge git-status-${e.toLowerCase()}`,role:"img","aria-label":o,...i,children:e})}function xn({states:e,t}){if(e.length===0)return null;const n=e.filter(m=>m.state==="open").length,o=e.length-n,i=e.filter(m=>m.changeStatus==="changed").length,r=e.filter(m=>m.changeStatus==="unchanged").length,u=e.length-i-r,l=n>0?{label:t("sourceReviewStateOpen"),count:n,className:nt.open}:{label:t("sourceReviewStateAddressed"),count:o,className:nt.addressed},c=i>0?{label:t("sourceReviewSourceChanged"),count:i,className:nt.changed}:r>0?{label:t("sourceReviewSourceUnchanged"),count:r,className:nt.unchanged}:{label:t("sourceReviewSourceUnavailable"),count:u,className:nt.unavailable};return s.jsxs("span",{className:nt.reviewStates,children:[s.jsx(Bs,{...l,t}),s.jsx(Bs,{...c,t})]})}function Bs({label:e,count:t,className:n,t:o}){const i=o("sourceReviewSiteStateCount",{state:e,count:t}),r=Zt(i);return s.jsxs("span",{className:`${nt.reviewState} ${n}`,...r,children:[e," ",t]})}const Xa=14,Os=29,vn=[];function Ja(e){return Cs(bn(e,vn))}function Ss({children:e,expanded:t,onToggle:n}){return n?s.jsxs("button",{type:"button",className:`${Ke.sectionDivider} ${Ke.sectionDividerButton}`,"aria-expanded":t,onClick:n,children:[s.jsx("span",{className:Ke.sectionDisclosure,"aria-hidden":"true",children:t?"▾":"▸"}),s.jsx("span",{children:e})]}):s.jsx("div",{className:Ke.sectionDivider,children:s.jsx("span",{children:e})})}function Pt({items:e,directories:t=vn,expandedDirectories:n,onToggleDirectory:o,scopeKey:i,query:r,className:u,activeItemId:l,focusRequest:c=0,toggleAllOnEnter:m=!1,renderFile:d,t:_,onKeyDown:w,...v}){const p=a.useRef(null),x=a.useRef(0),k=a.useRef(null),g=a.useRef(new Map),[C,L]=a.useState({}),[y,S]=a.useState(Xa),j=((r==null?void 0:r.trim().length)??0)>0,b=a.useMemo(()=>j?e.map(P=>({kind:"file",item:P,visiblePath:P.displayPath,pathProps:Sn(P)})):Qa(e,t,i),[t,e,i,j]);a.useLayoutEffect(()=>{g.current.clear(),L({})},[]),a.useLayoutEffect(()=>{const P=p.current;if(!P)return;const R=ms(P),E=()=>{const H=(R==null?void 0:R.clientHeight)??P.clientHeight;H>0&&S(Math.max(1,Math.floor(H/Os)))};if(E(),typeof ResizeObserver>"u")return;const I=new ResizeObserver(E);return I.observe(R??P),()=>I.disconnect()},[]),a.useLayoutEffect(()=>{var M;const P=Yt(b).filter(V=>!V.directory);if(P.length===0)return;const R=p.current,E=R?((M=ms(R))==null?void 0:M.clientHeight)??R.clientHeight:0,I=E>0?Math.max(1,Math.floor(E/Os)):y;let H=Math.max(0,I-b.length),ee=!1;for(const V of P){if(g.current.has(V.key))continue;const N=V.children.length,A=N<=H;g.current.set(V.key,A),A&&(H-=N),ee=!0}ee&&L(V=>({...V}))},[y,b]),a.useLayoutEffect(()=>{if(c<=x.current||l===null||l===void 0||!e.some(R=>R.id===l))return;x.current=c,k.current=l;const P=Yt(b).filter(R=>!R.directory&&R.items.some(E=>E.id===l));P.length!==0&&L(R=>({...R,...Object.fromEntries(P.map(E=>[E.key,!0]))}))},[l,b,c,e]),a.useLayoutEffect(()=>{const P=k.current,R=p.current;if(!P||!R)return;const E=Array.from(R.querySelectorAll("[data-source-outline-id]")).find(H=>H.dataset.sourceOutlineId===P),I=E==null?void 0:E.closest("[data-source-list-item]");I&&(k.current=null,I.focus({preventScroll:!0}),ti(I,ms(R)))});const G=P=>{if(m&&P.key==="Enter"&&!P.altKey&&!P.ctrlKey&&!P.metaKey&&!P.shiftKey&&P.target instanceof HTMLElement&&P.target.closest("[data-source-list-item]")){if(P.preventDefault(),St(),P.repeat)return;const R=Yt(b).filter(I=>!I.directory),E=R.some(I=>!(C[I.key]??g.current.get(I.key)??!1));R.length>0&&L(I=>({...I,...Object.fromEntries(R.map(H=>[H.key,E||H.items.some(ee=>ee.id===l)]))}));return}w==null||w(P)};return s.jsx("ul",{...v,ref:p,className:[Ke.outline,u].filter(Boolean).join(" "),onKeyDown:G,children:wn(b,C,g.current,(P,R)=>L(E=>({...E,[P]:!R})),n,o,d,_)})}function Qa(e,t,n){return _n(bn(e,t),"",n)}function bn(e,t){const n={files:[],directories:new Map};for(const o of e){const i=o.path.split("/").filter(Boolean);if(i.length<=1){n.files.push(o);continue}let r=n;for(const u of i.slice(0,-1)){let l=r.directories.get(u);l||(l={files:[],directories:new Map},r.directories.set(u,l)),r=l}r.files.push(o)}for(const o of t){const i=o.path.split("/").filter(Boolean);if(i.length===0)continue;let r=n;for(const u of i){let l=r.directories.get(u);l||(l={files:[],directories:new Map},r.directories.set(u,l)),r=l}r.directory=o}return n}function _n(e,t,n){const o=e.files.map(i=>({kind:"file",item:i,visiblePath:Za(i,t),pathProps:Sn(i)}));for(const[i,r]of e.directories){let u=r,l=`${t}${i}/`;for(;!u.directory&&u.files.length===0&&u.directories.size===1;){const m=u.directories.entries().next().value;if(!m)break;l+=`${m[0]}/`,u=m[1]}const c=Cs(u);o.push({kind:"group",key:`${n}\0${l}`,path:l,items:c,children:_n(u,l,n),statuses:ei(c),count:u.directory?u.files.length:c.length,...u.directory?{directory:u.directory}:{}})}return o}function Sn(e){return{"data-source-outline-id":e.id,"data-source-outline-path":e.displayPath}}function Za(e,t){return t?e.displayPath.split(" → ").map(n=>n.startsWith(t)?n.slice(t.length):n).join(" → "):e.displayPath}function Cs(e){return[...e.files,...Array.from(e.directories.values()).flatMap(Cs)]}function ei(e){const t=[],n=new Set;for(const o of e)for(const i of o.statuses??[])n.has(i)||(n.add(i),t.push(i));return t}function Yt(e){return e.flatMap(t=>t.kind==="group"?[t,...Yt(t.children)]:[])}function wn(e,t,n,o,i,r,u,l){return e.map(c=>{var v,p,x,k;if(c.kind==="file")return u(c.item,c.visiblePath,c.pathProps);const m=!!(c.directory&&i&&r),d=m&&c.directory?(i==null?void 0:i.has(c.directory.path))===!0:t[c.key]??n.get(c.key)??!1,_=((v=c.directory)==null?void 0:v.pending)===!0&&d,w=c.directory?l(_?"sourceLoadingUntrackedFolder":d?"sourceCollapseDirectory":"sourceExpandDirectory",{path:c.path}):l(d?"sourceCollapsePathGroup":"sourceExpandPathGroup",{path:c.path,count:c.count});return s.jsxs("li",{className:Ke.group,children:[s.jsxs("button",{type:"button",className:Ke.groupButton,"data-source-list-item":!0,"aria-expanded":d,"aria-label":w,title:w,onClick:()=>{m&&c.directory&&r?r(c.directory.path,!d):o(c.key,d)},children:[s.jsx("span",{className:Ke.disclosure,"aria-hidden":"true",children:_?"…":d?"▾":"▸"}),s.jsx("span",{className:Ke.groupLabel,children:c.path}),c.statuses.length>0&&s.jsx("span",{className:Ke.groupStatuses,children:c.statuses.map(g=>s.jsx(Ot,{status:g,t:l},g))}),!((p=c.directory)!=null&&p.pending)&&s.jsxs("span",{className:Ke.groupCount,title:(x=c.directory)!=null&&x.truncated?l("sourceUntrackedFolderTruncated",{count:c.count}):void 0,children:[c.count,(k=c.directory)!=null&&k.truncated?"+":""]})]}),d&&c.children.length>0&&s.jsx("ul",{className:Ke.children,children:wn(c.children,t,n,o,i,r,u,l)})]},c.key)})}function ms(e){let t=e;for(;t;){const n=getComputedStyle(t).overflowY;if(n==="auto"||n==="scroll")return t;t=t.parentElement}return e.parentElement}function ti(e,t){if(!t)return;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();n.top<o.top?t.scrollTop-=o.top-n.top:n.bottom>o.bottom&&(t.scrollTop+=n.bottom-o.bottom)}class yn{constructor(t){Oe(this,"normalized");Oe(this,"queryCache",new Map);this.files=t,this.normalized=t.map(n=>n.toLowerCase())}search(t){const n=t.trim().toLowerCase();if(!n)return this.files;let o=this.queryCache.get(n);return o||(o=(this.longestCachedPrefix(n)??Array.from({length:this.files.length},(r,u)=>u)).filter(r=>{var u;return(u=this.normalized[r])==null?void 0:u.includes(n)}),this.queryCache.set(n,o)),o.map(i=>this.files[i])}longestCachedPrefix(t){for(let n=t.length-1;n>0;n--){const o=this.queryCache.get(t.slice(0,n));if(o)return o}return null}}const si="_inventory_o49d4_1",ni="_sectionControls_o49d4_5",oi="_sectionToggle_o49d4_15",ai="_activeSectionToggle_o49d4_36",ii="_truncated_o49d4_42",ri="_detail_o49d4_69",ci="_detailModes_o49d4_88",li="_activeMode_o49d4_116",Je={inventory:si,sectionControls:ni,sectionToggle:oi,activeSectionToggle:ai,truncated:ii,detail:ri,detailModes:ci,activeMode:li},ui="_root_1k07w_7",di="_header_1k07w_15",hi="_pathGroup_1k07w_27",mi="_path_1k07w_27",fi="_pathCopy_1k07w_45",gi="_lines_1k07w_50",pi="_run_1k07w_58",xi="_scrollable_1k07w_63",vi="_row_1k07w_67",bi="_hasReviewComment_1k07w_88",_i="_gutter_1k07w_92",Si="_commitLink_1k07w_106",wi="_authorColored_1k07w_113",yi="_uncommitted_1k07w_126",Ci="_gutterLoading_1k07w_130",ji="_lineNumber_1k07w_135",ki="_code_1k07w_156",Ni="_truncated_1k07w_176",Ri="_provenanceStatus_1k07w_182",Ei="_provenanceError_1k07w_188",Li="_contentError_1k07w_189",Se={root:ui,header:di,pathGroup:hi,path:mi,pathCopy:fi,lines:gi,run:pi,scrollable:xi,row:vi,hasReviewComment:bi,gutter:_i,commitLink:Si,authorColored:wi,uncommitted:yi,gutterLoading:Ci,lineNumber:ji,code:ki,truncated:Ni,provenanceStatus:Ri,provenanceError:Ei,contentError:Li},Ti=68,Mi=44,Pi=2,Fi=128,Ai=320,mt=new Map;function $i({projectId:e,path:t,lines:n,typography:o}){let i=2166136261,r=0;for(const u of n){for(let l=0;l<u.length;l+=1)i^=u.charCodeAt(l),i=Math.imul(i,16777619);i^=10,i=Math.imul(i,16777619),r+=u.length+1}return`${e}\0${t}\0${n.length}:${r}:${i>>>0}\0${o}`}function Di(e,t=0){const n=getComputedStyle(e);return[n.fontFamily,n.fontSize,n.lineHeight,n.fontWeight,n.fontStretch,n.fontVariationSettings,n.letterSpacing,n.getPropertyValue("tab-size"),t].join("|")}function Bi(e,t){const n=mt.get(e);if(n!==void 0)return mt.delete(e),mt.set(e,n),n;const o=Math.max(0,Math.ceil(t()));for(mt.set(e,o);mt.size>Fi;){const i=mt.keys().next().value;if(i===void 0)break;mt.delete(i)}return o}function Oi(e,t){var c,m;const n=Array.from(e.querySelectorAll("[data-blame-code]")),o=Bi(t,()=>n.reduce((d,_)=>Math.max(d,Hi(_)),0)),i=e.querySelector("[data-blame-row]"),r=((c=i==null?void 0:i.querySelector("[data-blame-gutter]"))==null?void 0:c.offsetWidth)||Ti,u=((m=i==null?void 0:i.querySelector("[data-blame-lineno]"))==null?void 0:m.offsetWidth)||Mi,l=e.offsetWidth-e.clientWidth||Pi;return Math.max(Ai,Math.ceil(r+u+o+l))}function Hi(e){var o;const t=document.createRange();t.selectNodeContents(e);const n=((o=t.getBoundingClientRect)==null?void 0:o.call(t).width)??0;return t.detach(),n>0?n:e.scrollWidth}const _t=360;function Ii(e,t){const n=[];return e.forEach((o,i)=>{var m;const r=((m=t==null?void 0:t[i])==null?void 0:m.line)===i+1?t[i]:void 0,u=r?`${r.uncommitted?"uncommitted":"sha"}:${r.sha}`:`unknown:${i}`,l={content:o,index:i,line:r},c=n.at(-1);(c==null?void 0:c.identity)===u?c.rows.push(l):n.push({identity:u,key:`${u}:${i}`,rows:[l]})}),n}function Cn(e){return`${e.author}\0${e.authorColorSeed??""}`}function Ui(e){const t=new Map;for(const u of e){if(u.uncommitted)continue;const l=Cn(u);t.has(l)||t.set(l,u.authorColorSeed??Gi(u.author))}if(t.size<=1)return new Map;const n=[...t].sort(([u,l],[c,m])=>l-m||u.localeCompare(c)),o=new Map,i=[],r=new Set;for(const[u,l]of n){const c=zi(l,_t);if(r.size===_t){o.set(u,c);continue}const m=Array.from({length:_t},(v,p)=>p).filter(v=>!r.has(v));let d=m[0]??c,_=-1,w=Number.POSITIVE_INFINITY;for(const v of m){const p=i.length===0?_t:Math.min(...i.map(k=>Hs(v,k))),x=Hs(v,c);(p>_||p===_&&x<w)&&(d=v,_=p,w=x)}o.set(u,d),i.push(d),r.add(d)}return o}function Hs(e,t){const n=Math.abs(e-t);return Math.min(n,_t-n)}function Wi(e){return 360/_t*e}function zi(e,t){return(Math.round(e)%t+t)%t}function Gi(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Dt({projectId:e,path:t,rev:n,onOpenCommit:o,onToggleBlame:i,onContentWidthChange:r,captureReviewProjections:u=!1,t:l}){const[c,m]=a.useState(null),[d,_]=a.useState(null),[w,v]=a.useState(!0),[p,x]=a.useState(!0),[k,g]=a.useState(null),[C,L]=a.useState(null),[y,S]=a.useState(null),[j,b]=a.useState(0),G=a.useRef(null),P=Bt(l),{pending:R,defaultSession:E,busy:I,error:H,addToReview:ee,submitNow:M}=uo(e,t,u);a.useEffect(()=>{let T=!1;return v(!0),x(!0),g(null),L(null),m(null),_(null),S(null),n?v(!1):he.getFile(e,t,!1).then(U=>{T||(m(U),v(!1))}).catch(U=>{T||(g(U instanceof Error?U.message:l("fileViewerLoadFailed")),v(!1))}),(n?he.getGitBlame(e,t,n):he.getGitBlame(e,t)).then(U=>{T||(_(U),x(!1))}).catch(U=>{T||(L(U instanceof Error?U.message:l("sourceBlameLoadFailed")),x(!1))}),()=>{T=!0}},[e,t,n,l]);const V=a.useMemo(()=>d!=null&&d.highlightedHtml?Qi(d.highlightedHtml):null,[d]),N=a.useMemo(()=>(c==null?void 0:c.content)!==void 0?Xi(c.content):(d==null?void 0:d.lines.map(T=>T.content))??[],[d==null?void 0:d.lines,c==null?void 0:c.content]),A=a.useMemo(()=>Ii(N,d==null?void 0:d.lines),[d==null?void 0:d.lines,N]),K=a.useMemo(()=>Ui((d==null?void 0:d.lines)??[]),[d==null?void 0:d.lines]),te=`calc(${Math.max(1,String(N.length).length)}ch + 0.65rem)`;a.useEffect(()=>{const T=new MutationObserver(()=>{b(D=>D+1)});return T.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]}),()=>T.disconnect()},[]),a.useLayoutEffect(()=>{const T=G.current;if(!T||w||!r)return;const D=Di(T.querySelector("[data-blame-code]")??T,j),U=V?`highlight:${(d==null?void 0:d.highlightedLanguage)??"unknown"}`:"plain",F=$i({projectId:e,path:t,lines:N,typography:`${D}|${U}`});r(t,Oi(T,F))},[d==null?void 0:d.highlightedLanguage,V,N,w,r,t,e,j]);const se=a.useMemo(()=>{const T=new Set;for(const D of R){if(D.anchor.side!=="new"||D.anchor.newLine===null)continue;const U=d==null?void 0:d.lines[D.anchor.newLine-1];if(!U||U.line!==D.anchor.newLine)continue;(D.anchor.revision.kind==="uncommitted"?U.uncommitted:!U.uncommitted&&D.anchor.revision.kind==="sha"&&D.anchor.revision.sha===U.sha)&&T.add(D.anchor.newLine)}return T},[d==null?void 0:d.lines,R]),X=a.useCallback(T=>[{label:l("sourceOpenCommit"),disabled:T.uncommitted||!o,onSelect:()=>{T.uncommitted||o==null||o(T.sha)}},{label:l("sourceCopyCommitHash"),onSelect:()=>{rt(T.sha)}}],[o,l]),J=T=>S({index:T}),Y=T=>{if(!d)return null;const D=d.lines[T];if(!D)return null;const{snippet:U,offset:F}=Is(d.lines,T);return{path:t,revision:D.uncommitted?{kind:"uncommitted",savedAt:new Date().toISOString()}:{kind:"sha",sha:D.sha},side:"new",oldLine:null,newLine:D.line,snippet:U,snippetAnchorOffset:F,...u?{projection:{...n?{kind:"revision",revision:d.rev}:{kind:"worktree"},path:t,side:"new"}}:{}}},f=y&&d?d.lines[y.index]:null,O=T=>A.map(D=>{var F;const U=D.rows.filter(({index:me})=>T==="all"?!0:T==="before"?y!==null&&me<=y.index:y!==null&&me>y.index);return U.length===0?null:s.jsx("div",{className:`${Se.run} ${(F=U[0])!=null&&F.line?Se.scrollable:""}`,children:U.map(({content:me,index:re,line:le})=>{const ye=re+1,ae=le?X(le):[],ue=le?K.get(Cn(le)):void 0,ce=ue===void 0?void 0:{"--blame-author-hue":`${Wi(ue)}deg`};return s.jsxs("div",{"data-blame-row":"",className:`${Se.row} ${se.has(ye)?`${Se.hasReviewComment} has-review-comment`:""}`,children:[le!=null&&le.uncommitted?s.jsx("span",{className:`${Se.gutter} ${Se.uncommitted}`,"data-blame-gutter":"uncommitted",title:l("sourceBlameNotCommitted"),children:"·····"}):le?s.jsx("button",{type:"button",className:`${Se.gutter} ${Se.commitLink} ${ue===void 0?"":Se.authorColored}`,"data-blame-gutter":"commit",style:ce,title:Yi(le),...P.targetProps(ae,()=>o?o(le.sha):void rt(le.sha)),children:le.shortSha.slice(0,5)}):s.jsx("span",{className:`${Se.gutter} ${Se.gutterLoading}`,"data-blame-gutter":"loading",title:l("sourceBlameLoading"),children:"·····"}),s.jsx("button",{type:"button",className:Se.lineNumber,"data-blame-lineno":"",disabled:!le,onClick:()=>J(re),children:ye}),s.jsx(qi,{content:me,highlightedHtml:V==null?void 0:V[re],enabled:!!le,onOpen:()=>J(re)})]},ye)})},`${D.key}:${T}`)}),W=y&&f&&d?s.jsx(ho,{projectId:e,anchorLabel:`${t}:${f.line}`,snippet:Is(d.lines,y.index).snippet,busy:I,error:H,onCancel:()=>S(null),onAddToReview:async T=>{const D=Y(y.index);D&&await ee(D,T)&&S(null)},defaultSession:E,onSubmit:async(T,D)=>{const U=Y(y.index);if(!U)return;await M(U,T,D,l("sourceReviewSubmitQueued"),D==="new"?E==null?void 0:E.newSession:void 0)==="navigated"&&S(null)},t:l},y.index):null;return w&&!d?s.jsx("section",{className:`blame-view ${Se.root}`,children:s.jsx("div",{className:"git-diff-loading",children:l("gitStatusLoading")})}):k&&C&&!d?s.jsx("section",{className:`blame-view ${Se.root}`,children:s.jsx("div",{className:"git-diff-error",children:k})}):s.jsxs("section",{className:`blame-view ${Se.root}`,ref:G,children:[s.jsxs("div",{className:Se.header,children:[s.jsxs("span",{className:Se.pathGroup,"data-blame-path-group":"",children:[s.jsx("span",{className:Se.path,title:t,children:t}),s.jsx(Xt,{value:t,title:l("sourceCopyPath"),className:`source-detail-action source-detail-icon-action ${Se.pathCopy}`,icon:"path"})]}),s.jsx(fo,{projectId:e,path:t,rev:n,dirtyLabel:l("fileRevisionDirty"),uncommittedLabel:l("fileRevisionUncommitted")}),i&&s.jsx("button",{type:"button",className:"source-detail-action source-detail-icon-action active",title:l("sourceToggleBlame"),"aria-label":l("sourceToggleBlame"),"aria-pressed":"true",onClick:i,children:s.jsx(Ki,{})}),p&&s.jsx("span",{className:Se.provenanceStatus,role:"status",children:l("sourceBlameLoading")}),s.jsx(Xt,{value:(c==null?void 0:c.content)??"",title:l("sourceCopyRawContent"),className:"source-detail-action source-detail-icon-action",disabled:(c==null?void 0:c.content)===void 0||!c.metadata.isText,icon:"content"})]}),k&&s.jsx("div",{className:`git-diff-error ${Se.contentError}`,children:k}),C&&s.jsx("div",{className:Se.provenanceError,role:"status",children:l("sourceBlameUnavailable")}),c&&!c.metadata.isText&&!d&&s.jsx("div",{className:"git-status-empty",children:l("fileViewerBinary")}),s.jsx("div",{className:Se.lines,style:{"--blame-line-number-column-width":te},children:s.jsx(go,{before:O(y?"before":"all"),editor:W,after:y?O("after"):null})}),P.menu,((d==null?void 0:d.truncated)||(c==null?void 0:c.contentTruncated))&&s.jsx("div",{className:Se.truncated,children:l("sourceBlameTruncated")})]})}function Ki(){return s.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7"}),s.jsx("path",{d:"M3 4v5h5"}),s.jsx("path",{d:"M12 7v5l3 2"})]})}function qi({content:e,highlightedHtml:t,enabled:n,onOpen:o}){const i={className:`${Se.code} blame-line-target`,"data-blame-code":"",role:n?"button":void 0,tabIndex:n?0:void 0,onClick:r=>{n&&!Vi(r.currentTarget)&&o(r.currentTarget)},onKeyDown:r=>{!n||r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),o(r.currentTarget))}};return t?s.jsx("span",{...i,dangerouslySetInnerHTML:{__html:t}}):s.jsx("span",{...i,children:e||" "})}function Vi(e){const t=window.getSelection();return!!(t&&!t.isCollapsed&&t.toString().length>0&&t.containsNode(e,!0))}function Yi(e){const t=Ji(e.authorTime);return[e.sha,e.author,t,e.summary].filter(Boolean).join(" · ")}function Xi(e){if(!e)return[];const t=e.split(`
|
|
2
2
|
`);return e.endsWith(`
|
|
3
3
|
`)&&t.pop(),t}function Ji(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Is(e,t,n=mo){const o=Math.max(0,t-n),i=Math.min(e.length,t+n+1);return{snippet:e.slice(o,i).map(u=>u.content).join(`
|
|
4
4
|
`),offset:t-o}}function Qi(e){if(typeof DOMParser>"u")return[];const n=new DOMParser().parseFromString(e,"text/html").querySelectorAll("code .line");return Array.from(n).map(o=>o.innerHTML)}const Zi={tracked:!0,untracked:!0,ignored:!0};function jn({projectId:e,isWideScreen:t,initialPath:n,status:o,supportsWorkingTreeFiles:i=!1,supportsWorktreeSections:r=!1,supportsCompleteFilesystemScan:u=!1,onOpenCommit:l,captureReviewProjections:c=!1,t:m}){var ie;const[d,_]=a.useState([]),[w,v]=a.useState([]),[p,x]=a.useState(Zi),[k,g]=a.useState([]),[C,L]=a.useState(!1),y=a.useRef(e),S=y.current===e?k:[],j=y.current===e&&C,b=r&&(o==null?void 0:o.isGitRepo)===!1,G=a.useMemo(()=>({...p,...b?{expandedPrefixes:S}:{},...b&&u&&j?{filesystemScan:"complete"}:{}}),[j,p,S,b,u]),[P,R]=a.useState(!1),E=a.useRef(null),I=a.useCallback(()=>{R(!0),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{E.current=null,R(!1)},200)},[]);a.useEffect(()=>()=>{E.current&&clearTimeout(E.current)},[]),a.useEffect(()=>{y.current!==e&&(y.current=e,g([]),L(!1))},[e]);const H=pn(e,G,r,void 0,P),[ee,M]=a.useState(!1),[V,N]=a.useState("contents"),[A,K]=a.useState(!0),[te,se]=a.useState(null),[X,J]=a.useState(""),[Y,f]=a.useState(n??null),[O,W]=a.useState(null),T=a.useRef(null),D=Bt(m);cn(T);const{pending:U}=ns(e),F=a.useMemo(()=>{const $=new Map;for(const de of U)$.set(de.anchor.path,($.get(de.anchor.path)??0)+1);return $},[U]);a.useEffect(()=>{if(r)return;let $=!1;return K(!0),se(null),_([]),v([]),M(!1),f(ne=>n??ne),(i?he.listGitWorkingTreeFiles(e,r?p:void 0).then(ne=>({files:ne.files.map(ge=>ge.path),workingTreeFiles:ne.files,truncated:ne.truncated})):he.listGitFiles(e).then(ne=>({files:ne.files,workingTreeFiles:[],truncated:ne.truncated}))).then(ne=>{$||(_(ne.files),v(ne.workingTreeFiles),M(ne.truncated),K(!1))}).catch(ne=>{$||(se(ne instanceof Error?ne.message:String(ne)),K(!1))}),()=>{$=!0}},[p,e,n,i,r]);const me=a.useMemo(()=>r?H.files.filter($=>$.present!==!1&&p[Rt($)??"untracked"]):w,[p,H.files,r,w]),re=a.useMemo(()=>r?me.map($=>$.path):d,[me,d,r]),le=r?H.loading:A,ye=r?((ie=H.error)==null?void 0:ie.message)??null:te,ae=r?H.truncated:ee,ue=b?H.directories:[],ce=a.useMemo(()=>new yn(re),[re]),fe=a.useMemo(()=>ce.search(X),[ce,X]),Pe=a.useMemo(()=>new Map(me.map($=>[$.path,$])),[me]),Fe=a.useMemo(()=>{var de;const $=new Map;if(r)for(const ne of H.files){const ge=(de=ne.worktreeChanges)==null?void 0:de.at(-1);ge&&$.set(ne.path,ge.status)}else for(const ne of(o==null?void 0:o.files)??[])$.set(ne.path,ne.status);return $},[H.files,o==null?void 0:o.files,r]),ke=a.useMemo(()=>fe.filter($=>Rt(Pe.get($))==="tracked"),[fe,Pe]),Ee=a.useMemo(()=>fe.filter($=>Rt(Pe.get($))==="untracked"),[fe,Pe]),_e=a.useMemo(()=>fe.filter($=>Rt(Pe.get($))==="ignored"),[fe,Pe]),$e=Y?Pe.get(Y):void 0;a.useEffect(()=>{Y!==null&&N("contents")},[Y]),a.useEffect(()=>{!t||le||ye||fe.length===0||f($=>$&&fe.includes($)?$:fe[0]??null)},[ye,le,fe,t]);const Ne=a.useCallback($=>[{label:m("sourceOpenFile"),onSelect:()=>f($)},{label:m("sourceCopyPath"),onSelect:()=>{rt($)}}],[m]),Le=a.useCallback(($,de)=>{W({path:$,width:de})},[]),je=(O==null?void 0:O.path)===Y?O.width:void 0,Ae=a.useCallback($=>{x(de=>({...de,[$]:!de[$]}))},[]),Te=a.useMemo(()=>new Set(S),[S]),Ve=a.useCallback(($,de)=>{g(ne=>{if(!de)return ne.filter(we=>we!==$&&!we.startsWith(`${$}/`));const ge=new Set(ne),be=$.split("/");for(let we=1;we<=be.length;we+=1)ge.add(be.slice(0,we).join("/"));return[...ge].sort((we,Ye)=>{const ot=we.split("/").length-Ye.split("/").length;return ot!==0?ot:we.localeCompare(Ye)})})},[]),z=($,de=$,ne)=>{const ge=F.get($)??0,be=Ne($),we=Pe.get($),Ye=Fe.get($)??(Rt(we)==="untracked"?"?":void 0);return s.jsxs("li",{className:`commit-file-row ${Ft}`,children:[s.jsxs(as,{path:$,type:"button",className:`blame-file-item ${Y===$?"selected":""}`,"data-source-list-item":!0,onFocus:()=>{t&&f($)},...D.targetProps(be,()=>{f($)}),children:[s.jsx(is,{...ne,query:X,fullPath:$,children:de}),Ye&&s.jsx(Ot,{status:Ye,t:m}),ge>0&&s.jsx("span",{className:"source-comment-badge",title:m("sourceCommentCount",{count:ge}),children:ge})]}),s.jsx(At,{actions:be,label:m("sourceMoreActions"),onOpen:D.openFromButton})]},$)};return s.jsxs("div",{className:"blame-browser",children:[s.jsxs(ys,{layout:"files",initialFilesWidth:340,naturalDetailWidth:t?je:void 0,className:"blame-browser-columns",t:m,children:[s.jsxs("div",{className:"blame-file-column",onPointerMove:r?I:void 0,children:[r&&s.jsx(er,{coverage:p,onToggle:Ae,t:m}),s.jsxs("div",{className:"source-search-field",children:[s.jsx("input",{ref:T,type:"search",className:"source-search-input",value:X,placeholder:m("sourceFilterFiles"),"aria-keyshortcuts":"/",onKeyDown:$=>{$.key==="Escape"&&X&&($.preventDefault(),J(""))},onChange:$=>J($.target.value)}),s.jsx("kbd",{className:"source-search-shortcut",children:"/"})]}),le?s.jsx("div",{className:"git-diff-loading",children:m("gitStatusLoading")}):ye?s.jsx("div",{className:"git-diff-error",children:ye}):i?s.jsx(tr,{trackedFiles:ke,untrackedFiles:Ee,ignoredFiles:_e,directories:ue,coverage:p,sectionsEnabled:r,onToggle:Ae,...b?{expandedDirectories:Te,onToggleDirectory:Ve}:{},scopeKey:e,query:X,truncated:ae,totalFiles:H.totalFiles,onShowAll:b&&u&&!j&&H.totalFiles!==null&&H.totalFiles>H.files.length?()=>L(!0):void 0,renderFile:z,t:m}):fe.length===0?s.jsx("div",{className:"git-status-empty",children:m("sourceNoFiles")}):s.jsx("ul",{className:"blame-file-list",onKeyDown:yt,children:fe.map($=>z($))})]}),t&&Y&&(i?s.jsx(Us,{projectId:e,path:Y,tracked:($e==null?void 0:$e.tracked)??!1,mode:V,onModeChange:N,onOpenCommit:l,captureReviewProjections:c,t:m}):s.jsx(Dt,{projectId:e,path:Y,onOpenCommit:l,captureReviewProjections:c,onContentWidthChange:Le,t:m}))]}),D.menu,!t&&Y&&s.jsx(wt,{title:Y,onClose:()=>f(null),closeOnBackGesture:!0,children:i?s.jsx(Us,{projectId:e,path:Y,tracked:($e==null?void 0:$e.tracked)??!1,mode:V,onModeChange:N,onOpenCommit:l,captureReviewProjections:c,t:m}):s.jsx(Dt,{projectId:e,path:Y,onOpenCommit:l,captureReviewProjections:c,t:m})})]})}function er({coverage:e,onToggle:t,t:n}){const o=[{kind:"tracked",label:n("sourceTrackedFiles")},{kind:"untracked",label:n("sourceUntrackedFiles")},{kind:"ignored",label:n("sourceIgnoredFiles")}];return s.jsx("fieldset",{className:Je.sectionControls,"aria-label":n("sourceWorkingTreeSections"),children:o.map(({kind:i,label:r})=>s.jsxs("button",{type:"button",className:`${Je.sectionToggle} ${e[i]?Je.activeSectionToggle:""}`,"aria-pressed":e[i],onClick:()=>t(i),children:[s.jsx("span",{"aria-hidden":"true",children:e[i]?"●":"○"}),r]},i))})}function tr({trackedFiles:e,untrackedFiles:t,ignoredFiles:n,directories:o,coverage:i,sectionsEnabled:r,onToggle:u,expandedDirectories:l,onToggleDirectory:c,scopeKey:m,query:d,truncated:_,totalFiles:w,onShowAll:v,renderFile:p,t:x}){const k=d.trim().length>0,g=(L,y,S=[])=>s.jsx(Pt,{className:"blame-file-list",items:L.map(j=>({id:j,path:j,displayPath:j,value:j})),directories:S,...l&&c?{expandedDirectories:l,onToggleDirectory:c}:{},scopeKey:`${m}:${y}`,query:d,renderFile:(j,b,G)=>p(j.value,b,G),t:x}),C=[{kind:"tracked",label:x("sourceTrackedFiles"),files:e},{kind:"untracked",label:x("sourceUntrackedFiles"),files:t},{kind:"ignored",label:x("sourceIgnoredFiles"),files:n}];return r?s.jsxs("div",{className:Je.inventory,onKeyDown:yt,children:[C.map(({kind:L,label:y,files:S})=>s.jsxs("div",{children:[s.jsx(Ss,{expanded:i[L],onToggle:()=>u(L),children:y}),i[L]&&(S.length>0||L==="untracked"&&o.length>0)&&g(S,L,L==="untracked"?o:[])]},L)),_&&!k&&s.jsxs("div",{className:Je.truncated,role:"status",children:[s.jsx("span",{"aria-hidden":"true",children:"…"}),v&&w!==null?s.jsx("button",{type:"button",onClick:v,children:x("sourceWorkingTreeShowAll",{count:w})}):w!==null?x("sourceWorkingTreeFilesIncomplete",{count:w}):x("sourceWorkingTreeFilesTruncated",{count:e.length+t.length+n.length})]})]}):s.jsxs("div",{className:Je.inventory,onKeyDown:yt,children:[e.length>0&&g(e,"tracked"),t.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ss,{children:x("sourceUntrackedFiles")}),g(t,"untracked")]})]})}function Rt(e){return(e==null?void 0:e.kind)??(e?e.tracked?"tracked":"untracked":void 0)}function Us({projectId:e,path:t,tracked:n,mode:o,onModeChange:i,onOpenCommit:r,captureReviewProjections:u,t:l}){const c=n?o:"contents";return s.jsxs("section",{className:Je.detail,children:[n&&s.jsxs("fieldset",{className:Je.detailModes,"aria-label":l("sourceViewMode"),children:[s.jsx("button",{type:"button",className:c==="contents"?Je.activeMode:"","aria-pressed":c==="contents",onClick:()=>i("contents"),children:l("sourceViewContents")}),s.jsx("button",{type:"button",className:c==="blame"?Je.activeMode:"","aria-pressed":c==="blame",onClick:()=>i("blame"),children:l("sourceViewBlame")})]}),c==="blame"?s.jsx(Dt,{projectId:e,path:t,onOpenCommit:r,captureReviewProjections:u,t:l}):s.jsx(bs,{projectId:e,filePath:t})]})}function fs(){try{const e=localStorage.getItem(on.commitReadWatermarks);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[o,i]of Object.entries(t))typeof i=="string"&&(n[o]=i);return n}catch{return{}}}function sr(e){try{localStorage.setItem(on.commitReadWatermarks,JSON.stringify(e))}catch{}}function nr(e){const[t,n]=a.useState(()=>fs()[e]??null);a.useEffect(()=>{n(fs()[e]??null)},[e]);const o=a.useCallback(l=>{n(l);const c=fs();l?c[e]=l:delete c[e],sr(c)},[e]),i=a.useCallback(l=>{if(!t)return!1;const c=new Date(t).getTime(),m=new Date(l).getTime();return Number.isNaN(c)||Number.isNaN(m)?!1:m<=c},[t]),r=a.useCallback(l=>{const c=new Date(l).getTime();Number.isNaN(c)||o(new Date(c).toISOString())},[o]),u=a.useCallback(l=>{const c=new Date(l).getTime();Number.isNaN(c)||o(new Date(c-1e3).toISOString())},[o]);return{watermark:t,isRead:i,markReadTo:r,markUnreadSince:u}}function kn({query:e,disabled:t=!1,onQueryChange:n,t:o}){const[i,r]=a.useState(!1),u=a.useRef(null);a.useEffect(()=>{var c;i&&((c=u.current)==null||c.focus())},[i]);const l=()=>{if(i){n(""),r(!1);return}r(!0)};return s.jsxs("span",{className:`changeset-file-filter ${i?"open":""}`,children:[s.jsx("button",{type:"button",className:"source-detail-action source-detail-icon-action changeset-file-filter-toggle",title:o("sourceFilterFiles"),"aria-label":o("sourceFilterFiles"),"aria-expanded":i,disabled:t,onClick:l,children:s.jsx(or,{})}),i&&s.jsx("input",{ref:u,type:"search",className:"changeset-file-filter-input",value:e,placeholder:o("sourceFilterFiles"),"aria-label":o("sourceFilterFiles"),onKeyDown:c=>{c.key==="Escape"&&(c.preventDefault(),e?n(""):r(!1))},onChange:c=>n(c.target.value)})]})}function or(){return s.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[s.jsx("circle",{cx:"10.5",cy:"10.5",r:"6.5"}),s.jsx("path",{d:"m15.5 15.5 5 5"})]})}function Ze(e){return e.origPath?`${e.origPath} → ${e.path}`:e.path}function Nn(e,t){const n=a.useMemo(()=>e.map(Ze),[e]),o=a.useMemo(()=>new yn(n),[n]),i=a.useMemo(()=>new Set(o.search(t)),[o,t]);return a.useMemo(()=>e.filter(r=>i.has(Ze(r))),[e,i])}const ar=50,ir=/^\s*(?:[*\-•]|\d+\.)\s+/u,rr=/^[ \t]/;function Ws(e){return e.trimEnd().length<=ar}function cr(e,t){return e.trim().length===0||t.trim().length===0||ir.test(e)||rr.test(e)||Ws(e)&&Ws(t)}function lr(e){const t=e.split(`
|