dorkos 0.133.0 → 0.134.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 (324) hide show
  1. package/dist/bin/cli.js +371 -82
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-D-EHHVPa.js → AboutPage-zOZ0j1a0.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-BTHnE1vP.js → ActivityErrorState-BlHkTJeC.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-BfSLPIdR.js → ActivityPage-LCOV7KDT.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-PwUBjQw8.js → ActivityRow-CvDae84E.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-DgkNN6bi.js → AdapterIcon-Dm5QP8_9.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-DX0dzp7q.js → AdapterSetupWizard-CNga-lEN.js} +1 -1
  10. package/dist/client/assets/{AgentOptionRow-ApuDEKqq.js → AgentOptionRow-CHb4ifHN.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-BDci-9aL.js → AgentPicker-B8WFWr7p.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-B2gxCMGi.js → AgentRequestCard-Cnhi_1sr.js} +3 -3
  13. package/dist/client/assets/{AppearancePage-8SVnFe0k.js → AppearancePage-BI5qdQoW.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-CnL1ubxL.js → ApplyToOverridesDialog-gSHV8ggp.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-CCKhUtil.js → AttentionSignalRow-QgzOBKxa.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-B7wFPzG4.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-Ck8dc5X4.js} +3 -3
  17. package/dist/client/assets/{BindingDialog-C4BHVXno.js → BindingDialog-DX1N_tTX.js} +1 -1
  18. package/dist/client/assets/{BlintzCanvas-7E5uwVms.js → BlintzCanvas-FqS5vfnA.js} +3 -3
  19. package/dist/client/assets/{CanvasCsvContent-l7lfyDGn.js → CanvasCsvContent-B9h8JQsV.js} +4 -4
  20. package/dist/client/assets/CanvasFileContent-BXo8hS_n.js +2 -0
  21. package/dist/client/assets/CanvasModel3dContent-BhAho9NF.js +2 -0
  22. package/dist/client/assets/{ChannelComposer-CAYvz_ZB.js → ChannelComposer-DUKyoCYz.js} +5 -5
  23. package/dist/client/assets/{ChatAppsOff-CNeKBVNz.js → ChatAppsOff-hxeSExhA.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-BZRcNFsS.js → CodeMirrorDiff-BoDEtyYj.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-DD5tArRn.js → CodeMirrorEditor-CU7h0emU.js} +1 -1
  26. package/dist/client/assets/{ComputerResourceView-BUmsVssG.js → ComputerResourceView-Dd4Kedxf.js} +1 -1
  27. package/dist/client/assets/{ComputerViewer-BKMR5LkF.js → ComputerViewer-CssfoCBB.js} +1 -1
  28. package/dist/client/assets/{ConnectionAccessLists-DYUiFmPY.js → ConnectionAccessLists-2qFBRKpv.js} +1 -1
  29. package/dist/client/assets/{ConnectionsPage-DR2Kfm9Q.js → ConnectionsPage-CPyrw58B.js} +1 -1
  30. package/dist/client/assets/{ConventionPage-Do6q8873.js → ConventionPage-B2MERyNx.js} +2 -2
  31. package/dist/client/assets/{ExtensionPageRoute-CP7NM7fw.js → ExtensionPageRoute-7x-7Ad0_.js} +1 -1
  32. package/dist/client/assets/{FeatureDisabledState-Bi23k3rg.js → FeatureDisabledState-DsbRcnZ6.js} +1 -1
  33. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-lRlmDXYz.js → FloatingTanStackRouterDevtools-CqogiFob-BReszru7.js} +1 -1
  34. package/dist/client/assets/{ForwardConsentHost-DSR1pEEK.js → ForwardConsentHost-DOwU-xQ9.js} +1 -1
  35. package/dist/client/assets/HandlePage-B7fNgSTl.js +1 -0
  36. package/dist/client/assets/{HeartbeatPage-BTNVcHOI.js → HeartbeatPage-0qi56iQb.js} +1 -1
  37. package/dist/client/assets/{KeyEntry-67acsEG2.js → KeyEntry-uKZG5d2z.js} +1 -1
  38. package/dist/client/assets/{LexicalField-Cb68LIar.js → LexicalField-CKc8eUK3.js} +2 -2
  39. package/dist/client/assets/{ManagesPage-ChPlBF42.js → ManagesPage-DWVLpjw2.js} +1 -1
  40. package/dist/client/assets/{Marketplace-CzPhJEE1.js → Marketplace-VBnmDEQE.js} +4 -4
  41. package/dist/client/assets/{MarketplaceSourcesView-CmQgxQmU.js → MarketplaceSourcesView-BRuo8wIH.js} +1 -1
  42. package/dist/client/assets/{McpAppFrame-z5JUaCSA.js → McpAppFrame-IfamHBcy.js} +1 -1
  43. package/dist/client/assets/{McpSigninBody-ZrnzwrOH.js → McpSigninBody-VmuxAjoo.js} +1 -1
  44. package/dist/client/assets/{Model3dViewer-HJpWK-JI.js → Model3dViewer-CT4aYUpn.js} +1 -1
  45. package/dist/client/assets/NamePage-CFRvBLJ8.js +1 -0
  46. package/dist/client/assets/NewDirectMessageMenu-BZFyclIS.js +1 -0
  47. package/dist/client/assets/{NotificationsPage-DwNUI0Z3.js → NotificationsPage-DMJf-hq3.js} +1 -1
  48. package/dist/client/assets/{OpenMeshSwitch-RNAZY1vn.js → OpenMeshSwitch-DltP6-54.js} +1 -1
  49. package/dist/client/assets/{OperatorIdentityForm-B7S2C_eT.js → OperatorIdentityForm-C8oS_fQG.js} +1 -1
  50. package/dist/client/assets/PermissionHistory-BAe31Nl3.js +1 -0
  51. package/dist/client/assets/{PermissionsPage-ToK0DZVV.js → PermissionsPage-CqvpcXTJ.js} +1 -1
  52. package/dist/client/assets/{PersonalityPopover-BvMtUQRM.js → PersonalityPopover-D8l_Hfc1.js} +1 -1
  53. package/dist/client/assets/PhotoPage-DTl81tTW.js +1 -0
  54. package/dist/client/assets/{PreviewRefusedNotice-DzbkMrUo.js → PreviewRefusedNotice-DZh7zTEt.js} +1 -1
  55. package/dist/client/assets/{ProfileFields-DU8dTGHT.js → ProfileFields-T1f833SK.js} +1 -1
  56. package/dist/client/assets/{ProfilePanelContainer-BfT-ufV7.js → ProfilePanelContainer-BSbE5rqM.js} +1 -1
  57. package/dist/client/assets/{ProfileRolePicker-DrOtV-0N.js → ProfileRolePicker-CpAhjq-e.js} +1 -1
  58. package/dist/client/assets/{PromptSuggestionChips-CEnhme_V.js → PromptSuggestionChips-BGZ3HP31.js} +1 -1
  59. package/dist/client/assets/{ReportsToPopover-CwjpR1Tw.js → ReportsToPopover-DfmvDL7E.js} +1 -1
  60. package/dist/client/assets/{RoomSurface-CChzNJKw.js → RoomSurface-DCYXQ79N.js} +1 -1
  61. package/dist/client/assets/{RoomsPage-Dbf6ijKr.js → RoomsPage-DTMTTWEf.js} +1 -1
  62. package/dist/client/assets/{RunsOnPopover-Bh5sSsSC.js → RunsOnPopover-CjJiJgly.js} +1 -1
  63. package/dist/client/assets/{RuntimeConnectFlow-BYQnY5vv.js → RuntimeConnectFlow-Dinsb9em.js} +1 -1
  64. package/dist/client/assets/{RuntimeSetupDialog-DTO5v0dP.js → RuntimeSetupDialog-UhsfZRye.js} +1 -1
  65. package/dist/client/assets/{SeenDevices-cuY7ASEy.js → SeenDevices-CuXXI7Jv.js} +3 -3
  66. package/dist/client/assets/{SessionsPage-BrqpVx-t.js → SessionsPage-Cn4rUeyL.js} +1 -1
  67. package/dist/client/assets/{SettingsDialog-DCAZX_1d.js → SettingsDialog-CZrhYejc.js} +3 -3
  68. package/dist/client/assets/{SkillsPage-D5who_ZH.js → SkillsPage-CoanF7Jz.js} +1 -1
  69. package/dist/client/assets/{TaskDialogWrapper-BJ6XtOC5.js → TaskDialogWrapper-CU4PkcGk.js} +1 -1
  70. package/dist/client/assets/{TasksEmptyState-B3SjsxQa.js → TasksEmptyState-lWVZXYPS.js} +2 -2
  71. package/dist/client/assets/{TasksPage-B72w7J87.js → TasksPage-BPmiut-D.js} +1 -1
  72. package/dist/client/assets/{TeamComputerEntry-B9ma5j-X.js → TeamComputerEntry-2RKJhINy.js} +1 -1
  73. package/dist/client/assets/{TodoPromiseList-DDKWAfmv.js → TodoPromiseList-iODTn1_b.js} +1 -1
  74. package/dist/client/assets/{TodoPromisesPage-BNXpvXzS.js → TodoPromisesPage-BCm38YVu.js} +1 -1
  75. package/dist/client/assets/{ToolsPage-DbJykCG3.js → ToolsPage-Bboa9crU.js} +1 -1
  76. package/dist/client/assets/{TopologyGraph-DKZS3nlr.js → TopologyGraph-Dw_sLFBL.js} +1 -1
  77. package/dist/client/assets/{TourHost-Bw3Uoea5.js → TourHost-BUV9rMNn.js} +1 -1
  78. package/dist/client/assets/{UnlinkDialog-B-XCFNSd.js → UnlinkDialog-B7lL7sxN.js} +1 -1
  79. package/dist/client/assets/{UnreadDivider-1aPVzwd7.js → UnreadDivider-DCB47jhk.js} +1 -1
  80. package/dist/client/assets/{WidgetErrorCard-C5ieVv_9.js → WidgetErrorCard-D14BNvfm.js} +2 -2
  81. package/dist/client/assets/{WithheldExtensionsNotice-CCO4ClRZ.js → WithheldExtensionsNotice-I0VwWxDY.js} +1 -1
  82. package/dist/client/assets/{WorkQueuePage-BbPKNwDg.js → WorkQueuePage-wVj3wlat.js} +1 -1
  83. package/dist/client/assets/{WorkView-BRcytACJ.js → WorkView-MSsuFZVO.js} +1 -1
  84. package/dist/client/assets/{_shell-EwFeSIGp.js → _shell-Bp1Mn6YU.js} +4 -4
  85. package/dist/client/assets/{_shell._home-DD2mg-iK.js → _shell._home-CylH7Gjr.js} +1 -1
  86. package/dist/client/assets/{_shell._home.activity-Z1QuU2M4.js → _shell._home.activity-BABzsE_Y.js} +1 -1
  87. package/dist/client/assets/_shell._home.index-BWXNHCGe.js +3 -0
  88. package/dist/client/assets/{_shell._home.tasks-BtC85Iut.js → _shell._home.tasks-BJg6t5SW.js} +1 -1
  89. package/dist/client/assets/{_shell._home.workspaces-qMG5OJYR.js → _shell._home.workspaces-B3LBf9vr.js} +1 -1
  90. package/dist/client/assets/{_shell.channels-BE4EK-iM.js → _shell.channels-C0xYFINv.js} +2 -2
  91. package/dist/client/assets/_shell.connections-73FPamLr.js +6 -0
  92. package/dist/client/assets/{_shell.feedback-requests-CwKSkkuD.js → _shell.feedback-requests-BYYmQE_b.js} +1 -1
  93. package/dist/client/assets/_shell.marketplace-CiBixBHr.js +1 -0
  94. package/dist/client/assets/_shell.marketplace_.sources-DPUWEdt6.js +1 -0
  95. package/dist/client/assets/_shell.session-CJhLuYyA.js +1 -0
  96. package/dist/client/assets/{_shell.team-Dm5a4f8_.js → _shell.team-BbulfYAQ.js} +3 -3
  97. package/dist/client/assets/_shell.threads-CRFlslhF.js +1 -0
  98. package/dist/client/assets/_shell.todos-CmwRh6jX.js +6 -0
  99. package/dist/client/assets/_shell.x._extensionId-DdKU91-V.js +1 -0
  100. package/dist/client/assets/_shell.x._extensionId_._-DdKU91-V.js +1 -0
  101. package/dist/client/assets/{abnfDiagram-WEYOIA3C-Bu2T3jVw.js → abnfDiagram-WEYOIA3C-CF3eRhtw.js} +1 -1
  102. package/dist/client/assets/{access-copy-tkiFMhRf.js → access-copy-EuKlRWLG.js} +1 -1
  103. package/dist/client/assets/{arc-5q4SfXO9.js → arc-BqnZif1q.js} +1 -1
  104. package/dist/client/assets/{architectureDiagram-ZHVYKT53-BnDMOBhV.js → architectureDiagram-ZHVYKT53-CQytXLkh.js} +1 -1
  105. package/dist/client/assets/{banner-CSKUrrI0.js → banner-nfkn2OLZ.js} +1 -1
  106. package/dist/client/assets/{blockDiagram-RJAE7QA3-CtushlEs.js → blockDiagram-RJAE7QA3-CXieJU3q.js} +1 -1
  107. package/dist/client/assets/{c4Diagram-XDPPPE54-7L-qYwKH.js → c4Diagram-XDPPPE54-BPmgfFrI.js} +1 -1
  108. package/dist/client/assets/channel-BOMQJ9aR.js +1 -0
  109. package/dist/client/assets/{chunk-2E7WHVMD-ksBVyqQ3.js → chunk-2E7WHVMD-BtumkVCk.js} +1 -1
  110. package/dist/client/assets/{chunk-2Q5K7J3B-Bfqdkihb.js → chunk-2Q5K7J3B-BUsPKn6-.js} +1 -1
  111. package/dist/client/assets/{chunk-4EMNKR2T-Brf2dH9x.js → chunk-4EMNKR2T-CuRou8Oa.js} +1 -1
  112. package/dist/client/assets/{chunk-55XCU76K-BlE7Cq40.js → chunk-55XCU76K-CafKfo9G.js} +1 -1
  113. package/dist/client/assets/{chunk-5VM5RSS4-Bkgg3j7L.js → chunk-5VM5RSS4-BdemtVRg.js} +1 -1
  114. package/dist/client/assets/{chunk-JWPE2WC7-B9TRpN4O.js → chunk-JWPE2WC7-C1pKIt5Q.js} +1 -1
  115. package/dist/client/assets/{chunk-VQ5W62QI-ZoILnIYi.js → chunk-VQ5W62QI-DPIQcwQZ.js} +1 -1
  116. package/dist/client/assets/{chunk-XXDRQBXY-r2xNhaKz.js → chunk-XXDRQBXY-CDtiCG5n.js} +1 -1
  117. package/dist/client/assets/{chunk-ZCHMQSOR-DfV3cF7d.js → chunk-ZCHMQSOR-DsHVvsHO.js} +2 -2
  118. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-VOVqMNNP.js → classDiagram-v2-4MYWR3UA-CNKi62Mk.js} +1 -1
  119. package/dist/client/assets/{command-CaUEAy3b.js → command-D1cWVheG.js} +1 -1
  120. package/dist/client/assets/{copy-button-BOznikwM.js → copy-button-BHHQAtAH.js} +1 -1
  121. package/dist/client/assets/{cose-bilkent-JH36ORCC-CAdBvyLz.js → cose-bilkent-JH36ORCC-CqK8lNYm.js} +1 -1
  122. package/dist/client/assets/{cpu-j9vX9Wfk.js → cpu-BhPT23rn.js} +1 -1
  123. package/dist/client/assets/{cynefin-EF2NZ3EQ-DcH1A9Oo.js → cynefin-EF2NZ3EQ-DUFv7wAT.js} +1 -1
  124. package/dist/client/assets/{cynefinDiagram-WF24UDRP-DJuKBXHi.js → cynefinDiagram-WF24UDRP-DprACurA.js} +1 -1
  125. package/dist/client/assets/{dagre-NK4GIZVX-D099H_0S.js → dagre-NK4GIZVX-CFCbvrTm.js} +1 -1
  126. package/dist/client/assets/{detail-row-Crl89jnh.js → detail-row-DBa1uo_y.js} +1 -1
  127. package/dist/client/assets/{diagram-CBK3MWTC-Cd_4W9XO.js → diagram-CBK3MWTC-BgRgWBNs.js} +1 -1
  128. package/dist/client/assets/{diagram-I5XIIV2D-Bc7aQKt3.js → diagram-I5XIIV2D-Bvmxrku7.js} +1 -1
  129. package/dist/client/assets/{diagram-ODIL2UCW-awVJZ4Bg.js → diagram-ODIL2UCW-CqzUdcUW.js} +1 -1
  130. package/dist/client/assets/{diagram-PFBEJUXE-dhsj9aeU.js → diagram-PFBEJUXE-DwXryVWl.js} +1 -1
  131. package/dist/client/assets/{diagram-RJA3I4VV-Dm59CbiV.js → diagram-RJA3I4VV-DqGvHPAI.js} +1 -1
  132. package/dist/client/assets/{diagram-TYUNFSNR-BhvcIjA9.js → diagram-TYUNFSNR-GOfZ43Y3.js} +1 -1
  133. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-C4wT_MTC.js → ebnfDiagram-V4P3TTPT-lF7-sW99.js} +1 -1
  134. package/dist/client/assets/{elk-QONTBCTQ-CPI0zjmW.js → elk-QONTBCTQ-Cd5kFMK6.js} +1 -1
  135. package/dist/client/assets/{empty-state-BHcmkSzu.js → empty-state-CHse95jw.js} +1 -1
  136. package/dist/client/assets/{erDiagram-KYQIGQAA-C_vGcbOB.js → erDiagram-KYQIGQAA-BqXJlTJO.js} +1 -1
  137. package/dist/client/assets/{execution-config-BS5rtvTZ.js → execution-config-U_R_H28y.js} +1 -1
  138. package/dist/client/assets/{file-CQGljfDT.js → file-DZ6-r1A3.js} +1 -1
  139. package/dist/client/assets/{file-exclamation-point-B0a55VME.js → file-exclamation-point-CR6qeV6m.js} +1 -1
  140. package/dist/client/assets/{file-text-Cycq_S0e.js → file-text-4-Vc22J-.js} +1 -1
  141. package/dist/client/assets/{find-latest-widget-fence-B6sJdG3Q.js → find-latest-widget-fence-D61kyRv5.js} +2 -2
  142. package/dist/client/assets/{flowDiagram-IUGLLWBU-_VNfmnxx.js → flowDiagram-IUGLLWBU-C18poulN.js} +1 -1
  143. package/dist/client/assets/{form-BL14vwyB.js → form-B51NLChW.js} +1 -1
  144. package/dist/client/assets/{format-cron-meJMgYNe.js → format-cron-CrDI8dcD.js} +1 -1
  145. package/dist/client/assets/{ganttDiagram-R7GPNTJY-o0gGU7X_.js → ganttDiagram-R7GPNTJY-BHa77y_O.js} +1 -1
  146. package/dist/client/assets/{git-branch-CsLE6G0Y.js → git-branch-CzV_Mp0H.js} +1 -1
  147. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DjXjUpJo.js → gitGraphDiagram-PDYL7XHY-DdfDaaK5.js} +1 -1
  148. package/dist/client/assets/{graph-BMYee_VK.js → graph-stVQph_6.js} +1 -1
  149. package/dist/client/assets/{heart-Cn3a-UQI.js → heart-B7rSSNjF.js} +1 -1
  150. package/dist/client/assets/{highlighted-body-KPVGNVTW-DsX5yCC0.js → highlighted-body-KPVGNVTW-BDppiTvx.js} +1 -1
  151. package/dist/client/assets/{image-lightbox-BZ_eBZgA.js → image-lightbox-DwZmxmRU.js} +1 -1
  152. package/dist/client/assets/{image-off-DjR7LI5G.js → image-off-B65OAyEw.js} +1 -1
  153. package/dist/client/assets/{index-BR1m9FON.js → index-B2JoVHek.js} +231 -231
  154. package/dist/client/assets/{index-Cb_p_ynP.js → index-BC7vn8oJ.js} +1 -1
  155. package/dist/client/assets/{index-DARchye_.js → index-BD0bxxdG.js} +1 -1
  156. package/dist/client/assets/{index-BxWr8Mrf.js → index-BJE7FpeW.js} +1 -1
  157. package/dist/client/assets/{index-CczLBUKI.js → index-BLepK8Tm.js} +1 -1
  158. package/dist/client/assets/{index-Z2ApBQt4.js → index-BNMepjWi.js} +1 -1
  159. package/dist/client/assets/{index-H4e5Wpmi.js → index-B_7AgsWu.js} +1 -1
  160. package/dist/client/assets/{index-Cgjq7a-8.js → index-BchQNMCW.js} +1 -1
  161. package/dist/client/assets/{index-DFb4kOjm.js → index-BgKo-iME.js} +2 -2
  162. package/dist/client/assets/{index-Kt6r3DQg.js → index-BncKYCzR.js} +1 -1
  163. package/dist/client/assets/{index-CpWxcN5D.js → index-Bocv39Dy.js} +1 -1
  164. package/dist/client/assets/{index-BcnwvTnt.js → index-Bx9vkvgI.js} +1 -1
  165. package/dist/client/assets/{index-o6kGmVGx.js → index-ByKStnc0.js} +1 -1
  166. package/dist/client/assets/index-C2FXv0W1.js +1 -0
  167. package/dist/client/assets/index-CCRFURxg.js +1 -0
  168. package/dist/client/assets/{index-DLN0kcME.js → index-CNXWcd0h.js} +1 -1
  169. package/dist/client/assets/index-CT9qR-37.js +1 -0
  170. package/dist/client/assets/{index-vHKVYcH7.js → index-CXbvnAWk.js} +1 -1
  171. package/dist/client/assets/{index-Cv67OXfk.js → index-CaWtXSTG.js} +1 -1
  172. package/dist/client/assets/{index-DQ8uADJF.js → index-CayDBSDe.js} +1 -1
  173. package/dist/client/assets/{index-4rSR8lau.js → index-Ci17H_nH.js} +1 -1
  174. package/dist/client/assets/{index-DqZmnJED.js → index-CpCaGGh0.js} +1 -1
  175. package/dist/client/assets/{index-CfKSlYjb.js → index-CvLTkguu.js} +1 -1
  176. package/dist/client/assets/{index-dY7IFpet.js → index-CyTJNCti.js} +1 -1
  177. package/dist/client/assets/{index-Joav7LQU.js → index-CzDpDW1S.js} +1 -1
  178. package/dist/client/assets/{index-B4TxpTKD.js → index-D1FZurLO.js} +1 -1
  179. package/dist/client/assets/{index-BmKHO-FD.js → index-D5HU9MN-.js} +1 -1
  180. package/dist/client/assets/index-DBjkg_lo.css +1 -0
  181. package/dist/client/assets/{index-gmyiXkmr.js → index-DCymAWyX.js} +1 -1
  182. package/dist/client/assets/{index-faSyUc2q.js → index-DDPQZJQz.js} +1 -1
  183. package/dist/client/assets/{index-Cf4Gtxf9.js → index-DK-qQXH4.js} +1 -1
  184. package/dist/client/assets/{index-DrlB9RSk.js → index-DTJV1dBd.js} +1 -1
  185. package/dist/client/assets/{index-DiM3QX-4.js → index-Dhj4iWHB.js} +3 -3
  186. package/dist/client/assets/index-DxqA8BnM.js +1 -0
  187. package/dist/client/assets/{index-DlvUENo4.js → index-DzVJOMZm.js} +1 -1
  188. package/dist/client/assets/{index-47--OGKJ.js → index-FRNKkajP.js} +1 -1
  189. package/dist/client/assets/{index-Dfko0tSp.js → index-L1Tsd-wn.js} +1 -1
  190. package/dist/client/assets/{index-KganLhU1.js → index-QaablvAu.js} +2 -2
  191. package/dist/client/assets/{index-DMSSN08i.js → index-SawUg2NU.js} +1 -1
  192. package/dist/client/assets/{index-B8LqLhq7.js → index-YObNtFmj.js} +1 -1
  193. package/dist/client/assets/{index-1MwES_vb.js → index-iRuOpaV9.js} +1 -1
  194. package/dist/client/assets/{index-BOCclWF3.js → index-ulrRTPa9.js} +1 -1
  195. package/dist/client/assets/{index-BsZkXHsH.js → index-wcSHU-xr.js} +1 -1
  196. package/dist/client/assets/{index-D5Qmx1JR.js → index-yZEr0YWk.js} +3 -3
  197. package/dist/client/assets/{index.esm-CJIDYBqd.js → index.esm-gt8tvZ7J.js} +1 -1
  198. package/dist/client/assets/{infoDiagram-MVDRKAX5-B1mMyUlp.js → infoDiagram-MVDRKAX5-DzhnMotD.js} +1 -1
  199. package/dist/client/assets/{inline-code-mh48Uhbi.js → inline-code-rYW-kJLB.js} +1 -1
  200. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-efEMQ0_X.js → ishikawaDiagram-HPEHV2GE-CfEX5E3R.js} +1 -1
  201. package/dist/client/assets/{journeyDiagram-BOSHW7O7-DSAywiVk.js → journeyDiagram-BOSHW7O7-oPrRia7f.js} +1 -1
  202. package/dist/client/assets/{kanban-definition-FNSA4HC5-B9pbU4zK.js → kanban-definition-FNSA4HC5-c4CFmcMa.js} +1 -1
  203. package/dist/client/assets/{layers-B0Z5Od3N.js → layers-D9XZggr2.js} +1 -1
  204. package/dist/client/assets/{lightbulb-Cfb5ecEd.js → lightbulb-DQBO5jSg.js} +1 -1
  205. package/dist/client/assets/{link-2-Dzy5BUL3.js → link-2-CZiWX9vI.js} +1 -1
  206. package/dist/client/assets/{list-runtime-types-DLmjtBMq.js → list-runtime-types-Dry1muZ1.js} +1 -1
  207. package/dist/client/assets/{markdown-content-DhAtZOfj.js → markdown-content-FcvkqTTS.js} +1 -1
  208. package/dist/client/assets/{mention-pill-DmA8FxL4.js → mention-pill-BxASQ-6w.js} +1 -1
  209. package/dist/client/assets/{mermaid.core-DUIkdbeL.js → mermaid.core-BqACpHu4.js} +4 -4
  210. package/dist/client/assets/{message-square-off-BowIzJUV.js → message-square-off-SMiCYjYr.js} +1 -1
  211. package/dist/client/assets/{mindmap-definition-6OY57UG3-Dz7ZOR4C.js → mindmap-definition-6OY57UG3-BSYcYnyL.js} +1 -1
  212. package/dist/client/assets/{more-details-DV7LmY0E.js → more-details-D9_Bn2GL.js} +1 -1
  213. package/dist/client/assets/{owner-notice-DdFc2P8z.js → owner-notice-DO2xE-1L.js} +1 -1
  214. package/dist/client/assets/{package-BhKXbvU_.js → package-DpqGENzU.js} +1 -1
  215. package/dist/client/assets/{page-container-0sWZ3xh9.js → page-container-Cta3RqHd.js} +1 -1
  216. package/dist/client/assets/{pane-resize-handle-Bjy4udre.js → pane-resize-handle-BJ0XV-Zg.js} +1 -1
  217. package/dist/client/assets/{paperclip-C-7LhBfl.js → paperclip-CItlLyje.js} +1 -1
  218. package/dist/client/assets/{path-input-BPVyI72G.js → path-input-CAkVS5XR.js} +1 -1
  219. package/dist/client/assets/{pegDiagram-ECIUJNBX-C4EOP-Fa.js → pegDiagram-ECIUJNBX-Bnc4eqtF.js} +1 -1
  220. package/dist/client/assets/{pieDiagram-GNMPY74T-CQ1OxRkv.js → pieDiagram-GNMPY74T-7gG33sSR.js} +1 -1
  221. package/dist/client/assets/{plug-CIZ-wWL8.js → plug-Cb8qsOxJ.js} +1 -1
  222. package/dist/client/assets/{primer-trigger-XA5fLzR5.js → primer-trigger-BG3lb31_.js} +2 -2
  223. package/dist/client/assets/{profile-errors-C1XACbc9.js → profile-errors-T-3VgU7E.js} +1 -1
  224. package/dist/client/assets/progress-CwpnobNW.js +1 -0
  225. package/dist/client/assets/{quadrantDiagram-D57K4MC3-Cw4BdkpS.js → quadrantDiagram-D57K4MC3-Dr2Z6GbA.js} +1 -1
  226. package/dist/client/assets/{query-error-state-Cm-Lozlb.js → query-error-state-BV8fyXBe.js} +1 -1
  227. package/dist/client/assets/{radio-DQ29H26H.js → radio-SApjvqfy.js} +1 -1
  228. package/dist/client/assets/{railroadDiagram-Y72NRBL7-CSKtYLmm.js → railroadDiagram-Y72NRBL7-7kfKSzWs.js} +1 -1
  229. package/dist/client/assets/{registry-Tbt9pcZl.js → registry-BcpatPes.js} +4 -4
  230. package/dist/client/assets/registry-BuTvvFn6.js +1 -0
  231. package/dist/client/assets/{relay-trace-schemas-4AAUf-Zl.js → relay-trace-schemas-eOfnfe4X.js} +2 -2
  232. package/dist/client/assets/{repeat-B8g-x-Sc.js → repeat-BB0attnO.js} +1 -1
  233. package/dist/client/assets/{requirementDiagram-EQYSW5RA-BPSBZr7X.js → requirementDiagram-EQYSW5RA-CmOVPT7N.js} +1 -1
  234. package/dist/client/assets/{room-files-source-BkiK4-ZI.js → room-files-source-C32w3dXr.js} +1 -1
  235. package/dist/client/assets/{rotate-ccw-clock-DRtL-2nr.js → rotate-ccw-clock-C1SBdbZP.js} +1 -1
  236. package/dist/client/assets/{rotate-cw-BbHkWN-J.js → rotate-cw-BTqPAMgP.js} +1 -1
  237. package/dist/client/assets/{sankeyDiagram-SY24JHO5-DVlHablQ.js → sankeyDiagram-SY24JHO5-DFcTUSd1.js} +1 -1
  238. package/dist/client/assets/{scroll-area-DAC7NrVU.js → scroll-area-rEyYMbHG.js} +1 -1
  239. package/dist/client/assets/{sequenceDiagram-BLEHNHQU--wZkN8xk.js → sequenceDiagram-BLEHNHQU-BNY4ALqc.js} +1 -1
  240. package/dist/client/assets/server-BCFl_ur3.js +6 -0
  241. package/dist/client/assets/{shield-x-CEWfkzDN.js → shield-x-B2nLbkhR.js} +1 -1
  242. package/dist/client/assets/{signed-in-CMhCR-m8.js → signed-in-BcxH99a5.js} +1 -1
  243. package/dist/client/assets/{sizeCapture-INFHLROL-CLXc7d3S.js → sizeCapture-INFHLROL-CuNPY5HV.js} +1 -1
  244. package/dist/client/assets/{soul-file-CbX7rNqz.js → soul-file-ITCKiDY9.js} +1 -1
  245. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-5xa1FM_X.js → stateDiagram-v2-A6IESKWZ-CmUdZZJs.js} +1 -1
  246. package/dist/client/assets/{swimlanes-B3ENRKFQ-DKgxJxjE.js → swimlanes-B3ENRKFQ-BmNmFgsZ.js} +1 -1
  247. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Cd_Magxj.js +8 -0
  248. package/dist/client/assets/{table-D0EJT0uP.js → table-COZ3E1UU.js} +1 -1
  249. package/dist/client/assets/{tabs-Ctjzrm8t.js → tabs-CDr3zS_2.js} +1 -1
  250. package/dist/client/assets/{timeline-definition-JXYKGLGB-B9P7ituI.js → timeline-definition-JXYKGLGB-Cq7UTNkh.js} +1 -1
  251. package/dist/client/assets/{trust-dial-D__tIhzt.js → trust-dial-BsEooNiu.js} +2 -2
  252. package/dist/client/assets/{trust-posture-DaHHtOZn.js → trust-posture-Dk5ctS0Q.js} +1 -1
  253. package/dist/client/assets/{unplug-B-ipHefz.js → unplug-DB0xx2bf.js} +1 -1
  254. package/dist/client/assets/{unverified-catalog-notice-C8swqaTn.js → unverified-catalog-notice-CQoKhOjQ.js} +1 -1
  255. package/dist/client/assets/{use-bindings-gLHRNAFU.js → use-bindings-CEhDyZoj.js} +1 -1
  256. package/dist/client/assets/{use-composer-prefs-CjpxcBIe.js → use-composer-prefs-uC9mUd0f.js} +1 -1
  257. package/dist/client/assets/{use-connector-management-BLiCJMgU.js → use-connector-management-54m5ZcyP.js} +1 -1
  258. package/dist/client/assets/{use-deep-link-scroll-r2nKjzA-.js → use-deep-link-scroll-C4DQRnGX.js} +1 -1
  259. package/dist/client/assets/{use-delete-binding-BSiOik_K.js → use-delete-binding-Cr9soEn-.js} +1 -1
  260. package/dist/client/assets/{use-dev-links-DXcIlMf-.js → use-dev-links-CXGFC-N0.js} +1 -1
  261. package/dist/client/assets/{use-direct-message-panel-BbH8N4mE.js → use-direct-message-panel-BxwiNzks.js} +1 -1
  262. package/dist/client/assets/{use-external-adapter-catalog-mmKni5ui.js → use-external-adapter-catalog-D3xkw3mY.js} +1 -1
  263. package/dist/client/assets/{use-filter-state-CiPZ0AIH.js → use-filter-state-N0pdU49v.js} +1 -1
  264. package/dist/client/assets/{use-full-activity-feed-DXroUzfN.js → use-full-activity-feed-COuRZq_w.js} +1 -1
  265. package/dist/client/assets/use-is-below-desktop-CgAcZ8iA.js +1 -0
  266. package/dist/client/assets/{use-mesh-topology-upehQ5Cv.js → use-mesh-topology-BSRzCO1U.js} +1 -1
  267. package/dist/client/assets/{use-mounted-ref-IHwyriaF.js → use-mounted-ref-pxDiCOyS.js} +1 -1
  268. package/dist/client/assets/{use-notification-prefs-BHOK2P2l.js → use-notification-prefs-6N6Y4rqG.js} +1 -1
  269. package/dist/client/assets/use-pending-read-HbJdwxw1.js +1 -0
  270. package/dist/client/assets/{use-personality-commit-Chf3UX8P.js → use-personality-commit-Dl3YK7Qd.js} +1 -1
  271. package/dist/client/assets/{use-promo-activation-Dlw6bg7G.js → use-promo-activation-DXRrwLes.js} +2 -2
  272. package/dist/client/assets/{use-promo-dismissals-Dx_fli7I.js → use-promo-dismissals-DnqiKhqW.js} +1 -1
  273. package/dist/client/assets/{use-pulse-freshness-CG_I6a-O.js → use-pulse-freshness-D9uzSgz_.js} +1 -1
  274. package/dist/client/assets/{use-room-follow-claim-Bgrpr3bO.js → use-room-follow-claim-Ch6ZoOAv.js} +1 -1
  275. package/dist/client/assets/{use-room-sessions-DecGrP3E.js → use-room-sessions-C3NpXFWY.js} +1 -1
  276. package/dist/client/assets/{use-roving-tab-list-CDkh-Ujm.js → use-roving-tab-list-LZku4K5R.js} +1 -1
  277. package/dist/client/assets/{use-session-canvas-tvLLPQcm.js → use-session-canvas-Bub7vCaj.js} +6 -6
  278. package/dist/client/assets/{use-status-budget-BBl2yxLR.js → use-status-budget-DrAROrOw.js} +2 -2
  279. package/dist/client/assets/{use-todos-BzRauzdQ.js → use-todos-COW66MhB.js} +1 -1
  280. package/dist/client/assets/{use-transform-DzJeHpxm.js → use-transform-CXFCVk8z.js} +1 -1
  281. package/dist/client/assets/{use-unclaimed-chats--HZdmq4F.js → use-unclaimed-chats-T3kskM3T.js} +1 -1
  282. package/dist/client/assets/use-update-config-BhLEnZe5.js +1 -0
  283. package/dist/client/assets/{useMutationState-DIywUTDG.js → useMutationState-6Zu1xBsZ.js} +1 -1
  284. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-C9aLJ03F.js → usecaseDiagram-WPOLBNNX-CUu-YUIY.js} +1 -1
  285. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-ChBIWbL0.js → vennDiagram-Q3Y3IDCW-CfA29THe.js} +1 -1
  286. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-DvQDOaTm.js → wardleyDiagram-IVAIDKWA-CrARcH-W.js} +1 -1
  287. package/dist/client/assets/{xychartDiagram-4URNHDU4-8FxLPP2c.js → xychartDiagram-4URNHDU4-BCVaXTG3.js} +1 -1
  288. package/dist/client/assets/{zap-DSllMMHe.js → zap-C-pr1sst.js} +1 -1
  289. package/dist/client/index.html +2 -2
  290. package/dist/drizzle/20261108035027_dor3547_extension_grant_subject.sql +30 -0
  291. package/dist/drizzle/meta/20261108035027_snapshot.json +15121 -0
  292. package/dist/drizzle/meta/_journal.json +7 -0
  293. package/dist/server/extension-child.cjs +19 -3
  294. package/dist/server/index.js +13162 -12123
  295. package/dist/server/index.js.map +2 -2
  296. package/package.json +2 -2
  297. package/dist/client/assets/CanvasFileContent-Bqd0IEfK.js +0 -2
  298. package/dist/client/assets/CanvasModel3dContent-DqL0Sy4r.js +0 -2
  299. package/dist/client/assets/HandlePage-aHId3bYX.js +0 -1
  300. package/dist/client/assets/NamePage-C7F-SotG.js +0 -1
  301. package/dist/client/assets/NewDirectMessageMenu-CjBjzsDe.js +0 -1
  302. package/dist/client/assets/PermissionHistory-D0chstxf.js +0 -1
  303. package/dist/client/assets/PhotoPage-Cqo3PNO_.js +0 -1
  304. package/dist/client/assets/_shell._home.index-BzTYr8Bw.js +0 -3
  305. package/dist/client/assets/_shell.connections-CBx0ogzx.js +0 -1
  306. package/dist/client/assets/_shell.marketplace-CgWBUKSA.js +0 -1
  307. package/dist/client/assets/_shell.marketplace_.sources-8HZpKFDI.js +0 -1
  308. package/dist/client/assets/_shell.session-D6HcVbnm.js +0 -1
  309. package/dist/client/assets/_shell.threads-BavVtQOE.js +0 -1
  310. package/dist/client/assets/_shell.todos-B6uWr0zA.js +0 -6
  311. package/dist/client/assets/_shell.x._extensionId-DaELdkCH.js +0 -1
  312. package/dist/client/assets/_shell.x._extensionId_._-DaELdkCH.js +0 -1
  313. package/dist/client/assets/channel-A3XT7_2L.js +0 -1
  314. package/dist/client/assets/index-BJRgbiEd.js +0 -1
  315. package/dist/client/assets/index-BcFn_S6b.js +0 -1
  316. package/dist/client/assets/index-BdVQOlVQ.css +0 -1
  317. package/dist/client/assets/index-C5EvpXcq.js +0 -1
  318. package/dist/client/assets/index-DZhMvc9m.js +0 -1
  319. package/dist/client/assets/progress-BA2JPtb6.js +0 -6
  320. package/dist/client/assets/registry-jD9zw538.js +0 -1
  321. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-f6MOc3pl.js +0 -8
  322. package/dist/client/assets/use-is-below-desktop-LUZL5z5t.js +0 -1
  323. package/dist/client/assets/use-pending-read-mVsOBTzn.js +0 -1
  324. package/dist/client/assets/use-update-config-DjL7-nUR.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LexicalField-Cb68LIar.js","assets/index-BR1m9FON.js","assets/index-BdVQOlVQ.css","assets/mention-pill-DmA8FxL4.js","assets/file-drag-GDx2qhdk.js","assets/use-todos-BzRauzdQ.js","assets/file-CQGljfDT.js","assets/find-latest-widget-fence-B6sJdG3Q.js","assets/WidgetErrorCard-C5ieVv_9.js","assets/index-CpWxcN5D.js","assets/progress-BA2JPtb6.js","assets/markdown-content-DhAtZOfj.js","assets/table-D0EJT0uP.js","assets/zap-DSllMMHe.js","assets/package-BhKXbvU_.js","assets/heart-Cn3a-UQI.js","assets/git-branch-CsLE6G0Y.js","assets/file-text-Cycq_S0e.js","assets/paperclip-C-7LhBfl.js","assets/index-Cgjq7a-8.js","assets/RuntimeSetupDialog-DTO5v0dP.js","assets/inline-code-mh48Uhbi.js","assets/list-runtime-types-DLmjtBMq.js","assets/RuntimeConnectFlow-BYQnY5vv.js","assets/copy-button-BOznikwM.js","assets/useMutationState-DIywUTDG.js","assets/runtime-connect-Dn0T5YWv.js","assets/use-transform-DzJeHpxm.js","assets/index-DlvUENo4.js","assets/index-CfKSlYjb.js"])))=>i.map(i=>d[i]);
