@mcp-b/react-components 0.63.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/dist/{AgentActivity-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
  2. package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
  3. package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
  4. package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
  5. package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
  6. package/dist/CodeBlock-dt0L8md0.js +892 -0
  7. package/dist/{EmployeeChrome--PWdtg4B.d.ts → EmployeeChrome-kegSASjC.d.ts} +6 -5
  8. package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
  9. package/dist/ExecutionResult-CXnGcmM4.js +671 -0
  10. package/dist/FileTree-CjfzpN6X.js +968 -0
  11. package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
  12. package/dist/ManagerOffice-T79utm-P.js +2469 -0
  13. package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
  14. package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
  15. package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
  16. package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
  17. package/dist/SetupChecklist-DwscX3Bw.js +230 -0
  18. package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
  19. package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
  20. package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
  21. package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
  22. package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
  23. package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
  24. package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
  25. package/dist/{WorkspaceAutomation-yDZorXla.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
  26. package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
  27. package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
  28. package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
  29. package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
  30. package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
  31. package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
  32. package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
  33. package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
  34. package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
  35. package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
  36. package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
  37. package/dist/assets/desktop/README.md +43 -0
  38. package/dist/assets/desktop/automations.svg +19 -0
  39. package/dist/assets/desktop/document.svg +24 -0
  40. package/dist/assets/desktop/folder.png +0 -0
  41. package/dist/assets/desktop/mail.svg +31 -0
  42. package/dist/assets/desktop/settings.svg +9 -0
  43. package/dist/assets/desktop/trash-full.svg +23 -0
  44. package/dist/assets/desktop/trash.svg +19 -0
  45. package/dist/attachment-preview-DeRqFjdz.js +68 -0
  46. package/dist/attempt-CySQHJsF.js +21 -0
  47. package/dist/command-search-1fjmCBBo.js +34 -0
  48. package/dist/components/agents-sdk/AIProviderDialog.js +757 -224
  49. package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
  50. package/dist/components/agents-sdk/AgentActivity.js +78 -31
  51. package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
  52. package/dist/components/agents-sdk/AgentChat.js +1113 -386
  53. package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
  54. package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
  55. package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
  56. package/dist/components/agents-sdk/AgentComputer.js +8045 -0
  57. package/dist/components/agents-sdk/AgentEvent.js +164 -21
  58. package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
  59. package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
  60. package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
  61. package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
  62. package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
  63. package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
  64. package/dist/components/agents-sdk/BrowserReplay.js +298 -133
  65. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
  66. package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
  67. package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
  68. package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
  69. package/dist/components/agents-sdk/EmployeeApp.js +108 -46
  70. package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
  71. package/dist/components/agents-sdk/EmployeeChat.js +500 -99
  72. package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
  73. package/dist/components/agents-sdk/EmployeeChrome.js +1375 -557
  74. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
  75. package/dist/components/agents-sdk/EmployeeSchedules.js +281 -64
  76. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
  77. package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
  78. package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
  79. package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
  80. package/dist/components/agents-sdk/ManagerAccountActions.js +142 -35
  81. package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
  82. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  83. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  84. package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
  85. package/dist/components/agents-sdk/McpConnectionRequest.js +332 -117
  86. package/dist/components/agents-sdk/McpConnectorForm.js +320 -100
  87. package/dist/components/agents-sdk/McpPluginCatalog.js +697 -249
  88. package/dist/components/agents-sdk/McpServerIcon.js +57 -14
  89. package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
  90. package/dist/components/agents-sdk/McpServerPicker.js +542 -158
  91. package/dist/components/agents-sdk/ModelSelector.js +1151 -253
  92. package/dist/components/agents-sdk/PromptInputApproval.js +115 -27
  93. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  94. package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
  95. package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
  96. package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
  97. package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
  98. package/dist/components/agents-sdk/SubagentRunPanel.js +357 -129
  99. package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
  100. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  101. package/dist/components/agents-sdk/ThinkChat.js +321 -132
  102. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  103. package/dist/components/agents-sdk/ThinkChatActivity.js +306 -100
  104. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  105. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
  106. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1386 -404
  107. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
  108. package/dist/components/agents-sdk/ThinkExecutionDetail.js +219 -45
  109. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
  110. package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
  111. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
  112. package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
  113. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
  114. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +505 -124
  115. package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
  116. package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
  117. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +71 -26
  118. package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
  119. package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
  120. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
  121. package/dist/components/agents-sdk/ThinkScheduleActions.js +363 -132
  122. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  123. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
  124. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  125. package/dist/components/agents-sdk/ThinkScheduleDetail.js +311 -90
  126. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
  127. package/dist/components/agents-sdk/ThinkScheduleForm.js +1318 -475
  128. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
  129. package/dist/components/agents-sdk/ThinkThreadPicker.js +434 -214
  130. package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
  131. package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
  132. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  133. package/dist/components/agents-sdk/Workspace.js +491 -166
  134. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  135. package/dist/components/agents-sdk/WorkspaceAutomation.js +1492 -415
  136. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  137. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1316 -525
  138. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
  139. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
  140. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  141. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  142. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
  143. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
  144. package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
  145. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
  146. package/dist/components/agents-sdk/WorkspaceExplorer.js +267 -85
  147. package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
  148. package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
  149. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
  150. package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
  151. package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
  152. package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
  153. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
  154. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
  155. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
  156. package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
  157. package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
  158. package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
  159. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
  160. package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
  161. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
  162. package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
  163. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  164. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  165. package/dist/components/agents-sdk/WorkspaceMountManager.js +118 -58
  166. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
  167. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  168. package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
  169. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  170. package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
  171. package/dist/components/ai-sdk/Activity.js +768 -192
  172. package/dist/components/ai-sdk/AgentAttention.js +286 -58
  173. package/dist/components/ai-sdk/AgentChatMessageEditor.js +193 -68
  174. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  175. package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
  176. package/dist/components/ai-sdk/AgentChatTurnError.js +75 -25
  177. package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
  178. package/dist/components/ai-sdk/Approval.js +574 -172
  179. package/dist/components/ai-sdk/Artifact.d.ts +1 -1
  180. package/dist/components/ai-sdk/Artifact.js +535 -128
  181. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  182. package/dist/components/ai-sdk/ChainOfThought.js +404 -80
  183. package/dist/components/ai-sdk/Checkpoint.js +229 -45
  184. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  185. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  186. package/dist/components/ai-sdk/ComposerLink.js +216 -48
  187. package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
  188. package/dist/components/ai-sdk/Context.js +737 -178
  189. package/dist/components/ai-sdk/Conversation.d.ts +1 -1
  190. package/dist/components/ai-sdk/Conversation.js +305 -68
  191. package/dist/components/ai-sdk/ExpansionState.js +74 -15
  192. package/dist/components/ai-sdk/Goal.js +435 -116
  193. package/dist/components/ai-sdk/InlineCitation.js +313 -76
  194. package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
  195. package/dist/components/ai-sdk/Message.d.ts +1 -1
  196. package/dist/components/ai-sdk/Message.js +1010 -195
  197. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  198. package/dist/components/ai-sdk/MessageScroller.js +264 -46
  199. package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
  200. package/dist/components/ai-sdk/Plan.js +639 -128
  201. package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
  202. package/dist/components/ai-sdk/PromptInput.js +2735 -794
  203. package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
  204. package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
  205. package/dist/components/ai-sdk/Queue.js +792 -154
  206. package/dist/components/ai-sdk/Reasoning.js +268 -69
  207. package/dist/components/ai-sdk/Sources.js +226 -63
  208. package/dist/components/ai-sdk/Task.js +294 -71
  209. package/dist/components/ai-sdk/ToolApproval.js +126 -26
  210. package/dist/components/ai-sdk/ToolInvocation.js +112 -22
  211. package/dist/components/extension/ChatGptSignInScreen.js +1 -82
  212. package/dist/components/extension/CodexModelSelector.d.ts +1 -1
  213. package/dist/components/extension/CodexModelSelector.js +467 -146
  214. package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
  215. package/dist/components/extension/ConversationTabPicker.js +254 -76
  216. package/dist/components/extension/FirstRunSetup.d.ts +61 -35
  217. package/dist/components/extension/FirstRunSetup.js +3834 -1012
  218. package/dist/components/foundations/Accordion.js +186 -41
  219. package/dist/components/foundations/AlertDialog.js +425 -97
  220. package/dist/components/foundations/AppIcon.d.ts +13 -13
  221. package/dist/components/foundations/AppIcon.js +183 -34
  222. package/dist/components/foundations/Autocomplete.js +408 -89
  223. package/dist/components/foundations/Avatar.d.ts +100 -2
  224. package/dist/components/foundations/Avatar.js +204 -44
  225. package/dist/components/foundations/Button.js +64 -13
  226. package/dist/components/foundations/Card.js +357 -63
  227. package/dist/components/foundations/Checkbox.js +82 -17
  228. package/dist/components/foundations/CheckboxGroup.js +266 -58
  229. package/dist/components/foundations/Collapsible.d.ts +2 -1
  230. package/dist/components/foundations/Collapsible.js +129 -26
  231. package/dist/components/foundations/Combobox.js +408 -89
  232. package/dist/components/foundations/ContextMenu.d.ts +2 -2
  233. package/dist/components/foundations/ContextMenu.js +591 -117
  234. package/dist/components/foundations/DescriptionList.js +159 -28
  235. package/dist/components/foundations/Dialog.js +373 -89
  236. package/dist/components/foundations/EmptyState.js +86 -23
  237. package/dist/components/foundations/Favicon.d.ts +17 -0
  238. package/dist/components/foundations/Favicon.js +62 -0
  239. package/dist/components/foundations/Field.js +525 -108
  240. package/dist/components/foundations/Fieldset.js +115 -23
  241. package/dist/components/foundations/Form.js +38 -9
  242. package/dist/components/foundations/FormattedDate.d.ts +19 -5
  243. package/dist/components/foundations/FormattedDate.js +82 -12
  244. package/dist/components/foundations/IconButton.d.ts +1 -1
  245. package/dist/components/foundations/IconButton.js +114 -17
  246. package/dist/components/foundations/Input.js +38 -9
  247. package/dist/components/foundations/Kbd.js +55 -10
  248. package/dist/components/foundations/Label.js +56 -12
  249. package/dist/components/foundations/LinkButton.js +67 -15
  250. package/dist/components/foundations/Marker.js +138 -29
  251. package/dist/components/foundations/Menu.d.ts +1 -1
  252. package/dist/components/foundations/Menu.js +634 -136
  253. package/dist/components/foundations/Menubar.d.ts +2 -2
  254. package/dist/components/foundations/Menubar.js +685 -130
  255. package/dist/components/foundations/Meter.js +186 -41
  256. package/dist/components/foundations/NavigationMenu.js +426 -95
  257. package/dist/components/foundations/NumberField.js +223 -49
  258. package/dist/components/foundations/Popover.js +398 -88
  259. package/dist/components/foundations/PreviewCard.js +234 -53
  260. package/dist/components/foundations/Progress.js +117 -25
  261. package/dist/components/foundations/RadioGroup.d.ts +13 -5
  262. package/dist/components/foundations/RadioGroup.js +132 -25
  263. package/dist/components/foundations/ScrollArea.js +230 -51
  264. package/dist/components/foundations/SearchField.d.ts +8 -3
  265. package/dist/components/foundations/SearchField.js +129 -28
  266. package/dist/components/foundations/Select.js +648 -145
  267. package/dist/components/foundations/Separator.js +61 -12
  268. package/dist/components/foundations/Slider.js +260 -57
  269. package/dist/components/foundations/Stepper.d.ts +1 -1
  270. package/dist/components/foundations/Stepper.js +561 -127
  271. package/dist/components/foundations/Switch.js +82 -18
  272. package/dist/components/foundations/Tabs.d.ts +2 -2
  273. package/dist/components/foundations/Tabs.js +282 -53
  274. package/dist/components/foundations/Textarea.js +43 -9
  275. package/dist/components/foundations/ThemeProvider.js +138 -52
  276. package/dist/components/foundations/Toast.d.ts +10 -2
  277. package/dist/components/foundations/Toast.js +322 -75
  278. package/dist/components/foundations/Toggle.d.ts +5 -2
  279. package/dist/components/foundations/Toggle.js +51 -10
  280. package/dist/components/foundations/ToggleGroup.d.ts +3 -3
  281. package/dist/components/foundations/ToggleGroup.js +215 -59
  282. package/dist/components/foundations/Toolbar.js +249 -61
  283. package/dist/components/foundations/Tooltip.d.ts +3 -3
  284. package/dist/components/foundations/Tooltip.js +311 -55
  285. package/dist/components/foundations/TransitionSurface.js +43 -9
  286. package/dist/components/foundations/icons.d.ts +2 -2
  287. package/dist/components/foundations/icons.js +2 -2
  288. package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
  289. package/dist/components/general-purpose/ActionGuide.js +290 -64
  290. package/dist/components/general-purpose/AppFrame.js +72 -14
  291. package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
  292. package/dist/components/general-purpose/AppTopBar.js +349 -60
  293. package/dist/components/general-purpose/BrandLoading.js +37 -9
  294. package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
  295. package/dist/components/general-purpose/CommandPalette.js +271 -0
  296. package/dist/components/general-purpose/Commit.d.ts +1 -1
  297. package/dist/components/general-purpose/Commit.js +937 -167
  298. package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
  299. package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
  300. package/dist/components/general-purpose/FileTree.d.ts +20 -7
  301. package/dist/components/general-purpose/FileTree.js +1 -1
  302. package/dist/components/general-purpose/ListDetail.d.ts +84 -0
  303. package/dist/components/general-purpose/ListDetail.js +423 -0
  304. package/dist/components/general-purpose/NotificationPrompt.js +20 -11
  305. package/dist/components/general-purpose/PricingBillingToggle.js +33 -6
  306. package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
  307. package/dist/components/general-purpose/PricingFAQ.js +53 -12
  308. package/dist/components/general-purpose/PricingPage.js +376 -139
  309. package/dist/components/general-purpose/PricingPlanCard.js +209 -84
  310. package/dist/components/general-purpose/PricingUsageCalculator.js +231 -81
  311. package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
  312. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
  313. package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
  314. package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
  315. package/dist/components/general-purpose/ScreenStack.js +427 -0
  316. package/dist/components/general-purpose/SettingsFormDialog.js +235 -77
  317. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  318. package/dist/components/general-purpose/StatusScreen.js +82 -24
  319. package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
  320. package/dist/components/general-purpose/SwipeActions.js +357 -0
  321. package/dist/components/general-purpose/Terminal.d.ts +22 -48
  322. package/dist/components/general-purpose/Terminal.js +320 -174
  323. package/dist/components/general-purpose/TestResults.js +975 -196
  324. package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
  325. package/dist/components/general-purpose/ThemeModeControl.js +66 -23
  326. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
  327. package/dist/components/general-purpose/WallpaperPicker.js +180 -0
  328. package/dist/components/general-purpose/WebPreview.d.ts +5 -7
  329. package/dist/components/general-purpose/WebPreview.js +770 -203
  330. package/dist/components/nanites/AgentConnection.js +323 -84
  331. package/dist/components/nanites/AgentToolDetail.js +233 -53
  332. package/dist/components/nanites/GithubMotionMark.js +37 -9
  333. package/dist/components/nanites/NaniteScene.js +535 -323
  334. package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
  335. package/dist/container-width-C43ccJ84.js +17 -0
  336. package/dist/context-Ddsp8HgD.js +43 -0
  337. package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
  338. package/dist/copy-button-DWBVJR6D.js +118 -0
  339. package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
  340. package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
  341. package/dist/icons-nLTnB9kd.js +470 -0
  342. package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
  343. package/dist/motion-CGM3i6lX.js +319 -0
  344. package/dist/motion-preferences-6qsDIDvH.js +13 -0
  345. package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
  346. package/dist/progress-ring-BO649JA9.js +79 -0
  347. package/dist/provider-logos-Ceu7iYFx.js +362 -0
  348. package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
  349. package/dist/styles/accessibility.css +26 -0
  350. package/dist/styles/accordion.css +0 -2
  351. package/dist/styles/activity.css +20 -12
  352. package/dist/styles/agent-attention.css +31 -10
  353. package/dist/styles/agent-chat.css +7 -6
  354. package/dist/styles/agent-computer-motion-reduction.css +118 -0
  355. package/dist/styles/agent-computer-motion.css +127 -0
  356. package/dist/styles/agent-computer-phone.css +942 -0
  357. package/dist/styles/agent-computer.css +1764 -0
  358. package/dist/styles/agent-connection.css +5 -5
  359. package/dist/styles/agent-screen-switcher.css +313 -0
  360. package/dist/styles/app-icon.css +34 -30
  361. package/dist/styles/app-top-bar.css +33 -18
  362. package/dist/styles/approval.css +3 -3
  363. package/dist/styles/artifact.css +1 -1
  364. package/dist/styles/attachment-preview.css +2 -4
  365. package/dist/styles/avatar.css +12 -14
  366. package/dist/styles/base-ui-motion.css +84 -18
  367. package/dist/styles/base-ui-motion.test.tsx +305 -0
  368. package/dist/styles/base.css +16 -12
  369. package/dist/styles/brand.test.ts +7 -20
  370. package/dist/styles/browser-control-overlay.css +1 -1
  371. package/dist/styles/browser-live-screen.css +2 -2
  372. package/dist/styles/browser-live-view.css +1 -1
  373. package/dist/styles/browser-replay.css +0 -8
  374. package/dist/styles/browser-run-panel.css +275 -37
  375. package/dist/styles/button.css +52 -9
  376. package/dist/styles/card.css +6 -5
  377. package/dist/styles/chain-of-thought.css +0 -10
  378. package/dist/styles/checkpoint.css +2 -2
  379. package/dist/styles/codex-model-selector.css +2 -2
  380. package/dist/styles/color-contrast.test.ts +18 -1
  381. package/dist/styles/command-palette.css +110 -0
  382. package/dist/styles/composer-link.css +11 -7
  383. package/dist/styles/composition-motion.css +3 -14
  384. package/dist/styles/context.css +2 -2
  385. package/dist/styles/conversation-tab-picker.css +7 -0
  386. package/dist/styles/conversation.css +8 -2
  387. package/dist/styles/dialog.css +2 -2
  388. package/dist/styles/employee-app.css +8 -2
  389. package/dist/styles/employee-chrome.css +4 -4
  390. package/dist/styles/execution-board.css +206 -114
  391. package/dist/styles/execution-result.css +2 -2
  392. package/dist/styles/field.css +187 -4
  393. package/dist/styles/file-tree.css +218 -40
  394. package/dist/styles/first-run-setup.css +914 -187
  395. package/dist/styles/github-motion-mark.css +0 -8
  396. package/dist/styles/index.css +145 -133
  397. package/dist/styles/inline-citation.css +5 -4
  398. package/dist/styles/list-detail.css +57 -0
  399. package/dist/styles/manager-office.css +6 -8
  400. package/dist/styles/manager-work.css +4 -2
  401. package/dist/styles/mcp-plugin-catalog.css +2 -2
  402. package/dist/styles/mcp-server-picker.css +3 -6
  403. package/dist/styles/media-preview-card.css +2 -2
  404. package/dist/styles/menu.css +0 -9
  405. package/dist/styles/menubar.css +18 -6
  406. package/dist/styles/message-scroller.css +47 -9
  407. package/dist/styles/message.css +3 -3
  408. package/dist/styles/model-selector.css +1 -1
  409. package/dist/styles/motion-reduction.css +39 -6
  410. package/dist/styles/pricing-page.css +1 -1
  411. package/dist/styles/prompt-input.css +29 -29
  412. package/dist/styles/queue.css +1 -1
  413. package/dist/styles/recipes.css +212 -28
  414. package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
  415. package/dist/styles/responsive-sidebar-shell.css +40 -43
  416. package/dist/styles/screen-stack.css +123 -0
  417. package/dist/styles/search-field.css +80 -3
  418. package/dist/styles/stepper.css +0 -10
  419. package/dist/styles/streamdown.css +2 -2
  420. package/dist/styles/subagent-run.css +9 -5
  421. package/dist/styles/swipe-actions.css +158 -0
  422. package/dist/styles/tabs.css +80 -23
  423. package/dist/styles/task.css +7 -1
  424. package/dist/styles/terminal.css +66 -78
  425. package/dist/styles/test-results.css +1 -19
  426. package/dist/styles/textarea.css +2 -1
  427. package/dist/styles/theme-mode-control.css +154 -26
  428. package/dist/styles/think-chat-tool-panels.css +1 -1
  429. package/dist/styles/think-execution-workbench.css +0 -9
  430. package/dist/styles/think-full-app.css +7 -1
  431. package/dist/styles/think-schedule.css +81 -54
  432. package/dist/styles/think-thread-picker.css +28 -37
  433. package/dist/styles/toast.css +11 -0
  434. package/dist/styles/toggle-group.css +0 -10
  435. package/dist/styles/toggle.css +13 -0
  436. package/dist/styles/tooltip.css +12 -0
  437. package/dist/styles/transition-surface.css +1 -0
  438. package/dist/styles/wallpaper-picker.css +224 -0
  439. package/dist/styles/web-preview.css +47 -18
  440. package/dist/styles/workspace-automation.css +116 -17
  441. package/dist/styles/workspace-concepts.css +1 -1
  442. package/dist/styles/workspace-desktop.css +124 -0
  443. package/dist/styles/workspace-entity-card.css +3 -1
  444. package/dist/styles/workspace-explorer.css +499 -5
  445. package/dist/utils/brand-marks.d.ts +13 -0
  446. package/dist/utils/brand-marks.js +14 -0
  447. package/dist/utils/desktop-artwork.d.ts +17 -0
  448. package/dist/utils/desktop-artwork.js +18 -0
  449. package/dist/utils/favicon.d.ts +6 -2
  450. package/dist/utils/favicon.js +16 -4
  451. package/dist/utils/structured-code.d.ts +1 -1
  452. package/dist/workspace-assets-DdtnBDU3.js +213 -0
  453. package/dist/{workspace-concept-panel-C_oYhPSx.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
  454. package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
  455. package/dist/workspace-delete-BOY6CMBf.js +183 -0
  456. package/dist/workspace-drag-B6hMXUNt.js +304 -0
  457. package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
  458. package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
  459. package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
  460. package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
  461. package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
  462. package/package.json +9 -3
  463. package/dist/Avatar-t1YRzdwB.d.ts +0 -101
  464. package/dist/CodeBlock-DYQdZUH6.js +0 -318
  465. package/dist/ExecutionResult-2fBkpIGN.js +0 -279
  466. package/dist/FileTree-CDLOD643.js +0 -323
  467. package/dist/ManagerOffice-CvVSHnOM.js +0 -1129
  468. package/dist/SetupChecklist-B-iEta9v.js +0 -78
  469. package/dist/ThinkSchedule-DPoOYWTQ.d.ts +0 -34
  470. package/dist/WorkspaceFileView-DwIkehSM.js +0 -783
  471. package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
  472. package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
  473. package/dist/attachment-preview-1CXJvrmb.js +0 -25
  474. package/dist/chatgpt-sign-in-button-D8AT6x4c.js +0 -32
  475. package/dist/connected-app-drafts-DtA2fBK5.js +0 -283
  476. package/dist/copy-button-DbR932tF.js +0 -45
  477. package/dist/icons-GoybMAB2.js +0 -141
  478. package/dist/progress-ring-L2bbF0ji.js +0 -40
  479. package/dist/provider-logos-DWYY8wNz.js +0 -99
  480. package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
  481. package/dist/workspace-assets-F3r6XltC.js +0 -107
  482. package/dist/workspace-concept-panel-D8oEvR0n.js +0 -66
  483. package/dist/workspace-delete-CQvv1eDE.js +0 -81
  484. package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
@@ -1,9 +1,10 @@
1
- import { D as KeyboardIcon, q as RefreshIcon, r as ArrowLeftIcon } from "../../icons-GoybMAB2.js";
1
+ import { N as KeyboardIcon, et as RefreshIcon, r as ArrowLeftIcon } from "../../icons-nLTnB9kd.js";
2
2
  import { Button } from "../foundations/Button.js";
3
3
  import { WebPreviewNavigationButton } from "../general-purpose/WebPreview.js";
4
4
  import { BrowserLiveView } from "./BrowserLiveView.js";
5
5
  import { BrowserRunPanel } from "./BrowserRunPanel.js";
6
- import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
6
+ import { c } from "react/compiler-runtime";
7
+ import { useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
7
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
9
  //#region src/components/agents-sdk/BrowserLiveScreen.tsx
9
10
  const BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS = 1e4;
@@ -14,461 +15,663 @@ const BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS = 1e4;
14
15
  * tab summaries and selection. This component owns the peer connection, remote-input
15
16
  * mapping, reconnect lifecycle, synthesized browser chrome, and cleanup.
16
17
  */
17
- function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, protocol, getIceServers, label = "Employee browser", controlLabel = "Control employee browser", tabs = [], tabId: selectedTabId, onTabChange }) {
18
+ function BrowserLiveScreen(t0) {
19
+ const $ = c(97);
20
+ const { sendSignal: sendHostSignal, subscribeSignals, protocol, getIceServers, label: t1, controlLabel: t2, tabs: t3, tabId: selectedTabId, onTabChange } = t0;
21
+ const label = t1 === void 0 ? "Employee browser" : t1;
22
+ const controlLabel = t2 === void 0 ? "Control employee browser" : t2;
23
+ let t4;
24
+ if ($[0] !== t3) {
25
+ t4 = t3 === void 0 ? [] : t3;
26
+ $[0] = t3;
27
+ $[1] = t4;
28
+ } else t4 = $[1];
29
+ const tabs = t4;
18
30
  const video = useRef(null);
19
31
  const input = useRef(null);
32
+ const channel = useRef(null);
33
+ const geometry = useRef(null);
34
+ const currentProtocol = useRef(protocol);
35
+ let t5;
36
+ let t6;
37
+ if ($[2] !== protocol) {
38
+ t5 = () => {
39
+ currentProtocol.current = protocol;
40
+ };
41
+ t6 = [protocol];
42
+ $[2] = protocol;
43
+ $[3] = t5;
44
+ $[4] = t6;
45
+ } else {
46
+ t5 = $[3];
47
+ t6 = $[4];
48
+ }
49
+ useLayoutEffect(t5, t6);
50
+ let t7;
51
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
52
+ t7 = function sendInput(events) {
53
+ const open = channel.current;
54
+ const status = geometry.current;
55
+ if (open?.readyState !== "open" || !status || events.length === 0) return false;
56
+ open.send(currentProtocol.current.serializeInput({
57
+ tabId: status.tabId,
58
+ streamGeneration: status.streamGeneration,
59
+ events
60
+ }));
61
+ return true;
62
+ };
63
+ $[5] = t7;
64
+ } else t7 = $[5];
65
+ const sendInput = t7;
66
+ let t8;
67
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
68
+ t8 = function sendCommand(command) {
69
+ const open_0 = channel.current;
70
+ if (open_0?.readyState !== "open") return;
71
+ open_0.send(currentProtocol.current.serializeCommand(command));
72
+ };
73
+ $[6] = t8;
74
+ } else t8 = $[6];
75
+ const sendCommand = t8;
76
+ let t9;
77
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
78
+ t9 = function currentViewGeometry() {
79
+ const element = video.current;
80
+ const status_0 = geometry.current;
81
+ if (!element || !status_0) return null;
82
+ const bounds = element.getBoundingClientRect();
83
+ const sourceWidth = element.videoWidth || status_0.metadata.deviceWidth;
84
+ const sourceHeight = element.videoHeight || status_0.metadata.deviceHeight;
85
+ if (bounds.width === 0 || bounds.height === 0 || sourceWidth <= 0 || sourceHeight <= 0) return null;
86
+ const containScale = Math.min(bounds.width / sourceWidth, bounds.height / sourceHeight);
87
+ const renderedWidth = sourceWidth * containScale;
88
+ const renderedHeight = sourceHeight * containScale;
89
+ return {
90
+ renderedLeft: bounds.left + (bounds.width - renderedWidth) / 2,
91
+ renderedTop: bounds.top + (bounds.height - renderedHeight) / 2,
92
+ renderedWidth,
93
+ renderedHeight,
94
+ zoom: renderedWidth / status_0.metadata.deviceWidth
95
+ };
96
+ };
97
+ $[7] = t9;
98
+ } else t9 = $[7];
99
+ const currentViewGeometry = t9;
100
+ let t10;
101
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
102
+ t10 = function syncInputBounds() {
103
+ const element_0 = input.current;
104
+ if (!element_0) return;
105
+ const view = currentViewGeometry();
106
+ const surface = element_0.parentElement;
107
+ if (!view || !surface) {
108
+ element_0.style.removeProperty("inset");
109
+ element_0.style.removeProperty("left");
110
+ element_0.style.removeProperty("top");
111
+ element_0.style.removeProperty("width");
112
+ element_0.style.removeProperty("height");
113
+ return;
114
+ }
115
+ const bounds_0 = surface.getBoundingClientRect();
116
+ element_0.style.inset = "auto";
117
+ element_0.style.left = `${view.renderedLeft - bounds_0.left}px`;
118
+ element_0.style.top = `${view.renderedTop - bounds_0.top}px`;
119
+ element_0.style.width = `${view.renderedWidth}px`;
120
+ element_0.style.height = `${view.renderedHeight}px`;
121
+ };
122
+ $[8] = t10;
123
+ } else t10 = $[8];
124
+ const syncInputBounds = t10;
125
+ let t11;
126
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
127
+ t11 = function toPagePoint(event) {
128
+ const view_0 = currentViewGeometry();
129
+ return view_0 ? pointWithin(view_0, event) : null;
130
+ };
131
+ $[9] = t11;
132
+ } else t11 = $[9];
133
+ const toPagePoint = t11;
20
134
  const [inputElement, setInputElement] = useState(null);
