@intent-hq/web 2.283.1 → 2.285.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DyG--B3U.js → -KtznSS-.js} +1 -1
  3. package/web/app/immutable/chunks/{86I704nb.js → 0XyrKsuA.js} +1 -1
  4. package/web/app/immutable/chunks/{Cul55jvw.js → 1lVCCXL6.js} +3 -3
  5. package/web/app/immutable/chunks/{CqnYcuvr.js → 1rwbAxiY.js} +1 -1
  6. package/web/app/immutable/chunks/{B4nXFAp1.js → 2eBUyHOS.js} +3 -3
  7. package/web/app/immutable/chunks/{CvLXNZbW.js → 32YnGblO.js} +1 -1
  8. package/web/app/immutable/chunks/{DpHc5A-z.js → 6ASkEKEx.js} +1 -1
  9. package/web/app/immutable/chunks/{mYHRHufZ.js → 70g8kmTR.js} +1 -1
  10. package/web/app/immutable/chunks/{D0ubTGV_.js → 8puonPwK.js} +1 -1
  11. package/web/app/immutable/chunks/{kbx4HHUe.js → 9s6R6NFl.js} +2 -2
  12. package/web/app/immutable/chunks/{DSakTSDY.js → ASxUuKIZ.js} +1 -1
  13. package/web/app/immutable/chunks/{DVch_AcI.js → B-kQ0Vz5.js} +1 -1
  14. package/web/app/immutable/chunks/{oRTpyK_P.js → B0UymEvm.js} +1 -1
  15. package/web/app/immutable/chunks/{FGzP6Npj.js → B0a31Ljt.js} +1 -1
  16. package/web/app/immutable/chunks/{BlxovLoL.js → B0w4Cxo_.js} +1 -1
  17. package/web/app/immutable/chunks/{Be5Pyj-G.js → B1EuyQvk.js} +1 -1
  18. package/web/app/immutable/chunks/{Dvf5hKr0.js → B3G2wO_D.js} +1 -1
  19. package/web/app/immutable/chunks/{itr72ypM.js → B4GCMjY3.js} +1 -1
  20. package/web/app/immutable/chunks/{DGTcJSfI.js → B4VDa7RO.js} +1 -1
  21. package/web/app/immutable/chunks/B4kKZm1B.js +1 -0
  22. package/web/app/immutable/chunks/{CSVS8cGP.js → B7R5ywXv.js} +1 -1
  23. package/web/app/immutable/chunks/{-eynjkyq.js → B8LfMxTf.js} +1 -1
  24. package/web/app/immutable/chunks/{CoIHYLew.js → B91hcydD.js} +1 -1
  25. package/web/app/immutable/chunks/{JoMw8Mnh.js → B9DD1rvd.js} +1 -1
  26. package/web/app/immutable/chunks/{BQkOKtmR.js → B9YdV5Lr.js} +1 -1
  27. package/web/app/immutable/chunks/{Bm_v6qLq.js → BA2m5W5p.js} +1 -1
  28. package/web/app/immutable/chunks/{QEFaNqbo.js → BAuomW3Q.js} +1 -1
  29. package/web/app/immutable/chunks/{CVXsWkbg.js → BB-v27nE.js} +1 -1
  30. package/web/app/immutable/chunks/{C8PgiJ6Y.js → BDnf9UFd.js} +1 -1
  31. package/web/app/immutable/chunks/{BrzmNBOR.js → BEu9jjb7.js} +1 -1
  32. package/web/app/immutable/chunks/{CRzjInFH.js → BFDtkLj3.js} +1 -1
  33. package/web/app/immutable/chunks/{CiFw-8Aw.js → BFlCxloC.js} +1 -1
  34. package/web/app/immutable/chunks/{yZjABy7c.js → BHdVwar2.js} +1 -1
  35. package/web/app/immutable/chunks/{DSad0YxQ.js → BJ5sH6i3.js} +1 -1
  36. package/web/app/immutable/chunks/{BIUeJ7Ke.js → BJwGOB8K.js} +1 -1
  37. package/web/app/immutable/chunks/{DOWY58Gk.js → BKYBbIMC.js} +1 -1
  38. package/web/app/immutable/chunks/{BM2v-1zr.js → BLT4lwJH.js} +1 -1
  39. package/web/app/immutable/chunks/{DNdUAl79.js → BMCIczJY.js} +1 -1
  40. package/web/app/immutable/chunks/{BSa29cCP.js → BMqkZHSQ.js} +4 -4
  41. package/web/app/immutable/chunks/{CI86PNUZ.js → BOIoayZB.js} +1 -1
  42. package/web/app/immutable/chunks/{DCpb2VL6.js → BOxsG-23.js} +1 -1
  43. package/web/app/immutable/chunks/{DWsGxz2C.js → BPQohPc9.js} +1 -1
  44. package/web/app/immutable/chunks/{MivJSmtA.js → BQ-Vdhjp.js} +1 -1
  45. package/web/app/immutable/chunks/{Cobn53T5.js → BRaDvZhu.js} +1 -1
  46. package/web/app/immutable/chunks/{CRcZFIyJ.js → BRiWAWWR.js} +1 -1
  47. package/web/app/immutable/chunks/{KT-2Ekxp.js → BRrnGZdq.js} +1 -1
  48. package/web/app/immutable/chunks/{DkfRsyNq.js → BRsvqYQJ.js} +1 -1
  49. package/web/app/immutable/chunks/{BzUhrKys.js → BW5WMYMF.js} +1 -1
  50. package/web/app/immutable/chunks/{us_QodLQ.js → BYD9CrbJ.js} +1 -1
  51. package/web/app/immutable/chunks/{B241tUXW.js → B_BtFokc.js} +1 -1
  52. package/web/app/immutable/chunks/{DHon_8tj.js → BerKnKvV.js} +1 -1
  53. package/web/app/immutable/chunks/{C17u3SPp.js → BfCM8g6D.js} +1 -1
  54. package/web/app/immutable/chunks/{BNLICSI-.js → Bi5G5jdW.js} +1 -1
  55. package/web/app/immutable/chunks/{CGclmlzx.js → BijxVENA.js} +1 -1
  56. package/web/app/immutable/chunks/{BXWTCqoP.js → BioKfdhs.js} +1 -1
  57. package/web/app/immutable/chunks/{D6aq9EL_.js → Bj2REgAl.js} +1 -1
  58. package/web/app/immutable/chunks/{D5Yn3bZC.js → Bj2YjLqH.js} +4 -4
  59. package/web/app/immutable/chunks/{oEdBdTuH.js → BjO6mATN.js} +1 -1
  60. package/web/app/immutable/chunks/{CSoIbBhB.js → BkTES_s_.js} +1 -1
  61. package/web/app/immutable/chunks/{B0dFfRzP.js → BlGCnZqu.js} +1 -1
  62. package/web/app/immutable/chunks/{uEiZ2aa0.js → BlobiUVj.js} +1 -1
  63. package/web/app/immutable/chunks/{D_o99_fG.js → BoAgG62K.js} +1 -1
  64. package/web/app/immutable/chunks/{BLfSGdog.js → BoyajzxN.js} +1 -1
  65. package/web/app/immutable/chunks/{D8G2wLaP.js → Bpei5bK8.js} +1 -1
  66. package/web/app/immutable/chunks/{DWbuBB3d.js → BqEq2gS8.js} +1 -1
  67. package/web/app/immutable/chunks/{BSERRzdN.js → BqSjWCdR.js} +1 -1
  68. package/web/app/immutable/chunks/{BweEgIMi.js → BrPrpju0.js} +1 -1
  69. package/web/app/immutable/chunks/{jN_7w48e.js → BrXpFLv_.js} +1 -1
  70. package/web/app/immutable/chunks/{-FJQK9pf.js → Btdv9Hrh.js} +1 -1
  71. package/web/app/immutable/chunks/BuKPgt_Y.js +184 -0
  72. package/web/app/immutable/chunks/{BaWdIDeU.js → BuRX-tbO.js} +1 -1
  73. package/web/app/immutable/chunks/{DPbm6slt.js → Butq4Y1l.js} +4 -4
  74. package/web/app/immutable/chunks/{CHb28ISq.js → BvuznwRa.js} +1 -1
  75. package/web/app/immutable/chunks/{kkexgKXz.js → BwcCzTcz.js} +1 -1
  76. package/web/app/immutable/chunks/{k-AP8VlM.js → C-PJ15bY.js} +1 -1
  77. package/web/app/immutable/chunks/{P0y5VMqy.js → C2kpUgbe.js} +1 -1
  78. package/web/app/immutable/chunks/{CbcE07N6.js → C4eeWJf-.js} +1 -1
  79. package/web/app/immutable/chunks/{Ct5pe7Ek.js → C4mRaa7L.js} +1 -1
  80. package/web/app/immutable/chunks/{X8KOCQId.js → C51KzdSG.js} +1 -1
  81. package/web/app/immutable/chunks/{LNCq34-O.js → C5vTcsb2.js} +1 -1
  82. package/web/app/immutable/chunks/{Mt7x2IZs.js → C64d2sYd.js} +1 -1
  83. package/web/app/immutable/chunks/{BqgmbqM-.js → C6LRlrtG.js} +1 -1
  84. package/web/app/immutable/chunks/{CuViOyzR.js → C7A26Vlu.js} +1 -1
  85. package/web/app/immutable/chunks/{2zaEEAE2.js → C8BEXIPc.js} +1 -1
  86. package/web/app/immutable/chunks/{B856U1Jr.js → C8xd2WWY.js} +1 -1
  87. package/web/app/immutable/chunks/{BycWLeDe.js → C8yAGnZY.js} +1 -1
  88. package/web/app/immutable/chunks/{BPp3W2jV.js → C9o24MoC.js} +1 -1
  89. package/web/app/immutable/chunks/{JKrLJ2R_.js → CAkMXI-6.js} +44 -44
  90. package/web/app/immutable/chunks/{Sqmoz5pv.js → CCU5YAgB.js} +1 -1
  91. package/web/app/immutable/chunks/{DqG8xjZW.js → CDnN0LSW.js} +1 -1
  92. package/web/app/immutable/chunks/{Cnz8RKk9.js → CEQqb3fD.js} +1 -1
  93. package/web/app/immutable/chunks/{I-6kOw9r.js → CEd0rr6P.js} +1 -1
  94. package/web/app/immutable/chunks/{BKkrgjsa.js → CFzJYgT5.js} +1 -1
  95. package/web/app/immutable/chunks/{BxuhDHqB.js → CG5J-qd_.js} +1 -1
  96. package/web/app/immutable/chunks/{ebuf-RO9.js → CHSBtC7Q.js} +1 -1
  97. package/web/app/immutable/chunks/{BW9EmetF.js → CHXt_ftw.js} +1 -1
  98. package/web/app/immutable/chunks/{ylZv2UEj.js → CHaUiotE.js} +1 -1
  99. package/web/app/immutable/chunks/{BMt7MpM8.js → CHjSilfW.js} +1 -1
  100. package/web/app/immutable/chunks/{Bw1SBWCL.js → CJQrM64N.js} +3 -3
  101. package/web/app/immutable/chunks/{D39KsI93.js → CJaPqUNh.js} +1 -1
  102. package/web/app/immutable/chunks/{IUhIao0l.js → CMO5zsjQ.js} +1 -1
  103. package/web/app/immutable/chunks/{DHN03i25.js → CMqMo1Af.js} +1 -1
  104. package/web/app/immutable/chunks/{CZH06yTf.js → CMt5MqSJ.js} +1 -1
  105. package/web/app/immutable/chunks/{BIZ0uXaU.js → COL0pyet.js} +1 -1
  106. package/web/app/immutable/chunks/{DPyjdIy2.js → CQ7Jnj9E.js} +1 -1
  107. package/web/app/immutable/chunks/{BNe0FUML.js → CQTIadOp.js} +1 -1
  108. package/web/app/immutable/chunks/{CeGnK4JQ.js → CRhgbDg2.js} +50 -50
  109. package/web/app/immutable/chunks/{B9un2a8L.js → CS1d84Cn.js} +1 -1
  110. package/web/app/immutable/chunks/{D7gI_V1F.js → CTozw_6a.js} +1 -1
  111. package/web/app/immutable/chunks/{Bq6ix99x.js → CTwzQE4y.js} +1 -1
  112. package/web/app/immutable/chunks/{uDFKivEo.js → CULilvBT.js} +1 -1
  113. package/web/app/immutable/chunks/{CmLvFRqe.js → CV2PaujE.js} +2 -2
  114. package/web/app/immutable/chunks/{BTxRR5tz.js → CVBBsS8i.js} +1 -1
  115. package/web/app/immutable/chunks/{BC7qvj8J.js → CVUNrf_6.js} +1 -1
  116. package/web/app/immutable/chunks/{DRHN1_Cd.js → CW2_8Qo8.js} +1 -1
  117. package/web/app/immutable/chunks/{DfTHDtr3.js → CWgAcLvx.js} +1 -1
  118. package/web/app/immutable/chunks/{C04G6COq.js → CX6Z33tv.js} +1 -1
  119. package/web/app/immutable/chunks/{DfDa-Hf6.js → CYElNz1m.js} +1 -1
  120. package/web/app/immutable/chunks/{5JlRwIXk.js → CZUDc12W.js} +1 -1
  121. package/web/app/immutable/chunks/{BplvCBzc.js → C_fEvnNK.js} +1 -1
  122. package/web/app/immutable/chunks/{CeH1-IFA.js → Ccj-b14I.js} +1 -1
  123. package/web/app/immutable/chunks/{-EQ6B0ad.js → CdT170lG.js} +6 -6
  124. package/web/app/immutable/chunks/{BpLK-vah.js → Ceyasj46.js} +1 -1
  125. package/web/app/immutable/chunks/{BNm8i956.js → CfAqizJ3.js} +1 -1
  126. package/web/app/immutable/chunks/{CuOjrr_z.js → CfYh5raT.js} +1 -1
  127. package/web/app/immutable/chunks/{D_PPEYyI.js → CfgPxwA4.js} +1 -1
  128. package/web/app/immutable/chunks/{D8AXxi58.js → CgWJ7tKh.js} +1 -1
  129. package/web/app/immutable/chunks/{CR7ldtgw.js → ChDcu7sM.js} +1 -1
  130. package/web/app/immutable/chunks/{CcEiTh-4.js → ChYWsi4Z.js} +1 -1
  131. package/web/app/immutable/chunks/{xHGNzBhq.js → ChmO5DTP.js} +1 -1
  132. package/web/app/immutable/chunks/{DWjmi9tH.js → CiB1yTSc.js} +3 -3
  133. package/web/app/immutable/chunks/{0K6BfmBv.js → Cj_Tm5wU.js} +1 -1
  134. package/web/app/immutable/chunks/{CJqvN_qS.js → CkNc-1DL.js} +1 -1
  135. package/web/app/immutable/chunks/{dp7e7xW2.js → CkqPtSf5.js} +1 -1
  136. package/web/app/immutable/chunks/{DXPPFxlV.js → ClNs6jou.js} +1 -1
  137. package/web/app/immutable/chunks/{CptC_Uum.js → CnuSxcLR.js} +1 -1
  138. package/web/app/immutable/chunks/{AL4WvJsG.js → CotgBJSP.js} +1 -1
  139. package/web/app/immutable/chunks/{CMiRnadp.js → CoyHhRwd.js} +1 -1
  140. package/web/app/immutable/chunks/{DqlqvyKI.js → CozIiFS7.js} +1 -1
  141. package/web/app/immutable/chunks/{cOgdKI6o.js → Cp09JH6d.js} +1 -1
  142. package/web/app/immutable/chunks/{AdAUM0KU.js → Cp9AnykR.js} +1 -1
  143. package/web/app/immutable/chunks/{BM-sVLs9.js → CpPsvdhC.js} +1 -1
  144. package/web/app/immutable/chunks/CrXlvCkv.js +3 -0
  145. package/web/app/immutable/chunks/{BM9f6Xn6.js → Crq4Js3_.js} +1 -1
  146. package/web/app/immutable/chunks/{ByWgRTUb.js → CvZhT_UL.js} +1 -1
  147. package/web/app/immutable/chunks/{Bda__gQr.js → Cve5pOPi.js} +2 -2
  148. package/web/app/immutable/chunks/{CE7hy_eJ.js → CwK4Fl7A.js} +2 -2
  149. package/web/app/immutable/chunks/{BYaK8uq0.js → Cwxvd99b.js} +1 -1
  150. package/web/app/immutable/chunks/{Cr8elldh.js → CxDLMfRf.js} +1 -1
  151. package/web/app/immutable/chunks/{Cbp3zliH.js → Cz9_gz0r.js} +1 -1
  152. package/web/app/immutable/chunks/{D4i52eN2.js → Czc4IAh9.js} +1 -1
  153. package/web/app/immutable/chunks/{C-D97gL1.js → Czzw_Pvc.js} +1 -1
  154. package/web/app/immutable/chunks/{dfIdHF6z.js → D0csyvlS.js} +1 -1
  155. package/web/app/immutable/chunks/{Bh14bdXE.js → D0pR1-a6.js} +1 -1
  156. package/web/app/immutable/chunks/{CARkdujD.js → D1dPbxoX.js} +1 -1
  157. package/web/app/immutable/chunks/{D9GJ60AX.js → D2Fdja4t.js} +1 -1
  158. package/web/app/immutable/chunks/{CfgmsyOw.js → D38kCxZ9.js} +1 -1
  159. package/web/app/immutable/chunks/{CQRR0AOa.js → D4K0RFHm.js} +1 -1
  160. package/web/app/immutable/chunks/D4Lumjru.js +1 -0
  161. package/web/app/immutable/chunks/D4MoKNoK.js +1 -0
  162. package/web/app/immutable/chunks/{DYpEID-4.js → D4RvTAYA.js} +1 -1
  163. package/web/app/immutable/chunks/{3HhYuBQ5.js → D5jqrM_N.js} +1 -1
  164. package/web/app/immutable/chunks/{_Ha8_PaU.js → D6XYE7JV.js} +1 -1
  165. package/web/app/immutable/chunks/{BB4kjTGV.js → D6dtEt_1.js} +1 -1
  166. package/web/app/immutable/chunks/{BYX2DQge.js → D72pFxfr.js} +1 -1
  167. package/web/app/immutable/chunks/{D3s69DNC.js → D7P2CXpO.js} +3 -3
  168. package/web/app/immutable/chunks/{C1Yon3Fs.js → D7ht9fTY.js} +1 -1
  169. package/web/app/immutable/chunks/{DoI-lOCr.js → D82TCSK5.js} +1 -1
  170. package/web/app/immutable/chunks/{T3Bh0XrL.js → D8HMZQ9R.js} +1 -1
  171. package/web/app/immutable/chunks/{DX7KyYLV.js → D8U0PEIU.js} +1 -1
  172. package/web/app/immutable/chunks/{CGtte9IE.js → D8_OuTD3.js} +1 -1
  173. package/web/app/immutable/chunks/{DECP5P_I.js → D8a6fWF_.js} +1 -1
  174. package/web/app/immutable/chunks/{DIgbsss0.js → DAY2MDvD.js} +1 -1
  175. package/web/app/immutable/chunks/{BJhIFFGs.js → DB6_aOnf.js} +3 -3
  176. package/web/app/immutable/chunks/{CqB0SlYo.js → DB_2g4tK.js} +1 -1
  177. package/web/app/immutable/chunks/{DcIvDrh5.js → DBicYI5c.js} +1 -1
  178. package/web/app/immutable/chunks/{kc3pShLm.js → DBmzovBA.js} +1 -1
  179. package/web/app/immutable/chunks/DC38WcVm.js +1 -0
  180. package/web/app/immutable/chunks/{BKUFkB2Z.js → DDhakcOb.js} +1 -1
  181. package/web/app/immutable/chunks/DFXw4s8S.js +1 -0
  182. package/web/app/immutable/chunks/{1kQYhwzI.js → DFvnP41F.js} +1 -1
  183. package/web/app/immutable/chunks/{BTxaodpe.js → DG5KvEVf.js} +1 -1
  184. package/web/app/immutable/chunks/{6Rnnu0Za.js → DHBpY1EK.js} +1 -1
  185. package/web/app/immutable/chunks/{DiLRxk1W.js → DI7pTzx5.js} +1 -1
  186. package/web/app/immutable/chunks/{DhJybiGT.js → DKF2EjTY.js} +1 -1
  187. package/web/app/immutable/chunks/{DJly-gFW.js → DL5rLLvU.js} +1 -1
  188. package/web/app/immutable/chunks/{CiV78Mds.js → DOE_TCNp.js} +1 -1
  189. package/web/app/immutable/chunks/{DV0nUf5d.js → DOPcy6T2.js} +1 -1
  190. package/web/app/immutable/chunks/{CX0jnzIf.js → DPY72hn4.js} +1 -1
  191. package/web/app/immutable/chunks/{BpPk83wC.js → DPvthnru.js} +1 -1
  192. package/web/app/immutable/chunks/{DflDaBxQ.js → DQOyHGtr.js} +1 -1
  193. package/web/app/immutable/chunks/{DFDb4afa.js → DQafeec3.js} +1 -1
  194. package/web/app/immutable/chunks/{BdMtzsOL.js → DR1QbPSk.js} +1 -1
  195. package/web/app/immutable/chunks/{BMOHjFjD.js → DRdRLmUz.js} +1 -1
  196. package/web/app/immutable/chunks/{CNLVfjPb.js → DVwKfMN5.js} +1 -1
  197. package/web/app/immutable/chunks/{B3t7QTl4.js → DWzbf_aU.js} +1 -1
  198. package/web/app/immutable/chunks/{2sWuLeQM.js → DX0AlGFV.js} +1 -1
  199. package/web/app/immutable/chunks/{Bcdu3rtl.js → DX0hE1oC.js} +1 -1
  200. package/web/app/immutable/chunks/{Bi0iCGDl.js → DX3MlPN0.js} +1 -1
  201. package/web/app/immutable/chunks/{Bdp7u5fL.js → DXJ3D6-0.js} +2 -2
  202. package/web/app/immutable/chunks/{Ctw6lIEV.js → DYX4kEq9.js} +1 -1
  203. package/web/app/immutable/chunks/{DwwmXlwG.js → DZRaa7LH.js} +1 -1
  204. package/web/app/immutable/chunks/{C1_JJ0WX.js → Dbuv3b_7.js} +2 -2
  205. package/web/app/immutable/chunks/{BrUeG1RC.js → DditQ6Dc.js} +1 -1
  206. package/web/app/immutable/chunks/{CiJsLr2J.js → De4WWpS0.js} +1 -1
  207. package/web/app/immutable/chunks/{-cKrxpnw.js → DeJ360tt.js} +1 -1
  208. package/web/app/immutable/chunks/{CBY4R5Io.js → DgFojmqv.js} +3 -3
  209. package/web/app/immutable/chunks/{Dr6CAh-x.js → DhQAmnDS.js} +1 -1
  210. package/web/app/immutable/chunks/{B9hh5ps3.js → DhkOw60r.js} +1 -1
  211. package/web/app/immutable/chunks/{N_3EVFPG.js → Di6XfBOT.js} +1 -1
  212. package/web/app/immutable/chunks/{FxlRoZ6N.js → Dijv8faG.js} +1 -1
  213. package/web/app/immutable/chunks/{DSpny-f5.js → DjVrYm-R.js} +1 -1
  214. package/web/app/immutable/chunks/{YsJRyh1t.js → DlYL66WK.js} +2 -2
  215. package/web/app/immutable/chunks/{DEghD5AV.js → DlYrPe_w.js} +1 -1
  216. package/web/app/immutable/chunks/{Btf9QGuY.js → Dlu0_GVa.js} +1 -1
  217. package/web/app/immutable/chunks/{D-SL5jmx.js → DmVYXUKU.js} +1 -1
  218. package/web/app/immutable/chunks/{Dekj0CRz.js → Dmip1qZq.js} +1 -1
  219. package/web/app/immutable/chunks/{DyzC-8bY.js → DpXfO8nM.js} +1 -1
  220. package/web/app/immutable/chunks/{BLKmUQ7j.js → DpyM727L.js} +1 -1
  221. package/web/app/immutable/chunks/{BGWyYsdo.js → Dq_FaIX5.js} +1 -1
  222. package/web/app/immutable/chunks/{DaBUZyWc.js → Ds7can9q.js} +1 -1
  223. package/web/app/immutable/chunks/{BIIzJP0L.js → DuKFlC9j.js} +1 -1
  224. package/web/app/immutable/chunks/{D7-ADqnT.js → DwW5MiN3.js} +1 -1
  225. package/web/app/immutable/chunks/{CQS12qgy.js → DwbzbVQ3.js} +1 -1
  226. package/web/app/immutable/chunks/{Clzmvd7M.js → DwwMc3td.js} +1 -1
  227. package/web/app/immutable/chunks/{67V3Eqst.js → DxJXJeWp.js} +1 -1
  228. package/web/app/immutable/chunks/{DNTeyAGR.js → DxlpLNnB.js} +1 -1
  229. package/web/app/immutable/chunks/{DvIWu0bM.js → DzMB8eQW.js} +1 -1
  230. package/web/app/immutable/chunks/{ytSsfHOi.js → EPni7PhH.js} +1 -1
  231. package/web/app/immutable/chunks/{DZwtNfnB.js → F42L1irN.js} +2 -2
  232. package/web/app/immutable/chunks/{bG4sEGuX.js → H_dyzYix.js} +1 -1
  233. package/web/app/immutable/chunks/{OtBI4VRo.js → HfuFYz2u.js} +1 -1
  234. package/web/app/immutable/chunks/{BXmUGAB5.js → I1eQnBry.js} +1 -1
  235. package/web/app/immutable/chunks/{_WbplBv2.js → J5Q3706J.js} +1 -1
  236. package/web/app/immutable/chunks/{CVC7R5g8.js → JUqct0gC.js} +1 -1
  237. package/web/app/immutable/chunks/{BzgtWDxy.js → KxpMwUsB.js} +1 -1
  238. package/web/app/immutable/chunks/{xcwRs97P.js → LFOlphb5.js} +1 -1
  239. package/web/app/immutable/chunks/{DO3zoQaK.js → LOxI5KoQ.js} +1 -1
  240. package/web/app/immutable/chunks/{BDq1sVyx.js → LiYeJQ_y.js} +1 -1
  241. package/web/app/immutable/chunks/{BdXZBn8p.js → OX_6myWb.js} +3 -3
  242. package/web/app/immutable/chunks/{BMBkpFaV.js → Qyi-W7KZ.js} +1 -1
  243. package/web/app/immutable/chunks/{CNPgXL7O.js → RDcDz1X1.js} +1 -1
  244. package/web/app/immutable/chunks/{B45Lzffx.js → S9ot6IO_.js} +1 -1
  245. package/web/app/immutable/chunks/Sk9pLJI5.js +6 -0
  246. package/web/app/immutable/chunks/{BxuY-d7z.js → SlH326tK.js} +1 -1
  247. package/web/app/immutable/chunks/{ED1Md46o.js → UMObs5wi.js} +1 -1
  248. package/web/app/immutable/chunks/{CcXmTQrG.js → Uv0U-1kP.js} +1 -1
  249. package/web/app/immutable/chunks/{C4ABvngM.js → WPmFGY7m.js} +1 -1
  250. package/web/app/immutable/chunks/{KLMKvNSD.js → WVYGrHqE.js} +1 -1
  251. package/web/app/immutable/chunks/{BAR22MDD.js → WZHg24tN.js} +1 -1
  252. package/web/app/immutable/chunks/{B_IHHwFT.js → Xb_csWgU.js} +1 -1
  253. package/web/app/immutable/chunks/{BLqK1w-V.js → Y3UAS5wV.js} +1 -1
  254. package/web/app/immutable/chunks/{mxfq8-qS.js → Y4N0iJyK.js} +1 -1
  255. package/web/app/immutable/chunks/{BVcYqOip.js → YpQeV5ep.js} +6 -6
  256. package/web/app/immutable/chunks/{Dq6jwHZ6.js → ZYYtufHC.js} +1 -1
  257. package/web/app/immutable/chunks/{lzVZjIHK.js → _Y7Nvr11.js} +1 -1
  258. package/web/app/immutable/chunks/{BMW1RYmJ.js → _bgnudZi.js} +2 -2
  259. package/web/app/immutable/chunks/{C07lgk2D.js → _cj4xlwz.js} +1 -1
  260. package/web/app/immutable/chunks/{D0QGnN9N.js → _eQjP0_7.js} +7 -7
  261. package/web/app/immutable/chunks/{B6f4X6Cq.js → bjlKIwQF.js} +1 -1
  262. package/web/app/immutable/chunks/{Bkt7VHdr.js → c0MObYhr.js} +1 -1
  263. package/web/app/immutable/chunks/{uzVhgdYt.js → dimBDqRX.js} +1 -1
  264. package/web/app/immutable/chunks/{De5CT8ah.js → fJdmRaXe.js} +1 -1
  265. package/web/app/immutable/chunks/{Dm5XlejL.js → fxR7QMV8.js} +1 -1
  266. package/web/app/immutable/chunks/{DpvwyG67.js → hAyFyjes.js} +1 -1
  267. package/web/app/immutable/chunks/{BtTwGRLV.js → iPSaMdjW.js} +1 -1
  268. package/web/app/immutable/chunks/{CBj-skM7.js → ingscYYg.js} +1 -1
  269. package/web/app/immutable/chunks/{Zu_hB4jz.js → lrd8vBcb.js} +1 -1
  270. package/web/app/immutable/chunks/{D75qE5QF.js → nvBTDqJi.js} +1 -1
  271. package/web/app/immutable/chunks/{DPWpLmap.js → oCNF8vh8.js} +1 -1
  272. package/web/app/immutable/chunks/{D7NIlQGn.js → oDL-pLcj.js} +1 -1
  273. package/web/app/immutable/chunks/{C1itrH63.js → pIvHob4a.js} +1 -1
  274. package/web/app/immutable/chunks/{DpWrzKZ5.js → s4JAFzR2.js} +1 -1
  275. package/web/app/immutable/chunks/{Dtvcl9ZM.js → sgXcAFR7.js} +1 -1
  276. package/web/app/immutable/chunks/{Bk1uVK5j.js → t61BPD62.js} +1 -1
  277. package/web/app/immutable/chunks/{QBqsOIpN.js → t7uelISx.js} +1 -1
  278. package/web/app/immutable/chunks/{SIlEqZy6.js → tWOclZbM.js} +1 -1
  279. package/web/app/immutable/chunks/{CFa2g-IY.js → u9Jr5xJ2.js} +1 -1
  280. package/web/app/immutable/chunks/{CNFZNMrf.js → uKt9v9GZ.js} +1 -1
  281. package/web/app/immutable/chunks/{BUcRm8Vm.js → xS44oH53.js} +1 -1
  282. package/web/app/immutable/chunks/{BxU3DCFg.js → yQykulND.js} +1 -1
  283. package/web/app/immutable/chunks/{CA6N8yqk.js → z5aynuor.js} +1 -1
  284. package/web/app/immutable/chunks/{ClALIxbi.js → zOdhHtWD.js} +1 -1
  285. package/web/app/immutable/chunks/{DNeMGvC1.js → zuhzlizP.js} +1 -1
  286. package/web/app/immutable/entry/{app.B7NDG9Ke.js → app.ZJRI8LL8.js} +3 -3
  287. package/web/app/immutable/entry/start.B_ChBWnN.js +1 -0
  288. package/web/app/immutable/nodes/{0.Bun1I2n8.js → 0.B_5IeAcY.js} +1 -1
  289. package/web/app/immutable/nodes/{1.CaXWyT2I.js → 1.D2RcMrk8.js} +1 -1
  290. package/web/app/immutable/nodes/{10.QcBz8vIO.js → 10.a-yBB_mg.js} +1 -1
  291. package/web/app/immutable/nodes/{11.CIL0R940.js → 11.DzMcYtgT.js} +1 -1
  292. package/web/app/immutable/nodes/{12.VioYEcq0.js → 12.BS7aI1vv.js} +1 -1
  293. package/web/app/immutable/nodes/{13.DXKlob-e.js → 13.Dj6DavrI.js} +3 -3
  294. package/web/app/immutable/nodes/{14.Del2TMMg.js → 14.BRMrhd95.js} +2 -2
  295. package/web/app/immutable/nodes/{15.Djr5my7L.js → 15.BWo3i95L.js} +1 -1
  296. package/web/app/immutable/nodes/{16.D5MyJ40_.js → 16.DsObfcQu.js} +2 -2
  297. package/web/app/immutable/nodes/{2.DGym_vbk.js → 2.BX2UV9md.js} +4 -4
  298. package/web/app/immutable/nodes/{3.s5E8H3KB.js → 3.BAb5j4vs.js} +1 -1
  299. package/web/app/immutable/nodes/{4.D5-aRMMy.js → 4.i3m7hv4J.js} +1 -1
  300. package/web/app/immutable/nodes/{5.B3_zYP1m.js → 5.kQ7xzuNs.js} +1 -1
  301. package/web/app/immutable/nodes/{6.DutaO_wJ.js → 6.De5Z6N1w.js} +1 -1
  302. package/web/app/immutable/nodes/{7.BTpm8RYp.js → 7.Dqm5QJxM.js} +1 -1
  303. package/web/app/immutable/nodes/{8.CZztH_7a.js → 8.BT-G_bE5.js} +4 -4
  304. package/web/app/immutable/nodes/{9.B2qxwSvF.js → 9.DIcsOChV.js} +5 -5
  305. package/web/app/version.json +1 -1
  306. package/web/generated/paraglide.js +49 -49
  307. package/web/index.html +18 -18
  308. package/web/app/immutable/chunks/B_KqSc_J.js +0 -3
  309. package/web/app/immutable/chunks/Blk8v-pB.js +0 -1
  310. package/web/app/immutable/chunks/BoDxQZ1k.js +0 -1
  311. package/web/app/immutable/chunks/COH5cIoS.js +0 -184
  312. package/web/app/immutable/chunks/DEI12D8u.js +0 -1
  313. package/web/app/immutable/chunks/DJISFfnZ.js +0 -6
  314. package/web/app/immutable/chunks/YDzESqGE.js +0 -1
  315. package/web/app/immutable/chunks/neQDnDfO.js +0 -1
  316. package/web/app/immutable/entry/start.BNunxuiZ.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intent-hq/web",
