yepanywhere 0.10.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/bundled/@yep-anywhere/shared/dist/capability-ids.d.ts +6 -0
  2. package/bundled/@yep-anywhere/shared/dist/capability-ids.d.ts.map +1 -1
  3. package/bundled/@yep-anywhere/shared/dist/capability-ids.js +6 -0
  4. package/bundled/@yep-anywhere/shared/dist/capability-ids.js.map +1 -1
  5. package/bundled/@yep-anywhere/shared/dist/index.d.ts +4 -4
  6. package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
  7. package/bundled/@yep-anywhere/shared/dist/index.js +3 -3
  8. package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
  9. package/bundled/@yep-anywhere/shared/dist/issues.d.ts +16 -0
  10. package/bundled/@yep-anywhere/shared/dist/issues.d.ts.map +1 -1
  11. package/bundled/@yep-anywhere/shared/dist/issues.js +27 -0
  12. package/bundled/@yep-anywhere/shared/dist/issues.js.map +1 -1
  13. package/bundled/@yep-anywhere/shared/dist/project-service.d.ts +12 -0
  14. package/bundled/@yep-anywhere/shared/dist/project-service.d.ts.map +1 -1
  15. package/bundled/@yep-anywhere/shared/dist/project-service.js +56 -0
  16. package/bundled/@yep-anywhere/shared/dist/project-service.js.map +1 -1
  17. package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts +50 -50
  18. package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts.map +1 -1
  19. package/bundled/@yep-anywhere/shared/dist/server-capabilities.js +48 -50
  20. package/bundled/@yep-anywhere/shared/dist/server-capabilities.js.map +1 -1
  21. package/bundled/@yep-anywhere/shared/dist/types.d.ts +6 -0
  22. package/bundled/@yep-anywhere/shared/dist/types.d.ts.map +1 -1
  23. package/bundled/@yep-anywhere/shared/dist/types.js +5 -0
  24. package/bundled/@yep-anywhere/shared/dist/types.js.map +1 -1
  25. package/bundled/@yep-anywhere/shared/package.json +1 -1
  26. package/client-dist/assets/{AboutSettings-DnDy6BEd.js → AboutSettings-Ck7P-jDQ.js} +1 -1
  27. package/client-dist/assets/{ActivityPage-MFWjNC-D.js → ActivityPage-lGdcdJ-e.js} +1 -1
  28. package/client-dist/assets/{AgentContextSettings-D8g4_T92.js → AgentContextSettings-UprX6zdD.js} +1 -1
  29. package/client-dist/assets/{AgentsPage-CXHC9oBL.js → AgentsPage-BNPVqFjZ.js} +1 -1
  30. package/client-dist/assets/App-3o8SyXXM.js +2 -0
  31. package/client-dist/assets/AppearanceSettings-DMW7A_Rf.js +2 -0
  32. package/client-dist/assets/{AppsSettings-BPk1YKiU.js → AppsSettings-D9Fdhvnq.js} +1 -1
  33. package/client-dist/assets/{AttachmentChip-BRmKgPA9.js → AttachmentChip-qYXy0CtC.js} +1 -1
  34. package/client-dist/assets/{AuthContext-BPHX3zIQ.js → AuthContext-IbT77aGw.js} +1 -1
  35. package/client-dist/assets/{BangCommandDisplayObject-DpwVa9Ll.js → BangCommandDisplayObject-BOag7vGT.js} +1 -1
  36. package/client-dist/assets/{BangCommandsPage-B8zpyOBf.js → BangCommandsPage--PeiFzRy.js} +1 -1
  37. package/client-dist/assets/{BlameBrowser-BLuAT9qK.js → BlameBrowser-DrfV_lH3.js} +1 -1
  38. package/client-dist/assets/{BrowserDebugToolbarButton-BXfPrxyA.js → BrowserDebugToolbarButton-DhIc8BpN.js} +1 -1
  39. package/client-dist/assets/{BrowserExtensionSettings-CZ0s6ASb.js → BrowserExtensionSettings-DAMeZFOL.js} +1 -1
  40. package/client-dist/assets/{CacheMissBillingSettings-ue0Jahu3.js → CacheMissBillingSettings-BW6Nf5ut.js} +1 -1
  41. package/client-dist/assets/{CodexUpdatePrompt-DXdrlvWV.js → CodexUpdatePrompt-H0-B1yB-.js} +1 -1
  42. package/client-dist/assets/{CommittedRangeInput-CLkpNnP_.js → CommittedRangeInput-C6In6Q8s.js} +1 -1
  43. package/client-dist/assets/{CommittedRangeNumberInput-Co1Mkg_Y.js → CommittedRangeNumberInput-DF-kPNGu.js} +1 -1
  44. package/client-dist/assets/{ConversationPreviewPage-B4Ph-QV7.js → ConversationPreviewPage-CTu-ffV7.js} +1 -1
  45. package/client-dist/assets/{CopyTextButton-Bpeo8K_-.js → CopyTextButton-oYhSruA8.js} +1 -1
  46. package/client-dist/assets/{DevelopmentSettings-B3XBUEkp.js → DevelopmentSettings-DGtUr0Qz.js} +1 -1
  47. package/client-dist/assets/{DevicesSettings-D_iWcxbb.js → DevicesSettings-XMDAT-N4.js} +1 -1
  48. package/client-dist/assets/{EmulatorPage-B1cu6Lq_.js → EmulatorPage-De0YMKUL.js} +1 -1
  49. package/client-dist/assets/{EmulatorSettings-nvQEL90Z.js → EmulatorSettings-C5TOwBvn.js} +1 -1
  50. package/client-dist/assets/{EnvironmentSettings-Ba6izhQj.js → EnvironmentSettings-B1gePTdK.js} +1 -1
  51. package/client-dist/assets/{FilePage-9Ss6nJ-y.js → FilePage-zx4PfIbF.js} +1 -1
  52. package/client-dist/assets/FileViewer-D8IcGVo-.js +63 -0
  53. package/client-dist/assets/{FilterDropdown-D-CDFjqG.js → FilterDropdown-BJ5npFAA.js} +1 -1
  54. package/client-dist/assets/FloatingActionButton-Dm0404b2.js +1 -0
  55. package/client-dist/assets/{GitStatusPage-CH31Bai2.js → GitStatusPage-D-4o8YmB.js} +6 -6
  56. package/client-dist/assets/{GlobalSessionsPage-CgxvBzzy.js → GlobalSessionsPage-DD6UMomT.js} +2 -2
  57. package/client-dist/assets/{GlossaryContext-PMCo1K6f.js → GlossaryContext-BA5X62Ck.js} +1 -1
  58. package/client-dist/assets/{HeartbeatTextArea-bCQAiAc-.js → HeartbeatTextArea-ywZAleeh.js} +1 -1
  59. package/client-dist/assets/{HostIdentityContext-B3FgYv0w.js → HostIdentityContext-_GKYzEQ6.js} +1 -1
  60. package/client-dist/assets/{HostsPage-BG_bgfeL.js → HostsPage-OGegHtTp.js} +1 -1
  61. package/client-dist/assets/{InboxContext-BnIIp9cf.js → InboxContext-CZTibzZl.js} +1 -1
  62. package/client-dist/assets/{InboxPage-D1M26n9s.js → InboxPage-DuvRGWdd.js} +1 -1
  63. package/client-dist/assets/IssueSettings-BE0SFhgx.js +1 -0
  64. package/client-dist/assets/IssueSettings-CPOZbMa8.css +1 -0
  65. package/client-dist/assets/IssuesPage-CA4k5N50.css +1 -0
  66. package/client-dist/assets/IssuesPage-CWd-GCCG.js +1 -0
  67. package/client-dist/assets/{LifecycleWebhooksSettings-CaNL4aDT.js → LifecycleWebhooksSettings-bzUj5dsE.js} +1 -1
  68. package/client-dist/assets/{LocalAccessSettings-7EI7L-wA.js → LocalAccessSettings-DSezlzqb.js} +1 -1
  69. package/client-dist/assets/LocalMediaModal-DMrKaM1a.js +14 -0
  70. package/client-dist/assets/LocalSourcePage-Cttx4S9P.js +1 -0
  71. package/client-dist/assets/{LoginPage-C4023DZw.js → LoginPage-DVf285Ok.js} +1 -1
  72. package/client-dist/assets/{MarkdownPreview-ClsW_S6S.js → MarkdownPreview-TXbYZwdp.js} +2 -2
  73. package/client-dist/assets/{MessageAge-B2tHxpYx.js → MessageAge-7FVIZWEv.js} +1 -1
  74. package/client-dist/assets/MessageDeliverySettings-iykyxRVS.js +4 -0
  75. package/client-dist/assets/MessageInput-D1epbc4v.js +7 -0
  76. package/client-dist/assets/{MessageInputToolbar-C79z9qW6.js → MessageInputToolbar-CgXvBkeG.js} +8 -8
  77. package/client-dist/assets/MessageList-Ce3MvdtI.js +4 -0
  78. package/client-dist/assets/{MicrophoneIcon-BLs10fC3.js → MicrophoneIcon-Dhu4NCe6.js} +1 -1
  79. package/client-dist/assets/{Modal-iT2_XPlO.js → Modal-CHNqXAgW.js} +9 -9
  80. package/client-dist/assets/{ModelSettings-B4fCDCIJ.js → ModelSettings-DBQKdWCg.js} +1 -1
  81. package/client-dist/assets/{NavigationLayout-BpvrdPoS.js → NavigationLayout-UkQvkodY.js} +1 -1
  82. package/client-dist/assets/NewSessionForm-Ds5dM9lx.js +9 -0
  83. package/client-dist/assets/NewSessionPage-BERKMRdN.js +2 -0
  84. package/client-dist/assets/{NotificationsSettings-I2SS2U9N.js → NotificationsSettings-1RBQorDi.js} +1 -1
  85. package/client-dist/assets/{PageHeader-Dbb8BZq2.js → PageHeader-DYCnk788.js} +1 -1
  86. package/client-dist/assets/{PerformanceSettings-Ci8oh2Js.js → PerformanceSettings-CGz5ct-T.js} +1 -1
  87. package/client-dist/assets/ProjectAppPage-EfNtdwLY.js +1 -0
  88. package/client-dist/assets/ProjectAppViewer-CRnJGIt-.css +1 -0
  89. package/client-dist/assets/ProjectAppViewer-slr3FXj4.js +1 -0
  90. package/client-dist/assets/{ProjectSessionDefaultsModal-D33bQF-Q.js → ProjectSessionDefaultsModal-5yjuvV8S.js} +1 -1
  91. package/client-dist/assets/{ProjectTemplatesSettings-D8Sr5dDj.js → ProjectTemplatesSettings-DWZfH0JJ.js} +1 -1
  92. package/client-dist/assets/{ProjectsPage-CIHRcMpx.js → ProjectsPage-BJV93FM-.js} +1 -1
  93. package/client-dist/assets/{ProviderBadge-DmhZSMRX.js → ProviderBadge-C-UpobLD.js} +1 -1
  94. package/client-dist/assets/{ProviderChildSessionDetail-D3xbfVZT.js → ProviderChildSessionDetail-CmyTKIwt.js} +3 -3
  95. package/client-dist/assets/ProviderChildSessionPage-Clp1hlBo.js +1 -0
  96. package/client-dist/assets/{ProviderSignIn-DRgPyX8J.js → ProviderSignIn-d13WuHAR.js} +1 -1
  97. package/client-dist/assets/{ProviderSignInPage-ByQPPIRT.js → ProviderSignInPage-CkeyyeWl.js} +1 -1
  98. package/client-dist/assets/{ProvidersSettings-nHJSxVfC.js → ProvidersSettings-Ddj2J4N2.js} +1 -1
  99. package/client-dist/assets/{RecapAfterSecondsControl-BsBxbSpd.js → RecapAfterSecondsControl-D_AiWfq1.js} +1 -1
  100. package/client-dist/assets/{RemoteAccessSettings-Cq_gn76d.js → RemoteAccessSettings-CaE3iqqj.js} +1 -1
  101. package/client-dist/assets/{RemoteExecutorsSettings-CTRjrID3.js → RemoteExecutorsSettings-snCnHbRp.js} +1 -1
  102. package/client-dist/assets/{RenderModeContext-CZwSZkSZ.js → RenderModeContext-CuIMXqQV.js} +1 -1
  103. package/client-dist/assets/{RenderModeGlyph-dL8kAPff.js → RenderModeGlyph-ldDSjj9f.js} +1 -1
  104. package/client-dist/assets/{RouterPoolSelector-Pmu8xrjx.js → RouterPoolSelector-H3X29mOM.js} +2 -2
  105. package/client-dist/assets/{SchemaValidationContext-DqOi1YmB.js → SchemaValidationContext-CPr8V317.js} +1 -1
  106. package/client-dist/assets/{SearchPreview-DIbIaW_4.js → SearchPreview-DvMlCBIp.js} +1 -1
  107. package/client-dist/assets/{SecureConnection-DwcGBdlV.js → SecureConnection-DeVWJw06.js} +2 -2
  108. package/client-dist/assets/{SessionHeader.module-Co1boPaC.js → SessionHeader.module-DfkDdP3M.js} +1 -1
  109. package/client-dist/assets/{SessionMetadataContext-Bfs4TAAj.js → SessionMetadataContext-D0F_4Wp0.js} +1 -1
  110. package/client-dist/assets/SessionPage-xeog2S54.js +50 -0
  111. package/client-dist/assets/{SettingsItem-C7eQXUQf.js → SettingsItem-BgyAjvy6.js} +1 -1
  112. package/client-dist/assets/{SourceControlSettings-D58qSFZm.js → SourceControlSettings-B9T3f2Et.js} +1 -1
  113. package/client-dist/assets/{SourceFileHeaderActions-DNRytjPK.js → SourceFileHeaderActions-ByzC_I1c.js} +1 -1
  114. package/client-dist/assets/{SpeechControlMenu-BA2W-shI.js → SpeechControlMenu-Dhkd9fo9.js} +1 -1
  115. package/client-dist/assets/SpeechSettings-DEZsiCyG.js +2 -0
  116. package/client-dist/assets/{SpeechSmartTurnControls-DgT6bhA4.js → SpeechSmartTurnControls-BdmFc3C9.js} +1 -1
  117. package/client-dist/assets/{StorageSettings-DsvbVixL.js → StorageSettings-CiuHgnzi.js} +1 -1
  118. package/client-dist/assets/{ThinkingControls-Bi0PcWyP.js → ThinkingControls-Bf_4_n66.js} +1 -1
  119. package/client-dist/assets/ToolbarSettings-DupwvB70.js +1 -0
  120. package/client-dist/assets/{TrackerStatusBadge-CYRbIvfC.js → TrackerStatusBadge-nbexFcyV.js} +1 -1
  121. package/client-dist/assets/{UsersSettings-BjSX_kKq.js → UsersSettings-CrGxlDav.js} +1 -1
  122. package/client-dist/assets/{ViewerModePage-BlsOYFrz.js → ViewerModePage-DCVHfUMc.js} +1 -1
  123. package/client-dist/assets/ViewerWindowActions-DV5bxAAy.js +1 -0
  124. package/client-dist/assets/VoiceInputButton-4SbrfhMk.js +1 -0
  125. package/client-dist/assets/{WorkstreamsPage-B10INHZx.js → WorkstreamsPage-CUsI5c-n.js} +1 -1
  126. package/client-dist/assets/YaServerProvider-Dt9IBXDZ.js +31 -0
  127. package/client-dist/assets/{YepAnywhereLogo-CIpZ5dke.js → YepAnywhereLogo-ccRUdgT-.js} +1 -1
  128. package/client-dist/assets/{abnfDiagram-VCTEODGH-sCU1nPAM.js → abnfDiagram-VCTEODGH-Dysqh90e.js} +1 -1
  129. package/client-dist/assets/{arc-DjiGPMMi.js → arc-BfmRVkD-.js} +1 -1
  130. package/client-dist/assets/{architectureDiagram-5GKGNRK7-3RzD-zEy.js → architectureDiagram-5GKGNRK7-Bp1GI0XP.js} +1 -1
  131. package/client-dist/assets/{attachmentFileNames-clPM_F1w.js → attachmentFileNames-CGZzPAjE.js} +1 -1
  132. package/client-dist/assets/{blockDiagram-I7D4REHJ-BU6A9-4i.js → blockDiagram-I7D4REHJ-9vaOU_YP.js} +1 -1
  133. package/client-dist/assets/{browserTab-BXElY_d5.js → browserTab-CLF9iteD.js} +1 -1
  134. package/client-dist/assets/{c4Diagram-7LVT6UL2-CxusgaWH.js → c4Diagram-7LVT6UL2-Cj9qrKnL.js} +1 -1
  135. package/client-dist/assets/channel-Bx4xMN3u.js +1 -0
  136. package/client-dist/assets/{chunk-2Q5K7J3B-CBi0JNQU.js → chunk-2Q5K7J3B-DD_50QMk.js} +1 -1
  137. package/client-dist/assets/{chunk-5VM5RSS4-CskSgDiX.js → chunk-5VM5RSS4-Ba0GJEZb.js} +1 -1
  138. package/client-dist/assets/{chunk-F27PBJKO-Dl65caQS.js → chunk-F27PBJKO-D3_CXW_b.js} +1 -1
  139. package/client-dist/assets/{chunk-IMKFNOWR-BHAs2B4i.js → chunk-IMKFNOWR-Bx7Jus4R.js} +1 -1
  140. package/client-dist/assets/{chunk-JWPE2WC7-CRWKI8Z7.js → chunk-JWPE2WC7-1B1j7YcM.js} +1 -1
  141. package/client-dist/assets/{chunk-POPQ4Y6H-CzdOCWYO.js → chunk-POPQ4Y6H-CgMmmF_H.js} +1 -1
  142. package/client-dist/assets/{chunk-SVP7TREG-DxoiR2Mk.js → chunk-SVP7TREG-DDSE5Wq6.js} +1 -1
  143. package/client-dist/assets/{chunk-TICWLB2K-cve5023y.js → chunk-TICWLB2K-DUZGu3ce.js} +1 -1
  144. package/client-dist/assets/{chunk-XXDRQBXY-mSd5ZgMm.js → chunk-XXDRQBXY-oJdOaI50.js} +1 -1
  145. package/client-dist/assets/classDiagram-ZZMXUADV-CTAikA-f.js +1 -0
  146. package/client-dist/assets/classDiagram-v2-VYDZK3BY-CTAikA-f.js +1 -0
  147. package/client-dist/assets/{clientSummaryStore-Cr4yWo-Y.js → clientSummaryStore-Dsgo1zWK.js} +1 -1
  148. package/client-dist/assets/{compactSettingsControls-BI6RhVII.js → compactSettingsControls-CgeiII5J.js} +1 -1
  149. package/client-dist/assets/{cose-bilkent-JH36ORCC-CoI7dvL-.js → cose-bilkent-JH36ORCC-CQKgCYKk.js} +1 -1
  150. package/client-dist/assets/{cynefin-OW5HDTMX-B6We6WUI.js → cynefin-OW5HDTMX-S85H965d.js} +1 -1
  151. package/client-dist/assets/{cynefinDiagram-5FMLGOSQ-BUzaWybE.js → cynefinDiagram-5FMLGOSQ-B4ri3nX3.js} +1 -1
  152. package/client-dist/assets/{dagre-GXQ25YYZ-BYhpPlP3.js → dagre-GXQ25YYZ-DoQhim_k.js} +1 -1
  153. package/client-dist/assets/{diagram-S7CK7UJ4-FkUIxzy0.js → diagram-S7CK7UJ4-DYy2x0Ta.js} +1 -1
  154. package/client-dist/assets/{diagram-UQ7AKVKN-B0_3U7US.js → diagram-UQ7AKVKN-DxCcDSWg.js} +1 -1
  155. package/client-dist/assets/{diagram-VSXAHHWV-DNF_DVVi.js → diagram-VSXAHHWV-tDbIkKUf.js} +1 -1
  156. package/client-dist/assets/{diagram-VX7I27RA-DgeEEgTw.js → diagram-VX7I27RA-Qdg9iySG.js} +1 -1
  157. package/client-dist/assets/{diagram-Z3DM3KII-S5soWFl_.js → diagram-Z3DM3KII-BTpWBWAH.js} +1 -1
  158. package/client-dist/assets/{ebnfDiagram-PWID7BFC-kfLCEtAi.js → ebnfDiagram-PWID7BFC-DBHufTpw.js} +1 -1
  159. package/client-dist/assets/{erDiagram-RLTQ6QDP-xI7CqDO3.js → erDiagram-RLTQ6QDP-DGkKs4b_.js} +1 -1
  160. package/client-dist/assets/{flowDiagram-HODETNUW-CVSTa2nO.js → flowDiagram-HODETNUW-DVKc1wL6.js} +1 -1
  161. package/client-dist/assets/{frontendReload-54GeNGj9.js → frontendReload-B4jfUIeG.js} +1 -1
  162. package/client-dist/assets/{ganttDiagram-EL5Y4UJY-CI03o3Me.js → ganttDiagram-EL5Y4UJY-lIq_NgbX.js} +1 -1
  163. package/client-dist/assets/{gitGraphDiagram-WWUBYQGX-BlnPaeW9.js → gitGraphDiagram-WWUBYQGX-BjX5H3_l.js} +1 -1
  164. package/client-dist/assets/index-BSMD-gHP.js +1 -0
  165. package/client-dist/assets/index-BhTv6hAY.js +64 -0
  166. package/client-dist/assets/{index-DrKoeozX.js → index-CdtGIhcy.js} +1 -1
  167. package/client-dist/assets/{index-1dMuvv06.js → index-DjQ2chjT.js} +1 -1
  168. package/client-dist/assets/{index-DvjdkG8Q.js → index-DnFlh5Zf.js} +2 -2
  169. package/client-dist/assets/{infoDiagram-27XIBGKW-C7GxDcfT.js → infoDiagram-27XIBGKW-BRxpTbKN.js} +1 -1
  170. package/client-dist/assets/{ishikawaDiagram-5VMMS53U-DBZVNUMP.js → ishikawaDiagram-5VMMS53U-BXr5zlby.js} +1 -1
  171. package/client-dist/assets/{journeyDiagram-3NMN7TZE-CT3nDRx4.js → journeyDiagram-3NMN7TZE-BO5vc5JN.js} +1 -1
  172. package/client-dist/assets/{kanban-definition-UXKFOSKX-Dgns21Ky.js → kanban-definition-UXKFOSKX-FJ2uF-MR.js} +1 -1
  173. package/client-dist/assets/{layout-CCGb-lVs.js → layout-BQ-_ERR1.js} +1 -1
  174. package/client-dist/assets/{limitedUserBrowserDefaults-C6cuD-wF.js → limitedUserBrowserDefaults-CwcMxPe5.js} +1 -1
  175. package/client-dist/assets/{limitedUserDefaultsClient-BPifr9h5.js → limitedUserDefaultsClient-CLg4zzsz.js} +1 -1
  176. package/client-dist/assets/{linear-BO4yAkdf.js → linear-BwwPzSrY.js} +1 -1
  177. package/client-dist/assets/{long-context-effort-warning-By1TxT0F.js → long-context-effort-warning-ims8_Hv4.js} +1 -1
  178. package/client-dist/assets/main-BX4yZXDF.js +43 -0
  179. package/client-dist/assets/mermaid.core-D26C4xkK.js +312 -0
  180. package/client-dist/assets/micTitleActivity-yQ5HgRnF.js +1 -0
  181. package/client-dist/assets/{mindmap-definition-YA3MSWOX-W-bMySj1.js → mindmap-definition-YA3MSWOX-Bv_gNy8_.js} +1 -1
  182. package/client-dist/assets/{newSessionPrefill-CHZfBHqQ.js → newSessionPrefill-BC5a8IpP.js} +1 -1
  183. package/client-dist/assets/{pegDiagram-XKGWAZYB-BMSL3Swk.js → pegDiagram-XKGWAZYB-CBB23R00.js} +1 -1
  184. package/client-dist/assets/{permissionModes-DJvRe3vP.js → permissionModes-C5_i_UDc.js} +1 -1
  185. package/client-dist/assets/{pieDiagram-E7YTZNPT-fzcyJjCG.js → pieDiagram-E7YTZNPT-C0uC29fl.js} +1 -1
  186. package/client-dist/assets/{quadrantDiagram-AXDQQJYC-EQecMBLb.js → quadrantDiagram-AXDQQJYC-BYcINwOa.js} +1 -1
  187. package/client-dist/assets/{railroadDiagram-O6MQD6OU-DvY2buxp.js → railroadDiagram-O6MQD6OU-DwLq6WlM.js} +1 -1
  188. package/client-dist/assets/{recentProjectPathLinks-Km2YzBV7.js → recentProjectPathLinks-Bp8ZFFVQ.js} +1 -1
  189. package/client-dist/assets/{registerServiceWorker-DvFS41on.js → registerServiceWorker-BEwfu1re.js} +1 -1
  190. package/client-dist/assets/{remoteRoutePaths-Crh_32jX.js → remoteRoutePaths-DpabBbC6.js} +1 -1
  191. package/client-dist/assets/{requirementDiagram-BXWQKSXE-CIdu0GYt.js → requirementDiagram-BXWQKSXE-H7ltzzju.js} +1 -1
  192. package/client-dist/assets/{sankeyDiagram-P5KCCOFB-BzupSIep.js → sankeyDiagram-P5KCCOFB-DQ_BH-ec.js} +1 -1
  193. package/client-dist/assets/{sequenceDiagram-WJ2MYXX4-BCz8DLSg.js → sequenceDiagram-WJ2MYXX4-CE5cJN0V.js} +1 -1
  194. package/client-dist/assets/{sessionNavigationState-pHYi3UxP.js → sessionNavigationState-nTMUDlwU.js} +1 -1
  195. package/client-dist/assets/sessionVhostApps-DbEDY32Q.js +1 -0
  196. package/client-dist/assets/{sessionViewerController-BKTu5sj-.js → sessionViewerController-BGKUu-Zg.js} +1 -1
  197. package/client-dist/assets/{sessionViewerPlacement-D4lCtx-b.js → sessionViewerPlacement-cjpznhMG.js} +1 -1
  198. package/client-dist/assets/{sizeCapture-INFHLROL-nGK4qjL2.js → sizeCapture-INFHLROL-DTs5ZL4J.js} +1 -1
  199. package/client-dist/assets/{sourceControlNavigationState-B1jkV2pd.js → sourceControlNavigationState-D8WJCFc_.js} +1 -1
  200. package/client-dist/assets/{sourceTransportPaths-COX454wy.js → sourceTransportPaths-BTR7eFi5.js} +1 -1
  201. package/client-dist/assets/{speechDraftTransaction-cFbNnQHh.js → speechDraftTransaction-Bn7ppW5b.js} +1 -1
  202. package/client-dist/assets/{stateDiagram-D77RDMKH-CFix9P5-.js → stateDiagram-D77RDMKH-CGP-PcgJ.js} +1 -1
  203. package/client-dist/assets/stateDiagram-v2-MP3YSRHH-BeSd02wx.js +1 -0
  204. package/client-dist/assets/{swimlanes-42K2YHIH-3cL-IerY.js → swimlanes-42K2YHIH-BUyuyk1Q.js} +1 -1
  205. package/client-dist/assets/swimlanesDiagram-VR7AAH4N-DJ-GHCq1.js +8 -0
  206. package/client-dist/assets/{timeline-definition-24CTP7MA-Cc4302bU.js → timeline-definition-24CTP7MA-CbhEbRKF.js} +1 -1
  207. package/client-dist/assets/{uiTrace-DGW4HhGn.js → uiTrace-CvAgW12D.js} +1 -1
  208. package/client-dist/assets/{useAcliCommentarySetting-Br7kBvtE.js → useAcliCommentarySetting-B9uDJlBW.js} +1 -1
  209. package/client-dist/assets/{useActivityBusState-CzYhbKlD.js → useActivityBusState-CJk1MiYW.js} +1 -1
  210. package/client-dist/assets/{useAttachmentUploadQuality-B_kWKCMo.js → useAttachmentUploadQuality-Bx88B-aj.js} +1 -1
  211. package/client-dist/assets/{useBackgroundRevalidation-BpXlX3fs.js → useBackgroundRevalidation-SUxysljm.js} +1 -1
  212. package/client-dist/assets/{useCodexUpdateStatus-w-5NajaG.js → useCodexUpdateStatus-CihSrx5C.js} +1 -1
  213. package/client-dist/assets/{useComposerPromptRail-DL5r3CAD.js → useComposerPromptRail-DcRpLRmu.js} +1 -1
  214. package/client-dist/assets/{useConnectedDevices-BJILFKIz.js → useConnectedDevices-Ciuv3J4o.js} +1 -1
  215. package/client-dist/assets/useDocumentTitle-wGc9OsUg.js +1 -0
  216. package/client-dist/assets/{useEmulators-cGrsK5mh.js → useEmulators-CQCzysEZ.js} +1 -1
  217. package/client-dist/assets/{useFileActivity-Y1m-dClR.js → useFileActivity-CpuLfNl9.js} +1 -1
  218. package/client-dist/assets/{useFloatingActionButtonEnabled-CgWMCFmO.js → useFloatingActionButtonEnabled-BKJ8RfOu.js} +1 -1
  219. package/client-dist/assets/{useForkSummaryAutoOpen-qfV9Dgsp.js → useForkSummaryAutoOpen-DRGGsQgo.js} +1 -1
  220. package/client-dist/assets/useGeneratedTitleLength-R5Q60VSi.js +1 -0
  221. package/client-dist/assets/{useKeepMobileKeyboardOpenAfterDelivery-DXTp5fUz.js → useKeepMobileKeyboardOpenAfterDelivery-DXMbsQWe.js} +1 -1
  222. package/client-dist/assets/{useLiveToolOutputEnabled-rQskgO0g.js → useLiveToolOutputEnabled-Qb_QFuzk.js} +1 -1
  223. package/client-dist/assets/{useModelSettings-DMjdRGMd.js → useModelSettings-BSbgwkL8.js} +1 -1
  224. package/client-dist/assets/{useNotifyInApp-BBmQnbh7.js → useNotifyInApp-BucZAqVF.js} +1 -1
  225. package/client-dist/assets/{useOnboarding-CF1WDG2d.js → useOnboarding-BzoWTXrR.js} +1 -1
  226. package/client-dist/assets/{usePanelSlideAnimations-C5qJWoVe.js → usePanelSlideAnimations-XdQhGgr-.js} +1 -1
  227. package/client-dist/assets/{useProjectAppComposing-C8gaOUg9.js → useProjectAppComposing-DBPyVUba.js} +1 -1
  228. package/client-dist/assets/{useProjectTemplateChoices-C0Uxthrq.js → useProjectTemplateChoices-niJIV5HQ.js} +1 -1
  229. package/client-dist/assets/{useProviders-B7fACEDA.js → useProviders-B54BXYv3.js} +1 -1
  230. package/client-dist/assets/{useQuestionAsideSetting-CR1M9_u6.js → useQuestionAsideSetting-CILJe25J.js} +1 -1
  231. package/client-dist/assets/{useRecentSessions-DBXvckSG.js → useRecentSessions-CQJcnOeU.js} +1 -1
  232. package/client-dist/assets/{useRelativeNow-B7XFLfKm.js → useRelativeNow-C2ME3OxV.js} +1 -1
  233. package/client-dist/assets/{useReloadNotifications-D2NJM_v_.js → useReloadNotifications-PKjb8H55.js} +1 -1
  234. package/client-dist/assets/{useRemoteExecutors-j1cpFGnw.js → useRemoteExecutors-CMd01rZ7.js} +1 -1
  235. package/client-dist/assets/{useSearchConcurrency-DlrPqVlr.js → useSearchConcurrency-BIVnIche.js} +1 -1
  236. package/client-dist/assets/useSessionRightPaneSetting-C5YgsyBy.js +1 -0
  237. package/client-dist/assets/{useSidebarWidth-DnB-wKom.js → useSidebarWidth-op0qbgd4.js} +1 -1
  238. package/client-dist/assets/{useSourceControlCleanLanding-ByQI1cWZ.js → useSourceControlCleanLanding-BE8h6VMD.js} +1 -1
  239. package/client-dist/assets/{useStableToolPreviewRendering-DtPpSoyX.js → useStableToolPreviewRendering-Bdiaz4I5.js} +1 -1
  240. package/client-dist/assets/{useTabTitleActivityPreference-DH0VanNM.js → useTabTitleActivityPreference-ZJ19N5_Q.js} +1 -1
  241. package/client-dist/assets/{useVhostAccess-D6l6YouM.js → useVhostAccess-CttxSyIC.js} +1 -1
  242. package/client-dist/assets/{useWorkflowTags-5i3ohGrH.js → useWorkflowTags-CsPhaG2p.js} +1 -1
  243. package/client-dist/assets/{vennDiagram-4TSXK5OY-BJaUYJ8y.js → vennDiagram-4TSXK5OY-DkXe2h8B.js} +1 -1
  244. package/client-dist/assets/{wardleyDiagram-VM6X3IG4-DEgI0m1V.js → wardleyDiagram-VM6X3IG4-BnBGhOBQ.js} +1 -1
  245. package/client-dist/assets/{xychartDiagram-S5SC5T6Z-BuAw5_xn.js → xychartDiagram-S5SC5T6Z-Bxkl9DZJ.js} +1 -1
  246. package/client-dist/index.html +3 -3
  247. package/client-dist/sw.js +2 -1
  248. package/dist/app.d.ts.map +1 -1
  249. package/dist/app.js +10 -2
  250. package/dist/app.js.map +1 -1
  251. package/dist/artifacts/ArtifactServer.d.ts.map +1 -1
  252. package/dist/artifacts/ArtifactServer.js +3 -20
  253. package/dist/artifacts/ArtifactServer.js.map +1 -1
  254. package/dist/artifacts/ProjectAppDelivery.d.ts.map +1 -1
  255. package/dist/artifacts/ProjectAppDelivery.js +31 -1
  256. package/dist/artifacts/ProjectAppDelivery.js.map +1 -1
  257. package/dist/artifacts/pdfInFrame.d.ts +17 -0
  258. package/dist/artifacts/pdfInFrame.d.ts.map +1 -0
  259. package/dist/artifacts/pdfInFrame.js +30 -0
  260. package/dist/artifacts/pdfInFrame.js.map +1 -0
  261. package/dist/projects/ProjectAppStore.d.ts +0 -1
  262. package/dist/projects/ProjectAppStore.d.ts.map +1 -1
  263. package/dist/projects/ProjectServiceManager.d.ts +88 -0
  264. package/dist/projects/ProjectServiceManager.d.ts.map +1 -1
  265. package/dist/projects/ProjectServiceManager.js +4 -2
  266. package/dist/projects/ProjectServiceManager.js.map +1 -1
  267. package/dist/projects/template-runtime.d.ts +5 -0
  268. package/dist/projects/template-runtime.d.ts.map +1 -1
  269. package/dist/projects/template-runtime.js +3 -1
  270. package/dist/projects/template-runtime.js.map +1 -1
  271. package/dist/routes/issue-content.d.ts +6 -0
  272. package/dist/routes/issue-content.d.ts.map +1 -0
  273. package/dist/routes/issue-content.js +25 -0
  274. package/dist/routes/issue-content.js.map +1 -0
  275. package/dist/routes/issues.d.ts +2 -1
  276. package/dist/routes/issues.d.ts.map +1 -1
  277. package/dist/routes/issues.js +34 -4
  278. package/dist/routes/issues.js.map +1 -1
  279. package/dist/routes/project-app.d.ts.map +1 -1
  280. package/dist/routes/project-app.js +27 -2
  281. package/dist/routes/project-app.js.map +1 -1
  282. package/dist/routes/project-creation.d.ts +7 -0
  283. package/dist/routes/project-creation.d.ts.map +1 -1
  284. package/dist/routes/project-creation.js +12 -0
  285. package/dist/routes/project-creation.js.map +1 -1
  286. package/dist/routes/projects.d.ts.map +1 -1
  287. package/dist/routes/projects.js +33 -11
  288. package/dist/routes/projects.js.map +1 -1
  289. package/dist/routes/sessions.d.ts.map +1 -1
  290. package/dist/routes/sessions.js +2 -0
  291. package/dist/routes/sessions.js.map +1 -1
  292. package/dist/routes/speech.d.ts.map +1 -1
  293. package/dist/routes/speech.js +3 -1
  294. package/dist/routes/speech.js.map +1 -1
  295. package/dist/routes/version.d.ts.map +1 -1
  296. package/dist/routes/version.js +1 -0
  297. package/dist/routes/version.js.map +1 -1
  298. package/dist/sdk/providers/codex-protocol/generated/ImageGenerationInputImage.d.ts +12 -0
  299. package/dist/sdk/providers/codex-protocol/generated/ImageGenerationInputImage.d.ts.map +1 -0
  300. package/dist/sdk/providers/codex-protocol/generated/ImageGenerationInputImage.js +3 -0
  301. package/dist/sdk/providers/codex-protocol/generated/ImageGenerationInputImage.js.map +1 -0
  302. package/dist/sdk/providers/codex-protocol/generated/ImageGenerationItem.d.ts +10 -2
  303. package/dist/sdk/providers/codex-protocol/generated/ImageGenerationItem.d.ts.map +1 -1
  304. package/dist/sdk/providers/codex-protocol/generated/v2/McpServerStatus.d.ts +4 -0
  305. package/dist/sdk/providers/codex-protocol/generated/v2/McpServerStatus.d.ts.map +1 -1
  306. package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkParams.d.ts +7 -2
  307. package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkParams.d.ts.map +1 -1
  308. package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts +8 -0
  309. package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts.map +1 -1
  310. package/dist/sdk/providers/codex-protocol/generated/v2/TurnSteerParams.d.ts +8 -0
  311. package/dist/sdk/providers/codex-protocol/generated/v2/TurnSteerParams.d.ts.map +1 -1
  312. package/dist/sdk/providers/codex.d.ts +10 -0
  313. package/dist/sdk/providers/codex.d.ts.map +1 -1
  314. package/dist/sdk/providers/codex.js +33 -3
  315. package/dist/sdk/providers/codex.js.map +1 -1
  316. package/dist/services/RendezWatchService.d.ts +3 -0
  317. package/dist/services/RendezWatchService.d.ts.map +1 -1
  318. package/dist/services/RendezWatchService.js +6 -0
  319. package/dist/services/RendezWatchService.js.map +1 -1
  320. package/dist/services/issues/IssueStore.d.ts +24 -0
  321. package/dist/services/issues/IssueStore.d.ts.map +1 -1
  322. package/dist/services/issues/IssueStore.js +67 -11
  323. package/dist/services/issues/IssueStore.js.map +1 -1
  324. package/dist/services/issues/confirm.d.ts.map +1 -1
  325. package/dist/services/issues/confirm.js +37 -3
  326. package/dist/services/issues/confirm.js.map +1 -1
  327. package/dist/services/issues/content.d.ts +36 -0
  328. package/dist/services/issues/content.d.ts.map +1 -0
  329. package/dist/services/issues/content.js +328 -0
  330. package/dist/services/issues/content.js.map +1 -0
  331. package/dist/services/issues/status.d.ts.map +1 -1
  332. package/dist/services/issues/status.js +12 -4
  333. package/dist/services/issues/status.js.map +1 -1
  334. package/dist/services/rendezSessions.d.ts +2 -1
  335. package/dist/services/rendezSessions.d.ts.map +1 -1
  336. package/dist/services/rendezSessions.js +17 -3
  337. package/dist/services/rendezSessions.js.map +1 -1
  338. package/dist/sessions/codex-reader.d.ts.map +1 -1
  339. package/dist/sessions/codex-reader.js +9 -2
  340. package/dist/sessions/codex-reader.js.map +1 -1
  341. package/dist/sessions/codex-rollout-window.d.ts +2 -0
  342. package/dist/sessions/codex-rollout-window.d.ts.map +1 -1
  343. package/dist/sessions/codex-rollout-window.js +1 -0
  344. package/dist/sessions/codex-rollout-window.js.map +1 -1
  345. package/dist/storage/discovery-sqlite.d.ts.map +1 -1
  346. package/dist/storage/discovery-sqlite.js +2 -0
  347. package/dist/storage/discovery-sqlite.js.map +1 -1
  348. package/dist/storage/migrations/012-issue-content.d.ts +3 -0
  349. package/dist/storage/migrations/012-issue-content.d.ts.map +1 -0
  350. package/dist/storage/migrations/012-issue-content.js +14 -0
  351. package/dist/storage/migrations/012-issue-content.js.map +1 -0
  352. package/dist/supervisor/Process.d.ts +10 -1
  353. package/dist/supervisor/Process.d.ts.map +1 -1
  354. package/dist/supervisor/Process.js +22 -0
  355. package/dist/supervisor/Process.js.map +1 -1
  356. package/package.json +5 -5
  357. package/client-dist/assets/App-BIHEvA6Q.js +0 -2
  358. package/client-dist/assets/AppearanceSettings-CDplyLIJ.js +0 -2
  359. package/client-dist/assets/FileViewer-Crw6E_2M.js +0 -63
  360. package/client-dist/assets/FloatingActionButton-BMjNa4vb.js +0 -1
  361. package/client-dist/assets/IssueSettings-BLIuCNxO.css +0 -1
  362. package/client-dist/assets/IssueSettings-Dr6JKfQf.js +0 -1
  363. package/client-dist/assets/IssuesPage-DOfq79D-.css +0 -1
  364. package/client-dist/assets/IssuesPage-QmPw-DCB.js +0 -1
  365. package/client-dist/assets/LocalMediaModal-5au-Ku3n.js +0 -14
  366. package/client-dist/assets/LocalSourcePage-YurHSY4M.js +0 -1
  367. package/client-dist/assets/MessageDeliverySettings-D2fzmys9.js +0 -4
  368. package/client-dist/assets/MessageInput-BUZmOeKI.js +0 -7
  369. package/client-dist/assets/MessageList-CJgDrWOy.js +0 -4
  370. package/client-dist/assets/NewSessionForm-4104gBMd.js +0 -9
  371. package/client-dist/assets/NewSessionPage-AzsvU8Mk.js +0 -2
  372. package/client-dist/assets/ProjectAppPage-CoxqMJ-6.js +0 -1
  373. package/client-dist/assets/ProjectAppViewer-D5Juq0Mx.css +0 -1
  374. package/client-dist/assets/ProjectAppViewer-D_8Lq6Oy.js +0 -1
  375. package/client-dist/assets/ProviderChildSessionPage-CrSrF2ST.js +0 -1
  376. package/client-dist/assets/SessionPage-DjR-n2cx.js +0 -50
  377. package/client-dist/assets/SpeechSettings-CObFsnUu.js +0 -2
  378. package/client-dist/assets/ToolbarSettings-CyhCBLrg.js +0 -1
  379. package/client-dist/assets/ViewerWindowActions-DM1Jwlo9.js +0 -1
  380. package/client-dist/assets/VoiceInputButton-jq6m-rwS.js +0 -1
  381. package/client-dist/assets/YaServerProvider-fGtUHCJb.js +0 -1
  382. package/client-dist/assets/channel-BMLLCpix.js +0 -1
  383. package/client-dist/assets/classDiagram-ZZMXUADV-CriLRYaG.js +0 -1
  384. package/client-dist/assets/classDiagram-v2-VYDZK3BY-CriLRYaG.js +0 -1
  385. package/client-dist/assets/index-C-4wHkcA.js +0 -46
  386. package/client-dist/assets/index-D73NQkRu.js +0 -1
  387. package/client-dist/assets/main-BpQ_EIjC.js +0 -43
  388. package/client-dist/assets/mermaid.core-CnOzO4__.js +0 -312
  389. package/client-dist/assets/sessionVhostApps-DJY4ZLda.js +0 -1
  390. package/client-dist/assets/stateDiagram-v2-MP3YSRHH-D-_jRHCc.js +0 -1
  391. package/client-dist/assets/swimlanesDiagram-VR7AAH4N-CMY1RzMZ.js +0 -8
  392. package/client-dist/assets/useDocumentTitle-CeauK1Xu.js +0 -1
  393. package/client-dist/assets/useGeneratedTitleLength-0cRz1f9b.js +0 -1
  394. package/client-dist/assets/useSessionRightPaneSetting-BOgcH2kB.js +0 -1