21
135
  const [videoElement, setVideoElement] = useState(null);
22
136
  const track = useRef(null);
23
- const attachVideo = useCallback((element) => {
24
- video.current = element;
25
- if (element) element.srcObject = track.current;
26
- setVideoElement(element);
27
- }, []);
28
- const showTrack = useCallback((stream) => {
29
- track.current = stream;
30
- if (video.current) {
31
- video.current.srcObject = stream;
32
- syncInputBounds();
33
- }
34
- }, []);
35
- const channel = useRef(null);
36
- const geometry = useRef(null);
37
- const [phase, setPhase] = useState("connecting");
137
+ let t12;
138
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
139
+ t12 = (element_1) => {
140
+ video.current = element_1;
141
+ if (element_1) element_1.srcObject = track.current;
142
+ setVideoElement(element_1);
143
+ };
144
+ $[10] = t12;
145
+ } else t12 = $[10];
146
+ const attachVideo = t12;
147
+ let t13;
148
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
149
+ t13 = (stream) => {
150
+ track.current = stream;
151
+ if (video.current) {
152
+ video.current.srcObject = stream;
153
+ syncInputBounds();
154
+ }
155
+ };
156
+ $[11] = t13;
157
+ } else t13 = $[11];
158
+ const showTrack = t13;
159
+ const [link, setLink] = useState(null);
38
160
  const [failure, setFailure] = useState(null);
