dorkos 0.125.0 → 0.125.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/bin/cli.js +27 -15
  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-GdrU2Z3k.js → AboutPage-BqGlH1pd.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-D1T74VJE.js → ActivityErrorState-C4hqCedX.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-7GXGUwd1.js → ActivityPage-frpyizcK.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-C-8dACWp.js → ActivityRow-DB9c3g1G.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-CRRs6yil.js → AdapterIcon-CEHkdca8.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-K6DsejqG.js → AdapterSetupWizard-DLJMkb-u.js} +1 -1
  10. package/dist/client/assets/{AgentOptionRow-CF5XZmBx.js → AgentOptionRow-D-QjHi5k.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-BXes2ymU.js → AgentPicker-DoGucmqI.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-BuXVpWfb.js → AgentRequestCard--9GA9ymH.js} +1 -1
  13. package/dist/client/assets/{AppearancePage-DoqoCU4j.js → AppearancePage-NHNiZrtY.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-By8jgPX3.js → ApplyToOverridesDialog-Clo55n6V.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-CgGyTDmT.js → AttentionSignalRow-BOpClaCD.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-BzDxZ-G5.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-D9Tm8ual.js} +1 -1
  17. package/dist/client/assets/{BindingDialog-BXfjFGvP.js → BindingDialog-DZcTXLE8.js} +1 -1
  18. package/dist/client/assets/{BlintzCanvas-C-dobEns.js → BlintzCanvas-DzjdPTlx.js} +3 -3
  19. package/dist/client/assets/{CanvasCsvContent-ClMFJX7T.js → CanvasCsvContent-xYUrbFeA.js} +1 -1
  20. package/dist/client/assets/{CanvasFileContent-BoDE2jjA.js → CanvasFileContent-D6fTvMea.js} +2 -2
  21. package/dist/client/assets/{CanvasModel3dContent-fnWc0B7B.js → CanvasModel3dContent-DEassnBV.js} +2 -2
  22. package/dist/client/assets/{ChannelComposer-DIRPjyyf.js → ChannelComposer-CutghXOq.js} +3 -3
  23. package/dist/client/assets/{ChatAppsOff-DlCWmwEz.js → ChatAppsOff-C00Nl_w6.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-COsbYyNC.js → CodeMirrorDiff-JYxkSqFi.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-n3l14rY7.js → CodeMirrorEditor-CVXZ9B5S.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-S2O_hvwR.js → CommitmentList-CcCSwcZ8.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-COOCQFpL.js → CommitmentsPage-BrDbzpyR.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-PA9T4FZP.js → ComputerResourceView-BlLvMt1I.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-CnYUWQBS.js → ComputerViewer-B8SWICbj.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-C1ZJtNl-.js → ConnectionAccessLists-Bsb-t24W.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-BBpWiN4-.js → ConnectionsPage-RAhWxuWU.js} +1 -1
  32. package/dist/client/assets/{ConventionPage-sa0Yn2uq.js → ConventionPage-CNij_BXA.js} +1 -1
  33. package/dist/client/assets/{ExtensionPageRoute-BztrmZNp.js → ExtensionPageRoute-BsGqTcyI.js} +1 -1
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-CJrqr29-.js → FloatingTanStackRouterDevtools-CqogiFob-eQVA1bL6.js} +1 -1
  35. package/dist/client/assets/HandlePage-XG5mP_e9.js +1 -0
  36. package/dist/client/assets/{HeartbeatPage-BkyUpdZt.js → HeartbeatPage-D0tKoR6G.js} +1 -1
  37. package/dist/client/assets/{KeyEntry-DAMr1NNY.js → KeyEntry-CSmznLcG.js} +1 -1
  38. package/dist/client/assets/{LexicalField-Cnzrh08A.js → LexicalField-gYKPjFfN.js} +1 -1
  39. package/dist/client/assets/{ManagesPage-EAbQtygH.js → ManagesPage-BF6MFrsv.js} +1 -1
  40. package/dist/client/assets/{Marketplace-BfADALGd.js → Marketplace-BWDlXgwH.js} +1 -1
  41. package/dist/client/assets/{MarketplaceSourcesView-u1WKUk-p.js → MarketplaceSourcesView-BhKzgkiO.js} +1 -1
  42. package/dist/client/assets/{McpAppFrame-Cz-Ttlqr.js → McpAppFrame-BotrzoHd.js} +1 -1
  43. package/dist/client/assets/{McpSigninBody-CkOBUhOz.js → McpSigninBody-CdeX_lYs.js} +1 -1
  44. package/dist/client/assets/{Model3dViewer-CvLaSO7V.js → Model3dViewer-KHktOpbD.js} +1 -1
  45. package/dist/client/assets/NamePage-Cdd9-mZg.js +1 -0
  46. package/dist/client/assets/{NewDirectMessageMenu-Be_4mBPd.js → NewDirectMessageMenu-CuvKJEDY.js} +1 -1
  47. package/dist/client/assets/{NotificationsPage-GCk9gfsW.js → NotificationsPage-DWcgfZJD.js} +1 -1
  48. package/dist/client/assets/{OpenMeshSwitch-BBzgYSUc.js → OpenMeshSwitch-DdJ7g4yD.js} +1 -1
  49. package/dist/client/assets/{OperatorIdentityForm-ZAbJ4FJn.js → OperatorIdentityForm-7FUOEWw_.js} +1 -1
  50. package/dist/client/assets/{PermissionHistory-DgmFpdJK.js → PermissionHistory-CgQhZrvg.js} +1 -1
  51. package/dist/client/assets/{PermissionsPage-DHFt_34a.js → PermissionsPage-CK34y1VF.js} +1 -1
  52. package/dist/client/assets/{PersonalityPopover-CobRy95S.js → PersonalityPopover-3BA36sB0.js} +1 -1
  53. package/dist/client/assets/PhotoPage-DFic-gDH.js +1 -0
  54. package/dist/client/assets/{PreviewRefusedNotice-Ux5sq2Om.js → PreviewRefusedNotice-CnqAE9sr.js} +1 -1
  55. package/dist/client/assets/{ProfileFields-kBzeRPfc.js → ProfileFields-CIbISW83.js} +1 -1
  56. package/dist/client/assets/{ProfilePanelContainer-CREt4ZC3.js → ProfilePanelContainer-DPDHtTbI.js} +1 -1
  57. package/dist/client/assets/{ProfileRolePicker-hQbo8P6M.js → ProfileRolePicker-83GFtm2P.js} +1 -1
  58. package/dist/client/assets/{PromptSuggestionChips-CmW1lIso.js → PromptSuggestionChips-B9chKG4w.js} +1 -1
  59. package/dist/client/assets/{ReportsToPopover-Dpa-_NsO.js → ReportsToPopover-DUv03JZP.js} +1 -1
  60. package/dist/client/assets/{RoomSurface-BQhgKnIE.js → RoomSurface-Bq6Slne3.js} +1 -1
  61. package/dist/client/assets/{RoomsPage-BHUDRYzJ.js → RoomsPage-BKxzz-nN.js} +1 -1
  62. package/dist/client/assets/{RunsOnPopover-bGZ6VJoF.js → RunsOnPopover-BIdmMhs9.js} +1 -1
  63. package/dist/client/assets/{RuntimeConnectFlow-DN2ElvcH.js → RuntimeConnectFlow-IaRVgmqH.js} +1 -1
  64. package/dist/client/assets/{RuntimeSetupDialog-CUFie4LV.js → RuntimeSetupDialog-Er-lzjmK.js} +1 -1
  65. package/dist/client/assets/{SeenDevices-D_FnsL7V.js → SeenDevices-9quCcdUW.js} +1 -1
  66. package/dist/client/assets/{SessionsPage-1uOPUCP9.js → SessionsPage-CGic5VaN.js} +1 -1
  67. package/dist/client/assets/{SettingsDialog-AbwEHDG8.js → SettingsDialog-BZ58IaK1.js} +1 -1
  68. package/dist/client/assets/{SkillsPage-BEobBuAr.js → SkillsPage-VRYwez5T.js} +1 -1
  69. package/dist/client/assets/{TaskDialogWrapper-BAFSmT-z.js → TaskDialogWrapper-C9LMV8oe.js} +1 -1
  70. package/dist/client/assets/{TasksEmptyState-BFw2ODM-.js → TasksEmptyState-CagC0LAa.js} +1 -1
  71. package/dist/client/assets/{TasksPage-C0CMgSFx.js → TasksPage-3gkHB1Pv.js} +1 -1
  72. package/dist/client/assets/{TeamComputerEntry-BpjxLA1n.js → TeamComputerEntry-BD89Y5e6.js} +1 -1
  73. package/dist/client/assets/{ToolsPage-dx-rQ2F1.js → ToolsPage-Ds6LwY79.js} +1 -1
  74. package/dist/client/assets/{TopologyGraph-LpxkBhGK.js → TopologyGraph-CiZ2ACcQ.js} +1 -1
  75. package/dist/client/assets/{TourHost--UYZoKlJ.js → TourHost-BISNaEzZ.js} +1 -1
  76. package/dist/client/assets/{UnlinkDialog-BN2odbqD.js → UnlinkDialog-DTuXHNsi.js} +1 -1
  77. package/dist/client/assets/{UnreadDivider-LbVIAoxM.js → UnreadDivider-l_VZ7ECn.js} +1 -1
  78. package/dist/client/assets/{WidgetErrorCard-CAUx4KUI.js → WidgetErrorCard-I8WiJv2g.js} +1 -1
  79. package/dist/client/assets/{WorkView-DVx4WoVI.js → WorkView-_wehEEl-.js} +3 -3
  80. package/dist/client/assets/_shell-BLcPeb8K.js +80 -0
  81. package/dist/client/assets/{_shell._home-uuqgFA3M.js → _shell._home-CcRH-M-A.js} +1 -1
  82. package/dist/client/assets/{_shell._home.activity-CiMsy7bF.js → _shell._home.activity-cR24Vr9Q.js} +1 -1
  83. package/dist/client/assets/{_shell._home.index-0Zm5q3-G.js → _shell._home.index-agU2ItcI.js} +1 -1
  84. package/dist/client/assets/{_shell._home.tasks-BClPai4g.js → _shell._home.tasks-BDR9JTj3.js} +1 -1
  85. package/dist/client/assets/{_shell._home.workspaces-DH4BgLT0.js → _shell._home.workspaces-B4nlcACK.js} +1 -1
  86. package/dist/client/assets/{_shell.channels-BGXkXPhY.js → _shell.channels-B7lTxkqM.js} +1 -1
  87. package/dist/client/assets/{_shell.connections-BwjXkgi1.js → _shell.connections-CWQYcH58.js} +1 -1
  88. package/dist/client/assets/{_shell.feedback-requests-j7gTBF5b.js → _shell.feedback-requests-BkgHtyZr.js} +1 -1
  89. package/dist/client/assets/_shell.marketplace-BMqwT9qX.js +1 -0
  90. package/dist/client/assets/_shell.marketplace_.sources-pXGa7Cqb.js +1 -0
  91. package/dist/client/assets/_shell.session-CmoE1W38.js +1 -0
  92. package/dist/client/assets/{_shell.team-BgJu1gDa.js → _shell.team-CTIVEpZQ.js} +3 -3
  93. package/dist/client/assets/{_shell.threads-C1IJJzcf.js → _shell.threads-ClWYrnld.js} +1 -1
  94. package/dist/client/assets/_shell.x._extensionId-BiXilrSW.js +1 -0
  95. package/dist/client/assets/_shell.x._extensionId_._-BiXilrSW.js +1 -0
  96. package/dist/client/assets/{abnfDiagram-WEYOIA3C-BuEHMh0D.js → abnfDiagram-WEYOIA3C-0-Mx5lSG.js} +1 -1
  97. package/dist/client/assets/{access-copy-BZNjpw9v.js → access-copy-Cj31J6PU.js} +1 -1
  98. package/dist/client/assets/{arc-BbGU9Ctb.js → arc-DVmpcNHP.js} +1 -1
  99. package/dist/client/assets/{architectureDiagram-ZHVYKT53-CdRG5sTM.js → architectureDiagram-ZHVYKT53-BZhMXbuC.js} +1 -1
  100. package/dist/client/assets/{banner-C7kHJJGz.js → banner-Ctq7kvQ0.js} +1 -1
  101. package/dist/client/assets/{blockDiagram-RJAE7QA3-CBQ6YXoI.js → blockDiagram-RJAE7QA3-Ctmof3-7.js} +1 -1
  102. package/dist/client/assets/{c4Diagram-XDPPPE54-DavNcKCF.js → c4Diagram-XDPPPE54-BPglmQhG.js} +1 -1
  103. package/dist/client/assets/{card-D4ek-VvX.js → card-DI7YtQh3.js} +1 -1
  104. package/dist/client/assets/channel-A2WD4smw.js +1 -0
  105. package/dist/client/assets/{chunk-2E7WHVMD-ClO15ze9.js → chunk-2E7WHVMD-DIK6CHka.js} +1 -1
  106. package/dist/client/assets/{chunk-2Q5K7J3B-DsLDzf_i.js → chunk-2Q5K7J3B-C3uATYd9.js} +1 -1
  107. package/dist/client/assets/{chunk-4EMNKR2T-D20fXIIK.js → chunk-4EMNKR2T-Dl3iYXVl.js} +1 -1
  108. package/dist/client/assets/{chunk-55XCU76K-no_S5sRX.js → chunk-55XCU76K-BJF-Hcs9.js} +1 -1
  109. package/dist/client/assets/{chunk-5VM5RSS4-D5xWEZ2p.js → chunk-5VM5RSS4-Cju3BnqQ.js} +1 -1
  110. package/dist/client/assets/{chunk-JWPE2WC7-CnsdZOv0.js → chunk-JWPE2WC7-v1omZzgE.js} +1 -1
  111. package/dist/client/assets/{chunk-VQ5W62QI-DxYg8tsH.js → chunk-VQ5W62QI-2HqA3jPL.js} +1 -1
  112. package/dist/client/assets/{chunk-XXDRQBXY-7CQ-MKdC.js → chunk-XXDRQBXY-RDXwFs9Z.js} +1 -1
  113. package/dist/client/assets/{chunk-ZCHMQSOR-Ca7Jh42b.js → chunk-ZCHMQSOR-DhQsY-OT.js} +2 -2
  114. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-BvZXavcI.js → classDiagram-v2-4MYWR3UA-DC5N-GDk.js} +1 -1
  115. package/dist/client/assets/{command-srO4Wv-5.js → command-DpK0GpDM.js} +1 -1
  116. package/dist/client/assets/{cose-bilkent-JH36ORCC-1NCiJaHv.js → cose-bilkent-JH36ORCC-BriFsb6c.js} +1 -1
  117. package/dist/client/assets/{cpu-CFIu4JtK.js → cpu-DzCUBK-1.js} +1 -1
  118. package/dist/client/assets/{cynefin-EF2NZ3EQ-DgZeohG3.js → cynefin-EF2NZ3EQ-cj34OpiI.js} +1 -1
  119. package/dist/client/assets/{cynefinDiagram-WF24UDRP-MQB2xbJK.js → cynefinDiagram-WF24UDRP-DvAggKpl.js} +1 -1
  120. package/dist/client/assets/{dagre-NK4GIZVX-BFHk_Y44.js → dagre-NK4GIZVX-BskSpt7C.js} +1 -1
  121. package/dist/client/assets/{diagram-CBK3MWTC-CloEvZfp.js → diagram-CBK3MWTC-C6BZljcO.js} +1 -1
  122. package/dist/client/assets/{diagram-I5XIIV2D-9nzUtfKI.js → diagram-I5XIIV2D--4FPRmBZ.js} +1 -1
  123. package/dist/client/assets/{diagram-ODIL2UCW-DVdnelgu.js → diagram-ODIL2UCW-kZxp81Fr.js} +1 -1
  124. package/dist/client/assets/{diagram-PFBEJUXE-tTEeiAHa.js → diagram-PFBEJUXE-BSXBAffS.js} +1 -1
  125. package/dist/client/assets/{diagram-RJA3I4VV-QFehV9_1.js → diagram-RJA3I4VV-DLDPF6FG.js} +1 -1
  126. package/dist/client/assets/{diagram-TYUNFSNR-CYU5li-4.js → diagram-TYUNFSNR-CoU2knZy.js} +1 -1
  127. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-Cn040Beg.js → ebnfDiagram-V4P3TTPT-C77T1UPB.js} +1 -1
  128. package/dist/client/assets/{elk-QONTBCTQ-tBbnwcb3.js → elk-QONTBCTQ-UFXrlbAn.js} +1 -1
  129. package/dist/client/assets/{empty-state-Bxfi7_ss.js → empty-state-aNwJA6H8.js} +1 -1
  130. package/dist/client/assets/{erDiagram-KYQIGQAA-DAA0fFlD.js → erDiagram-KYQIGQAA-CyLB8fKu.js} +1 -1
  131. package/dist/client/assets/{execution-config-afKaYukD.js → execution-config-D7JzMYC2.js} +1 -1
  132. package/dist/client/assets/{file-C-ooqbRY.js → file-bSD5jgk_.js} +1 -1
  133. package/dist/client/assets/{file-exclamation-point-BWWgLsMF.js → file-exclamation-point-BcCIL-rE.js} +1 -1
  134. package/dist/client/assets/{file-text-BJt8biPY.js → file-text-DTvj1wzM.js} +1 -1
  135. package/dist/client/assets/{find-latest-widget-fence-DPQimlUD.js → find-latest-widget-fence-D01ENK2h.js} +1 -1
  136. package/dist/client/assets/{flowDiagram-IUGLLWBU-vYI6TodS.js → flowDiagram-IUGLLWBU-qmnUF-Ak.js} +1 -1
  137. package/dist/client/assets/{form-LJ2Rf9ny.js → form-C_yPntkz.js} +1 -1
  138. package/dist/client/assets/{format-cron-DrUISrHj.js → format-cron-DUPWkOrW.js} +1 -1
  139. package/dist/client/assets/{ganttDiagram-R7GPNTJY-DLYpSX7r.js → ganttDiagram-R7GPNTJY-CBzoqGuU.js} +1 -1
  140. package/dist/client/assets/{git-branch-D5xr7U5P.js → git-branch-ClXAt1_G.js} +1 -1
  141. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DNIbVOaY.js → gitGraphDiagram-PDYL7XHY-DMh_n1S2.js} +1 -1
  142. package/dist/client/assets/{graph-DNjxkUSL.js → graph-BgkuepqW.js} +1 -1
  143. package/dist/client/assets/{heart-DnR_GX4I.js → heart-BrjEmIsl.js} +1 -1
  144. package/dist/client/assets/{highlighted-body-KPVGNVTW-L_Jd2uei.js → highlighted-body-KPVGNVTW-DlHNVEaV.js} +1 -1
  145. package/dist/client/assets/{image-lightbox-DZIhMyF3.js → image-lightbox-BtzkRztd.js} +1 -1
  146. package/dist/client/assets/{image-off-DdvvVxmq.js → image-off-4yaoLh32.js} +1 -1
  147. package/dist/client/assets/{index-B0jt7Nng.js → index-6yT0Qr0s.js} +1 -1
  148. package/dist/client/assets/{index-Ixk2o7yl.js → index-A_qzw4D8.js} +1 -1
  149. package/dist/client/assets/{index-adYd35CJ.js → index-Adjbt_HC.js} +1 -1
  150. package/dist/client/assets/{index-CXWlrRzK.js → index-B-X82FND.js} +1 -1
  151. package/dist/client/assets/{index-BzKkoaB1.js → index-BMCDckcY.js} +1 -1
  152. package/dist/client/assets/index-BOuCpkRb.js +1 -0
  153. package/dist/client/assets/{index-DTuNXPGU.js → index-BUkUamu4.js} +1 -1
  154. package/dist/client/assets/index-BVq1p60h.js +1 -0
  155. package/dist/client/assets/{index-By8pKNSM.js → index-BXtagrMY.js} +1 -1
  156. package/dist/client/assets/{index-CQ2atcs_.js → index-BeVLPg9t.js} +1 -1
  157. package/dist/client/assets/{index-ld6lMfGU.js → index-Bgg4cW4L.js} +1 -1
  158. package/dist/client/assets/{index-Ba9q2CoQ.js → index-BqHUbNdh.js} +1 -1
  159. package/dist/client/assets/{index-DqCxUalt.js → index-BtG4vr8c.js} +1 -1
  160. package/dist/client/assets/{index-BsHyymmC.js → index-C0LPB1iH.js} +1 -1
  161. package/dist/client/assets/{index-CDo6TA8n.js → index-CJhmUsIv.js} +1 -1
  162. package/dist/client/assets/{index-a6ojvFqI.js → index-CMLDdOez.js} +1 -1
  163. package/dist/client/assets/{index-D-Q7CW4p.js → index-CNV11SW6.js} +1 -1
  164. package/dist/client/assets/{index-9GoQjBFo.js → index-CNiC7KUz.js} +1 -1
  165. package/dist/client/assets/{index-By-VWzSF.js → index-CSyZb1X9.js} +1 -1
  166. package/dist/client/assets/{index-B1gC3xYN.js → index-CThGpHO2.js} +1 -1
  167. package/dist/client/assets/{index-uIonuakd.js → index-C_H6ZIel.js} +1 -1
  168. package/dist/client/assets/{index-ANmu61E0.js → index-C_xSr5lb.js} +1 -1
  169. package/dist/client/assets/{index-r0stHl-2.js → index-Cefoks17.js} +1 -1
  170. package/dist/client/assets/{index-DKTd8X7n.js → index-CjUfPyOM.js} +261 -261
  171. package/dist/client/assets/{index-DXWsH2Ep.js → index-Ckut3u-d.js} +1 -1
  172. package/dist/client/assets/{index-BFecX5dC.js → index-CrQWuUpr.js} +1 -1
  173. package/dist/client/assets/{index-xfRcAp50.js → index-CyfSPJ1D.js} +1 -1
  174. package/dist/client/assets/{index-CSqz4B0v.js → index-D0yajRDv.js} +1 -1
  175. package/dist/client/assets/index-D2ZFfqZZ.css +1 -0
  176. package/dist/client/assets/{index-ZYbeRA5f.js → index-DB2t3GUm.js} +3 -3
  177. package/dist/client/assets/{index-Bri5bZfv.js → index-DFWrO42z.js} +1 -1
  178. package/dist/client/assets/{index-BqKjnd_r.js → index-DGdKO24t.js} +1 -1
  179. package/dist/client/assets/{index-5hCWBj-r.js → index-DQ9ppIWv.js} +1 -1
  180. package/dist/client/assets/{index-DjFFFMc-.js → index-DX546SK5.js} +2 -2
  181. package/dist/client/assets/{index-Blhsfk7u.js → index-DXalAOXT.js} +1 -1
  182. package/dist/client/assets/{index-CDGWl8qL.js → index-DZ1BC5JW.js} +1 -1
  183. package/dist/client/assets/{index-BAIKz_P0.js → index-DgxXSEmR.js} +1 -1
  184. package/dist/client/assets/{index-BsmR2hi4.js → index-Dj4I8KcL.js} +3 -3
  185. package/dist/client/assets/{index-Bpwvxz0c.js → index-DrnHzrt4.js} +1 -1
  186. package/dist/client/assets/{index-CLQIvYHP.js → index-FhmSwVD0.js} +1 -1
  187. package/dist/client/assets/{index-BWQfqbbe.js → index-WkQdt6Zo.js} +1 -1
  188. package/dist/client/assets/{index-BYeyKNKj.js → index-WxG6nG96.js} +1 -1
  189. package/dist/client/assets/{index-D0ujPZdD.js → index-f1W4Bd4W.js} +1 -1
  190. package/dist/client/assets/{index-B2wx4J9U.js → index-qdygDruh.js} +1 -1
  191. package/dist/client/assets/{index-CLbs0fcq.js → index-t-NyR7HD.js} +1 -1
  192. package/dist/client/assets/{index.esm-j5KQ_b6S.js → index.esm-Bb3LMu5X.js} +1 -1
  193. package/dist/client/assets/{infoDiagram-MVDRKAX5-DjvSkTas.js → infoDiagram-MVDRKAX5-DbU4eDjZ.js} +1 -1
  194. package/dist/client/assets/{inline-code-DlVYFFW7.js → inline-code-DwFNff3_.js} +1 -1
  195. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-BBivrI5n.js → ishikawaDiagram-HPEHV2GE-DmHmF-HT.js} +1 -1
  196. package/dist/client/assets/{journeyDiagram-BOSHW7O7-DKdhbtdx.js → journeyDiagram-BOSHW7O7-DsjOeP3J.js} +1 -1
  197. package/dist/client/assets/{kanban-definition-FNSA4HC5-CkgAodR5.js → kanban-definition-FNSA4HC5-ByQ1WGy2.js} +1 -1
  198. package/dist/client/assets/{layers-CzyhuVSM.js → layers-DFZUUHM5.js} +1 -1
  199. package/dist/client/assets/{lightbulb-DwGE7s99.js → lightbulb-Bbgsejp1.js} +1 -1
  200. package/dist/client/assets/{link-2-CljREnN9.js → link-2-xieOmwOK.js} +1 -1
  201. package/dist/client/assets/{list-runtime-types-D5ZO30FL.js → list-runtime-types-B0CSonAi.js} +1 -1
  202. package/dist/client/assets/{markdown-content-CN_dGlgE.js → markdown-content-ysBIqFAg.js} +1 -1
  203. package/dist/client/assets/{mention-pill-C6OT4gx4.js → mention-pill-Daeu1X92.js} +1 -1
  204. package/dist/client/assets/{mermaid.core-DNuzxE7q.js → mermaid.core-B1mQMOXd.js} +4 -4
  205. package/dist/client/assets/{message-square-off-DlkAPJdd.js → message-square-off-D9hm8WNH.js} +1 -1
  206. package/dist/client/assets/{mindmap-definition-6OY57UG3-f9ygKKO1.js → mindmap-definition-6OY57UG3-CoP-DGm1.js} +1 -1
  207. package/dist/client/assets/{more-details-DRPervoL.js → more-details-DHCpYDi7.js} +1 -1
  208. package/dist/client/assets/{owner-notice-C-Q9ySA7.js → owner-notice-Crxco7HN.js} +1 -1
  209. package/dist/client/assets/{package-BVNiaGrb.js → package-CD8xq7hk.js} +1 -1
  210. package/dist/client/assets/{page-container-D03bhclt.js → page-container-B9sDc2wq.js} +1 -1
  211. package/dist/client/assets/{pane-resize-handle-CZ9rHhNr.js → pane-resize-handle-DOchpdJ6.js} +1 -1
  212. package/dist/client/assets/{paperclip-DQQVX5tJ.js → paperclip-CzhXW5qi.js} +1 -1
  213. package/dist/client/assets/{path-input-CQ16nhYd.js → path-input-Z2p922fj.js} +1 -1
  214. package/dist/client/assets/{pegDiagram-ECIUJNBX-CZ_YkcKh.js → pegDiagram-ECIUJNBX-TEsMAO1a.js} +1 -1
  215. package/dist/client/assets/{pieDiagram-GNMPY74T-DLHSPEH7.js → pieDiagram-GNMPY74T-CMIDIiMP.js} +1 -1
  216. package/dist/client/assets/{plug-CadJyjTp.js → plug-BEp9Ly3k.js} +1 -1
  217. package/dist/client/assets/{primer-trigger-DH4xfrlM.js → primer-trigger-4qUY83SX.js} +1 -1
  218. package/dist/client/assets/{profile-errors-DSnHlauU.js → profile-errors-CezsKqhA.js} +1 -1
  219. package/dist/client/assets/{progress-BB97hlmb.js → progress-eQl1UvNz.js} +1 -1
  220. package/dist/client/assets/{quadrantDiagram-D57K4MC3-BWcUu48x.js → quadrantDiagram-D57K4MC3-DXjohzOz.js} +1 -1
  221. package/dist/client/assets/{query-error-state-B456s96E.js → query-error-state-COuKRlU0.js} +1 -1
  222. package/dist/client/assets/{radio-DrpN3x3S.js → radio-Cdnkcg1w.js} +1 -1
  223. package/dist/client/assets/{railroadDiagram-Y72NRBL7-C2VRM83h.js → railroadDiagram-Y72NRBL7-BojgH6Hw.js} +1 -1
  224. package/dist/client/assets/registry-BSucT23N.js +1 -0
  225. package/dist/client/assets/{relay-trace-schemas-BYCaGsVJ.js → relay-trace-schemas-XcVQg5Fa.js} +1 -1
  226. package/dist/client/assets/{repeat-DPzic7-j.js → repeat-wB31CP7I.js} +1 -1
  227. package/dist/client/assets/{requirementDiagram-EQYSW5RA-B1bpdcM7.js → requirementDiagram-EQYSW5RA-Gojbrcvg.js} +1 -1
  228. package/dist/client/assets/{room-files-source-aN4p_kDV.js → room-files-source-DXKpm43a.js} +1 -1
  229. package/dist/client/assets/{rotate-ccw-clock-gqBy98sI.js → rotate-ccw-clock-LSKKAcnR.js} +1 -1
  230. package/dist/client/assets/{rotate-cw-mHsqEte-.js → rotate-cw-scTEKxeZ.js} +1 -1
  231. package/dist/client/assets/{sankeyDiagram-SY24JHO5-QCGTTh9k.js → sankeyDiagram-SY24JHO5-QS71aycL.js} +1 -1
  232. package/dist/client/assets/{scroll-area-DVd6ctli.js → scroll-area-BNFXgTKM.js} +1 -1
  233. package/dist/client/assets/{search-x-CzgTzL0z.js → search-x-Cjf0n9z7.js} +1 -1
  234. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-kiR1gX_u.js → sequenceDiagram-BLEHNHQU-Beg7mj69.js} +1 -1
  235. package/dist/client/assets/{shield-x-Btfd3Xnx.js → shield-x-Dr4BZfo_.js} +1 -1
  236. package/dist/client/assets/{signed-in-gS3tMpTW.js → signed-in-L9MLqTuc.js} +1 -1
  237. package/dist/client/assets/{sizeCapture-INFHLROL-Da56aMj0.js → sizeCapture-INFHLROL-3Oo1KjRp.js} +1 -1
  238. package/dist/client/assets/{soul-file-C7zd1yXt.js → soul-file-CxpOawh5.js} +1 -1
  239. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BZ3qlQWl.js → stateDiagram-v2-A6IESKWZ-DFYIDQ6C.js} +1 -1
  240. package/dist/client/assets/{swimlanes-B3ENRKFQ-B-wp91_T.js → swimlanes-B3ENRKFQ-BUgKOOrv.js} +1 -1
  241. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Bqjv1MSj.js +8 -0
  242. package/dist/client/assets/{table-BIdFvzBs.js → table-B0LsKsEv.js} +1 -1
  243. package/dist/client/assets/{timeline-definition-JXYKGLGB-CQojjy-8.js → timeline-definition-JXYKGLGB-BsPZ0P_8.js} +1 -1
  244. package/dist/client/assets/{trust-posture-DszobEjt.js → trust-posture-Cm7OhCEx.js} +1 -1
  245. package/dist/client/assets/{unplug-xlfZ61jC.js → unplug-DLA7Ib_s.js} +1 -1
  246. package/dist/client/assets/{unverified-catalog-notice-DymrAwtm.js → unverified-catalog-notice-CxBO_pta.js} +1 -1
  247. package/dist/client/assets/{use-adapter-catalog-CytBTafV.js → use-adapter-catalog-C333Z2Q6.js} +1 -1
  248. package/dist/client/assets/{use-bindings-BPNK3sUh.js → use-bindings-Bu4yLLR5.js} +1 -1
  249. package/dist/client/assets/{use-composer-prefs-DMQT0qiv.js → use-composer-prefs-BnjCX9pM.js} +1 -1
  250. package/dist/client/assets/{use-connector-management-PDVdWccW.js → use-connector-management-Bo6wOJQS.js} +1 -1
  251. package/dist/client/assets/{use-deep-link-scroll-CwapSmGj.js → use-deep-link-scroll-D867V6rs.js} +1 -1
  252. package/dist/client/assets/{use-delete-binding-CgTwS83G.js → use-delete-binding-DKObM-zT.js} +1 -1
  253. package/dist/client/assets/{use-dev-links-BoZCIc4h.js → use-dev-links-C0Zc30aj.js} +1 -1
  254. package/dist/client/assets/{use-direct-message-panel-Cs4I6669.js → use-direct-message-panel-DNWtQq4B.js} +1 -1
  255. package/dist/client/assets/{use-external-adapter-catalog-PBrsasQ8.js → use-external-adapter-catalog-Bv5rDkX4.js} +1 -1
  256. package/dist/client/assets/{use-full-activity-feed-C2seN-V1.js → use-full-activity-feed-CFUj0qCS.js} +1 -1
  257. package/dist/client/assets/use-is-below-desktop-BUS7OPGv.js +1 -0
  258. package/dist/client/assets/use-is-hub-CFhvDMHt.js +1 -0
  259. package/dist/client/assets/{use-local-browser-CF0uGQ6e.js → use-local-browser-BeZjn0gA.js} +1 -1
  260. package/dist/client/assets/{use-mesh-topology-CnCeK4gS.js → use-mesh-topology-DurMpvjU.js} +1 -1
  261. package/dist/client/assets/{use-mounted-ref-BtAb14HI.js → use-mounted-ref-CBSuPNPv.js} +1 -1
  262. package/dist/client/assets/{use-notification-prefs-B8LHpZTt.js → use-notification-prefs-b8iKvzB4.js} +1 -1
  263. package/dist/client/assets/{use-panel-tab-placements-DOXj0Pii.js → use-panel-tab-placements-BcKEux1G.js} +1 -1
  264. package/dist/client/assets/use-pending-read-BBBAnUYu.js +1 -0
  265. package/dist/client/assets/{use-personality-commit-YV9FVC-a.js → use-personality-commit-u3kQ6h3H.js} +1 -1
  266. package/dist/client/assets/{use-promo-activation-CjtGhz_3.js → use-promo-activation-C8_cGmEW.js} +1 -1
  267. package/dist/client/assets/{use-promo-dismissals-4rbLgSDG.js → use-promo-dismissals-B3VuaQCf.js} +1 -1
  268. package/dist/client/assets/{use-pulse-freshness-CGqANpVO.js → use-pulse-freshness-CSWQ0TZS.js} +1 -1
  269. package/dist/client/assets/{use-relay-config-CvU_70WJ.js → use-relay-config-BA6c0FMB.js} +1 -1
  270. package/dist/client/assets/{use-room-follow-claim-Doq_lWjk.js → use-room-follow-claim-BV-MtDQ5.js} +1 -1
  271. package/dist/client/assets/{use-room-sessions-CoEIaBRt.js → use-room-sessions-W62Zl72O.js} +1 -1
  272. package/dist/client/assets/{use-roving-tab-list-BzsrpjWV.js → use-roving-tab-list-CMITzUHu.js} +1 -1
  273. package/dist/client/assets/{use-session-canvas-DQ9ND8il.js → use-session-canvas-u63m2mYH.js} +3 -3
  274. package/dist/client/assets/{use-status-budget-AnHroEO0.js → use-status-budget-CbmPFvpQ.js} +1 -1
  275. package/dist/client/assets/{use-unclaimed-chats-DzOLK27i.js → use-unclaimed-chats-D7SEUfiO.js} +1 -1
  276. package/dist/client/assets/use-update-config-Dfd7KMde.js +1 -0
  277. package/dist/client/assets/{useMutationState-BAU_J-u3.js → useMutationState-rOg4bnKv.js} +1 -1
  278. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-BrHN0c6G.js → usecaseDiagram-WPOLBNNX-C-w0e-nv.js} +1 -1
  279. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-CbeP0Pbp.js → vennDiagram-Q3Y3IDCW-BNm2WXT5.js} +1 -1
  280. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-mn5ebFhs.js → wardleyDiagram-IVAIDKWA-BFyFLiir.js} +1 -1
  281. package/dist/client/assets/{xychartDiagram-4URNHDU4-C8fXRQEv.js → xychartDiagram-4URNHDU4-BKxZlnEx.js} +1 -1
  282. package/dist/client/index.html +2 -2
  283. package/dist/server/index.js +278 -101
  284. package/dist/server/index.js.map +2 -2
  285. package/package.json +4 -4
  286. package/dist/client/assets/HandlePage-tZidnrlt.js +0 -1
  287. package/dist/client/assets/NamePage-BS-oN_Hi.js +0 -1
  288. package/dist/client/assets/PhotoPage-BmFypD13.js +0 -1
  289. package/dist/client/assets/_shell-D7Jp6t6_.js +0 -80
  290. package/dist/client/assets/_shell.marketplace-6JRXJ9gt.js +0 -1
  291. package/dist/client/assets/_shell.marketplace_.sources-DriHXfBM.js +0 -1
  292. package/dist/client/assets/_shell.session-BXSWGdwi.js +0 -1
  293. package/dist/client/assets/_shell.x._extensionId-BNgicBXG.js +0 -1
  294. package/dist/client/assets/_shell.x._extensionId_._-BNgicBXG.js +0 -1
  295. package/dist/client/assets/channel-ClNeQ2PQ.js +0 -1
  296. package/dist/client/assets/index-5eNHb7up.js +0 -1
  297. package/dist/client/assets/index-D1kQ19Gb.css +0 -1
  298. package/dist/client/assets/index-DHi8-3w0.js +0 -1
  299. package/dist/client/assets/registry-DRvQ3ChB.js +0 -1
  300. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Drg_8k1s.js +0 -8
  301. package/dist/client/assets/use-is-below-desktop-pvzUlnxh.js +0 -1
  302. package/dist/client/assets/use-is-hub-CvEPWuj0.js +0 -1
  303. package/dist/client/assets/use-pending-read-DBaC7e8N.js +0 -1
  304. package/dist/client/assets/use-update-config-NRkQbxae.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LexicalField-Cnzrh08A.js","assets/index-DKTd8X7n.js","assets/index-D1kQ19Gb.css","assets/mention-pill-C6OT4gx4.js","assets/file-drag-GDx2qhdk.js","assets/file-C-ooqbRY.js","assets/find-latest-widget-fence-DPQimlUD.js","assets/WidgetErrorCard-CAUx4KUI.js","assets/index-CSqz4B0v.js","assets/card-D4ek-VvX.js","assets/progress-BB97hlmb.js","assets/markdown-content-CN_dGlgE.js","assets/table-BIdFvzBs.js","assets/package-BVNiaGrb.js","assets/heart-DnR_GX4I.js","assets/git-branch-D5xr7U5P.js","assets/file-text-BJt8biPY.js","assets/paperclip-DQQVX5tJ.js","assets/index-B0jt7Nng.js","assets/RuntimeSetupDialog-CUFie4LV.js","assets/inline-code-DlVYFFW7.js","assets/list-runtime-types-D5ZO30FL.js","assets/RuntimeConnectFlow-DN2ElvcH.js","assets/useMutationState-BAU_J-u3.js","assets/runtime-connect-Dn0T5YWv.js"])))=>i.map(i=>d[i]);