@@ -1 +1 @@
1
- import{r as o,j as i}from"./clientSummaryStore-Cr4yWo-Y.js";import{u as w}from"./useFileActivity-Y1m-dClR.js";import{u as F,L as k}from"./main-BpQ_EIjC.js";import"./react-runtime-D-UPQ57m.js";import"./index-C-4wHkcA.js";function C(t){return new Date(t).toLocaleTimeString()}function R(t){return new Date(t).toLocaleDateString()}function P(t){switch(t){case"create":return"+";case"modify":return"~";case"delete":return"-"}}function z(t){switch(t){case"create":return"#4f4";case"modify":return"#ff4";case"delete":return"#f44"}}function B(t,n){switch(t){case"create":return n("activityTypeCreated");case"modify":return n("activityTypeModified");case"delete":return n("activityTypeDeleted")}}function x(t,n){switch(t){case"session":return n("activityFileTypeSession");case"agent-session":return n("activityFileTypeAgentSession");case"settings":return n("activityFileTypeSettings");case"credentials":return n("activityFileTypeCredentials");case"telemetry":return n("activityFileTypeTelemetry");case"other":return n("activityFileTypeOther")}}const E=["session","agent-session","settings","credentials","telemetry","other"];function W(){const{t}=F(),[n,v]=o.useState(""),[a,u]=o.useState(new Set),{events:c,connected:m,paused:y,clearEvents:b,togglePause:j}=w({bufferEvents:!0}),d=o.useRef(null),h=o.useRef(!0);let l=c;if(n){const e=new RegExp(n,"i");l=l.filter(s=>e.test(s.relativePath))}a.size>0&&(l=l.filter(e=>a.has(e.fileType)));const p=[...l].reverse(),T=e=>{u(s=>{const r=new Set(s);return r.has(e)?r.delete(e):r.add(e),r})},S=()=>{const e=d.current;if(!e)return;const s=20;h.current=e.scrollHeight-e.scrollTop-e.clientHeight<s};o.useLayoutEffect(()=>{const e=d.current;e&&h.current&&(e.scrollTop=e.scrollHeight)},[p.length]);const g=p.reduce((e,s)=>{const r=R(s.timestamp);return e[r]||(e[r]=[]),e[r].push(s),e},{});return i.jsxs("div",{className:"page",style:{maxWidth:"1000px",height:"100vh",display:"flex",flexDirection:"column",overflow:"hidden"},children:[i.jsxs("nav",{className:"breadcrumb",children:[i.jsx(k,{to:"/projects",children:t("pageTitleProjects")})," /"," ",t("activityBreadcrumb")]}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i.jsx("h1",{children:t("activityTitle")}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[i.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:m?"#4f4":"#f44"}}),i.jsx("span",{style:{fontSize:"0.875rem",color:"#888"},children:t(m?"activityConnected":"activityDisconnected")})]})]}),i.jsxs("div",{style:{display:"flex",gap:"1rem",marginBottom:"1rem",flexWrap:"wrap"},children:[i.jsx("input",{type:"text",value:n,onChange:e=>v(e.target.value),placeholder:t("activityPathPlaceholder"),style:{flex:1,minWidth:"200px",padding:"0.75rem",background:"#2a2a2a",border:"1px solid #444",borderRadius:"8px",color:"inherit",fontSize:"1rem"}}),i.jsx("button",{type:"button",onClick:j,style:{background:y?"#a44":"#444"},children:t(y?"activityResume":"activityPause")}),i.jsx("button",{type:"button",onClick:b,style:{background:"#444"},children:t("activityClear")})]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"1rem",flexWrap:"wrap"},children:[E.map(e=>i.jsx("button",{type:"button",onClick:()=>T(e),style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",background:a.has(e)?"#4a4aff":"#333",border:a.has(e)?"1px solid #5a5aff":"1px solid #444"},children:x(e,t)},e)),a.size>0&&i.jsx("button",{type:"button",onClick:()=>u(new Set),style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",background:"#444"},children:t("activityClearFilters")})]}),i.jsxs("div",{style:{display:"flex",gap:"2rem",marginBottom:"1rem",fontSize:"0.875rem",color:"#888"},children:[i.jsx("span",{children:t("activityTotal",{count:c.length})}),i.jsx("span",{children:t("activityShowing",{count:p.length})})]}),i.jsx("div",{ref:d,onScroll:S,style:{flex:1,overflow:"auto",minHeight:0,background:"#1a1a1a",borderRadius:"8px",padding:"1rem"},children:Object.entries(g).length===0?i.jsx("div",{style:{textAlign:"center",padding:"3rem",color:"#888"},children:c.length===0?t("activityWaiting"):t("activityNoMatches")}):Object.entries(g).map(([e,s])=>i.jsxs("div",{style:{marginBottom:"1.5rem"},children:[i.jsx("h3",{style:{color:"#888",fontSize:"0.875rem",marginBottom:"0.5rem"},children:e}),i.jsx("div",{style:{background:"#2a2a2a",borderRadius:"8px",overflow:"hidden"},children:s.map((r,f)=>i.jsxs("div",{style:{padding:"0.75rem 1rem",borderBottom:f<s.length-1?"1px solid #333":"none",display:"grid",gridTemplateColumns:"80px 24px 100px 1fr",gap:"0.75rem",alignItems:"center",fontFamily:"monospace",fontSize:"0.875rem"},children:[i.jsx("span",{style:{color:"#666"},children:C(r.timestamp)}),i.jsx("span",{style:{color:z(r.changeType),fontWeight:"bold",textAlign:"center"},title:B(r.changeType,t),children:P(r.changeType)}),i.jsx("span",{style:{color:"#888",fontSize:"0.75rem",background:"#333",padding:"0.25rem 0.5rem",borderRadius:"4px",textAlign:"center"},children:x(r.fileType,t)}),i.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r.path,children:r.relativePath})]},`${r.timestamp}-${r.path}-${f}`))})]},e))})]})}export{W as ActivityPage};
1
+ import{r as o,j as i}from"./clientSummaryStore-Dsgo1zWK.js";import{u as w}from"./useFileActivity-CpuLfNl9.js";import{u as F,L as k}from"./main-BX4yZXDF.js";import"./react-runtime-D-UPQ57m.js";import"./index-BhTv6hAY.js";function C(t){return new Date(t).toLocaleTimeString()}function R(t){return new Date(t).toLocaleDateString()}function P(t){switch(t){case"create":return"+";case"modify":return"~";case"delete":return"-"}}function z(t){switch(t){case"create":return"#4f4";case"modify":return"#ff4";case"delete":return"#f44"}}function B(t,n){switch(t){case"create":return n("activityTypeCreated");case"modify":return n("activityTypeModified");case"delete":return n("activityTypeDeleted")}}function x(t,n){switch(t){case"session":return n("activityFileTypeSession");case"agent-session":return n("activityFileTypeAgentSession");case"settings":return n("activityFileTypeSettings");case"credentials":return n("activityFileTypeCredentials");case"telemetry":return n("activityFileTypeTelemetry");case"other":return n("activityFileTypeOther")}}const E=["session","agent-session","settings","credentials","telemetry","other"];function W(){const{t}=F(),[n,v]=o.useState(""),[a,u]=o.useState(new Set),{events:c,connected:m,paused:y,clearEvents:b,togglePause:j}=w({bufferEvents:!0}),d=o.useRef(null),h=o.useRef(!0);let l=c;if(n){const e=new RegExp(n,"i");l=l.filter(s=>e.test(s.relativePath))}a.size>0&&(l=l.filter(e=>a.has(e.fileType)));const p=[...l].reverse(),T=e=>{u(s=>{const r=new Set(s);return r.has(e)?r.delete(e):r.add(e),r})},S=()=>{const e=d.current;if(!e)return;const s=20;h.current=e.scrollHeight-e.scrollTop-e.clientHeight<s};o.useLayoutEffect(()=>{const e=d.current;e&&h.current&&(e.scrollTop=e.scrollHeight)},[p.length]);const g=p.reduce((e,s)=>{const r=R(s.timestamp);return e[r]||(e[r]=[]),e[r].push(s),e},{});return i.jsxs("div",{className:"page",style:{maxWidth:"1000px",height:"100vh",display:"flex",flexDirection:"column",overflow:"hidden"},children:[i.jsxs("nav",{className:"breadcrumb",children:[i.jsx(k,{to:"/projects",children:t("pageTitleProjects")})," /"," ",t("activityBreadcrumb")]}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i.jsx("h1",{children:t("activityTitle")}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[i.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:m?"#4f4":"#f44"}}),i.jsx("span",{style:{fontSize:"0.875rem",color:"#888"},children:t(m?"activityConnected":"activityDisconnected")})]})]}),i.jsxs("div",{style:{display:"flex",gap:"1rem",marginBottom:"1rem",flexWrap:"wrap"},children:[i.jsx("input",{type:"text",value:n,onChange:e=>v(e.target.value),placeholder:t("activityPathPlaceholder"),style:{flex:1,minWidth:"200px",padding:"0.75rem",background:"#2a2a2a",border:"1px solid #444",borderRadius:"8px",color:"inherit",fontSize:"1rem"}}),i.jsx("button",{type:"button",onClick:j,style:{background:y?"#a44":"#444"},children:t(y?"activityResume":"activityPause")}),i.jsx("button",{type:"button",onClick:b,style:{background:"#444"},children:t("activityClear")})]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"1rem",flexWrap:"wrap"},children:[E.map(e=>i.jsx("button",{type:"button",onClick:()=>T(e),style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",background:a.has(e)?"#4a4aff":"#333",border:a.has(e)?"1px solid #5a5aff":"1px solid #444"},children:x(e,t)},e)),a.size>0&&i.jsx("button",{type:"button",onClick:()=>u(new Set),style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",background:"#444"},children:t("activityClearFilters")})]}),i.jsxs("div",{style:{display:"flex",gap:"2rem",marginBottom:"1rem",fontSize:"0.875rem",color:"#888"},children:[i.jsx("span",{children:t("activityTotal",{count:c.length})}),i.jsx("span",{children:t("activityShowing",{count:p.length})})]}),i.jsx("div",{ref:d,onScroll:S,style:{flex:1,overflow:"auto",minHeight:0,background:"#1a1a1a",borderRadius:"8px",padding:"1rem"},children:Object.entries(g).length===0?i.jsx("div",{style:{textAlign:"center",padding:"3rem",color:"#888"},children:c.length===0?t("activityWaiting"):t("activityNoMatches")}):Object.entries(g).map(([e,s])=>i.jsxs("div",{style:{marginBottom:"1.5rem"},children:[i.jsx("h3",{style:{color:"#888",fontSize:"0.875rem",marginBottom:"0.5rem"},children:e}),i.jsx("div",{style:{background:"#2a2a2a",borderRadius:"8px",overflow:"hidden"},children:s.map((r,f)=>i.jsxs("div",{style:{padding:"0.75rem 1rem",borderBottom:f<s.length-1?"1px solid #333":"none",display:"grid",gridTemplateColumns:"80px 24px 100px 1fr",gap:"0.75rem",alignItems:"center",fontFamily:"monospace",fontSize:"0.875rem"},children:[i.jsx("span",{style:{color:"#666"},children:C(r.timestamp)}),i.jsx("span",{style:{color:z(r.changeType),fontWeight:"bold",textAlign:"center"},title:B(r.changeType,t),children:P(r.changeType)}),i.jsx("span",{style:{color:"#888",fontSize:"0.75rem",background:"#333",padding:"0.25rem 0.5rem",borderRadius:"4px",textAlign:"center"},children:x(r.fileType,t)}),i.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r.path,children:r.relativePath})]},`${r.timestamp}-${r.path}-${f}`))})]},e))})]})}export{W as ActivityPage};
@@ -1,4 +1,4 @@
1
- import{r as a,j as e}from"./clientSummaryStore-Cr4yWo-Y.js";import{e as z}from"./Modal-iT2_XPlO.js";import{D as J,a as K,H as O}from"./HeartbeatTextArea-bCQAiAc-.js";import{u as Q}from"./main-BpQ_EIjC.js";import{S as T}from"./SettingsItem-C7eQXUQf.js";import{u as V,a as W,S as _,H as A}from"./index-DvjdkG8Q.js";import"./react-runtime-D-UPQ57m.js";import"./index-C-4wHkcA.js";import"./remoteRoutePaths-Crh_32jX.js";import"./PageHeader-Dbb8BZq2.js";import"./text-B4tk85DK.js";import"./SessionHeader.module-Co1boPaC.js";import"./HostIdentityContext-B3FgYv0w.js";import"./NavigationLayout-BpvrdPoS.js";import"./useSidebarWidth-DnB-wKom.js";import"./frontendReload-54GeNGj9.js";import"./usePanelSlideAnimations-C5qJWoVe.js";import"./useFileActivity-Y1m-dClR.js";import"./GlossaryContext-PMCo1K6f.js";import"./ProviderBadge-DmhZSMRX.js";import"./appHref-ByaEnJGJ.js";import"./YepAnywhereLogo-CIpZ5dke.js";import"./index-D73NQkRu.js";import"./limitedUserBrowserDefaults-C6cuD-wF.js";const U="The client renders Markdown, including LaTeX math. Prefer \\( ... \\) for inline math and \\[ ... \\] for display math. Use LaTeX notation where it improves clarity.";function Z({globalInstructions:t,hints:s}){const m=t||"",d=m.trim(),o=[];if(s!=null&&s.latexMathRendering&&o.push(U),o.length===0)return m||void 0;const r=[`[Client capabilities]
1
+ import{r as a,j as e}from"./clientSummaryStore-Dsgo1zWK.js";import{e as z}from"./Modal-CHNqXAgW.js";import{D as J,a as K,H as O}from"./HeartbeatTextArea-ywZAleeh.js";import{u as Q}from"./main-BX4yZXDF.js";import{S as T}from"./SettingsItem-BgyAjvy6.js";import{u as V,a as W,S as _,H as A}from"./index-DnFlh5Zf.js";import"./react-runtime-D-UPQ57m.js";import"./index-BhTv6hAY.js";import"./remoteRoutePaths-DpabBbC6.js";import"./PageHeader-DYCnk788.js";import"./text-B4tk85DK.js";import"./SessionHeader.module-DfkDdP3M.js";import"./HostIdentityContext-_GKYzEQ6.js";import"./NavigationLayout-UkQvkodY.js";import"./useSidebarWidth-op0qbgd4.js";import"./frontendReload-B4jfUIeG.js";import"./usePanelSlideAnimations-XdQhGgr-.js";import"./useFileActivity-CpuLfNl9.js";import"./GlossaryContext-BA5X62Ck.js";import"./ProviderBadge-C-UpobLD.js";import"./appHref-ByaEnJGJ.js";import"./YepAnywhereLogo-ccRUdgT-.js";import"./index-BSMD-gHP.js";import"./limitedUserBrowserDefaults-CwcMxPe5.js";const U="The client renders Markdown, including LaTeX math. Prefer \\( ... \\) for inline math and \\[ ... \\] for display math. Use LaTeX notation where it improves clarity.";function Z({globalInstructions:t,hints:s}){const m=t||"",d=m.trim(),o=[];if(s!=null&&s.latexMathRendering&&o.push(U),o.length===0)return m||void 0;const r=[`[Client capabilities]
2
2
  ${o.join(`
3
3
  `)}`];return d&&r.push(`[Global instructions]
4
4
  ${d}`),r.join(`
@@ -1,2 +1,2 @@
1
- import{r as _,j as t}from"./clientSummaryStore-Cr4yWo-Y.js";import{i as $,u as D,C as A,j as K,P as U}from"./NavigationLayout-BpvrdPoS.js";import{u as E,c as G,L as I}from"./main-BpQ_EIjC.js";import{P as V}from"./PageHeader-Dbb8BZq2.js";import{T as H,p as W,f as q}from"./GlossaryContext-PMCo1K6f.js";import{d as Y,e as Q,b as z,a as J,u as X}from"./Modal-iT2_XPlO.js";import{s as Z,l as ee}from"./index-C-4wHkcA.js";import{MainContent as te}from"./index-D73NQkRu.js";import"./react-runtime-D-UPQ57m.js";import"./useSidebarWidth-DnB-wKom.js";import"./frontendReload-54GeNGj9.js";import"./usePanelSlideAnimations-C5qJWoVe.js";import"./useFileActivity-Y1m-dClR.js";import"./remoteRoutePaths-Crh_32jX.js";import"./appHref-ByaEnJGJ.js";import"./ProviderBadge-DmhZSMRX.js";import"./YepAnywhereLogo-CIpZ5dke.js";import"./text-B4tk85DK.js";import"./SessionHeader.module-Co1boPaC.js";import"./HostIdentityContext-B3FgYv0w.js";const se=5e3;function ae(){const{version:e}=Y(),{settings:n}=Q(),d=z();J();const i=!0,l=Z(e,ee)&&((n==null?void 0:n.hostProcessObservabilityEnabled)??!0),[r,c]=_.useState([]),[u,N]=_.useState(null),[P,m]=_.useState(!1),[h,o]=_.useState(!1);return _.useEffect(()=>{if(!l||!i){c([]),N(null),m(!1),o(!1);return}let x=!1,g,v=!0;const T=()=>{x||document.hidden||(g=window.setTimeout(()=>void y(),se))},y=async()=>{if(!(x||document.hidden)){v&&m(!0);try{const k=await d.transport.fetch("/host-agent-processes");if(x)return;v=!1,m(!1),o(!1),N(k.supported),c(k.enabled?k.observations:[]),k.enabled&&k.supported&&T()}catch{if(x)return;v=!1,m(!1),o(!0),c([]),T()}}},a=()=>{g!==void 0&&(window.clearTimeout(g),g=void 0),document.hidden||y()};return document.addEventListener("visibilitychange",a),y(),()=>{x=!0,g!==void 0&&window.clearTimeout(g),document.removeEventListener("visibilitychange",a)}},[l,i,d.transport]),{enabled:l,supported:u,observations:r,loading:P,error:h}}const re="_section_490s9_11",ne="_empty_490s9_25",ie="_killFeedback_490s9_31",de="_killFeedbackSuccess_490s9_39",le="_killFeedbackError_490s9_43",ce="_list_490s9_47",oe="_card_490s9_53",pe="_metricsWrapOpen_490s9_72",ue="_cardTerminated_490s9_77",me="_cardHeader_490s9_82",ge="_cardTitle_490s9_88",he="_cardSessionTitle_490s9_95",_e="_cardSessionLink_490s9_104",xe="_cardProject_490s9_113",ve="_stateBadge_490s9_122",je="_stateInput_490s9_130",fe="_stateIdle_490s9_135",Ce="_stateTerminated_490s9_140",Ne="_stateExternal_490s9_145",Pe="_providerBadge_490s9_151",ke="_providerClaude_490s9_161",ye="_providerCodex_490s9_166",Te="_providerGemini_490s9_171",Se="_providerGrok_490s9_176",Ee="_providerOpencode_490s9_181",we="_providerPi_490s9_186",Me="_providerLocal_490s9_191",Le="_killButton_490s9_196",be="_cardMeta_490s9_219",Be="_cardUptime_490s9_226",Ie="_cardPid_490s9_233",Re="_metricsWrap_490s9_72",Oe="_metrics_490s9_72",Fe="_metricsPopover_490s9_273",$e="_cardExternal_490s9_291",De="_cardDetails_490s9_295",Ae="_providerChildren_490s9_301",Ke="_providerChild_490s9_301",Ue="_providerChildBranch_490s9_319",Ge="_providerChildType_490s9_320",Ve="_providerChildTitle_490s9_325",He="_detailRow_490s9_332",We="_detailLabel_490s9_340",qe="_detailValue_490s9_346",s={section:re,empty:ne,killFeedback:ie,killFeedbackSuccess:de,killFeedbackError:le,list:ce,card:oe,metricsWrapOpen:pe,cardTerminated:ue,cardHeader:me,cardTitle:ge,cardSessionTitle:he,cardSessionLink:_e,cardProject:xe,stateBadge:ve,stateInput:je,stateIdle:fe,stateTerminated:Ce,stateExternal:Ne,providerBadge:Pe,providerClaude:ke,providerCodex:ye,providerGemini:Te,providerGrok:Se,providerOpencode:Ee,providerPi:we,providerLocal:Me,killButton:Le,cardMeta:be,cardUptime:Be,cardPid:Ie,metricsWrap:Re,metrics:Oe,metricsPopover:Fe,cardExternal:$e,cardDetails:De,providerChildren:Ae,providerChild:Ke,providerChildBranch:Ue,providerChildType:Ge,providerChildTitle:Ve,detailRow:He,detailLabel:We,detailValue:qe};function f(...e){return e.filter(Boolean).join(" ")}function b(e){const n=new Date(e).getTime(),i=Date.now()-n,p=Math.floor(i/1e3),l=Math.floor(p/60),r=Math.floor(l/60),c=Math.floor(r/24);return c>0?`${c}d ${r%24}h`:r>0?`${r}h ${l%60}m`:l>0?`${l}m ${p%60}s`:`${p}s`}function w(e){const n=e/1048576;if(n<1024)return`${Math.round(n)} MiB`;const d=n/1024;return`${d<10?d.toFixed(1):Math.round(d)} GiB`}function M(e){return`${e<10?e.toFixed(1):Math.round(e)}%`}function Ye(e,n){switch(e){case"running":return n("agentsRunning");case"waiting-input":return n("agentsNeedsInput");case"idle":return n("agentsIdle");case"terminated":return n("agentsStopped");default:return e}}function Qe(e){switch(e){case"running":return"";case"waiting-input":return s.stateInput;case"idle":return s.stateIdle;case"terminated":return s.stateTerminated;default:return""}}function B(e,n){switch(e){case"claude":return"Claude";case"claude-gateway":return"Claude Gateway";case"claude-ollama":return"Claude + Ollama";case"codex":return"Codex";case"gemini":case"gemini-acp":return"Gemini";case"grok":return"Grok";case"opencode":return"OpenCode";case"pi":return"Pi";case"local":return n("agentsProviderLocal");default:return e??"Claude"}}function R(e){switch(e){case"codex":return s.providerCodex;case"gemini":case"gemini-acp":return s.providerGemini;case"grok":return s.providerGrok;case"opencode":return s.providerOpencode;case"pi":return s.providerPi;case"local":return s.providerLocal;default:return s.providerClaude}}const ze={success:s.killFeedbackSuccess,error:s.killFeedbackError};function O({observation:e,sessionId:n,touchSurfaceRef:d}){const{t:i}=E(),[p,l]=_.useState(!1),r=_.useRef(null),c=B(e.provider,i),u=b(e.startedAt),N=e.cpu?i("agentsMetricsCpuValue",{percent:M(e.cpu.treePercent)}):i("agentsMetricsCpuSampling"),P=[i(e.supervision==="ya"?"agentsMetricsManagedYa":"agentsMetricsManagedExternal"),...n?[i("agentsMetricsSession",{id:n})]:[],i("agentsMetricsProvider",{provider:c}),i("agentsPid",{pid:e.pid}),i("agentsMetricsStarted",{value:new Date(e.startedAt).toLocaleString()}),i("agentsMetricsAge",{value:u}),e.cpu?i("agentsMetricsRecentCpu",{percent:M(e.cpu.rootPercent),treePercent:M(e.cpu.treePercent),seconds:(e.cpu.windowMs/1e3).toFixed(1)}):i("agentsMetricsCpuSampling"),i("agentsMetricsRootRss",{value:w(e.memory.rootRssBytes)}),i("agentsMetricsTreeRss",{value:w(e.memory.treeRssBytes)}),i("agentsMetricsDescendants",{count:e.memory.descendantCount}),i("agentsMetricsSampled",{value:new Date(e.sampledAt).toLocaleTimeString()})].join(`
1
+ import{r as _,j as t}from"./clientSummaryStore-Dsgo1zWK.js";import{i as $,u as D,C as A,j as K,P as U}from"./NavigationLayout-UkQvkodY.js";import{u as E,c as G,L as I}from"./main-BX4yZXDF.js";import{P as V}from"./PageHeader-DYCnk788.js";import{T as H,p as W,f as q}from"./GlossaryContext-BA5X62Ck.js";import{d as Y,e as Q,b as z,a as J,u as X}from"./Modal-CHNqXAgW.js";import{s as Z,l as ee}from"./index-BhTv6hAY.js";import{MainContent as te}from"./index-BSMD-gHP.js";import"./react-runtime-D-UPQ57m.js";import"./useSidebarWidth-op0qbgd4.js";import"./frontendReload-B4jfUIeG.js";import"./usePanelSlideAnimations-XdQhGgr-.js";import"./useFileActivity-CpuLfNl9.js";import"./remoteRoutePaths-DpabBbC6.js";import"./appHref-ByaEnJGJ.js";import"./ProviderBadge-C-UpobLD.js";import"./YepAnywhereLogo-ccRUdgT-.js";import"./text-B4tk85DK.js";import"./SessionHeader.module-DfkDdP3M.js";import"./HostIdentityContext-_GKYzEQ6.js";const se=5e3;function ae(){const{version:e}=Y(),{settings:n}=Q(),d=z();J();const i=!0,l=Z(e,ee)&&((n==null?void 0:n.hostProcessObservabilityEnabled)??!0),[r,c]=_.useState([]),[u,N]=_.useState(null),[P,m]=_.useState(!1),[h,o]=_.useState(!1);return _.useEffect(()=>{if(!l||!i){c([]),N(null),m(!1),o(!1);return}let x=!1,g,v=!0;const T=()=>{x||document.hidden||(g=window.setTimeout(()=>void y(),se))},y=async()=>{if(!(x||document.hidden)){v&&m(!0);try{const k=await d.transport.fetch("/host-agent-processes");if(x)return;v=!1,m(!1),o(!1),N(k.supported),c(k.enabled?k.observations:[]),k.enabled&&k.supported&&T()}catch{if(x)return;v=!1,m(!1),o(!0),c([]),T()}}},a=()=>{g!==void 0&&(window.clearTimeout(g),g=void 0),document.hidden||y()};return document.addEventListener("visibilitychange",a),y(),()=>{x=!0,g!==void 0&&window.clearTimeout(g),document.removeEventListener("visibilitychange",a)}},[l,i,d.transport]),{enabled:l,supported:u,observations:r,loading:P,error:h}}const re="_section_490s9_11",ne="_empty_490s9_25",ie="_killFeedback_490s9_31",de="_killFeedbackSuccess_490s9_39",le="_killFeedbackError_490s9_43",ce="_list_490s9_47",oe="_card_490s9_53",pe="_metricsWrapOpen_490s9_72",ue="_cardTerminated_490s9_77",me="_cardHeader_490s9_82",ge="_cardTitle_490s9_88",he="_cardSessionTitle_490s9_95",_e="_cardSessionLink_490s9_104",xe="_cardProject_490s9_113",ve="_stateBadge_490s9_122",je="_stateInput_490s9_130",fe="_stateIdle_490s9_135",Ce="_stateTerminated_490s9_140",Ne="_stateExternal_490s9_145",Pe="_providerBadge_490s9_151",ke="_providerClaude_490s9_161",ye="_providerCodex_490s9_166",Te="_providerGemini_490s9_171",Se="_providerGrok_490s9_176",Ee="_providerOpencode_490s9_181",we="_providerPi_490s9_186",Me="_providerLocal_490s9_191",Le="_killButton_490s9_196",be="_cardMeta_490s9_219",Be="_cardUptime_490s9_226",Ie="_cardPid_490s9_233",Re="_metricsWrap_490s9_72",Oe="_metrics_490s9_72",Fe="_metricsPopover_490s9_273",$e="_cardExternal_490s9_291",De="_cardDetails_490s9_295",Ae="_providerChildren_490s9_301",Ke="_providerChild_490s9_301",Ue="_providerChildBranch_490s9_319",Ge="_providerChildType_490s9_320",Ve="_providerChildTitle_490s9_325",He="_detailRow_490s9_332",We="_detailLabel_490s9_340",qe="_detailValue_490s9_346",s={section:re,empty:ne,killFeedback:ie,killFeedbackSuccess:de,killFeedbackError:le,list:ce,card:oe,metricsWrapOpen:pe,cardTerminated:ue,cardHeader:me,cardTitle:ge,cardSessionTitle:he,cardSessionLink:_e,cardProject:xe,stateBadge:ve,stateInput:je,stateIdle:fe,stateTerminated:Ce,stateExternal:Ne,providerBadge:Pe,providerClaude:ke,providerCodex:ye,providerGemini:Te,providerGrok:Se,providerOpencode:Ee,providerPi:we,providerLocal:Me,killButton:Le,cardMeta:be,cardUptime:Be,cardPid:Ie,metricsWrap:Re,metrics:Oe,metricsPopover:Fe,cardExternal:$e,cardDetails:De,providerChildren:Ae,providerChild:Ke,providerChildBranch:Ue,providerChildType:Ge,providerChildTitle:Ve,detailRow:He,detailLabel:We,detailValue:qe};function f(...e){return e.filter(Boolean).join(" ")}function b(e){const n=new Date(e).getTime(),i=Date.now()-n,p=Math.floor(i/1e3),l=Math.floor(p/60),r=Math.floor(l/60),c=Math.floor(r/24);return c>0?`${c}d ${r%24}h`:r>0?`${r}h ${l%60}m`:l>0?`${l}m ${p%60}s`:`${p}s`}function w(e){const n=e/1048576;if(n<1024)return`${Math.round(n)} MiB`;const d=n/1024;return`${d<10?d.toFixed(1):Math.round(d)} GiB`}function M(e){return`${e<10?e.toFixed(1):Math.round(e)}%`}function Ye(e,n){switch(e){case"running":return n("agentsRunning");case"waiting-input":return n("agentsNeedsInput");case"idle":return n("agentsIdle");case"terminated":return n("agentsStopped");default:return e}}function Qe(e){switch(e){case"running":return"";case"waiting-input":return s.stateInput;case"idle":return s.stateIdle;case"terminated":return s.stateTerminated;default:return""}}function B(e,n){switch(e){case"claude":return"Claude";case"claude-gateway":return"Claude Gateway";case"claude-ollama":return"Claude + Ollama";case"codex":return"Codex";case"gemini":case"gemini-acp":return"Gemini";case"grok":return"Grok";case"opencode":return"OpenCode";case"pi":return"Pi";case"local":return n("agentsProviderLocal");default:return e??"Claude"}}function R(e){switch(e){case"codex":return s.providerCodex;case"gemini":case"gemini-acp":return s.providerGemini;case"grok":return s.providerGrok;case"opencode":return s.providerOpencode;case"pi":return s.providerPi;case"local":return s.providerLocal;default:return s.providerClaude}}const ze={success:s.killFeedbackSuccess,error:s.killFeedbackError};function O({observation:e,sessionId:n,touchSurfaceRef:d}){const{t:i}=E(),[p,l]=_.useState(!1),r=_.useRef(null),c=B(e.provider,i),u=b(e.startedAt),N=e.cpu?i("agentsMetricsCpuValue",{percent:M(e.cpu.treePercent)}):i("agentsMetricsCpuSampling"),P=[i(e.supervision==="ya"?"agentsMetricsManagedYa":"agentsMetricsManagedExternal"),...n?[i("agentsMetricsSession",{id:n})]:[],i("agentsMetricsProvider",{provider:c}),i("agentsPid",{pid:e.pid}),i("agentsMetricsStarted",{value:new Date(e.startedAt).toLocaleString()}),i("agentsMetricsAge",{value:u}),e.cpu?i("agentsMetricsRecentCpu",{percent:M(e.cpu.rootPercent),treePercent:M(e.cpu.treePercent),seconds:(e.cpu.windowMs/1e3).toFixed(1)}):i("agentsMetricsCpuSampling"),i("agentsMetricsRootRss",{value:w(e.memory.rootRssBytes)}),i("agentsMetricsTreeRss",{value:w(e.memory.treeRssBytes)}),i("agentsMetricsDescendants",{count:e.memory.descendantCount}),i("agentsMetricsSampled",{value:new Date(e.sampledAt).toLocaleTimeString()})].join(`
2
2
  `);return _.useEffect(()=>{if(!p)return;const m=o=>{var g,v;if(!(o.target instanceof Node))return;const x=o.pointerType==="touch"&&((g=d==null?void 0:d.current)==null?void 0:g.contains(o.target));!((v=r.current)!=null&&v.contains(o.target))&&!x&&l(!1)},h=o=>{o.key==="Escape"&&l(!1)};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",h),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",h)}},[p,d]),_.useEffect(()=>{const m=d==null?void 0:d.current;if(!m)return;const h=o=>{var g;if(o.pointerType!=="touch"||!(o.target instanceof Node)||(g=r.current)!=null&&g.contains(o.target))return;(o.target instanceof Element?o.target.closest("a, button, input, select, textarea, [role='button'], [role='link']"):null)||l(v=>!v)};return m.addEventListener("pointerup",h),()=>{m.removeEventListener("pointerup",h)}},[d]),t.jsxs("span",{className:f("agent-metrics-wrap",s.metricsWrap,p&&s.metricsWrapOpen),ref:r,children:[t.jsxs("button",{type:"button",className:s.metrics,title:P,"aria-label":P,"aria-expanded":p,onClick:m=>{m.preventDefault(),m.stopPropagation(),l(h=>!h)},children:[t.jsxs("span",{children:[w(e.memory.rootRssBytes)," RSS"]}),t.jsx("span",{"aria-hidden":!0,children:"·"}),t.jsx("span",{children:N})]}),p&&t.jsx("span",{className:s.metricsPopover,role:"status",children:P})]})}function L({process:e,observation:n,basePath:d="",isTerminated:i=!1,onKill:p,killing:l=!1}){const{t:r}=E(),c=e.providerChildren??[];return t.jsxs(I,{to:`${d}/projects/${e.projectId}/sessions/${e.sessionId}`,className:f(s.card,i&&s.cardTerminated),children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsxs("div",{className:s.cardTitle,children:[t.jsx("span",{className:s.cardSessionTitle,title:r("agentsSessionTooltip",{id:e.sessionId}),children:e.sessionTitle||r("agentsUntitled")}),e.clearloop!==void 0&&t.jsx(A,{badge:e.clearloop}),t.jsx("span",{className:f(s.providerBadge,R(e.provider)),children:B(e.provider,r)}),e.state==="in-turn"?t.jsx(H,{variant:"pill",label:r("agentsRunning")}):t.jsx("span",{className:f(s.stateBadge,Qe(e.state)),children:Ye(e.state,r)}),!i&&p&&t.jsx("button",{type:"button",className:s.killButton,disabled:l,onClick:u=>{u.preventDefault(),u.stopPropagation(),p(e)},title:r("agentsKillTitle"),children:r(l?"agentsKilling":"agentsKill")})]}),t.jsxs("div",{className:f("agent-card-meta",s.cardMeta),children:[t.jsx("span",{className:s.cardProject,children:e.projectName}),e.pid!==void 0&&t.jsx("span",{className:s.cardPid,children:r("agentsPid",{pid:e.pid})}),!i&&t.jsx("span",{className:s.cardUptime,title:n?r("agentsAgeTooltip",{started:new Date(n.startedAt).toLocaleString(),attached:new Date(e.startedAt).toLocaleString()}):void 0,children:b((n==null?void 0:n.startedAt)??e.startedAt)}),!i&&n&&t.jsx(O,{observation:n,sessionId:e.sessionId}),e.contextUsage&&t.jsx(K,{usage:e.contextUsage})]})]}),(e.permissionMode||e.queueDepth>0||e.terminationReason)&&t.jsxs("div",{className:s.cardDetails,children:[e.permissionMode&&t.jsxs("div",{className:s.detailRow,children:[t.jsx("span",{className:s.detailLabel,children:r("agentsPermissionMode")}),t.jsx("span",{className:s.detailValue,children:e.permissionMode})]}),e.queueDepth>0&&t.jsxs("div",{className:s.detailRow,children:[t.jsx("span",{className:s.detailLabel,children:r("agentsMessagesQueued")}),t.jsx("span",{className:s.detailValue,children:e.queueDepth})]}),e.terminationReason&&t.jsxs("div",{className:s.detailRow,children:[t.jsx("span",{className:s.detailLabel,children:r("agentsStopReason")}),t.jsx("span",{className:s.detailValue,children:e.terminationReason})]})]}),c.length>0&&t.jsx("div",{className:s.providerChildren,role:"list","aria-label":r(c.length===1?"providerChildrenCountOne":"providerChildrenCountMany",{count:c.length}),children:c.map(u=>{const N=W(u,r("providerChildFallback"));return t.jsx("span",{role:"listitem",children:t.jsxs(U,{className:s.providerChild,href:q(d,e.projectId,e.sessionId,u.id),children:[t.jsx("span",{className:s.providerChildBranch,"aria-hidden":!0,children:"↳"}),t.jsx("span",{className:s.providerChildTitle,children:N}),u.agentType&&u.agentType!==N&&t.jsx("span",{className:s.providerChildType,children:u.agentType})]})},u.id)})})]})}function Je({observation:e,basePath:n=""}){const{t:d}=E(),i=B(e.provider,d),p=_.useRef(null),{sessionId:l,projectId:r}=e,c=e.sessionTitle??(l?d("agentsExternalSessionTitle",{provider:i,id:l.slice(0,8)}):d("agentsExternalProcessTitle",{provider:i})),u=l?d("agentsSessionTooltip",{id:l}):void 0;return t.jsx("article",{className:f(s.card,s.cardExternal),ref:p,children:t.jsxs("div",{className:s.cardHeader,children:[t.jsxs("div",{className:s.cardTitle,children:[l&&r?t.jsx(I,{to:`${n}/projects/${r}/sessions/${l}`,className:f(s.cardSessionTitle,s.cardSessionLink),title:u,children:c}):t.jsx("span",{className:s.cardSessionTitle,title:u,children:c}),t.jsx("span",{className:f(s.providerBadge,R(e.provider)),children:i}),t.jsx("span",{className:f(s.stateBadge,s.stateExternal),children:d("agentsOutsideYa")})]}),t.jsxs("div",{className:f("agent-card-meta",s.cardMeta),children:[t.jsx("span",{className:s.cardPid,children:d("agentsPid",{pid:e.pid})}),t.jsx("span",{className:s.cardUptime,children:b(e.startedAt)}),t.jsx(O,{observation:e,sessionId:l,touchSurfaceRef:p})]})]})})}function vt(){const{t:e}=E(),{processes:n,terminatedProcesses:d,loading:i,error:p,refetch:l}=$(),r=X(),c=ae(),{openSidebar:u,isWideScreen:N}=D(),[P,m]=_.useState(()=>new Set),[h,o]=_.useState(null),x=_.useCallback(async a=>{const k=a.sessionTitle||e("agentsUntitled");if(window.confirm(e("agentsKillConfirm",{title:k}))){m(j=>new Set(j).add(a.id)),o(null);try{const j=await G.abortProcess(a.id,{blockResume:!0}),S=j.pid===void 0?e("agentsKillVerified"):e("agentsKillVerifiedPid",{pid:j.pid}),C=j.resumeExemption;if(C!=null&&C.error||(C==null?void 0:C.autoResumeDisabled)===!1)o({tone:"error",message:`${S} ${e("agentsKillResumeBlockFailed",{message:C.error??e("agentsKillResumeBlockUnknown")})}`});else{const F=C!=null&&C.autoResumeDisabled?` ${e("agentsKillResumeBlocked")}`:"";o({tone:"success",message:`${S}${F}`})}}catch(j){o({tone:"error",message:e("agentsKillFailed",{message:j instanceof Error?j.message:String(j)})})}finally{await l(),m(j=>{const S=new Set(j);return S.delete(a.id),S})}}},[l,e]),g=n.filter(a=>a.state==="in-turn"||a.state==="waiting-input"),v=n.filter(a=>a.state==="idle"),T=_.useMemo(()=>new Map(c.observations.filter(a=>a.supervisorProcessId!==void 0).map(a=>[a.supervisorProcessId,a])),[c.observations]),y=c.observations.filter(a=>a.supervision==="external");return t.jsxs(te,{isWideScreen:N,children:[t.jsx(V,{title:e("agentsTitle"),onOpenSidebar:u}),t.jsx("main",{className:"page-scroll-container",children:t.jsxs("div",{className:"page-content-inner",children:[i&&t.jsx("p",{className:"loading",children:e("agentsLoading")}),p&&t.jsx("p",{className:"error",children:e("agentsError",{message:p.message})}),h&&t.jsx("p",{className:f(s.killFeedback,ze[h.tone]),role:h.tone==="error"?"alert":"status",children:h.message}),!i&&!p&&t.jsxs(t.Fragment,{children:[t.jsxs("section",{className:s.section,children:[t.jsx("h2",{children:e("agentsSectionActive")}),g.length===0?t.jsx("p",{className:s.empty,children:e("agentsEmptyActive")}):t.jsx("div",{className:s.list,children:g.map(a=>t.jsx(L,{process:a,observation:T.get(a.id),basePath:r,onKill:x,killing:P.has(a.id)},a.id))})]}),c.enabled&&t.jsxs("section",{className:s.section,children:[t.jsx("h2",{children:e("agentsSectionExternal")}),c.loading?t.jsx("p",{className:s.empty,children:e("agentsExternalLoading")}):c.supported===!1?t.jsx("p",{className:s.empty,children:e("agentsExternalUnsupported")}):c.error?t.jsx("p",{className:s.empty,children:e("agentsExternalUnavailable")}):y.length===0?t.jsx("p",{className:s.empty,children:e("agentsEmptyExternal")}):t.jsx("div",{className:s.list,children:y.map(a=>t.jsx(Je,{observation:a,basePath:r},a.observationId))})]}),t.jsxs("section",{className:s.section,children:[t.jsx("h2",{children:e("agentsSectionIdle")}),v.length===0?t.jsx("p",{className:s.empty,children:e("agentsEmptyIdle")}):t.jsx("div",{className:s.list,children:v.map(a=>t.jsx(L,{process:a,observation:T.get(a.id),basePath:r,onKill:x,killing:P.has(a.id)},a.id))})]}),t.jsxs("section",{className:s.section,children:[t.jsx("h2",{children:e("agentsSectionStopped")}),d.length===0?t.jsx("p",{className:s.empty,children:e("agentsEmptyStopped")}):t.jsx("div",{className:s.list,children:d.map(a=>t.jsx(L,{process:a,basePath:r,isTerminated:!0},a.id))})]})]})]})})]})}export{vt as AgentsPage};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodexUpdatePrompt-H0-B1yB-.js","assets/clientSummaryStore-Dsgo1zWK.js","assets/react-runtime-D-UPQ57m.js","assets/index-BhTv6hAY.js","assets/Modal-CHNqXAgW.js","assets/remoteRoutePaths-DpabBbC6.js","assets/main-BX4yZXDF.js","assets/main-B2KnNDxp.css","assets/Modal-XAN22JVZ.css","assets/useCodexUpdateStatus-CihSrx5C.js","assets/useProviders-B54BXYv3.js","assets/FloatingActionButton-Dm0404b2.js","assets/speechDraftTransaction-Bn7ppW5b.js","assets/deviceDetection-BVPclkty.js","assets/YaServerProvider-Dt9IBXDZ.js","assets/useModelSettings-BSbgwkL8.js","assets/ProviderBadge-C-UpobLD.js","assets/ProviderBadge-kxoOaFeu.css","assets/speechDraftTransaction-Dbu21KpT.css","assets/newSessionDefaults-CdVn-sOG.js","assets/useSidebarWidth-op0qbgd4.js","assets/VoiceInputButton-4SbrfhMk.js","assets/micTitleActivity-yQ5HgRnF.js","assets/MicrophoneIcon-Dhu4NCe6.js","assets/VoiceInputButton-nhG9ItFX.css","assets/useFloatingActionButtonEnabled-BKJ8RfOu.js","assets/newSessionPrefill-BC5a8IpP.js","assets/index-DjQ2chjT.js"])))=>i.map(i=>d[i]);
2
+ import{aM as he,aN as _e,aO as ge,aP as be,aQ as N,s as Re,S as ve,_ as P}from"./index-BhTv6hAY.js";import{r as _,j as o,a as ne,g as ye,T as K,U as Ee,b as I,Q as Se}from"./clientSummaryStore-Dsgo1zWK.js";import{u as Ce,b as Ae}from"./useOnboarding-BzoWTXrR.js";import{h as xe,u as Te,d as w,a as we,b as Be,i as Ne,T as ke,C as Le,g as re}from"./Modal-CHNqXAgW.js";import{u as A,d as De,e as U,aV as H,m as Oe,n as je,bb as Pe,bc as Ie,bd as Ue,be as W,bf as Me,aF as T,bg as $e,bh as Fe,bi as Ke,bj as He,bk as We}from"./main-BX4yZXDF.js";import{a as Ge}from"./deviceDetection-BVPclkty.js";import{u as ze,C as Ye}from"./useActivityBusState-CJk1MiYW.js";import{u as Ve,p as qe}from"./useProviders-B54BXYv3.js";import{q as G}from"./sessionRouteLayer-D9T2QT8G.js";import{u as oe,A as Qe}from"./AuthContext-IbT77aGw.js";import{n as Xe,o as Je}from"./remoteRoutePaths-DpabBbC6.js";import{H as Ze,u as et}from"./HostIdentityContext-_GKYzEQ6.js";import{I as tt}from"./InboxContext-CZTibzZl.js";import{S as nt}from"./SchemaValidationContext-CPr8V317.js";import{M as rt,g as ot}from"./micTitleActivity-yQ5HgRnF.js";import{P as k,a as z,C as st,s as at}from"./useDocumentTitle-wGc9OsUg.js";import{u as it}from"./frontendReload-B4jfUIeG.js";import{u as ct}from"./useTabTitleActivityPreference-ZJ19N5_Q.js";import{a as ut}from"./useNotifyInApp-BucZAqVF.js";import{l as lt}from"./limitedUserDefaultsClient-CLg4zzsz.js";import{a as dt}from"./limitedUserBrowserDefaults-CwcMxPe5.js";import{u as mt,g as ft}from"./useReloadNotifications-PKjb8H55.js";import{o as pt,S as Y}from"./SecureConnection-DeVWJw06.js";import"./react-runtime-D-UPQ57m.js";import"./CopyTextButton-oYhSruA8.js";import"./appHref-ByaEnJGJ.js";function ht(e){return ge(`server:${e}`)}function V(e){return e.serverInstanceId?ht(e.serverInstanceId):he(e.id)}function _t(e){return _e(gt(e))}function gt(e){const t=e.trim();try{const n=new URL(t);return n.hash="",n.toString()}catch{return t}}const bt=".session-messages, .page-scroll-container",Rt="input, textarea, select, [contenteditable='true']",vt=48,yt=2,Et=18,St=84;function Ct(e){return e instanceof Element?e:e instanceof Node?e.parentElement:null}function At(e){return e.scrollHeight-e.clientHeight>vt}function L(e,t=yt){return e.scrollHeight-e.clientHeight-e.scrollTop<=t}function xt(e){const t=Ct(e);if(!t||t.closest(Rt))return null;const n=t.closest(bt);return!n||!At(n)?null:n}function Tt(e,t){return Math.max(0,e-t)}function wt(e){return e.atBottom?e.distancePx>=St?"armed":e.distancePx>=Et?"pull":"hidden":"hidden"}function D(){return{active:!1,container:null,startY:0,status:"hidden"}}function Bt(e,t={}){const{disabled:n=!1}=t,[r,s]=_.useState("hidden"),i=_.useRef(D()),l=_.useRef("hidden");return _.useEffect(()=>{if(n||!Ge()){s("hidden"),l.current="hidden",i.current=D();return}const a=d=>{l.current!==d&&(l.current=d,s(d))},u=()=>{i.current=D(),a("hidden")},m=d=>{var b;if(d.touches.length!==1){u();return}const f=xt(d.target);if(!f||!L(f)){u();return}i.current={active:!0,container:f,startY:((b=d.touches[0])==null?void 0:b.clientY)??0,status:"hidden"}},c=d=>{var g;const f=i.current;if(!f.active||!f.container||d.touches.length!==1)return;const b=Tt(f.startY,((g=d.touches[0])==null?void 0:g.clientY)??f.startY),h=wt({distancePx:b,atBottom:L(f.container)});f.status=h,a(h)},p=()=>{const d=i.current,f=d.active&&d.status==="armed"&&!!d.container&&L(d.container);u(),f&&e()};return document.addEventListener("touchstart",m,{passive:!0}),document.addEventListener("touchmove",c,{passive:!0}),document.addEventListener("touchend",p,{passive:!0}),document.addEventListener("touchcancel",p,{passive:!0}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",c),document.removeEventListener("touchend",p),document.removeEventListener("touchcancel",p)}},[n,e]),r}function Nt(e){return e==="armed"?"Release to reload":"Pull up to reload"}function kt({disabled:e=!1,onReload:t}){const n=Bt(t,{disabled:e});return n==="hidden"?null:o.jsx("div",{className:`bottom-overscroll-reload bottom-overscroll-reload--${n}`,"aria-live":"polite",children:Nt(n)})}function Lt(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e)}function Dt(){const{t:e}=A(),{showToast:t}=xe(),n=De(),r=Te();return _.useEffect(()=>ne.on("cache-miss-billing",s=>{if(!s.showToast||!s.record.exception)return;const{record:i}=s;t(e("cacheMissBillingToast",{provider:i.provider,tokens:Lt(i.wastedInputTokens)}),"error",{label:e("cacheMissBillingOpenSession"),onClick:()=>n(`${r}${i.sessionPath}`)})}),[r,n,t,e]),null}const Ot="_root_18czr_1",jt="_connecting_18czr_12",Pt="_disconnected_18czr_17",O={root:Ot,connecting:jt,disconnected:Pt},It=["/login","/login/direct","/login/relay"];function Ut(){const e=U(),{connectionState:t}=ze();if(It.some(i=>e.pathname===i||e.pathname.startsWith(`${i}/`)))return null;const r=t==="reconnecting"?"connecting":t;if(r==="connected")return null;const s=r==="connecting"?O.connecting:O.disconnected;return o.jsx("div",{className:`${O.root} ${s}`,"data-connection-status":r})}const Mt="https://claude.com/download",$t="https://openai.com/codex/get-started/",se="desktop-provider-notice-dismissed";function Ft(e=window.localStorage){try{return e.getItem(se)==="true"}catch{return!1}}function Kt(e=window.localStorage){try{e.setItem(se,"true")}catch{}}function Ht(e){return e.some(t=>(t.name==="claude"||t.name==="codex")&&(t.applicationDetected??t.installed))}function Wt(){const{t:e}=A(),{version:t}=w(),{providers:n,loading:r,error:s,refetch:i}=Ve(),[l,a]=_.useState(()=>Ft());return _.useEffect(()=>{if((t==null?void 0:t.desktopRuntime)!==!0)return;const u=()=>void i();return window.addEventListener("focus",u),()=>window.removeEventListener("focus",u)},[i,t==null?void 0:t.desktopRuntime]),l||(t==null?void 0:t.desktopRuntime)!==!0||r||s||Ht(n)?null:o.jsxs("aside",{className:"desktop-provider-notice","aria-live":"polite",children:[o.jsxs("div",{className:"desktop-provider-notice__copy",children:[o.jsx("strong",{children:e("desktopProviderNoticeTitle")}),o.jsx("span",{children:e("desktopProviderNoticeDescription")})]}),o.jsxs("div",{className:"desktop-provider-notice__actions",children:[o.jsx("a",{href:Mt,target:"_blank",rel:"noreferrer",children:e("desktopProviderNoticeGetClaude")}),o.jsx("a",{href:$t,target:"_blank",rel:"noreferrer",children:e("desktopProviderNoticeGetCodex")}),o.jsx("button",{type:"button",onClick:()=>void i(),children:e("desktopProviderNoticeRetry")}),o.jsx("button",{type:"button",className:"desktop-provider-notice__dismiss","aria-label":e("desktopProviderNoticeDismiss"),onClick:()=>{Kt(),a(!0)},children:"×"})]})]})}const Gt="_root_1kkzg_8",zt="_content_1kkzg_22",Yt="_title_1kkzg_30",Vt="_body_1kkzg_38",qt="_command_1kkzg_45",Qt="_dismiss_1kkzg_62",C={root:Gt,content:zt,title:Yt,body:Vt,command:qt,dismiss:Qt};function ae(e){return`yep-anywhere-storage-filesystem-dismissed:${e}`}function Xt(e){var t;return((t=e==null?void 0:e.sqlite)==null?void 0:t.networkFilesystem)||null}function q(e){if(!e)return!1;try{return window.localStorage.getItem(ae(e))==="dismissed"}catch{return!1}}function Jt(){const{t:e}=A(),{version:t}=w(),n=Xt(t),[r,s]=_.useState(()=>q(n));_.useEffect(()=>{s(q(n))},[n]);const i=_.useCallback(()=>{if(s(!0),!!n)try{window.localStorage.setItem(ae(n),"dismissed")}catch{}},[n]);return!n||r?null:o.jsxs("div",{className:C.root,role:"alert","data-storage-filesystem":"network",children:[o.jsxs("div",{className:C.content,children:[o.jsx("p",{className:C.title,children:e("storageNetworkFilesystemTitle",{filesystem:n})}),o.jsx("p",{className:C.body,children:e("storageNetworkFilesystemDescription",{filesystem:n})}),o.jsx("code",{className:C.command,children:"YEP_DATA_DIR=/path/on/local/disk/.yep-anywhere"})]}),o.jsx("button",{type:"button",className:C.dismiss,onClick:i,children:e("storageNetworkFilesystemDismiss")})]})}const Zt="_stack_1092f_24",en="_banner_1092f_39",tn="_content_1092f_59",nn="_actions_1092f_60",rn="_message_1092f_76",on="_warningText_1092f_81",sn="_warningDetail_1092f_89",an="_button_1092f_100",cn="_buttonLabel_1092f_123",un="_buttonPrimary_1092f_133",ln="_warning_1092f_81",dn="_buttonSafe_1092f_152",mn="_buttonDanger_1092f_156",fn="_dismiss_1092f_165",R={stack:Zt,banner:en,content:tn,actions:nn,message:rn,warningText:on,warningDetail:sn,button:an,buttonLabel:cn,buttonPrimary:un,warning:ln,buttonSafe:dn,buttonDanger:mn,dismiss:fn},pn=4,hn=8,Q=8,X=12;function J(e,t,n){return e.left<t.right+n&&e.right>t.left-n&&e.top<t.bottom+n&&e.bottom>t.top-n}function _n({children:e,avoidSessionComposer:t=!1}){const n=_.useRef(null);return _.useLayoutEffect(()=>{const r=n.current;if(!r)return;let s=null;const i=()=>{if(!r.firstElementChild)return;r.style.setProperty("--reload-banner-stack-lift","0px");const p=r.getBoundingClientRect();if(p.width===0||p.height===0)return;let d=0;const f=t&&window.innerWidth>600?G(".session-input"):null;if(f){const h=f.querySelectorAll("button, a[href], [role='button'], input:not([type='hidden']), select");if(Array.from(h).some(v=>{const y=v.getBoundingClientRect();return y.width>0&&y.height>0&&J(p,y,pn)})){const v=f.getBoundingClientRect();d=Math.max(d,window.innerHeight-v.top+hn-X)}}const b=document.querySelector(".fab-container");if(b){const h=b.getBoundingClientRect();h.width>0&&h.height>0&&J(p,h,Q)&&(d=Math.max(d,window.innerHeight-h.top+Q-X))}r.style.setProperty("--reload-banner-stack-lift",`${Math.max(0,Math.ceil(d))}px`)},l=()=>{r.firstElementChild&&(s!==null&&window.cancelAnimationFrame(s),s=window.requestAnimationFrame(()=>{s=null,i()}))};i(),window.addEventListener("resize",l);const a=t?G(".session-input"):null,u=document.querySelector(".fab-container"),m=typeof ResizeObserver>"u"?null:new ResizeObserver(l);m==null||m.observe(r),a&&(m==null||m.observe(a)),u&&(m==null||m.observe(u));const c=a||u?new MutationObserver(l):null;return a&&c&&c.observe(a,{attributes:!0,childList:!0,subtree:!0}),u&&c&&c.observe(u,{attributes:!0,childList:!0,subtree:!0}),()=>{s!==null&&window.cancelAnimationFrame(s),window.removeEventListener("resize",l),m==null||m.disconnect(),c==null||c.disconnect()}},[t]),o.jsx("div",{ref:n,className:`reload-banner-stack ${R.stack}`,children:e})}function Z(e,t){var n;return((n=e.find(r=>r.type===t))==null?void 0:n.count)??0}function gn(e,t){var n;return((n=e==null?void 0:e.find(r=>r.type===t))==null?void 0:n.count)??0}function ee({target:e,onReload:t,onDismiss:n,onRestartWhenSafe:r,onCancelSafeRestart:s,unsafeToRestart:i,interruptibleSessionCount:l=0,queuedSessionMessageCount:a=0,safeRestartState:u,safeRestartMutating:m=!1}){const{t:c}=A(),p=c(e==="backend"?"reloadBannerTargetServer":"reloadBannerTargetFrontend"),d=e==="backend"&&u!==void 0&&u.status!=="idle",f=i&&e==="backend"||d,b=e==="backend"&&r&&i&&!d,h=u?Z(u.blockers,"active-sessions"):0,g=u?Z(u.blockers,"session-queue"):0,v=u?gn(u.preserved,"recovered-session-queue"):0,y=(u==null?void 0:u.status)==="restarting"?c("reloadBannerSafeRestartRestarting"):d?h>0&&g>0?c("reloadBannerSafeRestartWaitingActiveAndQueued",{activeCount:h,activeSuffix:h!==1?"s":"",queuedCount:g,queuedSuffix:g!==1?"s":""}):h>0?c("reloadBannerSafeRestartWaitingActive",{count:h,suffix:h!==1?"s":""}):g>0?c("reloadBannerSafeRestartWaitingQueued",{count:g,suffix:g!==1?"s":""}):c("reloadBannerSafeRestartReady"):null,E=d&&v>0?c("reloadBannerSafeRestartPreservedRecoveredQueue",{count:v,suffix:v!==1?"s":""}):null,B=l>0&&a>0?c("developmentInterruptedWarningActiveAndQueued",{activeCount:l,activeSuffix:l!==1?"s":"",queuedCount:a,queuedSuffix:a!==1?"s":""}):a>0?c("developmentInterruptedWarningQueued",{count:a,suffix:a!==1?"s":""}):c("developmentInterruptedWarning",{count:l,suffix:l!==1?"s ":" "}),S=h>0&&g>0?c("reloadBannerStatusActiveAndQueuedCompact",{activeCount:h,queuedCount:g}):h>0?c("reloadBannerStatusActiveCompact",{count:h}):g>0?c("reloadBannerStatusQueuedCompact",{count:g}):null,x=l>0&&a>0?c("reloadBannerStatusActiveAndQueuedCompact",{activeCount:l,queuedCount:a}):a>0?c("reloadBannerStatusQueuedCompact",{count:a}):c("reloadBannerStatusActiveCompact",{count:l}),le=(u==null?void 0:u.status)==="restarting"?c("reloadBannerSafeRestartRestartingCompact"):d?S??c("reloadBannerSafeRestartReadyCompact"):x,M=y??B,$=E?`${M} ${E}`:M,F=f?c("reloadBannerReloadNow"):c("reloadBannerReloadTarget",{target:p}),de=()=>{n(),t()},me=()=>{n(),r==null||r()},fe=()=>{n(),s==null||s()},pe=()=>{n()};return o.jsxs("div",{className:`reload-banner ${R.banner} ${f?R.warning:""}`,role:"status",children:[o.jsxs("span",{className:R.content,children:[o.jsx("span",{className:R.message,children:c("reloadBannerCodeChangedCompact",{target:p})}),f&&o.jsxs("span",{className:R.warningText,"aria-hidden":"true",title:$,children:[" · ",le]}),f&&o.jsx("span",{className:R.warningDetail,children:$})]}),o.jsxs("span",{className:R.actions,children:[o.jsx("button",{type:"button",className:`${R.button} ${R.buttonPrimary} ${f?R.buttonDanger:""}`,onClick:de,"aria-label":F,title:F,children:o.jsx("span",{className:R.buttonLabel,children:c("reloadBannerReloadTargetCompact")})}),b&&o.jsx("button",{type:"button",className:`${R.button} ${R.buttonSafe}`,onClick:me,disabled:m,"aria-label":c("reloadBannerRestartWhenSafe"),title:c("reloadBannerRestartWhenSafe"),children:o.jsx("span",{className:R.buttonLabel,children:c("reloadBannerRestartWhenSafeCompact")})}),d&&s&&o.jsx("button",{type:"button",className:R.button,onClick:fe,disabled:m,"aria-label":c("reloadBannerCancelSafeRestart"),title:c("reloadBannerCancelSafeRestart"),children:o.jsx("span",{className:R.buttonLabel,children:c("reloadBannerCancelSafeRestartCompact")})}),o.jsx("button",{type:"button",className:`${R.button} ${R.dismiss}`,onClick:pe,"aria-label":c("reloadBannerDismiss"),title:c("reloadBannerDismiss"),children:o.jsx("span",{"aria-hidden":"true",children:"×"})})]})]})}const bn=new Set(["login","remote","share"]),Rn={kind:"localhost"},vn={kind:"secure"};function yn(e){const t=e.replace(/^\/+/,"").split("/")[0]??"";try{return decodeURIComponent(t)}catch{return t}}function En(e){const{pathname:t,remote:n}=e;if(!n)return be;const r=Xe(t);if(r){if(n.activeSourceKey&&n.currentRelayUsername===r)return n.activeSourceKey;const l=Oe(r);return l?V(l):N}const s=yn(t);if(bn.has(s)||s!==""&&!Je(s))return N;if(n.activeSourceKey&&n.currentDirectUrl)return n.activeSourceKey;const i=n.currentHostId?je(n.currentHostId):void 0;return(i==null?void 0:i.mode)==="direct"?V(i):n.currentDirectUrl?_t(n.currentDirectUrl):N}function Sn(){var m;const e=we(),t=U(),n=e!==null,r=(e==null?void 0:e.currentDirectUrl)??null,s=(e==null?void 0:e.currentHostId)??null,i=(e==null?void 0:e.currentRelayUsername)??null,l=(e==null?void 0:e.activeSourceKey)??null,a=_.useMemo(()=>{var c;return((c=e==null?void 0:e.nativeSource)==null?void 0:c.sourceKey)??En({pathname:t.pathname,remote:n?{currentDirectUrl:r,currentHostId:s,currentRelayUsername:i,activeSourceKey:l}:null})},[r,s,i,l,n,t.pathname,e==null?void 0:e.nativeSource]),u=((m=e==null?void 0:e.nativeSource)==null?void 0:m.registration)??(n?vn:Rn);return H().registerSourceTransport(a,u),ye()!==a&&K(a),_.useLayoutEffect(()=>{H().registerSourceTransport(a,u),K(a)},[a,u]),null}function Cn(){const{isAuthenticated:e,authEnabled:t,isLoading:n}=oe(),r=Be();_.useEffect(()=>{if(!(n||!(!t||e)))return ne.retainCurrentSourceStream(r.sourceKey,r.transport)},[r.sourceKey,r.transport,e,t,n])}const An=/^\(\d+\)\s*/,xn=/^\((?:●|○|\*| )\)\s*/u,j=["bold","plain"],ie=1500;function ce(e,t){return[...e].map(n=>{const r=n.codePointAt(0),s=t(r);return s===void 0?n:String.fromCodePoint(s)}).join("")}function Tn(e){return ce(e,t=>{if(t>=65&&t<=90)return 119808+t-65;if(t>=97&&t<=122)return 119834+t-97;if(t>=48&&t<=57)return 120782+t-48})}function wn(e){return ce(e,t=>{if(t>=119808&&t<=119833)return 65+t-119808;if(t>=119834&&t<=119859)return 97+t-119834;if(t>=120782&&t<=120791)return 48+t-120782})}function ue(e,t,n){return n?e.replace(/^([^:]+):/u,(r,s)=>{const i=wn(s);return`${t==="bold"?Tn(i):i}:`}):e}function te(e,t,n=/^[A-Za-z0-9_-]{1,12}:/u.test(e)){let r=at(e).replace(/^(?:◷)?🎙 /u,"");for(;;){const l=r.replace(An,"").replace(xn,"");if(l===r)break;r=l}const s=t?`${t} `:"",i=s&&r.startsWith(s)?r.slice(s.length):r;return ue(i,"plain",n)}function Bn(e,t,n,r,s=/^[A-Za-z0-9_-]{1,12}:/u.test(e),i=!1){const l=s&&i,a=[];t>0&&a.push(`(${t})`),n&&!l&&a.push(n==="bold"?"(●)":"(○)"),r&&a.push(r);const u=ue(e,l?n:"plain",s);return a.length>0?`${a.join(" ")} ${u}`:u}function Nn(e,t=Date.now()){const n=Math.max(0,t-e),r=Math.floor(n/ie)%j.length;return j[r]??j[0]}function kn(e){const t=_.useRef(null),{needsAttention:n,active:r}=Ee(),{tabTitleActivityEnabled:s}=ct(),{projectCodeNameActivityPulseEnabled:i}=it(),l=s&&r>0;return _.useEffect(()=>()=>{var u;const a=(u=document.querySelector("title"))==null?void 0:u.hasAttribute(k);document.title=z(te(document.title,e,a))},[e]),_.useEffect(()=>{l&&t.current===null?t.current=Date.now():l||(t.current=null);let a=null;const u=()=>{var g;const p=(g=document.querySelector("title"))==null?void 0:g.hasAttribute(k),d=te(document.title,e,p),f=t.current,b=l&&f!==null?Nn(f):void 0,h=ot()+z(Bn(d,n,b,e,p,i));document.title!==h&&(document.title=h)};u(),l&&(a=setInterval(()=>{u()},ie));const m=new MutationObserver(u),c=document.querySelector("title");return c&&m.observe(c,{childList:!0,characterData:!0,subtree:!0,attributes:!0,attributeFilter:[st,rt,k]}),()=>{m.disconnect(),a&&clearInterval(a)}},[n,e,i,l]),n}function Ln(){const{principal:e,resolved:t}=Ne(),{version:n}=w(),r=I(),s=Re(n,ve.limitedUserBrowserDefaults.name),i=t&&!e.switched?e.username:null;_.useEffect(()=>{if(!s||!i)return;let l=!1;return lt.getLimitedUserBrowserDefaults().then(({backup:a})=>{if(l||!a)return;const u=JSON.stringify([r,i]);dt(a,u)&&window.location.reload()}).catch(()=>{}),()=>{l=!0}},[s,i,r])}function Dn(){const e=new Map,t=()=>{for(const a of e.values())a.abort.abort()},n=Pe(),r=Ie(t),s={list:Me,forget:a=>He(void 0,a),cancel:a=>{for(const u of e.values())u.id===a&&u.abort.abort()},probe:async a=>{var v;const u=T();let m;try{m=await $e(a)}catch{return{outcome:"storage_failure"}}if(!m||u!==T()||!W())return{outcome:"unavailable"};const c=Fe(m.scope);if(e.has(c))return{outcome:"busy"};const p=new AbortController;e.set(c,{id:a,abort:p});let d,f;const b=[],h=()=>{d==null||d.close(),f==null||f.close()};p.signal.addEventListener("abort",h);const g=setTimeout(()=>p.abort(),Math.min(35e3,m.expiresAt-Date.now()));try{const y={diagnosticProbe:!0,isAttemptCurrent:()=>!p.signal.aborted&&u===T(),onResumeObservation:E=>{b.push(E),b.length>8&&b.shift()}};if(m.scope.mode==="relay"){if(f=await pt({relayUrl:m.scope.endpoint,relayUsername:m.scope.relayUsername??"",signal:p.signal}),p.signal.aborted)return{outcome:"cancelled"};d=await Y.forResumeOnlyWithSocket(f,m.session,y,{relayUrl:m.scope.endpoint,relayUsername:m.scope.relayUsername??""})}else d=Y.forResumeOnly(m.session,y);return p.signal.aborted?{outcome:"cancelled"}:(await d.fetch("/auth/status"),p.signal.aborted||u!==T()?{outcome:"cancelled"}:{outcome:"authenticated"})}catch(y){return{outcome:p.signal.aborted?"cancelled":((v=Se(y))==null?void 0:v.kind)??"connection_failed"}}finally{clearTimeout(g),h(),p.signal.removeEventListener("abort",h),e.delete(c);try{await Ke(a,u,b)}catch{}}}},i=()=>{W()?window.__YA_RESUME_DEBUG__=s:(t(),delete window.__YA_RESUME_DEBUG__)},l=Ue(i);return window.addEventListener("storage",i),i(),()=>{t(),n(),r(),l(),window.removeEventListener("storage",i),window.__YA_RESUME_DEBUG__===s&&delete window.__YA_RESUME_DEBUG__}}const On=_.lazy(()=>P(async()=>{const{CodexUpdatePrompt:e}=await import("./CodexUpdatePrompt-H0-B1yB-.js");return{CodexUpdatePrompt:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(({CodexUpdatePrompt:e})=>({default:e}))),jn=_.lazy(()=>P(async()=>{const{FloatingActionButton:e}=await import("./FloatingActionButton-Dm0404b2.js");return{FloatingActionButton:e}},__vite__mapDeps([11,1,2,3,12,6,7,13,4,5,8,14,15,16,17,18,19,10,20,21,22,23,24,25,26])).then(({FloatingActionButton:e})=>({default:e}))),Pn=_.lazy(()=>P(async()=>{const{OnboardingWizard:e}=await import("./index-DjQ2chjT.js");return{OnboardingWizard:e}},__vite__mapDeps([27,1,2,3,4,5,6,7,8])).then(({OnboardingWizard:e})=>({default:e})));function In({onComplete:e}){return re()?o.jsx(Pn,{onComplete:e}):null}function Un({children:e}){const t=U(),n=/\/sessions\/[^/]+/.test(t.pathname),{icon:r}=et(),{authEnabled:s,isAuthenticated:i,isLoading:l}=oe(),a=I();Cn(),_.useEffect(()=>{l||s&&!i||qe(a).catch(()=>{})},[s,l,i,a]),_.useEffect(()=>We(),[]),_.useEffect(()=>Dn(),[]),ut(),Ln(),kn(r??void 0);const{isManualReloadMode:u,pendingReloads:m,reloadBackend:c,reloadFrontend:p,scheduleSafeRestart:d,cancelSafeRestart:f,dismiss:b,unsafeToRestart:h,interruptibleSessionCount:g,queuedSessionMessageCount:v,safeRestartState:y,safeRestartMutating:E,backendReloadSafetyKnown:B}=mt(),S=re(),x=ft(!!u,m,{backendReloadSafetyKnown:B,canRestartServer:S});return o.jsxs(o.Fragment,{children:[o.jsx(Ut,{}),S&&o.jsx(Jt,{}),S&&o.jsx(Wt,{}),!l&&(!s||i)&&S&&o.jsx(Mn,{}),o.jsx(Dt,{}),!n&&o.jsx(Ye,{}),o.jsxs(_n,{avoidSessionComposer:n,children:[x.backend&&o.jsx(ee,{target:"backend",onReload:c,onDismiss:()=>b("backend"),onRestartWhenSafe:d,onCancelSafeRestart:f,unsafeToRestart:h,interruptibleSessionCount:g,queuedSessionMessageCount:v,safeRestartState:y,safeRestartMutating:E}),x.frontend&&o.jsx(ee,{target:"frontend",onReload:p,onDismiss:()=>b("frontend")})]}),o.jsx(kt,{disabled:n,onReload:p}),e,o.jsx(_.Suspense,{fallback:null,children:o.jsx(jn,{})})]})}function mr({children:e}){const{showWizard:t,isLoading:n,completeOnboarding:r}=Ce();return o.jsx(ke,{children:o.jsxs(Qe,{children:[o.jsx(Sn,{}),o.jsx(Le,{children:o.jsx(Ze,{children:o.jsx(tt,{children:o.jsxs(nt,{children:[o.jsx(Un,{children:e}),o.jsxs(_.Suspense,{fallback:null,children:[!n&&t&&o.jsx(In,{onComplete:r}),!n&&!t&&o.jsx(On,{})]})]})})})})]})})}function Mn(){const{version:e,error:t}=w(),n=I(),{t:r}=A();return t?null:o.jsx(Ae,{versionInfo:e,relayUsername:null,runtimeNotice:{runtime:e==null?void 0:e.serverRuntime,sourceKey:n,t:r}})}export{mr as App};
@@ -0,0 +1,2 @@
1
+ import{r as c,j as e}from"./clientSummaryStore-Dsgo1zWK.js";import{u as Gt,T as Xt}from"./useAcliCommentarySetting-B9uDJlBW.js";import{v as z,u as Bt,d as Wt,x as Zt,y as Vt,z as $t,A as Qt,C as Kt,D as Yt,E as qt,o as Jt,S as es,T as as,M as $a,F as Qa,G as re,H as ts,O as Ka,I as Ya,J as qa,K as ss,P as ns,Q as is,R as cs,V as os,W as Ja,X as rs,Y as ls,Z as ps,_ as us,$ as ds,a0 as ms,a1 as hs,a2 as gs,a3 as Ts,a4 as xs,a5 as bs,a6 as Ns,a7 as et,a8 as at,a9 as tt,aa as js,ab as st,ac as nt,ad as it,ae as Ss,af as ct,ag as ot,ah as rt,ai as lt,aj as pt,ak as ut,al as dt,am as mt,an as ht,ao as gt,ap as Tt,aq as xt,ar as _s,as as Es,at as fs,au as Ps,av as Cs,aw as Os,ax as vs,ay as ys}from"./main-BX4yZXDF.js";import{u as ks,a as Fs,b as Ls,r as Is,Q as As,S as P,I as ws}from"./FileViewer-D8IcGVo-.js";import{a as Ds,b as Us,H as bt,c as Nt,d as jt,D as le,e as Ms}from"./GlossaryContext-BA5X62Ck.js";import{u as Rs}from"./useProjectAppComposing-DBPyVUba.js";import{u as zs}from"./useFloatingActionButtonEnabled-BKJ8RfOu.js";import{u as Hs,a as Gs,b as Xs,c as Bs}from"./useWorkflowTags-CsPhaG2p.js";import{u as Ws,a as Zs,b as Vs,G as St,c as _t,d as Et,D as pe}from"./useGeneratedTitleLength-R5Q60VSi.js";import{u as $s}from"./LocalMediaModal-DMrKaM1a.js";import{S as n}from"./SettingsItem-BgyAjvy6.js";import{u as Qs,b as Ks,a as Ys,S as qs,g as ft,c as Pt,d as Js,s as en,e as an,f as Ct,h as Ot,i as vt,j as tn}from"./index-DnFlh5Zf.js";import{u as sn,d as nn}from"./Modal-CHNqXAgW.js";import{h as cn}from"./NavigationLayout-UkQvkodY.js";import{u as on}from"./useTabTitleActivityPreference-ZJ19N5_Q.js";import{C as u}from"./CommittedRangeInput-C6In6Q8s.js";import{C as H}from"./CommittedRangeNumberInput-DF-kPNGu.js";import{u as rn}from"./useComposerPromptRail-DcRpLRmu.js";import{u as ln}from"./useSessionRightPaneSetting-C5YgsyBy.js";import{u as pn}from"./usePanelSlideAnimations-XdQhGgr-.js";import{u as un}from"./frontendReload-B4jfUIeG.js";import{u as dn,p as C}from"./RenderModeContext-CuIMXqQV.js";import{s as yt,m as mn,S as hn}from"./index-BhTv6hAY.js";import"./react-runtime-D-UPQ57m.js";import"./sourceTransportPaths-BTR7eFi5.js";import"./text-B4tk85DK.js";import"./SessionMetadataContext-D0F_4Wp0.js";import"./appHref-ByaEnJGJ.js";import"./ViewerWindowActions-DV5bxAAy.js";import"./sessionVhostApps-DbEDY32Q.js";import"./newSessionPrefill-BC5a8IpP.js";import"./MarkdownPreview-TXbYZwdp.js";import"./RenderModeGlyph-ldDSjj9f.js";import"./katex-DLorvT8M.js";import"./uiTrace-CvAgW12D.js";import"./sessionViewerController-BGKUu-Zg.js";import"./sessionViewerPlacement-cjpznhMG.js";import"./CopyTextButton-oYhSruA8.js";import"./ProviderBadge-C-UpobLD.js";import"./relay-url-j3kYm5KO.js";import"./PageHeader-DYCnk788.js";import"./SessionHeader.module-DfkDdP3M.js";import"./HostIdentityContext-_GKYzEQ6.js";import"./index-BSMD-gHP.js";import"./limitedUserBrowserDefaults-CwcMxPe5.js";import"./remoteRoutePaths-DpabBbC6.js";import"./useSidebarWidth-op0qbgd4.js";import"./useFileActivity-CpuLfNl9.js";import"./YepAnywhereLogo-ccRUdgT-.js";function gn(){return{unicodeProseMathEnabled:c.useSyncExternalStore(z.subscribe,z.read,z.read),setUnicodeProseMathEnabled:z.set}}const Tn="$E=mc^2$";function i(o){return Number.isInteger(o),String(o)}function s(o,l,t){return{value:o,restore:G=>{const O=G;l(O),t==null||t(O)}}}function kt(o,l){switch(o){case"flat":return l("appearanceSettingsIconStyleFlat");case"flat-white":return l("appearanceSettingsIconStyleFlatWhite");case"emoji":return l("appearanceSettingsIconStyleEmoji")}}function Ft(o,l){switch(o){case"block":return l("appearanceQuoteReplyButtonsBlock");case"paragraph-hover":return l("appearanceQuoteReplyButtonsParagraphHover");case"paragraph-always":return l("appearanceQuoteReplyButtonsParagraphAlways")}}function di(){const{locale:o,setLocale:l,t}=Bt();Qs(t("appearanceSectionTitle"));const G=Wt(),O=sn(),{fontSizePercent:ue,setFontSizePercent:de}=Zt(),{sidebarSpacing:X,setSidebarSpacing:me}=Vt(),{outputFont:he,outputUiFont:ge,userTurnFontSizeOffsetPx:Te,tooltipFontSizeOffsetPx:xe,outputFontSizePx:m,outputFixedFont:be,outputFixedFontSizeOffsetPx:h,outputThinkingFontSizeOffsetPx:g,outputMathFontSizeOffsetPx:T,outputLineSpacingPercent:x,outputVerticalSpacingPercent:b,outputToolPreviewLineCount:N,setOutputFont:Ne,setOutputUiFont:je,setUserTurnFontSizeOffsetPx:Se,setTooltipFontSizeOffsetPx:_e,setOutputFontSizePx:B,setOutputFixedFont:Ee,setOutputFixedFontSizeOffsetPx:W,setOutputThinkingFontSizeOffsetPx:Z,setOutputMathFontSizeOffsetPx:V,setOutputLineSpacingPercent:$,setOutputVerticalSpacingPercent:Q,setOutputToolPreviewLineCount:K,resetOutputAppearance:Lt}=$t(),{tabSize:Y,setTabSize:fe}=Qt(),{contentMaxWidth:j,setContentMaxWidth:v}=Kt(),{widerConversationActivityPreviews:Pe,setWiderConversationActivityPreviews:Ce}=Hs(),{glossaryHintsEnabled:Oe,setGlossaryHintsEnabled:ve}=Ds(),{workflowTagsEnabled:ye,setWorkflowTagsEnabled:ke}=Gs(),{projectAppComposingEnabled:Fe,setProjectAppComposingEnabled:Le}=Rs(),{sessionRightPaneEnabled:Ie,setSessionRightPaneEnabled:Ae}=ln(),{pdfjsRendererEnabled:It,setPdfjsRendererEnabled:At}=ks(),{transcriptMarginNavigationEnabled:we,setTranscriptMarginNavigationEnabled:De}=Xs(),{composerPromptRailEnabled:Ue,setComposerPromptRailEnabled:Me}=rn(),{panelSlideAnimations:Re,setPanelSlideAnimations:ze}=pn(),{acliCommentaryEnabled:He,setAcliCommentaryEnabled:Ge}=Gt(),{version:Xe}=nn(),wt=yt(Xe,mn),{unicodeProseMathEnabled:Dt,setUnicodeProseMathEnabled:Ut}=gn(),Mt=yt(Xe,hn.unicodeProseMath.name),{hoverCardMaxHeightPx:d,setHoverCardMaxHeightPx:y}=Us(),{tooltipMode:q,tooltipDelayMs:Be,setTooltipMode:k,setTooltipDelayMs:J}=Yt(),{generatedTitleLength:S,setGeneratedTitleLength:F}=Ws(),{generatedTitleEnabled:ee,setGeneratedTitleEnabled:We}=Zs(),Ze=Ms(d,!0),[Ve,_]=c.useState(()=>String(j)),[$e,E]=c.useState(()=>String(d)),[Qe,f]=c.useState(()=>String(S)),[Ke,L]=c.useState(()=>i(m)),[Ye,I]=c.useState(()=>i(h)),[qe,A]=c.useState(()=>i(g)),[Je,w]=c.useState(()=>i(T)),[ea,D]=c.useState(()=>i(x)),[aa,U]=c.useState(()=>i(b)),[ta,M]=c.useState(()=>i(N)),{theme:ae,setTheme:sa}=qt(),{settingsIconStyle:te,setSettingsIconStyle:na}=Ks(),{compactMultiImageGalleries:ia,inlineMediaExpandedByDefault:ca,setCompactMultiImageGalleries:oa,setInlineMediaExpandedByDefault:ra}=$s(),{projectPaths:R,recentBasenames:la,mentionedDirectories:pa}=dn(),ua=C.recentBasenames.set,{quoteReplyButtonMode:se,setQuoteReplyButtonMode:da}=Fs(),{selectionQuoteActionEnabled:ma,setSelectionQuoteActionEnabled:ha,selectionTextCopyActionEnabled:ga,setSelectionTextCopyActionEnabled:Ta,selectionSourceCopyActionEnabled:xa,setSelectionSourceCopyActionEnabled:ba,selectionRichCopyActionEnabled:Na,setSelectionRichCopyActionEnabled:ja,selectionNewSessionActionEnabled:Sa,setSelectionNewSessionActionEnabled:_a}=Ls(),{funPhrasesEnabled:Ea,setFunPhrasesEnabled:fa}=Bs(),{floatingActionButtonEnabled:Pa,setFloatingActionButtonEnabled:Ca}=zs(),{sidebarDuplicateHidingEnabled:Oa,setSidebarDuplicateHidingEnabled:va}=cn(),{projectCodeNamesEnabled:ne,setProjectCodeNamesEnabled:ya,projectCodeNameActivityPulseEnabled:ka,setProjectCodeNameActivityPulseEnabled:Fa}=un(),{tabTitleActivityEnabled:ie,setTabTitleActivityEnabled:La}=on(),{composerBeaconEnabled:Ia,setComposerBeaconEnabled:Aa}=Vs(),{showConnectionBars:wa,setShowConnectionBars:Da}=Jt(),Rt=c.useMemo(()=>Is(Tn).html,[]),ce=[s(o,l),s(ue,de),s(X,me),s(he,Ne),s(ge,je),s(Te,Se),s(xe,_e),s(m,B,a=>L(i(a))),s(be,Ee),s(h,W,a=>I(i(a))),s(g,Z,a=>A(i(a))),s(T,V,a=>w(i(a))),s(x,$,a=>D(i(a))),s(b,Q,a=>U(i(a))),s(N,K,a=>M(i(a))),s(Y,fe),s(j,v,a=>_(String(a))),s(Pe,Ce),s(Oe,ve),s(ye,ke),s(Ie,Ae),s(Fe,Le),s(we,De),s(Ue,Me),s(Re,ze),s(He,Ge),s(Be,J),s(q,k),s(d,y,a=>E(String(a))),s(ee,We),s(S,F,a=>f(String(a))),s(ae,sa),s(te,na),s(ca,ra),s(ia,oa),s(la,ua),s(R,C.projectPaths.set),s(pa,C.mentionedDirectories.set),s(se,da),s(ma,ha),s(ga,Ta),s(xa,ba),s(Na,ja),s(Sa,_a),s(Ea,fa),s(Pa,Ca),s(Oa,va),s(ne,ya),s(ie,La),s(Ia,Aa),s(ka,Fa),s(wa,Da)],Ua=c.useRef(ce);Ua.current=ce;const zt=ce.map(a=>a.value),Ht=c.useCallback(a=>{Ua.current.forEach((p,oe)=>{p.restore(a[oe])})},[]);Ys(zt,Ht);const r=a=>t(a);c.useEffect(()=>{_(String(j))},[j]),c.useEffect(()=>{E(String(d))},[d]),c.useEffect(()=>{f(String(S))},[S]),c.useEffect(()=>{L(i(m))},[m]),c.useEffect(()=>{I(i(h))},[h]),c.useEffect(()=>{A(i(g))},[g]),c.useEffect(()=>{w(i(T))},[T]),c.useEffect(()=>{D(i(x))},[x]),c.useEffect(()=>{U(i(b))},[b]),c.useEffect(()=>{M(i(N))},[N]);const Ma=()=>{const a=Number.parseInt(Ve,10);v(Number.isFinite(a)?a:re)},Ra=()=>{const a=Number($e);y(Number.isFinite(a)?a:le)},za=()=>{const a=Number(Qe);F(Number.isFinite(a)?a:pe)},Ha=()=>{const a=Number(Ke);B(Number.isFinite(a)?a:fs)},Ga=()=>{const a=Number(Ye);W(Number.isFinite(a)?a:Cs)},Xa=()=>{const a=Number(qe);Z(Number.isFinite(a)?a:Ps)},Ba=()=>{const a=Number(Je);V(Number.isFinite(a)?a:Os)},Wa=()=>{const a=Number(ea);$(Number.isFinite(a)?a:vs)},Za=()=>{const a=Number(aa);Q(Number.isFinite(a)?a:ys)},Va=()=>{const a=Number(ta);K(Number.isFinite(a)?a:Es)};return e.jsx(qs,{keywords:["font","typography","text size","line spacing","sidebar layout density compact comfortable spacing","generated titles","conversation view activity previews thinking"],children:e.jsxs("div",{className:"settings-group",children:[e.jsx(n,{label:t("appearanceLanguageTitle"),description:t("appearanceLanguageDescription"),valueText:ft(o,r),children:e.jsx("select",{className:"settings-select",value:o,onChange:a=>l(a.target.value),"aria-label":t("appearanceLanguageTitle"),children:es.map(a=>e.jsx("option",{value:a,children:ft(a,r)},a))})}),e.jsx(n,{label:t("appearanceThemeTitle"),valueText:Pt(ae,r),children:e.jsx("div",{className:"font-size-selector",children:as.map(a=>e.jsx("button",{type:"button",className:`font-size-option ${ae===a?"active":""}`,onClick:()=>sa(a),children:Pt(a,r)},a))})}),e.jsx(n,{label:t("appearanceSettingsIconStyleTitle"),description:t("appearanceSettingsIconStyleDescription"),valueText:kt(te,r),className:"settings-item--wide-control",children:e.jsx("div",{className:"font-size-selector settings-icon-style-selector",role:"group","aria-label":t("appearanceSettingsIconStyleTitle"),children:Js.map(a=>{const p=te===a,oe=a==="emoji"?en["local-access"]:an["local-access"];return e.jsxs("button",{type:"button",className:`font-size-option settings-icon-style-option ${p?"active":""}`,onClick:()=>na(a),"aria-pressed":p,children:[e.jsx("span",{className:`settings-category-icon settings-category-icon-local-access settings-category-icon-${a} settings-icon-style-preview`,"aria-hidden":"true",children:oe}),e.jsx("span",{children:kt(a,r)})]},a)})})}),e.jsx(n,{label:t("appearanceContentWidthTitle"),description:t("appearanceContentWidthDescription"),className:"settings-item--wide-control",children:e.jsxs("div",{className:"settings-item-actions",children:[e.jsx(u,{min:Qa,max:$a,step:10,value:j,onDraftChange:a=>_(String(a)),onCommit:v,"aria-label":t("appearanceContentWidthTitle")}),e.jsxs("span",{className:"settings-input-unit",children:[e.jsx("input",{type:"number",className:"settings-input-small",min:Qa,max:$a,step:10,value:Ve,onChange:a=>_(a.target.value),onBlur:Ma,onKeyDown:a=>{a.key==="Enter"&&(Ma(),a.currentTarget.blur())},"aria-label":t("appearanceContentWidthTitle")}),t("appearanceContentWidthUnit")]}),e.jsx("button",{type:"button",className:"settings-inline-x",onClick:()=>{v(re),_(String(re))},"aria-label":t("appearanceContentWidthReset"),title:t("appearanceContentWidthReset"),children:"×"})]})}),e.jsx(n,{label:t("appearanceSidebarSpacingTitle"),description:t("appearanceSidebarSpacingDescription"),keywords:["sidebar spacing","layout","compact","comfortable"],valueText:Ct(X,r),className:"settings-item--wide-control",children:e.jsx("div",{className:"font-size-selector",role:"radiogroup","aria-label":t("appearanceSidebarSpacingTitle"),children:ts.map(a=>{const p=X===a;return e.jsx("button",{type:"button",className:`font-size-option ${p?"active":""}`,role:"radio","aria-checked":p,onClick:()=>me(a),children:Ct(a,r)},a)})})}),e.jsx(n,{label:t("appearanceOutputToolPreviewLinesLabel"),className:"settings-item--wide-control",children:e.jsxs("div",{className:"settings-item-actions",children:[e.jsx(u,{min:qa,max:Ya,step:Ka,value:N,onDraftChange:a=>M(i(a)),onCommit:K,"aria-label":t("appearanceOutputToolPreviewLinesLabel")}),e.jsxs("span",{className:"settings-input-unit",children:[e.jsx("input",{type:"number",className:"settings-input-small",min:qa,max:Ya,step:Ka,value:ta,onChange:a=>M(a.target.value),onBlur:Va,onKeyDown:a=>{a.key==="Enter"&&(Va(),a.currentTarget.blur())},"aria-label":t("appearanceOutputToolPreviewLinesLabel")}),t("appearanceOutputToolPreviewLinesUnit")]})]})}),e.jsx(n,{label:t("appearanceWiderActivityPreviewsTitle"),description:t("appearanceWiderActivityPreviewsDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Pe,onChange:a=>Ce(a.target.checked),"aria-label":t("appearanceWiderActivityPreviewsTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceTranscriptMarginNavigationTitle"),description:t("appearanceTranscriptMarginNavigationDescription"),keywords:["margin","click","right-click","outline","navigation"],children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:we,onChange:a=>De(a.target.checked),"aria-label":t("appearanceTranscriptMarginNavigationTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceComposerPromptRailTitle"),description:t("appearanceComposerPromptRailDescription"),keywords:["recent","prompt","history","drag","rail","composer"],children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Ue,onChange:a=>Me(a.target.checked),"aria-label":t("appearanceComposerPromptRailTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceSessionRightPaneTitle"),description:t("appearanceSessionRightPaneDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Ie,onChange:a=>Ae(a.target.checked),"aria-label":t("appearanceSessionRightPaneTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("projectAppWhileComposing"),description:t("appearanceProjectAppComposingDescription"),keywords:["project","app","new session","compose"],children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Fe,onChange:a=>Le(a.target.checked),"aria-label":t("projectAppWhileComposing")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearancePdfjsRendererTitle"),description:t("appearancePdfjsRendererDescription"),keywords:["pdf","pdf.js","document","viewer","blocked"],children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:It,onChange:a=>At(a.target.checked),"aria-label":t("appearancePdfjsRendererTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearancePanelSlideAnimationsTitle"),description:t("appearancePanelSlideAnimationsDescription"),keywords:["toolbar","sidebar","slide","animation","motion","app"],children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Re,onChange:a=>ze(a.target.checked),"aria-label":t("appearancePanelSlideAnimationsTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceWorkflowTagsTitle"),description:t("appearanceWorkflowTagsDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:ye,onChange:a=>ke(a.target.checked),"aria-label":t("appearanceWorkflowTagsTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("acliCommentarySetting"),description:t("acliCommentaryDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:He,onChange:a=>Ge(a.target.checked),"aria-label":t("acliCommentarySetting")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceTabSizeTitle"),description:t("appearanceTabSizeDescription"),valueText:Ot(Y),children:e.jsx("div",{className:"font-size-selector",children:ss.map(a=>e.jsx("button",{type:"button",className:`font-size-option ${Y===a?"active":""}`,onClick:()=>fe(a),children:Ot(a)},a))})}),e.jsxs(n,{label:t("appearanceGeneratedTitlesTitle"),description:t("appearanceGeneratedTitlesDescription"),keywords:[t("appearanceGeneratedTitleLengthTitle"),t("appearanceGeneratedTitleLengthDescription")],layout:"custom",baseClassName:"settings-item-group",className:"generated-title-settings",children:[e.jsxs("div",{className:"settings-item-group-row",children:[e.jsxs("div",{className:"settings-item-info",children:[e.jsx("strong",{children:t("appearanceGeneratedTitlesTitle")}),e.jsx("p",{children:t("appearanceGeneratedTitlesDescription")})]}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:ee,onChange:a=>We(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})]}),ee&&e.jsxs("div",{className:"settings-item-group-row settings-item-group-row--field settings-item-group-row--wide-control",children:[e.jsxs("div",{className:"settings-item-info",children:[e.jsx("strong",{children:t("appearanceGeneratedTitleLengthTitle")}),e.jsx("p",{children:t("appearanceGeneratedTitleLengthDescription")})]}),e.jsxs("div",{className:"settings-item-actions",children:[e.jsx(u,{min:Et,max:_t,step:St,value:S,onDraftChange:a=>f(String(a)),onCommit:F,"aria-label":t("appearanceGeneratedTitleLengthTitle")}),e.jsxs("span",{className:"settings-input-unit",children:[e.jsx("input",{type:"number",className:"settings-input-small",min:Et,max:_t,step:St,value:Qe,onChange:a=>f(a.target.value),onBlur:za,onKeyDown:a=>{a.key==="Enter"&&(za(),a.currentTarget.blur())},"aria-label":t("appearanceGeneratedTitleLengthTitle")}),t("appearanceGeneratedTitleLengthUnit")]}),e.jsx("button",{type:"button",className:"settings-inline-x",onClick:()=>{F(pe),f(String(pe))},"aria-label":t("appearanceGeneratedTitleLengthReset"),title:t("appearanceGeneratedTitleLengthReset"),children:"×"})]})]})]}),Mt&&e.jsx(n,{label:t("appearanceUnicodeMathTitle"),description:t("appearanceUnicodeMathDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Dt,onChange:a=>Ut(a.target.checked),"aria-label":t("appearanceUnicodeMathTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),wt&&e.jsx(n,{label:t("appearanceGlossaryHintsTitle"),description:t("appearanceGlossaryHintsDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Oe,onChange:a=>ve(a.target.checked),"aria-label":t("appearanceGlossaryHintsTitle")}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceTooltipDelayTitle"),description:t("appearanceTooltipDelayDescription"),className:"settings-item--wide-control settings-item--tooltip-control",children:e.jsxs("div",{className:"settings-item-actions tooltip-settings-actions",children:[e.jsxs("div",{className:"font-size-selector tooltip-mode-selector",role:"group","aria-label":t("appearanceTooltipModeTitle"),children:[e.jsx("button",{type:"button",className:`font-size-option ${q==="themed"?"active":""}`,onClick:()=>k("themed"),children:t("appearanceTooltipModeThemed")}),e.jsx("button",{type:"button",className:`font-size-option ${q==="native"?"active":""}`,onClick:()=>k("native"),children:t("appearanceTooltipModeNative")})]}),e.jsx(H,{id:"tooltip-delay",min:cs,max:is,step:ns,value:Be,unit:t("appearanceTooltipDelayUnit"),ariaLabel:t("appearanceTooltipDelayTitle"),onEdit:()=>k("themed"),onCommit:J}),e.jsx("button",{type:"button",className:"settings-inline-x",onClick:()=>{J(os)},"aria-label":t("appearanceTooltipReset"),title:t("appearanceTooltipReset"),children:"×"})]})}),e.jsx(n,{label:t("appearanceHoverCardHeightTitle"),description:t("appearanceHoverCardHeightDescription"),className:"settings-item--wide-control",children:e.jsxs("div",{className:"settings-item-actions",children:[e.jsx(u,{min:jt,max:Nt,step:bt,value:d,onDraftChange:a=>E(String(a)),onCommit:y,"aria-label":t("appearanceHoverCardHeightTitle")}),e.jsxs("span",{className:"settings-input-unit",children:[e.jsx("input",{type:"number",className:"settings-input-small",min:jt,max:Nt,step:bt,value:$e,onChange:a=>E(a.target.value),onBlur:Ra,onKeyDown:a=>{a.key==="Enter"&&(Ra(),a.currentTarget.blur())},"aria-label":t("appearanceHoverCardHeightTitle")}),t("appearanceHoverCardHeightUnit")]}),e.jsxs("span",{className:"settings-hovercard-lines",children:["(",Ze," ",t(Ze===1?"appearanceHoverCardLineUnit":"appearanceHoverCardLinesUnit"),")"]}),e.jsx("button",{type:"button",className:"settings-inline-x",onClick:()=>{y(le),E(String(le))},"aria-label":t("appearanceHoverCardReset"),title:t("appearanceHoverCardReset"),children:"×"})]})}),e.jsx(n,{label:t("appearanceInlineImagesTitle"),description:t("appearanceInlineImagesDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:ca,onChange:a=>ra(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceImageGalleriesTitle"),description:t("appearanceImageGalleriesDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceImageGalleriesTitle"),checked:ia,onChange:a=>oa(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceProjectPathLinksTitle"),description:t("appearanceProjectPathLinksDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceProjectPathLinksTitle"),checked:R,onChange:a=>C.projectPaths.set(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceMentionedDirectoriesTitle"),description:t("appearanceMentionedDirectoriesDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceMentionedDirectoriesTitle"),checked:pa,disabled:!R,onChange:a=>C.mentionedDirectories.set(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceRecentProjectPathLinksTitle"),description:t("appearanceRecentProjectPathLinksDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceRecentProjectPathLinksTitle"),disabled:!R,checked:la,onChange:a=>ua(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceQuoteReplyButtonsTitle"),description:t("appearanceQuoteReplyButtonsDescription"),valueText:Ft(se,r),className:"settings-item--wide-control",children:e.jsx("div",{className:"font-size-selector",role:"radiogroup","aria-label":t("appearanceQuoteReplyButtonsTitle"),children:As.map(a=>{const p=se===a;return e.jsx("button",{type:"button",className:`font-size-option ${p?"active":""}`,role:"radio","aria-checked":p,onClick:()=>da(a),children:Ft(a,r)},a)})})}),e.jsxs(n,{label:t("appearanceSelectionQuoteActionTitle"),description:t("appearanceSelectionQuoteActionDescription"),children:[e.jsx(P,{kind:"quote",label:t("sessionQuoteSelection"),specimen:!0}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceSelectionQuoteActionTitle"),checked:ma,onChange:a=>ha(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})]}),e.jsxs(n,{label:t("appearanceSelectionTextCopyActionTitle"),description:t("appearanceSelectionTextCopyActionDescription"),children:[e.jsx(P,{kind:"text",label:t("sessionCopySelectionText"),specimen:!0}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceSelectionTextCopyActionTitle"),checked:ga,onChange:a=>Ta(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})]}),e.jsxs(n,{label:t("appearanceSelectionSourceCopyActionTitle"),description:t("appearanceSelectionSourceCopyActionDescription"),children:[e.jsx(P,{kind:"source",label:t("sessionCopySelectionSource"),specimen:!0}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceSelectionSourceCopyActionTitle"),checked:xa,onChange:a=>ba(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})]}),e.jsxs(n,{label:t("appearanceSelectionRichCopyActionTitle"),description:t("appearanceSelectionRichCopyActionDescription"),children:[e.jsx(P,{kind:"rich",label:t("sessionCopySelectionRich"),specimen:!0}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceSelectionRichCopyActionTitle"),checked:Na,onChange:a=>ja(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})]}),e.jsxs(n,{label:t("appearanceSelectionNewSessionActionTitle"),description:t("appearanceSelectionNewSessionActionDescription"),children:[e.jsx(P,{kind:"newSession",label:t("sessionNewSessionFromSelection"),specimen:!0}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceSelectionNewSessionActionTitle"),checked:Sa,onChange:a=>_a(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})]}),e.jsx(n,{label:t("appearanceFunPhrasesTitle"),description:t("appearanceFunPhrasesDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Ea,onChange:a=>fa(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceFloatingActionButtonTitle"),description:t("appearanceFloatingActionButtonDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Pa,onChange:a=>Ca(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceSidebarDuplicateHidingTitle"),description:t("appearanceSidebarDuplicateHidingDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:Oa,onChange:a=>va(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceProjectCodeNamesTitle"),description:t("appearanceProjectCodeNamesDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:ne,onChange:a=>ya(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceTabTitleActivityTitle"),description:t("appearanceTabTitleActivityDescription"),children:e.jsx("div",{className:"settings-item-actions",children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:ie,onChange:a=>La(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})})}),e.jsx(n,{label:t("appearanceProjectCodeNameActivityPulseTitle"),description:t("appearanceProjectCodeNameActivityPulseDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:ka,disabled:!ne||!ie,onChange:a=>Fa(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceComposerBeaconTitle"),description:t("appearanceComposerBeaconDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox","aria-label":t("appearanceComposerBeaconTitle"),checked:Ia,onChange:a=>Aa(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceConnectionBarsTitle"),description:t("appearanceConnectionBarsDescription"),children:e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:wa,onChange:a=>Da(a.target.checked)}),e.jsx("span",{className:"toggle-slider"})]})}),e.jsx(n,{label:t("appearanceToolbarSettingsShortcutTitle"),description:t("appearanceToolbarSettingsShortcutDescription"),children:e.jsx("div",{className:"settings-item-actions",children:e.jsx("button",{type:"button",className:"settings-button",onClick:()=>G(`${O}/settings/toolbar`),children:t("appearanceToolbarSettingsShortcutAction")})})}),e.jsx(n,{label:t("appearanceOutputTypographyTitle"),keywords:[t("appearanceOutputUiFontLabel"),t("appearanceFontSizeTitle"),t("appearanceUserTurnSizeOffsetLabel"),t("appearanceTooltipSizeOffsetLabel"),t("appearanceOutputFontLabel"),t("appearanceOutputFontSizeLabel"),t("appearanceOutputThinkingSizeOffsetLabel"),t("appearanceOutputFixedFontLabel"),t("appearanceOutputFixedSizeOffsetLabel"),t("appearanceOutputMathSizeOffsetLabel"),t("appearanceOutputLineSpacingLabel"),t("appearanceOutputVerticalSpacingLabel")],layout:"custom",className:"output-appearance-settings",children:e.jsxs("div",{className:"output-appearance-panel",children:[e.jsxs("div",{className:"output-appearance-controls",children:[e.jsx("div",{className:"output-appearance-title settings-item-info",children:e.jsx("strong",{children:t("appearanceOutputTypographyTitle")})}),e.jsxs("div",{className:"output-appearance-control",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputUiFontLabel")}),e.jsx("div",{className:"font-size-selector output-font-selector",children:Ja.map(a=>e.jsx("button",{type:"button",className:`font-size-option output-font-option output-font-option-${a} ${ge===a?"active":""}`,onClick:()=>je(a),children:vt(a,r)},a))})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"ui-font-scale",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceFontSizeTitle")}),e.jsx(H,{id:"ui-font-scale",min:ds,max:us,numberMin:ps,numberMax:ls,step:rs,value:ue,unit:"%",list:"ui-font-scale-presets",ariaLabel:t("appearanceFontSizeTitle"),snapTextToStep:!1,onCommit:de})]}),e.jsx("datalist",{id:"ui-font-scale-presets",children:ms.map(a=>e.jsx("option",{value:a,label:`${a}%`},a))}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"user-turn-font-size-offset",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceUserTurnSizeOffsetLabel")}),e.jsx(H,{id:"user-turn-font-size-offset",min:Ts,max:gs,step:hs,value:Te,unit:"px",ariaLabel:t("appearanceUserTurnSizeOffsetLabel"),onCommit:Se})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"tooltip-font-size-offset",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceTooltipSizeOffsetLabel")}),e.jsx(H,{id:"tooltip-font-size-offset",min:Ns,max:bs,step:xs,value:xe,unit:"px",ariaLabel:t("appearanceTooltipSizeOffsetLabel"),onCommit:_e})]}),e.jsxs("div",{className:"output-appearance-control",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputFontLabel")}),e.jsx("div",{className:"font-size-selector output-font-selector",children:Ja.map(a=>e.jsx("button",{type:"button",className:`font-size-option output-font-option output-font-option-${a} ${he===a?"active":""}`,onClick:()=>Ne(a),children:vt(a,r)},a))})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"output-font-size",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputFontSizeLabel")}),e.jsxs("span",{className:"output-appearance-slider-row",children:[e.jsx(u,{id:"output-font-size",min:tt,max:at,step:et,value:m,list:"output-font-size-presets",onDraftChange:a=>L(i(a)),onCommit:B}),e.jsxs("span",{className:"output-appearance-number-wrap",children:[e.jsx("input",{type:"number",className:"settings-input-small output-appearance-number",min:tt,max:at,step:et,value:Ke,onChange:a=>L(a.target.value),onBlur:Ha,onKeyDown:a=>{a.key==="Enter"&&(Ha(),a.currentTarget.blur())},"aria-label":t("appearanceOutputFontSizeLabel")}),e.jsx("span",{className:"output-appearance-unit",children:"px"})]})]})]}),e.jsx("datalist",{id:"output-font-size-presets",children:js.map(a=>e.jsx("option",{value:a.value,label:a.label},a.value))}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"output-thinking-size-offset",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputThinkingSizeOffsetLabel")}),e.jsxs("span",{className:"output-appearance-slider-row",children:[e.jsx(u,{id:"output-thinking-size-offset",min:it,max:nt,step:st,value:g,onDraftChange:a=>A(i(a)),onCommit:Z}),e.jsxs("span",{className:"output-appearance-number-wrap",children:[e.jsx("input",{type:"number",className:"settings-input-small output-appearance-number",min:it,max:nt,step:st,value:qe,onChange:a=>A(a.target.value),onBlur:Xa,onKeyDown:a=>{a.key==="Enter"&&(Xa(),a.currentTarget.blur())},"aria-label":t("appearanceOutputThinkingSizeOffsetLabel")}),e.jsx("span",{className:"output-appearance-unit",children:"px"})]})]})]}),e.jsxs("div",{className:"output-appearance-control",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputFixedFontLabel")}),e.jsx("div",{className:"font-size-selector output-font-selector",children:Ss.map(a=>e.jsx("button",{type:"button",className:`font-size-option output-font-option output-fixed-font-option-${a} ${be===a?"active":""}`,onClick:()=>Ee(a),children:tn(a,r)},a))})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"output-fixed-size-offset",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputFixedSizeOffsetLabel")}),e.jsxs("span",{className:"output-appearance-slider-row",children:[e.jsx(u,{id:"output-fixed-size-offset",min:rt,max:ot,step:ct,value:h,onDraftChange:a=>I(i(a)),onCommit:W}),e.jsxs("span",{className:"output-appearance-number-wrap",children:[e.jsx("input",{type:"number",className:"settings-input-small output-appearance-number",min:rt,max:ot,step:ct,value:Ye,onChange:a=>I(a.target.value),onBlur:Ga,onKeyDown:a=>{a.key==="Enter"&&(Ga(),a.currentTarget.blur())},"aria-label":t("appearanceOutputFixedSizeOffsetLabel")}),e.jsx("span",{className:"output-appearance-unit",children:"px"})]})]})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"output-math-size-offset",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputMathSizeOffsetLabel")}),e.jsxs("span",{className:"output-appearance-slider-row",children:[e.jsx(u,{id:"output-math-size-offset",min:ut,max:pt,step:lt,value:T,onDraftChange:a=>w(i(a)),onCommit:V}),e.jsxs("span",{className:"output-appearance-number-wrap",children:[e.jsx("input",{type:"number",className:"settings-input-small output-appearance-number",min:ut,max:pt,step:lt,value:Je,onChange:a=>w(a.target.value),onBlur:Ba,onKeyDown:a=>{a.key==="Enter"&&(Ba(),a.currentTarget.blur())},"aria-label":t("appearanceOutputMathSizeOffsetLabel")}),e.jsx("span",{className:"output-appearance-unit",children:"px"})]})]})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"output-line-spacing",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputLineSpacingLabel")}),e.jsxs("span",{className:"output-appearance-slider-row",children:[e.jsx(u,{id:"output-line-spacing",min:ht,max:mt,step:dt,value:x,onDraftChange:a=>D(i(a)),onCommit:$}),e.jsxs("span",{className:"output-appearance-number-wrap",children:[e.jsx("input",{type:"number",className:"settings-input-small output-appearance-number",min:ht,max:mt,step:dt,value:ea,onChange:a=>D(a.target.value),onBlur:Wa,onKeyDown:a=>{a.key==="Enter"&&(Wa(),a.currentTarget.blur())},"aria-label":t("appearanceOutputLineSpacingLabel")}),e.jsx("span",{className:"output-appearance-unit",children:"%"})]})]})]}),e.jsxs("label",{className:"output-appearance-control",htmlFor:"output-vertical-spacing",children:[e.jsx("span",{className:"output-appearance-label",children:t("appearanceOutputVerticalSpacingLabel")}),e.jsxs("span",{className:"output-appearance-slider-row",children:[e.jsx(u,{id:"output-vertical-spacing",min:xt,max:Tt,step:gt,value:b,onDraftChange:a=>U(i(a)),onCommit:Q}),e.jsxs("span",{className:"output-appearance-number-wrap",children:[e.jsx("input",{type:"number",className:"settings-input-small output-appearance-number",min:xt,max:Tt,step:gt,value:aa,onChange:a=>U(a.target.value),onBlur:Za,onKeyDown:a=>{a.key==="Enter"&&(Za(),a.currentTarget.blur())},"aria-label":t("appearanceOutputVerticalSpacingLabel")}),e.jsx("span",{className:"output-appearance-unit",children:"%"})]})]})]})]}),e.jsxs("div",{className:"output-appearance-specimen",children:[e.jsxs("div",{className:"output-appearance-specimen-header",children:[e.jsx("span",{className:"output-appearance-specimen-label",children:t("appearanceOutputSpecimenLabel")}),e.jsx("button",{type:"button",className:"settings-button settings-button-secondary",onClick:Lt,children:t("appearanceOutputTypographyReset")})]}),e.jsxs("div",{className:"output-appearance-preview",role:"region","aria-label":t("appearanceOutputPreviewLabel"),children:[e.jsx("div",{className:_s.specimen,"data-tooltip-specimen":!0,children:t("appearanceTooltipPreview")}),e.jsxs("div",{className:"output-preview-system",children:[e.jsx("span",{className:"output-preview-system-icon",children:"ok"}),e.jsx("span",{children:"System note: applied after reconnect."})]}),e.jsxs("div",{className:"output-preview-prose",children:[e.jsxs("p",{children:["Inline code like ",e.jsx("code",{children:"codex update"})," stays fixed width; prose wraps at phone width."]}),e.jsx("pre",{className:"output-preview-fixed",children:e.jsx("code",{children:`f0 = (x: 0) => ({ ok: x + 1 });
2
+ fn S(v) -> { return v[0] ?? false }`})}),e.jsxs("p",{children:["Inline math:"," ",e.jsx(ws,{as:"span",className:"output-preview-math",trustedHtml:Rt})]}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Tokens: ",e.jsx("code",{children:"fixed width"})]}),e.jsx("li",{children:"Math uses a TeX-like face."})]})]}),e.jsx("div",{className:"output-preview-thinking thinking-content",children:e.jsx(Xt,{text:"**Spacing** — thinking text stays quieter and smaller."})}),e.jsxs("div",{className:"output-preview-diff","aria-hidden":"true",children:[e.jsxs("div",{children:[e.jsx("span",{className:"output-preview-diff-gutter",children:"+"}),e.jsx("span",{children:"Diff prose follows the prose font."})]}),e.jsxs("div",{children:[e.jsx("span",{className:"output-preview-diff-gutter",children:"-"}),e.jsx("span",{children:"Paragraph space can be dialed down."})]})]}),e.jsxs("div",{className:"output-preview-ui","aria-hidden":"true",children:[e.jsx("div",{className:"output-preview-ui-title",children:"Session title — uses the UI font and size"}),e.jsx("div",{className:"output-preview-ui-composer",children:"Composer: type a message to the agent…"}),e.jsx("div",{className:"message message-user-prompt",children:e.jsx("div",{className:"text-block",children:t("appearanceUserTurnPreview")})}),e.jsx("div",{className:"output-preview-ui-caption",children:"Caption · updated 2m ago · 3 files"})]})]})]})]})})]})})}export{di as AppearanceSettings};
@@ -1,4 +1,4 @@
1
- import{r as c,j as e,d as we}from"./clientSummaryStore-Cr4yWo-Y.js";import{u as B,c as Fe,w as Oe,L as $e}from"./main-BpQ_EIjC.js";import{d as ae,b as ee,f as De,M as Te,u as Be,e as Me}from"./Modal-iT2_XPlO.js";import{C as _e}from"./CommittedRangeNumberInput-Co1Mkg_Y.js";import{S as ve,u as Ue}from"./index-DvjdkG8Q.js";import{u as qe}from"./useVhostAccess-D6l6YouM.js";import{d as ze,s as Ge,R as Je}from"./sessionVhostApps-DJY4ZLda.js";import{p as he,P as Ke}from"./ProjectAppViewer-D_8Lq6Oy.js";import{s as Xe,b as We,c as Ye}from"./text-B4tk85DK.js";import{s as Z,S as Q}from"./index-C-4wHkcA.js";import{a as Ze}from"./appHref-ByaEnJGJ.js";import"./react-runtime-D-UPQ57m.js";import"./remoteRoutePaths-Crh_32jX.js";import"./CommittedRangeInput-CLkpNnP_.js";import"./PageHeader-Dbb8BZq2.js";import"./SessionHeader.module-Co1boPaC.js";import"./HostIdentityContext-B3FgYv0w.js";import"./NavigationLayout-BpvrdPoS.js";import"./useSidebarWidth-DnB-wKom.js";import"./frontendReload-54GeNGj9.js";import"./usePanelSlideAnimations-C5qJWoVe.js";import"./useFileActivity-Y1m-dClR.js";import"./GlossaryContext-PMCo1K6f.js";import"./ProviderBadge-DmhZSMRX.js";import"./YepAnywhereLogo-CIpZ5dke.js";import"./index-D73NQkRu.js";import"./limitedUserBrowserDefaults-C6cuD-wF.js";import"./sourceTransportPaths-COX454wy.js";import"./newSessionPrefill-CHZfBHqQ.js";import"./ViewerWindowActions-DM1Jwlo9.js";function Se(t){return t.kind==="entra"?"Microsoft":t.issuer==="https://accounts.google.com"?"Google":t.issuer?new URL(t.issuer).hostname:"OpenID Connect"}function Y(t,a){return t&&Object.hasOwn(t,a)?t[a]:void 0}function Qe(t,a){var n;const s=(n=t[a])==null?void 0:n.trim().toLowerCase();if(!s)return;const o=s.split("@");if(o.length===2)return t.find((r,p)=>{if(p===a)return!1;const d=r.trim().toLowerCase();if(d===s)return p<a;const k=d.split("@");return k.length===2&&k.every((f,h)=>f==="*"||!f.includes("*")&&f===o[h])})}const et="_fields_v3hjp_1",tt="_toggle_v3hjp_18",st="_vhostRow_v3hjp_23",nt="_expiry_v3hjp_42",it="_provider_v3hjp_60",at="_vhosts_v3hjp_73",ot="_vhostHeading_v3hjp_80",rt="_vhostHeader_v3hjp_86",lt="_vhostIntro_v3hjp_94",ct="_password_v3hjp_133",dt="_pathField_v3hjp_146",pt="_domainSuffix_v3hjp_149",ht="_domainName_v3hjp_154",ut="_table_v3hjp_163",vt="_linksHeader_v3hjp_170",mt="_links_v3hjp_170",ft="_linksCell_v3hjp_178",jt="_withLinkIcon_v3hjp_184",xt="_linkIcon_v3hjp_193",gt="_linkIconLabel_v3hjp_208",bt="_target_v3hjp_231",kt="_accessButton_v3hjp_245",yt="_oauthBlocked_v3hjp_260",_t="_linkedFiles_v3hjp_270",St="_access_v3hjp_245",y={fields:et,toggle:tt,vhostRow:st,expiry:nt,provider:it,vhosts:at,vhostHeading:ot,vhostHeader:rt,vhostIntro:lt,password:ct,pathField:dt,domainSuffix:pt,domainName:ht,table:ut,linksHeader:vt,links:mt,linksCell:ft,withLinkIcon:jt,linkIcon:xt,linkIconLabel:gt,target:bt,accessButton:kt,oauthBlocked:yt,linkedFiles:_t,access:St},Ct="_inventory_17p18_1",It="_heading_17p18_15",At="_row_17p18_39",Ot="_deleteActions_17p18_44",Pt="_table_17p18_50",K={inventory:Ct,heading:It,row:At,deleteActions:Ot,table:Pt},Rt="_root_sc9xb_1",Nt="_collection_sc9xb_6",Et="_open_sc9xb_12",Lt="_list_sc9xb_15",Vt="_detail_sc9xb_68",Ht="_heading_sc9xb_78",G={root:Rt,collection:Nt,open:Et,list:Lt,detail:Vt,heading:Ht};function Pe(t){return{"data-expandable":"",onClick(a){var o;const s=a.target.closest("a, button, input, select, textarea, label, summary");s&&a.currentTarget.contains(s)||(o=window.getSelection())!=null&&o.toString()||t()}}}function Re({children:t,selectedKey:a,title:s,detail:o,onClose:n,actions:r}){const{t:p}=B(),d=c.useId(),k=c.useRef(null),f=c.useRef(null);c.useEffect(()=>{var j;a!==null&&(f.current=document.activeElement,(j=k.current)==null||j.focus())},[a]);function h(){n(),requestAnimationFrame(()=>{var j;return(j=f.current)==null?void 0:j.focus()})}return e.jsx("div",{className:G.root,children:e.jsxs("div",{className:`${G.collection} ${a!==null?G.open:""}`,children:[e.jsx("div",{className:G.list,children:t}),a!==null&&e.jsxs("section",{className:G.detail,"aria-labelledby":d,children:[e.jsxs("div",{className:G.heading,children:[e.jsx("h4",{id:d,children:s}),r,e.jsx("button",{ref:k,type:"button",onClick:h,"aria-label":p("settingsCollectionMinimize"),title:p("settingsCollectionMinimize"),children:e.jsx("span",{"aria-hidden":"true",children:"_"})})]}),o]})]})})}const wt="_path_1lwvm_1",Ft="_prefix_1lwvm_7",$t="_parent_1lwvm_8",Dt="_name_1lwvm_9",Tt="_tail_1lwvm_17",X={path:wt,prefix:Ft,parent:$t,name:Dt,tail:Tt};function Ne({path:t}){const a=Xe(We(t)),{dir:s,name:o}=Ye(a),n=s.slice(0,-1).lastIndexOf("/")+1,r=s.slice(0,n),p=s.slice(n);return e.jsxs("span",{className:X.path,title:t,children:[r&&e.jsx("span",{className:X.prefix,children:r}),e.jsxs("span",{className:X.tail,children:[p&&e.jsx("span",{className:X.parent,children:p}),e.jsx("span",{className:X.name,children:o})]})]})}const Bt="_header_z7gz9_1",Mt="_button_z7gz9_1",Ce={header:Bt,button:Mt};function Ee(){const[t,a]=c.useState(null);function s(n){a(r=>({column:n,direction:(r==null?void 0:r.column)===n&&r.direction==="ascending"?"descending":"ascending"}))}function o(n,r){if(!t)return n;const p=t.direction==="ascending"?1:-1;return[...n].sort((d,k)=>{const f=r(d,t.column),h=r(k,t.column);return p*(typeof f=="number"&&typeof h=="number"?f-h:String(f).localeCompare(String(h),void 0,{numeric:!0,sensitivity:"base"}))})}return{sort:t,onSort:s,sortedRows:o}}function q({column:t,label:a,sort:s,onSort:o}){const n=(s==null?void 0:s.column)===t?s.direction:"none";return e.jsx("th",{className:Ce.header,scope:"col","aria-sort":n,children:e.jsxs("button",{type:"button",className:Ce.button,onClick:()=>o(t),children:[a,e.jsx("span",{"aria-hidden":"true",children:n==="ascending"?"↑":n==="descending"?"↓":"↕"})]})})}function Ut(){const{version:t}=ae(),{t:a}=B(),s=Z(t,Q.projectAppInventory.name),o=Z(t,Q.projectAppDeletion.name),[n,r]=c.useState(null),[p,d]=c.useState(""),[k,f]=c.useState(0),[h,j]=c.useState(!1),[O,A]=c.useState(!1),[E,g]=c.useState(),P=Ee();c.useEffect(()=>{if(!s)return;let l=!0;return j(!0),he.inventory().then(v=>{l&&r(v)}).catch(v=>{l&&d(v instanceof Error?v.message:String(v))}).finally(()=>{l&&j(!1)}),()=>{l=!1}},[s,k]);const C=new Set(n==null?void 0:n.projects.map(l=>l.projectId)),_=n==null?void 0:n.projects.find(l=>l.projectId===E),N=(n==null?void 0:n.reservations.filter(l=>!C.has(l.projectId)))??[],L=P.sortedRows([...((n==null?void 0:n.projects)??[]).map(l=>({key:l.projectId,project:l,retained:void 0,name:l.name,path:l.path,status:a("projectAppState",{state:l.info.state}),addresses:n.reservations.filter(v=>v.projectId===l.projectId)})),...N.map(l=>({key:`${l.projectId}:${l.namespace}`,project:void 0,retained:l,name:a("projectAppInventoryUnavailable",{owner:l.owner}),path:"",status:a("projectAppRelease"),addresses:[l]}))],(l,v)=>v==="project"?l.name:v==="folder"?l.path:v==="status"?l.status:l.addresses.map(I=>`${I.name}.${I.namespace}`).sort().join(" "));async function w(l){if(window.confirm(a("projectAppReleaseConfirm",{address:`${l.name}.${l.namespace}`}))){A(!0),d("");try{await he.releaseAddress(l.projectId,l.namespace),f(v=>v+1)}catch(v){d(v instanceof Error?v.message:String(v))}finally{A(!1)}}}async function M(l){if(!(!_||O)&&window.confirm(a(l?"projectAppDeleteProjectConfirm":"projectAppDeleteAppConfirm",{name:_.name}))){A(!0),d("");try{await he.deleteApp(_.projectId),l&&await Fe.deleteProject(_.projectId),g(void 0),f(v=>v+1)}catch(v){d(v instanceof Error?v.message:String(v)),f(I=>I+1)}finally{A(!1)}}}return e.jsxs("section",{className:K.inventory,"aria-label":a("projectAppInventoryTitle"),children:[e.jsxs("div",{className:K.heading,children:[e.jsx("h3",{children:a("projectAppInventoryTitle")}),s&&e.jsx("button",{type:"button",disabled:h||O,onClick:()=>{d(""),f(l=>l+1)},children:a("projectAppInventoryRefresh")})]}),e.jsx("p",{children:a(s?"projectAppInventoryHint":"projectAppInventoryUpdate")}),p&&e.jsx("p",{role:"alert",children:p}),h&&e.jsx("p",{role:"status",children:a("projectAppLoading")}),s&&n&&e.jsxs(e.Fragment,{children:[n.projects.length===0&&N.length===0&&e.jsx("p",{children:a("projectAppInventoryEmpty")}),e.jsx(Re,{selectedKey:(_==null?void 0:_.projectId)??null,title:(_==null?void 0:_.name)??"",onClose:()=>g(void 0),actions:_&&o?e.jsxs("span",{className:K.deleteActions,children:[e.jsx("button",{type:"button",disabled:O,title:a("projectAppDeleteAppTitle"),onClick:()=>void M(!1),children:a("projectAppDeleteApp")}),e.jsx("button",{type:"button",disabled:O,title:a("projectAppDeleteProject"),onClick:()=>void M(!0),children:a("projectAppDeleteProject")})]}):void 0,detail:n.projects.map(l=>E===l.projectId&&e.jsxs("article",{className:K.row,children:[!o&&e.jsx("p",{children:a("projectAppDeleteUpdate")}),e.jsxs("p",{children:[l.owner??a("projectAppInventoryAdministrator")," ·"," ",e.jsx("code",{children:l.path})]}),n.reservations.filter(v=>v.projectId===l.projectId).map(v=>{var I;return e.jsxs("p",{children:[e.jsxs("strong",{children:[v.name,".",v.namespace]}),!((I=t==null?void 0:t.artifactViewer)!=null&&I.vhostPublicRoot)&&e.jsx("button",{type:"button",disabled:O,onClick:()=>void w(v),children:a("projectAppRelease")})]},v.namespace)}),E===l.projectId&&e.jsx(Ke,{projectId:l.projectId,presentation:"settings",onAddressesChanged:v=>r(I=>I&&v.enabled?{...I,reservations:[...I.reservations.filter($=>$.projectId!==l.projectId),...v.reservations.map($=>({...$,projectId:l.projectId}))]}:I),onInfoChanged:v=>r(I=>I&&{...I,projects:I.projects.map($=>$.projectId===l.projectId?{...$,info:v}:$)})},`${l.projectId}:${k}`)]},l.projectId)),children:e.jsxs("table",{className:K.table,"aria-label":a("projectAppInventoryTitle"),children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(q,{column:"project",label:a("settingsCollectionProject"),...P}),e.jsx(q,{column:"folder",label:a("settingsCollectionFolder"),...P}),e.jsx(q,{column:"domain",label:a("settingsCollectionDomain"),...P}),e.jsx(q,{column:"status",label:a("settingsCollectionStatus"),...P})]})}),e.jsx("tbody",{children:L.map(l=>{var $;const v=($=l.project)==null?void 0:$.projectId,I=v===void 0?void 0:()=>g(E===v?void 0:v);return e.jsxs("tr",{...I&&Pe(I),children:[e.jsx("td",{children:l.project?e.jsxs("button",{type:"button","aria-expanded":E===l.project.projectId,onClick:I,children:[e.jsxs("span",{"aria-hidden":"true",children:[E===l.project.projectId?"▾":"▸"," "]}),l.name]}):l.name}),e.jsx("td",{children:l.path?e.jsx(Ne,{path:l.path}):"—"}),e.jsx("td",{children:l.addresses.map(F=>e.jsxs("div",{children:[F.name,".",F.namespace]},F.namespace))}),e.jsx("td",{children:l.retained?e.jsx("button",{type:"button",disabled:O,onClick:()=>l.retained&&void w(l.retained),children:a("projectAppRelease")}):l.status})]},l.key)})})]})})]})]})}function qt(){const{sourceKey:t,transport:a}=ee(),s=De(t),o=Z(s,Q.vhostOauthAccess.name),[n,r]=c.useState(),[p,d]=c.useState(),k=c.useRef(Promise.resolve()),f=c.useRef(0);c.useEffect(()=>{if(!o)return;const j=++f.current;return a.fetch("/artifacts/vhosts/oauth").then(O=>{j===f.current&&r({source:t,value:O})},O=>{j===f.current&&d(String(O))}),()=>{f.current++}},[o,t,a]);const h=c.useCallback((j,O,A="PUT")=>{const E=f.current,g=k.current.then(async()=>{const P=await a.fetch(j,{method:A,body:JSON.stringify(O)});E===f.current&&(r({source:t,value:P}),d(void 0))});return k.current=g.catch(()=>{}),g},[t,a]);return{supported:o,multipleProviders:Z(s,Q.vhostOauthProviders.name),status:(n==null?void 0:n.source)===t?n.value:void 0,error:p,update:h}}const zt="_settings_1d7ml_1",Gt="_providerCard_1d7ml_6",Jt="_fields_1d7ml_28",Kt="_toggle_1d7ml_63",Xt="_emailRow_1d7ml_70",Wt="_redundant_1d7ml_74",Yt="_redundantHint_1d7ml_78",Zt="_logEntries_1d7ml_81",Qt="_logEntry_1d7ml_85",H={settings:zt,providerCard:Gt,fields:Jt,toggle:Kt,emailRow:Xt,redundant:Wt,redundantHint:Yt,logEntries:Zt,logEntry:Qt},ie="https://accounts.google.com";function es({status:t,update:a,multipleProviders:s=!1}){const{t:o}=B(),[n,r]=c.useState();if(!s)return e.jsx(ue,{status:t,update:a});const p=t.providers??[];return e.jsxs("div",{className:H.settings,children:[e.jsx(Ie,{enabled:t.enabled??!0,path:"/artifacts/vhosts/oauth/enabled",label:o("vhostOauthEnabled"),update:a}),e.jsx("p",{children:o("vhostOauthEnabledHint")}),p.map(d=>e.jsxs("section",{className:H.providerCard,"aria-label":Se(d.provider),children:[e.jsx(Ie,{enabled:d.enabled,path:`/artifacts/vhosts/oauth/providers/${d.id}/enabled`,label:Se(d.provider),update:a}),e.jsxs("details",{children:[e.jsx("summary",{children:o("vhostOauthEditProvider")}),e.jsx(ue,{status:{...t,...d,enabled:void 0},update:a,id:d.id})]})]},d.id)),n&&!p.some(d=>d.id===n)?e.jsxs("section",{className:H.providerCard,children:[e.jsx(ue,{status:{...t,provider:{...t.provider,kind:"oidc",issuer:ie,clientId:""},locked:!1,secretConfigured:!1,secretSuffix:void 0,enabled:void 0},update:a,id:n},n),e.jsx("button",{type:"button",onClick:()=>r(void 0),children:o("cancel")})]}):p.length<8&&e.jsx("button",{type:"button",onClick:()=>r(p.length?we():"default"),children:o("vhostOauthAddProvider")})]})}function Ie({enabled:t,path:a,label:s,update:o}){const[n,r]=c.useState(),[p,d]=c.useState("");return e.jsxs("div",{children:[e.jsxs("label",{className:H.toggle,children:[e.jsx("input",{type:"checkbox",checked:n??t,disabled:n!==void 0,onChange:async k=>{const f=k.target.checked;r(f),d("");try{await o(a,{enabled:f})}catch(h){d(String(h))}finally{r(void 0)}}}),s]}),p&&e.jsx("p",{role:"alert",children:p})]})}function ue({status:t,update:a,id:s}){const{t:o}=B(),[n,r]=c.useState(t.provider),[p,d]=c.useState(""),[k,f]=c.useState(),[h,j]=c.useState(!1),[O,A]=c.useState(""),E=t.secretConfigured&&n.kind===t.provider.kind&&n.clientId===t.provider.clientId&&n.tenantId===t.provider.tenantId&&n.issuer===t.provider.issuer;return e.jsxs("div",{className:H.settings,children:[t.enabled!==void 0&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:H.toggle,children:[e.jsx("input",{type:"checkbox",checked:k??t.enabled,disabled:h,onChange:async g=>{const P=g.target.checked;f(P),j(!0),A("");try{await a("/artifacts/vhosts/oauth/enabled",{enabled:P})}catch(C){A(String(C))}finally{f(void 0),j(!1)}}}),o("vhostOauthEnabled")]}),e.jsx("p",{children:o("vhostOauthEnabledHint")})]}),e.jsx("p",{children:o(t.locked?"vhostOauthEnvironment":"vhostOauthProviderHint")}),e.jsxs("fieldset",{disabled:t.locked||h,className:H.fields,children:[e.jsxs("label",{children:[o("vhostOauthProvider"),e.jsxs("select",{value:n.kind==="oidc"&&n.issuer===ie?"google":n.kind,onChange:g=>r({...n,kind:g.target.value==="entra"?"entra":"oidc",issuer:g.target.value==="google"?ie:""}),children:[e.jsx("option",{value:"entra",children:"Microsoft Entra"}),e.jsx("option",{value:"google",children:"Google"}),e.jsx("option",{value:"oidc",children:o("vhostOauthCustomProvider")})]})]}),n.kind==="oidc"&&n.issuer===ie&&e.jsx("p",{children:o("vhostOauthGoogleHint")}),n.kind==="entra"?e.jsxs("label",{children:[o("vhostOauthTenant"),e.jsx("input",{value:n.tenantId,onChange:g=>r({...n,tenantId:g.target.value})})]}):e.jsxs("label",{children:[o("vhostOauthIssuer"),e.jsx("input",{type:"url",value:n.issuer,onChange:g=>r({...n,issuer:g.target.value})})]}),e.jsxs("label",{children:[o("vhostOauthClientId"),e.jsx("input",{value:n.clientId,onChange:g=>r({...n,clientId:g.target.value})})]}),e.jsxs("label",{children:[o("vhostOauthCallback"),e.jsx("input",{type:"url",value:n.callbackUrl,onChange:g=>r({...n,callbackUrl:g.target.value})})]}),e.jsxs("label",{children:[o("vhostOauthSecret"),e.jsx("input",{type:"password",autoComplete:"new-password",value:p,placeholder:E?`••••${t.secretSuffix??"••••"}`:"",onChange:g=>d(g.target.value)})]}),e.jsxs("label",{children:[o("vhostOauthIp"),e.jsxs("select",{value:n.visitorIp,onChange:g=>r({...n,visitorIp:g.target.value}),children:[e.jsx("option",{value:"peer",children:o("vhostOauthIpPeer")}),e.jsx("option",{value:"cloudflare",children:"Cloudflare"}),e.jsx("option",{value:"x-real-ip",children:"X-Real-IP"})]})]}),e.jsx("p",{children:o("vhostOauthIpHint")}),!t.locked&&e.jsx("button",{type:"button",onClick:async()=>{j(!0),A("");try{await a(s?`/artifacts/vhosts/oauth/providers/${s}`:"/artifacts/vhosts/oauth",{provider:n,...p?{secret:p}:{}}),d(""),A(o("artifactSaved"))}catch(g){A(String(g))}finally{j(!1)}},children:o("vhostOauthConfigure")})]}),s&&s!=="default"&&t.secretConfigured&&e.jsx("button",{type:"button",disabled:h,onClick:async()=>{j(!0),A("");try{await a(`/artifacts/vhosts/oauth/providers/${s}`,void 0,"DELETE")}catch(g){A(String(g))}finally{j(!1)}},children:o("vhostOauthRemoveProvider")}),O&&e.jsx("p",{role:"status",children:O})]})}function ts({name:t,status:a,update:s,disabled:o,focusRequest:n}){const{t:r}=B(),p=Y(a.policies,t),d=p!==void 0,[k,f]=c.useState(()=>(p??["*@*"]).map((C,_)=>({value:C,id:_}))),h=c.useRef(k.length),j=c.useRef(null),[O,A]=c.useState(!1),[E,g]=c.useState("");c.useEffect(()=>{if(!d)return;const C=requestAnimationFrame(()=>{var _,N;(_=j.current)==null||_.focus(),(N=j.current)==null||N.select()});return()=>cancelAnimationFrame(C)},[d,n]);async function P(C){A(!0),g("");try{await s(`/artifacts/vhosts/${encodeURIComponent(t)}/oauth`,{emails:C}),g(r("artifactSaved"))}catch(_){g(String(_))}finally{A(!1)}}return e.jsxs("div",{className:H.settings,children:[e.jsxs("label",{className:H.toggle,children:[e.jsx("input",{type:"checkbox",checked:d,disabled:o||O||!d&&(!a.configured||a.enabled===!1),onChange:C=>{P(C.target.checked?k.map(_=>_.value):null),C.target.checked&&requestAnimationFrame(()=>{var _,N;(_=j.current)==null||_.focus(),(N=j.current)==null||N.select()})}}),r("vhostOauthRequired")]}),e.jsx("p",{children:r(d&&(!a.configured||a.enabled===!1)?"vhostOauthBlocked":a.configured?"vhostOauthLocalExcluded":"vhostOauthConfigureFirst")}),d&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:r("vhostOauthEmailsHint")}),k.map((C,_)=>{const N=Qe(k.map(L=>L.value),_);return e.jsxs("div",{children:[e.jsxs("div",{className:H.emailRow,children:[e.jsx("input",{ref:_===0?j:void 0,className:N?H.redundant:void 0,"aria-label":r("vhostOauthEmail",{number:_+1}),value:C.value,autoComplete:"off",spellCheck:!1,disabled:o,onChange:L=>f(w=>w.map(M=>M.id===C.id?{...M,value:L.target.value}:M)),onBlur:()=>void P(k.map(L=>L.value)),onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),P(k.map(w=>w.value)))}}),e.jsx("button",{type:"button",disabled:o,"aria-label":r("vhostOauthRemoveEmail",{number:_+1}),onClick:()=>{const L=k.filter(w=>w.id!==C.id);f(L),P(L.map(w=>w.value))},children:"−"})]}),N&&e.jsx("small",{className:H.redundantHint,children:r("vhostOauthRedundant",{email:N})})]},C.id)}),e.jsx("button",{type:"button",disabled:o||k.length>=32,onClick:()=>f(C=>[...C,{id:h.current++,value:""}]),children:r("vhostOauthAddEmail")}),k.length===0&&e.jsx("p",{children:r("vhostOauthNobody")})]}),E&&e.jsx("p",{role:"status",children:E})]})}function ss({host:t,onClose:a}){const{t:s}=B(),{transport:o}=ee(),[n,r]=c.useState(),[p,d]=c.useState(""),[k,f]=c.useState(0);return c.useEffect(()=>{let h=!1;return o.fetch(`/artifacts/vhosts/oauth/log${t?`?host=${encodeURIComponent(t)}`:""}`).then(j=>{h||r(j.entries)},j=>{h||d(String(j))}),()=>{h=!0}},[t,o,k]),e.jsx(Te,{title:t??s("vhostOauthAllLogs"),onClose:a,actions:e.jsx("button",{type:"button",onClick:()=>f(h=>h+1),children:s("vhostOauthRefresh")}),children:e.jsxs("div",{className:H.settings,children:[e.jsx("p",{children:s("vhostOauthLogHint")}),e.jsx("button",{type:"button",disabled:!(n!=null&&n.length),onClick:()=>ze(new Blob([n.map(h=>JSON.stringify(h)).join(`
1
+ import{r as c,j as e,d as we}from"./clientSummaryStore-Dsgo1zWK.js";import{u as B,c as Fe,w as Oe,L as $e}from"./main-BX4yZXDF.js";import{d as ae,b as ee,f as De,M as Te,u as Be,e as Me}from"./Modal-CHNqXAgW.js";import{C as _e}from"./CommittedRangeNumberInput-DF-kPNGu.js";import{S as ve,u as Ue}from"./index-DnFlh5Zf.js";import{u as qe}from"./useVhostAccess-CttxSyIC.js";import{d as ze,s as Ge,R as Je}from"./sessionVhostApps-DbEDY32Q.js";import{p as he,P as Ke}from"./ProjectAppViewer-slr3FXj4.js";import{s as Xe,b as We,c as Ye}from"./text-B4tk85DK.js";import{s as Z,S as Q}from"./index-BhTv6hAY.js";import{a as Ze}from"./appHref-ByaEnJGJ.js";import"./react-runtime-D-UPQ57m.js";import"./remoteRoutePaths-DpabBbC6.js";import"./CommittedRangeInput-C6In6Q8s.js";import"./PageHeader-DYCnk788.js";import"./SessionHeader.module-DfkDdP3M.js";import"./HostIdentityContext-_GKYzEQ6.js";import"./NavigationLayout-UkQvkodY.js";import"./useSidebarWidth-op0qbgd4.js";import"./frontendReload-B4jfUIeG.js";import"./usePanelSlideAnimations-XdQhGgr-.js";import"./useFileActivity-CpuLfNl9.js";import"./GlossaryContext-BA5X62Ck.js";import"./ProviderBadge-C-UpobLD.js";import"./YepAnywhereLogo-ccRUdgT-.js";import"./index-BSMD-gHP.js";import"./limitedUserBrowserDefaults-CwcMxPe5.js";import"./sourceTransportPaths-BTR7eFi5.js";import"./newSessionPrefill-BC5a8IpP.js";import"./ViewerWindowActions-DV5bxAAy.js";function Se(t){return t.kind==="entra"?"Microsoft":t.issuer==="https://accounts.google.com"?"Google":t.issuer?new URL(t.issuer).hostname:"OpenID Connect"}function Y(t,a){return t&&Object.hasOwn(t,a)?t[a]:void 0}function Qe(t,a){var n;const s=(n=t[a])==null?void 0:n.trim().toLowerCase();if(!s)return;const o=s.split("@");if(o.length===2)return t.find((r,p)=>{if(p===a)return!1;const d=r.trim().toLowerCase();if(d===s)return p<a;const k=d.split("@");return k.length===2&&k.every((f,h)=>f==="*"||!f.includes("*")&&f===o[h])})}const et="_fields_v3hjp_1",tt="_toggle_v3hjp_18",st="_vhostRow_v3hjp_23",nt="_expiry_v3hjp_42",it="_provider_v3hjp_60",at="_vhosts_v3hjp_73",ot="_vhostHeading_v3hjp_80",rt="_vhostHeader_v3hjp_86",lt="_vhostIntro_v3hjp_94",ct="_password_v3hjp_133",dt="_pathField_v3hjp_146",pt="_domainSuffix_v3hjp_149",ht="_domainName_v3hjp_154",ut="_table_v3hjp_163",vt="_linksHeader_v3hjp_170",mt="_links_v3hjp_170",ft="_linksCell_v3hjp_178",jt="_withLinkIcon_v3hjp_184",xt="_linkIcon_v3hjp_193",gt="_linkIconLabel_v3hjp_208",bt="_target_v3hjp_231",kt="_accessButton_v3hjp_245",yt="_oauthBlocked_v3hjp_260",_t="_linkedFiles_v3hjp_270",St="_access_v3hjp_245",y={fields:et,toggle:tt,vhostRow:st,expiry:nt,provider:it,vhosts:at,vhostHeading:ot,vhostHeader:rt,vhostIntro:lt,password:ct,pathField:dt,domainSuffix:pt,domainName:ht,table:ut,linksHeader:vt,links:mt,linksCell:ft,withLinkIcon:jt,linkIcon:xt,linkIconLabel:gt,target:bt,accessButton:kt,oauthBlocked:yt,linkedFiles:_t,access:St},Ct="_inventory_17p18_1",It="_heading_17p18_15",At="_row_17p18_39",Ot="_deleteActions_17p18_44",Pt="_table_17p18_50",K={inventory:Ct,heading:It,row:At,deleteActions:Ot,table:Pt},Rt="_root_sc9xb_1",Nt="_collection_sc9xb_6",Et="_open_sc9xb_12",Lt="_list_sc9xb_15",Vt="_detail_sc9xb_68",Ht="_heading_sc9xb_78",G={root:Rt,collection:Nt,open:Et,list:Lt,detail:Vt,heading:Ht};function Pe(t){return{"data-expandable":"",onClick(a){var o;const s=a.target.closest("a, button, input, select, textarea, label, summary");s&&a.currentTarget.contains(s)||(o=window.getSelection())!=null&&o.toString()||t()}}}function Re({children:t,selectedKey:a,title:s,detail:o,onClose:n,actions:r}){const{t:p}=B(),d=c.useId(),k=c.useRef(null),f=c.useRef(null);c.useEffect(()=>{var j;a!==null&&(f.current=document.activeElement,(j=k.current)==null||j.focus())},[a]);function h(){n(),requestAnimationFrame(()=>{var j;return(j=f.current)==null?void 0:j.focus()})}return e.jsx("div",{className:G.root,children:e.jsxs("div",{className:`${G.collection} ${a!==null?G.open:""}`,children:[e.jsx("div",{className:G.list,children:t}),a!==null&&e.jsxs("section",{className:G.detail,"aria-labelledby":d,children:[e.jsxs("div",{className:G.heading,children:[e.jsx("h4",{id:d,children:s}),r,e.jsx("button",{ref:k,type:"button",onClick:h,"aria-label":p("settingsCollectionMinimize"),title:p("settingsCollectionMinimize"),children:e.jsx("span",{"aria-hidden":"true",children:"_"})})]}),o]})]})})}const wt="_path_1lwvm_1",Ft="_prefix_1lwvm_7",$t="_parent_1lwvm_8",Dt="_name_1lwvm_9",Tt="_tail_1lwvm_17",X={path:wt,prefix:Ft,parent:$t,name:Dt,tail:Tt};function Ne({path:t}){const a=Xe(We(t)),{dir:s,name:o}=Ye(a),n=s.slice(0,-1).lastIndexOf("/")+1,r=s.slice(0,n),p=s.slice(n);return e.jsxs("span",{className:X.path,title:t,children:[r&&e.jsx("span",{className:X.prefix,children:r}),e.jsxs("span",{className:X.tail,children:[p&&e.jsx("span",{className:X.parent,children:p}),e.jsx("span",{className:X.name,children:o})]})]})}const Bt="_header_z7gz9_1",Mt="_button_z7gz9_1",Ce={header:Bt,button:Mt};function Ee(){const[t,a]=c.useState(null);function s(n){a(r=>({column:n,direction:(r==null?void 0:r.column)===n&&r.direction==="ascending"?"descending":"ascending"}))}function o(n,r){if(!t)return n;const p=t.direction==="ascending"?1:-1;return[...n].sort((d,k)=>{const f=r(d,t.column),h=r(k,t.column);return p*(typeof f=="number"&&typeof h=="number"?f-h:String(f).localeCompare(String(h),void 0,{numeric:!0,sensitivity:"base"}))})}return{sort:t,onSort:s,sortedRows:o}}function q({column:t,label:a,sort:s,onSort:o}){const n=(s==null?void 0:s.column)===t?s.direction:"none";return e.jsx("th",{className:Ce.header,scope:"col","aria-sort":n,children:e.jsxs("button",{type:"button",className:Ce.button,onClick:()=>o(t),children:[a,e.jsx("span",{"aria-hidden":"true",children:n==="ascending"?"↑":n==="descending"?"↓":"↕"})]})})}function Ut(){const{version:t}=ae(),{t:a}=B(),s=Z(t,Q.projectAppInventory.name),o=Z(t,Q.projectAppDeletion.name),[n,r]=c.useState(null),[p,d]=c.useState(""),[k,f]=c.useState(0),[h,j]=c.useState(!1),[O,A]=c.useState(!1),[E,g]=c.useState(),P=Ee();c.useEffect(()=>{if(!s)return;let l=!0;return j(!0),he.inventory().then(v=>{l&&r(v)}).catch(v=>{l&&d(v instanceof Error?v.message:String(v))}).finally(()=>{l&&j(!1)}),()=>{l=!1}},[s,k]);const C=new Set(n==null?void 0:n.projects.map(l=>l.projectId)),_=n==null?void 0:n.projects.find(l=>l.projectId===E),N=(n==null?void 0:n.reservations.filter(l=>!C.has(l.projectId)))??[],L=P.sortedRows([...((n==null?void 0:n.projects)??[]).map(l=>({key:l.projectId,project:l,retained:void 0,name:l.name,path:l.path,status:a("projectAppState",{state:l.info.state}),addresses:n.reservations.filter(v=>v.projectId===l.projectId)})),...N.map(l=>({key:`${l.projectId}:${l.namespace}`,project:void 0,retained:l,name:a("projectAppInventoryUnavailable",{owner:l.owner}),path:"",status:a("projectAppRelease"),addresses:[l]}))],(l,v)=>v==="project"?l.name:v==="folder"?l.path:v==="status"?l.status:l.addresses.map(I=>`${I.name}.${I.namespace}`).sort().join(" "));async function w(l){if(window.confirm(a("projectAppReleaseConfirm",{address:`${l.name}.${l.namespace}`}))){A(!0),d("");try{await he.releaseAddress(l.projectId,l.namespace),f(v=>v+1)}catch(v){d(v instanceof Error?v.message:String(v))}finally{A(!1)}}}async function M(l){if(!(!_||O)&&window.confirm(a(l?"projectAppDeleteProjectConfirm":"projectAppDeleteAppConfirm",{name:_.name}))){A(!0),d("");try{await he.deleteApp(_.projectId),l&&await Fe.deleteProject(_.projectId),g(void 0),f(v=>v+1)}catch(v){d(v instanceof Error?v.message:String(v)),f(I=>I+1)}finally{A(!1)}}}return e.jsxs("section",{className:K.inventory,"aria-label":a("projectAppInventoryTitle"),children:[e.jsxs("div",{className:K.heading,children:[e.jsx("h3",{children:a("projectAppInventoryTitle")}),s&&e.jsx("button",{type:"button",disabled:h||O,onClick:()=>{d(""),f(l=>l+1)},children:a("projectAppInventoryRefresh")})]}),e.jsx("p",{children:a(s?"projectAppInventoryHint":"projectAppInventoryUpdate")}),p&&e.jsx("p",{role:"alert",children:p}),h&&e.jsx("p",{role:"status",children:a("projectAppLoading")}),s&&n&&e.jsxs(e.Fragment,{children:[n.projects.length===0&&N.length===0&&e.jsx("p",{children:a("projectAppInventoryEmpty")}),e.jsx(Re,{selectedKey:(_==null?void 0:_.projectId)??null,title:(_==null?void 0:_.name)??"",onClose:()=>g(void 0),actions:_&&o?e.jsxs("span",{className:K.deleteActions,children:[e.jsx("button",{type:"button",disabled:O,title:a("projectAppDeleteAppTitle"),onClick:()=>void M(!1),children:a("projectAppDeleteApp")}),e.jsx("button",{type:"button",disabled:O,title:a("projectAppDeleteProject"),onClick:()=>void M(!0),children:a("projectAppDeleteProject")})]}):void 0,detail:n.projects.map(l=>E===l.projectId&&e.jsxs("article",{className:K.row,children:[!o&&e.jsx("p",{children:a("projectAppDeleteUpdate")}),e.jsxs("p",{children:[l.owner??a("projectAppInventoryAdministrator")," ·"," ",e.jsx("code",{children:l.path})]}),n.reservations.filter(v=>v.projectId===l.projectId).map(v=>{var I;return e.jsxs("p",{children:[e.jsxs("strong",{children:[v.name,".",v.namespace]}),!((I=t==null?void 0:t.artifactViewer)!=null&&I.vhostPublicRoot)&&e.jsx("button",{type:"button",disabled:O,onClick:()=>void w(v),children:a("projectAppRelease")})]},v.namespace)}),E===l.projectId&&e.jsx(Ke,{projectId:l.projectId,presentation:"settings",onAddressesChanged:v=>r(I=>I&&v.enabled?{...I,reservations:[...I.reservations.filter($=>$.projectId!==l.projectId),...v.reservations.map($=>({...$,projectId:l.projectId}))]}:I),onInfoChanged:v=>r(I=>I&&{...I,projects:I.projects.map($=>$.projectId===l.projectId?{...$,info:v}:$)})},`${l.projectId}:${k}`)]},l.projectId)),children:e.jsxs("table",{className:K.table,"aria-label":a("projectAppInventoryTitle"),children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(q,{column:"project",label:a("settingsCollectionProject"),...P}),e.jsx(q,{column:"folder",label:a("settingsCollectionFolder"),...P}),e.jsx(q,{column:"domain",label:a("settingsCollectionDomain"),...P}),e.jsx(q,{column:"status",label:a("settingsCollectionStatus"),...P})]})}),e.jsx("tbody",{children:L.map(l=>{var $;const v=($=l.project)==null?void 0:$.projectId,I=v===void 0?void 0:()=>g(E===v?void 0:v);return e.jsxs("tr",{...I&&Pe(I),children:[e.jsx("td",{children:l.project?e.jsxs("button",{type:"button","aria-expanded":E===l.project.projectId,onClick:I,children:[e.jsxs("span",{"aria-hidden":"true",children:[E===l.project.projectId?"▾":"▸"," "]}),l.name]}):l.name}),e.jsx("td",{children:l.path?e.jsx(Ne,{path:l.path}):"—"}),e.jsx("td",{children:l.addresses.map(F=>e.jsxs("div",{children:[F.name,".",F.namespace]},F.namespace))}),e.jsx("td",{children:l.retained?e.jsx("button",{type:"button",disabled:O,onClick:()=>l.retained&&void w(l.retained),children:a("projectAppRelease")}):l.status})]},l.key)})})]})})]})]})}function qt(){const{sourceKey:t,transport:a}=ee(),s=De(t),o=Z(s,Q.vhostOauthAccess.name),[n,r]=c.useState(),[p,d]=c.useState(),k=c.useRef(Promise.resolve()),f=c.useRef(0);c.useEffect(()=>{if(!o)return;const j=++f.current;return a.fetch("/artifacts/vhosts/oauth").then(O=>{j===f.current&&r({source:t,value:O})},O=>{j===f.current&&d(String(O))}),()=>{f.current++}},[o,t,a]);const h=c.useCallback((j,O,A="PUT")=>{const E=f.current,g=k.current.then(async()=>{const P=await a.fetch(j,{method:A,body:JSON.stringify(O)});E===f.current&&(r({source:t,value:P}),d(void 0))});return k.current=g.catch(()=>{}),g},[t,a]);return{supported:o,multipleProviders:Z(s,Q.vhostOauthProviders.name),status:(n==null?void 0:n.source)===t?n.value:void 0,error:p,update:h}}const zt="_settings_1d7ml_1",Gt="_providerCard_1d7ml_6",Jt="_fields_1d7ml_28",Kt="_toggle_1d7ml_63",Xt="_emailRow_1d7ml_70",Wt="_redundant_1d7ml_74",Yt="_redundantHint_1d7ml_78",Zt="_logEntries_1d7ml_81",Qt="_logEntry_1d7ml_85",H={settings:zt,providerCard:Gt,fields:Jt,toggle:Kt,emailRow:Xt,redundant:Wt,redundantHint:Yt,logEntries:Zt,logEntry:Qt},ie="https://accounts.google.com";function es({status:t,update:a,multipleProviders:s=!1}){const{t:o}=B(),[n,r]=c.useState();if(!s)return e.jsx(ue,{status:t,update:a});const p=t.providers??[];return e.jsxs("div",{className:H.settings,children:[e.jsx(Ie,{enabled:t.enabled??!0,path:"/artifacts/vhosts/oauth/enabled",label:o("vhostOauthEnabled"),update:a}),e.jsx("p",{children:o("vhostOauthEnabledHint")}),p.map(d=>e.jsxs("section",{className:H.providerCard,"aria-label":Se(d.provider),children:[e.jsx(Ie,{enabled:d.enabled,path:`/artifacts/vhosts/oauth/providers/${d.id}/enabled`,label:Se(d.provider),update:a}),e.jsxs("details",{children:[e.jsx("summary",{children:o("vhostOauthEditProvider")}),e.jsx(ue,{status:{...t,...d,enabled:void 0},update:a,id:d.id})]})]},d.id)),n&&!p.some(d=>d.id===n)?e.jsxs("section",{className:H.providerCard,children:[e.jsx(ue,{status:{...t,provider:{...t.provider,kind:"oidc",issuer:ie,clientId:""},locked:!1,secretConfigured:!1,secretSuffix:void 0,enabled:void 0},update:a,id:n},n),e.jsx("button",{type:"button",onClick:()=>r(void 0),children:o("cancel")})]}):p.length<8&&e.jsx("button",{type:"button",onClick:()=>r(p.length?we():"default"),children:o("vhostOauthAddProvider")})]})}function Ie({enabled:t,path:a,label:s,update:o}){const[n,r]=c.useState(),[p,d]=c.useState("");return e.jsxs("div",{children:[e.jsxs("label",{className:H.toggle,children:[e.jsx("input",{type:"checkbox",checked:n??t,disabled:n!==void 0,onChange:async k=>{const f=k.target.checked;r(f),d("");try{await o(a,{enabled:f})}catch(h){d(String(h))}finally{r(void 0)}}}),s]}),p&&e.jsx("p",{role:"alert",children:p})]})}function ue({status:t,update:a,id:s}){const{t:o}=B(),[n,r]=c.useState(t.provider),[p,d]=c.useState(""),[k,f]=c.useState(),[h,j]=c.useState(!1),[O,A]=c.useState(""),E=t.secretConfigured&&n.kind===t.provider.kind&&n.clientId===t.provider.clientId&&n.tenantId===t.provider.tenantId&&n.issuer===t.provider.issuer;return e.jsxs("div",{className:H.settings,children:[t.enabled!==void 0&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:H.toggle,children:[e.jsx("input",{type:"checkbox",checked:k??t.enabled,disabled:h,onChange:async g=>{const P=g.target.checked;f(P),j(!0),A("");try{await a("/artifacts/vhosts/oauth/enabled",{enabled:P})}catch(C){A(String(C))}finally{f(void 0),j(!1)}}}),o("vhostOauthEnabled")]}),e.jsx("p",{children:o("vhostOauthEnabledHint")})]}),e.jsx("p",{children:o(t.locked?"vhostOauthEnvironment":"vhostOauthProviderHint")}),e.jsxs("fieldset",{disabled:t.locked||h,className:H.fields,children:[e.jsxs("label",{children:[o("vhostOauthProvider"),e.jsxs("select",{value:n.kind==="oidc"&&n.issuer===ie?"google":n.kind,onChange:g=>r({...n,kind:g.target.value==="entra"?"entra":"oidc",issuer:g.target.value==="google"?ie:""}),children:[e.jsx("option",{value:"entra",children:"Microsoft Entra"}),e.jsx("option",{value:"google",children:"Google"}),e.jsx("option",{value:"oidc",children:o("vhostOauthCustomProvider")})]})]}),n.kind==="oidc"&&n.issuer===ie&&e.jsx("p",{children:o("vhostOauthGoogleHint")}),n.kind==="entra"?e.jsxs("label",{children:[o("vhostOauthTenant"),e.jsx("input",{value:n.tenantId,onChange:g=>r({...n,tenantId:g.target.value})})]}):e.jsxs("label",{children:[o("vhostOauthIssuer"),e.jsx("input",{type:"url",value:n.issuer,onChange:g=>r({...n,issuer:g.target.value})})]}),e.jsxs("label",{children:[o("vhostOauthClientId"),e.jsx("input",{value:n.clientId,onChange:g=>r({...n,clientId:g.target.value})})]}),e.jsxs("label",{children:[o("vhostOauthCallback"),e.jsx("input",{type:"url",value:n.callbackUrl,onChange:g=>r({...n,callbackUrl:g.target.value})})]}),e.jsxs("label",{children:[o("vhostOauthSecret"),e.jsx("input",{type:"password",autoComplete:"new-password",value:p,placeholder:E?`••••${t.secretSuffix??"••••"}`:"",onChange:g=>d(g.target.value)})]}),e.jsxs("label",{children:[o("vhostOauthIp"),e.jsxs("select",{value:n.visitorIp,onChange:g=>r({...n,visitorIp:g.target.value}),children:[e.jsx("option",{value:"peer",children:o("vhostOauthIpPeer")}),e.jsx("option",{value:"cloudflare",children:"Cloudflare"}),e.jsx("option",{value:"x-real-ip",children:"X-Real-IP"})]})]}),e.jsx("p",{children:o("vhostOauthIpHint")}),!t.locked&&e.jsx("button",{type:"button",onClick:async()=>{j(!0),A("");try{await a(s?`/artifacts/vhosts/oauth/providers/${s}`:"/artifacts/vhosts/oauth",{provider:n,...p?{secret:p}:{}}),d(""),A(o("artifactSaved"))}catch(g){A(String(g))}finally{j(!1)}},children:o("vhostOauthConfigure")})]}),s&&s!=="default"&&t.secretConfigured&&e.jsx("button",{type:"button",disabled:h,onClick:async()=>{j(!0),A("");try{await a(`/artifacts/vhosts/oauth/providers/${s}`,void 0,"DELETE")}catch(g){A(String(g))}finally{j(!1)}},children:o("vhostOauthRemoveProvider")}),O&&e.jsx("p",{role:"status",children:O})]})}function ts({name:t,status:a,update:s,disabled:o,focusRequest:n}){const{t:r}=B(),p=Y(a.policies,t),d=p!==void 0,[k,f]=c.useState(()=>(p??["*@*"]).map((C,_)=>({value:C,id:_}))),h=c.useRef(k.length),j=c.useRef(null),[O,A]=c.useState(!1),[E,g]=c.useState("");c.useEffect(()=>{if(!d)return;const C=requestAnimationFrame(()=>{var _,N;(_=j.current)==null||_.focus(),(N=j.current)==null||N.select()});return()=>cancelAnimationFrame(C)},[d,n]);async function P(C){A(!0),g("");try{await s(`/artifacts/vhosts/${encodeURIComponent(t)}/oauth`,{emails:C}),g(r("artifactSaved"))}catch(_){g(String(_))}finally{A(!1)}}return e.jsxs("div",{className:H.settings,children:[e.jsxs("label",{className:H.toggle,children:[e.jsx("input",{type:"checkbox",checked:d,disabled:o||O||!d&&(!a.configured||a.enabled===!1),onChange:C=>{P(C.target.checked?k.map(_=>_.value):null),C.target.checked&&requestAnimationFrame(()=>{var _,N;(_=j.current)==null||_.focus(),(N=j.current)==null||N.select()})}}),r("vhostOauthRequired")]}),e.jsx("p",{children:r(d&&(!a.configured||a.enabled===!1)?"vhostOauthBlocked":a.configured?"vhostOauthLocalExcluded":"vhostOauthConfigureFirst")}),d&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:r("vhostOauthEmailsHint")}),k.map((C,_)=>{const N=Qe(k.map(L=>L.value),_);return e.jsxs("div",{children:[e.jsxs("div",{className:H.emailRow,children:[e.jsx("input",{ref:_===0?j:void 0,className:N?H.redundant:void 0,"aria-label":r("vhostOauthEmail",{number:_+1}),value:C.value,autoComplete:"off",spellCheck:!1,disabled:o,onChange:L=>f(w=>w.map(M=>M.id===C.id?{...M,value:L.target.value}:M)),onBlur:()=>void P(k.map(L=>L.value)),onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),P(k.map(w=>w.value)))}}),e.jsx("button",{type:"button",disabled:o,"aria-label":r("vhostOauthRemoveEmail",{number:_+1}),onClick:()=>{const L=k.filter(w=>w.id!==C.id);f(L),P(L.map(w=>w.value))},children:"−"})]}),N&&e.jsx("small",{className:H.redundantHint,children:r("vhostOauthRedundant",{email:N})})]},C.id)}),e.jsx("button",{type:"button",disabled:o||k.length>=32,onClick:()=>f(C=>[...C,{id:h.current++,value:""}]),children:r("vhostOauthAddEmail")}),k.length===0&&e.jsx("p",{children:r("vhostOauthNobody")})]}),E&&e.jsx("p",{role:"status",children:E})]})}function ss({host:t,onClose:a}){const{t:s}=B(),{transport:o}=ee(),[n,r]=c.useState(),[p,d]=c.useState(""),[k,f]=c.useState(0);return c.useEffect(()=>{let h=!1;return o.fetch(`/artifacts/vhosts/oauth/log${t?`?host=${encodeURIComponent(t)}`:""}`).then(j=>{h||r(j.entries)},j=>{h||d(String(j))}),()=>{h=!0}},[t,o,k]),e.jsx(Te,{title:t??s("vhostOauthAllLogs"),onClose:a,actions:e.jsx("button",{type:"button",onClick:()=>f(h=>h+1),children:s("vhostOauthRefresh")}),children:e.jsxs("div",{className:H.settings,children:[e.jsx("p",{children:s("vhostOauthLogHint")}),e.jsx("button",{type:"button",disabled:!(n!=null&&n.length),onClick:()=>ze(new Blob([n.map(h=>JSON.stringify(h)).join(`
2
2
  `)+`
3
3
  `],{type:"application/x-ndjson"}),"vhost-oauth-access.jsonl"),children:s("vhostOauthDownload")}),p&&e.jsx("p",{role:"alert",children:p}),(n==null?void 0:n.length)===0&&e.jsx("p",{children:s("vhostOauthNoLogs")}),e.jsx("div",{className:H.logEntries,children:n==null?void 0:n.map((h,j)=>e.jsxs("article",{className:H.logEntry,children:[e.jsx("time",{dateTime:h.timestamp,children:new Date(h.timestamp).toLocaleString()}),e.jsx("strong",{children:h.email??"—"}),e.jsx("span",{children:h.host}),e.jsxs("span",{children:[s(h.outcome==="allowed"?"vhostOauthAllowed":h.outcome==="denied"?"vhostOauthDenied":"vhostOauthError"),h.ip?` · ${h.ip}`:""]})]},`${h.timestamp}:${j}`))})]})})}function ns(t){return[...(t.vhosts??[]).map(a=>({...a,kind:"port"})),...(t.vhostSites??[]).map(a=>({...a,kind:"files"}))]}function W(t,a){var s,o;return a.kind==="files"?!!((s=t.vhostSites)!=null&&s.some(n=>n.name===a.name&&n.path===a.path)):!!((o=t.vhosts)!=null&&o.some(n=>n.name===a.name&&n.port===a.port))}function is(t,a,s){let o;if(a.vhostPublicRoot)o=new URL(`https://${t.name}.${a.vhostPublicRoot}/`);else if(a.localOrigin)o=new URL(a.localOrigin),o.hostname=`${t.name}.localhost`,o.pathname="/";else return;if(!t.public){const n=s==null?void 0:s[t.name];if(!n)return;o.searchParams.set("ya_access",n)}return o.href}const as=20;function os(t){const{transport:a}=ee(),[s,o]=c.useState({});return c.useEffect(()=>{if(!(t!=null&&t.length))return;let n=!1;return a.fetch("/artifacts/vhost-sites").then(({sites:r})=>{n||o(Object.fromEntries(r.map(p=>[p.name,p])))},()=>{}),()=>{n=!0}},[t,a]),s}function rs(t,a){const s=new URLSearchParams({mode:"interactive",path:a});return new URL(Ze(`${t}/file-view?${s}`),window.location.href).href}function Ae({url:t,label:a,kind:s,onCopied:o}){const[n,r]=c.useState(null);return e.jsxs(e.Fragment,{children:[e.jsxs("a",{className:y.linkIcon,href:t,target:"_blank",rel:"noopener noreferrer",title:a,onClick:p=>p.stopPropagation(),onContextMenu:p=>{p.preventDefault(),r({x:p.clientX,y:p.clientY})},children:[e.jsx("span",{className:y.linkIconLabel,children:a}),e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s==="service"?e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M6.5 9.5a3 3 0 0 0 4.2 0l2.1-2.1a3 3 0 0 0-4.2-4.2l-.9.9"}),e.jsx("path",{d:"M9.5 6.5a3 3 0 0 0-4.2 0L3.2 8.6a3 3 0 0 0 4.2 4.2l.9-.9"})]}):e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M9 1.5H4A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8a1.5 1.5 0 0 0 1.5-1.5V6Z"}),e.jsx("path",{d:"M9 1.5V6h4.5M5.5 9h5M5.5 11.5h3"})]})})]}),n&&e.jsx(Je,{x:n.x,y:n.y,canStartNewSession:!1,onClose:()=>r(null),onOpen:()=>window.open(t,"_blank","noopener,noreferrer"),onCopyLink:()=>void Oe(t).then(o)})]})}function ls(t,a){const s=t.paths.slice(0,as),o=t.count-s.length;return[...s,...o>0?[a("artifactVhostLinkedFilesMore",{count:o})]:[]].join(`
4
4
  `)}function cs(){const{sourceKey:t}=ee(),{version:a,refetch:s}=ae(),o=a==null?void 0:a.artifactViewer;return o?e.jsx(ds,{status:o,onSaved:s},t):null}function ds({status:t,onSaved:a}){const{t:s}=B(),{transport:o}=ee(),n=qe(t),r=qt(),[p,d]=c.useState(null),[k,f]=c.useState(0),h=c.useId(),[j,O]=c.useState(!!t.localOrigin),[A,E]=c.useState(t.localOrigin??t.defaultLocalOrigin),[g,P]=c.useState(t.publicOrigin??""),[C,_]=c.useState(String(t.port)),[N,L]=c.useState(t.expiryHours),[w,M]=c.useState(t.expiryDays),[l,v]=c.useState(t.vhostPublicRoot??""),[I,$]=c.useState(t.alwaysRewriteVhostLinks===!0),[F,T]=c.useState(()=>ns(t).map((i,m)=>({...i,id:m}))),Le=c.useRef(F.length),[z,J]=c.useState(null),oe=F.find(i=>i.id===z),te=Ee(),me=i=>{var m;return s(Y((m=r.status)==null?void 0:m.policies,i.name)!==void 0?"vhostOauthRequired":i.public?i.kind==="files"&&(i.passwordProtected||i.password)?"settingsCollectionPassword":"settingsCollectionPublic":"settingsCollectionPrivate")},fe=i=>r.status&&Y(r.status.policies,i.name)!==void 0&&(!r.status.configured||r.status.enabled===!1),Ve=te.sortedRows(F,(i,m)=>m==="domain"?i.name:m==="access"?me(i):i.kind==="files"?i.path:i.port),[je,se]=c.useState(!1),[xe,U]=c.useState(""),re=t.vhosts!==void 0,le=t.vhostSites!==void 0,ce=os(t.vhostSites),He=Be(),ge=i=>{var m,V,x;return W(t,i)?Y((m=r.status)==null?void 0:m.policies,i.name)!==void 0&&t.vhostPublicRoot?`https://${i.name}.${t.vhostPublicRoot}/`:i.kind==="files"?is(i,t,(V=n.config)==null?void 0:V.accessTokens):(x=Ge(`http://localhost:${i.port}/`,n.config,window.location.href,t.vhostPublicRoot?"public":void 0))==null?void 0:x.url:void 0},be=i=>{var m;return i.kind==="files"&&W(t,i)&&((m=ce[i.name])==null?void 0:m.kind)==="file"?rs(He,ce[i.name].path):void 0},de=i=>U(s(i?"fileViewerCopied":"viewerCopyLinkFailed")),ke=c.useRef(Promise.resolve()),ne=c.useRef(0),pe=c.useRef(void 0);async function R(i={}){if(t.locked)return;const m={localEnabled:j,expiryDays:w,expiryHours:N,vhosts:F,alwaysRewriteVhostLinks:I,...i};U("");try{if([m.localEnabled?A:"",g].filter(Boolean).some(u=>new URL(u).hostname===window.location.hostname))throw new Error(s("artifactSeparateHost"));const x=JSON.stringify({port:Number(C),localOrigin:m.localEnabled?A.trim():"",publicOrigin:g.trim(),...m.expiryDays===void 0?{expiryHours:m.expiryHours}:{expiryDays:m.expiryDays},...re?{vhostPublicRoot:l.trim(),alwaysRewriteVhostLinks:m.alwaysRewriteVhostLinks,vhosts:m.vhosts.flatMap(u=>{var D;return u.kind==="port"?[{name:u.name.trim(),port:u.port,...(D=u.env)!=null&&D.trim()?{env:u.env.trim()}:{},...n.supported?{public:u.public===!0}:{}}]:[]}),...le?{vhostSites:m.vhosts.flatMap(u=>u.kind==="files"?[{name:u.name.trim(),path:u.path.trim(),public:u.public===!0,...u.password===void 0?{}:{password:u.password}}]:[])}:{}}:{}});if(x===pe.current)return;pe.current=x;const S=++ne.current;se(!0);const b=ke.current.then(async()=>{await o.fetch("/artifacts/config",{method:"PUT",body:x}),await a()});ke.current=b.catch(()=>{});try{await b,T(u=>u.map(D=>D.kind==="files"&&D.password!==void 0?{...D,password:void 0,passwordProtected:D.password!==""}:D)),S===ne.current&&U(s("artifactSaved"))}catch(u){S===ne.current&&(pe.current=void 0,U(u instanceof Error?u.message:String(u)))}finally{S===ne.current&&se(!1)}}catch(V){U(V instanceof Error?V.message:String(V))}}return e.jsxs(ve,{title:s("artifactSettingsTitle"),description:s("artifactSettingsDescription"),onSubmit:i=>{i.preventDefault(),R()},children:[e.jsx("p",{children:s("appsSettingsAutosave")}),e.jsxs("fieldset",{className:y.fields,disabled:t.locked,children:[e.jsxs("label",{className:y.toggle,children:[e.jsx("input",{type:"checkbox",checked:j,onChange:i=>{O(i.target.checked),R({localEnabled:i.target.checked})}}),s("artifactLocalEnabled")]}),j&&e.jsxs("label",{children:[s("artifactLocalOrigin"),e.jsx("input",{type:"url",value:A,onBlur:()=>void R(),onChange:i=>E(i.target.value)})]}),e.jsxs("label",{children:[s("artifactPublicOrigin"),e.jsx("input",{type:"url",value:g,onBlur:()=>void R(),onChange:i=>P(i.target.value)})]}),e.jsx("p",{children:s("artifactPublicHint")}),e.jsxs("label",{children:[s("artifactPort"),e.jsx("input",{type:"number",min:1,max:65535,value:C,onBlur:()=>void R(),onChange:i=>_(i.target.value)})]}),e.jsx("p",{children:s("artifactPortHint")}),w!==void 0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:y.expiry,children:[e.jsx("label",{htmlFor:h,children:s("artifactExpiryDaysLabel")}),e.jsx(_e,{id:h,min:1,max:30,step:1,value:w,ariaLabel:s("artifactExpiryDaysLabel"),onCommit:i=>{M(i),R({expiryDays:i})}})]}),e.jsx("p",{children:s("artifactExpiryDaysHint")}),e.jsx("p",{children:s("artifactDeleteOnExpiryHint")})]}):N!==void 0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:y.expiry,children:[e.jsx("label",{htmlFor:h,children:s("artifactExpiryLabel")}),e.jsx(_e,{id:h,min:1,max:168,step:1,value:N,ariaLabel:s("artifactExpiryLabel"),onCommit:i=>{L(i),R({expiryHours:i})}})]}),e.jsx("p",{children:s("artifactExpiryHint")})]}),re&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{children:[s("artifactVhostPublicRoot"),e.jsx("input",{type:"text",value:l,onBlur:()=>void R(),autoComplete:"off",spellCheck:!1,onChange:i=>v(i.target.value)})]}),e.jsx("p",{children:s("artifactVhostPublicRootHint",{port:C})}),e.jsxs("label",{className:y.toggle,children:[e.jsx("input",{type:"checkbox",checked:I,onChange:i=>{$(i.target.checked),R({alwaysRewriteVhostLinks:i.target.checked})}}),s("artifactAlwaysRewriteVhostLinks")]}),e.jsx("p",{children:s("artifactAlwaysRewriteVhostLinksHint")})]})]}),r.supported&&r.status&&e.jsxs("details",{className:y.provider,children:[e.jsx("summary",{children:s("vhostOauthProvider")}),e.jsx(es,{status:r.status,update:r.update,multipleProviders:r.multipleProviders})]}),r.error&&e.jsx("p",{role:"alert",children:r.error}),p!==null&&e.jsx(ss,{host:p||void 0,onClose:()=>d(null)}),re&&e.jsx("div",{className:y.fields,children:e.jsxs("div",{className:y.vhosts,children:[e.jsxs("div",{className:y.vhostHeader,children:[e.jsx("h3",{className:y.vhostHeading,children:s("artifactVhostTableTitle")}),r.status&&e.jsx("button",{type:"button",onClick:()=>d(""),children:s("vhostOauthAllLogs")})]}),e.jsxs("div",{className:y.vhostIntro,children:[e.jsx("p",{children:s("artifactVhostTableHint")}),le&&e.jsx("p",{children:s("artifactVhostFilesHint")}),e.jsx("p",{children:s(n.supported?"appAccessHint":"appAccessUnavailable")})]}),n.error&&e.jsx("p",{role:"alert",children:n.error}),e.jsx(Re,{selectedKey:z,title:(oe==null?void 0:oe.name)||s("artifactVhostAdd"),onClose:()=>J(null),detail:F.map((i,m)=>{var V;return i.id===z&&e.jsxs("fieldset",{className:y.vhostRow,disabled:t.locked,children:[e.jsxs("label",{children:[s("artifactVhostName"),e.jsx("input",{type:"text",value:i.name,onBlur:()=>void R(),autoComplete:"off",spellCheck:!1,onChange:x=>T(S=>S.map((b,u)=>u===m?{...b,name:x.target.value}:b))})]}),le&&e.jsxs("label",{children:[s("artifactVhostServes"),e.jsxs("select",{value:i.kind,onChange:x=>{const S=x.target.value,b=F.map((u,D)=>{if(D!==m||u.kind===S)return u;const ye={id:u.id,name:u.name,...u.public===void 0?{}:{public:u.public}};return S==="files"?{...ye,kind:S,path:""}:{...ye,kind:S,port:19432}});T(b)},children:[e.jsx("option",{value:"port",children:s("artifactVhostServesPort")}),e.jsx("option",{value:"files",children:s("artifactVhostServesFiles")})]})]}),i.kind==="files"?e.jsxs("label",{className:y.pathField,children:[s("artifactVhostPath"),e.jsxs("span",{className:y.withLinkIcon,children:[e.jsx("input",{type:"text",value:i.path,onBlur:()=>void R(),placeholder:"~/site/index.html",autoComplete:"off",spellCheck:!1,onChange:x=>T(S=>S.map((b,u)=>u===m&&b.kind==="files"?{...b,path:x.target.value}:b))}),be(i)&&e.jsx(Ae,{kind:"file",url:be(i),label:s("artifactVhostOpenInFileViewer"),onCopied:de})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{children:[s("artifactVhostPort"),e.jsx("input",{type:"number",min:1,max:65535,value:i.port||"",onBlur:()=>void R(),onChange:x=>T(S=>S.map((b,u)=>u===m&&b.kind==="port"?{...b,port:Number(x.target.value)}:b))})]}),e.jsxs("label",{children:[s("artifactVhostEnv"),e.jsx("input",{type:"text",value:i.env??"",onBlur:()=>void R(),placeholder:"PLANNOTATOR_PORT",autoComplete:"off",spellCheck:!1,onChange:x=>T(S=>S.map((b,u)=>u===m&&b.kind==="port"?{...b,env:x.target.value}:b))})]})]}),e.jsx("button",{type:"button",onClick:()=>{const x=F.filter((S,b)=>b!==m);T(x),J(null),R({vhosts:x})},children:s("artifactVhostRemove")}),r.status&&W(t,i)&&e.jsx(ts,{name:i.name,status:r.status,update:r.update,disabled:t.locked||!t.vhostPublicRoot||!t.publicOrigin,focusRequest:k},i.name),n.supported&&e.jsxs("div",{className:y.access,children:[e.jsxs("label",{className:y.toggle,children:[e.jsx("input",{type:"checkbox",checked:i.public===!0,disabled:Y((V=r.status)==null?void 0:V.policies,i.name)!==void 0,onChange:x=>{const S=F.map((b,u)=>u===m?{...b,public:x.target.checked}:b);T(S),R({vhosts:S})}}),s("appAccessPublic")]}),i.kind==="files"&&i.public&&e.jsxs("div",{className:y.password,children:[e.jsxs("label",{children:[s("artifactVhostPassword"),e.jsx("input",{type:"password",value:i.password??"",autoComplete:"new-password",placeholder:i.passwordProtected?"••••••••":"",onBlur:()=>void R(),onChange:x=>T(S=>S.map((b,u)=>u===m&&b.kind==="files"?{...b,password:x.target.value||void 0}:b))})]}),i.passwordProtected&&e.jsx("button",{type:"button",onClick:()=>{const x=F.map((S,b)=>b===m&&S.kind==="files"?{...S,password:""}:S);T(x),R({vhosts:x})},children:s("artifactVhostPasswordClear")}),e.jsx("p",{children:s(i.passwordProtected?"artifactVhostPasswordSet":"artifactVhostPasswordHint")})]}),W(t,i)&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",disabled:!n.config,onClick:async()=>{const x=ge(i);de(!!x&&await Oe(x))},children:s("appAccessCopy")}),e.jsx("button",{type:"button",disabled:je,onClick:async()=>{se(!0);try{await o.fetch(`/artifacts/vhosts/${encodeURIComponent(i.name)}/revoke`,{method:"POST"}),n.refresh(),U(s("appAccessRevoked"))}catch(x){U(x instanceof Error?x.message:String(x))}finally{se(!1)}},children:s("appAccessRevoke")})]})]})]},i.id)}),children:e.jsxs("table",{className:y.table,"aria-label":s("artifactVhostTableTitle"),children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(q,{column:"domain",label:s("settingsCollectionDomain"),...te}),e.jsx(q,{column:"serves",label:s("artifactVhostServes"),...te}),e.jsx("th",{scope:"col",className:y.linksHeader,children:e.jsx("span",{className:y.linkIconLabel,children:s("settingsCollectionLinks")})}),n.supported&&e.jsx(q,{column:"access",label:s("settingsCollectionAccess"),...te})]})}),e.jsx("tbody",{children:Ve.map(i=>{var b,u;const m=ge(i),V=i.kind==="files"&&W(t,i)?(b=ce[i.name])==null?void 0:b.linkedFiles:void 0,x=()=>J(z===i.id?null:i.id),S=`${i.name}.${t.vhostPublicRoot}`;return e.jsxs("tr",{className:fe(i)?y.oauthBlocked:void 0,...Pe(x),children:[e.jsx("td",{children:e.jsxs("button",{type:"button","aria-expanded":z===i.id,onClick:x,children:[e.jsxs("span",{"aria-hidden":"true",children:[z===i.id?"▾":"▸"," "]}),e.jsx("span",{className:y.domainName,title:i.name||void 0,children:i.name||s("artifactVhostAdd")}),i.name&&e.jsxs("small",{className:y.domainSuffix,children:[".",l||"localhost"]})]})}),e.jsxs("td",{children:[i.kind==="files"&&i.path?e.jsx(Ne,{path:i.path}):e.jsx("span",{className:y.target,children:i.kind==="files"?s("artifactVhostServesFiles"):`:${i.port}`}),V&&e.jsx("small",{className:y.linkedFiles,title:ls(V,s),children:s(V.truncated?"artifactVhostLinkedFilesTruncated":"artifactVhostLinkedFiles",{count:V.count})})]}),e.jsx("td",{className:y.links,children:e.jsxs("div",{className:y.linksCell,children:[m&&e.jsx(Ae,{kind:"service",url:m,label:s("artifactVhostOpenLink",{name:i.name}),onCopied:de}),((u=r.status)==null?void 0:u.accessedHosts.includes(S))&&e.jsx("button",{type:"button",className:y.linkIcon,title:s("vhostOauthHostLogs",{name:i.name}),"aria-label":s("vhostOauthHostLogs",{name:i.name}),onClick:()=>d(S),children:"◷"})]})}),n.supported&&e.jsxs("td",{children:[e.jsx("button",{type:"button",className:y.accessButton,onClick:()=>{J(i.id),f(D=>D+1)},children:me(i)}),fe(i)&&e.jsx("small",{children:s("vhostOauthBlocked")})]})]},i.id)})})]})}),e.jsx("button",{type:"button",disabled:t.locked,onClick:()=>{const i=Le.current++;T(m=>[...m,{id:i,kind:"port",name:"",port:19432}]),J(i)},children:s("artifactVhostAdd")})]})}),e.jsx(Ut,{}),t.locked&&e.jsx("p",{children:s("artifactLocked")}),je&&e.jsx("p",{role:"status",children:s("artifactSaving")}),xe&&e.jsx("p",{role:"status",children:xe})]})}function ps(){const{t}=B(),{version:a}=ae(),{settings:s,updateSetting:o}=Me();return!s||!Z(a,Q.mcpAppViews.name)?null:e.jsx(ve,{title:t("mcpAppViewsSettingTitle"),description:t("mcpAppViewsSettingDescription"),keywords:["MCP","MCP Apps","Codex"],children:e.jsxs("label",{style:{display:"flex",gap:"var(--space-2)",alignItems:"center",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:s.mcpAppViews===!0,onChange:n=>o("mcpAppViews",n.target.checked)}),e.jsx("span",{children:t("mcpAppViewsSettingTitle")})]})})}function Ms(){const{t}=B(),{version:a}=ae();return Ue(t("settingsAppsTitle")),e.jsxs(ve,{description:t("settingsAppsDescription"),children:[a!=null&&a.artifactViewer?e.jsx(cs,{}):e.jsx("p",{children:t("settingsAppsUnavailable")}),e.jsx(ps,{})]})}function Us(){const{t}=B();return e.jsx($e,{to:"/settings/apps",children:t("settingsAppsLink")})}export{Ms as AppsSettings,Us as AppsSettingsLink};
@@ -1 +1 @@
1
- import{r as l,j as h}from"./clientSummaryStore-Cr4yWo-Y.js";import{t as ie}from"./usePanelSlideAnimations-C5qJWoVe.js";import{aQ as de,aR as je,aS as G,u as me,t as Me}from"./main-BpQ_EIjC.js";import{t as Ue,u as we,b as Te,f as Ce}from"./sourceTransportPaths-COX454wy.js";import{u as Ie}from"./SessionMetadataContext-Bfs4TAAj.js";import{b as ye,M as Le}from"./Modal-iT2_XPlO.js";const k=32,Q=2,be="image/png";function J(e,t){const r=e/t>Q,o=t,s=r?o*Q:e,i=r?Math.max(0,Math.floor((e-s)/2)):0,a=0,c=Math.max(1,Math.round(s/o*k));return{sourceX:i,sourceY:a,sourceWidth:s,sourceHeight:o,width:c,height:k,croppedWide:r}}const Be=12,Ne=8;function Z(e,t,n){return n<t?t:Math.min(n,Math.max(t,e))}function $(e,t,n,r){if(n<1||r<1)return null;const o=Math.max(1,e),s=Math.max(1,t),i=Math.min(1,n/o,r/s);return{width:Math.max(1,o*i),height:Math.max(1,s*i)}}function L(e){return e.width*e.height}function ae(e,t,n,r){return Z(e,n,r-n-t)}function Pe({anchor:e,imageWidth:t,imageHeight:n,viewportWidth:r,viewportHeight:o,margin:s=Be,gap:i=Ne}){const a=Math.max(1,r-s*2),c=Math.max(1,o-s*2),f=$(t,n,a,c)??{width:1,height:1},d=L(f)*.5,m=e.left+e.width/2,g=e.top+e.height/2,w=[],I=o-s-(e.top+e.height+i),u=$(t,n,a,I);u&&w.push({size:u,useful:L(u)>=d,box:{top:e.top+e.height+i,left:ae(m-u.width/2,u.width,s,r),width:u.width,height:u.height}});const M=e.top-i-s,v=$(t,n,a,M);v&&w.push({size:v,useful:L(v)>=d,box:{top:e.top-i-v.height,left:ae(m-v.width/2,v.width,s,r),width:v.width,height:v.height}});const B=r-s-(e.left+e.width+i),p=$(t,n,B,c);p&&w.push({size:p,useful:L(p)>=d,box:{top:Z(g-p.height/2,s,o-s-p.height),left:e.left+e.width+i,width:p.width,height:p.height}});const A=e.left-i-s,b=$(t,n,A,c);b&&w.push({size:b,useful:L(b)>=d,box:{top:Z(g-b.height/2,s,o-s-b.height),left:e.left-i-b.width,width:b.width,height:b.height}});const E=w.find(U=>U.useful)??w.reduce((U,T)=>!U||L(T.size)>L(U.size)?T:U,null);return E?E.box:{top:s,left:s,width:f.width,height:f.height}}const Oe="yep-anywhere-attachment-previews",He=3,x="images",j="blobs",ce=128*1024*1024,ee=`thumb:v3:${k}:${Q}:${be}`;function F(e){return e!==null&&"aliasFor"in e}function pe(e){return{aliasFor:e,totalBytes:0,lastAccessedAt:Date.now()}}const P=new Map;function $e(e){return e.startsWith("image/")}function X(e){const{fullBlob:t,thumbnailBlob:n,...r}=e;return{metadata:r,blobs:{fullBlob:t,thumbnailBlob:n}}}function ze(e){const t=e.objectStore(x),n=e.objectStore(j),r=t.openCursor();r.onsuccess=()=>{const o=r.result;if(!o)return;const s=o.value;if("fullBlob"in s&&s.fullBlob){const i=X(s);n.put(i.blobs,o.primaryKey),o.update(i.metadata)}o.continue()}}const ve=je(Oe,He,(e,t)=>{if(!e.objectStoreNames.contains(x))e.createObjectStore(x).createIndex("byLastAccessedAt","lastAccessedAt");else{const n=t.objectStore(x);n.indexNames.contains("byLastAccessedAt")||n.createIndex("byLastAccessedAt","lastAccessedAt")}e.objectStoreNames.contains(j)||(e.createObjectStore(j),ze(t))}).get;function te(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error),e.onabort=()=>n(e.error??new Error("Transaction aborted"))})}async function ge(e,t,n){const{metadata:r,blobs:o}=X(n),s=e.transaction([x,j],"readwrite");s.objectStore(x).put(r,t),s.objectStore(j).put(o,t),await te(s)}async function Ae(e){if(typeof createImageBitmap=="function")try{const t=await createImageBitmap(e),n=J(t.width,t.height),r=document.createElement("canvas");r.width=n.width,r.height=n.height;const o=r.getContext("2d");if(!o){t.close();return}o.drawImage(t,n.sourceX,n.sourceY,n.sourceWidth,n.sourceHeight,0,0,n.width,n.height),t.close();const s=await new Promise(i=>{r.toBlob(a=>i(a??void 0),be)});return s?{blob:s,width:n.width,height:n.height}:void 0}catch{return}}function ke(e){return e.thumbnailVariant!==ee}async function We(e){const r=e.transaction(x,"readonly").objectStore(x).getAll();return(await new Promise((s,i)=>{r.onsuccess=()=>s(r.result),r.onerror=()=>i(r.error)})??[]).reduce((s,i)=>s+(i.totalBytes??0),0)}async function Ve(e,t){if(t<=0)return;const n=e.transaction([x,j],"readwrite"),r=n.objectStore(x),o=n.objectStore(j),s=r.index("byLastAccessedAt");let i=0;await new Promise((a,c)=>{const f=s.openCursor();f.onerror=()=>c(f.error),f.onsuccess=()=>{const d=f.result;if(!d||i>=t){a();return}const m=d.value;if(F(m)){d.continue();return}if(i+=m.totalBytes??0,o.delete(d.primaryKey),d.delete(),m.path&&m.path!==m.attachmentId){const g=r.get(m.path);g.onerror=()=>c(g.error),g.onsuccess=()=>{const w=g.result;w&&F(w)&&w.aliasFor===m.attachmentId&&r.delete(m.path),d.continue()};return}d.continue()}}),await te(n)}async function le(e,t){const n=await G(e,x,t);if(!n)return null;let r=t,o;if(F(n)){const i=await G(e,x,n.aliasFor);if(!i||F(i))return null;r=n.aliasFor,o=i}else o=n;const s=await G(e,j,r);return s?{key:r,preview:{...o,...s},viaAlias:r!==t}:null}function ue(e){P.set(e.attachmentId,e),e.path&&e.path!==e.attachmentId&&P.set(e.path,e)}function De(e){P.delete(e.attachmentId),e.path&&P.delete(e.path)}async function gt(e,t){if(!$e(e.mimeType))return;const n=e.width!==void 0&&e.height!==void 0?J(e.width,e.height):void 0,r=t.slice(0,t.size,t.type),o=Date.now(),s={attachmentId:e.id,path:e.path,originalName:e.originalName,mimeType:e.mimeType,size:e.size,thumbnailVariant:ee,thumbnailWidth:(n==null?void 0:n.width)??k,thumbnailHeight:(n==null?void 0:n.height)??k,fullBlob:r,totalBytes:r.size,createdAt:o,lastAccessedAt:o};ue(s);try{const i=await Ae(t),a=r.size+((i==null?void 0:i.blob.size)??0),c=await ve(),f={...s,thumbnailWidth:(i==null?void 0:i.width)??s.thumbnailWidth,thumbnailHeight:(i==null?void 0:i.height)??s.thumbnailHeight,thumbnailBlob:i==null?void 0:i.blob,totalBytes:a,lastAccessedAt:Date.now()};ue(f),await ge(c,e.id,f),e.path!==e.id&&await de(c,x,e.path,pe(e.id)).catch(()=>{});const d=await We(c);d>ce&&await Ve(c,d-ce)}finally{De(s)}}async function Fe(e,t,n){const{metadata:r,blobs:o}=X(n),s=e.transaction([x,j],"readwrite"),i=s.objectStore(x),a=s.objectStore(j);i.put(r,n.attachmentId),a.put(o,n.attachmentId),i.put(pe(n.attachmentId),t),a.delete(t),await te(s)}async function Xe(e,t){const n=P.get(e)??(t&&t!==e?P.get(t):void 0);if(n)return{...n,lastAccessedAt:Date.now()};const r=await ve(),o=await le(r,e)??(t&&t!==e?await le(r,t):null);if(!o)return null;let s=o.key,i=o.preview;if(!o.viaAlias&&s!==e&&(i={...i,attachmentId:e},await Fe(r,s,i),s=e),ke(i)){const c=await Ae(i.fullBlob);c&&(i={...i,thumbnailWidth:c.width,thumbnailHeight:c.height,thumbnailBlob:c.blob,thumbnailVariant:ee},await ge(r,s,i))}const a={...i,lastAccessedAt:Date.now()};return await de(r,x,s,X(a).metadata),a}function _e(e,t){if(!e)return null;const n=e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e)?`/api/local-image?path=${encodeURIComponent(e)}`:null,r=e.includes("\\")?"\\":"/",o=e.split(/[\\/]/);if(o.length<3)return n;const s=o[o.length-1],i=o[o.length-2],a=o[o.length-3];if(!s||!i||!a||!/^([0-9a-f-]{36})_/i.test(s)||a!==".attachments"&&a!=="attachments"&&o[o.length-4]!=="uploads")return n;if(!t)if(a===".attachments"){const c=o.slice(0,-3).join(r);if(!c)return null;t=ie(c)}else if(a==="attachments"&&o[o.length-4]===".yep"){const c=o.slice(0,-4).join(r);if(!c)return null;t=ie(c)}else{if(a==="attachments")return n;t=a}return`/api/projects/${encodeURIComponent(t)}/sessions/${encodeURIComponent(i)}/upload/${encodeURIComponent(s)}`}function he(e,t=!0,n){const[r,o]=l.useState(null),[s,i]=l.useState(!1),[a,c]=l.useState(null),f=l.useRef(null),d=ye().transport,m=!n&&d.capabilities.sameOriginUrls;return l.useEffect(()=>{const g=()=>{f.current&&(URL.revokeObjectURL(f.current),f.current=null)};if(!e||!t){g(),o(null),c(null);return}if(m){g(),o(null),i(!1),c(null);return}let w=!1;return i(!0),c(null),g(),o(null),(n?n(e):d.fetchBlob(Ue(e))).then(u=>{if(w)return;const M=URL.createObjectURL(u);f.current=M,o(M),i(!1)}).catch(u=>{w||(console.error("[useRemoteImage] Failed to fetch image:",u),c(u instanceof Error?u.message:"Failed to load image"),i(!1))}),()=>{w=!0,g()}},[e,m,t,d,n]),e?m?{url:e,loading:!1,error:null}:{url:r,loading:s,error:a}:{url:null,loading:!1,error:null}}const qe="_chip_17ufa_1",Ke="_imageChip_17ufa_13",Ye="_main_17ufa_18",Ge="_preview_17ufa_33",Qe="_previewFallback_17ufa_52",Ze="_hoverPreview_17ufa_57",Je="_uploading_17ufa_73",et="_name_17ufa_77",tt="_size_17ufa_87",nt="_progress_17ufa_92",rt="_remove_17ufa_98",R={chip:qe,imageChip:Ke,main:Ye,preview:Ge,previewFallback:Qe,hoverPreview:Ze,uploading:Je,name:et,size:tt,progress:nt,remove:rt},st=450,ot=/^([0-9a-f-]{36})_/i;function it(e){return e.startsWith("image/")}const z=24,at=8;function fe(e){return e==="-"||e==="_"||e===" "}function xe(e){const t=e.trim();if(t.length<=z)return t;const n=z+at;for(let r=z;r<t.length;r+=1)if(fe(t[r])){if(r<=n)return`${t.slice(0,r).replace(/[ -_]+$/u,"")}...`;break}for(let r=z-1;r>=0;r-=1)if(fe(t[r]))return`${t.slice(0,r).replace(/[ -_]+$/u,"")}...`;return`${t.slice(0,z).replace(/[ -_]+$/u,"")}...`}function ct(e){if(!e)return null;const t=e.split(/[\\/]/).pop()??"",n=ot.exec(t);return(n==null?void 0:n[1])??null}function lt(e,t){const[n,r]=l.useState(!1);return l.useEffect(()=>{const o=e.current;if(!t||n||!o)return;if(typeof IntersectionObserver>"u"){r(!0);return}const s=new IntersectionObserver(i=>{i.some(a=>a.isIntersecting)&&r(!0)},{rootMargin:"100% 0px"});return s.observe(o),()=>s.disconnect()},[t,n,e]),n}function ut(e,t,n,r,o,s){const[i,a]=l.useState(null),[c,f]=l.useState(null),[d,m]=l.useState(null),[g,w]=l.useState(null),[I,u]=l.useState(!1),[M,v]=l.useState(null),[B,p]=l.useState(!1),A=l.useRef(null),b=l.useRef(null),S=we(),E=l.useMemo(()=>S?t?Te(S,t):null:_e(t,s),[t,s,S]),U=l.useMemo(()=>S?C=>Ce({path:C,relayUrl:S.relayUrl,relayUsername:S.relayUsername}):void 0,[S]);l.useEffect(()=>{let C=!1;if(v(null),a(null),f(null),m(null),w(null),S){u(!1),p(!0);return}return o?(u(!1),p(!1),()=>{A.current&&(URL.revokeObjectURL(A.current),A.current=null),b.current&&(URL.revokeObjectURL(b.current),b.current=null)}):!t&&!e?(u(!1),p(!1),()=>{A.current&&(URL.revokeObjectURL(A.current),A.current=null),b.current&&(URL.revokeObjectURL(b.current),b.current=null)}):(u(!0),p(!1),Xe(e,t).then(_=>{if(C)return;if(!_){u(!1),p(!0);return}const W=_.thumbnailBlob??_.fullBlob,O=URL.createObjectURL(W),V=URL.createObjectURL(_.fullBlob);A.current=O,b.current=V,a(O),f(V),m(_.thumbnailWidth??null),w(_.thumbnailHeight??null),u(!1)}).catch(_=>{C||(E?(v(null),p(!0)):v(_ instanceof Error?_.message:"Failed to load attachment preview"),u(!1))}),()=>{C=!0,A.current&&(URL.revokeObjectURL(A.current),A.current=null),b.current&&(URL.revokeObjectURL(b.current),b.current=null)})},[e,t,o,E,S]);const T=he(E,n&&B&&!o,U),q=he(!S&&(E!=null&&E.startsWith("/api/local-image?"))&&(t!=null&&t.replaceAll("\\","/").includes("/.rendez/delivered/"))?`${E}&rendezOriginal=1`:null,r);return{previewUrl:o??i??T.url,fullUrl:o??c??q.url??T.url,previewWidth:d,previewHeight:g,loading:I||T.loading,error:M??T.error}}function ht({originalName:e,path:t,mimeType:n,sizeLabel:r,onRemove:o}){const{t:s}=me();return h.jsxs("span",{className:R.chip,title:`${n}, ${r}`,children:[h.jsx("span",{className:R.previewFallback,"aria-hidden":"true",children:"📎"}),h.jsx("span",{className:R.name,title:t??e,children:xe(e)}),h.jsx("span",{className:R.size,children:r}),o&&h.jsx("button",{type:"button",className:R.remove,onClick:o,"aria-label":s("attachmentRemove",{name:e}),children:"x"})]})}function ft({attachmentId:e,originalName:t,path:n,mimeType:r,sizeLabel:o,imageWidth:s,imageHeight:i,previewUrl:a,projectId:c,onRemove:f}){var ne;const{t:d}=me(),m=Ie(),g=c??(m==null?void 0:m.projectId),[w,I]=l.useState(!1),[u,M]=l.useState(!1),[v,B]=l.useState(null),p=l.useRef(null),A=l.useRef(null),b=l.useRef(null),S=ct(n),E=e??S??n??t,U=we(),T=(ne=_e(n,g))==null?void 0:ne.startsWith("/api/local-image?"),q=lt(A,!!(U||T)),{previewUrl:C,fullUrl:_,previewWidth:W,previewHeight:O,loading:V,error:Re}=ut(E,n,w||u||q,w,a,g),D=l.useCallback(()=>{p.current!==null&&(window.clearTimeout(p.current),p.current=null)},[]);l.useEffect(()=>D,[D]);const Se=()=>{D(),p.current=window.setTimeout(()=>{M(!0)},st)},K=()=>{D(),M(!1),B(null)},y=l.useCallback(()=>{var oe;const H=(oe=A.current)==null?void 0:oe.getBoundingClientRect();if(!H)return;const N=b.current,re=s??(N&&N.naturalWidth>0?N.naturalWidth:null),se=i??(N&&N.naturalHeight>0?N.naturalHeight:null);!re||!se||B(Pe({anchor:{top:H.top,left:H.left,width:H.width,height:H.height},imageWidth:re,imageHeight:se,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}))},[i,s]);l.useLayoutEffect(()=>{if(!(!u||!_))return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[_,u,y]);const Y=W&&O?{width:W,height:O}:s&&i?J(s,i):null,Ee=Y?{width:`${Y.width}px`,height:`${Y.height}px`}:void 0;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:`${R.chip} ${R.imageChip}`,children:[h.jsxs("button",{ref:A,type:"button",className:R.main,onClick:()=>{K(),I(!0)},onMouseEnter:Se,onMouseLeave:K,onBlur:K,"aria-label":`Open ${t}`,title:`${r}, ${o}`,children:[h.jsx("span",{className:R.preview,"aria-hidden":"true",style:Ee,children:C?h.jsx("img",{src:C,alt:""}):h.jsx("span",{className:R.previewFallback,children:"📎"})}),h.jsx("span",{className:R.name,title:n??t,children:xe(t)}),h.jsx("span",{className:R.size,children:o})]}),f&&h.jsx("button",{type:"button",className:R.remove,onClick:f,"aria-label":d("attachmentRemove",{name:t}),children:"x"})]}),u&&!w&&_&&Me.createPortal(h.jsx("div",{className:R.hoverPreview,"data-testid":"attachment-hover-preview","aria-hidden":"true",style:v?{top:v.top,left:v.left,width:v.width,height:v.height}:{visibility:"hidden"},children:h.jsx("img",{ref:b,src:_,alt:"",onLoad:y})}),document.body),w&&h.jsx(Le,{title:t,onClose:()=>I(!1),children:h.jsxs("div",{className:"uploaded-image-modal",children:[V&&h.jsx("div",{className:"image-loading",children:"Loading..."}),Re&&h.jsx("div",{className:"image-error",children:"Failed to load image"}),_&&h.jsx("img",{src:_,alt:t})]})})]})}function At(e){return it(e.mimeType)?h.jsx(ft,{...e}):h.jsx(ht,{...e})}export{At as A,R as c,_e as g,Pe as p,gt as s,he as u};
1
+ import{r as l,j as h}from"./clientSummaryStore-Dsgo1zWK.js";import{t as ie}from"./usePanelSlideAnimations-XdQhGgr-.js";import{aR as de,aS as je,aT as G,u as me,t as Me}from"./main-BX4yZXDF.js";import{t as Ue,u as we,b as Te,f as Ce}from"./sourceTransportPaths-BTR7eFi5.js";import{u as Ie}from"./SessionMetadataContext-D0F_4Wp0.js";import{b as ye,M as Le}from"./Modal-CHNqXAgW.js";const k=32,Z=2,be="image/png";function Q(e,t){const r=e/t>Z,o=t,s=r?o*Z:e,i=r?Math.max(0,Math.floor((e-s)/2)):0,a=0,c=Math.max(1,Math.round(s/o*k));return{sourceX:i,sourceY:a,sourceWidth:s,sourceHeight:o,width:c,height:k,croppedWide:r}}const Be=12,Ne=8;function J(e,t,n){return n<t?t:Math.min(n,Math.max(t,e))}function $(e,t,n,r){if(n<1||r<1)return null;const o=Math.max(1,e),s=Math.max(1,t),i=Math.min(1,n/o,r/s);return{width:Math.max(1,o*i),height:Math.max(1,s*i)}}function L(e){return e.width*e.height}function ae(e,t,n,r){return J(e,n,r-n-t)}function Pe({anchor:e,imageWidth:t,imageHeight:n,viewportWidth:r,viewportHeight:o,margin:s=Be,gap:i=Ne}){const a=Math.max(1,r-s*2),c=Math.max(1,o-s*2),f=$(t,n,a,c)??{width:1,height:1},d=L(f)*.5,m=e.left+e.width/2,g=e.top+e.height/2,w=[],I=o-s-(e.top+e.height+i),u=$(t,n,a,I);u&&w.push({size:u,useful:L(u)>=d,box:{top:e.top+e.height+i,left:ae(m-u.width/2,u.width,s,r),width:u.width,height:u.height}});const M=e.top-i-s,v=$(t,n,a,M);v&&w.push({size:v,useful:L(v)>=d,box:{top:e.top-i-v.height,left:ae(m-v.width/2,v.width,s,r),width:v.width,height:v.height}});const B=r-s-(e.left+e.width+i),p=$(t,n,B,c);p&&w.push({size:p,useful:L(p)>=d,box:{top:J(g-p.height/2,s,o-s-p.height),left:e.left+e.width+i,width:p.width,height:p.height}});const A=e.left-i-s,b=$(t,n,A,c);b&&w.push({size:b,useful:L(b)>=d,box:{top:J(g-b.height/2,s,o-s-b.height),left:e.left-i-b.width,width:b.width,height:b.height}});const E=w.find(U=>U.useful)??w.reduce((U,T)=>!U||L(T.size)>L(U.size)?T:U,null);return E?E.box:{top:s,left:s,width:f.width,height:f.height}}const Oe="yep-anywhere-attachment-previews",He=3,x="images",j="blobs",ce=128*1024*1024,ee=`thumb:v3:${k}:${Z}:${be}`;function F(e){return e!==null&&"aliasFor"in e}function pe(e){return{aliasFor:e,totalBytes:0,lastAccessedAt:Date.now()}}const P=new Map;function $e(e){return e.startsWith("image/")}function X(e){const{fullBlob:t,thumbnailBlob:n,...r}=e;return{metadata:r,blobs:{fullBlob:t,thumbnailBlob:n}}}function ze(e){const t=e.objectStore(x),n=e.objectStore(j),r=t.openCursor();r.onsuccess=()=>{const o=r.result;if(!o)return;const s=o.value;if("fullBlob"in s&&s.fullBlob){const i=X(s);n.put(i.blobs,o.primaryKey),o.update(i.metadata)}o.continue()}}const ve=je(Oe,He,(e,t)=>{if(!e.objectStoreNames.contains(x))e.createObjectStore(x).createIndex("byLastAccessedAt","lastAccessedAt");else{const n=t.objectStore(x);n.indexNames.contains("byLastAccessedAt")||n.createIndex("byLastAccessedAt","lastAccessedAt")}e.objectStoreNames.contains(j)||(e.createObjectStore(j),ze(t))}).get;function te(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error),e.onabort=()=>n(e.error??new Error("Transaction aborted"))})}async function ge(e,t,n){const{metadata:r,blobs:o}=X(n),s=e.transaction([x,j],"readwrite");s.objectStore(x).put(r,t),s.objectStore(j).put(o,t),await te(s)}async function Ae(e){if(typeof createImageBitmap=="function")try{const t=await createImageBitmap(e),n=Q(t.width,t.height),r=document.createElement("canvas");r.width=n.width,r.height=n.height;const o=r.getContext("2d");if(!o){t.close();return}o.drawImage(t,n.sourceX,n.sourceY,n.sourceWidth,n.sourceHeight,0,0,n.width,n.height),t.close();const s=await new Promise(i=>{r.toBlob(a=>i(a??void 0),be)});return s?{blob:s,width:n.width,height:n.height}:void 0}catch{return}}function ke(e){return e.thumbnailVariant!==ee}async function We(e){const r=e.transaction(x,"readonly").objectStore(x).getAll();return(await new Promise((s,i)=>{r.onsuccess=()=>s(r.result),r.onerror=()=>i(r.error)})??[]).reduce((s,i)=>s+(i.totalBytes??0),0)}async function Ve(e,t){if(t<=0)return;const n=e.transaction([x,j],"readwrite"),r=n.objectStore(x),o=n.objectStore(j),s=r.index("byLastAccessedAt");let i=0;await new Promise((a,c)=>{const f=s.openCursor();f.onerror=()=>c(f.error),f.onsuccess=()=>{const d=f.result;if(!d||i>=t){a();return}const m=d.value;if(F(m)){d.continue();return}if(i+=m.totalBytes??0,o.delete(d.primaryKey),d.delete(),m.path&&m.path!==m.attachmentId){const g=r.get(m.path);g.onerror=()=>c(g.error),g.onsuccess=()=>{const w=g.result;w&&F(w)&&w.aliasFor===m.attachmentId&&r.delete(m.path),d.continue()};return}d.continue()}}),await te(n)}async function le(e,t){const n=await G(e,x,t);if(!n)return null;let r=t,o;if(F(n)){const i=await G(e,x,n.aliasFor);if(!i||F(i))return null;r=n.aliasFor,o=i}else o=n;const s=await G(e,j,r);return s?{key:r,preview:{...o,...s},viaAlias:r!==t}:null}function ue(e){P.set(e.attachmentId,e),e.path&&e.path!==e.attachmentId&&P.set(e.path,e)}function De(e){P.delete(e.attachmentId),e.path&&P.delete(e.path)}async function gt(e,t){if(!$e(e.mimeType))return;const n=e.width!==void 0&&e.height!==void 0?Q(e.width,e.height):void 0,r=t.slice(0,t.size,t.type),o=Date.now(),s={attachmentId:e.id,path:e.path,originalName:e.originalName,mimeType:e.mimeType,size:e.size,thumbnailVariant:ee,thumbnailWidth:(n==null?void 0:n.width)??k,thumbnailHeight:(n==null?void 0:n.height)??k,fullBlob:r,totalBytes:r.size,createdAt:o,lastAccessedAt:o};ue(s);try{const i=await Ae(t),a=r.size+((i==null?void 0:i.blob.size)??0),c=await ve(),f={...s,thumbnailWidth:(i==null?void 0:i.width)??s.thumbnailWidth,thumbnailHeight:(i==null?void 0:i.height)??s.thumbnailHeight,thumbnailBlob:i==null?void 0:i.blob,totalBytes:a,lastAccessedAt:Date.now()};ue(f),await ge(c,e.id,f),e.path!==e.id&&await de(c,x,e.path,pe(e.id)).catch(()=>{});const d=await We(c);d>ce&&await Ve(c,d-ce)}finally{De(s)}}async function Fe(e,t,n){const{metadata:r,blobs:o}=X(n),s=e.transaction([x,j],"readwrite"),i=s.objectStore(x),a=s.objectStore(j);i.put(r,n.attachmentId),a.put(o,n.attachmentId),i.put(pe(n.attachmentId),t),a.delete(t),await te(s)}async function Xe(e,t){const n=P.get(e)??(t&&t!==e?P.get(t):void 0);if(n)return{...n,lastAccessedAt:Date.now()};const r=await ve(),o=await le(r,e)??(t&&t!==e?await le(r,t):null);if(!o)return null;let s=o.key,i=o.preview;if(!o.viaAlias&&s!==e&&(i={...i,attachmentId:e},await Fe(r,s,i),s=e),ke(i)){const c=await Ae(i.fullBlob);c&&(i={...i,thumbnailWidth:c.width,thumbnailHeight:c.height,thumbnailBlob:c.blob,thumbnailVariant:ee},await ge(r,s,i))}const a={...i,lastAccessedAt:Date.now()};return await de(r,x,s,X(a).metadata),a}function _e(e,t){if(!e)return null;const n=e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e)?`/api/local-image?path=${encodeURIComponent(e)}`:null,r=e.includes("\\")?"\\":"/",o=e.split(/[\\/]/);if(o.length<3)return n;const s=o[o.length-1],i=o[o.length-2],a=o[o.length-3];if(!s||!i||!a||!/^([0-9a-f-]{36})_/i.test(s)||a!==".attachments"&&a!=="attachments"&&o[o.length-4]!=="uploads")return n;if(!t)if(a===".attachments"){const c=o.slice(0,-3).join(r);if(!c)return null;t=ie(c)}else if(a==="attachments"&&o[o.length-4]===".yep"){const c=o.slice(0,-4).join(r);if(!c)return null;t=ie(c)}else{if(a==="attachments")return n;t=a}return`/api/projects/${encodeURIComponent(t)}/sessions/${encodeURIComponent(i)}/upload/${encodeURIComponent(s)}`}function he(e,t=!0,n){const[r,o]=l.useState(null),[s,i]=l.useState(!1),[a,c]=l.useState(null),f=l.useRef(null),d=ye().transport,m=!n&&d.capabilities.sameOriginUrls;return l.useEffect(()=>{const g=()=>{f.current&&(URL.revokeObjectURL(f.current),f.current=null)};if(!e||!t){g(),o(null),c(null);return}if(m){g(),o(null),i(!1),c(null);return}let w=!1;return i(!0),c(null),g(),o(null),(n?n(e):d.fetchBlob(Ue(e))).then(u=>{if(w)return;const M=URL.createObjectURL(u);f.current=M,o(M),i(!1)}).catch(u=>{w||(console.error("[useRemoteImage] Failed to fetch image:",u),c(u instanceof Error?u.message:"Failed to load image"),i(!1))}),()=>{w=!0,g()}},[e,m,t,d,n]),e?m?{url:e,loading:!1,error:null}:{url:r,loading:s,error:a}:{url:null,loading:!1,error:null}}const qe="_chip_17ufa_1",Ke="_imageChip_17ufa_13",Ye="_main_17ufa_18",Ge="_preview_17ufa_33",Ze="_previewFallback_17ufa_52",Je="_hoverPreview_17ufa_57",Qe="_uploading_17ufa_73",et="_name_17ufa_77",tt="_size_17ufa_87",nt="_progress_17ufa_92",rt="_remove_17ufa_98",R={chip:qe,imageChip:Ke,main:Ye,preview:Ge,previewFallback:Ze,hoverPreview:Je,uploading:Qe,name:et,size:tt,progress:nt,remove:rt},st=450,ot=/^([0-9a-f-]{36})_/i;function it(e){return e.startsWith("image/")}const z=24,at=8;function fe(e){return e==="-"||e==="_"||e===" "}function xe(e){const t=e.trim();if(t.length<=z)return t;const n=z+at;for(let r=z;r<t.length;r+=1)if(fe(t[r])){if(r<=n)return`${t.slice(0,r).replace(/[ -_]+$/u,"")}...`;break}for(let r=z-1;r>=0;r-=1)if(fe(t[r]))return`${t.slice(0,r).replace(/[ -_]+$/u,"")}...`;return`${t.slice(0,z).replace(/[ -_]+$/u,"")}...`}function ct(e){if(!e)return null;const t=e.split(/[\\/]/).pop()??"",n=ot.exec(t);return(n==null?void 0:n[1])??null}function lt(e,t){const[n,r]=l.useState(!1);return l.useEffect(()=>{const o=e.current;if(!t||n||!o)return;if(typeof IntersectionObserver>"u"){r(!0);return}const s=new IntersectionObserver(i=>{i.some(a=>a.isIntersecting)&&r(!0)},{rootMargin:"100% 0px"});return s.observe(o),()=>s.disconnect()},[t,n,e]),n}function ut(e,t,n,r,o,s){const[i,a]=l.useState(null),[c,f]=l.useState(null),[d,m]=l.useState(null),[g,w]=l.useState(null),[I,u]=l.useState(!1),[M,v]=l.useState(null),[B,p]=l.useState(!1),A=l.useRef(null),b=l.useRef(null),S=we(),E=l.useMemo(()=>S?t?Te(S,t):null:_e(t,s),[t,s,S]),U=l.useMemo(()=>S?C=>Ce({path:C,relayUrl:S.relayUrl,relayUsername:S.relayUsername}):void 0,[S]);l.useEffect(()=>{let C=!1;if(v(null),a(null),f(null),m(null),w(null),S){u(!1),p(!0);return}return o?(u(!1),p(!1),()=>{A.current&&(URL.revokeObjectURL(A.current),A.current=null),b.current&&(URL.revokeObjectURL(b.current),b.current=null)}):!t&&!e?(u(!1),p(!1),()=>{A.current&&(URL.revokeObjectURL(A.current),A.current=null),b.current&&(URL.revokeObjectURL(b.current),b.current=null)}):(u(!0),p(!1),Xe(e,t).then(_=>{if(C)return;if(!_){u(!1),p(!0);return}const W=_.thumbnailBlob??_.fullBlob,O=URL.createObjectURL(W),V=URL.createObjectURL(_.fullBlob);A.current=O,b.current=V,a(O),f(V),m(_.thumbnailWidth??null),w(_.thumbnailHeight??null),u(!1)}).catch(_=>{C||(E?(v(null),p(!0)):v(_ instanceof Error?_.message:"Failed to load attachment preview"),u(!1))}),()=>{C=!0,A.current&&(URL.revokeObjectURL(A.current),A.current=null),b.current&&(URL.revokeObjectURL(b.current),b.current=null)})},[e,t,o,E,S]);const T=he(E,n&&B&&!o,U),q=he(!S&&(E!=null&&E.startsWith("/api/local-image?"))&&(t!=null&&t.replaceAll("\\","/").includes("/.rendez/delivered/"))?`${E}&rendezOriginal=1`:null,r);return{previewUrl:o??i??T.url,fullUrl:o??c??q.url??T.url,previewWidth:d,previewHeight:g,loading:I||T.loading,error:M??T.error}}function ht({originalName:e,path:t,mimeType:n,sizeLabel:r,onRemove:o}){const{t:s}=me();return h.jsxs("span",{className:R.chip,title:`${n}, ${r}`,children:[h.jsx("span",{className:R.previewFallback,"aria-hidden":"true",children:"📎"}),h.jsx("span",{className:R.name,title:t??e,children:xe(e)}),h.jsx("span",{className:R.size,children:r}),o&&h.jsx("button",{type:"button",className:R.remove,onClick:o,"aria-label":s("attachmentRemove",{name:e}),children:"x"})]})}function ft({attachmentId:e,originalName:t,path:n,mimeType:r,sizeLabel:o,imageWidth:s,imageHeight:i,previewUrl:a,projectId:c,onRemove:f}){var ne;const{t:d}=me(),m=Ie(),g=c??(m==null?void 0:m.projectId),[w,I]=l.useState(!1),[u,M]=l.useState(!1),[v,B]=l.useState(null),p=l.useRef(null),A=l.useRef(null),b=l.useRef(null),S=ct(n),E=e??S??n??t,U=we(),T=(ne=_e(n,g))==null?void 0:ne.startsWith("/api/local-image?"),q=lt(A,!!(U||T)),{previewUrl:C,fullUrl:_,previewWidth:W,previewHeight:O,loading:V,error:Re}=ut(E,n,w||u||q,w,a,g),D=l.useCallback(()=>{p.current!==null&&(window.clearTimeout(p.current),p.current=null)},[]);l.useEffect(()=>D,[D]);const Se=()=>{D(),p.current=window.setTimeout(()=>{M(!0)},st)},K=()=>{D(),M(!1),B(null)},y=l.useCallback(()=>{var oe;const H=(oe=A.current)==null?void 0:oe.getBoundingClientRect();if(!H)return;const N=b.current,re=s??(N&&N.naturalWidth>0?N.naturalWidth:null),se=i??(N&&N.naturalHeight>0?N.naturalHeight:null);!re||!se||B(Pe({anchor:{top:H.top,left:H.left,width:H.width,height:H.height},imageWidth:re,imageHeight:se,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}))},[i,s]);l.useLayoutEffect(()=>{if(!(!u||!_))return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[_,u,y]);const Y=W&&O?{width:W,height:O}:s&&i?Q(s,i):null,Ee=Y?{width:`${Y.width}px`,height:`${Y.height}px`}:void 0;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:`${R.chip} ${R.imageChip}`,children:[h.jsxs("button",{ref:A,type:"button",className:R.main,onClick:()=>{K(),I(!0)},onMouseEnter:Se,onMouseLeave:K,onBlur:K,"aria-label":`Open ${t}`,title:`${r}, ${o}`,children:[h.jsx("span",{className:R.preview,"aria-hidden":"true",style:Ee,children:C?h.jsx("img",{src:C,alt:""}):h.jsx("span",{className:R.previewFallback,children:"📎"})}),h.jsx("span",{className:R.name,title:n??t,children:xe(t)}),h.jsx("span",{className:R.size,children:o})]}),f&&h.jsx("button",{type:"button",className:R.remove,onClick:f,"aria-label":d("attachmentRemove",{name:t}),children:"x"})]}),u&&!w&&_&&Me.createPortal(h.jsx("div",{className:R.hoverPreview,"data-testid":"attachment-hover-preview","aria-hidden":"true",style:v?{top:v.top,left:v.left,width:v.width,height:v.height}:{visibility:"hidden"},children:h.jsx("img",{ref:b,src:_,alt:"",onLoad:y})}),document.body),w&&h.jsx(Le,{title:t,onClose:()=>I(!1),children:h.jsxs("div",{className:"uploaded-image-modal",children:[V&&h.jsx("div",{className:"image-loading",children:"Loading..."}),Re&&h.jsx("div",{className:"image-error",children:"Failed to load image"}),_&&h.jsx("img",{src:_,alt:t})]})})]})}function At(e){return it(e.mimeType)?h.jsx(ft,{...e}):h.jsx(ht,{...e})}export{At as A,R as c,_e as g,Pe as p,gt as s,he as u};
@@ -1 +1 @@
1
- import{r as e,j as F}from"./clientSummaryStore-Cr4yWo-Y.js";import{d as I,e as T,c as a}from"./main-BpQ_EIjC.js";import{a as b}from"./index-C-4wHkcA.js";const A=e.createContext(null);function N({children:o}){const[c,s]=e.useState(!1),[k,n]=e.useState(!1),[i,m]=e.useState(!0),[r,u]=e.useState(!1),[h,p]=e.useState(!1),[E,w]=e.useState(""),[y,S]=e.useState(!1),[C,g]=e.useState(!1),[v,L]=e.useState(!1),l=I(),d=T(),f=e.useCallback(async()=>{try{const t=await a.getAuthStatus();u(t.enabled),p(t.disabledByEnv),w(t.authFilePath),s(t.authenticated),n(t.setupRequired),S(t.hasDesktopToken??!1),g(t.localhostOpen??!1),L(t.limitedUsersEnabled===!0)}catch(t){console.warn("[Auth] Auth check failed, assuming auth not enabled:",t),s(!0),n(!1),u(!1),p(!1)}finally{m(!1)}},[]);e.useEffect(()=>{f()},[f]),e.useEffect(()=>b.onLoginRequired(()=>{console.log("[Auth] Login required signal received"),s(!1)}),[]),e.useEffect(()=>{!i&&!c&&r&&!h&&d.pathname!=="/login"&&l("/login",{state:{from:d.pathname}})},[i,c,r,h,d.pathname,l]);const x=e.useCallback(async(t,B)=>{await a.login(t,B),s(!0),n(!1),b.clearLoginRequired()},[]),P=e.useCallback(async()=>{await a.logout(),s(!1),l("/login")},[l]),q=e.useCallback(async t=>{await a.enableAuth(t),u(!0),s(!1),n(!1)},[]),D=e.useCallback(async()=>{await a.disableAuth(),u(!1),s(!0)},[]),O=e.useCallback(async t=>{await a.setupAccount(t),u(!0),s(!0),n(!1),b.clearLoginRequired()},[]),R=e.useCallback(async t=>{await a.changePassword(t)},[]),j=e.useCallback(async t=>{await a.setLocalhostAccess(t),g(t)},[]);return F.jsx(A.Provider,{value:{isAuthenticated:c,isSetupMode:k,isLoading:i,authEnabled:r,authDisabledByEnv:h,authFilePath:E,hasDesktopToken:y,localhostOpen:C,limitedUsersEnabled:v,login:x,logout:P,enableAuth:q,disableAuth:D,setupAccount:O,changePassword:R,setLocalhostOpen:j,checkAuth:f},children:o})}function z(){const o=e.useContext(A);if(!o)throw new Error("useAuth must be used within an AuthProvider");return o}function G(){return e.useContext(A)}export{N as A,G as a,z as u};
1
+ import{r as e,j as F}from"./clientSummaryStore-Dsgo1zWK.js";import{d as I,e as T,c as a}from"./main-BX4yZXDF.js";import{a as b}from"./index-BhTv6hAY.js";const A=e.createContext(null);function N({children:o}){const[c,s]=e.useState(!1),[k,n]=e.useState(!1),[i,m]=e.useState(!0),[r,u]=e.useState(!1),[h,p]=e.useState(!1),[E,w]=e.useState(""),[y,S]=e.useState(!1),[C,g]=e.useState(!1),[v,L]=e.useState(!1),l=I(),d=T(),f=e.useCallback(async()=>{try{const t=await a.getAuthStatus();u(t.enabled),p(t.disabledByEnv),w(t.authFilePath),s(t.authenticated),n(t.setupRequired),S(t.hasDesktopToken??!1),g(t.localhostOpen??!1),L(t.limitedUsersEnabled===!0)}catch(t){console.warn("[Auth] Auth check failed, assuming auth not enabled:",t),s(!0),n(!1),u(!1),p(!1)}finally{m(!1)}},[]);e.useEffect(()=>{f()},[f]),e.useEffect(()=>b.onLoginRequired(()=>{console.log("[Auth] Login required signal received"),s(!1)}),[]),e.useEffect(()=>{!i&&!c&&r&&!h&&d.pathname!=="/login"&&l("/login",{state:{from:d.pathname}})},[i,c,r,h,d.pathname,l]);const x=e.useCallback(async(t,B)=>{await a.login(t,B),s(!0),n(!1),b.clearLoginRequired()},[]),P=e.useCallback(async()=>{await a.logout(),s(!1),l("/login")},[l]),q=e.useCallback(async t=>{await a.enableAuth(t),u(!0),s(!1),n(!1)},[]),D=e.useCallback(async()=>{await a.disableAuth(),u(!1),s(!0)},[]),O=e.useCallback(async t=>{await a.setupAccount(t),u(!0),s(!0),n(!1),b.clearLoginRequired()},[]),R=e.useCallback(async t=>{await a.changePassword(t)},[]),j=e.useCallback(async t=>{await a.setLocalhostAccess(t),g(t)},[]);return F.jsx(A.Provider,{value:{isAuthenticated:c,isSetupMode:k,isLoading:i,authEnabled:r,authDisabledByEnv:h,authFilePath:E,hasDesktopToken:y,localhostOpen:C,limitedUsersEnabled:v,login:x,logout:P,enableAuth:q,disableAuth:D,setupAccount:O,changePassword:R,setLocalhostOpen:j,checkAuth:f},children:o})}function z(){const o=e.useContext(A);if(!o)throw new Error("useAuth must be used within an AuthProvider");return o}function G(){return e.useContext(A)}export{N as A,G as a,z as u};
@@ -1,2 +1,2 @@
1
- import{r as c,j as o}from"./clientSummaryStore-Cr4yWo-Y.js";import{u as P}from"./main-BpQ_EIjC.js";import{M as B}from"./MarkdownPreview-ClsW_S6S.js";const T="_root_1798n_1",$="_error_1798n_12",z="_killed_1798n_13",A="_header_1798n_21",F="_glyph_1798n_28",H="_line_1798n_34",K="_meta_1798n_41",I="_running_1798n_51",q="_spinner_1798n_57",G="_exitNonzero_1798n_73",J="_preview_1798n_82",Q="_output_1798n_94",U="_stderr_1798n_98",V="_truncated_1798n_104",W="_actions_1798n_110",X="_action_1798n_110",Y="_actionDelete_1798n_133",i={root:T,error:$,killed:z,header:A,glyph:F,line:H,meta:K,running:I,spinner:q,exitNonzero:G,preview:J,output:Q,stderr:U,truncated:V,actions:W,action:X,actionDelete:Y};function Z(n){if(n<1e3)return`${n}ms`;const t=Math.round(n/1e3),l=Math.floor(t/60),u=t%60;return l>0?`${l}m${String(u).padStart(2,"0")}s`:`${u}s`}const j={running:void 0,done:void 0,error:i.error,killed:i.killed};function et({object:n,handlers:t,outputExpanded:l,onOutputExpandedChange:u}){const{t:s}=P(),[a,N]=c.useState(null),[b,C]=c.useState(()=>{var e;return((e=t==null?void 0:t.shouldExpandOutput)==null?void 0:e.call(t,n.id))??n.status==="running"}),[v,d]=c.useState(!1),[w,m]=c.useState(!1),[D,O]=c.useState(0),[y,R]=c.useState(!1),_=c.useRef(null),r=n.status!=="running",p=t==null?void 0:t.fetchOutput,f=l??b,E=e=>{l===void 0&&C(e),u==null||u(e)};c.useEffect(()=>{if(!f){_.current=null,N(null),d(!1),m(!1),R(!1);return}if(!r||!p)return;const e=`${n.id}:${n.status}`;if(_.current===e)return;_.current=e,d(!0),m(!1);let g=!1;return p(n.id).then(M=>{g||(N(M),d(!1))},()=>{g||(_.current=null,d(!1),m(!0))}),()=>{g=!0}},[f,r,p,n.id,n.status,D]);const k=(a==null?void 0:a.stderr)??n.stderrPreview??"",L=(a==null?void 0:a.stdout)??n.stdoutPreview??"",x=(a==null?void 0:a.stdoutHtml)??"",S=n.exitCode!==void 0?s("bangExitCode",{code:String(n.exitCode)}):null;return o.jsxs("div",{className:[i.root,j[n.status]].filter(Boolean).join(" "),role:"group","aria-label":s("bangBlockAriaLabel"),children:[o.jsxs("div",{className:i.header,children:[o.jsx("span",{className:i.glyph,"aria-hidden":"true",children:"!!"}),o.jsx("code",{className:i.line,title:n.cwd,children:n.command}),o.jsxs("span",{className:i.meta,children:[n.status==="running"&&o.jsxs("span",{className:i.running,children:[o.jsx("span",{className:i.spinner,"aria-hidden":"true"}),s("bangRunning")]}),S&&o.jsx("span",{className:n.exitCode===0?void 0:i.exitNonzero,children:S}),n.durationMs!==void 0&&o.jsx("span",{children:Z(n.durationMs)})]})]}),n.error&&o.jsx("div",{className:i.error,role:"alert",children:n.error}),n.status==="running"?(n.stdoutPreview||n.stderrPreview)&&o.jsx("pre",{className:i.preview,children:[n.stdoutPreview,n.stderrPreview].filter(Boolean).join(`
1
+ import{r as c,j as o}from"./clientSummaryStore-Dsgo1zWK.js";import{u as P}from"./main-BX4yZXDF.js";import{M as B}from"./MarkdownPreview-TXbYZwdp.js";const T="_root_1798n_1",$="_error_1798n_12",z="_killed_1798n_13",A="_header_1798n_21",F="_glyph_1798n_28",H="_line_1798n_34",K="_meta_1798n_41",I="_running_1798n_51",q="_spinner_1798n_57",G="_exitNonzero_1798n_73",J="_preview_1798n_82",Q="_output_1798n_94",U="_stderr_1798n_98",V="_truncated_1798n_104",W="_actions_1798n_110",X="_action_1798n_110",Y="_actionDelete_1798n_133",i={root:T,error:$,killed:z,header:A,glyph:F,line:H,meta:K,running:I,spinner:q,exitNonzero:G,preview:J,output:Q,stderr:U,truncated:V,actions:W,action:X,actionDelete:Y};function Z(n){if(n<1e3)return`${n}ms`;const t=Math.round(n/1e3),l=Math.floor(t/60),u=t%60;return l>0?`${l}m${String(u).padStart(2,"0")}s`:`${u}s`}const j={running:void 0,done:void 0,error:i.error,killed:i.killed};function et({object:n,handlers:t,outputExpanded:l,onOutputExpandedChange:u}){const{t:s}=P(),[a,N]=c.useState(null),[b,C]=c.useState(()=>{var e;return((e=t==null?void 0:t.shouldExpandOutput)==null?void 0:e.call(t,n.id))??n.status==="running"}),[v,d]=c.useState(!1),[w,m]=c.useState(!1),[D,O]=c.useState(0),[y,R]=c.useState(!1),_=c.useRef(null),r=n.status!=="running",p=t==null?void 0:t.fetchOutput,f=l??b,E=e=>{l===void 0&&C(e),u==null||u(e)};c.useEffect(()=>{if(!f){_.current=null,N(null),d(!1),m(!1),R(!1);return}if(!r||!p)return;const e=`${n.id}:${n.status}`;if(_.current===e)return;_.current=e,d(!0),m(!1);let g=!1;return p(n.id).then(M=>{g||(N(M),d(!1))},()=>{g||(_.current=null,d(!1),m(!0))}),()=>{g=!0}},[f,r,p,n.id,n.status,D]);const k=(a==null?void 0:a.stderr)??n.stderrPreview??"",L=(a==null?void 0:a.stdout)??n.stdoutPreview??"",x=(a==null?void 0:a.stdoutHtml)??"",S=n.exitCode!==void 0?s("bangExitCode",{code:String(n.exitCode)}):null;return o.jsxs("div",{className:[i.root,j[n.status]].filter(Boolean).join(" "),role:"group","aria-label":s("bangBlockAriaLabel"),children:[o.jsxs("div",{className:i.header,children:[o.jsx("span",{className:i.glyph,"aria-hidden":"true",children:"!!"}),o.jsx("code",{className:i.line,title:n.cwd,children:n.command}),o.jsxs("span",{className:i.meta,children:[n.status==="running"&&o.jsxs("span",{className:i.running,children:[o.jsx("span",{className:i.spinner,"aria-hidden":"true"}),s("bangRunning")]}),S&&o.jsx("span",{className:n.exitCode===0?void 0:i.exitNonzero,children:S}),n.durationMs!==void 0&&o.jsx("span",{children:Z(n.durationMs)})]})]}),n.error&&o.jsx("div",{className:i.error,role:"alert",children:n.error}),n.status==="running"?(n.stdoutPreview||n.stderrPreview)&&o.jsx("pre",{className:i.preview,children:[n.stdoutPreview,n.stderrPreview].filter(Boolean).join(`
2
2
  `)}):x&&!y?o.jsx(B,{className:i.output,html:x,ariaLabel:s("bangOutputAriaLabel")}):L?o.jsx("pre",{className:i.preview,children:L}):null,r&&k.trim()&&o.jsxs("details",{className:i.stderr,open:!0,children:[o.jsx("summary",{children:s("bangStderrLabel")}),o.jsx("pre",{className:i.preview,children:k})]}),(n.stdoutTruncated||(a==null?void 0:a.responseTruncated))&&o.jsx("div",{className:i.truncated,children:s("bangTruncatedNote")}),o.jsxs("div",{className:i.actions,children:[n.status==="running"&&(t==null?void 0:t.onKill)&&o.jsx("button",{type:"button",className:i.action,onClick:()=>{var e;return(e=t.onKill)==null?void 0:e.call(t,n.id)},children:s("bangCancel")}),r&&x&&o.jsx("button",{type:"button",className:i.action,onClick:()=>R(e=>!e),children:s(y?"bangRendered":"bangRaw")}),r&&p&&o.jsx("button",{type:"button",className:i.action,disabled:v,onClick:()=>{w?(m(!1),O(e=>e+1)):E(!f)},children:s(v?"bangLoadingOutput":w?"bangRetryOutput":f?"bangHideOutput":"bangLoadOutput")}),(t==null?void 0:t.onRecall)&&o.jsx("button",{type:"button",className:i.action,onClick:()=>{var e;return(e=t.onRecall)==null?void 0:e.call(t,n.command)},title:s("bangRecallTitle"),children:s("bangRecall")}),r&&(t==null?void 0:t.onRerun)&&o.jsx("button",{type:"button",className:i.action,onClick:()=>{var e;return(e=t.onRerun)==null?void 0:e.call(t,n.command)},children:s("bangRerun")}),r&&(t==null?void 0:t.onEcho)&&o.jsx("button",{type:"button",className:i.action,onClick:()=>{var e;return(e=t.onEcho)==null?void 0:e.call(t,n)},title:s("bangEchoTitle"),children:s("bangEcho")}),r&&(t==null?void 0:t.onDelete)&&o.jsx("button",{type:"button",className:[i.action,i.actionDelete].join(" "),onClick:()=>{var e;return(e=t.onDelete)==null?void 0:e.call(t,n.id)},children:s("bangDelete")})]})]})}export{et as B};