39
- const syncVideoInputBounds = useEffectEvent(() => syncInputBounds());
40
- useEffect(() => {
41
- if (!videoElement) return;
42
- videoElement.addEventListener("resize", syncVideoInputBounds);
43
- const observer = new ResizeObserver(syncVideoInputBounds);
44
- observer.observe(videoElement);
45
- syncVideoInputBounds();
46
- return () => {
47
- videoElement.removeEventListener("resize", syncVideoInputBounds);
48
- observer.disconnect();
161
+ let t14;
162
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
163
+ t14 = () => syncInputBounds();
164
+ $[12] = t14;
165
+ } else t14 = $[12];
166
+ const syncVideoInputBounds = useEffectEvent(t14);
167
+ let t15;
168
+ if ($[13] !== syncVideoInputBounds || $[14] !== videoElement) {
169
+ t15 = () => {
170
+ if (!videoElement) return;
171
+ videoElement.addEventListener("resize", syncVideoInputBounds);
172
+ const observer = new ResizeObserver(syncVideoInputBounds);
173
+ observer.observe(videoElement);
174
+ syncVideoInputBounds();
175
+ return () => {
176
+ videoElement.removeEventListener("resize", syncVideoInputBounds);
177
+ observer.disconnect();
178
+ };
49
179
  };
50
- }, [videoElement]);
51
- const sendSignal = useEffectEvent((viewerId, payload) => sendHostSignal({
52
- viewerId,
53
- payload
54
- }));
55
- const loadIceServers = useEffectEvent(async () => await getIceServers?.() ?? []);
56
- const subscribe = useEffectEvent((listener) => subscribeSignals(listener));
57
- const parseStatus = useEffectEvent((value) => protocol.parseStatus(value));
58
- const currentProtocol = useRef(protocol);
59
- useLayoutEffect(() => {
60
- currentProtocol.current = protocol;
61
- }, [protocol]);
180
+ $[13] = syncVideoInputBounds;
181
+ $[14] = videoElement;
182
+ $[15] = t15;
183
+ } else t15 = $[15];
184
+ let t16;
185
+ if ($[16] !== videoElement) {
186
+ t16 = [videoElement];
187
+ $[16] = videoElement;
188
+ $[17] = t16;
189
+ } else t16 = $[17];
190
+ useEffect(t15, t16);
191
+ let t17;
192
+ if ($[18] !== sendHostSignal) {
193
+ t17 = (viewerId, payload) => sendHostSignal({
194
+ viewerId,
195
+ payload
196
+ });
197
+ $[18] = sendHostSignal;
198
+ $[19] = t17;
199
+ } else t17 = $[19];
200
+ const sendSignal = useEffectEvent(t17);
201
+ let t18;
202
+ if ($[20] !== getIceServers) {
203
+ t18 = async () => await getIceServers?.() ?? [];
204
+ $[20] = getIceServers;
205
+ $[21] = t18;
206
+ } else t18 = $[21];
207
+ const loadIceServers = useEffectEvent(t18);
208
+ let t19;
209
+ if ($[22] !== subscribeSignals) {
210
+ t19 = (listener) => subscribeSignals(listener);
211
+ $[22] = subscribeSignals;
212
+ $[23] = t19;
213
+ } else t19 = $[23];
214
+ const subscribe = useEffectEvent(t19);
215
+ let t20;
216
+ if ($[24] !== protocol) {
217
+ t20 = (value) => protocol.parseStatus(value);
218
+ $[24] = protocol;
219
+ $[25] = t20;
220
+ } else t20 = $[25];
221
+ const parseStatus = useEffectEvent(t20);
62
222
  const captureTabId = tabs.some((tab) => tab.tabId === selectedTabId) ? selectedTabId : void 0;