3
- "version": "2.283.1",
3
+ "version": "2.285.0",
4
4
  "description": "Intent in the browser: a standalone web server for Intent machines.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1 +1 @@
1
- import{g as o,r as l,d as t}from"./BMOHjFjD.js";import{p as m}from"./ED1Md46o.js";import{f as n,bC as s}from"./-EQ6B0ad.js";import{M as p,d as u}from"./bG4sEGuX.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),f=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),f(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
1
+ import{g as o,r as l,d as t}from"./DRdRLmUz.js";import{p as m}from"./UMObs5wi.js";import{f as n,bC as s}from"./CdT170lG.js";import{M as p,d as u}from"./H_dyzYix.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),f=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),f(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
@@ -1 +1 @@
1
- import{g as r}from"./DWjmi9tH.js";import{l as d}from"./ChTqQfQN.js";let n=!1,t=!1;function c(){if(!n)try{r.defineTheme("app-dark",{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#569cd6"},{token:"string",foreground:"#ce9178"},{token:"number",foreground:"#b5cea8"},{token:"comment",foreground:"#6a9955"}],colors:{"editor.background":"#1B1B23","editor.foreground":"#d4d4d4","editor.selectionBackground":"#264f78","editor.lineHighlightBackground":"#0B0B0E","diffEditor.insertedLineBackground":"#22c55e18","diffEditor.removedLineBackground":"#ef444418","diffEditor.insertedTextBackground":"#22c55e70","diffEditor.removedTextBackground":"#ef444470","diffEditorGutter.insertedLineBackground":"#22c55ecc","diffEditorGutter.removedLineBackground":"#ef4444cc","diffEditor.insertedTextBorder":"#22c55e99","diffEditor.removedTextBorder":"#ef444499","diffEditor.diagonalFill":"#374151","diffEditorOverview.insertedForeground":"#22c55ecc","diffEditorOverview.removedForeground":"#ef4444cc"}}),r.defineTheme("app-light",{base:"vs",inherit:!0,rules:[{token:"keyword",foreground:"#7c3aed"},{token:"keyword.control",foreground:"#7c3aed"},{token:"keyword.operator",foreground:"#7c3aed"},{token:"operator",foreground:"#374151"},{token:"variable",foreground:"#374151"},{token:"variable.other",foreground:"#374151"},{token:"variable.parameter",foreground:"#374151"},{token:"variable.language",foreground:"#7c3aed"},{token:"type",foreground:"#b45309"},{token:"class",foreground:"#b45309"},{token:"interface",foreground:"#b45309"},{token:"enum",foreground:"#b45309"},{token:"function",foreground:"#1d4ed8"},{token:"function.declaration",foreground:"#1d4ed8"},{token:"function.call",foreground:"#1d4ed8"},{token:"string",foreground:"#047857"},{token:"string.quoted",foreground:"#047857"},{token:"string.quoted.single",foreground:"#047857"},{token:"string.quoted.double",foreground:"#047857"},{token:"number",foreground:"#c2410c"},{token:"comment",foreground:"#6b7280"},{token:"comment.line",foreground:"#6b7280"},{token:"comment.block",foreground:"#6b7280"},{token:"invalid",foreground:"#b91c1c"}],colors:{"editor.background":"#ffffff","editor.foreground":"#1f2937","editor.lineNumbersBackground":"#f9fafb","editor.lineNumbersForeground":"#9ca3af","editor.selectionBackground":"#dbeafe","editor.lineHighlightBackground":"#f3f4f6","editorCursor.foreground":"#1f2937","editorWhitespace.foreground":"#e5e7eb","diffEditor.insertedLineBackground":"#22c55e18","diffEditor.removedLineBackground":"#ef444418","diffEditor.insertedTextBackground":"#22c55e70","diffEditor.removedTextBackground":"#ef444470","diffEditorGutter.insertedLineBackground":"#22c55ecc","diffEditorGutter.removedLineBackground":"#ef4444cc","diffEditor.insertedTextBorder":"#22c55e99","diffEditor.removedTextBorder":"#ef444499","diffEditor.diagonalFill":"#e5e7eb55","diffEditorOverview.insertedForeground":"#22c55ecc","diffEditorOverview.removedForeground":"#ef4444cc"}}),n=!0}catch(e){d.error("Failed to initialize Monaco themes:",e)}}function u(e){try{r.defineTheme("app-custom",e),r.setTheme("app-custom"),t=!0}catch(o){d.error("Failed to apply custom Monaco theme:",o)}}function a(e){try{t=!1,r.setTheme(e?"app-dark":"app-light")}catch(o){d.error("Failed to revert Monaco theme:",o)}}function g(e){return t?"app-custom":e?"app-dark":"app-light"}export{u as applyCustomMonacoTheme,c as defineMonacoThemes,g as getActiveMonacoThemeName,a as revertMonacoTheme};
1
+ import{g as r}from"./CiB1yTSc.js";import{l as d}from"./ChTqQfQN.js";let n=!1,t=!1;function c(){if(!n)try{r.defineTheme("app-dark",{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#569cd6"},{token:"string",foreground:"#ce9178"},{token:"number",foreground:"#b5cea8"},{token:"comment",foreground:"#6a9955"}],colors:{"editor.background":"#1B1B23","editor.foreground":"#d4d4d4","editor.selectionBackground":"#264f78","editor.lineHighlightBackground":"#0B0B0E","diffEditor.insertedLineBackground":"#22c55e18","diffEditor.removedLineBackground":"#ef444418","diffEditor.insertedTextBackground":"#22c55e70","diffEditor.removedTextBackground":"#ef444470","diffEditorGutter.insertedLineBackground":"#22c55ecc","diffEditorGutter.removedLineBackground":"#ef4444cc","diffEditor.insertedTextBorder":"#22c55e99","diffEditor.removedTextBorder":"#ef444499","diffEditor.diagonalFill":"#374151","diffEditorOverview.insertedForeground":"#22c55ecc","diffEditorOverview.removedForeground":"#ef4444cc"}}),r.defineTheme("app-light",{base:"vs",inherit:!0,rules:[{token:"keyword",foreground:"#7c3aed"},{token:"keyword.control",foreground:"#7c3aed"},{token:"keyword.operator",foreground:"#7c3aed"},{token:"operator",foreground:"#374151"},{token:"variable",foreground:"#374151"},{token:"variable.other",foreground:"#374151"},{token:"variable.parameter",foreground:"#374151"},{token:"variable.language",foreground:"#7c3aed"},{token:"type",foreground:"#b45309"},{token:"class",foreground:"#b45309"},{token:"interface",foreground:"#b45309"},{token:"enum",foreground:"#b45309"},{token:"function",foreground:"#1d4ed8"},{token:"function.declaration",foreground:"#1d4ed8"},{token:"function.call",foreground:"#1d4ed8"},{token:"string",foreground:"#047857"},{token:"string.quoted",foreground:"#047857"},{token:"string.quoted.single",foreground:"#047857"},{token:"string.quoted.double",foreground:"#047857"},{token:"number",foreground:"#c2410c"},{token:"comment",foreground:"#6b7280"},{token:"comment.line",foreground:"#6b7280"},{token:"comment.block",foreground:"#6b7280"},{token:"invalid",foreground:"#b91c1c"}],colors:{"editor.background":"#ffffff","editor.foreground":"#1f2937","editor.lineNumbersBackground":"#f9fafb","editor.lineNumbersForeground":"#9ca3af","editor.selectionBackground":"#dbeafe","editor.lineHighlightBackground":"#f3f4f6","editorCursor.foreground":"#1f2937","editorWhitespace.foreground":"#e5e7eb","diffEditor.insertedLineBackground":"#22c55e18","diffEditor.removedLineBackground":"#ef444418","diffEditor.insertedTextBackground":"#22c55e70","diffEditor.removedTextBackground":"#ef444470","diffEditorGutter.insertedLineBackground":"#22c55ecc","diffEditorGutter.removedLineBackground":"#ef4444cc","diffEditor.insertedTextBorder":"#22c55e99","diffEditor.removedTextBorder":"#ef444499","diffEditor.diagonalFill":"#e5e7eb55","diffEditorOverview.insertedForeground":"#22c55ecc","diffEditorOverview.removedForeground":"#ef4444cc"}}),n=!0}catch(e){d.error("Failed to initialize Monaco themes:",e)}}function u(e){try{r.defineTheme("app-custom",e),r.setTheme("app-custom"),t=!0}catch(o){d.error("Failed to apply custom Monaco theme:",o)}}function a(e){try{t=!1,r.setTheme(e?"app-dark":"app-light")}catch(o){d.error("Failed to revert Monaco theme:",o)}}function g(e){return t?"app-custom":e?"app-dark":"app-light"}export{u as applyCustomMonacoTheme,c as defineMonacoThemes,g as getActiveMonacoThemeName,a as revertMonacoTheme};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BNe0FUML.js","/app/immutable/chunks/oEdBdTuH.js","/app/immutable/chunks/DEI12D8u.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/KLMKvNSD.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CBY4R5Io.js","/app/immutable/chunks/BAR22MDD.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/DWsGxz2C.js","/app/immutable/chunks/OtBI4VRo.js","/app/immutable/chunks/Bh14bdXE.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BycWLeDe.js","/app/immutable/chunks/CiJsLr2J.js","/app/immutable/chunks/X8KOCQId.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/BxuhDHqB.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css"])))=>i.map(i=>d[i]);
2
- var ae=Object.defineProperty;var ne=(e,t,r)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>ne(e,typeof t!="symbol"?t+"":t,r);import{a as oe,i as ce}from"./BKUFkB2Z.js";import{c as V}from"./ChTqQfQN.js";import{i as D}from"./DvIWu0bM.js";import{bo as n,_ as le}from"./DEI12D8u.js";import{G2 as a,mv as y,mu as m,l0 as de,w9 as R,wa as N,w7 as ue,w8 as pe,q1 as Y,vW as fe,FQ as he,a2 as ge,bR as me,bQ as ve,c3 as be,c2 as Se,mx as _}from"./X8KOCQId.js";import{cr as we,bs as ye,c4 as _e,cj as ke,c6 as Ee,cG as Re,cK as Ce,cA as K,av as Te,bO as Ae,cH as Ie}from"./uzVhgdYt.js";import{n as Pe}from"./CE7hy_eJ.js";import{ak as Me,F as Q,j as De,G as Oe,bv as xe,c as Fe,al as Ne,bg as W,_ as Le,aB as Ue,q as $,K as Ve,ag as We,bl as He,J as Be,H as qe,I as je,bj as Ge}from"./BplvCBzc.js";import{r as ze}from"./BQkOKtmR.js";const O=V("Clipboard");async function Er(e){let t;if(oe())try{const r=await ce("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,O.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw O.error("Browser clipboard write failed",r,{electronError:t}),r}throw O.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const Ye=a.createSelector(e=>e.githubAuth.mutationRequestId),Ke=a.createSelector(e=>e.githubAuth.callbacksCancelled),Qe=a.createSelector(e=>e.githubAuth.isDisconnecting),Z=a.createSelector(e=>e.githubAuth.isAuthenticated),$e=a.createSelector(e=>e.githubAuth.statusSettled===!0),Ze=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),Je=a.createSelector(e=>e.githubAuth.user),Xe=a.createSelector(e=>e.githubAuth.isAuthenticating),et=a.createSelector(e=>e.githubAuth.deviceFlow),tt=a.createSelector(e=>e.githubAuth.error),Rr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Ke,selectGitHubAuthDeviceFlow:et,selectGitHubAuthError:tt,selectGitHubAuthIsAuthenticated:Z,selectGitHubAuthIsAuthenticating:Xe,selectGitHubAuthIsDisconnecting:Qe,selectGitHubAuthMutationRequestId:Ye,selectGitHubAuthRequiresDaemonAuth:Ze,selectGitHubAuthStatusSettled:$e,selectGitHubAuthUser:Je},Symbol.toStringTag,{value:"Module"})),rt=V("WorkspaceValidation");async function Cr(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return st(s)?at(s):nt(s,t,r)}function st(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function it(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function at(e){return it(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function nt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:n.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(rt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Tr(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Ar(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Ir(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Pr(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Mr(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const b=[{id:"spec-writer",role:"orchestrator",teamAgents:["implementor","verifier"],icon:"coordinator",get name(){return n.specialists_builtin_coordinator_name()},get description(){return n.specialists_builtin_coordinator_description()},defaultBehaviorPrompt:`## Coordinator
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CQTIadOp.js","/app/immutable/chunks/BjO6mATN.js","/app/immutable/chunks/D4MoKNoK.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/WVYGrHqE.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DgFojmqv.js","/app/immutable/chunks/WZHg24tN.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/BPQohPc9.js","/app/immutable/chunks/HfuFYz2u.js","/app/immutable/chunks/D0pR1-a6.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/C8yAGnZY.js","/app/immutable/chunks/De4WWpS0.js","/app/immutable/chunks/C51KzdSG.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CG5J-qd_.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css"])))=>i.map(i=>d[i]);
2
+ var ae=Object.defineProperty;var ne=(e,t,r)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>ne(e,typeof t!="symbol"?t+"":t,r);import{a as oe,i as ce}from"./DDhakcOb.js";import{c as V}from"./ChTqQfQN.js";import{i as D}from"./DzMB8eQW.js";import{bo as n,_ as le}from"./D4MoKNoK.js";import{G2 as a,mv as y,mu as m,l0 as de,w9 as R,wa as N,w7 as ue,w8 as pe,q1 as Y,vW as fe,FQ as he,a2 as ge,bR as me,bQ as ve,c3 as be,c2 as Se,mx as _}from"./C51KzdSG.js";import{cr as we,bs as ye,c4 as _e,cj as ke,c6 as Ee,cG as Re,cK as Ce,cA as K,av as Te,bO as Ae,cH as Ie}from"./dimBDqRX.js";import{n as Pe}from"./CwK4Fl7A.js";import{ak as Me,F as Q,j as De,G as Oe,bv as xe,c as Fe,al as Ne,bg as W,_ as Le,aB as Ue,q as $,K as Ve,ag as We,bl as He,J as Be,H as qe,I as je,bj as Ge}from"./C_fEvnNK.js";import{r as ze}from"./B9YdV5Lr.js";const O=V("Clipboard");async function Er(e){let t;if(oe())try{const r=await ce("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,O.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw O.error("Browser clipboard write failed",r,{electronError:t}),r}throw O.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const Ye=a.createSelector(e=>e.githubAuth.mutationRequestId),Ke=a.createSelector(e=>e.githubAuth.callbacksCancelled),Qe=a.createSelector(e=>e.githubAuth.isDisconnecting),Z=a.createSelector(e=>e.githubAuth.isAuthenticated),$e=a.createSelector(e=>e.githubAuth.statusSettled===!0),Ze=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),Je=a.createSelector(e=>e.githubAuth.user),Xe=a.createSelector(e=>e.githubAuth.isAuthenticating),et=a.createSelector(e=>e.githubAuth.deviceFlow),tt=a.createSelector(e=>e.githubAuth.error),Rr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Ke,selectGitHubAuthDeviceFlow:et,selectGitHubAuthError:tt,selectGitHubAuthIsAuthenticated:Z,selectGitHubAuthIsAuthenticating:Xe,selectGitHubAuthIsDisconnecting:Qe,selectGitHubAuthMutationRequestId:Ye,selectGitHubAuthRequiresDaemonAuth:Ze,selectGitHubAuthStatusSettled:$e,selectGitHubAuthUser:Je},Symbol.toStringTag,{value:"Module"})),rt=V("WorkspaceValidation");async function Cr(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return st(s)?at(s):nt(s,t,r)}function st(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function it(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function at(e){return it(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function nt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:n.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(rt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Tr(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Ar(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Ir(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Pr(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Mr(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const b=[{id:"spec-writer",role:"orchestrator",teamAgents:["implementor","verifier"],icon:"coordinator",get name(){return n.specialists_builtin_coordinator_name()},get description(){return n.specialists_builtin_coordinator_description()},defaultBehaviorPrompt:`## Coordinator
3
3
 
4
4
  You plan, delegate, and verify. You do NOT implement code yourself. You NEVER edit files directly.
5
5
  **You have no file editing tools available. Delegation to implementor agents is the ONLY way code gets written.**
@@ -531,4 +531,4 @@ Show referenced workspaces as live fenced \`workspace\` blocks with one returned
531
531
 
532
532
  For cross-workspace agents, use attributed send for one-way requests, ask when an answer is requested, and waitFor for completion watches. After ask or waitFor, end the turn; do not poll or treat interim messages as completion. On the completion wake, read the specified agent's conversation once and relay its last assistant message with a nonempty message ID. Link that reply as [Workspace Title](intent://local/{workspaceId}/agent/{agentId}/message/{messageId}), taking all IDs and the title from the conversation read, never the outgoing request or a user message. This exact-message source link is the exception to workspace cards. Omit the link if no assistant message ID exists; report missing or failed results honestly.
533
533
 
534
- Keep ordinary recommendations to supported features ready for users. Discuss an experiment honestly and label its status only when explicitly asked or when the user is developing or testing it.`,roleReminder:"You are the built-in Assistant. Help with app tasks using ws.app.* and current app guidance. Keep changes reviewable through proposal or confirmation cards, with cards last. Show workspaces as live cards; never use a workspace ID slug as a label. Use the discovered canonical route including its hash fragment. End the turn after registering an agent completion watch; on completion, link the returned assistant reply using its exact message ID."}],J=new Set(["pr-reviewer"]),Dr="developer";function Or(e){return b.find(t=>t.id===e)}function u(e){return e??""}function ot(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function G(e,t,r){if(e.source!=="user"||!r?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const s=t.find(i=>i.id===e.id)??b.find(i=>i.id===e.id);return s?u(e.name)===u(s.name)&&u(e.description)===u(s.description)&&u(e.behaviorPrompt)===u(s.defaultBehaviorPrompt)&&u(e.roleReminder)===u(s.roleReminder)&&u(e.reasoningEffort)===u(s.reasoningEffort)&&ot(e.modelOptions,s.modelOptions):!1}const xr=a.createSelector(e=>e.specialists.bundledSpecialists),ct=a.createSelector(e=>e.specialists.fileSpecialists),Fr=a.createSelector(e=>y(ct.select(e))),Nr=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const Lr=a.createSelector(e=>e.specialists.customSpecialistsLoaded),Ur=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),Vr=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),Wr=a.createSelector(e=>e.specialists.specialistsFolderPath),Hr=a.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});a.createSelector(e=>e.specialists.providerModelOverrides);const x=a.createSelector((e,t)=>!(J.has(t)&&!Z.select(e)));function lt(e,t){return t?e:e.filter(r=>!J.has(r.id))}function dt(e,t){return lt(e,t).filter(r=>!r.hidden)}function Br(e,t){return dt(e,t).filter(r=>r.role!=="internal")}const v=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(c=>({...c,defaultModel:c.model,defaultBehaviorPrompt:c.behaviorPrompt??c.prompt??"",defaultAgentType:c.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const c of r)!i.has(c.id)&&x.select(e,c.id)&&(i.add(c.id),o.push({id:c.id,name:c.name,description:c.description,codingAgent:c.codingAgent,defaultModel:c.model||void 0,defaultBehaviorPrompt:c.behaviorPrompt,roleReminder:c.roleReminder,source:c.source,importedFrom:c.importedFrom,unsupportedFields:c.unsupportedFields,requiredSkills:c.requiredSkills,missingSkills:c.missingSkills,hidden:c.hidden,resolvedModel:c.resolvedModel,resolvedProvider:c.resolvedProvider,modelOptions:c.modelOptions,reasoningEffort:c.reasoningEffort,role:c.role,teamAgents:c.teamAgents,icon:c.icon}));for(const c of s)!i.has(c.id)&&x.select(e,c.id)&&(i.add(c.id),o.push(c));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const c of b)!i.has(c.id)&&x.select(e,c.id)&&(i.add(c.id),o.push(c));const l=new Map;for(const c of b)l.has(c.id)||l.set(c.id,l.size);for(const c of s)l.has(c.id)||l.set(c.id,l.size);return o.sort((c,h)=>{const S=l.has(c.id),M=l.has(h.id);return S&&M?(l.get(c.id)??0)-(l.get(h.id)??0):S&&!M?-1:!S&&M?1:c.name.localeCompare(h.name)}),o}),qr=a.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...b.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),ut=a.createSelector((e,t)=>{const r=m(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=b.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),jr=a.createSelector((e,t)=>ut.select(e,t)?.name??null),Gr=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),zr=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),Yr=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Kr=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function C(e,t){return t.some(r=>r.id===e)||b.some(r=>r.id===e)}const Qr=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&C(t,e.specialists.bundledSpecialists)}return C(t,e.specialists.bundledSpecialists)}),$r=a.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!m(e.specialists.fileSpecialists,t)),Zr=a.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:C(t,e.specialists.bundledSpecialists)&&!G(o,e.specialists.bundledSpecialists)}if(!C(t,e.specialists.bundledSpecialists))return!1;const i=m(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!G(i,e.specialists.bundledSpecialists)}),H=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return m(e.specialists.fileSpecialists,t)}),Jr=a.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),Xr=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=m(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),es=a.createSelector((e,t,r)=>{if(r){const i=v.select(e,r).find(c=>c.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return we.select(e,o,r);const l=ye.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[l]?.available?l:""}const s=m(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:pt.select(e,t)}),pt=a.createSelector((e,t)=>{const s=v.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:Me.select(e)?Q.select(e):""}),ts=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),rs=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??de),ss=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),ft=["idle","exited"];function ht(e){return e===void 0||!ft.includes(e)}function is(e){return e.status==="restarting"?"restarting":ht(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function gt(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const as=a.createSelector(e=>e.voiceSettings.isLoading),ns=a.createSelector(e=>e.voiceSettings.available),os=a.createSelector(e=>e.voiceSettings.provider),cs=a.createSelector(e=>e.voiceSettings.engine),ls=a.createSelector(e=>e.voiceSettings.osEngineAvailable),ds=a.createSelector(e=>e.voiceSettings.keyConfigured),us=a.createSelector(e=>e.voiceSettings.vocabulary),ps=a.createSelector(e=>e.voiceSettings.openaiModel),fs=a.createSelector(e=>e.voiceSettings.language),hs=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),gs=a.createSelector(e=>e.voiceSettings.inputDeviceId),ms=a.createSelector(e=>e.voiceSettings.inputDevices),vs=a.createSelector(e=>e.voiceSettings.busyProvider),bs=a.createSelector(e=>e.voiceSettings.error),Ss=a.createSelector(e=>_e.select(e)?"unavailable":gt(e.voiceSettings)),L="intent.voice.inputDevice";let U;function mt(){if(U!==void 0)return U;try{const e=localStorage.getItem(L);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ws(e){U=e;try{e===null?localStorage.removeItem(L):localStorage.setItem(L,e)}catch{}}let T=null;function ys(e){T=e}function _s(){const e=T;return T=null,e}function vt(){T=null}const bt=300,St=300;class wt{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??bt,this.doublePressWindowMs=t.doublePressWindowMs??St,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let A=null;function ks(e){A=e}function Es(){const e=A;return A=null,e}function yt(){A=null}const _t=12e4,kt=["audio/webm;codecs=opus","audio/webm"];function Rs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Et(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Rt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return kt.find(e=>MediaRecorder.isTypeSupported(e))}class Ct{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??_t,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Et(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Rt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Tt=300;function At(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const It={stopReason:"manual",autoSend:!1};let p=null,g=null,w=0,k=null;const P=new wt({onRecordStart:()=>{k&&Pt(k)},onRecordStop:e=>{X(k,e)}});function Cs(){return p!==null}function Ts(){return p}function As(e){k=e,w+=1,w===1&&P.keyDown()}function Is(e){k=e,w!==0&&(w-=1,w===0&&P.keyUp())}function Pt(e){if(p!==null)return;yt(),vt();const t=new Ct({deviceId:mt(),onFinished:r=>{p===t&&(p=null);const s=g??{stopReason:"auto-stop",autoSend:!1},i=g!==null;if(g=null,e.dispatch(R()),i||P.reset(),r.durationMs<Tt){s.autoSend&&e.dispatch(N());return}e.dispatch(ue({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{p===t&&(p=null),g=null,e.dispatch(R()),e.showHint(At(r)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=t,e.dispatch(pe()),t.start().then(r=>{if(r!=="recording"&&(p===t&&(p=null),r==="discarded")){const s=g?.autoSend===!0;g=null,e.dispatch(R()),s&&e.dispatch(N())}})}function X(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(N());return}g=t,r.stop()}function Ps(){X(null,It)}function Ms(e){P.reset(),w=0,g=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(R()))}const Mt=V("HardwareConsoleVoiceSetupToast"),Dt="hardware-console-voice-setup";let F=null;function Ot(){return F||(F=le(()=>import("./BNe0FUML.js").then(e=>e.i),__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]),import.meta.url).then(e=>e.notify)),F}function xt(){Pe("/settings?tab=connections#voice").catch(e=>{Mt.error("Failed to open voice settings from setup toast",e)})}function Ft(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>xt()}}function Ds(){Ot().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:Dt,action:Ft()})})}const Os=a.createSelector(e=>e.externalEditors.selectedAction),Nt=a.createSelector(e=>e.externalEditors.editors),Lt=a.createSelector(e=>{const t=y(Nt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(l=>[l.id,l])),i=r.flatMap(l=>{const c=s.get(l);return c?[c]:[]}),o=new Set(r);return[...i,...t.filter(({id:l})=>!o.has(l))]}),xs=a.createSelector(e=>e.externalEditors.editorOrder??[]),Fs=a.createSelector(e=>e.externalEditors.loading),Ns=a.createSelector(e=>e.externalEditors.lastFetched),Ut=a.createSelector(e=>e.externalEditors.hiddenEditorIds),Ls=a.createSelector((e,t)=>{if(!(t?ke.select(e,t):Ee.select(e)))return[];const s=Ut.select(e);return Lt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function Vt(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function Us(e,t,r){if(Y(e)){const s=t.find(i=>i.providerRef===e);return s?.remoteCompatible!==!1?null:s.remoteIncompatibility??{reason:"unknown",keys:[]}}return r?.[e]??null}function Vs(e,t){return e.reason==="account-folder"?n.chat_modelPicker_remoteAccountFolder_description({backend:t}):n.chat_modelPicker_remoteIncompatible_description()}const Wt=1440*60*1e3;function Ws(e,t){if(!e?.capabilities)return"missing";const r=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(r)&&t-r>Wt?"stale":"fresh"}const Hs=new Set(["cli-missing","prerequisite-missing"]),Ht=new Set(["signed-out","auth-failed"]);function Bt(e){return Ht.has(e)}function Bs(e,t){if(Y(t))return!1;const r=fe(t),s=e?.capabilities?.providers.find(i=>i.id===r);return!!s&&Bt(s.status)}const qt={macos:"macOS",linux:"Linux",windows:"Windows"},jt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function E(e,t){const r=[e&&(qt[e]??e),t&&(jt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function Gt(e){return e?.placement?.target==="remote"}function qs(e,t){if(!e||!Gt(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null,i=E(e.placement?.os,e.placement?.arch)??E(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||n.remoteAgent_location_unknownMachine(),platform:i,state:o}}function js(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||n.remoteAgent_location_unknownMachine(),platform:E(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function Gs(e){const t=e.platform?n.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):n.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_unreachable_label()});case"revoked":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_revoked_label()});default:return t}}function zs(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"?"starting":null}const I="",zt=new Set(["connected","disconnected"]);function Yt(e){switch(e){case"unreachable":return n.remoteMachines_state_unreachable_label();case"revoked":return n.remoteMachines_state_revoked_label();case"update-required":return n.remoteMachines_state_updateRequired_label();default:return}}function B(e){return zt.has(e.state)}function Kt({backendLabel:e,backendPlatform:t,machines:r}){return[{id:I,label:e,platform:E(t?.os,t?.arch),disabled:!1},...r.map(s=>{const i=E(s.platform?.os,s.platform?.arch);return B(s)?{id:s.id,label:s.name,platform:i,disabled:!1}:{id:s.id,label:s.name,platform:i,disabled:!0,reason:Yt(s.state)}})]}function Qt({remoteMachinesVisible:e,supported:t,machines:r}){return e&&t&&r.some(B)}function $t(e,t){if(!e)return I;const r=t.find(s=>s.id===e);return r&&B(r)?r.id:I}function Ys(e){return e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Ks({groups:e,providerRef:t,model:r}){const s=l=>l.options.filter(c=>!c.disabled),i=e.find(l=>l.key===t),o=i?s(i):[];if(r){const l=he(r).modelId;if(o.some(c=>c.value===l))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const l of e){if(l.key==="default")continue;const c=s(l);if(c.length>0)return{providerId:l.key,modelId:c[0].value}}return null}const Zt=a.createSelector(e=>ze.select(e)&&e.remoteMachines?.supported===!0),q=a.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Qs=a.createSelector(e=>e.remoteMachines.localFingerprint),$s=a.createSelector(e=>e.remoteMachines.pending),Zs=a.createSelector(e=>e.remoteMachines.failures),Js=a.createSelector(e=>e.remoteMachines.executorBackends??[]),Jt=a.createSelector((e,t)=>{if(t===ge)return n.layout_daemonStatus_localConnection_label();const r=m(e.connections.connections,t);return r?De(r):t}),Xt=a.createSelector(e=>Jt.select(e,e.connections.windowBackendId)),Xs=a.createSelector((e,t)=>(t?e.remoteMachines.machines[t]:void 0)??null),ei=a.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return Vt({catalogProfiles:Ce.select(e,t),defaultRemoteIncompatibility:Re.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),ti=a.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ee=a.createSelector(e=>Qt({remoteMachinesVisible:Zt.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:q.select(e)}));function er(e){const t=m(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const ri=a.createSelector(e=>ee.select(e)?Kt({backendLabel:Xt.select(e),backendPlatform:er(e),machines:q.select(e)}):[]),si=a.createSelector((e,t)=>ee.select(e)?$t(t,q.select(e)):I);function ii(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let tr=0;function rr(e,t){const r=++tr;return a.dispatch(ve(e,t,r)),r}function ai(e,t,r){a.dispatch(me(e,t,r))}async function te(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(be({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:K.select(a.state)},{...s,intent:s?.intent??rr(e,t)}))).status==="success"}finally{a.dispatch(Se(i,o))}}async function ni(e,t,r,s,i){return te(e,t,{kind:"effort",effort:r,previous:s},i)}async function oi(e,t,r,s,i){return te(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const sr=a.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),ci=a.createSelector((e,t)=>sr.select(e,t).some(r=>r.status==="pending")),li=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Te.select(e,t),o=Oe.select(e,t),l=e.daemonHealth.stats?.protocolVersion,c=xe(l),h=c?Fe(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:c,identity:JSON.stringify([h,i]),connection:K.select(e),canWrite:!!s&&s.workspaceId===r&&!Ae.select(e,r)}});function ir(e,t,r=!1){return e!=="auggie"||t===!0||r}const di=a.createSelector(e=>Ne.select(e)?null:W.select(e)),ar=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),f=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),ui=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),pi=a.createSelector((e,t)=>!!f.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===ar.select(e)),re=a.createSelector((e,t)=>t?f.select(e,t)?.catalog.providers??[]:Ie.select(e)),se=a.createSelector((e,t)=>{if(!t)return Q.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),j=a.createSelector((e,t)=>{if(!t)return Le.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ie=a.createSelector((e,t)=>{if(!t)return Ue.select(e);const r=j.select(e,t),s=se.select(e,t),i=f.select(e,t)?.readiness??{};return re.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available&&(o.id!=="antigravity"||$(o.id,i[o.id]?.authenticated))).map(o=>o.id)}),fi=a.createSelector((e,t)=>{const r=j.select(e,t),s=t?f.select(e,t)?.readiness??{}:W.select(e);return re.select(e,t).filter(i=>ir(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),hi=a.createSelector((e,t)=>t?ie.select(e,t):Ve.select(e)),gi=a.createSelector((e,t)=>v.select(e,t)),mi=a.createSelector((e,t)=>t?!!f.select(e,t):We.select(e)),vi=a.createSelector((e,t)=>{if(!t)return He.select(e);const r=f.select(e,t)?.settings??[],s=se.select(e,t),i=r.find(c=>c.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const l=r.find(c=>c.path==="model.default")?.value;return typeof l=="string"?l:""}),bi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Be.select(e)),Si=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):qe.select(e)),wi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):je.select(e)),yi=a.createSelector((e,t,r)=>{if(!r)return Ge.select(e,t);const s=j.select(e,r),i=f.select(e,r);return ie.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(l=>l.id===o)?.canBeDisabled===!1)&&$(o,i?.readiness[o]?.authenticated))}),_i=a.createSelector((e,t)=>t?f.select(e,t)?.readiness??{}:W.select(e)),nr={},ki=a.createSelector(e=>e.providerSettings?.profiles?.status??nr),Ei=a.createSelector(e=>e.directoryPicker.listing),Ri=a.createSelector(e=>e.directoryPicker.loading),Ci=a.createSelector(e=>e.directoryPicker.error),Ti=a.createSelector(e=>e.directoryPicker.pathError),Ai=a.createSelector(e=>e.directoryPicker.createError),z={},or=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Ii=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Pi=a.createSelector(e=>e.mcpSettings.loading),Mi=a.createSelector(e=>e.mcpSettings.error),Di=a.createSelector(e=>e.mcpSettings.mutationError??null),Oi=a.createSelector(e=>e.mcpSettings.enabled),cr=a.createSelector(e=>e.mcpSettings.disabledServers),lr=a.createSelector(e=>e.mcpSettings.statusMap),dr=a.createSelector(e=>e.mcpSettings.toolsMap),ur=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,_(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),pr=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??z:z),xi=a.createSelector((e,t)=>Object.keys(pr.select(e,t))),Fi=a.createSelector(e=>{const t=or.select(e),r=lr.select(e),s=dr.select(e),i=cr.select(e),o=ur.select(e);return t.map(l=>{const c=_(l)in i,h=s[_(l)]||[];let S=r[_(l)]||"disconnected";return c&&(S="disabled"),{...l,disabled:c,status:S,tools:h,toolCount:h.length,errorMessage:o[_(l)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const Ni=a.createSelector(e=>e.mcpSettings.lastImportedCount),Li=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),Ui=a.createSelector(e=>e.mcpSettings.advancedSaveError),Vi=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],fr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],Wi=Object.fromEntries(fr.map(e=>[e.path,e.defaultValue]));export{xr as $,ii as A,G as B,Bs as C,Dr as D,Rs as E,fr as F,J as G,mt as H,js as I,Ks as J,E as K,Ws as L,Hs as M,rr as N,it as O,oi as P,ai as Q,Us as R,b as S,Vs as T,gt as U,$t as V,Ar as W,ws as X,ci as Y,sr as Z,li as _,Wi as a,Di as a$,Vr as a0,Jt as a1,hi as a2,se as a3,j as a4,fi as a5,ie as a6,re as a7,Si as a8,wi as a9,H as aA,Ke as aB,et as aC,tt as aD,Z as aE,Xe as aF,Qe as aG,Ye as aH,Ze as aI,Je as aJ,Zr as aK,Ut as aL,Lt as aM,Ls as aN,Fs as aO,Qr as aP,$r as aQ,Ns as aR,Qs as aS,Ui as aT,Li as aU,cr as aV,Oi as aW,Mi as aX,ur as aY,Ni as aZ,Pi as a_,bi as aa,yi as ab,_i as ac,mi as ad,vi as ae,gi as af,Xt as ag,Lr as ah,ti as ai,Hr as aj,Ai as ak,Ci as al,Ei as am,Ri as an,Ti as ao,xs as ap,Kr as aq,es as ar,Gr as as,si as at,Ss as au,Js as av,zr as aw,Yr as ax,Fr as ay,Ur as az,Vi as b,or as b0,Fi as b1,lr as b2,dr as b3,Os as b4,qr as b5,ki as b6,Xs as b7,Zs as b8,$s as b9,bs as bA,as as bB,us as bC,hs as bD,f as bE,ar as bF,pi as bG,ui as bH,xi as bI,Ii as bJ,ys as bK,ks as bL,Ds as bM,Pt as bN,Ps as bO,Ir as bP,Tr as bQ,Pr as bR,Cr as bS,Ft as bT,Er as bU,q as ba,Zt as bb,ei as bc,di as bd,ut as be,rs as bf,ss as bg,Xr as bh,ts as bi,jr as bj,Jr as bk,v as bl,Wr as bm,ri as bn,ee as bo,Nr as bp,vs as bq,cs as br,gs as bs,ms as bt,ds as bu,fs as bv,ps as bw,ls as bx,os as by,ns as bz,I as c,qs as d,Gs as e,zs as f,ni as g,Ms as h,vt as i,yt as j,_s as k,Es as l,Br as m,dt as n,lt as o,Ts as p,Mr as q,is as r,Or as s,Rr as t,As as u,Is as v,Ys as w,ht as x,ir as y,Cs as z};
534
+ Keep ordinary recommendations to supported features ready for users. Discuss an experiment honestly and label its status only when explicitly asked or when the user is developing or testing it.`,roleReminder:"You are the built-in Assistant. Help with app tasks using ws.app.* and current app guidance. Keep changes reviewable through proposal or confirmation cards, with cards last. Show workspaces as live cards; never use a workspace ID slug as a label. Use the discovered canonical route including its hash fragment. End the turn after registering an agent completion watch; on completion, link the returned assistant reply using its exact message ID."}],J=new Set(["pr-reviewer"]),Dr="developer";function Or(e){return b.find(t=>t.id===e)}function u(e){return e??""}function ot(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function G(e,t,r){if(e.source!=="user"||!r?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const s=t.find(i=>i.id===e.id)??b.find(i=>i.id===e.id);return s?u(e.name)===u(s.name)&&u(e.description)===u(s.description)&&u(e.behaviorPrompt)===u(s.defaultBehaviorPrompt)&&u(e.roleReminder)===u(s.roleReminder)&&u(e.reasoningEffort)===u(s.reasoningEffort)&&ot(e.modelOptions,s.modelOptions):!1}const xr=a.createSelector(e=>e.specialists.bundledSpecialists),ct=a.createSelector(e=>e.specialists.fileSpecialists),Fr=a.createSelector(e=>y(ct.select(e))),Nr=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const Lr=a.createSelector(e=>e.specialists.customSpecialistsLoaded),Ur=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),Vr=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),Wr=a.createSelector(e=>e.specialists.specialistsFolderPath),Hr=a.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});a.createSelector(e=>e.specialists.providerModelOverrides);const x=a.createSelector((e,t)=>!(J.has(t)&&!Z.select(e)));function lt(e,t){return t?e:e.filter(r=>!J.has(r.id))}function dt(e,t){return lt(e,t).filter(r=>!r.hidden)}function Br(e,t){return dt(e,t).filter(r=>r.role!=="internal")}const v=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(c=>({...c,defaultModel:c.model,defaultBehaviorPrompt:c.behaviorPrompt??c.prompt??"",defaultAgentType:c.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const c of r)!i.has(c.id)&&x.select(e,c.id)&&(i.add(c.id),o.push({id:c.id,name:c.name,description:c.description,codingAgent:c.codingAgent,defaultModel:c.model||void 0,defaultBehaviorPrompt:c.behaviorPrompt,roleReminder:c.roleReminder,source:c.source,importedFrom:c.importedFrom,unsupportedFields:c.unsupportedFields,requiredSkills:c.requiredSkills,missingSkills:c.missingSkills,hidden:c.hidden,resolvedModel:c.resolvedModel,resolvedProvider:c.resolvedProvider,modelOptions:c.modelOptions,reasoningEffort:c.reasoningEffort,role:c.role,teamAgents:c.teamAgents,icon:c.icon}));for(const c of s)!i.has(c.id)&&x.select(e,c.id)&&(i.add(c.id),o.push(c));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const c of b)!i.has(c.id)&&x.select(e,c.id)&&(i.add(c.id),o.push(c));const l=new Map;for(const c of b)l.has(c.id)||l.set(c.id,l.size);for(const c of s)l.has(c.id)||l.set(c.id,l.size);return o.sort((c,h)=>{const S=l.has(c.id),M=l.has(h.id);return S&&M?(l.get(c.id)??0)-(l.get(h.id)??0):S&&!M?-1:!S&&M?1:c.name.localeCompare(h.name)}),o}),qr=a.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...b.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),ut=a.createSelector((e,t)=>{const r=m(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=b.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),jr=a.createSelector((e,t)=>ut.select(e,t)?.name??null),Gr=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),zr=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),Yr=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Kr=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function C(e,t){return t.some(r=>r.id===e)||b.some(r=>r.id===e)}const Qr=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&C(t,e.specialists.bundledSpecialists)}return C(t,e.specialists.bundledSpecialists)}),$r=a.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!m(e.specialists.fileSpecialists,t)),Zr=a.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:C(t,e.specialists.bundledSpecialists)&&!G(o,e.specialists.bundledSpecialists)}if(!C(t,e.specialists.bundledSpecialists))return!1;const i=m(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!G(i,e.specialists.bundledSpecialists)}),H=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return m(e.specialists.fileSpecialists,t)}),Jr=a.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),Xr=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=m(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),es=a.createSelector((e,t,r)=>{if(r){const i=v.select(e,r).find(c=>c.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return we.select(e,o,r);const l=ye.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[l]?.available?l:""}const s=m(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:pt.select(e,t)}),pt=a.createSelector((e,t)=>{const s=v.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:Me.select(e)?Q.select(e):""}),ts=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),rs=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??de),ss=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),ft=["idle","exited"];function ht(e){return e===void 0||!ft.includes(e)}function is(e){return e.status==="restarting"?"restarting":ht(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function gt(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const as=a.createSelector(e=>e.voiceSettings.isLoading),ns=a.createSelector(e=>e.voiceSettings.available),os=a.createSelector(e=>e.voiceSettings.provider),cs=a.createSelector(e=>e.voiceSettings.engine),ls=a.createSelector(e=>e.voiceSettings.osEngineAvailable),ds=a.createSelector(e=>e.voiceSettings.keyConfigured),us=a.createSelector(e=>e.voiceSettings.vocabulary),ps=a.createSelector(e=>e.voiceSettings.openaiModel),fs=a.createSelector(e=>e.voiceSettings.language),hs=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),gs=a.createSelector(e=>e.voiceSettings.inputDeviceId),ms=a.createSelector(e=>e.voiceSettings.inputDevices),vs=a.createSelector(e=>e.voiceSettings.busyProvider),bs=a.createSelector(e=>e.voiceSettings.error),Ss=a.createSelector(e=>_e.select(e)?"unavailable":gt(e.voiceSettings)),L="intent.voice.inputDevice";let U;function mt(){if(U!==void 0)return U;try{const e=localStorage.getItem(L);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ws(e){U=e;try{e===null?localStorage.removeItem(L):localStorage.setItem(L,e)}catch{}}let T=null;function ys(e){T=e}function _s(){const e=T;return T=null,e}function vt(){T=null}const bt=300,St=300;class wt{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??bt,this.doublePressWindowMs=t.doublePressWindowMs??St,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let A=null;function ks(e){A=e}function Es(){const e=A;return A=null,e}function yt(){A=null}const _t=12e4,kt=["audio/webm;codecs=opus","audio/webm"];function Rs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Et(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Rt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return kt.find(e=>MediaRecorder.isTypeSupported(e))}class Ct{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??_t,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Et(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Rt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Tt=300;function At(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const It={stopReason:"manual",autoSend:!1};let p=null,g=null,w=0,k=null;const P=new wt({onRecordStart:()=>{k&&Pt(k)},onRecordStop:e=>{X(k,e)}});function Cs(){return p!==null}function Ts(){return p}function As(e){k=e,w+=1,w===1&&P.keyDown()}function Is(e){k=e,w!==0&&(w-=1,w===0&&P.keyUp())}function Pt(e){if(p!==null)return;yt(),vt();const t=new Ct({deviceId:mt(),onFinished:r=>{p===t&&(p=null);const s=g??{stopReason:"auto-stop",autoSend:!1},i=g!==null;if(g=null,e.dispatch(R()),i||P.reset(),r.durationMs<Tt){s.autoSend&&e.dispatch(N());return}e.dispatch(ue({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{p===t&&(p=null),g=null,e.dispatch(R()),e.showHint(At(r)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=t,e.dispatch(pe()),t.start().then(r=>{if(r!=="recording"&&(p===t&&(p=null),r==="discarded")){const s=g?.autoSend===!0;g=null,e.dispatch(R()),s&&e.dispatch(N())}})}function X(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(N());return}g=t,r.stop()}function Ps(){X(null,It)}function Ms(e){P.reset(),w=0,g=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(R()))}const Mt=V("HardwareConsoleVoiceSetupToast"),Dt="hardware-console-voice-setup";let F=null;function Ot(){return F||(F=le(()=>import("./CQTIadOp.js").then(e=>e.i),__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]),import.meta.url).then(e=>e.notify)),F}function xt(){Pe("/settings?tab=connections#voice").catch(e=>{Mt.error("Failed to open voice settings from setup toast",e)})}function Ft(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>xt()}}function Ds(){Ot().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:Dt,action:Ft()})})}const Os=a.createSelector(e=>e.externalEditors.selectedAction),Nt=a.createSelector(e=>e.externalEditors.editors),Lt=a.createSelector(e=>{const t=y(Nt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(l=>[l.id,l])),i=r.flatMap(l=>{const c=s.get(l);return c?[c]:[]}),o=new Set(r);return[...i,...t.filter(({id:l})=>!o.has(l))]}),xs=a.createSelector(e=>e.externalEditors.editorOrder??[]),Fs=a.createSelector(e=>e.externalEditors.loading),Ns=a.createSelector(e=>e.externalEditors.lastFetched),Ut=a.createSelector(e=>e.externalEditors.hiddenEditorIds),Ls=a.createSelector((e,t)=>{if(!(t?ke.select(e,t):Ee.select(e)))return[];const s=Ut.select(e);return Lt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function Vt(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function Us(e,t,r){if(Y(e)){const s=t.find(i=>i.providerRef===e);return s?.remoteCompatible!==!1?null:s.remoteIncompatibility??{reason:"unknown",keys:[]}}return r?.[e]??null}function Vs(e,t){return e.reason==="account-folder"?n.chat_modelPicker_remoteAccountFolder_description({backend:t}):n.chat_modelPicker_remoteIncompatible_description()}const Wt=1440*60*1e3;function Ws(e,t){if(!e?.capabilities)return"missing";const r=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(r)&&t-r>Wt?"stale":"fresh"}const Hs=new Set(["cli-missing","prerequisite-missing"]),Ht=new Set(["signed-out","auth-failed"]);function Bt(e){return Ht.has(e)}function Bs(e,t){if(Y(t))return!1;const r=fe(t),s=e?.capabilities?.providers.find(i=>i.id===r);return!!s&&Bt(s.status)}const qt={macos:"macOS",linux:"Linux",windows:"Windows"},jt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function E(e,t){const r=[e&&(qt[e]??e),t&&(jt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function Gt(e){return e?.placement?.target==="remote"}function qs(e,t){if(!e||!Gt(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null,i=E(e.placement?.os,e.placement?.arch)??E(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||n.remoteAgent_location_unknownMachine(),platform:i,state:o}}function js(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||n.remoteAgent_location_unknownMachine(),platform:E(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function Gs(e){const t=e.platform?n.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):n.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_unreachable_label()});case"revoked":return n.remoteAgent_location_tooltipWithState({location:t,state:n.remoteMachines_state_revoked_label()});default:return t}}function zs(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"?"starting":null}const I="",zt=new Set(["connected","disconnected"]);function Yt(e){switch(e){case"unreachable":return n.remoteMachines_state_unreachable_label();case"revoked":return n.remoteMachines_state_revoked_label();case"update-required":return n.remoteMachines_state_updateRequired_label();default:return}}function B(e){return zt.has(e.state)}function Kt({backendLabel:e,backendPlatform:t,machines:r}){return[{id:I,label:e,platform:E(t?.os,t?.arch),disabled:!1},...r.map(s=>{const i=E(s.platform?.os,s.platform?.arch);return B(s)?{id:s.id,label:s.name,platform:i,disabled:!1}:{id:s.id,label:s.name,platform:i,disabled:!0,reason:Yt(s.state)}})]}function Qt({remoteMachinesVisible:e,supported:t,machines:r}){return e&&t&&r.some(B)}function $t(e,t){if(!e)return I;const r=t.find(s=>s.id===e);return r&&B(r)?r.id:I}function Ys(e){return e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Ks({groups:e,providerRef:t,model:r}){const s=l=>l.options.filter(c=>!c.disabled),i=e.find(l=>l.key===t),o=i?s(i):[];if(r){const l=he(r).modelId;if(o.some(c=>c.value===l))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const l of e){if(l.key==="default")continue;const c=s(l);if(c.length>0)return{providerId:l.key,modelId:c[0].value}}return null}const Zt=a.createSelector(e=>ze.select(e)&&e.remoteMachines?.supported===!0),q=a.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Qs=a.createSelector(e=>e.remoteMachines.localFingerprint),$s=a.createSelector(e=>e.remoteMachines.pending),Zs=a.createSelector(e=>e.remoteMachines.failures),Js=a.createSelector(e=>e.remoteMachines.executorBackends??[]),Jt=a.createSelector((e,t)=>{if(t===ge)return n.layout_daemonStatus_localConnection_label();const r=m(e.connections.connections,t);return r?De(r):t}),Xt=a.createSelector(e=>Jt.select(e,e.connections.windowBackendId)),Xs=a.createSelector((e,t)=>(t?e.remoteMachines.machines[t]:void 0)??null),ei=a.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return Vt({catalogProfiles:Ce.select(e,t),defaultRemoteIncompatibility:Re.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),ti=a.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ee=a.createSelector(e=>Qt({remoteMachinesVisible:Zt.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:q.select(e)}));function er(e){const t=m(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const ri=a.createSelector(e=>ee.select(e)?Kt({backendLabel:Xt.select(e),backendPlatform:er(e),machines:q.select(e)}):[]),si=a.createSelector((e,t)=>ee.select(e)?$t(t,q.select(e)):I);function ii(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let tr=0;function rr(e,t){const r=++tr;return a.dispatch(ve(e,t,r)),r}function ai(e,t,r){a.dispatch(me(e,t,r))}async function te(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(be({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:K.select(a.state)},{...s,intent:s?.intent??rr(e,t)}))).status==="success"}finally{a.dispatch(Se(i,o))}}async function ni(e,t,r,s,i){return te(e,t,{kind:"effort",effort:r,previous:s},i)}async function oi(e,t,r,s,i){return te(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const sr=a.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),ci=a.createSelector((e,t)=>sr.select(e,t).some(r=>r.status==="pending")),li=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Te.select(e,t),o=Oe.select(e,t),l=e.daemonHealth.stats?.protocolVersion,c=xe(l),h=c?Fe(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:c,identity:JSON.stringify([h,i]),connection:K.select(e),canWrite:!!s&&s.workspaceId===r&&!Ae.select(e,r)}});function ir(e,t,r=!1){return e!=="auggie"||t===!0||r}const di=a.createSelector(e=>Ne.select(e)?null:W.select(e)),ar=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),f=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),ui=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),pi=a.createSelector((e,t)=>!!f.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===ar.select(e)),re=a.createSelector((e,t)=>t?f.select(e,t)?.catalog.providers??[]:Ie.select(e)),se=a.createSelector((e,t)=>{if(!t)return Q.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),j=a.createSelector((e,t)=>{if(!t)return Le.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ie=a.createSelector((e,t)=>{if(!t)return Ue.select(e);const r=j.select(e,t),s=se.select(e,t),i=f.select(e,t)?.readiness??{};return re.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available&&(o.id!=="antigravity"||$(o.id,i[o.id]?.authenticated))).map(o=>o.id)}),fi=a.createSelector((e,t)=>{const r=j.select(e,t),s=t?f.select(e,t)?.readiness??{}:W.select(e);return re.select(e,t).filter(i=>ir(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),hi=a.createSelector((e,t)=>t?ie.select(e,t):Ve.select(e)),gi=a.createSelector((e,t)=>v.select(e,t)),mi=a.createSelector((e,t)=>t?!!f.select(e,t):We.select(e)),vi=a.createSelector((e,t)=>{if(!t)return He.select(e);const r=f.select(e,t)?.settings??[],s=se.select(e,t),i=r.find(c=>c.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const l=r.find(c=>c.path==="model.default")?.value;return typeof l=="string"?l:""}),bi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Be.select(e)),Si=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):qe.select(e)),wi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):je.select(e)),yi=a.createSelector((e,t,r)=>{if(!r)return Ge.select(e,t);const s=j.select(e,r),i=f.select(e,r);return ie.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(l=>l.id===o)?.canBeDisabled===!1)&&$(o,i?.readiness[o]?.authenticated))}),_i=a.createSelector((e,t)=>t?f.select(e,t)?.readiness??{}:W.select(e)),nr={},ki=a.createSelector(e=>e.providerSettings?.profiles?.status??nr),Ei=a.createSelector(e=>e.directoryPicker.listing),Ri=a.createSelector(e=>e.directoryPicker.loading),Ci=a.createSelector(e=>e.directoryPicker.error),Ti=a.createSelector(e=>e.directoryPicker.pathError),Ai=a.createSelector(e=>e.directoryPicker.createError),z={},or=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Ii=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Pi=a.createSelector(e=>e.mcpSettings.loading),Mi=a.createSelector(e=>e.mcpSettings.error),Di=a.createSelector(e=>e.mcpSettings.mutationError??null),Oi=a.createSelector(e=>e.mcpSettings.enabled),cr=a.createSelector(e=>e.mcpSettings.disabledServers),lr=a.createSelector(e=>e.mcpSettings.statusMap),dr=a.createSelector(e=>e.mcpSettings.toolsMap),ur=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,_(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),pr=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??z:z),xi=a.createSelector((e,t)=>Object.keys(pr.select(e,t))),Fi=a.createSelector(e=>{const t=or.select(e),r=lr.select(e),s=dr.select(e),i=cr.select(e),o=ur.select(e);return t.map(l=>{const c=_(l)in i,h=s[_(l)]||[];let S=r[_(l)]||"disconnected";return c&&(S="disabled"),{...l,disabled:c,status:S,tools:h,toolCount:h.length,errorMessage:o[_(l)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const Ni=a.createSelector(e=>e.mcpSettings.lastImportedCount),Li=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),Ui=a.createSelector(e=>e.mcpSettings.advancedSaveError),Vi=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],fr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],Wi=Object.fromEntries(fr.map(e=>[e.path,e.defaultValue]));export{xr as $,ii as A,G as B,Bs as C,Dr as D,Rs as E,fr as F,J as G,mt as H,js as I,Ks as J,E as K,Ws as L,Hs as M,rr as N,it as O,oi as P,ai as Q,Us as R,b as S,Vs as T,gt as U,$t as V,Ar as W,ws as X,ci as Y,sr as Z,li as _,Wi as a,Di as a$,Vr as a0,Jt as a1,hi as a2,se as a3,j as a4,fi as a5,ie as a6,re as a7,Si as a8,wi as a9,H as aA,Ke as aB,et as aC,tt as aD,Z as aE,Xe as aF,Qe as aG,Ye as aH,Ze as aI,Je as aJ,Zr as aK,Ut as aL,Lt as aM,Ls as aN,Fs as aO,Qr as aP,$r as aQ,Ns as aR,Qs as aS,Ui as aT,Li as aU,cr as aV,Oi as aW,Mi as aX,ur as aY,Ni as aZ,Pi as a_,bi as aa,yi as ab,_i as ac,mi as ad,vi as ae,gi as af,Xt as ag,Lr as ah,ti as ai,Hr as aj,Ai as ak,Ci as al,Ei as am,Ri as an,Ti as ao,xs as ap,Kr as aq,es as ar,Gr as as,si as at,Ss as au,Js as av,zr as aw,Yr as ax,Fr as ay,Ur as az,Vi as b,or as b0,Fi as b1,lr as b2,dr as b3,Os as b4,qr as b5,ki as b6,Xs as b7,Zs as b8,$s as b9,bs as bA,as as bB,us as bC,hs as bD,f as bE,ar as bF,pi as bG,ui as bH,xi as bI,Ii as bJ,ys as bK,ks as bL,Ds as bM,Pt as bN,Ps as bO,Ir as bP,Tr as bQ,Pr as bR,Cr as bS,Ft as bT,Er as bU,q as ba,Zt as bb,ei as bc,di as bd,ut as be,rs as bf,ss as bg,Xr as bh,ts as bi,jr as bj,Jr as bk,v as bl,Wr as bm,ri as bn,ee as bo,Nr as bp,vs as bq,cs as br,gs as bs,ms as bt,ds as bu,fs as bv,ps as bw,ls as bx,os as by,ns as bz,I as c,qs as d,Gs as e,zs as f,ni as g,Ms as h,vt as i,yt as j,_s as k,Es as l,Br as m,dt as n,lt as o,Ts as p,Mr as q,is as r,Or as s,Rr as t,As as u,Is as v,Ys as w,ht as x,ir as y,Cs as z};
@@ -1 +1 @@
1
- import{G2 as S,zm as o,aJ as d,aK as l,aL as a}from"./X8KOCQId.js";import{i as x,c}from"./CMiilI_P.js";import{w as f}from"./DGTcJSfI.js";const C=t=>{if(typeof window>"u")return;const e=window;e.intent?.reduxContext&&(e.intent.reduxContext===t&&(e.intent.reduxContext=void 0),Array.isArray(e.intent.reduxContext)&&(e.intent.reduxContext=e.intent.reduxContext.filter(i=>i!==t)))},p=t=>{if(typeof window>"u")return;const e=window;if(e.intent=e.intent||{},e.intent.reduxContext===t)console.log("Context is exposed already");else if(!e.intent.reduxContext)e.intent.reduxContext=t;else{const n=[];e.intent.reduxContext=n.concat(e.intent.reduxContext).concat(t),e.isStorybook?console.log("Multiple Redux stores initialized:",e.intent.reduxContext):console.error("Multiple Redux stores initialized:",e.intent.reduxContext)}e.intent.debug||(e.intent.debug={});const i=n=>{if(n==="true")return!0;if(n==="false")return!1},r=n=>{const g=i(o.getItem(n))??!1;o.setItem(n,String(!g))},u=n=>{o.getItem(n)?o.removeItem(n):o.setItem(n,"true")},s=()=>{console.log("Redux logging preference updated. Reload to take effect.")};e.intent.enableReduxLogging=()=>{o.setItem(d,"true"),s()},e.intent.disableReduxLogging=()=>{o.setItem(d,"false"),s()},e.intent.debug.toggleReduxLogs=()=>{r(d),s()},e.intent.debug.toggleStateReferenceChecks=()=>{u(l)},e.intent.debug.toggleStructuredCloneChecks=()=>{u(a)}},_=(t,e)=>{const i=t.init(f(e)),r={store:t,dispose:()=>{C(r);try{i()}finally{c(t)}}};return p(r),x(t),r};export{_ as initAppStore,S as store};
1
+ import{G2 as S,zm as o,aJ as d,aK as l,aL as a}from"./C51KzdSG.js";import{i as x,c}from"./CMiilI_P.js";import{w as f}from"./B4VDa7RO.js";const C=t=>{if(typeof window>"u")return;const e=window;e.intent?.reduxContext&&(e.intent.reduxContext===t&&(e.intent.reduxContext=void 0),Array.isArray(e.intent.reduxContext)&&(e.intent.reduxContext=e.intent.reduxContext.filter(i=>i!==t)))},p=t=>{if(typeof window>"u")return;const e=window;if(e.intent=e.intent||{},e.intent.reduxContext===t)console.log("Context is exposed already");else if(!e.intent.reduxContext)e.intent.reduxContext=t;else{const n=[];e.intent.reduxContext=n.concat(e.intent.reduxContext).concat(t),e.isStorybook?console.log("Multiple Redux stores initialized:",e.intent.reduxContext):console.error("Multiple Redux stores initialized:",e.intent.reduxContext)}e.intent.debug||(e.intent.debug={});const i=n=>{if(n==="true")return!0;if(n==="false")return!1},r=n=>{const g=i(o.getItem(n))??!1;o.setItem(n,String(!g))},u=n=>{o.getItem(n)?o.removeItem(n):o.setItem(n,"true")},s=()=>{console.log("Redux logging preference updated. Reload to take effect.")};e.intent.enableReduxLogging=()=>{o.setItem(d,"true"),s()},e.intent.disableReduxLogging=()=>{o.setItem(d,"false"),s()},e.intent.debug.toggleReduxLogs=()=>{r(d),s()},e.intent.debug.toggleStateReferenceChecks=()=>{u(l)},e.intent.debug.toggleStructuredCloneChecks=()=>{u(a)}},_=(t,e)=>{const i=t.init(f(e)),r={store:t,dispose:()=>{C(r);try{i()}finally{c(t)}}};return p(r),x(t),r};export{_ as initAppStore,S as store};
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BNe0FUML.js","/app/immutable/chunks/oEdBdTuH.js","/app/immutable/chunks/DEI12D8u.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/KLMKvNSD.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CBY4R5Io.js","/app/immutable/chunks/BAR22MDD.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/DWsGxz2C.js","/app/immutable/chunks/OtBI4VRo.js","/app/immutable/chunks/Bh14bdXE.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BycWLeDe.js","/app/immutable/chunks/CiJsLr2J.js","/app/immutable/chunks/X8KOCQId.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/BxuhDHqB.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css","/app/immutable/chunks/CqnYcuvr.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/DGTcJSfI.js","/app/immutable/chunks/DJISFfnZ.js","/app/immutable/chunks/BTxRR5tz.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/DvIWu0bM.js","/app/immutable/chunks/DypB-Dwi.js"])))=>i.map(i=>d[i]);
2
- import{z as te,N as ne,x as se,dz as x,cC as I,dj as re,ak as oe,a_ as N,y as ae,dK as ie}from"./uzVhgdYt.js";import{_ as C,bo as S}from"./DEI12D8u.js";import{tQ as ue,zn as V,mu as f,tS as ce,AA as F,G2 as c,cq as le,cr as de,mv as W,mh as fe,c as $,fr as me,g as pe,kM as ge,cx as he}from"./X8KOCQId.js";import{bI as Se}from"./Bk1uVK5j.js";import{x as ye,J as be,ag as Ae,ao as Me}from"./D3s69DNC.js";import{a as H}from"./DypB-Dwi.js";import{s as we}from"./BplvCBzc.js";import{bx as _e}from"./CBY4R5Io.js";import{C as ve}from"./BTxRR5tz.js";import{q as Ie,v as Ce}from"./BycWLeDe.js";import{a as Te}from"./kc3pShLm.js";function Re(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function yt(e,t){return e.targetAgentId===t}function bt(e){const t=e.element,n=e.viewport,s=Re(e),r=t?`<${t.tagName.toLowerCase()}> · ${s}`:e.title||s,o=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CQTIadOp.js","/app/immutable/chunks/BjO6mATN.js","/app/immutable/chunks/D4MoKNoK.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/WVYGrHqE.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DgFojmqv.js","/app/immutable/chunks/WZHg24tN.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/BPQohPc9.js","/app/immutable/chunks/HfuFYz2u.js","/app/immutable/chunks/D0pR1-a6.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/C8yAGnZY.js","/app/immutable/chunks/De4WWpS0.js","/app/immutable/chunks/C51KzdSG.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CG5J-qd_.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.CaX-6yIe.css","/app/immutable/chunks/1rwbAxiY.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B4VDa7RO.js","/app/immutable/chunks/Sk9pLJI5.js","/app/immutable/chunks/CVBBsS8i.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/DzMB8eQW.js","/app/immutable/chunks/DypB-Dwi.js"])))=>i.map(i=>d[i]);
2
+ import{z as te,N as ne,x as se,dz as x,cC as I,dj as re,ak as oe,a_ as N,y as ae,dK as ie}from"./dimBDqRX.js";import{_ as C,bo as S}from"./D4MoKNoK.js";import{tQ as ue,zn as V,mu as f,tS as ce,AA as F,G2 as c,cq as le,cr as de,mv as W,mh as fe,c as $,fr as me,g as pe,kM as ge,cx as he}from"./C51KzdSG.js";import{bI as Se}from"./t61BPD62.js";import{x as ye,J as be,ag as Ae,ao as Me}from"./D7P2CXpO.js";import{a as H}from"./DypB-Dwi.js";import{s as we}from"./C_fEvnNK.js";import{bx as _e}from"./DgFojmqv.js";import{C as ve}from"./CVBBsS8i.js";import{q as Ie,v as Ce}from"./C8yAGnZY.js";import{a as Te}from"./DBmzovBA.js";function Re(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function yt(e,t){return e.targetAgentId===t}function bt(e){const t=e.element,n=e.viewport,s=Re(e),r=t?`<${t.tagName.toLowerCase()}> · ${s}`:e.title||s,o=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
3
3
  `);return[{id:`${e.id}-image`,type:"file",label:r,imageData:e.image.data,imageMimeType:e.image.mimeType},{id:`${e.id}-context`,type:"selection",label:r,content:o}]}function $e(e,t){const n=t.filter(s=>s.type==="selection").flatMap(s=>s.content?.trim()?[s.content.trim()]:[]);return[e.trim(),...n].filter(Boolean).join(`
4
4
  `)}function At(e){const t=e.filter(s=>(s.imageData||s.attachmentId)&&s.imageMimeType).map(s=>s.attachmentId?{type:"image",attachmentId:s.attachmentId,...s.imageMimeType.includes("/")?{mimeType:s.imageMimeType}:{}}:{type:"image",data:s.imageData,mimeType:s.imageMimeType,...s.placementFileName?{placementFileName:s.placementFileName}:{}}),n=e.filter(s=>s.attachmentId&&!s.imageMimeType).map(s=>({type:"file",attachmentId:s.attachmentId,fileName:s.label,...s.attachmentMimeType?{mimeType:s.attachmentMimeType}:{},...s.attachmentSize!==void 0?{size:s.attachmentSize}:{}}));return{imageBlocks:t,fileBlocks:n}}function Mt(e=[],t=[],n=[]){const s=[];for(const r of t)r.type==="file"&&r.filePath?s.push(`[Currently viewing file: ${r.filePath}]`):r.type==="diff"&&r.filePath?s.push(`[Currently viewing diff for: ${r.filePath}]`):r.type==="note"&&r.noteId?s.push(`[Currently viewing note: "${r.label}" (ID: ${r.noteId}). Read it with ws.note.read("${r.noteId}").]`):r.type==="spec"?s.push("[Currently viewing: Spec]"):r.type==="browser"&&r.browserUrl&&s.push(`[Currently viewing browser: ${r.browserUrl}]`);for(const r of n){const o=r.text.trim(),a=o.length>500?o.substring(0,500)+"...":o,i=r.sourceLabel?` from ${r.sourceLabel}`:"";s.push(`[Selected text${i}:
5
5
  \`\`\`
6
6
  ${a}
7
7
  \`\`\`]`)}return $e(s.join(`
8
- `),e)}function wt(e,t){if(e)return e.model}function Ee({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function _t({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s=0}){return!(e?te(e):!1)&&!Ee({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s})}function vt(e){return ne(e.messageMetadata)}function It(e,t){const n=new Set;for(const s of t){const r=se(s.metadata);r&&n.add(r)}return n.size===0?[...e]:e.filter(s=>!n.has(s.id))}function Le(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Ct(e){return Le({...e,createdAt:Date.parse(e.queuedAt)})}const ke="chat-read:",y=new Map,T=new Set;function Tt(e,t){let n=y.get(e);n||(n=new Set,y.set(e,n)),n.add(t)}function Rt(e,t){const n=y.get(e);if(!(!n||!n.delete(t))&&n.size===0){y.delete(e);for(const s of[...T])s(e)}}function $t(e){return T.add(e),()=>T.delete(e)}function Et(e){return y.has(e)}function Lt(e){const t=y.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(ke))return!0;return!1}function Pe(e,t,n){const s=e.state.pendingSubmissions.byAgentId[t.agentId];if(!s||!V(s.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(ce(t,r));const o=e.state.pendingSubmissions.byAgentId[t.agentId];return o&&f(o.submissions,r.id)?r:null}function De(e,t,n,s,r){const o=x.select(e.state,n),a=I.select(e.state)?.principal.id,i=H(e.state);if(!o||!a||!i)return null;const u=ye(t,n),l={agentId:t,workspaceId:n,principalId:a,participation:o,authority:i,owner:u.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},m=()=>u.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&x.select(e.state,n)===o&&I.select(e.state)?.principal.id===a&&H(e.state)===i;if(!m())return null;e.dispatch(ue(l,s,re.select(e.state,n)));const d=Pe(e,l,r);return d?{scope:l,submission:d,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return m()&&!!h&&V(h.scope,l)&&(!!f(h.operations,d.id)||!!f(h.submissions,d.id))}}:null}function R(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const s=n.userAppMessageId??be();return De(e,t,n.wsId,I.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:s,destination:!n.forceSubmit&&oe.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function xe(e,t,n){const s=R(e,t,n);return s?(e.dispatch(F(t,{...n,userAppMessageId:s.submission.appMessageId,submission:{scope:s.scope,id:s.submission.id}})),!0):!1}async function He(e,t,n,s){const r=n.submission;if(!r)return"legacy";const o=r.reference,a=()=>o.scope.agentId===e&&o.scope.workspaceId===t&&N.select(c.state,e)===n?Se.select(c.state,o.scope):void 0,i=a();if(!i)return null;if(!i.supported)return"legacy";const u={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:s??n.options?.model};if(r.outcome==="rejected"){const p=f(i.tombstones,o.id);return f(i.submissions,o.id)||p&&p.reason!=="rejected"?null:R(c,e,u)}if(r.outcome==="accepted")return R(c,e,u);await Promise.all([Ae(e,t).catch(()=>{}),Me(e,t).catch(()=>{})]);const l=a();if(!l||f(l.submissions,o.id)?.status!=="uncertain")return null;const{notify:m}=await C(async()=>{const{notify:p}=await import("./BNe0FUML.js").then(ee=>ee.i);return{notify:p}},__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]),import.meta.url);if(a()!==l)return null;let d=!1;const h=()=>{d=!0};return m.warning(S.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${o.id}`,duration:Number.POSITIVE_INFINITY,action:{label:S.agent_chatSend_resend_label(),onClick:()=>{if(d)return;d=!0;const p=a();!p||p.generation!==l.generation||p.submissions!==l.submissions||p.observationVersion!==l.observationVersion||f(p.submissions,o.id)?.status!=="uncertain"||xe(c,e,u)}},cancel:{label:S.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function kt(e,t,n){const s=N.select(c.state,e),r=s?.submission?await He(e,t,s,n):"legacy";if(r){if(r==="legacy"){await c.dispatch(n===void 0?le(e,t):de(e,t,n));return}!r.isCurrent()||!s||c.dispatch(F(e,{wsId:t,text:s.text,imageBlocks:s.options?.imageBlocks,fileBlocks:s.options?.fileBlocks,noteIds:s.options?.noteIds,messageMetadata:s.options?.messageMetadata,model:n??s.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Pt=c.createSelector((e,t)=>{const n=f(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:W(n.saves)}:void 0});function Oe(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==$.Deleted&&!t.notificationsMuted&&me(t)==="topLevel"}function Be(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!we(e.metadata,t)?t:null}function Ue(e){return e.status===$.Error&&!ae(ie(e))}function Dt(e,t){return t.filter(n=>Oe(e,n)).flatMap(n=>{const s=fe(n),r=Be(n),o=n.status===$.Error;if(!s&&!r&&!o)return[];const a=s?.timestamp??(o?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:s?.kind??(o?"failed":"question"),reason:s?.reason,timestamp:a&&Number.isFinite(Date.parse(a))?a:void 0,questionMessageId:r,canRetry:Ue(n)}]})}function xt(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.displayStatus==="pr_ready"?"pr_ready":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ht(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function E(e){const t=_e(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),s=t.repo.toLowerCase();return{owner:n,repo:s,number:t.number,id:`${n}/${s}#${t.number}`,url:`https://github.com/${n}/${s}/pull/${t.number}`}}function Ot(e,t,n,s){const r=e.filter(o=>s?s.includes(o.id):n?o.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(a=>a.owner?.toLowerCase()===o.repositoryOwner?.toLowerCase()&&a.name.toLowerCase()===o.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(o=>[...(o.pullRequests??[]).map(a=>a.url),o.activePullRequest?.url,o.prUrl]).flatMap(o=>{const a=o?E(o):null;return a?[[a.id,{owner:a.owner,repo:a.repo,number:a.number}]]:[]})).values()].sort((o,a)=>`${o.owner}/${o.repo}#${o.number}`.localeCompare(`${a.owner}/${a.repo}#${a.number}`))}function Bt(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Ut=c.createSelector(e=>e.homeIntegrations),Nt=c.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,s)=>(s.updatedAt??"").localeCompare(n.updatedAt??""))}}),q=c.createSelector(e=>W(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:E(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Vt=c.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?E(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return q.select(e).find(s=>s.url===n)??null}),Ft=c.createSelector(e=>q.select(e).map(t=>t.url));function Wt(e){return Ce(e)}function Ne(e){return Ie(e)}function Ve(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function w(e){if(e.length===0)return[];const t=[];let n=null;for(const s of e){const r=s.timestamp?typeof s.timestamp=="string"?new Date(s.timestamp):s.timestamp:new Date;(!n||!Ve(n.date,r))&&(n={date:r,label:Ne(r),messages:[]},t.push(n)),n.messages.push(s)}return t}function qt(e){const t=new Map;return e.map(({date:n})=>{const s=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(s)??0;return t.set(s,r+1),r===0?s:`${s}#${r}`})}function Gt(e,t){const n=new Map;let s=t?null:void 0;for(const[r,o]of e.groups.entries()){r===e.gapBeforeGroupIndex&&(s=void 0);for(const a of o.messages)s!==void 0&&n.set(a.id,s),a.role==="user"&&!Te(a)&&(s=a)}return n}function Fe(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function v(e,t){const n=new Map;return e.map(s=>{const r=`${t}-${Fe(s.date)}`,o=(n.get(r)??0)+1;return n.set(r,o),{...s,groupKey:o===1?r:`${r}-${o}`}})}function We(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(o=>o.id)),s=new Set(t.map(o=>o.appMessageId).filter(o=>typeof o=="string"&&o.length>0)),r=e.filter(o=>!n.has(o.id)&&!(typeof o.appMessageId=="string"&&o.appMessageId.length>0&&s.has(o.appMessageId)));return r.length===e.length?e:r}function Kt(e,t,n){if(e=We(e,t),e.length===0)return{groups:w(t),gapBeforeGroupIndex:null};if(!n)return{groups:v(w([...e,...t]),"d"),gapBeforeGroupIndex:null};const s=v(w(e),"h"),r=v(w(t),"t");return{groups:[...s,...r],gapBeforeGroupIndex:s.length}}function jt(e){const{scrollTop:t,threshold:n,fetching:s,exhausted:r,historyCount:o,tailCount:a,tailTruncated:i,totalMessages:u,spacerAbove:l=0}=e;return t>n+l||s||r?!1:o>0||i||u>a+o}const zt=300;function Qt(e){const{fetching:t,chainEvaluationPending:n,visible:s,hideArmed:r}=e;return t||n?s&&!r?"none":"show":s&&!r?"arm-hide":"none"}const O=24,qe=320;function L(e){return Number.isFinite(e)?Math.min(qe,Math.max(O,e)):O}const Ge=.2,Ke=.12;function je(e,t,n=Ge){const s=L(t);return e===null||!Number.isFinite(e)?s:e+n*(s-e)}function Yt(e,t){const n=L(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function Xt(e){const{totalMessages:t,residentCount:n,exhausted:s,residentContentHeight:r,currentSpacerHeight:o,viewportHeight:a}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=je(i,r/n));const u=e.unloadedRows??t-n,m=s||t<=0||n<=0||u<=0||i===null?0:Math.round(u*i),d=Math.abs(m-o);return d===0?{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}:m===0||o===0||d>o*Ke||a>0&&d>a?{spacerHeight:m,rowHeightEma:i,applied:!0,scrollTopDelta:m-o}:{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const ze=ve,Qe=2;function Jt(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:s,pageSize:r=ze,nearPages:o=Qe}=e;if(n<=0||t>=n)return"serial";const a=L(s??Number.NaN);return(n-Math.max(0,t))/a>o*r?"seek":"serial"}const G=200,Ye=1;function Zt(e,t,n=G){const s=t.timestamp-n;return[...e.filter(r=>r.timestamp>=s),t]}function en(e){const{samples:t,viewportHeight:n,windowMs:s=G,viewportFactor:r=Ye}=e;if(n<=0||t.length<2)return"gentle";const o=t[t.length-1].timestamp-s,a=t.filter(u=>u.timestamp>=o);if(a.length<2)return"gentle";let i=0;for(let u=1;u<a.length;u+=1)i+=Math.abs(a[u].scrollTop-a[u-1].scrollTop);return i>n*r?"rapid":"gentle"}function tn(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:s}=e;if(s<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(s-1,Math.max(0,Math.floor(r*s)))}function nn(e){const{totalMessages:t,residentCount:n,exhausted:s,startOrdinalEstimate:r,gapToTail:o}=e,a=Math.max(0,t-n);if(a===0)return{above:0,below:0};if(!o)return{above:s?0:a,below:0};if(s)return{above:0,below:a};if(r!==null){const u=Math.min(a,Math.max(0,Math.round(r)));return{above:u,below:a-u}}const i=Math.min(a,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:a-i,below:i}}function sn(e){const{exhausted:t,historyCount:n,tailCount:s,tailTruncated:r,totalMessages:o}=e;return t?!0:n>0?!1:!r&&o<=s}const K=new Map;function j(e,t){return`${e}\0${t}`}function rn(e,t){return K.get(j(e,t))}function on(e,t,n){K.set(j(e,t),n)}const an=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.userMessageIndexes,n):void 0}),un=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.retryAgents,n):void 0});function Xe(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const o=e/1e3,a=o.toFixed(1);return a.endsWith(".0")?`${Math.round(o)}s`:`${a}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${s}m ${r}s`:`${s}m ${r}s`}function cn(e){return Xe(Math.max(1e3,Math.round(e/1e3)*1e3))}const Je=new Set(["launch","init","session-create","session-load","prompt"]),Ze=new Set(["tool-call","tool-waiting"]);function et(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function ln(e){return e&&Je.has(e)?"pulse":e&&Ze.has(e)?"twist":"bloom"}const z="stalled";function dn(e,t){const n=et(e);return!n||n.phase!==z||typeof t=="number"&&t>n.timestamp?null:n}function fn(e){let t=null;for(const n of e)n.phase!==z&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const B={get title(){return S.chat_streamingStatus_sessionCorrupted_title()},get message(){return S.chat_streamingStatus_sessionCorrupted_message()}};function mn(e,t){return e?t===!0?{corrupted:!0,title:B.title,message:B.message,detail:e}:{corrupted:!1,title:S.chat_streamingStatus_responseFailed_label(),message:e,detail:null}:null}const pn=c.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),gn=c.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),hn=c.createSelector(e=>{const t=[];for(const o of Object.values(e.panelLayout.byWorkspaceId))for(const a of Object.values(o.panels))for(const i of a.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),s=new Set(e.agentSessions.agentIdsByWorkspace[pe]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(o=>s.has(o)),dividerSessionAgentIds:n,openAgentTabIds:t}}),Sn=c.createSelector((e,t)=>f(e.questionUi.consumers,t)),tt=3e4,A=new Map;function yn(e,t){const n=A.get(e);n&&clearTimeout(n.timer);const s=setTimeout(()=>A.delete(e),tt);A.set(e,{value:t,timer:s})}function bn(e){const t=A.get(e);if(t)return clearTimeout(t.timer),A.delete(e),t.value}const Q=c.createSelector((e,t,n)=>e.agentWorkers?.byKey[he(t,n)]??ge),nt=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="unsupported"?[]:(s.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),An=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="failed"?!0:s.status!=="ready"||!s.snapshot?!1:s.snapshot.truncated?!0:s.snapshot.support.status!=="supported"&&nt.select(e,t,n).length>0}),st=1e3,Y={requireViewedAndFocused:!0,requireAssistantTail:!0},M=new Map,g=new Map;let b=null;function k(e){(e===void 0||b===e)&&(b=null)}const rt=200;function ot(e,t){if(g.delete(e),g.set(e,t),g.size>rt){const n=g.keys().next().value;n!==void 0&&g.delete(n)}}function X(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function Mn(e){return X(e)?.id??null}function wn(e){P(e,{requireViewedAndFocused:!0})}function _n(e){P(e,{requireViewedAndFocused:!1})}function vn(e){k(),P(e,Y)}function In(e){b===e&&(M.has(e)||(b=null,D(e,Y)))}function Cn(e){for(const t of e)typeof t!="string"||t.length===0||(J(t),k(t),D(t,{requireViewedAndFocused:!1}))}function J(e){const t=M.get(e);t&&(clearTimeout(t.timer),M.delete(e))}function P(e,t){J(e),k(e);const n=setTimeout(()=>{M.delete(e),D(e,t)},st);M.set(e,{timer:n,gates:t})}let U=null;function at(){return U??=Promise.all([C(()=>import("./CqnYcuvr.js"),__vite__mapDeps([25,17,18,3,19,20,13,5,8,2,11,26,27]),import.meta.url),C(()=>import("./DJISFfnZ.js").then(e=>e.X),__vite__mapDeps([28,29,18,3,17,19,20,13,5,8,2,11,7,4,6,9,10,12,14,30,31,32]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),U}async function D(e,t){let n=null;try{const{appStore:s,appClient:r}=await at(),o=s.state;if(t.requireViewedAndFocused&&(o.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const a=o.agentSessions?.byAgentId[e];if(!a)return;const i=typeof a.workspaceId=="string"?a.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&o.chatState?.byAgentId[e]?.initialHistoryPending){b=e;return}const u=X(a.messages??[]);if(!u){t.requireAssistantTail&&(b=e);return}if(t.requireAssistantTail&&u.role!=="assistant")return;const l=u.id;if(g.get(e)===l)return;ot(e,l),n=l,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:l})).success&&g.get(e)===n&&g.delete(e)}catch{n!==null&&g.get(e)===n&&g.delete(e)}}const _=new Map;function Z(e,t){return`${e}\0${t}`}function Tn(e,t){return _.get(Z(e,t))}function Rn(e,t,n){_.set(Z(e,t),n)}function $n(e){if(e.length===0)return;const t=new Set(e);for(const n of[..._.keys()]){const s=n.slice(n.indexOf("\0")+1);t.has(s)&&_.delete(n)}}export{wt as $,Et as A,Lt as B,Gt as C,sn as D,vt as E,tn as F,Cn as G,ke as H,In as I,wn as J,_n as K,vn as L,st as M,Mn as N,zt as O,Qt as P,It as Q,G as R,$t as S,Le as T,He as U,O as V,Ct as W,Xt as X,Rt as Y,k as Z,kt as _,Tt as a,Yt as a0,nt as a1,Q as a2,An as a3,Pt as a4,gn as a5,hn as a6,pn as a7,Ut as a8,Vt as a9,Nt as aa,Ft as ab,q as ac,Sn as ad,un as ae,an as af,Rn as ag,on as ah,jt as ai,Bt as aj,nn as ak,yn as al,xe as am,bn as an,R as b,Zt as c,yt as d,bt as e,qt as f,Mt as g,_t as h,en as i,Jt as j,$n as k,Ot as l,Kt as m,mn as n,Ht as o,We as p,At as q,cn as r,Wt as s,dn as t,Tn as u,rn as v,Dt as w,xt as x,fn as y,ln as z};
8
+ `),e)}function wt(e,t){if(e)return e.model}function Ee({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function _t({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s=0}){return!(e?te(e):!1)&&!Ee({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s})}function vt(e){return ne(e.messageMetadata)}function It(e,t){const n=new Set;for(const s of t){const r=se(s.metadata);r&&n.add(r)}return n.size===0?[...e]:e.filter(s=>!n.has(s.id))}function Le(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Ct(e){return Le({...e,createdAt:Date.parse(e.queuedAt)})}const ke="chat-read:",y=new Map,T=new Set;function Tt(e,t){let n=y.get(e);n||(n=new Set,y.set(e,n)),n.add(t)}function Rt(e,t){const n=y.get(e);if(!(!n||!n.delete(t))&&n.size===0){y.delete(e);for(const s of[...T])s(e)}}function $t(e){return T.add(e),()=>T.delete(e)}function Et(e){return y.has(e)}function Lt(e){const t=y.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(ke))return!0;return!1}function Pe(e,t,n){const s=e.state.pendingSubmissions.byAgentId[t.agentId];if(!s||!V(s.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(ce(t,r));const o=e.state.pendingSubmissions.byAgentId[t.agentId];return o&&f(o.submissions,r.id)?r:null}function De(e,t,n,s,r){const o=x.select(e.state,n),a=I.select(e.state)?.principal.id,i=H(e.state);if(!o||!a||!i)return null;const u=ye(t,n),l={agentId:t,workspaceId:n,principalId:a,participation:o,authority:i,owner:u.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},m=()=>u.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&x.select(e.state,n)===o&&I.select(e.state)?.principal.id===a&&H(e.state)===i;if(!m())return null;e.dispatch(ue(l,s,re.select(e.state,n)));const d=Pe(e,l,r);return d?{scope:l,submission:d,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return m()&&!!h&&V(h.scope,l)&&(!!f(h.operations,d.id)||!!f(h.submissions,d.id))}}:null}function R(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const s=n.userAppMessageId??be();return De(e,t,n.wsId,I.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:s,destination:!n.forceSubmit&&oe.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function xe(e,t,n){const s=R(e,t,n);return s?(e.dispatch(F(t,{...n,userAppMessageId:s.submission.appMessageId,submission:{scope:s.scope,id:s.submission.id}})),!0):!1}async function He(e,t,n,s){const r=n.submission;if(!r)return"legacy";const o=r.reference,a=()=>o.scope.agentId===e&&o.scope.workspaceId===t&&N.select(c.state,e)===n?Se.select(c.state,o.scope):void 0,i=a();if(!i)return null;if(!i.supported)return"legacy";const u={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:s??n.options?.model};if(r.outcome==="rejected"){const p=f(i.tombstones,o.id);return f(i.submissions,o.id)||p&&p.reason!=="rejected"?null:R(c,e,u)}if(r.outcome==="accepted")return R(c,e,u);await Promise.all([Ae(e,t).catch(()=>{}),Me(e,t).catch(()=>{})]);const l=a();if(!l||f(l.submissions,o.id)?.status!=="uncertain")return null;const{notify:m}=await C(async()=>{const{notify:p}=await import("./CQTIadOp.js").then(ee=>ee.i);return{notify:p}},__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]),import.meta.url);if(a()!==l)return null;let d=!1;const h=()=>{d=!0};return m.warning(S.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${o.id}`,duration:Number.POSITIVE_INFINITY,action:{label:S.agent_chatSend_resend_label(),onClick:()=>{if(d)return;d=!0;const p=a();!p||p.generation!==l.generation||p.submissions!==l.submissions||p.observationVersion!==l.observationVersion||f(p.submissions,o.id)?.status!=="uncertain"||xe(c,e,u)}},cancel:{label:S.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function kt(e,t,n){const s=N.select(c.state,e),r=s?.submission?await He(e,t,s,n):"legacy";if(r){if(r==="legacy"){await c.dispatch(n===void 0?le(e,t):de(e,t,n));return}!r.isCurrent()||!s||c.dispatch(F(e,{wsId:t,text:s.text,imageBlocks:s.options?.imageBlocks,fileBlocks:s.options?.fileBlocks,noteIds:s.options?.noteIds,messageMetadata:s.options?.messageMetadata,model:n??s.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Pt=c.createSelector((e,t)=>{const n=f(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:W(n.saves)}:void 0});function Oe(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==$.Deleted&&!t.notificationsMuted&&me(t)==="topLevel"}function Be(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!we(e.metadata,t)?t:null}function Ue(e){return e.status===$.Error&&!ae(ie(e))}function Dt(e,t){return t.filter(n=>Oe(e,n)).flatMap(n=>{const s=fe(n),r=Be(n),o=n.status===$.Error;if(!s&&!r&&!o)return[];const a=s?.timestamp??(o?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:s?.kind??(o?"failed":"question"),reason:s?.reason,timestamp:a&&Number.isFinite(Date.parse(a))?a:void 0,questionMessageId:r,canRetry:Ue(n)}]})}function xt(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.displayStatus==="pr_ready"?"pr_ready":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ht(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function E(e){const t=_e(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),s=t.repo.toLowerCase();return{owner:n,repo:s,number:t.number,id:`${n}/${s}#${t.number}`,url:`https://github.com/${n}/${s}/pull/${t.number}`}}function Ot(e,t,n,s){const r=e.filter(o=>s?s.includes(o.id):n?o.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(a=>a.owner?.toLowerCase()===o.repositoryOwner?.toLowerCase()&&a.name.toLowerCase()===o.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(o=>[...(o.pullRequests??[]).map(a=>a.url),o.activePullRequest?.url,o.prUrl]).flatMap(o=>{const a=o?E(o):null;return a?[[a.id,{owner:a.owner,repo:a.repo,number:a.number}]]:[]})).values()].sort((o,a)=>`${o.owner}/${o.repo}#${o.number}`.localeCompare(`${a.owner}/${a.repo}#${a.number}`))}function Bt(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Ut=c.createSelector(e=>e.homeIntegrations),Nt=c.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,s)=>(s.updatedAt??"").localeCompare(n.updatedAt??""))}}),q=c.createSelector(e=>W(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:E(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Vt=c.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?E(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return q.select(e).find(s=>s.url===n)??null}),Ft=c.createSelector(e=>q.select(e).map(t=>t.url));function Wt(e){return Ce(e)}function Ne(e){return Ie(e)}function Ve(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function w(e){if(e.length===0)return[];const t=[];let n=null;for(const s of e){const r=s.timestamp?typeof s.timestamp=="string"?new Date(s.timestamp):s.timestamp:new Date;(!n||!Ve(n.date,r))&&(n={date:r,label:Ne(r),messages:[]},t.push(n)),n.messages.push(s)}return t}function qt(e){const t=new Map;return e.map(({date:n})=>{const s=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(s)??0;return t.set(s,r+1),r===0?s:`${s}#${r}`})}function Gt(e,t){const n=new Map;let s=t?null:void 0;for(const[r,o]of e.groups.entries()){r===e.gapBeforeGroupIndex&&(s=void 0);for(const a of o.messages)s!==void 0&&n.set(a.id,s),a.role==="user"&&!Te(a)&&(s=a)}return n}function Fe(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function v(e,t){const n=new Map;return e.map(s=>{const r=`${t}-${Fe(s.date)}`,o=(n.get(r)??0)+1;return n.set(r,o),{...s,groupKey:o===1?r:`${r}-${o}`}})}function We(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(o=>o.id)),s=new Set(t.map(o=>o.appMessageId).filter(o=>typeof o=="string"&&o.length>0)),r=e.filter(o=>!n.has(o.id)&&!(typeof o.appMessageId=="string"&&o.appMessageId.length>0&&s.has(o.appMessageId)));return r.length===e.length?e:r}function Kt(e,t,n){if(e=We(e,t),e.length===0)return{groups:w(t),gapBeforeGroupIndex:null};if(!n)return{groups:v(w([...e,...t]),"d"),gapBeforeGroupIndex:null};const s=v(w(e),"h"),r=v(w(t),"t");return{groups:[...s,...r],gapBeforeGroupIndex:s.length}}function jt(e){const{scrollTop:t,threshold:n,fetching:s,exhausted:r,historyCount:o,tailCount:a,tailTruncated:i,totalMessages:u,spacerAbove:l=0}=e;return t>n+l||s||r?!1:o>0||i||u>a+o}const zt=300;function Qt(e){const{fetching:t,chainEvaluationPending:n,visible:s,hideArmed:r}=e;return t||n?s&&!r?"none":"show":s&&!r?"arm-hide":"none"}const O=24,qe=320;function L(e){return Number.isFinite(e)?Math.min(qe,Math.max(O,e)):O}const Ge=.2,Ke=.12;function je(e,t,n=Ge){const s=L(t);return e===null||!Number.isFinite(e)?s:e+n*(s-e)}function Yt(e,t){const n=L(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function Xt(e){const{totalMessages:t,residentCount:n,exhausted:s,residentContentHeight:r,currentSpacerHeight:o,viewportHeight:a}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=je(i,r/n));const u=e.unloadedRows??t-n,m=s||t<=0||n<=0||u<=0||i===null?0:Math.round(u*i),d=Math.abs(m-o);return d===0?{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}:m===0||o===0||d>o*Ke||a>0&&d>a?{spacerHeight:m,rowHeightEma:i,applied:!0,scrollTopDelta:m-o}:{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const ze=ve,Qe=2;function Jt(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:s,pageSize:r=ze,nearPages:o=Qe}=e;if(n<=0||t>=n)return"serial";const a=L(s??Number.NaN);return(n-Math.max(0,t))/a>o*r?"seek":"serial"}const G=200,Ye=1;function Zt(e,t,n=G){const s=t.timestamp-n;return[...e.filter(r=>r.timestamp>=s),t]}function en(e){const{samples:t,viewportHeight:n,windowMs:s=G,viewportFactor:r=Ye}=e;if(n<=0||t.length<2)return"gentle";const o=t[t.length-1].timestamp-s,a=t.filter(u=>u.timestamp>=o);if(a.length<2)return"gentle";let i=0;for(let u=1;u<a.length;u+=1)i+=Math.abs(a[u].scrollTop-a[u-1].scrollTop);return i>n*r?"rapid":"gentle"}function tn(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:s}=e;if(s<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(s-1,Math.max(0,Math.floor(r*s)))}function nn(e){const{totalMessages:t,residentCount:n,exhausted:s,startOrdinalEstimate:r,gapToTail:o}=e,a=Math.max(0,t-n);if(a===0)return{above:0,below:0};if(!o)return{above:s?0:a,below:0};if(s)return{above:0,below:a};if(r!==null){const u=Math.min(a,Math.max(0,Math.round(r)));return{above:u,below:a-u}}const i=Math.min(a,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:a-i,below:i}}function sn(e){const{exhausted:t,historyCount:n,tailCount:s,tailTruncated:r,totalMessages:o}=e;return t?!0:n>0?!1:!r&&o<=s}const K=new Map;function j(e,t){return`${e}\0${t}`}function rn(e,t){return K.get(j(e,t))}function on(e,t,n){K.set(j(e,t),n)}const an=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.userMessageIndexes,n):void 0}),un=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.retryAgents,n):void 0});function Xe(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const o=e/1e3,a=o.toFixed(1);return a.endsWith(".0")?`${Math.round(o)}s`:`${a}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${s}m ${r}s`:`${s}m ${r}s`}function cn(e){return Xe(Math.max(1e3,Math.round(e/1e3)*1e3))}const Je=new Set(["launch","init","session-create","session-load","prompt"]),Ze=new Set(["tool-call","tool-waiting"]);function et(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function ln(e){return e&&Je.has(e)?"pulse":e&&Ze.has(e)?"twist":"bloom"}const z="stalled";function dn(e,t){const n=et(e);return!n||n.phase!==z||typeof t=="number"&&t>n.timestamp?null:n}function fn(e){let t=null;for(const n of e)n.phase!==z&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const B={get title(){return S.chat_streamingStatus_sessionCorrupted_title()},get message(){return S.chat_streamingStatus_sessionCorrupted_message()}};function mn(e,t){return e?t===!0?{corrupted:!0,title:B.title,message:B.message,detail:e}:{corrupted:!1,title:S.chat_streamingStatus_responseFailed_label(),message:e,detail:null}:null}const pn=c.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),gn=c.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),hn=c.createSelector(e=>{const t=[];for(const o of Object.values(e.panelLayout.byWorkspaceId))for(const a of Object.values(o.panels))for(const i of a.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),s=new Set(e.agentSessions.agentIdsByWorkspace[pe]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(o=>s.has(o)),dividerSessionAgentIds:n,openAgentTabIds:t}}),Sn=c.createSelector((e,t)=>f(e.questionUi.consumers,t)),tt=3e4,A=new Map;function yn(e,t){const n=A.get(e);n&&clearTimeout(n.timer);const s=setTimeout(()=>A.delete(e),tt);A.set(e,{value:t,timer:s})}function bn(e){const t=A.get(e);if(t)return clearTimeout(t.timer),A.delete(e),t.value}const Q=c.createSelector((e,t,n)=>e.agentWorkers?.byKey[he(t,n)]??ge),nt=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="unsupported"?[]:(s.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),An=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="failed"?!0:s.status!=="ready"||!s.snapshot?!1:s.snapshot.truncated?!0:s.snapshot.support.status!=="supported"&&nt.select(e,t,n).length>0}),st=1e3,Y={requireViewedAndFocused:!0,requireAssistantTail:!0},M=new Map,g=new Map;let b=null;function k(e){(e===void 0||b===e)&&(b=null)}const rt=200;function ot(e,t){if(g.delete(e),g.set(e,t),g.size>rt){const n=g.keys().next().value;n!==void 0&&g.delete(n)}}function X(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function Mn(e){return X(e)?.id??null}function wn(e){P(e,{requireViewedAndFocused:!0})}function _n(e){P(e,{requireViewedAndFocused:!1})}function vn(e){k(),P(e,Y)}function In(e){b===e&&(M.has(e)||(b=null,D(e,Y)))}function Cn(e){for(const t of e)typeof t!="string"||t.length===0||(J(t),k(t),D(t,{requireViewedAndFocused:!1}))}function J(e){const t=M.get(e);t&&(clearTimeout(t.timer),M.delete(e))}function P(e,t){J(e),k(e);const n=setTimeout(()=>{M.delete(e),D(e,t)},st);M.set(e,{timer:n,gates:t})}let U=null;function at(){return U??=Promise.all([C(()=>import("./1rwbAxiY.js"),__vite__mapDeps([25,17,18,3,19,20,13,5,8,2,11,26,27]),import.meta.url),C(()=>import("./Sk9pLJI5.js").then(e=>e.X),__vite__mapDeps([28,29,18,3,17,19,20,13,5,8,2,11,7,4,6,9,10,12,14,30,31,32]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),U}async function D(e,t){let n=null;try{const{appStore:s,appClient:r}=await at(),o=s.state;if(t.requireViewedAndFocused&&(o.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const a=o.agentSessions?.byAgentId[e];if(!a)return;const i=typeof a.workspaceId=="string"?a.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&o.chatState?.byAgentId[e]?.initialHistoryPending){b=e;return}const u=X(a.messages??[]);if(!u){t.requireAssistantTail&&(b=e);return}if(t.requireAssistantTail&&u.role!=="assistant")return;const l=u.id;if(g.get(e)===l)return;ot(e,l),n=l,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:l})).success&&g.get(e)===n&&g.delete(e)}catch{n!==null&&g.get(e)===n&&g.delete(e)}}const _=new Map;function Z(e,t){return`${e}\0${t}`}function Tn(e,t){return _.get(Z(e,t))}function Rn(e,t,n){_.set(Z(e,t),n)}function $n(e){if(e.length===0)return;const t=new Set(e);for(const n of[..._.keys()]){const s=n.slice(n.indexOf("\0")+1);t.has(s)&&_.delete(n)}}export{wt as $,Et as A,Lt as B,Gt as C,sn as D,vt as E,tn as F,Cn as G,ke as H,In as I,wn as J,_n as K,vn as L,st as M,Mn as N,zt as O,Qt as P,It as Q,G as R,$t as S,Le as T,He as U,O as V,Ct as W,Xt as X,Rt as Y,k as Z,kt as _,Tt as a,Yt as a0,nt as a1,Q as a2,An as a3,Pt as a4,gn as a5,hn as a6,pn as a7,Ut as a8,Vt as a9,Nt as aa,Ft as ab,q as ac,Sn as ad,un as ae,an as af,Rn as ag,on as ah,jt as ai,Bt as aj,nn as ak,yn as al,xe as am,bn as an,R as b,Zt as c,yt as d,bt as e,qt as f,Mt as g,_t as h,en as i,Jt as j,$n as k,Ot as l,Kt as m,mn as n,Ht as o,We as p,At as q,cn as r,Wt as s,dn as t,Tn as u,rn as v,Dt as w,xt as x,fn as y,ln as z};
@@ -1 +1 @@
1
- import{G2 as o,aZ as d}from"./X8KOCQId.js";const f=o.createSelector((t,r)=>t.uiHighlight.activeById[r.trim()]??0),m=o.createSelector((t,r)=>t.uiHighlight.durationMsById[r.trim()]),n="ui-highlight-pulse-ring";function u(t){return(t??"").trim()}function T(t,r={}){let s=u(r.id??t.dataset.highlightId),a=0,l;function c(){t.classList.remove(n)}function g(e){t.classList.remove(n),t.offsetWidth,t.classList.add(n),l&&clearTimeout(l),l=setTimeout(c,e??d)}function h(){if(!s)return;let e;try{e=o.state}catch{return}const i=f.select(e,s);i>0&&i!==a&&(a=i,g(m.select(e,s)))}const I=setInterval(h,100);return h(),{update(e={}){const i=u(e.id??t.dataset.highlightId);i!==s&&(s=i,a=0,c(),h())},destroy(){clearInterval(I),l&&clearTimeout(l),c()}}}export{T as h};
1
+ import{G2 as o,aZ as d}from"./C51KzdSG.js";const f=o.createSelector((t,r)=>t.uiHighlight.activeById[r.trim()]??0),m=o.createSelector((t,r)=>t.uiHighlight.durationMsById[r.trim()]),n="ui-highlight-pulse-ring";function u(t){return(t??"").trim()}function T(t,r={}){let s=u(r.id??t.dataset.highlightId),a=0,l;function c(){t.classList.remove(n)}function g(e){t.classList.remove(n),t.offsetWidth,t.classList.add(n),l&&clearTimeout(l),l=setTimeout(c,e??d)}function h(){if(!s)return;let e;try{e=o.state}catch{return}const i=f.select(e,s);i>0&&i!==a&&(a=i,g(m.select(e,s)))}const I=setInterval(h,100);return h(),{update(e={}){const i=u(e.id??t.dataset.highlightId);i!==s&&(s=i,a=0,c(),h())},destroy(){clearInterval(I),l&&clearTimeout(l),c()}}}export{T as h};
@@ -1,3 +1,3 @@
1
- import{p as oe}from"./FGzP6Npj.js";import{p as se,i as de}from"./CFa2g-IY.js";import{O as le,aI as ce,aF as me,K as ue,L as xe,aG as fe,a as o,ad as h,N as ne,aL as ge,k as he,j as pe,M as A,y as ve,aD as B,aX as M,f as be}from"./D0QGnN9N.js";import{c3 as we,g as d}from"./-EQ6B0ad.js";var ae="position frame",ie="frame positioned",k="position relation",re="relation positioned",ye=o(function(e){h.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){R(),he()},"clear");function R(){D={}}d(R,"reset");o(R,"reset");var Fe=ve.eventmodeling,Be=o(()=>pe({...Fe,...A().eventmodeling}),"getConfig"),D={};function N(){let e=Me;const{ast:n}=D,t=P();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((a,i)=>{const r=H(a,n.dataEntities,t);e=w(e,{$kind:ae,index:i,frame:a,textProps:r});let l;X(a)?(h.debug("source frame",a.sourceFrames),l=n.frames.filter(c=>a.sourceFrames.some(m=>m.$refText===c.name)),l.forEach(c=>{e=w(e,{$kind:k,index:i,frame:a,sourceFrame:c})})):e=w(e,{$kind:k,index:i,frame:a})}),e={...e,sortedSwimlanesArray:S(e.swimlanes)},e}d(N,"getState");o(N,"getState");function T(e){D.ast=e}d(T,"setAst");o(T,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function P(){return s}d(P,"getDiagramProps");o(P,"getDiagramProps");var Me={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function $(e){const n=e.split(".");if(n.length===2)return n[0]}d($,"extractNamespace");o($,"extractNamespace");function C(e){const n=e.split(".");return n.length===2?n[1]:e}d(C,"extractName");o(C,"extractName");function I(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}d(I,"findSwimlaneByNamespace");o(I,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(a=>{const i=Number.parseInt(a);return i>n&&i<t}).map(a=>Number.parseInt(a)))+1}d(b,"findNextAvailableIndex");o(b,"findNextAvailableIndex");function O(e,n){const t=$(e.entityIdentifier),a=I(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return a?{index:a.index,label:a.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return a?{index:a.index,label:a.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return a?{index:a.index,label:a.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}d(O,"calculateSwimlaneProps");o(O,"calculateSwimlaneProps");function W(e){const{themeVariables:n}=A();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}d(W,"calculateEntityVisualProps");o(W,"calculateEntityVisualProps");function H(e,n,t){const a=A(),i=B(C(e.entityIdentifier)??"",a);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let m=`<b>${M(i,t.textMaxWidth,l)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const v=n.find(F=>F.name===e.dataReference?.$refText);v&&(r=v.dataBlockValue,r=r.substring(r.indexOf(`{
1
+ import{p as oe}from"./B0a31Ljt.js";import{p as se,i as de}from"./u9Jr5xJ2.js";import{O as le,aI as ce,aF as me,K as ue,L as xe,aG as fe,a as o,ad as h,N as ne,aL as ge,k as he,j as pe,M as A,y as ve,aD as B,aX as M,f as be}from"./_eQjP0_7.js";import{c3 as we,g as d}from"./CdT170lG.js";var ae="position frame",ie="frame positioned",k="position relation",re="relation positioned",ye=o(function(e){h.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){R(),he()},"clear");function R(){D={}}d(R,"reset");o(R,"reset");var Fe=ve.eventmodeling,Be=o(()=>pe({...Fe,...A().eventmodeling}),"getConfig"),D={};function N(){let e=Me;const{ast:n}=D,t=P();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((a,i)=>{const r=H(a,n.dataEntities,t);e=w(e,{$kind:ae,index:i,frame:a,textProps:r});let l;X(a)?(h.debug("source frame",a.sourceFrames),l=n.frames.filter(c=>a.sourceFrames.some(m=>m.$refText===c.name)),l.forEach(c=>{e=w(e,{$kind:k,index:i,frame:a,sourceFrame:c})})):e=w(e,{$kind:k,index:i,frame:a})}),e={...e,sortedSwimlanesArray:S(e.swimlanes)},e}d(N,"getState");o(N,"getState");function T(e){D.ast=e}d(T,"setAst");o(T,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function P(){return s}d(P,"getDiagramProps");o(P,"getDiagramProps");var Me={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function $(e){const n=e.split(".");if(n.length===2)return n[0]}d($,"extractNamespace");o($,"extractNamespace");function C(e){const n=e.split(".");return n.length===2?n[1]:e}d(C,"extractName");o(C,"extractName");function I(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}d(I,"findSwimlaneByNamespace");o(I,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(a=>{const i=Number.parseInt(a);return i>n&&i<t}).map(a=>Number.parseInt(a)))+1}d(b,"findNextAvailableIndex");o(b,"findNextAvailableIndex");function O(e,n){const t=$(e.entityIdentifier),a=I(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return a?{index:a.index,label:a.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return a?{index:a.index,label:a.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return a?{index:a.index,label:a.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}d(O,"calculateSwimlaneProps");o(O,"calculateSwimlaneProps");function W(e){const{themeVariables:n}=A();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}d(W,"calculateEntityVisualProps");o(W,"calculateEntityVisualProps");function H(e,n,t){const a=A(),i=B(C(e.entityIdentifier)??"",a);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let m=`<b>${M(i,t.textMaxWidth,l)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const v=n.find(F=>F.name===e.dataReference?.$refText);v&&(r=v.dataBlockValue,r=r.substring(r.indexOf(`{
2
2
  `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" ","&nbsp;"),r+="<br/>")}const u=r!==void 0;u&&(m+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const f={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},x=be(m,f),p=u?x.width/3:x.width,g={content:m,width:p,height:x.height};return h.debug(`[${e.name}] ${e.entityIdentifier} text`,g),g}d(H,"calculateTextProps");o(H,"calculateTextProps");function U(e,n){const t=n,a=W(t.frame),i={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:ie,frame:t.frame,index:t.index,visual:a,dimension:i,textProps:t.textProps}]}d(U,"decidePositionFrame");o(U,"decidePositionFrame");function L(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}d(L,"calculateX");o(L,"calculateX");function _(e,n){const t=[...e.map(a=>a.r),n];return Math.max(...t)}d(_,"calculateMaxRight");o(_,"calculateMaxRight");function S(e){return Object.values(e).sort((n,t)=>n.index-t.index)}d(S,"sortedSwimlanesArray");o(S,"sortedSwimlanesArray");function G(e,n){const t=n,a=O(t.frame,e.swimlanes);let i;a.index in e.swimlanes?i=e.swimlanes[a.index]:i={index:a.index,label:a.label,r:0,y:a.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,l=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,c={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},m=L(i,l,r),u=m+c.width+s.boxPadding,f=_(Object.values(e.swimlanes),u);i.r=m+c.width,i.maxHeight=Math.max(i.maxHeight,c.height),i.height=Math.max(s.swimlaneMinHeight,i.maxHeight)+2*s.swimlanePadding;const x={x:m,y:s.swimlanePadding+i.y,r:u,dimension:c,leftSibling:!1,swimlane:i,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},p={...e,boxes:[...e.boxes,x],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:a.index,previousFrame:t.frame,maxR:f},g=S(p.swimlanes);g.length>0&&(g[0].y=0);for(let v=1;v<g.length;v++){const F=g[v],te=g[v-1];F.y=te.y+te.height+s.swimlaneGap}return p}d(G,"evolveFramePositioned");o(G,"evolveFramePositioned");function V(e,n){return e===0&&n.sourceFrames.length===0}d(V,"isFirstFrame");o(V,"isFirstFrame");function X(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}d(X,"hasSourceFrame");o(X,"hasSourceFrame");function y(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}d(y,"findBoxByFrame");o(y,"findBoxByFrame");function j(e,n,t){if(!(t<0))for(let a=t;a>=0;a--){const i=e[a];if(i.swimlane.index!==n)return i}}d(j,"findBoxByLineIndex");o(j,"findBoxByLineIndex");function Y(e,n){const t=n;if(de(t.frame)||V(t.index,t.frame))return[];const a=y(e.boxes,t.frame);if(a===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let i;return t.sourceFrame?i=y(e.boxes,t.sourceFrame):i=j(e.boxes,a.swimlane.index,t.index-1),i===void 0?[]:[{$kind:re,frame:t.frame,index:t.index,sourceBox:i,targetBox:a}]}d(Y,"decidePositionRelation");o(Y,"decidePositionRelation");function K(e,n){const t=n,a={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,a]}}d(K,"evolveRelationPositioned");o(K,"evolveRelationPositioned");var ke={[ae]:U,[k]:Y},Ee={[ie]:G,[re]:K};function z(e,n){const t=ke[n.$kind];if(t==null)return[];const a=t(e,n);return h.debug("decided events",a),a}d(z,"decide");o(z,"decide");function q(e,n){const t=n.reduce((a,i)=>{const r=Ee[i.$kind];return r==null?a:r(a,i)},e);return h.debug("evolve events",{state:e,newState:t,events:n}),t}d(q,"evolve");o(q,"evolve");function w(e,n){const t=z(e,n);return q(e,t)}d(w,"dispatch");o(w,"dispatch");var E={getConfig:Be,setOptions:ye,getOptions:Pe,clear:Se,setAccTitle:fe,getAccTitle:xe,getAccDescription:ue,setAccDescription:me,setDiagramTitle:ce,getDiagramTitle:le,setAst:T,getDiagramProps:P,getState:N},Ae={parse:o(async e=>{const n=await se("eventmodeling",e);h.debug(n),E.setAst(n),oe(n,E)},"parse")},Re=ne(),De=Re?.eventmodeling;function J(e,n){return t=>{const a=t.swimlane.y+n.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",t.x).attr("y",a).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),i.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",a+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}d(J,"renderD3Box");o(J,"renderD3Box");function Q(e,n){return e>n}d(Q,"dirUpwards");o(Q,"dirUpwards");function Z(e,n,t,a){return i=>{const r=i.sourceBox.swimlane.y+n.swimlanePadding,l=i.targetBox.swimlane.y+n.swimlanePadding,c=Q(r,l),m=i.sourceBox.x+i.sourceBox.dimension.width*2/3,u=i.targetBox.x+i.targetBox.dimension.width/3;let f,x;h.debug(`rendering relation up=${c} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),c?(f=r,x=l+i.targetBox.dimension.height):(f=r+i.sourceBox.dimension.height,x=l);const p=a.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${m} ${f} L${u} ${x}`)}}d(Z,"renderD3Relation");o(Z,"renderD3Relation");function ee(e,n,t,a){return i=>{const r=e.append("g").attr("class","em-swimlane"),l=a.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=a.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",i.height).attr("fill",l).attr("stroke",c),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}d(ee,"renderD3Swimlane");o(ee,"renderD3Swimlane");var Ne=o(function(e,n,t,a){if(h.debug("in eventmodeling renderer",e+`
3
3
  `,"id:",n,t),!De)throw new Error("EventModeling config not found");const i=a.db,{themeVariables:r,eventmodeling:l}=ne(),c=we(`[id="${n}"]`),m=i.getDiagramProps(),u=i.getState(),f=`em-arrowhead-${n}`,x=r.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(ee(c,u.maxR,m,r)),u.boxes.forEach(J(c,m)),u.relations.forEach(Z(c,m,f,r)),c.append("defs").append("marker").attr("id",f).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",x),ge(void 0,c,l?.padding??30,l?.useMaxWidth)},"draw"),Te={draw:Ne},$e=o(e=>"","getStyles"),Ce=$e,Ue={parser:Ae,db:E,renderer:Te,styles:Ce};export{Ue as diagram};
@@ -1,4 +1,4 @@
1
- import{c as t,s as r}from"./CR7ldtgw.js";import{a}from"./D0QGnN9N.js";import"./-EQ6B0ad.js";import"./BrzmNBOR.js";var s=a(e=>`${r(e)}
1
+ import{c as t,s as r}from"./ChDcu7sM.js";import{a}from"./_eQjP0_7.js";import"./CdT170lG.js";import"./BEu9jjb7.js";var s=a(e=>`${r(e)}
2
2
  .swimlane.cluster rect {
3
3
  stroke: ${e.clusterBorder} !important;
4
4
  }
@@ -1 +1 @@
1
- import{t as g,bq as h,bo as v,by as w,b as C}from"./DEI12D8u.js";import{bs as T,a5 as u,bl as l,bS as _,bA as c,b_ as A,bO as p,W as O,bn as S,aA as j,aB as q}from"./B8o4lNgr.js";var B=q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><div class="text-center"><p class="text-lg font-medium text-foreground"> </p> <p class="text-sm"> </p> <p class="text-xs mt-4 text-subtle"> </p></div></div>');function I(n,a){if(new.target)return g({component:I,...n});T(a,!0);let e=h(a,"tab",7);var m={get tab(){return e()},set tab(t){e(t),j()},$set:w,$on:(t,r)=>C(a,t,r)},s=B(),o=u(s),b=u(o),d=l(b,!0),i=_(b,2),x=l(i,!0),f=_(i,2),y=l(f,!0);return c(o),c(s),A((t,r)=>{p(d,e().title),p(x,t),p(y,r)},[()=>v.layout_panelContent_typeLabel({type:e().type}),()=>v.layout_overviewTab_notImplemented_label()]),O(n,s),S(m)}export{I as default};
1
+ import{t as g,bq as h,bo as v,by as w,b as C}from"./D4MoKNoK.js";import{bs as T,a5 as u,bl as l,bS as _,bA as c,b_ as A,bO as p,W as O,bn as S,aA as j,aB as q}from"./B8o4lNgr.js";var B=q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><div class="text-center"><p class="text-lg font-medium text-foreground"> </p> <p class="text-sm"> </p> <p class="text-xs mt-4 text-subtle"> </p></div></div>');function I(n,a){if(new.target)return g({component:I,...n});T(a,!0);let e=h(a,"tab",7);var m={get tab(){return e()},set tab(t){e(t),j()},$set:w,$on:(t,r)=>C(a,t,r)},s=B(),o=u(s),b=u(o),d=l(b,!0),i=_(b,2),x=l(i,!0),f=_(i,2),y=l(f,!0);return c(o),c(s),A((t,r)=>{p(d,e().title),p(x,t),p(y,r)},[()=>v.layout_panelContent_typeLabel({type:e().type}),()=>v.layout_overviewTab_notImplemented_label()]),O(n,s),S(m)}export{I as default};