2
- import{r as l,W as at,j as a,a1 as it,a3 as ot,a4 as Mt,e2 as Ee,aP as Lt,o3 as zn,o4 as An,o5 as In,o6 as On,o7 as Pt,o8 as _n,o9 as Fn,oa as Mn,ob as Ln,oc as Pn,od as qn,oe as qt,of as $t,dV as Ht,jT as $n,g as Hn,G as O,jS as Bn,a0 as Kn,x as De,og as dt,oh as Wn,dw as Un,oi as je,eR as Gn,oj as _,R as Yn,by as ve,ar as X,lX as Bt,jX as Kt,jY as Wt,T as Vn,jZ as Ut,j$ as Xe,f as Xn,lQ as Zn,X as rt,J as Jn,b9 as Qn,ok as ea,aZ as ta,bM as na,dW as Gt,ol as st,bx as aa,ho as ia,fg as oa,bF as ra,kl as sa,bz as la,bA as ca,bB as pa,bD as da,B as ge,h$ as ut,lR as ua,I as ma,g3 as fa,g4 as xa,g5 as ga,om as Ze,cj as va,ih as ha,dS as ba,dR as ya,j_ as ka,on as wa,m2 as ja,oo as Da,kd as Ea,ke as Na,ad as Ra,jp as Ta,jq as Ca,jr as Sa,js as za,op as Aa,V as Ia,oq as Oa,or as _a,aY as Fa,os as Ma}from"./index-DKTd8X7n.js";import{F as lt}from"./file-C-ooqbRY.js";import{h as La,r as Pa}from"./file-drag-GDx2qhdk.js";import{C as qa}from"./find-latest-widget-fence-DPQimlUD.js";import{P as $a}from"./paperclip-DQQVX5tJ.js";import{u as Ha}from"./index-B0jt7Nng.js";import{R as Ba}from"./RuntimeSetupDialog-CUFie4LV.js";import{r as Ka}from"./RuntimeConnectFlow-DN2ElvcH.js";const ct="data-feed-article",Wa=['a[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="file"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[contenteditable="true"]:not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].join(",");function mt(e){const t=e.closest("[data-composer-card]");return(t==null?void 0:t.querySelector('textarea, [contenteditable="true"]'))??e}function Ua(e,t){const n=Array.from(document.querySelectorAll(Wa)).filter(s=>!e.contains(s));if(t==="after"){const s=n.find(r=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return s===void 0?null:mt(s)}const i=n.filter(s=>(e.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_PRECEDING)!==0),o=i[i.length-1];return o===void 0?null:mt(o)}function Ga(e){const t=l.useRef(null),n=l.useRef(e==null?void 0:e.onBeyondRendered);l.useEffect(()=>{n.current=e==null?void 0:e.onBeyondRendered},[e==null?void 0:e.onBeyondRendered]);const i=l.useCallback(o=>{var y;const s=t.current;if(s===null)return;if(o.key==="Home"||o.key==="End"){if(!o.ctrlKey&&!o.metaKey)return;o.preventDefault(),(y=Ua(s,o.key==="End"?"after":"before"))==null||y.focus();return}if(o.key!=="PageDown"&&o.key!=="PageUp")return;const r=Array.from(s.querySelectorAll(`[${ct}]`));if(r.length===0)return;const p=document.activeElement,c=r.findIndex(j=>j===p||p!==null&&j.contains(p)),u=c!==-1?c:r.reduce((j,x,m)=>p!==null&&(x.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING)!==0?m:j,-1),d=o.key==="PageDown"?u+1:u-1;if(d<0||d>r.length-1){const j=o.key==="PageDown",x=r[j?r.length-1:0],m=Number(x.getAttribute("aria-posinset")),b=Number(x.getAttribute("aria-setsize")),D=j?m<b:m>1,g=n.current;if(D&&Number.isFinite(m)&&g!==void 0){o.preventDefault(),g(j?"next":"previous",x);return}}const f=r[Math.min(Math.max(d,0),r.length-1)];f!==void 0&&(o.preventDefault(),f.focus())},[]);return{containerRef:t,handleKeyDown:i}}function Yr(e){return e===void 0?{}:{[ct]:"",tabIndex:0,...e.total>=0&&{"aria-posinset":e.index,"aria-setsize":e.total},...e.total<0&&{"aria-setsize":-1}}}/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LexicalField-gYKPjFfN.js","assets/index-CjUfPyOM.js","assets/index-D2ZFfqZZ.css","assets/mention-pill-Daeu1X92.js","assets/file-drag-GDx2qhdk.js","assets/file-bSD5jgk_.js","assets/find-latest-widget-fence-D01ENK2h.js","assets/WidgetErrorCard-I8WiJv2g.js","assets/index-D0yajRDv.js","assets/card-DI7YtQh3.js","assets/progress-eQl1UvNz.js","assets/markdown-content-ysBIqFAg.js","assets/table-B0LsKsEv.js","assets/package-CD8xq7hk.js","assets/heart-BrjEmIsl.js","assets/git-branch-ClXAt1_G.js","assets/file-text-DTvj1wzM.js","assets/paperclip-CzhXW5qi.js","assets/index-6yT0Qr0s.js","assets/RuntimeSetupDialog-Er-lzjmK.js","assets/inline-code-DwFNff3_.js","assets/list-runtime-types-B0CSonAi.js","assets/RuntimeConnectFlow-IaRVgmqH.js","assets/useMutationState-rOg4bnKv.js","assets/runtime-connect-Dn0T5YWv.js"])))=>i.map(i=>d[i]);
2
+ import{r as l,W as at,j as a,a1 as it,a3 as ot,a4 as Mt,e2 as Ee,aP as Lt,o3 as zn,o4 as An,o5 as In,o6 as On,o7 as Pt,o8 as _n,o9 as Fn,oa as Mn,ob as Ln,oc as Pn,od as qn,oe as qt,of as $t,dV as Ht,jT as $n,g as Hn,G as O,jS as Bn,a0 as Kn,x as De,og as dt,oh as Wn,dw as Un,oi as je,eR as Gn,oj as _,R as Yn,by as ve,ar as X,lX as Bt,jX as Kt,jY as Wt,T as Vn,jZ as Ut,j$ as Xe,f as Xn,lQ as Zn,X as rt,J as Jn,b9 as Qn,ok as ea,aZ as ta,bM as na,dW as Gt,ol as st,bx as aa,ho as ia,fg as oa,bF as ra,kl as sa,bz as la,bA as ca,bB as pa,bD as da,B as ge,h$ as ut,lR as ua,I as ma,g3 as fa,g4 as xa,g5 as ga,om as Ze,cj as va,ih as ha,dS as ba,dR as ya,j_ as ka,on as wa,m2 as ja,oo as Da,kd as Ea,ke as Na,ad as Ra,jp as Ta,jq as Ca,jr as Sa,js as za,op as Aa,V as Ia,oq as Oa,or as _a,aY as Fa,os as Ma}from"./index-CjUfPyOM.js";import{F as lt}from"./file-bSD5jgk_.js";import{h as La,r as Pa}from"./file-drag-GDx2qhdk.js";import{C as qa}from"./find-latest-widget-fence-D01ENK2h.js";import{P as $a}from"./paperclip-CzhXW5qi.js";import{u as Ha}from"./index-6yT0Qr0s.js";import{R as Ba}from"./RuntimeSetupDialog-Er-lzjmK.js";import{r as Ka}from"./RuntimeConnectFlow-IaRVgmqH.js";const ct="data-feed-article",Wa=['a[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="file"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[contenteditable="true"]:not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].join(",");function mt(e){const t=e.closest("[data-composer-card]");return(t==null?void 0:t.querySelector('textarea, [contenteditable="true"]'))??e}function Ua(e,t){const n=Array.from(document.querySelectorAll(Wa)).filter(s=>!e.contains(s));if(t==="after"){const s=n.find(r=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return s===void 0?null:mt(s)}const i=n.filter(s=>(e.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_PRECEDING)!==0),o=i[i.length-1];return o===void 0?null:mt(o)}function Ga(e){const t=l.useRef(null),n=l.useRef(e==null?void 0:e.onBeyondRendered);l.useEffect(()=>{n.current=e==null?void 0:e.onBeyondRendered},[e==null?void 0:e.onBeyondRendered]);const i=l.useCallback(o=>{var y;const s=t.current;if(s===null)return;if(o.key==="Home"||o.key==="End"){if(!o.ctrlKey&&!o.metaKey)return;o.preventDefault(),(y=Ua(s,o.key==="End"?"after":"before"))==null||y.focus();return}if(o.key!=="PageDown"&&o.key!=="PageUp")return;const r=Array.from(s.querySelectorAll(`[${ct}]`));if(r.length===0)return;const p=document.activeElement,c=r.findIndex(j=>j===p||p!==null&&j.contains(p)),u=c!==-1?c:r.reduce((j,x,m)=>p!==null&&(x.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING)!==0?m:j,-1),d=o.key==="PageDown"?u+1:u-1;if(d<0||d>r.length-1){const j=o.key==="PageDown",x=r[j?r.length-1:0],m=Number(x.getAttribute("aria-posinset")),b=Number(x.getAttribute("aria-setsize")),D=j?m<b:m>1,g=n.current;if(D&&Number.isFinite(m)&&g!==void 0){o.preventDefault(),g(j?"next":"previous",x);return}}const f=r[Math.min(Math.max(d,0),r.length-1)];f!==void 0&&(o.preventDefault(),f.focus())},[]);return{containerRef:t,handleKeyDown:i}}function Yr(e){return e===void 0?{}:{[ct]:"",tabIndex:0,...e.total>=0&&{"aria-posinset":e.index,"aria-setsize":e.total},...e.total<0&&{"aria-setsize":-1}}}/**
3
3
  * @license lucide-react v1.48.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -20,4 +20,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
20
20
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function no(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ao(e){if(Array.isArray(e))return et(e)}function Ve(e,t){return ro(e)||oo(e,t)||mn(e,t)||io()}function io(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
21
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mn(e,t){if(e){if(typeof e=="string")return et(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 et(e,t)}}function et(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function oo(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],o=!0,s=!1,r,p;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!(t&&i.length===t));o=!0);}catch(c){s=!0,p=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw p}}return i}}function ro(e){if(Array.isArray(e))return e}function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tt(Object(n),!0).forEach(function(i){tt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e,t){if(e==null)return{};var n=so(e,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function so(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var pt=l.forwardRef(function(e,t){var n=e.children,i=Pe(e,Zi),o=xn(i),s=o.open,r=Pe(o,Ji);return l.useImperativeHandle(t,function(){return{open:s}},[s]),Yn.createElement(l.Fragment,null,n(M(M({},r),{},{open:s})))});pt.displayName="Dropzone";var fn={disabled:!1,getFilesFromEvent:vi,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};pt.defaultProps=fn;pt.propTypes={children:_.func,accept:_.objectOf(_.arrayOf(_.string)),multiple:_.bool,preventDropOnDocument:_.bool,noClick:_.bool,noKeyboard:_.bool,noDrag:_.bool,noDragEventsBubbling:_.bool,minSize:_.number,maxSize:_.number,maxFiles:_.number,disabled:_.bool,getFilesFromEvent:_.func,onFileDialogCancel:_.func,onFileDialogOpen:_.func,useFsAccessApi:_.bool,autoFocus:_.bool,onDragEnter:_.func,onDragLeave:_.func,onDragOver:_.func,onDrop:_.func,onDropAccepted:_.func,onDropRejected:_.func,onError:_.func,validator:_.func};var nt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function xn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=M(M({},fn),e),n=t.accept,i=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,r=t.minSize,p=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,y=t.onDrop,j=t.onDropAccepted,x=t.onDropRejected,m=t.onFileDialogCancel,b=t.onFileDialogOpen,D=t.useFsAccessApi,g=t.autoFocus,v=t.preventDropOnDocument,w=t.noClick,C=t.noKeyboard,I=t.noDrag,R=t.noDragEventsBubbling,T=t.onError,S=t.validator,N=l.useMemo(function(){return Yi(n)},[n]),F=l.useMemo(function(){return Gi(n)},[n]),$=l.useMemo(function(){return typeof b=="function"?b:Ct},[b]),B=l.useMemo(function(){return typeof m=="function"?m:Ct},[m]),A=l.useRef(null),P=l.useRef(null),de=l.useReducer(lo,nt),K=Ve(de,2),ne=K[0],k=K[1],Q=ne.isFocused,Z=ne.isFileDialogActive,G=l.useRef(typeof window<"u"&&window.isSecureContext&&D&&Ui()),he=function(){!G.current&&Z&&setTimeout(function(){if(P.current){var E=P.current.files;E.length||(k({type:"closeDialog"}),B())}},300)};l.useEffect(function(){return window.addEventListener("focus",he,!1),function(){window.removeEventListener("focus",he,!1)}},[P,Z,B,G]);var ae=l.useRef([]),Y=l.useRef([]),J=function(E){A.current&&A.current.contains(E.target)||(E.preventDefault(),ae.current=[])};l.useEffect(function(){return v&&(document.addEventListener("dragover",Nt,!1),document.addEventListener("drop",J,!1)),function(){v&&(document.removeEventListener("dragover",Nt),document.removeEventListener("drop",J))}},[A,v]),l.useEffect(function(){var h=function(se){Y.current=[].concat(Rt(Y.current),[se.target]),Re(se)&&k({isDragGlobal:!0,type:"setDragGlobal"})},E=function(se){Y.current=Y.current.filter(function(pe){return pe!==se.target&&pe!==null}),!(Y.current.length>0)&&k({isDragGlobal:!1,type:"setDragGlobal"})},L=function(){Y.current=[],k({isDragGlobal:!1,type:"setDragGlobal"})},H=function(){Y.current=[],k({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",h,!1),document.addEventListener("dragleave",E,!1),document.addEventListener("dragend",L,!1),document.addEventListener("drop",H,!1),function(){document.removeEventListener("dragenter",h),document.removeEventListener("dragleave",E),document.removeEventListener("dragend",L),document.removeEventListener("drop",H)}},[A]),l.useEffect(function(){return!i&&g&&A.current&&A.current.focus(),function(){}},[A,g,i]);var V=l.useCallback(function(h){T?T(h):console.error(h)},[T]),ie=l.useCallback(function(h){h.preventDefault(),h.persist(),ye(h),ae.current=[].concat(Rt(ae.current),[h.target]),Re(h)&&Promise.resolve(o(h)).then(function(E){if(!(Le(h)&&!R)){var L=E.length,H=L>0&&Hi({files:E,accept:N,minSize:r,maxSize:s,multiple:p,maxFiles:c,validator:S}),U=L>0&&!H;k({isDragAccept:H,isDragReject:U,isDragActive:!0,type:"setDraggedFiles"}),u&&u(h)}}).catch(function(E){return V(E)})},[o,u,V,R,N,r,s,p,c,S]),ue=l.useCallback(function(h){h.preventDefault(),h.persist(),ye(h);var E=Re(h);if(E&&h.dataTransfer)try{h.dataTransfer.dropEffect="copy"}catch{}return E&&f&&f(h),!1},[f,R]),me=l.useCallback(function(h){h.preventDefault(),h.persist(),ye(h);var E=ae.current.filter(function(H){return A.current&&A.current.contains(H)}),L=E.indexOf(h.target);L!==-1&&E.splice(L,1),ae.current=E,!(E.length>0)&&(k({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Re(h)&&d&&d(h))},[A,d,R]),fe=l.useCallback(function(h,E){var L=[],H=[];h.forEach(function(U){var se=cn(U,N),pe=Ve(se,2),qe=pe[0],$e=pe[1],He=pn(U,r,s),Oe=Ve(He,2),Be=Oe[0],Ke=Oe[1],We=S?S(U):null;if(qe&&Be&&!We)L.push(U);else{var Ue=[$e,Ke];We&&(Ue=Ue.concat(We)),H.push({file:U,errors:Ue.filter(function(Sn){return Sn})})}}),(!p&&L.length>1||p&&c>=1&&L.length>c)&&(L.forEach(function(U){H.push({file:U,errors:[qi]})}),L.splice(0)),k({acceptedFiles:L,fileRejections:H,type:"setFiles"}),y&&y(L,H,E),H.length>0&&x&&x(H,E),L.length>0&&j&&j(L,E)},[k,p,N,r,s,c,y,j,x,S]),oe=l.useCallback(function(h){h.preventDefault(),h.persist(),ye(h),ae.current=[],Re(h)&&Promise.resolve(o(h)).then(function(E){Le(h)&&!R||fe(E,h)}).catch(function(E){return V(E)}),k({type:"reset"})},[o,fe,V,R]),te=l.useCallback(function(){if(G.current){k({type:"openDialog"}),$();var h={multiple:p,types:F};window.showOpenFilePicker(h).then(function(E){return o(E)}).then(function(E){fe(E,null),k({type:"closeDialog"})}).catch(function(E){Vi(E)?(B(E),k({type:"closeDialog"})):Xi(E)?(G.current=!1,P.current?(P.current.value=null,P.current.click()):V(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."))):V(E)});return}P.current&&(k({type:"openDialog"}),$(),P.current.value=null,P.current.click())},[k,$,B,D,fe,V,F,p]),z=l.useCallback(function(h){!A.current||!A.current.isEqualNode(h.target)||(h.key===" "||h.key==="Enter"||h.keyCode===32||h.keyCode===13)&&(h.preventDefault(),te())},[A,te]),W=l.useCallback(function(){k({type:"focus"})},[]),ce=l.useCallback(function(){k({type:"blur"})},[]),re=l.useCallback(function(){w||(Wi()?setTimeout(te,0):te())},[w,te]),xe=function(E){return i?null:E},be=function(E){return C?null:xe(E)},ee=function(E){return I?null:xe(E)},ye=function(E){R&&E.stopPropagation()},q=l.useMemo(function(){return function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=h.refKey,L=E===void 0?"ref":E,H=h.role,U=h.onKeyDown,se=h.onFocus,pe=h.onBlur,qe=h.onClick,$e=h.onDragEnter,He=h.onDragOver,Oe=h.onDragLeave,Be=h.onDrop,Ke=Pe(h,Qi);return M(M(tt({onKeyDown:be(le(U,z)),onFocus:be(le(se,W)),onBlur:be(le(pe,ce)),onClick:xe(le(qe,re)),onDragEnter:ee(le($e,ie)),onDragOver:ee(le(He,ue)),onDragLeave:ee(le(Oe,me)),onDrop:ee(le(Be,oe)),role:typeof H=="string"&&H!==""?H:"presentation"},L,A),!i&&!C?{tabIndex:0}:{}),Ke)}},[A,z,W,ce,re,ie,ue,me,oe,C,I,i]),ke=l.useCallback(function(h){h.stopPropagation()},[]),Cn=l.useMemo(function(){return function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=h.refKey,L=E===void 0?"ref":E,H=h.onChange,U=h.onClick,se=Pe(h,eo),pe=tt({accept:N,multiple:p,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:xe(le(H,oe)),onClick:xe(le(U,ke)),tabIndex:-1},L,P);return M(M({},pe),se)}},[P,n,p,oe,i]);return M(M({},ne),{},{isFocused:Q&&!i,getRootProps:q,getInputProps:Cn,rootRef:A,inputRef:P,open:xe(te)})}function lo(e,t){switch(t.type){case"focus":return M(M({},e),{},{isFocused:!0});case"blur":return M(M({},e),{},{isFocused:!1});case"openDialog":return M(M({},nt),{},{isFileDialogActive:!0});case"closeDialog":return M(M({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return M(M({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return M(M({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return M(M({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return M({},nt);default:return e}}function Ct(){}function co({onFilesSelected:e}){const t=l.useCallback(r=>{r.length>0&&e(r)},[e]),{getRootProps:n,getInputProps:i,isDragActive:o}=xn({onDrop:t,onError:r=>console.error("[composer] Could not read the dropped files.",r),noClick:!0,noKeyboard:!0}),s=l.useCallback(r=>{const p=Array.from(r.clipboardData.items).filter(c=>c.kind==="file").map(c=>c.getAsFile()).filter(c=>c!==null);p.length>0&&e(p)},[e]);return{getRootProps:n,getInputProps:i,isDragActive:o,handlePaste:s}}function gn(e){const t=l.useCallback(i=>{La(i.dataTransfer.types)&&(i.preventDefault(),i.dataTransfer.dropEffect="copy")},[]),n=l.useCallback(i=>{if(!e)return!1;const o=Pa(i.dataTransfer);return o===null?!1:(i.preventDefault(),e(o),!0)},[e]);return e?{onDragOver:t,onDrop:n}:null}const vn="bg-surface relative m-2 rounded-xl border p-2",hn={"data-composer-card":""};function po({children:e,onFilesDropped:t,onPathDropped:n,className:i}){return t?a.jsx(mo,{onFilesDropped:t,onPathDropped:n,className:i,children:e}):a.jsx(uo,{onPathDropped:n,className:i,children:e})}function uo({children:e,onPathDropped:t,className:n}){const i=gn(t);return a.jsx("div",{...hn,className:O(vn,n),onDragOver:i==null?void 0:i.onDragOver,onDrop:i?o=>void i.onDrop(o):void 0,children:e})}function mo({children:e,onFilesDropped:t,onPathDropped:n,className:i}){const{getRootProps:o,getInputProps:s,isDragActive:r,handlePaste:p}=co({onFilesSelected:t}),c=gn(n),u=o();return a.jsxs("div",{...u,...hn,onDragOver:d=>{var f;c==null||c.onDragOver(d),(f=u.onDragOver)==null||f.call(u,d)},onDrop:d=>{var f;c==null||c.onDrop(d),(f=u.onDrop)==null||f.call(u,d)},onPaste:p,className:O(vn,i),children:[a.jsx("input",{...s()}),a.jsx(ve,{children:r&&a.jsx(X.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:a.jsx("p",{className:"text-primary text-sm font-medium",children:"Drop files to attach"})})}),e]})}const fo=500,xo=229;function go(e){let t=0;for(let n=e.length-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t}function vo({surface:e,value:t,isStreaming:n,isTouchOnly:i,isUploading:o=!1,onCancelUpload:s,commandPending:r=!1,canSubmit:p=!0,editingQueueItem:c,isPaletteOpen:u,paletteHasResults:d=!1,tabPicks:f=!0,queueHasItems:y,onSubmit:j,onStop:x,onEscape:m,onClear:b,onArrowUp:D,onArrowDown:g,onCommandSelect:v,onQueue:w,onSteer:C,onStage:I,onSaveEdit:R,onCancelEdit:T,onQueueNavigateUp:S,onQueueNavigateDown:N,contextKey:F}){const[$,B]=l.useState(null),A=l.useRef(null),P=$!==null&&$===(F??""),de=l.useCallback(()=>{A.current!==null&&clearTimeout(A.current),A.current=null,B(null)},[]),K=l.useCallback(()=>{A.current!==null&&clearTimeout(A.current),B(F??""),A.current=setTimeout(()=>{A.current=null,B(null)},fo)},[F]);return l.useEffect(()=>()=>{A.current!==null&&clearTimeout(A.current)},[]),{handleKeyDown:l.useCallback(k=>{var Q,Z;if(!(k.nativeEvent.isComposing||k.keyCode===xo||e.isComposing())){if(k.key==="Escape"){if(u){m==null||m(),k.preventDefault();return}if(c){T==null||T(),k.preventDefault();return}if(n){x==null||x(),k.preventDefault();return}if(o&&s){s(),k.preventDefault();return}t.trim()&&P?(e.clearThroughUndoStack(),b==null||b(),de(),k.preventDefault()):(m==null||m(),K(),t.trim()&&k.preventDefault());return}if(!u&&y){if(k.key==="ArrowUp"){const G=e.isCaretAtStart();if(!t.trim()||G){k.preventDefault(),S==null||S();return}}if(k.key==="ArrowDown"){const G=e.isCaretAtEnd();if(c&&G){k.preventDefault(),N==null||N();return}}}if(k.key==="Enter"&&k.altKey){k.preventDefault(),e.insertLineBreak();return}if(u){if(k.key==="ArrowDown"){k.preventDefault(),g==null||g();return}if(k.key==="ArrowUp"){k.preventDefault(),D==null||D();return}if(d&&(k.key==="Enter"&&!k.shiftKey||k.key==="Tab"&&f)){k.preventDefault(),v==null||v();return}}if(k.key==="Enter"&&!k.shiftKey){const G=e.textBeforeCaret();if(G!==null&&go(G)%2===1){k.preventDefault(),e.consumeEscapeIntoNewline();return}}if(k.key==="Enter"&&(k.metaKey||k.ctrlKey)&&!i&&n&&!c&&!r&&t.trim()){k.preventDefault(),k.shiftKey?(Q=I??w)==null||Q():(Z=C??w)==null||Z();return}if(k.key==="Enter"&&!k.shiftKey&&!i){if(k.preventDefault(),r)return;c&&t.trim()?R==null||R():n&&t.trim()?w==null||w():!n&&!o&&p&&t.trim()&&j()}}},[n,i,o,s,r,t,j,x,m,b,u,d,f,D,g,v,c,w,C,I,R,T,y,S,N,p,e,P,K,de]),clearArmed:P}}const ho={textBeforeCaret:()=>null,isCaretAtStart:()=>!0,isCaretAtEnd:()=>!0,insertLineBreak:()=>{},consumeEscapeIntoNewline:()=>{},clearThroughUndoStack:()=>{},isComposing:()=>!1};function bn(e,t){e.focus(),document.execCommand("insertText",!1,t)}function bo(e){const t=e.selectionStart;e.setSelectionRange(t-1,t),bn(e,`
22
22
  `)}function yo(e){e.focus(),e.setSelectionRange(0,e.value.length),document.execCommand("insertText",!1,"")}function ko(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&&bn(t,`
23
- `)},consumeEscapeIntoNewline(){const t=e.current;t&&bo(t)},clearThroughUndoStack(){const t=e.current;t&&yo(t)},isComposing(){return!1}}}const wo=200,St=24,jo=200;function Do(e,t){l.useLayoutEffect(()=>{const n=e.current;if(!n)return;const i=()=>{n.style.transition="",n.style.height=""};if(t!==""){n.style.transition="",n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,wo)}px`;return}const o=n.offsetHeight;if(o<=St){i();return}n.style.height=`${o}px`,n.style.transition=`height ${jo}ms ease`;const s=requestAnimationFrame(()=>{n.style.height=`${St}px`});return n.addEventListener("transitionend",i,{once:!0}),()=>{cancelAnimationFrame(s),n.removeEventListener("transitionend",i),i()}},[e,t])}const zt=l.forwardRef(function({value:t,onChange:n,onCursorChange:i,onKeyDown:o,onFocus:s,onBlur:r,placeholder:p,placeholderOverlay:c,isPaletteOpen:u,paletteListboxId:d,activeDescendantId:f,onSurfaceChange:y},j){const x=l.useRef(null),m=Bt(),b=l.useRef(null);l.useEffect(()=>{b.current??(b.current=ko(x)),y(b.current)},[y]),l.useImperativeHandle(j,()=>({focus:()=>{var w;return(w=x.current)==null?void 0:w.focus()},focusUnlessTouch:()=>{var w;m||(w=x.current)==null||w.focus()},focusAt:w=>{const C=x.current;C&&(C.focus(),C.setSelectionRange(w,w))}})),Do(x,t);const D=l.useCallback(w=>{n(w.target.value),i==null||i(w.target.selectionStart)},[n,i]),g=l.useCallback(()=>{x.current&&(i==null||i(x.current.selectionStart))},[i]),v=t.trim().length>0;return a.jsxs("div",{className:"relative min-h-[24px] flex-1",children:[!v&&c,a.jsx("textarea",{ref:x,value:t,onChange:D,onKeyDown:o,onFocus:s,onBlur:r,onSelect:g,role:"combobox","aria-autocomplete":"list","aria-controls":u?d:void 0,"aria-expanded":u??!1,"aria-activedescendant":u?f:void 0,"aria-label":p,placeholder:c?"":p,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 Eo({onSteer:e,onStage:t}){return!e&&!t?null:a.jsxs(Kt,{children:[a.jsx(Wt,{asChild:!0,children:a.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:a.jsx(Vn,{className:"size-(--size-icon-sm)"})})}),a.jsxs(Ut,{align:"end",children:[e&&a.jsx(Xe,{icon:Ya,description:"Send it into the task now",onSelect:e,children:"Steer"}),t&&a.jsx(Xe,{icon:Xn,description:"Use it next, without interrupting",onSelect:t,children:"Add context"})]})]})}const Fe={send:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Send message"},stop:{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60",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-destructive/90 hover:text-destructive-foreground dark:hover:bg-destructive/60",label:"Cancel upload"},dispatching:{className:"bg-muted text-muted-foreground",label:"Running command"},stopping:{className:"bg-muted text-muted-foreground",label:"Stopping…"}},No={send:qa,stop:Zt,queue:Qn,update:Jn,cancel:rt,"cancel-upload":De,dispatching:De,stopping:De};function Ro(e,t,n,i,o,s){return o?"dispatching":i?e?"update":"cancel":s?"stopping":t&&e?"queue":t?"stop":n?"cancel-upload":e?"send":null}function To(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 Co({hasText:e,isStreaming:t,commandPending:n=!1,submitDisabled:i=!1,editingQueueItem:o,queueDepth:s,isTouchOnly:r,onSubmit:p,onStop:c,onQueue:u,onSaveEdit:d,onCancelEdit:f,onCancelUpload:y,onSteer:j,onStage:x,stopPending:m=!1}){const b=Ro(e,t,y!==void 0,o,n,m),D=b==="send"&&i,g=D||b===null?void 0:To(b,{onSubmit:p,onStop:c,onQueue:u,onSaveEdit:d,onCancelEdit:f,onCancelUpload:y}),v=b===null?null:b==="send"&&r?Zn:No[b],w=b==="dispatching"||b==="stopping";return a.jsxs(a.Fragment,{children:[a.jsx(ve,{children:t&&e&&!m&&a.jsx(X.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:c,type:"button",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"Stop generating",children:a.jsx(Zt,{className:"size-(--size-icon-sm)"})})}),b==="queue"&&a.jsx(Eo,{onSteer:j,onStage:x}),a.jsxs("div",{className:"relative shrink-0",children:[b==="cancel-upload"&&a.jsx("span",{role:"status",className:"sr-only",children:"Uploading attachment"}),w&&b?a.jsxs("div",{role:"status",className:O("rounded-lg p-1.5 max-md:p-2",Fe[b].className),children:[a.jsx(De,{}),a.jsx("span",{className:"sr-only",children:Fe[b].label})]}):b&&v?a.jsx(X.button,{animate:{opacity:D?.5:1,scale:1},initial:!1,transition:{duration:.15},whileHover:D?void 0:{scale:1.05},whileTap:D?void 0:{scale:.97},onClick:g,disabled:D,type:"button",className:O("focus-ring rounded-lg p-1.5 transition-colors max-md:p-2",Fe[b].className,D&&"pointer-events-none"),"aria-label":Fe[b].label,children:a.jsx(v,{className:"size-(--size-icon-sm)"})}):a.jsx("div",{"aria-hidden":"true","data-testid":"action-slot-spacer",className:"p-1.5 max-md:p-2",children:a.jsx("div",{className:"size-(--size-icon-sm)"})}),s>0&&b==="queue"&&a.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:s})]})]})}const So=l.lazy(()=>ta(()=>import("./LexicalField-Cnzrh08A.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]))),zo=l.forwardRef(function({value:t,onChange:n,onSubmit:i,isStreaming:o,isUploading:s=!1,onCancelUpload:r,commandPending:p=!1,editingQueueItem:c=!1,editingPosition:u,queueDepth:d=0,onStop:f,stopPending:y=!1,onQueue:j,onSteer:x,onStage:m,onSaveEdit:b,onCancelEdit:D,onEscape:g,onClear:v,isPaletteOpen:w,paletteHasResults:C,tabPicks:I,onArrowUp:R,onArrowDown:T,onCommandSelect:S,activeDescendantId:N,paletteListboxId:F,onCursorChange:$,onAttach:B,placeholder:A="Send a message…",placeholderOverlay:P,onQueueNavigateUp:de,onQueueNavigateDown:K,contextKey:ne,onClearArmedChange:k,queueHasItems:Q=!1,canSubmit:Z=!0,canSubmitReason:G,richText:he=!1,mentionSubjects:ae},Y){const J=l.useRef(null),V=l.useRef(null),[ie,ue]=l.useState(!1),[me,fe]=l.useState(ho),oe=Bt();l.useImperativeHandle(Y,()=>({focus:()=>{var q;return(q=J.current)==null?void 0:q.focus()},focusUnlessTouch:()=>{var q;return(q=J.current)==null?void 0:q.focusUnlessTouch()},focusAt:q=>{var ke;return(ke=J.current)==null?void 0:ke.focusAt(q)}}));const te=l.useRef(oe);l.useEffect(()=>{var q;te.current||ea()||(q=J.current)==null||q.focus()},[]);const z=l.useCallback(()=>{var q;(q=J.current)==null||q.focusAt(t.length),f==null||f()},[f,t.length]),{handleKeyDown:W,clearArmed:ce}=vo({surface:me,value:t,isStreaming:o,isTouchOnly:oe,isUploading:s,onCancelUpload:r,commandPending:p,canSubmit:Z,editingQueueItem:c,isPaletteOpen:w,paletteHasResults:C,tabPicks:I,queueHasItems:Q,onSubmit:i,onStop:f,onEscape:g,onClear:v,onArrowUp:R,onArrowDown:T,onCommandSelect:S,onQueue:j,onSteer:x,onStage:m,onSaveEdit:b,onCancelEdit:D,onQueueNavigateUp:de,onQueueNavigateDown:K,contextKey:ne}),re=l.useCallback(()=>ue(!0),[]),xe=l.useCallback(()=>{ue(!1),w&&(g==null||g())},[w,g]),be={ref:J,value:t,onChange:n,onCursorChange:$,onKeyDown:W,onFocus:re,onBlur:xe,placeholder:A,placeholderOverlay:P,isPaletteOpen:w,paletteHasResults:C,paletteListboxId:F,activeDescendantId:N,onSurfaceChange:fe,mentionSubjects:ae},ee=t.trim().length>0,ye=v!==void 0&&ee;return l.useEffect(()=>{k==null||k(ce&&ye)},[ce,ye,k]),a.jsxs("div",{className:"flex flex-col gap-1.5",children:[!Z&&G&&a.jsx("div",{role:"status",className:"text-muted-foreground px-1 text-xs",children:G}),c&&a.jsx("div",{className:"text-muted-foreground px-0.5 text-xs",children:u!==void 0&&d>0?`Editing message ${u} of ${d}`:"Editing message"}),a.jsxs("div",{className:O("border-input bg-background flex items-end gap-1.5 rounded-md border p-1.5 shadow-xs transition-[color,box-shadow]",ie&&"border-ring ring-ring ring-[1px]",c&&"border-primary/40",!B&&"pl-3"),children:[B&&a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:V,type:"file",className:"hidden",multiple:!0,onChange:q=>{const ke=Array.from(q.target.files??[]);ke.length>0&&B(ke),q.target.value=""}}),a.jsx("button",{type:"button",onClick:()=>{var q;return(q=V.current)==null?void 0:q.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:a.jsx($a,{className:"size-4"})})]}),he?a.jsx(l.Suspense,{fallback:a.jsx(zt,{...be}),children:a.jsx(So,{...be})}):a.jsx(zt,{...be}),v&&a.jsx(X.button,{animate:{opacity:ee?.5:0,scale:ee?1:.8},transition:{duration:.15},whileHover:ee?{opacity:1}:void 0,onClick:v,disabled:!ee,type:"button",className:O("focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!ee&&"pointer-events-none"),"aria-label":"Clear message",children:a.jsx(rt,{className:"size-(--size-icon-sm)"})}),a.jsx(Co,{hasText:ee,isStreaming:o,onCancelUpload:s?r:void 0,commandPending:p,submitDisabled:!Z,editingQueueItem:c,queueDepth:d,isTouchOnly:oe,onSubmit:i,onStop:z,stopPending:y,onQueue:j,onSteer:x,onStage:m,onSaveEdit:b,onCancelEdit:D})]})]})});function Ao({children:e,className:t}){return a.jsx("div",{className:O("absolute right-0 bottom-full left-0 mb-2",t),children:e})}function At(e){return e.type.startsWith("image/")}const It="This file didn’t upload";function Io({files:e,onRemove:t,onRetry:n,onCancel:i}){const o=e.filter(r=>At(r.file)).map(r=>r.id).join(" "),s=l.useMemo(()=>{const r=new Map;for(const p of e)At(p.file)&&r.set(p.id,URL.createObjectURL(p.file));return r},[o]);return l.useEffect(()=>()=>{for(const r of s.values())URL.revokeObjectURL(r)},[s]),a.jsx("div",{className:"flex flex-wrap gap-1.5 px-1 pb-1.5",children:a.jsx(ve,{children:e.map(r=>{const p=s.get(r.id),c=r.status==="error",u=r.status==="uploading"&&i!==void 0;return a.jsxs(X.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},className:O("flex items-center gap-1 rounded-md px-2 py-1 text-xs",c?"bg-destructive/10 border-destructive/40 border":"bg-muted"),children:[r.status==="uploading"?a.jsx(De,{size:"xs",className:"text-muted-foreground"}):c?a.jsx(na,{className:"text-destructive size-(--size-icon-xs) shrink-0"}):p?a.jsx("img",{src:p,alt:"",className:"size-5 shrink-0 rounded object-cover"}):a.jsx(lt,{className:"text-muted-foreground size-(--size-icon-xs)"}),a.jsx("span",{className:"max-w-32 truncate",children:r.file.name}),r.status==="uploading"&&a.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[r.progress,"%"]}),c&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-destructive max-w-44 truncate",title:r.error??It,children:r.error??It}),n&&a.jsx("button",{type:"button",onClick:()=>n(r.id),className:"text-foreground ml-0.5 shrink-0 rounded-sm font-medium underline decoration-dotted underline-offset-2","aria-label":`Try uploading ${r.file.name} again`,children:"Try again"})]}),a.jsx("button",{type:"button",onClick:u?i:()=>t(r.id),className:"text-muted-foreground hover:text-foreground -mr-0.5 ml-0.5 shrink-0 rounded-sm p-0.5","aria-label":u?`Cancel upload of ${r.file.name}`:`Remove ${r.file.name}`,children:a.jsx(rt,{className:"size-3"})})]},r.id)})})})}function Oo(){const e=Gt();return a.jsx(X.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 Te={Root:po,Input:zo,OverlayLane:Ao,Attachments:Io,ClearArmedHint:Oo};function _o({value:e,onChange:t,onSubmit:n,inputRef:i,head:o,mentionPicker:s,overlays:r,queue:p,aboveInput:c,asks:u,footer:d,children:f,className:y,onPathDropped:j,input:x}){const{capabilities:m,target:b}=ze();if(b===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[D,g]=l.useState(!1),v=m.attachments?b.attachments:null,w=(v==null?void 0:v.staged)??[],C=(v==null?void 0:v.hasFailed)===!0,I=b.canSend&&!C&&(x.canSubmit??!0),R=C?void 0:b.canSend?x.canSubmitReason:b.canSendReason,T=a.jsxs(a.Fragment,{children:[a.jsxs(Te.OverlayLane,{children:[m.mentions&&s,r,D&&a.jsx(Te.ClearArmedHint,{})]}),v!==null&&w.length>0&&a.jsx(Te.Attachments,{files:[...w],onRemove:v.remove,onRetry:v.retry,onCancel:v.cancel}),b.queue!==void 0&&p,c,a.jsx(Te.Input,{...x,ref:i,value:e,onChange:t,onSubmit:n,placeholder:x.placeholder??b.placeholder,canSubmit:I,...R===void 0?{}:{canSubmitReason:R},...v===null?{}:{onAttach:v.add,...v.holdsSendWhileUploading?{isUploading:v.isUploading,onCancelUpload:v.cancel}:{}},onClearArmedChange:g}),d]});return a.jsxs(Te.Root,{className:y,...v===null?{}:{onFilesDropped:v.add},...j===void 0?{}:{onPathDropped:j},children:[o,u===void 0?T:a.jsx(ve,{mode:"wait",children:u!==null?a.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:u},"interactive"):a.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:T},"normal")}),f]})}function Fo({asChild:e,children:t,className:n}){const i=e===!0?st:"div";return a.jsx(i,{"data-slot":"conversation-footer",className:O(n),children:t})}function Mo({surface:e,capabilities:t,target:n,density:i="comfortable",anchor:o="corner",children:s}){const r=l.useMemo(()=>({surface:e,capabilities:t,target:n??null,density:i,anchor:o}),[e,t,n,i,o]);return a.jsx(Qt.Provider,{value:r,children:s})}const Ot=1e3;function Lo(e,t=Date.now){const n=Date.parse(e)+en,[i,o]=l.useState(()=>t());return l.useEffect(()=>{const s=()=>o(t());let r,p;const c=n-t();return c>0?p=setTimeout(()=>{o(Math.max(t(),n)),r=setInterval(s,Ot)},c):r=setInterval(s,Ot),()=>{clearTimeout(p),clearInterval(r)}},[n,t]),oi(e,i)}function yn(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 Po(e){return e?"This room is no longer available":"Reconnecting. You can still send"}function qo(e,t){switch(e.kind){case"ask":return"";case"stalled":return yn(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 _t(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 $o={room:"room-presence",thread:"thread-presence",session:"session-presence"},Ho={room:"room-held",thread:"thread-held",session:"session-held"};function Bo({state:e,onRetry:t,unavailable:n=!1,faces:i,reducedMotion:o=!1,scope:s="room"}){switch(e.kind){case"ask":return a.jsx(Ko,{state:e,reducedMotion:o});case"stalled":return a.jsx(Wo,{onRetry:t,unavailable:n});case"presence":return a.jsx(Uo,{state:e,faces:i,reducedMotion:o,scope:s});case"held":return a.jsx(Go,{state:e,faces:i,scope:s});case"silent-finish":return a.jsx(Yo,{state:e});case"turn-waiting":return a.jsx(Vo,{state:e});case"turn-progress":return a.jsx(Xo,{state:e,reducedMotion:o});case"turn-system":return a.jsx(Zo,{state:e});case"turn-streaming":return a.jsx(Jo,{state:e,reducedMotion:o});case"turn-complete":return a.jsx(Qo,{state:e});case"empty":return null}}function Ko({state:e,reducedMotion:t}){return a.jsxs("span",{"data-testid":"lane-ask",className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"needs-you",reducedMotion:t}),a.jsx("span",{className:"text-foreground truncate",children:e.headline}),e.count>1&&a.jsxs("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 tabular-nums",children:["+",e.count-1]}),a.jsx("span",{className:"text-status-warning-fg shrink-0 font-medium",children:"Answer"})]})}function Wo({onRetry:e,unavailable:t}){const n=yn(t);return a.jsxs("span",{"data-testid":"room-stalled","data-unavailable":t?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"error",reducedMotion:!0}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground truncate sm:hidden",children:Po(t)}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground hidden truncate sm:inline",title:n,children:n}),e!==void 0&&a.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 Uo({state:e,faces:t,reducedMotion:n,scope:i}){return a.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"working",reducedMotion:n}),t,a.jsxs("span",{"data-testid":$o[i],"data-late":e.late?"true":void 0,className:"text-muted-foreground flex min-w-0 items-center",children:[a.jsx("span",{className:"truncate",children:e.line}),a.jsx(kn,{since:e.since})]})]})}function Go({state:e,faces:t,scope:n}){return a.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"working",reducedMotion:!0}),t,a.jsxs("span",{"data-testid":Ho[n],className:"text-muted-foreground flex min-w-0 items-center",children:[a.jsx("span",{className:"truncate",children:e.sentence}),a.jsx(kn,{since:e.since})]})]})}function Yo({state:e}){return a.jsx("span",{"data-testid":"lane-silent-finish",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:a.jsx("span",{className:"truncate",children:e.sentence})})}function Vo({state:e}){const t=e.waitingType==="approval"?ia:oa;return a.jsxs("span",{"data-testid":"lane-waiting",className:"flex min-w-0 items-center gap-2",children:[a.jsx(t,{"aria-hidden":"true",className:"text-status-warning-fg size-3 shrink-0"}),a.jsx("span",{className:"text-status-warning-fg truncate",children:e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer"}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed})]})}function Xo({state:e,reducedMotion:t}){return a.jsxs("span",{"data-testid":"lane-progress","data-determinate":e.determinate,className:"flex min-w-0 flex-1 items-center gap-2",children:[a.jsx("span",{className:"text-muted-foreground truncate",children:e.message}),a.jsx("span",{"aria-hidden":"true",className:"bg-muted/60 relative h-0.5 w-16 shrink-0 overflow-hidden rounded-full",children:e.determinate?a.jsx(X.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"}}):a.jsx(X.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 Zo({state:e}){return a.jsxs("span",{"data-testid":"lane-system",className:"flex min-w-0 items-center gap-2",children:[a.jsx(aa,{"aria-hidden":"true",className:"text-muted-foreground/60 size-3 shrink-0"}),a.jsx("span",{className:"text-muted-foreground/70 truncate",children:e.message})]})}function Jo({state:e,reducedMotion:t}){return a.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?a.jsx("span",{"aria-hidden":"true",className:"text-status-warning-fg shrink-0 font-bold",children:"☠"}):a.jsx(Ae,{signal:"working",reducedMotion:t}),a.jsx("span",{"aria-hidden":"true",className:O("truncate",e.isBypass?"text-status-warning-fg":"text-muted-foreground"),children:e.verb}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/60 shrink-0",children:e.tokens})]})}function Qo({state:e}){return a.jsxs("span",{"data-testid":"lane-complete",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:[a.jsx("span",{className:"truncate",children:e.elapsed}),a.jsx("span",{"aria-hidden":"true",children:"·"}),a.jsx("span",{className:"shrink-0",children:e.tokens})]})}function Ae({signal:e,reducedMotion:t}){return a.jsx("span",{"aria-hidden":"true","data-lane-dot":e,className:O("size-1.5 shrink-0 rounded-full",sa[e],e==="working"&&!t&&ra)})}function kn({since:e}){const t=Lo(e);return t===null?null:a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:` · ${t}`})}const er=.16,tr={room:"room-presence-announcer",thread:"thread-presence-announcer",session:"session-lane-announcer"};function nr({state:e,scope:t="room",onRetry:n,unavailable:i=!1,faces:o,peek:s,onPeekOpenChange:r,peekLabel:p="Show who is working",heldPeekLabel:c="Show what is waiting",askCard:u,reducedMotionOverride:d}){const[f,y]=l.useState(!1),j=l.useRef(null),x=Gt()===!0,m=d??x,b=qo(e,i),D=e.kind==="empty",g=(e.kind==="presence"||e.kind==="held")&&s!==void 0,v=e.kind==="ask"&&u!==void 0,w=g||v,C=v?u:s,I=v?"Answer this":e.kind==="held"?c:p;f&&!w&&y(!1);const R=f&&w,T=l.useRef(!1);l.useEffect(()=>{var $,B;if(T.current===R)return;const F=!R&&((($=j.current)==null?void 0:$.contains(document.activeElement))===!0||document.activeElement===document.body);T.current=R,r==null||r(R),F&&((B=j.current)==null||B.focus())},[R,r]);const S=a.jsx(Bo,{state:e,onRetry:n,unavailable:i,faces:o,reducedMotion:m,scope:t}),N=w?a.jsxs(la,{open:R,onOpenChange:y,children:[a.jsx(ca,{asChild:!0,children:a.jsx("button",{type:"button","aria-label":I,className:O("focus-ring flex min-w-0 items-center rounded text-left","hover:bg-accent/40 focus-visible:bg-accent/40"),children:S})}),a.jsxs(pa,{side:"top",align:"start",onOpenAutoFocus:v?void 0:F=>F.preventDefault(),className:"w-88 p-0",children:[a.jsx(da,{children:I}),C]})]}):S;return a.jsxs("div",{ref:j,"data-slot":"live-lane","data-lane-scope":t,tabIndex:-1,"data-lane-state":e.kind,"data-lane-motion":m?"off":"on",className:"flex h-6 shrink-0 items-center gap-2 overflow-hidden px-3 text-xs",children:[a.jsx("span",{"data-testid":tr[t],role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:b}),m?a.jsx("div",{"aria-hidden":D?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:N},_t(e)):a.jsx(ve,{mode:"wait",initial:!1,children:a.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:er},"aria-hidden":D?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:N},_t(e))})]})}const ar=1e3,ir={working:"working",working_late:"still working",held:"waiting to start"};function or({rows:e,onScrollToRow:t,onOpenSession:n,onOpenRoom:i,onAnswerFirst:o,promoted:s,onStopAll:r,stopping:p=!1,onStopAgent:c,stoppingAgents:u}){const d=c!==void 0,f=e.length>1&&r!==void 0,y=l.useRef(new Map),j=l.useRef(null),x=l.useRef(e);return l.useEffect(()=>{var v;const m=x.current;x.current=e;const b=j.current;if(b===null||e.some(w=>w.authorId===b)||(j.current=null,document.activeElement!==document.body))return;const D=m.findIndex(w=>w.authorId===b),g=e[Math.min(Math.max(D,0),e.length-1)];g!==void 0&&((v=y.current.get(g.authorId))==null||v.focus())},[e]),a.jsxs("div",{"data-slot":"live-peek","data-testid":"live-peek",className:"flex flex-col",children:[a.jsx("ul",{className:"divide-border divide-y",children:e.map(m=>a.jsxs("li",{"data-testid":"live-peek-row",className:"flex gap-2.5 px-3 py-2.5",children:[a.jsx(tn,{author:m.author,className:"mt-0.5 shrink-0"}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[a.jsxs("p",{className:"flex min-w-0 items-center gap-1.5 text-xs",children:[a.jsx("span",{className:"text-foreground truncate font-medium",children:m.author.displayName}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),a.jsx("span",{className:"text-muted-foreground shrink-0",children:ir[m.state]}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),a.jsx(rr,{since:m.since})]}),m.doing!==null&&a.jsx("p",{"data-testid":"live-peek-doing",className:"text-muted-foreground truncate text-xs",children:m.doing}),m.replyingTo!==null&&t!==void 0&&a.jsx("button",{type:"button","data-testid":"live-peek-replying-to",onClick:()=>t(m.replyingTo.rowId),className:"focus-ring text-muted-foreground hover:text-foreground truncate rounded text-left text-xs underline underline-offset-2",children:`Replying to “${m.replyingTo.excerpt}”`}),a.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[m.state!=="held"&&m.sessionId!==null&&n!==void 0&&a.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-session",onClick:()=>n(m.sessionId),className:"h-7 gap-1 px-2 text-xs",children:["Open its chat",a.jsx(ut,{"aria-hidden":"true",className:"size-3"})]}),m.state==="held"&&m.behind!=null&&m.behind.title!==null&&i!==void 0&&a.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-room",onClick:()=>i(m.behind.roomId),className:"h-7 gap-1 px-2 text-xs",children:["Open where it’s working",a.jsx(ut,{"aria-hidden":"true",className:"size-3"})]}),m.state==="held"&&m.othersWaiting===!0&&o!==void 0&&((s==null?void 0:s.has(m.authorId))===!0?a.jsx("span",{"data-testid":"live-peek-next-up",className:"text-muted-foreground text-xs",children:"Next up here"}):a.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-answer-first",onClick:()=>o(m.authorId),className:"h-7 px-2 text-xs",children:"Answer here first"})),d&&a.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop",disabled:(u==null?void 0:u.has(m.authorId))===!0,onClick:()=>c(m.authorId),onFocus:()=>j.current=m.authorId,ref:b=>{b===null?y.current.delete(m.authorId):y.current.set(m.authorId,b)},"aria-label":`Stop ${m.author.displayName}`,className:"h-7 px-2 text-xs",children:"Stop"})]})]})]},m.authorId))}),f&&a.jsx("div",{className:"border-border border-t p-2",children:a.jsxs(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop-all",disabled:p,onClick:r,className:"h-auto w-full flex-col items-start gap-0.5 px-2 py-1.5 text-xs",children:[a.jsx("span",{children:"Stop everything in this room"}),a.jsx("span",{className:"text-muted-foreground font-normal",children:`Stops all ${e.length}`})]})})]})}function rr({since:e}){const[t,n]=l.useState(()=>Date.now());return l.useEffect(()=>{const i=setInterval(()=>n(Date.now()),ar);return()=>clearInterval(i)},[e]),a.jsx("span",{className:"text-muted-foreground shrink-0 tabular-nums",children:qt(Math.max(0,t-Date.parse(e)))})}function sr(e,t,n){const i=l.useRef(null),o=l.useCallback((s,r)=>{const p=Number(r.getAttribute("aria-posinset")),c=s==="next"?p+1:p-1;if(!Number.isFinite(c)||c<1)return;let u=0;const d=e.findIndex(f=>f.kind==="message"&&++u===c);d!==-1&&(i.current=c,t.scrollToIndex(d,{align:s==="next"?"end":"start"}))},[e,t]);return l.useEffect(()=>{var p;const s=i.current;if(s===null)return;const r=(p=n.current)==null?void 0:p.querySelector(`[${ct}][aria-posinset="${s}"]`);r!=null&&(i.current=null,r.focus())}),o}function lr(e){const{conversationId:t,rows:n,virtualizer:i,landOn:o,landingReady:s,resumeRow:r,landOnRow:p,onTopRow:c}=e,[u,d]=l.useState(!1);l.useLayoutEffect(()=>{d(!0)},[]);const f=l.useRef(null),[y,j]=l.useState(!1),[x,m]=l.useState(null),[b,D]=l.useState(null),g=l.useRef(null);l.useLayoutEffect(()=>{if(!u||!s||n.length===0)return;const w=p==null?void 0:p(),C=f.current!==t;if(!C&&w===void 0)return;if(f.current=t,C&&(g.current=null),j(!0),w!==void 0){const T=n.findIndex(S=>S.id===w);if(T!==-1){m("requested"),D(w),i.scrollToIndex(T,{align:"center"});return}}if(!C)return;D(null);const I=r==null?void 0:r();if(I!==void 0){const T=n.findIndex(S=>S.id===I);if(T!==-1){m("remembered"),i.scrollToIndex(T,{align:"start"});return}}const R=o==="unread"?n.findIndex(T=>T.kind==="unread-divider"):-1;if(R===-1){m(I===void 0?"end":"end-row-gone"),i.scrollToEnd();return}m("unread"),i.scrollToIndex(Math.max(0,R-1),{align:"start"})},[u,s,t,n,i,o,r,p]);const v=l.useCallback((w,C)=>{var N;const I=(w==null?void 0:w.scrollTop)??0,R=i.getVirtualItems().find(F=>F.end>I),T=R===void 0||(N=n[R.index])==null?void 0:N.id,S=C?void 0:T;S!==g.current&&(g.current=S,c==null||c(S))},[i,n,c]);return{landed:y,landedOn:x,landedRow:b,reportTopRow:v}}function cr(e,t,n){const i=l.useCallback(s=>{var r;return((r=e[s])==null?void 0:r.id)??s},[e]);return Ha({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>80,overscan:5,getItemKey:i,measureElement:(s,r,p)=>{var y;const c=(y=r==null?void 0:r.borderBoxSize)==null?void 0:y[0],u=c?Math.round(c.blockSize):s.getBoundingClientRect().height;if(u>0)return u;const d=p.indexFromElement(s),f=p.options.getItemKey(d);return p.itemSizeCache.get(f)??p.options.estimateSize(d)},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:64,onChange:s=>{s.isScrolling||n==null||n()}})}const pr=64;function dr(e){const{conversationId:t,rowCount:n}=e,i=l.useRef(null),o=l.useRef(!0),[s,r]=l.useState(!0),[p,c]=l.useState(!1),u=l.useRef(t),d=l.useCallback(()=>{const x=i.current;if(!x)return;const m=x.scrollHeight-x.scrollTop-x.clientHeight<=pr;o.current=m,r(b=>b===m?b:m),m&&c(!1)},[]),f=l.useCallback(x=>{i.current=x},[]);l.useEffect(()=>{if(u.current===t)return;u.current=t,o.current=!0,r(!0),c(!1);const x=i.current;x&&(x.scrollTop=x.scrollHeight)},[t]);const y=l.useRef(n);l.useEffect(()=>{const x=y.current;y.current=n,n>x&&!o.current&&c(!0)},[n]);const j=l.useCallback(x=>{const m=i.current;m&&m.scrollTo({top:m.scrollHeight,behavior:(x==null?void 0:x.behavior)??"auto"}),o.current=!0,r(!0),c(!1)},[]);return{scrollRef:f,onScroll:d,isAtBottom:s,hasNewRows:p,atBottomRef:o,scrollToBottom:j}}const ur=800,Ft=24;function mr({scrollRef:e}){const t=l.useRef(null),n=l.useRef(null),i=l.useRef(null),[o,s]=l.useState(!1),r=l.useRef(!1),p=l.useRef(!1),c=l.useRef(0),u=l.useRef(0),d=l.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{!r.current&&!p.current&&s(!1)},ur)},[]),f=l.useCallback(()=>{s(!0),d()},[d]),y=l.useCallback(()=>{p.current=!0,f()},[f]),j=l.useCallback(()=>{p.current=!1,d()},[d]),x=l.useCallback(()=>{const D=e.current,g=t.current,v=n.current;if(!D||!g||!v)return;const{scrollTop:w,scrollHeight:C,clientHeight:I}=D;if(C<=I){g.style.display="none";return}g.style.display="";const R=v.clientHeight,T=I/C,S=Math.max(T*R,Ft),N=R-S,$=w/(C-I)*N;g.style.height=`${S}px`,g.style.transform=`translateY(${$}px)`},[e]);l.useEffect(()=>{const D=e.current;if(!D)return;const g=()=>{f(),x()};return D.addEventListener("scroll",g,{passive:!0}),x(),()=>D.removeEventListener("scroll",g)},[e,f,x]);const m=l.useCallback(D=>{if(D.target===t.current)return;const g=e.current,v=n.current;if(!g||!v)return;const w=v.getBoundingClientRect(),C=(D.clientY-w.top)/w.height;g.scrollTop=C*(g.scrollHeight-g.clientHeight)},[e]),b=l.useCallback(D=>{var w;D.preventDefault(),D.stopPropagation(),r.current=!0,c.current=D.clientY,u.current=((w=e.current)==null?void 0:w.scrollTop)??0;const g=C=>{const I=e.current,R=n.current;if(!I||!R)return;const T=C.clientY-c.current,S=R.clientHeight,N=I.clientHeight/I.scrollHeight,F=Math.max(N*S,Ft),$=S-F,B=I.scrollHeight-I.clientHeight,A=T/$*B;I.scrollTop=u.current+A},v=()=>{r.current=!1,document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",v),d()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",v)},[e,d]);return a.jsx("div",{ref:n,role:"presentation",onClick:m,onPointerEnter:y,onPointerLeave:j,style:{top:"var(--conversation-thumb-top, 0px)"},className:"pointer-events-auto absolute right-0 bottom-0 z-10 w-2.5",children:a.jsx("div",{ref:t,onPointerDown:b,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:o?1:0}})})}function fr({hasNewRows:e,isAtBottom:t,hasRows:n,onJump:i}){return a.jsxs(a.Fragment,{children:[a.jsx(ve,{children:e&&!t&&a.jsxs(X.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:i,"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",a.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:"New messages"})]})}),a.jsx(ve,{children:!t&&n&&a.jsx(X.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:i,"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:a.jsx(ua,{className:"size-(--size-icon-md)"})})})]})}const xr=2200;function gr(e){return e===null?"auto":e.scrollHeight-e.scrollTop-e.clientHeight<=e.clientHeight?"smooth":"auto"}function vr({conversationId:e,label:t,rows:n,renderRow:i,onOpenThread:o,domIdOf:s,landOn:r="end",landingReady:p=!0,resumeRow:c,landOnRow:u,onTopRow:d,pending:f,viewerAuthorId:y,loading:j,empty:x,transcriptAnnouncement:m,approvalAnnouncement:b,onReachedBottom:D,busy:g,className:v,"data-testid":w,feedTestId:C,ref:I}){var te;const{capabilities:R}=ze(),T=l.useRef(null),S=f??[],N=dr({conversationId:e,rowCount:n.length+S.length}),{scrollRef:F,atBottomRef:$}=N,B=l.useCallback(z=>{T.current=z,F(z)},[F]),A=l.useRef(null),P=l.useRef(!1),de=l.useCallback(()=>{var z;P.current&&((z=A.current)==null||z.call(A,T.current,$.current))},[$]),K=cr(n,T,de),{landed:ne,landedOn:k,landedRow:Q,reportTopRow:Z}=lr({conversationId:e,rows:n,virtualizer:K,landOn:r,landingReady:p&&j==null,...c===void 0?{}:{resumeRow:c},...u===void 0?{}:{landOnRow:u},...d===void 0?{}:{onTopRow:d}});l.useLayoutEffect(()=>{A.current=Z,P.current=ne});const G=l.useCallback(()=>{N.onScroll(),Z(T.current,$.current)},[N,Z,$]),he=K.isAtEnd();l.useEffect(()=>{ne&&he&&(D==null||D())},[ne,he,D]);const ae=sr(n,K,T),Y=l.useCallback(z=>{const W=document.getElementById(z);return W===null?!1:(W.scrollIntoView({block:"center"}),W.focus({preventScroll:!0}),!0)},[]),J=l.useRef(null),V=l.useRef(void 0),ie=l.useCallback(()=>{var z;V.current!==void 0&&(clearTimeout(V.current),V.current=void 0),(z=J.current)==null||z.removeAttribute("data-landed"),J.current=null},[]),ue=l.useRef(null);l.useEffect(()=>{if(k!=="requested"||Q===null||ue.current===Q||s===void 0)return;const z=n.find(re=>re.id===Q),W=z===void 0?void 0:s(z);if(W===void 0)return;const ce=requestAnimationFrame(()=>{if(!Y(W))return;const re=document.getElementById(W);re!==null&&(ue.current=Q,ie(),re.setAttribute("data-landed","true"),J.current=re,V.current=setTimeout(ie,xr))});return()=>cancelAnimationFrame(ce)},[k,Q,s,n,Y,ie]),l.useEffect(()=>ie,[ie]);const me=l.useCallback(z=>{N.scrollToBottom(z),K.scrollToEnd({behavior:(z==null?void 0:z.behavior)??"auto"})},[N,K]);l.useImperativeHandle(I,()=>({scrollToRow(z){if(Y(z))return!0;if(s===void 0)return!1;const W=n.findIndex(ce=>s(ce)===z);return W===-1?!1:(K.scrollToIndex(W,{align:"center"}),requestAnimationFrame(()=>Y(z)),!0)},scrollToBottom:me}),[Y,s,n,K,me]);const fe=l.useMemo(()=>({onOpenThread:R.threads?o:void 0}),[R.threads,o]),oe=l.useMemo(()=>n.reduce((z,W)=>z+(W.kind==="message"?1:0),0),[n]);return j!=null?a.jsx(a.Fragment,{children:j}):x!==void 0&&n.length===0&&S.length===0?a.jsx(a.Fragment,{children:x}):a.jsxs("div",{"data-slot":"conversation-timeline","data-testid":w,"data-landed-on":k??void 0,"data-message-row-count":oe,className:O("relative min-h-0 flex-1",v),children:[a.jsxs("div",{ref:B,onScroll:G,"data-slot":"conversation-scroller","data-testid":"conversation-scroller",className:"chat-scroll-area h-full scrollbar-none overflow-y-auto",style:{overflowAnchor:"none"},children:[a.jsx(Xa,{label:t,busy:g,"data-testid":C,onBeyondRendered:ae,children:a.jsx("div",{style:{height:K.getTotalSize(),position:"relative",width:"100%"},children:a.jsx("div",{"data-slot":"conversation-window",className:"absolute left-0 w-full",style:{top:((te=K.getVirtualItems()[0])==null?void 0:te.start)??0},children:K.getVirtualItems().map(z=>a.jsx("div",{"data-index":z.index,ref:K.measureElement,children:i(n[z.index],{...fe,index:z.index})},n[z.index].id))})})}),S.length>0&&y!==void 0&&a.jsx("div",{className:"flex flex-col",children:S.map(z=>a.jsx(pi,{post:z,viewerAuthorId:y},z.clientId))})]}),m!==void 0&&a.jsx("div",{role:"log","aria-live":"polite","aria-atomic":"false","data-testid":"transcript-announcer",className:"sr-only",children:m}),b!==void 0&&a.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"approval-announcer",className:"sr-only",children:b}),a.jsx(mr,{scrollRef:T}),a.jsx(fr,{hasNewRows:N.hasNewRows,isAtBottom:N.isAtBottom,hasRows:n.length>0,onJump:()=>me({behavior:gr(T.current)})})]})}const hr=["react","react-more","run-with","reply","copy","mention","profile"],br={"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"]},wn=Object.entries(br).map(([e,t])=>({name:e,entries:t.map(n=>{const[i,...o]=n.split(" ");return{emoji:i,keywords:o}})})),jn=wn.flatMap(e=>e.entries);function yr(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.length===0?[]:jn.filter(n=>n.emoji===e.trim()||t.every(i=>n.keywords.some(o=>o.startsWith(i))))}function kr(e){return jn.find(t=>t.emoji===e)}function Se(e){var t;return((t=kr(e))==null?void 0:t.keywords[0])??e}function Dn(e,t,n){const i=l.useRef([]);l.useImperativeHandle(n,()=>({focusFirst:()=>{var r;return(r=i.current[0])==null?void 0:r.focus()}}));const o=l.useCallback(r=>p=>{i.current[r]=p},[]),s=l.useCallback((r,p)=>{const c=(u,d)=>{var f;e!==0&&((f=i.current[(u+d+e)%e])==null||f.focus())};switch(r.key){case"ArrowRight":case"ArrowDown":r.preventDefault(),c(p,1);break;case"ArrowLeft":case"ArrowUp":r.preventDefault(),c(p,-1);break;case"Home":if(r.ctrlKey||r.metaKey)break;r.preventDefault(),c(0,0);break;case"End":if(r.ctrlKey||r.metaKey)break;r.preventDefault(),c(e-1,0);break;case"Escape":r.preventDefault(),r.stopPropagation(),t();break}},[e,t]);return{register:o,handleKeyDown:s}}function En({mine:e,frequents:t,onPick:n,disabled:i}){const[o,s]=l.useState(""),r=l.useId(),p=l.useMemo(()=>yr(o),[o]),c=o.trim().length>0,u=d=>a.jsx("button",{type:"button",disabled:i,onClick:()=>n(d),"aria-pressed":e.includes(d),"aria-label":Se(d),title:Se(d),className:O("focus-ring hover:bg-accent flex size-8 items-center justify-center rounded-md text-base",Ze,"disabled:pointer-events-none disabled:opacity-50",e.includes(d)&&"bg-brand/15 ring-brand/40 ring-1"),children:a.jsx("span",{"aria-hidden":!0,children:d})},d);return a.jsxs("div",{className:"flex flex-col gap-2","data-testid":"reaction-picker",children:[a.jsx(ma,{autoFocus:!0,value:o,onChange:d=>s(d.target.value),placeholder:"Search emoji…","aria-label":"Search emoji",className:"h-8"}),i===!0&&a.jsx("p",{role:"status",className:"text-muted-foreground px-1 text-xs",children:"Reactions send once the room reconnects."}),a.jsx("div",{className:"max-h-64 overflow-y-auto pr-1",children:c?p.length===0?a.jsx("p",{className:"text-muted-foreground px-1 py-6 text-center text-xs",children:"Nothing here matches that."}):a.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:p.map(d=>u(d.emoji))}):a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs("section",{role:"group","aria-labelledby":`${r}-frequents`,children:[a.jsx("h3",{id:`${r}-frequents`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:"Your most used"}),a.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:t.map(u)})]}),wn.map((d,f)=>a.jsxs("section",{role:"group","aria-labelledby":`${r}-group-${f}`,children:[a.jsx("h3",{id:`${r}-group-${f}`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:d.name}),a.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:d.entries.map(y=>u(y.emoji))})]},d.name))]})})]})}function Nn({appearance:e="capsule",mine:t,frequents:n,onPick:i,disabled:o,triggerRef:s,onTriggerKeyDown:r}){const[p,c]=l.useState(!1),u=e==="capsule";return a.jsxs(fa,{open:p,onOpenChange:c,children:[a.jsx(xa,{asChild:!0,children:a.jsx(ge,{ref:s,type:"button",variant:"ghost",size:u?"icon-xs":"sm",tabIndex:-1,disabled:o,"data-entry-action":"react-more","data-testid":u?void 0:"entry-reactions-add","aria-label":"Pick a reaction",title:"Pick a reaction",onKeyDown:r,className:O("leading-none",u?"text-control":"text-muted-foreground/60 hover:text-foreground h-auto rounded-full px-2 py-0.5 text-xs"),children:a.jsx("span",{"aria-hidden":!0,children:"🙂+"})})}),a.jsx(ga,{align:"end",className:"w-[19rem] p-2",children:a.jsx(En,{mine:t,frequents:n,disabled:o,onPick:d=>{i(d),c(!1)}})})]})}function wr({prompt:e,sessionId:t,triggerRef:n,onTriggerKeyDown:i}){const o=va(),s=it(),{sessions:r}=ha(),{data:p}=ba(),{data:c}=ya(),[u,d]=l.useState({open:!1}),f=r.find(g=>g.id===t),y=f==null?void 0:f.runtime,j=f==null?void 0:f.cwd,x=wa.filter(g=>g!==y),m=g=>(p?g in p.capabilities:!0)&&ja(c,g),b=g=>{Da(s,{dir:j,runtime:g,prompt:e}).then(v=>o(v)).catch(v=>{Ea(s,v),Na(j??null)})},D=g=>{if(!m(g)){d({open:!0,runtime:g});return}b(g)};return a.jsxs(a.Fragment,{children:[a.jsxs(Kt,{children:[a.jsx(Wt,{asChild:!0,children:a.jsx("button",{ref:n,type:"button","data-entry-action":"run-with","aria-label":"Run this prompt elsewhere",onKeyDown:i,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:a.jsx(Va,{className:"size-3.5"})})}),a.jsxs(Ut,{align:"end",className:"w-52",children:[a.jsx(ka,{children:"Run this with…"}),x.map(g=>{const v=Ht(g);return a.jsx(Xe,{icon:v.icon,description:m(g)?void 0:"Connect",onSelect:()=>D(g),children:v.label},g)})]})]}),a.jsx(Ba,{runtime:u.runtime,open:u.open,onOpenChange:g=>d(v=>({...v,open:g})),renderConnect:Ka,onRuntimeReady:g=>{d({open:!1}),b(g)}})]})}function jr(e,t,n){return hr.flatMap(i=>{if(i==="react")return t?t.quick.map(s=>({kind:"quick",slot:i,emoji:s,mine:t.mine.includes(s)})):[];if(i==="react-more")return t?[{kind:"picker",slot:i}]:[];if(i==="run-with")return n?[{kind:"run-with",slot:i,runWith:n}]:[];const o=e.find(s=>s.id===i);return o?[{kind:"command",slot:i,action:o}]:[]})}const Dr=l.forwardRef(function({actions:t,reactions:n,runWith:i,onExit:o,className:s},r){const p=jr(t,n,i),{register:c,handleKeyDown:u}=Dn(p.length,o,r);return p.length===0?null:a.jsx("div",{role:"toolbar","aria-label":"Message actions","aria-orientation":"horizontal","data-testid":"entry-actions",className:s,children:p.map((d,f)=>{const y=x=>u(x,f),j=d.kind==="command"&&f>0&&p[f-1].kind!=="command";return d.kind==="run-with"?a.jsx(wr,{prompt:d.runWith.prompt,sessionId:d.runWith.sessionId,triggerRef:c(f),onTriggerKeyDown:y},"run-with"):d.kind==="picker"?a.jsx(Nn,{mine:n.mine,frequents:n.quick,disabled:n.disabled,onPick:n.onToggle,triggerRef:c(f),onTriggerKeyDown:y},"react-more"):a.jsxs(l.Fragment,{children:[j&&a.jsx("span",{"aria-hidden":!0,className:"bg-border mx-0.5 my-1 w-px self-stretch"}),d.kind==="quick"?a.jsx(ge,{ref:c(f),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,disabled:n.disabled,"data-entry-action":d.slot,"data-emoji":d.emoji,"data-reacted":d.mine?"true":void 0,"aria-pressed":d.mine,"aria-label":`React with ${Se(d.emoji)}`,title:`React with ${Se(d.emoji)}`,onClick:()=>n.onToggle(d.emoji),onKeyDown:y,className:O("text-control leading-none",d.mine&&"bg-brand/15 text-foreground"),children:a.jsx("span",{"aria-hidden":!0,children:d.emoji})}):a.jsx(ge,{ref:c(f),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,"data-entry-action":d.slot,"aria-label":d.action.label,title:d.action.label,onClick:d.action.run,onKeyDown:y,children:a.jsx(d.action.icon,{"aria-hidden":!0,className:"size-3.5"})})]},d.kind==="quick"?d.emoji:d.action.id)})})});function Er({quick:e,mine:t,onToggle:n,disabled:i}){const{close:o}=Aa(),[s,r]=l.useState(!1),p=c=>{n(c),o()};return a.jsxs("div",{className:"border-border border-b px-4 py-3","data-testid":"drawer-reactions",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[e.map(c=>a.jsx("button",{type:"button",disabled:i,onClick:()=>p(c),"data-entry-action":"react","data-emoji":c,"aria-pressed":t.includes(c),"aria-label":`React with ${Se(c)}`,className:O("focus-ring flex size-11 items-center justify-center rounded-full border text-lg",Ze,"disabled:pointer-events-none disabled:opacity-50",t.includes(c)?"border-brand/70 bg-brand/12":"border-border bg-muted/60 active:bg-accent"),children:a.jsx("span",{"aria-hidden":!0,children:c})},c)),a.jsx("button",{type:"button",disabled:i,onClick:()=>r(c=>!c),"aria-expanded":s,"aria-label":"Pick a reaction",className:O("focus-ring border-border bg-muted/60 active:bg-accent flex size-11 items-center justify-center rounded-full border text-base",Ze,"disabled:pointer-events-none disabled:opacity-50"),children:a.jsx("span",{"aria-hidden":!0,children:"🙂+"})})]}),s&&a.jsx("div",{className:"pt-3",children:a.jsx(En,{mine:t,frequents:e,onPick:p,disabled:i})})]})}function Nr({actions:e,reactions:t,onPressStateChange:n,children:i}){const o=Ra();return e.length===0?a.jsx(a.Fragment,{children:i}):a.jsxs(Ta,{children:[a.jsx(Ca,{asChild:!0,onPressStateChange:n,children:i}),a.jsxs(Sa,{className:"w-52",children:[o&&t&&a.jsx(Er,{...t}),e.map(s=>a.jsxs(za,{onClick:s.run,children:[a.jsx(s.icon,{"aria-hidden":!0,className:"mr-2 size-4"}),s.label]},s.id))]})]})}function Rr({count:e,roll:t,mine:n}){const[i]=l.useState(t);return a.jsx("span",{"aria-hidden":!0,className:O("tabular-nums",n?"text-foreground/80":"text-muted-foreground",i&&"motion-safe:animate-reaction-roll"),children:e})}function Tr({reaction:e,mine:t,summary:n,arrived:i,rolled:o,onToggle:s,disabled:r,buttonRef:p,onKeyDown:c}){const[u]=l.useState(i),d=e.authorIds.length;return a.jsxs(X.button,{ref:p,type:"button",tabIndex:-1,onKeyDown:c,exit:{opacity:0},transition:{duration:.12},disabled:r,onClick:s,"aria-pressed":t,"aria-label":n,title:n,"data-testid":"entry-reaction","data-emoji":e.emoji,"data-mine":t?"true":void 0,className:O("focus-ring relative inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","disabled:pointer-events-none disabled:opacity-50",t?"border-brand/70 bg-brand/12 text-foreground":"border-border bg-muted/60 text-muted-foreground hover:bg-muted",u&&"motion-safe:animate-reaction-pop"),children:[u&&a.jsx("span",{"aria-hidden":!0,className:"border-brand motion-safe:animate-reaction-ring pointer-events-none absolute -inset-1 rounded-full border opacity-0"}),a.jsx("span",{"aria-hidden":!0,children:e.emoji}),a.jsx(Rr,{count:d,roll:o,mine:t},d)]})}const Cr=l.forwardRef(function({reactions:t,viewerAuthorId:n,names:i,frequents:o,onToggle:s,disabled:r,onExit:p},c){const[u,d]=l.useState(!1),f=l.useRef(null),y=f.current,[j,x]=l.useState(!1),[m,b]=l.useState(t.length);m!==t.length&&(b(t.length),x(t.length===0&&m>0)),l.useEffect(()=>{f.current=new Map(t.map(N=>[N.emoji,N.authorIds.length]))});const{shown:D,hidden:g}=ei(t),v=u?t:D,w=t.filter(N=>xt(N,n)).map(N=>N.emoji),C=g>0&&!u?1:0,I=t.length>0?1:0,{register:R,handleKeyDown:T}=Dn(v.length+C+I,p,c),S=l.useCallback(N=>F=>T(F,N),[T]);return t.length===0&&!j?null:a.jsxs("div",{"data-testid":"entry-reactions",className:"mt-1 flex flex-wrap items-center gap-1",role:"group","aria-label":"Reactions",children:[a.jsx(ve,{initial:!1,onExitComplete:()=>x(!1),children:v.map((N,F)=>a.jsx(Tr,{reaction:N,mine:xt(N,n),summary:Qa(N,n,i),arrived:y!==null&&!y.has(N.emoji),rolled:(y==null?void 0:y.get(N.emoji))!==void 0&&y.get(N.emoji)!==N.authorIds.length,onToggle:()=>s(N.emoji),disabled:r,buttonRef:R(F),onKeyDown:S(F)},N.emoji))}),C===1&&a.jsxs("button",{ref:R(v.length),type:"button",tabIndex:-1,onKeyDown:S(v.length),onClick:()=>d(!0),"data-testid":"entry-reactions-more",className:"focus-ring text-muted-foreground hover:text-foreground rounded-full px-2 py-0.5 text-xs",children:["+",g," more"]}),t.length>0&&a.jsx(Nn,{appearance:"ghost-pill",mine:w,frequents:o,disabled:r,onPick:s,triggerRef:R(v.length+C),onTriggerKeyDown:S(v.length+C)})]})}),Rn=l.createContext(null);function Sr({value:e,children:t}){return a.jsx(Rn.Provider,{value:e,children:t})}function Ie(){const e=l.useContext(Rn);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 Tn(e){return e==="first"||e==="only"}const zr=Ia("",{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 Ar({actions:e=[],reactions:t,runWith:n,barRef:i,onExit:o}){const{capabilities:s,anchor:r}=ze(),{slots:p}=Ie();return a.jsxs(a.Fragment,{children:[e.length>0&&a.jsx("button",{type:"button",tabIndex:-1,"data-testid":"entry-actions-reach","aria-label":"Message actions",onClick:()=>{var c;return(c=i==null?void 0:i.current)==null?void 0:c.focusFirst()},className:"sr-only"}),a.jsx("div",{"data-slot":"message-actions",className:zr({anchor:r}),children:a.jsx(Dr,{ref:i,actions:e,reactions:s.reactions?t:void 0,runWith:s.runWith?n:void 0,onExit:o,className:p.actions()})})]})}function Ir({id:e,author:t,at:n,origin:i,mark:o,renderName:s,asChild:r=!1,className:p}){const{slots:c,position:u}=Ie(),d=n===void 0?"":nn(n);if(!Tn(u))return null;const f=r?st:"div",y=a.jsx("span",{className:c.authorName(),children:t.displayName});return a.jsxs(f,{id:e,"data-slot":"message-author",className:O(c.header(),p),children:[s?s(y):y,i!==void 0&&a.jsx(Oa,{origin:i}),o,a.jsx(_a,{retired:t.retired}),d.length>0&&a.jsx("time",{dateTime:n,title:an(n??""),className:O(c.timestamp(),"text-msg-timestamp"),children:d})]})}function Or({children:e,className:t}){const{slots:n}=Ie();return a.jsx("div",{"data-slot":"message-body",className:O(n.body(),t),children:e})}function _r({id:e,children:t,className:n}){const{slots:i}=Ie();return a.jsx("div",{id:e,"data-slot":"message-content",className:O(i.content(),n),children:t})}function Fr({author:e,at:t,onViewProfile:n,isSelf:i,renderAvatar:o,className:s}){const{slots:r,position:p}=Ie(),{showTimestamps:c}=Fa(),u=t===void 0?"":nn(t);return a.jsx("div",{"data-slot":"message-gutter",className:O(r.gutter(),s),children:Tn(p)?(o??(d=>d))(a.jsx(tn,{author:e,onViewProfile:n,isSelf:i})):u.length>0&&a.jsx("time",{dateTime:t,title:an(t??""),className:O(r.avatarTimestamp(),c?"text-msg-timestamp":"group-focus-within:text-msg-timestamp group-hover:text-msg-timestamp text-transparent"),children:u})})}function Mr({ref:e,...t}){const{capabilities:n}=ze(),[i,o]=l.useState(t.reactions.length>0);return!i&&t.reactions.length>0&&o(!0),!n.reactions||!i?null:a.jsx("div",{"data-slot":"message-reactions",className:"contents",children:a.jsx(Cr,{ref:e,...t})})}const Lr={type:"spring",stiffness:320,damping:28};function Pr({role:e="assistant",position:t="only",isNew:n=!1,actions:i,reactions:o,asChild:s=!1,className:r,children:p,ref:c,...u}){const{capabilities:d,density:f,anchor:y}=ze(),[j,x]=l.useState(null),m=l.useMemo(()=>({slots:li({role:e,position:t,density:f,anchor:y}),position:t}),[e,t,f,y]),b=i!==void 0&&i.length>0,D=s?st:X.div,g=a.jsx(D,{ref:c,"data-slot":"message-root",role:"article",className:O(m.slots.root(),"focus-visible:ring-ring outline-none focus-visible:ring-2","origin-center",b&&"[-webkit-touch-callout:none]",j==="pressing"&&"motion-safe:animate-press-in",j==="released"&&"motion-safe:animate-press-release",r),...s?{}:{initial:n?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:Lr},...u,children:a.jsx(Sr,{value:m,children:a.jsx(Ma,{children:p})})});return a.jsx(Nr,{actions:i??[],reactions:d.reactions?o:void 0,onPressStateChange:x,children:g})}const ns={Root:Mo,Timeline:vr,LiveLane:nr,LivePeek:or,Composer:_o,Footer:Fo},as={Root:Pr,Gutter:Fr,Author:Ir,Body:Or,Content:_r,Attachments:mi,Reactions:Mr,Actions:Ar};export{ns as C,hr as E,Xa as F,tn as M,Zr as N,pi as P,an as a,as as b,ti as c,Qr as d,go as e,nn as f,Xr as g,Yr as h,xt as i,ts as j,ni as k,Jr as l,Vr as m,es as t,ze as u};
23
+ `)},consumeEscapeIntoNewline(){const t=e.current;t&&bo(t)},clearThroughUndoStack(){const t=e.current;t&&yo(t)},isComposing(){return!1}}}const wo=200,St=24,jo=200;function Do(e,t){l.useLayoutEffect(()=>{const n=e.current;if(!n)return;const i=()=>{n.style.transition="",n.style.height=""};if(t!==""){n.style.transition="",n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,wo)}px`;return}const o=n.offsetHeight;if(o<=St){i();return}n.style.height=`${o}px`,n.style.transition=`height ${jo}ms ease`;const s=requestAnimationFrame(()=>{n.style.height=`${St}px`});return n.addEventListener("transitionend",i,{once:!0}),()=>{cancelAnimationFrame(s),n.removeEventListener("transitionend",i),i()}},[e,t])}const zt=l.forwardRef(function({value:t,onChange:n,onCursorChange:i,onKeyDown:o,onFocus:s,onBlur:r,placeholder:p,placeholderOverlay:c,isPaletteOpen:u,paletteListboxId:d,activeDescendantId:f,onSurfaceChange:y},j){const x=l.useRef(null),m=Bt(),b=l.useRef(null);l.useEffect(()=>{b.current??(b.current=ko(x)),y(b.current)},[y]),l.useImperativeHandle(j,()=>({focus:()=>{var w;return(w=x.current)==null?void 0:w.focus()},focusUnlessTouch:()=>{var w;m||(w=x.current)==null||w.focus()},focusAt:w=>{const C=x.current;C&&(C.focus(),C.setSelectionRange(w,w))}})),Do(x,t);const D=l.useCallback(w=>{n(w.target.value),i==null||i(w.target.selectionStart)},[n,i]),g=l.useCallback(()=>{x.current&&(i==null||i(x.current.selectionStart))},[i]),v=t.trim().length>0;return a.jsxs("div",{className:"relative min-h-[24px] flex-1",children:[!v&&c,a.jsx("textarea",{ref:x,value:t,onChange:D,onKeyDown:o,onFocus:s,onBlur:r,onSelect:g,role:"combobox","aria-autocomplete":"list","aria-controls":u?d:void 0,"aria-expanded":u??!1,"aria-activedescendant":u?f:void 0,"aria-label":p,placeholder:c?"":p,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 Eo({onSteer:e,onStage:t}){return!e&&!t?null:a.jsxs(Kt,{children:[a.jsx(Wt,{asChild:!0,children:a.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:a.jsx(Vn,{className:"size-(--size-icon-sm)"})})}),a.jsxs(Ut,{align:"end",children:[e&&a.jsx(Xe,{icon:Ya,description:"Send it into the task now",onSelect:e,children:"Steer"}),t&&a.jsx(Xe,{icon:Xn,description:"Use it next, without interrupting",onSelect:t,children:"Add context"})]})]})}const Fe={send:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Send message"},stop:{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60",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-destructive/90 hover:text-destructive-foreground dark:hover:bg-destructive/60",label:"Cancel upload"},dispatching:{className:"bg-muted text-muted-foreground",label:"Running command"},stopping:{className:"bg-muted text-muted-foreground",label:"Stopping…"}},No={send:qa,stop:Zt,queue:Qn,update:Jn,cancel:rt,"cancel-upload":De,dispatching:De,stopping:De};function Ro(e,t,n,i,o,s){return o?"dispatching":i?e?"update":"cancel":s?"stopping":t&&e?"queue":t?"stop":n?"cancel-upload":e?"send":null}function To(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 Co({hasText:e,isStreaming:t,commandPending:n=!1,submitDisabled:i=!1,editingQueueItem:o,queueDepth:s,isTouchOnly:r,onSubmit:p,onStop:c,onQueue:u,onSaveEdit:d,onCancelEdit:f,onCancelUpload:y,onSteer:j,onStage:x,stopPending:m=!1}){const b=Ro(e,t,y!==void 0,o,n,m),D=b==="send"&&i,g=D||b===null?void 0:To(b,{onSubmit:p,onStop:c,onQueue:u,onSaveEdit:d,onCancelEdit:f,onCancelUpload:y}),v=b===null?null:b==="send"&&r?Zn:No[b],w=b==="dispatching"||b==="stopping";return a.jsxs(a.Fragment,{children:[a.jsx(ve,{children:t&&e&&!m&&a.jsx(X.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:c,type:"button",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"Stop generating",children:a.jsx(Zt,{className:"size-(--size-icon-sm)"})})}),b==="queue"&&a.jsx(Eo,{onSteer:j,onStage:x}),a.jsxs("div",{className:"relative shrink-0",children:[b==="cancel-upload"&&a.jsx("span",{role:"status",className:"sr-only",children:"Uploading attachment"}),w&&b?a.jsxs("div",{role:"status",className:O("rounded-lg p-1.5 max-md:p-2",Fe[b].className),children:[a.jsx(De,{}),a.jsx("span",{className:"sr-only",children:Fe[b].label})]}):b&&v?a.jsx(X.button,{animate:{opacity:D?.5:1,scale:1},initial:!1,transition:{duration:.15},whileHover:D?void 0:{scale:1.05},whileTap:D?void 0:{scale:.97},onClick:g,disabled:D,type:"button",className:O("focus-ring rounded-lg p-1.5 transition-colors max-md:p-2",Fe[b].className,D&&"pointer-events-none"),"aria-label":Fe[b].label,children:a.jsx(v,{className:"size-(--size-icon-sm)"})}):a.jsx("div",{"aria-hidden":"true","data-testid":"action-slot-spacer",className:"p-1.5 max-md:p-2",children:a.jsx("div",{className:"size-(--size-icon-sm)"})}),s>0&&b==="queue"&&a.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:s})]})]})}const So=l.lazy(()=>ta(()=>import("./LexicalField-gYKPjFfN.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]))),zo=l.forwardRef(function({value:t,onChange:n,onSubmit:i,isStreaming:o,isUploading:s=!1,onCancelUpload:r,commandPending:p=!1,editingQueueItem:c=!1,editingPosition:u,queueDepth:d=0,onStop:f,stopPending:y=!1,onQueue:j,onSteer:x,onStage:m,onSaveEdit:b,onCancelEdit:D,onEscape:g,onClear:v,isPaletteOpen:w,paletteHasResults:C,tabPicks:I,onArrowUp:R,onArrowDown:T,onCommandSelect:S,activeDescendantId:N,paletteListboxId:F,onCursorChange:$,onAttach:B,placeholder:A="Send a message…",placeholderOverlay:P,onQueueNavigateUp:de,onQueueNavigateDown:K,contextKey:ne,onClearArmedChange:k,queueHasItems:Q=!1,canSubmit:Z=!0,canSubmitReason:G,richText:he=!1,mentionSubjects:ae},Y){const J=l.useRef(null),V=l.useRef(null),[ie,ue]=l.useState(!1),[me,fe]=l.useState(ho),oe=Bt();l.useImperativeHandle(Y,()=>({focus:()=>{var q;return(q=J.current)==null?void 0:q.focus()},focusUnlessTouch:()=>{var q;return(q=J.current)==null?void 0:q.focusUnlessTouch()},focusAt:q=>{var ke;return(ke=J.current)==null?void 0:ke.focusAt(q)}}));const te=l.useRef(oe);l.useEffect(()=>{var q;te.current||ea()||(q=J.current)==null||q.focus()},[]);const z=l.useCallback(()=>{var q;(q=J.current)==null||q.focusAt(t.length),f==null||f()},[f,t.length]),{handleKeyDown:W,clearArmed:ce}=vo({surface:me,value:t,isStreaming:o,isTouchOnly:oe,isUploading:s,onCancelUpload:r,commandPending:p,canSubmit:Z,editingQueueItem:c,isPaletteOpen:w,paletteHasResults:C,tabPicks:I,queueHasItems:Q,onSubmit:i,onStop:f,onEscape:g,onClear:v,onArrowUp:R,onArrowDown:T,onCommandSelect:S,onQueue:j,onSteer:x,onStage:m,onSaveEdit:b,onCancelEdit:D,onQueueNavigateUp:de,onQueueNavigateDown:K,contextKey:ne}),re=l.useCallback(()=>ue(!0),[]),xe=l.useCallback(()=>{ue(!1),w&&(g==null||g())},[w,g]),be={ref:J,value:t,onChange:n,onCursorChange:$,onKeyDown:W,onFocus:re,onBlur:xe,placeholder:A,placeholderOverlay:P,isPaletteOpen:w,paletteHasResults:C,paletteListboxId:F,activeDescendantId:N,onSurfaceChange:fe,mentionSubjects:ae},ee=t.trim().length>0,ye=v!==void 0&&ee;return l.useEffect(()=>{k==null||k(ce&&ye)},[ce,ye,k]),a.jsxs("div",{className:"flex flex-col gap-1.5",children:[!Z&&G&&a.jsx("div",{role:"status",className:"text-muted-foreground px-1 text-xs",children:G}),c&&a.jsx("div",{className:"text-muted-foreground px-0.5 text-xs",children:u!==void 0&&d>0?`Editing message ${u} of ${d}`:"Editing message"}),a.jsxs("div",{className:O("border-input bg-background flex items-end gap-1.5 rounded-md border p-1.5 shadow-xs transition-[color,box-shadow]",ie&&"border-ring ring-ring ring-[1px]",c&&"border-primary/40",!B&&"pl-3"),children:[B&&a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:V,type:"file",className:"hidden",multiple:!0,onChange:q=>{const ke=Array.from(q.target.files??[]);ke.length>0&&B(ke),q.target.value=""}}),a.jsx("button",{type:"button",onClick:()=>{var q;return(q=V.current)==null?void 0:q.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:a.jsx($a,{className:"size-4"})})]}),he?a.jsx(l.Suspense,{fallback:a.jsx(zt,{...be}),children:a.jsx(So,{...be})}):a.jsx(zt,{...be}),v&&a.jsx(X.button,{animate:{opacity:ee?.5:0,scale:ee?1:.8},transition:{duration:.15},whileHover:ee?{opacity:1}:void 0,onClick:v,disabled:!ee,type:"button",className:O("focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!ee&&"pointer-events-none"),"aria-label":"Clear message",children:a.jsx(rt,{className:"size-(--size-icon-sm)"})}),a.jsx(Co,{hasText:ee,isStreaming:o,onCancelUpload:s?r:void 0,commandPending:p,submitDisabled:!Z,editingQueueItem:c,queueDepth:d,isTouchOnly:oe,onSubmit:i,onStop:z,stopPending:y,onQueue:j,onSteer:x,onStage:m,onSaveEdit:b,onCancelEdit:D})]})]})});function Ao({children:e,className:t}){return a.jsx("div",{className:O("absolute right-0 bottom-full left-0 mb-2",t),children:e})}function At(e){return e.type.startsWith("image/")}const It="This file didn’t upload";function Io({files:e,onRemove:t,onRetry:n,onCancel:i}){const o=e.filter(r=>At(r.file)).map(r=>r.id).join(" "),s=l.useMemo(()=>{const r=new Map;for(const p of e)At(p.file)&&r.set(p.id,URL.createObjectURL(p.file));return r},[o]);return l.useEffect(()=>()=>{for(const r of s.values())URL.revokeObjectURL(r)},[s]),a.jsx("div",{className:"flex flex-wrap gap-1.5 px-1 pb-1.5",children:a.jsx(ve,{children:e.map(r=>{const p=s.get(r.id),c=r.status==="error",u=r.status==="uploading"&&i!==void 0;return a.jsxs(X.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},className:O("flex items-center gap-1 rounded-md px-2 py-1 text-xs",c?"bg-destructive/10 border-destructive/40 border":"bg-muted"),children:[r.status==="uploading"?a.jsx(De,{size:"xs",className:"text-muted-foreground"}):c?a.jsx(na,{className:"text-destructive size-(--size-icon-xs) shrink-0"}):p?a.jsx("img",{src:p,alt:"",className:"size-5 shrink-0 rounded object-cover"}):a.jsx(lt,{className:"text-muted-foreground size-(--size-icon-xs)"}),a.jsx("span",{className:"max-w-32 truncate",children:r.file.name}),r.status==="uploading"&&a.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[r.progress,"%"]}),c&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-destructive max-w-44 truncate",title:r.error??It,children:r.error??It}),n&&a.jsx("button",{type:"button",onClick:()=>n(r.id),className:"text-foreground ml-0.5 shrink-0 rounded-sm font-medium underline decoration-dotted underline-offset-2","aria-label":`Try uploading ${r.file.name} again`,children:"Try again"})]}),a.jsx("button",{type:"button",onClick:u?i:()=>t(r.id),className:"text-muted-foreground hover:text-foreground -mr-0.5 ml-0.5 shrink-0 rounded-sm p-0.5","aria-label":u?`Cancel upload of ${r.file.name}`:`Remove ${r.file.name}`,children:a.jsx(rt,{className:"size-3"})})]},r.id)})})})}function Oo(){const e=Gt();return a.jsx(X.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 Te={Root:po,Input:zo,OverlayLane:Ao,Attachments:Io,ClearArmedHint:Oo};function _o({value:e,onChange:t,onSubmit:n,inputRef:i,head:o,mentionPicker:s,overlays:r,queue:p,aboveInput:c,asks:u,footer:d,children:f,className:y,onPathDropped:j,input:x}){const{capabilities:m,target:b}=ze();if(b===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[D,g]=l.useState(!1),v=m.attachments?b.attachments:null,w=(v==null?void 0:v.staged)??[],C=(v==null?void 0:v.hasFailed)===!0,I=b.canSend&&!C&&(x.canSubmit??!0),R=C?void 0:b.canSend?x.canSubmitReason:b.canSendReason,T=a.jsxs(a.Fragment,{children:[a.jsxs(Te.OverlayLane,{children:[m.mentions&&s,r,D&&a.jsx(Te.ClearArmedHint,{})]}),v!==null&&w.length>0&&a.jsx(Te.Attachments,{files:[...w],onRemove:v.remove,onRetry:v.retry,onCancel:v.cancel}),b.queue!==void 0&&p,c,a.jsx(Te.Input,{...x,ref:i,value:e,onChange:t,onSubmit:n,placeholder:x.placeholder??b.placeholder,canSubmit:I,...R===void 0?{}:{canSubmitReason:R},...v===null?{}:{onAttach:v.add,...v.holdsSendWhileUploading?{isUploading:v.isUploading,onCancelUpload:v.cancel}:{}},onClearArmedChange:g}),d]});return a.jsxs(Te.Root,{className:y,...v===null?{}:{onFilesDropped:v.add},...j===void 0?{}:{onPathDropped:j},children:[o,u===void 0?T:a.jsx(ve,{mode:"wait",children:u!==null?a.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:u},"interactive"):a.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:T},"normal")}),f]})}function Fo({asChild:e,children:t,className:n}){const i=e===!0?st:"div";return a.jsx(i,{"data-slot":"conversation-footer",className:O(n),children:t})}function Mo({surface:e,capabilities:t,target:n,density:i="comfortable",anchor:o="corner",children:s}){const r=l.useMemo(()=>({surface:e,capabilities:t,target:n??null,density:i,anchor:o}),[e,t,n,i,o]);return a.jsx(Qt.Provider,{value:r,children:s})}const Ot=1e3;function Lo(e,t=Date.now){const n=Date.parse(e)+en,[i,o]=l.useState(()=>t());return l.useEffect(()=>{const s=()=>o(t());let r,p;const c=n-t();return c>0?p=setTimeout(()=>{o(Math.max(t(),n)),r=setInterval(s,Ot)},c):r=setInterval(s,Ot),()=>{clearTimeout(p),clearInterval(r)}},[n,t]),oi(e,i)}function yn(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 Po(e){return e?"This room is no longer available":"Reconnecting. You can still send"}function qo(e,t){switch(e.kind){case"ask":return"";case"stalled":return yn(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 _t(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 $o={room:"room-presence",thread:"thread-presence",session:"session-presence"},Ho={room:"room-held",thread:"thread-held",session:"session-held"};function Bo({state:e,onRetry:t,unavailable:n=!1,faces:i,reducedMotion:o=!1,scope:s="room"}){switch(e.kind){case"ask":return a.jsx(Ko,{state:e,reducedMotion:o});case"stalled":return a.jsx(Wo,{onRetry:t,unavailable:n});case"presence":return a.jsx(Uo,{state:e,faces:i,reducedMotion:o,scope:s});case"held":return a.jsx(Go,{state:e,faces:i,scope:s});case"silent-finish":return a.jsx(Yo,{state:e});case"turn-waiting":return a.jsx(Vo,{state:e});case"turn-progress":return a.jsx(Xo,{state:e,reducedMotion:o});case"turn-system":return a.jsx(Zo,{state:e});case"turn-streaming":return a.jsx(Jo,{state:e,reducedMotion:o});case"turn-complete":return a.jsx(Qo,{state:e});case"empty":return null}}function Ko({state:e,reducedMotion:t}){return a.jsxs("span",{"data-testid":"lane-ask",className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"needs-you",reducedMotion:t}),a.jsx("span",{className:"text-foreground truncate",children:e.headline}),e.count>1&&a.jsxs("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 tabular-nums",children:["+",e.count-1]}),a.jsx("span",{className:"text-status-warning-fg shrink-0 font-medium",children:"Answer"})]})}function Wo({onRetry:e,unavailable:t}){const n=yn(t);return a.jsxs("span",{"data-testid":"room-stalled","data-unavailable":t?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"error",reducedMotion:!0}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground truncate sm:hidden",children:Po(t)}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground hidden truncate sm:inline",title:n,children:n}),e!==void 0&&a.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 Uo({state:e,faces:t,reducedMotion:n,scope:i}){return a.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"working",reducedMotion:n}),t,a.jsxs("span",{"data-testid":$o[i],"data-late":e.late?"true":void 0,className:"text-muted-foreground flex min-w-0 items-center",children:[a.jsx("span",{className:"truncate",children:e.line}),a.jsx(kn,{since:e.since})]})]})}function Go({state:e,faces:t,scope:n}){return a.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(Ae,{signal:"working",reducedMotion:!0}),t,a.jsxs("span",{"data-testid":Ho[n],className:"text-muted-foreground flex min-w-0 items-center",children:[a.jsx("span",{className:"truncate",children:e.sentence}),a.jsx(kn,{since:e.since})]})]})}function Yo({state:e}){return a.jsx("span",{"data-testid":"lane-silent-finish",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:a.jsx("span",{className:"truncate",children:e.sentence})})}function Vo({state:e}){const t=e.waitingType==="approval"?ia:oa;return a.jsxs("span",{"data-testid":"lane-waiting",className:"flex min-w-0 items-center gap-2",children:[a.jsx(t,{"aria-hidden":"true",className:"text-status-warning-fg size-3 shrink-0"}),a.jsx("span",{className:"text-status-warning-fg truncate",children:e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer"}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed})]})}function Xo({state:e,reducedMotion:t}){return a.jsxs("span",{"data-testid":"lane-progress","data-determinate":e.determinate,className:"flex min-w-0 flex-1 items-center gap-2",children:[a.jsx("span",{className:"text-muted-foreground truncate",children:e.message}),a.jsx("span",{"aria-hidden":"true",className:"bg-muted/60 relative h-0.5 w-16 shrink-0 overflow-hidden rounded-full",children:e.determinate?a.jsx(X.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"}}):a.jsx(X.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 Zo({state:e}){return a.jsxs("span",{"data-testid":"lane-system",className:"flex min-w-0 items-center gap-2",children:[a.jsx(aa,{"aria-hidden":"true",className:"text-muted-foreground/60 size-3 shrink-0"}),a.jsx("span",{className:"text-muted-foreground/70 truncate",children:e.message})]})}function Jo({state:e,reducedMotion:t}){return a.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?a.jsx("span",{"aria-hidden":"true",className:"text-status-warning-fg shrink-0 font-bold",children:"☠"}):a.jsx(Ae,{signal:"working",reducedMotion:t}),a.jsx("span",{"aria-hidden":"true",className:O("truncate",e.isBypass?"text-status-warning-fg":"text-muted-foreground"),children:e.verb}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/60 shrink-0",children:e.tokens})]})}function Qo({state:e}){return a.jsxs("span",{"data-testid":"lane-complete",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:[a.jsx("span",{className:"truncate",children:e.elapsed}),a.jsx("span",{"aria-hidden":"true",children:"·"}),a.jsx("span",{className:"shrink-0",children:e.tokens})]})}function Ae({signal:e,reducedMotion:t}){return a.jsx("span",{"aria-hidden":"true","data-lane-dot":e,className:O("size-1.5 shrink-0 rounded-full",sa[e],e==="working"&&!t&&ra)})}function kn({since:e}){const t=Lo(e);return t===null?null:a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:` · ${t}`})}const er=.16,tr={room:"room-presence-announcer",thread:"thread-presence-announcer",session:"session-lane-announcer"};function nr({state:e,scope:t="room",onRetry:n,unavailable:i=!1,faces:o,peek:s,onPeekOpenChange:r,peekLabel:p="Show who is working",heldPeekLabel:c="Show what is waiting",askCard:u,reducedMotionOverride:d}){const[f,y]=l.useState(!1),j=l.useRef(null),x=Gt()===!0,m=d??x,b=qo(e,i),D=e.kind==="empty",g=(e.kind==="presence"||e.kind==="held")&&s!==void 0,v=e.kind==="ask"&&u!==void 0,w=g||v,C=v?u:s,I=v?"Answer this":e.kind==="held"?c:p;f&&!w&&y(!1);const R=f&&w,T=l.useRef(!1);l.useEffect(()=>{var $,B;if(T.current===R)return;const F=!R&&((($=j.current)==null?void 0:$.contains(document.activeElement))===!0||document.activeElement===document.body);T.current=R,r==null||r(R),F&&((B=j.current)==null||B.focus())},[R,r]);const S=a.jsx(Bo,{state:e,onRetry:n,unavailable:i,faces:o,reducedMotion:m,scope:t}),N=w?a.jsxs(la,{open:R,onOpenChange:y,children:[a.jsx(ca,{asChild:!0,children:a.jsx("button",{type:"button","aria-label":I,className:O("focus-ring flex min-w-0 items-center rounded text-left","hover:bg-accent/40 focus-visible:bg-accent/40"),children:S})}),a.jsxs(pa,{side:"top",align:"start",onOpenAutoFocus:v?void 0:F=>F.preventDefault(),className:"w-88 p-0",children:[a.jsx(da,{children:I}),C]})]}):S;return a.jsxs("div",{ref:j,"data-slot":"live-lane","data-lane-scope":t,tabIndex:-1,"data-lane-state":e.kind,"data-lane-motion":m?"off":"on",className:"flex h-6 shrink-0 items-center gap-2 overflow-hidden px-3 text-xs",children:[a.jsx("span",{"data-testid":tr[t],role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:b}),m?a.jsx("div",{"aria-hidden":D?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:N},_t(e)):a.jsx(ve,{mode:"wait",initial:!1,children:a.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:er},"aria-hidden":D?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:N},_t(e))})]})}const ar=1e3,ir={working:"working",working_late:"still working",held:"waiting to start"};function or({rows:e,onScrollToRow:t,onOpenSession:n,onOpenRoom:i,onAnswerFirst:o,promoted:s,onStopAll:r,stopping:p=!1,onStopAgent:c,stoppingAgents:u}){const d=c!==void 0,f=e.length>1&&r!==void 0,y=l.useRef(new Map),j=l.useRef(null),x=l.useRef(e);return l.useEffect(()=>{var v;const m=x.current;x.current=e;const b=j.current;if(b===null||e.some(w=>w.authorId===b)||(j.current=null,document.activeElement!==document.body))return;const D=m.findIndex(w=>w.authorId===b),g=e[Math.min(Math.max(D,0),e.length-1)];g!==void 0&&((v=y.current.get(g.authorId))==null||v.focus())},[e]),a.jsxs("div",{"data-slot":"live-peek","data-testid":"live-peek",className:"flex flex-col",children:[a.jsx("ul",{className:"divide-border divide-y",children:e.map(m=>a.jsxs("li",{"data-testid":"live-peek-row",className:"flex gap-2.5 px-3 py-2.5",children:[a.jsx(tn,{author:m.author,className:"mt-0.5 shrink-0"}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[a.jsxs("p",{className:"flex min-w-0 items-center gap-1.5 text-xs",children:[a.jsx("span",{className:"text-foreground truncate font-medium",children:m.author.displayName}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),a.jsx("span",{className:"text-muted-foreground shrink-0",children:ir[m.state]}),a.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),a.jsx(rr,{since:m.since})]}),m.doing!==null&&a.jsx("p",{"data-testid":"live-peek-doing",className:"text-muted-foreground truncate text-xs",children:m.doing}),m.replyingTo!==null&&t!==void 0&&a.jsx("button",{type:"button","data-testid":"live-peek-replying-to",onClick:()=>t(m.replyingTo.rowId),className:"focus-ring text-muted-foreground hover:text-foreground truncate rounded text-left text-xs underline underline-offset-2",children:`Replying to “${m.replyingTo.excerpt}”`}),a.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[m.state!=="held"&&m.sessionId!==null&&n!==void 0&&a.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-session",onClick:()=>n(m.sessionId),className:"h-7 gap-1 px-2 text-xs",children:["Open its chat",a.jsx(ut,{"aria-hidden":"true",className:"size-3"})]}),m.state==="held"&&m.behind!=null&&m.behind.title!==null&&i!==void 0&&a.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-room",onClick:()=>i(m.behind.roomId),className:"h-7 gap-1 px-2 text-xs",children:["Open where it’s working",a.jsx(ut,{"aria-hidden":"true",className:"size-3"})]}),m.state==="held"&&m.othersWaiting===!0&&o!==void 0&&((s==null?void 0:s.has(m.authorId))===!0?a.jsx("span",{"data-testid":"live-peek-next-up",className:"text-muted-foreground text-xs",children:"Next up here"}):a.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-answer-first",onClick:()=>o(m.authorId),className:"h-7 px-2 text-xs",children:"Answer here first"})),d&&a.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop",disabled:(u==null?void 0:u.has(m.authorId))===!0,onClick:()=>c(m.authorId),onFocus:()=>j.current=m.authorId,ref:b=>{b===null?y.current.delete(m.authorId):y.current.set(m.authorId,b)},"aria-label":`Stop ${m.author.displayName}`,className:"h-7 px-2 text-xs",children:"Stop"})]})]})]},m.authorId))}),f&&a.jsx("div",{className:"border-border border-t p-2",children:a.jsxs(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop-all",disabled:p,onClick:r,className:"h-auto w-full flex-col items-start gap-0.5 px-2 py-1.5 text-xs",children:[a.jsx("span",{children:"Stop everything in this room"}),a.jsx("span",{className:"text-muted-foreground font-normal",children:`Stops all ${e.length}`})]})})]})}function rr({since:e}){const[t,n]=l.useState(()=>Date.now());return l.useEffect(()=>{const i=setInterval(()=>n(Date.now()),ar);return()=>clearInterval(i)},[e]),a.jsx("span",{className:"text-muted-foreground shrink-0 tabular-nums",children:qt(Math.max(0,t-Date.parse(e)))})}function sr(e,t,n){const i=l.useRef(null),o=l.useCallback((s,r)=>{const p=Number(r.getAttribute("aria-posinset")),c=s==="next"?p+1:p-1;if(!Number.isFinite(c)||c<1)return;let u=0;const d=e.findIndex(f=>f.kind==="message"&&++u===c);d!==-1&&(i.current=c,t.scrollToIndex(d,{align:s==="next"?"end":"start"}))},[e,t]);return l.useEffect(()=>{var p;const s=i.current;if(s===null)return;const r=(p=n.current)==null?void 0:p.querySelector(`[${ct}][aria-posinset="${s}"]`);r!=null&&(i.current=null,r.focus())}),o}function lr(e){const{conversationId:t,rows:n,virtualizer:i,landOn:o,landingReady:s,resumeRow:r,landOnRow:p,onTopRow:c}=e,[u,d]=l.useState(!1);l.useLayoutEffect(()=>{d(!0)},[]);const f=l.useRef(null),[y,j]=l.useState(!1),[x,m]=l.useState(null),[b,D]=l.useState(null),g=l.useRef(null);l.useLayoutEffect(()=>{if(!u||!s||n.length===0)return;const w=p==null?void 0:p(),C=f.current!==t;if(!C&&w===void 0)return;if(f.current=t,C&&(g.current=null),j(!0),w!==void 0){const T=n.findIndex(S=>S.id===w);if(T!==-1){m("requested"),D(w),i.scrollToIndex(T,{align:"center"});return}}if(!C)return;D(null);const I=r==null?void 0:r();if(I!==void 0){const T=n.findIndex(S=>S.id===I);if(T!==-1){m("remembered"),i.scrollToIndex(T,{align:"start"});return}}const R=o==="unread"?n.findIndex(T=>T.kind==="unread-divider"):-1;if(R===-1){m(I===void 0?"end":"end-row-gone"),i.scrollToEnd();return}m("unread"),i.scrollToIndex(Math.max(0,R-1),{align:"start"})},[u,s,t,n,i,o,r,p]);const v=l.useCallback((w,C)=>{var N;const I=(w==null?void 0:w.scrollTop)??0,R=i.getVirtualItems().find(F=>F.end>I),T=R===void 0||(N=n[R.index])==null?void 0:N.id,S=C?void 0:T;S!==g.current&&(g.current=S,c==null||c(S))},[i,n,c]);return{landed:y,landedOn:x,landedRow:b,reportTopRow:v}}function cr(e,t,n){const i=l.useCallback(s=>{var r;return((r=e[s])==null?void 0:r.id)??s},[e]);return Ha({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>80,overscan:5,getItemKey:i,measureElement:(s,r,p)=>{var y;const c=(y=r==null?void 0:r.borderBoxSize)==null?void 0:y[0],u=c?Math.round(c.blockSize):s.getBoundingClientRect().height;if(u>0)return u;const d=p.indexFromElement(s),f=p.options.getItemKey(d);return p.itemSizeCache.get(f)??p.options.estimateSize(d)},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:64,onChange:s=>{s.isScrolling||n==null||n()}})}const pr=64;function dr(e){const{conversationId:t,rowCount:n}=e,i=l.useRef(null),o=l.useRef(!0),[s,r]=l.useState(!0),[p,c]=l.useState(!1),u=l.useRef(t),d=l.useCallback(()=>{const x=i.current;if(!x)return;const m=x.scrollHeight-x.scrollTop-x.clientHeight<=pr;o.current=m,r(b=>b===m?b:m),m&&c(!1)},[]),f=l.useCallback(x=>{i.current=x},[]);l.useEffect(()=>{if(u.current===t)return;u.current=t,o.current=!0,r(!0),c(!1);const x=i.current;x&&(x.scrollTop=x.scrollHeight)},[t]);const y=l.useRef(n);l.useEffect(()=>{const x=y.current;y.current=n,n>x&&!o.current&&c(!0)},[n]);const j=l.useCallback(x=>{const m=i.current;m&&m.scrollTo({top:m.scrollHeight,behavior:(x==null?void 0:x.behavior)??"auto"}),o.current=!0,r(!0),c(!1)},[]);return{scrollRef:f,onScroll:d,isAtBottom:s,hasNewRows:p,atBottomRef:o,scrollToBottom:j}}const ur=800,Ft=24;function mr({scrollRef:e}){const t=l.useRef(null),n=l.useRef(null),i=l.useRef(null),[o,s]=l.useState(!1),r=l.useRef(!1),p=l.useRef(!1),c=l.useRef(0),u=l.useRef(0),d=l.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{!r.current&&!p.current&&s(!1)},ur)},[]),f=l.useCallback(()=>{s(!0),d()},[d]),y=l.useCallback(()=>{p.current=!0,f()},[f]),j=l.useCallback(()=>{p.current=!1,d()},[d]),x=l.useCallback(()=>{const D=e.current,g=t.current,v=n.current;if(!D||!g||!v)return;const{scrollTop:w,scrollHeight:C,clientHeight:I}=D;if(C<=I){g.style.display="none";return}g.style.display="";const R=v.clientHeight,T=I/C,S=Math.max(T*R,Ft),N=R-S,$=w/(C-I)*N;g.style.height=`${S}px`,g.style.transform=`translateY(${$}px)`},[e]);l.useEffect(()=>{const D=e.current;if(!D)return;const g=()=>{f(),x()};return D.addEventListener("scroll",g,{passive:!0}),x(),()=>D.removeEventListener("scroll",g)},[e,f,x]);const m=l.useCallback(D=>{if(D.target===t.current)return;const g=e.current,v=n.current;if(!g||!v)return;const w=v.getBoundingClientRect(),C=(D.clientY-w.top)/w.height;g.scrollTop=C*(g.scrollHeight-g.clientHeight)},[e]),b=l.useCallback(D=>{var w;D.preventDefault(),D.stopPropagation(),r.current=!0,c.current=D.clientY,u.current=((w=e.current)==null?void 0:w.scrollTop)??0;const g=C=>{const I=e.current,R=n.current;if(!I||!R)return;const T=C.clientY-c.current,S=R.clientHeight,N=I.clientHeight/I.scrollHeight,F=Math.max(N*S,Ft),$=S-F,B=I.scrollHeight-I.clientHeight,A=T/$*B;I.scrollTop=u.current+A},v=()=>{r.current=!1,document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",v),d()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",v)},[e,d]);return a.jsx("div",{ref:n,role:"presentation",onClick:m,onPointerEnter:y,onPointerLeave:j,style:{top:"var(--conversation-thumb-top, 0px)"},className:"pointer-events-auto absolute right-0 bottom-0 z-10 w-2.5",children:a.jsx("div",{ref:t,onPointerDown:b,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:o?1:0}})})}function fr({hasNewRows:e,isAtBottom:t,hasRows:n,onJump:i}){return a.jsxs(a.Fragment,{children:[a.jsx(ve,{children:e&&!t&&a.jsxs(X.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:i,"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",a.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:"New messages"})]})}),a.jsx(ve,{children:!t&&n&&a.jsx(X.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:i,"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:a.jsx(ua,{className:"size-(--size-icon-md)"})})})]})}const xr=2200;function gr(e){return e===null?"auto":e.scrollHeight-e.scrollTop-e.clientHeight<=e.clientHeight?"smooth":"auto"}function vr({conversationId:e,label:t,rows:n,renderRow:i,onOpenThread:o,domIdOf:s,landOn:r="end",landingReady:p=!0,resumeRow:c,landOnRow:u,onTopRow:d,pending:f,viewerAuthorId:y,loading:j,empty:x,transcriptAnnouncement:m,approvalAnnouncement:b,onReachedBottom:D,busy:g,className:v,"data-testid":w,feedTestId:C,ref:I}){var te;const{capabilities:R}=ze(),T=l.useRef(null),S=f??[],N=dr({conversationId:e,rowCount:n.length+S.length}),{scrollRef:F,atBottomRef:$}=N,B=l.useCallback(z=>{T.current=z,F(z)},[F]),A=l.useRef(null),P=l.useRef(!1),de=l.useCallback(()=>{var z;P.current&&((z=A.current)==null||z.call(A,T.current,$.current))},[$]),K=cr(n,T,de),{landed:ne,landedOn:k,landedRow:Q,reportTopRow:Z}=lr({conversationId:e,rows:n,virtualizer:K,landOn:r,landingReady:p&&j==null,...c===void 0?{}:{resumeRow:c},...u===void 0?{}:{landOnRow:u},...d===void 0?{}:{onTopRow:d}});l.useLayoutEffect(()=>{A.current=Z,P.current=ne});const G=l.useCallback(()=>{N.onScroll(),Z(T.current,$.current)},[N,Z,$]),he=K.isAtEnd();l.useEffect(()=>{ne&&he&&(D==null||D())},[ne,he,D]);const ae=sr(n,K,T),Y=l.useCallback(z=>{const W=document.getElementById(z);return W===null?!1:(W.scrollIntoView({block:"center"}),W.focus({preventScroll:!0}),!0)},[]),J=l.useRef(null),V=l.useRef(void 0),ie=l.useCallback(()=>{var z;V.current!==void 0&&(clearTimeout(V.current),V.current=void 0),(z=J.current)==null||z.removeAttribute("data-landed"),J.current=null},[]),ue=l.useRef(null);l.useEffect(()=>{if(k!=="requested"||Q===null||ue.current===Q||s===void 0)return;const z=n.find(re=>re.id===Q),W=z===void 0?void 0:s(z);if(W===void 0)return;const ce=requestAnimationFrame(()=>{if(!Y(W))return;const re=document.getElementById(W);re!==null&&(ue.current=Q,ie(),re.setAttribute("data-landed","true"),J.current=re,V.current=setTimeout(ie,xr))});return()=>cancelAnimationFrame(ce)},[k,Q,s,n,Y,ie]),l.useEffect(()=>ie,[ie]);const me=l.useCallback(z=>{N.scrollToBottom(z),K.scrollToEnd({behavior:(z==null?void 0:z.behavior)??"auto"})},[N,K]);l.useImperativeHandle(I,()=>({scrollToRow(z){if(Y(z))return!0;if(s===void 0)return!1;const W=n.findIndex(ce=>s(ce)===z);return W===-1?!1:(K.scrollToIndex(W,{align:"center"}),requestAnimationFrame(()=>Y(z)),!0)},scrollToBottom:me}),[Y,s,n,K,me]);const fe=l.useMemo(()=>({onOpenThread:R.threads?o:void 0}),[R.threads,o]),oe=l.useMemo(()=>n.reduce((z,W)=>z+(W.kind==="message"?1:0),0),[n]);return j!=null?a.jsx(a.Fragment,{children:j}):x!==void 0&&n.length===0&&S.length===0?a.jsx(a.Fragment,{children:x}):a.jsxs("div",{"data-slot":"conversation-timeline","data-testid":w,"data-landed-on":k??void 0,"data-message-row-count":oe,className:O("relative min-h-0 flex-1",v),children:[a.jsxs("div",{ref:B,onScroll:G,"data-slot":"conversation-scroller","data-testid":"conversation-scroller",className:"chat-scroll-area h-full scrollbar-none overflow-y-auto",style:{overflowAnchor:"none"},children:[a.jsx(Xa,{label:t,busy:g,"data-testid":C,onBeyondRendered:ae,children:a.jsx("div",{style:{height:K.getTotalSize(),position:"relative",width:"100%"},children:a.jsx("div",{"data-slot":"conversation-window",className:"absolute left-0 w-full",style:{top:((te=K.getVirtualItems()[0])==null?void 0:te.start)??0},children:K.getVirtualItems().map(z=>a.jsx("div",{"data-index":z.index,ref:K.measureElement,children:i(n[z.index],{...fe,index:z.index})},n[z.index].id))})})}),S.length>0&&y!==void 0&&a.jsx("div",{className:"flex flex-col",children:S.map(z=>a.jsx(pi,{post:z,viewerAuthorId:y},z.clientId))})]}),m!==void 0&&a.jsx("div",{role:"log","aria-live":"polite","aria-atomic":"false","data-testid":"transcript-announcer",className:"sr-only",children:m}),b!==void 0&&a.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"approval-announcer",className:"sr-only",children:b}),a.jsx(mr,{scrollRef:T}),a.jsx(fr,{hasNewRows:N.hasNewRows,isAtBottom:N.isAtBottom,hasRows:n.length>0,onJump:()=>me({behavior:gr(T.current)})})]})}const hr=["react","react-more","run-with","reply","copy","mention","profile"],br={"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"]},wn=Object.entries(br).map(([e,t])=>({name:e,entries:t.map(n=>{const[i,...o]=n.split(" ");return{emoji:i,keywords:o}})})),jn=wn.flatMap(e=>e.entries);function yr(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.length===0?[]:jn.filter(n=>n.emoji===e.trim()||t.every(i=>n.keywords.some(o=>o.startsWith(i))))}function kr(e){return jn.find(t=>t.emoji===e)}function Se(e){var t;return((t=kr(e))==null?void 0:t.keywords[0])??e}function Dn(e,t,n){const i=l.useRef([]);l.useImperativeHandle(n,()=>({focusFirst:()=>{var r;return(r=i.current[0])==null?void 0:r.focus()}}));const o=l.useCallback(r=>p=>{i.current[r]=p},[]),s=l.useCallback((r,p)=>{const c=(u,d)=>{var f;e!==0&&((f=i.current[(u+d+e)%e])==null||f.focus())};switch(r.key){case"ArrowRight":case"ArrowDown":r.preventDefault(),c(p,1);break;case"ArrowLeft":case"ArrowUp":r.preventDefault(),c(p,-1);break;case"Home":if(r.ctrlKey||r.metaKey)break;r.preventDefault(),c(0,0);break;case"End":if(r.ctrlKey||r.metaKey)break;r.preventDefault(),c(e-1,0);break;case"Escape":r.preventDefault(),r.stopPropagation(),t();break}},[e,t]);return{register:o,handleKeyDown:s}}function En({mine:e,frequents:t,onPick:n,disabled:i}){const[o,s]=l.useState(""),r=l.useId(),p=l.useMemo(()=>yr(o),[o]),c=o.trim().length>0,u=d=>a.jsx("button",{type:"button",disabled:i,onClick:()=>n(d),"aria-pressed":e.includes(d),"aria-label":Se(d),title:Se(d),className:O("focus-ring hover:bg-accent flex size-8 items-center justify-center rounded-md text-base",Ze,"disabled:pointer-events-none disabled:opacity-50",e.includes(d)&&"bg-brand/15 ring-brand/40 ring-1"),children:a.jsx("span",{"aria-hidden":!0,children:d})},d);return a.jsxs("div",{className:"flex flex-col gap-2","data-testid":"reaction-picker",children:[a.jsx(ma,{autoFocus:!0,value:o,onChange:d=>s(d.target.value),placeholder:"Search emoji…","aria-label":"Search emoji",className:"h-8"}),i===!0&&a.jsx("p",{role:"status",className:"text-muted-foreground px-1 text-xs",children:"Reactions send once the room reconnects."}),a.jsx("div",{className:"max-h-64 overflow-y-auto pr-1",children:c?p.length===0?a.jsx("p",{className:"text-muted-foreground px-1 py-6 text-center text-xs",children:"Nothing here matches that."}):a.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:p.map(d=>u(d.emoji))}):a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs("section",{role:"group","aria-labelledby":`${r}-frequents`,children:[a.jsx("h3",{id:`${r}-frequents`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:"Your most used"}),a.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:t.map(u)})]}),wn.map((d,f)=>a.jsxs("section",{role:"group","aria-labelledby":`${r}-group-${f}`,children:[a.jsx("h3",{id:`${r}-group-${f}`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:d.name}),a.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:d.entries.map(y=>u(y.emoji))})]},d.name))]})})]})}function Nn({appearance:e="capsule",mine:t,frequents:n,onPick:i,disabled:o,triggerRef:s,onTriggerKeyDown:r}){const[p,c]=l.useState(!1),u=e==="capsule";return a.jsxs(fa,{open:p,onOpenChange:c,children:[a.jsx(xa,{asChild:!0,children:a.jsx(ge,{ref:s,type:"button",variant:"ghost",size:u?"icon-xs":"sm",tabIndex:-1,disabled:o,"data-entry-action":"react-more","data-testid":u?void 0:"entry-reactions-add","aria-label":"Pick a reaction",title:"Pick a reaction",onKeyDown:r,className:O("leading-none",u?"text-control":"text-muted-foreground/60 hover:text-foreground h-auto rounded-full px-2 py-0.5 text-xs"),children:a.jsx("span",{"aria-hidden":!0,children:"🙂+"})})}),a.jsx(ga,{align:"end",className:"w-[19rem] p-2",children:a.jsx(En,{mine:t,frequents:n,disabled:o,onPick:d=>{i(d),c(!1)}})})]})}function wr({prompt:e,sessionId:t,triggerRef:n,onTriggerKeyDown:i}){const o=va(),s=it(),{sessions:r}=ha(),{data:p}=ba(),{data:c}=ya(),[u,d]=l.useState({open:!1}),f=r.find(g=>g.id===t),y=f==null?void 0:f.runtime,j=f==null?void 0:f.cwd,x=wa.filter(g=>g!==y),m=g=>(p?g in p.capabilities:!0)&&ja(c,g),b=g=>{Da(s,{dir:j,runtime:g,prompt:e}).then(v=>o(v)).catch(v=>{Ea(s,v),Na(j??null)})},D=g=>{if(!m(g)){d({open:!0,runtime:g});return}b(g)};return a.jsxs(a.Fragment,{children:[a.jsxs(Kt,{children:[a.jsx(Wt,{asChild:!0,children:a.jsx("button",{ref:n,type:"button","data-entry-action":"run-with","aria-label":"Run this prompt elsewhere",onKeyDown:i,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:a.jsx(Va,{className:"size-3.5"})})}),a.jsxs(Ut,{align:"end",className:"w-52",children:[a.jsx(ka,{children:"Run this with…"}),x.map(g=>{const v=Ht(g);return a.jsx(Xe,{icon:v.icon,description:m(g)?void 0:"Connect",onSelect:()=>D(g),children:v.label},g)})]})]}),a.jsx(Ba,{runtime:u.runtime,open:u.open,onOpenChange:g=>d(v=>({...v,open:g})),renderConnect:Ka,onRuntimeReady:g=>{d({open:!1}),b(g)}})]})}function jr(e,t,n){return hr.flatMap(i=>{if(i==="react")return t?t.quick.map(s=>({kind:"quick",slot:i,emoji:s,mine:t.mine.includes(s)})):[];if(i==="react-more")return t?[{kind:"picker",slot:i}]:[];if(i==="run-with")return n?[{kind:"run-with",slot:i,runWith:n}]:[];const o=e.find(s=>s.id===i);return o?[{kind:"command",slot:i,action:o}]:[]})}const Dr=l.forwardRef(function({actions:t,reactions:n,runWith:i,onExit:o,className:s},r){const p=jr(t,n,i),{register:c,handleKeyDown:u}=Dn(p.length,o,r);return p.length===0?null:a.jsx("div",{role:"toolbar","aria-label":"Message actions","aria-orientation":"horizontal","data-testid":"entry-actions",className:s,children:p.map((d,f)=>{const y=x=>u(x,f),j=d.kind==="command"&&f>0&&p[f-1].kind!=="command";return d.kind==="run-with"?a.jsx(wr,{prompt:d.runWith.prompt,sessionId:d.runWith.sessionId,triggerRef:c(f),onTriggerKeyDown:y},"run-with"):d.kind==="picker"?a.jsx(Nn,{mine:n.mine,frequents:n.quick,disabled:n.disabled,onPick:n.onToggle,triggerRef:c(f),onTriggerKeyDown:y},"react-more"):a.jsxs(l.Fragment,{children:[j&&a.jsx("span",{"aria-hidden":!0,className:"bg-border mx-0.5 my-1 w-px self-stretch"}),d.kind==="quick"?a.jsx(ge,{ref:c(f),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,disabled:n.disabled,"data-entry-action":d.slot,"data-emoji":d.emoji,"data-reacted":d.mine?"true":void 0,"aria-pressed":d.mine,"aria-label":`React with ${Se(d.emoji)}`,title:`React with ${Se(d.emoji)}`,onClick:()=>n.onToggle(d.emoji),onKeyDown:y,className:O("text-control leading-none",d.mine&&"bg-brand/15 text-foreground"),children:a.jsx("span",{"aria-hidden":!0,children:d.emoji})}):a.jsx(ge,{ref:c(f),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,"data-entry-action":d.slot,"aria-label":d.action.label,title:d.action.label,onClick:d.action.run,onKeyDown:y,children:a.jsx(d.action.icon,{"aria-hidden":!0,className:"size-3.5"})})]},d.kind==="quick"?d.emoji:d.action.id)})})});function Er({quick:e,mine:t,onToggle:n,disabled:i}){const{close:o}=Aa(),[s,r]=l.useState(!1),p=c=>{n(c),o()};return a.jsxs("div",{className:"border-border border-b px-4 py-3","data-testid":"drawer-reactions",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[e.map(c=>a.jsx("button",{type:"button",disabled:i,onClick:()=>p(c),"data-entry-action":"react","data-emoji":c,"aria-pressed":t.includes(c),"aria-label":`React with ${Se(c)}`,className:O("focus-ring flex size-11 items-center justify-center rounded-full border text-lg",Ze,"disabled:pointer-events-none disabled:opacity-50",t.includes(c)?"border-brand/70 bg-brand/12":"border-border bg-muted/60 active:bg-accent"),children:a.jsx("span",{"aria-hidden":!0,children:c})},c)),a.jsx("button",{type:"button",disabled:i,onClick:()=>r(c=>!c),"aria-expanded":s,"aria-label":"Pick a reaction",className:O("focus-ring border-border bg-muted/60 active:bg-accent flex size-11 items-center justify-center rounded-full border text-base",Ze,"disabled:pointer-events-none disabled:opacity-50"),children:a.jsx("span",{"aria-hidden":!0,children:"🙂+"})})]}),s&&a.jsx("div",{className:"pt-3",children:a.jsx(En,{mine:t,frequents:e,onPick:p,disabled:i})})]})}function Nr({actions:e,reactions:t,onPressStateChange:n,children:i}){const o=Ra();return e.length===0?a.jsx(a.Fragment,{children:i}):a.jsxs(Ta,{children:[a.jsx(Ca,{asChild:!0,onPressStateChange:n,children:i}),a.jsxs(Sa,{className:"w-52",children:[o&&t&&a.jsx(Er,{...t}),e.map(s=>a.jsxs(za,{onClick:s.run,children:[a.jsx(s.icon,{"aria-hidden":!0,className:"mr-2 size-4"}),s.label]},s.id))]})]})}function Rr({count:e,roll:t,mine:n}){const[i]=l.useState(t);return a.jsx("span",{"aria-hidden":!0,className:O("tabular-nums",n?"text-foreground/80":"text-muted-foreground",i&&"motion-safe:animate-reaction-roll"),children:e})}function Tr({reaction:e,mine:t,summary:n,arrived:i,rolled:o,onToggle:s,disabled:r,buttonRef:p,onKeyDown:c}){const[u]=l.useState(i),d=e.authorIds.length;return a.jsxs(X.button,{ref:p,type:"button",tabIndex:-1,onKeyDown:c,exit:{opacity:0},transition:{duration:.12},disabled:r,onClick:s,"aria-pressed":t,"aria-label":n,title:n,"data-testid":"entry-reaction","data-emoji":e.emoji,"data-mine":t?"true":void 0,className:O("focus-ring relative inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","disabled:pointer-events-none disabled:opacity-50",t?"border-brand/70 bg-brand/12 text-foreground":"border-border bg-muted/60 text-muted-foreground hover:bg-muted",u&&"motion-safe:animate-reaction-pop"),children:[u&&a.jsx("span",{"aria-hidden":!0,className:"border-brand motion-safe:animate-reaction-ring pointer-events-none absolute -inset-1 rounded-full border opacity-0"}),a.jsx("span",{"aria-hidden":!0,children:e.emoji}),a.jsx(Rr,{count:d,roll:o,mine:t},d)]})}const Cr=l.forwardRef(function({reactions:t,viewerAuthorId:n,names:i,frequents:o,onToggle:s,disabled:r,onExit:p},c){const[u,d]=l.useState(!1),f=l.useRef(null),y=f.current,[j,x]=l.useState(!1),[m,b]=l.useState(t.length);m!==t.length&&(b(t.length),x(t.length===0&&m>0)),l.useEffect(()=>{f.current=new Map(t.map(N=>[N.emoji,N.authorIds.length]))});const{shown:D,hidden:g}=ei(t),v=u?t:D,w=t.filter(N=>xt(N,n)).map(N=>N.emoji),C=g>0&&!u?1:0,I=t.length>0?1:0,{register:R,handleKeyDown:T}=Dn(v.length+C+I,p,c),S=l.useCallback(N=>F=>T(F,N),[T]);return t.length===0&&!j?null:a.jsxs("div",{"data-testid":"entry-reactions",className:"mt-1 flex flex-wrap items-center gap-1",role:"group","aria-label":"Reactions",children:[a.jsx(ve,{initial:!1,onExitComplete:()=>x(!1),children:v.map((N,F)=>a.jsx(Tr,{reaction:N,mine:xt(N,n),summary:Qa(N,n,i),arrived:y!==null&&!y.has(N.emoji),rolled:(y==null?void 0:y.get(N.emoji))!==void 0&&y.get(N.emoji)!==N.authorIds.length,onToggle:()=>s(N.emoji),disabled:r,buttonRef:R(F),onKeyDown:S(F)},N.emoji))}),C===1&&a.jsxs("button",{ref:R(v.length),type:"button",tabIndex:-1,onKeyDown:S(v.length),onClick:()=>d(!0),"data-testid":"entry-reactions-more",className:"focus-ring text-muted-foreground hover:text-foreground rounded-full px-2 py-0.5 text-xs",children:["+",g," more"]}),t.length>0&&a.jsx(Nn,{appearance:"ghost-pill",mine:w,frequents:o,disabled:r,onPick:s,triggerRef:R(v.length+C),onTriggerKeyDown:S(v.length+C)})]})}),Rn=l.createContext(null);function Sr({value:e,children:t}){return a.jsx(Rn.Provider,{value:e,children:t})}function Ie(){const e=l.useContext(Rn);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 Tn(e){return e==="first"||e==="only"}const zr=Ia("",{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 Ar({actions:e=[],reactions:t,runWith:n,barRef:i,onExit:o}){const{capabilities:s,anchor:r}=ze(),{slots:p}=Ie();return a.jsxs(a.Fragment,{children:[e.length>0&&a.jsx("button",{type:"button",tabIndex:-1,"data-testid":"entry-actions-reach","aria-label":"Message actions",onClick:()=>{var c;return(c=i==null?void 0:i.current)==null?void 0:c.focusFirst()},className:"sr-only"}),a.jsx("div",{"data-slot":"message-actions",className:zr({anchor:r}),children:a.jsx(Dr,{ref:i,actions:e,reactions:s.reactions?t:void 0,runWith:s.runWith?n:void 0,onExit:o,className:p.actions()})})]})}function Ir({id:e,author:t,at:n,origin:i,mark:o,renderName:s,asChild:r=!1,className:p}){const{slots:c,position:u}=Ie(),d=n===void 0?"":nn(n);if(!Tn(u))return null;const f=r?st:"div",y=a.jsx("span",{className:c.authorName(),children:t.displayName});return a.jsxs(f,{id:e,"data-slot":"message-author",className:O(c.header(),p),children:[s?s(y):y,i!==void 0&&a.jsx(Oa,{origin:i}),o,a.jsx(_a,{retired:t.retired}),d.length>0&&a.jsx("time",{dateTime:n,title:an(n??""),className:O(c.timestamp(),"text-msg-timestamp"),children:d})]})}function Or({children:e,className:t}){const{slots:n}=Ie();return a.jsx("div",{"data-slot":"message-body",className:O(n.body(),t),children:e})}function _r({id:e,children:t,className:n}){const{slots:i}=Ie();return a.jsx("div",{id:e,"data-slot":"message-content",className:O(i.content(),n),children:t})}function Fr({author:e,at:t,onViewProfile:n,isSelf:i,renderAvatar:o,className:s}){const{slots:r,position:p}=Ie(),{showTimestamps:c}=Fa(),u=t===void 0?"":nn(t);return a.jsx("div",{"data-slot":"message-gutter",className:O(r.gutter(),s),children:Tn(p)?(o??(d=>d))(a.jsx(tn,{author:e,onViewProfile:n,isSelf:i})):u.length>0&&a.jsx("time",{dateTime:t,title:an(t??""),className:O(r.avatarTimestamp(),c?"text-msg-timestamp":"group-focus-within:text-msg-timestamp group-hover:text-msg-timestamp text-transparent"),children:u})})}function Mr({ref:e,...t}){const{capabilities:n}=ze(),[i,o]=l.useState(t.reactions.length>0);return!i&&t.reactions.length>0&&o(!0),!n.reactions||!i?null:a.jsx("div",{"data-slot":"message-reactions",className:"contents",children:a.jsx(Cr,{ref:e,...t})})}const Lr={type:"spring",stiffness:320,damping:28};function Pr({role:e="assistant",position:t="only",isNew:n=!1,actions:i,reactions:o,asChild:s=!1,className:r,children:p,ref:c,...u}){const{capabilities:d,density:f,anchor:y}=ze(),[j,x]=l.useState(null),m=l.useMemo(()=>({slots:li({role:e,position:t,density:f,anchor:y}),position:t}),[e,t,f,y]),b=i!==void 0&&i.length>0,D=s?st:X.div,g=a.jsx(D,{ref:c,"data-slot":"message-root",role:"article",className:O(m.slots.root(),"focus-visible:ring-ring outline-none focus-visible:ring-2","origin-center",b&&"[-webkit-touch-callout:none]",j==="pressing"&&"motion-safe:animate-press-in",j==="released"&&"motion-safe:animate-press-release",r),...s?{}:{initial:n?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:Lr},...u,children:a.jsx(Sr,{value:m,children:a.jsx(Ma,{children:p})})});return a.jsx(Nr,{actions:i??[],reactions:d.reactions?o:void 0,onPressStateChange:x,children:g})}const ns={Root:Mo,Timeline:vr,LiveLane:nr,LivePeek:or,Composer:_o,Footer:Fo},as={Root:Pr,Gutter:Fr,Author:Ir,Body:Or,Content:_r,Attachments:mi,Reactions:Mr,Actions:Ar};export{ns as C,hr as E,Xa as F,tn as M,Zr as N,pi as P,an as a,as as b,ti as c,Qr as d,go as e,nn as f,Xr as g,Yr as h,xt as i,ts as j,ni as k,Jr as l,Vr as m,es as t,ze as u};
@@ -1 +1 @@
1
- import{L as s}from"./index-Bri5bZfv.js";import{s as n,t as r,a as o,L as P,i as Q,c as a,f as i,l as c}from"./index-ZYbeRA5f.js";import"./index-DKTd8X7n.js";const g=n({String:r.string,Number:r.number,"True False":r.bool,PropertyName:r.propertyName,Null:r.null,", :":r.separator,"[ ]":r.squareBracket,"{ }":r.brace}),p=s.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[g],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),T=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;const e=l(O,t.state.doc);return[{from:e,message:O.message,severity:"error",to:e}]}return[]};function l(t,O){let e;return(e=t.message.match(/at position (\d+)/))?Math.min(+e[1],O.length):(e=t.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+e[1]).from+ +e[2]-1,O.length):0}const u=P.define({name:"json",parser:p.configure({props:[Q.add({Object:a({except:/^\s*\}/}),Array:a({except:/^\s*\]/})}),i.add({"Object Array":c})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function f(){return new o(u)}export{f as json,u as jsonLanguage,T as jsonParseLinter};
1
+ import{L as s}from"./index-DFWrO42z.js";import{s as n,t as r,a as o,L as P,i as Q,c as a,f as i,l as c}from"./index-DB2t3GUm.js";import"./index-CjUfPyOM.js";const g=n({String:r.string,Number:r.number,"True False":r.bool,PropertyName:r.propertyName,Null:r.null,", :":r.separator,"[ ]":r.squareBracket,"{ }":r.brace}),p=s.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[g],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),T=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;const e=l(O,t.state.doc);return[{from:e,message:O.message,severity:"error",to:e}]}return[]};function l(t,O){let e;return(e=t.message.match(/at position (\d+)/))?Math.min(+e[1],O.length):(e=t.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+e[1]).from+ +e[2]-1,O.length):0}const u=P.define({name:"json",parser:p.configure({props:[Q.add({Object:a({except:/^\s*\}/}),Array:a({except:/^\s*\]/})}),i.add({"Object Array":c})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function f(){return new o(u)}export{f as json,u as jsonLanguage,T as jsonParseLinter};