63
223
  const dataChannelLabel = protocol.dataChannelLabel;
64
- const handleWheel = useEffectEvent((event) => {
65
- event.preventDefault();
66
- const point = toPagePoint(event);
67
- if (!point) return;
68
- sendInput([{
69
- kind: "mouse",
70
- type: "mouseWheel",
71
- ...point,
72
- deltaX: event.deltaX,
73
- deltaY: event.deltaY,
74
- modifiers: modifiers(event)
75
- }]);
76
- });
224
+ let t21;
225
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
226
+ t21 = (event_0) => {
227
+ event_0.preventDefault();
228
+ const point = toPagePoint(event_0);
229
+ if (!point) return;
230
+ sendInput([{
231
+ kind: "mouse",
232
+ type: "mouseWheel",
233
+ ...point,
234
+ deltaX: event_0.deltaX,
235
+ deltaY: event_0.deltaY,
236
+ modifiers: modifiers(event_0)
237
+ }]);
238
+ };
239
+ $[26] = t21;
240
+ } else t21 = $[26];
241
+ const handleWheel = useEffectEvent(t21);
77
242
  const [keyboardOpen, setKeyboardOpen] = useState(false);
78
243
  const touch = useRef(null);
79
244
  const mousePress = useRef(null);
80
- const forwardedKeys = useRef(/* @__PURE__ */ new Map());
81
- function cancelPointerState() {
82
- const activeTouch = touch.current;
83
- const activeMouse = mousePress.current;
84
- if (activeTouch) clearTimeout(activeTouch.holdTimer);
85
- touch.current = null;
86
- mousePress.current = null;
87
- const releases = [];
88
- if (activeTouch?.mode === "drag") releases.push(release(activeTouch.lastPage, "left", 0, 1, 0));
89
- if (activeMouse?.pressed) releases.push(release(activeMouse.lastPage, activeMouse.button, 0, activeMouse.clickCount, activeMouse.modifiers));
90
- sendInput(releases);
91
- }
92
- function cancelForwardedKeys() {
93
- const releases = [];
94
- for (const { key, code, keyCode } of forwardedKeys.current.values()) releases.push({
95
- kind: "key",
96
- type: "keyUp",
97
- key,
98
- code,
99
- windowsVirtualKeyCode: keyCode,
100
- modifiers: 0
101
- });
102
- forwardedKeys.current.clear();
103
- sendInput(releases);
104
- }
105
- const releaseKeysOnWindowBlur = useEffectEvent(() => cancelForwardedKeys());
106
- useEffect(() => {
107
- window.addEventListener("blur", releaseKeysOnWindowBlur);
108
- return () => window.removeEventListener("blur", releaseKeysOnWindowBlur);
109
- }, []);
110
- const attachInput = useCallback((element) => {
111
- if (input.current !== element) {
112
- cancelPointerState();
113
- cancelForwardedKeys();
114
- }
115
- input.current = element;
116
- setInputElement(element);
117
- syncInputBounds();
118
- }, []);
119
- useEffect(() => {
120
- if (!inputElement) return;
121
- inputElement.addEventListener("wheel", handleWheel, { passive: false });
122
- return () => inputElement.removeEventListener("wheel", handleWheel);
123
- }, [inputElement]);
124
- const [streamed, setStreamed] = useState(null);
125
- useEffect(() => {
126
- if (captureTabId === void 0) {
127
- setPhase("idle");
128
- setStreamed(null);
129
- return;
130
- }
131
- const tabId = captureTabId;
132
- setPhase("connecting");
133
- let disposed = false;
134
- let connection;
135
- let viewerId = "";
136
- let attempt = 0;
137
- let pendingCandidates = [];
138
- let retryTimer;
139
- let negotiationTimer;
140
- let signaling = Promise.resolve();
141
- function clearRetry() {
142
- if (retryTimer !== void 0) clearTimeout(retryTimer);
143
- retryTimer = void 0;
144
- }
145
- function clearNegotiationTimeout() {
146
- if (negotiationTimer !== void 0) clearTimeout(negotiationTimer);
147
- negotiationTimer = void 0;
148
- }
149
- function closeCurrent(notify) {
150
- const closing = connection;
151
- const closingViewerId = viewerId;
152
- connection = void 0;
153
- cancelPointerState();
154
- cancelForwardedKeys();
155
- channel.current = null;
156
- geometry.current = null;
157
- if (!disposed) setStreamed(null);
158
- showTrack(null);
159
- pendingCandidates = [];
160
- signaling = Promise.resolve();
161
- clearNegotiationTimeout();
162
- closing?.close();
163
- if (notify && closingViewerId) sendSignal(closingViewerId, { kind: "close" }).catch(() => void 0);
164
- }
165
- function scheduleReconnect(error) {
166
- if (disposed) return;
167
- clearNegotiationTimeout();
168
- setPhase("reconnecting");
169
- if (error !== void 0) setFailure(error instanceof Error ? error.message : "Live view connection failed.");
170
- retryTimer ??= setTimeout(() => {
171
- retryTimer = void 0;
172
- restart();
173
- }, RECONNECT_DELAY_MS);
174
- }
175
- const unsubscribe = subscribe((signal) => {
176
- if (signal.viewerId !== viewerId) return;
177
- const payload = signal.payload;
178
- const signalViewerId = signal.viewerId;
179
- signaling = signaling.then(async () => {
180
- const peer = connection;
181
- if (!peer || signalViewerId !== viewerId) return;
182
- if (payload.kind === "answer") {
183
- await peer.setRemoteDescription({
184
- type: "answer",
185
- sdp: payload.sdp
186
- });
187
- if (peer !== connection || signalViewerId !== viewerId) return;
188
- for (const candidate of pendingCandidates.splice(0)) await peer.addIceCandidate(candidate);
189
- return;
190
- }
191
- if (payload.kind === "candidate") {
192
- if (!peer.remoteDescription) {
193
- pendingCandidates.push(payload.candidate);
194
- return;
195
- }
196
- await peer.addIceCandidate(payload.candidate);
197
- }
198
- }).catch((error) => {
199
- if (signalViewerId === viewerId) scheduleReconnect(error);
245
+ let t22;
246
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
247
+ t22 = /* @__PURE__ */ new Map();
248
+ $[27] = t22;
249
+ } else t22 = $[27];
250
+ const forwardedKeys = useRef(t22);
251
+ let t23;
252
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
253
+ t23 = function cancelPointerState() {
254
+ const activeTouch = touch.current;
255
+ const activeMouse = mousePress.current;
256
+ if (activeTouch) clearTimeout(activeTouch.holdTimer);
257
+ touch.current = null;
258
+ mousePress.current = null;
259
+ const releases = [];
260
+ if (activeTouch?.mode === "drag") releases.push(release(activeTouch.lastPage, "left", 0, 1, 0));
261
+ if (activeMouse?.pressed) releases.push(release(activeMouse.lastPage, activeMouse.button, 0, activeMouse.clickCount, activeMouse.modifiers));
262
+ sendInput(releases);
263
+ };
264
+ $[28] = t23;
265
+ } else t23 = $[28];
266
+ const cancelPointerState = t23;
267
+ let t24;
268
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
269
+ t24 = function cancelForwardedKeys() {
270
+ const releases_0 = [];
271
+ for (const { key, code, keyCode } of forwardedKeys.current.values()) releases_0.push({
272
+ kind: "key",
273
+ type: "keyUp",
274
+ key,
275
+ code,
276
+ windowsVirtualKeyCode: keyCode,
277
+ modifiers: 0
200
278
  });
201
- });
202
- async function connect() {
203
- const currentAttempt = ++attempt;
204
- try {
205
- await connectAs(currentAttempt);
206
- } catch (error) {
207
- if (currentAttempt === attempt) scheduleReconnect(error);
279
+ forwardedKeys.current.clear();
280
+ sendInput(releases_0);
281
+ };
282
+ $[29] = t24;
283
+ } else t24 = $[29];
284
+ const cancelForwardedKeys = t24;
285
+ let t25;
286
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
287
+ t25 = () => cancelForwardedKeys();
288
+ $[30] = t25;
289
+ } else t25 = $[30];
290
+ const releaseKeysOnWindowBlur = useEffectEvent(t25);
291
+ let t26;
292
+ if ($[31] !== releaseKeysOnWindowBlur) {
293
+ t26 = () => {
294
+ window.addEventListener("blur", releaseKeysOnWindowBlur);
295
+ return () => window.removeEventListener("blur", releaseKeysOnWindowBlur);
296
+ };
297
+ $[31] = releaseKeysOnWindowBlur;
298
+ $[32] = t26;
299
+ } else t26 = $[32];
300
+ let t27;
301
+ if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
302
+ t27 = [];
303
+ $[33] = t27;
304
+ } else t27 = $[33];
305
+ useEffect(t26, t27);
306
+ let t28;
307
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
308
+ t28 = (element_2) => {
309
+ if (input.current !== element_2) {
310
+ cancelPointerState();
311
+ cancelForwardedKeys();
208
312
  }
209
- }
210
- async function connectAs(currentAttempt) {
211
- const currentViewerId = crypto.randomUUID();
212
- viewerId = currentViewerId;
213
- setFailure(null);
214
- clearNegotiationTimeout();
215
- negotiationTimer = setTimeout(() => {
216
- if (currentAttempt === attempt) scheduleReconnect(/* @__PURE__ */ new Error("The employee machine did not answer the live view."));
217
- }, BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS);
218
- const iceServers = await loadIceServers();
219
- if (disposed || currentAttempt !== attempt) return;
220
- const peer = new RTCPeerConnection({ iceServers });
221
- connection = peer;
222
- pendingCandidates = [];
223
- peer.ontrack = (event) => {
224
- if (peer !== connection) return;
225
- showTrack(event.streams[0] ?? new MediaStream([event.track]));
313
+ input.current = element_2;
314
+ setInputElement(element_2);
315
+ syncInputBounds();
316
+ };
317
+ $[34] = t28;
318
+ } else t28 = $[34];
319
+ const attachInput = t28;
320
+ let t29;
321
+ if ($[35] !== handleWheel || $[36] !== inputElement) {
322
+ t29 = () => {
323
+ if (!inputElement) return;
324
+ inputElement.addEventListener("wheel", handleWheel, { passive: false });
325
+ return () => inputElement.removeEventListener("wheel", handleWheel);
326
+ };
327
+ $[35] = handleWheel;
328
+ $[36] = inputElement;
329
+ $[37] = t29;
330
+ } else t29 = $[37];
331
+ let t30;
332
+ if ($[38] !== inputElement) {
333
+ t30 = [inputElement];
334
+ $[38] = inputElement;
335
+ $[39] = t30;
336
+ } else t30 = $[39];
337
+ useEffect(t29, t30);
338
+ const live = captureTabId !== void 0 && link?.tabId === captureTabId ? link : null;
339
+ const phase = captureTabId === void 0 ? "idle" : live?.phase ?? "connecting";
340
+ const streamed = live?.streamed ?? null;
341
+ let t31;
342
+ if ($[40] !== captureTabId || $[41] !== dataChannelLabel || $[42] !== loadIceServers || $[43] !== parseStatus || $[44] !== sendSignal || $[45] !== subscribe) {
343
+ t31 = () => {
344
+ if (captureTabId === void 0) return;
345
+ const tabId = captureTabId;
346
+ const report = (patch) => setLink((current) => ({
347
+ tabId,
348
+ phase: "connecting",
349
+ streamed: null,
350
+ ...current?.tabId === tabId ? current : void 0,
351
+ ...patch
352
+ }));
353
+ let disposed = false;
354
+ let connection;
355
+ let viewerId_0 = "";
356
+ let attempt = 0;
357
+ let pendingCandidates = [];
358
+ let retryTimer;
359
+ let negotiationTimer;
360
+ let signaling = Promise.resolve();
361
+ const clearRetry = function clearRetry() {
362
+ if (retryTimer !== void 0) clearTimeout(retryTimer);
363
+ retryTimer = void 0;
226
364
  };
227
- peer.onicecandidate = (event) => {
228
- if (event.candidate && peer === connection) sendSignal(currentViewerId, {
229
- kind: "candidate",
230
- candidate: event.candidate.toJSON()
231
- }).catch((error) => {
232
- if (peer === connection && currentViewerId === viewerId) scheduleReconnect(error);
233
- });
365
+ const clearNegotiationTimeout = function clearNegotiationTimeout() {
366
+ if (negotiationTimer !== void 0) clearTimeout(negotiationTimer);
367
+ negotiationTimer = void 0;
234
368
  };
235
- peer.onconnectionstatechange = () => {
236
- if (peer !== connection) return;
237
- if (peer.connectionState === "connected") {
238
- clearRetry();
239
- clearNegotiationTimeout();
240
- setFailure(null);
241
- setPhase((current) => current === "reconnecting" ? geometry.current ? "streaming" : "idle" : current);
242
- }
243
- if (peer.connectionState === "failed" || peer.connectionState === "disconnected") scheduleReconnect();
369
+ const closeCurrent = function closeCurrent(notify) {
370
+ const closing = connection;
371
+ const closingViewerId = viewerId_0;
372
+ connection = void 0;
373
+ cancelPointerState();
374
+ cancelForwardedKeys();
375
+ channel.current = null;
376
+ geometry.current = null;
377
+ if (!disposed) report({ streamed: null });
378
+ showTrack(null);
379
+ pendingCandidates = [];
380
+ signaling = Promise.resolve();
381
+ clearNegotiationTimeout();
382
+ closing?.close();
383
+ if (notify && closingViewerId) sendSignal(closingViewerId, { kind: "close" }).catch(_temp);
244
384
  };
245
- const dataChannel = peer.createDataChannel(dataChannelLabel);
246
- channel.current = dataChannel;
247
- dataChannel.onopen = () => {
248
- if (disposed || peer !== connection || channel.current !== dataChannel) return;
249
- dataChannel.send(currentProtocol.current.serializeInput({
250
- tabId,
251
- streamGeneration: 0,
252
- events: []
253
- }));
385
+ const scheduleReconnect = function scheduleReconnect(error) {
386
+ if (disposed) return;
387
+ clearNegotiationTimeout();
388
+ report({ phase: "reconnecting" });
389
+ if (error !== void 0) setFailure(error instanceof Error ? error.message : "Live view connection failed.");
390
+ if (retryTimer !== void 0) return;
391
+ retryTimer = setTimeout(() => {
392
+ retryTimer = void 0;
393
+ restart();
394
+ }, RECONNECT_DELAY_MS);
254
395
  };
255
- dataChannel.onmessage = (event) => {
256
- if (disposed || peer !== connection || channel.current !== dataChannel) return;
257
- const status = parseStatus(event.data);
258
- if (!status) return;
259
- if (status.kind === "idle") {
260
- cancelPointerState();
261
- cancelForwardedKeys();
262
- geometry.current = null;
263
- syncInputBounds();
264
- setFailure(null);
265
- setPhase("idle");
266
- setStreamed(null);
267
- return;
396
+ const unsubscribe = subscribe((signal) => {
397
+ if (signal.viewerId !== viewerId_0) return;
398
+ const payload_0 = signal.payload;
399
+ const signalViewerId = signal.viewerId;
400
+ signaling = signaling.then(async () => {
401
+ const peer = connection;
402
+ if (!peer || signalViewerId !== viewerId_0) return;
403
+ if (payload_0.kind === "answer") {
404
+ await peer.setRemoteDescription({
405
+ type: "answer",
406
+ sdp: payload_0.sdp
407
+ });
408
+ if (peer !== connection || signalViewerId !== viewerId_0) return;
409
+ for (const candidate of pendingCandidates.splice(0)) await peer.addIceCandidate(candidate);
410
+ return;
411
+ }
412
+ if (payload_0.kind === "candidate") {
413
+ if (!peer.remoteDescription) {
414
+ pendingCandidates.push(payload_0.candidate);
415
+ return;
416
+ }
417
+ await peer.addIceCandidate(payload_0.candidate);
418
+ }
419
+ }).catch((error_0) => {
420
+ if (signalViewerId === viewerId_0) scheduleReconnect(error_0);
421
+ });
422
+ });
423
+ const connect = async function connect() {
424
+ attempt = attempt + 1;
425
+ const currentAttempt = attempt;
426
+ try {
427
+ await connectAs(currentAttempt);
428
+ } catch (t32) {
429
+ const error_1 = t32;
430
+ if (currentAttempt === attempt) scheduleReconnect(error_1);
268
431
  }
269
- if (status.kind === "streaming") {
270
- if (status.tabId !== tabId) return;
271
- const previous = geometry.current;
272
- if (previous?.tabId !== status.tabId || previous.streamGeneration !== status.streamGeneration) {
432
+ };
433
+ async function connectAs(currentAttempt_0) {
434
+ const currentViewerId = crypto.randomUUID();
435
+ viewerId_0 = currentViewerId;
436
+ setFailure(null);
437
+ clearNegotiationTimeout();
438
+ negotiationTimer = setTimeout(() => {
439
+ if (currentAttempt_0 === attempt) scheduleReconnect(/* @__PURE__ */ new Error("The employee machine did not answer the live view."));
440
+ }, BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS);
441
+ const iceServers = await loadIceServers();
442
+ if (disposed || currentAttempt_0 !== attempt) return;
443
+ const peer_0 = new RTCPeerConnection({ iceServers });
444
+ connection = peer_0;
445
+ pendingCandidates = [];
446
+ peer_0.ontrack = (event_1) => {
447
+ if (peer_0 !== connection) return;
448
+ showTrack(event_1.streams[0] ?? new MediaStream([event_1.track]));
449
+ };
450
+ peer_0.onicecandidate = (event_2) => {
451
+ if (event_2.candidate && peer_0 === connection) sendSignal(currentViewerId, {
452
+ kind: "candidate",
453
+ candidate: event_2.candidate.toJSON()
454
+ }).catch((error_2) => {
455
+ if (peer_0 === connection && currentViewerId === viewerId_0) scheduleReconnect(error_2);
456
+ });
457
+ };
458
+ peer_0.onconnectionstatechange = () => {
459
+ if (peer_0 !== connection) return;
460
+ if (peer_0.connectionState === "connected") {
461
+ clearRetry();
462
+ clearNegotiationTimeout();
463
+ setFailure(null);
464
+ const restored = geometry.current ? "streaming" : "idle";
465
+ setLink((current_0) => current_0?.tabId === tabId && current_0.phase === "reconnecting" ? {
466
+ ...current_0,
467
+ phase: restored
468
+ } : current_0);
469
+ }
470
+ if (peer_0.connectionState === "failed" || peer_0.connectionState === "disconnected") scheduleReconnect();
471
+ };
472
+ const dataChannel = peer_0.createDataChannel(dataChannelLabel);
473
+ channel.current = dataChannel;
474
+ dataChannel.onopen = () => {
475
+ if (disposed || peer_0 !== connection || channel.current !== dataChannel) return;
476
+ dataChannel.send(currentProtocol.current.serializeInput({
477
+ tabId,
478
+ streamGeneration: 0,
479
+ events: []
480
+ }));
481
+ };
482
+ dataChannel.onmessage = (event_3) => {
483
+ if (disposed || peer_0 !== connection || channel.current !== dataChannel) return;
484
+ const status_1 = parseStatus(event_3.data);
485
+ if (!status_1) return;
486
+ if (status_1.kind === "idle") {
273
487
  cancelPointerState();
274
488
  cancelForwardedKeys();
489
+ geometry.current = null;
490
+ syncInputBounds();
491
+ setFailure(null);
492
+ report({
493
+ phase: "idle",
494
+ streamed: null
495
+ });
496
+ return;
275
497
  }
276
- geometry.current = status;
277
- syncInputBounds();
278
- setFailure(null);
279
- setPhase("streaming");
280
- setStreamed(status);
281
- return;
282
- }
283
- setFailure(status.message);
284
- };
285
- peer.addTransceiver("video", { direction: "recvonly" });
286
- const offer = await peer.createOffer();
287
- await peer.setLocalDescription(offer);
288
- if (disposed || peer !== connection) return;
289
- await sendSignal(currentViewerId, {
290
- kind: "offer",
291
- sdp: offer.sdp ?? "",
292
- tabId
293
- });
294
- }
295
- function restart() {
296
- clearRetry();
297
- closeCurrent(true);
298
- if (disposed) return;
498
+ if (status_1.kind === "streaming") {
499
+ if (status_1.tabId !== tabId) return;
500
+ const previous = geometry.current;
501
+ if (previous?.tabId !== status_1.tabId || previous.streamGeneration !== status_1.streamGeneration) {
502
+ cancelPointerState();
503
+ cancelForwardedKeys();
504
+ }
505
+ geometry.current = status_1;
506
+ syncInputBounds();
507
+ setFailure(null);
508
+ report({
509
+ phase: "streaming",
510
+ streamed: status_1
511
+ });
512
+ return;
513
+ }
514
+ setFailure(status_1.message);
515
+ };
516
+ peer_0.addTransceiver("video", { direction: "recvonly" });
517
+ const offer = await peer_0.createOffer();
518
+ await peer_0.setLocalDescription(offer);
519
+ if (disposed || peer_0 !== connection) return;
520
+ await sendSignal(currentViewerId, {
521
+ kind: "offer",
522
+ sdp: offer.sdp ?? "",
523
+ tabId
524
+ });
525
+ }
526
+ function restart() {
527
+ clearRetry();
528
+ closeCurrent(true);
529
+ if (disposed) return;
530
+ connect();
531
+ }
299
532
  connect();
300
- }
301
- connect();
302
- return () => {
303
- disposed = true;
304
- attempt += 1;
305
- clearRetry();
306
- unsubscribe();
307
- closeCurrent(true);
533
+ return () => {
534
+ disposed = true;
535
+ attempt = attempt + 1;
536
+ clearRetry();
537
+ unsubscribe();
538
+ closeCurrent(true);
539
+ setLink(null);
540
+ };
308
541
  };
309
- }, [dataChannelLabel, captureTabId]);
310
- function sendInput(events) {
311
- const open = channel.current;
312
- const status = geometry.current;
313
- if (open?.readyState !== "open" || !status || events.length === 0) return false;
314
- open.send(currentProtocol.current.serializeInput({
315
- tabId: status.tabId,
316
- streamGeneration: status.streamGeneration,
317
- events
318
- }));
319
- return true;
320
- }
321
- /**
322
- * A browser-chrome command needs only the channel, not a live stream:
323
- * picking a tab is exactly what a viewer does while nothing is on screen.
324
- */
325
- function sendCommand(command) {
326
- const open = channel.current;
327
- if (open?.readyState !== "open") return;
328
- open.send(currentProtocol.current.serializeCommand(command));
329
- }
330
- /**
331
- * How the displayed picture maps to page CSS pixels, computed from the
332
- * video's current on-screen box. The machine never rescales: it sends the
333
- * geometry with each change and the viewer, which is the side that knows how
334
- * big it drew the picture, does the arithmetic.
335
- *
336
- * A touch gesture freezes one of these at its first contact, because the
337
- * soft keyboard opening or closing mid-gesture moves the video and would
338
- * otherwise put the release somewhere the press never was.
339
- */
340
- function currentViewGeometry() {
341
- const element = video.current;
342
- const status = geometry.current;
343
- if (!element || !status) return null;
344
- const bounds = element.getBoundingClientRect();
345
- const sourceWidth = element.videoWidth || status.metadata.deviceWidth;
346
- const sourceHeight = element.videoHeight || status.metadata.deviceHeight;
347
- if (bounds.width === 0 || bounds.height === 0 || sourceWidth <= 0 || sourceHeight <= 0) return null;
348
- const containScale = Math.min(bounds.width / sourceWidth, bounds.height / sourceHeight);
349
- const renderedWidth = sourceWidth * containScale;
350
- const renderedHeight = sourceHeight * containScale;
351
- return {
352
- renderedLeft: bounds.left + (bounds.width - renderedWidth) / 2,
353
- renderedTop: bounds.top + (bounds.height - renderedHeight) / 2,
354
- renderedWidth,
355
- renderedHeight,
356
- zoom: renderedWidth / status.metadata.deviceWidth
542
+ $[40] = captureTabId;
543
+ $[41] = dataChannelLabel;
544
+ $[42] = loadIceServers;
545
+ $[43] = parseStatus;
546
+ $[44] = sendSignal;
547
+ $[45] = subscribe;
548
+ $[46] = t31;
549
+ } else t31 = $[46];
550
+ let t32;
551
+ if ($[47] !== captureTabId || $[48] !== dataChannelLabel) {
552
+ t32 = [
553
+ dataChannelLabel,
554
+ captureTabId,
555
+ showTrack
556
+ ];
557
+ $[47] = captureTabId;
558
+ $[48] = dataChannelLabel;
559
+ $[49] = t32;
560
+ } else t32 = $[49];
561
+ useEffect(t31, t32);
562
+ let t33;
563
+ if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
564
+ t33 = function beginTouch(event_4) {
565
+ if (touch.current) return;
566
+ const view_1 = currentViewGeometry();
567
+ const startPage = view_1 ? pointWithin(view_1, event_4) : null;
568
+ if (!view_1 || !startPage) return;
569
+ const client = {
570
+ x: event_4.clientX,
571
+ y: event_4.clientY
572
+ };
573
+ const gesture = {
574
+ pointerId: event_4.pointerId,
575
+ mode: "pending",
576
+ view: view_1,
577
+ startClient: client,
578
+ startPage,
579
+ lastClient: client,
580
+ lastPage: startPage,
581
+ holdTimer: setTimeout(() => {
582
+ gesture.mode = "drag";
583
+ sendInput([move(startPage, 0, 0), press(startPage, "left", 1, 1, 0)]);
584
+ }, TOUCH_HOLD_MS)
585
+ };
586
+ touch.current = gesture;
587
+ event_4.currentTarget.setPointerCapture(event_4.pointerId);
357
588
  };
358
- }
359
- function syncInputBounds() {
360
- const element = input.current;
361
- if (!element) return;
362
- const view = currentViewGeometry();
363
- const surface = element.parentElement;
364
- if (!view || !surface) {
365
- element.style.removeProperty("inset");
366
- element.style.removeProperty("left");
367
- element.style.removeProperty("top");
368
- element.style.removeProperty("width");
369
- element.style.removeProperty("height");
370
- return;
371
- }
372
- const bounds = surface.getBoundingClientRect();
373
- element.style.inset = "auto";
374
- element.style.left = `${view.renderedLeft - bounds.left}px`;
375
- element.style.top = `${view.renderedTop - bounds.top}px`;
376
- element.style.width = `${view.renderedWidth}px`;
377
- element.style.height = `${view.renderedHeight}px`;
378
- }
379
- function toPagePoint(event) {
380
- const view = currentViewGeometry();
381
- return view ? pointWithin(view, event) : null;
382
- }
383
- function beginTouch(event) {
384
- if (touch.current) return;
385
- const view = currentViewGeometry();
386
- const startPage = view ? pointWithin(view, event) : null;
387
- if (!view || !startPage) return;
388
- const client = {
389
- x: event.clientX,
390
- y: event.clientY
589
+ $[50] = t33;
590
+ } else t33 = $[50];
591
+ const beginTouch = t33;
592
+ let t34;
593
+ if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
594
+ t34 = function moveTouch(event_5) {
595
+ const gesture_0 = touch.current;
596
+ if (!gesture_0 || event_5.pointerId !== gesture_0.pointerId) return;
597
+ const client_0 = {
598
+ x: event_5.clientX,
599
+ y: event_5.clientY
600
+ };
601
+ if (gesture_0.mode === "pending") {
602
+ if (Math.hypot(client_0.x - gesture_0.startClient.x, client_0.y - gesture_0.startClient.y) <= TOUCH_TAP_SLOP_PX) return;
603
+ clearTimeout(gesture_0.holdTimer);
604
+ gesture_0.mode = "scroll";
605
+ }
606
+ if (gesture_0.mode === "scroll") {
607
+ const deltaX = (gesture_0.lastClient.x - client_0.x) / gesture_0.view.zoom;
608
+ const deltaY = (gesture_0.lastClient.y - client_0.y) / gesture_0.view.zoom;
609
+ gesture_0.lastClient = client_0;
610
+ if (deltaX !== 0 || deltaY !== 0) sendInput([{
611
+ kind: "mouse",
612
+ type: "mouseWheel",
613
+ ...gesture_0.startPage,
614
+ deltaX,
615
+ deltaY
616
+ }]);
617
+ return;
618
+ }
619
+ const point_0 = pointWithin(gesture_0.view, event_5);
620
+ if (!point_0) return;
621
+ gesture_0.lastPage = point_0;
622
+ sendInput([move(point_0, 1, 0)]);
391
623
  };
392
- const gesture = {
393
- pointerId: event.pointerId,
394
- mode: "pending",
395
- view,
396
- startClient: client,
397
- startPage,
398
- lastClient: client,
399
- lastPage: startPage,
400
- holdTimer: setTimeout(() => {
401
- gesture.mode = "drag";
402
- sendInput([move(startPage, 0, 0), press(startPage, "left", 1, 1, 0)]);
403
- }, TOUCH_HOLD_MS)
624
+ $[51] = t34;
625
+ } else t34 = $[51];
626
+ const moveTouch = t34;
627
+ let t35;
628
+ if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
629
+ t35 = function endTouch(event_6, cancelled) {
630
+ const gesture_1 = touch.current;
631
+ if (!gesture_1 || event_6.pointerId !== gesture_1.pointerId) return;
632
+ touch.current = null;
633
+ clearTimeout(gesture_1.holdTimer);
634
+ if (event_6.currentTarget.hasPointerCapture(event_6.pointerId)) event_6.currentTarget.releasePointerCapture(event_6.pointerId);
635
+ if (gesture_1.mode === "pending") {
636
+ if (cancelled) return;
637
+ sendInput([
638
+ move(gesture_1.startPage, 0, 0),
639
+ press(gesture_1.startPage, "left", 1, 1, 0),
640
+ release(gesture_1.startPage, "left", 0, 1, 0)
641
+ ]);
642
+ return;
643
+ }
644
+ if (gesture_1.mode === "drag") sendInput([release(gesture_1.lastPage, "left", 0, 1, 0)]);
404
645
  };
405
- touch.current = gesture;
406
- event.currentTarget.setPointerCapture(event.pointerId);
407
- }
408
- function moveTouch(event) {
409
- const gesture = touch.current;
410
- if (!gesture || event.pointerId !== gesture.pointerId) return;
411
- const client = {
412
- x: event.clientX,
413
- y: event.clientY
646
+ $[52] = t35;
647
+ } else t35 = $[52];
648
+ const endTouch = t35;
649
+ let t36;
650
+ if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
651
+ t36 = function endMouse(event_7) {
652
+ const gesture_2 = mousePress.current;
653
+ if (!gesture_2 || event_7.pointerId !== gesture_2.pointerId) return;
654
+ const point_1 = toPagePoint(event_7) ?? gesture_2.lastPage;
655
+ mousePress.current = null;
656
+ if (!gesture_2.pressed) return;
657
+ sendInput([release(point_1, gesture_2.button, event_7.buttons, gesture_2.clickCount, modifiers(event_7))]);
414
658
  };
415
- if (gesture.mode === "pending") {
416
- if (Math.hypot(client.x - gesture.startClient.x, client.y - gesture.startClient.y) <= TOUCH_TAP_SLOP_PX) return;
417
- clearTimeout(gesture.holdTimer);
418
- gesture.mode = "scroll";
419
- }
420
- if (gesture.mode === "scroll") {
421
- const deltaX = (gesture.lastClient.x - client.x) / gesture.view.zoom;
422
- const deltaY = (gesture.lastClient.y - client.y) / gesture.view.zoom;
423
- gesture.lastClient = client;
424
- if (deltaX !== 0 || deltaY !== 0) sendInput([{
425
- kind: "mouse",
426
- type: "mouseWheel",
427
- ...gesture.startPage,
428
- deltaX,
429
- deltaY
430
- }]);
431
- return;
432
- }
433
- const point = pointWithin(gesture.view, event);
434
- if (!point) return;
435
- gesture.lastPage = point;
436
- sendInput([move(point, 1, 0)]);
437
- }
438
- function endTouch(event, cancelled) {
439
- const gesture = touch.current;
440
- if (!gesture || event.pointerId !== gesture.pointerId) return;
441
- touch.current = null;
442
- clearTimeout(gesture.holdTimer);
443
- if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);
444
- if (gesture.mode === "pending") {
445
- if (cancelled) return;
446
- sendInput([
447
- move(gesture.startPage, 0, 0),
448
- press(gesture.startPage, "left", 1, 1, 0),
449
- release(gesture.startPage, "left", 0, 1, 0)
450
- ]);
451
- return;
452
- }
453
- if (gesture.mode === "drag") sendInput([release(gesture.lastPage, "left", 0, 1, 0)]);
454
- }
455
- function endMouse(event) {
456
- const gesture = mousePress.current;
457
- if (!gesture || event.pointerId !== gesture.pointerId) return;
458
- const point = toPagePoint(event) ?? gesture.lastPage;
459
- mousePress.current = null;
460
- if (!gesture.pressed) return;
461
- sendInput([release(point, gesture.button, event.buttons, gesture.clickCount, modifiers(event))]);
462
- }
659
+ $[53] = t36;
660
+ } else t36 = $[53];
661
+ const endMouse = t36;
463
662
  const notice = failure ?? (phase === "streaming" ? void 0 : PHASE_TEXT[phase]);
464
- const streamedTab = streamed ? tabs.find((tab) => tab.tabId === streamed.tabId) : void 0;
663
+ let t37;
664
+ if ($[54] !== streamed || $[55] !== tabs) {
665
+ t37 = streamed ? tabs.find((tab_0) => tab_0.tabId === streamed.tabId) : void 0;
666
+ $[54] = streamed;
667
+ $[55] = tabs;
668
+ $[56] = t37;
669
+ } else t37 = $[56];
670
+ const streamedTab = t37;
465
671
  const displayUrl = streamed?.pageUrl ?? streamedTab?.url ?? "";
466
- const view = /* @__PURE__ */ jsx(BrowserLiveView, {
467
- expandable: false,
468
- fill: true,
469
- phase,
470
- statusLabel: notice,
471
- renderMedia: (_placement, statusId) => /* @__PURE__ */ jsxs(Fragment, { children: [
672
+ let t38;
673
+ if ($[57] !== controlLabel || $[58] !== keyboardOpen || $[59] !== notice) {
674
+ t38 = (_placement, statusId) => /* @__PURE__ */ jsxs(Fragment, { children: [
472
675
  /* @__PURE__ */ jsx("video", {
473
676
  ref: attachVideo,
474
677
  autoPlay: true,
@@ -485,12 +688,12 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
485
688
  className: "browser-live-screen__input",
486
689
  inputMode: keyboardOpen ? "text" : "none",
487
690
  spellCheck: false,
488
- onBeforeInput: (event) => {
489
- const nativeInput = event.nativeEvent;
691
+ onBeforeInput: (event_8) => {
692
+ const nativeInput = event_8.nativeEvent;
490
693
  if (nativeInput.isComposing) return;
491
694
  if (nativeInput.inputType === "insertLineBreak" || nativeInput.inputType === "insertParagraph") {
492
- event.preventDefault();
493
- event.currentTarget.value = "";
695
+ event_8.preventDefault();
696
+ event_8.currentTarget.value = "";
494
697
  sendInput([{
495
698
  kind: "key",
496
699
  type: "keyDown",
@@ -510,42 +713,43 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
510
713
  return;
511
714
  }
512
715
  if (!nativeInput.data) return;
513
- event.preventDefault();
514
- event.currentTarget.value = "";
716
+ event_8.preventDefault();
717
+ event_8.currentTarget.value = "";
515
718
  sendInput([{
516
719
  kind: "text",
517
720
  text: nativeInput.data
518
721
  }]);
519
722
  },
520
- onInput: (event) => {
521
- if ("isComposing" in event.nativeEvent && event.nativeEvent.isComposing) return;
522
- const text = event.currentTarget.value;
523
- event.currentTarget.value = "";
723
+ onInput: (event_9) => {
724
+ if ("isComposing" in event_9.nativeEvent && event_9.nativeEvent.isComposing) return;
725
+ const text = event_9.currentTarget.value;
726
+ event_9.currentTarget.value = "";
524
727
  if (text) sendInput([{
525
728
  kind: "text",
526
729
  text
527
730
  }]);
528
731
  },
529
- onKeyDown: (event) => {
530
- event.currentTarget.removeAttribute("data-pointer-focus");
531
- if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
532
- if (event.key === "Enter" || event.key === "Tab") event.preventDefault();
533
- if (sendInput([{
732
+ onKeyDown: (event_10) => {
733
+ event_10.currentTarget.removeAttribute("data-pointer-focus");
734
+ if (event_10.nativeEvent.isComposing || event_10.nativeEvent.keyCode === 229) return;
735
+ if (event_10.key === "Enter" || event_10.key === "Tab") event_10.preventDefault();
736
+ const key_0 = {
534
737
  kind: "key",
535
738
  type: "keyDown",
536
- key: event.key,
537
- code: event.code,
538
- windowsVirtualKeyCode: event.keyCode,
539
- ...event.key === "Enter" ? { text: "\r" } : {},
540
- modifiers: modifiers(event)
541
- }])) forwardedKeys.current.set(event.code || event.key, {
542
- key: event.key,
543
- code: event.code,
544
- keyCode: event.keyCode
739
+ key: event_10.key,
740
+ code: event_10.code,
741
+ windowsVirtualKeyCode: event_10.keyCode,
742
+ ...event_10.key === "Enter" ? { text: "\r" } : {},
743
+ modifiers: modifiers(event_10)
744
+ };
745
+ if (sendInput([key_0])) forwardedKeys.current.set(event_10.code || event_10.key, {
746
+ key: event_10.key,
747
+ code: event_10.code,
748
+ keyCode: event_10.keyCode
545
749
  });
546
750
  },
547
- onKeyUp: (event) => {
548
- const physicalKey = event.code || event.key;
751
+ onKeyUp: (event_11) => {
752
+ const physicalKey = event_11.code || event_11.key;
549
753
  const forwardedKey = forwardedKeys.current.get(physicalKey);
550
754
  if (!forwardedKey) return;
551
755
  forwardedKeys.current.delete(physicalKey);
@@ -555,93 +759,91 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
555
759
  key: forwardedKey.key,
556
760
  code: forwardedKey.code,
557
761
  windowsVirtualKeyCode: forwardedKey.keyCode,
558
- modifiers: modifiers(event)
762
+ modifiers: modifiers(event_11)
559
763
  }]);
560
764
  },
561
- onPaste: (event) => {
562
- event.preventDefault();
563
- const text = event.clipboardData.getData("text");
564
- if (text) sendInput([{
765
+ onPaste: (event_12) => {
766
+ event_12.preventDefault();
767
+ const text_0 = event_12.clipboardData.getData("text");
768
+ if (text_0) sendInput([{
565
769
  kind: "text",
566
- text
770
+ text: text_0
567
771
  }]);
568
772
  },
569
- onContextMenu: (event) => {
570
- event.preventDefault();
571
- },
572
- onBlur: (event) => {
573
- event.currentTarget.removeAttribute("data-pointer-focus");
773
+ onContextMenu: _temp2,
774
+ onBlur: (event_14) => {
775
+ event_14.currentTarget.removeAttribute("data-pointer-focus");
574
776
  cancelForwardedKeys();
575
777
  },
576
- onMouseDown: (event) => {
577
- const gesture = mousePress.current;
578
- if (!gesture || gesture.pressed) return;
579
- gesture.button = mouseButton(event.button);
580
- gesture.clickCount = event.detail > 0 ? event.detail : 1;
581
- gesture.modifiers = modifiers(event);
582
- gesture.pressed = true;
583
- sendInput([press(gesture.lastPage, gesture.button, event.buttons, gesture.clickCount, gesture.modifiers)]);
778
+ onMouseDown: (event_15) => {
779
+ const gesture_3 = mousePress.current;
780
+ if (!gesture_3 || gesture_3.pressed) return;
781
+ gesture_3.button = mouseButton(event_15.button);
782
+ gesture_3.clickCount = event_15.detail > 0 ? event_15.detail : 1;
783
+ gesture_3.modifiers = modifiers(event_15);
784
+ gesture_3.pressed = true;
785
+ sendInput([press(gesture_3.lastPage, gesture_3.button, event_15.buttons, gesture_3.clickCount, gesture_3.modifiers)]);
584
786
  },
585
- onPointerDown: (event) => {
586
- event.currentTarget.dataset.pointerFocus = "";
587
- if (event.pointerType === "touch") {
588
- beginTouch(event);
787
+ onPointerDown: (event_16) => {
788
+ event_16.currentTarget.dataset.pointerFocus = "";
789
+ if (event_16.pointerType === "touch") {
790
+ beginTouch(event_16);
589
791
  return;
590
792
  }
591
- const point = toPagePoint(event);
592
- if (point) {
593
- const button = mouseButton(event.button);
594
- const clickCount = event.detail > 0 ? event.detail : 1;
595
- const modifierMask = modifiers(event);
596
- const pressed = event.pointerType !== "mouse";
597
- event.currentTarget.setPointerCapture(event.pointerId);
793
+ const point_2 = toPagePoint(event_16);
794
+ if (point_2) {
795
+ const button = mouseButton(event_16.button);
796
+ const clickCount = event_16.detail > 0 ? event_16.detail : 1;
797
+ const modifierMask = modifiers(event_16);
798
+ const pressed = event_16.pointerType !== "mouse";
799
+ event_16.currentTarget.setPointerCapture(event_16.pointerId);
598
800
  mousePress.current = {
599
801
  button,
600
802
  clickCount,
601
- lastPage: point,
803
+ lastPage: point_2,
602
804
  modifiers: modifierMask,
603
- pointerId: event.pointerId,
805
+ pointerId: event_16.pointerId,
604
806
  pressed
605
807
  };
606
- if (pressed) sendInput([press(point, button, event.buttons, clickCount, modifierMask)]);
808
+ if (pressed) sendInput([press(point_2, button, event_16.buttons, clickCount, modifierMask)]);
607
809
  }
608
810
  },
609
- onPointerMove: (event) => {
610
- if (event.pointerType === "touch") {
611
- moveTouch(event);
811
+ onPointerMove: (event_17) => {
812
+ if (event_17.pointerType === "touch") {
813
+ moveTouch(event_17);
612
814
  return;
613
815
  }
614
- const point = toPagePoint(event);
615
- if (point) {
616
- const modifierMask = modifiers(event);
816
+ const point_3 = toPagePoint(event_17);
817
+ if (point_3) {
818
+ const modifierMask_0 = modifiers(event_17);
617
819
  if (mousePress.current) {
618
- mousePress.current.lastPage = point;
619
- mousePress.current.modifiers = modifierMask;
820
+ mousePress.current.lastPage = point_3;
821
+ mousePress.current.modifiers = modifierMask_0;
620
822
  }
621
- sendInput([move(point, event.buttons, modifierMask)]);
823
+ sendInput([move(point_3, event_17.buttons, modifierMask_0)]);
622
824
  }
623
825
  },
624
- onPointerUp: (event) => {
625
- if (event.pointerType === "touch") {
626
- endTouch(event, false);
826
+ onPointerUp: (event_18) => {
827
+ if (event_18.pointerType === "touch") {
828
+ endTouch(event_18, false);
627
829
  return;
628
830
  }
629
- endMouse(event);
630
- if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);
831
+ endMouse(event_18);
832
+ if (event_18.currentTarget.hasPointerCapture(event_18.pointerId)) event_18.currentTarget.releasePointerCapture(event_18.pointerId);
631
833
  },
632
- onPointerCancel: (event) => {
633
- if (event.pointerType === "touch") {
634
- endTouch(event, true);
834
+ onPointerCancel: (event_19) => {
835
+ if (event_19.pointerType === "touch") {
836
+ endTouch(event_19, true);
635
837
  return;
636
838
  }
637
- endMouse(event);
839
+ endMouse(event_19);
638
840
  },
639
- onLostPointerCapture: (event) => {
640
- if (event.pointerType === "touch") {
641
- endTouch(event, true);
841
+ onLostPointerCapture: (event_20) => {
842
+ if (event_20.pointerType === "touch") {
843
+ endTouch(event_20, true);
642
844
  return;
643
845
  }
644
- endMouse(event);
846
+ endMouse(event_20);
645
847
  }
646
848
  }),
647
849
  /* @__PURE__ */ jsx(Button, {
@@ -653,29 +855,53 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
653
855
  size: "sm",
654
856
  variant: "ghost",
655
857
  onClick: () => {
656
- const element = input.current;
657
- const open = !keyboardOpen;
658
- setKeyboardOpen(open);
659
- if (!element) return;
660
- element.inputMode = open ? "text" : "none";
661
- if (open) element.focus();
662
- else element.blur();
858
+ const element_3 = input.current;
859
+ const open_1 = !keyboardOpen;
860
+ setKeyboardOpen(open_1);
861
+ if (!element_3) return;
862
+ element_3.inputMode = open_1 ? "text" : "none";
863
+ if (open_1) element_3.focus();
864
+ else element_3.blur();
663
865
  },
664
866
  children: /* @__PURE__ */ jsx(KeyboardIcon, {})
665
867
  })
666
- ] })
667
- });
668
- return /* @__PURE__ */ jsx(BrowserRunPanel, {
669
- label,
670
- tabs: tabs.map((tab) => ({
671
- id: String(tab.tabId),
672
- title: tab.title || tab.url || `Tab ${String(tab.tabId)}`,
673
- ...tab.url === void 0 ? {} : { url: tab.url }
674
- })),
675
- selectedTabId: captureTabId === void 0 ? null : String(captureTabId),
676
- onSelectTab: (id) => onTabChange(Number(id)),
677
- url: displayUrl,
678
- onOpenUrl: (next) => {
868
+ ] });
869
+ $[57] = controlLabel;
870
+ $[58] = keyboardOpen;
871
+ $[59] = notice;
872
+ $[60] = t38;
873
+ } else t38 = $[60];
874
+ let t39;
875
+ if ($[61] !== notice || $[62] !== phase || $[63] !== t38) {
876
+ t39 = /* @__PURE__ */ jsx(BrowserLiveView, {
877
+ expandable: false,
878
+ fill: true,
879
+ phase,
880
+ statusLabel: notice,
881
+ renderMedia: t38
882
+ });
883
+ $[61] = notice;
884
+ $[62] = phase;
885
+ $[63] = t38;
886
+ $[64] = t39;
887
+ } else t39 = $[64];
888
+ const view_2 = t39;
889
+ let t40;
890
+ if ($[65] !== tabs) {
891
+ t40 = tabs.map(_temp3);
892
+ $[65] = tabs;
893
+ $[66] = t40;
894
+ } else t40 = $[66];
895
+ const t41 = captureTabId === void 0 ? null : String(captureTabId);
896
+ let t42;
897
+ if ($[67] !== onTabChange) {
898
+ t42 = (id) => onTabChange(Number(id));
899
+ $[67] = onTabChange;
900
+ $[68] = t42;
901
+ } else t42 = $[68];
902
+ let t43;
903
+ if ($[69] !== streamed) {
904
+ t43 = (next) => {
679
905
  if (!streamed) return;
680
906
  const url = normalizeOpenUrl(next);
681
907
  if (url) sendCommand({
@@ -683,32 +909,115 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
683
909
  tabId: streamed.tabId,
684
910
  url
685
911
  });
686
- },
687
- urlLabel: "Streamed page URL",
688
- urlPlaceholder: streamed ? "Open a page…" : "Nothing is streaming",
689
- urlDisabled: !streamed,
690
- navigation: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(WebPreviewNavigationButton, {
912
+ };
913
+ $[69] = streamed;
914
+ $[70] = t43;
915
+ } else t43 = $[70];
916
+ const t44 = streamed ? "Open a page…" : "Nothing is streaming";
917
+ const t45 = !streamed;
918
+ const t46 = !streamed;
919
+ let t47;
920
+ if ($[71] !== streamed) {
921
+ t47 = () => streamed && sendCommand({
922
+ kind: "navigate",
923
+ tabId: streamed.tabId,
924
+ action: "back"
925
+ });
926
+ $[71] = streamed;
927
+ $[72] = t47;
928
+ } else t47 = $[72];
929
+ let t48;
930
+ if ($[73] === Symbol.for("react.memo_cache_sentinel")) {
931
+ t48 = /* @__PURE__ */ jsx(ArrowLeftIcon, {});
932
+ $[73] = t48;
933
+ } else t48 = $[73];
934
+ let t49;
935
+ if ($[74] !== t46 || $[75] !== t47) {
936
+ t49 = /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
691
937
  label: "Back",
692
- disabled: !streamed,
693
- onClick: () => streamed && sendCommand({
694
- kind: "navigate",
695
- tabId: streamed.tabId,
696
- action: "back"
697
- }),
698
- children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
699
- }), /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
938
+ disabled: t46,
939
+ onClick: t47,
940
+ children: t48
941
+ });
942
+ $[74] = t46;
943
+ $[75] = t47;
944
+ $[76] = t49;
945
+ } else t49 = $[76];
946
+ const t50 = !streamed;
947
+ let t51;
948
+ if ($[77] !== streamed) {
949
+ t51 = () => streamed && sendCommand({
950
+ kind: "navigate",
951
+ tabId: streamed.tabId,
952
+ action: "reload"
953
+ });
954
+ $[77] = streamed;
955
+ $[78] = t51;
956
+ } else t51 = $[78];
957
+ let t52;
958
+ if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
959
+ t52 = /* @__PURE__ */ jsx(RefreshIcon, {});
960
+ $[79] = t52;
961
+ } else t52 = $[79];
962
+ let t53;
963
+ if ($[80] !== t50 || $[81] !== t51) {
964
+ t53 = /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
700
965
  label: "Reload",
701
- disabled: !streamed,
702
- onClick: () => streamed && sendCommand({
703
- kind: "navigate",
704
- tabId: streamed.tabId,
705
- action: "reload"
706
- }),
707
- children: /* @__PURE__ */ jsx(RefreshIcon, {})
708
- })] }),
709
- children: view
710
- });
966
+ disabled: t50,
967
+ onClick: t51,
968
+ children: t52
969
+ });
970
+ $[80] = t50;
971
+ $[81] = t51;
972
+ $[82] = t53;
973
+ } else t53 = $[82];
974
+ let t54;
975
+ if ($[83] !== t49 || $[84] !== t53) {
976
+ t54 = /* @__PURE__ */ jsxs(Fragment, { children: [t49, t53] });
977
+ $[83] = t49;
978
+ $[84] = t53;
979
+ $[85] = t54;
980
+ } else t54 = $[85];
981
+ let t55;
982
+ if ($[86] !== displayUrl || $[87] !== label || $[88] !== t40 || $[89] !== t41 || $[90] !== t42 || $[91] !== t43 || $[92] !== t44 || $[93] !== t45 || $[94] !== t54 || $[95] !== view_2) {
983
+ t55 = /* @__PURE__ */ jsx(BrowserRunPanel, {
984
+ label,
985
+ tabs: t40,
986
+ selectedTabId: t41,
987
+ onSelectTab: t42,
988
+ url: displayUrl,
989
+ onOpenUrl: t43,
990
+ urlLabel: "Streamed page URL",
991
+ urlPlaceholder: t44,
992
+ urlDisabled: t45,
993
+ navigation: t54,
994
+ children: view_2
995
+ });
996
+ $[86] = displayUrl;
997
+ $[87] = label;
998
+ $[88] = t40;
999
+ $[89] = t41;
1000
+ $[90] = t42;
1001
+ $[91] = t43;
1002
+ $[92] = t44;
1003
+ $[93] = t45;
1004
+ $[94] = t54;
1005
+ $[95] = view_2;
1006
+ $[96] = t55;
1007
+ } else t55 = $[96];
1008
+ return t55;
1009
+ }
1010
+ function _temp3(tab_1) {
1011
+ return {
1012
+ id: String(tab_1.tabId),
1013
+ title: tab_1.title || tab_1.url || `Tab ${String(tab_1.tabId)}`,
1014
+ ...tab_1.url === void 0 ? {} : { url: tab_1.url }
1015
+ };
1016
+ }
1017
+ function _temp2(event_13) {
1018
+ event_13.preventDefault();
711
1019
  }
1020
+ function _temp() {}
712
1021
  /**
713
1022
  * What a thumb types is rarely a URL: absent scheme becomes https, and
714
1023
  * anything that still is not an http(s) page is refused here, mirroring the