@halcyonlabs/app 0.47.0-halcyon.334 → 0.47.0-halcyon.339

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 (886) hide show
  1. package/app/dist/assets/AddMachineDialog-CA-hjDCT.js +1 -0
  2. package/app/dist/assets/AddMachineDialog-CA-hjDCT.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-CA-hjDCT.js.gz +0 -0
  4. package/app/dist/assets/AppCommandShortcutHint-qypi-w_1.js +1 -0
  5. package/app/dist/assets/AppFileExternalNavigationDispatcher-CgdcTpd2.js +1 -0
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-CgdcTpd2.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-CgdcTpd2.js.gz +0 -0
  8. package/app/dist/assets/AppToasterView-fxsuOSnb.js +1 -0
  9. package/app/dist/assets/BbDiff-CP4hFhvm.js +1 -0
  10. package/app/dist/assets/BbDiff-CP4hFhvm.js.br +0 -0
  11. package/app/dist/assets/BbDiff-CP4hFhvm.js.gz +0 -0
  12. package/app/dist/assets/BbDiffSplit-CXTAgB1k.js +2 -0
  13. package/app/dist/assets/BbDiffSplit-CXTAgB1k.js.br +0 -0
  14. package/app/dist/assets/BbDiffSplit-CXTAgB1k.js.gz +0 -0
  15. package/app/dist/assets/BbSourceCode-DGSBX5Jb.js +2 -0
  16. package/app/dist/assets/BbSourceCode-DGSBX5Jb.js.br +0 -0
  17. package/app/dist/assets/BbSourceCode-DGSBX5Jb.js.gz +0 -0
  18. package/app/dist/assets/BrowserTabDeck-Lvv6_yeJ.js +1 -0
  19. package/app/dist/assets/BrowserTabDeck-Lvv6_yeJ.js.br +0 -0
  20. package/app/dist/assets/BrowserTabDeck-Lvv6_yeJ.js.gz +0 -0
  21. package/app/dist/assets/CommandPaletteBody-C5Fm8fDj.js +1 -0
  22. package/app/dist/assets/CommandPaletteBody-C5Fm8fDj.js.br +0 -0
  23. package/app/dist/assets/CommandPaletteBody-C5Fm8fDj.js.gz +0 -0
  24. package/app/dist/assets/DiffHost-BSG-APwq.js +1 -0
  25. package/app/dist/assets/DiffHost-BSG-APwq.js.br +0 -0
  26. package/app/dist/assets/DiffHost-BSG-APwq.js.gz +0 -0
  27. package/app/dist/assets/ExperimentalFileLinkMenu-HTymU3-c.js +1 -0
  28. package/app/dist/assets/ExperimentalFileLinkMenu-HTymU3-c.js.br +0 -0
  29. package/app/dist/assets/ExperimentalFileLinkMenu-HTymU3-c.js.gz +0 -0
  30. package/app/dist/assets/FilePreview-DAs-Xk8h.js +3 -0
  31. package/app/dist/assets/FilePreview-DAs-Xk8h.js.br +0 -0
  32. package/app/dist/assets/FilePreview-DAs-Xk8h.js.gz +0 -0
  33. package/app/dist/assets/GitDiffCardHeader-k8BbXk0J.js +1 -0
  34. package/app/dist/assets/GitDiffCardHeader-k8BbXk0J.js.br +0 -0
  35. package/app/dist/assets/GitDiffCardHeader-k8BbXk0J.js.gz +0 -0
  36. package/app/dist/assets/InlineMessageEditorFrame-CfS4k0Nb.js +1 -0
  37. package/app/dist/assets/InlineMessageEditorFrame-CfS4k0Nb.js.br +0 -0
  38. package/app/dist/assets/InlineMessageEditorFrame-CfS4k0Nb.js.gz +0 -0
  39. package/app/dist/assets/MachineLabel-CgFVosgw.js +1 -0
  40. package/app/dist/assets/MachineLabel-CgFVosgw.js.br +0 -0
  41. package/app/dist/assets/MachineLabel-CgFVosgw.js.gz +0 -0
  42. package/app/dist/assets/MachineRenameDialog-Bvdr3E9j.js +1 -0
  43. package/app/dist/assets/MachineRenameDialog-Bvdr3E9j.js.br +0 -0
  44. package/app/dist/assets/MachineRenameDialog-Bvdr3E9j.js.gz +0 -0
  45. package/app/dist/assets/MachineSettingsView-BJ3k8fY_.js +1 -0
  46. package/app/dist/assets/MachineSettingsView-BJ3k8fY_.js.br +0 -0
  47. package/app/dist/assets/MachineSettingsView-BJ3k8fY_.js.gz +0 -0
  48. package/app/dist/assets/MicrophonePreferences-LfgRXCOh.js +1 -0
  49. package/app/dist/assets/MicrophonePreferences-LfgRXCOh.js.br +0 -0
  50. package/app/dist/assets/MicrophonePreferences-LfgRXCOh.js.gz +0 -0
  51. package/app/dist/assets/ModelReasoningMenu-DmUbQ7g6.js +1 -0
  52. package/app/dist/assets/ModelReasoningMenu-DmUbQ7g6.js.br +0 -0
  53. package/app/dist/assets/ModelReasoningMenu-DmUbQ7g6.js.gz +0 -0
  54. package/app/dist/assets/NewTabPage-424dqXyK.js +2 -0
  55. package/app/dist/assets/NewTabPage-424dqXyK.js.br +0 -0
  56. package/app/dist/assets/NewTabPage-424dqXyK.js.gz +0 -0
  57. package/app/dist/assets/NewThreadComposer-DNXhiSn-.js +1 -0
  58. package/app/dist/assets/NewThreadComposer-DNXhiSn-.js.br +0 -0
  59. package/app/dist/assets/NewThreadComposer-DNXhiSn-.js.gz +0 -0
  60. package/app/dist/assets/OnboardingFlow-DKBNrPcC.js +1 -0
  61. package/app/dist/assets/OnboardingFlow-DKBNrPcC.js.br +0 -0
  62. package/app/dist/assets/OnboardingFlow-DKBNrPcC.js.gz +0 -0
  63. package/app/dist/assets/OptionPicker-YUV1yvLs.js +1 -0
  64. package/app/dist/assets/OptionPicker-YUV1yvLs.js.br +0 -0
  65. package/app/dist/assets/OptionPicker-YUV1yvLs.js.gz +0 -0
  66. package/app/dist/assets/PaletteShell-CPSWuHFl.js +1 -0
  67. package/app/dist/assets/PaletteShell-CPSWuHFl.js.br +0 -0
  68. package/app/dist/assets/PaletteShell-CPSWuHFl.js.gz +0 -0
  69. package/app/dist/assets/PaneMaximizeButton-IgpQYzGZ.js +1 -0
  70. package/app/dist/assets/PaneMaximizeButton-IgpQYzGZ.js.br +0 -0
  71. package/app/dist/assets/PaneMaximizeButton-IgpQYzGZ.js.gz +0 -0
  72. package/app/dist/assets/PierreLineSelectionActions-Cw9NdOi7.js +1 -0
  73. package/app/dist/assets/PierreLineSelectionActions-Cw9NdOi7.js.br +0 -0
  74. package/app/dist/assets/PierreLineSelectionActions-Cw9NdOi7.js.gz +0 -0
  75. package/app/dist/assets/PluginPanelRightPanelHost-DMfFOhL5.js +1 -0
  76. package/app/dist/assets/PluginPanelRightPanelHost-DMfFOhL5.js.br +0 -0
  77. package/app/dist/assets/PluginPanelRightPanelHost-DMfFOhL5.js.gz +0 -0
  78. package/app/dist/assets/PluginSettingsSections-C-SVaKwu.js +2 -0
  79. package/app/dist/assets/PluginSettingsSections-C-SVaKwu.js.br +0 -0
  80. package/app/dist/assets/PluginSettingsSections-C-SVaKwu.js.gz +0 -0
  81. package/app/dist/assets/PluginThreadChat-BwYolWXW.js +1 -0
  82. package/app/dist/assets/PluginThreadChat-BwYolWXW.js.br +0 -0
  83. package/app/dist/assets/PluginThreadChat-BwYolWXW.js.gz +0 -0
  84. package/app/dist/assets/ProjectDetailSettingsView-DGesrHR7.js +1 -0
  85. package/app/dist/assets/ProjectDetailSettingsView-DGesrHR7.js.br +0 -0
  86. package/app/dist/assets/ProjectDetailSettingsView-DGesrHR7.js.gz +0 -0
  87. package/app/dist/assets/ProjectMachineSetupDialog-DaUV5S11.js +1 -0
  88. package/app/dist/assets/ProjectMachineSetupDialog-DaUV5S11.js.br +0 -0
  89. package/app/dist/assets/ProjectMachineSetupDialog-DaUV5S11.js.gz +0 -0
  90. package/app/dist/assets/ProjectsSettingsSection-9jsiOblc.js +3 -0
  91. package/app/dist/assets/ProjectsSettingsSection-9jsiOblc.js.br +0 -0
  92. package/app/dist/assets/ProjectsSettingsSection-9jsiOblc.js.gz +0 -0
  93. package/app/dist/assets/QueuedMessagesList-Cmo-e42R.js +3 -0
  94. package/app/dist/assets/QueuedMessagesList-Cmo-e42R.js.br +0 -0
  95. package/app/dist/assets/QueuedMessagesList-Cmo-e42R.js.gz +0 -0
  96. package/app/dist/assets/RemotePathBrowser-CQ14n_jy.js +1 -0
  97. package/app/dist/assets/RemotePathBrowser-CQ14n_jy.js.br +0 -0
  98. package/app/dist/assets/RemotePathBrowser-CQ14n_jy.js.gz +0 -0
  99. package/app/dist/assets/RootComposeView-BTc0KJ7P.js +1 -0
  100. package/app/dist/assets/RootComposeView-BTc0KJ7P.js.br +0 -0
  101. package/app/dist/assets/RootComposeView-BTc0KJ7P.js.gz +0 -0
  102. package/app/dist/assets/SecondaryPanelLayout-1MOAIz3i.js +1 -0
  103. package/app/dist/assets/SecondaryPanelLayout-1MOAIz3i.js.br +0 -0
  104. package/app/dist/assets/SecondaryPanelLayout-1MOAIz3i.js.gz +0 -0
  105. package/app/dist/assets/ServerMoveOverlayView-CJoPJgf2.js +1 -0
  106. package/app/dist/assets/ServerMoveOverlayView-CJoPJgf2.js.br +0 -0
  107. package/app/dist/assets/ServerMoveOverlayView-CJoPJgf2.js.gz +0 -0
  108. package/app/dist/assets/SettingsSidebar-B1cUWwkr.js +1 -0
  109. package/app/dist/assets/SettingsSidebar-B1cUWwkr.js.br +0 -0
  110. package/app/dist/assets/SettingsSidebar-B1cUWwkr.js.gz +0 -0
  111. package/app/dist/assets/SettingsView-CKqGCEEC.js +7 -0
  112. package/app/dist/assets/SettingsView-CKqGCEEC.js.br +0 -0
  113. package/app/dist/assets/SettingsView-CKqGCEEC.js.gz +0 -0
  114. package/app/dist/assets/SidebarFooterCustomize-Cz1iIjaK.js +1 -0
  115. package/app/dist/assets/SidebarFooterCustomize-Cz1iIjaK.js.br +0 -0
  116. package/app/dist/assets/SidebarFooterCustomize-Cz1iIjaK.js.gz +0 -0
  117. package/app/dist/assets/SidebarVisibilityCustomize--_P4EoGp.js +1 -0
  118. package/app/dist/assets/SidebarVisibilityCustomize--_P4EoGp.js.br +0 -0
  119. package/app/dist/assets/SidebarVisibilityCustomize--_P4EoGp.js.gz +0 -0
  120. package/app/dist/assets/SourceCodeHost-CFrI22zo.js +2 -0
  121. package/app/dist/assets/SourceCodeHost-CFrI22zo.js.br +0 -0
  122. package/app/dist/assets/SourceCodeHost-CFrI22zo.js.gz +0 -0
  123. package/app/dist/assets/SplitWorkspaceRoute-CbJUASEc.js +2 -0
  124. package/app/dist/assets/SplitWorkspaceRoute-CbJUASEc.js.br +0 -0
  125. package/app/dist/assets/SplitWorkspaceRoute-CbJUASEc.js.gz +0 -0
  126. package/app/dist/assets/TerminalOutputBlock-DW_oLSg8.js +4 -0
  127. package/app/dist/assets/TerminalOutputBlock-DW_oLSg8.js.br +0 -0
  128. package/app/dist/assets/TerminalOutputBlock-DW_oLSg8.js.gz +0 -0
  129. package/app/dist/assets/ThreadActionsMenu-DOLhNHIx.js +1 -0
  130. package/app/dist/assets/ThreadActionsMenu-DOLhNHIx.js.br +0 -0
  131. package/app/dist/assets/ThreadActionsMenu-DOLhNHIx.js.gz +0 -0
  132. package/app/dist/assets/ThreadDetailView-DT1alvgd.js +6 -0
  133. package/app/dist/assets/ThreadDetailView-DT1alvgd.js.br +0 -0
  134. package/app/dist/assets/ThreadDetailView-DT1alvgd.js.gz +0 -0
  135. package/app/dist/assets/ThreadSearchPaletteMode-BFRctX_m.js +1 -0
  136. package/app/dist/assets/ThreadSearchPaletteMode-BFRctX_m.js.br +0 -0
  137. package/app/dist/assets/ThreadSearchPaletteMode-BFRctX_m.js.gz +0 -0
  138. package/app/dist/assets/ThreadSecondaryPanel-Dq77t2Oh.js +1 -0
  139. package/app/dist/assets/ThreadSecondaryPanel-Dq77t2Oh.js.br +0 -0
  140. package/app/dist/assets/ThreadSecondaryPanel-Dq77t2Oh.js.gz +0 -0
  141. package/app/dist/assets/ThreadSecondaryPanelTabContent-EoATDoNX.js +3 -0
  142. package/app/dist/assets/ThreadSecondaryPanelTabContent-EoATDoNX.js.br +0 -0
  143. package/app/dist/assets/ThreadSecondaryPanelTabContent-EoATDoNX.js.gz +0 -0
  144. package/app/dist/assets/ThreadStatusGlyph-BNe7o5E4.js +1 -0
  145. package/app/dist/assets/ThreadStatusGlyph-BNe7o5E4.js.br +0 -0
  146. package/app/dist/assets/ThreadStatusGlyph-BNe7o5E4.js.gz +0 -0
  147. package/app/dist/assets/ThreadTerminalPanel-RNEScOUi.js +1 -0
  148. package/app/dist/assets/ThreadTerminalPanel-RNEScOUi.js.br +0 -0
  149. package/app/dist/assets/ThreadTerminalPanel-RNEScOUi.js.gz +0 -0
  150. package/app/dist/assets/ThreadTerminalView-CmxG_kD-.js +1 -0
  151. package/app/dist/assets/ThreadTerminalView-CmxG_kD-.js.br +0 -0
  152. package/app/dist/assets/ThreadTerminalView-CmxG_kD-.js.gz +0 -0
  153. package/app/dist/assets/ThreadTimelineNavigationContext-BR4GABVo.js +2 -0
  154. package/app/dist/assets/ThreadTimelineNavigationContext-BR4GABVo.js.br +0 -0
  155. package/app/dist/assets/ThreadTimelineNavigationContext-BR4GABVo.js.gz +0 -0
  156. package/app/dist/assets/ThreadUnarchiveButton-CZFh7ziS.js +1 -0
  157. package/app/dist/assets/TimelineDetailScroll-DpEXdBMy.js +1 -0
  158. package/app/dist/assets/TimelineDetailScroll-DpEXdBMy.js.br +0 -0
  159. package/app/dist/assets/TimelineDetailScroll-DpEXdBMy.js.gz +0 -0
  160. package/app/dist/assets/TimelineFileDiffBlock-BT-loQg1.js +6 -0
  161. package/app/dist/assets/TimelineFileDiffBlock-BT-loQg1.js.br +0 -0
  162. package/app/dist/assets/TimelineFileDiffBlock-BT-loQg1.js.gz +0 -0
  163. package/app/dist/assets/TimelineSelectionMenu-C7YFrgTN.js +22 -0
  164. package/app/dist/assets/TimelineSelectionMenu-C7YFrgTN.js.br +0 -0
  165. package/app/dist/assets/TimelineSelectionMenu-C7YFrgTN.js.gz +0 -0
  166. package/app/dist/assets/ToolsView-BAXIgXxA.js +4 -0
  167. package/app/dist/assets/ToolsView-BAXIgXxA.js.br +0 -0
  168. package/app/dist/assets/ToolsView-BAXIgXxA.js.gz +0 -0
  169. package/app/dist/assets/ToolsViewSplits-C-D-ep__.js +2 -0
  170. package/app/dist/assets/ToolsViewSplits-C-D-ep__.js.br +0 -0
  171. package/app/dist/assets/ToolsViewSplits-C-D-ep__.js.gz +0 -0
  172. package/app/dist/assets/WaveformVisualizer-C4iTUUxZ.js +1 -0
  173. package/app/dist/assets/WaveformVisualizer-C4iTUUxZ.js.br +0 -0
  174. package/app/dist/assets/WaveformVisualizer-C4iTUUxZ.js.gz +0 -0
  175. package/app/dist/assets/absolute-file-path-DmSuTc6Y.js +1 -0
  176. package/app/dist/assets/app-fixed-tab-navigation-CbkO-C7b.js +1 -0
  177. package/app/dist/assets/app-fixed-tab-navigation-CbkO-C7b.js.br +0 -0
  178. package/app/dist/assets/app-fixed-tab-navigation-CbkO-C7b.js.gz +0 -0
  179. package/app/dist/assets/audio-input-device-preference-Bxa2INcv.js +1 -0
  180. package/app/dist/assets/audio-input-device-preference-Bxa2INcv.js.br +0 -0
  181. package/app/dist/assets/audio-input-device-preference-Bxa2INcv.js.gz +0 -0
  182. package/app/dist/assets/bottom-anchored-scroll-body-DHANvBcd.js +1 -0
  183. package/app/dist/assets/bottom-anchored-scroll-body-DHANvBcd.js.br +0 -0
  184. package/app/dist/assets/bottom-anchored-scroll-body-DHANvBcd.js.gz +0 -0
  185. package/app/dist/assets/browser-url-DB92wpjL.js +1 -0
  186. package/app/dist/assets/browser-url-DB92wpjL.js.br +0 -0
  187. package/app/dist/assets/browser-url-DB92wpjL.js.gz +0 -0
  188. package/app/dist/assets/checkbox-C4TJY0rC.js +1 -0
  189. package/app/dist/assets/checkbox-C4TJY0rC.js.br +0 -0
  190. package/app/dist/assets/checkbox-C4TJY0rC.js.gz +0 -0
  191. package/app/dist/assets/code-loading-skeletons--jaZzV7b.js +1 -0
  192. package/app/dist/assets/code-loading-skeletons--jaZzV7b.js.br +4 -0
  193. package/app/dist/assets/code-loading-skeletons--jaZzV7b.js.gz +0 -0
  194. package/app/dist/assets/code-rendering-DwQWgopj.js +1 -0
  195. package/app/dist/assets/code-theme-registration-DBEO55H1.js +1 -0
  196. package/app/dist/assets/detail-card-DK6hYO1c.js +1 -0
  197. package/app/dist/assets/detail-card-DK6hYO1c.js.br +0 -0
  198. package/app/dist/assets/detail-card-DK6hYO1c.js.gz +0 -0
  199. package/app/dist/assets/diff-stats-tally-BdXJ7zI4.js +1 -0
  200. package/app/dist/assets/diff-stats-tally-BdXJ7zI4.js.br +0 -0
  201. package/app/dist/assets/diff-stats-tally-BdXJ7zI4.js.gz +0 -0
  202. package/app/dist/assets/environment-mutations-BDBdDQfs.js +1 -0
  203. package/app/dist/assets/environment-mutations-BDBdDQfs.js.br +0 -0
  204. package/app/dist/assets/environment-mutations-BDBdDQfs.js.gz +0 -0
  205. package/app/dist/assets/environment-workspace-display-Tsz5NQLu.js +4 -0
  206. package/app/dist/assets/environment-workspace-display-Tsz5NQLu.js.br +0 -0
  207. package/app/dist/assets/environment-workspace-display-Tsz5NQLu.js.gz +0 -0
  208. package/app/dist/assets/event-code-block-BCh4ts9h.js +2 -0
  209. package/app/dist/assets/event-code-block-BCh4ts9h.js.br +0 -0
  210. package/app/dist/assets/event-code-block-BCh4ts9h.js.gz +0 -0
  211. package/app/dist/assets/expandable-text-XClHZkaa.js +1 -0
  212. package/app/dist/assets/expandable-text-XClHZkaa.js.br +0 -0
  213. package/app/dist/assets/expandable-text-XClHZkaa.js.gz +0 -0
  214. package/app/dist/assets/file-opener-preference-B9PRaJpD.js +1 -0
  215. package/app/dist/assets/file-path-link-DMRWp7p9.js +1 -0
  216. package/app/dist/assets/file-path-link-DMRWp7p9.js.br +0 -0
  217. package/app/dist/assets/file-path-link-DMRWp7p9.js.gz +0 -0
  218. package/app/dist/assets/host-mutations-Bad0cc2n.js +1 -0
  219. package/app/dist/assets/host-mutations-Bad0cc2n.js.br +0 -0
  220. package/app/dist/assets/host-mutations-Bad0cc2n.js.gz +0 -0
  221. package/app/dist/assets/icon-extended-mLiquhCE.js +1 -0
  222. package/app/dist/assets/icon-extended-mLiquhCE.js.br +0 -0
  223. package/app/dist/assets/icon-extended-mLiquhCE.js.gz +0 -0
  224. package/app/dist/assets/image-lightbox-BgcCqbkU.js +1 -0
  225. package/app/dist/assets/image-lightbox-BgcCqbkU.js.br +0 -0
  226. package/app/dist/assets/image-lightbox-BgcCqbkU.js.gz +0 -0
  227. package/app/dist/assets/index-BzbTy_RW.js +395 -0
  228. package/app/dist/assets/index-BzbTy_RW.js.br +0 -0
  229. package/app/dist/assets/index-BzbTy_RW.js.gz +0 -0
  230. package/app/dist/assets/inline-rename-editor-QB1GZgpD.js +1 -0
  231. package/app/dist/assets/inline-rename-editor-QB1GZgpD.js.br +0 -0
  232. package/app/dist/assets/inline-rename-editor-QB1GZgpD.js.gz +0 -0
  233. package/app/dist/assets/launcherRow-DwwC4wsH.js +1 -0
  234. package/app/dist/assets/launcherRow-DwwC4wsH.js.br +0 -0
  235. package/app/dist/assets/launcherRow-DwwC4wsH.js.gz +0 -0
  236. package/app/dist/assets/localhost-link-rewrite-description-yYmA4Wu0.js +1 -0
  237. package/app/dist/assets/localhost-link-rewrite-description-yYmA4Wu0.js.br +0 -0
  238. package/app/dist/assets/localhost-link-rewrite-description-yYmA4Wu0.js.gz +0 -0
  239. package/app/dist/assets/machine-provider-queries-CEVlhRVS.js +1 -0
  240. package/app/dist/assets/machine-server-access-idmS9PlJ.js +1 -0
  241. package/app/dist/assets/markdown-file-image-routing-DpozpWro.js +1 -0
  242. package/app/dist/assets/markdown-html-BW-STuuW.js +1 -0
  243. package/app/dist/assets/markdown-html-BW-STuuW.js.br +0 -0
  244. package/app/dist/assets/markdown-html-BW-STuuW.js.gz +0 -0
  245. package/app/dist/assets/markdown-local-file-link-b4fKcAua.js +2 -0
  246. package/app/dist/assets/markdown-local-file-link-b4fKcAua.js.br +0 -0
  247. package/app/dist/assets/markdown-local-file-link-b4fKcAua.js.gz +0 -0
  248. package/app/dist/assets/markdown-preview-ZPLF5g9D.js +38 -0
  249. package/app/dist/assets/markdown-preview-ZPLF5g9D.js.br +0 -0
  250. package/app/dist/assets/markdown-preview-ZPLF5g9D.js.gz +0 -0
  251. package/app/dist/assets/markdown-prompt-mentions-CC__rvuU.js +18 -0
  252. package/app/dist/assets/markdown-prompt-mentions-CC__rvuU.js.br +0 -0
  253. package/app/dist/assets/markdown-prompt-mentions-CC__rvuU.js.gz +0 -0
  254. package/app/dist/assets/model-load-error-message-CH0OE3B2.js +1 -0
  255. package/app/dist/assets/model-load-error-message-CH0OE3B2.js.br +0 -0
  256. package/app/dist/assets/model-load-error-message-CH0OE3B2.js.gz +0 -0
  257. package/app/dist/assets/onboarding-telemetry-BoAbkrbU.js +1 -0
  258. package/app/dist/assets/open-in-editor-button-sM_tzYa8.js +1 -0
  259. package/app/dist/assets/open-in-editor-button-sM_tzYa8.js.br +0 -0
  260. package/app/dist/assets/open-in-editor-button-sM_tzYa8.js.gz +0 -0
  261. package/app/dist/assets/page-shell-BKItFX51.js +1 -0
  262. package/app/dist/assets/page-shell-BKItFX51.js.br +0 -0
  263. package/app/dist/assets/page-shell-BKItFX51.js.gz +0 -0
  264. package/app/dist/assets/pierre-worker-pool-4nM-JG2o.js +1 -0
  265. package/app/dist/assets/pierre-worker-pool-4nM-JG2o.js.br +0 -0
  266. package/app/dist/assets/pierre-worker-pool-4nM-JG2o.js.gz +0 -0
  267. package/app/dist/assets/plugin-detail-navigation-m-omYQ_a.js +1 -0
  268. package/app/dist/assets/plugin-detail-navigation-m-omYQ_a.js.br +0 -0
  269. package/app/dist/assets/plugin-detail-navigation-m-omYQ_a.js.gz +0 -0
  270. package/app/dist/assets/plugin-frontend-D-15tOBN.js +4 -0
  271. package/app/dist/assets/plugin-frontend-D-15tOBN.js.br +0 -0
  272. package/app/dist/assets/plugin-frontend-D-15tOBN.js.gz +0 -0
  273. package/app/dist/assets/plugin-ui-BXK37BcB.js +1 -0
  274. package/app/dist/assets/plugin-ui-BXK37BcB.js.br +0 -0
  275. package/app/dist/assets/plugin-ui-BXK37BcB.js.gz +0 -0
  276. package/app/dist/assets/project-default-execution-options-query-DR8Jk4CD.js +1 -0
  277. package/app/dist/assets/queued-editor-typeahead-layout-b6r7lwA4.js +1 -0
  278. package/app/dist/assets/queued-editor-typeahead-layout-b6r7lwA4.js.br +0 -0
  279. package/app/dist/assets/queued-editor-typeahead-layout-b6r7lwA4.js.gz +0 -0
  280. package/app/dist/assets/queued-messages-layout-7B2SuZg0.js +3 -0
  281. package/app/dist/assets/queued-messages-layout-7B2SuZg0.js.br +0 -0
  282. package/app/dist/assets/queued-messages-layout-7B2SuZg0.js.gz +0 -0
  283. package/app/dist/assets/resource-list-DEdVfbWY.js +1 -0
  284. package/app/dist/assets/resource-list-DEdVfbWY.js.br +0 -0
  285. package/app/dist/assets/resource-list-DEdVfbWY.js.gz +0 -0
  286. package/app/dist/assets/root-compose-create-preference-zUIeGzy4.js +1 -0
  287. package/app/dist/assets/save-file-DGnL07Pr.js +1 -0
  288. package/app/dist/assets/settings-nav-CYsQAjKL.js +1 -0
  289. package/app/dist/assets/settings-nav-CYsQAjKL.js.br +0 -0
  290. package/app/dist/assets/settings-nav-CYsQAjKL.js.gz +0 -0
  291. package/app/dist/assets/settings-sections-CqqApzMn.js +1 -0
  292. package/app/dist/assets/settings-sections-CqqApzMn.js.br +0 -0
  293. package/app/dist/assets/settings-sections-CqqApzMn.js.gz +0 -0
  294. package/app/dist/assets/shortcut-pill-BZKMqh1Z.js +1 -0
  295. package/app/dist/assets/sidebarTouchSensor-BNUxUzLU.js +1 -0
  296. package/app/dist/assets/sidebarTouchSensor-BNUxUzLU.js.br +0 -0
  297. package/app/dist/assets/sidebarTouchSensor-BNUxUzLU.js.gz +0 -0
  298. package/app/dist/assets/switch-DKxelcxS.js +1 -0
  299. package/app/dist/assets/switch-DKxelcxS.js.br +0 -0
  300. package/app/dist/assets/switch-DKxelcxS.js.gz +0 -0
  301. package/app/dist/assets/textarea-CFHdtrc5.js +1 -0
  302. package/app/dist/assets/thread-event-parser-Dy6QcuKt.js +1 -0
  303. package/app/dist/assets/thread-event-parser-Dy6QcuKt.js.br +0 -0
  304. package/app/dist/assets/thread-event-parser-Dy6QcuKt.js.gz +0 -0
  305. package/app/dist/assets/thread-panel-queries-BtogCkTr.js +1 -0
  306. package/app/dist/assets/thread-panel-queries-BtogCkTr.js.br +0 -0
  307. package/app/dist/assets/thread-panel-queries-BtogCkTr.js.gz +0 -0
  308. package/app/dist/assets/thread-runtime-mutations-B2f1hfoW.js +3 -0
  309. package/app/dist/assets/thread-runtime-mutations-B2f1hfoW.js.br +0 -0
  310. package/app/dist/assets/thread-runtime-mutations-B2f1hfoW.js.gz +0 -0
  311. package/app/dist/assets/thread-terminal-queries-CO4y-GTJ.js +1 -0
  312. package/app/dist/assets/thread-terminal-queries-CO4y-GTJ.js.br +0 -0
  313. package/app/dist/assets/thread-terminal-queries-CO4y-GTJ.js.gz +0 -0
  314. package/app/dist/assets/threadRecentItems-xrZxtmn3.js +1 -0
  315. package/app/dist/assets/threadRecentItems-xrZxtmn3.js.br +0 -0
  316. package/app/dist/assets/threadRecentItems-xrZxtmn3.js.gz +0 -0
  317. package/app/dist/assets/threadWorkspaceOpenPath-hCBzFGzl.js +1 -0
  318. package/app/dist/assets/threadWorkspaceOpenPath-hCBzFGzl.js.br +0 -0
  319. package/app/dist/assets/threadWorkspaceOpenPath-hCBzFGzl.js.gz +0 -0
  320. package/app/dist/assets/title-bar-scroll-fade-CHJ5cw4y.js +1 -0
  321. package/app/dist/assets/title-bar-scroll-fade-CHJ5cw4y.js.br +0 -0
  322. package/app/dist/assets/title-bar-scroll-fade-CHJ5cw4y.js.gz +0 -0
  323. package/app/dist/assets/truncate-start-CZAtsv3e.js +1 -0
  324. package/app/dist/assets/use-hover-popover-yNF6-heP.js +1 -0
  325. package/app/dist/assets/use-hover-popover-yNF6-heP.js.br +0 -0
  326. package/app/dist/assets/use-hover-popover-yNF6-heP.js.gz +0 -0
  327. package/app/dist/assets/useElementWidth-BHGsg7DA.js +1 -0
  328. package/app/dist/assets/useElementWidth-BHGsg7DA.js.br +0 -0
  329. package/app/dist/assets/useElementWidth-BHGsg7DA.js.gz +0 -0
  330. package/app/dist/assets/useLocalOpenTargets-CH6aon29.js +1 -0
  331. package/app/dist/assets/useLocalOpenTargets-CH6aon29.js.br +0 -0
  332. package/app/dist/assets/useLocalOpenTargets-CH6aon29.js.gz +0 -0
  333. package/app/dist/assets/usePanelResizeSnap-B0147BHl.js +1 -0
  334. package/app/dist/assets/usePanelResizeSnap-B0147BHl.js.br +0 -0
  335. package/app/dist/assets/usePanelResizeSnap-B0147BHl.js.gz +0 -0
  336. package/app/dist/assets/usePanelTerminals-DMFT7hEs.js +1 -0
  337. package/app/dist/assets/usePanelTerminals-DMFT7hEs.js.br +0 -0
  338. package/app/dist/assets/usePanelTerminals-DMFT7hEs.js.gz +0 -0
  339. package/app/dist/assets/usePathSuggestions-Bv4ShGOP.js +1 -0
  340. package/app/dist/assets/usePathSuggestions-Bv4ShGOP.js.br +0 -0
  341. package/app/dist/assets/usePathSuggestions-Bv4ShGOP.js.gz +0 -0
  342. package/app/dist/assets/useResolvedLiveFileTarget-DyRrMwgB.js +1 -0
  343. package/app/dist/assets/useResolvedLiveFileTarget-DyRrMwgB.js.br +0 -0
  344. package/app/dist/assets/useResolvedLiveFileTarget-DyRrMwgB.js.gz +0 -0
  345. package/app/dist/assets/useThreadTerminalController-VPWz_6Pb.js +1 -0
  346. package/app/dist/assets/useThreadTerminalController-VPWz_6Pb.js.br +0 -0
  347. package/app/dist/assets/useThreadTerminalController-VPWz_6Pb.js.gz +0 -0
  348. package/app/dist/assets/workspace-change-summary-esM5q6Iw.js +1 -0
  349. package/app/dist/assets/workspace-change-summary-esM5q6Iw.js.br +0 -0
  350. package/app/dist/assets/workspace-change-summary-esM5q6Iw.js.gz +0 -0
  351. package/app/dist/assets/workspace-checkout-display-DtLJlwhj.js +32 -0
  352. package/app/dist/assets/workspace-checkout-display-DtLJlwhj.js.br +0 -0
  353. package/app/dist/assets/workspace-checkout-display-DtLJlwhj.js.gz +0 -0
  354. package/app/dist/index.html +17 -17
  355. package/app/dist/index.html.br +0 -0
  356. package/app/dist/index.html.gz +0 -0
  357. package/dist/index.d.ts +6 -6
  358. package/dist/index.js +1 -1
  359. package/host-daemon/dist/bb +2 -2
  360. package/host-daemon/dist/bb-chunks/browser-RRSCFQVT.js +6 -0
  361. package/host-daemon/dist/bb-chunks/chunk-BBVRIHQ2.js +2 -0
  362. package/host-daemon/dist/bb-chunks/chunk-F6LEWQPC.js +2 -0
  363. package/host-daemon/dist/bb-chunks/chunk-FRJEOQIF.js +2 -0
  364. package/host-daemon/dist/bb-chunks/chunk-JOK3VWVD.js +2 -0
  365. package/host-daemon/dist/bb-chunks/chunk-OPRNXFA2.js +134 -0
  366. package/host-daemon/dist/bb-chunks/chunk-QESPV4M2.js +2 -0
  367. package/host-daemon/dist/bb-chunks/chunk-RA7IYD3P.js +2 -0
  368. package/host-daemon/dist/bb-chunks/chunk-W3OG5E2X.js +2 -0
  369. package/host-daemon/dist/bb-chunks/chunk-XXPUW32I.js +2 -0
  370. package/host-daemon/dist/bb-chunks/chunk-YAGJJPNZ.js +6 -0
  371. package/host-daemon/dist/bb-chunks/chunk-Z242WCLC.js +2238 -0
  372. package/host-daemon/dist/bb-chunks/client-PQ3UQITF.js +2 -0
  373. package/host-daemon/dist/bb-chunks/commander-errors-32DWV7JX.js +3 -0
  374. package/host-daemon/dist/bb-chunks/context-env-GGZMHKAS.js +2 -0
  375. package/host-daemon/dist/bb-chunks/context-hints-C5KWVGDN.js +2 -0
  376. package/host-daemon/dist/bb-chunks/diagnostics-RYUTHWRQ.js +3 -0
  377. package/host-daemon/dist/bb-chunks/environment-QBIYSKG6.js +2 -0
  378. package/host-daemon/dist/bb-chunks/file-OTYQT3RV.js +3 -0
  379. package/host-daemon/dist/bb-chunks/guide-HILIYXEW.js +4 -0
  380. package/host-daemon/dist/bb-chunks/machine-YUB5XTX5.js +2 -0
  381. package/host-daemon/dist/bb-chunks/marketplace-PVF56LVU.js +2 -0
  382. package/host-daemon/dist/bb-chunks/permissions-E25YGLSI.js +2 -0
  383. package/host-daemon/dist/bb-chunks/plugin-JQL3LZ5R.js +2633 -0
  384. package/host-daemon/dist/bb-chunks/plugin-cli-proxy-C63LKZKH.js +2 -0
  385. package/host-daemon/dist/bb-chunks/project-EJMZ2PZT.js +2 -0
  386. package/host-daemon/dist/bb-chunks/prompt-history-ZO5EXZ6G.js +2 -0
  387. package/host-daemon/dist/bb-chunks/provider-X2PWNWG6.js +2 -0
  388. package/host-daemon/dist/bb-chunks/schedule-ZHWFLLYS.js +2 -0
  389. package/host-daemon/dist/bb-chunks/server-HQ4BDI5K.js +8 -0
  390. package/host-daemon/dist/bb-chunks/settings-WRXVKRIU.js +4 -0
  391. package/host-daemon/dist/bb-chunks/skill-SWXP56QH.js +5 -0
  392. package/host-daemon/dist/bb-chunks/status-O7ENGEP5.js +2 -0
  393. package/host-daemon/dist/bb-chunks/terminal-Y3QTTTBE.js +3 -0
  394. package/host-daemon/dist/bb-chunks/theme-TLOR3CYG.js +2 -0
  395. package/host-daemon/dist/bb-chunks/thread-TJETGP2G.js +29 -0
  396. package/host-daemon/dist/bb-chunks/updates-HJTPPOSW.js +2 -0
  397. package/host-daemon/dist/bb-chunks/voice-7Q4DJHDA.js +2 -0
  398. package/host-daemon/dist/bb-provider-bridge-worker.mjs +5 -5
  399. package/host-daemon/dist/daemon-bundle.mjs +126 -126
  400. package/package.json +4 -1
  401. package/server/dist/assets/install-machine.sh +12 -0
  402. package/server/dist/builtin-plugins/automations/skills/automations/SKILL.md +1 -1
  403. package/server/dist/builtin-plugins/automations/skills/automations/references/script-runtime.md +3 -2
  404. package/server/dist/builtin-plugins/automations/skills/automations/references/updates.md +16 -10
  405. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +4 -2
  406. package/server/dist/builtin-plugins/orbit/dist/app.js +2 -2
  407. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/config/policy.toml +221 -0
  408. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/recipes/base-linux/codex.sh +74 -0
  409. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/recipes/base-linux.toml +122 -0
  410. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/recipes/default-linux.toml +25 -0
  411. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/recipes/default.toml +68 -0
  412. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -0
  413. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +173 -0
  414. package/server/dist/builtin-plugins/orbit/dist/host.js +70 -70
  415. package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
  416. package/server/dist/builtin-plugins/orbit/dist/server.js +272 -272
  417. package/server/dist/builtin-plugins/orbit/skills/documents/SKILL.md +2 -2
  418. package/server/dist/builtin-plugins/orbit/skills/github-change/references/branches.md +3 -3
  419. package/server/dist/builtin-plugins/orbit/skills/github-change/references/merging.md +3 -3
  420. package/server/dist/builtin-plugins/orbit/skills/github-change/references/work-queue.md +1 -1
  421. package/server/dist/builtin-plugins/orbit/skills/station-build/SKILL.md +7 -7
  422. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +4 -2
  423. package/server/dist/start-server.js +358 -208
  424. package/app/dist/assets/AddMachineDialog-BDdIgDrZ.js +0 -1
  425. package/app/dist/assets/AddMachineDialog-BDdIgDrZ.js.br +0 -0
  426. package/app/dist/assets/AddMachineDialog-BDdIgDrZ.js.gz +0 -0
  427. package/app/dist/assets/AppCommandShortcutHint-Zpk_5mKp.js +0 -1
  428. package/app/dist/assets/AppFileExternalNavigationDispatcher-Drc7HAG2.js +0 -1
  429. package/app/dist/assets/AppFileExternalNavigationDispatcher-Drc7HAG2.js.br +0 -0
  430. package/app/dist/assets/AppFileExternalNavigationDispatcher-Drc7HAG2.js.gz +0 -0
  431. package/app/dist/assets/AppToasterView-BIk1UxeC.js +0 -1
  432. package/app/dist/assets/BbDiff-DtDx1Q_C.js +0 -1
  433. package/app/dist/assets/BbDiff-DtDx1Q_C.js.br +0 -0
  434. package/app/dist/assets/BbDiff-DtDx1Q_C.js.gz +0 -0
  435. package/app/dist/assets/BbDiffSplit-BjhTysX_.js +0 -2
  436. package/app/dist/assets/BbDiffSplit-BjhTysX_.js.br +0 -0
  437. package/app/dist/assets/BbDiffSplit-BjhTysX_.js.gz +0 -0
  438. package/app/dist/assets/BbSourceCode-DCGbLeoo.js +0 -2
  439. package/app/dist/assets/BbSourceCode-DCGbLeoo.js.br +0 -0
  440. package/app/dist/assets/BbSourceCode-DCGbLeoo.js.gz +0 -0
  441. package/app/dist/assets/BrowserTabDeck-BbzKqbnm.js +0 -1
  442. package/app/dist/assets/BrowserTabDeck-BbzKqbnm.js.br +0 -0
  443. package/app/dist/assets/BrowserTabDeck-BbzKqbnm.js.gz +0 -0
  444. package/app/dist/assets/CommandPaletteBody-RLE1_Fj-.js +0 -1
  445. package/app/dist/assets/CommandPaletteBody-RLE1_Fj-.js.br +0 -0
  446. package/app/dist/assets/CommandPaletteBody-RLE1_Fj-.js.gz +0 -0
  447. package/app/dist/assets/DiffHost-mf_bULoc.js +0 -1
  448. package/app/dist/assets/DiffHost-mf_bULoc.js.br +0 -0
  449. package/app/dist/assets/DiffHost-mf_bULoc.js.gz +0 -0
  450. package/app/dist/assets/ExperimentalFileLinkMenu-C5YCom5q.js +0 -1
  451. package/app/dist/assets/ExperimentalFileLinkMenu-C5YCom5q.js.br +0 -0
  452. package/app/dist/assets/ExperimentalFileLinkMenu-C5YCom5q.js.gz +0 -0
  453. package/app/dist/assets/FilePreview-Bc1b_yS2.js +0 -3
  454. package/app/dist/assets/FilePreview-Bc1b_yS2.js.br +0 -0
  455. package/app/dist/assets/FilePreview-Bc1b_yS2.js.gz +0 -0
  456. package/app/dist/assets/GitDiffCardHeader-Cs72XQzF.js +0 -1
  457. package/app/dist/assets/GitDiffCardHeader-Cs72XQzF.js.br +0 -0
  458. package/app/dist/assets/GitDiffCardHeader-Cs72XQzF.js.gz +0 -0
  459. package/app/dist/assets/InlineMessageEditorFrame-DGvRoAOv.js +0 -1
  460. package/app/dist/assets/InlineMessageEditorFrame-DGvRoAOv.js.br +0 -0
  461. package/app/dist/assets/InlineMessageEditorFrame-DGvRoAOv.js.gz +0 -0
  462. package/app/dist/assets/MachineLabel-DJzOb2f1.js +0 -1
  463. package/app/dist/assets/MachineLabel-DJzOb2f1.js.br +0 -0
  464. package/app/dist/assets/MachineLabel-DJzOb2f1.js.gz +0 -0
  465. package/app/dist/assets/MachineRenameDialog-DxYQ-GKH.js +0 -1
  466. package/app/dist/assets/MachineRenameDialog-DxYQ-GKH.js.br +0 -0
  467. package/app/dist/assets/MachineRenameDialog-DxYQ-GKH.js.gz +0 -0
  468. package/app/dist/assets/MachineSettingsView-hGfsWQii.js +0 -1
  469. package/app/dist/assets/MachineSettingsView-hGfsWQii.js.br +0 -0
  470. package/app/dist/assets/MachineSettingsView-hGfsWQii.js.gz +0 -0
  471. package/app/dist/assets/MicrophonePreferences-tllYRp8t.js +0 -1
  472. package/app/dist/assets/MicrophonePreferences-tllYRp8t.js.br +0 -0
  473. package/app/dist/assets/MicrophonePreferences-tllYRp8t.js.gz +0 -0
  474. package/app/dist/assets/ModelReasoningMenu-CFWYg5uU.js +0 -1
  475. package/app/dist/assets/ModelReasoningMenu-CFWYg5uU.js.br +0 -0
  476. package/app/dist/assets/ModelReasoningMenu-CFWYg5uU.js.gz +0 -0
  477. package/app/dist/assets/NewTabPage-DyjSuWGR.js +0 -2
  478. package/app/dist/assets/NewTabPage-DyjSuWGR.js.br +0 -0
  479. package/app/dist/assets/NewTabPage-DyjSuWGR.js.gz +0 -0
  480. package/app/dist/assets/NewThreadComposer-BNHO_jM9.js +0 -1
  481. package/app/dist/assets/NewThreadComposer-BNHO_jM9.js.br +0 -0
  482. package/app/dist/assets/NewThreadComposer-BNHO_jM9.js.gz +0 -0
  483. package/app/dist/assets/OnboardingFlow-Dc3wFBku.js +0 -1
  484. package/app/dist/assets/OnboardingFlow-Dc3wFBku.js.br +0 -0
  485. package/app/dist/assets/OnboardingFlow-Dc3wFBku.js.gz +0 -0
  486. package/app/dist/assets/OptionPicker-O-rbB3I4.js +0 -1
  487. package/app/dist/assets/OptionPicker-O-rbB3I4.js.br +0 -0
  488. package/app/dist/assets/OptionPicker-O-rbB3I4.js.gz +0 -0
  489. package/app/dist/assets/PaletteShell-DbEi1HFW.js +0 -1
  490. package/app/dist/assets/PaletteShell-DbEi1HFW.js.br +0 -0
  491. package/app/dist/assets/PaletteShell-DbEi1HFW.js.gz +0 -0
  492. package/app/dist/assets/PaneMaximizeButton-DRVYKzjd.js +0 -1
  493. package/app/dist/assets/PaneMaximizeButton-DRVYKzjd.js.br +0 -0
  494. package/app/dist/assets/PaneMaximizeButton-DRVYKzjd.js.gz +0 -0
  495. package/app/dist/assets/PierreLineSelectionActions-xsFvIxmm.js +0 -1
  496. package/app/dist/assets/PierreLineSelectionActions-xsFvIxmm.js.br +0 -0
  497. package/app/dist/assets/PierreLineSelectionActions-xsFvIxmm.js.gz +0 -0
  498. package/app/dist/assets/PluginPanelRightPanelHost-DE-pXPvb.js +0 -1
  499. package/app/dist/assets/PluginPanelRightPanelHost-DE-pXPvb.js.br +0 -0
  500. package/app/dist/assets/PluginPanelRightPanelHost-DE-pXPvb.js.gz +0 -0
  501. package/app/dist/assets/PluginSettingsSections-CgSlPHlS.js +0 -2
  502. package/app/dist/assets/PluginSettingsSections-CgSlPHlS.js.br +0 -0
  503. package/app/dist/assets/PluginSettingsSections-CgSlPHlS.js.gz +0 -0
  504. package/app/dist/assets/PluginThreadChat-DlGhyNoD.js +0 -1
  505. package/app/dist/assets/PluginThreadChat-DlGhyNoD.js.br +0 -0
  506. package/app/dist/assets/PluginThreadChat-DlGhyNoD.js.gz +0 -0
  507. package/app/dist/assets/ProjectDetailSettingsView-CmVMSGqn.js +0 -1
  508. package/app/dist/assets/ProjectDetailSettingsView-CmVMSGqn.js.br +0 -0
  509. package/app/dist/assets/ProjectDetailSettingsView-CmVMSGqn.js.gz +0 -0
  510. package/app/dist/assets/ProjectMachineSetupDialog-BkLUoHp8.js +0 -1
  511. package/app/dist/assets/ProjectMachineSetupDialog-BkLUoHp8.js.br +0 -0
  512. package/app/dist/assets/ProjectMachineSetupDialog-BkLUoHp8.js.gz +0 -0
  513. package/app/dist/assets/ProjectsSettingsSection-B5N-BeJ6.js +0 -3
  514. package/app/dist/assets/ProjectsSettingsSection-B5N-BeJ6.js.br +0 -0
  515. package/app/dist/assets/ProjectsSettingsSection-B5N-BeJ6.js.gz +0 -0
  516. package/app/dist/assets/QueuedMessagesList-DBjyKOk2.js +0 -3
  517. package/app/dist/assets/QueuedMessagesList-DBjyKOk2.js.br +0 -0
  518. package/app/dist/assets/QueuedMessagesList-DBjyKOk2.js.gz +0 -0
  519. package/app/dist/assets/RemotePathBrowser-DtW9ctWz.js +0 -1
  520. package/app/dist/assets/RemotePathBrowser-DtW9ctWz.js.br +0 -0
  521. package/app/dist/assets/RemotePathBrowser-DtW9ctWz.js.gz +0 -0
  522. package/app/dist/assets/RootComposeView-BixfKgSj.js +0 -1
  523. package/app/dist/assets/RootComposeView-BixfKgSj.js.br +0 -0
  524. package/app/dist/assets/RootComposeView-BixfKgSj.js.gz +0 -0
  525. package/app/dist/assets/SecondaryPanelLayout-BCEnK5Q_.js +0 -1
  526. package/app/dist/assets/SecondaryPanelLayout-BCEnK5Q_.js.br +0 -0
  527. package/app/dist/assets/SecondaryPanelLayout-BCEnK5Q_.js.gz +0 -0
  528. package/app/dist/assets/ServerMoveOverlayView-ncG738D_.js +0 -1
  529. package/app/dist/assets/ServerMoveOverlayView-ncG738D_.js.br +0 -0
  530. package/app/dist/assets/ServerMoveOverlayView-ncG738D_.js.gz +0 -0
  531. package/app/dist/assets/SettingsSidebar-DiQey2T8.js +0 -1
  532. package/app/dist/assets/SettingsSidebar-DiQey2T8.js.br +0 -0
  533. package/app/dist/assets/SettingsSidebar-DiQey2T8.js.gz +0 -0
  534. package/app/dist/assets/SettingsView-dmUqpxAj.js +0 -1250
  535. package/app/dist/assets/SettingsView-dmUqpxAj.js.br +0 -0
  536. package/app/dist/assets/SettingsView-dmUqpxAj.js.gz +0 -0
  537. package/app/dist/assets/SidebarFooterCustomize-DT1z8uCj.js +0 -1
  538. package/app/dist/assets/SidebarFooterCustomize-DT1z8uCj.js.br +0 -0
  539. package/app/dist/assets/SidebarFooterCustomize-DT1z8uCj.js.gz +0 -0
  540. package/app/dist/assets/SidebarVisibilityCustomize-Bdd1R3D9.js +0 -1
  541. package/app/dist/assets/SidebarVisibilityCustomize-Bdd1R3D9.js.br +0 -0
  542. package/app/dist/assets/SidebarVisibilityCustomize-Bdd1R3D9.js.gz +0 -0
  543. package/app/dist/assets/SourceCodeHost-DoG3EmxT.js +0 -2
  544. package/app/dist/assets/SourceCodeHost-DoG3EmxT.js.br +0 -0
  545. package/app/dist/assets/SourceCodeHost-DoG3EmxT.js.gz +0 -0
  546. package/app/dist/assets/SplitWorkspaceRoute-QSUvAP_I.js +0 -2
  547. package/app/dist/assets/SplitWorkspaceRoute-QSUvAP_I.js.br +0 -0
  548. package/app/dist/assets/SplitWorkspaceRoute-QSUvAP_I.js.gz +0 -0
  549. package/app/dist/assets/TerminalOutputBlock-BrlQKwu8.js +0 -4
  550. package/app/dist/assets/TerminalOutputBlock-BrlQKwu8.js.br +0 -0
  551. package/app/dist/assets/TerminalOutputBlock-BrlQKwu8.js.gz +0 -0
  552. package/app/dist/assets/ThreadActionsMenu-BMy923Yx.js +0 -1
  553. package/app/dist/assets/ThreadActionsMenu-BMy923Yx.js.br +0 -0
  554. package/app/dist/assets/ThreadActionsMenu-BMy923Yx.js.gz +0 -0
  555. package/app/dist/assets/ThreadDetailView-Nt-UCmzE.js +0 -6
  556. package/app/dist/assets/ThreadDetailView-Nt-UCmzE.js.br +0 -0
  557. package/app/dist/assets/ThreadDetailView-Nt-UCmzE.js.gz +0 -0
  558. package/app/dist/assets/ThreadSearchPaletteMode-DYMSO2Gv.js +0 -1
  559. package/app/dist/assets/ThreadSearchPaletteMode-DYMSO2Gv.js.br +0 -0
  560. package/app/dist/assets/ThreadSearchPaletteMode-DYMSO2Gv.js.gz +0 -0
  561. package/app/dist/assets/ThreadSecondaryPanel-B-fNRBp6.js +0 -1
  562. package/app/dist/assets/ThreadSecondaryPanel-B-fNRBp6.js.br +0 -0
  563. package/app/dist/assets/ThreadSecondaryPanel-B-fNRBp6.js.gz +0 -0
  564. package/app/dist/assets/ThreadSecondaryPanelTabContent-Dqw1O9De.js +0 -3
  565. package/app/dist/assets/ThreadSecondaryPanelTabContent-Dqw1O9De.js.br +0 -0
  566. package/app/dist/assets/ThreadSecondaryPanelTabContent-Dqw1O9De.js.gz +0 -0
  567. package/app/dist/assets/ThreadStatusGlyph-DUPJYUR6.js +0 -1
  568. package/app/dist/assets/ThreadStatusGlyph-DUPJYUR6.js.br +0 -0
  569. package/app/dist/assets/ThreadStatusGlyph-DUPJYUR6.js.gz +0 -0
  570. package/app/dist/assets/ThreadTerminalPanel-e08BQeDW.js +0 -1
  571. package/app/dist/assets/ThreadTerminalPanel-e08BQeDW.js.br +0 -0
  572. package/app/dist/assets/ThreadTerminalPanel-e08BQeDW.js.gz +0 -0
  573. package/app/dist/assets/ThreadTerminalView-CX0gk5ti.js +0 -1
  574. package/app/dist/assets/ThreadTerminalView-CX0gk5ti.js.br +0 -0
  575. package/app/dist/assets/ThreadTerminalView-CX0gk5ti.js.gz +0 -0
  576. package/app/dist/assets/ThreadTimelineNavigationContext-C9nOcZwU.js +0 -2
  577. package/app/dist/assets/ThreadTimelineNavigationContext-C9nOcZwU.js.br +0 -0
  578. package/app/dist/assets/ThreadTimelineNavigationContext-C9nOcZwU.js.gz +0 -0
  579. package/app/dist/assets/ThreadUnarchiveButton-zEXNzPaK.js +0 -1
  580. package/app/dist/assets/TimelineDetailScroll-CTo2I8Dj.js +0 -1
  581. package/app/dist/assets/TimelineDetailScroll-CTo2I8Dj.js.br +0 -0
  582. package/app/dist/assets/TimelineDetailScroll-CTo2I8Dj.js.gz +0 -0
  583. package/app/dist/assets/TimelineFileDiffBlock-DjqGTFly.js +0 -6
  584. package/app/dist/assets/TimelineFileDiffBlock-DjqGTFly.js.br +0 -0
  585. package/app/dist/assets/TimelineFileDiffBlock-DjqGTFly.js.gz +0 -0
  586. package/app/dist/assets/TimelineSelectionMenu-DCoFHFPR.js +0 -22
  587. package/app/dist/assets/TimelineSelectionMenu-DCoFHFPR.js.br +0 -0
  588. package/app/dist/assets/TimelineSelectionMenu-DCoFHFPR.js.gz +0 -0
  589. package/app/dist/assets/ToolsView-RaQWwnMl.js +0 -4
  590. package/app/dist/assets/ToolsView-RaQWwnMl.js.br +0 -0
  591. package/app/dist/assets/ToolsView-RaQWwnMl.js.gz +0 -0
  592. package/app/dist/assets/ToolsViewSplits-DETBJd3l.js +0 -2
  593. package/app/dist/assets/ToolsViewSplits-DETBJd3l.js.br +0 -0
  594. package/app/dist/assets/ToolsViewSplits-DETBJd3l.js.gz +0 -0
  595. package/app/dist/assets/WaveformVisualizer-VuqnHHf4.js +0 -1
  596. package/app/dist/assets/WaveformVisualizer-VuqnHHf4.js.br +0 -0
  597. package/app/dist/assets/WaveformVisualizer-VuqnHHf4.js.gz +0 -0
  598. package/app/dist/assets/absolute-file-path-ClSoMDYd.js +0 -1
  599. package/app/dist/assets/app-fixed-tab-navigation-DLVN5GvK.js +0 -1
  600. package/app/dist/assets/app-fixed-tab-navigation-DLVN5GvK.js.br +0 -0
  601. package/app/dist/assets/app-fixed-tab-navigation-DLVN5GvK.js.gz +0 -0
  602. package/app/dist/assets/audio-input-device-preference-D1gHivJP.js +0 -1
  603. package/app/dist/assets/audio-input-device-preference-D1gHivJP.js.br +0 -0
  604. package/app/dist/assets/audio-input-device-preference-D1gHivJP.js.gz +0 -0
  605. package/app/dist/assets/bottom-anchored-scroll-body-enrNs6vx.js +0 -1
  606. package/app/dist/assets/bottom-anchored-scroll-body-enrNs6vx.js.br +0 -0
  607. package/app/dist/assets/bottom-anchored-scroll-body-enrNs6vx.js.gz +0 -0
  608. package/app/dist/assets/browser-url-B-LTmAh4.js +0 -1
  609. package/app/dist/assets/browser-url-B-LTmAh4.js.br +0 -0
  610. package/app/dist/assets/browser-url-B-LTmAh4.js.gz +0 -0
  611. package/app/dist/assets/checkbox-DX7aXrcZ.js +0 -1
  612. package/app/dist/assets/checkbox-DX7aXrcZ.js.br +0 -0
  613. package/app/dist/assets/checkbox-DX7aXrcZ.js.gz +0 -0
  614. package/app/dist/assets/code-loading-skeletons-BGSN01Tz.js +0 -1
  615. package/app/dist/assets/code-loading-skeletons-BGSN01Tz.js.br +0 -0
  616. package/app/dist/assets/code-loading-skeletons-BGSN01Tz.js.gz +0 -0
  617. package/app/dist/assets/code-rendering-m0uKGkRp.js +0 -1
  618. package/app/dist/assets/code-theme-registration-CgUFeRP_.js +0 -1
  619. package/app/dist/assets/detail-card-DDzjJUfc.js +0 -1
  620. package/app/dist/assets/detail-card-DDzjJUfc.js.br +0 -0
  621. package/app/dist/assets/detail-card-DDzjJUfc.js.gz +0 -0
  622. package/app/dist/assets/diff-stats-tally-DIOm2c5F.js +0 -1
  623. package/app/dist/assets/diff-stats-tally-DIOm2c5F.js.br +0 -0
  624. package/app/dist/assets/diff-stats-tally-DIOm2c5F.js.gz +0 -0
  625. package/app/dist/assets/environment-mutations-C1N8zggY.js +0 -1
  626. package/app/dist/assets/environment-mutations-C1N8zggY.js.br +0 -0
  627. package/app/dist/assets/environment-mutations-C1N8zggY.js.gz +0 -0
  628. package/app/dist/assets/environment-workspace-display-DUUedCBU.js +0 -4
  629. package/app/dist/assets/environment-workspace-display-DUUedCBU.js.br +0 -0
  630. package/app/dist/assets/environment-workspace-display-DUUedCBU.js.gz +0 -0
  631. package/app/dist/assets/event-code-block-O30jqL4v.js +0 -2
  632. package/app/dist/assets/event-code-block-O30jqL4v.js.br +0 -0
  633. package/app/dist/assets/event-code-block-O30jqL4v.js.gz +0 -0
  634. package/app/dist/assets/expandable-text-NSXJdvVv.js +0 -1
  635. package/app/dist/assets/expandable-text-NSXJdvVv.js.br +0 -0
  636. package/app/dist/assets/expandable-text-NSXJdvVv.js.gz +0 -0
  637. package/app/dist/assets/file-opener-preference-Co4XqvU_.js +0 -1
  638. package/app/dist/assets/file-path-link-BtPKlAKW.js +0 -1
  639. package/app/dist/assets/file-path-link-BtPKlAKW.js.br +0 -0
  640. package/app/dist/assets/file-path-link-BtPKlAKW.js.gz +0 -0
  641. package/app/dist/assets/host-mutations-C3H9X0JV.js +0 -1
  642. package/app/dist/assets/host-mutations-C3H9X0JV.js.br +0 -0
  643. package/app/dist/assets/host-mutations-C3H9X0JV.js.gz +0 -0
  644. package/app/dist/assets/icon-extended-9TJd0Kpz.js +0 -1
  645. package/app/dist/assets/icon-extended-9TJd0Kpz.js.br +0 -0
  646. package/app/dist/assets/icon-extended-9TJd0Kpz.js.gz +0 -0
  647. package/app/dist/assets/image-lightbox-QBnDKHv5.js +0 -1
  648. package/app/dist/assets/image-lightbox-QBnDKHv5.js.br +0 -0
  649. package/app/dist/assets/image-lightbox-QBnDKHv5.js.gz +0 -0
  650. package/app/dist/assets/index-BGL8YSxH.js +0 -395
  651. package/app/dist/assets/index-BGL8YSxH.js.br +0 -0
  652. package/app/dist/assets/index-BGL8YSxH.js.gz +0 -0
  653. package/app/dist/assets/inline-rename-editor-BDuY-TvC.js +0 -1
  654. package/app/dist/assets/inline-rename-editor-BDuY-TvC.js.br +0 -0
  655. package/app/dist/assets/inline-rename-editor-BDuY-TvC.js.gz +0 -0
  656. package/app/dist/assets/launcherRow-DPAFD92d.js +0 -1
  657. package/app/dist/assets/launcherRow-DPAFD92d.js.br +0 -0
  658. package/app/dist/assets/launcherRow-DPAFD92d.js.gz +0 -0
  659. package/app/dist/assets/localhost-link-rewrite-description-BfzlTjBV.js +0 -1
  660. package/app/dist/assets/localhost-link-rewrite-description-BfzlTjBV.js.br +0 -0
  661. package/app/dist/assets/localhost-link-rewrite-description-BfzlTjBV.js.gz +0 -0
  662. package/app/dist/assets/machine-provider-queries-CBDK3R4s.js +0 -1
  663. package/app/dist/assets/machine-server-access-Cz_BJTG9.js +0 -1
  664. package/app/dist/assets/markdown-file-image-routing-Dphi0fOg.js +0 -1
  665. package/app/dist/assets/markdown-html-C2Hf-Rqv.js +0 -1
  666. package/app/dist/assets/markdown-html-C2Hf-Rqv.js.br +0 -0
  667. package/app/dist/assets/markdown-html-C2Hf-Rqv.js.gz +0 -0
  668. package/app/dist/assets/markdown-local-file-link-DwK3P_QK.js +0 -2
  669. package/app/dist/assets/markdown-local-file-link-DwK3P_QK.js.br +0 -0
  670. package/app/dist/assets/markdown-local-file-link-DwK3P_QK.js.gz +0 -0
  671. package/app/dist/assets/markdown-preview-CVn1iAPq.js +0 -38
  672. package/app/dist/assets/markdown-preview-CVn1iAPq.js.br +0 -0
  673. package/app/dist/assets/markdown-preview-CVn1iAPq.js.gz +0 -0
  674. package/app/dist/assets/markdown-prompt-mentions-BwGOrlfR.js +0 -18
  675. package/app/dist/assets/markdown-prompt-mentions-BwGOrlfR.js.br +0 -0
  676. package/app/dist/assets/markdown-prompt-mentions-BwGOrlfR.js.gz +0 -0
  677. package/app/dist/assets/model-load-error-message-D8pYcjFq.js +0 -1
  678. package/app/dist/assets/model-load-error-message-D8pYcjFq.js.br +0 -0
  679. package/app/dist/assets/model-load-error-message-D8pYcjFq.js.gz +0 -0
  680. package/app/dist/assets/onboarding-telemetry-DfALxVrX.js +0 -1
  681. package/app/dist/assets/open-in-editor-button-DjufYpRM.js +0 -1
  682. package/app/dist/assets/open-in-editor-button-DjufYpRM.js.br +0 -0
  683. package/app/dist/assets/open-in-editor-button-DjufYpRM.js.gz +0 -0
  684. package/app/dist/assets/page-shell-0OVjVcP-.js +0 -1
  685. package/app/dist/assets/page-shell-0OVjVcP-.js.br +0 -0
  686. package/app/dist/assets/page-shell-0OVjVcP-.js.gz +0 -0
  687. package/app/dist/assets/pierre-worker-pool-DQtBdHvO.js +0 -1
  688. package/app/dist/assets/pierre-worker-pool-DQtBdHvO.js.br +0 -0
  689. package/app/dist/assets/pierre-worker-pool-DQtBdHvO.js.gz +0 -0
  690. package/app/dist/assets/plugin-detail-navigation-DE27KGDx.js +0 -1
  691. package/app/dist/assets/plugin-detail-navigation-DE27KGDx.js.br +0 -0
  692. package/app/dist/assets/plugin-detail-navigation-DE27KGDx.js.gz +0 -0
  693. package/app/dist/assets/plugin-frontend-DEXflabU.js +0 -4
  694. package/app/dist/assets/plugin-frontend-DEXflabU.js.br +0 -0
  695. package/app/dist/assets/plugin-frontend-DEXflabU.js.gz +0 -0
  696. package/app/dist/assets/plugin-ui-CW7vcted.js +0 -1
  697. package/app/dist/assets/plugin-ui-CW7vcted.js.br +0 -0
  698. package/app/dist/assets/plugin-ui-CW7vcted.js.gz +0 -0
  699. package/app/dist/assets/project-default-execution-options-query-CLVdEJXk.js +0 -1
  700. package/app/dist/assets/queued-editor-typeahead-layout-D_Zh3FPj.js +0 -1
  701. package/app/dist/assets/queued-editor-typeahead-layout-D_Zh3FPj.js.br +0 -0
  702. package/app/dist/assets/queued-editor-typeahead-layout-D_Zh3FPj.js.gz +0 -0
  703. package/app/dist/assets/queued-messages-layout-CCECsuTO.js +0 -3
  704. package/app/dist/assets/queued-messages-layout-CCECsuTO.js.br +0 -0
  705. package/app/dist/assets/queued-messages-layout-CCECsuTO.js.gz +0 -0
  706. package/app/dist/assets/resource-list-CnKfBHuR.js +0 -1
  707. package/app/dist/assets/resource-list-CnKfBHuR.js.br +0 -0
  708. package/app/dist/assets/resource-list-CnKfBHuR.js.gz +0 -0
  709. package/app/dist/assets/root-compose-create-preference-DfaTI2St.js +0 -1
  710. package/app/dist/assets/save-file-ByNxORDv.js +0 -1
  711. package/app/dist/assets/settings-nav-B9lYxONJ.js +0 -1
  712. package/app/dist/assets/settings-nav-B9lYxONJ.js.br +0 -0
  713. package/app/dist/assets/settings-nav-B9lYxONJ.js.gz +0 -0
  714. package/app/dist/assets/settings-sections-D7H9n0V9.js +0 -1
  715. package/app/dist/assets/settings-sections-D7H9n0V9.js.br +0 -0
  716. package/app/dist/assets/settings-sections-D7H9n0V9.js.gz +0 -0
  717. package/app/dist/assets/shortcut-pill-DqyzLQo_.js +0 -1
  718. package/app/dist/assets/sidebarTouchSensor-CgXYdjCY.js +0 -1
  719. package/app/dist/assets/sidebarTouchSensor-CgXYdjCY.js.br +0 -0
  720. package/app/dist/assets/sidebarTouchSensor-CgXYdjCY.js.gz +0 -0
  721. package/app/dist/assets/switch-CTyIIZ-V.js +0 -1
  722. package/app/dist/assets/switch-CTyIIZ-V.js.br +0 -0
  723. package/app/dist/assets/switch-CTyIIZ-V.js.gz +0 -0
  724. package/app/dist/assets/textarea-D3DTflBk.js +0 -1
  725. package/app/dist/assets/thread-event-parser-Q2HFvaaM.js +0 -1
  726. package/app/dist/assets/thread-event-parser-Q2HFvaaM.js.br +0 -0
  727. package/app/dist/assets/thread-event-parser-Q2HFvaaM.js.gz +0 -0
  728. package/app/dist/assets/thread-panel-queries-BJWIs0E5.js +0 -1
  729. package/app/dist/assets/thread-panel-queries-BJWIs0E5.js.br +0 -0
  730. package/app/dist/assets/thread-panel-queries-BJWIs0E5.js.gz +0 -0
  731. package/app/dist/assets/thread-runtime-mutations-B8yPySeD.js +0 -3
  732. package/app/dist/assets/thread-runtime-mutations-B8yPySeD.js.br +0 -0
  733. package/app/dist/assets/thread-runtime-mutations-B8yPySeD.js.gz +0 -0
  734. package/app/dist/assets/thread-terminal-queries-0wO3aX9z.js +0 -1
  735. package/app/dist/assets/thread-terminal-queries-0wO3aX9z.js.br +0 -0
  736. package/app/dist/assets/thread-terminal-queries-0wO3aX9z.js.gz +0 -0
  737. package/app/dist/assets/threadRecentItems-9K4BZAwl.js +0 -1
  738. package/app/dist/assets/threadRecentItems-9K4BZAwl.js.br +0 -0
  739. package/app/dist/assets/threadRecentItems-9K4BZAwl.js.gz +0 -0
  740. package/app/dist/assets/threadWorkspaceOpenPath-CsDNI0IC.js +0 -1
  741. package/app/dist/assets/threadWorkspaceOpenPath-CsDNI0IC.js.br +0 -0
  742. package/app/dist/assets/threadWorkspaceOpenPath-CsDNI0IC.js.gz +0 -0
  743. package/app/dist/assets/title-bar-scroll-fade-CT-NfQ4q.js +0 -1
  744. package/app/dist/assets/title-bar-scroll-fade-CT-NfQ4q.js.br +0 -0
  745. package/app/dist/assets/title-bar-scroll-fade-CT-NfQ4q.js.gz +0 -0
  746. package/app/dist/assets/truncate-start-sFBGQuXw.js +0 -1
  747. package/app/dist/assets/use-hover-popover-C4iA1mVw.js +0 -1
  748. package/app/dist/assets/use-hover-popover-C4iA1mVw.js.br +0 -0
  749. package/app/dist/assets/use-hover-popover-C4iA1mVw.js.gz +0 -0
  750. package/app/dist/assets/useElementWidth-Ops6Kt0q.js +0 -1
  751. package/app/dist/assets/useElementWidth-Ops6Kt0q.js.br +0 -0
  752. package/app/dist/assets/useElementWidth-Ops6Kt0q.js.gz +0 -0
  753. package/app/dist/assets/useLocalOpenTargets-B8aY-6CG.js +0 -1
  754. package/app/dist/assets/useLocalOpenTargets-B8aY-6CG.js.br +0 -0
  755. package/app/dist/assets/useLocalOpenTargets-B8aY-6CG.js.gz +0 -0
  756. package/app/dist/assets/usePanelResizeSnap-CAr5CRAp.js +0 -1
  757. package/app/dist/assets/usePanelResizeSnap-CAr5CRAp.js.br +0 -0
  758. package/app/dist/assets/usePanelResizeSnap-CAr5CRAp.js.gz +0 -0
  759. package/app/dist/assets/usePanelTerminals-4Kpwad1-.js +0 -1
  760. package/app/dist/assets/usePanelTerminals-4Kpwad1-.js.br +0 -0
  761. package/app/dist/assets/usePanelTerminals-4Kpwad1-.js.gz +0 -0
  762. package/app/dist/assets/usePathSuggestions--LLH3qoO.js +0 -1
  763. package/app/dist/assets/usePathSuggestions--LLH3qoO.js.br +0 -0
  764. package/app/dist/assets/usePathSuggestions--LLH3qoO.js.gz +0 -0
  765. package/app/dist/assets/useResolvedLiveFileTarget-BeNdutJm.js +0 -1
  766. package/app/dist/assets/useResolvedLiveFileTarget-BeNdutJm.js.br +0 -0
  767. package/app/dist/assets/useResolvedLiveFileTarget-BeNdutJm.js.gz +0 -0
  768. package/app/dist/assets/useThreadTerminalController-e5EaeDo9.js +0 -1
  769. package/app/dist/assets/useThreadTerminalController-e5EaeDo9.js.br +0 -0
  770. package/app/dist/assets/useThreadTerminalController-e5EaeDo9.js.gz +0 -0
  771. package/app/dist/assets/workspace-change-summary-B3wtakl2.js +0 -1
  772. package/app/dist/assets/workspace-change-summary-B3wtakl2.js.br +0 -0
  773. package/app/dist/assets/workspace-change-summary-B3wtakl2.js.gz +0 -0
  774. package/app/dist/assets/workspace-checkout-display-C4HVovvm.js +0 -32
  775. package/app/dist/assets/workspace-checkout-display-C4HVovvm.js.br +0 -0
  776. package/app/dist/assets/workspace-checkout-display-C4HVovvm.js.gz +0 -0
  777. package/host-daemon/dist/bb-chunks/browser-AW5NKOND.js +0 -6
  778. package/host-daemon/dist/bb-chunks/chunk-2UXPXE2O.js +0 -134
  779. package/host-daemon/dist/bb-chunks/chunk-43VNS4QN.js +0 -2
  780. package/host-daemon/dist/bb-chunks/chunk-CUJIB3FP.js +0 -2
  781. package/host-daemon/dist/bb-chunks/chunk-HFESVZFF.js +0 -6
  782. package/host-daemon/dist/bb-chunks/chunk-K3TVW7MY.js +0 -2
  783. package/host-daemon/dist/bb-chunks/chunk-LJXQ4YYU.js +0 -2
  784. package/host-daemon/dist/bb-chunks/chunk-SQPEPTGH.js +0 -2
  785. package/host-daemon/dist/bb-chunks/chunk-VD753ECW.js +0 -2
  786. package/host-daemon/dist/bb-chunks/chunk-W65ZRVTI.js +0 -2
  787. package/host-daemon/dist/bb-chunks/chunk-WJ756L4Q.js +0 -2
  788. package/host-daemon/dist/bb-chunks/chunk-YBX55DE3.js +0 -2236
  789. package/host-daemon/dist/bb-chunks/client-AMEEMEF5.js +0 -2
  790. package/host-daemon/dist/bb-chunks/commander-errors-NRLKCJHU.js +0 -3
  791. package/host-daemon/dist/bb-chunks/context-env-DE2TLSQE.js +0 -2
  792. package/host-daemon/dist/bb-chunks/context-hints-MDGUPKZ6.js +0 -2
  793. package/host-daemon/dist/bb-chunks/diagnostics-YHUPWZ2T.js +0 -3
  794. package/host-daemon/dist/bb-chunks/environment-WQORWGQT.js +0 -2
  795. package/host-daemon/dist/bb-chunks/file-V7DY5ID3.js +0 -3
  796. package/host-daemon/dist/bb-chunks/guide-NUYU7AGL.js +0 -4
  797. package/host-daemon/dist/bb-chunks/machine-OWISQOWF.js +0 -2
  798. package/host-daemon/dist/bb-chunks/marketplace-CLSHYVNQ.js +0 -2
  799. package/host-daemon/dist/bb-chunks/permissions-M32AWSBZ.js +0 -2
  800. package/host-daemon/dist/bb-chunks/plugin-NWOGIHXO.js +0 -2633
  801. package/host-daemon/dist/bb-chunks/plugin-cli-proxy-W2UN4MSW.js +0 -2
  802. package/host-daemon/dist/bb-chunks/project-HFNYH3RY.js +0 -2
  803. package/host-daemon/dist/bb-chunks/prompt-history-CRGEJYCN.js +0 -2
  804. package/host-daemon/dist/bb-chunks/provider-QJNRA32S.js +0 -2
  805. package/host-daemon/dist/bb-chunks/schedule-RWX3CLQX.js +0 -2
  806. package/host-daemon/dist/bb-chunks/server-6ZZ2AEVB.js +0 -8
  807. package/host-daemon/dist/bb-chunks/settings-SRE5MGIO.js +0 -4
  808. package/host-daemon/dist/bb-chunks/skill-KU3TQ7KZ.js +0 -5
  809. package/host-daemon/dist/bb-chunks/status-XKUKCDWF.js +0 -2
  810. package/host-daemon/dist/bb-chunks/terminal-C6XHWK6K.js +0 -3
  811. package/host-daemon/dist/bb-chunks/theme-E7TJEQZX.js +0 -2
  812. package/host-daemon/dist/bb-chunks/thread-ULIWXZ6H.js +0 -29
  813. package/host-daemon/dist/bb-chunks/updates-B3DMRLW6.js +0 -2
  814. package/host-daemon/dist/bb-chunks/voice-UG35FOEO.js +0 -2
  815. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/config/policy.toml +0 -221
  816. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/recipes/base-linux/codex.sh +0 -74
  817. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/recipes/base-linux.toml +0 -122
  818. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/recipes/default-linux.toml +0 -25
  819. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/recipes/default.toml +0 -68
  820. package/server/dist/builtin-plugins/orbit/dist/assets/orbit/revision +0 -1
  821. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/orbit/back/CLAUDE.md +0 -173
  822. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/bundle/scripts/orbit-job-supervisor +0 -0
  823. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/docs/handoff-to-new-conversation.md +0 -0
  824. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/a11y-launchers.sh +0 -0
  825. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/antfly.sh +0 -0
  826. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/apps.sh +0 -0
  827. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/bwrap-userns.sh +0 -0
  828. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/chrome.sh +0 -0
  829. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/codex-model.sh +0 -0
  830. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/cua-driver.sh +0 -0
  831. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/desktop.sh +0 -0
  832. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/dev-tools.sh +0 -0
  833. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/doc-tools.sh +0 -0
  834. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/gh.sh +0 -0
  835. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/library.sh +0 -0
  836. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/linger.sh +0 -0
  837. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/networkd.sh +0 -0
  838. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/no-ipv6.sh +0 -0
  839. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/node.sh +0 -0
  840. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/npm-prefix.sh +0 -0
  841. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/op.sh +0 -0
  842. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/orbit-data.sh +0 -0
  843. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/packages.sh +0 -0
  844. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/proton-bridge.sh +0 -0
  845. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/proton-mail.sh +0 -0
  846. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/rclone.sh +0 -0
  847. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/shell-path.sh +0 -0
  848. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/signin.sh +0 -0
  849. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-linux/swap.sh +0 -0
  850. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/antfly.sh +0 -0
  851. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/apps.sh +0 -0
  852. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/chrome-headless-shell.sh +0 -0
  853. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/chrome-policy.sh +0 -0
  854. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/cua-driver-agent.sh +0 -0
  855. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/cua-driver-telemetry.sh +0 -0
  856. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/cua-driver.sh +0 -0
  857. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/dev-tools.sh +0 -0
  858. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/doc-tools.sh +0 -0
  859. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/gnupg.sh +0 -0
  860. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/groups.sh +0 -0
  861. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/homebrew.sh +0 -0
  862. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/launchd-path.sh +0 -0
  863. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/library.sh +0 -0
  864. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/no-ipv6.sh +0 -0
  865. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/no-screen-saver.sh +0 -0
  866. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/node.sh +0 -0
  867. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/op.sh +0 -0
  868. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/orbit-data.sh +0 -0
  869. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/proton-bridge.sh +0 -0
  870. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/rclone.sh +0 -0
  871. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/retire-desktop.sh +0 -0
  872. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/screen-sharing.sh +0 -0
  873. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/shell-path.sh +0 -0
  874. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/skip-setup-assistant.sh +0 -0
  875. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/stay-awake.sh +0 -0
  876. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos/tailscale.sh +0 -0
  877. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/base-macos.toml +0 -0
  878. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/codex-npm.sh +0 -0
  879. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux/bb-address.sh +0 -0
  880. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux/library-pull.sh +0 -0
  881. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux/libvirt.sh +0 -0
  882. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux/linger.sh +0 -0
  883. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux/packages.sh +0 -0
  884. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux/swap.sh +0 -0
  885. /package/server/dist/builtin-plugins/orbit/dist/assets/{orbit → moonlet}/recipes/server-linux.toml +0 -0
  886. /package/server/dist/builtin-plugins/orbit/dist/assets/plugins/{orbit → moonlet}/front/CLAUDE.md +0 -0
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ar as t,Kr as n,Or as r,mi as i,ni as a}from"./boot-vendor-BBLG7GwQ.js";import{$p as o,Cd as s,Co as c,Ji as l,Na as u,So as d,Ti as f,Vo as p,Xi as m,ah as h,bo as g,ea as _,h as v,lh as y,qo as b,sm as x,vo as S,yo as C}from"./index-BzbTy_RW.js";import{n as w}from"./index.browser-usHDzq3C.js";import{t as T}from"./OptionPicker-YUV1yvLs.js";import{V as E}from"./resource-list-DEdVfbWY.js";import{n as D,r as O}from"./machine-server-access-idmS9PlJ.js";var k=r(),A=e(i(),1),j=e(a(),1);function M(e){try{return new URL(e)}catch{return null}}function N(){let e=p(),t=v(),n=e.data?.generalSettings,r=e.data?.serverAccess,i=n?.machineServerUrl??``,[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(null),l=!n,u=r?.defaultProviderId??`direct`,[d,m]=(0,A.useState)(null);(0,A.useEffect)(()=>{d===u&&m(null)},[u,d]);let h=d??u;return{access:r,disabled:l,draft:a,error:s,effective:r?.providers.find(e=>e.id===h),configurationMessage:D(r,h),saving:t.isPending,selected:h,value:i,editDraft:e=>{o(e),c(null)},selectProvider:e=>{!n||e===h||(m(e),t.mutate({defaultMachineAccess:e},{onError:()=>m(null)}))},commitUrl:async()=>{if(!n||a===null)return;let e=a.trim();if(e){let t=M(e);if(t===null||![`http:`,`https:`].includes(t.protocol)||t.username||t.password){c(`Enter a valid HTTP or HTTPS URL without credentials`);return}if(f(e)){c(`Other machines cannot reach localhost. Use a domain or shared-network address.`);return}}try{await t.mutateAsync({machineServerUrl:e||null})}catch(e){c(b({error:e,fallbackMessage:`Couldn't save the address.`}));return}o(null),c(null)}}}function P(e){let t=(0,k.c)(7),{children:n,title:r}=e,i=r===void 0?`Machine access`:r,a=N(),o;t[0]!==n||t[1]!==a?(o=n?.(a.selected===`direct`?null:a.effective?.pluginId??null),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==o||t[5]!==i?(s=(0,j.jsx)(F,{machineAccess:a,title:i,children:o}),t[3]=a,t[4]=o,t[5]=i,t[6]=s):s=t[6],s}function F(e){let t=(0,k.c)(12),{machineAccess:n,children:r,title:i}=e,a=i===void 0?`Machine access`:i,o;t[0]===a?o=t[1]:(o=(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:a}),t[0]=a,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Choose how your devices reach this Moonlet server.`}),t[2]=s):s=t[2];let c;t[3]===o?c=t[4]:(c=(0,j.jsxs)(`div`,{children:[o,s]}),t[3]=o,t[4]=c);let l;t[5]!==r||t[6]!==n?(l=(0,j.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,j.jsx)(`div`,{className:`px-4 py-3`,children:n.access===void 0?(0,j.jsxs)(`p`,{role:`status`,className:`flex h-8 items-center gap-2 text-xs text-subtle-foreground`,children:[(0,j.jsx)(h,{name:`Spinner`,className:`size-3.5 animate-spin`}),`Loading connection settings…`]}):(0,j.jsxs)(j.Fragment,{children:[n.selected!==`direct`&&n.effective?(0,j.jsx)(V,{machineAccess:n,methodPicker:(0,j.jsx)(R,{machineAccess:n,align:`start`})}):(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`flex`,children:(0,j.jsx)(R,{machineAccess:n,align:`start`})}),(0,j.jsx)(B,{machineAccess:n})]}),r]})})}),t[5]=r,t[6]=n,t[7]=l):l=t[7];let u;return t[8]!==c||t[9]!==l||t[10]!==a?(u=(0,j.jsxs)(`section`,{"aria-label":a,className:`space-y-3`,children:[c,l]}),t[8]=c,t[9]=l,t[10]=a,t[11]=u):u=t[11],u}function I(e){let t=(0,k.c)(3),{onNavigate:n}=e,r=N(),i;return t[0]!==r||t[1]!==n?(i=(0,j.jsx)(L,{machineAccess:r,onNavigate:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function L(e){let t=(0,k.c)(9),{machineAccess:n,onNavigate:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsx)(`span`,{className:`text-sm font-normal text-foreground`,children:`Connection method`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,j.jsx)(R,{machineAccess:n})]}),t[1]=n,t[2]=a);let o;t[3]!==n||t[4]!==r?(o=(0,j.jsx)(B,{machineAccess:n,onNavigate:r}),t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,j.jsxs)(`div`,{className:`space-y-3`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function R(e){let t=(0,k.c)(15),{machineAccess:n,align:r}=e,i=r===void 0?`end`:r,{access:a,disabled:o,selected:s}=n,c;t[0]!==a||t[1]!==n.effective?(c=a&&!n.effective?{label:`Unavailable method`}:void 0,t[0]=a,t[1]=n.effective,t[2]=c):c=t[2];let l=i===`start`?`-ml-1`:void 0,u;t[3]===a?.providers?u=t[4]:(u=a?.providers??[],t[3]=a?.providers,t[4]=u);let d;t[5]===u?d=t[6]:(d=u.map(z),t[5]=u,t[6]=d);let f;return t[7]!==i||t[8]!==o||t[9]!==n.selectProvider||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==d?(f=(0,j.jsx)(T,{modal:!1,label:`Connection method`,value:s,displayOverride:c,disabled:o,showChevronWhenDisabled:!0,align:i,className:l,options:d,onChange:n.selectProvider}),t[7]=i,t[8]=o,t[9]=n.selectProvider,t[10]=s,t[11]=c,t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function z(e){return{value:e.id,label:e.displayName,description:e.description}}function B(e){let t=(0,k.c)(21),{machineAccess:n,onNavigate:r}=e,{access:i,disabled:a,draft:o,effective:s,error:c,saving:l,selected:u,value:d}=n,f;t[0]!==s||t[1]!==n||t[2]!==r||t[3]!==u?(f=u!==`direct`&&s!==void 0&&(0,j.jsx)(V,{machineAccess:n,onNavigate:r}),t[0]=s,t[1]=n,t[2]=r,t[3]=u,t[4]=f):f=t[4];let p;t[5]!==s||t[6]!==u?(p=u!==`direct`&&s===void 0&&(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`This connection method is not installed. Choose another method above.`}),t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==i?.effectiveUrl||t[9]!==a||t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==l||t[14]!==u||t[15]!==d?(m=u===`direct`&&(0,j.jsxs)(E,{label:`Server address`,description:`Use your own domain or an address on a shared network. Your devices must be able to reach this address; localhost won’t work.`,controlPlacement:`below`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(_,{className:`min-w-0 flex-1 basis-48`,"aria-label":`Server address`,"aria-invalid":c!==null,value:o??d,placeholder:i?.effectiveUrl??`https://moonlet.example.com`,disabled:a,onChange:e=>n.editDraft(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n.commitUrl()}}),(0,j.jsx)(y,{variant:`outline`,className:`h-9 max-md:pointer-coarse:h-10`,disabled:a||o===null||o.trim()===d,onClick:()=>void n.commitUrl(),children:l?`Saving…`:`Save`})]}),c!==null&&(0,j.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-destructive-text`,children:c})]}),t[8]=i?.effectiveUrl,t[9]=a,t[10]=o,t[11]=c,t[12]=n,t[13]=l,t[14]=u,t[15]=d,t[16]=m):m=t[16];let h;return t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,j.jsxs)(j.Fragment,{children:[f,p,m]}),t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20],h}function V(e){let n=(0,k.c)(22),{machineAccess:r,onNavigate:i,methodPicker:a}=e,{effective:s,configurationMessage:c}=r;if(!s)return null;let l=c===null,u=s.availability?.status===`setup-required`&&s.pluginId!==null,d=u?`flex flex-col items-start gap-2`:`flex min-h-7 items-center justify-between gap-3`,f;n[0]!==c||n[1]!==s.description||n[2]!==u?(f=u&&(0,j.jsxs)(`p`,{className:`max-w-xl text-xs text-subtle-foreground`,children:[s.description,` `,c]}),n[0]=c,n[1]=s.description,n[2]=u,n[3]=f):f=n[3];let p;n[4]!==s.displayName||n[5]!==s.pluginId||n[6]!==i||n[7]!==u?(p=s.pluginId!==null&&(0,j.jsx)(y,{variant:u?`default`:`link`,size:`sm`,className:u?`shrink-0`:`h-7 shrink-0 px-3 font-normal text-subtle-foreground/75 no-underline hover:text-subtle-foreground hover:no-underline`,asChild:!0,children:(0,j.jsx)(t,{onClick:i,to:o({pluginId:s.pluginId}),children:u?(0,j.jsxs)(j.Fragment,{children:[`Set up `,s.displayName,(0,j.jsx)(h,{name:`ArrowRight`})]}):`Manage`})}),n[4]=s.displayName,n[5]=s.pluginId,n[6]=i,n[7]=u,n[8]=p):p=n[8];let m;n[9]!==a||n[10]!==d||n[11]!==f||n[12]!==p?(m=(0,j.jsxs)(`div`,{className:d,children:[a,f,p]}),n[9]=a,n[10]=d,n[11]=f,n[12]=p,n[13]=m):m=n[13];let g;n[14]!==c||n[15]!==s.availability||n[16]!==l||n[17]!==u?(g=!u&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsxs)(`p`,{className:`inline-flex shrink-0 items-center gap-1.5 font-medium`,children:[l?(0,j.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-success`,"aria-hidden":`true`}):null,l?`Ready`:`Unavailable`]}),(0,j.jsx)(`p`,{className:`min-w-0 break-words text-subtle-foreground [overflow-wrap:anywhere]`,children:c??(s.availability?.status===`available`?s.availability.serverUrl:null)??`Ready to connect devices.`})]}),n[14]=c,n[15]=s.availability,n[16]=l,n[17]=u,n[18]=g):g=n[18];let _;return n[19]!==m||n[20]!==g?(_=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[m,g]}),n[19]=m,n[20]=g,n[21]=_):_=n[21],_}var H=`manual`;function U(e){let t=(0,k.c)(12),{open:n,onOpenChange:r}=e,i=l(),a;t[0]!==i||t[1]!==r?(a=e=>{e||i.refetch(),r(e)},t[0]=i,t[1]=r,t[2]=a):a=t[2];let o=a,s;t[3]!==o||t[4]!==n?(s=n&&(0,j.jsx)(W,{onOpenChange:o}),t[3]=o,t[4]=n,t[5]=s):s=t[5];let c;t[6]===s?c=t[7]:(c=(0,j.jsx)(C,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,children:s}),t[6]=s,t[7]=c);let u;return t[8]!==o||t[9]!==n||t[10]!==c?(u=(0,j.jsx)(S,{open:n,onOpenChange:o,modal:!1,children:c}),t[8]=o,t[9]=n,t[10]=c,t[11]=u):u=t[11],u}function W(e){let t=(0,k.c)(13),{onOpenChange:n}=e,r=p(),i=l();if(!O(r.data?.serverAccess)){let e;t[0]===r?e=t[1]:(e=r.isPending?{status:`checking`}:r.isError?{status:`failed`,onRetry:()=>void r.refetch()}:{status:`blocked`},t[0]=r,t[1]=e);let i;t[2]===n?i=t[3]:(i=(0,j.jsx)(I,{onNavigate:()=>n(!1)}),t[2]=n,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,j.jsx)(K,{state:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let a=r.data?.primaryHostId??null,o;t[7]!==i.data||t[8]!==a?(o=i.data?.find(e=>e.id===a)?.name??null,t[7]=i.data,t[8]=a,t[9]=o):o=t[9];let s=o,c;return t[10]!==n||t[11]!==s?(c=(0,j.jsx)(q,{serverMachineName:s,onOpenChange:n}),t[10]=n,t[11]=s,t[12]=c):c=t[12],c}function G(e){return e===null?`The new machine will connect to your Moonlet server. Keep the server machine on so the new machine can keep working.`:`The new machine will connect to the Moonlet server on ${e}. Keep that computer on so the new machine can keep working.`}function K(e){let t=(0,k.c)(7),{state:n,children:r}=e;if(n.status===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c,{className:`sr-only`,children:`Add a machine`}),(0,j.jsx)(`p`,{role:`status`,className:`text-sm text-subtle-foreground`,children:`Checking machine access…`})]}),t[0]=e):e=t[0],e}if(n.status===`failed`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(d,{children:[(0,j.jsx)(c,{children:`Add a machine`}),(0,j.jsx)(g,{className:`text-destructive-text`,children:`Couldn’t check whether machines can reach this server.`})]}),t[1]=e):e=t[1];let r;return t[2]===n.onRetry?r=t[3]:(r=(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:n.onRetry,children:`Try again`})})]}),t[2]=n.onRetry,t[3]=r),r}let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsxs)(d,{children:[(0,j.jsx)(c,{children:`Set up machine access`}),(0,j.jsx)(g,{children:`A new machine has to reach this server over the network. Choose the address it should use.`})]}),t[4]=i):i=t[4];let a;return t[5]===r?a=t[6]:(a=(0,j.jsxs)(j.Fragment,{children:[i,r]}),t[5]=r,t[6]=a),a}function q({serverMachineName:e,onOpenChange:t}){let r=(0,A.useRef)(null),i=(0,A.useRef)(null),a=(0,A.useRef)(new Set),o=(0,A.useRef)(0),[c,l]=(0,A.useState)(null),[u,d]=(0,A.useState)(null);(0,A.useEffect)(()=>()=>{o.current+=1,r.current?.abort(),i.current=null;for(let e of a.current)s.hosts.delete({hostId:e}).catch(()=>void 0);a.current.clear()},[]);let f=n({meta:{showErrorToast:!1},mutationFn:async e=>{let t=o.current;if(e.replaceLaunch){r.current?.abort(),r.current=null;let e=[...a.current];a.current.clear(),await Promise.all(e.map(e=>s.hosts.delete({hostId:e}))),i.current=null}l(null);let n=new AbortController;r.current=n,i.current??=w();try{let e=await s.hosts.experimental_create({key:i.current,machineProviderId:H,inputs:null,wait:!1,signal:n.signal});if(a.current.add(e.id),t!==o.current)throw a.current.delete(e.id),await s.hosts.delete({hostId:e.id}),Error(`Machine setup closed`);let r=null;for(;e.lifecycle.phase===`creating`;){n.signal.throwIfAborted();let t=await s.hosts.experimental_getEnrollmentCommand({hostId:e.id,signal:n.signal});if(t!==null)r=t,l({value:t.command,windowsValue:t.windowsCommand,expiresAt:t.expiresAt,unavailable:!1});else if(r!==null){let e=r;l(t=>t?.unavailable?t:{value:e.command,windowsValue:e.windowsCommand,expiresAt:e.expiresAt,unavailable:!0})}await new Promise(e=>setTimeout(e,1e3)),n.signal.throwIfAborted(),e=await s.hosts.get({hostId:e.id,signal:n.signal})}if(i.current=null,a.current.delete(e.id),e.lifecycle.phase!==`active`)throw Error(e.lifecycle.message??`Machine setup cancelled`);return e}finally{r.current===n&&(r.current=null)}},onSuccess:e=>{i.current=null,d(e)}}),p=f.mutate;return(0,A.useEffect)(()=>{p({replaceLaunch:!1})},[p]),(0,j.jsx)(J,{command:c,connectedHost:u,serverMachineName:e,errorMessage:f.isError?b({error:f.error,fallbackMessage:`Couldn't prepare an enrollment command.`}):null,onRetry:()=>f.mutate({replaceLaunch:!1}),onRegenerate:()=>f.mutate({replaceLaunch:!0}),onOpenMachine:()=>t(!1)})}function J(e){let n=(0,k.c)(24),{command:r,connectedHost:i,serverMachineName:a,errorMessage:o,onRetry:s,onRegenerate:l,onOpenMachine:u}=e,f;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,j.jsx)(c,{children:`Add a machine`}),n[0]=f):f=n[0];let p=o===null?void 0:`text-destructive-text`,_=o??`Run this command on the machine you want to add. It installs Moonlet and keeps the machine connected to this server.`,v;n[1]!==p||n[2]!==_?(v=(0,j.jsxs)(d,{children:[f,(0,j.jsx)(g,{className:p,children:_})]}),n[1]=p,n[2]=_,n[3]=v):v=n[3];let b;n[4]!==o||n[5]!==s?(b=o===null?null:(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:s,children:`Try again`})}),n[4]=o,n[5]=s,n[6]=b):b=n[6];let S;n[7]!==r||n[8]!==l?(S=r===null?null:(0,j.jsx)(Z,{command:r.value,windowsCommand:r.windowsValue,expiresAt:r.expiresAt,unavailable:r.unavailable,onRegenerate:l},r.value),n[7]=r,n[8]=l,n[9]=S):S=n[9];let C;n[10]!==r||n[11]!==i||n[12]!==o||n[13]!==u?(C=o===null?(0,j.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:i===null?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(h,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:r===null?`Preparing an enrollment command…`:`Waiting for the machine to connect…`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(m,{connected:!0}),(0,j.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[i.name,` connected`]}),(0,j.jsx)(y,{asChild:!0,size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,children:(0,j.jsxs)(t,{to:x(i.id),onClick:u,children:[`Open machine`,(0,j.jsx)(h,{name:`ArrowRight`})]})})]})}):null,n[10]=r,n[11]=i,n[12]=o,n[13]=u,n[14]=C):C=n[14];let w;n[15]!==o||n[16]!==a?(w=o===null?(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:G(a)}):null,n[15]=o,n[16]=a,n[17]=w):w=n[17];let T;return n[18]!==v||n[19]!==b||n[20]!==S||n[21]!==C||n[22]!==w?(T=(0,j.jsxs)(j.Fragment,{children:[v,b,S,C,w]}),n[18]=v,n[19]=b,n[20]=S,n[21]=C,n[22]=w,n[23]=T):T=n[23],T}function Y(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}var X=[{id:`posix`,label:`macOS or Linux`},{id:`windows`,label:`Windows`}];function Z(e){let t=(0,k.c)(34),{command:n,windowsCommand:r,expiresAt:i,unavailable:a,onRegenerate:o}=e,s=a===void 0?!1:a,[c,l]=(0,A.useState)(`posix`),d=c===`windows`?r:n,f;t[0]===d?f=t[1]:(f={text:d},t[0]=d,t[1]=f);let{copied:p,copy:m}=u(f),h;t[2]===i?h=t[3]:(h=()=>i-Date.now(),t[2]=i,t[3]=h);let[g,_]=(0,A.useState)(h),v,b;t[4]===i?(v=t[5],b=t[6]):(v=()=>{let e=setInterval(()=>_(i-Date.now()),1e3);return()=>clearInterval(e)},b=[i],t[4]=i,t[5]=v,t[6]=b),(0,A.useEffect)(v,b);let x=g<=0,S;t[7]===c?S=t[8]:(S=X.map(e=>(0,j.jsx)(y,{type:`button`,size:`sm`,variant:c===e.id?`secondary`:`ghost`,"aria-pressed":c===e.id,className:`h-6 px-2 text-xs`,onClick:()=>l(e.id),children:e.label},e.id)),t[7]=c,t[8]=S);let C;t[9]===c?C=t[10]:(C=c===`windows`?(0,j.jsx)(`span`,{className:`ml-auto text-xs text-subtle-foreground`,children:`Run in PowerShell`}):null,t[9]=c,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,j.jsxs)(`div`,{role:`group`,"aria-label":`Machine operating system`,className:`flex items-center gap-1 border-b border-border px-2 py-1.5`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T;t[14]===d?T=t[15]:(T=(0,j.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all p-3 font-mono text-xs text-foreground`,children:d}),t[14]=d,t[15]=T);let E;t[16]!==x||t[17]!==o||t[18]!==g||t[19]!==s?(E=s?(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command used`}):x?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command expired`}),(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 px-2 text-xs`,onClick:o,children:`Generate a new command`})]}):(0,j.jsxs)(`span`,{role:`status`,className:`text-xs tabular-nums text-subtle-foreground`,children:[`Command expires in `,Y(g)]}),t[16]=x,t[17]=o,t[18]=g,t[19]=s,t[20]=E):E=t[20];let D=x||s,O;t[21]===m?O=t[22]:(O=()=>void m(),t[21]=m,t[22]=O);let M=p?`Copied`:`Copy`,N;t[23]!==D||t[24]!==O||t[25]!==M?(N=(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`outline`,className:`ml-auto h-7 px-2.5 text-xs`,disabled:D,onClick:O,children:M}),t[23]=D,t[24]=O,t[25]=M,t[26]=N):N=t[26];let P;t[27]!==E||t[28]!==N?(P=(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-border px-3 py-2`,children:[E,N]}),t[27]=E,t[28]=N,t[29]=P):P=t[29];let F;return t[30]!==P||t[31]!==w||t[32]!==T?(F=(0,j.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border bg-muted/30`,children:[w,T,P]}),t[30]=P,t[31]=w,t[32]=T,t[33]=F):F=t[33],F}export{Z as n,P as r,U as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,ni as n}from"./boot-vendor-BBLG7GwQ.js";import{lo as r}from"./index-BzbTy_RW.js";import{t as i}from"./shortcut-pill-BZKMqh1Z.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(3),{shortcut:n,className:s}=e;if(!r()||!n)return null;let c;return t[0]!==s||t[1]!==n?(c=(0,o.jsx)(i,{shortcut:n,className:s}),t[0]=s,t[1]=n,t[2]=c):c=t[2],c}export{s as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n}from"./boot-vendor-BBLG7GwQ.js";import{Bn as r,nh as i}from"./index-BzbTy_RW.js";import{t as a}from"./useLocalOpenTargets-CH6aon29.js";import{t as o}from"./useResolvedLiveFileTarget-DyRrMwgB.js";var s=t(),c=e(n(),1);function l(e){let t=(0,s.c)(20),{intent:n,onSettled:l}=e,u=(0,c.useRef)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={enabled:!0},t[0]=d):d=t[0];let f=o(n.target,d),p=f.status===`available`,m;t[1]!==f.openContext||t[2]!==f.status?(m=f.status===`available`?{openContext:f.openContext}:{},t[1]=f.openContext,t[2]=f.status,t[3]=m):m=t[3];let h;t[4]!==p||t[5]!==m?(h={enabled:p,...m},t[4]=p,t[5]=m,t[6]=h):h=t[6];let{isLoading:g,openPathInPreferredFileTarget:_}=a(h),v;t[7]!==g||t[8]!==n.location||t[9]!==l||t[10]!==_||t[11]!==f.absolutePath||t[12]!==f.status?(v=()=>{if(u.current||f.status===`loading`||g)return;if(u.current=!0,l(),f.status===`unavailable`){i.error(`Failed to open file externally`,{description:`The file target is not available on its declared host.`});return}let e=r(n.location);_({columnNumber:e.columnNumber,lineNumber:e.lineNumber,path:f.absolutePath})},t[7]=g,t[8]=n.location,t[9]=l,t[10]=_,t[11]=f.absolutePath,t[12]=f.status,t[13]=v):v=t[13];let y;return t[14]!==g||t[15]!==n.location||t[16]!==l||t[17]!==_||t[18]!==f?(y=[n.location,g,_,l,f],t[14]=g,t[15]=n.location,t[16]=l,t[17]=_,t[18]=f,t[19]=y):y=t[19],(0,c.useEffect)(v,y),null}export{l as AppFileExternalNavigationDispatcher};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r}from"./boot-vendor-BBLG7GwQ.js";import{B as i,ap as a,ha as o,rh as s}from"./index-BzbTy_RW.js";import{r as c,t as l}from"./dist-Ddjtc621.js";var u=t(),d=e(n(),1),f=e(r(),1),p={top:`calc(env(safe-area-inset-top) + var(--bb-app-chrome-row-height) + 16px)`},m=[`top`,`left`,`right`];function h(){let e=(0,u.c)(8),t=i(),n=a(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[0]=r):r=e[0],(0,d.useEffect)(g,r);let s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s={zIndex:o.toast},e[1]=s):s=e[1];let c=n?`top-center`:`bottom-right`,h=n?p:void 0,_=n?p:void 0,v=n?m:void 0,y;return e[2]!==c||e[3]!==h||e[4]!==_||e[5]!==v||e[6]!==t?(y=(0,f.jsx)(l,{theme:t,style:s,position:c,offset:h,mobileOffset:_,swipeDirections:v}),e[2]=c,e[3]=h,e[4]=_,e[5]=v,e[6]=t,e[7]=y):y=e[7],y}function g(){s(c)}export{h as AppToasterView};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r}from"./boot-vendor-BBLG7GwQ.js";import{B as i,L as a,ph as ee}from"./index-BzbTy_RW.js";import{t as o}from"./code-loading-skeletons--jaZzV7b.js";import{n as s,t as c}from"./pierre-strict-mode-recovery-BTrtp25x.js";import{t as l}from"./FileDiff-D_tnyCPg.js";import{a as u,n as te,r as d,t as f}from"./git-diff-patch-text-BU3vRZ1H.js";import{t as p}from"./PierreLineSelectionActions-Cw9NdOi7.js";import{i as m}from"./pierre-worker-pool-gate-DShqIH_H.js";var h=t(),g=e(n(),1),_=e(r(),1),v={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},y=30;function b(e){let t=(0,h.c)(47),{file:n,patchText:r,fullFileContents:b,view:x,overflow:S,showLineNumbers:C,className:w,onSelectionAddToChat:T}=e,E=b?.old.path,D=b?.old.content,O=b?.new.path,k=b?.new.content,A;bb0:{if(E===void 0||D===void 0||O===void 0||k===void 0){A=n;break bb0}let e;t[0]!==n||t[1]!==k||t[2]!==O||t[3]!==D||t[4]!==E||t[5]!==r?(e=u({fileDiff:n,oldFile:{name:E,contents:D},newFile:{name:O,contents:k},patchText:r??d(n)}),t[0]=n,t[1]=k,t[2]=O,t[3]=D,t[4]=E,t[5]=r,t[6]=e):e=t[6],A=e}let j=A,M=j!==n&&j.isPartial===!1?y:void 0,N=(0,g.useRef)(null),P=a(),F=i(),I;t[7]!==j||t[8]!==x?(I=e=>te({displayStyle:x,fileDiff:j,range:e}),t[7]=j,t[8]=x,t[9]=I):I=t[9];let L=I,R;t[10]===j?R=t[11]:(R=e=>{let{containerElement:t}=e;return f({containerElement:t,fileDiff:j})},t[10]=j,t[11]=R);let z=R,B=T!==void 0,V;t[12]!==z||t[13]!==L||t[14]!==T||t[15]!==B?(V={buildFallbackSelectionText:z,buildSelectionText:L,containerRef:N,enabled:B,onSelectionAddToChat:T},t[12]=z,t[13]=L,t[14]=T,t[15]=B,t[16]=V):V=t[16];let H=p(V),U=!C,W;t[17]===M?W=t[18]:(W=M===void 0?{}:{expansionLineCount:M},t[17]=M,t[18]=W);let G=T!==void 0,K=T!==void 0,q=T===void 0?`disabled`:`number`,J=T===void 0?void 0:H.onGutterUtilityClick,Y;t[19]!==P||t[20]!==H.onLineSelectionChange||t[21]!==H.onLineSelectionEnd||t[22]!==H.onLineSelectionStart||t[23]!==S||t[24]!==q||t[25]!==J||t[26]!==U||t[27]!==W||t[28]!==G||t[29]!==K||t[30]!==F||t[31]!==x?(Y={diffStyle:x,overflow:S,disableLineNumbers:U,disableFileHeader:!0,...W,themeType:F,theme:P,enableGutterUtility:G,enableLineSelection:K,lineHoverHighlight:q,onGutterUtilityClick:J,onLineSelectionChange:H.onLineSelectionChange,onLineSelectionEnd:H.onLineSelectionEnd,onLineSelectionStart:H.onLineSelectionStart},t[19]=P,t[20]=H.onLineSelectionChange,t[21]=H.onLineSelectionEnd,t[22]=H.onLineSelectionStart,t[23]=S,t[24]=q,t[25]=J,t[26]=U,t[27]=W,t[28]=G,t[29]=K,t[30]=F,t[31]=x,t[32]=Y):Y=t[32];let X=c(Y);if(!m()){let e;return t[33]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(o,{}),t[33]=e):e=t[33],e}let Z;t[34]===w?Z=t[35]:(Z=ee(`overflow-x-auto`,w),t[34]=w,t[35]=Z);let Q;t[36]!==H.selectedRange||t[37]!==X||t[38]!==j?(Q=(0,_.jsx)(`div`,{className:`w-full max-w-full`,style:v,children:(0,_.jsx)(s,{children:(0,_.jsx)(l,{fileDiff:j,options:X,selectedLines:H.selectedRange})})}),t[36]=H.selectedRange,t[37]=X,t[38]=j,t[39]=Q):Q=t[39];let $;return t[40]!==H.menu||t[41]!==H.onPointerDownCapture||t[42]!==H.onPointerMoveCapture||t[43]!==H.onPointerUpCapture||t[44]!==Z||t[45]!==Q?($=(0,_.jsxs)(`div`,{ref:N,className:Z,onPointerDownCapture:H.onPointerDownCapture,onPointerMoveCapture:H.onPointerMoveCapture,onPointerUpCapture:H.onPointerUpCapture,children:[Q,H.menu]}),t[40]=H.menu,t[41]=H.onPointerDownCapture,t[42]=H.onPointerMoveCapture,t[43]=H.onPointerUpCapture,t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}export{b as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BbDiff-CP4hFhvm.js","assets/rolldown-runtime-BM3Ffeng.js","assets/index-BzbTy_RW.js","assets/boot-vendor-BBLG7GwQ.js","assets/index-DOPe_Oxb.css","assets/code-loading-skeletons--jaZzV7b.js","assets/PierreLineSelectionActions-Cw9NdOi7.js","assets/git-diff-patch-text-BU3vRZ1H.js","assets/dist-D_XVvXrH.js","assets/ccount-DeutX-gO.js","assets/lib-BlhQaCll.js","assets/space-separated-tokens-yqTL2Lfu.js","assets/lib-BvD6d5X8.js","assets/zwitch-D6h6J3PA.js","assets/TimelineSelectionMenu-C7YFrgTN.js","assets/pierre-strict-mode-recovery-BTrtp25x.js","assets/pierre-worker-pool-gate-DShqIH_H.js","assets/FileDiff-D_tnyCPg.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ur as t,ni as n}from"./boot-vendor-BBLG7GwQ.js";import{dp as r}from"./index-BzbTy_RW.js";import{t as i}from"./code-loading-skeletons--jaZzV7b.js";var a=e(n(),1),o=r({id:`bb-diff`,load:()=>t(()=>import(`./BbDiff-CP4hFhvm.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),loading:()=>(0,a.jsx)(i,{}),tier:`intent`});export{o as t};
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r}from"./boot-vendor-BBLG7GwQ.js";import{B as i,L as a,lh as o,ph as s}from"./index-BzbTy_RW.js";import{n as c}from"./code-loading-skeletons--jaZzV7b.js";import{i as l,n as ee,t as te}from"./pierre-strict-mode-recovery-BTrtp25x.js";import{a as u}from"./dist-D_XVvXrH.js";import{t as ne}from"./File-BIiTTk6g.js";import{i as d}from"./git-diff-patch-text-BU3vRZ1H.js";import{t as re}from"./PierreLineSelectionActions-Cw9NdOi7.js";import{i as ie,n as ae}from"./pierre-worker-pool-gate-DShqIH_H.js";import{n as oe}from"./source-code-budget-8FZFTU2T.js";var se=t(),f=e(n(),1),p=e(r(),1),m=18,h=16,ce={"--diffs-font-size":`12px`,"--diffs-line-height":`${m}px`,"--diffs-gap-block":`${h}px`},le={hunkLineCount:50,lineHeight:m,diffHeaderHeight:0,spacing:h};function g(e){return[e,...d(e)]}function ue(e){for(let t of g(e)){let e=t.querySelectorAll(`[data-bb-source-code-target-line]`);for(let t of e)t.removeAttribute(`data-bb-source-code-target-line`),t.removeAttribute(`data-selected-line`)}}function de(e,t){let n=g(e);for(let e of n){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement&&e.dataset.lineIndex!==void 0)return e}for(let e of n){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement)return e}return null}function _(e){return e.querySelector(`[data-bb-source-code-viewport]`)}function fe(e,t){let n=_(e);if(n===null)return;let r=n.getBoundingClientRect(),i=r.height/2,a=v(e);if(a===null){let e=h+(t-1)*m;n.scrollTop=Math.max(0,e-i);return}let{firstLineNumber:o,firstTop:s,lastLineNumber:c,lastBottom:l}=a;if(t>c){let e=l-r.top+(t-c-1)*m;n.scrollTop+=Math.max(0,e-i)}else if(t<o){let e=r.top-s+(o-t)*m;n.scrollTop=Math.max(0,n.scrollTop-e-i)}}function v(e){let t=null;for(let n of g(e))for(let e of n.querySelectorAll(`[data-line][data-line-index]`)){let n=Number(e.dataset.line);if(!Number.isFinite(n))continue;let r=e.getBoundingClientRect();if(t===null){t={firstLineNumber:n,firstTop:r.top,lastLineNumber:n,lastBottom:r.bottom};continue}n<t.firstLineNumber&&(t.firstLineNumber=n,t.firstTop=r.top),n>t.lastLineNumber&&(t.lastLineNumber=n,t.lastBottom=r.bottom)}return t}function pe(e,t){let n=_(e);if(n===null)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.top+r.height/2,o=i.top+i.height/2;n.scrollTop+=a-o}function y(e,t){return e===t?String(e):`${e}-${t}`}function me({contents:e,path:t,range:n}){let r=Math.max(1,Math.min(n.start,n.end)),i=Math.max(r,Math.max(n.start,n.end)),a=e.split(/\r\n|\n|\r/).slice(r-1,i);if(a.length===0)return null;let o=a.join(`
2
+ `).trimEnd();return o.trim().length===0?null:`${t}:${y(r,i)}\n${o}`}function b(e){let t=(0,se.c)(74),{content:n,path:r,cacheKey:o,overflow:l,highlightedLines:u,className:d,scrollToHighlightedLines:m,onSelectionAddToChat:h}=e,g=m===void 0?!1:m,v=o??r,y;t[0]!==n||t[1]!==v||t[2]!==r?(y={name:r,contents:n,cacheKey:v},t[0]=n,t[1]=v,t[2]=r,t[3]=y):y=t[3];let b=y,x=i(),ye=a(),S=(0,f.useRef)(null),be=ie(),C=ae(),xe=(0,f.useRef)(null),[Se,Ce]=(0,f.useState)(null),[,w]=(0,f.useState)(0),T=v,E;t[4]===n?E=t[5]:(E=oe(n),t[4]=n,t[5]=E);let D=E,[we,Te]=(0,f.useState)(null),O;t[6]!==n||t[7]!==r?(O=e=>me({contents:n,path:r,range:e}),t[6]=n,t[7]=r,t[8]=O):O=t[8];let k=O,A=h!==void 0,j;t[9]!==k||t[10]!==h||t[11]!==A?(j={buildSelectionText:k,containerRef:S,enabled:A,onSelectionAddToChat:h},t[9]=k,t[10]=h,t[11]=A,t[12]=j):j=t[12];let M=re(j),N=h!==void 0,Ee=u!==null||h!==void 0,P=h===void 0?`disabled`:`number`,De=h===void 0?void 0:M.onGutterUtilityClick,F;t[13]!==ye||t[14]!==M.onLineSelectionChange||t[15]!==M.onLineSelectionEnd||t[16]!==M.onLineSelectionStart||t[17]!==l||t[18]!==x||t[19]!==De||t[20]!==N||t[21]!==Ee||t[22]!==P?(F={themeType:x,theme:ye,overflow:l,disableFileHeader:!0,enableGutterUtility:N,enableLineSelection:Ee,lineHoverHighlight:P,onGutterUtilityClick:De,onLineSelectionChange:M.onLineSelectionChange,onLineSelectionEnd:M.onLineSelectionEnd,onLineSelectionStart:M.onLineSelectionStart},t[13]=ye,t[14]=M.onLineSelectionChange,t[15]=M.onLineSelectionEnd,t[16]=M.onLineSelectionStart,t[17]=l,t[18]=x,t[19]=De,t[20]=N,t[21]=Ee,t[22]=P,t[23]=F):F=t[23];let Oe=te(F),ke;bb0:{if(M.selectedRange!==null){ke=M.selectedRange;break bb0}let e;t[24]===u?e=t[25]:(e=u===null?null:{start:u.start,end:u.end},t[24]=u,t[25]=e),ke=e}let I=ke,L=g?I?.start??null:null,R=D===null||we===T||L!==null&&L>D.renderedLineCount,Ae;bb1:{if(R||D===null){Ae=b;break bb1}let e=`${v}:head`,n;t[26]!==b||t[27]!==e||t[28]!==D.contents?(n={...b,cacheKey:e,contents:D.contents},t[26]=b,t[27]=e,t[28]=D.contents,t[29]=n):n=t[29],Ae=n}let z=Ae,B=R||D===null?v:`${v}:head`,je=(0,f.useRef)(null),V;t[30]===T?V=t[31]:(V=()=>{je.current=(S.current===null?null:_(S.current))?.scrollTop??null,Te(T)},t[30]=T,t[31]=V);let Me=V,H;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>{let e=je.current;if(e===null)return;je.current=null;let t=S.current===null?null:_(S.current);if(t===null)return;t.scrollTop=e;let n=window.requestAnimationFrame(()=>{t.scrollTop=e});return()=>window.cancelAnimationFrame(n)},t[32]=H):H=t[32];let U;t[33]===B?U=t[34]:(U=[B],t[33]=B,t[34]=U),(0,f.useLayoutEffect)(H,U);let W;t[35]!==w||t[36]!==C?(W=()=>{if(!C){Ce(null);return}return xe.current=null,C.subscribeToStatChanges(e=>{Ce(e);let t=[e.managerState,e.workersFailed,e.busyWorkers,e.queuedTasks,e.activeTasks,e.fileCacheSize].join(`:`);xe.current!==t&&(xe.current=t,w(he))})},t[35]=w,t[36]=C,t[37]=W):W=t[37];let G;t[38]!==b.contents||t[39]!==b.name||t[40]!==C?(G=[b.contents,b.name,C],t[38]=b.contents,t[39]=b.name,t[40]=C,t[41]=G):G=t[41],(0,f.useEffect)(W,G);let K=C!==void 0&&Se?.managerState!==`initialized`&&Se?.workersFailed!==!0,Ne=C?.getFileResultCache(z)===void 0?`plain`:`highlighted`,q;t[42]===L?q=t[43]:(q=()=>{let e=S.current,t=null,n=0,r=function(){t=window.requestAnimationFrame(i)};function i(){let e=S.current;if(!e||(ue(e),L===null))return;let t=de(e,L);if(t){t.setAttribute(`data-bb-source-code-target-line`,``),t.setAttribute(`data-selected-line`,`single`),pe(e,t);return}fe(e,L),n+=1,n<ge&&r()}return i(),()=>{e&&ue(e),t!==null&&window.cancelAnimationFrame(t)}},t[42]=L,t[43]=q);let J;if(t[44]!==z.contents||t[45]!==z.name||t[46]!==K||t[47]!==L||t[48]!==Ne?(J=[z.contents,z.name,K,L,Ne],t[44]=z.contents,t[45]=z.name,t[46]=K,t[47]=L,t[48]=Ne,t[49]=J):J=t[49],(0,f.useEffect)(q,J),K||!be){let e;return t[50]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(c,{}),t[50]=e):e=t[50],e}let Y;t[51]===d?Y=t[52]:(Y=s(`flex min-h-0 flex-1 flex-col`,d),t[51]=d,t[52]=Y);let Pe=L??void 0,Fe=Se?.workersFailed===!0,X;t[53]!==Oe||t[54]!==z||t[55]!==B||t[56]!==I||t[57]!==Fe?(X=(0,p.jsx)(ne,{disableWorkerPool:Fe,file:z,metrics:le,options:Oe,selectedLines:I},B),t[53]=Oe,t[54]=z,t[55]=B,t[56]=I,t[57]=Fe,t[58]=X):X=t[58];let Z;t[59]!==Me||t[60]!==R||t[61]!==D?(Z=D!==null&&!R?(0,p.jsx)(ve,{truncation:D,onLoadFullFile:Me}):null,t[59]=Me,t[60]=R,t[61]=D,t[62]=Z):Z=t[62];let Q;t[63]!==X||t[64]!==Z?(Q=(0,p.jsx)(ee,{children:(0,p.jsxs)(_e,{children:[X,Z]})}),t[63]=X,t[64]=Z,t[65]=Q):Q=t[65];let $;return t[66]!==M.menu||t[67]!==M.onPointerDownCapture||t[68]!==M.onPointerMoveCapture||t[69]!==M.onPointerUpCapture||t[70]!==Y||t[71]!==Pe||t[72]!==Q?($=(0,p.jsxs)(`div`,{ref:S,className:Y,style:ce,"data-bb-source-code-line-number":Pe,onPointerDownCapture:M.onPointerDownCapture,onPointerMoveCapture:M.onPointerMoveCapture,onPointerUpCapture:M.onPointerUpCapture,children:[Q,M.menu]}),t[66]=M.menu,t[67]=M.onPointerDownCapture,t[68]=M.onPointerMoveCapture,t[69]=M.onPointerUpCapture,t[70]=Y,t[71]=Pe,t[72]=Q,t[73]=$):$=t[73],$}function he(e){return e+1}var ge=40;function _e(e){let t=(0,se.c)(10),{children:n}=e,[r]=(0,f.useState)(x),i;t[0]===r?i=t[1]:(i=e=>{e===null?r?.cleanUp():r?.setup(e)},t[0]=r,t[1]=i);let a=i,o;t[2]===n?o=t[3]:(o=(0,p.jsx)(`div`,{children:n}),t[2]=n,t[3]=o);let s;t[4]!==o||t[5]!==a?(s=(0,p.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-y-auto`,"data-bb-source-code-viewport":!0,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6];let c;return t[7]!==s||t[8]!==r?(c=(0,p.jsx)(l.Provider,{value:r,children:s}),t[7]=s,t[8]=r,t[9]=c):c=t[9],c}function x(){return typeof window>`u`?void 0:new u}function ve(e){let t=(0,se.c)(12),{truncation:n,onLoadFullFile:r}=e,i;t[0]===n.renderedLineCount?i=t[1]:(i=n.renderedLineCount.toLocaleString(),t[0]=n.renderedLineCount,t[1]=i);let a;t[2]===n.totalLineCount?a=t[3]:(a=n.totalLineCount.toLocaleString(),t[2]=n.totalLineCount,t[3]=a);let s;t[4]!==i||t[5]!==a?(s=(0,p.jsxs)(`span`,{children:[`Showing the first `,i,` of`,` `,a,` lines.`]}),t[4]=i,t[5]=a,t[6]=s):s=t[6];let c;t[7]===r?c=t[8]:(c=(0,p.jsx)(o,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:r,children:`Load full file`}),t[7]=r,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-4 py-3 text-xs text-muted-foreground`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}export{b as default};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cr as t,Et as n,Or as r,St as i,bt as a,dr as o,mi as s,ni as c,t as l,vr as u,yr as d}from"./boot-vendor-BBLG7GwQ.js";import{Cd as f,Hf as p,Kf as m,Ma as h,Mp as g,Mr as _,Oo as v,Ti as y,Uf as b,Uu as x,Z_ as S,ah as C,ap as w,bf as T,bm as E,et as D,gm as O,gr as k,io as A,ka as ee,lh as j,np as M,oo as N,ph as P,po as F,pt as I,vc as L,vr as R,wn as z,yf as B,yr as V}from"./index-BzbTy_RW.js";import{n as H,r as U,t as W}from"./browser-url-DB92wpjL.js";import{r as te}from"./panelChromeClasses-BubpnwAb.js";import{a as G,i as K,n as q,r as ne}from"./launcherRow-DwwC4wsH.js";var J=e(s(),1),Y=r(),re=`bb.thread.browserHistory`,ie=`1`,ae=24,X=o(d({url:t().min(1),title:t().min(1).nullable(),visitedAt:u().int().nonnegative()}).strict()),oe=[],se=x({parse:(e,t)=>{if(e===null)return t;try{let n=X.safeParse(JSON.parse(e));return n.success?n.data:t}catch{return t}},serialize:e=>JSON.stringify(e)});function ce(e){return`${re}-${encodeURIComponent(e.trim())}-${ie}`}var le=n(oe),ue=l(e=>a(ce(e),oe,se,{getOnInit:!0}));function de(e){return e!=null&&e.trim().length>0}function fe(e){let t=(0,Y.c)(10),n;t[0]===e?n=t[1]:(n=de(e)?ue(e):le,t[0]=e,t[1]=n);let[r,a]=i(n),o;t[2]===a?o=t[3]:(o=e=>{let{url:t,title:n}=e;t.length!==0&&a(e=>[{url:t,title:n,visitedAt:Date.now()},...e.filter(e=>e.url!==t)].slice(0,ae))},t[2]=a,t[3]=o);let s=o,c;t[4]===a?c=t[5]:(c=()=>{a(oe)},t[4]=a,t[5]=c);let l=c,u;return t[6]!==l||t[7]!==r||t[8]!==s?(u={entries:r,recordVisit:s,clear:l},t[6]=l,t[7]=r,t[8]=s,t[9]=u):u=t[9],u}var Z=e(c(),1);function pe(e){return e===null?null:`${e.activeMatchOrdinal}/${e.matches}`}function Q(e){let t=(0,Y.c)(9),{icon:n,label:r,disabled:i,onClick:a,shortcut:o}=e,s=o?`${r} (${o.label})`:r,c=o?.ariaKeyshortcuts,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=P(`flex shrink-0 items-center justify-center transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40`,m,D),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,Z.jsx)(C,{name:n,"aria-hidden":!0}),t[1]=n,t[2]=u);let d;return t[3]!==s||t[4]!==i||t[5]!==a||t[6]!==c||t[7]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:a,disabled:i,"aria-label":s,"aria-keyshortcuts":c,className:l,children:u}),t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d}function me(e){let t=(0,Y.c)(36),{inputRef:n,query:r,matches:i,onQueryChange:a,onFindNext:o,onFindPrevious:s,onClose:c,shortcut:l}=e,u;t[0]===i?u=t[1]:(u=pe(i),t[0]=i,t[1]=u);let d=u,f=i!==null&&i.matches>0,p=i!==null&&i.matches===0,m;t[2]!==c||t[3]!==o||t[4]!==s?(m=e=>{if(!e.nativeEvent.isComposing){if(e.key===`Enter`){e.preventDefault(),e.shiftKey?s():o();return}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c())}},t[2]=c,t[3]=o,t[4]=s,t[5]=m):m=t[5];let h=m,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=P(`flex h-9 shrink-0 items-center gap-1 border-b border-border/70 py-1 pl-2 pr-2`,te),t[6]=g):g=t[6];let _;t[7]===a?_=t[8]:(_=e=>a(e.target.value),t[7]=a,t[8]=_);let v=l?`Find in page (${l.label})`:`Find in page`,y=l?.ariaKeyshortcuts,b;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=P(`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground`,M),t[9]=b):b=t[9];let x;t[10]!==h||t[11]!==n||t[12]!==r||t[13]!==_||t[14]!==v||t[15]!==y?(x=(0,Z.jsx)(`input`,{ref:n,type:`text`,value:r,onChange:_,onKeyDown:h,placeholder:`Find in page`,"aria-label":v,"aria-keyshortcuts":y,autoComplete:`off`,spellCheck:!1,maxLength:O,className:b}),t[10]=h,t[11]=n,t[12]=r,t[13]=_,t[14]=v,t[15]=y,t[16]=x):x=t[16];let S;t[17]!==d||t[18]!==p?(S=d===null?null:(0,Z.jsx)(`span`,{"data-testid":`browser-find-match-count`,"aria-live":`polite`,className:P(`shrink-0 tabular-nums`,p?`text-destructive`:`text-muted-foreground`,M),children:d}),t[17]=d,t[18]=p,t[19]=S):S=t[19];let C;t[20]!==x||t[21]!==S?(C=(0,Z.jsxs)(`div`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2 rounded-md border border-border/70 bg-background/70 px-2`,children:[x,S]}),t[20]=x,t[21]=S,t[22]=C):C=t[22];let w=!f,T;t[23]!==s||t[24]!==w?(T=(0,Z.jsx)(Q,{icon:`ChevronUp`,label:`Previous match`,disabled:w,onClick:s}),t[23]=s,t[24]=w,t[25]=T):T=t[25];let E=!f,D;t[26]!==o||t[27]!==E?(D=(0,Z.jsx)(Q,{icon:`ChevronDown`,label:`Next match`,disabled:E,onClick:o}),t[26]=o,t[27]=E,t[28]=D):D=t[28];let k;t[29]===c?k=t[30]:(k=(0,Z.jsx)(Q,{icon:`X`,label:`Close find bar`,onClick:c}),t[29]=c,t[30]=k);let A;return t[31]!==C||t[32]!==T||t[33]!==D||t[34]!==k?(A=(0,Z.jsxs)(`div`,{"data-testid":`browser-find-bar`,role:`search`,"aria-label":`Find in page`,className:g,children:[C,T,D,k]}),t[31]=C,t[32]=T,t[33]=D,t[34]=k,t[35]=A):A=t[35],A}function he(e){let t=(0,Y.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onFocus:r,onBlur:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,J.useRef)(null),o=(0,J.useRef)(!1),s,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{o.current=!0,a.current=null},t=()=>{o.current=!1};return window.addEventListener(`blur`,e),window.addEventListener(`keydown`,t,!0),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`keydown`,t,!0)}},c=[],t[4]=s,t[5]=c):(s=t[4],c=t[5]),(0,J.useEffect)(s,c);let l,u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{a.current=e.button===0&&(o.current||document.activeElement!==e.currentTarget)?{x:e.clientX,y:e.clientY}:null,o.current=!1},u=e=>{let t=a.current;t!==null&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>4&&(a.current=null)},d=e=>{a.current!==null&&(a.current=null,e.preventDefault(),e.currentTarget.select())},t[6]=l,t[7]=u,t[8]=d):(l=t[6],u=t[7],d=t[8]);let f;t[9]===r?f=t[10]:(f=e=>{a.current===null&&!o.current&&e.currentTarget.select(),r?.(e)},t[9]=r,t[10]=f);let p;t[11]===n?p=t[12]:(p=e=>{a.current=null,n?.(e)},t[11]=n,t[12]=p);let m;return t[13]!==i||t[14]!==f||t[15]!==p?(m=(0,Z.jsx)(`input`,{type:`text`,placeholder:`Enter a URL`,autoComplete:`off`,spellCheck:!1,...i,onMouseDown:l,onMouseMove:u,onMouseUp:d,onFocus:f,onBlur:p}),t[13]=i,t[14]=f,t[15]=p,t[16]=m):m=t[16],m}function ge(e){let t=(0,Y.c)(27),{entry:n,now:r,onNavigate:i}=e,a;t[0]===n.url?a=t[1]:(a=W(n.url),t[0]=n.url,t[1]=a);let o=a,s;t[2]===n.title?s=t[3]:(s=n.title?.trim(),t[2]=n.title,t[3]=s);let c=s,l=c&&c.length>0?c:o,u;t[4]!==n.visitedAt||t[5]!==r?(u=ee({timestamp:n.visitedAt,now:r}),t[4]=n.visitedAt,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]!==n.url||t[8]!==i?(f=()=>i(n.url),t[7]=n.url,t[8]=i,t[9]=f):f=t[9];let m=n.url,h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=P(q,`hover:bg-state-hover`),t[10]=h):h=t[10];let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(`span`,{className:ne,children:(0,Z.jsx)(C,{name:`Browser`,className:p,"aria-hidden":!0})}),t[11]=g):g=t[11];let _;t[12]===l?_=t[13]:(_=(0,Z.jsx)(`span`,{className:`truncate text-foreground`,children:l}),t[12]=l,t[13]=_);let v;t[14]!==o||t[15]!==l?(v=l===o?null:(0,Z.jsx)(`span`,{className:`truncate font-mono text-muted-foreground [flex-shrink:9999]`,children:o}),t[14]=o,t[15]=l,t[16]=v):v=t[16];let y;t[17]!==_||t[18]!==v?(y=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[_,v]}),t[17]=_,t[18]=v,t[19]=y):y=t[19];let b;t[20]===d?b=t[21]:(b=(0,Z.jsx)(K,{idle:d,isActive:!1}),t[20]=d,t[21]=b);let x;return t[22]!==n.url||t[23]!==y||t[24]!==b||t[25]!==f?(x=(0,Z.jsxs)(`button`,{type:`button`,onClick:f,title:m,className:h,children:[g,y,b]}),t[22]=n.url,t[23]=y,t[24]=b,t[25]=f,t[26]=x):x=t[26],x}function _e(e){let t=(0,Y.c)(17),{onNavigateInput:n,recent:r,onClearRecent:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=Date.now(),t[0]=a):a=t[0];let o=a;if(r.length===0)return null;let s=r.length,c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=P(`rounded text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,M),t[1]=c):c=t[1];let l;t[2]===i?l=t[3]:(l=(0,Z.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`Clear recently visited`,className:c,children:`Clear`}),t[2]=i,t[3]=l);let u;t[4]!==r.length||t[5]!==l?(u=(0,Z.jsx)(G,{label:`Recently visited`,count:s,action:l}),t[4]=r.length,t[5]=l,t[6]=u):u=t[6];let d;if(t[7]!==n||t[8]!==r){let e;t[10]===n?e=t[11]:(e=e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(ge,{entry:e,now:o,onNavigate:n})},e.url),t[10]=n,t[11]=e),d=r.map(e),t[7]=n,t[8]=r,t[9]=d}else d=t[9];let f;t[12]===d?f=t[13]:(f=(0,Z.jsx)(`ul`,{"aria-label":`Recently visited`,className:`flex flex-col gap-px`,children:d}),t[12]=d,t[13]=f);let p;return t[14]!==u||t[15]!==f?(p=(0,Z.jsx)(`div`,{className:`flex h-full flex-col overflow-y-auto px-4 pb-6 pt-8`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col gap-6`,children:(0,Z.jsxs)(`section`,{children:[u,f]})})}),t[14]=u,t[15]=f,t[16]=p):p=t[16],p}function ve({desktopBrowser:e,pluginId:t,tabId:n}){let r=e?.evaluate,i=e?.onPageMessage;return r===void 0||i===void 0?null:{async evaluate(e,i){let a=await r({tabId:n,expression:e,world:i?.world??`isolated`,channel:t});if(!a.ok)throw Error(a.error);return a.value},onMessage(e){return i(r=>{r.tabId===n&&r.channel===t&&e(r.data)})}}}function ye(e){let t=(0,Y.c)(18),{slot:n,threadId:r,tabId:i,url:a,isCompactViewport:o}=e,s;t[0]!==n.pluginId||t[1]!==i?(s=ve({desktopBrowser:T(),pluginId:n.pluginId,tabId:i}),t[0]=n.pluginId,t[1]=i,t[2]=s):s=t[2];let c=s,l=n.component,u=`${r}/${i}`,d;t[3]!==l||t[4]!==o||t[5]!==c||t[6]!==i||t[7]!==r||t[8]!==a?(d=(0,Z.jsx)(l,{threadId:r,tabId:i,url:a,isCompactViewport:o,experimental_page:c}),t[3]=l,t[4]=o,t[5]=c,t[6]=i,t[7]=r,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==n.title||t[11]!==d?(f=(0,Z.jsx)(`span`,{role:`group`,"aria-label":n.title,className:`flex shrink-0 items-center`,children:d}),t[10]=n.title,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==n.id||t[14]!==n.pluginId||t[15]!==u||t[16]!==f?(p=(0,Z.jsx)(_,{pluginId:n.pluginId,slotKind:`browserToolbarAction`,slotId:n.id,instanceId:u,crashFallback:null,children:f}),t[13]=n.id,t[14]=n.pluginId,t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function be(e){let t=(0,Y.c)(11),{threadId:n,tabId:r,url:i,isCompactViewport:a}=e,{browserToolbarActions:o}=g();if(o.length===0)return null;let s;if(t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i){let e;t[6]!==a||t[7]!==r||t[8]!==n||t[9]!==i?(e=e=>(0,Z.jsx)(ye,{slot:e,threadId:n,tabId:r,url:i,isCompactViewport:a},`${e.pluginId}/${e.id}/${e.generation}/${n}/${r}`),t[6]=a,t[7]=r,t[8]=n,t[9]=i,t[10]=e):e=t[10],s=o.map(e),t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=s}else s=t[5];return s}var xe={x:0,y:0,width:0,height:0};function Se(e){return{x:Math.round(e.left),y:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)}}function Ce(){return{width:window.innerWidth,height:window.innerHeight}}function we(e){return E({bounds:Se(e.element.getBoundingClientRect()),viewport:Ce()})}function Te(e){return e===`flex-grow`||e===`flex-basis`}function Ee(e){return e.a.x===e.b.x&&e.a.y===e.b.y&&e.a.width===e.b.width&&e.a.height===e.b.height}function De(e){return y(e.url)?`Server not reachable`:e.errorText.includes(`ERR_BLOCKED_BY_CLIENT`)?`Page blocked`:`Page unavailable`}function Oe(e){let t=(0,Y.c)(48),{addressDraft:n,isEditing:r,state:i,currentUrl:a,addressInputRef:o,onAddressChange:s,onAddressFocus:c,onAddressBlur:l,onAddressKeyDown:u,onSubmit:d,onBack:f,onForward:p,onReloadOrStop:m,onOpenExternal:h,locationShortcut:g,reloadShortcut:_,pluginActions:v}=e,y=i?.isLoading??!1,x;t[0]===a?x=t[1]:(x=H(a),t[0]=a,t[1]=x);let S=x,w=r?n:a,T,E;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=P(`relative h-11 shrink-0 overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring max-md:pointer-coarse:h-[52px]`,te),E=P(`absolute inset-x-0 top-0 flex h-11 translate-y-0 items-center gap-1 py-1.5 pl-2 pr-4 opacity-100 max-md:pointer-coarse:h-[52px]`),t[2]=T,t[3]=E):(T=t[2],E=t[3]);let D=!(i?.canGoBack??!1),O;t[4]!==f||t[5]!==D?(O=(0,Z.jsx)(Q,{icon:`ChevronLeft`,label:`Go back`,disabled:D,onClick:f}),t[4]=f,t[5]=D,t[6]=O):O=t[6];let k=!(i?.canGoForward??!1),A;t[7]!==p||t[8]!==k?(A=(0,Z.jsx)(Q,{icon:`ChevronRight`,label:`Go forward`,disabled:k,onClick:p}),t[7]=p,t[8]=k,t[9]=A):A=t[9];let ee=y?`X`:`RotateCcw`,j=y?`Stop loading`:`Reload`,N=y?null:_,F;t[10]!==m||t[11]!==N||t[12]!==ee||t[13]!==j?(F=(0,Z.jsx)(Q,{icon:ee,label:j,shortcut:N,onClick:m}),t[10]=m,t[11]=N,t[12]=ee,t[13]=j,t[14]=F):F=t[14];let I;t[15]===S?I=t[16]:(I=S===`secure`?(0,Z.jsx)(C,{name:`Lock`,className:P(b,`text-success`),"aria-label":`Secure connection`}):S===`insecure`?(0,Z.jsx)(C,{name:`AlertTriangle`,className:P(b,`text-warning`),"aria-label":`Connection not secure`}):(0,Z.jsx)(C,{name:`Search`,className:P(b,`text-muted-foreground`),"aria-hidden":!0}),t[15]=S,t[16]=I);let L;t[17]===s?L=t[18]:(L=e=>s(e.target.value),t[17]=s,t[18]=L);let R=g?`Address and search bar (${g.label})`:`Address and search bar`,z=g?.ariaKeyshortcuts,B;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=P(`min-w-0 flex-1 bg-transparent font-mono text-foreground outline-none placeholder:font-sans placeholder:text-muted-foreground`,M),t[19]=B):B=t[19];let V;t[20]!==o||t[21]!==w||t[22]!==l||t[23]!==c||t[24]!==u||t[25]!==L||t[26]!==R||t[27]!==z?(V=(0,Z.jsx)(he,{ref:o,value:w,onChange:L,onFocus:c,onBlur:l,onKeyDown:u,"aria-label":R,"aria-keyshortcuts":z,className:B}),t[20]=o,t[21]=w,t[22]=l,t[23]=c,t[24]=u,t[25]=L,t[26]=R,t[27]=z,t[28]=V):V=t[28];let U;t[29]!==I||t[30]!==V?(U=(0,Z.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 max-md:pointer-coarse:h-10`,children:[I,V]}),t[29]=I,t[30]=V,t[31]=U):U=t[31];let W;t[32]!==d||t[33]!==U?(W=(0,Z.jsx)(`form`,{onSubmit:d,className:`min-w-0 flex-1`,children:U}),t[32]=d,t[33]=U,t[34]=W):W=t[34];let G=a.length===0,K;t[35]!==h||t[36]!==G?(K=(0,Z.jsx)(Q,{icon:`ExternalLink`,label:`Open in external browser`,disabled:G,onClick:h}),t[35]=h,t[36]=G,t[37]=K):K=t[37];let q;t[38]===y?q=t[39]:(q=y?(0,Z.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 h-0.5 overflow-hidden`,children:(0,Z.jsx)(`span`,{className:`block h-full w-1/3 animate-pulse bg-ring/70 motion-reduce:animate-none`})}):null,t[38]=y,t[39]=q);let ne;return t[40]!==v||t[41]!==F||t[42]!==W||t[43]!==K||t[44]!==q||t[45]!==O||t[46]!==A?(ne=(0,Z.jsx)(`div`,{role:`region`,"aria-label":`Browser navigation`,tabIndex:-1,className:T,children:(0,Z.jsxs)(`div`,{className:E,children:[O,A,F,W,v,K,q]})}),t[40]=v,t[41]=F,t[42]=W,t[43]=K,t[44]=q,t[45]=O,t[46]=A,t[47]=ne):ne=t[47],ne}function ke(){let e=(0,Y.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,Z.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Z.jsx)(C,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),(0,Z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Browser tabs need the desktop app`}),(0,Z.jsx)(`p`,{className:P(`max-w-xs text-muted-foreground`,M),children:`The in-app web browser runs in the Moonlet desktop app. Open this thread there to browse the web.`})]}),e[0]=t):t=e[0],t}function Ae(e){let t=(0,Y.c)(32),{errorText:n,onOpenExternal:r,onRetry:i,url:a}=e,o;t[0]===a?o=t[1]:(o=W(a),t[0]=a,t[1]=o);let s=o,c;t[2]!==n||t[3]!==a?(c=De({errorText:n,url:a}),t[2]=n,t[3]=a,t[4]=c):c=t[4];let l=c,u;t[5]!==s||t[6]!==a?(u=y(a)?`The browser could not reach ${s||`this local server`}. Start the server, then reload.`:`The browser could not load this page. Try reloading or opening it externally.`,t[5]=s,t[6]=a,t[7]=u):u=t[7];let d=u,f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-surface-recessed text-muted-foreground`,children:(0,Z.jsx)(C,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[8]=f):f=t[8];let p;t[9]===l?p=t[10]:(p=(0,Z.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:l}),t[9]=l,t[10]=p);let m;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=P(`mt-1 text-muted-foreground`,M),t[11]=m):m=t[11];let h;t[12]===d?h=t[13]:(h=(0,Z.jsx)(`p`,{className:m,children:d}),t[12]=d,t[13]=h);let g;t[14]!==p||t[15]!==h?(g=(0,Z.jsxs)(`div`,{children:[p,h]}),t[14]=p,t[15]=h,t[16]=g):g=t[16];let _;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(C,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=_):_=t[17];let v;t[18]===i?v=t[19]:(v=(0,Z.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-state-hover`,children:[_,`Reload`]}),t[18]=i,t[19]=v);let b;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Z.jsx)(C,{name:`ExternalLink`,className:`size-3.5`,"aria-hidden":!0}),t[20]=b):b=t[20];let x;t[21]===r?x=t[22]:(x=(0,Z.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,children:[b,`Open externally`]}),t[21]=r,t[22]=x);let S;t[23]!==v||t[24]!==x?(S=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2 pt-1`,children:[v,x]}),t[23]=v,t[24]=x,t[25]=S):S=t[25];let w;t[26]===n?w=t[27]:(w=(0,Z.jsx)(`p`,{className:`max-w-full truncate pt-1 font-mono text-[11px] text-subtle-foreground`,children:n}),t[26]=n,t[27]=w);let T;return t[28]!==S||t[29]!==w||t[30]!==g?(T=(0,Z.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center`,children:(0,Z.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[f,g,S,w]})}),t[28]=S,t[29]=w,t[30]=g,t[31]=T):T=t[31],T}function je({tabId:e,desktopTarget:t,existingOnly:n,initialUrl:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:o,canHandleBrowserCommands:s=o,onNativeFocus:c,visibilityCoordinator:l,environmentId:u,threadId:d,onUpdate:f,onOpenInNewTab:p}){let m=N(`browser.focusLocation`),h=N(`browser.reload`),g=N(`browser.find`),_=(0,J.useMemo)(()=>T(),[]),y=(0,J.useRef)(null),b=(0,J.useRef)(null),x=(0,J.useRef)(null),C=L(),E=w(),{entries:D,recordVisit:k,clear:ee}=fe(d),[j,M]=(0,J.useState)(null),[P,I]=(0,J.useState)(null);(0,J.useEffect)(()=>{let t=!0,n=!1;I(null);let r=n=>{t&&n.tabId===e&&n.threadId===d&&I(n.control)},i=_?.onControl?.(t=>{t.tabId!==e||t.threadId!==d||(n=!0,r(t))});return _?.getControl?.(e).then(e=>{e!==null&&!n&&r(e)}).catch(()=>void 0),()=>{t=!1,i?.()}},[_,e,d]);let[H,W]=(0,J.useState)(r),[te,G]=(0,J.useState)(r),[K,q]=(0,J.useState)(!1),[ne,Y]=(0,J.useState)(!1),[re,ie]=(0,J.useState)(!1),ae=(0,J.useRef)(!1);ae.current=re;let[X,oe]=(0,J.useState)(``),[se,ce]=(0,J.useState)(null),[le,ue]=(0,J.useState)(null),de=(0,J.useRef)(f),pe=(0,J.useRef)(k);de.current=f,pe.current=k;let Q=(0,J.useRef)(r),he=(0,J.useRef)(n),ge=(0,J.useRef)(t),[ve,ye]=(0,J.useState)(null),Se=ve!==null&&ve.environmentId===u&&ve.tabId===e&&ve.threadId===d,Ce=H.length>0,De=_?.focus!==void 0&&_.onFocus!==void 0&&_.setVisibleWithoutFocus!==void 0,je=j?.errorText??null,Me=je!==null&&Ce,Ne=v(),Pe=(0,J.useRef)(null),Fe=(0,J.useCallback)(()=>{let e=y.current;return e===null?null:we({element:e})},[]),Ie=(0,J.useCallback)(t=>{_!==null&&(Pe.current=t,_.setBounds({tabId:e,bounds:t}))},[_,e]),Le=(0,J.useCallback)(({force:e})=>{let t=Fe();if(t===null)return;let n=Pe.current;!e&&n!==null&&Ee({a:n,b:t})||Ie(t)},[Fe,Ie]),Re=(0,J.useCallback)(()=>{Le({force:!0})},[Le]),$=(0,J.useCallback)(()=>{Le({force:!1})},[Le]),ze=(0,J.useCallback)(()=>{let e=Fe();return Pe.current=e,e??xe},[Fe]);(0,J.useEffect)(()=>{if(_===null)return;let t=ze(),n=Q.current;R({environmentId:u,tabId:e,threadId:d});let r=ge.current,i=he.current===!0&&(r===void 0||!V(e,r));_.attach({tabId:e,threadId:d,...i?{existingOnly:!0}:{},url:n,bounds:t,visible:!1}),ye({environmentId:u,tabId:e,threadId:d});let a=null,o=_.onState(t=>{t.tabId===e&&(a!==null&&(a.url!==t.url||t.isLoading&&!a.isLoading)&&ce(null),a=t,M(t),W(t.url),de.current({tabId:e,url:t.url,title:t.title}),!t.isLoading&&t.url.length>0&&pe.current({url:t.url,title:t.title}))}),s=_.onSnapshot?.(t=>{t.tabId===e&&ue(t.dataUrl)}),c=_.onFindResult?.(t=>{t.tabId===e&&ce({activeMatchOrdinal:t.activeMatchOrdinal,matches:t.matches})});return()=>{o(),s?.(),c?.(),ae.current&&_.stopFindInPage?.({tabId:e,action:`clearSelection`}),l?.release(e)}},[_,u,ze,l,e,d]),(0,J.useEffect)(()=>{let e=y.current;if(e===null||_===null)return;let t=new ResizeObserver(()=>{$()});return t.observe(e),()=>{t.disconnect()}},[_,$]),(0,J.useEffect)(()=>{if(_===null)return;let e=e=>{Te(e.propertyName)&&$()};return window.addEventListener(z,$),window.addEventListener(`resize`,$),document.addEventListener(`transitionend`,e,!0),document.addEventListener(`transitioncancel`,e,!0),()=>{window.removeEventListener(z,$),window.removeEventListener(`resize`,$),document.removeEventListener(`transitionend`,e,!0),document.removeEventListener(`transitioncancel`,e,!0)}},[_,$]);let Be=o&&(s||De)&&Ce&&!Me&&Se&&!Ne;(0,J.useLayoutEffect)(()=>{if(l!==null){if(Be)return l.show(e,Re,{focus:!1}),()=>{l.hide(e)};l.hide(e)}},[l,e,Be,Re]),(0,J.useLayoutEffect)(()=>{if(ne){if(!o||!s||Me||Ne){Y(!1);return}Be&&(Y(!1),_?.focus?.(e))}},[ne,o,s,Me,Ne,Be,_,e]),(0,J.useEffect)(()=>{if(!(_?.onFocus===void 0||c===void 0))return _.onFocus(t=>{t===e&&c()})},[_,c,e]),(0,J.useEffect)(()=>{if(i===null||i.tabId!==e)return;if(C){a?.(i);return}G(H),q(!0),b.current?.focus({preventScroll:!0});let t=requestAnimationFrame(()=>{b.current?.focus({preventScroll:!0}),a?.(i)});return()=>cancelAnimationFrame(t)},[i,H,C,a,e]);let Ve=(0,J.useCallback)(t=>{let n=U(t);n!==null&&(W(n),q(!1),b.current?.blur(),_?.navigate({tabId:e,url:n}),Y(!0))},[_,e]),He=(0,J.useCallback)(e=>{e.preventDefault(),Ve(te)},[te,Ve]),Ue=(0,J.useCallback)(e=>{if(e.nativeEvent.isComposing)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),G(H);let t=e.currentTarget;window.requestAnimationFrame(()=>{document.activeElement===t&&t.select()});return}if(p===null||e.key!==`Enter`||e.shiftKey||e.ctrlKey||!(S(F())?e.metaKey&&!e.altKey:e.altKey&&!e.metaKey))return;e.preventDefault();let t=U(te);t!==null&&(G(H),q(!1),b.current?.blur(),p(t))},[te,H,p]),We=(0,J.useCallback)(()=>{G(H),q(!0)},[H]),Ge=(0,J.useCallback)(()=>{if(j?.isLoading??!1){_?.stop(e);return}_?.reload(e)},[_,j?.isLoading,e]);A(`browser.focusLocation`,(0,J.useCallback)(()=>!s||_===null?!1:(G(H),q(!0),b.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{b.current?.focus({preventScroll:!0}),b.current?.select()}),!0),[s,H,_]),100);let Ke=o&&_!==null&&_.findInPage!==void 0&&Ce,qe=(0,J.useCallback)(t=>{_?.findInPage?.({tabId:e,...t})},[_,e]),Je=(0,J.useCallback)(()=>{_?.stopFindInPage?.({tabId:e,action:`clearSelection`}),ce(null)},[_,e]),Ye=(0,J.useCallback)(()=>{x.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{x.current?.focus({preventScroll:!0}),x.current?.select()})},[]),Xe=(0,J.useCallback)(e=>{let t=e.slice(0,O);if(oe(t),t.length===0){Je();return}qe({text:t,forward:!0,newSession:!0})},[Je,qe]),Ze=(0,J.useCallback)(()=>{X.length!==0&&qe({text:X,forward:!0,newSession:!1})},[X,qe]),Qe=(0,J.useCallback)(()=>{X.length!==0&&qe({text:X,forward:!1,newSession:!1})},[X,qe]),$e=(0,J.useCallback)(()=>{ie(!1),Je()},[Je]);A(`browser.find`,(0,J.useCallback)(()=>Ke?(ie(!0),X.length>0&&qe({text:X,forward:!0,newSession:!0}),Ye(),!0):!1,[Ke,X,Ye,qe]),100),(0,J.useEffect)(()=>{re&&!Ke&&(ie(!1),Je())},[Ke,Je,re]),A(`browser.reload`,()=>!s||_===null||!Ce?!1:(_.reload(e),!0),100);let et=(0,J.useCallback)(()=>{B()?.openExternalUrl(H)},[H]);return _===null?(0,Z.jsx)(ke,{}):(0,Z.jsxs)(`div`,{"data-app-browser":!0,className:`flex h-full min-h-0 flex-col`,children:[(0,Z.jsx)(Oe,{addressDraft:te,isEditing:K,state:j,currentUrl:H,addressInputRef:b,onAddressChange:G,onAddressFocus:We,onAddressBlur:()=>q(!1),onAddressKeyDown:Ue,onSubmit:He,onBack:()=>{_.goBack(e)},onForward:()=>{_.goForward(e)},onReloadOrStop:Ge,onOpenExternal:et,locationShortcut:m,reloadShortcut:h,pluginActions:(0,Z.jsx)(be,{threadId:d,tabId:e,url:H,isCompactViewport:E})}),P===null?null:(0,Z.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-border bg-surface-recessed px-3 py-2 text-xs`,children:[(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[P.controllerLabel,` is controlling this tab`]}),(0,Z.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>_.releaseControl?.(e),children:`Stop`}),(0,Z.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>{_.releaseControl?.(e),_.focus?.(e)},children:`Take over`})]}),re?(0,Z.jsx)(me,{inputRef:x,query:X,matches:se,onQueryChange:Xe,onFindNext:Ze,onFindPrevious:Qe,onClose:$e,shortcut:g}):null,(0,Z.jsxs)(`div`,{ref:y,className:`relative min-h-0 flex-1`,children:[Me?(0,Z.jsx)(Ae,{errorText:je,onOpenExternal:et,onRetry:Ge,url:H}):Ce&&!Ne?null:(0,Z.jsx)(_e,{onNavigateInput:Ve,recent:D,onClearRecent:ee}),Ce&&le!==null?(0,Z.jsx)(`img`,{src:le,alt:``,draggable:!1,className:`absolute inset-0 size-full`}):null]})]})}function Me(e,t){return t===null?null:e.find(e=>e.id===t)??null}var Ne=4,Pe=32,Fe=2e3;function Ie(e){return Math.min(250*2**(e-1),Fe)}function Le(e,t){if(e===void 0)return`open`;if(t.status===`pending`)return`pending`;let n=t.target;return n===null||n.hostId!==e.hostId?`unavailable`:n.instanceId===e.instanceId?`attach`:`check-saved-window`}function Re(e){let t=(0,Y.c)(40),{browserTabs:n,activeBrowserTabId:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,environmentId:o,canShowNativeBrowserView:s,canHandleBrowserCommands:c,onNativeFocus:l,threadId:u,onUpdate:d,onOpenInNewTab:p}=e,m=i===void 0?null:i,h=c===void 0?s:c,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=T(),t[0]=g):g=t[0];let _=g,v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=_===null?null:k(_),t[1]=v):v=t[1];let y=v,b=Me(n,r),x=b?.desktopTarget,S=x?.hostId,C;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>_?.getTarget===void 0?{status:`ready`,target:null}:{status:`pending`},t[2]=C):C=t[2];let[w,E]=(0,J.useState)(C),[D,O]=(0,J.useState)(0),A=x===void 0?null:`${b?.id}:${D}:${x.hostId}:${x.instanceId}:${x.generation}`,[ee,j]=(0,J.useState)(null),M;t[3]!==A||t[4]!==j?(M=()=>{let e=_?.getTarget?.bind(_);if(e===void 0)return;let t=!0,n=0,r,i=()=>{e().catch(ze).then(e=>{if(t){if(e!==null){E({status:`ready`,target:e});return}if(n+=1,n>=Ne&&E({status:`ready`,target:null}),n>=Pe){j(A);return}r=setTimeout(i,Ie(n))}})};return i(),()=>{t=!1,clearTimeout(r)}},t[3]=A,t[4]=j,t[5]=M):M=t[5],(0,J.useEffect)(M,[_,S,x?.instanceId,x?.generation,A]);let N=Le(x,w),P=N===`check-saved-window`?A:null,[F,I]=(0,J.useState)(null),L=x?.instanceId,R;t[6]!==A||t[7]!==L||t[8]!==P||t[9]!==j||t[10]!==S?(R=()=>{if(P===null||S===void 0||L===void 0)return;let e=!0,t=0,n,r=()=>{f.experimental_desktopBrowsers.listInstances({hostId:S}).then(t=>{let{instances:n}=t;e&&I({key:P,status:n.some(e=>e.instanceId===L)?`live`:`gone`})},()=>{if(e){if(t+=1,t>=Ne&&I({key:P,status:`unknown`}),t>=Pe){j(A);return}n=setTimeout(r,Ie(t))}})};return r(),()=>{e=!1,clearTimeout(n)}},t[6]=A,t[7]=L,t[8]=P,t[9]=j,t[10]=S,t[11]=R):R=t[11];let z;if(t[12]!==A||t[13]!==L||t[14]!==P||t[15]!==S?(z=[P,S,L,A],t[12]=A,t[13]=L,t[14]=P,t[15]=S,t[16]=z):z=t[16],(0,J.useEffect)(R,z),b===null)return null;let B=F?.key===P?F.status:null,V=A!==null&&ee===A;if(N===`pending`||N===`check-saved-window`&&B===null){let e;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 bg-sidebar`}),t[17]=e):e=t[17],e}if(N===`unavailable`||N===`check-saved-window`&&B!==`gone`){let e;t[18]!==V||t[19]!==B||t[20]!==O?(e=V||B===`live`?()=>O($):null,t[18]=V,t[19]=B,t[20]=O,t[21]=e):e=t[21];let n=_===null?`desktop-required`:B===`live`?`other-window`:w.status===`ready`&&w.target!==null&&w.target.hostId!==x?.hostId?`other-computer`:V?`unreachable`:`reconnecting`,r;return t[22]!==b.url||t[23]!==n||t[24]!==e?(r=(0,Z.jsx)(Ve,{url:b.url,onRetry:e,reason:n}),t[22]=b.url,t[23]=n,t[24]=e,t[25]=r):r=t[25],r}let H=N===`attach`?!0:void 0,U=m?.tabId===b.id?m:null,W;return t[26]!==b.id||t[27]!==b.url||t[28]!==h||t[29]!==s||t[30]!==o||t[31]!==a||t[32]!==l||t[33]!==p||t[34]!==d||t[35]!==U||t[36]!==H||t[37]!==x||t[38]!==u?(W=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-sidebar`,children:(0,Z.jsx)(je,{tabId:b.id,desktopTarget:x,existingOnly:H,initialUrl:b.url,addressFocusRequest:U,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:s,canHandleBrowserCommands:h,onNativeFocus:l,visibilityCoordinator:y,environmentId:o,threadId:u,onUpdate:d,onOpenInNewTab:p},b.id)}),t[26]=b.id,t[27]=b.url,t[28]=h,t[29]=s,t[30]=o,t[31]=a,t[32]=l,t[33]=p,t[34]=d,t[35]=U,t[36]=H,t[37]=x,t[38]=u,t[39]=W):W=t[39],W}function $(e){return e+1}function ze(){return null}var Be={"desktop-required":{title:`Browser tabs need the desktop app`,body:`This tab is open in the Moonlet desktop app.`},"other-window":{title:`This tab is open in another Moonlet window`,body:`Switch to that window to keep browsing.`},"other-computer":{title:`This tab is open on another computer`,body:`It was opened in Moonlet on a different computer.`},reconnecting:{title:`Reconnecting to this tab`,body:`The tab opens again as soon as Moonlet reconnects.`},unreachable:{title:`Can't reach this tab`,body:`Moonlet couldn't reconnect. Try again in a moment.`}};function Ve(e){let t=(0,Y.c)(24),{url:n,reason:r,onRetry:i}=e,a=Be[r],o;t[0]===n?o=t[1]:(o=URL.canParse(n)?new URL(n):null,t[0]=n,t[1]=o);let s=o,c=s?.protocol===`https:`||s?.protocol===`http:`,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Z.jsx)(C,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[2]=l):l=t[2];let u;t[3]===a.title?u=t[4]:(u=(0,Z.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:a.title}),t[3]=a.title,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=P(`max-w-xs text-muted-foreground`,M),t[5]=d):d=t[5];let f;t[6]===a.body?f=t[7]:(f=(0,Z.jsx)(`p`,{className:d,children:a.body}),t[6]=a.body,t[7]=f);let p;t[8]===n?p=t[9]:(p=n.length>0?(0,Z.jsx)(`p`,{className:P(`max-w-full truncate font-mono text-muted-foreground select-text`,M),title:n,children:n}):null,t[8]=n,t[9]=p);let m;t[10]===i?m=t[11]:(m=i===null?null:(0,Z.jsxs)(j,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,Z.jsx)(C,{name:`RotateCcw`,"aria-hidden":!0}),`Try again`]}),t[10]=i,t[11]=m);let g;t[12]!==c||t[13]!==i||t[14]!==n?(g=n.length>0?(0,Z.jsxs)(Z.Fragment,{children:[c?(0,Z.jsxs)(j,{type:`button`,variant:i===null?`outline`:`ghost`,size:`sm`,onClick:()=>I(n),children:[(0,Z.jsx)(C,{name:`ExternalLink`,"aria-hidden":!0}),`Open in browser`]}):null,(0,Z.jsxs)(j,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{h(n,{successMessage:`Link copied`})},children:[(0,Z.jsx)(C,{name:`Copy`,"aria-hidden":!0}),`Copy link`]})]}):null,t[12]=c,t[13]=i,t[14]=n,t[15]=g):g=t[15];let _;t[16]!==m||t[17]!==g?(_=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[m,g]}),t[16]=m,t[17]=g,t[18]=_):_=t[18];let v;return t[19]!==u||t[20]!==f||t[21]!==p||t[22]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-sidebar px-6 text-center`,children:[l,u,f,p,_]}),t[19]=u,t[20]=f,t[21]=p,t[22]=_,t[23]=v):v=t[23],v}export{Re as BrowserTabDeck};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r,zr as i}from"./boot-vendor-BBLG7GwQ.js";import{$p as a,Mp as o,Ya as s,ap as c,ph as l,tm as u,to as d}from"./index-BzbTy_RW.js";import{i as f,n as p,r as m,t as h}from"./PaletteShell-CPSWuHFl.js";import{n as g}from"./settings-sections-CqqApzMn.js";import{r as _,t as v}from"./settings-nav-CYsQAjKL.js";var y=e(n(),1),b=t();function x(){let e=typeof window>`u`?void 0:window.bbDesktop;return e?.getServerChoices&&e.onServerChoicesChange&&e.selectServer?{list:e.getServerChoices.bind(e),subscribe:e.onServerChoicesChange.bind(e),select:e.selectServer.bind(e)}:null}function ee(){let e=(0,b.c)(7),[t]=(0,y.useState)(x),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0];let[r,i]=(0,y.useState)(n),a,o;e[1]===t?(a=e[2],o=e[3]):(a=()=>{if(t===null)return;let e=!1,n=!1,r=t.subscribe(t=>{n=!0,e||i(t)});return t.list().then(t=>{!e&&!n&&i(t)}).catch(S),()=>{e=!0,r()}},o=[t],e[1]=t,e[2]=a,e[3]=o),(0,y.useEffect)(a,o);let s=t?.select,c;return e[4]!==r||e[5]!==s?(c={choices:r,select:s},e[4]=r,e[5]=s,e[6]=c):c=e[6],c}function S(){}var te=[`Threads`,`Actions`,`Settings`,`Plugins`];function ne(e){return[...e.sections.map(t=>({id:`settings:${t.id}`,bucket:`Settings`,group:`Settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(g(t.id))})),...e.pluginEntries.map(t=>({id:`settings:plugin:${t.id}`,bucket:`Settings`,group:`Plugin settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(a({pluginId:t.id}))}))]}function re(e){return e.panels.map(t=>({id:`plugin-page:${t.pluginId}/${t.id}`,bucket:`Plugins`,group:`Plugin pages`,title:t.title,shortcut:null,run:()=>e.navigate(u({pluginId:t.pluginId,path:t.path}))}))}var C=e(r(),1),ie=d(`thread.search`);function ae(e){let t=(0,b.c)(60),{actions:n,installedPlugins:r,recents:a,query:l,onQueryChange:u,onChoose:d}=e,m=i(),g=c(),x=(0,y.useId)(),S=(0,y.useId)(),[ae,w]=(0,y.useState)(0),T=o(),de=v(T.fileOpeners),E;t[0]!==r||t[1]!==T.settingsSections?(E=_({installedPlugins:r,settingsSections:T.settingsSections}),t[0]=r,t[1]=T.settingsSections,t[2]=E):E=t[2];let fe=E,D;t[3]===m?D=t[4]:(D=e=>void m(e),t[3]=m,t[4]=D);let O;t[5]!==fe||t[6]!==de||t[7]!==D?(O=ne({navigate:D,pluginEntries:fe,sections:de}),t[5]=fe,t[6]=de,t[7]=D,t[8]=O):O=t[8];let k=O,A;t[9]===m?A=t[10]:(A=e=>void m(e),t[9]=m,t[10]=A);let j;t[11]!==T.navPanels||t[12]!==A?(j=re({navigate:A,panels:T.navPanels}),t[11]=T.navPanels,t[12]=A,t[13]=j):j=t[13];let pe=j,{choices:me,select:M}=ee(),N;t[14]!==me||t[15]!==M?(N=M===void 0?[]:me.filter(le).map(e=>({id:`server:${e.id}`,title:`Switch to ${e.name}`,bucket:`Actions`,group:`Servers`,shortcut:null,run:()=>M(e.id)})),t[14]=me,t[15]=M,t[16]=N):N=t[16];let he=N,P;t[17]!==n||t[18]!==pe||t[19]!==he||t[20]!==k?(P=[...n,...k,...pe,...he],t[17]=n,t[18]=pe,t[19]=he,t[20]=k,t[21]=P):P=t[21];let ge=P,F;t[22]===l?F=t[23]:(F=l.startsWith(`>`)?l.slice(1):l,t[22]=l,t[23]=F);let I=F,L;t[24]!==ge||t[25]!==I||t[26]!==a?(L=f({actions:ge,query:I,recentIds:a}),t[24]=ge,t[25]=I,t[26]=a,t[27]=L):L=t[27];let R=L,z;t[28]===I?z=t[29]:(z=I.trim(),t[28]=I,t[29]=z);let B=z===``,V;if(t[30]!==R){let e=te.map(e=>({bucket:e,entries:R.filter(t=>t.action.bucket===e)})).filter(ce);V=e.map((t,n)=>({...t,startIndex:e.slice(0,n).reduce(se,0)})),t[30]=R,t[31]=V}else V=t[31];let H=V,U;t[32]!==B||t[33]!==R||t[34]!==H?(U=B?H.flatMap(oe):R,t[32]=B,t[33]=R,t[34]=H,t[35]=U):U=t[35];let W=U,G=W.length===0?-1:Math.min(ae,W.length-1),K=(0,y.useRef)(null),q=(0,y.useRef)(!1),J;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>{q.current&&(q.current=!1,K.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`}))},t[36]=J):J=t[36];let Y;t[37]===G?Y=t[38]:(Y=[G],t[37]=G,t[38]=Y),(0,y.useEffect)(J,Y);let X;t[39]!==G||t[40]!==d||t[41]!==W?(X=e=>{if(!e.nativeEvent.isComposing&&W.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),q.current=!0,w(e=>e+1>=W.length?0:e+1);return}if(e.key===`ArrowUp`){e.preventDefault(),q.current=!0,w(e=>e<=0?W.length-1:e-1);return}if(e.key===`Home`){e.preventDefault(),q.current=!0,w(0);return}if(e.key===`End`){e.preventDefault(),q.current=!0,w(W.length-1);return}if(e.key===`Enter`){let t=W[G];if(t===void 0)return;e.preventDefault(),d(t.action)}}},t[39]=G,t[40]=d,t[41]=W,t[42]=X):X=t[42];let _e=X,ve=G===-1?void 0:`${S}-${G}`,Z;t[43]===u?Z=t[44]:(Z=e=>{u(e),w(0),K.current!==null&&(K.current.scrollTop=0)},t[43]=u,t[44]=Z);let Q;t[45]!==G||t[46]!==g||t[47]!==B||t[48]!==d||t[49]!==S||t[50]!==H||t[51]!==W?(Q=!B&&W.length===0?(0,C.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching commands`}):B?H.map(e=>{let t=`${S}-${e.bucket.toLowerCase()}-label`;return(0,C.jsxs)(`div`,{role:`group`,"aria-labelledby":t,"data-palette-bucket":e.bucket,children:[(0,C.jsx)(`div`,{id:t,className:h,children:e.bucket}),e.entries.map((t,n)=>{let r=e.startIndex+n;return(0,C.jsx)(ue,{entry:t,id:`${S}-${r}`,isActive:r===G,isDrillIn:t.action.id===ie,showShortcut:!g,onActivate:()=>{w(r)},onSelect:()=>d(t.action)},t.action.id)})]},e.bucket)}):W.map((e,t)=>(0,C.jsx)(ue,{entry:e,id:`${S}-${t}`,isActive:t===G,isDrillIn:e.action.id===ie,showShortcut:!g,onActivate:()=>{w(t)},onSelect:()=>d(e.action)},e.action.id)),t[45]=G,t[46]=g,t[47]=B,t[48]=d,t[49]=S,t[50]=H,t[51]=W,t[52]=Q):Q=t[52];let $;return t[53]!==_e||t[54]!==x||t[55]!==l||t[56]!==ve||t[57]!==Z||t[58]!==Q?($=(0,C.jsx)(p,{activeDescendantId:ve,inputDescription:s.description,inputLabel:s.label,listId:x,listLabel:`Commands`,listRef:K,onInputChange:Z,onInputKeyDown:_e,placeholder:s.placeholder,value:l,children:Q}),t[53]=_e,t[54]=x,t[55]=l,t[56]=ve,t[57]=Z,t[58]=Q,t[59]=$):$=t[59],$}function oe(e){return e.entries}function se(e,t){return e+t.entries.length}function ce(e){return e.entries.length>0}function le(e){return!e.active}function ue(e){let t=(0,b.c)(19),{entry:n,id:r,isActive:i,isDrillIn:a,showShortcut:o,onActivate:s,onSelect:c}=e,u=n.action.group===`Browser`||n.action.id.startsWith(`plugin:`)?n.action.group:null,d=a?`${n.action.title}…`:n.action.title,f=o?n.action.shortcut:null,p=u!==null||f!==null||a,h=a?`drill-in`:`terminal`,g=i&&`bg-state-hover text-foreground`,_;t[0]===g?_=t[1]:(_=l(`flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-left text-sm outline-none`,g),t[0]=g,t[1]=_);let v;t[2]!==n.positions||t[3]!==d?(v=(0,C.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,C.jsx)(w,{title:d,positions:n.positions})}),t[2]=n.positions,t[3]=d,t[4]=v):v=t[4];let y;t[5]!==p||t[6]!==a||t[7]!==u||t[8]!==f?(y=p?(0,C.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[u===null?null:(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:u}),f===null?null:(0,C.jsx)(m,{children:f.label}),a?(0,C.jsx)(`span`,{className:`sr-only`,children:`Opens a search view`}):null]}):null,t[5]=p,t[6]=a,t[7]=u,t[8]=f,t[9]=y):y=t[9];let x;return t[10]!==r||t[11]!==i||t[12]!==s||t[13]!==c||t[14]!==h||t[15]!==_||t[16]!==v||t[17]!==y?(x=(0,C.jsxs)(`div`,{id:r,role:`option`,"aria-selected":i,"data-palette-action-kind":h,className:_,onPointerMove:s,onClick:c,children:[v,y]}),t[10]=r,t[11]=i,t[12]=s,t[13]=c,t[14]=h,t[15]=_,t[16]=v,t[17]=y,t[18]=x):x=t[18],x}function w(e){let t=(0,b.c)(9),{title:n,positions:r}=e;if(r.length===0){let e;return t[0]===n?e=t[1]:(e=(0,C.jsx)(C.Fragment,{children:n}),t[0]=n,t[1]=e),e}let i;t[2]===r?i=t[3]:(i=new Set(r),t[2]=r,t[3]=i);let a=i,o;t[4]===n?o=t[5]:(o=[...n],t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,C.jsx)(C.Fragment,{children:o.map((e,t)=>a.has(t)?(0,C.jsx)(`span`,{className:`font-semibold text-foreground`,children:e},t):(0,C.jsx)(`span`,{children:e},t))}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}export{ae as CommandPaletteBody};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,ni as n}from"./boot-vendor-BBLG7GwQ.js";import{Z as r}from"./index-BzbTy_RW.js";import{r as i}from"./git-diff-patch-text-BU3vRZ1H.js";import{t as a}from"./BbDiffSplit-CXTAgB1k.js";import{a as o,n as s,t as c}from"./code-rendering-DwQWgopj.js";var l=t(),u=e(n(),1),d=`diffRenderer`;function f(e){let t=(0,l.c)(25),{file:n,patchText:f,fullFileContents:p,view:m,overflow:h,showLineNumbers:g,className:_,onSelectionAddToChat:v}=e,y=m===void 0?s:m,b=h===void 0?c:h,x=g===void 0?!0:g,S=o(),C=S.kind===`plugin`,w;t[0]!==n||t[1]!==C||t[2]!==f?(w=C?f??i(n):``,t[0]=n,t[1]=C,t[2]=f,t[3]=w):w=t[3];let T=w,E;t[4]!==_||t[5]!==n||t[6]!==p||t[7]!==v||t[8]!==b||t[9]!==f||t[10]!==x||t[11]!==y?(E=(0,u.jsx)(a,{file:n,patchText:f,fullFileContents:p,view:y,overflow:b,showLineNumbers:x,className:_,onSelectionAddToChat:v}),t[4]=_,t[5]=n,t[6]=p,t[7]=v,t[8]=b,t[9]=f,t[10]=x,t[11]=y,t[12]=E):E=t[12];let D=E,O;t[13]!==_||t[14]!==n.name||t[15]!==p||t[16]!==b||t[17]!==T||t[18]!==x||t[19]!==y?(O=(e,t)=>(0,u.jsx)(`div`,{className:_,children:(0,u.jsx)(e.component,{patch:T,path:n.name,view:y,overflow:b,showLineNumbers:x,experimental_fullFileContents:p,Original:t})}),t[13]=_,t[14]=n.name,t[15]=p,t[16]=b,t[17]=T,t[18]=x,t[19]=y,t[20]=O):O=t[20];let k;return t[21]!==D||t[22]!==S||t[23]!==O?(k=(0,u.jsx)(r,{replacement:S,original:D,slotKind:d,children:O}),t[21]=D,t[22]=S,t[23]=O,t[24]=k):k=t[24],k}export{f as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,ni as n}from"./boot-vendor-BBLG7GwQ.js";import{Bi as r,Bn as i,Ii as a,Kn as o,Li as s,Ma as c,Mp as l,Ri as u,Vn as d,zi as f}from"./index-BzbTy_RW.js";import{t as p}from"./useLocalOpenTargets-CH6aon29.js";import{t as m}from"./useResolvedLiveFileTarget-DyRrMwgB.js";var h=t(),g=e(n(),1);function _(e){let t=d(e),n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():null}function v(e){let t=(0,h.c)(40),{intent:n}=e,v=o(),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={enabled:!0},t[0]=y):y=t[0];let b=m(n.target,y),x=b.status===`available`,S;t[1]!==b.openContext||t[2]!==b.status?(S=b.status===`available`?{openContext:b.openContext}:{},t[1]=b.openContext,t[2]=b.status,t[3]=S):S=t[3];let C;t[4]!==x||t[5]!==S?(C={enabled:x,...S},t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=p(C),{fileOpeners:T}=l(),E,D,O,k;if(t[7]!==T||t[8]!==n||t[9]!==w||t[10]!==v||t[11]!==b.absolutePath||t[12]!==b.status){let e=_(n.target.path),o=e===null?[]:T.filter(t=>t.extensions.includes(e)),s=i(n.location);t[17]!==n||t[18]!==v?(E=(0,g.jsx)(a,{onSelect:()=>v.openFilePreview(n),children:`Open preview`}),t[17]=n,t[18]=v,t[19]=E):E=t[19],D=o.length>0?(0,g.jsxs)(u,{children:[(0,g.jsx)(r,{children:`Open with`}),(0,g.jsxs)(f,{className:`min-w-52`,children:[(0,g.jsx)(a,{onSelect:()=>v.openFilePreview({...n,viewer:`builtin`}),children:`Moonlet preview`}),o.map(e=>(0,g.jsx)(a,{onSelect:()=>v.openFilePreview({...n,viewer:{pluginId:e.pluginId,openerId:e.id}}),children:e.title},`${e.pluginId}:${e.id}`))]})]}):null;let c=b.status!==`available`||w.isLoading||!w.canOpenPreferredFileTarget,l;t[20]!==n||t[21]!==v?(l=()=>v.openFileExternally(n),t[20]=n,t[21]=v,t[22]=l):l=t[22],t[23]!==l||t[24]!==c?(O=(0,g.jsx)(a,{disabled:c,onSelect:l,children:`Open externally`}),t[23]=l,t[24]=c,t[25]=O):O=t[25],k=b.status===`available`&&w.fileOpenTargets.length>0?(0,g.jsxs)(u,{children:[(0,g.jsx)(r,{children:`Open in`}),(0,g.jsx)(f,{className:`min-w-52`,children:w.fileOpenTargets.map(e=>(0,g.jsx)(a,{onSelect:()=>{w.openPathInFileTarget({columnNumber:s.columnNumber,lineNumber:s.lineNumber,path:b.absolutePath,rememberTarget:!1,targetId:e.id})},children:e.label},e.id))})]}):null,t[7]=T,t[8]=n,t[9]=w,t[10]=v,t[11]=b.absolutePath,t[12]=b.status,t[13]=E,t[14]=D,t[15]=O,t[16]=k}else E=t[13],D=t[14],O=t[15],k=t[16];let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(s,{}),t[26]=A):A=t[26];let j;t[27]!==n.target.path||t[28]!==b.absolutePath||t[29]!==b.status?(j=(0,g.jsx)(a,{onSelect:()=>{c(b.status===`available`?b.absolutePath:n.target.path,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:`Copy file path`}),t[27]=n.target.path,t[28]=b.absolutePath,t[29]=b.status,t[30]=j):j=t[30];let M;t[31]===n.target.path?M=t[32]:(M=(0,g.jsx)(a,{onSelect:()=>{c(d(n.target.path),{successMessage:`File name copied`,errorMessage:`Failed to copy file name`})},children:`Copy file name`}),t[31]=n.target.path,t[32]=M);let N;return t[33]!==j||t[34]!==M||t[35]!==E||t[36]!==D||t[37]!==O||t[38]!==k?(N=(0,g.jsxs)(g.Fragment,{children:[E,D,O,k,A,j,M]}),t[33]=j,t[34]=M,t[35]=E,t[36]=D,t[37]=O,t[38]=k,t[39]=N):N=t[39],N}export{v as ExperimentalFileLinkMenu};
@@ -0,0 +1,3 @@
1
+ import{o as e,r as t}from"./rolldown-runtime-BM3Ffeng.js";import{Or as n,mi as r,ni as i}from"./boot-vendor-BBLG7GwQ.js";import{$i as a,An as o,Ma as s,Mf as c,Nf as l,Pf as u,Uf as d,Xt as f,aa as p,ah as m,ap as h,da as g,jf as _,lh as v,na as y,np as b,oa as x,oo as S,ph as C,pt as w,ra as T,sa as E,ta as D,vc as O}from"./index-BzbTy_RW.js";import{n as k}from"./code-loading-skeletons--jaZzV7b.js";import{a as A,i as j,o as M,r as N,t as P}from"./TimelineSelectionMenu-C7YFrgTN.js";import{t as F}from"./esm-BYEAMohy.js";import{a as I,n as ee,r as te,t as ne}from"./useElementWidth-BHGsg7DA.js";import{n as L}from"./save-file-DGnL07Pr.js";import{t as re}from"./AppCommandShortcutHint-qypi-w_1.js";import{n as R,r as z}from"./image-lightbox-BgcCqbkU.js";import{h as ie,m as ae,t as B}from"./markdown-preview-ZPLF5g9D.js";import{n as V}from"./SourceCodeHost-CFrI22zo.js";import{t as oe}from"./open-in-editor-button-sM_tzYa8.js";var H=n(),U=e(r(),1),W=(0,U.createContext)(null),G=e(i(),1);function K(e,t){return t===null||!(e.target instanceof Node)?!1:t.contains(e.target)}function q(e,t){let{commonAncestorContainer:n}=e;return!!(t.contains(n)||typeof e.intersectsNode==`function`&&(()=>{try{return e.intersectsNode(t)}catch{return!1}})())}function J(e,t){let n=e.cloneRange();return t.contains(e.startContainer)||n.setStart(t,0),t.contains(e.endContainer)||n.setEnd(t,t.childNodes.length),M(n,t,`markdown`).text}function Y({anchor:e,markdown:t,node:n,pointerStartedInNode:r}){if(n===null||typeof window>`u`)return null;let i=window.getSelection();if(i===null||i.rangeCount===0||i.isCollapsed)return null;let a=i.toString().trim();if(a.length===0)return null;let o=i.getRangeAt(0);if(!r&&!q(o,n))return null;let s=e??null,c=j(o)??(s===null?n.getBoundingClientRect():new DOMRect(s.point.x,s.point.y,0,0)),l={text:t?J(o,n):a,rect:c};return s!==null&&(l.anchorPoint=s.point,l.anchorSide=s.side),l}function X(e){let t=(0,H.c)(22),{children:n,markdown:r,onSelectionAddToChat:i}=e,a=r===void 0?!1:r,o=(0,U.useRef)(null),s=(0,U.useRef)(!1),c=(0,U.useRef)(null),l=(0,U.useRef)(!1),u=(0,U.useRef)(null),d=O(),[f,p]=(0,U.useState)(null),m=!d,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{p(null)},t[0]=h):h=t[0];let g=h,_;t[1]===a?_=t[2]:(_=e=>{p(Y({anchor:e,markdown:a,node:o.current,pointerStartedInNode:s.current}))},t[1]=a,t[2]=_);let v=_,y,b;t[3]!==m||t[4]!==v?(y=()=>{if(!m||typeof window>`u`)return;let e=null,t=()=>{e!==null&&(window.cancelAnimationFrame(e),e=null)},n=n=>{let r=n===void 0?null:n;t(),e=window.requestAnimationFrame(()=>{e=null,v(r)})},r=e=>{t(),s.current=K(e,o.current),c.current=s.current?N(e):null,l.current=!0},i=e=>{let t=s.current&&c.current!==null?A(c.current,e):null;t!==null&&(u.current=t),l.current=!1,c.current=null,n(t??u.current)},a=()=>{l.current=!1,c.current=null,n(u.current)},d=()=>{l.current||n(u.current)};return document.addEventListener(`pointerdown`,r),document.addEventListener(`pointerup`,i),document.addEventListener(`pointercancel`,a),document.addEventListener(`mouseup`,i),document.addEventListener(`selectionchange`,d),document.addEventListener(`keyup`,d),()=>{t(),document.removeEventListener(`pointerdown`,r),document.removeEventListener(`pointerup`,i),document.removeEventListener(`pointercancel`,a),document.removeEventListener(`mouseup`,i),document.removeEventListener(`selectionchange`,d),document.removeEventListener(`keyup`,d)}},b=[m,v],t[3]=m,t[4]=v,t[5]=y,t[6]=b):(y=t[5],b=t[6]),(0,U.useEffect)(y,b);let x,S;t[7]===a?(x=t[8],S=t[9]):(x=()=>{if(!a)return;let e=e=>{let t=o.current,n=window.getSelection();if(e.defaultPrevented||e.clipboardData===null||t===null||n===null||n.isCollapsed||n.rangeCount!==1)return;let r=n.getRangeAt(0);if(!t.contains(r.startContainer)||!t.contains(r.endContainer))return;let i=M(r,t,`text`);i.text&&(e.clipboardData.setData(`text/plain`,i.text),e.clipboardData.setData(`text/html`,i.html),e.preventDefault())};return document.addEventListener(`copy`,e),()=>document.removeEventListener(`copy`,e)},S=[a],t[7]=a,t[8]=x,t[9]=S),(0,U.useEffect)(x,S);let C;t[10]===i?C=t[11]:(C=e=>{i?.(e),p(null)},t[10]=i,t[11]=C);let w=C,T;t[12]===n?T=t[13]:(T=(0,G.jsx)(`div`,{ref:o,className:`contents`,children:n}),t[12]=n,t[13]=T);let E;t[14]!==w||t[15]!==m||t[16]!==i||t[17]!==f?(E=m?(0,G.jsx)(P,{selection:f,onAddToChat:i===void 0?void 0:w,onDismiss:g}):null,t[14]=w,t[15]=m,t[16]=i,t[17]=f,t[18]=E):E=t[18];let D;return t[19]!==E||t[20]!==T?(D=(0,G.jsxs)(G.Fragment,{children:[T,E]}),t[19]=E,t[20]=T,t[21]=D):D=t[21],D}var Z=new Set([`avif`,`bmp`,`gif`,`ico`,`jpeg`,`jpg`,`png`,`webp`]),Q=(0,U.createContext)(null);function se(e){if(e.tab.kind!==`workspace-file-preview`&&e.tab.kind!==`host-file-preview`&&e.tab.kind!==`thread-storage-file-preview`&&e.tab.kind!==`attachment-file-preview`)return!1;let t=e.tab.path.split(`.`).pop()?.toLowerCase();return t!==void 0&&Z.has(t)}function ce(e){let t=(0,H.c)(33),{activeTabId:n,children:r,tabs:i}=e,[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(le),d;t[0]===i?d=t[1]:(d=i.filter(se),t[0]=i,t[1]=d);let f=d,p;t[2]!==f||t[3]!==l?(p=e=>{let t=f[e];t!==void 0&&(o(l.get(t.tab.id)??null),t.onSelect())},t[2]=f,t[3]=l,t[4]=p):p=t[4];let m=p,h;t[5]!==n||t[6]!==f||t[7]!==m?(h=e=>{let t=f.findIndex(e=>e.tab.id===n);t===-1||f.length<=1||m(z({currentIndex:t,direction:e,itemCount:f.length}))},t[5]=n,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=h,_;t[9]===n?_=t[10]:(_=e=>{o(e),n!==null&&u(t=>t.get(n)?.src===e.src?t:new Map(t).set(n,e))},t[9]=n,t[10]=_);let v=_,y;t[11]===v?y=t[12]:(y=e=>{v(e),c(!0)},t[11]=v,t[12]=y);let b;t[13]!==s||t[14]!==y||t[15]!==v?(b={isOpen:s,open:y,update:v},t[13]=s,t[14]=y,t[15]=v,t[16]=b):b=t[16];let x=b,S=a?.alt??`Image preview`,C=s?a?.src??null:null,w=a?.alt??`Image preview`,T=f.length>1,E,D;t[17]===g?(E=t[18],D=t[19]):(E=()=>g(`previous`),D=()=>g(`next`),t[17]=g,t[18]=E,t[19]=D);let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(!1),t[20]=O):O=t[20];let k;t[21]!==s||t[22]!==T||t[23]!==E||t[24]!==D||t[25]!==S||t[26]!==C||t[27]!==w?(k=(0,G.jsx)(R,{imageAlt:S,imageSrc:C,isOpen:s,title:w,hasMultipleImages:T,onPrevious:E,onNext:D,onClose:O}),t[21]=s,t[22]=T,t[23]=E,t[24]=D,t[25]=S,t[26]=C,t[27]=w,t[28]=k):k=t[28];let A;return t[29]!==r||t[30]!==k||t[31]!==x?(A=(0,G.jsxs)(Q.Provider,{value:x,children:[r,k]}),t[29]=r,t[30]=k,t[31]=x,t[32]=A):A=t[32],A}function le(){return new Map}function ue(){return(0,U.useContext)(Q)}var de=t({FilePreview:()=>je,buildCsvPreviewData:()=>ke,getCsvTruncationNote:()=>Ae}),fe=100,pe=500,me=29,he=8,ge={width:`100%`,height:`100%`,border:0},_e=160,$=`h-5 w-5 rounded-sm p-0 [&_[data-icon-root]]:size-3 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&_[data-icon-root]]:size-5`,ve=`h-5 rounded-sm px-2 text-muted-foreground max-md:pointer-coarse:h-9`;function ye(e){return e.kind===`html`?e.iframe.url:null}function be(e){return typeof window>`u`?e:new URL(e,window.location.href).toString()}function xe(e){return e.kind===`html`?`html`:e.kind===`ready`?e.textPreviewKind:null}function Se(e){switch(e){case`csv`:return`CSV view mode`;case`html`:return`HTML view mode`;case`markdown`:return`Markdown view mode`}}function Ce(e){return e===`csv`?`Copy CSV`:e===`markdown`?`Copy markdown`:e===`html`?`Copy HTML source`:`Copy file contents`}function we(e){return e.kind===`html`||e.kind===`ready`?e.lineRange:null}function Te(e){return e.kind===`html`||e.kind===`ready`?e.file.contents:null}function Ee({lineRange:e,toggleKind:t}){return t===`csv`||t===`html`||t===`markdown`||e===null?`preview`:`source`}function De(e,t){return e.kind===`html`?t===`source`:e.kind===`ready`?e.textPreviewKind===null||t===`source`:!1}function Oe(e,t){let n=[],r=[],i=``,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c+=1){let l=e[c];if(s=!1,a){l===`"`?e[c+1]===`"`?(i+=`"`,c+=1):a=!1:i+=l;continue}if(l===`"`&&i.length===0){a=!0,o=!0;continue}if(l===`,`){r.push(i),i=``,o=!1;continue}if(l===`
2
+ `||l===`\r`){if(r.push(i),n.push(r),r=[],i=``,o=!1,s=!0,l===`\r`&&e[c+1]===`
3
+ `&&(c+=1),n.length>=t)return{rows:n,truncatedRows:c+1<e.length};continue}i+=l}return(i.length>0||r.length>0||o||!s)&&(r.push(i),n.push(r)),{rows:n,truncatedRows:!1}}function ke(e){let{rows:t,truncatedRows:n}=Oe(e,pe+1),r=t.reduce((e,t)=>Math.max(e,t.length),0);return{columnCount:Math.min(r,fe),rows:t,truncatedColumns:r>fe,truncatedRows:n}}function Ae(e,t){let n=[];return e.truncatedRows&&n.push(`${t.toLocaleString()} rows`),e.truncatedColumns&&n.push(`${e.columnCount.toLocaleString()} columns`),n.length===0?null:`Showing the first ${n.join(` and `)}.`}function je(e){let t=(0,H.c)(61),{download:n,state:r,path:i,copyPath:a,headerMode:o,onSelectionAddToChat:s,onOpenInEditor:c,onRefresh:l,isRefreshing:u,markdownLinkRouting:d,statusLabel:f}=e,p=n===void 0?null:n,m=a===void 0?null:a,h=o===void 0?`file`:o,g=u===void 0?!1:u,_=f===void 0?null:f,v=r.kind===`html`?r.iframe:null,y;t[0]!==v?.url||t[1]!==r.file||t[2]!==r.kind?(y=JSON.stringify([r.kind,v?.url,r.kind===`html`?r.file.cacheKey:null]),t[0]=v?.url,t[1]=r.file,t[2]=r.kind,t[3]=y):y=t[3];let b=y,x;t[4]===b?x=t[5]:(x={key:b,status:`loading`},t[4]=b,t[5]=x);let[S,w]=(0,U.useState)(x);S.key!==b&&w({key:b,status:`loading`});let T=S.key===b?S.status:`loading`,E;t[6]!==b||t[7]!==T||t[8]!==v?(E=v===null?null:(0,G.jsx)(Ve,{...v,loadState:T,onLoadStateChange:e=>w(t=>t.key===b?{key:b,status:e}:t)},b),t[6]=b,t[7]=T,t[8]=v,t[9]=E):E=t[9];let D=E,O,k,A,j,M,N;t[10]===r?(O=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16]):(N=xe(r),k=we(r),A=Te(r),O=ye(r),M=U.useState,j=Ee({lineRange:k,toggleKind:N}),t[10]=r,t[11]=O,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N);let[P,F]=M(j),[I,te]=(0,U.useState)(ae),ne;t[17]!==k||t[18]!==N?(ne=()=>{F(Ee({lineRange:k,toggleKind:N}))},t[17]=k,t[18]=N,t[19]=ne):ne=t[19];let L;t[20]!==k||t[21]!==i||t[22]!==N?(L=[k,i,N],t[20]=k,t[21]=i,t[22]=N,t[23]=L):L=t[23],(0,U.useEffect)(ne,L);let re=r.kind===`html`&&P===`preview`,R=N===null?`preview`:P,z;t[24]!==R||t[25]!==r?(z=De(r,R),t[24]=R,t[25]=r,t[26]=z):z=t[26];let ie=z,B=ie,V=r.kind===`ready`&&r.textPreviewKind===`markdown`&&R===`preview`,oe=r.kind===`ready`&&r.textPreviewKind===`csv`&&R===`preview`,W=re||oe||ie||V,K;t[27]!==W||t[28]!==V?(K=W?C(`@container/page flex h-full min-h-0 flex-col`,V&&`overflow-y-auto`):`@container/page min-h-full`,t[27]=W,t[28]=V,t[29]=K):K=t[29];let q=V?``:void 0,J;t[30]!==m||t[31]!==p||t[32]!==O||t[33]!==h||t[34]!==T||t[35]!==g||t[36]!==I||t[37]!==c||t[38]!==l||t[39]!==i||t[40]!==A||t[41]!==B||t[42]!==r.kind||t[43]!==_||t[44]!==N||t[45]!==re||t[46]!==P?(J=h===`file`?(0,G.jsx)(Ne,{download:p,previewIcon:(0,G.jsx)(Be,{loading:r.kind===`loading`||g||re&&T===`loading`},i),path:i,copyPath:m,rawContents:A,externalUrl:O,onOpenInEditor:c,onRefresh:l,isRefreshing:g,statusLabel:_,toggleKind:N,showLineOverflowToggle:B,lineOverflowMode:I,onLineOverflowModeChange:te,viewMode:P,onViewModeChange:F}):null,t[30]=m,t[31]=p,t[32]=O,t[33]=h,t[34]=T,t[35]=g,t[36]=I,t[37]=c,t[38]=l,t[39]=i,t[40]=A,t[41]=B,t[42]=r.kind,t[43]=_,t[44]=N,t[45]=re,t[46]=P,t[47]=J):J=t[47];let Y;t[48]!==R||t[49]!==D||t[50]!==I||t[51]!==d||t[52]!==s||t[53]!==i||t[54]!==r?(Y=(0,G.jsx)(Me,{iframePreview:D,state:r,path:i,lineOverflowMode:I,viewMode:R,markdownLinkRouting:d,onSelectionAddToChat:s}),t[48]=R,t[49]=D,t[50]=I,t[51]=d,t[52]=s,t[53]=i,t[54]=r,t[55]=Y):Y=t[55];let X;return t[56]!==K||t[57]!==q||t[58]!==J||t[59]!==Y?(X=(0,G.jsxs)(`div`,{className:K,"data-file-preview-scroll-container":q,style:ee,children:[J,Y]}),t[56]=K,t[57]=q,t[58]=J,t[59]=Y,t[60]=X):X=t[60],X}function Me(e){let t=(0,H.c)(32),{iframePreview:n,state:r,path:i,lineOverflowMode:a,viewMode:o,markdownLinkRouting:s,onSelectionAddToChat:c}=e;if(r.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(k,{}),t[0]=e):e=t[0],e}if(r.kind===`empty`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`Empty file.`}),t[1]=e):e=t[1],e}if(r.kind===`not-found`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`File not found.`,role:`alert`}),t[2]=e):e=t[2],e}if(r.kind===`error`){let e=r.message??`Failed to load file`,n;return t[3]===e?n=t[4]:(n=(0,G.jsx)(Ue,{message:e,role:`alert`}),t[3]=e,t[4]=n),n}if(r.kind===`unsupported`){let e;return t[5]===r.file?e=t[6]:(e=(0,G.jsx)(He,{file:r.file}),t[5]=r.file,t[6]=e),e}if(r.kind===`image`){let e;return t[7]!==i||t[8]!==r.url?(e=(0,G.jsx)(Re,{url:r.url,alt:i}),t[7]=i,t[8]=r.url,t[9]=e):e=t[9],e}if(r.kind===`video`){let e;return t[10]!==i||t[11]!==r.url?(e=(0,G.jsx)(ze,{url:r.url,title:i}),t[10]=i,t[11]=r.url,t[12]=e):e=t[12],e}if(r.kind===`html`){let e;return t[13]!==n||t[14]!==a||t[15]!==c||t[16]!==r||t[17]!==o?(e=(0,G.jsx)(Fe,{iframePreview:n,lineOverflowMode:a,onSelectionAddToChat:c,state:r,viewMode:o}),t[13]=n,t[14]=a,t[15]=c,t[16]=r,t[17]=o,t[18]=e):e=t[18],e}if(r.textPreviewKind===`csv`&&o===`preview`){let e;return t[19]!==c||t[20]!==r.file?(e=(0,G.jsx)(Le,{file:r.file,onSelectionAddToChat:c}),t[19]=c,t[20]=r.file,t[21]=e):e=t[21],e}if(r.textPreviewKind===`markdown`&&o===`preview`){let e;return t[22]!==s||t[23]!==c||t[24]!==r.file?(e=(0,G.jsx)(Ie,{file:r.file,markdownLinkRouting:s,onSelectionAddToChat:c}),t[22]=s,t[23]=c,t[24]=r.file,t[25]=e):e=t[25],e}let l=r.lineRange??null,u;return t[26]!==a||t[27]!==c||t[28]!==i||t[29]!==r.file||t[30]!==l?(u=(0,G.jsx)(We,{file:r.file,lineOverflowMode:a,lineRange:l,onSelectionAddToChat:c,path:i}),t[26]=a,t[27]=c,t[28]=i,t[29]=r.file,t[30]=l,t[31]=u):u=t[31],u}function Ne(e){let t=(0,H.c)(45),{download:n,previewIcon:r,path:i,copyPath:a,rawContents:o,externalUrl:d,onOpenInEditor:O,onRefresh:k,isRefreshing:A,statusLabel:j,toggleKind:M,showLineOverflowToggle:N,lineOverflowMode:P,onLineOverflowModeChange:F,viewMode:ee,onViewModeChange:R}=e,z=S(`workspace.openPreferred`),{ref:ae,width:B}=ne(),V=h(),U=B>0?B<560:V,W=N||M!==null,K;t[0]===M?K=t[1]:(K=Ce(M),t[0]=M,t[1]=K);let q=K,J;t[2]!==a||t[3]!==i?(J=(0,G.jsx)(I,{path:i,copyPath:a}),t[2]=a,t[3]=i,t[4]=J):J=t[4];let Y;t[5]===j?Y=t[6]:(Y=j===null?null:(0,G.jsxs)(`span`,{className:C(`shrink-0 leading-5 text-muted-foreground`,b),children:[`(`,j,`)`]}),t[5]=j,t[6]=Y);let X;t[7]!==q||t[8]!==n||t[9]!==d||t[10]!==U||t[11]!==A||t[12]!==O||t[13]!==k||t[14]!==z||t[15]!==i||t[16]!==o?(X=U?null:(0,G.jsxs)(l,{delayDuration:300,children:[k?(0,G.jsxs)(_,{children:[(0,G.jsx)(u,{asChild:!0,children:(0,G.jsx)(v,{type:`button`,variant:`ghost`,size:`icon`,className:C($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:k,disabled:A,"aria-label":A?`Refreshing file`:`Refresh file`,children:(0,G.jsx)(m,{name:`RotateCcw`,"aria-hidden":!0})})}),(0,G.jsx)(c,{side:`bottom`,children:A?`Refreshing file`:`Refresh file`})]}):null,n===null?null:(0,G.jsxs)(_,{children:[(0,G.jsx)(u,{asChild:!0,children:(0,G.jsx)(v,{type:`button`,variant:`ghost`,size:`icon`,className:$,onClick:()=>void L(n),"aria-label":`Download`,children:(0,G.jsx)(m,{name:`Download`,"aria-hidden":!0})})}),(0,G.jsx)(c,{side:`bottom`,children:`Download`})]}),o===null?null:(0,G.jsxs)(_,{children:[(0,G.jsx)(u,{asChild:!0,children:(0,G.jsx)(f,{text:o,label:q,className:C($,`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`)})}),(0,G.jsx)(c,{side:`bottom`,children:q})]}),d===null?null:(0,G.jsxs)(_,{children:[(0,G.jsx)(u,{asChild:!0,children:(0,G.jsx)(v,{type:`button`,variant:`ghost`,size:`icon`,className:C($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:()=>{w(be(d))},"aria-label":`Open in external browser`,children:(0,G.jsx)(m,{name:`Globe`,"aria-hidden":!0})})}),(0,G.jsx)(c,{side:`bottom`,children:`Open in external browser`})]}),O?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(_,{children:[(0,G.jsx)(u,{asChild:!0,children:(0,G.jsx)(oe,{onClick:()=>O(i),className:$,label:z?`Open in editor (${z.label})`:`Open in editor`,"aria-keyshortcuts":z?.ariaKeyshortcuts})}),(0,G.jsx)(c,{side:`bottom`,children:z?`Open in editor (${z.label})`:`Open in editor`})]}),(0,G.jsx)(re,{shortcut:z})]}):null]}),t[7]=q,t[8]=n,t[9]=d,t[10]=U,t[11]=A,t[12]=O,t[13]=k,t[14]=z,t[15]=i,t[16]=o,t[17]=X):X=t[17];let Z;t[18]!==r||t[19]!==J||t[20]!==Y||t[21]!==X?(Z=(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[r,J,Y,X]}),t[18]=r,t[19]=J,t[20]=Y,t[21]=X,t[22]=Z):Z=t[22];let Q;t[23]!==q||t[24]!==a||t[25]!==n||t[26]!==d||t[27]!==U||t[28]!==A||t[29]!==P||t[30]!==F||t[31]!==O||t[32]!==k||t[33]!==R||t[34]!==i||t[35]!==o||t[36]!==W||t[37]!==N||t[38]!==M||t[39]!==ee?(Q=W||U?(0,G.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(Pe,{showLineOverflowToggle:N&&!U,lineOverflowMode:P,onLineOverflowModeChange:F}),M===null?null:(0,G.jsxs)(`div`,{className:`inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5`,role:`tablist`,"aria-label":Se(M),children:[(0,G.jsx)(v,{type:`button`,variant:`ghost`,size:`sm`,className:C(ve,b),onClick:()=>R(`preview`),"aria-pressed":ee===`preview`,children:`Preview`}),(0,G.jsx)(v,{type:`button`,variant:`ghost`,size:`sm`,className:C(ve,b),onClick:()=>R(`source`),"aria-pressed":ee===`source`,children:`Raw`})]}),U?(0,G.jsxs)(D,{modal:!1,children:[(0,G.jsx)(g,{asChild:!0,children:(0,G.jsx)(v,{variant:`ghost`,size:`icon`,className:C($,`shrink-0 max-md:pointer-coarse:size-10`),"aria-label":`File actions`,children:(0,G.jsx)(m,{name:`MoreHorizontal`,"aria-hidden":!0})})}),(0,G.jsxs)(T,{align:`end`,mobileTitle:`File actions`,className:`max-md:pointer-coarse:[&_[role=menuitem]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitem]]:text-sm max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:text-sm`,children:[(0,G.jsx)(x,{className:`max-w-80 break-all font-mono`,children:i}),(0,G.jsx)(E,{}),(0,G.jsxs)(p,{onSelect:()=>{s(a??i,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:[(0,G.jsx)(m,{name:`Copy`,"aria-hidden":!0}),` Copy file path`]}),o===null?null:(0,G.jsxs)(p,{onSelect:()=>{s(o,{successMessage:`Copied to clipboard`,errorMessage:`Failed to copy file contents`})},children:[(0,G.jsx)(m,{name:`Copy`,"aria-hidden":!0}),` `,q]}),n===null?null:(0,G.jsxs)(p,{onSelect:()=>void L(n),children:[(0,G.jsx)(m,{name:`Download`,"aria-hidden":!0}),` Download`]}),k?(0,G.jsxs)(p,{disabled:A,onSelect:k,children:[(0,G.jsx)(m,{name:`RotateCcw`,"aria-hidden":!0}),` `,A?`Refreshing file`:`Refresh file`]}):null,d===null?null:(0,G.jsxs)(p,{onSelect:()=>w(be(d)),children:[(0,G.jsx)(m,{name:`Globe`,"aria-hidden":!0}),` Open in external browser`]}),O?(0,G.jsxs)(p,{onSelect:()=>O(i),children:[(0,G.jsx)(m,{name:`ExternalLink`,"aria-hidden":!0}),` Open in editor`]}):null,N?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(E,{}),(0,G.jsxs)(y,{className:`gap-2 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0`,checked:P===`wrap`,onCheckedChange:e=>F(e?`wrap`:`scroll`),children:[(0,G.jsx)(m,{name:`TextWrap`,"aria-hidden":!0}),ie]})]}):null]})]}):null]}):null,t[23]=q,t[24]=a,t[25]=n,t[26]=d,t[27]=U,t[28]=A,t[29]=P,t[30]=F,t[31]=O,t[32]=k,t[33]=R,t[34]=i,t[35]=o,t[36]=W,t[37]=N,t[38]=M,t[39]=ee,t[40]=Q):Q=t[40];let se;return t[41]!==ae||t[42]!==Z||t[43]!==Q?(se=(0,G.jsxs)(te,{headerRef:ae,children:[Z,Q]}),t[41]=ae,t[42]=Z,t[43]=Q,t[44]=se):se=t[44],se}function Pe(e){let t=(0,H.c)(11),{showLineOverflowToggle:n,lineOverflowMode:r,onLineOverflowModeChange:i}=e;if(!n)return null;let a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=C($,`text-muted-foreground`),t[0]=a):a=t[0];let o=r===`wrap`,s;t[1]!==r||t[2]!==i?(s=()=>{i(r===`wrap`?`scroll`:`wrap`)},t[1]=r,t[2]=i,t[3]=s):s=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,G.jsx)(m,{name:`TextWrap`}),t[4]=d):d=t[4];let f;t[5]!==o||t[6]!==s?(f=(0,G.jsx)(u,{asChild:!0,children:(0,G.jsx)(v,{type:`button`,variant:`ghost`,size:`icon`,className:a,"aria-label":ie,"aria-pressed":o,onClick:s,children:d})}),t[5]=o,t[6]=s,t[7]=f):f=t[7];let p;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,G.jsx)(c,{side:`bottom`,children:ie}),t[8]=p):p=t[8];let h;return t[9]===f?h=t[10]:(h=(0,G.jsx)(l,{delayDuration:300,children:(0,G.jsxs)(_,{children:[f,p]})}),t[9]=f,t[10]=h),h}function Fe(e){let t=(0,H.c)(16),{iframePreview:n,lineOverflowMode:r,onSelectionAddToChat:i,state:a,viewMode:o}=e,s=o===`preview`,c=s?`contents`:`hidden`,l=s?void 0:!0,u;t[0]!==n||t[1]!==c||t[2]!==l?(u=(0,G.jsx)(`div`,{className:c,"aria-hidden":l,children:n}),t[0]=n,t[1]=c,t[2]=l,t[3]=u):u=t[3];let d=s?`hidden`:`contents`,f=s?!0:void 0,p;t[4]!==r||t[5]!==i||t[6]!==a.file||t[7]!==a.lineRange?(p=(0,G.jsx)(We,{file:a.file,lineOverflowMode:r,lineRange:a.lineRange,onSelectionAddToChat:i,path:a.file.name}),t[4]=r,t[5]=i,t[6]=a.file,t[7]=a.lineRange,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,G.jsx)(`div`,{className:d,"aria-hidden":f,children:p}),t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;return t[13]!==u||t[14]!==m?(h=(0,G.jsxs)(G.Fragment,{children:[u,m]}),t[13]=u,t[14]=m,t[15]=h):h=t[15],h}function Ie(e){let t=(0,H.c)(12),{file:n,onSelectionAddToChat:r,markdownLinkRouting:i}=e,a=(0,U.useRef)(null),o=(0,U.useContext)(W),s;t[0]===o?s=t[1]:(s=()=>{let e=a.current?.closest(`[data-file-preview-scroll-container]`);if(!e||!o)return;e.scrollTop=o.scrollTop;let t=()=>{o.scrollTop=e.scrollTop};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},t[0]=o,t[1]=s);let c;t[2]!==n.contents||t[3]!==n.name||t[4]!==o?(c=[o,n.name,n.contents],t[2]=n.contents,t[3]=n.name,t[4]=o,t[5]=c):c=t[5],(0,U.useLayoutEffect)(s,c);let l;t[6]!==n.contents||t[7]!==i?(l=(0,G.jsx)(`div`,{ref:a,className:`flex-auto bg-background px-4 py-4`,children:(0,G.jsx)(B,{allowHtml:!0,content:n.contents,linkRouting:i})}),t[6]=n.contents,t[7]=i,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==l?(u=(0,G.jsx)(X,{markdown:!0,onSelectionAddToChat:r,children:l}),t[9]=r,t[10]=l,t[11]=u):u=t[11],u}function Le({file:e,onSelectionAddToChat:t}){let n=(0,U.useMemo)(()=>ke(e.contents),[e.contents]),r=n.rows[0]??[],i=n.rows.slice(1),a=Array.from({length:n.columnCount},(e,t)=>({index:t,label:r[t]??``})),o=`max(100%, ${3+a.length*18}rem)`,s=Ae(n,i.length),c=(0,U.useRef)(null),l=F({count:i.length,getScrollElement:()=>c.current,estimateSize:()=>me,overscan:he}),u=l.getVirtualItems(),d=l.getTotalSize(),f=u[0],p=u[u.length-1],m=f?.start??0,h=p===void 0?d:d-p.end;return(0,G.jsx)(X,{onSelectionAddToChat:t,children:(0,G.jsxs)(`div`,{className:`flex min-h-0 flex-auto flex-col bg-surface-raised px-4 py-4`,children:[(0,G.jsx)(`div`,{ref:c,className:`persistent-scrollbar min-h-0 overflow-auto overscroll-contain rounded-md border border-border bg-background`,children:(0,G.jsxs)(`table`,{className:`min-w-full table-fixed border-separate border-spacing-0 font-mono text-xs leading-5`,"aria-label":`${e.name} CSV preview`,style:{width:o},children:[(0,G.jsxs)(`colgroup`,{children:[(0,G.jsx)(`col`,{className:`w-12`}),a.map(e=>(0,G.jsx)(`col`,{className:`w-72`},e.index))]}),(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{scope:`col`,className:`sticky left-0 top-0 z-30 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:`#`}),a.map(e=>(0,G.jsx)(`th`,{scope:`col`,className:`sticky top-0 z-20 w-72 max-w-72 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-left font-medium text-foreground`,title:e.label,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:e.label||`Column ${e.index+1}`})},e.index))]})}),(0,G.jsxs)(`tbody`,{children:[m>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:m},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null,u.map(e=>{let t=e.index,n=i[t]??[];return(0,G.jsxs)(`tr`,{"data-index":t,ref:l.measureElement,children:[(0,G.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:t+2}),a.map(e=>{let t=n[e.index]??``;return(0,G.jsx)(`td`,{className:`w-72 max-w-72 overflow-hidden border-b border-r border-border px-2 py-1 align-top text-foreground`,title:t,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:t})},e.index)})]},e.key)}),h>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:h},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null]})]})}),s===null?null:(0,G.jsx)(`p`,{className:`mt-2 shrink-0 text-xs leading-5 text-muted-foreground`,children:s})]})})}function Re(e){let t=(0,H.c)(24),{url:n,alt:r}=e,[i,a]=(0,U.useState)(!1),o=ue(),s,c;t[0]!==r||t[1]!==o||t[2]!==n?(s=()=>{o?.isOpen&&o.update({alt:r,src:n})},c=[r,o,n],t[0]=r,t[1]=o,t[2]=n,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,U.useLayoutEffect)(s,c);let l=`Open ${r} in full screen preview`,u;t[5]!==r||t[6]!==o||t[7]!==n?(u=()=>{if(o){o.open({alt:r,src:n});return}a(!0)},t[5]=r,t[6]=o,t[7]=n,t[8]=u):u=t[8];let d;t[9]!==r||t[10]!==n?(d=(0,G.jsx)(`img`,{src:n,alt:r,className:`mx-auto block h-auto max-w-full`}),t[9]=r,t[10]=n,t[11]=d):d=t[11];let f;t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,G.jsx)(`button`,{type:`button`,className:`block w-full cursor-zoom-in`,"aria-label":l,onClick:u,children:d}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==r||t[17]!==o||t[18]!==i||t[19]!==n?(p=o===null?(0,G.jsx)(R,{title:r,imageSrc:i?n:null,imageAlt:r,onClose:()=>a(!1)}):null,t[16]=r,t[17]=o,t[18]=i,t[19]=n,t[20]=p):p=t[20];let m;return t[21]!==f||t[22]!==p?(m=(0,G.jsxs)(`div`,{className:`pt-4`,children:[f,p]}),t[21]=f,t[22]=p,t[23]=m):m=t[23],m}function ze(e){let t=(0,H.c)(3),{url:n,title:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,G.jsx)(`div`,{className:`pt-4`,children:(0,G.jsx)(`video`,{src:n,title:r,className:`block max-h-[34rem] w-full bg-black`,controls:!0,preload:`metadata`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Be(e){let t=(0,H.c)(14),{loading:n}=e,[r,i]=(0,U.useState)(!1),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>{if(!n){i(!1);return}let e=window.setTimeout(()=>i(!0),_e);return()=>window.clearTimeout(e)},o=[n],t[0]=n,t[1]=a,t[2]=o),(0,U.useEffect)(a,o);let s=n&&r,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=C(`flex items-center justify-center text-subtle-foreground`,d),t[3]=c):c=t[3];let l=s?`Spinner`:`File`,u=s&&`animate-spin motion-reduce:animate-none`,f;t[4]===u?f=t[5]:(f=C(`size-full`,u),t[4]=u,t[5]=f);let p;t[6]!==l||t[7]!==f?(p=(0,G.jsx)(m,{name:l,className:f,"aria-hidden":!0}),t[6]=l,t[7]=f,t[8]=p):p=t[8];let h;t[9]===s?h=t[10]:(h=s?(0,G.jsx)(`span`,{role:`status`,className:`sr-only`,children:`Loading preview…`}):null,t[9]=s,t[10]=h);let g;return t[11]!==p||t[12]!==h?(g=(0,G.jsxs)(`span`,{className:c,children:[p,h]}),t[11]=p,t[12]=h,t[13]=g):g=t[13],g}function Ve(e){let t=(0,H.c)(10),{sandbox:n,title:r,url:i,loadState:a,onLoadStateChange:o}=e;if(a===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(Ue,{message:`Failed to load HTML preview.`,role:`alert`})}),t[0]=e):e=t[0],e}let s,c;t[1]===o?(s=t[2],c=t[3]):(s=()=>o(`loaded`),c=()=>o(`error`),t[1]=o,t[2]=s,t[3]=c);let l;return t[4]!==n||t[5]!==s||t[6]!==c||t[7]!==r||t[8]!==i?(l=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(`iframe`,{title:r,src:i,sandbox:n,style:ge,onLoad:s,onError:c})}),t[4]=n,t[5]=s,t[6]=c,t[7]=r,t[8]=i,t[9]=l):l=t[9],l}function He(e){let t=(0,H.c)(24),{file:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-lg bg-surface-raised text-muted-foreground`,children:(0,G.jsx)(m,{name:`File`,className:`size-6`,"aria-hidden":!0})}),t[0]=r):r=t[0];let i;t[1]===n.name?i=t[2]:(i=(0,G.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:n.name}),t[1]=n.name,t[2]=i);let a=n.mimeType,s;t[3]===n.sizeBytes?s=t[4]:(s=o(n.sizeBytes),t[3]=n.sizeBytes,t[4]=s);let c=`${a} · ${s}`,l;t[5]===c?l=t[6]:(l=(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c}),t[5]=c,t[6]=l);let u;t[7]!==i||t[8]!==l?(u=(0,G.jsxs)(`div`,{className:`flex max-w-full min-w-0 flex-col gap-1`,children:[i,l]}),t[7]=i,t[8]=l,t[9]=u):u=t[9];let d=n.reason===`too-large`?`This file is too large to preview.`:`This file type can't be previewed.`,f;t[10]===d?f=t[11]:(f=(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:d}),t[10]=d,t[11]=f);let p;t[12]!==n.name||t[13]!==n.url?(p=e=>{e.preventDefault(),L({url:n.url,fileName:n.name})},t[12]=n.name,t[13]=n.url,t[14]=p):p=t[14];let h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(m,{name:`Download`,"aria-hidden":!0}),t[15]=h):h=t[15];let g;t[16]!==n.name||t[17]!==n.url||t[18]!==p?(g=(0,G.jsx)(v,{asChild:!0,variant:`outline`,size:`sm`,children:(0,G.jsxs)(`a`,{href:n.url,download:n.name,onClick:p,children:[h,`Download`]})}),t[16]=n.name,t[17]=n.url,t[18]=p,t[19]=g):g=t[19];let _;return t[20]!==g||t[21]!==u||t[22]!==f?(_=(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-12 text-center`,children:[r,u,f,g]}),t[20]=g,t[21]=u,t[22]=f,t[23]=_):_=t[23],_}function Ue(e){let t=(0,H.c)(3),{message:n,role:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,G.jsx)(a,{role:r,className:`mx-4 mt-4 rounded-lg`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function We(e){let t=(0,H.c)(9),{file:n,lineOverflowMode:r,lineRange:i,onSelectionAddToChat:a,path:o}=e,s;t[0]===i?s=t[1]:(s=i===null?null:{start:i.startLineNumber,end:i.endLineNumber},t[0]=i,t[1]=s);let c=s,l=n.cacheKey??n.name,u;return t[2]!==n.contents||t[3]!==c||t[4]!==r||t[5]!==a||t[6]!==o||t[7]!==l?(u=(0,G.jsx)(V,{content:n.contents,path:o,cacheKey:l,overflow:r,highlightedLines:c,scrollToHighlightedLines:!0,onSelectionAddToChat:a}),t[2]=n.contents,t[3]=c,t[4]=r,t[5]=a,t[6]=o,t[7]=l,t[8]=u):u=t[8],u}export{W as i,de as n,ce as r,je as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r}from"./boot-vendor-BBLG7GwQ.js";import{An as i,Xt as a,ah as o,lh as s,ph as c,vc as l}from"./index-BzbTy_RW.js";import{t as u}from"./code-loading-skeletons--jaZzV7b.js";import{f as d,l as f,o as p,u as m}from"./git-diff-patch-text-BU3vRZ1H.js";import{t as h}from"./truncate-start-CZAtsv3e.js";import{n as g,r as _,t as v}from"./image-lightbox-BgcCqbkU.js";import{a as y}from"./absolute-file-path-DmSuTc6Y.js";import{n as b}from"./diff-stats-tally-BdXJ7zI4.js";import{t as x}from"./open-in-editor-button-sM_tzYa8.js";import{n as S,t as C}from"./file-path-link-DMRWp7p9.js";import{t as w}from"./DiffHost-BSG-APwq.js";var T=t(),E=e(n(),1),D=e(r(),1),O={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`};function k(e){return e===`modified`||e===`renamed`||e===`copied`}function ee(e){if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,200);return()=>window.clearTimeout(t)}function A(e,t,n){let r=d(e.name)??e.name,i=d(e.prevName)??r,a=t===`added`?{kind:`empty`,path:r}:{kind:`request`,path:t===`renamed`?i:r,side:`old`},o=t===`deleted`?{kind:`empty`,path:r}:{kind:`request`,path:r,side:`new`},s=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,j(a),j(o),s,n??``,e.deletionLines.join(``),e.additionLines.join(``)].join(`:`),old:a,new:o}}function j(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function te(e,t){return e.kind===`empty`?Promise.resolve({kind:`text`,file:{name:e.path,contents:``}}):t(e.path,e.side)}function M(e,t){return{old:{path:e.name,content:e.contents},new:{path:t.name,content:t.contents}}}function N(e,t){return e.hunks.length===0&&e.type!==`rename-pure`&&t!==void 0&&f(e.name)}function P(e,t){return e.type!==`rename-pure`&&t!==void 0&&m(e)}function F(e){let t=e.trim();return t.length===0?null:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function I(e){let t=(0,T.c)(75),{fileDiff:n,changeKind:r,onRequestFileContents:i,patchText:a,renderBeforeVisible:o}=e,s=r===`deleted`,c;t[0]!==n||t[1]!==i?(c=N(n,i),t[0]=n,t[1]=i,t[2]=c):c=t[2];let u=c,d;t[3]!==n||t[4]!==i?(d=P(n,i),t[3]=n,t[4]=i,t[5]=d):d=t[5];let f=d,m;t[6]===n?m=t[7]:(m=p(n),t[6]=n,t[7]=m);let h=m,g;t[8]!==r||t[9]!==n||t[10]!==a?(g=A(n,r,a),t[8]=r,t[9]=n,t[10]=a,t[11]=g):g=t[11];let _=g,v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v={initialIsIntersecting:!1,rootMargin:`200px`},t[12]=v):v=t[12];let{ref:y,isIntersecting:b}=S(v),x=(0,E.useRef)(i),C;t[13]===i?C=t[14]:(C=()=>{x.current=i},t[13]=i,t[14]=C),(0,E.useEffect)(C);let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={status:`idle`},t[15]=w):w=t[15];let[D,O]=(0,E.useState)(w),j=(0,E.useRef)(`idle`),[I,z]=(0,E.useState)(o),[B,V]=(0,E.useState)(!1),[U,W]=(0,E.useState)(0),[G,re]=(0,E.useState)(!1),K=l(),q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>{j.current=`idle`,O({status:`idle`}),V(!1),W(0),re(!1)},t[16]=q):q=t[16];let J;t[17]!==_.identity||t[18]!==u||t[19]!==f?(J=[_.identity,u,f],t[17]=_.identity,t[18]=u,t[19]=f,t[20]=J):J=t[20],(0,E.useEffect)(q,J);let Y,X;t[21]===b?(Y=t[22],X=t[23]):(Y=()=>{b&&z(!0)},X=[b],t[21]=b,t[22]=Y,t[23]=X),(0,E.useEffect)(Y,X);let ie=s&&!u&&!f&&!B,Z=I&&!ie,ae=u||f,oe;t[24]!==r||t[25]!==n||t[26]!==ae||t[27]!==i||t[28]!==a?(oe=!ae&&i!==void 0&&a!==void 0&&n.hunks.length>0&&k(r),t[24]=r,t[25]=n,t[26]=ae,t[27]=i,t[28]=a,t[29]=oe):oe=t[29];let Q=oe,$=Z&&(ae||Q&&U>0),se,ce;t[30]!==Q||t[31]!==U||t[32]!==K||t[33]!==Z?(se=()=>{if(!(K||!Z||!Q||U>0))return ee(()=>{W(L)})},ce=[Q,U,K,Z],t[30]=Q,t[31]=U,t[32]=K,t[33]=Z,t[34]=se,t[35]=ce):(se=t[34],ce=t[35]),(0,E.useEffect)(se,ce);let le;t[36]!==_.new||t[37]!==_.old||t[38]!==f||t[39]!==$?(le=()=>{if(!$||j.current!==`idle`)return;let e=x.current;if(!e)return;let t=!1;return j.current=`loading`,O({status:`loading`}),Promise.all([te(_.old,e),te(_.new,e)]).then(e=>{let[n,r]=e;if(t)return;let i=n?.kind===`image`?n:null,a=r?.kind===`image`?r:null;if(i!==null||a!==null){j.current=`ready-image`,O({status:`ready-image`,oldImageUrl:i?.dataUrl??null,newImageUrl:a?.dataUrl??null,oldSizeBytes:i?.sizeBytes??null,newSizeBytes:a?.sizeBytes??null});return}if(n?.kind!==`text`||r?.kind!==`text`){j.current=`unavailable`,O({status:`unavailable`});return}let o=M(n.file,r.file);if(f){j.current=`ready-svg`,O({status:`ready-svg`,fullFileContents:o,oldImageUrl:F(n.file.contents),newImageUrl:F(r.file.contents)});return}j.current=`ready`,O({status:`ready`,fullFileContents:o})}).catch(()=>{t||(j.current=`error`,O({status:`error`}))}),()=>{t=!0,j.current===`loading`&&(j.current=`idle`)}},t[36]=_.new,t[37]=_.old,t[38]=f,t[39]=$,t[40]=le):le=t[40];let ue;t[41]!==U||t[42]!==_||t[43]!==n||t[44]!==f||t[45]!==a||t[46]!==$?(ue=[U,_,n,f,a,$],t[41]=U,t[42]=_,t[43]=n,t[44]=f,t[45]=a,t[46]=$,t[47]=ue):ue=t[47],(0,E.useEffect)(le,ue);let de;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{j.current===`error`&&(j.current=`idle`,O({status:`idle`})),re(!0),W(ne)},t[48]=de):de=t[48];let fe=de,pe=U>0,me=!K,he;t[49]!==Q||t[50]!==D.status||t[51]!==G||t[52]!==pe||t[53]!==me?(he=R({canExpandContext:Q,contextRequested:pe,enrichmentStatus:D.status,isPrefetchedAutomatically:me,isRequestedByUser:G}),t[49]=Q,t[50]=D.status,t[51]=G,t[52]=pe,t[53]=me,t[54]=he):he=t[54];let ge=he,_e;t[55]===ge?_e=t[56]:(_e={status:ge,request:fe},t[55]=ge,t[56]=_e);let ve=_e,ye=D.status===`ready`||D.status===`ready-svg`?D.fullFileContents:null,be;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>{V(!0),z(!0)},t[57]=be):be=t[57];let xe=be,Se;t[58]!==r||t[59]!==D||t[60]!==u?(Se=u&&D.status===`ready-image`?H(D,r):null,t[58]=r,t[59]=D,t[60]=u,t[61]=Se):Se=t[61];let Ce=Se,we;return t[62]!==y||t[63]!==ve||t[64]!==D||t[65]!==n||t[66]!==h||t[67]!==ye||t[68]!==Ce||t[69]!==u||t[70]!==f||t[71]!==a||t[72]!==ie||t[73]!==Z?(we={bodySentinelRef:y,enrichment:D,fileDiff:n,fileDiffLabel:h,isImageCard:u,isSvgPreviewCard:f,shouldGateDeletedDiff:ie,shouldRenderDiffView:Z,loadDeletedDiff:xe,imageSizeStat:Ce,contextExpansion:ve,fullFileContents:ye,patchText:a},t[62]=y,t[63]=ve,t[64]=D,t[65]=n,t[66]=h,t[67]=ye,t[68]=Ce,t[69]=u,t[70]=f,t[71]=a,t[72]=ie,t[73]=Z,t[74]=we):we=t[74],we}function ne(e){return e+1}function L(e){return e===0?1:e}function R({canExpandContext:e,contextRequested:t,enrichmentStatus:n,isPrefetchedAutomatically:r,isRequestedByUser:i}){if(!e)return`unavailable`;let a=i?`loading`:`prefetching`;switch(n){case`idle`:return t?a:r?`prefetching`:`idle`;case`loading`:return a;case`ready`:return`ready`;case`error`:return`error`;case`ready-image`:case`ready-svg`:case`unavailable`:return`unavailable`;default:return n}}function z(e,t){let n=e!==null&&t!==null,r=[];return e!==null&&r.push({url:e,caption:n?`Old`:null}),t!==null&&r.push({url:t,caption:n?`New`:null}),r}function B(e,t){return t.caption===null?e:`${e} (${t.caption.toLowerCase()})`}function V(e){return e.status!==`ready-image`&&e.status!==`ready-svg`?null:{oldImageUrl:e.oldImageUrl,newImageUrl:e.newImageUrl}}function H(e,t){let n=t===`deleted`?null:e.newSizeBytes,r=t===`added`?null:e.oldSizeBytes;return n===null&&r===null?null:{addedBytes:n,removedBytes:r}}function U(e){let t=(0,T.c)(32),{preview:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i,[o,s]=(0,E.useState)(null),c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n.newImageUrl||t[4]!==n.oldImageUrl){h=Symbol.for(`react.early_return_sentinel`);bb0:{if(l=z(n.oldImageUrl,n.newImageUrl),l.length===0){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[13]=e):e=t[13],h=e;break bb0}let e=o===null?void 0:l[o];u=e=>{s(t=>t===null?null:_({currentIndex:t,direction:e,itemCount:l.length}))};let i;t[14]!==r||t[15]!==a?(i=(e,t)=>(0,D.jsxs)(`figure`,{className:`min-w-0 max-w-full`,children:[(0,D.jsx)(`button`,{type:`button`,className:a?`flex h-64 w-full cursor-zoom-in items-center justify-center rounded-md border border-border bg-surface-recessed p-3`:`block max-w-full cursor-zoom-in`,onClick:()=>s(t),children:(0,D.jsx)(`img`,{src:e.url,alt:B(r,e),style:v,className:a?`block h-full w-full object-contain`:`block max-h-80 max-w-full rounded-md border border-border object-contain`})}),e.caption===null?null:(0,D.jsx)(`figcaption`,{className:`mt-1 text-xs text-muted-foreground`,children:e.caption})]},e.url),t[14]=r,t[15]=a,t[16]=i):i=t[16],m=(0,D.jsx)(`div`,{className:`@container/diff-preview min-w-0`,children:(0,D.jsx)(`div`,{className:a?l.length>1?`grid grid-cols-1 gap-3 px-3 py-3 @min-[32rem]/diff-preview:grid-cols-2`:`grid grid-cols-1 gap-3 px-3 py-3`:`flex flex-col items-start gap-3 px-3 py-3 @min-[32rem]/diff-preview:flex-row`,children:l.map(i)})}),c=g,d=`${r} image preview`,f=e?.url??null,p=e?B(r,e):r}t[0]=o,t[1]=r,t[2]=a,t[3]=n.newImageUrl,t[4]=n.oldImageUrl,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h}else c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let y=l.length>1,b,x;t[17]===u?(b=t[18],x=t[19]):(b=()=>u(`previous`),x=()=>u(`next`),t[17]=u,t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>s(null),t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p||t[25]!==y||t[26]!==b||t[27]!==x?(C=(0,D.jsx)(c,{title:d,imageSrc:f,imageAlt:p,hasMultipleImages:y,onPrevious:b,onNext:x,onClose:S}),t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=y,t[26]=b,t[27]=x,t[28]=C):C=t[28];let w;return t[29]!==C||t[30]!==m?(w=(0,D.jsxs)(D.Fragment,{children:[m,C]}),t[29]=C,t[30]=m,t[31]=w):w=t[31],w}function W(e){let t=(0,T.c)(8),{enrichment:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i;if(n.status===`idle`||n.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(u,{}),t[0]=e):e=t[0],e}let o;t[1]===n?o=t[2]:(o=V(n),t[1]=n,t[2]=o);let s=o;if(s===null){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[3]=e):e=t[3],e}let c;return t[4]!==r||t[5]!==a||t[6]!==s?(c=(0,D.jsx)(U,{preview:s,fileDiffLabel:r,fitToFrame:a}),t[4]=r,t[5]=a,t[6]=s,t[7]=c):c=t[7],c}function G(e){let t=(0,T.c)(9),{displayMode:n,enrichment:r,fileDiff:i,fileDiffLabel:a,patchText:o,fullFileContents:s,presentation:c,onSelectionAddToChat:l}=e,u;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==o||t[7]!==c?(u=n===`preview`?(0,D.jsx)(W,{enrichment:r,fileDiffLabel:a,fitToFrame:!0}):(0,D.jsx)(w,{file:i,patchText:o,fullFileContents:s,...c,onSelectionAddToChat:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=o,t[7]=c,t[8]=u):u=t[8],u}function re(e){let t=(0,T.c)(19),{state:n,presentation:r,svgDisplayMode:i,reservesCollapseGutter:a,onSelectionAddToChat:o}=e,{bodySentinelRef:c,enrichment:l,fileDiff:d,fileDiffLabel:f,isImageCard:p,isSvgPreviewCard:m,shouldGateDeletedDiff:h,shouldRenderDiffView:g,loadDeletedDiff:_,contextExpansion:v,fullFileContents:y,patchText:b}=n,x;t[0]!==v||t[1]!==l||t[2]!==d||t[3]!==f||t[4]!==y||t[5]!==p||t[6]!==m||t[7]!==_||t[8]!==o||t[9]!==b||t[10]!==r||t[11]!==a||t[12]!==h||t[13]!==g||t[14]!==i?(x=h?(0,D.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[a?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,D.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,D.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,D.jsx)(s,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:_,children:`Load diff`})]})]}):g?p?(0,D.jsx)(W,{enrichment:l,fileDiffLabel:f}):m?(0,D.jsx)(G,{displayMode:i,enrichment:l,fileDiff:d,fileDiffLabel:f,patchText:b,fullFileContents:y,presentation:r,onSelectionAddToChat:o}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{file:d,patchText:b,fullFileContents:y,...r,onSelectionAddToChat:o}),(0,D.jsx)(K,{contextExpansion:v,reservesCollapseGutter:a})]}):(0,D.jsx)(u,{}),t[0]=v,t[1]=l,t[2]=d,t[3]=f,t[4]=y,t[5]=p,t[6]=m,t[7]=_,t[8]=o,t[9]=b,t[10]=r,t[11]=a,t[12]=h,t[13]=g,t[14]=i,t[15]=x):x=t[15];let S;return t[16]!==c||t[17]!==x?(S=(0,D.jsx)(`div`,{ref:c,className:`overflow-hidden rounded-b-lg bg-background`,style:O,children:x}),t[16]=c,t[17]=x,t[18]=S):S=t[18],S}function K(e){let t=(0,T.c)(8),{contextExpansion:n,reservesCollapseGutter:r}=e,{status:i,request:a}=n;if(i===`unavailable`||i===`ready`||i===`prefetching`)return null;let o;t[0]===r?o=t[1]:(o=r?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,t[0]=r,t[1]=o);let c;t[2]!==a||t[3]!==i?(c=(0,D.jsx)(`span`,{className:`pl-[1ch]`,children:i===`loading`?(0,D.jsx)(`span`,{role:`status`,children:`Loading context…`}):(0,D.jsxs)(D.Fragment,{children:[i===`error`?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`text-destructive`,children:`Couldn't load surrounding context.`}),` `]}):null,(0,D.jsx)(s,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:a,children:i===`error`?`Retry`:`Expand context`})]})}),t[2]=a,t[3]=i,t[4]=c):c=t[4];let l;return t[5]!==o||t[6]!==c?(l=(0,D.jsxs)(`div`,{className:`flex items-center py-2 pl-2 pr-3 text-xs text-muted-foreground`,children:[o,c]}),t[5]=o,t[6]=c,t[7]=l):l=t[7],l}function q(e){let t=(0,T.c)(7),{stat:n}=e,r;t[0]===n.addedBytes?r=t[1]:(r=n.addedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-added`,children:`+${i(n.addedBytes)}`}),t[0]=n.addedBytes,t[1]=r);let a;t[2]===n.removedBytes?a=t[3]:(a=n.removedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-removed`,children:`-${i(n.removedBytes)}`}),t[2]=n.removedBytes,t[3]=a);let o;return t[4]!==r||t[5]!==a?(o=(0,D.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-xs tabular-nums`,children:[r,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function J(e){let t=(0,T.c)(5),{fileLabel:n,isRaw:r,onToggle:i}=e,a=r?`Show image preview for ${n}`:`Show raw SVG diff for ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,D.jsx)(o,{name:`Code`,"aria-hidden":!0,className:`size-3.5`}),t[0]=s):s=t[0];let c;return t[1]!==r||t[2]!==a||t[3]!==i?(c=(0,D.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-pressed:bg-state-active aria-pressed:text-foreground`,onClick:i,"aria-label":a,"aria-pressed":r,children:s}),t[1]=r,t[2]=a,t[3]=i,t[4]=c):c=t[4],c}function Y(e,t){return e.changeKind!==`renamed`&&e.changeKind!==`copied`?null:t&&t!==e.path?{from:t,to:e.path}:null}function X(e){let t=(0,T.c)(53),{model:n,previousPath:r,filePathRoot:i,onOpenFileInEditor:s,onOpenFilePreview:l,isCollapsed:u,onToggleCollapsed:d,hasChanges:f,statSlot:p,actionSlot:m}=e,g=n.changeKind===`added`,_=n.changeKind===`deleted`,v=_?0:n.insertions,S=g?0:n.deletions,w=g||_,E;t[0]!==n||t[1]!==r?(E=Y(n,r),t[0]=n,t[1]=r,t[2]=E):E=t[2];let O=E,k=n.openablePath,ee;t[3]!==i||t[4]!==k?(ee=k?y({path:k,rootPath:i}):null,t[3]=i,t[4]=k,t[5]=ee):ee=t[5];let A=ee,j=!!k,te=u!==void 0&&d!==void 0,M;t[6]!==f||t[7]!==u||t[8]!==n.label||t[9]!==d||t[10]!==te?(M=te?(0,D.jsx)(`button`,{type:`button`,className:c(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,f?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:f?d:void 0,disabled:!f,"aria-label":f?`${u?`Expand`:`Collapse`} ${n.label}`:`${n.label} has no changes to expand`,"aria-expanded":f?!u:void 0,children:(0,D.jsx)(o,{name:`ChevronRight`,className:c(`size-3.5 shrink-0 transition-transform duration-150`,f&&!u&&`rotate-90`)})}):null,t[6]=f,t[7]=u,t[8]=n.label,t[9]=d,t[10]=te,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=c(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),t[12]=N):N=t[12];let P;t[13]===O?P=t[14]:(P=O?(0,D.jsx)(h,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:O.from,children:O.from}):null,t[13]=O,t[14]=P);let F;t[15]===O?F=t[16]:(F=O?(0,D.jsx)(o,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,t[15]=O,t[16]=F);let I=k??n.path,ne=O?O.to:n.label,L;t[17]!==j||t[18]!==l||t[19]!==k?(L=j&&k&&l?()=>l(k):void 0,t[17]=j,t[18]=l,t[19]=k,t[20]=L):L=t[20];let R;t[21]!==I||t[22]!==ne||t[23]!==L?(R=(0,D.jsx)(C,{path:I,displayName:ne,onClick:L,className:`font-mono font-medium text-foreground`}),t[21]=I,t[22]=ne,t[23]=L,t[24]=R):R=t[24];let z;t[25]!==A||t[26]!==n.label?(z=A?(0,D.jsx)(a,{text:A,label:`Copy path for ${n.label}`,className:`rounded-md hover:bg-state-hover`}):null,t[25]=A,t[26]=n.label,t[27]=z):z=t[27];let B;t[28]!==j||t[29]!==n.label||t[30]!==s||t[31]!==k?(B=j&&k&&s?(0,D.jsx)(x,{onClick:()=>s(k),label:`Open ${n.label} in editor`}):null,t[28]=j,t[29]=n.label,t[30]=s,t[31]=k,t[32]=B):B=t[32];let V;t[33]!==R||t[34]!==z||t[35]!==B||t[36]!==P||t[37]!==F?(V=(0,D.jsxs)(`span`,{className:N,children:[P,F,R,z,B]}),t[33]=R,t[34]=z,t[35]=B,t[36]=P,t[37]=F,t[38]=V):V=t[38];let H;t[39]!==V||t[40]!==M?(H=(0,D.jsxs)(`span`,{className:`flex min-w-0 grow basis-48 items-center`,children:[M,V]}),t[39]=V,t[40]=M,t[41]=H):H=t[41];let U;t[42]!==S||t[43]!==v||t[44]!==w||t[45]!==p?(U=p??(0,D.jsx)(b,{insertions:v,deletions:S,hideZero:w,className:`text-xs`}),t[42]=S,t[43]=v,t[44]=w,t[45]=p,t[46]=U):U=t[46];let W;t[47]!==m||t[48]!==U?(W=(0,D.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[U,m]}),t[47]=m,t[48]=U,t[49]=W):W=t[49];let G;return t[50]!==H||t[51]!==W?(G=(0,D.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center justify-between gap-x-2 gap-y-1`,children:[H,W]}),t[50]=H,t[51]=W,t[52]=G):G=t[52],G}var ie=`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`;function Z({stickyHeader:e,isBodyHidden:t,isStuck:n,showStuckHeaderEdge:r=!0}){return c(ie,e&&`sticky z-30`,e&&`top-0`,!t&&`rounded-b-none`,n&&`rounded-t-none`,n&&r&&`shadow-[inset_0_1px_0_var(--border)]`)}export{re as a,I as c,Z as i,q as n,U as o,J as r,H as s,X as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r}from"./boot-vendor-BBLG7GwQ.js";import{ah as i,lh as a,ph as o}from"./index-BzbTy_RW.js";import{o as s}from"./queued-editor-typeahead-layout-b6r7lwA4.js";var c=t(),l=e(n(),1),u=e(r(),1),d=`bg-background shadow-xs`,f=`cursor-pointer text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60`,p=o(`inline-flex items-center whitespace-nowrap rounded border border-border px-1.5 py-0.5 text-xs`,d,f);o(`text-xs`,f,`focus-visible:z-10`);var m=(0,l.forwardRef)(function(e,t){let n=(0,c.c)(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,type:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let s=a===void 0?`button`:a,l;n[4]===r?l=n[5]:(l=o(p,r),n[4]=r,n[5]=l);let d;return n[6]!==i||n[7]!==t||n[8]!==l||n[9]!==s?(d=(0,u.jsx)(`button`,{ref:t,type:s,className:l,...i}),n[6]=i,n[7]=t,n[8]=l,n[9]=s,n[10]=d):d=n[10],d}),h=`relative bg-surface-raised-solid before:pointer-events-none before:absolute before:inset-y-0 before:right-full before:w-4 before:bg-gradient-to-r before:from-transparent before:to-surface-raised-solid before:content-['']`;function g(e){let t=(0,c.c)(4),{children:n,hideInCompact:r,hideInTiny:i}=e,a=r===void 0?!1:r,o=i===void 0?!0:i,s=a?``:void 0,l=o?``:void 0,d;return t[0]!==n||t[1]!==s||t[2]!==l?(d=(0,u.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-2 text-xs text-muted-foreground`,"data-promptbox-hide-compact":s,"data-promptbox-hide-tiny":l,children:n}),t[0]=n,t[1]=s,t[2]=l,t[3]=d):d=t[3],d}function _(e){let t=(0,c.c)(27),{cancelLabel:n,children:r,label:l,onCancel:d,variant:f}=e,p=f===void 0?`embedded`:f,m=p===`cap`?`h-8 px-3`:`mb-1.5 pl-1`,h;t[0]===m?h=t[1]:(h=o(`flex min-h-7 items-center gap-1.5 text-xs text-subtle-foreground`,m),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,u.jsx)(i,{name:`Edit`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[2]=g):g=t[2];let _=p===`cap`&&`font-medium`,v;t[3]===_?v=t[4]:(v=o(`shrink-0`,_),t[3]=_,t[4]=v);let y;t[5]!==l||t[6]!==v?(y=(0,u.jsx)(`span`,{className:v,children:l}),t[5]=l,t[6]=v,t[7]=y):y=t[7];let b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,u.jsx)(i,{name:`X`,className:`size-3`,"aria-hidden":!0}),t[8]=b):b=t[8];let x;t[9]!==n||t[10]!==d?(x=(0,u.jsx)(a,{type:`button`,size:`icon`,variant:`ghost`,className:`ml-auto size-6 shrink-0 text-subtle-foreground`,onClick:d,"aria-label":n,children:b}),t[9]=n,t[10]=d,t[11]=x):x=t[11];let S;t[12]!==h||t[13]!==y||t[14]!==x?(S=(0,u.jsxs)(`div`,{className:h,children:[g,y,x]}),t[12]=h,t[13]=y,t[14]=x,t[15]=S):S=t[15];let C=S;if(p===`cap`){let e;t[16]!==C||t[17]!==l?(e=(0,u.jsx)(s,{ariaLabel:l,className:`relative z-10 -mb-5 rounded-xl rounded-b-none border-b-0 bg-surface-raised-solid pb-3 shadow-lift`,children:C}),t[16]=C,t[17]=l,t[18]=e):e=t[18];let n;t[19]===r?n=t[20]:(n=(0,u.jsx)(`div`,{className:`relative z-20`,children:r}),t[19]=r,t[20]=n);let i;return t[21]!==e||t[22]!==n?(i=(0,u.jsxs)(`div`,{className:`relative z-20 space-y-2`,"data-inline-message-editor-frame":`cap`,children:[e,n]}),t[21]=e,t[22]=n,t[23]=i):i=t[23],i}let w;return t[24]!==r||t[25]!==C?(w=(0,u.jsxs)(`div`,{className:`relative z-20`,"data-inline-message-editor-frame":`embedded`,children:[C,r]}),t[24]=r,t[25]=C,t[26]=w):w=t[26],w}export{m as i,g as n,h as r,_ as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,ni as n}from"./boot-vendor-BBLG7GwQ.js";import{ah as r,bt as i,ph as a}from"./index-BzbTy_RW.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(3),{provider:n,className:r}=e,a;return t[0]!==r||t[1]!==n?(a=(0,s.jsx)(i,{providerKind:`machine`,provider:n,fallback:`Zap`,className:r}),t[0]=r,t[1]=n,t[2]=a):a=t[2],a}function l(e,t){return e.type!==`ephemeral`||e.machineProviderId===null?null:t?.id===e.machineProviderId?t:{id:e.machineProviderId,displayName:e.machineProviderId,icon:`ComputerCloud`,logoUrl:null}}function u(e){let t=(0,o.c)(12),{host:n,machineProvider:i,className:u}=e,d;t[0]!==n||t[1]!==i?(d=l(n,i),t[0]=n,t[1]=i,t[2]=d):d=t[2];let f=d;if(f===null){let e;t[3]===u?e=t[4]:(e=a(`size-3.5 shrink-0`,u),t[3]=u,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,s.jsx)(r,{name:`Laptop`,className:e,"aria-hidden":!0}),t[5]=e,t[6]=n),n}let p;t[7]===u?p=t[8]:(p=a(`size-3.5 shrink-0`,u),t[7]=u,t[8]=p);let m;return t[9]!==f||t[10]!==p?(m=(0,s.jsx)(c,{provider:f,className:p}),t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function d(e){let t=(0,o.c)(15),{host:n,machineProvider:r,className:i,iconClassName:c,nameClassName:l}=e,d;t[0]===i?d=t[1]:(d=a(`inline-flex min-w-0 items-center gap-1.5`,i),t[0]=i,t[1]=d);let f;t[2]!==n||t[3]!==c||t[4]!==r?(f=(0,s.jsx)(u,{host:n,machineProvider:r,className:c}),t[2]=n,t[3]=c,t[4]=r,t[5]=f):f=t[5];let p;t[6]===l?p=t[7]:(p=a(`min-w-0 truncate`,l),t[6]=l,t[7]=p);let m;t[8]!==n.name||t[9]!==p?(m=(0,s.jsx)(`span`,{className:p,children:n.name}),t[8]=n.name,t[9]=p,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==f||t[13]!==m?(h=(0,s.jsxs)(`span`,{className:d,children:[f,m]}),t[11]=d,t[12]=f,t[13]=m,t[14]=h):h=t[14],h}export{d as n,u as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Kr as t,Or as n,Zr as r,mi as i,ni as a,ti as o}from"./boot-vendor-BBLG7GwQ.js";import{Cd as s,Co as c,D as l,Hr as u,Ji as d,Qs as f,So as p,T as m,Wr as h,Xi as g,Yg as _,_ as v,ah as y,b,bo as x,ea as S,ka as C,lh as w,ph as T,qo as E,sc as D,vo as O,wt as k,x as A,xo as j,y as M,yo as N}from"./index-BzbTy_RW.js";import{B as P}from"./resource-list-DEdVfbWY.js";import{n as F}from"./AddMachineDialog-CA-hjDCT.js";import{t as I}from"./checkbox-C4TJY0rC.js";import{t as L}from"./update-state-CuYJKY13.js";import{n as R,t as z}from"./host-mutations-Bad0cc2n.js";var B=n(),V=()=>[`machine-inventory`];function H({queryClient:e}){return e.invalidateQueries({queryKey:V()})}var U=e(a(),1),ee=[{role:`workloads`,title:`Workloads`,description:`Default place for new work.`},{role:`request`,title:`On request`,description:`Only work you ask for, in a folder listed under Access.`},{role:`none`,title:`None`,description:`Your moonlet starts nothing here.`}];function te(e){let n=(0,B.c)(32),{hostId:i}=e,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={includeCreating:!0},n[0]=a):a=n[0];let s=d(a),c=o(),l;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={queryKey:V(),queryFn:re,refetchInterval:5e3},n[1]=l):l=n[1];let u=r(l),f;n[2]===c?f=n[3]:(f={mutationFn:ne,onSuccess:async()=>{await H({queryClient:c})}},n[2]=c,n[3]=f);let p=t(f);if(u.isError){let e;return n[4]===u.error.message?e=n[5]:(e=(0,U.jsxs)(`p`,{role:`alert`,children:[`Could not load machine roles: `,u.error.message]}),n[4]=u.error.message,n[5]=e),e}if(!u.data){let e;return n[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{children:`Loading roles…`}),n[6]=e):e=n[6],e}let m;if(n[7]!==i||n[8]!==s||n[9]!==u.data.roles||n[10]!==p){let e;n[12]===i?e=n[13]:(e=e=>i===void 0||e.hostId===i,n[12]=i,n[13]=e);let t;n[14]!==s||n[15]!==p?(t=e=>(0,U.jsxs)(`fieldset`,{className:`space-y-2`,children:[(0,U.jsx)(`legend`,{className:`text-sm font-medium`,children:s.data?.find(t=>t.id===e.hostId)?.name??e.hostId}),ee.map(t=>(0,U.jsxs)(`label`,{className:`flex items-start gap-3 rounded-md border border-border p-3 text-sm`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`role-${e.hostId}`,checked:e.role===t.role,disabled:p.isPending||e.isServer&&t.role!==`none`||t.role===`workloads`&&!e.supportsWorkloads,onChange:()=>p.mutate({hostId:e.hostId,role:t.role})}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:`block font-medium`,children:t.title}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.description})]})]},t.role)),!e.isServer&&!e.supportsWorkloads?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Workloads needs a machine already prepared for isolated work.`}):null,e.isServer?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This machine runs the server, so it can only be None. Your moonlet and the server never share a machine.`}):null]},e.hostId),n[14]=s,n[15]=p,n[16]=t):t=n[16],m=u.data.roles.filter(e).map(t),n[7]=i,n[8]=s,n[9]=u.data.roles,n[10]=p,n[11]=m}else m=n[11];let h;n[17]!==p.error||n[18]!==p.isError?(h=p.isError?(0,U.jsx)(`p`,{role:`alert`,children:p.error.message}):null,n[17]=p.error,n[18]=p.isError,n[19]=h):h=n[19];let g;if(n[20]!==i||n[21]!==s||n[22]!==u.data.records){let e;n[24]===i?e=n[25]:(e=e=>i===void 0||e.hostId===i,n[24]=i,n[25]=e);let t;n[26]===s?t=n[27]:(t=e=>(0,U.jsx)(ie,{record:e,machineName:e=>s.data?.find(t=>t.id===e)?.name??e},`${e.kind}:${e.name}`),n[26]=s,n[27]=t),g=u.data.records.filter(e).map(t),n[20]=i,n[21]=s,n[22]=u.data.records,n[23]=g}else g=n[23];let _;return n[28]!==m||n[29]!==h||n[30]!==g?(_=(0,U.jsx)(P,{title:`Role`,description:`What your moonlet may start on each machine.`,children:(0,U.jsxs)(`div`,{className:`space-y-6 p-4`,children:[m,h,g]})}),n[28]=m,n[29]=h,n[30]=g,n[31]=_):_=n[31],_}function ne(e){let{hostId:t,role:n}=e;return s.hosts.experimental_setRole({hostId:t,role:n})}function re(){return s.hosts.experimental_inventory()}function ie(e){let t=(0,B.c)(13),{record:n,machineName:r}=e,i;if(t[0]!==r||t[1]!==n.hostId||t[2]!==n.managedFrom||t[3]!==n.name||t[4]!==n.record){let e=[{title:`Connection`,fields:[[`gate`,`Gate`],[`tunnel`,`Tunnel`]]},{title:`Hardware and accounts`,fields:[[`os`,`System`],[`driver`,`Virtual machine`],[`admin_user`,`Administrator`],[`desktop_user`,`Desktop user`],[`cpus`,`CPU cores`],[`memory_gb`,`Memory (GB)`],[`disk_gb`,`Disk (GB)`],[`hypervisor`,`Host`],[`server`,`Host record`],[`region`,`Region`],[`profile`,`Cloud profile`],[`instance_type`,`Instance type`]]},{title:`Installed`,fields:Object.entries(n.record).filter(q).sort(K).map(W)},{title:`Other saved settings`,fields:[[`orbit_thread`,`Conversation machine`],[`mail`,`Mail`],[`events`,`Event rules`]]}],a=ae,o;t[6]===n.name?o=t[7]:(o=(0,U.jsx)(`h3`,{className:`text-sm font-medium`,children:n.name}),t[6]=n.name,t[7]=o);let s;t[8]===n.hostId?s=t[9]:(s=n.hostId===null?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Offline or not enrolled. Its saved settings stay here.`}):null,t[8]=n.hostId,t[9]=s);let c;t[10]!==r||t[11]!==n.managedFrom?(c=n.managedFrom?(0,U.jsxs)(`div`,{className:`text-sm`,children:[(0,U.jsx)(`h4`,{className:`font-medium`,children:`Managed from`}),(0,U.jsx)(`p`,{children:r(n.managedFrom)})]}):null,t[10]=r,t[11]=n.managedFrom,t[12]=c):c=t[12],i=(0,U.jsxs)(`section`,{className:`space-y-4 border-t border-border pt-4`,children:[o,s,c,e.map(e=>{let t=e.fields.filter(e=>{let[t]=e;return n.record[t]!==void 0});return t.length>0?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`text-sm font-medium`,children:e.title}),(0,U.jsx)(`dl`,{className:`divide-y divide-border text-sm`,children:t.map(e=>{let[t,r]=e;return(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-2 py-2`,children:[(0,U.jsx)(`dt`,{children:r}),(0,U.jsx)(`dd`,{className:`break-all text-xs`,children:a(n.record[t])})]},t)})})]},e.title):null})]}),t[0]=r,t[1]=n.hostId,t[2]=n.managedFrom,t[3]=n.name,t[4]=n.record,t[5]=i}else i=t[5];return i}function ae(e){return typeof e==`boolean`?e?`On`:`Off`:typeof e==`string`?e===`macos`?`macOS`:e===`linux`?`Linux`:e:JSON.stringify(e)}function W(e){let[t]=e;return[t,t===`vms`?`Virtual machines`:t.replace(/_/g,` `).replace(/^./,G)]}function G(e){return e.toUpperCase()}function K(e,t){let[n]=e,[r]=t;return n.localeCompare(r)}function q(e){let[t,n]=e;return typeof n==`boolean`&&![`orbit_thread`,`mail`].includes(t)}function J(e){return e.phase===`removing`&&e.teardown?.status===`failed`?`Cleanup failed`:e.phase===`suspending`?`Pausing`:e.phase===`suspended`?`Paused`:e.phase===`resuming`?`Resuming`:e.phase===`removing`?`Removing`:null}function oe(e){return J(e.lifecycle)===`Cleanup failed`?`failed`:e.lifecycle.phase===`removing`||e.lifecycle.phase===`suspending`||e.lifecycle.phase===`resuming`||e.status===`connected`&&e.delivery?.state===`stalled`?`attention`:e.status===`connected`?`online`:`offline`}function se({host:e,now:t}){let n=[],r=J(e.lifecycle);return n.push(r??(e.status===`connected`?e.delivery?.state===`stalled`?`Delivery stalled`:`Online`:`Offline`)),e.lifecycle.message===null?e.status!==`connected`&&e.lastSeenAt!==null&&n.push(`last seen ${C({timestamp:e.lastSeenAt,now:t})}`):n.push(e.lifecycle.message),n.join(` · `)}function ce(e){return e.status!==`connected`&&e.lifecycle.phase===`active`}function le(e){return e.status!==`connected`&&e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`}var ue=5;function Y(e){return e?`The server machine can't be removed. Move the server to another machine first.`:`The server machine can't be removed.`}function X(e){return e.type===`ephemeral`?`The compute and its saved snapshots are deleted. Its environments remain as read-only history.`:e.machineProviderId===null?`Project checkouts stay on its disk, but its environments become read-only history and it cannot run new work until paired again.`:`The provider cleans up resources it owns. Its environments remain as read-only history.`}function de(e){let t=(0,B.c)(14),{hostId:n}=e,r;t[0]===n?r=t[1]:(r={hostId:n,limit:ue},t[0]=n,t[1]=r);let i=D(r);if(i.data===void 0||i.data.total===0)return null;let{threads:a,total:o}=i.data,s=o-a.length,c=o===1?`1 unarchived thread on this machine:`:`${o} unarchived threads on this machine:`,l;t[2]===c?l=t[3]:(l=(0,U.jsx)(`p`,{children:c}),t[2]=c,t[3]=l);let u;t[4]===a?u=t[5]:(u=a.map(fe),t[4]=a,t[5]=u);let d;t[6]===u?d=t[7]:(d=(0,U.jsx)(`ul`,{className:`list-disc space-y-0.5 pl-5 text-foreground marker:text-subtle-foreground`,children:u}),t[6]=u,t[7]=d);let f;t[8]===s?f=t[9]:(f=s>0?(0,U.jsxs)(`p`,{children:[`and `,s,` more`]}):null,t[8]=s,t[9]=f);let p;return t[10]!==l||t[11]!==d||t[12]!==f?(p=(0,U.jsxs)(`div`,{className:`space-y-1 text-sm text-muted-foreground`,children:[l,d,f]}),t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function fe(e){return(0,U.jsx)(`li`,{children:(0,U.jsx)(`span`,{className:`block truncate`,children:f(e)})},e.id)}function pe(e){let t=(0,B.c)(15),{target:n,onOpenChange:r,onRemoved:i}=e,a=R(),o;t[0]===n?o=t[1]:(o=n!==null&&le(n),t[0]=n,t[1]=o);let s=o,l=n!==null,u;t[2]!==r||t[3]!==a?(u=e=>{!e&&!a.isPending&&(a.reset(),r(!1))},t[2]=r,t[3]=a,t[4]=u):u=t[4];let d;t[5]!==s||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==n?(d=n===null?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(p,{children:[(0,U.jsxs)(c,{children:[`Remove `,n.name,`?`]}),(0,U.jsx)(x,{children:s?(0,U.jsxs)(U.Fragment,{children:[`Cleanup failed and `,n.name,` is not connected. Removing it now skips environment cleanup on the machine: files and worktrees left on its disk are not deleted, and its environments become read-only history. The machine provider's removal still runs. Use this only if the machine is gone or will not come back.`]}):(0,U.jsxs)(U.Fragment,{children:[`This revokes `,n.name,`'s access to this server.`,` `,X(n)]})})]}),(0,U.jsx)(de,{hostId:n.id}),a.isError?(0,U.jsx)(`p`,{className:`text-sm text-destructive`,role:`alert`,children:E({error:a.error,fallbackMessage:`Couldn't remove ${n.name}.`})}):null,(0,U.jsx)(j,{children:(0,U.jsx)(w,{type:`button`,variant:`destructive`,disabled:a.isPending,onClick:()=>a.mutate({hostId:n.id,force:s},{onSuccess:()=>{r(!1),i?.(n)}}),children:s?`Remove anyway`:`Remove machine`})})]}),t[5]=s,t[6]=r,t[7]=i,t[8]=a,t[9]=n,t[10]=d):d=t[10];let f;return t[11]!==l||t[12]!==u||t[13]!==d?(f=(0,U.jsx)(h,{open:l,onOpenChange:u,children:d}),t[11]=l,t[12]=u,t[13]=d,t[14]=f):f=t[14],f}function Z(e,t){return t?.supportsSuspend&&e.lifecycle.phase===`active`?{icon:`Pause`,label:`Suspend`,kind:`suspend`}:t?.supportsSuspend&&e.lifecycle.phase===`suspended`?{icon:`Play`,label:`Resume`,kind:`resume`}:e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`?{icon:`RotateCcw`,label:`Retry cleanup`,kind:`retry-cleanup`}:null}function me(e){let t=(0,B.c)(10),{host:n,machineProvider:r,pending:i,onSuspend:a,onResume:o,onRetryCleanup:s}=e,c;t[0]!==n||t[1]!==r?(c=Z(n,r),t[0]=n,t[1]=r,t[2]=c):c=t[2];let l=c;if(l===null)return null;let u=l.kind===`suspend`?a:l.kind===`resume`?o:s,d;t[3]===l.icon?d=t[4]:(d=(0,U.jsx)(y,{name:l.icon,className:`size-3.5`,"aria-hidden":!0}),t[3]=l.icon,t[4]=d);let f;return t[5]!==l.label||t[6]!==u||t[7]!==i||t[8]!==d?(f=(0,U.jsxs)(w,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:u,children:[d,l.label]}),t[5]=l.label,t[6]=u,t[7]=i,t[8]=d,t[9]=f):f=t[9],f}function he(e){let t=[{id:`rename`,label:`Rename`,icon:`Edit`,onSelect:e.onRename}];ce(e.host)&&t.push({id:`reconnect`,label:`Reconnect`,icon:`RotateCcw`,onSelect:e.onReconnect});let n=e.onRetryUpdate;n!==void 0&&k(e.host)&&t.push({id:`retry-update`,label:e.retryUpdatePending??!1?`Retrying update…`:`Retry update`,icon:L,disabled:e.retryUpdatePending??!1,onSelect:n});let r=Z(e.host,e.machineProvider),i=r===null?void 0:r.kind===`suspend`?e.onSuspend:r.kind===`resume`?e.onResume:e.onRetryCleanup;r!==null&&i!==void 0&&t.push({id:`lifecycle`,label:r.label,icon:r.icon,disabled:e.lifecycleActionPending??!1,onSelect:i}),e.canMoveServerHere&&t.push({id:`move-server`,label:`Move server here`,icon:`MoveTo`,onSelect:e.onMoveServerHere});let a=e.onRemove;return a!==void 0&&t.push({id:`remove`,label:`Remove machine`,icon:`Trash2`,tone:`destructive`,...e.isPrimary?{disabled:!0,disabledReason:Y(e.serverMoveEnabled??!1)}:{},onSelect:a}),t}var Q=e(i(),1);function ge(e){let t=(0,B.c)(35),{target:n,onOpenChange:r}=e,i=z(),a=n?.id??null,{mutate:o,reset:s}=i,l,u;t[0]!==a||t[1]!==o||t[2]!==s?(l=()=>{if(a===null){s();return}o(a)},u=[a,o,s],t[0]=a,t[1]=o,t[2]=s,t[3]=l,t[4]=u):(l=t[3],u=t[4]),(0,Q.useEffect)(l,u);let d=i.data??null,f=n!==null&&n.status===`connected`,m;t[5]!==i.error||t[6]!==i.isError?(m=i.isError?E({error:i.error,fallbackMessage:`Couldn't prepare a reconnect command.`}):null,t[5]=i.error,t[6]=i.isError,t[7]=m):m=t[7];let h=m,_=n!==null,v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,U.jsx)(c,{children:`Reconnect machine`}),t[8]=v):v=t[8];let b=h===null?void 0:`text-destructive-text`,S=h??`Run this command on ${n?.name??`the machine`} to bring it back online. It keeps the machine's projects, environments and history.`,C;t[9]!==b||t[10]!==S?(C=(0,U.jsxs)(p,{children:[v,(0,U.jsx)(x,{className:b,children:S})]}),t[9]=b,t[10]=S,t[11]=C):C=t[11];let T;t[12]!==h||t[13]!==a||t[14]!==o?(T=h===null?null:(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsx)(w,{variant:`outline`,size:`sm`,onClick:()=>{a!==null&&o(a)},children:`Try again`})}),t[12]=h,t[13]=a,t[14]=o,t[15]=T):T=t[15];let D;t[16]!==a||t[17]!==o||t[18]!==d?(D=d===null?null:(0,U.jsx)(F,{command:d.command,windowsCommand:d.windowsCommand,expiresAt:d.expiresAt,onRegenerate:()=>{a!==null&&o(a)}},d.command),t[16]=a,t[17]=o,t[18]=d,t[19]=D):D=t[19];let k;t[20]!==h||t[21]!==r||t[22]!==d||t[23]!==f||t[24]!==n?.name?(k=h===null?(0,U.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:f?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(g,{connected:!0}),(0,U.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[n?.name,` reconnected`]}),(0,U.jsx)(w,{size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,onClick:()=>r(!1),children:`Done`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(y,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:d===null?`Preparing a reconnect command…`:`Waiting for the machine to reconnect…`})]})}):null,t[20]=h,t[21]=r,t[22]=d,t[23]=f,t[24]=n?.name,t[25]=k):k=t[25];let A;t[26]!==D||t[27]!==k||t[28]!==C||t[29]!==T?(A=(0,U.jsxs)(N,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,onInteractOutside:_e,children:[C,T,D,k]}),t[26]=D,t[27]=k,t[28]=C,t[29]=T,t[30]=A):A=t[30];let j;return t[31]!==r||t[32]!==A||t[33]!==_?(j=(0,U.jsx)(O,{open:_,onOpenChange:r,children:A}),t[31]=r,t[32]=A,t[33]=_,t[34]=j):j=t[34],j}function _e(e){return e.preventDefault()}var ve={blocker:{heading:`Fix before moving`,icon:`AlertCircle`,iconClassName:`text-destructive-text`},warning:{heading:`Before you move`,icon:`AlertTriangle`,iconClassName:`text-warning-text`},info:{heading:`Good to know`,icon:`Info`,iconClassName:`text-muted-foreground`}};function ye(e){let t=(0,B.c)(17),{target:n,onOpenChange:r}=e,i=l(),a;t[0]!==r||t[1]!==i?(a=()=>{i.isPending||(i.reset(),r(!1))},t[0]=r,t[1]=i,t[2]=a):a=t[2];let o=a,s=n!==null,c;t[3]===o?c=t[4]:(c=e=>{e||o()},t[3]=o,t[4]=c);let u;t[5]!==o||t[6]!==r||t[7]!==i||t[8]!==n?(u=n===null?null:(0,U.jsx)(be,{target:n,startMove:i,onCancel:o,onStarted:()=>r(!1)},n.id),t[5]=o,t[6]=r,t[7]=i,t[8]=n,t[9]=u):u=t[9];let d;t[10]!==i.isPending||t[11]!==u?(d=(0,U.jsx)(N,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,hideCloseButton:i.isPending,children:u}),t[10]=i.isPending,t[11]=u,t[12]=d):d=t[12];let f;return t[13]!==s||t[14]!==c||t[15]!==d?(f=(0,U.jsx)(O,{open:s,onOpenChange:c,children:d}),t[13]=s,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}function be(e){let t=(0,B.c)(48),{target:n,startMove:r,onCancel:i,onStarted:a}=e,o=m(),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(``),[p,h]=(0,Q.useState)(!1),g=o.mutate,_=n.id,v,y;t[0]!==g||t[1]!==_?(v=()=>{g({targetHostId:_,serverUrl:null},{onSuccess:e=>{c(e),u(null),e.requiresServerUrl&&e.serverUrl!==null&&f(e.serverUrl)}})},y=[g,_],t[0]=g,t[1]=_,t[2]=v,t[3]=y):(v=t[2],y=t[3]),(0,Q.useEffect)(v,y);let x=s?.requiresServerUrl===!0||l!==null,S;t[4]!==d||t[5]!==o||t[6]!==s?.existingTargetServerData?.path||t[7]!==x||t[8]!==r||t[9]!==_?(S=()=>{let e=d.trim(),t=x&&e.length>0?e:null;r.reset(),o.mutate({targetHostId:_,serverUrl:t},{onSuccess:e=>{e.existingTargetServerData?.path!==s?.existingTargetServerData?.path&&h(!1),c(e),u(t)}})},t[4]=d,t[5]=o,t[6]=s?.existingTargetServerData?.path,t[7]=x,t[8]=r,t[9]=_,t[10]=S):S=t[10];let C=S,w;t[11]!==d||t[12]!==p||t[13]!==o.isPending||t[14]!==l||t[15]!==s||t[16]!==x||t[17]!==r.isPending?(w=A({result:s,checking:o.isPending,starting:r.isPending,showAddress:x,addressDraft:d,checkedServerUrl:l,archiveConfirmed:p}),t[11]=d,t[12]=p,t[13]=o.isPending,t[14]=l,t[15]=s,t[16]=x,t[17]=r.isPending,t[18]=w):w=t[18];let T=w,D;t[19]!==p||t[20]!==l||t[21]!==a||t[22]!==s||t[23]!==T||t[24]!==r||t[25]!==_?(D=()=>{s===null||!T||r.mutate({targetHostId:_,serverUrl:l,stopRunningWork:!0,archiveExistingTargetServerData:s.existingTargetServerData!==null&&p},{onSuccess:a,onError:e=>{let t=b(e);t!==null&&c({...s,items:t,canMove:!1})}})},t[19]=p,t[20]=l,t[21]=a,t[22]=s,t[23]=T,t[24]=r,t[25]=_,t[26]=D):D=t[26];let O=D,k;t[27]!==o.error||t[28]!==o.isError||t[29]!==n.name?(k=o.isError?E({error:o.error,fallbackMessage:`Couldn't check ${n.name}.`}):null,t[27]=o.error,t[28]=o.isError,t[29]=n.name,t[30]=k):k=t[30];let j;t[31]!==r.error||t[32]!==r.isError?(j=r.isError?E({error:r.error,fallbackMessage:`Couldn't start the move.`}):null,t[31]=r.error,t[32]=r.isError,t[33]=j):j=t[33];let M;return t[34]!==d||t[35]!==p||t[36]!==C||t[37]!==o.isPending||t[38]!==i||t[39]!==s||t[40]!==x||t[41]!==O||t[42]!==T||t[43]!==r.isPending||t[44]!==k||t[45]!==j||t[46]!==n.name?(M=(0,U.jsx)($,{targetName:n.name,result:s,checking:o.isPending,checkError:k,showAddress:x,addressDraft:d,archiveConfirmed:p,startAllowed:T,starting:r.isPending,startError:j,onAddressDraftChange:f,onCheck:C,onArchiveConfirmedChange:h,onStart:O,onCancel:i}),t[34]=d,t[35]=p,t[36]=C,t[37]=o.isPending,t[38]=i,t[39]=s,t[40]=x,t[41]=O,t[42]=T,t[43]=r.isPending,t[44]=k,t[45]=j,t[46]=n.name,t[47]=M):M=t[47],M}function $(e){let t=(0,B.c)(53),{targetName:n,result:r,checking:i,checkError:a,showAddress:o,addressDraft:s,archiveConfirmed:l,startAllowed:u,starting:d,startError:f,onAddressDraftChange:m,onCheck:h,onArchiveConfirmedChange:g,onStart:_,onCancel:v}=e,b;t[0]===r?.items?b=t[1]:(b=r?.items.some(xe)??!1,t[0]=r?.items,t[1]=b);let S=!i&&(a!==null||b)&&!o,C;t[2]===n?C=t[3]:(C=(0,U.jsxs)(p,{children:[(0,U.jsxs)(c,{children:[`Move the server to `,n]}),(0,U.jsxs)(x,{children:[`Your threads, settings and plugin data move to `,n,`. Every machine and app switches over when it's done, and the current server machine keeps running as a regular machine.`]})]}),t[2]=n,t[3]=C);let T;t[4]!==a||t[5]!==r||t[6]!==n?(T=r===null&&a===null?(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:[(0,U.jsx)(y,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsxs)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:[`Checking `,n,`…`]})]}):null,t[4]=a,t[5]=r,t[6]=n,t[7]=T):T=t[7];let E;t[8]!==s||t[9]!==i||t[10]!==m||t[11]!==h||t[12]!==o||t[13]!==d||t[14]!==n?(E=o?(0,U.jsx)(Se,{targetName:n,value:s,checking:i,disabled:d,onChange:m,onCheck:h}):null,t[8]=s,t[9]=i,t[10]=m,t[11]=h,t[12]=o,t[13]=d,t[14]=n,t[15]=E):E=t[15];let D;t[16]===a?D=t[17]:(D=a===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:a}),t[16]=a,t[17]=D);let O;t[18]!==i||t[19]!==r?(O=r===null?null:(0,U.jsx)(Ce,{items:r.items,dimmed:i}),t[18]=i,t[19]=r,t[20]=O):O=t[20];let k;t[21]!==l||t[22]!==g||t[23]!==r||t[24]!==d?(k=r?.existingTargetServerData?(0,U.jsx)(we,{path:r.existingTargetServerData.path,sizeBytes:r.existingTargetServerData.sizeBytes,checked:l,disabled:d,onCheckedChange:g}):null,t[21]=l,t[22]=g,t[23]=r,t[24]=d,t[25]=k):k=t[25];let A;t[26]===f?A=t[27]:(A=f===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:f}),t[26]=f,t[27]=A);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,U.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Moving stops every running turn and pauses scheduled automations.`}),t[28]=M):M=t[28];let N;t[29]!==v||t[30]!==d?(N=(0,U.jsx)(w,{type:`button`,variant:`outline`,disabled:d,onClick:v,children:`Cancel`}),t[29]=v,t[30]=d,t[31]=N):N=t[31];let P;t[32]!==h||t[33]!==S||t[34]!==d?(P=S?(0,U.jsx)(w,{type:`button`,variant:`outline`,disabled:d,onClick:h,children:`Check again`}):null,t[32]=h,t[33]=S,t[34]=d,t[35]=P):P=t[35];let F=!u,I=d?`Starting…`:`Stop all and move`,L;t[36]!==_||t[37]!==F||t[38]!==I?(L=(0,U.jsx)(w,{type:`button`,disabled:F,onClick:_,children:I}),t[36]=_,t[37]=F,t[38]=I,t[39]=L):L=t[39];let R;t[40]!==N||t[41]!==P||t[42]!==L?(R=(0,U.jsxs)(j,{children:[N,P,L]}),t[40]=N,t[41]=P,t[42]=L,t[43]=R):R=t[43];let z;return t[44]!==R||t[45]!==C||t[46]!==T||t[47]!==E||t[48]!==D||t[49]!==O||t[50]!==k||t[51]!==A?(z=(0,U.jsxs)(U.Fragment,{children:[C,T,E,D,O,k,A,M,R]}),t[44]=R,t[45]=C,t[46]=T,t[47]=E,t[48]=D,t[49]=O,t[50]=k,t[51]=A,t[52]=z):z=t[52],z}function xe(e){return e.severity===`blocker`}function Se(e){let t=(0,B.c)(32),{targetName:n,value:r,checking:i,disabled:a,onChange:o,onCheck:s}=e,c=(0,Q.useId)(),l=(0,Q.useId)(),u;t[0]!==i||t[1]!==a||t[2]!==r?(u=!i&&!a&&r.trim().length>0,t[0]=i,t[1]=a,t[2]=r,t[3]=u):u=t[3];let d=u,f;t[4]===c?f=t[5]:(f=(0,U.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium text-foreground`,children:`New server address`}),t[4]=c,t[5]=f);let p;t[6]!==l||t[7]!==n?(p=(0,U.jsxs)(`p`,{id:l,className:`text-xs text-subtle-foreground`,children:[`Machines and apps use this address to reach the server on `,n,` `,`after the move.`]}),t[6]=l,t[7]=n,t[8]=p):p=t[8];let m;t[9]===o?m=t[10]:(m=e=>o(e.target.value),t[9]=o,t[10]=m);let h;t[11]!==d||t[12]!==s?(h=e=>{e.key===`Enter`&&(e.preventDefault(),d&&s())},t[11]=d,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==a||t[15]!==l||t[16]!==c||t[17]!==m||t[18]!==h||t[19]!==r?(g=(0,U.jsx)(S,{id:c,"aria-describedby":l,className:`min-w-0 flex-1`,value:r,placeholder:`https://Moonlet.example.com`,inputMode:`url`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,disabled:a,onChange:m,onKeyDown:h}),t[14]=a,t[15]=l,t[16]=c,t[17]=m,t[18]=h,t[19]=r,t[20]=g):g=t[20];let _=!d,v=i?`Checking…`:`Check address`,y;t[21]!==s||t[22]!==_||t[23]!==v?(y=(0,U.jsx)(w,{type:`button`,variant:`outline`,disabled:_,onClick:s,children:v}),t[21]=s,t[22]=_,t[23]=v,t[24]=y):y=t[24];let b;t[25]!==g||t[26]!==y?(b=(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[g,y]}),t[25]=g,t[26]=y,t[27]=b):b=t[27];let x;return t[28]!==b||t[29]!==f||t[30]!==p?(x=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[f,p,b]}),t[28]=b,t[29]=f,t[30]=p,t[31]=x):x=t[31],x}function Ce(e){let t=(0,B.c)(11),{items:n,dimmed:r}=e,i,a,o;if(t[0]!==r||t[1]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=M(n);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing needs attention before the move.`}),t[5]=e):e=t[5],o=e;break bb0}let s=r&&`opacity-60`;t[6]===s?i=t[7]:(i=T(`space-y-3 transition-opacity`,s),t[6]=s,t[7]=i),a=v.map(t=>{let n=e[t];if(n.length===0)return null;let r=ve[t];return(0,U.jsxs)(`section`,{"aria-label":r.heading,className:`space-y-1.5`,children:[(0,U.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:r.heading}),(0,U.jsx)(`ul`,{className:`space-y-2`,children:n.map(e=>(0,U.jsxs)(`li`,{"data-severity":t,className:`flex items-start gap-2.5`,children:[(0,U.jsx)(y,{name:r.icon,"aria-hidden":!0,className:T(`mt-0.5 size-4 shrink-0`,r.iconClassName)}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`p`,{className:`text-sm break-words text-foreground`,children:e.title}),e.detail===null?null:(0,U.jsx)(`p`,{className:`text-xs break-words text-subtle-foreground`,children:e.detail})]})]},e.id))})]},t)})}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o}else i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;return t[8]!==i||t[9]!==a?(s=(0,U.jsx)(`div`,{className:i,children:a}),t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function we(e){let t=(0,B.c)(18),{path:n,sizeBytes:r,checked:i,disabled:a,onCheckedChange:o}=e,s;t[0]===o?s=t[1]:(s=e=>o(e===!0),t[0]=o,t[1]=s);let c;t[2]!==i||t[3]!==a||t[4]!==s?(c=(0,U.jsx)(I,{className:`mt-0.5`,checked:i,disabled:a,onCheckedChange:s}),t[2]=i,t[3]=a,t[4]=s,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=(0,U.jsxs)(`span`,{className:`block text-sm break-words text-foreground`,children:[`Archive the existing Moonlet data at `,n]}),t[6]=n,t[7]=l);let u;t[8]===r?u=t[9]:(u=_(r),t[8]=r,t[9]=u);let d;t[10]===u?d=t[11]:(d=(0,U.jsxs)(`span`,{className:`block text-xs text-subtle-foreground`,children:[u,`. Moonlet renames it to a backup folder next to it and never merges it.`]}),t[10]=u,t[11]=d);let f;t[12]!==l||t[13]!==d?(f=(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[l,d]}),t[12]=l,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==c||t[16]!==f?(p=(0,U.jsxs)(`label`,{className:`flex items-start gap-2.5 rounded-md border border-border px-3 py-2.5`,children:[c,f]}),t[15]=c,t[16]=f,t[17]=p):p=t[17],p}var Te=100;function Ee(e){let t=(0,B.c)(9),{target:n,pending:r,errorMessage:i,onOpenChange:a,onRename:o}=e,s=n!==null,c;t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==n?(c=e=>n?(0,U.jsx)(De,{target:n,pending:r,errorMessage:i,onRename:o,inputRef:e},n.id):null,t[0]=i,t[1]=o,t[2]=r,t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==a||t[6]!==s||t[7]!==c?(l=(0,U.jsx)(u,{open:s,onOpenChange:a,children:c}),t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function De(e){let t=(0,B.c)(30),{target:n,pending:r,errorMessage:i,onRename:a,inputRef:o}=e,[s,l]=(0,Q.useState)(n.name),u;t[0]!==s||t[1]!==a||t[2]!==r||t[3]!==n?(u=e=>{if(e.preventDefault(),r)return;let t=s.trim();t.length!==0&&a(n,t)},t[0]=s,t[1]=a,t[2]=r,t[3]=n,t[4]=u):u=t[4];let d=u,f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,U.jsx)(c,{children:`Rename machine`}),t[5]=f):f=t[5];let m;t[6]===n.name?m=t[7]:(m=(0,U.jsxs)(p,{children:[f,(0,U.jsxs)(x,{children:[`Choose a new name for `,n.name,`.`]})]}),t[6]=n.name,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>l(e.target.value),t[8]=h):h=t[8];let g;t[9]!==o||t[10]!==s||t[11]!==r?(g=(0,U.jsx)(S,{ref:o,"aria-label":`Machine name`,value:s,maxLength:Te,autoCorrect:`off`,spellCheck:!1,disabled:r,onChange:h}),t[9]=o,t[10]=s,t[11]=r,t[12]=g):g=t[12];let _;t[13]===i?_=t[14]:(_=i===null?null:(0,U.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[13]=i,t[14]=_);let v;t[15]!==g||t[16]!==_?(v=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[g,_]}),t[15]=g,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==s||t[19]!==r?(y=r||s.trim().length===0,t[18]=s,t[19]=r,t[20]=y):y=t[20];let b;t[21]===y?b=t[22]:(b=(0,U.jsx)(j,{children:(0,U.jsx)(w,{type:`submit`,disabled:y,children:`Rename machine`})}),t[21]=y,t[22]=b);let C;t[23]!==d||t[24]!==v||t[25]!==b?(C=(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:d,children:[v,b]}),t[23]=d,t[24]=v,t[25]=b,t[26]=C):C=t[26];let T;return t[27]!==C||t[28]!==m?(T=(0,U.jsxs)(U.Fragment,{children:[m,C]}),t[27]=C,t[28]=m,t[29]=T):T=t[29],T}export{me as a,Y as c,te as d,he as i,se as l,ye as n,pe as o,ge as r,X as s,Ee as t,oe as u};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ar as t,Or as n,Vr as r,mi as i,ni as a,zr as o}from"./boot-vendor-BBLG7GwQ.js";import{t as s}from"./permission-mode-options-BrNWKCMS.js";import{Co as c,Ct as l,E as u,It as d,Ji as f,Ko as p,Nc as m,Pr as h,So as g,St as _,Vo as v,Wr as y,Xi as b,Yo as x,ah as ee,bo as S,cm as C,ka as w,lh as T,lm as te,nh as E,ph as D,qo as O,v as k,vt as A,w as j,wt as M,xo as N,yi as ne,yt as P}from"./index-BzbTy_RW.js";import{B as F,I as re,L as I,R as L,b as ie,z as ae}from"./resource-list-DEdVfbWY.js";import{t as oe}from"./machine-provider-queries-CEVlhRVS.js";import{n as se}from"./MachineLabel-CgFVosgw.js";import{t as ce}from"./page-shell-BKItFX51.js";import{a as le,c as ue,d as de,i as fe,l as pe,n as me,o as he,r as ge,s as _e,t as ve,u as ye}from"./MachineRenameDialog-Bvdr3E9j.js";import{a as be,c as xe,i as Se,o as Ce,r as we,s as Te}from"./host-mutations-Bad0cc2n.js";var R=n(),z=e(a(),1);function Ee(e){let t=(0,R.c)(5),{notice:n}=e;if(n===null||n.message===null)return null;let r=n.phase===`suspending`||n.phase===`resuming`?`text-subtle-foreground`:`text-destructive-text`,i;t[0]===r?i=t[1]:(i=D(`min-w-0 text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n.message||t[3]!==i?(a=(0,z.jsx)(`p`,{role:`status`,"aria-label":`Machine maintenance`,className:i,children:n.message}),t[2]=n.message,t[3]=i,t[4]=a):a=t[4],a}var De=e(i(),1);function Oe(e,t){return t!==null&&t.fromHostId===e.id&&t.oldCopyDeletedAt===null}function ke(e,t){let n=`The server moved from ${e.name} to ${t.toHostName}. The old server data is still on ${e.name}, locked so Moonlet won't start a server from it. Keep it as a backup, or delete it once the new server works.`;return e.status===`connected`?n:`${n} ${e.name} has to be online to delete it.`}function Ae(e){let t=(0,R.c)(33),{host:n,lastMove:r}=e,i=u(),[a,o]=(0,De.useState)(!1),s;t[0]===i?s=t[1]:(s=()=>{i.reset(),o(!0)},t[0]=i,t[1]=s);let l;t[2]!==n||t[3]!==r||t[4]!==s?(l=(0,z.jsx)(B,{host:n,lastMove:r,onDelete:s}),t[2]=n,t[3]=r,t[4]=s,t[5]=l):l=t[5];let d;t[6]===i?d=t[7]:(d=e=>{!e&&!i.isPending&&(i.reset(),o(!1))},t[6]=i,t[7]=d);let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,z.jsx)(c,{children:`Delete the old server copy?`}),t[8]=f):f=t[8];let p;t[9]!==n.name||t[10]!==r.toHostName?(p=(0,z.jsxs)(g,{children:[f,(0,z.jsxs)(S,{children:[`This permanently deletes the database, settings and plugin data`,` `,n.name,` kept when the server moved to `,r.toHostName,`. The server on `,r.toHostName,` is not affected.`]})]}),t[9]=n.name,t[10]=r.toHostName,t[11]=p):p=t[11];let m;t[12]!==i.error||t[13]!==i.isError||t[14]!==n.name?(m=i.isError?(0,z.jsx)(`p`,{className:`text-sm text-destructive-text`,role:`alert`,children:O({error:i.error,fallbackMessage:`Couldn't delete the old server copy on ${n.name}.`})}):null,t[12]=i.error,t[13]=i.isError,t[14]=n.name,t[15]=m):m=t[15];let h;t[16]!==i||t[17]!==n.id||t[18]!==n.name?(h=()=>i.mutate(n.id,{onSuccess:e=>{o(!1),E.success(e.deleted?`Deleted the old server copy on ${n.name}`:`No old server copy was left on ${n.name}`)}}),t[16]=i,t[17]=n.id,t[18]=n.name,t[19]=h):h=t[19];let _=i.isPending?`Deleting…`:`Delete old copy`,v;t[20]!==i.isPending||t[21]!==h||t[22]!==_?(v=(0,z.jsx)(N,{children:(0,z.jsx)(T,{type:`button`,variant:`destructive`,disabled:i.isPending,onClick:h,children:_})}),t[20]=i.isPending,t[21]=h,t[22]=_,t[23]=v):v=t[23];let b;t[24]!==a||t[25]!==d||t[26]!==p||t[27]!==m||t[28]!==v?(b=(0,z.jsxs)(y,{modal:!1,open:a,onOpenChange:d,children:[p,m,v]}),t[24]=a,t[25]=d,t[26]=p,t[27]=m,t[28]=v,t[29]=b):b=t[29];let x;return t[30]!==b||t[31]!==l?(x=(0,z.jsxs)(z.Fragment,{children:[l,b]}),t[30]=b,t[31]=l,t[32]=x):x=t[32],x}function B(e){let t=(0,R.c)(9),{host:n,lastMove:r,onDelete:i}=e,a;t[0]!==n||t[1]!==r?(a=ke(n,r),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=n.status!==`connected`,s;t[3]!==i||t[4]!==o?(s=(0,z.jsx)(ae,{children:(0,z.jsx)(L,{children:(0,z.jsx)(T,{type:`button`,variant:`destructive`,size:`sm`,disabled:o,onClick:i,children:`Delete old copy`})})}),t[3]=i,t[4]=o,t[5]=s):s=t[5];let c;return t[6]!==a||t[7]!==s?(c=(0,z.jsx)(F,{title:`Old server copy`,description:a,children:s}),t[6]=a,t[7]=s,t[8]=c):c=t[8],c}var je=`Highest permission mode any thread on the selected machine may run with. Threads that ask for more resolve down to it, and a provider that supports nothing this low can't run here.`,Me={darwin:`macOS`,linux:`Linux`,wsl:`WSL`,win32:`Windows`,unknown:null};function V({host:e,platformLabel:t,now:n}){let r=[pe({host:e,now:n})];return t!==null&&r.push(t),r.push(`paired ${w({timestamp:e.createdAt,now:n})}`),r.join(` · `)}function Ne(e){let t=(0,R.c)(6),{disabled:n,onSelect:r,value:i}=e,a;t[0]!==n||t[1]!==r||t[2]!==i?(a=s.map(e=>{let t=e.value===i;return(0,z.jsx)(L,{className:`items-start`,children:(0,z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,disabled:n,onClick:()=>{t||r(e.value)},className:D(`flex w-full items-start gap-3 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-ring`,n&&`opacity-70`),children:[(0,z.jsx)(`span`,{className:D(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border`,t?`border-foreground`:`border-input`),children:t?(0,z.jsx)(`span`,{className:`size-2 rounded-full bg-foreground`}):null}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block text-sm text-foreground`,children:e.label}),e.description?(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-subtle-foreground/75`,children:e.description}):null]})]})},e.value)}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3];let o;return t[4]===a?o=t[5]:(o=(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Permission limit`,children:(0,z.jsx)(ae,{children:a})}),t[4]=a,t[5]=o),o}function Pe(e){let n=(0,R.c)(57),{host:r,machineProvider:i,platformLabel:a,now:o,isPrimary:s,isThisMachine:c,showServerBadge:l,lifecycleNotice:u,lifecycleActionPending:d,onSuspend:f,onResume:p,onRetryCleanup:m,onRename:h,onReconnect:g,canMoveServerHere:_,onMoveServerHere:v}=e,y;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=te(`machines`),n[0]=y):y=n[0];let x;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsxs)(t,{to:y,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(ee,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),n[1]=x):x=n[1];let S;n[2]!==r||n[3]!==i?(S=(0,z.jsx)(`h1`,{className:`min-w-0 text-sm font-semibold text-foreground`,children:(0,z.jsx)(se,{host:r,machineProvider:i})}),n[2]=r,n[3]=i,n[4]=S):S=n[4];let C;n[5]===c?C=n[6]:(C=c?(0,z.jsx)(re,{children:`This machine`}):null,n[5]=c,n[6]=C);let w;n[7]===l?w=n[8]:(w=l?(0,z.jsx)(re,{children:`Server`}):null,n[7]=l,n[8]=w);let T;n[9]!==S||n[10]!==C||n[11]!==w?(T=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[S,C,w]}),n[9]=S,n[10]=C,n[11]=w,n[12]=T):T=n[12];let E;n[13]===r?E=n[14]:(E=ye(r),n[13]=r,n[14]=E);let D;n[15]===E?D=n[16]:(D=(0,z.jsx)(b,{tone:E}),n[15]=E,n[16]=D);let O;n[17]!==r||n[18]!==o||n[19]!==a?(O=V({host:r,platformLabel:a,now:o}),n[17]=r,n[18]=o,n[19]=a,n[20]=O):O=n[20];let k;n[21]===O?k=n[22]:(k=(0,z.jsx)(`p`,{className:`min-w-0 text-xs text-subtle-foreground/75`,children:O}),n[21]=O,n[22]=k);let A;n[23]!==k||n[24]!==D?(A=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[D,k]}),n[23]=k,n[24]=D,n[25]=A):A=n[25];let j;n[26]===u?j=n[27]:(j=(0,z.jsx)(Ee,{notice:u}),n[26]=u,n[27]=j);let M;n[28]!==A||n[29]!==j||n[30]!==T?(M=(0,z.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[T,A,j]}),n[28]=A,n[29]=j,n[30]=T,n[31]=M):M=n[31];let N;n[32]!==r||n[33]!==d||n[34]!==i||n[35]!==p||n[36]!==m||n[37]!==f?(N=(0,z.jsx)(le,{host:r,machineProvider:i,pending:d,onSuspend:f,onResume:p,onRetryCleanup:m}),n[32]=r,n[33]=d,n[34]=i,n[35]=p,n[36]=m,n[37]=f,n[38]=N):N=n[38];let ne=`${r.name} actions`,P;n[39]!==_||n[40]!==r||n[41]!==s||n[42]!==d||n[43]!==i||n[44]!==v||n[45]!==g||n[46]!==h?(P=fe({host:r,machineProvider:i,isPrimary:s,canMoveServerHere:_,lifecycleActionPending:d,onRename:h,onReconnect:g,onMoveServerHere:v}),n[39]=_,n[40]=r,n[41]=s,n[42]=d,n[43]=i,n[44]=v,n[45]=g,n[46]=h,n[47]=P):P=n[47];let F;n[48]!==ne||n[49]!==P?(F=(0,z.jsx)(ie,{label:ne,items:P}),n[48]=ne,n[49]=P,n[50]=F):F=n[50];let I;n[51]!==N||n[52]!==F?(I=(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,F]}),n[51]=N,n[52]=F,n[53]=I):I=n[53];let L;return n[54]!==M||n[55]!==I?(L=(0,z.jsxs)(`div`,{className:`space-y-3`,children:[x,(0,z.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[M,I]})]}),n[54]=M,n[55]=I,n[56]=L):L=n[56],L}function Fe(){let e=(0,R.c)(120),{hostId:n}=r(),i=o(),a=f(),{providers:s}=oe(),c=v(),{localDaemonHostId:u,platform:g}=ne(),y=m(),b=_(),S=we(),C=Ce(),w=Te(),D=Se(),A=be(),N=xe(),re=j(),[ie,se]=(0,De.useState)(!1),[le,fe]=(0,De.useState)(!1),[pe,ye]=(0,De.useState)(!1),[Ee,ke]=(0,De.useState)(!1),B=a.data,V=B?.find(e=>e.id===n)??null,Fe=V?.lifecycle.message??null,Be=V===null?null:{phase:V.lifecycle.phase,message:Fe},Ve=c.data?.primaryHostId??null,H=c.data?.experiments.serverMove??!1,U=V!==null&&V.id===Ve,He;e[0]===B?He=e[1]:(He=B?.filter(ze).length??0,e[0]=B,e[1]=He);let Ue=He>1&&V!==null&&V.id===u,We=V?.machineProviderId===null||V?.machineProviderId===void 0?null:s?.find(e=>e.id===V.machineProviderId)??null,Ge;if(e[2]!==n||e[3]!==y.data?.projects){let t=y.data?.projects??[],r;e[5]===n?r=e[6]:(r=e=>e.sources.some(e=>e.hostId===n),e[5]=n,e[6]=r),Ge=t.filter(r).map(Re),e[2]=n,e[3]=y.data?.projects,e[4]=Ge}else Ge=e[4];let Ke=Ge,W,qe;if(e[7]!==n||e[8]!==b.machines){let t;e[11]===n?t=e[12]:(t=e=>e.host.id===n,e[11]=n,e[12]=t),W=b.machines.find(t),qe=(W?.issues??[]).filter(d),e[7]=n,e[8]=b.machines,e[9]=W,e[10]=qe}else W=e[9],qe=e[10];let Je=qe.length,Ye=p().data;W?.providerStatus;let Xe;bb0:{let t=W?.providerStatus;if(!t){let t;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[13]=t):t=e[13],Xe=t;break bb0}let n;e[14]!==Ye||e[15]!==t?(n=Object.entries(t).flatMap(e=>{let[t,n]=e;if(!n.installed)return[];let r=Ye?.find(e=>e.id===t);return[{...n,providerId:t,provider:r,ProviderIcon:P(`agent`,t,r??null)?.icon}]}),e[14]=Ye,e[15]=t,e[16]=n):n=e[16],Xe=n}let Ze=Xe,Qe;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=Date.now(),e[17]=Qe):Qe=e[17];let $e=Qe,et=V!==null&&V.id===u&&g!==null?Me[g]:U&&c.data?.primaryHostPlatform?Me[c.data.primaryHostPlatform]:null;if(B===void 0){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`})})}),e[18]=t):t=e[18],t}if(V===null){let n;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(n=te(`machines`),e[19]=n):n=e[19];let r;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-3`,children:[(0,z.jsxs)(t,{to:n,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(ee,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Machine is no longer paired.`})]})}),e[20]=r):r=e[20],r}let tt=l(V),nt=re.data?.lastMove??null,rt=ce,it=Pe,at=w.isPending||D.isPending||A.isPending,ot=()=>w.mutate(V.id),st=()=>D.mutate(V.id),ct=()=>A.mutate(V.id),G;e[21]===S?G=e[22]:(G=()=>{S.reset(),se(!0)},e[21]=S,e[22]=G);let lt=c.data!==void 0&&k({host:V,primaryHostId:Ve,move:re.data?.move??null,serverMoveEnabled:H}),ut,dt;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(ut=()=>ke(!0),dt=()=>ye(!0),e[23]=ut,e[24]=dt):(ut=e[23],dt=e[24]);let K;e[25]!==it||e[26]!==V||e[27]!==U||e[28]!==Ue||e[29]!==Be||e[30]!==We||e[31]!==$e||e[32]!==et||e[33]!==ct||e[34]!==G||e[35]!==lt||e[36]!==at||e[37]!==ot||e[38]!==st?(K=(0,z.jsx)(it,{host:V,machineProvider:We,platformLabel:et,now:$e,isPrimary:U,isThisMachine:Ue,showServerBadge:U,lifecycleNotice:Be,lifecycleActionPending:at,onSuspend:ot,onResume:st,onRetryCleanup:ct,onRename:G,canMoveServerHere:lt,onReconnect:ut,onMoveServerHere:dt}),e[25]=it,e[26]=V,e[27]=U,e[28]=Ue,e[29]=Be,e[30]=We,e[31]=$e,e[32]=et,e[33]=ct,e[34]=G,e[35]=lt,e[36]=at,e[37]=ot,e[38]=st,e[39]=K):K=e[39];let q;e[40]!==V.id||e[41]!==V.name||e[42]!==N?(q=e=>N.mutate({hostId:V.id,maxPermissionMode:e},{onError:e=>{x({error:e,fallbackMessage:`Couldn't change the permission limit for ${V.name}.`})}}),e[40]=V.id,e[41]=V.name,e[42]=N,e[43]=q):q=e[43];let J;e[44]!==V.maxPermissionMode||e[45]!==q||e[46]!==N.isPending?(J=(0,z.jsx)(F,{title:`Permission limit`,description:je,children:(0,z.jsx)(Ne,{value:V.maxPermissionMode,disabled:N.isPending,onSelect:q})}),e[44]=V.maxPermissionMode,e[45]=q,e[46]=N.isPending,e[47]=J):J=e[47];let Y;e[48]!==V.status||e[49]!==Ze||e[50]!==W?.statusError||e[51]!==W?.statusPending||e[52]!==Je?(Y=(0,z.jsx)(F,{title:`Provider CLIs`,children:(0,z.jsx)(ae,{children:(0,z.jsx)(I,{label:`Installed`,children:V.status===`connected`?W?.statusPending?(0,z.jsx)(`span`,{children:`Checking…`}):W?.statusError?(0,z.jsx)(`span`,{children:`Status unavailable`}):(0,z.jsxs)(z.Fragment,{children:[Ze.length>0?(0,z.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center justify-start gap-x-3 gap-y-1 @min-[36rem]/settings:justify-end`,children:Ze.map(Le)}):(0,z.jsx)(`span`,{children:`None installed`}),Je>0?(0,z.jsx)(t,{to:te(`updates`),className:`shrink-0 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,children:(0,z.jsxs)(h,{variant:`outline`,size:`sm`,className:`border-attention/50 bg-surface-attention text-warning-text transition-colors hover:border-attention hover:text-foreground`,children:[Je,` to fix`]})}):null]}):(0,z.jsx)(`span`,{children:`Unavailable while offline`})})})}),e[48]=V.status,e[49]=Ze,e[50]=W?.statusError,e[51]=W?.statusPending,e[52]=Je,e[53]=Y):Y=e[53];let X;e[54]===V.id?X=e[55]:(X=(0,z.jsx)(de,{hostId:V.id}),e[54]=V.id,e[55]=X);let Z;e[56]===Ke?Z=e[57]:(Z=(0,z.jsx)(I,{label:`Projects`,children:Ke.length===0?(0,z.jsx)(`span`,{children:`None`}):(0,z.jsx)(`span`,{className:`min-w-0 truncate`,children:Ke.map(Ie)})}),e[56]=Ke,e[57]=Z);let ft=tt??`Up to date`,Q;e[58]===ft?Q=e[59]:(Q=(0,z.jsx)(`span`,{children:ft}),e[58]=ft,e[59]=Q);let pt;e[60]!==V||e[61]!==C?(pt=M(V)?(0,z.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:C.isPending,onClick:()=>C.mutate(V.id,{onSuccess:()=>{E.success(`Update retry requested for ${V.name}`)}}),children:C.isPending?`Retrying…`:`Retry update`}):null,e[60]=V,e[61]=C,e[62]=pt):pt=e[62];let mt;e[63]!==Q||e[64]!==pt?(mt=(0,z.jsxs)(I,{label:`Updates`,children:[Q,pt]}),e[63]=Q,e[64]=pt,e[65]=mt):mt=e[65];let ht;e[66]!==Z||e[67]!==mt?(ht=(0,z.jsx)(F,{title:`Machine information`,children:(0,z.jsxs)(ae,{children:[Z,mt]})}),e[66]=Z,e[67]=mt,e[68]=ht):ht=e[68];let gt;e[69]!==V||e[70]!==nt||e[71]!==H?(gt=H&&Oe(V,nt)?(0,z.jsx)(Ae,{host:V,lastMove:nt}):null,e[69]=V,e[70]=nt,e[71]=H,e[72]=gt):gt=e[72];let _t;e[73]!==V||e[74]!==U||e[75]!==H?(_t=U?ue(H):`Revokes ${V.name}'s access to this server. ${_e(V)}`,e[73]=V,e[74]=U,e[75]=H,e[76]=_t):_t=e[76];let vt;e[77]===Symbol.for(`react.memo_cache_sentinel`)?(vt=()=>fe(!0),e[77]=vt):vt=e[77];let yt;e[78]===U?yt=e[79]:(yt=(0,z.jsx)(ae,{children:(0,z.jsx)(L,{children:(0,z.jsx)(T,{type:`button`,variant:`destructive`,size:`sm`,disabled:U,onClick:vt,children:`Remove machine`})})}),e[78]=U,e[79]=yt);let $;e[80]!==_t||e[81]!==yt?($=(0,z.jsx)(F,{title:`Danger zone`,description:_t,children:yt}),e[80]=_t,e[81]=yt,e[82]=$):$=e[82];let bt;e[83]!==K||e[84]!==J||e[85]!==Y||e[86]!==X||e[87]!==ht||e[88]!==gt||e[89]!==$?(bt=(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6 pb-10`,children:[K,J,Y,X,ht,gt,$]}),e[83]=K,e[84]=J,e[85]=Y,e[86]=X,e[87]=ht,e[88]=gt,e[89]=$,e[90]=bt):bt=e[90];let xt=ie?V:null,St;e[91]!==S.error||e[92]!==S.isError?(St=S.isError?O({error:S.error,fallbackMessage:`Couldn't rename the machine.`}):null,e[91]=S.error,e[92]=S.isError,e[93]=St):St=e[93];let Ct;e[94]===S.isPending?Ct=e[95]:(Ct=e=>{!e&&!S.isPending&&se(!1)},e[94]=S.isPending,e[95]=Ct);let wt;e[96]===S?wt=e[97]:(wt=(e,t)=>S.mutate({hostId:e.id,name:t},{onSuccess:()=>se(!1)}),e[96]=S,e[97]=wt);let Tt;e[98]!==S.isPending||e[99]!==xt||e[100]!==St||e[101]!==Ct||e[102]!==wt?(Tt=(0,z.jsx)(ve,{target:xt,pending:S.isPending,errorMessage:St,onOpenChange:Ct,onRename:wt}),e[98]=S.isPending,e[99]=xt,e[100]=St,e[101]=Ct,e[102]=wt,e[103]=Tt):Tt=e[103];let Et=le?V:null,Dt;e[104]===i?Dt=e[105]:(Dt=()=>i(te(`machines`)),e[104]=i,e[105]=Dt);let Ot;e[106]!==Et||e[107]!==Dt?(Ot=(0,z.jsx)(he,{target:Et,onOpenChange:fe,onRemoved:Dt}),e[106]=Et,e[107]=Dt,e[108]=Ot):Ot=e[108];let kt=Ee?V:null,At;e[109]===kt?At=e[110]:(At=(0,z.jsx)(ge,{target:kt,onOpenChange:ke}),e[109]=kt,e[110]=At);let jt=pe?V:null,Mt;e[111]===jt?Mt=e[112]:(Mt=(0,z.jsx)(me,{target:jt,onOpenChange:ye}),e[111]=jt,e[112]=Mt);let Nt;return e[113]!==rt||e[114]!==bt||e[115]!==Tt||e[116]!==Ot||e[117]!==At||e[118]!==Mt?(Nt=(0,z.jsxs)(rt,{contentClassName:`pt-4 md:pt-5`,children:[bt,Tt,Ot,At,Mt]}),e[113]=rt,e[114]=bt,e[115]=Tt,e[116]=Ot,e[117]=At,e[118]=Mt,e[119]=Nt):Nt=e[119],Nt}function Ie(e,n){return(0,z.jsxs)(`span`,{children:[n>0?` · `:``,(0,z.jsx)(t,{to:C(e.id),className:`hover:text-foreground`,children:e.name})]},e.id)}function Le(e){return(0,z.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[e.ProviderIcon?(0,z.jsx)(`span`,{"data-provider-icon":e.providerId,"aria-hidden":!0,className:`flex size-3.5 shrink-0 items-center justify-center`,children:e.provider===void 0?(0,z.jsx)(e.ProviderIcon,{className:`size-3.5`}):(0,z.jsx)(A,{provider:e.provider,icon:e.ProviderIcon,className:`size-3.5`})}):null,(0,z.jsx)(`span`,{children:e.displayName}),e.currentVersion?(0,z.jsx)(`span`,{children:e.currentVersion}):null]},e.providerId)}function Re(e){return{id:e.id,name:e.name}}function ze(e){return e.type===`persistent`}export{Fe as MachineSettingsView};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Or as t,mi as n,ni as r}from"./boot-vendor-BBLG7GwQ.js";import{ah as i,ph as a}from"./index-BzbTy_RW.js";import{a as o,i as s,n as c,t as l}from"./audio-input-device-preference-Bxa2INcv.js";import{t as u}from"./WaveformVisualizer-C4iTUUxZ.js";var d=t(),f=e(n(),1),p=e(r(),1);function m(e){let t=(0,d.c)(43),{open:n,onCaptureReady:r}=e,[m,_]=c(),{devices:v,refresh:y,isSupported:b,hasDeviceAccess:x}=s(),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(null),E,D;t[0]!==b||t[1]!==n||t[2]!==m||t[3]!==y?(E=()=>{if(!n||!b)return;let e=!1,t=null;return T(null),C(null),l(navigator.mediaDevices,m).then(n=>{if(e){n.getTracks().forEach(g);return}t=n,C(n),y()}).catch(t=>{e||T(t instanceof DOMException&&t.name===`NotAllowedError`?`Allow mic access in your settings.`:`Can't open this mic. Choose another.`)}),()=>{e=!0,t?.getTracks().forEach(h),C(null)}},D=[n,m,y,b],t[0]=b,t[1]=n,t[2]=m,t[3]=y,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,f.useEffect)(E,D);let O,k;t[6]!==r||t[7]!==n||t[8]!==S?(O=()=>{n&&S&&r?.()},k=[n,S,r],t[6]=r,t[7]=n,t[8]=S,t[9]=O,t[10]=k):(O=t[9],k=t[10]),(0,f.useEffect)(O,k);let A=n?S:null,{silent:j}=o(A,!1),M;t[11]===A?M=t[12]:(M=A?.getAudioTracks()[0]?.label,t[11]=A,t[12]=M);let N=M,P;t[13]!==v||t[14]!==x||t[15]!==m?(P=x&&m!==null&&v.length>0&&!v.some(e=>e.deviceId===m),t[13]=v,t[14]=x,t[15]=m,t[16]=P):P=t[16];let F=P,I;t[17]!==N||t[18]!==w||t[19]!==b||t[20]!==n||t[21]!==j||t[22]!==A?(I=n?(0,p.jsxs)(`div`,{className:`space-y-2 rounded-lg border bg-muted/30 p-3`,"aria-label":`Live microphone preview`,children:[(0,p.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{className:`shrink-0 font-medium`,children:`Live preview`}),(0,p.jsx)(`span`,{className:`min-w-0 truncate`,title:N,children:w||!b?`Unavailable`:A?N||`Listening`:`Connecting…`})]}),(0,p.jsx)(u,{stream:A,active:n&&A!==null,className:`h-9 w-full`}),(0,p.jsx)(`p`,{role:`status`,className:`min-h-5 text-sm text-muted-foreground`,children:w??(b?A?j?`No audio detected. Try another mic.`:`Speak to check your microphone.`:`Connecting to microphone…`:`This browser can't use a mic.`)})]}):null,t[17]=N,t[18]=w,t[19]=b,t[20]=n,t[21]=j,t[22]=A,t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(`p`,{className:`px-1 text-xs font-medium text-muted-foreground`,children:`Input device`}),t[24]=L):L=t[24];let R;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(R={deviceId:null,label:`System default`},t[25]=R):R=t[25];let z;t[26]!==m||t[27]!==F?(z=F?[{deviceId:m,label:`Preferred microphone (unavailable)`}]:[],t[26]=m,t[27]=F,t[28]=z):z=t[28];let B;t[29]!==v||t[30]!==z?(B=[R,...z,...v],t[29]=v,t[30]=z,t[31]=B):B=t[31];let V;t[32]!==m||t[33]!==F||t[34]!==_||t[35]!==B?(V=(0,p.jsxs)(`div`,{className:`space-y-2`,children:[L,(0,p.jsx)(`div`,{role:`group`,"aria-label":`Microphone`,className:`max-h-64 space-y-1 overflow-y-auto rounded-lg border p-1`,children:B.map(e=>(0,p.jsxs)(`button`,{type:`button`,"aria-pressed":m===e.deviceId,disabled:F&&e.deviceId===m,onClick:()=>_(e.deviceId),className:a(`flex min-h-11 w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-state-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:opacity-50`,m===e.deviceId&&`bg-state-active`),children:[(0,p.jsx)(i,{name:e.deviceId===null?`Laptop`:`Mic`,className:`size-4 shrink-0 text-muted-foreground`}),(0,p.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.label}),(0,p.jsx)(`span`,{className:`size-4 shrink-0`,"aria-hidden":`true`,children:m===e.deviceId?(0,p.jsx)(i,{name:`Check`,className:`size-4`}):null})]},e.deviceId??`system`))})]}),t[32]=m,t[33]=F,t[34]=_,t[35]=B,t[36]=V):V=t[36];let H;t[37]===F?H=t[38]:(H=F?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Preferred microphone unavailable. Using another input until it returns.`}):null,t[37]=F,t[38]=H);let U;return t[39]!==V||t[40]!==H||t[41]!==I?(U=(0,p.jsxs)(`div`,{className:`space-y-4`,children:[I,V,H]}),t[39]=V,t[40]=H,t[41]=I,t[42]=U):U=t[42],U}function h(e){return e.stop()}function g(e){return e.stop()}export{m as MicrophonePreferences};