@intent-hq/web 2.290.0 → 2.290.1

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 (202) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DeXgzEXt.js → -8bl9H3j.js} +1 -1
  3. package/web/app/immutable/chunks/{B_tLm3FX.js → 1H7i14Jq.js} +1 -1
  4. package/web/app/immutable/chunks/{CVoR5NDH.js → 1NjHIsWL.js} +1 -1
  5. package/web/app/immutable/chunks/{BuPFKHtN.js → 2zyiBICC.js} +1 -1
  6. package/web/app/immutable/chunks/{7bnNetCh.js → 4cIwmSuD.js} +4 -4
  7. package/web/app/immutable/chunks/{DOzFltDq.js → 86pQg5ba.js} +1 -1
  8. package/web/app/immutable/chunks/{9mpJnkDG.js → 8DpW-FUQ.js} +1 -1
  9. package/web/app/immutable/chunks/{DFhWc3Xl.js → 8ZymRjAb.js} +1 -1
  10. package/web/app/immutable/chunks/{DTh2IQKZ.js → B05yODFj.js} +1 -1
  11. package/web/app/immutable/chunks/{xFioAb_b.js → B1uw4k3u.js} +1 -1
  12. package/web/app/immutable/chunks/{3Hx-xwhh.js → B4ARXgVr.js} +1 -1
  13. package/web/app/immutable/chunks/{BUGkkCym.js → B7WsW6mB.js} +2 -2
  14. package/web/app/immutable/chunks/{bGIBa4-r.js → BB-rM-bv.js} +1 -1
  15. package/web/app/immutable/chunks/{zCZWMH02.js → BCqLW1sk.js} +1 -1
  16. package/web/app/immutable/chunks/{Cx7iLEYy.js → BFxAoZrN.js} +3 -3
  17. package/web/app/immutable/chunks/{DIbPNVg7.js → BJiYgQMg.js} +1 -1
  18. package/web/app/immutable/chunks/{C6dKjZk_.js → BLV57oiS.js} +1 -1
  19. package/web/app/immutable/chunks/{VI8s0N-a.js → BLwubCUL.js} +1 -1
  20. package/web/app/immutable/chunks/{BJClJd-t.js → BME2e0zx.js} +1 -1
  21. package/web/app/immutable/chunks/{BLfTJyKw.js → BMI9BPVJ.js} +1 -1
  22. package/web/app/immutable/chunks/{BGG3Zscy.js → BOrf8iaF.js} +2 -2
  23. package/web/app/immutable/chunks/{BDn01g3q.js → BPomlxD-.js} +5 -5
  24. package/web/app/immutable/chunks/{DaNfseRw.js → BQAjYSZn.js} +1 -1
  25. package/web/app/immutable/chunks/{XG9LuART.js → BUfDnmlv.js} +1 -1
  26. package/web/app/immutable/chunks/{BeteiAtg.js → BVf1OKWM.js} +1 -1
  27. package/web/app/immutable/chunks/{DyTkTh0C.js → BVkABTn_.js} +1 -1
  28. package/web/app/immutable/chunks/{CFBH989r.js → BZML3c09.js} +1 -1
  29. package/web/app/immutable/chunks/{Bm0FPS2G.js → BZrGNaMY.js} +4 -4
  30. package/web/app/immutable/chunks/{Mb97pGy9.js → B_ZXH4Bf.js} +1 -1
  31. package/web/app/immutable/chunks/{_0mq0vvG.js → Ba-TS5vR.js} +1 -1
  32. package/web/app/immutable/chunks/{DI6oKJrr.js → BffyNBKQ.js} +1 -1
  33. package/web/app/immutable/chunks/{BXzaNdSF.js → Bfq2PcjA.js} +1 -1
  34. package/web/app/immutable/chunks/{TPpS6DWt.js → BgerNePf.js} +1 -1
  35. package/web/app/immutable/chunks/{DUMeb8Tg.js → BiCS5wL3.js} +1 -1
  36. package/web/app/immutable/chunks/{czyBPXbO.js → BjBW4i6w.js} +1 -1
  37. package/web/app/immutable/chunks/{2Zse_zlb.js → BjJW_Stw.js} +1 -1
  38. package/web/app/immutable/chunks/{DywBWiWr.js → BmwLKx4A.js} +2 -2
  39. package/web/app/immutable/chunks/{DwKgqaL_.js → BoHfk-5t.js} +1 -1
  40. package/web/app/immutable/chunks/{w9Jeqnt9.js → BpOXeNkx.js} +1 -1
  41. package/web/app/immutable/chunks/{txAmNNfN.js → BpxCnE9X.js} +2 -2
  42. package/web/app/immutable/chunks/{BX_hW0qI.js → BsqGui1M.js} +1 -1
  43. package/web/app/immutable/chunks/{DualWjmg.js → BssOKdq0.js} +1 -1
  44. package/web/app/immutable/chunks/{HWRbLPjE.js → BtVjR42p.js} +1 -1
  45. package/web/app/immutable/chunks/{BeZSE8qD.js → BvtLLvEi.js} +1 -1
  46. package/web/app/immutable/chunks/{CTNvudJn.js → BvypOCfp.js} +1 -1
  47. package/web/app/immutable/chunks/{BOV2yVmE.js → BwDb1jNr.js} +1 -1
  48. package/web/app/immutable/chunks/{ZahkIG5A.js → BxE5JflA.js} +1 -1
  49. package/web/app/immutable/chunks/{LgC5iPo9.js → Byu82QgX.js} +1 -1
  50. package/web/app/immutable/chunks/{CsBmR9QJ.js → C-BS-coA.js} +1 -1
  51. package/web/app/immutable/chunks/{CB5rZSQk.js → C0fOehTZ.js} +1 -1
  52. package/web/app/immutable/chunks/{CLCbFeGH.js → C1H4_ssx.js} +1 -1
  53. package/web/app/immutable/chunks/{BMAdQvY4.js → C4hboqwm.js} +1 -1
  54. package/web/app/immutable/chunks/{l8G_rqMf.js → C7KdCylX.js} +3 -3
  55. package/web/app/immutable/chunks/{Cf5LD9TB.js → C7mmIZCH.js} +1 -1
  56. package/web/app/immutable/chunks/{CBQ9Dj27.js → C9AcsTi0.js} +1 -1
  57. package/web/app/immutable/chunks/{DWVb7mpY.js → CAaAIfXJ.js} +1 -1
  58. package/web/app/immutable/chunks/{2p97_N8F.js → CEAZJuV2.js} +1 -1
  59. package/web/app/immutable/chunks/{DHyS0o2Q.js → CECSRFPp.js} +1 -1
  60. package/web/app/immutable/chunks/{CT_RWC-b.js → CETsvapu.js} +1 -1
  61. package/web/app/immutable/chunks/{BaL0o0Td.js → CG-2eU4S.js} +1 -1
  62. package/web/app/immutable/chunks/{CeJvKYEf.js → CJcw2WA-.js} +1 -1
  63. package/web/app/immutable/chunks/{BwTgppku.js → CKuYPUu0.js} +1 -1
  64. package/web/app/immutable/chunks/{CnRB4N94.js → CN15iJiw.js} +1 -1
  65. package/web/app/immutable/chunks/{CC2jdDPt.js → CNWeExHy.js} +1 -1
  66. package/web/app/immutable/chunks/{O7y8odEy.js → CQk4XJFx.js} +1 -1
  67. package/web/app/immutable/chunks/{D6XmzNBT.js → CSJ0J5sC.js} +1 -1
  68. package/web/app/immutable/chunks/{1RFrLNza.js → CT1GHsTn.js} +1 -1
  69. package/web/app/immutable/chunks/{DMEnrA6r.js → CU1rgNTy.js} +1 -1
  70. package/web/app/immutable/chunks/{D_TiJ_fE.js → CW92V9X1.js} +1 -1
  71. package/web/app/immutable/chunks/{FQxEz28M.js → CYEJX57C.js} +1 -1
  72. package/web/app/immutable/chunks/{R4VbyJYi.js → CYH5KIcO.js} +1 -1
  73. package/web/app/immutable/chunks/{CB3E3AyJ.js → CZiA6iY8.js} +1 -1
  74. package/web/app/immutable/chunks/{cfooBVHs.js → C_dZqjuM.js} +1 -1
  75. package/web/app/immutable/chunks/{Ce9YhY2C.js → Car8OZH2.js} +1 -1
  76. package/web/app/immutable/chunks/{Ico6LbU5.js → CaxwpItd.js} +1 -1
  77. package/web/app/immutable/chunks/{Bg4Uz_3j.js → CbVYqaBE.js} +1 -1
  78. package/web/app/immutable/chunks/{Bx7BNLnp.js → Ccxm74iK.js} +1 -1
  79. package/web/app/immutable/chunks/{DbNaInRh.js → CfV9aH5z.js} +2 -2
  80. package/web/app/immutable/chunks/{CtBQs9aW.js → Ch36jfts.js} +1 -1
  81. package/web/app/immutable/chunks/{Cyjl25fy.js → ChRkiYOJ.js} +1 -1
  82. package/web/app/immutable/chunks/{CjrYYJVA.js → CiyXcVwM.js} +1 -1
  83. package/web/app/immutable/chunks/{Dw68b__v.js → CjUzEyu9.js} +1 -1
  84. package/web/app/immutable/chunks/{DrDFJIB-.js → CkmJMnjs.js} +1 -1
  85. package/web/app/immutable/chunks/{BG92xiA-.js → ClHM0gRH.js} +1 -1
  86. package/web/app/immutable/chunks/{BZrxWDyC.js → Clm-X79i.js} +1 -1
  87. package/web/app/immutable/chunks/{DhkrcYPH.js → Cm8yeV3M.js} +1 -1
  88. package/web/app/immutable/chunks/{D_uZvS29.js → Cmd7Q9e2.js} +2 -2
  89. package/web/app/immutable/chunks/{uw9q9ubw.js → CpWIfz5C.js} +1 -1
  90. package/web/app/immutable/chunks/{gywQvRwA.js → CpZlxc5c.js} +1 -1
  91. package/web/app/immutable/chunks/{u43L-bVE.js → Cqsec-yx.js} +1 -1
  92. package/web/app/immutable/chunks/{YnEJ07_G.js → Cro1ceUg.js} +1 -1
  93. package/web/app/immutable/chunks/{aeIQN6XF.js → Cs1191LV.js} +1 -1
  94. package/web/app/immutable/chunks/{BSqZ5g0_.js → CvNRUlp4.js} +1 -1
  95. package/web/app/immutable/chunks/{4YAlYQZK.js → CvlQZpOV.js} +1 -1
  96. package/web/app/immutable/chunks/{DdTOR-fK.js → Cx9nrScM.js} +1 -1
  97. package/web/app/immutable/chunks/{DWH0KAf0.js → CzeJNa_N.js} +1 -1
  98. package/web/app/immutable/chunks/{QuwJBwI-.js → D-USmFEk.js} +1 -1
  99. package/web/app/immutable/chunks/{CR_QOSeH.js → D-nuXMbz.js} +1 -1
  100. package/web/app/immutable/chunks/{BxiHCJA9.js → D226daYk.js} +1 -1
  101. package/web/app/immutable/chunks/{DOd666za.js → D4KaTH-V.js} +1 -1
  102. package/web/app/immutable/chunks/{B-CzqeN8.js → D6rPVTS4.js} +1 -1
  103. package/web/app/immutable/chunks/{DUwPI6pr.js → D7RRnWwO.js} +1 -1
  104. package/web/app/immutable/chunks/{C17qLLZy.js → DC4NL8YS.js} +1 -1
  105. package/web/app/immutable/chunks/{pCx1Hl6T.js → DCpi1ytG.js} +1 -1
  106. package/web/app/immutable/chunks/{CDc4alpJ.js → DD8c9eUJ.js} +1 -1
  107. package/web/app/immutable/chunks/{DLg9iehs.js → DFT4lZL_.js} +1 -1
  108. package/web/app/immutable/chunks/{DNPPDjbf.js → DG2MKLyJ.js} +1 -1
  109. package/web/app/immutable/chunks/{CbcJLLbX.js → DG9YtBZO.js} +1 -1
  110. package/web/app/immutable/chunks/{CTm1UFNm.js → DK1Nq2tK.js} +1 -1
  111. package/web/app/immutable/chunks/{NnQLq3da.js → DKDZTli0.js} +1 -1
  112. package/web/app/immutable/chunks/{D2HP95As.js → DKs113YH.js} +1 -1
  113. package/web/app/immutable/chunks/{BORhTadA.js → DNWjwuC6.js} +1 -1
  114. package/web/app/immutable/chunks/{O7VU9svd.js → DPRoG8qR.js} +1 -1
  115. package/web/app/immutable/chunks/{D7KQ-C2a.js → DQcbLXPp.js} +1 -1
  116. package/web/app/immutable/chunks/{Bc1TTOKX.js → DR8eV9N8.js} +1 -1
  117. package/web/app/immutable/chunks/{Cw7IfVO4.js → DTTAQR6U.js} +1 -1
  118. package/web/app/immutable/chunks/{C_T_V_cz.js → DUEahgsi.js} +1 -1
  119. package/web/app/immutable/chunks/{DV5DGvsr.js → DV1BB3if.js} +1 -1
  120. package/web/app/immutable/chunks/{DaXfyPpV.js → DVOiawfp.js} +1 -1
  121. package/web/app/immutable/chunks/{C2VPDjeo.js → DVbZ5oZ8.js} +1 -1
  122. package/web/app/immutable/chunks/{DNUaZj8_.js → DX09WtDr.js} +1 -1
  123. package/web/app/immutable/chunks/{LIohq1To.js → DX8x4w_C.js} +1 -1
  124. package/web/app/immutable/chunks/{DVeZQ6um.js → DZyz0CaB.js} +1 -1
  125. package/web/app/immutable/chunks/{BeUBep3b.js → Darv-bZj.js} +1 -1
  126. package/web/app/immutable/chunks/{Cou180Vm.js → DbD4A30t.js} +1 -1
  127. package/web/app/immutable/chunks/{D-YtOwPX.js → Df8Itx2l.js} +1 -1
  128. package/web/app/immutable/chunks/{BbTuJlco.js → Dfw44tJF.js} +1 -1
  129. package/web/app/immutable/chunks/{sUO-mR-D.js → DknXCwG-.js} +1 -1
  130. package/web/app/immutable/chunks/{d5zYr7fC.js → Dl6wwL68.js} +1 -1
  131. package/web/app/immutable/chunks/{CYK_6j38.js → DlcwslMx.js} +1 -1
  132. package/web/app/immutable/chunks/{Bk3MUF5Z.js → Dlfu53Jt.js} +1 -1
  133. package/web/app/immutable/chunks/{DvM0Oc_2.js → DpDR6yW3.js} +1 -1
  134. package/web/app/immutable/chunks/{C28hhXd4.js → DqNPF1Kv.js} +1 -1
  135. package/web/app/immutable/chunks/{BU_GHz5Q.js → DsEt8_PJ.js} +1 -1
  136. package/web/app/immutable/chunks/{BuUX281b.js → Dt4GGs4d.js} +1 -1
  137. package/web/app/immutable/chunks/{PnAug6me.js → Dug6137y.js} +1 -1
  138. package/web/app/immutable/chunks/{cUFAcBAC.js → DxGgdCHB.js} +1 -1
  139. package/web/app/immutable/chunks/{CAoXCf6s.js → Dynz04e1.js} +1 -1
  140. package/web/app/immutable/chunks/{8pTk55sx.js → DzbhMJUu.js} +1 -1
  141. package/web/app/immutable/chunks/{C9hosAov.js → HK2fZqOM.js} +1 -1
  142. package/web/app/immutable/chunks/{DoRZvIjE.js → IorbBySt.js} +1 -1
  143. package/web/app/immutable/chunks/{FxlwG_cR.js → IuNsAsbW.js} +1 -1
  144. package/web/app/immutable/chunks/{bOHL4iEd.js → Kr-Hl0sp.js} +1 -1
  145. package/web/app/immutable/chunks/{CobcHKt3.js → LhLTjc8B.js} +6 -6
  146. package/web/app/immutable/chunks/{Bbg7YJDS.js → LwsqbQ0C.js} +1 -1
  147. package/web/app/immutable/chunks/{C1oWz50Y.js → Q0BLEqss.js} +3 -3
  148. package/web/app/immutable/chunks/{D3Vc9t57.js → Qe1_731c.js} +1 -1
  149. package/web/app/immutable/chunks/{DKCiaCAE.js → RiB0F36z.js} +1 -1
  150. package/web/app/immutable/chunks/RmgPTyFU.js +1 -0
  151. package/web/app/immutable/chunks/{D0xGfXvZ.js → SEnfPRC9.js} +1 -1
  152. package/web/app/immutable/chunks/{CSYt80U-.js → S_AAYsIr.js} +2 -2
  153. package/web/app/immutable/chunks/{CNP_2GEv.js → SpDQ1yhe.js} +1 -1
  154. package/web/app/immutable/chunks/{KjSY_6tg.js → Wtp4gWgF.js} +1 -1
  155. package/web/app/immutable/chunks/{v6v2loc1.js → Xz2JgrtK.js} +1 -1
  156. package/web/app/immutable/chunks/{CD6znF_9.js → ZBCGBGeT.js} +1 -1
  157. package/web/app/immutable/chunks/{D2WFqoJa.js → ZsIzkx4b.js} +1 -1
  158. package/web/app/immutable/chunks/{DYlMDxfy.js → _es_q85K.js} +1 -1
  159. package/web/app/immutable/chunks/{CqiIZBSl.js → bAWH0D1a.js} +7 -7
  160. package/web/app/immutable/chunks/{DqYyUQgu.js → dpToMVNV.js} +1 -1
  161. package/web/app/immutable/chunks/{B2D_mcko.js → fciB9y8B.js} +1 -1
  162. package/web/app/immutable/chunks/{MR-g1_iF.js → ihEwdinj.js} +1 -1
  163. package/web/app/immutable/chunks/{CjK0D9QS.js → jsY6ocH0.js} +1 -1
  164. package/web/app/immutable/chunks/{_u30tumF.js → kIb2FXed.js} +1 -1
  165. package/web/app/immutable/chunks/{WD5eiIht.js → kXKukUHU.js} +1 -1
  166. package/web/app/immutable/chunks/{AZdZd6y3.js → kza5UJ4U.js} +1 -1
  167. package/web/app/immutable/chunks/{UMrFWomj.js → mMBlGZk9.js} +1 -1
  168. package/web/app/immutable/chunks/{BvWLkg--.js → n-WVnUeH.js} +1 -1
  169. package/web/app/immutable/chunks/{hBdy3DXS.js → nR6RXxA9.js} +1 -1
  170. package/web/app/immutable/chunks/{C_Xkhy7Z.js → pBEY1Dg2.js} +1 -1
  171. package/web/app/immutable/chunks/{RDBJJxOY.js → pEUfw1x0.js} +1 -1
  172. package/web/app/immutable/chunks/{Bsgnuc3k.js → prrfQq6f.js} +1 -1
  173. package/web/app/immutable/chunks/{DVa-kQtc.js → puEh5oJr.js} +4 -4
  174. package/web/app/immutable/chunks/{DRmM5gTo.js → q6-D_vn6.js} +1 -1
  175. package/web/app/immutable/chunks/{B-vv1agI.js → qshqk_Zv.js} +1 -1
  176. package/web/app/immutable/chunks/{C1r6VU8i.js → qvHk51jx.js} +2 -2
  177. package/web/app/immutable/chunks/{a4fF0apV.js → r8ylcc1d.js} +1 -1
  178. package/web/app/immutable/chunks/{R9tUAGJO.js → u8Ybsqvl.js} +1 -1
  179. package/web/app/immutable/chunks/{DMAAeEjh.js → wk8l4Vfb.js} +1 -1
  180. package/web/app/immutable/chunks/{B10IM79i.js → wz1UgZlY.js} +1 -1
  181. package/web/app/immutable/chunks/{fdlSdJMU.js → yW5sglFu.js} +1 -1
  182. package/web/app/immutable/chunks/{BEN2zFww.js → ydrF5SOC.js} +1 -1
  183. package/web/app/immutable/chunks/{jRjYIDnt.js → zgX_Rwbq.js} +1 -1
  184. package/web/app/immutable/entry/{app.DwRPZdEe.js → app.DF_Qftdw.js} +2 -2
  185. package/web/app/immutable/entry/start.DzVa4jHd.js +1 -0
  186. package/web/app/immutable/nodes/{0.Opr0LpNR.js → 0.KW34tjG8.js} +1 -1
  187. package/web/app/immutable/nodes/{1.DxR1peSG.js → 1.CHhQxwtD.js} +1 -1
  188. package/web/app/immutable/nodes/{10.BMejDu10.js → 10.CGdaTN_a.js} +1 -1
  189. package/web/app/immutable/nodes/{14.C8M6elt-.js → 14.BTTvfbc0.js} +1 -1
  190. package/web/app/immutable/nodes/{16.Buvqlzgi.js → 16.DD-jxx3d.js} +2 -2
  191. package/web/app/immutable/nodes/{2.DGI0QMTl.js → 2.CTO1JTL7.js} +3 -3
  192. package/web/app/immutable/nodes/{3.CDWebO9a.js → 3.BE75vqzp.js} +1 -1
  193. package/web/app/immutable/nodes/{4.Dxmt1auu.js → 4.BUm0nN8e.js} +1 -1
  194. package/web/app/immutable/nodes/{5.CSz7wDme.js → 5.BRXD3vaZ.js} +1 -1
  195. package/web/app/immutable/nodes/{6.C8qeE1kc.js → 6.CWxGKv_E.js} +1 -1
  196. package/web/app/immutable/nodes/{7.BicRzjRG.js → 7.DI6-BnKI.js} +1 -1
  197. package/web/app/immutable/nodes/{8.BB2n9bBQ.js → 8.5BsghwEn.js} +2 -2
  198. package/web/app/immutable/nodes/{9.B1_vasqC.js → 9.-PRJswf6.js} +1 -1
  199. package/web/app/version.json +1 -1
  200. package/web/index.html +9 -9
  201. package/web/app/immutable/chunks/C1pLdIna.js +0 -1
  202. package/web/app/immutable/entry/start.ksbZjpza.js +0 -1
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BRqvd9LR.js","/app/immutable/chunks/D-Zd1oaK.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/BL_sVoge.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/chunks/D3ROSEe0.js","/app/immutable/chunks/CgPr4hs2.js","/app/immutable/chunks/P80hEEPK.js","/app/immutable/chunks/Ps9iRbKd.js","/app/immutable/chunks/CsstSIr0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/Co_Aa6ij.js","/app/immutable/chunks/DJuSbP_R.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/BKANDKfj.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CskCO23D.js","/app/immutable/chunks/mR2QgOoI.js","/app/immutable/chunks/BA6v9DYL.js","/app/immutable/chunks/PJ-tEAYj.js","/app/immutable/chunks/BYCiS1o9.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/rpeM9FmT.js","/app/immutable/chunks/CXwlKBiL.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/RDBJJxOY.js","/app/immutable/chunks/YnEJ07_G.js","/app/immutable/chunks/CvXnZ-8G.js","/app/immutable/chunks/Df2ohObb.js","/app/immutable/chunks/B7NNbItI.js","/app/immutable/chunks/CFHzcj7N.js","/app/immutable/chunks/CSYt80U-.js","/app/immutable/chunks/CE7ZtQHh.js","/app/immutable/chunks/wSFhIxGo.js","/app/immutable/chunks/D32qvOGn.js","/app/immutable/assets/connection-label.UE5obH5A.css","/app/immutable/chunks/DaNfseRw.js","/app/immutable/chunks/CsBmR9QJ.js","/app/immutable/chunks/DOzFltDq.js","/app/immutable/chunks/Bo4f3vLH.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css"])))=>i.map(i=>d[i]);
2
- import{G9 as n,mG as w,mx as g,mw as v,l4 as te,pe as re,hA as se,tx as Je,iW as Ye,AR as Xe,t3 as Qe,mN as Re,l7 as C,oW as Ze,l6 as et,kL as tt,aI as de,kV as rt,k$ as st,Dg as at,AP as nt,xk as ot,mL as ct,l9 as it}from"./BL_sVoge.js";import{b as lt,p as ut,E as dt,y as pt}from"./wSFhIxGo.js";import{aU as J,aQ as ae,cz as _,cC as pe,ck as mt,dj as D,cA as Te,aR as ft,df as ht,n as me,N as St,dh as gt,c0 as yt,aj as bt,at as kt,ac as vt,bz as wt,cw as It,cT as _t,ci as Ct,bA as At}from"./Df2ohObb.js";import{q as Et}from"./CE7ZtQHh.js";import{ad as Rt,cA as Tt,aQ as Pt,aq as Ot,p as Wt}from"./DOzFltDq.js";import{z as Nt,p as xt}from"./BRqvd9LR.js";import{bo as m,_ as $}from"./CgPr4hs2.js";import{i as k}from"./CvXnZ-8G.js";import{I as Mt}from"./P80hEEPK.js";import{c as Pe}from"./ChTqQfQN.js";import{L as W}from"./BEOSERRe.js";import{aa as Lt,j as Dt,h as N,a3 as Ut,n as Gt}from"./CsBmR9QJ.js";import{q as jt}from"./rpeM9FmT.js";import{r as L}from"./DVkfuwKw.js";import{aF as Ft,I as qt,K as Ht,r as $t}from"./YnEJ07_G.js";import{br as fe,bs as he,ax as Oe}from"./Ps9iRbKd.js";import{d as Bt,o as Se,l as ge,s as ye}from"./CpHIRYx9.js";const us=n.createSelector(e=>e.workspaceShare.open),ds=n.createSelector(e=>e.workspaceShare.workspaceId),ps=n.createSelector(e=>{const{open:t,workspaceId:r,session:s}=e.workspaceShare;return t&&r?{workspaceId:r,session:s}:null}),ne=n.createSelector(e=>{const{open:t,workspaceId:r,withheld:s}=e.workspaceShare;return!t||!r||s||w(e.workspaceShare,r).inviteWithheld?!1:J.select(e,r)}),ms=n.createSelector(e=>e.workspaceShare.createRequest),fs=n.createSelector(e=>e.workspaceShare.mutationGeneration),hs=n.createSelector(e=>e.workspaceShare.workspaceTitle),Ss=n.createSelector(e=>g(e.workspaceShare.members)),gs=n.createSelector((e,t)=>v(e.workspaceShare.members,t)!==void 0),ys=n.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!w(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),bs=n.createSelector(e=>{const{principals:t,members:r}=e.workspaceShare;return g(t).filter(s=>!v(r,s.principalId)&&(s.hostRole===void 0||s.hostRole==="guest"))}),ks=n.createSelector(e=>e.workspaceShare.guestCount),vs=n.createSelector(e=>e.workspaceShare.guestLimit),ws=n.createSelector(e=>e.workspaceShare.loadStatus==="loading"),Is=n.createSelector(e=>e.workspaceShare.loadError),_s=n.createSelector(e=>e.workspaceShare.creating),Cs=n.createSelector(e=>e.workspaceShare.createError),As=n.createSelector(e=>e.workspaceShare.createdLink),Es=n.createSelector(e=>e.workspaceShare.revokingInviteId),Rs=n.createSelector(e=>e.workspaceShare.removingPrincipalId),Ts=n.createSelector(e=>e.workspaceShare.addingPrincipalId),Ps=n.createSelector(e=>e.workspaceShare.actionError),Os=n.createSelector((e,t)=>w(e.workspaceShare,t).loadStatus!=="idle"),Ws=n.createSelector((e,t)=>t?g(w(e.workspaceShare,t).members):[]),Ns=n.createSelector((e,t)=>!!t&&!w(e.workspaceShare,t).withheld&&J.select(e,t));n.createSelector((e,t)=>!!t&&w(e.workspaceShare,t).withheld);const xs=n.createSelector((e,t)=>t?w(e.workspaceShare,t).removingPrincipalId:null);n.createSelector((e,t)=>t?w(e.workspaceShare,t).removeError:null);const Ms=n.createSelector(e=>e.workspaceShare.integrationAuth),Ls=n.createSelector(e=>e.workspaceShare.ownerForgeMissing),Y=n.createSelector(e=>ne.select(e)&&ae.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===_.select(e)),Vt=n.createSelector(e=>Y.select(e)?e.workspaceShare.sharingEnabled:null),Ds=n.createSelector(e=>Y.select(e)&&e.workspaceShare.sharingChecking),zt=n.createSelector(e=>Y.select(e)&&e.workspaceShare.sharingEnabling),Kt=n.createSelector(e=>Y.select(e)?e.workspaceShare.sharingError:null),Us=n.createSelector(e=>{if(!ne.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||ae.select(e)&&Vt.select(e)===null&&Kt.select(e)===null&&!zt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Gs=n.createSelector(e=>ne.select(e)&&!!e.workspaceShare.workspaceId&&(ae.select(e)||(be.select(e)?be.select(e)===pe.select(e)?.principal.id:mt.select(e,e.workspaceShare.workspaceId)))&&pe.select(e)?.capabilities.workspaceGuestRoles===!0),js=n.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),Fs=n.createSelector(e=>e.workspaceShare.roleErrors),be=n.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?D.select(e,t)?.ownerPrincipalId??null:null}),Jt=n.createSelector(e=>{const t=_.select(e),r=lt.select(e);return{context:t,workspaceIds:t?r.filter(s=>J.select(e,s)):[]}}),qs=n.createSelector((e,t)=>{const r=w(e.workspaceShare,t);return{context:r.inviteContext,generation:r.inviteGeneration,withheld:r.inviteWithheld}}),Yt=[],Xt=n.createSelector((e,t)=>{const r=_.select(e),s=w(e.workspaceShare,t);if(!r||s.inviteContext!==r||s.inviteWithheld||!J.select(e,t))return Yt;const a=e.presence?.context===r?e.presence.members[t]:void 0,o=new Set(a?g(a).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>s.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(a&&i.redeemedByPrincipalId&&v(a,i.redeemedByPrincipalId))return!1;if(!l)return!0;const u=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(u)||c.has(u)?!1:(c.add(u),!0)})}),Hs=n.createSelector(e=>{const r=Jt.select(e).workspaceIds.flatMap(s=>Xt.select(e,s).map(a=>Date.parse(a.expiresAt)));return r.length?Math.min(...r):null});function $s(e){return Object.entries(e).some(([t,r])=>r.available&&Et(t,r.authenticated))}const Bs=n.createSelector(e=>e.hostRequirements.git),Vs=n.createSelector(e=>e.hostRequirements.node),zs=n.createSelector(e=>e.hostRequirements.gh),Ks=n.createSelector(e=>e.hostRequirements.checking),Js=n.createSelector(e=>e.hostRequirements.hasCheckedOnce);function We(e){const t=e.gitlabAuth?.statusFailed===!0;return Rt({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const Ys=n.createSelector(We),Xs=n.createSelector(e=>e.hostRequirements.node.ok&&(e.hostRequirements.git.available||We(e))),Qs=n.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),Zs="22.0.0";function Qt(e){return e.length>15?`${e.slice(0,15)}…`:e}function V(e){return e.name?.trim()||Qt(e.clientId)}function ea(e){const{eligibleClients:t,ownClientId:r,driving:s,pinnedClientId:a}=e,o=t.find(l=>l.clientId===r&&l.connected),c=s!==null&&!s.connected,i=!s||s.clientId===r;return{mode:c?"offline":i?"here":"elsewhere",hostName:s?V(s):o?V(o):"",canSwitchHere:!!(o&&a!==r)}}const ta=n.createSelector(e=>e?.browserClients?.ownClientId??null),ra=n.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);n.createSelector(e=>g(e.browserClients.liveClients));const sa=n.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);n.createSelector((e,t)=>v(e.browserClients.liveClients,t));const aa=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??te).browserClient),na=n.createSelector((e,t)=>{const r=e?.browserClients?.byWorkspaceId[t];return r?.pinnedClientId!==void 0||r?.browserClient!=null});function ee(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const oa=n.createSelector((e,t)=>{const r=e?.browserClients??re,s=r.byWorkspaceId[t]?.liveClients??se(),a=g(s).filter(y=>y.capabilities.browserExec===!0).map(ee),o=(r.byWorkspaceId[t]??te).browserClient,c=r.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Nt(o):void 0;let u=null;if(o?.resolved){const y=v(s,o.resolved.clientId);u=y?ee(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?u={clientId:o.clientId,connected:!1}:l&&(u={clientId:l.clientId,connected:!1});return{eligibleClients:a,ownClientId:r.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:u,pinnedClientId:i}}),ca=n.createSelector((e,t)=>{const r=e?.browserClients??re;if(!r.ownClientId||!r.ownClientIdConfirmed)return!1;const s=r.byWorkspaceId[t]?.liveClients??se(),a=v(s,r.ownClientId);return a!==void 0&&a.capabilities.browserExec!==!0}),ia=n.createSelector((e,t,r)=>{const s=e?.browserClients??re,a=r?s.byWorkspaceId[r]?.liveClients??se():s.liveClients,o=r?s.byWorkspaceId[r]?.liveClientsLoaded:s.liveClientsLoaded,c=v(a,t);return c?{name:V(ee(c)),connected:!0}:{name:V({clientId:t}),connected:!o}}),la=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??te).tabsRevision),ua=n.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),M=new Map;function da(e,t){return M.set(e,t),()=>{M.get(e)===t&&M.delete(e)}}async function pa(e){const t=M.get(e);return t?t():null}function ma(e){M.delete(e)}const Ne="From repo config",fa="repo-config";function ha(e,t){return t==="repo-config"?m.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?m.workspace_setupScriptEditor_custom_name():e}function xe(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function Zt(e){let t;try{t=JSON.parse(e)}catch{return null}return xe(t).setupScript}async function Sa(e){if(!e)return null;try{const t=await k(Mt.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),r=t?.success?t.data?.content:null;return typeof r=="string"?Zt(r):null}catch{return null}}async function ga(e,t,r){if(!e||!t)return null;try{const{appClient:s}=await $(async()=>{const{appClient:o}=await import("./BRqvd9LR.js").then(c=>c.X);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url),a=await s.integrations.githubRepoConfig(e,t,r);return xe(a.config).setupScript}catch{return null}}function ya(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ne&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function ba(e){const{repoConfigScript:t,lastUsed:r,genericTemplate:s}=e;return t?{content:t,name:Ne,source:"repo-config"}:r?{content:r.content,name:r.nameSource==="repo-config"?"Custom":r.name,source:r.nameSource==="repo-config"?"custom":r.nameSource??"named"}:s?{content:s.content,name:s.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Me="setup-scripts:last-used-by-repo",Le="setup-scripts:recent-by-repo",z=20,De=10,er=["repo-config","custom","named"];function oe(e,t){return t?`${e}\0${t}`:e}function Ue(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||er.includes(t.nameSource))}function K(){try{const e=localStorage.getItem(Me);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const r={};for(const[s,a]of Object.entries(t))s&&Ue(a)&&(r[s]=a);return r}catch{return{}}}function Ge(){try{const e=localStorage.getItem(Le);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const r={};for(const[s,a]of Object.entries(t)){if(!s||!Array.isArray(a))continue;const o=a.filter(Ue);o.length>0&&(r[s]=o)}return r}catch{return{}}}function tr(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function je(e){return[...e].sort((t,r)=>r.usedAt.localeCompare(t.usedAt))}function Fe(e){const t=[];for(const r of e)t.some(s=>tr(s,r))||t.push(r);return t}function ka(e,t){if(!e)return[];const r=oe(e,t),s=Ge()[r]??[],a=K()[r];return Fe(je(a?[...s,a]:s)).slice(0,De).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function rr(e,t,r){try{const s=Ge(),a=s[e]??(r?[r]:[]);s[e]=Fe([t,...je(a)]).slice(0,De);const o=Object.entries(s);o.length>z&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=z),localStorage.setItem(Le,JSON.stringify(Object.fromEntries(o)))}catch{}}function va(e,t){if(!e)return;const r=K()[oe(e,t)];return r?{name:r.name,content:r.content,nameSource:r.nameSource??"named"}:void 0}function wa(e,t,r){const s=t.content.trim();if(!e||!s)return;const a=oe(e,r),o={name:t.name,content:s,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};rr(a,o,K()[a]);try{const c=K();c[a]=o;const i=Object.entries(c);i.length>z&&(i.sort(([,l],[,u])=>u.usedAt.localeCompare(l.usedAt)),i.length=z),localStorage.setItem(Me,JSON.stringify(Object.fromEntries(i)))}catch{}}const j=Pe("ProviderAvailabilityClient");let E=null;async function Ia(){if(typeof window>"u")return j.debug("Skipping provider availability check - not in browser environment"),ke();const e=Te.select(n.state);if(E&&E.connection===e)return j.debug("Joining in-flight provider availability request"),E.promise;const t={},r=(async()=>{try{j.debug("Checking provider availability via IPC");const s=await k(xt.GET_AVAILABILITY);if(!s.success)throw new Error(s.error||"Failed to get provider availability");const a=s.data??ke();return j.debug("Provider availability fetched",{hasAnyProvider:a.hasAnyProvider,auggie:a.providers.auggie.available,claudeCode:a.providers.claudeCode.available,codex:a.providers.codex.available,cortex:a.providers.cortex.available,mock:a.providers.mock?.available??!1,opencode:a.providers.opencode.available,droid:a.providers.droid?.available??!1,grok:a.providers.grok?.available??!1,unsloth:a.providers.unsloth?.available??!1}),a}finally{E?.token===t&&(E=null)}})();return E={connection:e,token:t,promise:r},r}function ke(){return{hasAnyProvider:!1,providers:{auggie:{available:!1},claudeCode:{available:!1},codex:{available:!1},cortex:{available:!1},mock:{available:!1},opencode:{available:!1},pi:{available:!1},droid:{available:!1},grok:{available:!1},unsloth:{available:!1}}}}const sr={async isAuthenticated(e){try{return await k(W.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await k(W.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await k(W.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await k(W.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await k(W.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},_a=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:sr},Symbol.toStringTag,{value:"Module"})),I={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},ar={async isAuthenticated(e){try{return await k(I.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await k(I.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await k(I.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await k(I.LOGOUT)},async fetchProjects(e){try{return await k(I.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await k(I.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,r){try{return await k(I.SEARCH_ISSUES,{query:e,project:t,...r})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await k(I.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},Ca=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:ar},Symbol.toStringTag,{value:"Module"})),ce=n.createSelector(e=>{const t=_.select(e);return!t||!ft.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),X=n.createSelector((e,t)=>v(e.repositoryCheckout.forms,t)??null),Aa=n.createSelector((e,t)=>{const r=X.select(e,t);return r?.admission===ce.select(e)&&r.status==="ready"?g(r.projects):[]}),Ea=n.createSelector((e,t)=>{const r=X.select(e,t);return r?.admission===ce.select(e)&&r.status==="ready"?g(r.branches):[]}),nr=n.createSelector((e,t)=>{const r=X.select(e,t);return!r||r.status!=="ready"||r.admission!==ce.select(e)||!r.capture||!r.project||!r.branch?null:{checkoutId:r.capture.checkoutId,revision:r.capture.revision,projectPath:r.project.projectPath,branch:r.branch.name,commitSha:r.branch.commitSha,mode:r.mode}}),Ra=n.createSelector((e,t)=>{const r=nr.select(e,t);return!!r&&(r.mode==="direct"||X.select(e,t)?.warmStatus==="ready")}),Ta="__new-workspace__",Pa="__initializer__",Oa="compact-workspace-initializer-state-prompt",Wa="onboarding-prompt",F=20*1024*1024,ve=Pe("NewWorkspaceDraft");function Na(e,t){if(e.length>F)return ve.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:F}),null;const r=Lt(t);if(r.length===0)return{text:e};const s=[];let a=e.length+2,o=0;for(const c of r){const i=JSON.stringify(c).length+1;if(a+i>F){o+=1;continue}s.push(c),a+=i}return o>0&&ve.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:F,attachmentCount:r.length,droppedCount:o}),s.length>0?{text:e,attachments:s}:{text:e}}const or="host.providerAuthStatus";function cr(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function ir(e,t){const r=t.toLowerCase(),s=e.toLowerCase();return r.startsWith(s)?/^(['’]s\s+organization)?$/.test(r.slice(s.length)):!1}function lr(e){const{email:t,orgName:r}=e??{};return t&&r?ir(t,r)?t:`${t} · ${r}`:t||r||void 0}function ur(e){const t={};for(const r of e?.providers??[]){const s={authenticated:r.authenticated??void 0},a=lr(r.identity);a!==void 0&&(s.authDetails=a),r.identity?.email&&(s.email=r.identity.email),t[r.id]=s}return t}const dr=6e4,T=new Map,q=new Map,R=new Map;let B=0,qe=0;const pr=e=>JSON.stringify([Te.select(n.state),qe,e.workspaceId??null,e.providerId??"*"]);function mr(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,s=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof s=="string"?s:void 0}function Q(e){if(B+=1,e)for(const t of T.keys()){const[,,,r]=JSON.parse(t);(r===e||r==="*")&&T.delete(t)}else T.clear()}typeof fe=="function"&&fe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(mr(e)??"")&&Q()});typeof he=="function"&&he(()=>{qe+=1,Q()});function fr(e={}){const t=pr(e);if(e.force)Q(e.providerId);else{const o=T.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&T.delete(t)}const r=q.get(t);if(!e.force&&r?.generation===B)return r.promise;if(r){const o=R.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=r.promise.catch(()=>({})).then(()=>(R.get(t)===c&&R.delete(t),fr({...e,force:c.force}))).finally(()=>{R.get(t)===c&&R.delete(t)});return c={force:e.force===!0,promise:i},R.set(t,c),i}const s=B,a=Oe(or,cr(e)).then(ur).then(o=>(s===B&&T.set(t,{verdicts:o,expiresAt:Date.now()+dr}),o)).finally(()=>{q.get(t)?.promise===a&&q.delete(t)});return q.set(t,{generation:s,promise:a}),a}function xa(e,t=e,r="default",s,a){if(!jt.select(n.state))return;const o=a??ut.select(n.state,t)??dt.select(n.state,t)[0];if(!o)return;const c=pt.select(n.state,t,o),i={type:"discussion",title:s??(r==="new"?m.workspace_discussion_new_title():m.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:r}},l=c?.tabs.find(u=>Je(u,i));r==="new"&&n.dispatch(Ye(e)),n.dispatch(l?Xe(t,l.id,o):Qe(t,i,o,void 0,!0,void 0,!0))}function Ma(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?m.workspace_discussion_conversation_title():m.workspace_discussion_title():e.participants.filter(s=>s.principalId!==t).map(s=>s.displayName||s.login||m.workspace_discussion_unknownAuthor_label()).join(", ")||m.workspace_discussion_group_title()}const hr=n.createSelector((e,t,r)=>{const s=Re(e.repositoryContext,t);return r!==null&&s.binding===r?s:null});n.createSelector((e,t,r)=>{const s=hr.select(e,t.workspaceId,r);return s?.status==="ready"?v(s.roots,L(t))?.context:void 0});const La=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission)return null;const r=Re(e.repositoryContext,t.workspaceId),s=r.ownership;return!s||s.demandId!==t.demandId||s.admission!==t.admission||s.request.workspaceId!==t.workspaceId?null:{status:r.status,scope:r.scope,revision:r.revision,roots:r.status==="ready"?g(r.roots).map(a=>a.context):[],unavailableReason:r.unavailableReason}}),Da=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission)return null;const r=e.repositoryContext.selectionEdits,s=r?v(r,t.editId):void 0;return s&&s.status!=="closed"&&s.owner.admission===t.admission&&L(s.owner.root)===L(t.root)?s:null}),Ua=n.createSelector((e,t)=>{const r=e.repositoryContext.selectionEdits;return!!r&&g(r).some(s=>s.owner.root.workspaceId===t&&s.owner.admission===_.select(e)&&(s.status==="capturing"||s.status==="pending"&&(!s.observation||s.observation.attempt?.status==="pending")))}),Ga=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission||t.hostContext===null||ht.select(e,t.root.workspaceId)!==t.hostContext)return null;const r=e.repositoryContext.nativeReviewAttempts,s=r?v(r,t.attemptId):void 0;return s&&s.status!=="closed"&&s.owner.admission===t.admission&&s.owner.hostContext===t.hostContext&&L(s.owner.root)===L(t.root)?s:null}),ja=n.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?v(e.repositoryContext.nativeReviewAttempts,t):void 0),Sr=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function gr(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function yr(e){const t=new Set(Sr);return gr(e).some(r=>t.has(r))}const br=new Set(["lastActivity","statusMessage","statusImageAssetId"]),kr=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function vr(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function wr(e){if(!e.type.startsWith("file:"))return null;const t=e.data,r=t?.relativePath??t?.path??t?.filePath;return typeof r=="string"&&r.length>0?r:null}function Ir(e){const t=wr(e);return!t||yr(t)?!1:!vr(t).some(r=>kr.has(r))}function _r(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const r=Object.keys(t.changes).filter(s=>s!=="workspaceId");return r.length>0&&r.every(s=>br.has(s))}function f(e){return typeof e=="string"?e.trim():""}function P(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function we(e){const t=P(e.data),r=f(t.agentId)||f(e.sessionId),s=f(t.messageId);return r&&s?JSON.stringify([r,s]):""}function Cr(e){const t=P(e.data),r={workspaceId:e.workspaceId,closable:!0},s=a=>a?{...r,type:"note",noteId:a,title:f(t.title)||f(t.noteTitle)||m.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return s(f(t.noteId));case"task:status-changed":return s(f(t.noteId)||f(t.linkedNoteId));case"spec:updated":case"goal:updated":return s("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const a=f(t.agentId)||f(e.sessionId);return a?{...r,type:"agent",agentId:a,title:f(t.agentName)||m.layout_tabTypes_agent_title()}:null}case"file:changed":{const a=f(t.path)||f(t.relativePath);return a&&t.action!=="delete"?{...r,type:"file",filePath:a,title:a.split(/[\\/]/).pop()||a}:null}case"git:commit":{const a=f(t.commit),o=f(t.gitRootId);return a?{...r,type:"changes",title:m.layout_tabTypes_changes_title(),data:{commitHash:a,...o?{gitRootId:o}:{}}}:null}default:return null}}function Ie(e,t){const r=P(e.data),s=Object.fromEntries(Object.entries(r).filter(([,c])=>typeof c=="string")),a=c=>t?m.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return N({...e,actor:{...e.actor,name:t},data:s});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return a(N({...e,actor:{...e.actor,name:void 0},data:s}));case"agent:updated":return f(r.modelId)||r.completionReportCleared===!0?a(N({...e,actor:{...e.actor,name:void 0},data:r})):null;case"file:changed":return Ir(e)?N({...e,actor:{...e.actor,name:t},data:{path:f(r.path)||f(r.relativePath),action:f(r.action)}}):null;case"comment:added":return t?m.events_activity_authorCommented_label({author:t}):m.workspace_peopleActivity_commented_label();case"comment:resolved":return r.resolved===!1?a(m.events_activity_reopenedCommentThread_label()):r.resolved===!0?a(m.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=f(r.agentName)||f(r.toAgentName);return a(c?m.workspace_peopleActivity_messagedAgent_label({agent:c}):m.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return a(N({...e,actor:{...e.actor,name:void 0},data:{taskName:f(r.taskName)||f(r.noteTitle),newStatus:f(r.newStatus)||f(r.status)}}));case"workspace:created":return a(m.events_activity_createdWorkspace_label());case"workspace:updated":{if(_r(e))return null;const c=P(r.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=f(c.title);return a(i?m.events_activity_renamedWorkspaceTo_label({title:i}):m.events_activity_updatedWorkspace_label())}default:return null}}function x(e,t){const r=f(e);return r===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(r)?"":r}function Ar(e,t,r,s){const a=new Map(r.map(d=>[d.principalId,d])),o=new Map;for(const d of t){if(d.workspaceId!==e||d.type!=="agent:last-message")continue;const p=P(d.data),h=me({role:p.role==="user"?"user":"system",author:p.author,metadata:p.metadata}),S=we(d);if(!h||!S||typeof p.lastUserMessage!="string")continue;const b=Dt({id:f(p.messageId),role:"user",timestamp:d.timestamp,contentBlocks:[{type:"text",text:p.lastUserMessage}],author:h,metadata:p.metadata},s);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let u=0;for(const d of t){if(d.workspaceId!==e||!f(d.id)||c.has(d.id))continue;const p=Date.parse(d.timestamp);if(!Number.isFinite(p)){u++;continue}const h=P(d.data),S=d.type==="agent:message",b=S?me({role:h.role==="user"?"user":"system",author:h.author,metadata:h.metadata}):null;if(S?!b:d.actor?.type!=="user"){S&&h.role==="user"&&d.actor?.type==="user"&&St(h.metadata)&&l.push({row:null,timestamp:p,segment:u});continue}const Ke=S?f(h.messageId):"",O=S?we(d):"";if(O&&i.has(O))continue;const A=f(d.actor?.id),Z=A?a.get(A):void 0,U=b?x(b.displayName,b.principalId??"")||x(b.login,b.principalId??""):x(d.actor.name,A)||x(Z?.displayName,A)||x(Z?.login,A),le=Ie(d,"");if(!le)continue;if(!U){l.push({row:null,timestamp:p,segment:u});continue}const G=S?o.get(O)??null:null,ue=G?m.workspace_peopleActivity_actorAction_label({name:U,action:G}):Ie(d,U);ue&&(c.add(d.id),O&&i.add(O),l.push({timestamp:p,segment:u,row:{id:d.id,name:U,principalId:b?f(b.principalId)||null:A||null,avatarUrl:b?b.avatarUrl:Z?.avatarUrl??null,label:ue,actionLabel:G??le,continuation:!1,timestamp:d.timestamp,destination:Cr(d),messageId:Ke||null,messagePreview:G}}))}l.sort((d,p)=>p.timestamp-d.timestamp);const y=[];for(const[d,p]of l.entries()){if(!p.row)continue;const h=l[d-1],S=h?h.timestamp-p.timestamp:NaN;p.row.continuation=!!(p.row.principalId&&h?.row?.principalId===p.row.principalId&&h.segment===p.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(p.row)}return y}const Fa=n.createSelector(e=>e.workspaceEvents.subscriptionAttempt),qa=n.createSelector(e=>e.workspaceEvents.subscriptionGeneration),Er=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).events);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).loading);const Ha=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).nextToken);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).loadingOlder);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).olderError);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).endReached);const $a=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Ba=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),Va=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),He=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).peopleStreams),za=n.createSelector((e,t)=>Object.values(He.select(e,t)).every(r=>r.initialized&&r.nextToken===null)),Ka=n.createSelector((e,t,r)=>{const s=Er.select(e,t),o=Ar(t,s,Tt.select(e,t),D.select(e,t)?.ownerPrincipalId)[r-1]?.timestamp,c=He.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const u=s.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!u||!(Date.parse(u)<=Date.parse(o))})}),Ja=n.createSelector((e,t)=>{const r=[],s=new Set,a=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!s.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(a.has(l))return;a.add(l)}s.add(i),r.push(c)}};for(const[c,i]of Object.entries(Ut.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of gt.select(e,t)){const i=yt.select(e,c),l=[...bt.select(e,c),...kt.select(e,c)];for(const u of l)if(u.role==="user")for(const[y,d]of(u.contentBlocks??[]).entries()){if(d.type!=="image"&&!Gt(d))continue;const p=d.id?i?.[Ze(u.id,d.id)]:void 0,h=p?.status==="loaded"?p.block:d;o({id:`${c}/${u.id}/${d.id??y}`,name:h.fileName,block:h,agentId:c,messageId:u.id,hydration:p})}}return r}),Rr=n.createSelector((e,t)=>e.context.byWorkspaceId[t]??et),Tr=n.createSelector((e,t)=>g(Rr.select(e,t).items)),Ya=n.createSelector((e,t)=>Tr.select(e,t).filter(r=>!r.parentNoteId)),Xa=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??$e),Qa=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??$e),$e={},Za=n.createSelector((e,t,r)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?v(s,r):void 0}),Be=n.createSelector((e,t)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?g(r):[]}),en=n.createSelector((e,t)=>Be.select(e,t).some(r=>r.status==="queued"||r.status==="running")),tn=n.createSelector((e,t)=>Be.select(e,t).filter(r=>r.operation.kind==="partialCommit"&&(r.status==="queued"||r.status==="running")));function _e(e){return e.title||`PR #${e.number}`}const ie=n.createSelector((e,t)=>{const r=e.gitRoots?.byWorkspaceId?.[t];return r?g(r.gitRoots):[]});function Pr(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Or(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const rn=n.createSelector((e,t)=>{const r=D.select(e,t),s=ie.select(e,t).map(Or);return r?[Pr(r),...s]:s}),sn=n.createSelector((e,t)=>ie.select(e,t).length>0),an=n.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),Wr=n.createSelector((e,t,r)=>v((e.acceptWorkflow.byWorkspaceId[t]??tt).operations,r)),nn=n.createSelector((e,t,r)=>Wr.select(e,t,r)?.status==="running"),on=n.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),cn=n.createSelector((e,t)=>{const r=vt.select(e,t)?.hasRemote??!1,s=D.select(e,t)?.pullRequests?.some(a=>a.status===de.Open||a.status===de.Draft)??!1;return{squash:!1,viaPR:r&&s,pushAfter:r,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),ln=n.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),un=n.createSelector((e,t)=>{const r=D.select(e,t),s=wt.select(e,t),a=It.select(e,t),o=r?.repositoryOwner&&r.repositoryName?`${r.repositoryOwner}/${r.repositoryName}`:void 0,c=Pt(Ot(r?.pullRequests,r?.activePullRequest,(i,l)=>Wt(i,r?.repositoryOwner,r?.repositoryName,l),_e,o),_t.select(e,t),o,ie.select(e,t),_e).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:At.select(e,t),owner:!Ct.select(e,t),authenticated:Ft.select(e),pushedCount:s.filter(i=>i.isPushed).length,hasRemote:a.hasRemote,clearReset:a.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(a.mergeHeadSha&&s[0]?.hash&&a.mergeHeadSha!==s[0].hash)}}),dn=n.createSelector((e,t,r)=>e.bgExecutor?.byWorkspaceId[t]?.executors[r]??rt),Nr=n.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??st);n.createSelector((e,t,r)=>Nr.select(e,t).operations[r]);const pn=n.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),mn=n.createSelector(e=>e.noteReadTracking.readRecords),xr="host.providerTestPrompt",Mr=Bt("ok",[Se({ok:ge(!0)}).passthrough(),Se({ok:ge(!1),reason:ye().min(1),message:ye()}).passthrough()]),Lr=3e5;async function fn(e){const t=await Oe(xr,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:Lr}),r=Mr.parse(t);return(r.ok||r.reason==="auth-required")&&Q(e.providerId),r}const Dr=-1,Ur=/^remote-script-lost:\s*/,Gr=["idle","starting","running","restarting","exited"],Ce=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Ae=e=>typeof e=="string"&&e.trim().length>0;function jr(e){return Ce(e)&&Ae(e.remoteAgentId)&&Ae(e.nodeId)&&Ce(e.runtime)&&Gr.includes(e.runtime.status)}function hn(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(jr):[]}function Sn(e,t,r){const s=qt(e.nodeId,r)??{nodeId:e.nodeId,name:m.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(r&&r.id===e.nodeId)return s;const a=t?.nodeId===e.nodeId?t:null;return{...s,name:a?.nodeName?.trim()||s.name,platform:Ht(a?.placement?.os,a?.placement?.arch)}}function Fr(e){return e.status==="exited"&&e.exitCode===Dr}function qr(e){const t=e.error?.trim().replace(Ur,"").trim();switch(t){case"the machine disconnected":return m.scripts_remote_lostDisconnected_label();case"the machine was removed":return m.scripts_remote_lostRemoved_label();case"the agent was deleted":return m.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return m.scripts_remote_lostAgentStopped_label();default:return t||m.scripts_remote_lostReason_fallback()}}function gn(e){if(Fr(e))return{kind:"lost",label:m.scripts_remote_lost_tooltip({reason:qr(e)})};const t=$t(e);switch(t){case"running":return{kind:t,label:m.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:m.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:m.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:m.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:m.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:m.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:m.terminal_quakeOverlay_status_exited()}}}const H=e=>typeof e=="string"&&e.length>0,Hr=/\bremote-script-agent-ending:/;function yn(e){return!!e&&Hr.test(e)}function bn(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const r=t,s=e instanceof Error&&e.message?{message:e.message}:{};return r.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:r.update==="backend"?"backend":"machine",...H(r.machineVersion)?{machineVersion:r.machineVersion}:{},...H(r.backendVersion)?{backendVersion:r.backendVersion}:{},...s}:r.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(r.attempts)?r.attempts.flatMap(o=>{const c=o??{};return H(c.route)&&H(c.error)?[{route:c.route,error:c.error}]:[]}):[],...s}:null}function Ee(e,t,r){const a=t.find(c=>String(c.id)===e)?.name?.trim();if(a)return a;const o=r?.trim();return o||Ve(e)}function Ve(e){return e.length>14?`${e.slice(0,14)}…`:e}function kn(e,t,r){const s=new Map,a={ownerAgentId:null,ownerName:null,entries:[]},o=(i,l)=>{let u=s.get(i);return u?u.ownerName===Ve(i)&&(u.ownerName=Ee(i,r,l)):(u={ownerAgentId:i,ownerName:Ee(i,r,l),entries:[]},s.set(i,u)),u};for(const{tab:i,panelId:l,active:u}of e)(i.ownerAgentId?o(i.ownerAgentId,i.ownerAgentName):a).entries.push({tab:i,panelId:l,active:u,hidden:!1});for(const i of t){if(i.type!=="browser")continue;(i.ownerAgentId?o(i.ownerAgentId,i.ownerAgentName):a).entries.push({tab:i,active:!1,hidden:!0})}const c=[...s.values()];return a.entries.length>0&&c.push(a),c}function vn(e){const r=e.filter(a=>a.runtime.status==="running"&&a.runtime.detectedUrl?.trim()).sort((a,o)=>(o.runtime.startedAt??"").localeCompare(a.runtime.startedAt??""))[0],s=r?.runtime.detectedUrl?.trim();return!r||!s?null:{scriptId:r.id,name:r.name,url:s}}const $r={status:"idle",error:null},Br=n.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??$r);n.createSelector((e,t)=>Br.select(e,t).error);const wn=n.createSelector((e,t)=>v(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),ze=n.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),Vr=e=>e==="hydrated"||e==="live",In=n.createSelector((e,t)=>{const r=ze.select(e,t);return r==="hydrated"||r==="live"}),_n=n.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(r=>Vr(t[r]))}),Cn=n.createSelector((e,t)=>ze.select(e,t)==="live");function An(e){const{selectedProviderId:t,activeProviderId:r,recommitActive:s,dispatch:a}=e;if(t&&!(!s&&t===r))return a(at({providerId:t,enabled:!0})),a(nt(t)),a(ot()),t}function En(e){const t=[];for(const r of e){let s={};if(r.metadata)try{s=JSON.parse(r.metadata)}catch{}const a=[];if(a.push(`[${r.identifier}] ${r.title}`),r.url&&a.push(`URL: ${r.url}`),r.description&&a.push(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BRqvd9LR.js","/app/immutable/chunks/D-Zd1oaK.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/BL_sVoge.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/chunks/D3ROSEe0.js","/app/immutable/chunks/CgPr4hs2.js","/app/immutable/chunks/P80hEEPK.js","/app/immutable/chunks/Ps9iRbKd.js","/app/immutable/chunks/CsstSIr0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/Co_Aa6ij.js","/app/immutable/chunks/DJuSbP_R.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/BKANDKfj.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CskCO23D.js","/app/immutable/chunks/mR2QgOoI.js","/app/immutable/chunks/BA6v9DYL.js","/app/immutable/chunks/PJ-tEAYj.js","/app/immutable/chunks/BYCiS1o9.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/rpeM9FmT.js","/app/immutable/chunks/CXwlKBiL.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/pEUfw1x0.js","/app/immutable/chunks/Cro1ceUg.js","/app/immutable/chunks/CvXnZ-8G.js","/app/immutable/chunks/Df2ohObb.js","/app/immutable/chunks/B7NNbItI.js","/app/immutable/chunks/CFHzcj7N.js","/app/immutable/chunks/S_AAYsIr.js","/app/immutable/chunks/CE7ZtQHh.js","/app/immutable/chunks/wSFhIxGo.js","/app/immutable/chunks/D32qvOGn.js","/app/immutable/assets/connection-label.UE5obH5A.css","/app/immutable/chunks/BQAjYSZn.js","/app/immutable/chunks/C-BS-coA.js","/app/immutable/chunks/86pQg5ba.js","/app/immutable/chunks/Bo4f3vLH.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css"])))=>i.map(i=>d[i]);
2
+ import{G9 as n,mG as w,mx as g,mw as v,l4 as te,pe as re,hA as se,tx as Je,iW as Ye,AR as Xe,t3 as Qe,mN as Re,l7 as C,oW as Ze,l6 as et,kL as tt,aI as de,kV as rt,k$ as st,Dg as at,AP as nt,xk as ot,mL as ct,l9 as it}from"./BL_sVoge.js";import{b as lt,p as ut,E as dt,y as pt}from"./wSFhIxGo.js";import{aU as J,aQ as ae,cz as _,cC as pe,ck as mt,dj as D,cA as Te,aR as ft,df as ht,n as me,N as St,dh as gt,c0 as yt,aj as bt,at as kt,ac as vt,bz as wt,cw as It,cT as _t,ci as Ct,bA as At}from"./Df2ohObb.js";import{q as Et}from"./CE7ZtQHh.js";import{ad as Rt,cA as Tt,aQ as Pt,aq as Ot,p as Wt}from"./86pQg5ba.js";import{z as Nt,p as xt}from"./BRqvd9LR.js";import{bo as m,_ as $}from"./CgPr4hs2.js";import{i as k}from"./CvXnZ-8G.js";import{I as Mt}from"./P80hEEPK.js";import{c as Pe}from"./ChTqQfQN.js";import{L as W}from"./BEOSERRe.js";import{aa as Lt,j as Dt,h as N,a3 as Ut,n as Gt}from"./C-BS-coA.js";import{q as jt}from"./rpeM9FmT.js";import{r as L}from"./DVkfuwKw.js";import{aF as Ft,I as qt,K as Ht,r as $t}from"./Cro1ceUg.js";import{br as fe,bs as he,ax as Oe}from"./Ps9iRbKd.js";import{d as Bt,o as Se,l as ge,s as ye}from"./CpHIRYx9.js";const us=n.createSelector(e=>e.workspaceShare.open),ds=n.createSelector(e=>e.workspaceShare.workspaceId),ps=n.createSelector(e=>{const{open:t,workspaceId:r,session:s}=e.workspaceShare;return t&&r?{workspaceId:r,session:s}:null}),ne=n.createSelector(e=>{const{open:t,workspaceId:r,withheld:s}=e.workspaceShare;return!t||!r||s||w(e.workspaceShare,r).inviteWithheld?!1:J.select(e,r)}),ms=n.createSelector(e=>e.workspaceShare.createRequest),fs=n.createSelector(e=>e.workspaceShare.mutationGeneration),hs=n.createSelector(e=>e.workspaceShare.workspaceTitle),Ss=n.createSelector(e=>g(e.workspaceShare.members)),gs=n.createSelector((e,t)=>v(e.workspaceShare.members,t)!==void 0),ys=n.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!w(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),bs=n.createSelector(e=>{const{principals:t,members:r}=e.workspaceShare;return g(t).filter(s=>!v(r,s.principalId)&&(s.hostRole===void 0||s.hostRole==="guest"))}),ks=n.createSelector(e=>e.workspaceShare.guestCount),vs=n.createSelector(e=>e.workspaceShare.guestLimit),ws=n.createSelector(e=>e.workspaceShare.loadStatus==="loading"),Is=n.createSelector(e=>e.workspaceShare.loadError),_s=n.createSelector(e=>e.workspaceShare.creating),Cs=n.createSelector(e=>e.workspaceShare.createError),As=n.createSelector(e=>e.workspaceShare.createdLink),Es=n.createSelector(e=>e.workspaceShare.revokingInviteId),Rs=n.createSelector(e=>e.workspaceShare.removingPrincipalId),Ts=n.createSelector(e=>e.workspaceShare.addingPrincipalId),Ps=n.createSelector(e=>e.workspaceShare.actionError),Os=n.createSelector((e,t)=>w(e.workspaceShare,t).loadStatus!=="idle"),Ws=n.createSelector((e,t)=>t?g(w(e.workspaceShare,t).members):[]),Ns=n.createSelector((e,t)=>!!t&&!w(e.workspaceShare,t).withheld&&J.select(e,t));n.createSelector((e,t)=>!!t&&w(e.workspaceShare,t).withheld);const xs=n.createSelector((e,t)=>t?w(e.workspaceShare,t).removingPrincipalId:null);n.createSelector((e,t)=>t?w(e.workspaceShare,t).removeError:null);const Ms=n.createSelector(e=>e.workspaceShare.integrationAuth),Ls=n.createSelector(e=>e.workspaceShare.ownerForgeMissing),Y=n.createSelector(e=>ne.select(e)&&ae.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===_.select(e)),Vt=n.createSelector(e=>Y.select(e)?e.workspaceShare.sharingEnabled:null),Ds=n.createSelector(e=>Y.select(e)&&e.workspaceShare.sharingChecking),zt=n.createSelector(e=>Y.select(e)&&e.workspaceShare.sharingEnabling),Kt=n.createSelector(e=>Y.select(e)?e.workspaceShare.sharingError:null),Us=n.createSelector(e=>{if(!ne.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||ae.select(e)&&Vt.select(e)===null&&Kt.select(e)===null&&!zt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Gs=n.createSelector(e=>ne.select(e)&&!!e.workspaceShare.workspaceId&&(ae.select(e)||(be.select(e)?be.select(e)===pe.select(e)?.principal.id:mt.select(e,e.workspaceShare.workspaceId)))&&pe.select(e)?.capabilities.workspaceGuestRoles===!0),js=n.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),Fs=n.createSelector(e=>e.workspaceShare.roleErrors),be=n.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?D.select(e,t)?.ownerPrincipalId??null:null}),Jt=n.createSelector(e=>{const t=_.select(e),r=lt.select(e);return{context:t,workspaceIds:t?r.filter(s=>J.select(e,s)):[]}}),qs=n.createSelector((e,t)=>{const r=w(e.workspaceShare,t);return{context:r.inviteContext,generation:r.inviteGeneration,withheld:r.inviteWithheld}}),Yt=[],Xt=n.createSelector((e,t)=>{const r=_.select(e),s=w(e.workspaceShare,t);if(!r||s.inviteContext!==r||s.inviteWithheld||!J.select(e,t))return Yt;const a=e.presence?.context===r?e.presence.members[t]:void 0,o=new Set(a?g(a).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>s.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(a&&i.redeemedByPrincipalId&&v(a,i.redeemedByPrincipalId))return!1;if(!l)return!0;const u=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(u)||c.has(u)?!1:(c.add(u),!0)})}),Hs=n.createSelector(e=>{const r=Jt.select(e).workspaceIds.flatMap(s=>Xt.select(e,s).map(a=>Date.parse(a.expiresAt)));return r.length?Math.min(...r):null});function $s(e){return Object.entries(e).some(([t,r])=>r.available&&Et(t,r.authenticated))}const Bs=n.createSelector(e=>e.hostRequirements.git),Vs=n.createSelector(e=>e.hostRequirements.node),zs=n.createSelector(e=>e.hostRequirements.gh),Ks=n.createSelector(e=>e.hostRequirements.checking),Js=n.createSelector(e=>e.hostRequirements.hasCheckedOnce);function We(e){const t=e.gitlabAuth?.statusFailed===!0;return Rt({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const Ys=n.createSelector(We),Xs=n.createSelector(e=>e.hostRequirements.node.ok&&(e.hostRequirements.git.available||We(e))),Qs=n.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),Zs="22.0.0";function Qt(e){return e.length>15?`${e.slice(0,15)}…`:e}function V(e){return e.name?.trim()||Qt(e.clientId)}function ea(e){const{eligibleClients:t,ownClientId:r,driving:s,pinnedClientId:a}=e,o=t.find(l=>l.clientId===r&&l.connected),c=s!==null&&!s.connected,i=!s||s.clientId===r;return{mode:c?"offline":i?"here":"elsewhere",hostName:s?V(s):o?V(o):"",canSwitchHere:!!(o&&a!==r)}}const ta=n.createSelector(e=>e?.browserClients?.ownClientId??null),ra=n.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);n.createSelector(e=>g(e.browserClients.liveClients));const sa=n.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);n.createSelector((e,t)=>v(e.browserClients.liveClients,t));const aa=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??te).browserClient),na=n.createSelector((e,t)=>{const r=e?.browserClients?.byWorkspaceId[t];return r?.pinnedClientId!==void 0||r?.browserClient!=null});function ee(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const oa=n.createSelector((e,t)=>{const r=e?.browserClients??re,s=r.byWorkspaceId[t]?.liveClients??se(),a=g(s).filter(y=>y.capabilities.browserExec===!0).map(ee),o=(r.byWorkspaceId[t]??te).browserClient,c=r.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Nt(o):void 0;let u=null;if(o?.resolved){const y=v(s,o.resolved.clientId);u=y?ee(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?u={clientId:o.clientId,connected:!1}:l&&(u={clientId:l.clientId,connected:!1});return{eligibleClients:a,ownClientId:r.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:u,pinnedClientId:i}}),ca=n.createSelector((e,t)=>{const r=e?.browserClients??re;if(!r.ownClientId||!r.ownClientIdConfirmed)return!1;const s=r.byWorkspaceId[t]?.liveClients??se(),a=v(s,r.ownClientId);return a!==void 0&&a.capabilities.browserExec!==!0}),ia=n.createSelector((e,t,r)=>{const s=e?.browserClients??re,a=r?s.byWorkspaceId[r]?.liveClients??se():s.liveClients,o=r?s.byWorkspaceId[r]?.liveClientsLoaded:s.liveClientsLoaded,c=v(a,t);return c?{name:V(ee(c)),connected:!0}:{name:V({clientId:t}),connected:!o}}),la=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??te).tabsRevision),ua=n.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),M=new Map;function da(e,t){return M.set(e,t),()=>{M.get(e)===t&&M.delete(e)}}async function pa(e){const t=M.get(e);return t?t():null}function ma(e){M.delete(e)}const Ne="From repo config",fa="repo-config";function ha(e,t){return t==="repo-config"?m.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?m.workspace_setupScriptEditor_custom_name():e}function xe(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function Zt(e){let t;try{t=JSON.parse(e)}catch{return null}return xe(t).setupScript}async function Sa(e){if(!e)return null;try{const t=await k(Mt.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),r=t?.success?t.data?.content:null;return typeof r=="string"?Zt(r):null}catch{return null}}async function ga(e,t,r){if(!e||!t)return null;try{const{appClient:s}=await $(async()=>{const{appClient:o}=await import("./BRqvd9LR.js").then(c=>c.X);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url),a=await s.integrations.githubRepoConfig(e,t,r);return xe(a.config).setupScript}catch{return null}}function ya(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ne&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function ba(e){const{repoConfigScript:t,lastUsed:r,genericTemplate:s}=e;return t?{content:t,name:Ne,source:"repo-config"}:r?{content:r.content,name:r.nameSource==="repo-config"?"Custom":r.name,source:r.nameSource==="repo-config"?"custom":r.nameSource??"named"}:s?{content:s.content,name:s.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Me="setup-scripts:last-used-by-repo",Le="setup-scripts:recent-by-repo",z=20,De=10,er=["repo-config","custom","named"];function oe(e,t){return t?`${e}\0${t}`:e}function Ue(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||er.includes(t.nameSource))}function K(){try{const e=localStorage.getItem(Me);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const r={};for(const[s,a]of Object.entries(t))s&&Ue(a)&&(r[s]=a);return r}catch{return{}}}function Ge(){try{const e=localStorage.getItem(Le);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const r={};for(const[s,a]of Object.entries(t)){if(!s||!Array.isArray(a))continue;const o=a.filter(Ue);o.length>0&&(r[s]=o)}return r}catch{return{}}}function tr(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function je(e){return[...e].sort((t,r)=>r.usedAt.localeCompare(t.usedAt))}function Fe(e){const t=[];for(const r of e)t.some(s=>tr(s,r))||t.push(r);return t}function ka(e,t){if(!e)return[];const r=oe(e,t),s=Ge()[r]??[],a=K()[r];return Fe(je(a?[...s,a]:s)).slice(0,De).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function rr(e,t,r){try{const s=Ge(),a=s[e]??(r?[r]:[]);s[e]=Fe([t,...je(a)]).slice(0,De);const o=Object.entries(s);o.length>z&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=z),localStorage.setItem(Le,JSON.stringify(Object.fromEntries(o)))}catch{}}function va(e,t){if(!e)return;const r=K()[oe(e,t)];return r?{name:r.name,content:r.content,nameSource:r.nameSource??"named"}:void 0}function wa(e,t,r){const s=t.content.trim();if(!e||!s)return;const a=oe(e,r),o={name:t.name,content:s,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};rr(a,o,K()[a]);try{const c=K();c[a]=o;const i=Object.entries(c);i.length>z&&(i.sort(([,l],[,u])=>u.usedAt.localeCompare(l.usedAt)),i.length=z),localStorage.setItem(Me,JSON.stringify(Object.fromEntries(i)))}catch{}}const j=Pe("ProviderAvailabilityClient");let E=null;async function Ia(){if(typeof window>"u")return j.debug("Skipping provider availability check - not in browser environment"),ke();const e=Te.select(n.state);if(E&&E.connection===e)return j.debug("Joining in-flight provider availability request"),E.promise;const t={},r=(async()=>{try{j.debug("Checking provider availability via IPC");const s=await k(xt.GET_AVAILABILITY);if(!s.success)throw new Error(s.error||"Failed to get provider availability");const a=s.data??ke();return j.debug("Provider availability fetched",{hasAnyProvider:a.hasAnyProvider,auggie:a.providers.auggie.available,claudeCode:a.providers.claudeCode.available,codex:a.providers.codex.available,cortex:a.providers.cortex.available,mock:a.providers.mock?.available??!1,opencode:a.providers.opencode.available,droid:a.providers.droid?.available??!1,grok:a.providers.grok?.available??!1,unsloth:a.providers.unsloth?.available??!1}),a}finally{E?.token===t&&(E=null)}})();return E={connection:e,token:t,promise:r},r}function ke(){return{hasAnyProvider:!1,providers:{auggie:{available:!1},claudeCode:{available:!1},codex:{available:!1},cortex:{available:!1},mock:{available:!1},opencode:{available:!1},pi:{available:!1},droid:{available:!1},grok:{available:!1},unsloth:{available:!1}}}}const sr={async isAuthenticated(e){try{return await k(W.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await k(W.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await k(W.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await k(W.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await k(W.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},_a=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:sr},Symbol.toStringTag,{value:"Module"})),I={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},ar={async isAuthenticated(e){try{return await k(I.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await k(I.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await k(I.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await k(I.LOGOUT)},async fetchProjects(e){try{return await k(I.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await k(I.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,r){try{return await k(I.SEARCH_ISSUES,{query:e,project:t,...r})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await k(I.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},Ca=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:ar},Symbol.toStringTag,{value:"Module"})),ce=n.createSelector(e=>{const t=_.select(e);return!t||!ft.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),X=n.createSelector((e,t)=>v(e.repositoryCheckout.forms,t)??null),Aa=n.createSelector((e,t)=>{const r=X.select(e,t);return r?.admission===ce.select(e)&&r.status==="ready"?g(r.projects):[]}),Ea=n.createSelector((e,t)=>{const r=X.select(e,t);return r?.admission===ce.select(e)&&r.status==="ready"?g(r.branches):[]}),nr=n.createSelector((e,t)=>{const r=X.select(e,t);return!r||r.status!=="ready"||r.admission!==ce.select(e)||!r.capture||!r.project||!r.branch?null:{checkoutId:r.capture.checkoutId,revision:r.capture.revision,projectPath:r.project.projectPath,branch:r.branch.name,commitSha:r.branch.commitSha,mode:r.mode}}),Ra=n.createSelector((e,t)=>{const r=nr.select(e,t);return!!r&&(r.mode==="direct"||X.select(e,t)?.warmStatus==="ready")}),Ta="__new-workspace__",Pa="__initializer__",Oa="compact-workspace-initializer-state-prompt",Wa="onboarding-prompt",F=20*1024*1024,ve=Pe("NewWorkspaceDraft");function Na(e,t){if(e.length>F)return ve.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:F}),null;const r=Lt(t);if(r.length===0)return{text:e};const s=[];let a=e.length+2,o=0;for(const c of r){const i=JSON.stringify(c).length+1;if(a+i>F){o+=1;continue}s.push(c),a+=i}return o>0&&ve.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:F,attachmentCount:r.length,droppedCount:o}),s.length>0?{text:e,attachments:s}:{text:e}}const or="host.providerAuthStatus";function cr(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function ir(e,t){const r=t.toLowerCase(),s=e.toLowerCase();return r.startsWith(s)?/^(['’]s\s+organization)?$/.test(r.slice(s.length)):!1}function lr(e){const{email:t,orgName:r}=e??{};return t&&r?ir(t,r)?t:`${t} · ${r}`:t||r||void 0}function ur(e){const t={};for(const r of e?.providers??[]){const s={authenticated:r.authenticated??void 0},a=lr(r.identity);a!==void 0&&(s.authDetails=a),r.identity?.email&&(s.email=r.identity.email),t[r.id]=s}return t}const dr=6e4,T=new Map,q=new Map,R=new Map;let B=0,qe=0;const pr=e=>JSON.stringify([Te.select(n.state),qe,e.workspaceId??null,e.providerId??"*"]);function mr(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,s=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof s=="string"?s:void 0}function Q(e){if(B+=1,e)for(const t of T.keys()){const[,,,r]=JSON.parse(t);(r===e||r==="*")&&T.delete(t)}else T.clear()}typeof fe=="function"&&fe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(mr(e)??"")&&Q()});typeof he=="function"&&he(()=>{qe+=1,Q()});function fr(e={}){const t=pr(e);if(e.force)Q(e.providerId);else{const o=T.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&T.delete(t)}const r=q.get(t);if(!e.force&&r?.generation===B)return r.promise;if(r){const o=R.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=r.promise.catch(()=>({})).then(()=>(R.get(t)===c&&R.delete(t),fr({...e,force:c.force}))).finally(()=>{R.get(t)===c&&R.delete(t)});return c={force:e.force===!0,promise:i},R.set(t,c),i}const s=B,a=Oe(or,cr(e)).then(ur).then(o=>(s===B&&T.set(t,{verdicts:o,expiresAt:Date.now()+dr}),o)).finally(()=>{q.get(t)?.promise===a&&q.delete(t)});return q.set(t,{generation:s,promise:a}),a}function xa(e,t=e,r="default",s,a){if(!jt.select(n.state))return;const o=a??ut.select(n.state,t)??dt.select(n.state,t)[0];if(!o)return;const c=pt.select(n.state,t,o),i={type:"discussion",title:s??(r==="new"?m.workspace_discussion_new_title():m.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:r}},l=c?.tabs.find(u=>Je(u,i));r==="new"&&n.dispatch(Ye(e)),n.dispatch(l?Xe(t,l.id,o):Qe(t,i,o,void 0,!0,void 0,!0))}function Ma(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?m.workspace_discussion_conversation_title():m.workspace_discussion_title():e.participants.filter(s=>s.principalId!==t).map(s=>s.displayName||s.login||m.workspace_discussion_unknownAuthor_label()).join(", ")||m.workspace_discussion_group_title()}const hr=n.createSelector((e,t,r)=>{const s=Re(e.repositoryContext,t);return r!==null&&s.binding===r?s:null});n.createSelector((e,t,r)=>{const s=hr.select(e,t.workspaceId,r);return s?.status==="ready"?v(s.roots,L(t))?.context:void 0});const La=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission)return null;const r=Re(e.repositoryContext,t.workspaceId),s=r.ownership;return!s||s.demandId!==t.demandId||s.admission!==t.admission||s.request.workspaceId!==t.workspaceId?null:{status:r.status,scope:r.scope,revision:r.revision,roots:r.status==="ready"?g(r.roots).map(a=>a.context):[],unavailableReason:r.unavailableReason}}),Da=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission)return null;const r=e.repositoryContext.selectionEdits,s=r?v(r,t.editId):void 0;return s&&s.status!=="closed"&&s.owner.admission===t.admission&&L(s.owner.root)===L(t.root)?s:null}),Ua=n.createSelector((e,t)=>{const r=e.repositoryContext.selectionEdits;return!!r&&g(r).some(s=>s.owner.root.workspaceId===t&&s.owner.admission===_.select(e)&&(s.status==="capturing"||s.status==="pending"&&(!s.observation||s.observation.attempt?.status==="pending")))}),Ga=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission||t.hostContext===null||ht.select(e,t.root.workspaceId)!==t.hostContext)return null;const r=e.repositoryContext.nativeReviewAttempts,s=r?v(r,t.attemptId):void 0;return s&&s.status!=="closed"&&s.owner.admission===t.admission&&s.owner.hostContext===t.hostContext&&L(s.owner.root)===L(t.root)?s:null}),ja=n.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?v(e.repositoryContext.nativeReviewAttempts,t):void 0),Sr=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function gr(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function yr(e){const t=new Set(Sr);return gr(e).some(r=>t.has(r))}const br=new Set(["lastActivity","statusMessage","statusImageAssetId"]),kr=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function vr(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function wr(e){if(!e.type.startsWith("file:"))return null;const t=e.data,r=t?.relativePath??t?.path??t?.filePath;return typeof r=="string"&&r.length>0?r:null}function Ir(e){const t=wr(e);return!t||yr(t)?!1:!vr(t).some(r=>kr.has(r))}function _r(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const r=Object.keys(t.changes).filter(s=>s!=="workspaceId");return r.length>0&&r.every(s=>br.has(s))}function f(e){return typeof e=="string"?e.trim():""}function P(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function we(e){const t=P(e.data),r=f(t.agentId)||f(e.sessionId),s=f(t.messageId);return r&&s?JSON.stringify([r,s]):""}function Cr(e){const t=P(e.data),r={workspaceId:e.workspaceId,closable:!0},s=a=>a?{...r,type:"note",noteId:a,title:f(t.title)||f(t.noteTitle)||m.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return s(f(t.noteId));case"task:status-changed":return s(f(t.noteId)||f(t.linkedNoteId));case"spec:updated":case"goal:updated":return s("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const a=f(t.agentId)||f(e.sessionId);return a?{...r,type:"agent",agentId:a,title:f(t.agentName)||m.layout_tabTypes_agent_title()}:null}case"file:changed":{const a=f(t.path)||f(t.relativePath);return a&&t.action!=="delete"?{...r,type:"file",filePath:a,title:a.split(/[\\/]/).pop()||a}:null}case"git:commit":{const a=f(t.commit),o=f(t.gitRootId);return a?{...r,type:"changes",title:m.layout_tabTypes_changes_title(),data:{commitHash:a,...o?{gitRootId:o}:{}}}:null}default:return null}}function Ie(e,t){const r=P(e.data),s=Object.fromEntries(Object.entries(r).filter(([,c])=>typeof c=="string")),a=c=>t?m.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return N({...e,actor:{...e.actor,name:t},data:s});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return a(N({...e,actor:{...e.actor,name:void 0},data:s}));case"agent:updated":return f(r.modelId)||r.completionReportCleared===!0?a(N({...e,actor:{...e.actor,name:void 0},data:r})):null;case"file:changed":return Ir(e)?N({...e,actor:{...e.actor,name:t},data:{path:f(r.path)||f(r.relativePath),action:f(r.action)}}):null;case"comment:added":return t?m.events_activity_authorCommented_label({author:t}):m.workspace_peopleActivity_commented_label();case"comment:resolved":return r.resolved===!1?a(m.events_activity_reopenedCommentThread_label()):r.resolved===!0?a(m.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=f(r.agentName)||f(r.toAgentName);return a(c?m.workspace_peopleActivity_messagedAgent_label({agent:c}):m.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return a(N({...e,actor:{...e.actor,name:void 0},data:{taskName:f(r.taskName)||f(r.noteTitle),newStatus:f(r.newStatus)||f(r.status)}}));case"workspace:created":return a(m.events_activity_createdWorkspace_label());case"workspace:updated":{if(_r(e))return null;const c=P(r.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=f(c.title);return a(i?m.events_activity_renamedWorkspaceTo_label({title:i}):m.events_activity_updatedWorkspace_label())}default:return null}}function x(e,t){const r=f(e);return r===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(r)?"":r}function Ar(e,t,r,s){const a=new Map(r.map(d=>[d.principalId,d])),o=new Map;for(const d of t){if(d.workspaceId!==e||d.type!=="agent:last-message")continue;const p=P(d.data),h=me({role:p.role==="user"?"user":"system",author:p.author,metadata:p.metadata}),S=we(d);if(!h||!S||typeof p.lastUserMessage!="string")continue;const b=Dt({id:f(p.messageId),role:"user",timestamp:d.timestamp,contentBlocks:[{type:"text",text:p.lastUserMessage}],author:h,metadata:p.metadata},s);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let u=0;for(const d of t){if(d.workspaceId!==e||!f(d.id)||c.has(d.id))continue;const p=Date.parse(d.timestamp);if(!Number.isFinite(p)){u++;continue}const h=P(d.data),S=d.type==="agent:message",b=S?me({role:h.role==="user"?"user":"system",author:h.author,metadata:h.metadata}):null;if(S?!b:d.actor?.type!=="user"){S&&h.role==="user"&&d.actor?.type==="user"&&St(h.metadata)&&l.push({row:null,timestamp:p,segment:u});continue}const Ke=S?f(h.messageId):"",O=S?we(d):"";if(O&&i.has(O))continue;const A=f(d.actor?.id),Z=A?a.get(A):void 0,U=b?x(b.displayName,b.principalId??"")||x(b.login,b.principalId??""):x(d.actor.name,A)||x(Z?.displayName,A)||x(Z?.login,A),le=Ie(d,"");if(!le)continue;if(!U){l.push({row:null,timestamp:p,segment:u});continue}const G=S?o.get(O)??null:null,ue=G?m.workspace_peopleActivity_actorAction_label({name:U,action:G}):Ie(d,U);ue&&(c.add(d.id),O&&i.add(O),l.push({timestamp:p,segment:u,row:{id:d.id,name:U,principalId:b?f(b.principalId)||null:A||null,avatarUrl:b?b.avatarUrl:Z?.avatarUrl??null,label:ue,actionLabel:G??le,continuation:!1,timestamp:d.timestamp,destination:Cr(d),messageId:Ke||null,messagePreview:G}}))}l.sort((d,p)=>p.timestamp-d.timestamp);const y=[];for(const[d,p]of l.entries()){if(!p.row)continue;const h=l[d-1],S=h?h.timestamp-p.timestamp:NaN;p.row.continuation=!!(p.row.principalId&&h?.row?.principalId===p.row.principalId&&h.segment===p.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(p.row)}return y}const Fa=n.createSelector(e=>e.workspaceEvents.subscriptionAttempt),qa=n.createSelector(e=>e.workspaceEvents.subscriptionGeneration),Er=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).events);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).loading);const Ha=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).nextToken);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).loadingOlder);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).olderError);n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).endReached);const $a=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Ba=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),Va=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),He=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??C).peopleStreams),za=n.createSelector((e,t)=>Object.values(He.select(e,t)).every(r=>r.initialized&&r.nextToken===null)),Ka=n.createSelector((e,t,r)=>{const s=Er.select(e,t),o=Ar(t,s,Tt.select(e,t),D.select(e,t)?.ownerPrincipalId)[r-1]?.timestamp,c=He.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const u=s.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!u||!(Date.parse(u)<=Date.parse(o))})}),Ja=n.createSelector((e,t)=>{const r=[],s=new Set,a=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!s.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(a.has(l))return;a.add(l)}s.add(i),r.push(c)}};for(const[c,i]of Object.entries(Ut.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of gt.select(e,t)){const i=yt.select(e,c),l=[...bt.select(e,c),...kt.select(e,c)];for(const u of l)if(u.role==="user")for(const[y,d]of(u.contentBlocks??[]).entries()){if(d.type!=="image"&&!Gt(d))continue;const p=d.id?i?.[Ze(u.id,d.id)]:void 0,h=p?.status==="loaded"?p.block:d;o({id:`${c}/${u.id}/${d.id??y}`,name:h.fileName,block:h,agentId:c,messageId:u.id,hydration:p})}}return r}),Rr=n.createSelector((e,t)=>e.context.byWorkspaceId[t]??et),Tr=n.createSelector((e,t)=>g(Rr.select(e,t).items)),Ya=n.createSelector((e,t)=>Tr.select(e,t).filter(r=>!r.parentNoteId)),Xa=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??$e),Qa=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??$e),$e={},Za=n.createSelector((e,t,r)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?v(s,r):void 0}),Be=n.createSelector((e,t)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?g(r):[]}),en=n.createSelector((e,t)=>Be.select(e,t).some(r=>r.status==="queued"||r.status==="running")),tn=n.createSelector((e,t)=>Be.select(e,t).filter(r=>r.operation.kind==="partialCommit"&&(r.status==="queued"||r.status==="running")));function _e(e){return e.title||`PR #${e.number}`}const ie=n.createSelector((e,t)=>{const r=e.gitRoots?.byWorkspaceId?.[t];return r?g(r.gitRoots):[]});function Pr(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Or(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const rn=n.createSelector((e,t)=>{const r=D.select(e,t),s=ie.select(e,t).map(Or);return r?[Pr(r),...s]:s}),sn=n.createSelector((e,t)=>ie.select(e,t).length>0),an=n.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),Wr=n.createSelector((e,t,r)=>v((e.acceptWorkflow.byWorkspaceId[t]??tt).operations,r)),nn=n.createSelector((e,t,r)=>Wr.select(e,t,r)?.status==="running"),on=n.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),cn=n.createSelector((e,t)=>{const r=vt.select(e,t)?.hasRemote??!1,s=D.select(e,t)?.pullRequests?.some(a=>a.status===de.Open||a.status===de.Draft)??!1;return{squash:!1,viaPR:r&&s,pushAfter:r,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),ln=n.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),un=n.createSelector((e,t)=>{const r=D.select(e,t),s=wt.select(e,t),a=It.select(e,t),o=r?.repositoryOwner&&r.repositoryName?`${r.repositoryOwner}/${r.repositoryName}`:void 0,c=Pt(Ot(r?.pullRequests,r?.activePullRequest,(i,l)=>Wt(i,r?.repositoryOwner,r?.repositoryName,l),_e,o),_t.select(e,t),o,ie.select(e,t),_e).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:At.select(e,t),owner:!Ct.select(e,t),authenticated:Ft.select(e),pushedCount:s.filter(i=>i.isPushed).length,hasRemote:a.hasRemote,clearReset:a.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(a.mergeHeadSha&&s[0]?.hash&&a.mergeHeadSha!==s[0].hash)}}),dn=n.createSelector((e,t,r)=>e.bgExecutor?.byWorkspaceId[t]?.executors[r]??rt),Nr=n.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??st);n.createSelector((e,t,r)=>Nr.select(e,t).operations[r]);const pn=n.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),mn=n.createSelector(e=>e.noteReadTracking.readRecords),xr="host.providerTestPrompt",Mr=Bt("ok",[Se({ok:ge(!0)}).passthrough(),Se({ok:ge(!1),reason:ye().min(1),message:ye()}).passthrough()]),Lr=3e5;async function fn(e){const t=await Oe(xr,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:Lr}),r=Mr.parse(t);return(r.ok||r.reason==="auth-required")&&Q(e.providerId),r}const Dr=-1,Ur=/^remote-script-lost:\s*/,Gr=["idle","starting","running","restarting","exited"],Ce=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Ae=e=>typeof e=="string"&&e.trim().length>0;function jr(e){return Ce(e)&&Ae(e.remoteAgentId)&&Ae(e.nodeId)&&Ce(e.runtime)&&Gr.includes(e.runtime.status)}function hn(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(jr):[]}function Sn(e,t,r){const s=qt(e.nodeId,r)??{nodeId:e.nodeId,name:m.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(r&&r.id===e.nodeId)return s;const a=t?.nodeId===e.nodeId?t:null;return{...s,name:a?.nodeName?.trim()||s.name,platform:Ht(a?.placement?.os,a?.placement?.arch)}}function Fr(e){return e.status==="exited"&&e.exitCode===Dr}function qr(e){const t=e.error?.trim().replace(Ur,"").trim();switch(t){case"the machine disconnected":return m.scripts_remote_lostDisconnected_label();case"the machine was removed":return m.scripts_remote_lostRemoved_label();case"the agent was deleted":return m.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return m.scripts_remote_lostAgentStopped_label();default:return t||m.scripts_remote_lostReason_fallback()}}function gn(e){if(Fr(e))return{kind:"lost",label:m.scripts_remote_lost_tooltip({reason:qr(e)})};const t=$t(e);switch(t){case"running":return{kind:t,label:m.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:m.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:m.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:m.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:m.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:m.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:m.terminal_quakeOverlay_status_exited()}}}const H=e=>typeof e=="string"&&e.length>0,Hr=/\bremote-script-agent-ending:/;function yn(e){return!!e&&Hr.test(e)}function bn(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const r=t,s=e instanceof Error&&e.message?{message:e.message}:{};return r.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:r.update==="backend"?"backend":"machine",...H(r.machineVersion)?{machineVersion:r.machineVersion}:{},...H(r.backendVersion)?{backendVersion:r.backendVersion}:{},...s}:r.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(r.attempts)?r.attempts.flatMap(o=>{const c=o??{};return H(c.route)&&H(c.error)?[{route:c.route,error:c.error}]:[]}):[],...s}:null}function Ee(e,t,r){const a=t.find(c=>String(c.id)===e)?.name?.trim();if(a)return a;const o=r?.trim();return o||Ve(e)}function Ve(e){return e.length>14?`${e.slice(0,14)}…`:e}function kn(e,t,r){const s=new Map,a={ownerAgentId:null,ownerName:null,entries:[]},o=(i,l)=>{let u=s.get(i);return u?u.ownerName===Ve(i)&&(u.ownerName=Ee(i,r,l)):(u={ownerAgentId:i,ownerName:Ee(i,r,l),entries:[]},s.set(i,u)),u};for(const{tab:i,panelId:l,active:u}of e)(i.ownerAgentId?o(i.ownerAgentId,i.ownerAgentName):a).entries.push({tab:i,panelId:l,active:u,hidden:!1});for(const i of t){if(i.type!=="browser")continue;(i.ownerAgentId?o(i.ownerAgentId,i.ownerAgentName):a).entries.push({tab:i,active:!1,hidden:!0})}const c=[...s.values()];return a.entries.length>0&&c.push(a),c}function vn(e){const r=e.filter(a=>a.runtime.status==="running"&&a.runtime.detectedUrl?.trim()).sort((a,o)=>(o.runtime.startedAt??"").localeCompare(a.runtime.startedAt??""))[0],s=r?.runtime.detectedUrl?.trim();return!r||!s?null:{scriptId:r.id,name:r.name,url:s}}const $r={status:"idle",error:null},Br=n.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??$r);n.createSelector((e,t)=>Br.select(e,t).error);const wn=n.createSelector((e,t)=>v(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),ze=n.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),Vr=e=>e==="hydrated"||e==="live",In=n.createSelector((e,t)=>{const r=ze.select(e,t);return r==="hydrated"||r==="live"}),_n=n.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(r=>Vr(t[r]))}),Cn=n.createSelector((e,t)=>ze.select(e,t)==="live");function An(e){const{selectedProviderId:t,activeProviderId:r,recommitActive:s,dispatch:a}=e;if(t&&!(!s&&t===r))return a(at({providerId:t,enabled:!0})),a(nt(t)),a(ot()),t}function En(e){const t=[];for(const r of e){let s={};if(r.metadata)try{s=JSON.parse(r.metadata)}catch{}const a=[];if(a.push(`[${r.identifier}] ${r.title}`),r.url&&a.push(`URL: ${r.url}`),r.description&&a.push(`
3
3
  Description:
4
4
  ${r.description}`),s.state&&a.push(`Status: ${s.state}`),s.teamName&&a.push(`Team: ${s.teamName}`),s.priority!==void 0){const o=["No priority","Urgent","High","Medium","Low"];a.push(`Priority: ${o[s.priority]||s.priority}`)}s.assignee&&a.push(`Assignee: ${s.assignee}`),t.push({type:r.itemType||"unknown",provider:r.provider,identifier:r.identifier,title:r.title,url:r.url,content:a.join(`
5
- `),metadata:s})}return t}function Rn(e){const t=[];for(const r of e){if(r.type!=="file")continue;let s=r.meta?.fullPath||r.meta?.path||"";if(!s&&r.id?.startsWith("file-")){const a=r.id.slice(5);(a.startsWith("/")||/^[A-Za-z]:/.test(a))&&(s=a)}if(!s&&r.uri)if(r.uri.startsWith("devspace://file/"))try{s=decodeURIComponent(r.uri.slice(16))}catch{}else r.uri.startsWith("file:")&&(s=r.uri.slice(5));s||(s=r.label||r.meta?.name||""),t.push({type:"file",path:s,title:r.label})}return t}async function Tn(e,t){const r=[];for(const s of e){if(s.type==="terminal")try{const{terminalManager:a}=await $(async()=>{const{terminalManager:l}=await import("./CskCO23D.js").then(u=>u.c);return{terminalManager:l}},__vite__mapDeps([22,3,10,19,20,11,8,0,1,2,4,5,6,7,9,12,13,14,15,16,17,18,21,23,24,25,26,27,28,29,30,31]),import.meta.url),o=s.meta?.workspaceId||"",c=s.id??"",i=await a.getBufferContent(c,o);i&&r.push({type:"terminal",content:i,title:s.label,metadata:{terminalName:s.label,terminalId:c}})}catch(a){t?.warn("[OnboardingContext] Failed to read terminal buffer:",a)}if(s.type==="script")try{const{selectScriptById:a,selectScriptRuntime:o}=await $(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./RDBJJxOY.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([32,4,2,3,5,6,7,8,9,10,11,33,34,20,19,35,36,16,13,14,21,12,15,17,18,29,37,38,39,40,1,41,42]),import.meta.url),{readScriptContextOutputLines:c}=await $(async()=>{const{readScriptContextOutputLines:S}=await import("./DaNfseRw.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([43,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,44,35,36,29,37,45,33,34,38,39,40,41,42,46,47,48,49,32]),import.meta.url),i=s.meta?.workspaceId||"",l=s.id??"",u=n.state,y=await c(u,i,l),d=a.select(u,i,l),p=o.select(u,i,l);let h=`Script: ${d?.name||s.label}
5
+ `),metadata:s})}return t}function Rn(e){const t=[];for(const r of e){if(r.type!=="file")continue;let s=r.meta?.fullPath||r.meta?.path||"";if(!s&&r.id?.startsWith("file-")){const a=r.id.slice(5);(a.startsWith("/")||/^[A-Za-z]:/.test(a))&&(s=a)}if(!s&&r.uri)if(r.uri.startsWith("devspace://file/"))try{s=decodeURIComponent(r.uri.slice(16))}catch{}else r.uri.startsWith("file:")&&(s=r.uri.slice(5));s||(s=r.label||r.meta?.name||""),t.push({type:"file",path:s,title:r.label})}return t}async function Tn(e,t){const r=[];for(const s of e){if(s.type==="terminal")try{const{terminalManager:a}=await $(async()=>{const{terminalManager:l}=await import("./CskCO23D.js").then(u=>u.c);return{terminalManager:l}},__vite__mapDeps([22,3,10,19,20,11,8,0,1,2,4,5,6,7,9,12,13,14,15,16,17,18,21,23,24,25,26,27,28,29,30,31]),import.meta.url),o=s.meta?.workspaceId||"",c=s.id??"",i=await a.getBufferContent(c,o);i&&r.push({type:"terminal",content:i,title:s.label,metadata:{terminalName:s.label,terminalId:c}})}catch(a){t?.warn("[OnboardingContext] Failed to read terminal buffer:",a)}if(s.type==="script")try{const{selectScriptById:a,selectScriptRuntime:o}=await $(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./pEUfw1x0.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([32,4,2,3,5,6,7,8,9,10,11,33,34,20,19,35,36,16,13,14,21,12,15,17,18,29,37,38,39,40,1,41,42]),import.meta.url),{readScriptContextOutputLines:c}=await $(async()=>{const{readScriptContextOutputLines:S}=await import("./BQAjYSZn.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([43,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,44,35,36,29,37,45,33,34,38,39,40,41,42,46,47,48,49,32]),import.meta.url),i=s.meta?.workspaceId||"",l=s.id??"",u=n.state,y=await c(u,i,l),d=a.select(u,i,l),p=o.select(u,i,l);let h=`Script: ${d?.name||s.label}
6
6
  `;if(h+=`Command: ${d?.command||"unknown"}
7
7
  `,h+=`Status: ${p.status}`,p.exitCode!==null&&p.exitCode!==void 0&&(h+=` (exit code: ${p.exitCode})`),h+=`
8
8
  `,p.detectedUrl&&(h+=`URL: ${p.detectedUrl}
@@ -1,4 +1,4 @@
1
- import{g as mt}from"./fdlSdJMU.js";import{d as xt,g as ht,f as kt,e as _t}from"./C28hhXd4.js";import{c3 as U,g as k}from"./CobcHKt3.js";import{K as vt,aF as bt,L as wt,aG as Tt,O as St,aI as $t,a as s,N as L,r as Mt,k as Et}from"./CqiIZBSl.js";import{d as st}from"./C2VPDjeo.js";var Z=(function(){var t=s(function(h,i,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=i);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],p=[1,10],r=[1,11],u=[1,12],f=[1,13],o=[1,14],g={trace:s(k(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(k(function(i,n,l,y,d,c,b){var _=c.length-1;switch(d){case 1:return c[_-1];case 2:this.$=[];break;case 3:c[_-1].push(c[_]),this.$=c[_-1];break;case 4:case 5:this.$=c[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[_].substr(6)),this.$=c[_].substr(6);break;case 9:this.$=c[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[_].substr(8)),this.$=c[_].substr(8);break;case 13:y.addTask(c[_-1],c[_]),this.$="task";break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(k(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),"parseError"),parse:s(k(function(i){var n=this,l=[0],y=[],d=[null],c=[],b=this.table,_="",P=0,et=0,pt=2,rt=1,ft=c.slice.call(arguments,1),v=Object.create(this.lexer),A={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(A.yy[Y]=this.yy[Y]);v.setInput(i,A.yy),A.yy.lexer=v,A.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var q=v.yylloc;c.push(q);var gt=v.options&&v.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function it(T){l.length=l.length-2*T,d.length=d.length-T,c.length=c.length-T}k(it,"popStack"),s(it,"popStack");function G(){var T;return T=y.pop()||v.lex()||rt,typeof T!="number"&&(T instanceof Array&&(y=T,T=y.pop()),T=n.symbols_[T]||T),T}k(G,"lex"),s(G,"lex");for(var w,F,S,H,R={},z,E,nt,W;;){if(F=l[l.length-1],this.defaultActions[F]?S=this.defaultActions[F]:((w===null||typeof w>"u")&&(w=G()),S=b[F]&&b[F][w]),typeof S>"u"||!S.length||!S[0]){var X="";W=[];for(z in b[F])this.terminals_[z]&&z>pt&&W.push("'"+this.terminals_[z]+"'");v.showPosition?X="Parse error on line "+(P+1)+`:
1
+ import{g as mt}from"./yW5sglFu.js";import{d as xt,g as ht,f as kt,e as _t}from"./DqNPF1Kv.js";import{c3 as U,g as k}from"./LhLTjc8B.js";import{K as vt,aF as bt,L as wt,aG as Tt,O as St,aI as $t,a as s,N as L,r as Mt,k as Et}from"./bAWH0D1a.js";import{d as st}from"./DVbZ5oZ8.js";var Z=(function(){var t=s(function(h,i,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=i);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],p=[1,10],r=[1,11],u=[1,12],f=[1,13],o=[1,14],g={trace:s(k(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(k(function(i,n,l,y,d,c,b){var _=c.length-1;switch(d){case 1:return c[_-1];case 2:this.$=[];break;case 3:c[_-1].push(c[_]),this.$=c[_-1];break;case 4:case 5:this.$=c[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[_].substr(6)),this.$=c[_].substr(6);break;case 9:this.$=c[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[_].substr(8)),this.$=c[_].substr(8);break;case 13:y.addTask(c[_-1],c[_]),this.$="task";break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(k(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),"parseError"),parse:s(k(function(i){var n=this,l=[0],y=[],d=[null],c=[],b=this.table,_="",P=0,et=0,pt=2,rt=1,ft=c.slice.call(arguments,1),v=Object.create(this.lexer),A={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(A.yy[Y]=this.yy[Y]);v.setInput(i,A.yy),A.yy.lexer=v,A.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var q=v.yylloc;c.push(q);var gt=v.options&&v.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function it(T){l.length=l.length-2*T,d.length=d.length-T,c.length=c.length-T}k(it,"popStack"),s(it,"popStack");function G(){var T;return T=y.pop()||v.lex()||rt,typeof T!="number"&&(T instanceof Array&&(y=T,T=y.pop()),T=n.symbols_[T]||T),T}k(G,"lex"),s(G,"lex");for(var w,F,S,H,R={},z,E,nt,W;;){if(F=l[l.length-1],this.defaultActions[F]?S=this.defaultActions[F]:((w===null||typeof w>"u")&&(w=G()),S=b[F]&&b[F][w]),typeof S>"u"||!S.length||!S[0]){var X="";W=[];for(z in b[F])this.terminals_[z]&&z>pt&&W.push("'"+this.terminals_[z]+"'");v.showPosition?X="Parse error on line "+(P+1)+`:
2
2
  `+v.showPosition()+`
3
3
  Expecting `+W.join(", ")+", got '"+(this.terminals_[w]||w)+"'":X="Parse error on line "+(P+1)+": Unexpected "+(w==rt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(X,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:q,expected:W})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+w);switch(S[0]){case 1:l.push(w),d.push(v.yytext),c.push(v.yylloc),l.push(S[1]),w=null,et=v.yyleng,_=v.yytext,P=v.yylineno,q=v.yylloc;break;case 2:if(E=this.productions_[S[1]][1],R.$=d[d.length-E],R._$={first_line:c[c.length-(E||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(E||1)].first_column,last_column:c[c.length-1].last_column},gt&&(R._$.range=[c[c.length-(E||1)].range[0],c[c.length-1].range[1]]),H=this.performAction.apply(R,[_,et,P,A.yy,S[1],d,c].concat(ft)),typeof H<"u")return H;E&&(l=l.slice(0,-1*E*2),d=d.slice(0,-1*E),c=c.slice(0,-1*E)),l.push(this.productions_[S[1]][0]),d.push(R.$),c.push(R._$),nt=b[l[l.length-2]][l[l.length-1]],l.push(nt);break;case 3:return!0}}return!0},"parse"),"parse")},m=(function(){var h={EOF:1,parseError:s(k(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),"parseError"),setInput:s(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as se}from"./3Hx-xwhh.js";import{a as p,ad as k,N as F,ax as ie,aV as re,L as ae,aG as ne,K as oe,aF as le,aI as ce,O as he,I as ue,p as z,k as de,as as fe}from"./CqiIZBSl.js";import{s as pe}from"./bOHL4iEd.js";import{c as Se}from"./C28hhXd4.js";import{g as m,c3 as vt}from"./CobcHKt3.js";var xt=(function(){var t=p(function(M,o,h,a){for(h=h||{},a=M.length;a--;h[M[a]]=o);return h},"o"),e=[1,2],s=[1,3],n=[1,4],r=[2,4],c=[1,9],u=[1,11],S=[1,16],d=[1,17],T=[1,18],E=[1,19],b=[1,33],I=[1,20],v=[1,21],f=[1,22],w=[1,23],$=[1,24],A=[1,26],P=[1,27],x=[1,28],B=[1,29],N=[1,30],K=[1,31],ot=[1,32],lt=[1,35],ct=[1,36],ht=[1,37],ut=[1,38],X=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],dt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Ot=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Tt={trace:p(m(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(m(function(o,h,a,g,_,i,G){var l=i.length-1;switch(_){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const st=i[l-1];st.description=g.trimColon(i[l]),this.$=st;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const Et=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:Et};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],J=i[l-2].trim();if(i[l].match(":")){var ft=i[l].split(":");Y=ft[0],J=[J,ft[1]]}this.$={stmt:"state",id:Y,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),"anonymous"),table:[{3:1,4:e,5:s,6:n},{1:[3]},{3:5,4:e,5:s,6:n},{3:6,4:e,5:s,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:d,19:T,22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:d,19:T,22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,7]),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(y,[2,11]),t(y,[2,12],{14:[1,40],15:[1,41]}),t(y,[2,16]),{18:[1,42]},t(y,[2,18],{20:[1,43]}),{23:[1,44]},t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(y,[2,28]),{34:[1,49]},{36:[1,50]},t(y,[2,31]),{13:51,24:b,57:X},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(dt,[2,44],{58:[1,56]}),t(dt,[2,45],{58:[1,57]}),t(y,[2,38]),t(y,[2,39]),t(y,[2,40]),t(y,[2,41]),t(y,[2,6]),t(y,[2,13]),{13:58,24:b,57:X},t(y,[2,17]),t(Ot,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(y,[2,29]),t(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(y,[2,14],{14:[1,71]}),{4:c,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:d,19:T,21:[1,72],22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(dt,[2,46]),t(dt,[2,47]),t(y,[2,15]),t(y,[2,19]),t(Ot,r,{7:78}),t(y,[2,26]),t(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:d,19:T,21:[1,81],22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,32]),t(y,[2,33]),t(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(m(function(o,h){if(h.recoverable)this.trace(o);else{var a=new Error(o);throw a.hash=h,a}},"parseError"),"parseError"),parse:p(m(function(o){var h=this,a=[0],g=[],_=[null],i=[],G=this.table,l="",Y=0,J=0,ft=2,st=1,Et=i.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(j.yy[_t]=this.yy[_t]);D.setInput(o,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var mt=D.yylloc;i.push(mt);var ee=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Rt(O){a.length=a.length-2*O,_.length=_.length-O,i.length=i.length-O}m(Rt,"popStack"),p(Rt,"popStack");function bt(){var O;return O=g.pop()||D.lex()||st,typeof O!="number"&&(O instanceof Array&&(g=O,O=g.pop()),O=h.symbols_[O]||O),O}m(bt,"lex"),p(bt,"lex");for(var L,H,R,kt,q={},pt,V,$t,St;;){if(H=a[a.length-1],this.defaultActions[H]?R=this.defaultActions[H]:((L===null||typeof L>"u")&&(L=bt()),R=G[H]&&G[H][L]),typeof R>"u"||!R.length||!R[0]){var Dt="";St=[];for(pt in G[H])this.terminals_[pt]&&pt>ft&&St.push("'"+this.terminals_[pt]+"'");D.showPosition?Dt="Parse error on line "+(Y+1)+`:
1
+ import{g as se}from"./B4ARXgVr.js";import{a as p,ad as k,N as F,ax as ie,aV as re,L as ae,aG as ne,K as oe,aF as le,aI as ce,O as he,I as ue,p as z,k as de,as as fe}from"./bAWH0D1a.js";import{s as pe}from"./Kr-Hl0sp.js";import{c as Se}from"./DqNPF1Kv.js";import{g as m,c3 as vt}from"./LhLTjc8B.js";var xt=(function(){var t=p(function(M,o,h,a){for(h=h||{},a=M.length;a--;h[M[a]]=o);return h},"o"),e=[1,2],s=[1,3],n=[1,4],r=[2,4],c=[1,9],u=[1,11],S=[1,16],d=[1,17],T=[1,18],E=[1,19],b=[1,33],I=[1,20],v=[1,21],f=[1,22],w=[1,23],$=[1,24],A=[1,26],P=[1,27],x=[1,28],B=[1,29],N=[1,30],K=[1,31],ot=[1,32],lt=[1,35],ct=[1,36],ht=[1,37],ut=[1,38],X=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],dt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Ot=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Tt={trace:p(m(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(m(function(o,h,a,g,_,i,G){var l=i.length-1;switch(_){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const st=i[l-1];st.description=g.trimColon(i[l]),this.$=st;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const Et=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:Et};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],J=i[l-2].trim();if(i[l].match(":")){var ft=i[l].split(":");Y=ft[0],J=[J,ft[1]]}this.$={stmt:"state",id:Y,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),"anonymous"),table:[{3:1,4:e,5:s,6:n},{1:[3]},{3:5,4:e,5:s,6:n},{3:6,4:e,5:s,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:d,19:T,22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:d,19:T,22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,7]),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(y,[2,11]),t(y,[2,12],{14:[1,40],15:[1,41]}),t(y,[2,16]),{18:[1,42]},t(y,[2,18],{20:[1,43]}),{23:[1,44]},t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(y,[2,28]),{34:[1,49]},{36:[1,50]},t(y,[2,31]),{13:51,24:b,57:X},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(dt,[2,44],{58:[1,56]}),t(dt,[2,45],{58:[1,57]}),t(y,[2,38]),t(y,[2,39]),t(y,[2,40]),t(y,[2,41]),t(y,[2,6]),t(y,[2,13]),{13:58,24:b,57:X},t(y,[2,17]),t(Ot,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(y,[2,29]),t(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(y,[2,14],{14:[1,71]}),{4:c,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:d,19:T,21:[1,72],22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(dt,[2,46]),t(dt,[2,47]),t(y,[2,15]),t(y,[2,19]),t(Ot,r,{7:78}),t(y,[2,26]),t(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:d,19:T,21:[1,81],22:E,24:b,25:I,26:v,27:f,28:w,29:$,32:25,33:A,35:P,37:x,38:B,41:N,45:K,48:ot,51:lt,52:ct,53:ht,54:ut,57:X},t(y,[2,32]),t(y,[2,33]),t(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(m(function(o,h){if(h.recoverable)this.trace(o);else{var a=new Error(o);throw a.hash=h,a}},"parseError"),"parseError"),parse:p(m(function(o){var h=this,a=[0],g=[],_=[null],i=[],G=this.table,l="",Y=0,J=0,ft=2,st=1,Et=i.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(j.yy[_t]=this.yy[_t]);D.setInput(o,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var mt=D.yylloc;i.push(mt);var ee=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Rt(O){a.length=a.length-2*O,_.length=_.length-O,i.length=i.length-O}m(Rt,"popStack"),p(Rt,"popStack");function bt(){var O;return O=g.pop()||D.lex()||st,typeof O!="number"&&(O instanceof Array&&(g=O,O=g.pop()),O=h.symbols_[O]||O),O}m(bt,"lex"),p(bt,"lex");for(var L,H,R,kt,q={},pt,V,$t,St;;){if(H=a[a.length-1],this.defaultActions[H]?R=this.defaultActions[H]:((L===null||typeof L>"u")&&(L=bt()),R=G[H]&&G[H][L]),typeof R>"u"||!R.length||!R[0]){var Dt="";St=[];for(pt in G[H])this.terminals_[pt]&&pt>ft&&St.push("'"+this.terminals_[pt]+"'");D.showPosition?Dt="Parse error on line "+(Y+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+St.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Dt="Parse error on line "+(Y+1)+": Unexpected "+(L==st?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Dt,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:mt,expected:St})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+L);switch(R[0]){case 1:a.push(L),_.push(D.yytext),i.push(D.yylloc),a.push(R[1]),L=null,J=D.yyleng,l=D.yytext,Y=D.yylineno,mt=D.yylloc;break;case 2:if(V=this.productions_[R[1]][1],q.$=_[_.length-V],q._$={first_line:i[i.length-(V||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(V||1)].first_column,last_column:i[i.length-1].last_column},ee&&(q._$.range=[i[i.length-(V||1)].range[0],i[i.length-1].range[1]]),kt=this.performAction.apply(q,[l,J,Y,j.yy,R[1],_,i].concat(Et)),typeof kt<"u")return kt;V&&(a=a.slice(0,-1*V*2),_=_.slice(0,-1*V),i=i.slice(0,-1*V)),a.push(this.productions_[R[1]][0]),_.push(q.$),i.push(q._$),$t=G[a[a.length-2]][a[a.length-1]],a.push($t);break;case 3:return!0}}return!0},"parse"),"parse")},te=(function(){var M={EOF:1,parseError:p(m(function(h,a){if(this.yy.parser)this.yy.parser.parseError(h,a);else throw new Error(h)},"parseError"),"parseError"),setInput:p(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var h=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===g.length?this.yylloc.first_column:0)+g[g.length-a.length].length-a[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{p as de}from"./CLCbFeGH.js";import{f as m,aX as he,aN as Y,$ as O,c4 as me,a6 as ue,bC as X,cm as L,c3 as H,c7 as fe,aL as ye,c9 as ge,aP as Se,aK as xe,c6 as be,ax as ve,bn as Ce,a0 as we}from"./CobcHKt3.js";import{s as Te}from"./Cou180Vm.js";import{p as $e}from"./CBeBcrFe.js";import{f as V}from"./CrowFXzY.js";import{o as G}from"./CmKTTxBW.js";import{h as Le,t as Fe}from"./CvYzv8kf.js";var N,te=(N=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=ye,this.setDiagramTitle=ge,this.getDiagramTitle=Se,this.getAccDescription=xe,this.setAccDescription=be}getNodes(){return this.nodes}getConfig(){const l=ve,i=Y();return O({...l.treemap,...i.treemap??{}})}addNode(l,i){this.nodes.push(l),this.levels.set(l,i),i===0&&(this.outerNodes.push(l),this.root??=l)}getRoot(){return{name:"",children:this.outerNodes}}addClass(l,i){const r=this.classes.get(l)??{id:l,styles:[],textStyles:[]},n=i.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(s=>{Ce(s)&&(r?.textStyles?r.textStyles.push(s):r.textStyles=[s]),r?.styles?r.styles.push(s):r.styles=[s]}),this.classes.set(l,r)}getClasses(){return this.classes}getStylesForClass(l){return this.classes.get(l)?.styles??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},m(N,"TreeMapDB"),N);function ae(p){if(!p.length)return[];const l=[],i=[];return p.forEach(r=>{const n={name:r.name,children:r.type==="Leaf"?void 0:[]};for(n.classSelector=r?.classSelector,r?.cssCompiledStyles&&(n.cssCompiledStyles=r.cssCompiledStyles),r.type==="Leaf"&&r.value!==void 0&&(n.value=r.value);i.length>0&&i[i.length-1].level>=r.level;)i.pop();if(i.length===0)l.push(n);else{const s=i[i.length-1].node;s.children?s.children.push(n):s.children=[n]}r.type!=="Leaf"&&i.push({node:n,level:r.level})}),l}m(ae,"buildHierarchy");var Ne=m((p,l)=>{de(p,l);const i=[];for(const s of p.TreemapRows??[])s.$type==="ClassDefStatement"&&l.addClass(s.className??"",s.styleText??"");for(const s of p.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,k=ze(d),a=d.classSelector?l.getStylesForClass(d.classSelector):[],z=a.length>0?a:void 0,x={level:h,name:k,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:z};i.push(x)}const r=ae(i),n=m((s,d)=>{for(const h of s)l.addNode(h,d),h.children&&h.children.length>0&&n(h.children,d+1)},"addNodesRecursively");n(r,0)},"populate"),ze=m(p=>p.name?String(p.name):"","getItemName"),le={parser:{yy:void 0},parse:m(async p=>{try{const i=await $e("treemap",p);X.debug("Treemap AST:",i);const r=le.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ne(i,r)}catch(l){throw X.error("Error parsing treemap:",l),l}},"parse")},Ae=10,F=10,M=25,Pe=m((p,l,i,r)=>{const n=r.db,s=n.getConfig(),d=s.padding??Ae,h=n.getDiagramTitle(),k=n.getRoot(),{themeVariables:a}=Y();if(!k)return;const z=h?30:0,x=me(l),j=s.nodeWidth?s.nodeWidth*F:960,K=s.nodeHeight?s.nodeHeight*F:500,R=j,U=K+z;x.attr("viewBox",`0 0 ${R} ${U}`),ue(x,U,R,s.useMaxWidth);let b;try{const e=s.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+V(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),o=t?t[0]:"";b=m(u=>"$"+V(","+o)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(o=>"$"+V(t||"")(o),"valueFormat")}else b=V(e)}catch(e){X.error("Error creating format function:",e),b=V(",")}const A=G().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),se=G().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=G().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",R/2).attr("y",z/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const q=x.append("g").attr("transform",`translate(0, ${z})`).attr("class","treemapContainer"),re=Le(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Fe().size([j,K]).paddingTop(e=>e.children&&e.children.length>0?M+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(re),ne=J.descendants().filter(e=>e.children&&e.children.length>0),P=q.selectAll(".treemapSection").data(ne).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),P.append("clipPath").attr("id",(e,t)=>`clip-section-${l}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>A(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>se(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),P.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${l}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=H(this),o=e.data.name;t.text(o);const u=e.x1-e.x0,y=6;let f;s.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const c=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>c){let w=o;for(;w.length>0;){if(w=o.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>c&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=c)break}}}),s.showValues!==!1&&P.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")});const Q=J.leaves(),g=Q.length>20,oe=g?16:38,E=g?14:28,T=g?4:8,D=g?4:6,B=g?2:4,Z=g?8:10,I=g?1:2,_=q.selectAll(".treemapLeafGroup").data(Q).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);_.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("stroke-width",3),_.append("clipPath").attr("id",(e,t)=>`clip-${l}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),_.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+W(e.data.name)+";",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${l}-${t})`).text(e=>e.data.name).each(function(e){const t=H(this),o=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=o-2*B,$=u-2*B;if(f<Z||$<Z){t.style("display","none");return}let c=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&c>T;)c--,t.style("font-size",`${c}px`);let S=Math.max(D,Math.min(E,Math.round(c*v))),C=c+I+S;for(;C>$&&c>T&&(c--,S=Math.max(D,Math.min(E,Math.round(c*v))),!(S<D&&c===T));)t.style("font-size",`${c}px`),C=c+I+S;t.style("font-size",`${c}px`),g?(c<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||c<T||$<c)&&t.style("display","none")}),s.showValues!==!1&&_.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const o=`text-anchor: middle; dominant-baseline: hanging; font-size: ${E}px;fill:`+W(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return o+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,o)=>`url(#clip-${l}-${o})`).text(t=>t.value?b(t.value):"").each(function(t){const o=H(this),u=this.parentNode;if(!u){o.style("display","none");return}const y=H(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){o.style("display","none");return}const f=parseFloat(y.style("font-size")),c=Math.max(D,Math.min(E,Math.round(f*.6)));o.style("font-size",`${c}px`);const S=(t.y1-t.y0)/2+f/2+I;o.attr("y",S);const C=t.x1-t.x0,ee=t.y1-t.y0-4,pe=C-2*B;o.node().getComputedTextLength()>pe||S+c>ee||c<D?o.style("display","none"):o.style("display",null)});const ie=s.diagramPadding??8;Te(x,ie,"flowchart",s?.useMaxWidth||!1)},"draw"),De=m(function(p,l){return l.db.getClasses()},"getClasses"),Ve={draw:Pe,getClasses:De},Me={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ke=m(({treemap:p}={})=>{const l=he(),i=Y(),r=O(l,i.themeVariables),n=O(Me,p),s=n.titleColor??r.titleColor,d=n.labelColor??r.textColor,h=n.valueColor??r.textColor;return`
1
+ import{p as de}from"./C1H4_ssx.js";import{f as m,aX as he,aN as Y,$ as O,c4 as me,a6 as ue,bC as X,cm as L,c3 as H,c7 as fe,aL as ye,c9 as ge,aP as Se,aK as xe,c6 as be,ax as ve,bn as Ce,a0 as we}from"./LhLTjc8B.js";import{s as Te}from"./DbD4A30t.js";import{p as $e}from"./CBeBcrFe.js";import{f as V}from"./CrowFXzY.js";import{o as G}from"./CmKTTxBW.js";import{h as Le,t as Fe}from"./CvYzv8kf.js";var N,te=(N=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=ye,this.setDiagramTitle=ge,this.getDiagramTitle=Se,this.getAccDescription=xe,this.setAccDescription=be}getNodes(){return this.nodes}getConfig(){const l=ve,i=Y();return O({...l.treemap,...i.treemap??{}})}addNode(l,i){this.nodes.push(l),this.levels.set(l,i),i===0&&(this.outerNodes.push(l),this.root??=l)}getRoot(){return{name:"",children:this.outerNodes}}addClass(l,i){const r=this.classes.get(l)??{id:l,styles:[],textStyles:[]},n=i.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(s=>{Ce(s)&&(r?.textStyles?r.textStyles.push(s):r.textStyles=[s]),r?.styles?r.styles.push(s):r.styles=[s]}),this.classes.set(l,r)}getClasses(){return this.classes}getStylesForClass(l){return this.classes.get(l)?.styles??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},m(N,"TreeMapDB"),N);function ae(p){if(!p.length)return[];const l=[],i=[];return p.forEach(r=>{const n={name:r.name,children:r.type==="Leaf"?void 0:[]};for(n.classSelector=r?.classSelector,r?.cssCompiledStyles&&(n.cssCompiledStyles=r.cssCompiledStyles),r.type==="Leaf"&&r.value!==void 0&&(n.value=r.value);i.length>0&&i[i.length-1].level>=r.level;)i.pop();if(i.length===0)l.push(n);else{const s=i[i.length-1].node;s.children?s.children.push(n):s.children=[n]}r.type!=="Leaf"&&i.push({node:n,level:r.level})}),l}m(ae,"buildHierarchy");var Ne=m((p,l)=>{de(p,l);const i=[];for(const s of p.TreemapRows??[])s.$type==="ClassDefStatement"&&l.addClass(s.className??"",s.styleText??"");for(const s of p.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,k=ze(d),a=d.classSelector?l.getStylesForClass(d.classSelector):[],z=a.length>0?a:void 0,x={level:h,name:k,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:z};i.push(x)}const r=ae(i),n=m((s,d)=>{for(const h of s)l.addNode(h,d),h.children&&h.children.length>0&&n(h.children,d+1)},"addNodesRecursively");n(r,0)},"populate"),ze=m(p=>p.name?String(p.name):"","getItemName"),le={parser:{yy:void 0},parse:m(async p=>{try{const i=await $e("treemap",p);X.debug("Treemap AST:",i);const r=le.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ne(i,r)}catch(l){throw X.error("Error parsing treemap:",l),l}},"parse")},Ae=10,F=10,M=25,Pe=m((p,l,i,r)=>{const n=r.db,s=n.getConfig(),d=s.padding??Ae,h=n.getDiagramTitle(),k=n.getRoot(),{themeVariables:a}=Y();if(!k)return;const z=h?30:0,x=me(l),j=s.nodeWidth?s.nodeWidth*F:960,K=s.nodeHeight?s.nodeHeight*F:500,R=j,U=K+z;x.attr("viewBox",`0 0 ${R} ${U}`),ue(x,U,R,s.useMaxWidth);let b;try{const e=s.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+V(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),o=t?t[0]:"";b=m(u=>"$"+V(","+o)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(o=>"$"+V(t||"")(o),"valueFormat")}else b=V(e)}catch(e){X.error("Error creating format function:",e),b=V(",")}const A=G().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),se=G().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=G().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",R/2).attr("y",z/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const q=x.append("g").attr("transform",`translate(0, ${z})`).attr("class","treemapContainer"),re=Le(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Fe().size([j,K]).paddingTop(e=>e.children&&e.children.length>0?M+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(re),ne=J.descendants().filter(e=>e.children&&e.children.length>0),P=q.selectAll(".treemapSection").data(ne).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),P.append("clipPath").attr("id",(e,t)=>`clip-section-${l}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>A(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>se(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),P.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${l}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=H(this),o=e.data.name;t.text(o);const u=e.x1-e.x0,y=6;let f;s.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const c=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>c){let w=o;for(;w.length>0;){if(w=o.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>c&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=c)break}}}),s.showValues!==!1&&P.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")});const Q=J.leaves(),g=Q.length>20,oe=g?16:38,E=g?14:28,T=g?4:8,D=g?4:6,B=g?2:4,Z=g?8:10,I=g?1:2,_=q.selectAll(".treemapLeafGroup").data(Q).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);_.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("stroke-width",3),_.append("clipPath").attr("id",(e,t)=>`clip-${l}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),_.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+W(e.data.name)+";",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${l}-${t})`).text(e=>e.data.name).each(function(e){const t=H(this),o=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=o-2*B,$=u-2*B;if(f<Z||$<Z){t.style("display","none");return}let c=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&c>T;)c--,t.style("font-size",`${c}px`);let S=Math.max(D,Math.min(E,Math.round(c*v))),C=c+I+S;for(;C>$&&c>T&&(c--,S=Math.max(D,Math.min(E,Math.round(c*v))),!(S<D&&c===T));)t.style("font-size",`${c}px`),C=c+I+S;t.style("font-size",`${c}px`),g?(c<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||c<T||$<c)&&t.style("display","none")}),s.showValues!==!1&&_.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const o=`text-anchor: middle; dominant-baseline: hanging; font-size: ${E}px;fill:`+W(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return o+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,o)=>`url(#clip-${l}-${o})`).text(t=>t.value?b(t.value):"").each(function(t){const o=H(this),u=this.parentNode;if(!u){o.style("display","none");return}const y=H(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){o.style("display","none");return}const f=parseFloat(y.style("font-size")),c=Math.max(D,Math.min(E,Math.round(f*.6)));o.style("font-size",`${c}px`);const S=(t.y1-t.y0)/2+f/2+I;o.attr("y",S);const C=t.x1-t.x0,ee=t.y1-t.y0-4,pe=C-2*B;o.node().getComputedTextLength()>pe||S+c>ee||c<D?o.style("display","none"):o.style("display",null)});const ie=s.diagramPadding??8;Te(x,ie,"flowchart",s?.useMaxWidth||!1)},"draw"),De=m(function(p,l){return l.db.getClasses()},"getClasses"),Ve={draw:Pe,getClasses:De},Me={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ke=m(({treemap:p}={})=>{const l=he(),i=Y(),r=O(l,i.themeVariables),n=O(Me,p),s=n.titleColor??r.titleColor,d=n.labelColor??r.textColor,h=n.valueColor??r.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${n.sectionStrokeColor};
4
4
  stroke-width: ${n.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{p as Mt}from"./CLCbFeGH.js";import{c6 as Nt,aK as Lt,aP as zt,c9 as Tt,aL as Xt,c7 as At,f as u,aX as Et,aN as Yt,$ as U,bC as Q,c4 as It,a6 as Bt,a0 as Ft,aO as V}from"./CobcHKt3.js";import{p as Ot}from"./CBeBcrFe.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),J=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Rt=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,O=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,O,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=J(e.fromPort)??J(e.toPort);const{flow:d,label:w}=Rt(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Ot("wardley",o);Q.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:At,getAccTitle:Xt,setDiagramTitle:Tt,getDiagramTitle:zt,getAccDescription:Lt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{Q.debug(`Rendering Wardley map
1
+ import{p as Mt}from"./C1H4_ssx.js";import{c6 as Nt,aK as Lt,aP as zt,c9 as Tt,aL as Xt,c7 as At,f as u,aX as Et,aN as Yt,$ as U,bC as Q,c4 as It,a6 as Bt,a0 as Ft,aO as V}from"./LhLTjc8B.js";import{p as Ot}from"./CBeBcrFe.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),J=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Rt=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,O=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,O,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=J(e.fromPort)??J(e.toPort);const{flow:d,label:w}=Rt(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Ot("wardley",o);Q.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:At,getAccTitle:Xt,setDiagramTitle:Tt,getDiagramTitle:zt,getAccDescription:Lt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{Q.debug(`Rendering Wardley map
2
2
  `+o);const a=jt(),d=Ht(),w=a.nodeRadius*1.6,C=h.db,g=C.getWardleyData(),O=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,Y=It(r);Y.selectAll("*").remove(),Bt(Y,b,S,a.useMaxWidth),Y.attr("viewBox",`0 0 ${S} ${b}`);const v=Y.append("g").attr("class","wardley-map"),q=Y.append("defs");q.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const I=S-a.padding*2,B=b-a.padding*2;O&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(O);const L=u(t=>a.padding+t/100*I,"projectX"),z=u(t=>b-a.padding-t/100*B,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",mt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+I/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+B/2})`).text(mt);const F=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],f=a.padding+l.start*I,x=a.padding+l.end*I,y=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+I*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-B*n).attr("y2",b-a.padding-B*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:L(t.x),y:z(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(y=>y.id===x)})).filter(x=>x.pos&&x.node).sort((x,y)=>x.node.x-y.node.x);for(let x=0;x<i.length-1;x++){const y=i[x],m=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(n.componentIds.forEach(x=>{const y=c.get(x);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(n.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=v.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const K=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||Z.get(t.target)?.has(t.source)));_.selectAll("line").data(K).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),_.selectAll("text").data(K.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,f=Math.sqrt(l*l+p*p),x=8,y=p/f;return i+y*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,f=Math.sqrt(p*p+l*l),x=8,y=-p/f;return i+y*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f),y=8,m=f/x,P=-l/x,N=i+m*y,W=p+P*y;let A=Math.atan2(f,l)*180/Math.PI;return(A>90||A<-90)&&(A+=180),`rotate(${A} ${N} ${W})`}).text(t=>t.label);const kt=v.append("g").attr("class","wardley-trends"),bt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=L(t.targetX),i=z(t.targetY),p=n-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,y=f>x?n-p/f*x:n,m=f>x?i-l/f*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);kt.selectAll("line").data(bt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:L(i.x),y:z(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=L(g.annotationsBox.x),n=z(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(x.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(j=>{const D=j.node(),Ct=D.getComputedTextLength();m=Math.max(m,Ct);const St=D.getBBox();P=Math.max(P,St.height)});const N=m+i*2+105,W=x.length*p+i*2+P/2,A=a.padding,$t=S-a.padding-N,vt=a.padding,Pt=b-a.padding-W;s=Math.max(A,Math.min(s,$t)),n=Math.max(vt,Math.min(n,Pt)),y.forEach((j,D)=>{j.attr("x",s+i).attr("y",n+i+(D+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",n).attr("width",N).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const n=L(s.x),i=z(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const n=L(s.x),i=z(s.y),p=60,l=30,f=20,x=`
3
3
  M ${n} ${i-l/2}
4
4
  L ${n+p-f} ${i-l/2}
@@ -1,4 +1,4 @@
1
- var il=Object.defineProperty;var ll=(r,t,n)=>t in r?il(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var _n=(r,t,n)=>ll(r,typeof t!="symbol"?t+"":t,n);import{t as vt,bq as m,bo as g,a_ as W,by as ht,b as _t,bs as Dn,bu as ar,bt as dl,br as aa}from"./CgPr4hs2.js";import{bs as yt,a5 as D,bA as L,bS as N,bl as ie,ay as xe,aD as e,b_ as B,bO as X,W as f,c9 as a,bn as bt,bV as me,bH as z,aA as p,be as br,b$ as Vr,aB as A,bj as On,c0 as In,c6 as cl,bo as xa,br as Jr,ca as Xt,bf as nr,a7 as Et,am as Mn,ax as Pn,bk as za,ai as sa,aj as jr,aw as Wa,bz as Vo,cb as Ja,c5 as Sa,aC as vr,cd as Ys,bv as ul}from"./B8o4lNgr.js";import{k as Ne,s as ne,a as un,j as Xa,l as oa,h as Dr,d as ft,f as Vt,i as zn,I as fl,c as ia,p as gl,o as ml,S as pl,C as vl}from"./CsstSIr0.js";import{H as Kt,j as hl,s as Ko,p as qs,y as _l,u as yl,t as Mr,g as Kn,c as ra,E as Is,A as ss,D as Ha,S as bl}from"./CFHzcj7N.js";import{b as fn}from"./D2g8BuR1.js";import{bL as Go,j as Ra,a2 as Ss,ah as Ua,E as wl,ap as Na,aG as xl,aJ as eo}from"./DOzFltDq.js";import{t as Gn,q as kl,P as Il}from"./C5qvCE4M.js";import{F as Ht,cz as Ds,ar as Qo,aU as Zo,aG as Sl,c0 as Al,a3 as Tl,a4 as ja,aJ as Cl,cB as Ml,cA as Pl,a2 as Ya,at as Bs,ag as Rl,bn as Nl,aO as El,aS as Ll,bC as $l,al as Ol,cr as ql,az as to,bb as kn,aL as ro,bU as os,aE as Aa,cK as Dl,c2 as Bl,bi as Fl,b as zl,cf as Wl,ad as Hl,b5 as is,ch as la,cu as Ul,cU as Fs,X as Jo,a as jl}from"./B7NNbItI.js";import{c0 as Ea,aA as ba,cL as Xo,cN as qn,bR as es,i as Vl,cF as Yo,cK as ts,cJ as ei,cH as ti,f as Tn,a9 as Kl,aa as Gl,av as Ql,r as Zl,J as Jl,V as no,u as ri,dG as Xl,as as Yl,j as ed,t as ls,m as td,N as rd,n as nd,p as ni,q as ai,a5 as ad,R as sd,Q as od,$ as id,k as ld,cO as dd,a3 as cd,C as ud,w as fd,U as ao}from"./Df2ohObb.js";import{G9 as lt,nx as gd,rF as La,mo as so,tk as si,tm as oi,q4 as md,v$ as Va,L as pd,sF as ii,mj as li,b9 as $a,w0 as vd,oW as hd,rj as _d,td as di,mh as yd,lr as bd,g as wd,ws as xd,wp as kd,wr as Id}from"./BL_sVoge.js";import{f as pt,am as zs,bs as Sd,bw as ds,bK as Ad}from"./Ps9iRbKd.js";import{a4 as Td,x as cs,a1 as Cd,O as us,V as Md,$ as Pd,j as Rd,o as da,M as ea,p as Nd,F as Ed,u as Ld,s as $d,L as fs,J as Od,y as qd,K as Dd,_ as ma,Q as Ta,N as oo,m as io,E as Bd,c as gs,B as lo,z as Fd,v as co,H as pa,P as zd,G as Wd,i as Hd,R as Ud,T as jd,A as Vd,g as Kd,b as Gd,D as Qd,f as Zd,e as Jd,a as Xd,C as Yd,h as ec,U as ci,a5 as tc,t as rc,k as nc,d as uo}from"./C1oWz50Y.js";import{i as ac,e as sc}from"./rpeM9FmT.js";import{b as ms}from"./D-Zd1oaK.js";import{M as ca,C as Ca}from"./Bm0FPS2G.js";import{C as fo}from"./2Zse_zlb.js";import"./LIohq1To.js";import{P as oc}from"./BuPFKHtN.js";import"./DlqxHCQ7.js";import{c as ui}from"./ChTqQfQN.js";import{s as Rn}from"./D3ROSEe0.js";import{S as ic}from"./D_TiJ_fE.js";import{D as go,M as lc}from"./CobcHKt3.js";import{b as dc,s as Un,c as Ka}from"./zCZWMH02.js";import{O as Oa,y as ps,E as vs,B as hs,N as cc,m as uc,l as fc,d as Ga,C as mo,f as gc,e as mc,g as pc}from"./1RFrLNza.js";import{j as fi,g as vc,s as po}from"./BmUlDo2H.js";import{f as hc}from"./BJzHxIyr.js";import{c as an}from"./Bs9Hbccv.js";import{A as _c,z as yc,c as bc}from"./C9tAiYT0.js";import{o as _s,n as ys,v as vo,h as wc}from"./CsBmR9QJ.js";import"./q4FIdUSc.js";import{ay as $n,t as xc}from"./CE7ZtQHh.js";import"./Bn3UQ-Cp.js";import{R as As,C as rs,n as kc,e as Ic,d as Sc,f as ho,P as Ac}from"./Bo4f3vLH.js";import"./D32qvOGn.js";import{aU as Ir,A as qa,af as gi,n as mi,e as Tc,I as Cc,R as Mc,an as Pc,b as Rc,X as Nc}from"./7bnNetCh.js";import{a0 as _o,N as ha,s as pi,k as Ec}from"./DbNaInRh.js";import{B as Lc}from"./Cf5LD9TB.js";import{r as $c,e as Oc,o as qc}from"./CTm1UFNm.js";import{o as vi}from"./DywBWiWr.js";import{g as Ws}from"./FvORToMl.js";import{a as Dc,M as Bc}from"./DJuSbP_R.js";import{c as ua}from"./Co_Aa6ij.js";import{A as Fc}from"./D2WFqoJa.js";import{f as zc,d as Wc}from"./CBQ9Dj27.js";import{E as Hc,t as Uc,z as jc,r as yo,y as Vc,n as Kc}from"./DKCiaCAE.js";import{b as Gc}from"./DY2nfza0.js";import{D as Qc}from"./P80hEEPK.js";import{S as Zc}from"./D-y9m6ao.js";import{u as Jc,a as Xc,c as bo,S as Yc}from"./D2AmAQEr.js";import{T as Ts}from"./Df1mOKLZ.js";import{a as eu}from"./LZ5jXWXv.js";import{b as wo}from"./C3hWtekV.js";import{a4 as tu}from"./BRqvd9LR.js";import{c as ru}from"./BUGkkCym.js";function nu(r,t,n,s=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const i=r.messageMetadata?.fromPrincipalId??r.author?.principalId,o=Hc(r)&&r.author?.principalId!==null&&i===t;return{edit:o,remove:o||t===n||s,sendNow:(o||s)&&!hi(r)}}function fa(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function hi(r){return r.messageMetadata?.type==="script_monitor_wake"&&typeof r.messageMetadata.monitorId=="string"}function xo(r,t=Date.now()){const n=r.messageMetadata,s=n?.fromPrincipalId,i=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof s=="string"&&s.length>0),o=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!o&&!i&&!hi(r)}const Sh="pl-3.5! pr-2!";var au=A("<!> ",1),su=A('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function _i(r,t){if(new.target)return vt({component:_i,...r});yt(t,!0);let n=m(t,"name",7),s=m(t,"description",7),i=m(t,"content",7),o=m(t,"onUseScript",7),d=me(!1);function c(){navigator.clipboard.writeText(i()),z(d,!0),setTimeout(()=>{z(d,!1)},2e3)}function y(){o()?.({name:n(),description:s(),content:i()})}var h={get name(){return n()},set name(j){n(j),p()},get description(){return s()},set description(j){s(j),p()},get content(){return i()},set content(j){i(j),p()},get onUseScript(){return o()},set onUseScript(j){o(j),p()},$set:ht,$on:(j,oe)=>_t(t,j,oe)},b=su(),I=D(b),M=D(I),Q=D(M),w=D(Q);Ht(w,{get icon(){return Ds},size:"sm"}),L(Q);var E=N(Q,2),G=ie(E,!0);L(M);var U=N(M,2),P=D(U);pt(P,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(j,oe)=>{var fe=au(),Ie=xe(fe);{let Ee=a(()=>e(d)?Qo:Zo);Ht(Ie,{get icon(){return e(Ee)},class:"mr-1"})}var pe=N(Ie);B(Ee=>X(pe,` ${Ee??""}`),[()=>e(d)?g.chat_shared_copied_label():g.chat_shared_copy_label()]),f(j,fe)},$$slots:{default:!0}});var R=N(P,2);{var x=j=>{pt(j,{variant:"ghost-light",size:"sm",onclick:y,class:"h-7 px-2",children:(oe,fe)=>{br();var Ie=Vr();B(pe=>X(Ie,pe),[()=>g.chat_setupScriptCard_useScript_label()]),f(oe,Ie)},$$slots:{default:!0}})};W(R,j=>{o()&&j(x)})}L(U),L(I);var Y=N(I,2),S=ie(Y,!0),T=N(Y,2),Me=ie(T,!0);return L(b),B(()=>{X(G,n()),X(S,s()),X(Me,i())}),f(r,b),bt(h)}const pr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class ou{constructor(){_n(this,"buffer","");_n(this,"currentToolName",null);_n(this,"currentToolId",null);_n(this,"lastToolId",null);_n(this,"currentToolParams",[]);_n(this,"currentToolResultContent",[]);_n(this,"inToolResult",!1);_n(this,"inCodeBlock",!1);_n(this,"codeBlockLanguage","");_n(this,"codeBlockContent","");_n(this,"characterBuffer","");_n(this,"inCharacterMode",!1);_n(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const i=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),y=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
1
+ var il=Object.defineProperty;var ll=(r,t,n)=>t in r?il(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var _n=(r,t,n)=>ll(r,typeof t!="symbol"?t+"":t,n);import{t as vt,bq as m,bo as g,a_ as W,by as ht,b as _t,bs as Dn,bu as ar,bt as dl,br as aa}from"./CgPr4hs2.js";import{bs as yt,a5 as D,bA as L,bS as N,bl as ie,ay as xe,aD as e,b_ as B,bO as X,W as f,c9 as a,bn as bt,bV as me,bH as z,aA as p,be as br,b$ as Vr,aB as A,bj as On,c0 as In,c6 as cl,bo as xa,br as Jr,ca as Xt,bf as nr,a7 as Et,am as Mn,ax as Pn,bk as za,ai as sa,aj as jr,aw as Wa,bz as Vo,cb as Ja,c5 as Sa,aC as vr,cd as Ys,bv as ul}from"./B8o4lNgr.js";import{k as Ne,s as ne,a as un,j as Xa,l as oa,h as Dr,d as ft,f as Vt,i as zn,I as fl,c as ia,p as gl,o as ml,S as pl,C as vl}from"./CsstSIr0.js";import{H as Kt,j as hl,s as Ko,p as qs,y as _l,u as yl,t as Mr,g as Kn,c as ra,E as Is,A as ss,D as Ha,S as bl}from"./CFHzcj7N.js";import{b as fn}from"./D2g8BuR1.js";import{bL as Go,j as Ra,a2 as Ss,ah as Ua,E as wl,ap as Na,aG as xl,aJ as eo}from"./86pQg5ba.js";import{t as Gn,q as kl,P as Il}from"./C5qvCE4M.js";import{F as Ht,cz as Ds,ar as Qo,aU as Zo,aG as Sl,c0 as Al,a3 as Tl,a4 as ja,aJ as Cl,cB as Ml,cA as Pl,a2 as Ya,at as Bs,ag as Rl,bn as Nl,aO as El,aS as Ll,bC as $l,al as Ol,cr as ql,az as to,bb as kn,aL as ro,bU as os,aE as Aa,cK as Dl,c2 as Bl,bi as Fl,b as zl,cf as Wl,ad as Hl,b5 as is,ch as la,cu as Ul,cU as Fs,X as Jo,a as jl}from"./B7NNbItI.js";import{c0 as Ea,aA as ba,cL as Xo,cN as qn,bR as es,i as Vl,cF as Yo,cK as ts,cJ as ei,cH as ti,f as Tn,a9 as Kl,aa as Gl,av as Ql,r as Zl,J as Jl,V as no,u as ri,dG as Xl,as as Yl,j as ed,t as ls,m as td,N as rd,n as nd,p as ni,q as ai,a5 as ad,R as sd,Q as od,$ as id,k as ld,cO as dd,a3 as cd,C as ud,w as fd,U as ao}from"./Df2ohObb.js";import{G9 as lt,nx as gd,rF as La,mo as so,tk as si,tm as oi,q4 as md,v$ as Va,L as pd,sF as ii,mj as li,b9 as $a,w0 as vd,oW as hd,rj as _d,td as di,mh as yd,lr as bd,g as wd,ws as xd,wp as kd,wr as Id}from"./BL_sVoge.js";import{f as pt,am as zs,bs as Sd,bw as ds,bK as Ad}from"./Ps9iRbKd.js";import{a4 as Td,x as cs,a1 as Cd,O as us,V as Md,$ as Pd,j as Rd,o as da,M as ea,p as Nd,F as Ed,u as Ld,s as $d,L as fs,J as Od,y as qd,K as Dd,_ as ma,Q as Ta,N as oo,m as io,E as Bd,c as gs,B as lo,z as Fd,v as co,H as pa,P as zd,G as Wd,i as Hd,R as Ud,T as jd,A as Vd,g as Kd,b as Gd,D as Qd,f as Zd,e as Jd,a as Xd,C as Yd,h as ec,U as ci,a5 as tc,t as rc,k as nc,d as uo}from"./Q0BLEqss.js";import{i as ac,e as sc}from"./rpeM9FmT.js";import{b as ms}from"./D-Zd1oaK.js";import{M as ca,C as Ca}from"./BZrGNaMY.js";import{C as fo}from"./BjJW_Stw.js";import"./DX8x4w_C.js";import{P as oc}from"./2zyiBICC.js";import"./DlqxHCQ7.js";import{c as ui}from"./ChTqQfQN.js";import{s as Rn}from"./D3ROSEe0.js";import{S as ic}from"./CW92V9X1.js";import{D as go,M as lc}from"./LhLTjc8B.js";import{b as dc,s as Un,c as Ka}from"./BCqLW1sk.js";import{O as Oa,y as ps,E as vs,B as hs,N as cc,m as uc,l as fc,d as Ga,C as mo,f as gc,e as mc,g as pc}from"./CT1GHsTn.js";import{j as fi,g as vc,s as po}from"./BmUlDo2H.js";import{f as hc}from"./BJzHxIyr.js";import{c as an}from"./Bs9Hbccv.js";import{A as _c,z as yc,c as bc}from"./C9tAiYT0.js";import{o as _s,n as ys,v as vo,h as wc}from"./C-BS-coA.js";import"./q4FIdUSc.js";import{ay as $n,t as xc}from"./CE7ZtQHh.js";import"./Bn3UQ-Cp.js";import{R as As,C as rs,n as kc,e as Ic,d as Sc,f as ho,P as Ac}from"./Bo4f3vLH.js";import"./D32qvOGn.js";import{aU as Ir,A as qa,af as gi,n as mi,e as Tc,I as Cc,R as Mc,an as Pc,b as Rc,X as Nc}from"./4cIwmSuD.js";import{a0 as _o,N as ha,s as pi,k as Ec}from"./CfV9aH5z.js";import{B as Lc}from"./C7mmIZCH.js";import{r as $c,e as Oc,o as qc}from"./DK1Nq2tK.js";import{o as vi}from"./BmwLKx4A.js";import{g as Ws}from"./FvORToMl.js";import{a as Dc,M as Bc}from"./DJuSbP_R.js";import{c as ua}from"./Co_Aa6ij.js";import{A as Fc}from"./ZsIzkx4b.js";import{f as zc,d as Wc}from"./C9AcsTi0.js";import{E as Hc,t as Uc,z as jc,r as yo,y as Vc,n as Kc}from"./RiB0F36z.js";import{b as Gc}from"./DY2nfza0.js";import{D as Qc}from"./P80hEEPK.js";import{S as Zc}from"./D-y9m6ao.js";import{u as Jc,a as Xc,c as bo,S as Yc}from"./D2AmAQEr.js";import{T as Ts}from"./Df1mOKLZ.js";import{a as eu}from"./LZ5jXWXv.js";import{b as wo}from"./C3hWtekV.js";import{a4 as tu}from"./BRqvd9LR.js";import{c as ru}from"./B7WsW6mB.js";function nu(r,t,n,s=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const i=r.messageMetadata?.fromPrincipalId??r.author?.principalId,o=Hc(r)&&r.author?.principalId!==null&&i===t;return{edit:o,remove:o||t===n||s,sendNow:(o||s)&&!hi(r)}}function fa(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function hi(r){return r.messageMetadata?.type==="script_monitor_wake"&&typeof r.messageMetadata.monitorId=="string"}function xo(r,t=Date.now()){const n=r.messageMetadata,s=n?.fromPrincipalId,i=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof s=="string"&&s.length>0),o=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!o&&!i&&!hi(r)}const Sh="pl-3.5! pr-2!";var au=A("<!> ",1),su=A('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function _i(r,t){if(new.target)return vt({component:_i,...r});yt(t,!0);let n=m(t,"name",7),s=m(t,"description",7),i=m(t,"content",7),o=m(t,"onUseScript",7),d=me(!1);function c(){navigator.clipboard.writeText(i()),z(d,!0),setTimeout(()=>{z(d,!1)},2e3)}function y(){o()?.({name:n(),description:s(),content:i()})}var h={get name(){return n()},set name(j){n(j),p()},get description(){return s()},set description(j){s(j),p()},get content(){return i()},set content(j){i(j),p()},get onUseScript(){return o()},set onUseScript(j){o(j),p()},$set:ht,$on:(j,oe)=>_t(t,j,oe)},b=su(),I=D(b),M=D(I),Q=D(M),w=D(Q);Ht(w,{get icon(){return Ds},size:"sm"}),L(Q);var E=N(Q,2),G=ie(E,!0);L(M);var U=N(M,2),P=D(U);pt(P,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(j,oe)=>{var fe=au(),Ie=xe(fe);{let Ee=a(()=>e(d)?Qo:Zo);Ht(Ie,{get icon(){return e(Ee)},class:"mr-1"})}var pe=N(Ie);B(Ee=>X(pe,` ${Ee??""}`),[()=>e(d)?g.chat_shared_copied_label():g.chat_shared_copy_label()]),f(j,fe)},$$slots:{default:!0}});var R=N(P,2);{var x=j=>{pt(j,{variant:"ghost-light",size:"sm",onclick:y,class:"h-7 px-2",children:(oe,fe)=>{br();var Ie=Vr();B(pe=>X(Ie,pe),[()=>g.chat_setupScriptCard_useScript_label()]),f(oe,Ie)},$$slots:{default:!0}})};W(R,j=>{o()&&j(x)})}L(U),L(I);var Y=N(I,2),S=ie(Y,!0),T=N(Y,2),Me=ie(T,!0);return L(b),B(()=>{X(G,n()),X(S,s()),X(Me,i())}),f(r,b),bt(h)}const pr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class ou{constructor(){_n(this,"buffer","");_n(this,"currentToolName",null);_n(this,"currentToolId",null);_n(this,"lastToolId",null);_n(this,"currentToolParams",[]);_n(this,"currentToolResultContent",[]);_n(this,"inToolResult",!1);_n(this,"inCodeBlock",!1);_n(this,"codeBlockLanguage","");_n(this,"codeBlockContent","");_n(this,"characterBuffer","");_n(this,"inCharacterMode",!1);_n(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const i=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),y=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
2
2
  `);i.push({type:"tool_result",content:y,metadata:{toolId:this.currentToolId,isError:c}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const o=t.indexOf("🤖"),d=t.substring(o+2);if(this.inCharacterMode=!0,this.characterBuffer="",d&&d.trim()&&d!==`
3
3
  `){const c=d.replace(/^\n/,"");c&&(this.characterBuffer=c)}return i}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
4
4
  `)&&this.characterBuffer.length>0){const i=t.substring(0,t.indexOf(`