2
- import{O as Ze,fC as Pa,jf as Nn,p9 as qa,r as u,fz as Ha,j as o,ee as we,aQ as ft,pa as Ka,lv as jt,nK as Va,a5 as Et,a7 as Ft,a8 as Rn,cz as Tn,e as Wa,iw as Ga,J as Sn,iO as Ua,a2 as Za,G as B,B as pe,s as Ja,pb as Ya,pc as Xa,pd as Qa,pe as ei,pf as zn,pg as ti,ph as ni,pi as ai,pj as ii,pk as ri,pl as oi,pm as In,pn as On,eu as Ln,kI as si,g as li,kH as ci,a4 as ui,x as Ce,po as Bt,dW as di,pp as De,ft as Bn,pq as P,R as pi,Z as be,_ as W,mN as Mn,kM as $n,kN as Pn,U as mi,kO as qn,kQ as gt,f as fi,dA as gi,X as Ct,ba as xi,pr as hi,a_ as Hn,c0 as vi,ej as Je,ps as At,bx as bi,eE as yi,f_ as ki,bE as wi,lb as Di,by as _i,bz as ji,bA as Ei,bC as Fi,ij as Mt,dB as Ci,I as Ai,gn as Ni,go as Ri,gp as Ti,pt as xt,is as Si,ep as zi,fd as Ii,kP as Oi,pu as Li,mS as Bi,pv as Mi,l2 as $i,l3 as Pi,af as qi,kc as Hi,kd as Ki,ke as Vi,kf as Wi,pw as Gi,W as Ui,px as Zi,py as Ji,aZ as Yi,dm as Kn,pz as Xi,dX as Qi,dY as er,pA as tr,pB as nr,pC as ar,a6 as ir,pD as rr,pE as or,jA as Nt,eH as sr,eI as $t,pF as lr}from"./index-BR1m9FON.js";import{a as cr}from"./use-todos-BzRauzdQ.js";import{F as Rt}from"./file-CQGljfDT.js";import{h as ur,r as dr}from"./file-drag-GDx2qhdk.js";import{C as pr,W as mr,a as fr}from"./find-latest-widget-fence-B6sJdG3Q.js";import{P as gr}from"./paperclip-C-7LhBfl.js";import{u as xr}from"./index-Cgjq7a-8.js";import{R as hr}from"./RuntimeSetupDialog-DTO5v0dP.js";import{r as vr}from"./RuntimeConnectFlow-BYQnY5vv.js";import{a as br,b as yr}from"./markdown-content-DhAtZOfj.js";import"./WidgetErrorCard-C5ieVv_9.js";import{a as Vn,u as kr}from"./use-transform-DzJeHpxm.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LexicalField-CKc8eUK3.js","assets/index-B2JoVHek.js","assets/index-DBjkg_lo.css","assets/mention-pill-BxASQ-6w.js","assets/file-drag-GDx2qhdk.js","assets/use-todos-COW66MhB.js","assets/file-DZ6-r1A3.js","assets/find-latest-widget-fence-D61kyRv5.js","assets/WidgetErrorCard-D14BNvfm.js","assets/index-Bocv39Dy.js","assets/progress-CwpnobNW.js","assets/markdown-content-FcvkqTTS.js","assets/table-COZ3E1UU.js","assets/zap-C-pr1sst.js","assets/server-BCFl_ur3.js","assets/package-DpqGENzU.js","assets/heart-B7rSSNjF.js","assets/git-branch-CzV_Mp0H.js","assets/file-text-4-Vc22J-.js","assets/paperclip-CItlLyje.js","assets/index-BchQNMCW.js","assets/RuntimeSetupDialog-UhsfZRye.js","assets/inline-code-rYW-kJLB.js","assets/list-runtime-types-Dry1muZ1.js","assets/RuntimeConnectFlow-Dinsb9em.js","assets/copy-button-BHHQAtAH.js","assets/useMutationState-6Zu1xBsZ.js","assets/runtime-connect-Dn0T5YWv.js","assets/use-transform-CXFCVk8z.js","assets/index-DzVJOMZm.js","assets/index-CvLTkguu.js"])))=>i.map(i=>d[i]);
2
+ import{O as Ze,fC as Pa,je as Nn,pc as qa,r as u,fz as Ha,j as o,ee as we,aR as ft,pd as Ka,lu as jt,nr as Va,a5 as Et,a7 as Ft,a8 as Rn,cz as Tn,e as Wa,iI as Ga,J as Sn,iZ as Ua,a2 as Za,G as B,B as pe,s as Ja,pe as Ya,pf as Xa,pg as Qa,ph as ei,pi as zn,pj as ti,pk as ni,pl as ai,pm as ii,pn as ri,po as oi,pp as In,pq as On,eu as Ln,kH as si,g as li,kG as ci,a4 as ui,x as Ce,pr as Bt,dW as di,ps as De,ft as Bn,pt as P,R as pi,Z as be,_ as W,mM as Mn,kL as $n,kM as Pn,U as mi,kN as qn,kP as gt,f as fi,dA as gi,X as Ct,bb as xi,pu as hi,a$ as Hn,c0 as vi,ej as Je,pv as At,bx as bi,eE as yi,f_ as ki,bE as wi,la as Di,by as _i,bz as ji,bA as Ei,bC as Fi,ij as Mt,dB as Ci,I as Ai,gn as Ni,go as Ri,gp as Ti,pw as xt,is as Si,ep as zi,fd as Ii,kO as Oi,px as Li,mR as Bi,py as Mi,l1 as $i,l2 as Pi,af as qi,kb as Hi,kc as Ki,kd as Vi,ke as Wi,pz as Gi,W as Ui,pA as Zi,pB as Ji,a_ as Yi,dm as Kn,pC as Xi,dX as Qi,dY as er,pD as tr,pE as nr,pF as ar,a6 as ir,pG as rr,pH as or,jz as Nt,eH as sr,eI as $t,pI as lr}from"./index-B2JoVHek.js";import{a as cr}from"./use-todos-COW66MhB.js";import{F as Rt}from"./file-DZ6-r1A3.js";import{h as ur,r as dr}from"./file-drag-GDx2qhdk.js";import{C as pr,W as mr,a as fr}from"./find-latest-widget-fence-D61kyRv5.js";import{P as gr}from"./paperclip-CItlLyje.js";import{u as xr}from"./index-BchQNMCW.js";import{R as hr}from"./RuntimeSetupDialog-UhsfZRye.js";import{r as vr}from"./RuntimeConnectFlow-Dinsb9em.js";import{a as br,b as yr}from"./markdown-content-FcvkqTTS.js";import"./WidgetErrorCard-D14BNvfm.js";import{a as Vn,u as kr}from"./use-transform-CXFCVk8z.js";/**
3
3
  * @license lucide-react v1.48.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -25,11 +25,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
25
25
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jo(e){if(Array.isArray(e))return bt(e)}function lt(e,t){return Qo(e)||Xo(e,t)||pa(e,t)||Yo()}function Yo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
26
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pa(e,t){if(e){if(typeof e=="string")return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}}function bt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Xo(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],i=!0,r=!1,s,c;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(a.push(s.value),!(t&&a.length===t));i=!0);}catch(d){r=!0,c=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(r)throw c}}return a}}function Qo(e){if(Array.isArray(e))return e}function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?on(Object(n),!0).forEach(function(a){yt(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e,t){if(e==null)return{};var n=es(e,t),a,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function es(e,t){if(e==null)return{};var n={},a=Object.keys(e),i,r;for(r=0;r<a.length;r++)i=a[r],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var It=u.forwardRef(function(e,t){var n=e.children,a=Ge(e,Ko),i=fa(a),r=i.open,s=Ge(i,Vo);return u.useImperativeHandle(t,function(){return{open:r}},[r]),pi.createElement(u.Fragment,null,n(q(q({},s),{},{open:r})))});It.displayName="Dropzone";var ma={disabled:!1,getFilesFromEvent:co,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};It.defaultProps=ma;It.propTypes={children:P.func,accept:P.objectOf(P.arrayOf(P.string)),multiple:P.bool,preventDropOnDocument:P.bool,noClick:P.bool,noKeyboard:P.bool,noDrag:P.bool,noDragEventsBubbling:P.bool,minSize:P.number,maxSize:P.number,maxFiles:P.number,disabled:P.bool,getFilesFromEvent:P.func,onFileDialogCancel:P.func,onFileDialogOpen:P.func,useFsAccessApi:P.bool,autoFocus:P.bool,onDragEnter:P.func,onDragLeave:P.func,onDragOver:P.func,onDrop:P.func,onDropAccepted:P.func,onDropRejected:P.func,onError:P.func,validator:P.func};var kt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function fa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=q(q({},ma),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,r=t.maxSize,s=t.minSize,c=t.multiple,d=t.maxFiles,m=t.onDragEnter,f=t.onDragLeave,y=t.onDragOver,h=t.onDrop,F=t.onDropAccepted,g=t.onDropRejected,w=t.onFileDialogCancel,x=t.onFileDialogOpen,b=t.useFsAccessApi,v=t.autoFocus,p=t.preventDropOnDocument,l=t.noClick,k=t.noKeyboard,_=t.noDrag,A=t.noDragEventsBubbling,T=t.onError,j=t.validator,E=u.useMemo(function(){return Po(n)},[n]),C=u.useMemo(function(){return $o(n)},[n]),L=u.useMemo(function(){return typeof x=="function"?x:sn},[x]),I=u.useMemo(function(){return typeof w=="function"?w:sn},[w]),S=u.useRef(null),z=u.useRef(null),$=u.useReducer(ts,kt),X=lt($,2),U=X[0],N=X[1],oe=U.isFocused,Y=U.isFileDialogActive,G=u.useRef(typeof window<"u"&&window.isSecureContext&&b&&Mo()),Q=function(){!G.current&&Y&&setTimeout(function(){if(z.current){var R=z.current.files;R.length||(N({type:"closeDialog"}),I())}},300)};u.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[z,Y,I,G]);var se=u.useRef([]),ee=u.useRef([]),_e=function(R){S.current&&S.current.contains(R.target)||(R.preventDefault(),se.current=[])};u.useEffect(function(){return p&&(document.addEventListener("dragover",an,!1),document.addEventListener("drop",_e,!1)),function(){p&&(document.removeEventListener("dragover",an),document.removeEventListener("drop",_e))}},[S,p]),u.useEffect(function(){var D=function(ce){ee.current=[].concat(rn(ee.current),[ce.target]),Te(ce)&&N({isDragGlobal:!0,type:"setDragGlobal"})},R=function(ce){ee.current=ee.current.filter(function(ve){return ve!==ce.target&&ve!==null}),!(ee.current.length>0)&&N({isDragGlobal:!1,type:"setDragGlobal"})},H=function(){ee.current=[],N({isDragGlobal:!1,type:"setDragGlobal"})},V=function(){ee.current=[],N({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",D,!1),document.addEventListener("dragleave",R,!1),document.addEventListener("dragend",H,!1),document.addEventListener("drop",V,!1),function(){document.removeEventListener("dragenter",D),document.removeEventListener("dragleave",R),document.removeEventListener("dragend",H),document.removeEventListener("drop",V)}},[S]),u.useEffect(function(){return!a&&v&&S.current&&S.current.focus(),function(){}},[S,v,a]);var K=u.useCallback(function(D){T?T(D):console.error(D)},[T]),me=u.useCallback(function(D){D.preventDefault(),D.persist(),Fe(D),se.current=[].concat(rn(se.current),[D.target]),Te(D)&&Promise.resolve(i(D)).then(function(R){if(!(We(D)&&!A)){var H=R.length,V=H>0&&Io({files:R,accept:E,minSize:s,maxSize:r,multiple:c,maxFiles:d,validator:j}),J=H>0&&!V;N({isDragAccept:V,isDragReject:J,isDragActive:!0,type:"setDraggedFiles"}),m&&m(D)}}).catch(function(R){return K(R)})},[i,m,K,A,E,s,r,c,d,j]),fe=u.useCallback(function(D){D.preventDefault(),D.persist(),Fe(D);var R=Te(D);if(R&&D.dataTransfer)try{D.dataTransfer.dropEffect="copy"}catch{}return R&&y&&y(D),!1},[y,A]),ie=u.useCallback(function(D){D.preventDefault(),D.persist(),Fe(D);var R=se.current.filter(function(V){return S.current&&S.current.contains(V)}),H=R.indexOf(D.target);H!==-1&&R.splice(H,1),se.current=R,!(R.length>0)&&(N({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Te(D)&&f&&f(D))},[S,f,A]),ge=u.useCallback(function(D,R){var H=[],V=[];D.forEach(function(J){var ce=la(J,E),ve=lt(ce,2),Ye=ve[0],Xe=ve[1],Qe=ca(J,s,r),qe=lt(Qe,2),et=qe[0],tt=qe[1],nt=j?j(J):null;if(Ye&&et&&!nt)H.push(J);else{var at=[Xe,tt];nt&&(at=at.concat(nt)),V.push({file:J,errors:at.filter(function($a){return $a})})}}),(!c&&H.length>1||c&&d>=1&&H.length>d)&&(H.forEach(function(J){V.push({file:J,errors:[So]})}),H.splice(0)),N({acceptedFiles:H,fileRejections:V,type:"setFiles"}),h&&h(H,V,R),V.length>0&&g&&g(V,R),H.length>0&&F&&F(H,R)},[N,c,E,s,r,d,h,F,g,j]),re=u.useCallback(function(D){D.preventDefault(),D.persist(),Fe(D),se.current=[],Te(D)&&Promise.resolve(i(D)).then(function(R){We(D)&&!A||ge(R,D)}).catch(function(R){return K(R)}),N({type:"reset"})},[i,ge,K,A]),le=u.useCallback(function(){if(G.current){N({type:"openDialog"}),L();var D={multiple:c,types:C};window.showOpenFilePicker(D).then(function(R){return i(R)}).then(function(R){ge(R,null),N({type:"closeDialog"})}).catch(function(R){qo(R)?(I(R),N({type:"closeDialog"})):Ho(R)?(G.current=!1,z.current?(z.current.value=null,z.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(R)});return}z.current&&(N({type:"openDialog"}),L(),z.current.value=null,z.current.click())},[N,L,I,b,ge,K,C,c]),je=u.useCallback(function(D){!S.current||!S.current.isEqualNode(D.target)||(D.key===" "||D.key==="Enter"||D.keyCode===32||D.keyCode===13)&&(D.preventDefault(),le())},[S,le]),xe=u.useCallback(function(){N({type:"focus"})},[]),O=u.useCallback(function(){N({type:"blur"})},[]),Z=u.useCallback(function(){l||(Bo()?setTimeout(le,0):le())},[l,le]),te=function(R){return a?null:R},ne=function(R){return k?null:te(R)},Ee=function(R){return _?null:te(R)},Fe=function(R){A&&R.stopPropagation()},Re=u.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=D.refKey,H=R===void 0?"ref":R,V=D.role,J=D.onKeyDown,ce=D.onFocus,ve=D.onBlur,Ye=D.onClick,Xe=D.onDragEnter,Qe=D.onDragOver,qe=D.onDragLeave,et=D.onDrop,tt=Ge(D,Wo);return q(q(yt({onKeyDown:ne(ue(J,je)),onFocus:ne(ue(ce,xe)),onBlur:ne(ue(ve,O)),onClick:te(ue(Ye,Z)),onDragEnter:Ee(ue(Xe,me)),onDragOver:Ee(ue(Qe,fe)),onDragLeave:Ee(ue(qe,ie)),onDrop:Ee(ue(et,re)),role:typeof V=="string"&&V!==""?V:"presentation"},H,S),!a&&!k?{tabIndex:0}:{}),tt)}},[S,je,xe,O,Z,me,fe,ie,re,k,_,a]),he=u.useCallback(function(D){D.stopPropagation()},[]),Pe=u.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=D.refKey,H=R===void 0?"ref":R,V=D.onChange,J=D.onClick,ce=Ge(D,Go),ve=yt({accept:E,multiple:c,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:te(ue(V,re)),onClick:te(ue(J,he)),tabIndex:-1},H,z);return q(q({},ve),ce)}},[z,n,c,re,a]);return q(q({},U),{},{isFocused:oe&&!a,getRootProps:Re,getInputProps:Pe,rootRef:S,inputRef:z,open:te(le)})}function ts(e,t){switch(t.type){case"focus":return q(q({},e),{},{isFocused:!0});case"blur":return q(q({},e),{},{isFocused:!1});case"openDialog":return q(q({},kt),{},{isFileDialogActive:!0});case"closeDialog":return q(q({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return q(q({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return q(q({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return q(q({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return q({},kt);default:return e}}function sn(){}function ns({onFilesSelected:e}){const t=u.useCallback(s=>{s.length>0&&e(s)},[e]),{getRootProps:n,getInputProps:a,isDragActive:i}=fa({onDrop:t,onError:s=>console.error("[composer] Could not read the dropped files.",s),noClick:!0,noKeyboard:!0}),r=u.useCallback(s=>{const c=Array.from(s.clipboardData.items).filter(d=>d.kind==="file").map(d=>d.getAsFile()).filter(d=>d!==null);c.length>0&&e(c)},[e]);return{getRootProps:n,getInputProps:a,isDragActive:i,handlePaste:r}}function ga(e){const t=u.useCallback(a=>{ur(a.dataTransfer.types)&&(a.preventDefault(),a.dataTransfer.dropEffect="copy")},[]),n=u.useCallback(a=>{if(!e)return!1;const i=dr(a.dataTransfer);return i===null?!1:(a.preventDefault(),e(i),!0)},[e]);return e?{onDragOver:t,onDrop:n}:null}const xa="bg-surface relative m-2 rounded-xl border p-2",ha={"data-composer-card":""};function as({children:e,onFilesDropped:t,onPathDropped:n,className:a}){return t?o.jsx(rs,{onFilesDropped:t,onPathDropped:n,className:a,children:e}):o.jsx(is,{onPathDropped:n,className:a,children:e})}function is({children:e,onPathDropped:t,className:n}){const a=ga(t);return o.jsx("div",{...ha,className:B(xa,n),onDragOver:a==null?void 0:a.onDragOver,onDrop:a?i=>void a.onDrop(i):void 0,children:e})}function rs({children:e,onFilesDropped:t,onPathDropped:n,className:a}){const{getRootProps:i,getInputProps:r,isDragActive:s,handlePaste:c}=ns({onFilesSelected:t}),d=ga(n),m=i();return o.jsxs("div",{...m,...ha,onDragOver:f=>{var y;d==null||d.onDragOver(f),(y=m.onDragOver)==null||y.call(m,f)},onDrop:f=>{var y;d==null||d.onDrop(f),(y=m.onDrop)==null||y.call(m,f)},onPaste:c,className:B(xa,a),children:[o.jsx("input",{...r()}),o.jsx(be,{children:s&&o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"bg-primary/10 border-primary absolute inset-0 z-10 flex items-center justify-center rounded-xl border-2 border-dashed",children:o.jsx("p",{className:"text-primary text-sm font-medium",children:"Drop files to attach"})})}),e]})}const os=500,ss=229;function ls(e){let t=0;for(let n=e.length-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t}function cs({surface:e,value:t,isStreaming:n,isTouchOnly:a,isUploading:i=!1,onCancelUpload:r,commandPending:s=!1,canSubmit:c=!0,editingQueueItem:d,isPaletteOpen:m,paletteHasResults:f=!1,tabPicks:y=!0,queueHasItems:h,onSubmit:F,onStop:g,onEscape:w,onClear:x,onArrowUp:b,onArrowDown:v,onCommandSelect:p,onQueue:l,onSteer:k,onStage:_,onSaveEdit:A,onCancelEdit:T,onQueueNavigateUp:j,onQueueNavigateDown:E,contextKey:C}){const[L,I]=u.useState(null),S=u.useRef(null),z=L!==null&&L===(C??""),$=u.useCallback(()=>{S.current!==null&&clearTimeout(S.current),S.current=null,I(null)},[]),X=u.useCallback(()=>{S.current!==null&&clearTimeout(S.current),I(C??""),S.current=setTimeout(()=>{S.current=null,I(null)},os)},[C]);return u.useEffect(()=>()=>{S.current!==null&&clearTimeout(S.current)},[]),{handleKeyDown:u.useCallback(N=>{var oe,Y;if(!(N.nativeEvent.isComposing||N.keyCode===ss||e.isComposing())){if(N.key==="Escape"){if(m){w==null||w(),N.preventDefault();return}if(d){T==null||T(),N.preventDefault();return}if(n){g==null||g(),N.preventDefault();return}if(i&&r){r(),N.preventDefault();return}t.trim()&&z?(e.clearThroughUndoStack(),x==null||x(),$(),N.preventDefault()):(w==null||w(),X(),t.trim()&&N.preventDefault());return}if(!m&&h){if(N.key==="ArrowUp"){const G=e.isCaretAtStart();if(!t.trim()||G){N.preventDefault(),j==null||j();return}}if(N.key==="ArrowDown"){const G=e.isCaretAtEnd();if(d&&G){N.preventDefault(),E==null||E();return}}}if(N.key==="Enter"&&N.altKey){N.preventDefault(),e.insertLineBreak();return}if(m){if(N.key==="ArrowDown"){N.preventDefault(),v==null||v();return}if(N.key==="ArrowUp"){N.preventDefault(),b==null||b();return}if(f&&(N.key==="Enter"&&!N.shiftKey||N.key==="Tab"&&y)){N.preventDefault(),p==null||p();return}}if(N.key==="Enter"&&!N.shiftKey){const G=e.textBeforeCaret();if(G!==null&&ls(G)%2===1){N.preventDefault(),e.consumeEscapeIntoNewline();return}}if(N.key==="Enter"&&(N.metaKey||N.ctrlKey)&&!a&&n&&!d&&!s&&t.trim()){N.preventDefault(),N.shiftKey?(oe=_??l)==null||oe():(Y=k??l)==null||Y();return}if(N.key==="Enter"&&!N.shiftKey&&!a){if(N.preventDefault(),s)return;d&&t.trim()?A==null||A():n&&t.trim()?l==null||l():!n&&!i&&c&&t.trim()&&F()}}},[n,a,i,r,s,t,F,g,w,x,m,f,y,b,v,p,d,l,k,_,A,T,h,j,E,c,e,z,X,$]),clearArmed:z}}const us={textBeforeCaret:()=>null,isCaretAtStart:()=>!0,isCaretAtEnd:()=>!0,insertLineBreak:()=>{},consumeEscapeIntoNewline:()=>{},clearThroughUndoStack:()=>{},isComposing:()=>!1};function va(e,t){e.focus(),document.execCommand("insertText",!1,t)}function ds(e){const t=e.selectionStart;e.setSelectionRange(t-1,t),va(e,`
27
27
  `)}function ps(e){e.focus(),e.setSelectionRange(0,e.value.length),document.execCommand("insertText",!1,"")}function ms(e){return{textBeforeCaret(){const t=e.current;return!t||t.selectionStart!==t.selectionEnd?null:t.value.slice(0,t.selectionStart)},isCaretAtStart(){const t=e.current;return!t||t.selectionStart===0},isCaretAtEnd(){const t=e.current;return!t||t.selectionStart===t.value.length},insertLineBreak(){const t=e.current;t&&va(t,`
28
- `)},consumeEscapeIntoNewline(){const t=e.current;t&&ds(t)},clearThroughUndoStack(){const t=e.current;t&&ps(t)},isComposing(){return!1}}}const fs=200,ln=24,gs=200;function xs(e,t){u.useLayoutEffect(()=>{const n=e.current;if(!n)return;const a=()=>{n.style.transition="",n.style.height=""};if(t!==""){n.style.transition="",n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,fs)}px`;return}const i=n.offsetHeight;if(i<=ln){a();return}n.style.height=`${i}px`,n.style.transition=`height ${gs}ms ease`;const r=requestAnimationFrame(()=>{n.style.height=`${ln}px`});return n.addEventListener("transitionend",a,{once:!0}),()=>{cancelAnimationFrame(r),n.removeEventListener("transitionend",a),a()}},[e,t])}const cn=u.forwardRef(function({value:t,onChange:n,onCursorChange:a,onKeyDown:i,onFocus:r,onBlur:s,placeholder:c,placeholderOverlay:d,isPaletteOpen:m,paletteListboxId:f,activeDescendantId:y,onSurfaceChange:h},F){const g=u.useRef(null),w=Mn(),x=u.useRef(null);u.useEffect(()=>{x.current??(x.current=ms(g)),h(x.current)},[h]),u.useImperativeHandle(F,()=>({focus:()=>{var l;return(l=g.current)==null?void 0:l.focus()},focusUnlessTouch:()=>{var l;w||(l=g.current)==null||l.focus()},focusAt:l=>{const k=g.current;k&&(k.focus(),k.setSelectionRange(l,l))}})),xs(g,t);const b=u.useCallback(l=>{n(l.target.value),a==null||a(l.target.selectionStart)},[n,a]),v=u.useCallback(()=>{g.current&&(a==null||a(g.current.selectionStart))},[a]),p=t.trim().length>0;return o.jsxs("div",{className:"relative min-h-[24px] flex-1",children:[!p&&d,o.jsx("textarea",{ref:g,value:t,onChange:b,onKeyDown:i,onFocus:r,onBlur:s,onSelect:v,role:"combobox","aria-autocomplete":"list","aria-controls":m?f:void 0,"aria-expanded":m??!1,"aria-activedescendant":m?y:void 0,"aria-label":c,placeholder:d?"":c,className:"block max-h-[200px] min-h-[24px] w-full resize-none bg-transparent py-0.5 text-sm focus:outline-none",rows:1})]})});function hs({onSteer:e,onStage:t}){return!e&&!t?null:o.jsxs($n,{children:[o.jsx(Pn,{asChild:!0,children:o.jsx("button",{type:"button",className:"focus-ring bg-muted text-muted-foreground hover:bg-muted/80 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"More ways to send",children:o.jsx(mi,{className:"size-(--size-icon-sm)"})})}),o.jsxs(qn,{align:"end",children:[e&&o.jsx(gt,{icon:wr,description:"Send it into the task now",onSelect:e,children:"Steer"}),t&&o.jsx(gt,{icon:fi,description:"Use it next, without interrupting",onSelect:t,children:"Add context"})]})]})}const Ke={send:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Send message"},stop:{className:"bg-dui-destructive-fill text-destructive-foreground hover:bg-dui-destructive-fill-hover",label:"Stop generating"},queue:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Queue message"},update:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Save edit"},cancel:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Cancel edit"},"cancel-upload":{className:"bg-muted text-muted-foreground hover:bg-dui-destructive-fill-hover hover:text-destructive-foreground",label:"Cancel upload"},dispatching:{className:"bg-muted text-muted-foreground",label:"Running command"},stopping:{className:"bg-muted text-muted-foreground",label:"Stopping…"}},vs={send:pr,stop:Jn,queue:xi,update:Sn,cancel:Ct,"cancel-upload":Ce,dispatching:Ce,stopping:Ce};function bs(e,t,n,a,i,r){return i?"dispatching":a?e?"update":"cancel":r?"stopping":t&&e?"queue":t?"stop":n?"cancel-upload":e?"send":null}function ys(e,t){switch(e){case"send":return t.onSubmit;case"stop":return t.onStop;case"queue":return t.onQueue;case"update":return t.onSaveEdit;case"cancel":return t.onCancelEdit;case"cancel-upload":return t.onCancelUpload;default:return}}function ks({hasText:e,isStreaming:t,commandPending:n=!1,submitDisabled:a=!1,editingQueueItem:i,queueDepth:r,isTouchOnly:s,onSubmit:c,onStop:d,onQueue:m,onSaveEdit:f,onCancelEdit:y,onCancelUpload:h,onSteer:F,onStage:g,stopPending:w=!1}){const x=bs(e,t,h!==void 0,i,n,w),b=x==="send"&&a,v=b||x===null?void 0:ys(x,{onSubmit:c,onStop:d,onQueue:m,onSaveEdit:f,onCancelEdit:y,onCancelUpload:h}),p=x===null?null:x==="send"&&s?gi:vs[x],l=x==="dispatching"||x==="stopping";return o.jsxs(o.Fragment,{children:[o.jsx(be,{children:t&&e&&!w&&o.jsx(W.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},whileHover:{scale:1.05},whileTap:{scale:.97},onClick:d,type:"button",className:"bg-dui-destructive-fill text-destructive-foreground hover:bg-dui-destructive-fill-hover shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"Stop generating",children:o.jsx(Jn,{className:"size-(--size-icon-sm)"})})}),x==="queue"&&o.jsx(hs,{onSteer:F,onStage:g}),o.jsxs("div",{className:"relative shrink-0",children:[x==="cancel-upload"&&o.jsx("span",{role:"status",className:"sr-only",children:"Uploading attachment"}),l&&x?o.jsxs("div",{role:"status",className:B("rounded-lg p-1.5 max-md:p-2",Ke[x].className),children:[o.jsx(Ce,{}),o.jsx("span",{className:"sr-only",children:Ke[x].label})]}):x&&p?o.jsx(W.button,{animate:{opacity:b?.5:1,scale:1},initial:!1,transition:{duration:.15},whileHover:b?void 0:{scale:1.05},whileTap:b?void 0:{scale:.97},onClick:v,disabled:b,type:"button",className:B("focus-ring rounded-lg p-1.5 transition-colors max-md:p-2",Ke[x].className,b&&"pointer-events-none"),"aria-label":Ke[x].label,children:o.jsx(p,{className:"size-(--size-icon-sm)"})}):o.jsx("div",{"aria-hidden":"true","data-testid":"action-slot-spacer",className:"p-1.5 max-md:p-2",children:o.jsx("div",{className:"size-(--size-icon-sm)"})}),r>0&&x==="queue"&&o.jsx("span",{className:"bg-foreground text-background text-3xs absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full font-medium",children:r})]})]})}const ws=u.lazy(()=>Hn(()=>import("./LexicalField-Cb68LIar.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]))),Ds=u.forwardRef(function({value:t,onChange:n,onSubmit:a,isStreaming:i,isUploading:r=!1,onCancelUpload:s,commandPending:c=!1,editingQueueItem:d=!1,editingPosition:m,queueDepth:f=0,onStop:y,stopPending:h=!1,onQueue:F,onSteer:g,onStage:w,onSaveEdit:x,onCancelEdit:b,onEscape:v,onClear:p,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,onArrowUp:A,onArrowDown:T,onCommandSelect:j,activeDescendantId:E,paletteListboxId:C,onCursorChange:L,onAttach:I,placeholder:S="Send a message…",placeholderOverlay:z,onQueueNavigateUp:$,onQueueNavigateDown:X,contextKey:U,onClearArmedChange:N,queueHasItems:oe=!1,canSubmit:Y=!0,canSubmitReason:G,canSubmitAction:Q,richText:se=!1,mentionSubjects:ee},_e){const K=u.useRef(null),me=u.useRef(null),[fe,ie]=u.useState(!1),[ge,re]=u.useState(!1),[le,je]=u.useState(us),xe=Mn();u.useImperativeHandle(_e,()=>({focus:()=>{var D;return(D=K.current)==null?void 0:D.focus()},focusUnlessTouch:()=>{var D;return(D=K.current)==null?void 0:D.focusUnlessTouch()},focusAt:D=>{var R;return(R=K.current)==null?void 0:R.focusAt(D)}}));const O=u.useRef(xe);u.useEffect(()=>{var D;O.current||hi()||(D=K.current)==null||D.focus()},[]);const Z=u.useCallback(()=>{var D;(D=K.current)==null||D.focusAt(t.length),y==null||y()},[y,t.length]),{handleKeyDown:te,clearArmed:ne}=cs({surface:le,value:t,isStreaming:i,isTouchOnly:xe,isUploading:r,onCancelUpload:s,commandPending:c,canSubmit:Y,editingQueueItem:d,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,queueHasItems:oe,onSubmit:a,onStop:y,onEscape:v,onClear:p,onArrowUp:A,onArrowDown:T,onCommandSelect:j,onQueue:F,onSteer:g,onStage:w,onSaveEdit:x,onCancelEdit:b,onQueueNavigateUp:$,onQueueNavigateDown:X,contextKey:U}),Ee=u.useCallback(()=>ie(!0),[]),Fe=u.useCallback(()=>{ie(!1),re(!1),l&&(v==null||v())},[l,v]),Re={ref:K,value:t,onChange:n,onCursorChange:L,onKeyDown:te,onFocus:Ee,onBlur:Fe,placeholder:S,placeholderOverlay:z,isPaletteOpen:l,paletteHasResults:k,paletteListboxId:C,activeDescendantId:E,onSurfaceChange:je,mentionSubjects:ee},he=t.trim().length>0,Pe=p!==void 0&&he;return u.useEffect(()=>{N==null||N(ne&&Pe)},[ne,Pe,N]),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[!Y&&G&&o.jsx("div",{role:Q?void 0:"status",className:B("text-muted-foreground px-1 text-xs",Q&&"flex items-baseline gap-1.5"),children:Q?o.jsxs(o.Fragment,{children:[o.jsx("span",{role:"status",children:G}),o.jsx("button",{type:"button",onClick:Q.onClick,className:"focus-ring text-foreground/80 hover:text-foreground rounded-sm underline underline-offset-4",children:Q.label})]}):G}),d&&o.jsx("div",{className:"text-muted-foreground px-0.5 text-xs",children:m!==void 0&&f>0?`Editing message ${m} of ${f}`:"Editing message"}),o.jsxs("div",{onKeyUp:D=>D.key==="Tab"&&re(!0),className:B("border-input bg-background flex items-end gap-1.5 rounded-md border p-1.5 shadow-xs transition-[color,box-shadow]",fe&&(ge?"border-ring ring-ring ring-[1px]":"border-foreground/20"),d&&"border-primary/40",!I&&"pl-3"),children:[I&&o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:me,type:"file",className:"hidden",multiple:!0,onChange:D=>{const R=Array.from(D.target.files??[]);R.length>0&&I(R),D.target.value=""}}),o.jsx("button",{type:"button",onClick:()=>{var D;return(D=me.current)==null?void 0:D.click()},className:"focus-ring text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center rounded-md px-1.5 py-1 transition-colors disabled:opacity-50","aria-label":"Attach file",children:o.jsx(gr,{className:"size-4"})})]}),se?o.jsx(u.Suspense,{fallback:o.jsx(cn,{...Re}),children:o.jsx(ws,{...Re})}):o.jsx(cn,{...Re}),p&&o.jsx(W.button,{animate:{opacity:he?.5:0,scale:he?1:.8},transition:{duration:.15},whileHover:he?{opacity:1}:void 0,onClick:p,disabled:!he,type:"button",className:B("focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!he&&"pointer-events-none"),"aria-label":"Clear message",children:o.jsx(Ct,{className:"size-(--size-icon-sm)"})}),o.jsx(ks,{hasText:he,isStreaming:i,onCancelUpload:r?s:void 0,commandPending:c,submitDisabled:!Y,editingQueueItem:d,queueDepth:f,isTouchOnly:xe,onSubmit:a,onStop:Z,stopPending:h,onQueue:F,onSteer:g,onStage:w,onSaveEdit:x,onCancelEdit:b})]})]})});function _s({children:e,className:t}){return o.jsx("div",{className:B("absolute right-0 bottom-full left-0 mb-2",t),children:e})}function un(e){return e.type.startsWith("image/")}const dn="This file didn’t upload";function js({files:e,onRemove:t,onRetry:n,onCancel:a}){const i=e.filter(s=>un(s.file)).map(s=>s.id).join(" "),r=u.useMemo(()=>{const s=new Map;for(const c of e)un(c.file)&&s.set(c.id,URL.createObjectURL(c.file));return s},[i]);return u.useEffect(()=>()=>{for(const s of r.values())URL.revokeObjectURL(s)},[r]),o.jsx("div",{className:"flex flex-wrap gap-1.5 px-1 pb-1.5",children:o.jsx(be,{children:e.map(s=>{const c=r.get(s.id),d=s.status==="error",m=s.status==="uploading"&&a!==void 0;return o.jsxs(W.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},className:B("flex items-center gap-1 rounded-md px-2 py-1 text-xs",d?"bg-destructive/10 border-destructive/40 border":"bg-muted"),children:[s.status==="uploading"?o.jsx(Ce,{size:"xs",className:"text-muted-foreground"}):d?o.jsx(vi,{className:"text-destructive size-(--size-icon-xs) shrink-0"}):c?o.jsx("img",{src:c,alt:"",className:"size-5 shrink-0 rounded object-cover"}):o.jsx(Rt,{className:"text-muted-foreground size-(--size-icon-xs)"}),o.jsx("span",{className:"max-w-32 truncate",children:s.file.name}),s.status==="uploading"&&o.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[s.progress,"%"]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-destructive max-w-44 truncate",title:s.error??dn,children:s.error??dn}),n&&o.jsx("button",{type:"button",onClick:()=>n(s.id),className:"text-foreground ml-0.5 shrink-0 rounded-sm font-medium underline decoration-dotted underline-offset-2","aria-label":`Try uploading ${s.file.name} again`,children:"Try again"})]}),o.jsx("button",{type:"button",onClick:m?a:()=>t(s.id),className:"text-muted-foreground hover:text-foreground -mr-0.5 ml-0.5 shrink-0 rounded-sm p-0.5","aria-label":m?`Cancel upload of ${s.file.name}`:`Remove ${s.file.name}`,children:o.jsx(Ct,{className:"size-3"})})]},s.id)})})})}function Es(){const e=Je();return o.jsx(W.div,{initial:e?!1:{opacity:0,y:3},animate:{opacity:1,y:0},transition:{duration:.12,ease:"easeOut"},"aria-hidden":"true","data-testid":"clear-armed-hint",className:"bg-popover text-muted-foreground shadow-soft pointer-events-none mt-1.5 ml-auto w-fit rounded-md border px-2 py-1 text-xs",children:"Press Esc again to clear"})}const Se={Root:as,Input:Ds,OverlayLane:_s,Attachments:js,ClearArmedHint:Es};function Fs({value:e,onChange:t,onSubmit:n,inputRef:a,head:i,mentionPicker:r,overlays:s,queue:c,aboveInput:d,asks:m,footer:f,children:y,className:h,onPathDropped:F,input:g}){const{capabilities:w,target:x}=Be();if(x===null)throw new Error("<Conversation.Composer> needs a target. A host that draws a composer has to say where its words go — pass `target` to <Conversation.Root>.");const[b,v]=u.useState(!1),p=w.attachments?x.attachments:null,l=(p==null?void 0:p.staged)??[],k=(p==null?void 0:p.hasFailed)===!0,_=x.canSend&&!k&&(g.canSubmit??!0),A=k?void 0:x.canSend?g.canSubmitReason:x.canSendReason,T=o.jsxs(o.Fragment,{children:[o.jsxs(Se.OverlayLane,{children:[w.mentions&&r,s,b&&o.jsx(Se.ClearArmedHint,{})]}),p!==null&&l.length>0&&o.jsx(Se.Attachments,{files:[...l],onRemove:p.remove,onRetry:p.retry,onCancel:p.cancel}),x.queue!==void 0&&c,d,o.jsx(Se.Input,{...g,ref:a,value:e,onChange:t,onSubmit:n,placeholder:g.placeholder??x.placeholder,canSubmit:_,...A===void 0?{}:{canSubmitReason:A},...A===g.canSubmitReason&&g.canSubmitAction?{canSubmitAction:g.canSubmitAction}:{},...p===null?{}:{onAttach:p.add,...p.holdsSendWhileUploading?{isUploading:p.isUploading,onCancelUpload:p.cancel}:{}},onClearArmedChange:v}),f]});return o.jsxs(Se.Root,{className:h,...p===null?{}:{onFilesDropped:p.add},...F===void 0?{}:{onPathDropped:F},children:[i,m===void 0?T:o.jsx(be,{mode:"wait",children:m!==null?o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:m},"interactive"):o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:T},"normal")}),y]})}function Cs({asChild:e,children:t,className:n}){const a=e===!0?At:"div";return o.jsx(a,{"data-slot":"conversation-footer",className:B(n),children:t})}function As({surface:e,capabilities:t,target:n,density:a="comfortable",anchor:i="corner",children:r}){const s=u.useMemo(()=>({surface:e,capabilities:t,target:n??null,density:a,anchor:i}),[e,t,n,a,i]);return o.jsx(Qn.Provider,{value:s,children:r})}const pn=1e3;function Ns(e,t=Date.now){const n=Date.parse(e)+ea,[a,i]=u.useState(()=>t());return u.useEffect(()=>{const r=()=>i(t());let s,c;const d=n-t();return d>0?c=setTimeout(()=>{i(Math.max(t(),n)),s=setInterval(r,pn)},d):s=setInterval(r,pn),()=>{clearTimeout(c),clearInterval(s)}},[n,t]),Yr(e,a)}function ba(e){return e?"This room is gone, or you no longer have access to it.":"New messages aren’t arriving. You can still send; anything unsent will say so."}function Rs(e){return e?"This room is no longer available":"Reconnecting. You can still send"}function Ts(e,t){switch(e.kind){case"ask":return"";case"stalled":return ba(t);case"presence":case"held":return e.sentence;case"silent-finish":return e.sentence;case"turn-waiting":return e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer";case"turn-progress":case"turn-system":return e.message;case"turn-streaming":return"Working";case"turn-complete":return"";case"empty":return""}}function mn(e){switch(e.kind){case"ask":return`ask:${e.ask.interaction.id}`;case"presence":return`presence:${e.sentence}`;case"held":return`held:${e.sentence}`;case"silent-finish":return`silent-finish:${e.sentence}`;case"turn-waiting":return`turn-waiting:${e.waitingType}`;case"turn-progress":case"turn-system":return`${e.kind}:${e.message}`;case"turn-streaming":return`turn-streaming:${e.verbKey}`;default:return e.kind}}const Ss={room:"room-presence",thread:"thread-presence",session:"session-presence"},zs={room:"room-held",thread:"thread-held",session:"session-held"};function Is({state:e,onRetry:t,unavailable:n=!1,faces:a,reducedMotion:i=!1,scope:r="room"}){switch(e.kind){case"ask":return o.jsx(Os,{state:e,reducedMotion:i});case"stalled":return o.jsx(Ls,{onRetry:t,unavailable:n});case"presence":return o.jsx(Bs,{state:e,faces:a,reducedMotion:i,scope:r});case"held":return o.jsx(Ms,{state:e,faces:a,scope:r});case"silent-finish":return o.jsx($s,{state:e});case"turn-waiting":return o.jsx(Ps,{state:e});case"turn-progress":return o.jsx(qs,{state:e,reducedMotion:i});case"turn-system":return o.jsx(Hs,{state:e});case"turn-streaming":return o.jsx(Ks,{state:e,reducedMotion:i});case"turn-complete":return o.jsx(Vs,{state:e});case"empty":return null}}function Os({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-ask",className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"needs-you",reducedMotion:t}),o.jsx("span",{className:"text-foreground truncate",children:e.headline}),e.count>1&&o.jsxs("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 tabular-nums",children:["+",e.count-1]}),o.jsx("span",{className:"text-status-warning-fg shrink-0 font-medium",children:"Answer"})]})}function Ls({onRetry:e,unavailable:t}){const n=ba(t);return o.jsxs("span",{"data-testid":"room-stalled","data-unavailable":t?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"error",reducedMotion:!0}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground truncate sm:hidden",children:Rs(t)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground hidden truncate sm:inline",title:n,children:n}),e!==void 0&&o.jsx("button",{type:"button",onClick:e,className:"focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded underline underline-offset-2",children:t?"Try again":"Reconnect"})]})}function Bs({state:e,faces:t,reducedMotion:n,scope:a}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"working",reducedMotion:n}),t,o.jsxs("span",{"data-testid":Ss[a],"data-late":e.late?"true":void 0,className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.line}),o.jsx(ya,{since:e.since})]})]})}function Ms({state:e,faces:t,scope:n}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"working",reducedMotion:!0}),t,o.jsxs("span",{"data-testid":zs[n],className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.sentence}),o.jsx(ya,{since:e.since})]})]})}function $s({state:e}){return o.jsx("span",{"data-testid":"lane-silent-finish",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:o.jsx("span",{className:"truncate",children:e.sentence})})}function Ps({state:e}){const t=e.waitingType==="approval"?yi:ki;return o.jsxs("span",{"data-testid":"lane-waiting",className:"flex min-w-0 items-center gap-2",children:[o.jsx(t,{"aria-hidden":"true",className:"text-status-warning-fg size-3 shrink-0"}),o.jsx("span",{className:"text-status-warning-fg truncate",children:e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer"}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed})]})}function qs({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-progress","data-determinate":e.determinate,className:"flex min-w-0 flex-1 items-center gap-2",children:[o.jsx("span",{className:"text-muted-foreground truncate",children:e.message}),o.jsx("span",{"aria-hidden":"true",className:"bg-muted/60 relative h-0.5 w-16 shrink-0 overflow-hidden rounded-full",children:e.determinate?o.jsx(W.span,{className:"bg-muted-foreground/50 absolute inset-y-0 left-0 block rounded-full",initial:!1,animate:{width:`${e.percent??0}%`},transition:t?{duration:0}:{duration:.3,ease:"easeOut"}}):o.jsx(W.span,{className:"bg-muted-foreground/50 absolute inset-y-0 block w-1/3 rounded-full",animate:t?void 0:{x:["-100%","400%"]},transition:{duration:1.4,ease:"easeInOut",repeat:1/0}})})]})}function Hs({state:e}){return o.jsxs("span",{"data-testid":"lane-system",className:"flex min-w-0 items-center gap-2",children:[o.jsx(bi,{"aria-hidden":"true",className:"text-muted-foreground/60 size-3 shrink-0"}),o.jsx("span",{className:"text-muted-foreground/70 truncate",children:e.message})]})}function Ks({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-streaming","data-bypass":e.isBypass?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[e.isBypass?o.jsx("span",{"aria-hidden":"true",className:"text-status-warning-fg shrink-0 font-bold",children:"☠"}):o.jsx(Me,{signal:"working",reducedMotion:t}),o.jsx("span",{"aria-hidden":"true",className:B("truncate",e.isBypass?"text-status-warning-fg":"text-muted-foreground"),children:e.verb}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/60 shrink-0",children:e.tokens})]})}function Vs({state:e}){return o.jsxs("span",{"data-testid":"lane-complete",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:[o.jsx("span",{className:"truncate",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",children:"·"}),o.jsx("span",{className:"shrink-0",children:e.tokens})]})}function Me({signal:e,reducedMotion:t}){return o.jsx("span",{"aria-hidden":"true","data-lane-dot":e,className:B("size-1.5 shrink-0 rounded-full",Di[e],e==="working"&&!t&&wi)})}function ya({since:e}){const t=Ns(e);return t===null?null:o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:` · ${t}`})}const Ws=.16,Gs={room:"room-presence-announcer",thread:"thread-presence-announcer",session:"session-lane-announcer"};function Us({state:e,scope:t="room",onRetry:n,unavailable:a=!1,faces:i,peek:r,onPeekOpenChange:s,peekLabel:c="Show who is working",heldPeekLabel:d="Show what is waiting",askCard:m,reducedMotionOverride:f}){const[y,h]=u.useState(!1),F=u.useRef(null),g=Je()===!0,w=f??g,x=Ts(e,a),b=e.kind==="empty",v=(e.kind==="presence"||e.kind==="held")&&r!==void 0,p=e.kind==="ask"&&m!==void 0,l=v||p,k=p?m:r,_=p?"Answer this":e.kind==="held"?d:c;y&&!l&&h(!1);const A=y&&l,T=u.useRef(!1);u.useEffect(()=>{var L,I;if(T.current===A)return;const C=!A&&(((L=F.current)==null?void 0:L.contains(document.activeElement))===!0||document.activeElement===document.body);T.current=A,s==null||s(A),C&&((I=F.current)==null||I.focus())},[A,s]);const j=o.jsx(Is,{state:e,onRetry:n,unavailable:a,faces:i,reducedMotion:w,scope:t}),E=l?o.jsxs(_i,{open:A,onOpenChange:h,children:[o.jsx(ji,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":_,className:B("focus-ring flex min-w-0 items-center rounded text-left","hover:bg-accent/40 focus-visible:bg-accent/40"),children:j})}),o.jsxs(Ei,{side:"top",align:"start",onOpenAutoFocus:p?void 0:C=>C.preventDefault(),className:"w-88 p-0",children:[o.jsx(Fi,{children:_}),k]})]}):j;return o.jsxs("div",{ref:F,"data-slot":"live-lane","data-lane-scope":t,tabIndex:-1,"data-lane-state":e.kind,"data-lane-motion":w?"off":"on",className:"flex h-6 shrink-0 items-center gap-2 overflow-hidden px-3 text-xs",children:[o.jsx("span",{"data-testid":Gs[t],role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:x}),w?o.jsx("div",{"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:E},mn(e)):o.jsx(be,{mode:"wait",initial:!1,children:o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:Ws},"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:E},mn(e))})]})}const Zs=1e3,Js={working:"working",working_late:"still working",held:"waiting to start"};function Ys({rows:e,onScrollToRow:t,onOpenSession:n,onOpenRoom:a,onAnswerFirst:i,promoted:r,onStopAll:s,stopping:c=!1,onStopAgent:d,stoppingAgents:m}){const f=d!==void 0,y=e.length>1&&s!==void 0,h=u.useRef(new Map),F=u.useRef(null),g=u.useRef(e);return u.useEffect(()=>{var p;const w=g.current;g.current=e;const x=F.current;if(x===null||e.some(l=>l.authorId===x)||(F.current=null,document.activeElement!==document.body))return;const b=w.findIndex(l=>l.authorId===x),v=e[Math.min(Math.max(b,0),e.length-1)];v!==void 0&&((p=h.current.get(v.authorId))==null||p.focus())},[e]),o.jsxs("div",{"data-slot":"live-peek","data-testid":"live-peek",className:"flex flex-col",children:[o.jsx("ul",{className:"divide-border divide-y",children:e.map(w=>o.jsxs("li",{"data-testid":"live-peek-row",className:"flex gap-2.5 px-3 py-2.5",children:[o.jsx(ta,{author:w.author,className:"mt-0.5 shrink-0"}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[o.jsxs("p",{className:"flex min-w-0 items-center gap-1.5 text-xs",children:[o.jsx("span",{className:"text-foreground truncate font-medium",children:w.author.displayName}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx("span",{className:"text-muted-foreground shrink-0",children:Js[w.state]}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx(Xs,{since:w.since})]}),w.doing!==null&&o.jsx("p",{"data-testid":"live-peek-doing",className:"text-muted-foreground truncate text-xs",children:w.doing}),w.replyingTo!==null&&t!==void 0&&o.jsx("button",{type:"button","data-testid":"live-peek-replying-to",onClick:()=>t(w.replyingTo.rowId),className:"focus-ring text-muted-foreground hover:text-foreground truncate rounded text-left text-xs underline underline-offset-2",children:`Replying to “${w.replyingTo.excerpt}”`}),o.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[w.state!=="held"&&w.sessionId!==null&&n!==void 0&&o.jsxs(pe,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-session",onClick:()=>n(w.sessionId),className:"h-7 gap-1 px-2 text-xs",children:["Open its chat",o.jsx(Mt,{"aria-hidden":"true",className:"size-3"})]}),w.state==="held"&&w.behind!=null&&w.behind.title!==null&&a!==void 0&&o.jsxs(pe,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-room",onClick:()=>a(w.behind.roomId),className:"h-7 gap-1 px-2 text-xs",children:["Open where it’s working",o.jsx(Mt,{"aria-hidden":"true",className:"size-3"})]}),w.state==="held"&&w.othersWaiting===!0&&i!==void 0&&((r==null?void 0:r.has(w.authorId))===!0?o.jsx("span",{"data-testid":"live-peek-next-up",className:"text-muted-foreground text-xs",children:"Next up here"}):o.jsx(pe,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-answer-first",onClick:()=>i(w.authorId),className:"h-7 px-2 text-xs",children:"Answer here first"})),f&&o.jsx(pe,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop",disabled:(m==null?void 0:m.has(w.authorId))===!0,onClick:()=>d(w.authorId),onFocus:()=>F.current=w.authorId,ref:x=>{x===null?h.current.delete(w.authorId):h.current.set(w.authorId,x)},"aria-label":`Stop ${w.author.displayName}`,className:"h-7 px-2 text-xs",children:"Stop"})]})]})]},w.authorId))}),y&&o.jsx("div",{className:"border-border border-t p-2",children:o.jsxs(pe,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop-all",disabled:c,onClick:s,className:"h-auto w-full flex-col items-start gap-0.5 px-2 py-1.5 text-xs",children:[o.jsx("span",{children:"Stop everything in this room"}),o.jsx("span",{className:"text-muted-foreground font-normal",children:`Stops all ${e.length}`})]})})]})}function Xs({since:e}){const[t,n]=u.useState(()=>Date.now());return u.useEffect(()=>{const a=setInterval(()=>n(Date.now()),Zs);return()=>clearInterval(a)},[e]),o.jsx("span",{className:"text-muted-foreground shrink-0 tabular-nums",children:In(Math.max(0,t-Date.parse(e)))})}function Qs(e,t,n){const a=u.useRef(null),i=u.useCallback((r,s)=>{const c=Number(s.getAttribute("aria-posinset")),d=r==="next"?c+1:c-1;if(!Number.isFinite(d)||d<1)return;let m=0;const f=e.findIndex(y=>y.kind==="message"&&++m===d);f!==-1&&(a.current=d,t.scrollToIndex(f,{align:r==="next"?"end":"start"}))},[e,t]);return u.useEffect(()=>{var c;const r=a.current;if(r===null)return;const s=(c=n.current)==null?void 0:c.querySelector(`[${Tt}][aria-posinset="${r}"]`);s!=null&&(a.current=null,s.focus())}),i}function el(e){const{conversationId:t,rows:n,virtualizer:a,landOn:i,landingReady:r,landingKey:s,resumeRow:c,landOnRow:d,onTopRow:m}=e,[f,y]=u.useState(!1);u.useLayoutEffect(()=>{y(!0)},[]);const h=u.useRef(null),F=u.useRef(null),g=u.useRef(!1),[w,x]=u.useState(!1),[b,v]=u.useState(null),[p,l]=u.useState(null),k=u.useRef(null);u.useLayoutEffect(()=>{if(!f||!r||n.length===0)return;const T=d==null?void 0:d(),j=s===void 0?t:`${t}:${s}`,E=h.current!==j;if(!E&&T===void 0)return;h.current=j;const C=E&&F.current===t;if(F.current=t,E&&!C&&(k.current=null,g.current=!1),x(!0),T!==void 0){const S=n.findIndex(z=>z.id===T);if(S!==-1){v("requested"),l(T),a.scrollToIndex(S,{align:"center"});return}}if(!E)return;if(l(null),C&&g.current){v("kept");const S=k.current;if(S===void 0)a.scrollToEnd();else{const z=n.findIndex($=>$.id===S);z!==-1&&a.scrollToIndex(z,{align:"start"})}return}const L=c==null?void 0:c();if(L!==void 0){const S=n.findIndex(z=>z.id===L);if(S!==-1){v("remembered"),a.scrollToIndex(S,{align:"start"});return}}const I=i==="unread"?n.findIndex(S=>S.kind==="unread-divider"):-1;if(I===-1){v(L===void 0?"end":"end-row-gone"),a.scrollToEnd();return}v("unread"),a.scrollToIndex(Math.max(0,I-1),{align:"start"})},[f,r,s,t,n,a,i,c,d]);const _=u.useCallback((T,j)=>{var S;const E=(T==null?void 0:T.scrollTop)??0,C=a.getVirtualItems().find(z=>z.end>E),L=C===void 0||(S=n[C.index])==null?void 0:S.id,I=j?void 0:L;I!==k.current&&(k.current=I,m==null||m(I))},[a,n,m]),A=u.useCallback(()=>{g.current=!0},[]);return{landed:w,landedOn:b,landedRow:p,reportTopRow:_,noteReaderScrolled:A}}function tl(e,t,n){const a=u.useCallback(r=>{var s;return((s=e[r])==null?void 0:s.id)??r},[e]);return xr({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>80,overscan:5,getItemKey:a,measureElement:(r,s,c)=>{var h;const d=(h=s==null?void 0:s.borderBoxSize)==null?void 0:h[0],m=d?Math.round(d.blockSize):r.getBoundingClientRect().height;if(m>0)return m;const f=c.indexFromElement(r),y=c.options.getItemKey(f);return c.itemSizeCache.get(y)??c.options.estimateSize(f)},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:64,onChange:r=>{r.isScrolling||n==null||n()}})}const nl=64;function al(e){const{conversationId:t,rowCount:n}=e,a=u.useRef(null),i=u.useRef(!0),[r,s]=u.useState(!0),[c,d]=u.useState(!1),m=u.useRef(t),f=u.useCallback(()=>{const g=a.current;if(!g)return;const w=g.scrollHeight-g.scrollTop-g.clientHeight<=nl;i.current=w,s(x=>x===w?x:w),w&&d(!1)},[]),y=u.useCallback(g=>{a.current=g},[]);u.useEffect(()=>{if(m.current===t)return;m.current=t,i.current=!0,s(!0),d(!1);const g=a.current;g&&(g.scrollTop=g.scrollHeight)},[t]);const h=u.useRef(n);u.useEffect(()=>{const g=h.current;h.current=n,n>g&&!i.current&&d(!0)},[n]);const F=u.useCallback(g=>{const w=a.current;w&&w.scrollTo({top:w.scrollHeight,behavior:(g==null?void 0:g.behavior)??"auto"}),i.current=!0,s(!0),d(!1)},[]);return{scrollRef:y,onScroll:f,isAtBottom:r,hasNewRows:c,atBottomRef:i,scrollToBottom:F}}const il=800,fn=24;function rl({scrollRef:e}){const t=u.useRef(null),n=u.useRef(null),a=u.useRef(null),[i,r]=u.useState(!1),s=u.useRef(!1),c=u.useRef(!1),d=u.useRef(0),m=u.useRef(0),f=u.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{!s.current&&!c.current&&r(!1)},il)},[]),y=u.useCallback(()=>{r(!0),f()},[f]),h=u.useCallback(()=>{c.current=!0,y()},[y]),F=u.useCallback(()=>{c.current=!1,f()},[f]),g=u.useCallback(()=>{const b=e.current,v=t.current,p=n.current;if(!b||!v||!p)return;const{scrollTop:l,scrollHeight:k,clientHeight:_}=b;if(k<=_){v.style.display="none";return}v.style.display="";const A=p.clientHeight,T=_/k,j=Math.max(T*A,fn),E=A-j,L=l/(k-_)*E;v.style.height=`${j}px`,v.style.transform=`translateY(${L}px)`},[e]);u.useEffect(()=>{const b=e.current;if(!b)return;const v=()=>{y(),g()};return b.addEventListener("scroll",v,{passive:!0}),g(),()=>b.removeEventListener("scroll",v)},[e,y,g]);const w=u.useCallback(b=>{if(b.target===t.current)return;const v=e.current,p=n.current;if(!v||!p)return;const l=p.getBoundingClientRect(),k=(b.clientY-l.top)/l.height;v.scrollTop=k*(v.scrollHeight-v.clientHeight)},[e]),x=u.useCallback(b=>{var l;b.preventDefault(),b.stopPropagation(),s.current=!0,d.current=b.clientY,m.current=((l=e.current)==null?void 0:l.scrollTop)??0;const v=k=>{const _=e.current,A=n.current;if(!_||!A)return;const T=k.clientY-d.current,j=A.clientHeight,E=_.clientHeight/_.scrollHeight,C=Math.max(E*j,fn),L=j-C,I=_.scrollHeight-_.clientHeight,S=T/L*I;_.scrollTop=m.current+S},p=()=>{s.current=!1,document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",p),f()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",p)},[e,f]);return o.jsx("div",{ref:n,role:"presentation",onClick:w,onPointerEnter:h,onPointerLeave:F,style:{top:"var(--conversation-thumb-top, 0px)"},className:"pointer-events-auto absolute right-0 bottom-0 z-10 w-2.5",children:o.jsx("div",{ref:t,onPointerDown:x,className:"bg-border hover:bg-foreground/40 absolute right-0.5 w-1.5 cursor-pointer rounded-full transition-[opacity,background-color] duration-200",style:{opacity:i?1:0}})})}function ol({hasNewRows:e,isAtBottom:t,hasRows:n,onJump:a}){return o.jsxs(o.Fragment,{children:[o.jsx(be,{children:e&&!t&&o.jsxs(W.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:a,"data-slot":"conversation-new-messages","data-testid":"conversation-new-messages",className:"bg-foreground text-background hover:bg-foreground/90 absolute bottom-4 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full px-3 py-1.5 text-xs font-medium shadow-sm transition-colors",children:["New messages",o.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:"New messages"})]})}),o.jsx(be,{children:!t&&n&&o.jsx(W.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:a,"data-slot":"conversation-jump-to-latest","data-testid":"conversation-jump-to-latest",className:"bg-background absolute right-4 bottom-4 rounded-full border p-2 shadow-sm transition-shadow hover:shadow-md","aria-label":"Scroll to bottom",children:o.jsx(Ci,{className:"size-(--size-icon-md)"})})})]})}const sl=u.memo(function({row:t,index:n,context:a,renderRow:i}){const r=u.useMemo(()=>({...a,index:n}),[a,n]);return o.jsx(o.Fragment,{children:i(t,r)})}),ll=new Set(["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "]),cl=2200;function ul(e){return e===null?"auto":e.scrollHeight-e.scrollTop-e.clientHeight<=e.clientHeight?"smooth":"auto"}function dl({conversationId:e,label:t,rows:n,renderRow:a,onOpenThread:i,domIdOf:r,landOn:s="end",landingReady:c=!0,landingKey:d,resumeRow:m,landOnRow:f,onTopRow:y,pending:h,viewerAuthorId:F,loading:g,empty:w,transcriptAnnouncement:x,approvalAnnouncement:b,onReachedBottom:v,busy:p,className:l,"data-testid":k,feedTestId:_,ref:A}){var xe;const{capabilities:T}=Be(),j=u.useRef(null),E=h??[],C=al({conversationId:e,rowCount:n.length+E.length}),{scrollRef:L,atBottomRef:I}=C,S=u.useCallback(O=>{j.current=O,L(O)},[L]),z=u.useRef(null),$=u.useRef(!1),X=u.useCallback(()=>{var O;$.current&&((O=z.current)==null||O.call(z,j.current,I.current))},[I]),U=tl(n,j,X),{landed:N,landedOn:oe,landedRow:Y,reportTopRow:G,noteReaderScrolled:Q}=el({conversationId:e,rows:n,virtualizer:U,landOn:s,landingReady:c&&g==null,...d===void 0?{}:{landingKey:d},...m===void 0?{}:{resumeRow:m},...f===void 0?{}:{landOnRow:f},...y===void 0?{}:{onTopRow:y}});u.useLayoutEffect(()=>{z.current=G,$.current=N});const se=u.useCallback(()=>{C.onScroll(),G(j.current,I.current)},[C,G,I]),ee=U.isAtEnd();u.useEffect(()=>{N&&ee&&(v==null||v())},[N,ee,v]);const _e=Qs(n,U,j),K=u.useCallback(O=>{const Z=document.getElementById(O);return Z===null?!1:(Z.scrollIntoView({block:"center"}),Z.focus({preventScroll:!0}),!0)},[]),me=u.useRef(null),fe=u.useRef(void 0),ie=u.useCallback(()=>{var O;fe.current!==void 0&&(clearTimeout(fe.current),fe.current=void 0),(O=me.current)==null||O.removeAttribute("data-landed"),me.current=null},[]),ge=u.useRef(null);u.useEffect(()=>{if(oe!=="requested"||Y===null||ge.current===Y||r===void 0)return;const O=n.find(ne=>ne.id===Y),Z=O===void 0?void 0:r(O);if(Z===void 0)return;const te=requestAnimationFrame(()=>{if(!K(Z))return;const ne=document.getElementById(Z);ne!==null&&(ge.current=Y,ie(),ne.setAttribute("data-landed","true"),me.current=ne,fe.current=setTimeout(ie,cl))});return()=>cancelAnimationFrame(te)},[oe,Y,r,n,K,ie]),u.useEffect(()=>ie,[ie]);const re=u.useCallback(O=>{C.scrollToBottom(O),U.scrollToEnd({behavior:(O==null?void 0:O.behavior)??"auto"})},[C,U]);u.useImperativeHandle(A,()=>({scrollToRow(O){if(K(O))return!0;if(r===void 0)return!1;const Z=n.findIndex(te=>r(te)===O);return Z===-1?!1:(U.scrollToIndex(Z,{align:"center"}),requestAnimationFrame(()=>K(O)),!0)},scrollToBottom:re}),[K,r,n,U,re]);const le=u.useMemo(()=>({onOpenThread:T.threads?i:void 0}),[T.threads,i]),je=u.useMemo(()=>n.reduce((O,Z)=>O+(Z.kind==="message"?1:0),0),[n]);return g!=null?o.jsx(o.Fragment,{children:g}):w!==void 0&&n.length===0&&E.length===0?o.jsx("div",{"data-slot":"conversation-empty",className:"flex min-h-0 flex-1 items-center justify-center overflow-y-auto",children:w}):o.jsxs("div",{"data-slot":"conversation-timeline","data-testid":k,"data-landed-on":oe??void 0,"data-message-row-count":je,className:B("relative min-h-0 flex-1",l),children:[o.jsxs("div",{ref:S,onScroll:se,onWheel:Q,onTouchMove:Q,onKeyDown:O=>{ll.has(O.key)&&Q()},"data-slot":"conversation-scroller","data-testid":"conversation-scroller",className:"chat-scroll-area h-full scrollbar-none overflow-y-auto",style:{overflowAnchor:"none"},children:[o.jsx(Rr,{label:t,busy:p,"data-testid":_,onBeyondRendered:_e,children:o.jsx("div",{style:{height:U.getTotalSize(),position:"relative",width:"100%"},children:o.jsx("div",{"data-slot":"conversation-window",className:"absolute left-0 w-full",style:{top:((xe=U.getVirtualItems()[0])==null?void 0:xe.start)??0},children:U.getVirtualItems().map(O=>o.jsx("div",{"data-index":O.index,ref:U.measureElement,children:o.jsx(sl,{row:n[O.index],index:O.index,context:le,renderRow:a})},n[O.index].id))})})}),E.length>0&&F!==void 0&&o.jsx("div",{className:"flex flex-col",children:E.map(O=>o.jsx(no,{post:O,viewerAuthorId:F},O.clientId))})]}),x!==void 0&&o.jsx("div",{role:"log","aria-live":"polite","aria-atomic":"false","data-testid":"transcript-announcer",className:"sr-only",children:x}),b!==void 0&&o.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"approval-announcer",className:"sr-only",children:b}),o.jsx(rl,{scrollRef:j}),o.jsx(ol,{hasNewRows:C.hasNewRows,isAtBottom:C.isAtBottom,hasRows:n.length>0,onJump:()=>re({behavior:ul(j.current)})})]})}const pl=["react","react-more","run-with","reply","copy","mention","profile","todo"],ml={"Yes, no, and thanks":["👍 thumbsup thumbs up yes approve like agree ok good","❤️ heart love red","🎉 tada party celebrate congrats hooray confetti","👀 eyes look watching seen reading review","🚀 rocket ship launch ship-it fast deploy","🙏 pray thanks thank you please folded hands","🔥 fire lit hot flame burn","💯 hundred perfect score full agree","✅ check tick done complete yes correct","❌ cross no wrong incorrect fail","👎 thumbsdown thumbs down no disagree bad","🙌 raised hands celebrate praise hooray","👏 clap applause bravo well done","🤝 handshake deal agreed partnership","💪 muscle strong flex power","🫡 salute yes sir acknowledged on it","✨ sparkles shiny new magic nice","⭐ star favourite favorite rating","🏆 trophy win won champion award","🎯 target bullseye exactly precise nailed it"],Faces:["😀 grin smile happy","😄 smile happy laugh joy","😂 joy laugh crying laughing funny lol","🤣 rofl rolling laughing hilarious","🙂 slight smile fine ok","😊 blush smile warm happy","😉 wink joking","😍 heart-eyes love adore","🤩 star-struck amazed wow","😎 sunglasses cool smooth","🥳 party face celebrate birthday","🤔 thinking hmm consider wondering","🧐 monocle inspect examine scrutiny","😅 sweat smile nervous phew close call","😬 grimace awkward yikes","😱 scream shocked horror fear","😮 surprised open mouth wow","🤯 mind blown exploding head whoa","😴 sleeping asleep tired zzz","🥱 yawn bored tired","😐 neutral meh straight face","🙄 eye roll unimpressed whatever","😤 triumph frustrated steam determined","😢 cry sad tear upset","😭 sob crying loudly devastated","😡 angry rage mad furious","🤒 sick ill fever unwell","🤖 robot bot agent automation machine","👻 ghost boo spooky","🤡 clown silly foolish","😇 innocent halo angel","🥲 tear smile bittersweet","🫠 melting overwhelmed hot dissolving","🤷 shrug dunno who knows unsure"],"Hands and people":["👋 wave hello hi bye greeting","🤙 call me shaka hang loose","✌️ peace victory two","🤞 fingers crossed hope luck","🫰 finger heart love money","👌 ok perfect fine good","🤌 pinched fingers italian chef what","☝️ point-up one first attention","👇 point-down below beneath","👉 point-right this next","👈 point-left back previous","✋ hand stop halt raised","🖐️ open-hand five stop","🫶 heart-hands love care","🧠 brain smart thinking mind idea","👨‍💻 developer coding programmer engineer","🕺 dancing celebrate dance","🏃 running run fast hurry"],"Hearts and symbols":["🧡 orange heart love","💛 yellow heart love","💚 green heart love","💙 blue heart love","💜 purple heart love","🖤 black heart love dark","🤍 white heart love","💔 broken heart sad hurt","💖 sparkling heart love shiny","❣️ heart-exclamation love","⚡ zap lightning fast power energy","💥 boom explosion collision impact","💫 dizzy stars sparkle","⚠️ warning caution careful alert","🚨 siren alert emergency urgent incident","🛑 stop sign halt blocked","♻️ recycle reuse refresh retry","🔒 lock secure locked private","🔓 unlock open unlocked","💡 idea bulb lightbulb suggestion insight","❓ question ask unknown what","❗ exclamation important attention","➕ plus add more increase","➖ minus remove less decrease","🆗 ok-button fine approved","🆕 new fresh","🔁 repeat loop again retry","⏳ hourglass waiting time slow pending","⏰ alarm clock time deadline reminder","📈 chart-up growth increase improving","📉 chart-down decline decrease regression"],"Work and things":["💻 laptop computer code work","🖥️ desktop monitor screen","📱 phone mobile device","⌨️ keyboard typing input","🐛 bug defect issue error broken","🔧 wrench fix repair tool","🔨 hammer build fix construct","🛠️ tools build fix maintenance","⚙️ gear settings config machinery","🧪 test experiment lab trial","🧹 broom clean cleanup sweep tidy","📦 package box shipment release module","🚢 ship shipping deploy release","🗑️ trash delete remove bin","📝 memo note write document","📋 clipboard copy list checklist","📌 pin pinned important stick","📎 paperclip attach link","🔍 magnifying search find look investigate","🔗 link url chain reference","🗓️ calendar date schedule plan","⏱️ stopwatch timing performance speed","🔔 bell notify notification alert ping","🔕 bell-off mute silent quiet","📮 mail post send inbox","🧾 receipt invoice record log","🗂️ files folders organise organize","🔑 key access secret credential","🧱 brick wall block foundation","🪵 log wood timber","🧯 extinguisher hotfix incident fire put out","🩹 bandage patch fix quick","🔮 crystal ball predict future guess","🧭 compass direction navigate guide","🪄 magic wand automatic magically"],"Food and drink":["☕ coffee cafe morning caffeine","🍵 tea green matcha","🍺 beer pint drink cheers","🍻 cheers beers toast celebrate","🥂 champagne toast celebrate cheers","🍕 pizza food slice","🍔 burger food hamburger","🌮 taco food mexican","🍜 noodles ramen soup food","🍎 apple fruit food","🍌 banana fruit food","🍰 cake dessert birthday sweet","🍪 cookie biscuit sweet snack","🍩 donut doughnut sweet","🧁 cupcake sweet dessert","🍫 chocolate sweet treat","🍿 popcorn watching drama entertainment","🥑 avocado food green","🌶️ chilli chili spicy hot pepper","🧊 ice cold frozen chill"],"Animals and nature":["🐶 dog puppy pet","🐱 cat kitten pet","🦊 fox clever","🐻 bear","🐼 panda","🐢 turtle slow tortoise","🐌 snail slow","🐝 bee busy buzz","🦋 butterfly transform pretty","🐙 octopus multitask arms","🐳 whale big ocean","🦄 unicorn rare magic special","🦉 owl wise night","🐘 elephant big memory","🌱 seedling growth new sprout","🌳 tree nature growth","🌸 blossom flower spring","🌊 ocean wave water sea","🌈 rainbow colour color pride hope","☀️ sun sunny bright day","🌙 moon night late evening","⛈️ storm thunder rain bad weather","❄️ snowflake cold snow winter freeze","🍂 leaves autumn fall"],"Places and travel":["🏠 house home","🏢 office building work","🌍 earth world globe europe africa","🌎 earth-americas world globe","🗺️ map plan route territory","✈️ plane flight travel","🚗 car drive travel","🚲 bike bicycle cycle","🚂 train rail","⛺ tent camping outdoors","🏝️ island holiday vacation beach","🏔️ mountain peak climb summit"]},ka=Object.entries(ml).map(([e,t])=>({name:e,entries:t.map(n=>{const[a,...i]=n.split(" ");return{emoji:a,keywords:i}})})),wa=ka.flatMap(e=>e.entries);function fl(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.length===0?[]:wa.filter(n=>n.emoji===e.trim()||t.every(a=>n.keywords.some(i=>i.startsWith(a))))}function gl(e){return wa.find(t=>t.emoji===e)}function Le(e){var t;return((t=gl(e))==null?void 0:t.keywords[0])??e}function Da(e,t,n){const a=u.useRef([]);u.useImperativeHandle(n,()=>({focusFirst:()=>{var s;return(s=a.current[0])==null?void 0:s.focus()}}));const i=u.useCallback(s=>c=>{a.current[s]=c},[]),r=u.useCallback((s,c)=>{const d=(m,f)=>{var y;e!==0&&((y=a.current[(m+f+e)%e])==null||y.focus())};switch(s.key){case"ArrowRight":case"ArrowDown":s.preventDefault(),d(c,1);break;case"ArrowLeft":case"ArrowUp":s.preventDefault(),d(c,-1);break;case"Home":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(0,0);break;case"End":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(e-1,0);break;case"Escape":s.preventDefault(),s.stopPropagation(),t();break}},[e,t]);return{register:i,handleKeyDown:r}}function _a({mine:e,frequents:t,onPick:n,disabled:a}){const[i,r]=u.useState(""),s=u.useId(),c=u.useMemo(()=>fl(i),[i]),d=i.trim().length>0,m=f=>o.jsx("button",{type:"button",disabled:a,onClick:()=>n(f),"aria-pressed":e.includes(f),"aria-label":Le(f),title:Le(f),className:B("focus-ring hover:bg-accent flex size-8 items-center justify-center rounded-md text-base",xt,"disabled:pointer-events-none disabled:opacity-50",e.includes(f)&&"bg-brand/15 ring-brand/40 ring-1"),children:o.jsx("span",{"aria-hidden":!0,children:f})},f);return o.jsxs("div",{className:"flex flex-col gap-2","data-testid":"reaction-picker",children:[o.jsx(Ai,{autoFocus:!0,value:i,onChange:f=>r(f.target.value),placeholder:"Search emoji…","aria-label":"Search emoji",className:"h-8"}),a===!0&&o.jsx("p",{role:"status",className:"text-muted-foreground px-1 text-xs",children:"Reactions send once the room reconnects."}),o.jsx("div",{className:"max-h-64 overflow-y-auto pr-1",children:d?c.length===0?o.jsx("p",{className:"text-muted-foreground px-1 py-6 text-center text-xs",children:"Nothing here matches that."}):o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:c.map(f=>m(f.emoji))}):o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("section",{role:"group","aria-labelledby":`${s}-frequents`,children:[o.jsx("h3",{id:`${s}-frequents`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:"Your most used"}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:t.map(m)})]}),ka.map((f,y)=>o.jsxs("section",{role:"group","aria-labelledby":`${s}-group-${y}`,children:[o.jsx("h3",{id:`${s}-group-${y}`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:f.name}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:f.entries.map(h=>m(h.emoji))})]},f.name))]})})]})}function ja({appearance:e="capsule",mine:t,frequents:n,onPick:a,disabled:i,triggerRef:r,onTriggerKeyDown:s}){const[c,d]=u.useState(!1),m=e==="capsule";return o.jsxs(Ni,{open:c,onOpenChange:d,children:[o.jsx(Ri,{asChild:!0,children:o.jsx(pe,{ref:r,type:"button",variant:"ghost",size:m?"icon-xs":"sm",tabIndex:-1,disabled:i,"data-entry-action":"react-more","data-testid":m?void 0:"entry-reactions-add","aria-label":"Pick a reaction",title:"Pick a reaction",onKeyDown:s,className:B("leading-none",m?"text-control":"text-muted-foreground hover:text-foreground h-10 rounded-full px-3 md:h-6 md:px-2"),children:m?o.jsx("span",{"aria-hidden":!0,children:"🙂+"}):o.jsx(Dr,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})})}),o.jsx(Ti,{align:"end",className:"w-[19rem] p-2",children:o.jsx(_a,{mine:t,frequents:n,disabled:i,onPick:f=>{a(f),d(!1)}})})]})}function xl({prompt:e,sessionId:t,triggerRef:n,onTriggerKeyDown:a}){const i=Tn(),r=Et(),{sessions:s}=Si(),{data:c}=zi(),{data:d}=Ii(),[m,f]=u.useState({open:!1}),y=s.find(v=>v.id===t),h=y==null?void 0:y.runtime,F=y==null?void 0:y.cwd,g=Li.filter(v=>v!==h),w=v=>(c?v in c.capabilities:!0)&&Bi(d,v),x=v=>{Mi(r,{dir:F,runtime:v,prompt:e}).then(p=>i(p)).catch(p=>{$i(r,p),Pi(F??null)})},b=v=>{if(!w(v)){f({open:!0,runtime:v});return}x(v)};return o.jsxs(o.Fragment,{children:[o.jsxs($n,{children:[o.jsx(Pn,{asChild:!0,children:o.jsx("button",{ref:n,type:"button","data-entry-action":"run-with","aria-label":"Run this prompt elsewhere",onKeyDown:a,className:"text-muted-foreground/60 hover:text-foreground hover:bg-muted inline-flex size-6 items-center justify-center rounded transition-colors duration-150",children:o.jsx(_r,{className:"size-3.5"})})}),o.jsxs(qn,{align:"end",className:"w-52",children:[o.jsx(Oi,{children:"Run this with…"}),g.map(v=>{const p=Ln(v);return o.jsx(gt,{icon:p.icon,description:w(v)?void 0:"Connect",onSelect:()=>b(v),children:p.label},v)})]})]}),o.jsx(hr,{runtime:m.runtime,open:m.open,onOpenChange:v=>f(p=>({...p,open:v})),renderConnect:vr,onRuntimeReady:v=>{f({open:!1}),x(v)}})]})}function hl(e,t,n){return pl.flatMap(a=>{if(a==="react")return t?t.quick.map(r=>({kind:"quick",slot:a,emoji:r,mine:t.mine.includes(r)})):[];if(a==="react-more")return t?[{kind:"picker",slot:a}]:[];if(a==="run-with")return n?[{kind:"run-with",slot:a,runWith:n}]:[];const i=e.find(r=>r.id===a);return i?[{kind:"command",slot:a,action:i}]:[]})}const vl=u.forwardRef(function({actions:t,reactions:n,runWith:a,onExit:i,className:r},s){const c=hl(t,n,a),{register:d,handleKeyDown:m}=Da(c.length,i,s);return c.length===0?null:o.jsx("div",{role:"toolbar","aria-label":"Message actions","aria-orientation":"horizontal","data-testid":"entry-actions",className:r,children:c.map((f,y)=>{const h=g=>m(g,y),F=f.kind==="command"&&y>0&&c[y-1].kind!=="command";return f.kind==="run-with"?o.jsx(xl,{prompt:f.runWith.prompt,sessionId:f.runWith.sessionId,triggerRef:d(y),onTriggerKeyDown:h},"run-with"):f.kind==="picker"?o.jsx(ja,{mine:n.mine,frequents:n.quick,disabled:n.disabled,onPick:n.onToggle,triggerRef:d(y),onTriggerKeyDown:h},"react-more"):o.jsxs(u.Fragment,{children:[F&&o.jsx("span",{"aria-hidden":!0,"data-slot":"capsule-gap",className:"mx-1"}),f.kind==="quick"?o.jsx(pe,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,disabled:n.disabled,"data-entry-action":f.slot,"data-emoji":f.emoji,"data-reacted":f.mine?"true":void 0,"aria-pressed":f.mine,"aria-label":`React with ${Le(f.emoji)}`,title:`React with ${Le(f.emoji)}`,onClick:()=>n.onToggle(f.emoji),onKeyDown:h,className:B("text-control leading-none",f.mine&&"bg-brand/15 text-foreground"),children:o.jsx("span",{"aria-hidden":!0,children:f.emoji})}):o.jsx(pe,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,"data-entry-action":f.slot,"aria-label":f.action.label,title:f.action.label,onClick:f.action.run,onKeyDown:h,children:o.jsx(f.action.icon,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})})]},f.kind==="quick"?f.emoji:f.action.id)})})});function bl({quick:e,mine:t,onToggle:n,disabled:a}){const{close:i}=Gi(),[r,s]=u.useState(!1),c=d=>{n(d),i()};return o.jsxs("div",{className:"border-border border-b px-4 py-3","data-testid":"drawer-reactions",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[e.map(d=>o.jsx("button",{type:"button",disabled:a,onClick:()=>c(d),"data-entry-action":"react","data-emoji":d,"aria-pressed":t.includes(d),"aria-label":`React with ${Le(d)}`,className:B("focus-ring flex size-11 items-center justify-center rounded-full border text-lg",xt,"disabled:pointer-events-none disabled:opacity-50",t.includes(d)?"border-brand/70 bg-brand/12":"border-border bg-muted/60 active:bg-accent"),children:o.jsx("span",{"aria-hidden":!0,children:d})},d)),o.jsx("button",{type:"button",disabled:a,onClick:()=>s(d=>!d),"aria-expanded":r,"aria-label":"Pick a reaction",className:B("focus-ring border-border bg-muted/60 active:bg-accent flex size-11 items-center justify-center rounded-full border text-base",xt,"disabled:pointer-events-none disabled:opacity-50"),children:o.jsx("span",{"aria-hidden":!0,children:"🙂+"})})]}),r&&o.jsx("div",{className:"pt-3",children:o.jsx(_a,{mine:t,frequents:e,onPick:c,disabled:a})})]})}function yl({actions:e,reactions:t,onPressStateChange:n,children:a}){const i=qi();return e.length===0?o.jsx(o.Fragment,{children:a}):o.jsxs(Hi,{children:[o.jsx(Ki,{asChild:!0,onPressStateChange:n,children:a}),o.jsxs(Vi,{className:"w-52",children:[i&&t&&o.jsx(bl,{...t}),e.map(r=>o.jsxs(Wi,{onClick:r.run,children:[o.jsx(r.icon,{"aria-hidden":!0,className:"mr-2 size-4"}),r.label]},r.id))]})]})}function kl({count:e,roll:t}){const[n]=u.useState(t);return o.jsx("span",{"aria-hidden":!0,className:B("tabular-nums",n&&"motion-safe:animate-reaction-roll"),children:e})}function wl({reaction:e,mine:t,summary:n,arrived:a,rolled:i,onToggle:r,disabled:s,buttonRef:c,onKeyDown:d}){const[m]=u.useState(a),f=e.authorIds.length;return o.jsxs(W.button,{ref:c,type:"button",tabIndex:-1,onKeyDown:d,exit:{opacity:0},transition:{duration:.12},disabled:s,onClick:r,"aria-pressed":t,"aria-label":n,title:n,"data-testid":"entry-reaction","data-emoji":e.emoji,"data-mine":t?"true":void 0,className:B("focus-ring inline-flex items-center gap-1 rounded-full text-xs","h-10 px-3 md:h-6 md:px-2","disabled:pointer-events-none disabled:opacity-50",t?"bg-brand/15 text-brand-text font-medium":"bg-foreground/5 text-muted-foreground hover:bg-foreground/8",m&&"motion-safe:animate-reaction-pop"),children:[o.jsx("span",{"aria-hidden":!0,className:"text-sm",children:e.emoji}),o.jsx(kl,{count:f,roll:i},f)]})}const Dl=u.forwardRef(function({reactions:t,viewerAuthorId:n,names:a,frequents:i,onToggle:r,disabled:s,onExit:c},d){const[m,f]=u.useState(!1),y=u.useRef(null),h=y.current,[F,g]=u.useState(!1),[w,x]=u.useState(t.length);w!==t.length&&(x(t.length),g(t.length===0&&w>0)),u.useEffect(()=>{y.current=new Map(t.map(E=>[E.emoji,E.authorIds.length]))});const{shown:b,hidden:v}=Pr(t),p=m?t:b,l=t.filter(E=>Kt(E,n)).map(E=>E.emoji),k=v>0&&!m?1:0,_=t.length>0?1:0,{register:A,handleKeyDown:T}=Da(p.length+k+_,c,d),j=u.useCallback(E=>C=>T(C,E),[T]);return t.length===0&&!F?null:o.jsxs("div",{"data-testid":"entry-reactions",className:"mt-2 flex flex-wrap items-center gap-2 md:gap-1",role:"group","aria-label":"Reactions",children:[o.jsx(be,{initial:!1,onExitComplete:()=>g(!1),children:p.map((E,C)=>o.jsx(wl,{reaction:E,mine:Kt(E,n),summary:$r(E,n,a),arrived:h!==null&&!h.has(E.emoji),rolled:(h==null?void 0:h.get(E.emoji))!==void 0&&h.get(E.emoji)!==E.authorIds.length,onToggle:()=>r(E.emoji),disabled:s,buttonRef:A(C),onKeyDown:j(C)},E.emoji))}),k===1&&o.jsxs("button",{ref:A(p.length),type:"button",tabIndex:-1,onKeyDown:j(p.length),onClick:()=>f(!0),"data-testid":"entry-reactions-more",className:"focus-ring text-muted-foreground hover:text-foreground inline-flex h-10 items-center rounded-full px-3 text-xs md:h-6 md:px-2",children:["+",v," more"]}),t.length>0&&o.jsx(ja,{appearance:"ghost-pill",mine:l,frequents:i,disabled:s,onPick:r,triggerRef:A(p.length+k),onTriggerKeyDown:j(p.length+k)})]})}),Ea=u.createContext(null);function _l({value:e,children:t}){return o.jsx(Ea.Provider,{value:e,children:t})}function $e(){const e=u.useContext(Ea);if(e===null)throw new Error("A Message part must be rendered inside <Message.Root>. Each part draws itself with a slot of the row’s single messageItem() call, and there is no honest default for a row that was never computed.");return e}function Fa(e){return e==="first"||e==="only"}const jl=Ui("",{variants:{anchor:{corner:"contents",rail:"pointer-events-none sticky top-1 z-20 order-first -mt-(--msg-actions-height) flex h-(--msg-actions-height) items-start justify-end pr-2"}}});function El({actions:e=[],reactions:t,runWith:n,barRef:a,onExit:i}){const{capabilities:r,anchor:s}=Be(),{slots:c}=$e();return o.jsxs(o.Fragment,{children:[e.length>0&&o.jsx("button",{type:"button",tabIndex:-1,"data-testid":"entry-actions-reach","aria-label":"Message actions",onClick:()=>{var d;return(d=a==null?void 0:a.current)==null?void 0:d.focusFirst()},className:"sr-only"}),o.jsx("div",{"data-slot":"message-actions",className:jl({anchor:s}),children:o.jsx(vl,{ref:a,actions:e,reactions:r.reactions?t:void 0,runWith:r.runWith?n:void 0,onExit:i,className:c.actions()})})]})}const Fl="you";function Cl({id:e,author:t,at:n,origin:a,mark:i,renderName:r,isSelf:s=t.isSelf??!1,asChild:c=!1,className:d}){const{slots:m,position:f}=$e(),y=n===void 0?"":na(n);if(!Fa(f))return null;const h=c?At:"div",F=o.jsx("span",{className:m.authorName(),children:t.displayName}),g=s&&t.displayName.trim().toLowerCase()!==Fl;return o.jsxs(h,{id:e,"data-slot":"message-author",className:B(m.header(),d),children:[r?r(F):F,g&&o.jsx("span",{"data-slot":"message-author-self",className:"text-msg-timestamp shrink-0 text-xs",children:"(you)"}),a!==void 0&&o.jsx(Zi,{origin:a}),i,o.jsx(Ji,{retired:t.retired}),y.length>0&&o.jsx("time",{dateTime:n,title:aa(n??""),className:B(m.timestamp(),"text-msg-timestamp"),children:y})]})}function Al({children:e,className:t}){const{slots:n}=$e();return o.jsx("div",{"data-slot":"message-body",className:B(n.body(),t),children:e})}function Nl({id:e,children:t,className:n}){const{slots:a}=$e();return o.jsx("div",{id:e,"data-slot":"message-content",className:B(a.content(),n),children:t})}function Rl({author:e,at:t,onViewProfile:n,isSelf:a,renderAvatar:i,className:r}){const{slots:s,position:c}=$e(),{showTimestamps:d}=Yi(),m=t===void 0?"":na(t);return o.jsx("div",{"data-slot":"message-gutter",className:B(s.gutter(),r),children:Fa(c)?(i??(f=>f))(o.jsx(ta,{author:e,onViewProfile:n,isSelf:a})):m.length>0&&o.jsx("time",{dateTime:t,title:aa(t??""),className:B(s.avatarTimestamp(),d?"text-msg-timestamp":"group-focus-within:text-msg-timestamp group-hover:text-msg-timestamp text-transparent"),children:m})})}function Tl({ref:e,...t}){const{capabilities:n}=Be(),[a,i]=u.useState(t.reactions.length>0);return!a&&t.reactions.length>0&&i(!0),!n.reactions||!a?null:o.jsx("div",{"data-slot":"message-reactions",className:"contents",children:o.jsx(Dl,{ref:e,...t})})}const Sl=Kn.glide;function zl({role:e="assistant",position:t="only",isNew:n=!1,actions:a,reactions:i,asChild:r=!1,className:s,children:c,ref:d,...m}){const{capabilities:f,density:y,anchor:h}=Be(),[F,g]=u.useState(null),w=u.useMemo(()=>({slots:eo({role:e,position:t,density:y,anchor:h}),position:t}),[e,t,y,h]),x=a!==void 0&&a.length>0,b=r?At:W.div,v=o.jsx(b,{ref:d,"data-slot":"message-root",role:"article",className:B(w.slots.root(),h==="rail"?"focus-ring-inset":"focus-visible:ring-ring outline-none focus-visible:ring-2","origin-center",x&&"[-webkit-touch-callout:none]",F==="pressing"&&"motion-safe:animate-press-in",F==="released"&&"motion-safe:animate-press-release",s),...r?{}:{initial:n?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:Sl},...m,children:o.jsx(_l,{value:w,children:o.jsx(Xi,{children:c})})});return o.jsx(yl,{actions:a??[],reactions:f.reactions?i:void 0,onPressStateChange:g,children:v})}const fu={Root:As,Timeline:dl,LiveLane:Us,LivePeek:Ys,Composer:Fs,Footer:Cs},gu={Root:zl,Gutter:Rl,Author:Cl,Body:Al,Content:Nl,Attachments:ro,Reactions:Tl,Actions:El},Il={a:er,img:yr},Ca=u.createContext({isStreaming:!1});function Ol(e){const t=u.useContext(Ca);return o.jsx(fr,{...e,...t})}const Ll={renderers:[{language:mr,component:Ol}]};function xu({content:e,isStreaming:t=!1,textEffect:n=Tr,sessionId:a,isLatestWidgetMessage:i}){const r=zr(n),s=u.useMemo(()=>({sessionId:a,isLatestMessage:i,isStreaming:t}),[a,i,t]);return o.jsx(Ca.Provider,{value:s,children:o.jsx("div",{className:B("relative",t&&"streaming-cursor"),children:o.jsx(br,{resetKey:e,fallback:o.jsx("div",{className:"text-sm break-words whitespace-pre-wrap",children:e}),children:o.jsx(Qi,{shikiTheme:["github-light","github-dark"],components:Il,animated:r,isAnimating:t,plugins:Ll,children:e})})})})}function hu({via:e}){return o.jsxs("p",{"data-testid":"forward-via-line",className:"text-muted-foreground mb-0.5 flex min-w-0 items-center gap-1 text-xs",children:[o.jsxs("span",{className:"shrink-0",children:["via ",e.appName]}),o.jsx("span",{"aria-hidden":!0,children:"·"}),e.itemTitle?o.jsx("q",{className:"min-w-0 truncate",title:`Item title from ${e.appName}`,children:e.itemTitle}):o.jsxs("span",{className:"min-w-0 truncate",children:["item ",e.itemId]})]})}const Bl={sent:[],stops:[]},Ml=new rr;function vu(e){const t=tr(),n=u.useContext(nr),a=ar(e??""),{data:i}=ir({queryKey:["chat-activity",e,a],queryFn:()=>t.getChatActivity(e),enabled:!!e&&t!==null&&n!==void 0,placeholderData:(r,s)=>(s==null?void 0:s.queryKey[1])===e?r:void 0,staleTime:3e4},n??Ml);return i??Bl}const Ot=u.createContext(null);function bu({children:e,value:t}){const n=u.useMemo(()=>t,[t.sessionId,t.isStreaming,t.isLatestWidgetMessage,t.isFinalMessage,t.activeToolCallId,t.onToolRef,t.focusedOptionIndex,t.onToolDecided,t.onRetry,t.onSigninComplete,t.onChooseModel,t.inputZoneToolCallId,t.textEffect,t.runtimeLabel,t.allowsDenyReason]);return o.jsx(Ot,{value:n,children:e})}function yu(){const e=u.useContext(Ot);if(!e)throw new Error("useMessageContext must be used within MessageProvider");return e}function ku(){return u.useContext(Ot)}const $l=e=>typeof e=="boolean"||e instanceof Boolean,Pl=e=>typeof e=="number"||e instanceof Number,ql=e=>typeof e=="bigint"||e instanceof BigInt,Aa=e=>!!e&&e instanceof Date,Hl=e=>typeof e=="string"||e instanceof String,Kl=e=>Array.isArray(e),Na=e=>typeof e=="object"&&e!==null,Ra=e=>!!e&&e instanceof Object&&typeof e=="function";function Ue(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function Vl(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function Ta(e){let{field:t,value:n,data:a,lastElement:i,openBracket:r,closeBracket:s,level:c,style:d,shouldExpandNode:m,clickToExpandNode:f,outerRef:y,beforeExpandChange:h}=e;const F=u.useRef(!1),[g,w]=u.useState(()=>m(c,n,t)),x=u.useRef(null);u.useEffect(()=>{F.current?w(m(c,n,t)):F.current=!0},[m]);const b=u.useId();if(a.length===0)return Wl({field:t,openBracket:r,closeBracket:s,lastElement:i,style:d});const v=g?d.collapseIcon:d.expandIcon,p=g?d.ariaLables.collapseJson:d.ariaLables.expandJson,l=c+1,k=a.length-1,_=j=>{g!==j&&(!h||h({level:c,value:n,field:t,newExpandValue:j}))&&w(j)},A=j=>{if(j.key==="ArrowRight"||j.key==="ArrowLeft")j.preventDefault(),_(j.key==="ArrowRight");else if(j.key==="ArrowUp"||j.key==="ArrowDown"){j.preventDefault();const E=j.key==="ArrowUp"?-1:1;if(!y.current)return;const C=y.current.querySelectorAll("[role=button]");let L=-1;for(let S=0;S<C.length;S++)if(C[S].tabIndex===0){L=S;break}if(L<0)return;const I=(L+E+C.length)%C.length;C[L].tabIndex=-1,C[I].tabIndex=0,C[I].focus()}},T=()=>{var j;_(!g);const E=x.current;if(!E)return;const C=(j=y.current)===null||j===void 0?void 0:j.querySelector('[role=button][tabindex="0"]');C&&(C.tabIndex=-1),E.tabIndex=0,E.focus()};return u.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":g,"aria-selected":void 0},u.createElement("span",{className:v,onClick:T,onKeyDown:A,role:"button","aria-label":p,"aria-expanded":g,"aria-controls":g?b:void 0,ref:x,tabIndex:c===0?0:-1}),(t||t==="")&&(f?u.createElement("span",{className:d.clickableLabel,onClick:T,onKeyDown:A},Ue(t,d.quotesForFieldNames),":"):u.createElement("span",{className:d.label},Ue(t,d.quotesForFieldNames),":")),u.createElement("span",{className:d.punctuation},r),g?u.createElement("ul",{id:b,role:"group",className:d.childFieldsContainer},a.map((j,E)=>u.createElement(wt,{key:j[0]||E,field:j[0],value:j[1],style:d,lastElement:E===k,level:l,shouldExpandNode:m,clickToExpandNode:f,beforeExpandChange:h,outerRef:y}))):u.createElement("span",{className:d.collapsedContent,onClick:T,onKeyDown:A}),u.createElement("span",{className:d.punctuation},s),!i&&u.createElement("span",{className:d.punctuation},","))}function Wl(e){let{field:t,openBracket:n,closeBracket:a,lastElement:i,style:r}=e;return u.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:r.label},Ue(t,r.quotesForFieldNames),":"),u.createElement("span",{className:r.punctuation},n),u.createElement("span",{className:r.punctuation},a),!i&&u.createElement("span",{className:r.punctuation},","))}function Gl(e){let{field:t,value:n,style:a,lastElement:i,shouldExpandNode:r,clickToExpandNode:s,level:c,outerRef:d,beforeExpandChange:m}=e;return Ta({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:s,data:Object.keys(n).map(f=>[f,n[f]]),outerRef:d,beforeExpandChange:m})}function Ul(e){let{field:t,value:n,style:a,lastElement:i,level:r,shouldExpandNode:s,clickToExpandNode:c,outerRef:d,beforeExpandChange:m}=e;return Ta({field:t,value:n,lastElement:i||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:s,clickToExpandNode:c,data:n.map(f=>[void 0,f]),outerRef:d,beforeExpandChange:m})}function Zl(e){let{field:t,value:n,style:a,lastElement:i}=e,r,s=a.otherValue;return n===null?(r="null",s=a.nullValue):n===void 0?(r="undefined",s=a.undefinedValue):Hl(n)?(r=Vl(n,!a.noQuotesForStringValues,a.stringifyStringValues),s=a.stringValue):$l(n)?(r=n?"true":"false",s=a.booleanValue):Pl(n)?(r=n.toString(),s=a.numberValue):ql(n)?(r=`${n.toString()}n`,s=a.numberValue):Aa(n)?r=n.toISOString():Ra(n)?r="function() { }":r=n.toString(),u.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:a.label},Ue(t,a.quotesForFieldNames),":"),u.createElement("span",{className:s},r),!i&&u.createElement("span",{className:a.punctuation},","))}function wt(e){const t=e.value;return Kl(t)?u.createElement(Ul,Object.assign({},e)):Na(t)&&!Aa(t)&&!Ra(t)?u.createElement(Gl,Object.assign({},e)):u.createElement(Zl,Object.assign({},e))}var M={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const Sa={collapseJson:"collapse JSON",expandJson:"expand JSON"},ct={container:M["container-light"],basicChildStyle:M["basic-element-style"],childFieldsContainer:M["child-fields-container"],label:M["label-light"],clickableLabel:M["clickable-label-light"],nullValue:M["value-null-light"],undefinedValue:M["value-undefined-light"],stringValue:M["value-string-light"],booleanValue:M["value-boolean-light"],numberValue:M["value-number-light"],otherValue:M["value-other-light"],punctuation:M["punctuation-light"],collapseIcon:M["collapse-icon-light"],expandIcon:M["expand-icon-light"],collapsedContent:M["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Sa,stringifyStringValues:!1},Jl={container:M["container-dark"],basicChildStyle:M["basic-element-style"],childFieldsContainer:M["child-fields-container"],label:M["label-dark"],clickableLabel:M["clickable-label-dark"],nullValue:M["value-null-dark"],undefinedValue:M["value-undefined-dark"],stringValue:M["value-string-dark"],booleanValue:M["value-boolean-dark"],numberValue:M["value-number-dark"],otherValue:M["value-other-dark"],punctuation:M["punctuation-dark"],collapseIcon:M["collapse-icon-dark"],expandIcon:M["expand-icon-dark"],collapsedContent:M["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Sa,stringifyStringValues:!1},Yl=()=>!0,Xl=e=>e<1,Ql=e=>{let{data:t,style:n=ct,shouldExpandNode:a=Yl,clickToExpandNode:i=!1,beforeExpandChange:r,compactTopLevel:s,...c}=e;const d=u.useRef(null);return u.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:d,role:"tree"}),s&&Na(t)?Object.entries(t).map(m=>{let[f,y]=m;return u.createElement(wt,{key:f,field:f,value:y,style:{...ct,...n},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:i,beforeExpandChange:r,outerRef:d})}):u.createElement(wt,{value:t,style:{...ct,...n},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:i,outerRef:d,beforeExpandChange:r}))};var ae={},ut,gn;function ec(){if(gn)return ut;gn=1;const e=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],t=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;class n{static escapeForHtml(i){return new n().escapeForHtml(i)}static linkify(i){return new n().linkify(i)}static ansiToHtml(i,r){return new n().ansiToHtml(i,r)}static ansiToJson(i,r){return new n().ansiToJson(i,r)}static ansiToText(i){return new n().ansiToText(i)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let c=0;c<2;++c)for(let d=0;d<8;++d)this.PALETTE_COLORS.push(e[c][d].color);let i=[0,95,135,175,215,255],r=(c,d,m)=>i[c]+", "+i[d]+", "+i[m];for(let c=0;c<6;++c)for(let d=0;d<6;++d)for(let m=0;m<6;++m)this.PALETTE_COLORS.push(r(c,d,m));let s=8;for(let c=0;c<24;++c,s+=10)this.PALETTE_COLORS.push(s+", "+s+", "+s)}escapeForHtml(i){return i.replace(/[&<>\"]/gm,r=>r=="&"?"&amp;":r=='"'?"&quot;":r=="<"?"&lt;":r==">"?"&gt;":"")}linkify(i){return i.replace(t,r=>`<a href="${r}">${r}</a>`)}ansiToHtml(i,r){return this.process(i,r,!0)}ansiToJson(i,r){return r=r||{},r.json=!0,r.clearLine=!1,this.process(i,r,!0)}ansiToText(i){return this.process(i,{},!1)}process(i,r,s){let c=this,d=i.split(/\033\[/),m=d.shift();r==null&&(r={}),r.clearLine=/\r/.test(i);let f=d.map(y=>this.processChunk(y,r,s));if(r&&r.json){let y=c.processChunkJson("");return y.content=m,y.clearLine=r.clearLine,f.unshift(y),r.remove_empty&&(f=f.filter(h=>!h.isEmpty())),f}else f.unshift(m);return f.join("")}processChunkJson(i,r,s){r=typeof r>"u"?{}:r;let c=r.use_classes=typeof r.use_classes<"u"&&r.use_classes,d=r.key=c?"class":"color",m={content:i,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:r.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!m.content},f=i.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!f)return m;m.content=f[4];let y=f[2].split(";");if(f[1]!==""||f[3]!=="m"||!s)return m;let h=this;for(;y.length>0;){let F=y.shift(),g=parseInt(F);if(isNaN(g)||g===0)h.fg=h.bg=null,h.decorations=[];else if(g===1)h.decorations.push("bold");else if(g===2)h.decorations.push("dim");else if(g===3)h.decorations.push("italic");else if(g===4)h.decorations.push("underline");else if(g===5)h.decorations.push("blink");else if(g===7)h.decorations.push("reverse");else if(g===8)h.decorations.push("hidden");else if(g===9)h.decorations.push("strikethrough");else if(g===21)h.removeDecoration("bold");else if(g===22)h.removeDecoration("bold"),h.removeDecoration("dim");else if(g===23)h.removeDecoration("italic");else if(g===24)h.removeDecoration("underline");else if(g===25)h.removeDecoration("blink");else if(g===27)h.removeDecoration("reverse");else if(g===28)h.removeDecoration("hidden");else if(g===29)h.removeDecoration("strikethrough");else if(g===39)h.fg=null;else if(g===49)h.bg=null;else if(g>=30&&g<38)h.fg=e[0][g%10][d];else if(g>=90&&g<98)h.fg=e[1][g%10][d];else if(g>=40&&g<48)h.bg=e[0][g%10][d];else if(g>=100&&g<108)h.bg=e[1][g%10][d];else if(g===38||g===48){let w=g===38;if(y.length>=1){let x=y.shift();if(x==="5"&&y.length>=1){let b=parseInt(y.shift());if(b>=0&&b<=255)if(!c)this.PALETTE_COLORS||h.setupPalette(),w?h.fg=this.PALETTE_COLORS[b]:h.bg=this.PALETTE_COLORS[b];else{let v=b>=16?"ansi-palette-"+b:e[b>7?1:0][b%8].class;w?h.fg=v:h.bg=v}}else if(x==="2"&&y.length>=3){let b=parseInt(y.shift()),v=parseInt(y.shift()),p=parseInt(y.shift());if(b>=0&&b<=255&&v>=0&&v<=255&&p>=0&&p<=255){let l=b+", "+v+", "+p;c?w?(h.fg="ansi-truecolor",h.fg_truecolor=l):(h.bg="ansi-truecolor",h.bg_truecolor=l):w?h.fg=l:h.bg=l}}}}}return h.fg===null&&h.bg===null&&h.decorations.length===0||(m.fg=h.fg,m.bg=h.bg,m.fg_truecolor=h.fg_truecolor,m.bg_truecolor=h.bg_truecolor,m.decorations=h.decorations,m.decoration=h.decorations.slice(-1).pop()||null,m.was_processed=!0),m}processChunk(i,r,s){r=r||{};let c=this.processChunkJson(i,r,s),d=r.use_classes;if(c.decorations=c.decorations.filter(g=>{if(g==="reverse"){c.fg||(c.fg=e[0][7][d?"class":"color"]),c.bg||(c.bg=e[0][0][d?"class":"color"]);let w=c.fg;c.fg=c.bg,c.bg=w;let x=c.fg_truecolor;return c.fg_truecolor=c.bg_truecolor,c.bg_truecolor=x,c.isInverted=!0,!1}return!0}),r.json)return c;if(c.isEmpty())return"";if(!c.was_processed)return c.content;let m=[],f=[],y=[],h={},F=g=>{let w=[],x;for(x in g)g.hasOwnProperty(x)&&w.push("data-"+x+'="'+this.escapeForHtml(g[x])+'"');return w.length>0?" "+w.join(" "):""};return c.isInverted&&(h["ansi-is-inverted"]="true"),c.fg&&(d?(m.push(c.fg+"-fg"),c.fg_truecolor!==null&&(h["ansi-truecolor-fg"]=c.fg_truecolor,c.fg_truecolor=null)):m.push("color:rgb("+c.fg+")")),c.bg&&(d?(m.push(c.bg+"-bg"),c.bg_truecolor!==null&&(h["ansi-truecolor-bg"]=c.bg_truecolor,c.bg_truecolor=null)):m.push("background-color:rgb("+c.bg+")")),c.decorations.forEach(g=>{if(d){f.push("ansi-"+g);return}g==="bold"?f.push("font-weight:bold"):g==="dim"?f.push("opacity:0.5"):g==="italic"?f.push("font-style:italic"):g==="hidden"?f.push("visibility:hidden"):g==="strikethrough"?y.push("line-through"):y.push(g)}),y.length&&f.push("text-decoration:"+y.join(" ")),d?'<span class="'+m.concat(f).join(" ")+'"'+F(h)+">"+c.content+"</span>":'<span style="'+m.concat(f).join(";")+'"'+F(h)+">"+c.content+"</span>"}removeDecoration(i){const r=this.decorations.indexOf(i);r>=0&&this.decorations.splice(r,1)}}return ut=n,ut}var ze={exports:{}},xn;function tc(){if(xn)return ze.exports;xn=1;function e(i){if(!i)return"";if(!/\r/.test(i))return i;for(i=i.replace(/\r+\n/gm,`
28
+ `)},consumeEscapeIntoNewline(){const t=e.current;t&&ds(t)},clearThroughUndoStack(){const t=e.current;t&&ps(t)},isComposing(){return!1}}}const fs=200,ln=24,gs=200;function xs(e,t){u.useLayoutEffect(()=>{const n=e.current;if(!n)return;const a=()=>{n.style.transition="",n.style.height=""};if(t!==""){n.style.transition="",n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,fs)}px`;return}const i=n.offsetHeight;if(i<=ln){a();return}n.style.height=`${i}px`,n.style.transition=`height ${gs}ms ease`;const r=requestAnimationFrame(()=>{n.style.height=`${ln}px`});return n.addEventListener("transitionend",a,{once:!0}),()=>{cancelAnimationFrame(r),n.removeEventListener("transitionend",a),a()}},[e,t])}const cn=u.forwardRef(function({value:t,onChange:n,onCursorChange:a,onKeyDown:i,onFocus:r,onBlur:s,placeholder:c,placeholderOverlay:d,isPaletteOpen:m,paletteListboxId:f,activeDescendantId:y,onSurfaceChange:h},F){const g=u.useRef(null),w=Mn(),x=u.useRef(null);u.useEffect(()=>{x.current??(x.current=ms(g)),h(x.current)},[h]),u.useImperativeHandle(F,()=>({focus:()=>{var l;return(l=g.current)==null?void 0:l.focus()},focusUnlessTouch:()=>{var l;w||(l=g.current)==null||l.focus()},focusAt:l=>{const k=g.current;k&&(k.focus(),k.setSelectionRange(l,l))}})),xs(g,t);const b=u.useCallback(l=>{n(l.target.value),a==null||a(l.target.selectionStart)},[n,a]),v=u.useCallback(()=>{g.current&&(a==null||a(g.current.selectionStart))},[a]),p=t.trim().length>0;return o.jsxs("div",{className:"relative min-h-[24px] flex-1",children:[!p&&d,o.jsx("textarea",{ref:g,value:t,onChange:b,onKeyDown:i,onFocus:r,onBlur:s,onSelect:v,role:"combobox","aria-autocomplete":"list","aria-controls":m?f:void 0,"aria-expanded":m??!1,"aria-activedescendant":m?y:void 0,"aria-label":c,placeholder:d?"":c,className:"block max-h-[200px] min-h-[24px] w-full resize-none bg-transparent py-0.5 text-sm focus:outline-none",rows:1})]})});function hs({onSteer:e,onStage:t}){return!e&&!t?null:o.jsxs($n,{children:[o.jsx(Pn,{asChild:!0,children:o.jsx("button",{type:"button",className:"focus-ring bg-muted text-muted-foreground hover:bg-muted/80 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"More ways to send",children:o.jsx(mi,{className:"size-(--size-icon-sm)"})})}),o.jsxs(qn,{align:"end",children:[e&&o.jsx(gt,{icon:wr,description:"Send it into the task now",onSelect:e,children:"Steer"}),t&&o.jsx(gt,{icon:fi,description:"Use it next, without interrupting",onSelect:t,children:"Add context"})]})]})}const Ke={send:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Send message"},stop:{className:"bg-dui-destructive-fill text-destructive-foreground hover:bg-dui-destructive-fill-hover",label:"Stop generating"},queue:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Queue message"},update:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Save edit"},cancel:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Cancel edit"},"cancel-upload":{className:"bg-muted text-muted-foreground hover:bg-dui-destructive-fill-hover hover:text-destructive-foreground",label:"Cancel upload"},dispatching:{className:"bg-muted text-muted-foreground",label:"Running command"},stopping:{className:"bg-muted text-muted-foreground",label:"Stopping…"}},vs={send:pr,stop:Jn,queue:xi,update:Sn,cancel:Ct,"cancel-upload":Ce,dispatching:Ce,stopping:Ce};function bs(e,t,n,a,i,r){return i?"dispatching":a?e?"update":"cancel":r?"stopping":t&&e?"queue":t?"stop":n?"cancel-upload":e?"send":null}function ys(e,t){switch(e){case"send":return t.onSubmit;case"stop":return t.onStop;case"queue":return t.onQueue;case"update":return t.onSaveEdit;case"cancel":return t.onCancelEdit;case"cancel-upload":return t.onCancelUpload;default:return}}function ks({hasText:e,isStreaming:t,commandPending:n=!1,submitDisabled:a=!1,editingQueueItem:i,queueDepth:r,isTouchOnly:s,onSubmit:c,onStop:d,onQueue:m,onSaveEdit:f,onCancelEdit:y,onCancelUpload:h,onSteer:F,onStage:g,stopPending:w=!1}){const x=bs(e,t,h!==void 0,i,n,w),b=x==="send"&&a,v=b||x===null?void 0:ys(x,{onSubmit:c,onStop:d,onQueue:m,onSaveEdit:f,onCancelEdit:y,onCancelUpload:h}),p=x===null?null:x==="send"&&s?gi:vs[x],l=x==="dispatching"||x==="stopping";return o.jsxs(o.Fragment,{children:[o.jsx(be,{children:t&&e&&!w&&o.jsx(W.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},whileHover:{scale:1.05},whileTap:{scale:.97},onClick:d,type:"button",className:"bg-dui-destructive-fill text-destructive-foreground hover:bg-dui-destructive-fill-hover shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"Stop generating",children:o.jsx(Jn,{className:"size-(--size-icon-sm)"})})}),x==="queue"&&o.jsx(hs,{onSteer:F,onStage:g}),o.jsxs("div",{className:"relative shrink-0",children:[x==="cancel-upload"&&o.jsx("span",{role:"status",className:"sr-only",children:"Uploading attachment"}),l&&x?o.jsxs("div",{role:"status",className:B("rounded-lg p-1.5 max-md:p-2",Ke[x].className),children:[o.jsx(Ce,{}),o.jsx("span",{className:"sr-only",children:Ke[x].label})]}):x&&p?o.jsx(W.button,{animate:{opacity:b?.5:1,scale:1},initial:!1,transition:{duration:.15},whileHover:b?void 0:{scale:1.05},whileTap:b?void 0:{scale:.97},onClick:v,disabled:b,type:"button",className:B("focus-ring rounded-lg p-1.5 transition-colors max-md:p-2",Ke[x].className,b&&"pointer-events-none"),"aria-label":Ke[x].label,children:o.jsx(p,{className:"size-(--size-icon-sm)"})}):o.jsx("div",{"aria-hidden":"true","data-testid":"action-slot-spacer",className:"p-1.5 max-md:p-2",children:o.jsx("div",{className:"size-(--size-icon-sm)"})}),r>0&&x==="queue"&&o.jsx("span",{className:"bg-foreground text-background text-3xs absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full font-medium",children:r})]})]})}const ws=u.lazy(()=>Hn(()=>import("./LexicalField-CKc8eUK3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]))),Ds=u.forwardRef(function({value:t,onChange:n,onSubmit:a,isStreaming:i,isUploading:r=!1,onCancelUpload:s,commandPending:c=!1,editingQueueItem:d=!1,editingPosition:m,queueDepth:f=0,onStop:y,stopPending:h=!1,onQueue:F,onSteer:g,onStage:w,onSaveEdit:x,onCancelEdit:b,onEscape:v,onClear:p,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,onArrowUp:A,onArrowDown:T,onCommandSelect:j,activeDescendantId:E,paletteListboxId:C,onCursorChange:L,onAttach:I,placeholder:S="Send a message…",placeholderOverlay:z,onQueueNavigateUp:$,onQueueNavigateDown:X,contextKey:U,onClearArmedChange:N,queueHasItems:oe=!1,canSubmit:Y=!0,canSubmitReason:G,canSubmitAction:Q,richText:se=!1,mentionSubjects:ee},_e){const K=u.useRef(null),me=u.useRef(null),[fe,ie]=u.useState(!1),[ge,re]=u.useState(!1),[le,je]=u.useState(us),xe=Mn();u.useImperativeHandle(_e,()=>({focus:()=>{var D;return(D=K.current)==null?void 0:D.focus()},focusUnlessTouch:()=>{var D;return(D=K.current)==null?void 0:D.focusUnlessTouch()},focusAt:D=>{var R;return(R=K.current)==null?void 0:R.focusAt(D)}}));const O=u.useRef(xe);u.useEffect(()=>{var D;O.current||hi()||(D=K.current)==null||D.focus()},[]);const Z=u.useCallback(()=>{var D;(D=K.current)==null||D.focusAt(t.length),y==null||y()},[y,t.length]),{handleKeyDown:te,clearArmed:ne}=cs({surface:le,value:t,isStreaming:i,isTouchOnly:xe,isUploading:r,onCancelUpload:s,commandPending:c,canSubmit:Y,editingQueueItem:d,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,queueHasItems:oe,onSubmit:a,onStop:y,onEscape:v,onClear:p,onArrowUp:A,onArrowDown:T,onCommandSelect:j,onQueue:F,onSteer:g,onStage:w,onSaveEdit:x,onCancelEdit:b,onQueueNavigateUp:$,onQueueNavigateDown:X,contextKey:U}),Ee=u.useCallback(()=>ie(!0),[]),Fe=u.useCallback(()=>{ie(!1),re(!1),l&&(v==null||v())},[l,v]),Re={ref:K,value:t,onChange:n,onCursorChange:L,onKeyDown:te,onFocus:Ee,onBlur:Fe,placeholder:S,placeholderOverlay:z,isPaletteOpen:l,paletteHasResults:k,paletteListboxId:C,activeDescendantId:E,onSurfaceChange:je,mentionSubjects:ee},he=t.trim().length>0,Pe=p!==void 0&&he;return u.useEffect(()=>{N==null||N(ne&&Pe)},[ne,Pe,N]),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[!Y&&G&&o.jsx("div",{role:Q?void 0:"status",className:B("text-muted-foreground px-1 text-xs",Q&&"flex items-baseline gap-1.5"),children:Q?o.jsxs(o.Fragment,{children:[o.jsx("span",{role:"status",children:G}),o.jsx("button",{type:"button",onClick:Q.onClick,className:"focus-ring text-foreground/80 hover:text-foreground rounded-sm underline underline-offset-4",children:Q.label})]}):G}),d&&o.jsx("div",{className:"text-muted-foreground px-0.5 text-xs",children:m!==void 0&&f>0?`Editing message ${m} of ${f}`:"Editing message"}),o.jsxs("div",{onKeyUp:D=>D.key==="Tab"&&re(!0),className:B("border-input bg-background flex items-end gap-1.5 rounded-md border p-1.5 shadow-xs transition-[color,box-shadow]",fe&&(ge?"border-ring ring-ring ring-[1px]":"border-foreground/20"),d&&"border-primary/40",!I&&"pl-3"),children:[I&&o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:me,type:"file",className:"hidden",multiple:!0,onChange:D=>{const R=Array.from(D.target.files??[]);R.length>0&&I(R),D.target.value=""}}),o.jsx("button",{type:"button",onClick:()=>{var D;return(D=me.current)==null?void 0:D.click()},className:"focus-ring text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center rounded-md px-1.5 py-1 transition-colors disabled:opacity-50","aria-label":"Attach file",children:o.jsx(gr,{className:"size-4"})})]}),se?o.jsx(u.Suspense,{fallback:o.jsx(cn,{...Re}),children:o.jsx(ws,{...Re})}):o.jsx(cn,{...Re}),p&&o.jsx(W.button,{animate:{opacity:he?.5:0,scale:he?1:.8},transition:{duration:.15},whileHover:he?{opacity:1}:void 0,onClick:p,disabled:!he,type:"button",className:B("focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!he&&"pointer-events-none"),"aria-label":"Clear message",children:o.jsx(Ct,{className:"size-(--size-icon-sm)"})}),o.jsx(ks,{hasText:he,isStreaming:i,onCancelUpload:r?s:void 0,commandPending:c,submitDisabled:!Y,editingQueueItem:d,queueDepth:f,isTouchOnly:xe,onSubmit:a,onStop:Z,stopPending:h,onQueue:F,onSteer:g,onStage:w,onSaveEdit:x,onCancelEdit:b})]})]})});function _s({children:e,className:t}){return o.jsx("div",{className:B("absolute right-0 bottom-full left-0 mb-2",t),children:e})}function un(e){return e.type.startsWith("image/")}const dn="This file didn’t upload";function js({files:e,onRemove:t,onRetry:n,onCancel:a}){const i=e.filter(s=>un(s.file)).map(s=>s.id).join(" "),r=u.useMemo(()=>{const s=new Map;for(const c of e)un(c.file)&&s.set(c.id,URL.createObjectURL(c.file));return s},[i]);return u.useEffect(()=>()=>{for(const s of r.values())URL.revokeObjectURL(s)},[r]),o.jsx("div",{className:"flex flex-wrap gap-1.5 px-1 pb-1.5",children:o.jsx(be,{children:e.map(s=>{const c=r.get(s.id),d=s.status==="error",m=s.status==="uploading"&&a!==void 0;return o.jsxs(W.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},className:B("flex items-center gap-1 rounded-md px-2 py-1 text-xs",d?"bg-destructive/10 border-destructive/40 border":"bg-muted"),children:[s.status==="uploading"?o.jsx(Ce,{size:"xs",className:"text-muted-foreground"}):d?o.jsx(vi,{className:"text-destructive size-(--size-icon-xs) shrink-0"}):c?o.jsx("img",{src:c,alt:"",className:"size-5 shrink-0 rounded object-cover"}):o.jsx(Rt,{className:"text-muted-foreground size-(--size-icon-xs)"}),o.jsx("span",{className:"max-w-32 truncate",children:s.file.name}),s.status==="uploading"&&o.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[s.progress,"%"]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-destructive max-w-44 truncate",title:s.error??dn,children:s.error??dn}),n&&o.jsx("button",{type:"button",onClick:()=>n(s.id),className:"text-foreground ml-0.5 shrink-0 rounded-sm font-medium underline decoration-dotted underline-offset-2","aria-label":`Try uploading ${s.file.name} again`,children:"Try again"})]}),o.jsx("button",{type:"button",onClick:m?a:()=>t(s.id),className:"text-muted-foreground hover:text-foreground -mr-0.5 ml-0.5 shrink-0 rounded-sm p-0.5","aria-label":m?`Cancel upload of ${s.file.name}`:`Remove ${s.file.name}`,children:o.jsx(Ct,{className:"size-3"})})]},s.id)})})})}function Es(){const e=Je();return o.jsx(W.div,{initial:e?!1:{opacity:0,y:3},animate:{opacity:1,y:0},transition:{duration:.12,ease:"easeOut"},"aria-hidden":"true","data-testid":"clear-armed-hint",className:"bg-popover text-muted-foreground shadow-soft pointer-events-none mt-1.5 ml-auto w-fit rounded-md border px-2 py-1 text-xs",children:"Press Esc again to clear"})}const Se={Root:as,Input:Ds,OverlayLane:_s,Attachments:js,ClearArmedHint:Es};function Fs({value:e,onChange:t,onSubmit:n,inputRef:a,head:i,mentionPicker:r,overlays:s,queue:c,aboveInput:d,asks:m,footer:f,children:y,className:h,onPathDropped:F,input:g}){const{capabilities:w,target:x}=Be();if(x===null)throw new Error("<Conversation.Composer> needs a target. A host that draws a composer has to say where its words go — pass `target` to <Conversation.Root>.");const[b,v]=u.useState(!1),p=w.attachments?x.attachments:null,l=(p==null?void 0:p.staged)??[],k=(p==null?void 0:p.hasFailed)===!0,_=x.canSend&&!k&&(g.canSubmit??!0),A=k?void 0:x.canSend?g.canSubmitReason:x.canSendReason,T=o.jsxs(o.Fragment,{children:[o.jsxs(Se.OverlayLane,{children:[w.mentions&&r,s,b&&o.jsx(Se.ClearArmedHint,{})]}),p!==null&&l.length>0&&o.jsx(Se.Attachments,{files:[...l],onRemove:p.remove,onRetry:p.retry,onCancel:p.cancel}),x.queue!==void 0&&c,d,o.jsx(Se.Input,{...g,ref:a,value:e,onChange:t,onSubmit:n,placeholder:g.placeholder??x.placeholder,canSubmit:_,...A===void 0?{}:{canSubmitReason:A},...A===g.canSubmitReason&&g.canSubmitAction?{canSubmitAction:g.canSubmitAction}:{},...p===null?{}:{onAttach:p.add,...p.holdsSendWhileUploading?{isUploading:p.isUploading,onCancelUpload:p.cancel}:{}},onClearArmedChange:v}),f]});return o.jsxs(Se.Root,{className:h,...p===null?{}:{onFilesDropped:p.add},...F===void 0?{}:{onPathDropped:F},children:[i,m===void 0?T:o.jsx(be,{mode:"wait",children:m!==null?o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:m},"interactive"):o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:T},"normal")}),y]})}function Cs({asChild:e,children:t,className:n}){const a=e===!0?At:"div";return o.jsx(a,{"data-slot":"conversation-footer",className:B(n),children:t})}function As({surface:e,capabilities:t,target:n,density:a="comfortable",anchor:i="corner",children:r}){const s=u.useMemo(()=>({surface:e,capabilities:t,target:n??null,density:a,anchor:i}),[e,t,n,a,i]);return o.jsx(Qn.Provider,{value:s,children:r})}const pn=1e3;function Ns(e,t=Date.now){const n=Date.parse(e)+ea,[a,i]=u.useState(()=>t());return u.useEffect(()=>{const r=()=>i(t());let s,c;const d=n-t();return d>0?c=setTimeout(()=>{i(Math.max(t(),n)),s=setInterval(r,pn)},d):s=setInterval(r,pn),()=>{clearTimeout(c),clearInterval(s)}},[n,t]),Yr(e,a)}function ba(e){return e?"This room is gone, or you no longer have access to it.":"New messages aren’t arriving. You can still send; anything unsent will say so."}function Rs(e){return e?"This room is no longer available":"Reconnecting. You can still send"}function Ts(e,t){switch(e.kind){case"ask":return"";case"stalled":return ba(t);case"presence":case"held":return e.sentence;case"silent-finish":return e.sentence;case"turn-waiting":return e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer";case"turn-progress":case"turn-system":return e.message;case"turn-streaming":return"Working";case"turn-complete":return"";case"empty":return""}}function mn(e){switch(e.kind){case"ask":return`ask:${e.ask.interaction.id}`;case"presence":return`presence:${e.sentence}`;case"held":return`held:${e.sentence}`;case"silent-finish":return`silent-finish:${e.sentence}`;case"turn-waiting":return`turn-waiting:${e.waitingType}`;case"turn-progress":case"turn-system":return`${e.kind}:${e.message}`;case"turn-streaming":return`turn-streaming:${e.verbKey}`;default:return e.kind}}const Ss={room:"room-presence",thread:"thread-presence",session:"session-presence"},zs={room:"room-held",thread:"thread-held",session:"session-held"};function Is({state:e,onRetry:t,unavailable:n=!1,faces:a,reducedMotion:i=!1,scope:r="room"}){switch(e.kind){case"ask":return o.jsx(Os,{state:e,reducedMotion:i});case"stalled":return o.jsx(Ls,{onRetry:t,unavailable:n});case"presence":return o.jsx(Bs,{state:e,faces:a,reducedMotion:i,scope:r});case"held":return o.jsx(Ms,{state:e,faces:a,scope:r});case"silent-finish":return o.jsx($s,{state:e});case"turn-waiting":return o.jsx(Ps,{state:e});case"turn-progress":return o.jsx(qs,{state:e,reducedMotion:i});case"turn-system":return o.jsx(Hs,{state:e});case"turn-streaming":return o.jsx(Ks,{state:e,reducedMotion:i});case"turn-complete":return o.jsx(Vs,{state:e});case"empty":return null}}function Os({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-ask",className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"needs-you",reducedMotion:t}),o.jsx("span",{className:"text-foreground truncate",children:e.headline}),e.count>1&&o.jsxs("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 tabular-nums",children:["+",e.count-1]}),o.jsx("span",{className:"text-status-warning-fg shrink-0 font-medium",children:"Answer"})]})}function Ls({onRetry:e,unavailable:t}){const n=ba(t);return o.jsxs("span",{"data-testid":"room-stalled","data-unavailable":t?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"error",reducedMotion:!0}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground truncate sm:hidden",children:Rs(t)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground hidden truncate sm:inline",title:n,children:n}),e!==void 0&&o.jsx("button",{type:"button",onClick:e,className:"focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded underline underline-offset-2",children:t?"Try again":"Reconnect"})]})}function Bs({state:e,faces:t,reducedMotion:n,scope:a}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"working",reducedMotion:n}),t,o.jsxs("span",{"data-testid":Ss[a],"data-late":e.late?"true":void 0,className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.line}),o.jsx(ya,{since:e.since})]})]})}function Ms({state:e,faces:t,scope:n}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Me,{signal:"working",reducedMotion:!0}),t,o.jsxs("span",{"data-testid":zs[n],className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.sentence}),o.jsx(ya,{since:e.since})]})]})}function $s({state:e}){return o.jsx("span",{"data-testid":"lane-silent-finish",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:o.jsx("span",{className:"truncate",children:e.sentence})})}function Ps({state:e}){const t=e.waitingType==="approval"?yi:ki;return o.jsxs("span",{"data-testid":"lane-waiting",className:"flex min-w-0 items-center gap-2",children:[o.jsx(t,{"aria-hidden":"true",className:"text-status-warning-fg size-3 shrink-0"}),o.jsx("span",{className:"text-status-warning-fg truncate",children:e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer"}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed})]})}function qs({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-progress","data-determinate":e.determinate,className:"flex min-w-0 flex-1 items-center gap-2",children:[o.jsx("span",{className:"text-muted-foreground truncate",children:e.message}),o.jsx("span",{"aria-hidden":"true",className:"bg-muted/60 relative h-0.5 w-16 shrink-0 overflow-hidden rounded-full",children:e.determinate?o.jsx(W.span,{className:"bg-muted-foreground/50 absolute inset-y-0 left-0 block rounded-full",initial:!1,animate:{width:`${e.percent??0}%`},transition:t?{duration:0}:{duration:.3,ease:"easeOut"}}):o.jsx(W.span,{className:"bg-muted-foreground/50 absolute inset-y-0 block w-1/3 rounded-full",animate:t?void 0:{x:["-100%","400%"]},transition:{duration:1.4,ease:"easeInOut",repeat:1/0}})})]})}function Hs({state:e}){return o.jsxs("span",{"data-testid":"lane-system",className:"flex min-w-0 items-center gap-2",children:[o.jsx(bi,{"aria-hidden":"true",className:"text-muted-foreground/60 size-3 shrink-0"}),o.jsx("span",{className:"text-muted-foreground/70 truncate",children:e.message})]})}function Ks({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-streaming","data-bypass":e.isBypass?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[e.isBypass?o.jsx("span",{"aria-hidden":"true",className:"text-status-warning-fg shrink-0 font-bold",children:"☠"}):o.jsx(Me,{signal:"working",reducedMotion:t}),o.jsx("span",{"aria-hidden":"true",className:B("truncate",e.isBypass?"text-status-warning-fg":"text-muted-foreground"),children:e.verb}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/60 shrink-0",children:e.tokens})]})}function Vs({state:e}){return o.jsxs("span",{"data-testid":"lane-complete",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:[o.jsx("span",{className:"truncate",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",children:"·"}),o.jsx("span",{className:"shrink-0",children:e.tokens})]})}function Me({signal:e,reducedMotion:t}){return o.jsx("span",{"aria-hidden":"true","data-lane-dot":e,className:B("size-1.5 shrink-0 rounded-full",Di[e],e==="working"&&!t&&wi)})}function ya({since:e}){const t=Ns(e);return t===null?null:o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:` · ${t}`})}const Ws=.16,Gs={room:"room-presence-announcer",thread:"thread-presence-announcer",session:"session-lane-announcer"};function Us({state:e,scope:t="room",onRetry:n,unavailable:a=!1,faces:i,peek:r,onPeekOpenChange:s,peekLabel:c="Show who is working",heldPeekLabel:d="Show what is waiting",askCard:m,reducedMotionOverride:f}){const[y,h]=u.useState(!1),F=u.useRef(null),g=Je()===!0,w=f??g,x=Ts(e,a),b=e.kind==="empty",v=(e.kind==="presence"||e.kind==="held")&&r!==void 0,p=e.kind==="ask"&&m!==void 0,l=v||p,k=p?m:r,_=p?"Answer this":e.kind==="held"?d:c;y&&!l&&h(!1);const A=y&&l,T=u.useRef(!1);u.useEffect(()=>{var L,I;if(T.current===A)return;const C=!A&&(((L=F.current)==null?void 0:L.contains(document.activeElement))===!0||document.activeElement===document.body);T.current=A,s==null||s(A),C&&((I=F.current)==null||I.focus())},[A,s]);const j=o.jsx(Is,{state:e,onRetry:n,unavailable:a,faces:i,reducedMotion:w,scope:t}),E=l?o.jsxs(_i,{open:A,onOpenChange:h,children:[o.jsx(ji,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":_,className:B("focus-ring flex min-w-0 items-center rounded text-left","hover:bg-accent/40 focus-visible:bg-accent/40"),children:j})}),o.jsxs(Ei,{side:"top",align:"start",onOpenAutoFocus:p?void 0:C=>C.preventDefault(),className:"w-88 p-0",children:[o.jsx(Fi,{children:_}),k]})]}):j;return o.jsxs("div",{ref:F,"data-slot":"live-lane","data-lane-scope":t,tabIndex:-1,"data-lane-state":e.kind,"data-lane-motion":w?"off":"on",className:"flex h-6 shrink-0 items-center gap-2 overflow-hidden px-3 text-xs",children:[o.jsx("span",{"data-testid":Gs[t],role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:x}),w?o.jsx("div",{"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:E},mn(e)):o.jsx(be,{mode:"wait",initial:!1,children:o.jsx(W.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:Ws},"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:E},mn(e))})]})}const Zs=1e3,Js={working:"working",working_late:"still working",held:"waiting to start"};function Ys({rows:e,onScrollToRow:t,onOpenSession:n,onOpenRoom:a,onAnswerFirst:i,promoted:r,onStopAll:s,stopping:c=!1,onStopAgent:d,stoppingAgents:m}){const f=d!==void 0,y=e.length>1&&s!==void 0,h=u.useRef(new Map),F=u.useRef(null),g=u.useRef(e);return u.useEffect(()=>{var p;const w=g.current;g.current=e;const x=F.current;if(x===null||e.some(l=>l.authorId===x)||(F.current=null,document.activeElement!==document.body))return;const b=w.findIndex(l=>l.authorId===x),v=e[Math.min(Math.max(b,0),e.length-1)];v!==void 0&&((p=h.current.get(v.authorId))==null||p.focus())},[e]),o.jsxs("div",{"data-slot":"live-peek","data-testid":"live-peek",className:"flex flex-col",children:[o.jsx("ul",{className:"divide-border divide-y",children:e.map(w=>o.jsxs("li",{"data-testid":"live-peek-row",className:"flex gap-2.5 px-3 py-2.5",children:[o.jsx(ta,{author:w.author,className:"mt-0.5 shrink-0"}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[o.jsxs("p",{className:"flex min-w-0 items-center gap-1.5 text-xs",children:[o.jsx("span",{className:"text-foreground truncate font-medium",children:w.author.displayName}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx("span",{className:"text-muted-foreground shrink-0",children:Js[w.state]}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx(Xs,{since:w.since})]}),w.doing!==null&&o.jsx("p",{"data-testid":"live-peek-doing",className:"text-muted-foreground truncate text-xs",children:w.doing}),w.replyingTo!==null&&t!==void 0&&o.jsx("button",{type:"button","data-testid":"live-peek-replying-to",onClick:()=>t(w.replyingTo.rowId),className:"focus-ring text-muted-foreground hover:text-foreground truncate rounded text-left text-xs underline underline-offset-2",children:`Replying to “${w.replyingTo.excerpt}”`}),o.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[w.state!=="held"&&w.sessionId!==null&&n!==void 0&&o.jsxs(pe,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-session",onClick:()=>n(w.sessionId),className:"h-7 gap-1 px-2 text-xs",children:["Open its chat",o.jsx(Mt,{"aria-hidden":"true",className:"size-3"})]}),w.state==="held"&&w.behind!=null&&w.behind.title!==null&&a!==void 0&&o.jsxs(pe,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-room",onClick:()=>a(w.behind.roomId),className:"h-7 gap-1 px-2 text-xs",children:["Open where it’s working",o.jsx(Mt,{"aria-hidden":"true",className:"size-3"})]}),w.state==="held"&&w.othersWaiting===!0&&i!==void 0&&((r==null?void 0:r.has(w.authorId))===!0?o.jsx("span",{"data-testid":"live-peek-next-up",className:"text-muted-foreground text-xs",children:"Next up here"}):o.jsx(pe,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-answer-first",onClick:()=>i(w.authorId),className:"h-7 px-2 text-xs",children:"Answer here first"})),f&&o.jsx(pe,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop",disabled:(m==null?void 0:m.has(w.authorId))===!0,onClick:()=>d(w.authorId),onFocus:()=>F.current=w.authorId,ref:x=>{x===null?h.current.delete(w.authorId):h.current.set(w.authorId,x)},"aria-label":`Stop ${w.author.displayName}`,className:"h-7 px-2 text-xs",children:"Stop"})]})]})]},w.authorId))}),y&&o.jsx("div",{className:"border-border border-t p-2",children:o.jsxs(pe,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop-all",disabled:c,onClick:s,className:"h-auto w-full flex-col items-start gap-0.5 px-2 py-1.5 text-xs",children:[o.jsx("span",{children:"Stop everything in this room"}),o.jsx("span",{className:"text-muted-foreground font-normal",children:`Stops all ${e.length}`})]})})]})}function Xs({since:e}){const[t,n]=u.useState(()=>Date.now());return u.useEffect(()=>{const a=setInterval(()=>n(Date.now()),Zs);return()=>clearInterval(a)},[e]),o.jsx("span",{className:"text-muted-foreground shrink-0 tabular-nums",children:In(Math.max(0,t-Date.parse(e)))})}function Qs(e,t,n){const a=u.useRef(null),i=u.useCallback((r,s)=>{const c=Number(s.getAttribute("aria-posinset")),d=r==="next"?c+1:c-1;if(!Number.isFinite(d)||d<1)return;let m=0;const f=e.findIndex(y=>y.kind==="message"&&++m===d);f!==-1&&(a.current=d,t.scrollToIndex(f,{align:r==="next"?"end":"start"}))},[e,t]);return u.useEffect(()=>{var c;const r=a.current;if(r===null)return;const s=(c=n.current)==null?void 0:c.querySelector(`[${Tt}][aria-posinset="${r}"]`);s!=null&&(a.current=null,s.focus())}),i}function el(e){const{conversationId:t,rows:n,virtualizer:a,landOn:i,landingReady:r,landingKey:s,resumeRow:c,landOnRow:d,onTopRow:m}=e,[f,y]=u.useState(!1);u.useLayoutEffect(()=>{y(!0)},[]);const h=u.useRef(null),F=u.useRef(null),g=u.useRef(!1),[w,x]=u.useState(!1),[b,v]=u.useState(null),[p,l]=u.useState(null),k=u.useRef(null);u.useLayoutEffect(()=>{if(!f||!r||n.length===0)return;const T=d==null?void 0:d(),j=s===void 0?t:`${t}:${s}`,E=h.current!==j;if(!E&&T===void 0)return;h.current=j;const C=E&&F.current===t;if(F.current=t,E&&!C&&(k.current=null,g.current=!1),x(!0),T!==void 0){const S=n.findIndex(z=>z.id===T);if(S!==-1){v("requested"),l(T),a.scrollToIndex(S,{align:"center"});return}}if(!E)return;if(l(null),C&&g.current){v("kept");const S=k.current;if(S===void 0)a.scrollToEnd();else{const z=n.findIndex($=>$.id===S);z!==-1&&a.scrollToIndex(z,{align:"start"})}return}const L=c==null?void 0:c();if(L!==void 0){const S=n.findIndex(z=>z.id===L);if(S!==-1){v("remembered"),a.scrollToIndex(S,{align:"start"});return}}const I=i==="unread"?n.findIndex(S=>S.kind==="unread-divider"):-1;if(I===-1){v(L===void 0?"end":"end-row-gone"),a.scrollToEnd();return}v("unread"),a.scrollToIndex(Math.max(0,I-1),{align:"start"})},[f,r,s,t,n,a,i,c,d]);const _=u.useCallback((T,j)=>{var S;const E=(T==null?void 0:T.scrollTop)??0,C=a.getVirtualItems().find(z=>z.end>E),L=C===void 0||(S=n[C.index])==null?void 0:S.id,I=j?void 0:L;I!==k.current&&(k.current=I,m==null||m(I))},[a,n,m]),A=u.useCallback(()=>{g.current=!0},[]);return{landed:w,landedOn:b,landedRow:p,reportTopRow:_,noteReaderScrolled:A}}function tl(e,t,n){const a=u.useCallback(r=>{var s;return((s=e[r])==null?void 0:s.id)??r},[e]);return xr({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>80,overscan:5,getItemKey:a,measureElement:(r,s,c)=>{var h;const d=(h=s==null?void 0:s.borderBoxSize)==null?void 0:h[0],m=d?Math.round(d.blockSize):r.getBoundingClientRect().height;if(m>0)return m;const f=c.indexFromElement(r),y=c.options.getItemKey(f);return c.itemSizeCache.get(y)??c.options.estimateSize(f)},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:64,onChange:r=>{r.isScrolling||n==null||n()}})}const nl=64;function al(e){const{conversationId:t,rowCount:n}=e,a=u.useRef(null),i=u.useRef(!0),[r,s]=u.useState(!0),[c,d]=u.useState(!1),m=u.useRef(t),f=u.useCallback(()=>{const g=a.current;if(!g)return;const w=g.scrollHeight-g.scrollTop-g.clientHeight<=nl;i.current=w,s(x=>x===w?x:w),w&&d(!1)},[]),y=u.useCallback(g=>{a.current=g},[]);u.useEffect(()=>{if(m.current===t)return;m.current=t,i.current=!0,s(!0),d(!1);const g=a.current;g&&(g.scrollTop=g.scrollHeight)},[t]);const h=u.useRef(n);u.useEffect(()=>{const g=h.current;h.current=n,n>g&&!i.current&&d(!0)},[n]);const F=u.useCallback(g=>{const w=a.current;w&&w.scrollTo({top:w.scrollHeight,behavior:(g==null?void 0:g.behavior)??"auto"}),i.current=!0,s(!0),d(!1)},[]);return{scrollRef:y,onScroll:f,isAtBottom:r,hasNewRows:c,atBottomRef:i,scrollToBottom:F}}const il=800,fn=24;function rl({scrollRef:e}){const t=u.useRef(null),n=u.useRef(null),a=u.useRef(null),[i,r]=u.useState(!1),s=u.useRef(!1),c=u.useRef(!1),d=u.useRef(0),m=u.useRef(0),f=u.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{!s.current&&!c.current&&r(!1)},il)},[]),y=u.useCallback(()=>{r(!0),f()},[f]),h=u.useCallback(()=>{c.current=!0,y()},[y]),F=u.useCallback(()=>{c.current=!1,f()},[f]),g=u.useCallback(()=>{const b=e.current,v=t.current,p=n.current;if(!b||!v||!p)return;const{scrollTop:l,scrollHeight:k,clientHeight:_}=b;if(k<=_){v.style.display="none";return}v.style.display="";const A=p.clientHeight,T=_/k,j=Math.max(T*A,fn),E=A-j,L=l/(k-_)*E;v.style.height=`${j}px`,v.style.transform=`translateY(${L}px)`},[e]);u.useEffect(()=>{const b=e.current;if(!b)return;const v=()=>{y(),g()};return b.addEventListener("scroll",v,{passive:!0}),g(),()=>b.removeEventListener("scroll",v)},[e,y,g]);const w=u.useCallback(b=>{if(b.target===t.current)return;const v=e.current,p=n.current;if(!v||!p)return;const l=p.getBoundingClientRect(),k=(b.clientY-l.top)/l.height;v.scrollTop=k*(v.scrollHeight-v.clientHeight)},[e]),x=u.useCallback(b=>{var l;b.preventDefault(),b.stopPropagation(),s.current=!0,d.current=b.clientY,m.current=((l=e.current)==null?void 0:l.scrollTop)??0;const v=k=>{const _=e.current,A=n.current;if(!_||!A)return;const T=k.clientY-d.current,j=A.clientHeight,E=_.clientHeight/_.scrollHeight,C=Math.max(E*j,fn),L=j-C,I=_.scrollHeight-_.clientHeight,S=T/L*I;_.scrollTop=m.current+S},p=()=>{s.current=!1,document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",p),f()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",p)},[e,f]);return o.jsx("div",{ref:n,role:"presentation",onClick:w,onPointerEnter:h,onPointerLeave:F,style:{top:"var(--conversation-thumb-top, 0px)"},className:"pointer-events-auto absolute right-0 bottom-0 z-10 w-2.5",children:o.jsx("div",{ref:t,onPointerDown:x,className:"bg-border hover:bg-foreground/40 absolute right-0.5 w-1.5 cursor-pointer rounded-full transition-[opacity,background-color] duration-200",style:{opacity:i?1:0}})})}function ol({hasNewRows:e,isAtBottom:t,hasRows:n,onJump:a}){return o.jsxs(o.Fragment,{children:[o.jsx(be,{children:e&&!t&&o.jsxs(W.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:a,"data-slot":"conversation-new-messages","data-testid":"conversation-new-messages",className:"bg-foreground text-background hover:bg-foreground/90 absolute bottom-4 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full px-3 py-1.5 text-xs font-medium shadow-sm transition-colors",children:["New messages",o.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:"New messages"})]})}),o.jsx(be,{children:!t&&n&&o.jsx(W.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:a,"data-slot":"conversation-jump-to-latest","data-testid":"conversation-jump-to-latest",className:"bg-background absolute right-4 bottom-4 rounded-full border p-2 shadow-sm transition-shadow hover:shadow-md","aria-label":"Scroll to bottom",children:o.jsx(Ci,{className:"size-(--size-icon-md)"})})})]})}const sl=u.memo(function({row:t,index:n,context:a,renderRow:i}){const r=u.useMemo(()=>({...a,index:n}),[a,n]);return o.jsx(o.Fragment,{children:i(t,r)})}),ll=new Set(["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "]),cl=2200;function ul(e){return e===null?"auto":e.scrollHeight-e.scrollTop-e.clientHeight<=e.clientHeight?"smooth":"auto"}function dl({conversationId:e,label:t,rows:n,renderRow:a,onOpenThread:i,domIdOf:r,landOn:s="end",landingReady:c=!0,landingKey:d,resumeRow:m,landOnRow:f,onTopRow:y,pending:h,viewerAuthorId:F,loading:g,empty:w,transcriptAnnouncement:x,approvalAnnouncement:b,onReachedBottom:v,busy:p,className:l,"data-testid":k,feedTestId:_,ref:A}){var xe;const{capabilities:T}=Be(),j=u.useRef(null),E=h??[],C=al({conversationId:e,rowCount:n.length+E.length}),{scrollRef:L,atBottomRef:I}=C,S=u.useCallback(O=>{j.current=O,L(O)},[L]),z=u.useRef(null),$=u.useRef(!1),X=u.useCallback(()=>{var O;$.current&&((O=z.current)==null||O.call(z,j.current,I.current))},[I]),U=tl(n,j,X),{landed:N,landedOn:oe,landedRow:Y,reportTopRow:G,noteReaderScrolled:Q}=el({conversationId:e,rows:n,virtualizer:U,landOn:s,landingReady:c&&g==null,...d===void 0?{}:{landingKey:d},...m===void 0?{}:{resumeRow:m},...f===void 0?{}:{landOnRow:f},...y===void 0?{}:{onTopRow:y}});u.useLayoutEffect(()=>{z.current=G,$.current=N});const se=u.useCallback(()=>{C.onScroll(),G(j.current,I.current)},[C,G,I]),ee=U.isAtEnd();u.useEffect(()=>{N&&ee&&(v==null||v())},[N,ee,v]);const _e=Qs(n,U,j),K=u.useCallback(O=>{const Z=document.getElementById(O);return Z===null?!1:(Z.scrollIntoView({block:"center"}),Z.focus({preventScroll:!0}),!0)},[]),me=u.useRef(null),fe=u.useRef(void 0),ie=u.useCallback(()=>{var O;fe.current!==void 0&&(clearTimeout(fe.current),fe.current=void 0),(O=me.current)==null||O.removeAttribute("data-landed"),me.current=null},[]),ge=u.useRef(null);u.useEffect(()=>{if(oe!=="requested"||Y===null||ge.current===Y||r===void 0)return;const O=n.find(ne=>ne.id===Y),Z=O===void 0?void 0:r(O);if(Z===void 0)return;const te=requestAnimationFrame(()=>{if(!K(Z))return;const ne=document.getElementById(Z);ne!==null&&(ge.current=Y,ie(),ne.setAttribute("data-landed","true"),me.current=ne,fe.current=setTimeout(ie,cl))});return()=>cancelAnimationFrame(te)},[oe,Y,r,n,K,ie]),u.useEffect(()=>ie,[ie]);const re=u.useCallback(O=>{C.scrollToBottom(O),U.scrollToEnd({behavior:(O==null?void 0:O.behavior)??"auto"})},[C,U]);u.useImperativeHandle(A,()=>({scrollToRow(O){if(K(O))return!0;if(r===void 0)return!1;const Z=n.findIndex(te=>r(te)===O);return Z===-1?!1:(U.scrollToIndex(Z,{align:"center"}),requestAnimationFrame(()=>K(O)),!0)},scrollToBottom:re}),[K,r,n,U,re]);const le=u.useMemo(()=>({onOpenThread:T.threads?i:void 0}),[T.threads,i]),je=u.useMemo(()=>n.reduce((O,Z)=>O+(Z.kind==="message"?1:0),0),[n]);return g!=null?o.jsx(o.Fragment,{children:g}):w!==void 0&&n.length===0&&E.length===0?o.jsx("div",{"data-slot":"conversation-empty",className:"flex min-h-0 flex-1 items-center justify-center overflow-y-auto",children:w}):o.jsxs("div",{"data-slot":"conversation-timeline","data-testid":k,"data-landed-on":oe??void 0,"data-message-row-count":je,className:B("relative min-h-0 flex-1",l),children:[o.jsxs("div",{ref:S,onScroll:se,onWheel:Q,onTouchMove:Q,onKeyDown:O=>{ll.has(O.key)&&Q()},"data-slot":"conversation-scroller","data-testid":"conversation-scroller",className:"chat-scroll-area h-full scrollbar-none overflow-y-auto",style:{overflowAnchor:"none"},children:[o.jsx(Rr,{label:t,busy:p,"data-testid":_,onBeyondRendered:_e,children:o.jsx("div",{style:{height:U.getTotalSize(),position:"relative",width:"100%"},children:o.jsx("div",{"data-slot":"conversation-window",className:"absolute left-0 w-full",style:{top:((xe=U.getVirtualItems()[0])==null?void 0:xe.start)??0},children:U.getVirtualItems().map(O=>o.jsx("div",{"data-index":O.index,ref:U.measureElement,children:o.jsx(sl,{row:n[O.index],index:O.index,context:le,renderRow:a})},n[O.index].id))})})}),E.length>0&&F!==void 0&&o.jsx("div",{className:"flex flex-col",children:E.map(O=>o.jsx(no,{post:O,viewerAuthorId:F},O.clientId))})]}),x!==void 0&&o.jsx("div",{role:"log","aria-live":"polite","aria-atomic":"false","data-testid":"transcript-announcer",className:"sr-only",children:x}),b!==void 0&&o.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"approval-announcer",className:"sr-only",children:b}),o.jsx(rl,{scrollRef:j}),o.jsx(ol,{hasNewRows:C.hasNewRows,isAtBottom:C.isAtBottom,hasRows:n.length>0,onJump:()=>re({behavior:ul(j.current)})})]})}const pl=["react","react-more","run-with","reply","copy","mention","profile","todo"],ml={"Yes, no, and thanks":["👍 thumbsup thumbs up yes approve like agree ok good","❤️ heart love red","🎉 tada party celebrate congrats hooray confetti","👀 eyes look watching seen reading review","🚀 rocket ship launch ship-it fast deploy","🙏 pray thanks thank you please folded hands","🔥 fire lit hot flame burn","💯 hundred perfect score full agree","✅ check tick done complete yes correct","❌ cross no wrong incorrect fail","👎 thumbsdown thumbs down no disagree bad","🙌 raised hands celebrate praise hooray","👏 clap applause bravo well done","🤝 handshake deal agreed partnership","💪 muscle strong flex power","🫡 salute yes sir acknowledged on it","✨ sparkles shiny new magic nice","⭐ star favourite favorite rating","🏆 trophy win won champion award","🎯 target bullseye exactly precise nailed it"],Faces:["😀 grin smile happy","😄 smile happy laugh joy","😂 joy laugh crying laughing funny lol","🤣 rofl rolling laughing hilarious","🙂 slight smile fine ok","😊 blush smile warm happy","😉 wink joking","😍 heart-eyes love adore","🤩 star-struck amazed wow","😎 sunglasses cool smooth","🥳 party face celebrate birthday","🤔 thinking hmm consider wondering","🧐 monocle inspect examine scrutiny","😅 sweat smile nervous phew close call","😬 grimace awkward yikes","😱 scream shocked horror fear","😮 surprised open mouth wow","🤯 mind blown exploding head whoa","😴 sleeping asleep tired zzz","🥱 yawn bored tired","😐 neutral meh straight face","🙄 eye roll unimpressed whatever","😤 triumph frustrated steam determined","😢 cry sad tear upset","😭 sob crying loudly devastated","😡 angry rage mad furious","🤒 sick ill fever unwell","🤖 robot bot agent automation machine","👻 ghost boo spooky","🤡 clown silly foolish","😇 innocent halo angel","🥲 tear smile bittersweet","🫠 melting overwhelmed hot dissolving","🤷 shrug dunno who knows unsure"],"Hands and people":["👋 wave hello hi bye greeting","🤙 call me shaka hang loose","✌️ peace victory two","🤞 fingers crossed hope luck","🫰 finger heart love money","👌 ok perfect fine good","🤌 pinched fingers italian chef what","☝️ point-up one first attention","👇 point-down below beneath","👉 point-right this next","👈 point-left back previous","✋ hand stop halt raised","🖐️ open-hand five stop","🫶 heart-hands love care","🧠 brain smart thinking mind idea","👨‍💻 developer coding programmer engineer","🕺 dancing celebrate dance","🏃 running run fast hurry"],"Hearts and symbols":["🧡 orange heart love","💛 yellow heart love","💚 green heart love","💙 blue heart love","💜 purple heart love","🖤 black heart love dark","🤍 white heart love","💔 broken heart sad hurt","💖 sparkling heart love shiny","❣️ heart-exclamation love","⚡ zap lightning fast power energy","💥 boom explosion collision impact","💫 dizzy stars sparkle","⚠️ warning caution careful alert","🚨 siren alert emergency urgent incident","🛑 stop sign halt blocked","♻️ recycle reuse refresh retry","🔒 lock secure locked private","🔓 unlock open unlocked","💡 idea bulb lightbulb suggestion insight","❓ question ask unknown what","❗ exclamation important attention","➕ plus add more increase","➖ minus remove less decrease","🆗 ok-button fine approved","🆕 new fresh","🔁 repeat loop again retry","⏳ hourglass waiting time slow pending","⏰ alarm clock time deadline reminder","📈 chart-up growth increase improving","📉 chart-down decline decrease regression"],"Work and things":["💻 laptop computer code work","🖥️ desktop monitor screen","📱 phone mobile device","⌨️ keyboard typing input","🐛 bug defect issue error broken","🔧 wrench fix repair tool","🔨 hammer build fix construct","🛠️ tools build fix maintenance","⚙️ gear settings config machinery","🧪 test experiment lab trial","🧹 broom clean cleanup sweep tidy","📦 package box shipment release module","🚢 ship shipping deploy release","🗑️ trash delete remove bin","📝 memo note write document","📋 clipboard copy list checklist","📌 pin pinned important stick","📎 paperclip attach link","🔍 magnifying search find look investigate","🔗 link url chain reference","🗓️ calendar date schedule plan","⏱️ stopwatch timing performance speed","🔔 bell notify notification alert ping","🔕 bell-off mute silent quiet","📮 mail post send inbox","🧾 receipt invoice record log","🗂️ files folders organise organize","🔑 key access secret credential","🧱 brick wall block foundation","🪵 log wood timber","🧯 extinguisher hotfix incident fire put out","🩹 bandage patch fix quick","🔮 crystal ball predict future guess","🧭 compass direction navigate guide","🪄 magic wand automatic magically"],"Food and drink":["☕ coffee cafe morning caffeine","🍵 tea green matcha","🍺 beer pint drink cheers","🍻 cheers beers toast celebrate","🥂 champagne toast celebrate cheers","🍕 pizza food slice","🍔 burger food hamburger","🌮 taco food mexican","🍜 noodles ramen soup food","🍎 apple fruit food","🍌 banana fruit food","🍰 cake dessert birthday sweet","🍪 cookie biscuit sweet snack","🍩 donut doughnut sweet","🧁 cupcake sweet dessert","🍫 chocolate sweet treat","🍿 popcorn watching drama entertainment","🥑 avocado food green","🌶️ chilli chili spicy hot pepper","🧊 ice cold frozen chill"],"Animals and nature":["🐶 dog puppy pet","🐱 cat kitten pet","🦊 fox clever","🐻 bear","🐼 panda","🐢 turtle slow tortoise","🐌 snail slow","🐝 bee busy buzz","🦋 butterfly transform pretty","🐙 octopus multitask arms","🐳 whale big ocean","🦄 unicorn rare magic special","🦉 owl wise night","🐘 elephant big memory","🌱 seedling growth new sprout","🌳 tree nature growth","🌸 blossom flower spring","🌊 ocean wave water sea","🌈 rainbow colour color pride hope","☀️ sun sunny bright day","🌙 moon night late evening","⛈️ storm thunder rain bad weather","❄️ snowflake cold snow winter freeze","🍂 leaves autumn fall"],"Places and travel":["🏠 house home","🏢 office building work","🌍 earth world globe europe africa","🌎 earth-americas world globe","🗺️ map plan route territory","✈️ plane flight travel","🚗 car drive travel","🚲 bike bicycle cycle","🚂 train rail","⛺ tent camping outdoors","🏝️ island holiday vacation beach","🏔️ mountain peak climb summit"]},ka=Object.entries(ml).map(([e,t])=>({name:e,entries:t.map(n=>{const[a,...i]=n.split(" ");return{emoji:a,keywords:i}})})),wa=ka.flatMap(e=>e.entries);function fl(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.length===0?[]:wa.filter(n=>n.emoji===e.trim()||t.every(a=>n.keywords.some(i=>i.startsWith(a))))}function gl(e){return wa.find(t=>t.emoji===e)}function Le(e){var t;return((t=gl(e))==null?void 0:t.keywords[0])??e}function Da(e,t,n){const a=u.useRef([]);u.useImperativeHandle(n,()=>({focusFirst:()=>{var s;return(s=a.current[0])==null?void 0:s.focus()}}));const i=u.useCallback(s=>c=>{a.current[s]=c},[]),r=u.useCallback((s,c)=>{const d=(m,f)=>{var y;e!==0&&((y=a.current[(m+f+e)%e])==null||y.focus())};switch(s.key){case"ArrowRight":case"ArrowDown":s.preventDefault(),d(c,1);break;case"ArrowLeft":case"ArrowUp":s.preventDefault(),d(c,-1);break;case"Home":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(0,0);break;case"End":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(e-1,0);break;case"Escape":s.preventDefault(),s.stopPropagation(),t();break}},[e,t]);return{register:i,handleKeyDown:r}}function _a({mine:e,frequents:t,onPick:n,disabled:a}){const[i,r]=u.useState(""),s=u.useId(),c=u.useMemo(()=>fl(i),[i]),d=i.trim().length>0,m=f=>o.jsx("button",{type:"button",disabled:a,onClick:()=>n(f),"aria-pressed":e.includes(f),"aria-label":Le(f),title:Le(f),className:B("focus-ring hover:bg-accent flex size-8 items-center justify-center rounded-md text-base",xt,"disabled:pointer-events-none disabled:opacity-50",e.includes(f)&&"bg-brand/15 ring-brand/40 ring-1"),children:o.jsx("span",{"aria-hidden":!0,children:f})},f);return o.jsxs("div",{className:"flex flex-col gap-2","data-testid":"reaction-picker",children:[o.jsx(Ai,{autoFocus:!0,value:i,onChange:f=>r(f.target.value),placeholder:"Search emoji…","aria-label":"Search emoji",className:"h-8"}),a===!0&&o.jsx("p",{role:"status",className:"text-muted-foreground px-1 text-xs",children:"Reactions send once the room reconnects."}),o.jsx("div",{className:"max-h-64 overflow-y-auto pr-1",children:d?c.length===0?o.jsx("p",{className:"text-muted-foreground px-1 py-6 text-center text-xs",children:"Nothing here matches that."}):o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:c.map(f=>m(f.emoji))}):o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("section",{role:"group","aria-labelledby":`${s}-frequents`,children:[o.jsx("h3",{id:`${s}-frequents`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:"Your most used"}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:t.map(m)})]}),ka.map((f,y)=>o.jsxs("section",{role:"group","aria-labelledby":`${s}-group-${y}`,children:[o.jsx("h3",{id:`${s}-group-${y}`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:f.name}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:f.entries.map(h=>m(h.emoji))})]},f.name))]})})]})}function ja({appearance:e="capsule",mine:t,frequents:n,onPick:a,disabled:i,triggerRef:r,onTriggerKeyDown:s}){const[c,d]=u.useState(!1),m=e==="capsule";return o.jsxs(Ni,{open:c,onOpenChange:d,children:[o.jsx(Ri,{asChild:!0,children:o.jsx(pe,{ref:r,type:"button",variant:"ghost",size:m?"icon-xs":"sm",tabIndex:-1,disabled:i,"data-entry-action":"react-more","data-testid":m?void 0:"entry-reactions-add","aria-label":"Pick a reaction",title:"Pick a reaction",onKeyDown:s,className:B("leading-none",m?"text-control":"text-muted-foreground hover:text-foreground h-10 rounded-full px-3 md:h-6 md:px-2"),children:m?o.jsx("span",{"aria-hidden":!0,children:"🙂+"}):o.jsx(Dr,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})})}),o.jsx(Ti,{align:"end",className:"w-[19rem] p-2",children:o.jsx(_a,{mine:t,frequents:n,disabled:i,onPick:f=>{a(f),d(!1)}})})]})}function xl({prompt:e,sessionId:t,triggerRef:n,onTriggerKeyDown:a}){const i=Tn(),r=Et(),{sessions:s}=Si(),{data:c}=zi(),{data:d}=Ii(),[m,f]=u.useState({open:!1}),y=s.find(v=>v.id===t),h=y==null?void 0:y.runtime,F=y==null?void 0:y.cwd,g=Li.filter(v=>v!==h),w=v=>(c?v in c.capabilities:!0)&&Bi(d,v),x=v=>{Mi(r,{dir:F,runtime:v,prompt:e}).then(p=>i(p)).catch(p=>{$i(r,p),Pi(F??null)})},b=v=>{if(!w(v)){f({open:!0,runtime:v});return}x(v)};return o.jsxs(o.Fragment,{children:[o.jsxs($n,{children:[o.jsx(Pn,{asChild:!0,children:o.jsx("button",{ref:n,type:"button","data-entry-action":"run-with","aria-label":"Run this prompt elsewhere",onKeyDown:a,className:"text-muted-foreground/60 hover:text-foreground hover:bg-muted inline-flex size-6 items-center justify-center rounded transition-colors duration-150",children:o.jsx(_r,{className:"size-3.5"})})}),o.jsxs(qn,{align:"end",className:"w-52",children:[o.jsx(Oi,{children:"Run this with…"}),g.map(v=>{const p=Ln(v);return o.jsx(gt,{icon:p.icon,description:w(v)?void 0:"Connect",onSelect:()=>b(v),children:p.label},v)})]})]}),o.jsx(hr,{runtime:m.runtime,open:m.open,onOpenChange:v=>f(p=>({...p,open:v})),renderConnect:vr,onRuntimeReady:v=>{f({open:!1}),x(v)}})]})}function hl(e,t,n){return pl.flatMap(a=>{if(a==="react")return t?t.quick.map(r=>({kind:"quick",slot:a,emoji:r,mine:t.mine.includes(r)})):[];if(a==="react-more")return t?[{kind:"picker",slot:a}]:[];if(a==="run-with")return n?[{kind:"run-with",slot:a,runWith:n}]:[];const i=e.find(r=>r.id===a);return i?[{kind:"command",slot:a,action:i}]:[]})}const vl=u.forwardRef(function({actions:t,reactions:n,runWith:a,onExit:i,className:r},s){const c=hl(t,n,a),{register:d,handleKeyDown:m}=Da(c.length,i,s);return c.length===0?null:o.jsx("div",{role:"toolbar","aria-label":"Message actions","aria-orientation":"horizontal","data-testid":"entry-actions",className:r,children:c.map((f,y)=>{const h=g=>m(g,y),F=f.kind==="command"&&y>0&&c[y-1].kind!=="command";return f.kind==="run-with"?o.jsx(xl,{prompt:f.runWith.prompt,sessionId:f.runWith.sessionId,triggerRef:d(y),onTriggerKeyDown:h},"run-with"):f.kind==="picker"?o.jsx(ja,{mine:n.mine,frequents:n.quick,disabled:n.disabled,onPick:n.onToggle,triggerRef:d(y),onTriggerKeyDown:h},"react-more"):o.jsxs(u.Fragment,{children:[F&&o.jsx("span",{"aria-hidden":!0,"data-slot":"capsule-gap",className:"mx-1"}),f.kind==="quick"?o.jsx(pe,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,disabled:n.disabled,"data-entry-action":f.slot,"data-emoji":f.emoji,"data-reacted":f.mine?"true":void 0,"aria-pressed":f.mine,"aria-label":`React with ${Le(f.emoji)}`,title:`React with ${Le(f.emoji)}`,onClick:()=>n.onToggle(f.emoji),onKeyDown:h,className:B("text-control leading-none",f.mine&&"bg-brand/15 text-foreground"),children:o.jsx("span",{"aria-hidden":!0,children:f.emoji})}):o.jsx(pe,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,"data-entry-action":f.slot,"aria-label":f.action.label,title:f.action.label,onClick:f.action.run,onKeyDown:h,children:o.jsx(f.action.icon,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})})]},f.kind==="quick"?f.emoji:f.action.id)})})});function bl({quick:e,mine:t,onToggle:n,disabled:a}){const{close:i}=Gi(),[r,s]=u.useState(!1),c=d=>{n(d),i()};return o.jsxs("div",{className:"border-border border-b px-4 py-3","data-testid":"drawer-reactions",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[e.map(d=>o.jsx("button",{type:"button",disabled:a,onClick:()=>c(d),"data-entry-action":"react","data-emoji":d,"aria-pressed":t.includes(d),"aria-label":`React with ${Le(d)}`,className:B("focus-ring flex size-11 items-center justify-center rounded-full border text-lg",xt,"disabled:pointer-events-none disabled:opacity-50",t.includes(d)?"border-brand/70 bg-brand/12":"border-border bg-muted/60 active:bg-accent"),children:o.jsx("span",{"aria-hidden":!0,children:d})},d)),o.jsx("button",{type:"button",disabled:a,onClick:()=>s(d=>!d),"aria-expanded":r,"aria-label":"Pick a reaction",className:B("focus-ring border-border bg-muted/60 active:bg-accent flex size-11 items-center justify-center rounded-full border text-base",xt,"disabled:pointer-events-none disabled:opacity-50"),children:o.jsx("span",{"aria-hidden":!0,children:"🙂+"})})]}),r&&o.jsx("div",{className:"pt-3",children:o.jsx(_a,{mine:t,frequents:e,onPick:c,disabled:a})})]})}function yl({actions:e,reactions:t,onPressStateChange:n,children:a}){const i=qi();return e.length===0?o.jsx(o.Fragment,{children:a}):o.jsxs(Hi,{children:[o.jsx(Ki,{asChild:!0,onPressStateChange:n,children:a}),o.jsxs(Vi,{className:"w-52",children:[i&&t&&o.jsx(bl,{...t}),e.map(r=>o.jsxs(Wi,{onClick:r.run,children:[o.jsx(r.icon,{"aria-hidden":!0,className:"mr-2 size-4"}),r.label]},r.id))]})]})}function kl({count:e,roll:t}){const[n]=u.useState(t);return o.jsx("span",{"aria-hidden":!0,className:B("tabular-nums",n&&"motion-safe:animate-reaction-roll"),children:e})}function wl({reaction:e,mine:t,summary:n,arrived:a,rolled:i,onToggle:r,disabled:s,buttonRef:c,onKeyDown:d}){const[m]=u.useState(a),f=e.authorIds.length;return o.jsxs(W.button,{ref:c,type:"button",tabIndex:-1,onKeyDown:d,exit:{opacity:0},transition:{duration:.12},disabled:s,onClick:r,"aria-pressed":t,"aria-label":n,title:n,"data-testid":"entry-reaction","data-emoji":e.emoji,"data-mine":t?"true":void 0,className:B("focus-ring inline-flex items-center gap-1 rounded-full text-xs","h-10 px-3 md:h-6 md:px-2","disabled:pointer-events-none disabled:opacity-50",t?"bg-brand/15 text-brand-text font-medium":"bg-foreground/5 text-muted-foreground hover:bg-foreground/8",m&&"motion-safe:animate-reaction-pop"),children:[o.jsx("span",{"aria-hidden":!0,className:"text-sm",children:e.emoji}),o.jsx(kl,{count:f,roll:i},f)]})}const Dl=u.forwardRef(function({reactions:t,viewerAuthorId:n,names:a,frequents:i,onToggle:r,disabled:s,onExit:c},d){const[m,f]=u.useState(!1),y=u.useRef(null),h=y.current,[F,g]=u.useState(!1),[w,x]=u.useState(t.length);w!==t.length&&(x(t.length),g(t.length===0&&w>0)),u.useEffect(()=>{y.current=new Map(t.map(E=>[E.emoji,E.authorIds.length]))});const{shown:b,hidden:v}=Pr(t),p=m?t:b,l=t.filter(E=>Kt(E,n)).map(E=>E.emoji),k=v>0&&!m?1:0,_=t.length>0?1:0,{register:A,handleKeyDown:T}=Da(p.length+k+_,c,d),j=u.useCallback(E=>C=>T(C,E),[T]);return t.length===0&&!F?null:o.jsxs("div",{"data-testid":"entry-reactions",className:"mt-2 flex flex-wrap items-center gap-2 md:gap-1",role:"group","aria-label":"Reactions",children:[o.jsx(be,{initial:!1,onExitComplete:()=>g(!1),children:p.map((E,C)=>o.jsx(wl,{reaction:E,mine:Kt(E,n),summary:$r(E,n,a),arrived:h!==null&&!h.has(E.emoji),rolled:(h==null?void 0:h.get(E.emoji))!==void 0&&h.get(E.emoji)!==E.authorIds.length,onToggle:()=>r(E.emoji),disabled:s,buttonRef:A(C),onKeyDown:j(C)},E.emoji))}),k===1&&o.jsxs("button",{ref:A(p.length),type:"button",tabIndex:-1,onKeyDown:j(p.length),onClick:()=>f(!0),"data-testid":"entry-reactions-more",className:"focus-ring text-muted-foreground hover:text-foreground inline-flex h-10 items-center rounded-full px-3 text-xs md:h-6 md:px-2",children:["+",v," more"]}),t.length>0&&o.jsx(ja,{appearance:"ghost-pill",mine:l,frequents:i,disabled:s,onPick:r,triggerRef:A(p.length+k),onTriggerKeyDown:j(p.length+k)})]})}),Ea=u.createContext(null);function _l({value:e,children:t}){return o.jsx(Ea.Provider,{value:e,children:t})}function $e(){const e=u.useContext(Ea);if(e===null)throw new Error("A Message part must be rendered inside <Message.Root>. Each part draws itself with a slot of the row’s single messageItem() call, and there is no honest default for a row that was never computed.");return e}function Fa(e){return e==="first"||e==="only"}const jl=Ui("",{variants:{anchor:{corner:"contents",rail:"pointer-events-none sticky top-1 z-20 order-first -mt-(--msg-actions-height) flex h-(--msg-actions-height) items-start justify-end pr-2"}}});function El({actions:e=[],reactions:t,runWith:n,barRef:a,onExit:i}){const{capabilities:r,anchor:s}=Be(),{slots:c}=$e();return o.jsxs(o.Fragment,{children:[e.length>0&&o.jsx("button",{type:"button",tabIndex:-1,"data-testid":"entry-actions-reach","aria-label":"Message actions",onClick:()=>{var d;return(d=a==null?void 0:a.current)==null?void 0:d.focusFirst()},className:"sr-only"}),o.jsx("div",{"data-slot":"message-actions",className:jl({anchor:s}),children:o.jsx(vl,{ref:a,actions:e,reactions:r.reactions?t:void 0,runWith:r.runWith?n:void 0,onExit:i,className:c.actions()})})]})}const Fl="you";function Cl({id:e,author:t,at:n,origin:a,mark:i,renderName:r,isSelf:s=t.isSelf??!1,asChild:c=!1,className:d}){const{slots:m,position:f}=$e(),y=n===void 0?"":na(n);if(!Fa(f))return null;const h=c?At:"div",F=o.jsx("span",{className:m.authorName(),children:t.displayName}),g=s&&t.displayName.trim().toLowerCase()!==Fl;return o.jsxs(h,{id:e,"data-slot":"message-author",className:B(m.header(),d),children:[r?r(F):F,g&&o.jsx("span",{"data-slot":"message-author-self",className:"text-msg-timestamp shrink-0 text-xs",children:"(you)"}),a!==void 0&&o.jsx(Zi,{origin:a}),i,o.jsx(Ji,{retired:t.retired}),y.length>0&&o.jsx("time",{dateTime:n,title:aa(n??""),className:B(m.timestamp(),"text-msg-timestamp"),children:y})]})}function Al({children:e,className:t}){const{slots:n}=$e();return o.jsx("div",{"data-slot":"message-body",className:B(n.body(),t),children:e})}function Nl({id:e,children:t,className:n}){const{slots:a}=$e();return o.jsx("div",{id:e,"data-slot":"message-content",className:B(a.content(),n),children:t})}function Rl({author:e,at:t,onViewProfile:n,isSelf:a,renderAvatar:i,className:r}){const{slots:s,position:c}=$e(),{showTimestamps:d}=Yi(),m=t===void 0?"":na(t);return o.jsx("div",{"data-slot":"message-gutter",className:B(s.gutter(),r),children:Fa(c)?(i??(f=>f))(o.jsx(ta,{author:e,onViewProfile:n,isSelf:a})):m.length>0&&o.jsx("time",{dateTime:t,title:aa(t??""),className:B(s.avatarTimestamp(),d?"text-msg-timestamp":"group-focus-within:text-msg-timestamp group-hover:text-msg-timestamp text-transparent"),children:m})})}function Tl({ref:e,...t}){const{capabilities:n}=Be(),[a,i]=u.useState(t.reactions.length>0);return!a&&t.reactions.length>0&&i(!0),!n.reactions||!a?null:o.jsx("div",{"data-slot":"message-reactions",className:"contents",children:o.jsx(Dl,{ref:e,...t})})}const Sl=Kn.glide;function zl({role:e="assistant",position:t="only",isNew:n=!1,actions:a,reactions:i,asChild:r=!1,className:s,children:c,ref:d,...m}){const{capabilities:f,density:y,anchor:h}=Be(),[F,g]=u.useState(null),w=u.useMemo(()=>({slots:eo({role:e,position:t,density:y,anchor:h}),position:t}),[e,t,y,h]),x=a!==void 0&&a.length>0,b=r?At:W.div,v=o.jsx(b,{ref:d,"data-slot":"message-root",role:"article",className:B(w.slots.root(),h==="rail"?"focus-ring-inset":"focus-visible:ring-ring outline-none focus-visible:ring-2","origin-center",x&&"[-webkit-touch-callout:none]",F==="pressing"&&"motion-safe:animate-press-in",F==="released"&&"motion-safe:animate-press-release",s),...r?{}:{initial:n?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:Sl},...m,children:o.jsx(_l,{value:w,children:o.jsx(Xi,{children:c})})});return o.jsx(yl,{actions:a??[],reactions:f.reactions?i:void 0,onPressStateChange:g,children:v})}const fu={Root:As,Timeline:dl,LiveLane:Us,LivePeek:Ys,Composer:Fs,Footer:Cs},gu={Root:zl,Gutter:Rl,Author:Cl,Body:Al,Content:Nl,Attachments:ro,Reactions:Tl,Actions:El},Il={a:er,img:yr},Ca=u.createContext({isStreaming:!1});function Ol(e){const t=u.useContext(Ca);return o.jsx(fr,{...e,...t})}const Ll={renderers:[{language:mr,component:Ol}]};function xu({content:e,isStreaming:t=!1,textEffect:n=Tr,sessionId:a,isLatestWidgetMessage:i}){const r=zr(n),s=u.useMemo(()=>({sessionId:a,isLatestMessage:i,isStreaming:t}),[a,i,t]);return o.jsx(Ca.Provider,{value:s,children:o.jsx("div",{className:B("relative",t&&"streaming-cursor"),children:o.jsx(br,{resetKey:e,fallback:o.jsx("div",{className:"text-sm break-words whitespace-pre-wrap",children:e}),children:o.jsx(Qi,{shikiTheme:["github-light","github-dark"],components:Il,animated:r,isAnimating:t,plugins:Ll,children:e})})})})}function hu({via:e}){return o.jsxs("p",{"data-testid":"forward-via-line",className:"text-muted-foreground mb-0.5 flex min-w-0 items-center gap-1 text-xs",children:[o.jsxs("span",{className:"shrink-0",children:["via ",e.appName]}),o.jsx("span",{"aria-hidden":!0,children:"·"}),e.itemTitle?o.jsx("q",{className:"min-w-0 truncate",title:`Item title from ${e.appName}`,children:e.itemTitle}):o.jsxs("span",{className:"min-w-0 truncate",children:["item ",e.itemId]})]})}const Bl={sent:[],stops:[]},Ml=new rr;function vu(e){const t=tr(),n=u.useContext(nr),a=ar(e??""),{data:i}=ir({queryKey:["chat-activity",e,a],queryFn:()=>t.getChatActivity(e),enabled:!!e&&t!==null&&n!==void 0,placeholderData:(r,s)=>(s==null?void 0:s.queryKey[1])===e?r:void 0,staleTime:3e4},n??Ml);return i??Bl}const Ot=u.createContext(null);function bu({children:e,value:t}){const n=u.useMemo(()=>t,[t.sessionId,t.isStreaming,t.isLatestWidgetMessage,t.isFinalMessage,t.activeToolCallId,t.onToolRef,t.focusedOptionIndex,t.onToolDecided,t.onRetry,t.onSigninComplete,t.onChooseModel,t.inputZoneToolCallId,t.textEffect,t.runtimeLabel,t.allowsDenyReason]);return o.jsx(Ot,{value:n,children:e})}function yu(){const e=u.useContext(Ot);if(!e)throw new Error("useMessageContext must be used within MessageProvider");return e}function ku(){return u.useContext(Ot)}const $l=e=>typeof e=="boolean"||e instanceof Boolean,Pl=e=>typeof e=="number"||e instanceof Number,ql=e=>typeof e=="bigint"||e instanceof BigInt,Aa=e=>!!e&&e instanceof Date,Hl=e=>typeof e=="string"||e instanceof String,Kl=e=>Array.isArray(e),Na=e=>typeof e=="object"&&e!==null,Ra=e=>!!e&&e instanceof Object&&typeof e=="function";function Ue(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function Vl(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function Ta(e){let{field:t,value:n,data:a,lastElement:i,openBracket:r,closeBracket:s,level:c,style:d,shouldExpandNode:m,clickToExpandNode:f,outerRef:y,beforeExpandChange:h}=e;const F=u.useRef(!1),[g,w]=u.useState(()=>m(c,n,t)),x=u.useRef(null);u.useEffect(()=>{F.current?w(m(c,n,t)):F.current=!0},[m]);const b=u.useId();if(a.length===0)return Wl({field:t,openBracket:r,closeBracket:s,lastElement:i,style:d});const v=g?d.collapseIcon:d.expandIcon,p=g?d.ariaLables.collapseJson:d.ariaLables.expandJson,l=c+1,k=a.length-1,_=j=>{g!==j&&(!h||h({level:c,value:n,field:t,newExpandValue:j}))&&w(j)},A=j=>{if(j.key==="ArrowRight"||j.key==="ArrowLeft")j.preventDefault(),_(j.key==="ArrowRight");else if(j.key==="ArrowUp"||j.key==="ArrowDown"){j.preventDefault();const E=j.key==="ArrowUp"?-1:1;if(!y.current)return;const C=y.current.querySelectorAll("[role=button]");let L=-1;for(let S=0;S<C.length;S++)if(C[S].tabIndex===0){L=S;break}if(L<0)return;const I=(L+E+C.length)%C.length;C[L].tabIndex=-1,C[I].tabIndex=0,C[I].focus()}},T=()=>{var j;_(!g);const E=x.current;if(!E)return;const C=(j=y.current)===null||j===void 0?void 0:j.querySelector('[role=button][tabindex="0"]');C&&(C.tabIndex=-1),E.tabIndex=0,E.focus()};return u.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":g,"aria-selected":void 0},u.createElement("span",{className:v,onClick:T,onKeyDown:A,role:"button","aria-label":p,"aria-expanded":g,"aria-controls":g?b:void 0,ref:x,tabIndex:c===0?0:-1}),(t||t==="")&&(f?u.createElement("span",{className:d.clickableLabel,onClick:T,onKeyDown:A},Ue(t,d.quotesForFieldNames),":"):u.createElement("span",{className:d.label},Ue(t,d.quotesForFieldNames),":")),u.createElement("span",{className:d.punctuation},r),g?u.createElement("ul",{id:b,role:"group",className:d.childFieldsContainer},a.map((j,E)=>u.createElement(wt,{key:j[0]||E,field:j[0],value:j[1],style:d,lastElement:E===k,level:l,shouldExpandNode:m,clickToExpandNode:f,beforeExpandChange:h,outerRef:y}))):u.createElement("span",{className:d.collapsedContent,onClick:T,onKeyDown:A}),u.createElement("span",{className:d.punctuation},s),!i&&u.createElement("span",{className:d.punctuation},","))}function Wl(e){let{field:t,openBracket:n,closeBracket:a,lastElement:i,style:r}=e;return u.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:r.label},Ue(t,r.quotesForFieldNames),":"),u.createElement("span",{className:r.punctuation},n),u.createElement("span",{className:r.punctuation},a),!i&&u.createElement("span",{className:r.punctuation},","))}function Gl(e){let{field:t,value:n,style:a,lastElement:i,shouldExpandNode:r,clickToExpandNode:s,level:c,outerRef:d,beforeExpandChange:m}=e;return Ta({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:s,data:Object.keys(n).map(f=>[f,n[f]]),outerRef:d,beforeExpandChange:m})}function Ul(e){let{field:t,value:n,style:a,lastElement:i,level:r,shouldExpandNode:s,clickToExpandNode:c,outerRef:d,beforeExpandChange:m}=e;return Ta({field:t,value:n,lastElement:i||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:s,clickToExpandNode:c,data:n.map(f=>[void 0,f]),outerRef:d,beforeExpandChange:m})}function Zl(e){let{field:t,value:n,style:a,lastElement:i}=e,r,s=a.otherValue;return n===null?(r="null",s=a.nullValue):n===void 0?(r="undefined",s=a.undefinedValue):Hl(n)?(r=Vl(n,!a.noQuotesForStringValues,a.stringifyStringValues),s=a.stringValue):$l(n)?(r=n?"true":"false",s=a.booleanValue):Pl(n)?(r=n.toString(),s=a.numberValue):ql(n)?(r=`${n.toString()}n`,s=a.numberValue):Aa(n)?r=n.toISOString():Ra(n)?r="function() { }":r=n.toString(),u.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:a.label},Ue(t,a.quotesForFieldNames),":"),u.createElement("span",{className:s},r),!i&&u.createElement("span",{className:a.punctuation},","))}function wt(e){const t=e.value;return Kl(t)?u.createElement(Ul,Object.assign({},e)):Na(t)&&!Aa(t)&&!Ra(t)?u.createElement(Gl,Object.assign({},e)):u.createElement(Zl,Object.assign({},e))}var M={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const Sa={collapseJson:"collapse JSON",expandJson:"expand JSON"},ct={container:M["container-light"],basicChildStyle:M["basic-element-style"],childFieldsContainer:M["child-fields-container"],label:M["label-light"],clickableLabel:M["clickable-label-light"],nullValue:M["value-null-light"],undefinedValue:M["value-undefined-light"],stringValue:M["value-string-light"],booleanValue:M["value-boolean-light"],numberValue:M["value-number-light"],otherValue:M["value-other-light"],punctuation:M["punctuation-light"],collapseIcon:M["collapse-icon-light"],expandIcon:M["expand-icon-light"],collapsedContent:M["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Sa,stringifyStringValues:!1},Jl={container:M["container-dark"],basicChildStyle:M["basic-element-style"],childFieldsContainer:M["child-fields-container"],label:M["label-dark"],clickableLabel:M["clickable-label-dark"],nullValue:M["value-null-dark"],undefinedValue:M["value-undefined-dark"],stringValue:M["value-string-dark"],booleanValue:M["value-boolean-dark"],numberValue:M["value-number-dark"],otherValue:M["value-other-dark"],punctuation:M["punctuation-dark"],collapseIcon:M["collapse-icon-dark"],expandIcon:M["expand-icon-dark"],collapsedContent:M["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Sa,stringifyStringValues:!1},Yl=()=>!0,Xl=e=>e<1,Ql=e=>{let{data:t,style:n=ct,shouldExpandNode:a=Yl,clickToExpandNode:i=!1,beforeExpandChange:r,compactTopLevel:s,...c}=e;const d=u.useRef(null);return u.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:d,role:"tree"}),s&&Na(t)?Object.entries(t).map(m=>{let[f,y]=m;return u.createElement(wt,{key:f,field:f,value:y,style:{...ct,...n},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:i,beforeExpandChange:r,outerRef:d})}):u.createElement(wt,{value:t,style:{...ct,...n},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:i,outerRef:d,beforeExpandChange:r}))};var ae={},ut,gn;function ec(){if(gn)return ut;gn=1;const e=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],t=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;class n{static escapeForHtml(i){return new n().escapeForHtml(i)}static linkify(i){return new n().linkify(i)}static ansiToHtml(i,r){return new n().ansiToHtml(i,r)}static ansiToJson(i,r){return new n().ansiToJson(i,r)}static ansiToText(i){return new n().ansiToText(i)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let c=0;c<2;++c)for(let d=0;d<8;++d)this.PALETTE_COLORS.push(e[c][d].color);let i=[0,95,135,175,215,255],r=(c,d,m)=>i[c]+", "+i[d]+", "+i[m];for(let c=0;c<6;++c)for(let d=0;d<6;++d)for(let m=0;m<6;++m)this.PALETTE_COLORS.push(r(c,d,m));let s=8;for(let c=0;c<24;++c,s+=10)this.PALETTE_COLORS.push(s+", "+s+", "+s)}escapeForHtml(i){return i.replace(/[&<>\"]/gm,r=>r=="&"?"&amp;":r=='"'?"&quot;":r=="<"?"&lt;":r==">"?"&gt;":"")}linkify(i){return i.replace(t,r=>`<a href="${r}">${r}</a>`)}ansiToHtml(i,r){return this.process(i,r,!0)}ansiToJson(i,r){return r=r||{},r.json=!0,r.clearLine=!1,this.process(i,r,!0)}ansiToText(i){return this.process(i,{},!1)}process(i,r,s){let c=this,d=i.split(/\033\[/),m=d.shift();r==null&&(r={}),r.clearLine=/\r/.test(i);let f=d.map(y=>this.processChunk(y,r,s));if(r&&r.json){let y=c.processChunkJson("");return y.content=m,y.clearLine=r.clearLine,f.unshift(y),r.remove_empty&&(f=f.filter(h=>!h.isEmpty())),f}else f.unshift(m);return f.join("")}processChunkJson(i,r,s){r=typeof r>"u"?{}:r;let c=r.use_classes=typeof r.use_classes<"u"&&r.use_classes,d=r.key=c?"class":"color",m={content:i,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:r.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!m.content},f=i.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!f)return m;m.content=f[4];let y=f[2].split(";");if(f[1]!==""||f[3]!=="m"||!s)return m;let h=this;for(;y.length>0;){let F=y.shift(),g=parseInt(F);if(isNaN(g)||g===0)h.fg=h.bg=null,h.decorations=[];else if(g===1)h.decorations.push("bold");else if(g===2)h.decorations.push("dim");else if(g===3)h.decorations.push("italic");else if(g===4)h.decorations.push("underline");else if(g===5)h.decorations.push("blink");else if(g===7)h.decorations.push("reverse");else if(g===8)h.decorations.push("hidden");else if(g===9)h.decorations.push("strikethrough");else if(g===21)h.removeDecoration("bold");else if(g===22)h.removeDecoration("bold"),h.removeDecoration("dim");else if(g===23)h.removeDecoration("italic");else if(g===24)h.removeDecoration("underline");else if(g===25)h.removeDecoration("blink");else if(g===27)h.removeDecoration("reverse");else if(g===28)h.removeDecoration("hidden");else if(g===29)h.removeDecoration("strikethrough");else if(g===39)h.fg=null;else if(g===49)h.bg=null;else if(g>=30&&g<38)h.fg=e[0][g%10][d];else if(g>=90&&g<98)h.fg=e[1][g%10][d];else if(g>=40&&g<48)h.bg=e[0][g%10][d];else if(g>=100&&g<108)h.bg=e[1][g%10][d];else if(g===38||g===48){let w=g===38;if(y.length>=1){let x=y.shift();if(x==="5"&&y.length>=1){let b=parseInt(y.shift());if(b>=0&&b<=255)if(!c)this.PALETTE_COLORS||h.setupPalette(),w?h.fg=this.PALETTE_COLORS[b]:h.bg=this.PALETTE_COLORS[b];else{let v=b>=16?"ansi-palette-"+b:e[b>7?1:0][b%8].class;w?h.fg=v:h.bg=v}}else if(x==="2"&&y.length>=3){let b=parseInt(y.shift()),v=parseInt(y.shift()),p=parseInt(y.shift());if(b>=0&&b<=255&&v>=0&&v<=255&&p>=0&&p<=255){let l=b+", "+v+", "+p;c?w?(h.fg="ansi-truecolor",h.fg_truecolor=l):(h.bg="ansi-truecolor",h.bg_truecolor=l):w?h.fg=l:h.bg=l}}}}}return h.fg===null&&h.bg===null&&h.decorations.length===0||(m.fg=h.fg,m.bg=h.bg,m.fg_truecolor=h.fg_truecolor,m.bg_truecolor=h.bg_truecolor,m.decorations=h.decorations,m.decoration=h.decorations.slice(-1).pop()||null,m.was_processed=!0),m}processChunk(i,r,s){r=r||{};let c=this.processChunkJson(i,r,s),d=r.use_classes;if(c.decorations=c.decorations.filter(g=>{if(g==="reverse"){c.fg||(c.fg=e[0][7][d?"class":"color"]),c.bg||(c.bg=e[0][0][d?"class":"color"]);let w=c.fg;c.fg=c.bg,c.bg=w;let x=c.fg_truecolor;return c.fg_truecolor=c.bg_truecolor,c.bg_truecolor=x,c.isInverted=!0,!1}return!0}),r.json)return c;if(c.isEmpty())return"";if(!c.was_processed)return c.content;let m=[],f=[],y=[],h={},F=g=>{let w=[],x;for(x in g)g.hasOwnProperty(x)&&w.push("data-"+x+'="'+this.escapeForHtml(g[x])+'"');return w.length>0?" "+w.join(" "):""};return c.isInverted&&(h["ansi-is-inverted"]="true"),c.fg&&(d?(m.push(c.fg+"-fg"),c.fg_truecolor!==null&&(h["ansi-truecolor-fg"]=c.fg_truecolor,c.fg_truecolor=null)):m.push("color:rgb("+c.fg+")")),c.bg&&(d?(m.push(c.bg+"-bg"),c.bg_truecolor!==null&&(h["ansi-truecolor-bg"]=c.bg_truecolor,c.bg_truecolor=null)):m.push("background-color:rgb("+c.bg+")")),c.decorations.forEach(g=>{if(d){f.push("ansi-"+g);return}g==="bold"?f.push("font-weight:bold"):g==="dim"?f.push("opacity:0.5"):g==="italic"?f.push("font-style:italic"):g==="hidden"?f.push("visibility:hidden"):g==="strikethrough"?y.push("line-through"):y.push(g)}),y.length&&f.push("text-decoration:"+y.join(" ")),d?'<span class="'+m.concat(f).join(" ")+'"'+F(h)+">"+c.content+"</span>":'<span style="'+m.concat(f).join(";")+'"'+F(h)+">"+c.content+"</span>"}removeDecoration(i){const r=this.decorations.indexOf(i);r>=0&&this.decorations.splice(r,1)}}return ut=n,ut}var ze={exports:{}},xn;function tc(){if(xn)return ze.exports;xn=1;function e(i){if(!i)return"";if(!/\r/.test(i))return i;for(i=i.replace(/\r+\n/gm,`
29
29
  `);/\r./.test(i);)i=i.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm,function(r,s,c){return c+s.slice(c.length)});return i}function t(i){for(var r=0,s=0;s<i.length;s++)i[r].length<=i[s].length&&(r=s);return r}function n(i){if(!/\r/.test(i))return i;for(var r=i.split("\r"),s=[];r.length>0;){var c=t(r);s.push(r[c]),r=r.slice(c+1)}return s.join("\r")}function a(i){if(!i)return"";if(!/\r/.test(i))return i;if(!/\n/.test(i))return n(i);i=i.replace(/\r+\n/gm,`
30
30
  `);var r=i.lastIndexOf(`
31
31
  `);return e(i.slice(0,r))+`
32
- `+n(i.slice(r+1))}return ze.exports=e,ze.exports.escapeCarriageReturn=e,ze.exports.escapeCarriageReturnSafe=a,ze.exports}var ye={},hn;function nc(){if(hn)return ye;hn=1;var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,a=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,i=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;return ye.Any=e,ye.Cc=t,ye.Cf=n,ye.P=a,ye.S=i,ye.Z=r,ye}var dt,vn;function ac(){if(vn)return dt;vn=1;var e=nc();function t(p){const l={};p=p||{},l.src_Any=e.Any.source,l.src_Cc=e.Cc.source,l.src_Z=e.Z.source,l.src_P=e.P.source,l.src_ZPCc=[l.src_Z,l.src_P,l.src_Cc].join("|"),l.src_ZCc=[l.src_Z,l.src_Cc].join("|");const k="[><|]";return l.src_pseudo_letter=`(?:(?!${k}|${l.src_ZPCc})${l.src_Any})`,l.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",l.src_auth=`(?:(?:(?!${l.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,l.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",l.src_host_terminator=`(?=$|${k}|${l.src_ZPCc})(?!${p["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${l.src_ZPCc}))`,l.src_path=`(?:[/?#](?:(?!${l.src_ZCc}|${k}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${l.src_ZCc}|\\]).)*\\]|\\((?:(?!${l.src_ZCc}|[)]).)*\\)|\\{(?:(?!${l.src_ZCc}|[}]).)*\\}|\\"(?:(?!${l.src_ZCc}|["]).)+\\"|\\'(?:(?!${l.src_ZCc}|[']).)+\\'|\\'(?=${l.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${l.src_ZCc}|[.]|$)|`+(p["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${l.src_ZCc}|$)|;(?!${l.src_ZCc}|$)|\\!+(?!${l.src_ZCc}|[!]|$)|\\?(?!${l.src_ZCc}|[?]|$))+|\\/)?`,l.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',l.src_xn="xn--[a-z0-9\\-]{1,59}",l.src_domain_root="(?:"+l.src_xn+`|${l.src_pseudo_letter}{1,63})`,l.src_domain="(?:"+l.src_xn+`|(?:${l.src_pseudo_letter})|(?:${l.src_pseudo_letter}(?:-|${l.src_pseudo_letter}){0,61}${l.src_pseudo_letter}))`,l.src_host=`(?:(?:(?:(?:${l.src_domain})\\.)*${l.src_domain}))`,l.tpl_host_fuzzy="(?:"+l.src_ip4+`|(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%)))`,l.tpl_host_no_ip_fuzzy=`(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%))`,l.src_host_strict=l.src_host+l.src_host_terminator,l.tpl_host_fuzzy_strict=l.tpl_host_fuzzy+l.src_host_terminator,l.src_host_port_strict=l.src_host+l.src_port+l.src_host_terminator,l.tpl_host_port_fuzzy_strict=l.tpl_host_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_port_no_ip_fuzzy_strict=l.tpl_host_no_ip_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${l.src_ZPCc}|>|$))`,l.tpl_email_fuzzy=`(^|${k}|"|\\(|${l.src_ZCc})(${l.src_email_name}@${l.tpl_host_fuzzy_strict})`,l.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_fuzzy_strict}${l.src_path})`,l.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_no_ip_fuzzy_strict}${l.src_path})`,l}function n(p){return Array.prototype.slice.call(arguments,1).forEach(function(k){k&&Object.keys(k).forEach(function(_){p[_]=k[_]})}),p}function a(p){return Object.prototype.toString.call(p)}function i(p){return a(p)==="[object String]"}function r(p){return a(p)==="[object Object]"}function s(p){return a(p)==="[object RegExp]"}function c(p){return a(p)==="[object Function]"}function d(p){return p.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const m={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function f(p){return Object.keys(p||{}).reduce(function(l,k){return l||m.hasOwnProperty(k)},!1)}const y={"http:":{validate:function(p,l,k){const _=p.slice(l);return k.re.http||(k.re.http=new RegExp(`^\\/\\/${k.re.src_auth}${k.re.src_host_port_strict}${k.re.src_path}`,"i")),k.re.http.test(_)?_.match(k.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(p,l,k){const _=p.slice(l);return k.re.no_http||(k.re.no_http=new RegExp("^"+k.re.src_auth+`(?:localhost|(?:(?:${k.re.src_domain})\\.)+${k.re.src_domain_root})`+k.re.src_port+k.re.src_host_terminator+k.re.src_path,"i")),k.re.no_http.test(_)?l>=3&&p[l-3]===":"||l>=3&&p[l-3]==="/"?0:_.match(k.re.no_http)[0].length:0}},"mailto:":{validate:function(p,l,k){const _=p.slice(l);return k.re.mailto||(k.re.mailto=new RegExp(`^${k.re.src_email_name}@${k.re.src_host_strict}`,"i")),k.re.mailto.test(_)?_.match(k.re.mailto)[0].length:0}}},h="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",F="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function g(p){return function(l,k){const _=l.slice(k);return p.test(_)?_.match(p)[0].length:0}}function w(){return function(p,l){l.normalize(p)}}function x(p){const l=p.re=t(p.__opts__),k=p.__tlds__.slice();p.onCompile(),p.__tlds_replaced__||k.push(h),k.push(l.src_xn),l.src_tlds=k.join("|");function _(E){return E.replace("%TLDS%",l.src_tlds)}l.email_fuzzy=RegExp(_(l.tpl_email_fuzzy),"i"),l.email_fuzzy_global=RegExp(_(l.tpl_email_fuzzy),"ig"),l.link_fuzzy=RegExp(_(l.tpl_link_fuzzy),"i"),l.link_fuzzy_global=RegExp(_(l.tpl_link_fuzzy),"ig"),l.link_no_ip_fuzzy=RegExp(_(l.tpl_link_no_ip_fuzzy),"i"),l.link_no_ip_fuzzy_global=RegExp(_(l.tpl_link_no_ip_fuzzy),"ig"),l.host_fuzzy_test=RegExp(_(l.tpl_host_fuzzy_test),"i");const A=[];p.__compiled__={};function T(E,C){throw new Error(`(LinkifyIt) Invalid schema "${E}": ${C}`)}Object.keys(p.__schemas__).forEach(function(E){const C=p.__schemas__[E];if(C===null)return;const L={validate:null,link:null};if(p.__compiled__[E]=L,r(C)){s(C.validate)?L.validate=g(C.validate):c(C.validate)?L.validate=C.validate:T(E,C),c(C.normalize)?L.normalize=C.normalize:C.normalize?T(E,C):L.normalize=w();return}if(i(C)){A.push(E);return}T(E,C)}),A.forEach(function(E){p.__compiled__[p.__schemas__[E]]&&(p.__compiled__[E].validate=p.__compiled__[p.__schemas__[E]].validate,p.__compiled__[E].normalize=p.__compiled__[p.__schemas__[E]].normalize)}),p.__compiled__[""]={validate:null,normalize:w()};const j=Object.keys(p.__compiled__).filter(function(E){return E.length>0&&p.__compiled__[E]}).map(d).join("|");p.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${j})`,"i"),p.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${j})`,"ig"),p.re.schema_at_start=RegExp(`^${p.re.schema_search.source}`,"i"),p.re.pretest=RegExp(`(${p.re.schema_test.source})|(${p.re.host_fuzzy_test.source})|@`,"i")}function b(p,l,k,_){const A=p.slice(k,_);this.schema=l.toLowerCase(),this.index=k,this.lastIndex=_,this.raw=A,this.text=A,this.url=A}function v(p,l){if(!(this instanceof v))return new v(p,l);l||f(p)&&(l=p,p={}),this.__opts__=n({},m,l),this.__schemas__=n({},y,p),this.__compiled__={},this.__tlds__=F,this.__tlds_replaced__=!1,this.re={},x(this)}return v.prototype.add=function(l,k){return this.__schemas__[l]=k,x(this),this},v.prototype.set=function(l){return this.__opts__=n(this.__opts__,l),this},v.prototype.test=function(l){if(!l.length)return!1;let k,_;if(this.re.schema_test.test(l)){for(_=this.re.schema_search,_.lastIndex=0;(k=_.exec(l))!==null;)if(this.testSchemaAt(l,k[2],_.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&l.search(this.re.host_fuzzy_test)>=0&&l.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&l.indexOf("@")>=0&&l.match(this.re.email_fuzzy)!==null)},v.prototype.pretest=function(l){return this.re.pretest.test(l)},v.prototype.testSchemaAt=function(l,k,_){return this.__compiled__[k.toLowerCase()]?this.__compiled__[k.toLowerCase()].validate(l,_,this):0},v.prototype.match=function(l){const k=[],_=[],A=[],T=[];let j,E,C;function L(z,$){return z?$?z.index!==$.index?z.index<$.index?z:$:z.lastIndex>=$.lastIndex?z:$:z:$}if(!l.length)return null;if(this.re.schema_test.test(l))for(C=this.re.schema_search,C.lastIndex=0;(j=C.exec(l))!==null;)E=this.testSchemaAt(l,j[2],C.lastIndex),E&&_.push({schema:j[2],index:j.index+j[1].length,lastIndex:j.index+j[0].length+E});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(C=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,C.lastIndex=0;(j=C.exec(l))!==null;)A.push({schema:"",index:j.index+j[1].length,lastIndex:j.index+j[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(C=this.re.email_fuzzy_global,C.lastIndex=0;(j=C.exec(l))!==null;)T.push({schema:"mailto:",index:j.index+j[1].length,lastIndex:j.index+j[0].length});const I=[0,0,0];let S=0;for(;;){const z=[_[I[0]],T[I[1]],A[I[2]]],$=L(L(z[0],z[1]),z[2]);if(!$)break;if($===z[0]?I[0]++:$===z[1]?I[1]++:I[2]++,$.index<S)continue;const X=new b(l,$.schema,$.index,$.lastIndex);this.__compiled__[X.schema].normalize(X,this),k.push(X),S=$.lastIndex}return k.length?k:null},v.prototype.matchAtStart=function(l){if(!l.length)return null;const k=this.re.schema_at_start.exec(l);if(!k)return null;const _=this.testSchemaAt(l,k[2],k[0].length);if(!_)return null;const A=new b(l,k[2],k.index+k[1].length,k.index+k[0].length+_);return this.__compiled__[A.schema].normalize(A,this),A},v.prototype.tlds=function(l,k){return l=Array.isArray(l)?l:[l],k?(this.__tlds__=this.__tlds__.concat(l).sort().filter(function(_,A,T){return _!==T[A-1]}).reverse(),x(this),this):(this.__tlds__=l.slice(),this.__tlds_replaced__=!0,x(this),this)},v.prototype.normalize=function(l){l.schema||(l.url=`http://${l.url}`),l.schema==="mailto:"&&!/^mailto:/i.test(l.url)&&(l.url=`mailto:${l.url}`)},v.prototype.onCompile=function(){},dt=v,dt}var bn;function ic(){if(bn)return ae;bn=1;var e=ae&&ae.__createBinding||(Object.create?(function(x,b,v,p){p===void 0&&(p=v);var l=Object.getOwnPropertyDescriptor(b,v);(!l||("get"in l?!b.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return b[v]}}),Object.defineProperty(x,p,l)}):(function(x,b,v,p){p===void 0&&(p=v),x[p]=b[v]})),t=ae&&ae.__setModuleDefault||(Object.create?(function(x,b){Object.defineProperty(x,"default",{enumerable:!0,value:b})}):function(x,b){x.default=b}),n=ae&&ae.__importStar||(function(){var x=function(b){return x=Object.getOwnPropertyNames||function(v){var p=[];for(var l in v)Object.prototype.hasOwnProperty.call(v,l)&&(p[p.length]=l);return p},x(b)};return function(b){if(b&&b.__esModule)return b;var v={};if(b!=null)for(var p=x(b),l=0;l<p.length;l++)p[l]!=="default"&&e(v,b,p[l]);return t(v,b),v}})(),a=ae&&ae.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.default=g;const i=a(ec()),r=tc(),s=a(ac()),c=n(or());function d(x,b=!1){return x=(0,r.escapeCarriageReturn)(w(x)),i.default.ansiToJson(x,{json:!0,remove_empty:!0,use_classes:b})}function m(x){let b="";return x.bg&&(b+=`${x.bg}-bg `),x.fg&&(b+=`${x.fg}-fg `),x.decoration&&(b+=`ansi-${x.decoration} `),b===""?null:(b=b.substring(0,b.length-1),b)}function f(x){const b={};switch(x.bg&&(b.backgroundColor=`rgb(${x.bg})`),x.fg&&(b.color=`rgb(${x.fg})`),x.decoration){case"bold":b.fontWeight="bold";break;case"dim":b.opacity="0.5";break;case"italic":b.fontStyle="italic";break;case"hidden":b.visibility="hidden";break;case"strikethrough":b.textDecoration="line-through";break;case"underline":b.textDecoration="underline";break;case"blink":b.textDecoration="blink";break}return b}function y(x,b,v,p){const l=b?null:f(v),k=b?m(v):null;return x?x==="fuzzy"?F(v,p,l,k):h(v,p,l,k):c.createElement("span",{style:l,key:p,className:k},v.content)}function h(x,b,v,p){const l=[],k=/(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;let _=0,A;for(;(A=k.exec(x.content))!==null;){const[,T,j]=A,E=A.index+T.length;E>_&&l.push(x.content.substring(_,E));const C=j.startsWith("www.")?`http://${j}`:j;l.push(c.createElement("a",{key:_,href:C,target:"_blank"},`${j}`)),_=k.lastIndex}return _<x.content.length&&l.push(x.content.substring(_)),c.createElement("span",{style:v,key:b,className:p},l)}function F(x,b,v,p){var l;const k=(0,s.default)({fuzzyEmail:!1}).tlds(["io"],!0);if(!k.pretest(x.content))return c.createElement("span",{style:v,key:b,className:p},x.content);const _=k.match(x.content);if(!_)return c.createElement("span",{style:v,key:b,className:p},x.content);const A=[x.content.substring(0,(l=_[0])===null||l===void 0?void 0:l.index)];return _.forEach((T,j)=>{var E;A.push(c.createElement("a",{href:T.url,target:"_blank",key:j},x.content.substring(T.index,T.lastIndex))),_[j+1]&&A.push(x.content.substring(_[j].lastIndex,(E=_[j+1])===null||E===void 0?void 0:E.index))}),_[_.length-1].lastIndex!==x.content.length&&A.push(x.content.substring(_[_.length-1].lastIndex,x.content.length)),c.createElement("span",{style:v,key:b,className:p},A)}function g(x){const{className:b,useClasses:v,children:p,linkify:l}=x;return c.createElement("code",{className:b},d(p??"",v??!1).map(y.bind(null,l??!1,v??!1)))}function w(x){let b=x;do x=b,b=x.replace(/[^\n]\x08/gm,"");while(b.length<x.length);return x}return ae}var rc=ic();const oc=Bn(rc),sc=u.lazy(()=>Hn(()=>import("./index-DlvUENo4.js"),__vite__mapDeps([28,1,2,29]))),lc={...Jl,container:"bg-transparent text-xs font-mono leading-relaxed",label:"text-muted-foreground font-medium mr-1",clickableLabel:"text-muted-foreground font-medium mr-1 cursor-pointer",nullValue:"text-muted-foreground italic",undefinedValue:"text-muted-foreground italic",stringValue:"text-foreground",booleanValue:"text-amber-400",numberValue:"text-blue-400",otherValue:"text-muted-foreground",punctuation:"text-muted-foreground",collapseIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▾"]',expandIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▸"]',collapsedContent:'text-muted-foreground mr-1 cursor-pointer after:text-[0.8em] after:content-["…"]'},yn=5120;function cc(e){try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&("old_string"in t||"new_string"in t)?t:null}catch{return null}}function pt({children:e,rawContent:t,supportsRawToggle:n,isRaw:a,onToggleRaw:i}){const[r,s]=u.useState(!1),c=t.length>yn,d=c&&!r?t.slice(0,yn):t;return o.jsxs("div",{className:"space-y-1",children:[n&&o.jsx("div",{className:"flex justify-end",children:o.jsx("button",{onClick:i,className:"text-muted-foreground hover:text-foreground text-xs underline",children:a?"Formatted":"Raw"})}),a?o.jsxs(o.Fragment,{children:[o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:d}),c&&!r&&o.jsxs("button",{onClick:()=>s(!0),className:"text-muted-foreground hover:text-foreground text-xs underline",children:["Show full output (",(t.length/1024).toFixed(1),"KB)"]})]}):e]})}function uc({oldValue:e,newValue:t,rawContent:n}){return o.jsx(u.Suspense,{fallback:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:n}),children:o.jsx(sc,{oldValue:e,newValue:t,splitView:!1,useDarkTheme:!0,hideLineNumbers:!0,showDiffOnly:!0,extraLinesSurroundingDiff:2,styles:{variables:{dark:{diffViewerBackground:"transparent",addedBackground:"rgba(34, 197, 94, 0.1)",addedColor:"rgb(134, 239, 172)",addedGutterBackground:"rgba(34, 197, 94, 0.08)",wordAddedBackground:"rgba(34, 197, 94, 0.2)",removedBackground:"rgba(239, 68, 68, 0.1)",removedColor:"rgb(252, 165, 165)",removedGutterBackground:"rgba(239, 68, 68, 0.08)",wordRemovedBackground:"rgba(239, 68, 68, 0.2)",gutterBackground:"hsl(0 0% 9%)",gutterBackgroundDark:"hsl(0 0% 7%)",gutterColor:"hsl(0 0% 40%)"}}}})})}function wu({content:e,toolName:t,input:n}){const[a,i]=u.useState(!1);if(t==="Edit"&&n){const s=cc(n);if(s)return o.jsx(uc,{oldValue:s.old_string??"",newValue:s.new_string??"",rawContent:e})}const r=Lr(e);if(r==="json"){let s;try{s=JSON.parse(e)}catch{s={}}return o.jsx(pt,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(c=>!c),children:o.jsx(Ql,{data:s,style:lc,shouldExpandNode:Xl})})}return r==="ansi"?o.jsx(pt,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(s=>!s),children:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:o.jsx(oc,{children:e})})}):o.jsx(pt,{rawContent:e,supportsRawToggle:!1,isRaw:!0,onToggleRaw:()=>{},children:null})}const kn=Nt(e=>({episodes:new Set,choose:t=>e(n=>n.episodes.has(t)?n:{episodes:new Set([...n.episodes,t])})}));function dc(e,t){return`${e}\0${t}`}function Du(e,t){const n=t===null?null:dc(e,t),a=kn(r=>n!==null&&r.episodes.has(n)),i=kn(r=>r.choose);return{continuedHere:a,continueHere:()=>{n!==null&&i(n)}}}const pc=/\|\||&&|;|\|/,mc=/<<|>/,wn=60;function fc(e){if(!e)return null;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function de(e,t){const n=e[t];return typeof n=="string"&&n.length>0?n:void 0}function gc(e,t){const n=e.split(`
32
+ `+n(i.slice(r+1))}return ze.exports=e,ze.exports.escapeCarriageReturn=e,ze.exports.escapeCarriageReturnSafe=a,ze.exports}var ye={},hn;function nc(){if(hn)return ye;hn=1;var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,a=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,i=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;return ye.Any=e,ye.Cc=t,ye.Cf=n,ye.P=a,ye.S=i,ye.Z=r,ye}var dt,vn;function ac(){if(vn)return dt;vn=1;var e=nc();function t(p){const l={};p=p||{},l.src_Any=e.Any.source,l.src_Cc=e.Cc.source,l.src_Z=e.Z.source,l.src_P=e.P.source,l.src_ZPCc=[l.src_Z,l.src_P,l.src_Cc].join("|"),l.src_ZCc=[l.src_Z,l.src_Cc].join("|");const k="[><|]";return l.src_pseudo_letter=`(?:(?!${k}|${l.src_ZPCc})${l.src_Any})`,l.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",l.src_auth=`(?:(?:(?!${l.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,l.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",l.src_host_terminator=`(?=$|${k}|${l.src_ZPCc})(?!${p["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${l.src_ZPCc}))`,l.src_path=`(?:[/?#](?:(?!${l.src_ZCc}|${k}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${l.src_ZCc}|\\]).)*\\]|\\((?:(?!${l.src_ZCc}|[)]).)*\\)|\\{(?:(?!${l.src_ZCc}|[}]).)*\\}|\\"(?:(?!${l.src_ZCc}|["]).)+\\"|\\'(?:(?!${l.src_ZCc}|[']).)+\\'|\\'(?=${l.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${l.src_ZCc}|[.]|$)|`+(p["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${l.src_ZCc}|$)|;(?!${l.src_ZCc}|$)|\\!+(?!${l.src_ZCc}|[!]|$)|\\?(?!${l.src_ZCc}|[?]|$))+|\\/)?`,l.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',l.src_xn="xn--[a-z0-9\\-]{1,59}",l.src_domain_root="(?:"+l.src_xn+`|${l.src_pseudo_letter}{1,63})`,l.src_domain="(?:"+l.src_xn+`|(?:${l.src_pseudo_letter})|(?:${l.src_pseudo_letter}(?:-|${l.src_pseudo_letter}){0,61}${l.src_pseudo_letter}))`,l.src_host=`(?:(?:(?:(?:${l.src_domain})\\.)*${l.src_domain}))`,l.tpl_host_fuzzy="(?:"+l.src_ip4+`|(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%)))`,l.tpl_host_no_ip_fuzzy=`(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%))`,l.src_host_strict=l.src_host+l.src_host_terminator,l.tpl_host_fuzzy_strict=l.tpl_host_fuzzy+l.src_host_terminator,l.src_host_port_strict=l.src_host+l.src_port+l.src_host_terminator,l.tpl_host_port_fuzzy_strict=l.tpl_host_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_port_no_ip_fuzzy_strict=l.tpl_host_no_ip_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${l.src_ZPCc}|>|$))`,l.tpl_email_fuzzy=`(^|${k}|"|\\(|${l.src_ZCc})(${l.src_email_name}@${l.tpl_host_fuzzy_strict})`,l.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_fuzzy_strict}${l.src_path})`,l.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_no_ip_fuzzy_strict}${l.src_path})`,l}function n(p){return Array.prototype.slice.call(arguments,1).forEach(function(k){k&&Object.keys(k).forEach(function(_){p[_]=k[_]})}),p}function a(p){return Object.prototype.toString.call(p)}function i(p){return a(p)==="[object String]"}function r(p){return a(p)==="[object Object]"}function s(p){return a(p)==="[object RegExp]"}function c(p){return a(p)==="[object Function]"}function d(p){return p.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const m={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function f(p){return Object.keys(p||{}).reduce(function(l,k){return l||m.hasOwnProperty(k)},!1)}const y={"http:":{validate:function(p,l,k){const _=p.slice(l);return k.re.http||(k.re.http=new RegExp(`^\\/\\/${k.re.src_auth}${k.re.src_host_port_strict}${k.re.src_path}`,"i")),k.re.http.test(_)?_.match(k.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(p,l,k){const _=p.slice(l);return k.re.no_http||(k.re.no_http=new RegExp("^"+k.re.src_auth+`(?:localhost|(?:(?:${k.re.src_domain})\\.)+${k.re.src_domain_root})`+k.re.src_port+k.re.src_host_terminator+k.re.src_path,"i")),k.re.no_http.test(_)?l>=3&&p[l-3]===":"||l>=3&&p[l-3]==="/"?0:_.match(k.re.no_http)[0].length:0}},"mailto:":{validate:function(p,l,k){const _=p.slice(l);return k.re.mailto||(k.re.mailto=new RegExp(`^${k.re.src_email_name}@${k.re.src_host_strict}`,"i")),k.re.mailto.test(_)?_.match(k.re.mailto)[0].length:0}}},h="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",F="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function g(p){return function(l,k){const _=l.slice(k);return p.test(_)?_.match(p)[0].length:0}}function w(){return function(p,l){l.normalize(p)}}function x(p){const l=p.re=t(p.__opts__),k=p.__tlds__.slice();p.onCompile(),p.__tlds_replaced__||k.push(h),k.push(l.src_xn),l.src_tlds=k.join("|");function _(E){return E.replace("%TLDS%",l.src_tlds)}l.email_fuzzy=RegExp(_(l.tpl_email_fuzzy),"i"),l.email_fuzzy_global=RegExp(_(l.tpl_email_fuzzy),"ig"),l.link_fuzzy=RegExp(_(l.tpl_link_fuzzy),"i"),l.link_fuzzy_global=RegExp(_(l.tpl_link_fuzzy),"ig"),l.link_no_ip_fuzzy=RegExp(_(l.tpl_link_no_ip_fuzzy),"i"),l.link_no_ip_fuzzy_global=RegExp(_(l.tpl_link_no_ip_fuzzy),"ig"),l.host_fuzzy_test=RegExp(_(l.tpl_host_fuzzy_test),"i");const A=[];p.__compiled__={};function T(E,C){throw new Error(`(LinkifyIt) Invalid schema "${E}": ${C}`)}Object.keys(p.__schemas__).forEach(function(E){const C=p.__schemas__[E];if(C===null)return;const L={validate:null,link:null};if(p.__compiled__[E]=L,r(C)){s(C.validate)?L.validate=g(C.validate):c(C.validate)?L.validate=C.validate:T(E,C),c(C.normalize)?L.normalize=C.normalize:C.normalize?T(E,C):L.normalize=w();return}if(i(C)){A.push(E);return}T(E,C)}),A.forEach(function(E){p.__compiled__[p.__schemas__[E]]&&(p.__compiled__[E].validate=p.__compiled__[p.__schemas__[E]].validate,p.__compiled__[E].normalize=p.__compiled__[p.__schemas__[E]].normalize)}),p.__compiled__[""]={validate:null,normalize:w()};const j=Object.keys(p.__compiled__).filter(function(E){return E.length>0&&p.__compiled__[E]}).map(d).join("|");p.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${j})`,"i"),p.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${j})`,"ig"),p.re.schema_at_start=RegExp(`^${p.re.schema_search.source}`,"i"),p.re.pretest=RegExp(`(${p.re.schema_test.source})|(${p.re.host_fuzzy_test.source})|@`,"i")}function b(p,l,k,_){const A=p.slice(k,_);this.schema=l.toLowerCase(),this.index=k,this.lastIndex=_,this.raw=A,this.text=A,this.url=A}function v(p,l){if(!(this instanceof v))return new v(p,l);l||f(p)&&(l=p,p={}),this.__opts__=n({},m,l),this.__schemas__=n({},y,p),this.__compiled__={},this.__tlds__=F,this.__tlds_replaced__=!1,this.re={},x(this)}return v.prototype.add=function(l,k){return this.__schemas__[l]=k,x(this),this},v.prototype.set=function(l){return this.__opts__=n(this.__opts__,l),this},v.prototype.test=function(l){if(!l.length)return!1;let k,_;if(this.re.schema_test.test(l)){for(_=this.re.schema_search,_.lastIndex=0;(k=_.exec(l))!==null;)if(this.testSchemaAt(l,k[2],_.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&l.search(this.re.host_fuzzy_test)>=0&&l.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&l.indexOf("@")>=0&&l.match(this.re.email_fuzzy)!==null)},v.prototype.pretest=function(l){return this.re.pretest.test(l)},v.prototype.testSchemaAt=function(l,k,_){return this.__compiled__[k.toLowerCase()]?this.__compiled__[k.toLowerCase()].validate(l,_,this):0},v.prototype.match=function(l){const k=[],_=[],A=[],T=[];let j,E,C;function L(z,$){return z?$?z.index!==$.index?z.index<$.index?z:$:z.lastIndex>=$.lastIndex?z:$:z:$}if(!l.length)return null;if(this.re.schema_test.test(l))for(C=this.re.schema_search,C.lastIndex=0;(j=C.exec(l))!==null;)E=this.testSchemaAt(l,j[2],C.lastIndex),E&&_.push({schema:j[2],index:j.index+j[1].length,lastIndex:j.index+j[0].length+E});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(C=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,C.lastIndex=0;(j=C.exec(l))!==null;)A.push({schema:"",index:j.index+j[1].length,lastIndex:j.index+j[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(C=this.re.email_fuzzy_global,C.lastIndex=0;(j=C.exec(l))!==null;)T.push({schema:"mailto:",index:j.index+j[1].length,lastIndex:j.index+j[0].length});const I=[0,0,0];let S=0;for(;;){const z=[_[I[0]],T[I[1]],A[I[2]]],$=L(L(z[0],z[1]),z[2]);if(!$)break;if($===z[0]?I[0]++:$===z[1]?I[1]++:I[2]++,$.index<S)continue;const X=new b(l,$.schema,$.index,$.lastIndex);this.__compiled__[X.schema].normalize(X,this),k.push(X),S=$.lastIndex}return k.length?k:null},v.prototype.matchAtStart=function(l){if(!l.length)return null;const k=this.re.schema_at_start.exec(l);if(!k)return null;const _=this.testSchemaAt(l,k[2],k[0].length);if(!_)return null;const A=new b(l,k[2],k.index+k[1].length,k.index+k[0].length+_);return this.__compiled__[A.schema].normalize(A,this),A},v.prototype.tlds=function(l,k){return l=Array.isArray(l)?l:[l],k?(this.__tlds__=this.__tlds__.concat(l).sort().filter(function(_,A,T){return _!==T[A-1]}).reverse(),x(this),this):(this.__tlds__=l.slice(),this.__tlds_replaced__=!0,x(this),this)},v.prototype.normalize=function(l){l.schema||(l.url=`http://${l.url}`),l.schema==="mailto:"&&!/^mailto:/i.test(l.url)&&(l.url=`mailto:${l.url}`)},v.prototype.onCompile=function(){},dt=v,dt}var bn;function ic(){if(bn)return ae;bn=1;var e=ae&&ae.__createBinding||(Object.create?(function(x,b,v,p){p===void 0&&(p=v);var l=Object.getOwnPropertyDescriptor(b,v);(!l||("get"in l?!b.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return b[v]}}),Object.defineProperty(x,p,l)}):(function(x,b,v,p){p===void 0&&(p=v),x[p]=b[v]})),t=ae&&ae.__setModuleDefault||(Object.create?(function(x,b){Object.defineProperty(x,"default",{enumerable:!0,value:b})}):function(x,b){x.default=b}),n=ae&&ae.__importStar||(function(){var x=function(b){return x=Object.getOwnPropertyNames||function(v){var p=[];for(var l in v)Object.prototype.hasOwnProperty.call(v,l)&&(p[p.length]=l);return p},x(b)};return function(b){if(b&&b.__esModule)return b;var v={};if(b!=null)for(var p=x(b),l=0;l<p.length;l++)p[l]!=="default"&&e(v,b,p[l]);return t(v,b),v}})(),a=ae&&ae.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.default=g;const i=a(ec()),r=tc(),s=a(ac()),c=n(or());function d(x,b=!1){return x=(0,r.escapeCarriageReturn)(w(x)),i.default.ansiToJson(x,{json:!0,remove_empty:!0,use_classes:b})}function m(x){let b="";return x.bg&&(b+=`${x.bg}-bg `),x.fg&&(b+=`${x.fg}-fg `),x.decoration&&(b+=`ansi-${x.decoration} `),b===""?null:(b=b.substring(0,b.length-1),b)}function f(x){const b={};switch(x.bg&&(b.backgroundColor=`rgb(${x.bg})`),x.fg&&(b.color=`rgb(${x.fg})`),x.decoration){case"bold":b.fontWeight="bold";break;case"dim":b.opacity="0.5";break;case"italic":b.fontStyle="italic";break;case"hidden":b.visibility="hidden";break;case"strikethrough":b.textDecoration="line-through";break;case"underline":b.textDecoration="underline";break;case"blink":b.textDecoration="blink";break}return b}function y(x,b,v,p){const l=b?null:f(v),k=b?m(v):null;return x?x==="fuzzy"?F(v,p,l,k):h(v,p,l,k):c.createElement("span",{style:l,key:p,className:k},v.content)}function h(x,b,v,p){const l=[],k=/(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;let _=0,A;for(;(A=k.exec(x.content))!==null;){const[,T,j]=A,E=A.index+T.length;E>_&&l.push(x.content.substring(_,E));const C=j.startsWith("www.")?`http://${j}`:j;l.push(c.createElement("a",{key:_,href:C,target:"_blank"},`${j}`)),_=k.lastIndex}return _<x.content.length&&l.push(x.content.substring(_)),c.createElement("span",{style:v,key:b,className:p},l)}function F(x,b,v,p){var l;const k=(0,s.default)({fuzzyEmail:!1}).tlds(["io"],!0);if(!k.pretest(x.content))return c.createElement("span",{style:v,key:b,className:p},x.content);const _=k.match(x.content);if(!_)return c.createElement("span",{style:v,key:b,className:p},x.content);const A=[x.content.substring(0,(l=_[0])===null||l===void 0?void 0:l.index)];return _.forEach((T,j)=>{var E;A.push(c.createElement("a",{href:T.url,target:"_blank",key:j},x.content.substring(T.index,T.lastIndex))),_[j+1]&&A.push(x.content.substring(_[j].lastIndex,(E=_[j+1])===null||E===void 0?void 0:E.index))}),_[_.length-1].lastIndex!==x.content.length&&A.push(x.content.substring(_[_.length-1].lastIndex,x.content.length)),c.createElement("span",{style:v,key:b,className:p},A)}function g(x){const{className:b,useClasses:v,children:p,linkify:l}=x;return c.createElement("code",{className:b},d(p??"",v??!1).map(y.bind(null,l??!1,v??!1)))}function w(x){let b=x;do x=b,b=x.replace(/[^\n]\x08/gm,"");while(b.length<x.length);return x}return ae}var rc=ic();const oc=Bn(rc),sc=u.lazy(()=>Hn(()=>import("./index-DzVJOMZm.js"),__vite__mapDeps([29,1,2,30]))),lc={...Jl,container:"bg-transparent text-xs font-mono leading-relaxed",label:"text-muted-foreground font-medium mr-1",clickableLabel:"text-muted-foreground font-medium mr-1 cursor-pointer",nullValue:"text-muted-foreground italic",undefinedValue:"text-muted-foreground italic",stringValue:"text-foreground",booleanValue:"text-amber-400",numberValue:"text-blue-400",otherValue:"text-muted-foreground",punctuation:"text-muted-foreground",collapseIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▾"]',expandIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▸"]',collapsedContent:'text-muted-foreground mr-1 cursor-pointer after:text-[0.8em] after:content-["…"]'},yn=5120;function cc(e){try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&("old_string"in t||"new_string"in t)?t:null}catch{return null}}function pt({children:e,rawContent:t,supportsRawToggle:n,isRaw:a,onToggleRaw:i}){const[r,s]=u.useState(!1),c=t.length>yn,d=c&&!r?t.slice(0,yn):t;return o.jsxs("div",{className:"space-y-1",children:[n&&o.jsx("div",{className:"flex justify-end",children:o.jsx("button",{onClick:i,className:"text-muted-foreground hover:text-foreground text-xs underline",children:a?"Formatted":"Raw"})}),a?o.jsxs(o.Fragment,{children:[o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:d}),c&&!r&&o.jsxs("button",{onClick:()=>s(!0),className:"text-muted-foreground hover:text-foreground text-xs underline",children:["Show full output (",(t.length/1024).toFixed(1),"KB)"]})]}):e]})}function uc({oldValue:e,newValue:t,rawContent:n}){return o.jsx(u.Suspense,{fallback:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:n}),children:o.jsx(sc,{oldValue:e,newValue:t,splitView:!1,useDarkTheme:!0,hideLineNumbers:!0,showDiffOnly:!0,extraLinesSurroundingDiff:2,styles:{variables:{dark:{diffViewerBackground:"transparent",addedBackground:"rgba(34, 197, 94, 0.1)",addedColor:"rgb(134, 239, 172)",addedGutterBackground:"rgba(34, 197, 94, 0.08)",wordAddedBackground:"rgba(34, 197, 94, 0.2)",removedBackground:"rgba(239, 68, 68, 0.1)",removedColor:"rgb(252, 165, 165)",removedGutterBackground:"rgba(239, 68, 68, 0.08)",wordRemovedBackground:"rgba(239, 68, 68, 0.2)",gutterBackground:"hsl(0 0% 9%)",gutterBackgroundDark:"hsl(0 0% 7%)",gutterColor:"hsl(0 0% 40%)"}}}})})}function wu({content:e,toolName:t,input:n}){const[a,i]=u.useState(!1);if(t==="Edit"&&n){const s=cc(n);if(s)return o.jsx(uc,{oldValue:s.old_string??"",newValue:s.new_string??"",rawContent:e})}const r=Lr(e);if(r==="json"){let s;try{s=JSON.parse(e)}catch{s={}}return o.jsx(pt,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(c=>!c),children:o.jsx(Ql,{data:s,style:lc,shouldExpandNode:Xl})})}return r==="ansi"?o.jsx(pt,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(s=>!s),children:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:o.jsx(oc,{children:e})})}):o.jsx(pt,{rawContent:e,supportsRawToggle:!1,isRaw:!0,onToggleRaw:()=>{},children:null})}const kn=Nt(e=>({episodes:new Set,choose:t=>e(n=>n.episodes.has(t)?n:{episodes:new Set([...n.episodes,t])})}));function dc(e,t){return`${e}\0${t}`}function Du(e,t){const n=t===null?null:dc(e,t),a=kn(r=>n!==null&&r.episodes.has(n)),i=kn(r=>r.choose);return{continuedHere:a,continueHere:()=>{n!==null&&i(n)}}}const pc=/\|\||&&|;|\|/,mc=/<<|>/,wn=60;function fc(e){if(!e)return null;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function de(e,t){const n=e[t];return typeof n=="string"&&n.length>0?n:void 0}function gc(e,t){const n=e.split(`
33
33
  `),a=t.split(`
34
34
  `);let i=0;for(;i<n.length&&i<a.length&&n[i]===a[i];)i++;let r=0;for(;r<n.length-i&&r<a.length-i&&n[n.length-1-r]===a[a.length-1-r];)r++;const s=i+r;return{additions:Math.max(0,a.length-s),deletions:Math.max(0,n.length-s)}}function Dt(e){const t=e.old_string,n=e.new_string;if(!(typeof t!="string"&&typeof n!="string"))return gc(typeof t=="string"?t:"",typeof n=="string"?n:"")}function xc(e){const t=e.edits;if(!Array.isArray(t))return Dt(e);let n=0,a=0,i=!1;for(const r of t){if(typeof r!="object"||r===null)continue;const s=Dt(r);s&&(n+=s.additions,a+=s.deletions,i=!0)}return i?{additions:n,deletions:a}:void 0}function hc(e){return e?` +${e.additions} −${e.deletions}`:""}function vc(e){return e.length===0?0:e.replace(/\n$/,"").split(`
35
35
  `).length}function za(e){const t=e.replace(/\/+$/,"");if(t.length===0)return e;const n=t.startsWith("/"),a=[];for(const r of t.split("/"))if(!(r===""||r===".")){if(r===".."){const s=a[a.length-1];s!==void 0&&s!==".."?a.pop():n||a.push("..");continue}a.push(r)}const i=a.join("/");return i.length===0?n?"/":e:n?`/${i}`:i}function bc(e,t){if(e===t)return!0;const n=e.startsWith("/")?e:t,a=e.startsWith("/")?t:e;return!n.startsWith("/")||a.startsWith("/")?!1:n.endsWith(`/${a}`)}function Ia(e){const t=za(e).split("/");return t[t.length-1]||e}function yc(e){try{const t=new URL(e);return t.hash="",t.toString()}catch{return e}}function kc(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function wc(e){if(!e)return;const t=e.trim();if(t.length===0)return;if(/^no (matches|files)/i.test(t))return 0;const n=/^(\d+)$/.exec(t);if(n)return Number(n[1]);const a=/(\d+)\s+(?:matches?|lines?)/i.exec(t);if(a)return Number(a[1]);if(!/\d+\s+files?/i.test(t))return t.split(`