@intent-hq/web 2.310.0 → 2.310.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 (203) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{BCfzoYfU.js → -SL67XKV.js} +1 -1
  3. package/web/app/immutable/chunks/{C10ooCp1.js → 351KaJp_.js} +1 -1
  4. package/web/app/immutable/chunks/{9H8XjRUA.js → 7Iuyw4Ow.js} +1 -1
  5. package/web/app/immutable/chunks/{B7YFRmY9.js → 7KTbkf4W.js} +2 -2
  6. package/web/app/immutable/chunks/{CJRXWUIB.js → 9ySBq1wF.js} +1 -1
  7. package/web/app/immutable/chunks/{u7rudBWt.js → B0X6Qy4e.js} +1 -1
  8. package/web/app/immutable/chunks/{B-AmXRdp.js → B20hJMKp.js} +2 -2
  9. package/web/app/immutable/chunks/{COamqMg3.js → B2safKX4.js} +1 -1
  10. package/web/app/immutable/chunks/{BhPGdKCS.js → B4dTn6xv.js} +1 -1
  11. package/web/app/immutable/chunks/{DR8edmqz.js → B8QrskMI.js} +1 -1
  12. package/web/app/immutable/chunks/{DDfFKaoN.js → B9r0JXjW.js} +1 -1
  13. package/web/app/immutable/chunks/{CjUOGaIe.js → BBTS8ZOM.js} +3 -3
  14. package/web/app/immutable/chunks/{B7d6B8i2.js → BCO4VeSA.js} +1 -1
  15. package/web/app/immutable/chunks/{DO_qdDGF.js → BCm8Gasf.js} +1 -1
  16. package/web/app/immutable/chunks/{CTI6K_Uf.js → BEdJCn-8.js} +1 -1
  17. package/web/app/immutable/chunks/{CQSBplf3.js → BEhoKnQT.js} +1 -1
  18. package/web/app/immutable/chunks/{BdluP0Re.js → BGBb6fI-.js} +1 -1
  19. package/web/app/immutable/chunks/{Bj5SHeCl.js → BGLkcG6I.js} +2 -2
  20. package/web/app/immutable/chunks/{BN912nIE.js → BGQ3htf5.js} +1 -1
  21. package/web/app/immutable/chunks/{DE2cS7Gk.js → BIxkRFIj.js} +2 -2
  22. package/web/app/immutable/chunks/{C0oSivDJ.js → BKGPkCRs.js} +1 -1
  23. package/web/app/immutable/chunks/{Jj6giUQG.js → BKLEAopb.js} +1 -1
  24. package/web/app/immutable/chunks/{ojOCNOao.js → BKSgn5w-.js} +1 -1
  25. package/web/app/immutable/chunks/{DyHBOL0Q.js → BKY64haD.js} +6 -6
  26. package/web/app/immutable/chunks/{BreeoU2c.js → BNg3GOxL.js} +2 -2
  27. package/web/app/immutable/chunks/{BGS2SWF9.js → BOXqfDS_.js} +1 -1
  28. package/web/app/immutable/chunks/{BFcpLy2V.js → BP_ooGOd.js} +1 -1
  29. package/web/app/immutable/chunks/{DKQ9ngHk.js → BQApP15C.js} +1 -1
  30. package/web/app/immutable/chunks/{Cyhorubq.js → BS6cE8e9.js} +1 -1
  31. package/web/app/immutable/chunks/{CqslOMwD.js → BTXk2yGf.js} +1 -1
  32. package/web/app/immutable/chunks/{_otPiQOz.js → BUSwtV99.js} +1 -1
  33. package/web/app/immutable/chunks/{xq16NT3q.js → BV7dztYI.js} +1 -1
  34. package/web/app/immutable/chunks/{gMys6NxR.js → BV9p4X5I.js} +6 -6
  35. package/web/app/immutable/chunks/{B-2EcDun.js → BVrOGXf1.js} +1 -1
  36. package/web/app/immutable/chunks/{41W03kYB.js → BZoKWA-r.js} +1 -1
  37. package/web/app/immutable/chunks/{CCJs9cZU.js → B_D0NLtg.js} +1 -1
  38. package/web/app/immutable/chunks/{g3iFlZMW.js → BbiXTFqz.js} +1 -1
  39. package/web/app/immutable/chunks/{9jrhCQLH.js → Bfkn2BGM.js} +1 -1
  40. package/web/app/immutable/chunks/{PUlhNAJH.js → BgmKjqUX.js} +1 -1
  41. package/web/app/immutable/chunks/{dxICYcDB.js → Bhcwd2SW.js} +4 -4
  42. package/web/app/immutable/chunks/{Bz-Yc7Wl.js → Bk7xBWHf.js} +1 -1
  43. package/web/app/immutable/chunks/{DZpxiGBS.js → BmDskjjc.js} +1 -1
  44. package/web/app/immutable/chunks/{CnsnqDQd.js → BoiNnj2h.js} +1 -1
  45. package/web/app/immutable/chunks/{D7jRh74W.js → BrVvVCxw.js} +1 -1
  46. package/web/app/immutable/chunks/{3xT4xHCc.js → BsP5G0Fo.js} +1 -1
  47. package/web/app/immutable/chunks/{DRr3RJL8.js → BtHVXttl.js} +1 -1
  48. package/web/app/immutable/chunks/{CoIY5b-q.js → ByGsJxdn.js} +1 -1
  49. package/web/app/immutable/chunks/ByM2DIOs.js +1 -0
  50. package/web/app/immutable/chunks/{70PyZUYg.js → ByzYvvQp.js} +1 -1
  51. package/web/app/immutable/chunks/{CSNcNZAr.js → Bz0SnIMO.js} +1 -1
  52. package/web/app/immutable/chunks/{CS85fbWZ.js → C-Mmob1s.js} +1 -1
  53. package/web/app/immutable/chunks/{KljALMT3.js → C0DDaBnV.js} +1 -1
  54. package/web/app/immutable/chunks/{CJNlKuUY.js → C0Yks_oS.js} +1 -1
  55. package/web/app/immutable/chunks/{CqBIsc3j.js → C1IwSyrV.js} +1 -1
  56. package/web/app/immutable/chunks/{CaSAI0VT.js → C7oH1dbI.js} +1 -1
  57. package/web/app/immutable/chunks/{Cbh5ofn-.js → C8CCN24q.js} +1 -1
  58. package/web/app/immutable/chunks/{BLOlf2p9.js → C9gL5x04.js} +1 -1
  59. package/web/app/immutable/chunks/{DF1EzKEK.js → C9nyJoiB.js} +1 -1
  60. package/web/app/immutable/chunks/{W2kuqRhi.js → CBHPIqXg.js} +1 -1
  61. package/web/app/immutable/chunks/{Br8EhifD.js → CBV2Z_QZ.js} +1 -1
  62. package/web/app/immutable/chunks/{C_YR_yV-.js → CCIGQjYf.js} +1 -1
  63. package/web/app/immutable/chunks/{DfF0sVRg.js → CDHds8o_.js} +1 -1
  64. package/web/app/immutable/chunks/{2t50lsua.js → CEdLQlJ6.js} +1 -1
  65. package/web/app/immutable/chunks/{Cg-2uoaY.js → CHH2PtZ7.js} +1 -1
  66. package/web/app/immutable/chunks/{BzAchneh.js → CHIHAnR-.js} +1 -1
  67. package/web/app/immutable/chunks/{Dqn0Ivcg.js → CHj2oCmD.js} +1 -1
  68. package/web/app/immutable/chunks/{iYpMWPUv.js → CIXNMjfT.js} +1 -1
  69. package/web/app/immutable/chunks/{BQqlXz7Q.js → CKFDW9cI.js} +1 -1
  70. package/web/app/immutable/chunks/{DsJW9cbJ.js → CKQlE_M1.js} +1 -1
  71. package/web/app/immutable/chunks/{CDACoTI2.js → CPvhRhlk.js} +1 -1
  72. package/web/app/immutable/chunks/{DXIbhld5.js → CQe4IdgR.js} +1 -1
  73. package/web/app/immutable/chunks/{50gvEURs.js → CQf-fH5v.js} +1 -1
  74. package/web/app/immutable/chunks/{Cj_j-lXn.js → CSBhPNbN.js} +1 -1
  75. package/web/app/immutable/chunks/{CXVxtSkJ.js → CSLTsum9.js} +1 -1
  76. package/web/app/immutable/chunks/{CnCQnNEp.js → CSbiiZpm.js} +7 -7
  77. package/web/app/immutable/chunks/{DcI5wCZ5.js → CToDhNW4.js} +1 -1
  78. package/web/app/immutable/chunks/{CGizsEXq.js → CUvX4uDB.js} +1 -1
  79. package/web/app/immutable/chunks/{NdkVneBF.js → CWyh7Yhz.js} +1 -1
  80. package/web/app/immutable/chunks/{DvZBb8H_.js → CYFK9YEX.js} +1 -1
  81. package/web/app/immutable/chunks/{K10ifhfc.js → CcGF51wP.js} +1 -1
  82. package/web/app/immutable/chunks/{CaNdc6nO.js → Cd5vVJw4.js} +1 -1
  83. package/web/app/immutable/chunks/{CMcFXsiy.js → CeEeQIAV.js} +1 -1
  84. package/web/app/immutable/chunks/{Z1IVvFmx.js → CgAIOmc3.js} +1 -1
  85. package/web/app/immutable/chunks/{B6EdH0gk.js → CgjSMAIJ.js} +1 -1
  86. package/web/app/immutable/chunks/{CPm7NntQ.js → Ck7B90Kr.js} +1 -1
  87. package/web/app/immutable/chunks/{d1jIpATl.js → CkAILno9.js} +1 -1
  88. package/web/app/immutable/chunks/{D9ytGf5e.js → CkawHIFZ.js} +1 -1
  89. package/web/app/immutable/chunks/{DNmtQDpd.js → ClXr1b-t.js} +1 -1
  90. package/web/app/immutable/chunks/{BZmA3QXk.js → CmWBRPmR.js} +1 -1
  91. package/web/app/immutable/chunks/{C3OhkOVO.js → Cmo-9vFV.js} +1 -1
  92. package/web/app/immutable/chunks/{BpsqLTOp.js → CnmCWFKQ.js} +1 -1
  93. package/web/app/immutable/chunks/{zeRt85dY.js → CnszEr0a.js} +1 -1
  94. package/web/app/immutable/chunks/{C519ihU9.js → CoFCa7Mb.js} +1 -1
  95. package/web/app/immutable/chunks/{C0f7EiIR.js → CoeuT-m3.js} +1 -1
  96. package/web/app/immutable/chunks/{C1rjgyNe.js → Coy9jSf1.js} +1 -1
  97. package/web/app/immutable/chunks/{DPpctSbu.js → CrcLvVto.js} +1 -1
  98. package/web/app/immutable/chunks/{BibcbnTP.js → CsASRGy9.js} +1 -1
  99. package/web/app/immutable/chunks/{D4n7ImP1.js → CsYRAdgB.js} +1 -1
  100. package/web/app/immutable/chunks/{PDuKM1t5.js → Cs_Q6mos.js} +1 -1
  101. package/web/app/immutable/chunks/{kqGPx169.js → CsnLwu9F.js} +1 -1
  102. package/web/app/immutable/chunks/{CwpRQv-w.js → CuYeKLE8.js} +1 -1
  103. package/web/app/immutable/chunks/{CjdtUG_a.js → Cuozo7M1.js} +1 -1
  104. package/web/app/immutable/chunks/{CZZvWnXg.js → CwH3s3Sg.js} +1 -1
  105. package/web/app/immutable/chunks/{BgmOiuVG.js → CxRm1vYn.js} +6 -6
  106. package/web/app/immutable/chunks/{DFCDnAax.js → D-9LH0ah.js} +1 -1
  107. package/web/app/immutable/chunks/{CZT_wjvA.js → D-o9b0Cd.js} +1 -1
  108. package/web/app/immutable/chunks/{kOoRis7L.js → D04E4MVv.js} +1 -1
  109. package/web/app/immutable/chunks/{DUYSWpmE.js → D1QKDDLH.js} +1 -1
  110. package/web/app/immutable/chunks/{BPG20H4B.js → D411lQkp.js} +1 -1
  111. package/web/app/immutable/chunks/{eCj-hB88.js → D61DwhDw.js} +1 -1
  112. package/web/app/immutable/chunks/{DvPohY9Y.js → D81gRUjY.js} +1 -1
  113. package/web/app/immutable/chunks/{CbMdHBoe.js → DBAJPVI_.js} +1 -1
  114. package/web/app/immutable/chunks/{Divbj3b8.js → DBt8jmEX.js} +1 -1
  115. package/web/app/immutable/chunks/{BKTwjZpB.js → DCeW9_0X.js} +2 -2
  116. package/web/app/immutable/chunks/{BDchM60p.js → DD-T_Om0.js} +1 -1
  117. package/web/app/immutable/chunks/{DGaGjBKU.js → DEOiJZFa.js} +1 -1
  118. package/web/app/immutable/chunks/{b7kGm9Ly.js → DHW4IXFj.js} +1 -1
  119. package/web/app/immutable/chunks/{DOXLMb3q.js → DJ0w8Oax.js} +1 -1
  120. package/web/app/immutable/chunks/{CAM1CwRY.js → DJ52BT20.js} +1 -1
  121. package/web/app/immutable/chunks/{GX9YV5ly.js → DK1048Bw.js} +1 -1
  122. package/web/app/immutable/chunks/{Da48jYxu.js → DLm51UIm.js} +1 -1
  123. package/web/app/immutable/chunks/{DyPRCICU.js → DMGAuSgb.js} +4 -4
  124. package/web/app/immutable/chunks/{B2O-zJJK.js → DOHtPCK9.js} +1 -1
  125. package/web/app/immutable/chunks/{C_sPSbma.js → DOVnLHFz.js} +1 -1
  126. package/web/app/immutable/chunks/{B2RUMnVi.js → DQEBW0YT.js} +1 -1
  127. package/web/app/immutable/chunks/{B_EqlvEE.js → DQulsXJ7.js} +1 -1
  128. package/web/app/immutable/chunks/{CGMhstmi.js → DRMT9vvq.js} +1 -1
  129. package/web/app/immutable/chunks/{BZJTxW0W.js → DUkegami.js} +1 -1
  130. package/web/app/immutable/chunks/{DfEETRjs.js → DXOCO_oS.js} +1 -1
  131. package/web/app/immutable/chunks/{C7_3LSl8.js → DZ0nrC9W.js} +1 -1
  132. package/web/app/immutable/chunks/{swAYnpK6.js → D_9AVJm5.js} +1 -1
  133. package/web/app/immutable/chunks/{Bbi-Ieb_.js → DaEQgqyy.js} +1 -1
  134. package/web/app/immutable/chunks/{xFj9RuQx.js → DdAxykhC.js} +1 -1
  135. package/web/app/immutable/chunks/{BDEqpi1y.js → DeRneTJF.js} +1 -1
  136. package/web/app/immutable/chunks/{wihFHGRA.js → DeopB2f-.js} +1 -1
  137. package/web/app/immutable/chunks/{BeFewn7K.js → DevHtnbn.js} +1 -1
  138. package/web/app/immutable/chunks/{DtFtH7jZ.js → Df6EnPla.js} +1 -1
  139. package/web/app/immutable/chunks/{VtMTQAXA.js → DfMKUxMU.js} +1 -1
  140. package/web/app/immutable/chunks/{DhbOsIE5.js → DhdMM_zt.js} +3 -3
  141. package/web/app/immutable/chunks/{D2b3DtCR.js → DjEB6QMF.js} +1 -1
  142. package/web/app/immutable/chunks/{v70CwcHz.js → DkH3yb1j.js} +1 -1
  143. package/web/app/immutable/chunks/{Bs-gIQLt.js → Doxgswr3.js} +1 -1
  144. package/web/app/immutable/chunks/{NChdTnqQ.js → Drg52kVf.js} +1 -1
  145. package/web/app/immutable/chunks/{D1SkvgLK.js → Dt53cexP.js} +1 -1
  146. package/web/app/immutable/chunks/{zkqMQ7Ph.js → Dx6eBL0x.js} +1 -1
  147. package/web/app/immutable/chunks/{DWztuYd2.js → DxlwMmI8.js} +1 -1
  148. package/web/app/immutable/chunks/{BCWCSGn-.js → DzvQOT8_.js} +1 -1
  149. package/web/app/immutable/chunks/{DUVw4Tv2.js → EZw3rvya.js} +4 -4
  150. package/web/app/immutable/chunks/{BriIY-V6.js → HP7Asd0t.js} +1 -1
  151. package/web/app/immutable/chunks/{4jLfrK-n.js → HzpfURmp.js} +1 -1
  152. package/web/app/immutable/chunks/{CUuCn5ps.js → PJfe_iA1.js} +1 -1
  153. package/web/app/immutable/chunks/{BDuevalq.js → PXMyYXQv.js} +1 -1
  154. package/web/app/immutable/chunks/{CKRb139P.js → Qi3HrsAm.js} +1 -1
  155. package/web/app/immutable/chunks/{BANQT5xk.js → R7gFhaG_.js} +1 -1
  156. package/web/app/immutable/chunks/{DmUq9QE3.js → S1FanOB0.js} +1 -1
  157. package/web/app/immutable/chunks/{SJdoTqK2.js → Si43_nYW.js} +1 -1
  158. package/web/app/immutable/chunks/{CHx78N0-.js → SuMU9B9i.js} +1 -1
  159. package/web/app/immutable/chunks/{tBYaHQw_.js → TQIai6Ne.js} +1 -1
  160. package/web/app/immutable/chunks/{C7T4LQE1.js → UaGv-ChR.js} +1 -1
  161. package/web/app/immutable/chunks/{DqvIKmgg.js → _F3xl3RI.js} +1 -1
  162. package/web/app/immutable/chunks/{DYy64AXn.js → _MGNV7ZN.js} +1 -1
  163. package/web/app/immutable/chunks/{BwBhkp82.js → _lZu5Dth.js} +1 -1
  164. package/web/app/immutable/chunks/{BoTxE-Dg.js → dtB9lR1B.js} +1 -1
  165. package/web/app/immutable/chunks/{BMvGDYIO.js → ejL3HmTG.js} +3 -3
  166. package/web/app/immutable/chunks/{D8xJeFNR.js → fULl8IO9.js} +1 -1
  167. package/web/app/immutable/chunks/{CYhtIPW_.js → gzjZWAx8.js} +1 -1
  168. package/web/app/immutable/chunks/{I1Pwq7BS.js → hqSEunOk.js} +1 -1
  169. package/web/app/immutable/chunks/{CjKEz27r.js → j0ThtFJc.js} +1 -1
  170. package/web/app/immutable/chunks/{DdRfFUWu.js → nGCCQCpO.js} +1 -1
  171. package/web/app/immutable/chunks/{BpJz1MvJ.js → o-kBqlaj.js} +1 -1
  172. package/web/app/immutable/chunks/{D6XiPT-X.js → opO2fBQB.js} +1 -1
  173. package/web/app/immutable/chunks/{Br2I_00T.js → pdFamTTi.js} +1 -1
  174. package/web/app/immutable/chunks/{CBvSxWdG.js → phowbgF-.js} +1 -1
  175. package/web/app/immutable/chunks/{BVxirgV2.js → qMHHnffV.js} +1 -1
  176. package/web/app/immutable/chunks/{D6QUdzQ1.js → qOCErwrn.js} +1 -1
  177. package/web/app/immutable/chunks/{B6F4Lh4e.js → r1_PrlQL.js} +1 -1
  178. package/web/app/immutable/chunks/{BKpC4hzB.js → rEI8JpP3.js} +1 -1
  179. package/web/app/immutable/chunks/{DXaxEP8U.js → s5P9UVzf.js} +1 -1
  180. package/web/app/immutable/chunks/{Citosjx7.js → sIHUXgeh.js} +1 -1
  181. package/web/app/immutable/chunks/{BmhnS69e.js → t3bi-ExW.js} +2 -2
  182. package/web/app/immutable/chunks/{DEg_be2d.js → t9id1Dgw.js} +1 -1
  183. package/web/app/immutable/chunks/{CCiSNRYo.js → xMirTl3q.js} +1 -1
  184. package/web/app/immutable/chunks/{BPlpnhzH.js → zXW6V5sa.js} +1 -1
  185. package/web/app/immutable/entry/{app.CYN435_6.js → app.DlF41taB.js} +2 -2
  186. package/web/app/immutable/entry/start.CCtO40vu.js +1 -0
  187. package/web/app/immutable/nodes/{0.Dns3lFCs.js → 0.BLjNhnkb.js} +1 -1
  188. package/web/app/immutable/nodes/{1.Cd7O-58t.js → 1.DaghOy3j.js} +1 -1
  189. package/web/app/immutable/nodes/{10.BhPCwuSS.js → 10.CbV_flkh.js} +1 -1
  190. package/web/app/immutable/nodes/{14.CbX9Og6B.js → 14.N_oC1pv5.js} +1 -1
  191. package/web/app/immutable/nodes/{16.DYSTj8m0.js → 16.Cn0uYbJe.js} +2 -2
  192. package/web/app/immutable/nodes/{2.n7fSSeCW.js → 2.CMERPJYK.js} +3 -3
  193. package/web/app/immutable/nodes/{3.CfhffOh-.js → 3.Dk5w9XeG.js} +1 -1
  194. package/web/app/immutable/nodes/{4.DNZDs0vZ.js → 4.CvLiKH0B.js} +1 -1
  195. package/web/app/immutable/nodes/{5.DooL0KdY.js → 5.BL5oLCOi.js} +1 -1
  196. package/web/app/immutable/nodes/{6.pzplS1TY.js → 6.DiKzgiKt.js} +1 -1
  197. package/web/app/immutable/nodes/{7.CRhweboS.js → 7.CM-hNW3A.js} +1 -1
  198. package/web/app/immutable/nodes/{8.CuuXIPiR.js → 8.BThIGSQR.js} +2 -2
  199. package/web/app/immutable/nodes/{9.hhdT3UPw.js → 9.D70tN3NX.js} +1 -1
  200. package/web/app/version.json +1 -1
  201. package/web/index.html +9 -9
  202. package/web/app/immutable/chunks/BmKF0wck.js +0 -1
  203. package/web/app/immutable/entry/start.Cuiv1qlw.js +0 -1
@@ -1 +1 @@
1
- import{g as o,r as l,d as t}from"./SJdoTqK2.js";import{p as m}from"./CQSBplf3.js";import{f as n,bC as s}from"./BgmOiuVG.js";import{M as p,d as u}from"./YqyEOqRv.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),f=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),f(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
1
+ import{g as o,r as l,d as t}from"./Si43_nYW.js";import{p as m}from"./BEhoKnQT.js";import{f as n,bC as s}from"./CxRm1vYn.js";import{M as p,d as u}from"./YqyEOqRv.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),f=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),f(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
@@ -1 +1 @@
1
- import{C as T}from"./BvFAWM27.js";import{a as b}from"./BJzHxIyr.js";import{y as M}from"./yAjP_kdp.js";import{Hq as n,Cw as v,B$ as E,g as S,tS as _,tu as C,Bj as D,BB as O,Dw as H,Bn as L}from"./CRwmdgt6.js";import{aX as p}from"./KQTrHxko.js";import{d as P}from"./B0Z-1lwJ.js";import{n as R}from"./BKTwjZpB.js";import{o as B,e as x}from"./u7rudBWt.js";const f=new b("OpenMessage"),y=150,k=15e3,q=2,W=[150,400,800,1500,3e3],F=T;let g;function A(e){return new Promise(t=>setTimeout(t,e))}function w(e,t){const s=n.state,a=s.agentSessions?.byAgentId[e]?.messages,o=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(a?.some(i=>i.id===t)||o?.some(i=>i.id===t))}function N(e){return n.state.chatState?.byAgentId[e]?.transcriptHydration}async function G(e,t,s){const a=Date.now()+k;let o=0;for(;Date.now()<a;){if(s.aborted)return!1;if(w(e,t))return!0;if(o>=q&&N(e)==="settled"&&!p.select(n.state,e).initialHistoryPending)return!1;o++,await A(y)}return!s.aborted&&w(e,t)}async function Y(e,t,s,a){const o=Date.now()+k;for(;p.select(n.state,e).initialHistoryPending;){if(a?.aborted||Date.now()>=o)return!1;await A(y)}const i=n.state.agentSessions?.byAgentId[e];if(!i||a?.aborted)return!1;if(w(e,t))return!0;s??=i.workspaceId;const d=p.select(n.state,e);let c={nextToken:d.scrollbackOlderToken,prevToken:d.scrollbackGapToken};n.dispatch(D(e,"seek"));const l=p.select(n.state,e).scrollbackDiscardEpoch,u=()=>!!n.state.agentSessions?.byAgentId[e]&&p.select(n.state,e).scrollbackDiscardEpoch===l;try{const r=await M.agents.getConversation(e,F,void 0,t,void 0,s);return a?.aborted||!u()||!r.messages.some(m=>m.id===t)?!1:(n.dispatch(O(e,r.messages,r.messages[0]?.seq)),r.nextToken===null&&n.dispatch(H(e)),c={nextToken:r.nextToken,prevToken:r.prevToken},w(e,t))}catch(r){return f.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:r}),!1}finally{u()&&n.dispatch(L(e,c))}}async function z(e){if(e.signal?.aborted)return;g?.abort(),g=new AbortController;const t=e.signal?AbortSignal.any([g.signal,e.signal]):g.signal,{workspaceId:s,agentId:a,messageId:o,query:i,targetTabId:d}=e;f.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:a,messageId:o});const c=s===S;c&&!e.contentAlreadyOpen&&(n.dispatch(v(a)),n.dispatch(E(S,a)),n.dispatch(_("chief")));const l=c?"/":x(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==l){try{c?await R(l):await B(s)}catch(h){f.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:h});return}if(t.aborted)return;if(window.location.pathname!==l){f.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&n.dispatch(C(s,{agentId:a}));const u=await G(a,o,t)?!0:await Y(a,o,s,t);if(t.aborted)return;if(!u){f.warn("[openMessage] Message not found; conversation opened at tail",{agentId:a,messageId:o});return}const r=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,m={agentId:a,messageId:o,query:i,targetTabId:d,requestId:r,signal:t};for(const h of W)setTimeout(()=>{t.aborted||P("chat:open-message",m)},h)}export{z as openMessage,Y as seekConversationToMessage};
1
+ import{C as T}from"./BvFAWM27.js";import{a as b}from"./BJzHxIyr.js";import{y as M}from"./yAjP_kdp.js";import{Hq as n,Cw as v,B$ as E,g as S,tS as _,tu as C,Bj as D,BB as O,Dw as H,Bn as L}from"./CRwmdgt6.js";import{aX as p}from"./KQTrHxko.js";import{d as P}from"./B0Z-1lwJ.js";import{n as R}from"./DCeW9_0X.js";import{o as B,e as x}from"./B0X6Qy4e.js";const f=new b("OpenMessage"),y=150,k=15e3,q=2,W=[150,400,800,1500,3e3],F=T;let g;function A(e){return new Promise(t=>setTimeout(t,e))}function w(e,t){const s=n.state,a=s.agentSessions?.byAgentId[e]?.messages,o=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(a?.some(i=>i.id===t)||o?.some(i=>i.id===t))}function N(e){return n.state.chatState?.byAgentId[e]?.transcriptHydration}async function G(e,t,s){const a=Date.now()+k;let o=0;for(;Date.now()<a;){if(s.aborted)return!1;if(w(e,t))return!0;if(o>=q&&N(e)==="settled"&&!p.select(n.state,e).initialHistoryPending)return!1;o++,await A(y)}return!s.aborted&&w(e,t)}async function Y(e,t,s,a){const o=Date.now()+k;for(;p.select(n.state,e).initialHistoryPending;){if(a?.aborted||Date.now()>=o)return!1;await A(y)}const i=n.state.agentSessions?.byAgentId[e];if(!i||a?.aborted)return!1;if(w(e,t))return!0;s??=i.workspaceId;const d=p.select(n.state,e);let c={nextToken:d.scrollbackOlderToken,prevToken:d.scrollbackGapToken};n.dispatch(D(e,"seek"));const l=p.select(n.state,e).scrollbackDiscardEpoch,u=()=>!!n.state.agentSessions?.byAgentId[e]&&p.select(n.state,e).scrollbackDiscardEpoch===l;try{const r=await M.agents.getConversation(e,F,void 0,t,void 0,s);return a?.aborted||!u()||!r.messages.some(m=>m.id===t)?!1:(n.dispatch(O(e,r.messages,r.messages[0]?.seq)),r.nextToken===null&&n.dispatch(H(e)),c={nextToken:r.nextToken,prevToken:r.prevToken},w(e,t))}catch(r){return f.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:r}),!1}finally{u()&&n.dispatch(L(e,c))}}async function z(e){if(e.signal?.aborted)return;g?.abort(),g=new AbortController;const t=e.signal?AbortSignal.any([g.signal,e.signal]):g.signal,{workspaceId:s,agentId:a,messageId:o,query:i,targetTabId:d}=e;f.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:a,messageId:o});const c=s===S;c&&!e.contentAlreadyOpen&&(n.dispatch(v(a)),n.dispatch(E(S,a)),n.dispatch(_("chief")));const l=c?"/":x(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==l){try{c?await R(l):await B(s)}catch(h){f.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:h});return}if(t.aborted)return;if(window.location.pathname!==l){f.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&n.dispatch(C(s,{agentId:a}));const u=await G(a,o,t)?!0:await Y(a,o,s,t);if(t.aborted)return;if(!u){f.warn("[openMessage] Message not found; conversation opened at tail",{agentId:a,messageId:o});return}const r=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,m={agentId:a,messageId:o,query:i,targetTabId:d,requestId:r,signal:t};for(const h of W)setTimeout(()=>{t.aborted||P("chat:open-message",m)},h)}export{z as openMessage,Y as seekConversationToMessage};
@@ -1 +1 @@
1
- import{f as s}from"./BgmOiuVG.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
1
+ import{f as s}from"./CxRm1vYn.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
@@ -1,4 +1,4 @@
1
- import{I as he}from"./BCfzoYfU.js";import{p as $e}from"./D9ytGf5e.js";import{p as fe}from"./BDchM60p.js";import{O as ge,aI as ue,aF as ye,K as xe,L as me,aG as pe,a as h,M as Z,ad as w,N as W,aV as be,aL as we,k as ke,p as B,j as ve,y as Ce,at as Ee}from"./CnCQnNEp.js";import{c3 as Be,g as K}from"./BgmOiuVG.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ce.gitGraph,S=h(()=>ve({...Te,...Z().gitGraph}),"getConfig"),d=new he(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function N(){return Ee({length:7})}K(N,"getID");h(N,"getID");function ee(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}K(ee,"uniqBy");h(ee,"uniqBy");var Le=h(function(e){d.records.direction=e},"setDirection"),Me=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Ie=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+N(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Oe=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ne(r),w.debug("in createBranch")},"branch"),_e=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${N()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),Ge=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+N(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ne=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function z(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}K(z,"upsert");h(z,"upsert");function U(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);z(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);z(e,r,o)}}e=ee(e,o=>o.id),U(e)}K(U,"prettyPrintCommitHistory");h(U,"prettyPrintCommitHistory");var He=h(function(){w.debug(d.records.commits);const e=se()[0];U([e])},"prettyPrint"),Se=h(function(){d.reset(),ke()},"clear"),Ae=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=h(function(){return d.records.branches},"getBranches"),Pe=h(function(){return d.records.commits},"getCommits"),se=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),Ne=h(function(){return d.records.head},"getHead"),oe={commitType:m,getConfig:S,setDirection:Le,setOptions:Me,getOptions:Ie,commit:Re,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:qe,getDirection:We,getHead:Ne,setAccTitle:pe,getAccTitle:me,getAccDescription:xe,setAccDescription:ye,setDiagramTitle:ue,getDiagramTitle:ge},Fe=h((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=h((e,r)=>{const s={Commit:h(o=>r.commit(Ye(o)),"Commit"),Branch:h(o=>r.branch(je(o)),"Branch"),Merge:h(o=>r.merge(Ke(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ve(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ke=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ve=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Xe={parse:h(async e=>{const r=await fe("gitGraph",e);w.debug(r),Fe(r,oe)},"parse")},O=10,_=40,L=4,I=2,G=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Q=12,re=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,Y=30,P=new Map,j=[],R=0,y="LR",Qe=h(()=>{C.clear(),E.clear(),P.clear(),R=0,j=[],y="LR"},"clear"),ce=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ie=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Ze=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),er=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=tr(a),o=Math.max(s,o)):i.push(a),ar(a,s)}),s=o,i.forEach(n=>{nr(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Ze(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),rr=h(e=>{const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=h(e=>rr(e)+_,"calculateCommitPosition"),ar=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),nr=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),sr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=V.has(n??""),l=re.has(n??""),f=Je.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),or=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-I).attr("y",t.y+13.5).attr("width",l.width+2*I).attr("height",l.height+2*I),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),cr=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
1
+ import{I as he}from"./-SL67XKV.js";import{p as $e}from"./CkawHIFZ.js";import{p as fe}from"./DD-T_Om0.js";import{O as ge,aI as ue,aF as ye,K as xe,L as me,aG as pe,a as h,M as Z,ad as w,N as W,aV as be,aL as we,k as ke,p as B,j as ve,y as Ce,at as Ee}from"./CSbiiZpm.js";import{c3 as Be,g as K}from"./CxRm1vYn.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ce.gitGraph,S=h(()=>ve({...Te,...Z().gitGraph}),"getConfig"),d=new he(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function N(){return Ee({length:7})}K(N,"getID");h(N,"getID");function ee(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}K(ee,"uniqBy");h(ee,"uniqBy");var Le=h(function(e){d.records.direction=e},"setDirection"),Me=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Ie=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+N(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Oe=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ne(r),w.debug("in createBranch")},"branch"),_e=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${N()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),Ge=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+N(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ne=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function z(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}K(z,"upsert");h(z,"upsert");function U(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);z(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);z(e,r,o)}}e=ee(e,o=>o.id),U(e)}K(U,"prettyPrintCommitHistory");h(U,"prettyPrintCommitHistory");var He=h(function(){w.debug(d.records.commits);const e=se()[0];U([e])},"prettyPrint"),Se=h(function(){d.reset(),ke()},"clear"),Ae=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=h(function(){return d.records.branches},"getBranches"),Pe=h(function(){return d.records.commits},"getCommits"),se=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),Ne=h(function(){return d.records.head},"getHead"),oe={commitType:m,getConfig:S,setDirection:Le,setOptions:Me,getOptions:Ie,commit:Re,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:qe,getDirection:We,getHead:Ne,setAccTitle:pe,getAccTitle:me,getAccDescription:xe,setAccDescription:ye,setDiagramTitle:ue,getDiagramTitle:ge},Fe=h((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=h((e,r)=>{const s={Commit:h(o=>r.commit(Ye(o)),"Commit"),Branch:h(o=>r.branch(je(o)),"Branch"),Merge:h(o=>r.merge(Ke(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ve(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ke=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ve=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Xe={parse:h(async e=>{const r=await fe("gitGraph",e);w.debug(r),Fe(r,oe)},"parse")},O=10,_=40,L=4,I=2,G=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Q=12,re=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,Y=30,P=new Map,j=[],R=0,y="LR",Qe=h(()=>{C.clear(),E.clear(),P.clear(),R=0,j=[],y="LR"},"clear"),ce=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ie=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Ze=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),er=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=tr(a),o=Math.max(s,o)):i.push(a),ar(a,s)}),s=o,i.forEach(n=>{nr(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Ze(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),rr=h(e=>{const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=h(e=>rr(e)+_,"calculateCommitPosition"),ar=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),nr=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),sr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=V.has(n??""),l=re.has(n??""),f=Je.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),or=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-I).attr("y",t.y+13.5).attr("width",l.width+2*I).attr("height",l.height+2*I),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),cr=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
2
2
  ${s-i/2-L/2},${x+I}
3
3
  ${s-i/2-L/2},${x-I}
4
4
  ${t.posWithOffset-i/2-L},${x-c-I}
@@ -1,4 +1,4 @@
1
- import{k as Na,s as oa}from"./DqvIKmgg.js";import{j as ia,h as an,s as W,k as de,l as rn,I as Ea,c as Da,a as On}from"./DmsDslNo.js";import{Z as Ma,cO as za,A as Fa,aX as bn,bT as ja,v as Ba}from"./tBYaHQw_.js";import{bo as c,t as xt,bq as v,by as $t,b as At,bs as zn,a_ as L,bu as ge,bt as Ha}from"./7rNOGHzs.js";import{bs as St,a5 as D,bl as be,bS as P,aD as e,W as u,bA as R,b_ as A,bO as U,be as Mt,b$ as wt,bn as Ct,c9 as i,aA as h,aB as w,ca as Ie,cd as kt,a7 as je,ay as K,bV as Y,br as la,bH as m,bo as Ua,c5 as qa,bi as Ln,bj as Wa,bf as mn,am as Gn,ax as Vn,ai as Qa,aj as Ka,c0 as Ga}from"./B8o4lNgr.js";import{s as da}from"./CQ4a5a4v.js";import{f as Va}from"./DsNWmyox.js";import{a as Ya,H as ca,t as Kt}from"./DzMmhJrp.js";import{r as Xa,o as Ja,A as Yn,L as Za}from"./Bj5SHeCl.js";import{S as vn,t as Nn}from"./Ck-Ax5yG.js";import{R as Xn}from"./lfJ8pseq.js";import{I as ua}from"./DZX-XWnb.js";import"./DbAK3Zju.js";import{aB as hn,cw as er,ak as tr,az as nr,cq as ar,cr as rr,ag as sr,ai as or,ap as ir,av as lr,k as dr,F as cr,dN as ur,L as gr,ch as pr,bQ as fr}from"./KQTrHxko.js";import{Hq as F,cg as Dn,ce as ga,ch as _n,qk as mr,C6 as vr,fD as pa,Ca as hr,bw as _r,yp as br,lZ as Jn,sV as wr,ck as kr,tu as Zn,mU as yr,BS as xr,C9 as $r,c2 as Ar}from"./CRwmdgt6.js";import{K as Sr,A as Cr,ao as Ir,aj as Pr,T as Tr}from"./DUVw4Tv2.js";import{h as Rr}from"./DNyXtEGk.js";import{f as ea}from"./CJNlKuUY.js";import{h as Or,g as Lr}from"./DCj0DpxQ.js";import"./CB-g50lR.js";import{ap as Nr,f as En,a5 as Er,bc as ta}from"./Bgegixo2.js";import"./CKEqC8_B.js";import{c as Dr,r as Mr,q as zr,p as Fr,E as jr}from"./DSjRkndX.js";import{n as Br,D as Hr,k as Ur,c as qr,d as Wr,b as Qr,A as Kr,p as Gr,P as Vr}from"./BmhnS69e.js";import{F as Yr,i as Xr,bq as Jr,h as Zr,bC as es}from"./BZJTxW0W.js";import{c as ze}from"./CiENRH6A.js";import{T as ts}from"./Bvonx6Ga.js";import{ch as fa,cK as ns,cJ as as,bO as rs,x as ss,F as wn,b3 as os,at as is,aI as ls,aE as ds,cO as cs,bc as us,az as gs,X as ps,aJ as fs,a$ as ms,ag as na,a7 as vs,c2 as hs,af as _s,cA as bs,am as ws,cN as ks,aC as ys}from"./CFejQM6t.js";import{b as xs}from"./D2g8BuR1.js";import"./DFHyIdsA.js";import{f as $s}from"./Bze28KHz.js";const As=80,Ss=10,Cs=new Ma(za,{renderer:{html({text:a}){return Fa(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Fn(a){const n=document.createElement("template");n.innerHTML=Cs.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function yt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Mn(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function kn(a,n){return!n||n.length>As||n.split(/\s+/).length>Ss||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function di(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const l=yt(o[1]);return kn(o[0],l)?l:null}function jn(a,n=!1,o=!0){const l=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",s=a.slice(l.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!s)return null;if(n){const _=s[1],y=_.match(/\\+$/)?.[0].length??0;if(_!==_.trim()||_.includes("**")||_.startsWith("*")||_.endsWith("*")||y%2!==0)return null}const g=yt(s[1]);return kn(s[0],g)?{title:n&&o?Fn(s[1]):g,body:Mn(a,l.length+s[0].length)}:null}function aa(a){const n=[];let o=a;for(;o.trim();){const l=Bn(o,!0),d=l.heading?{body:l.body}:jn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function ci(a){const n=[];let o=a;for(;o.trim();){const l=Bn(o,!0,Fn),d=l.heading?{title:l.heading,body:l.body}:jn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function ui(a){const n=Ps(a),o=[];let l=a;for(n.heading&&(o.push({title:n.heading,body:""}),l=n.body);l;){const d=jn(l);if(!d||d.body.length>=l.length)break;o.push({title:d.title,body:""}),l=d.body}if(o.length===0){const d=a.trim(),s=yt(d);return!d.includes(`
1
+ import{k as Na,s as oa}from"./_F3xl3RI.js";import{j as ia,h as an,s as W,k as de,l as rn,I as Ea,c as Da,a as On}from"./DmsDslNo.js";import{Z as Ma,cO as za,A as Fa,aX as bn,bT as ja,v as Ba}from"./TQIai6Ne.js";import{bo as c,t as xt,bq as v,by as $t,b as At,bs as zn,a_ as L,bu as ge,bt as Ha}from"./7rNOGHzs.js";import{bs as St,a5 as D,bl as be,bS as P,aD as e,W as u,bA as R,b_ as A,bO as U,be as Mt,b$ as wt,bn as Ct,c9 as i,aA as h,aB as w,ca as Ie,cd as kt,a7 as je,ay as K,bV as Y,br as la,bH as m,bo as Ua,c5 as qa,bi as Ln,bj as Wa,bf as mn,am as Gn,ax as Vn,ai as Qa,aj as Ka,c0 as Ga}from"./B8o4lNgr.js";import{s as da}from"./CQ4a5a4v.js";import{f as Va}from"./DsNWmyox.js";import{a as Ya,H as ca,t as Kt}from"./DzMmhJrp.js";import{r as Xa,o as Ja,A as Yn,L as Za}from"./BGLkcG6I.js";import{S as vn,t as Nn}from"./Ck-Ax5yG.js";import{R as Xn}from"./lfJ8pseq.js";import{I as ua}from"./DZX-XWnb.js";import"./DbAK3Zju.js";import{aB as hn,cw as er,ak as tr,az as nr,cq as ar,cr as rr,ag as sr,ai as or,ap as ir,av as lr,k as dr,F as cr,dN as ur,L as gr,ch as pr,bQ as fr}from"./KQTrHxko.js";import{Hq as F,cg as Dn,ce as ga,ch as _n,qk as mr,C6 as vr,fD as pa,Ca as hr,bw as _r,yp as br,lZ as Jn,sV as wr,ck as kr,tu as Zn,mU as yr,BS as xr,C9 as $r,c2 as Ar}from"./CRwmdgt6.js";import{K as Sr,A as Cr,ao as Ir,aj as Pr,T as Tr}from"./EZw3rvya.js";import{h as Rr}from"./DNyXtEGk.js";import{f as ea}from"./C0Yks_oS.js";import{h as Or,g as Lr}from"./DCj0DpxQ.js";import"./CB-g50lR.js";import{ap as Nr,f as En,a5 as Er,bc as ta}from"./Bgegixo2.js";import"./CKEqC8_B.js";import{c as Dr,r as Mr,q as zr,p as Fr,E as jr}from"./DSjRkndX.js";import{n as Br,D as Hr,k as Ur,c as qr,d as Wr,b as Qr,A as Kr,p as Gr,P as Vr}from"./t3bi-ExW.js";import{F as Yr,i as Xr,bq as Jr,h as Zr,bC as es}from"./DUkegami.js";import{c as ze}from"./CiENRH6A.js";import{T as ts}from"./Bvonx6Ga.js";import{ch as fa,cK as ns,cJ as as,bO as rs,x as ss,F as wn,b3 as os,at as is,aI as ls,aE as ds,cO as cs,bc as us,az as gs,X as ps,aJ as fs,a$ as ms,ag as na,a7 as vs,c2 as hs,af as _s,cA as bs,am as ws,cN as ks,aC as ys}from"./CFejQM6t.js";import{b as xs}from"./D2g8BuR1.js";import"./DFHyIdsA.js";import{f as $s}from"./Bze28KHz.js";const As=80,Ss=10,Cs=new Ma(za,{renderer:{html({text:a}){return Fa(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Fn(a){const n=document.createElement("template");n.innerHTML=Cs.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function yt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Mn(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function kn(a,n){return!n||n.length>As||n.split(/\s+/).length>Ss||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function di(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const l=yt(o[1]);return kn(o[0],l)?l:null}function jn(a,n=!1,o=!0){const l=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",s=a.slice(l.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!s)return null;if(n){const _=s[1],y=_.match(/\\+$/)?.[0].length??0;if(_!==_.trim()||_.includes("**")||_.startsWith("*")||_.endsWith("*")||y%2!==0)return null}const g=yt(s[1]);return kn(s[0],g)?{title:n&&o?Fn(s[1]):g,body:Mn(a,l.length+s[0].length)}:null}function aa(a){const n=[];let o=a;for(;o.trim();){const l=Bn(o,!0),d=l.heading?{body:l.body}:jn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function ci(a){const n=[];let o=a;for(;o.trim();){const l=Bn(o,!0,Fn),d=l.heading?{title:l.heading,body:l.body}:jn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function ui(a){const n=Ps(a),o=[];let l=a;for(n.heading&&(o.push({title:n.heading,body:""}),l=n.body);l;){const d=jn(l);if(!d||d.body.length>=l.length)break;o.push({title:d.title,body:""}),l=d.body}if(o.length===0){const d=a.trim(),s=yt(d);return!d.includes(`
2
2
  `)&&kn(d,s)?[{title:s,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=l.trim(),o}function Is(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Bn(a,n=!1,o=yt){const l=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(l.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const s=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(s&&yt(s[1]))return{heading:o(s[1]),body:Mn(a,l.length+s[0].length)};const g=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return g&&(!n||Is(g[1])&&!g[2].includes(" "))&&yt(g[1])?{heading:o(g[1]),body:Mn(a,l.length+g[0].length)}:{heading:null,body:a}}function Ps(a,{preserveInlineText:n=!1}={}){const o=n?Fn:yt,l=Bn(a,!1,o);if(l.heading)return l;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",g=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(g){const _=yt(g[1]),y=a.slice(d.length+g[0].length);if(y.trim()&&kn(g[1],_))return{heading:o(g[1]),body:y}}return{heading:null,body:a}}const zt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",gi="type-body font-family-child font-normal text-muted-foreground",pi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,fi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,mi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,vi=`${zt} relative min-w-0 max-w-full`,hi=`${zt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,_i=`${zt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,bi="pt-6",wi="text-muted-foreground",ki="text-muted-foreground",ma="font-normal text-muted-foreground",yi="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",xi="h-[16px]! w-[16px]! shrink-0",$i=`${zt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,Ai=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${ma}`,Si=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${ma}`,Ci="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",Ii="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function Pi(a){return Na(a,{axis:"y",duration:ia()?0:150})}function sn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function Ti(a){const n=a?.[0];return!n||sn(n)?"":"pt-4"}function Ri(a,n,o=()=>!0){const l=a[n];if(!l||!o(l)||!sn(l))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&sn(a[d])}function Oi(a,n,o=()=>!0,l=!1){const d=a[n];if(!d||!o(d))return"";let s=n-1;for(;s>=0&&!o(a[s]);)s-=1;if(s<0)return"";const g=a[s];if(g.type==="thinking"&&d.type==="thinking")return l||aa(g.text??g.content??"")!==null&&aa(d.text??d.content??"")!==null?"":"pt-14";const _=sn(g),y=sn(d);return _&&y?"":g.type==="thinking"&&!y?"pt-6":_||y?"pt-4":"pt-1"}const Li="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function Ts(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||a?.placement?.target==="e2b"){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}const ra=Yr.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function Rs(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function Os(a){const n=a??{},o=ra.map(s=>({key:s.key,label:s.label(),description:s.description(),enabled:n[s.key]===!0,known:!0})),l=new Set(ra.map(s=>s.key)),d=[];for(const[s,g]of Object.entries(n))l.has(s)||d.push({key:s,label:Rs(s),description:null,enabled:g===!0,known:!1});return d.sort((s,g)=>s.label.localeCompare(g.label)),o.concat(d)}var Ls=w('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),Ns=w('<section class="min-w-0"><h3 class="text-sm font-medium mb-3"> </h3> <div role="list" class="space-y-4"></div></section>'),Es=w('<div class="@container"><div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></div>');function va(a,n){if(new.target)return xt({component:va,...a});St(n,!0);let o=v(n,"open",15,!1),l=v(n,"static",7,!1),d=v(n,"version",7),s=v(n,"features",7,null);const g=i(()=>Os(s())),_=i(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(g).filter(x=>x.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(g).filter(x=>!x.enabled)}]);var y={get open(){return o()},set open(x=!1){o(x),h()},get static(){return l()},set static(x=!1){l(x),h()},get version(){return d()},set version(x){d(x),h()},get features(){return s()},set features(x=null){s(x),h()},$set:$t,$on:(x,N)=>At(n,x,N)};{let x=i(()=>c.chat_harnessFeaturesModal_title({version:d()})),N=i(()=>c.chat_harnessFeaturesModal_description());Dr(a,{get static(){return l()},get title(){return e(x)},get description(){return e(N)},size:"wide",get open(){return o()},set open(f){o(f)},children:(f,M)=>{var S=Es(),pe=D(S);an(pe,21,()=>e(_),Pe=>Pe.enabled,(Pe,O)=>{var G=Ns(),p=D(G),Te=be(p,!0),te=P(p,2);an(te,21,()=>e(O).rows,$=>$.key,($,J)=>{Br($,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(J).key},get"data-enabled"(){return e(J).enabled},title:ve=>{Mt();var ae=wt();A(()=>U(ae,e(J).label)),u(ve,ae)},description:ve=>{Mt();var ae=wt();A(()=>U(ae,e(J).description)),u(ve,ae)},$$slots:{title:!0,description:!0}})},$=>{var J=Ls();u($,J)}),R(te),R(G),A(()=>{W(G,"aria-label",e(O).label),U(Te,e(O).label)}),u(Pe,G)}),R(pe),R(S),u(f,S)},$$slots:{default:!0}})}return Ct(y)}var Ds=w('<p role="alert" class="type-body text-danger"> </p>');function ha(a,n){if(new.target)return xt({component:ha,...a});St(n,!0);const o=()=>ge(f,"$outcome$",l),[l,d]=zn();let s=v(n,"open",15,!1),g=v(n,"agentName",7),_=v(n,"workspaceId",7),y=v(n,"agentId",7);const x=crypto.randomUUID(),N=kt(""),f=bn(N,x),M=i(()=>o()?.workspaceId===_()&&o().agentId===y()?o():void 0),S=i(()=>e(M)?.status==="pending"),pe=i(()=>e(M)?.status==="failed"?e(M).error:"");Ie(()=>{const p=_();return y(),N.set(p),()=>F.dispatch(Dn(p,x))}),Ie(()=>{e(M)?.status==="succeeded"&&(s(!1),F.dispatch(ga(_(),x,e(M).requestId)))});function Pe(){const p=bn.select(F.state,_(),x);p?.agentId===y()&&p.status==="pending"||F.dispatch(_n(_(),x,crypto.randomUUID(),y(),{kind:"retire"}))}var O={get open(){return s()},set open(p=!1){s(p),h()},get agentName(){return g()},set agentName(p){g(p),h()},get workspaceId(){return _()},set workspaceId(p){_(p),h()},get agentId(){return y()},set agentId(p){y(p),h()},$set:$t,$on:(p,Te)=>At(n,p,Te)};{const p=ne=>{var we=je(),ve=K(we);{var ae=ke=>{var qe=Ds(),We=be(qe,!0);A(()=>U(We,e(pe))),u(ke,qe)};L(ve,ke=>{e(pe)&&ke(ae)})}u(ne,we)};let Te=i(()=>c.modals_retireAgent_title()),te=i(()=>c.modals_retireAgent_description({name:g()})),$=i(()=>c.modals_retireAgent_confirm_label()),J=i(()=>c.modals_bulkActionConfirm_cancel_label());Hr(a,{get title(){return e(Te)},get description(){return e(te)},get confirmLabel(){return e($)},get cancelLabel(){return e(J)},focusSubmit:!1,focusCancel:!0,get busy(){return e(S)},onConfirm:Pe,get open(){return s()},set open(ne){s(ne)},details:p,$$slots:{details:!0}})}var G=Ct(O);return d(),G}function Ms({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",l=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
3
3
 
4
4
  1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${l}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
@@ -1,2 +1,2 @@
1
- import{t as ht,bq as m,bo as g,a_ as p,by as bt,b as xt}from"./7rNOGHzs.js";import{bs as yt,a7 as kt,ay as Q,W as u,bn as At,aA as h,a5 as F,bS as f,bl as S,bA as W,aD as e,b_ as H,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as Ct}from"./B8o4lNgr.js";import{I as It,h as Bt}from"./DmsDslNo.js";import{H as Pt,C as zt}from"./DzMmhJrp.js";import{f as M}from"./Bgegixo2.js";import"./CQ4a5a4v.js";import{F as rt,ca as Rt,cl as St,at as Wt}from"./CFejQM6t.js";import{e as Ht}from"./BmhnS69e.js";import{D as Dt}from"./B2RUMnVi.js";import{Hq as Lt,tu as $t}from"./CRwmdgt6.js";import{g as qt}from"./Bj5SHeCl.js";var Nt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),Ft=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Mt=k("<!> ",1),Ot=k('<div class="mb-2 flex gap-1"></div>'),Vt=k('<div class="border-t border-border p-2"><!> <!></div>'),jt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Tt(U,n){if(new.target)return ht({component:Tt,...U});yt(n,!0);let A=m(n,"patches",7),O=m(n,"label",23,()=>g.ui_patchBlock_label()),V=m(n,"lastApply",7),w=m(n,"linkedAgentId",7),D=m(n,"workspaceId",7),P=m(n,"applying",7,!1),L=m(n,"onApply",7),$=m(n,"onRevert",7),j=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),T=y(()=>V()?.status==="success");function st(t){const o=t.split(`
1
+ import{t as ht,bq as m,bo as g,a_ as p,by as bt,b as xt}from"./7rNOGHzs.js";import{bs as yt,a7 as kt,ay as Q,W as u,bn as At,aA as h,a5 as F,bS as f,bl as S,bA as W,aD as e,b_ as H,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as Ct}from"./B8o4lNgr.js";import{I as It,h as Bt}from"./DmsDslNo.js";import{H as Pt,C as zt}from"./DzMmhJrp.js";import{f as M}from"./Bgegixo2.js";import"./CQ4a5a4v.js";import{F as rt,ca as Rt,cl as St,at as Wt}from"./CFejQM6t.js";import{e as Ht}from"./t3bi-ExW.js";import{D as Dt}from"./DQEBW0YT.js";import{Hq as Lt,tu as $t}from"./CRwmdgt6.js";import{g as qt}from"./BGLkcG6I.js";var Nt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),Ft=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Mt=k("<!> ",1),Ot=k('<div class="mb-2 flex gap-1"></div>'),Vt=k('<div class="border-t border-border p-2"><!> <!></div>'),jt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Tt(U,n){if(new.target)return ht({component:Tt,...U});yt(n,!0);let A=m(n,"patches",7),O=m(n,"label",23,()=>g.ui_patchBlock_label()),V=m(n,"lastApply",7),w=m(n,"linkedAgentId",7),D=m(n,"workspaceId",7),P=m(n,"applying",7,!1),L=m(n,"onApply",7),$=m(n,"onRevert",7),j=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),T=y(()=>V()?.status==="success");function st(t){const o=t.split(`
2
2
  `);let v=0,b=0;for(const C of o)C.startsWith("+")&&!C.startsWith("+++")?v++:C.startsWith("-")&&!C.startsWith("---")&&b++;return{addCount:v,removeCount:b}}let X=y(()=>e(z)?st(e(z).diff):{addCount:0,removeCount:0}),G=y(()=>P()?{label:g.ui_patchBlock_applying_label(),icon:null}:e(T)?{label:g.ui_patchBlock_revert_label(),icon:St}:{label:g.ui_patchBlock_apply_label(),icon:Wt}),nt=y(()=>!!(L()||$()));function ot(){et(j,!e(j))}function lt(){e(T)?$()?.():L()?.()}var it={get patches(){return A()},set patches(t){A(t),h()},get label(){return O()},set label(t=g.ui_patchBlock_label()){O(t),h()},get lastApply(){return V()},set lastApply(t){V(t),h()},get linkedAgentId(){return w()},set linkedAgentId(t){w(t),h()},get workspaceId(){return D()},set workspaceId(t){D(t),h()},get applying(){return P()},set applying(t=!1){P(t),h()},get onApply(){return L()},set onApply(t){L(t),h()},get onRevert(){return $()},set onRevert(t){$(t),h()},$set:bt,$on:(t,o)=>xt(n,t,o)},Y=kt(),ct=Q(Y);{var dt=t=>{var o=jt(),v=F(o),b=F(v);{var C=a=>{{let c=y(()=>g.ui_patchBlock_viewAgent_tooltip());M(a,{variant:"plain",size:"icon-compact",iconOnly:!0,class:"size-4! shrink-0 rounded-sm! transition-opacity hover:opacity-80",onclick:l=>{D()&&Lt.dispatch($t(D(),{agentId:w(),...qt(l)}))},get title(){return e(c)},children:(l,_)=>{Ht(l,{get agentId(){return w()},variant:"compact"})},$$slots:{default:!0}})}};p(b,a=>{w()&&a(C)})}var Z=f(b,2);M(Z,{variant:"plain",size:"compact",class:"h-auto! min-w-0 flex-1 shrink items-center justify-start gap-2 px-0! py-0! text-muted-foreground transition-colors hover:text-foreground",truncateLabel:!1,labelClass:"flex min-w-0 flex-1 items-center gap-2",onclick:ot,children:(a,c)=>{var l=Ft(),_=Q(l);{var I=i=>{rt(i,{get icon(){return Rt},size:10,class:"text-muted-foreground"})};p(_,i=>{w()||i(I)})}var B=f(_,2),s=S(B,!0),d=f(B,2),r=F(d),R=S(r),q=f(r,2),J=S(q);W(d);var K=f(d,2);{var tt=i=>{var N=Nt(),mt=S(N,!0);H(gt=>x(mt,gt),[()=>g.ui_patchBlock_applied_label()]),u(i,N)};p(K,i=>{e(T)&&i(tt)})}H(()=>{x(s,O()),x(R,`+${e(X).addCount??""}`),x(J,`-${e(X).removeCount??""}`)}),u(a,l)},$$slots:{default:!0}});var ut=f(Z,2);{var ft=a=>{M(a,{variant:"ghost-light",size:"sm",class:"type-caption shrink-0",onclick:lt,get disabled(){return P()},children:(c,l)=>{var _=Mt(),I=Q(_);{var B=r=>{It(r,{size:12})},s=r=>{rt(r,{get icon(){return e(G).icon},size:"xs"})};p(I,r=>{P()?r(B):e(G).icon&&r(s,1)})}var d=f(I);H(()=>x(d,` ${e(G).label??""}`)),u(c,_)},$$slots:{default:!0}})};p(ut,a=>{e(nt)&&a(ft)})}W(v);var vt=f(v,2);{var _t=a=>{var c=Vt(),l=F(c);{var _=s=>{var d=Ot();Bt(d,23,A,(r,R)=>`patch-${R}-${r.filePath}`,(r,R,q)=>{{let J=y(()=>e(q)===e(E)?"default":"ghost-light");M(r,{get variant(){return e(J)},size:"sm",class:"type-caption",onclick:()=>et(E,e(q),!0),children:(K,tt)=>{wt();var i=Ct();H(N=>x(i,N),[()=>e(R).filePath.split("/").pop()]),u(K,i)},$$slots:{default:!0}})}}),W(d),u(s,d)};p(l,s=>{A().length>1&&s(_)})}var I=f(l,2);{var B=s=>{Dt(s,{get patch(){return e(z).diff},get fileName(){return e(z).filePath},showHeader:!0,showStats:!0,showLineNumbers:!0,maxHeight:"300px",collapsible:!1,class:"overflow-hidden rounded-sm border border-border"})};p(I,s=>{e(z)&&s(B)})}W(c),Pt(3,c,()=>zt,()=>({tier:"moderate"})),u(a,c)};p(vt,a=>{e(j)&&a(_t)})}W(o),u(t,o)},pt=t=>{var o=Et(),v=S(o,!0);H(b=>x(v,b),[()=>g.ui_patchBlock_invalid_error()]),u(t,o)};p(ct,t=>{A()?.length?t(dt):t(pt,-1)})}return u(U,Y),At(it)}export{Tt as P};
@@ -1,4 +1,4 @@
1
- import{f as m,ch as x,aO as O,G as k,bC as p,l as A,ab as Y,a1 as E,ac as T,cw as _,ca as H,aF as D,b7 as J,aU as z,b6 as X,bU as C,b4 as F,b5 as U,bT as W}from"./BgmOiuVG.js";import{l as j}from"./CnsnqDQd.js";var R=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),q=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],h=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&h.add(i),o!==d&&h.add(o)}),h.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,h=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=R(Math.max(d,t.width*.35),36,l),i=R(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+h;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-h;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const h=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:h,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:h,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(h=>{const c=t.edge(h);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:h.v,end:h.w})}else a.push({edge:c,start:h.v,end:h.w})}),d.forEach(h=>{if(h.length!==3){h.forEach(u=>a.push(u));return}h.sort((u,w)=>u.edge.selfLoop.order-w.edge.selfLoop.order);const[c,l,s]=h,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){h.forEach(u=>a.push(u));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,h,i.start,f),b=V(o,L,e,n.width??0),y=Z(o,b,L,e,n),g={...l.edge,...i,id:i.id,points:b,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const h=e.graph().rankdir;p.trace("Dir in recursive render - dir:",h);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=T(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=q(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const u=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
1
+ import{f as m,ch as x,aO as O,G as k,bC as p,l as A,ab as Y,a1 as E,ac as T,cw as _,ca as H,aF as D,b7 as J,aU as z,b6 as X,bU as C,b4 as F,b5 as U,bT as W}from"./CxRm1vYn.js";import{l as j}from"./BoiNnj2h.js";var R=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),q=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],h=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&h.add(i),o!==d&&h.add(o)}),h.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,h=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=R(Math.max(d,t.width*.35),36,l),i=R(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+h;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-h;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const h=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:h,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:h,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(h=>{const c=t.edge(h);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:h.v,end:h.w})}else a.push({edge:c,start:h.v,end:h.w})}),d.forEach(h=>{if(h.length!==3){h.forEach(u=>a.push(u));return}h.sort((u,w)=>u.edge.selfLoop.order-w.edge.selfLoop.order);const[c,l,s]=h,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){h.forEach(u=>a.push(u));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,h,i.start,f),b=V(o,L,e,n.width??0),y=Z(o,b,L,e,n),g={...l.edge,...i,id:i.id,points:b,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const h=e.graph().rankdir;p.trace("Dir in recursive render - dir:",h);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=T(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=q(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const u=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,y,`
3
3
  data=`,u.height,`
4
4
  Parent cluster`,a.height),e.setNode(a.id,u),e.parent(y)||(p.trace("Setting parent",y,a.id),e.setParent(y,a.id,u))}if(p.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),g?.clusterNode){p.info("Cluster identified XBX",y,g.width,e.node(y));const{ranksep:u,nodesep:w}=e.graph();g.graph.setGraph({...g.graph.graph(),ranksep:u+25,nodesep:w});const S=await oe({element:i,graph:g.graph,diagramType:r,id:d,parentCluster:e.node(y),siteConfig:f}),N=S.elem;_(g,N),g.diff=S.diff||0,p.info("New compound node after recursive render XAX",y,"width",g.width,"height",g.height),H(N,g)}else e.children(y).length>0?(p.trace("Cluster - the non recursive path XBX",y,g.id,g,g.width,"Graph:",e),p.trace(D(g.id,e)),E.set(g.id,{id:D(g.id,e),node:g})):(p.trace("Node - the non recursive path XAX",y,i,e.node(y),h),await J(i,e.node(y),{config:f,dir:h}))})),await m(async()=>{const y=e.edges().map(async function(g){const u=e.edge(g.v,g.w,g.name);if(p.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),p.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),p.info("Fix",E,"ids:",g.v,g.w,"Translating: ",E.get(g.v),E.get(g.w)),n&&u.selfLoop){if(u.selfLoop.order!==1)return;const w={...u.originalEdge,...u,id:u.selfLoop.id,startLabelLeft:u.originalEdge?.startLabelLeft??u.startLabelLeft,startLabelRight:u.originalEdge?.startLabelRight??u.startLabelRight,endLabelLeft:u.originalEdge?.endLabelLeft??u.endLabelLeft,endLabelRight:u.originalEdge?.endLabelRight??u.endLabelRight};await X(s,w),u.width=w.width,u.height=w.height,u.labelStyle=w.labelStyle;return}await X(s,u)});await Promise.all(y)},"processEdges")();const{subGraphTitleTotalMargin:b}=z(f);return{elem:o,graph:e,groups:{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o},diagramType:r,id:d,mergeSelfLoops:n,subGraphTitleTotalMargin:b}},"measureDagreGraph"),M=m(t=>{p.info("############################################# XXX"),p.info("### Layout ### XXX"),p.info("############################################# XXX"),j(t)},"runDagreGraphLayout"),$=m((t,e,r)=>{const d=t.node(e);if(!d)return;const a={...d};return d?.clusterNode?a.y=(d.y??0)+r:t.children(e).length>0?a.height=(d.height??0)+r:a.y=(d.y??0)+r/2,a},"normalizeDagreNode"),v=m((t,e)=>{K.forEach(r=>{e[r]!==void 0&&(t[r]=e[r])})},"applyDagreNodeLayout"),ee=m((t,e,r,d)=>({...t,start:t.start??e,end:t.end??r,points:(t.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+d:a.y}))}),"normalizeDagreEdge"),te=m((t,e)=>{const{graph:r,mergeSelfLoops:d,subGraphTitleTotalMargin:a=0}=e,f=new Map(t.nodes.map(c=>[c.id,c]));x(r).forEach(c=>{const l=$(r,c,a);if(!l)return;v(r.node(c),l);const s=f.get(c);s&&v(s,l)});const h=a/2;return t.edges=B(r,h,{mergeSelfLoops:d}).map(({edge:c,start:l,end:s})=>ee(c,l,s,h)),t},"applyDagreLayoutResult"),re=m(async({elem:t,graph:e,groups:{clusters:r,edgePaths:d},diagramType:a,id:f,mergeSelfLoops:h,subGraphTitleTotalMargin:c})=>{let l=0;await Promise.all(x(e).map(async function(o){const n=e.node(o);if(p.info("Position XBX => "+o+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=c,p.info("A tainted cluster node XBX1",o,n.id,n.width,n.height,n.x,n.y,e.parent(o)),E.get(n.id).node=n,C(n);else if(e.children(o).length>0){p.info("A pure cluster node XBX1",o,n.id,n.x,n.y,n.width,n.height,e.parent(o)),n.height+=c,e.node(n.parentId);const L=n?.padding/2||0,b=n?.labelBBox?.height||0,y=b-L||0;p.debug("OffsetY",y,"labelHeight",b,"halfPadding",L),await F(r,n),E.get(n.id).node=n}else{const L=e.node(n.parentId);n.y+=c/2,p.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",L,L?.offsetY,n),C(n)}}));const s=c/2;return B(e,s,{mergeSelfLoops:h}).forEach(function({edge:o,start:n,end:L}){p.info("Edge "+n+" -> "+L+": "+JSON.stringify(o),o),o.points.forEach(u=>u.y+=s);const b=e.node(n),y=e.node(L),g=U(d,o,E,a,b,y,f);W(o,g)}),e.nodes().forEach(function(o){const n=e.node(o);p.info(o,n.type,n.diff),n.isGroup&&(l=n.diff)}),p.warn("Returning from recursive render XAX",t,l),{elem:t,diff:l}},"paintDagreLayoutCore"),oe=m(async t=>{const e=await I(t);return M(e.graph),await re(e)},"renderDagreSubgraph"),G=m(t=>{const e=new k({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(r=>{e.setNode(r.id,{...r}),r.parentId&&e.setParent(r.id,r.parentId)}),p.debug("Edges:",t.edges),t.edges.forEach(r=>{if(r.start===r.end){const d=r.start,a=d+"---"+d+"---1",f=d+"---"+d+"---2",h=e.node(d);e.setNode(a,{domId:a,id:a,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(a,h.parentId),e.setNode(f,{domId:f,id:f,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,h.parentId);const c=structuredClone(r),l=structuredClone(r),s=structuredClone(r),i=structuredClone(r);l.originalEdge=c,l.selfLoop={id:c.id,order:0},s.originalEdge=c,s.selfLoop={id:c.id,order:1},i.originalEdge=c,i.selfLoop={id:c.id,order:2},l.label="",l.arrowTypeEnd="none",l.endLabelLeft="",l.endLabelRight="",l.startLabelLeft="",l.id=d+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=d+"-cyclic-special-mid",i.label="",i.startLabelRight="",i.startLabelLeft="",i.arrowTypeStart="none",h.isGroup&&(l.fromCluster=d,i.toCluster=d),i.id=d+"-cyclic-special-2",i.arrowTypeStart="none",e.setEdge(d,a,l,d+"-cyclic-special-0"),e.setEdge(a,f,s,d+"-cyclic-special-1"),e.setEdge(f,d,i,d+"-cyclic-special-2")}else e.setEdge(r.start,r.end,{...r},r.id)}),A(e),{graph:e}},"prepareLayoutForDagre"),ae=m(async(t,{element:e,preparedLayout:r})=>{const d=r??G(t),a=O(),f=await I({element:e,graph:d.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return d.measuredLayout=f,f},"measureDagreLayout"),ne=m((t,e)=>{const r=e.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return M(r.graph),te(t,r),r},"runDagreLayoutCore"),se=m((t,{measure:e})=>x(e.graph).map(r=>e.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ie=m((t,e,{measure:r})=>t?r.graph.node(t):void 0,"getDagreEdgeNode"),ce=Y({prepareLayout:G,measureLayout:ae,runLayoutCore:ne,paintOptions:{clusterDb:E,getNodes:se,getEdgeNode:ie,skipNode:m((t,{measure:e})=>!e.graph.hasNode(t.id),"skipNode"),isCluster:m((t,{measure:e})=>e.graph.hasNode(t.id)&&(e.graph.children(t.id)??[]).length>0,"isCluster")}});export{te as applyDagreLayoutResult,B as getEdgesToRender,ae as measureDagreLayout,G as prepareLayoutForDagre,ce as render,ne as runDagreLayoutCore};
@@ -1,4 +1,4 @@
1
- import{I as X}from"./BCfzoYfU.js";import{p as z}from"./D9ytGf5e.js";import{p as G}from"./BDchM60p.js";import{aI as F,aG as Y,aF as P,O as q,K as Z,L as j,a as g,j as M,ad as S,aE as U,r as K,M as R,k as Q,aD as J,Q as ee,y as te,aw as ne}from"./CnCQnNEp.js";import{g as v}from"./BgmOiuVG.js";var H=/[─━│┃└┗├┣]/,W=/[└┗├┣]/,re=/[─━]/,A=/^[\s│┃]+$/,D=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,L=/^\s*%%/,ie=" ";function N(n){return n.some(t=>H.test(t))}v(N,"isBoxDrawingFormat");g(N,"isBoxDrawingFormat");function T(n){for(const t of n){const e=W.exec(t);if(e?.index&&e.index>0)return e.index}return 4}v(T,"inferSegmentWidth");g(T,"inferSegmentWidth");function V(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}v(V,"remapErrorLines");g(V,"remapErrorLines");function $(n){const t=n.split(`
1
+ import{I as X}from"./-SL67XKV.js";import{p as z}from"./CkawHIFZ.js";import{p as G}from"./DD-T_Om0.js";import{aI as F,aG as Y,aF as P,O as q,K as Z,L as j,a as g,j as M,ad as S,aE as U,r as K,M as R,k as Q,aD as J,Q as ee,y as te,aw as ne}from"./CSbiiZpm.js";import{g as v}from"./CxRm1vYn.js";var H=/[─━│┃└┗├┣]/,W=/[└┗├┣]/,re=/[─━]/,A=/^[\s│┃]+$/,D=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,L=/^\s*%%/,ie=" ";function N(n){return n.some(t=>H.test(t))}v(N,"isBoxDrawingFormat");g(N,"isBoxDrawingFormat");function T(n){for(const t of n){const e=W.exec(t);if(e?.index&&e.index>0)return e.index}return 4}v(T,"inferSegmentWidth");g(T,"inferSegmentWidth");function V(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}v(V,"remapErrorLines");g(V,"remapErrorLines");function $(n){const t=n.split(`
2
2
  `),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||L.test(c)||D.test(c)||A.test(c)||s.push(c.replace(/\t/g," "))}if(!N(s))return{text:n,lineMap:e};const i=T(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if(L.test(c)){o.push(c),a++,e.set(a,h);continue}if(D.test(c)){o.push(c),a++,e.set(a,h);continue}if(A.test(c))continue;const l=c.replace(/\t/g," "),m=W.exec(l);if(m?.index!==void 0){const f=m.index,w=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&re.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const b=l.slice(u).trimEnd();if(!b)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const O=ie.repeat(w);o.push(O+b),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(H.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
3
3
  `),lineMap:e}}v($,"preprocessBoxDrawing");g($,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=g(()=>{x.reset(),Q()},"clear"),se=g(()=>x.records.stack[0],"getRoot"),ae=g(()=>x.records.cnt,"getCount"),ce=te.treeView,le=g(()=>M(ce,R().treeView),"getConfig"),de=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:j,getAccDescription:Z,getDiagramTitle:q,setAccDescription:P,setAccTitle:Y,setDiagramTitle:F},B=he,pe=g(n=>{z(n,B);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,R()):void 0;B.addNode(e,r,i,o,p,d)}},"populate"),ge={parse:g(async n=>{const{text:t,lineMap:e}=$(n);try{const r=await G("treeView",t);S.debug(r),pe(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=V(r.message,e)),r}},"parse")},I={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function E(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}v(E,"detectIcon");g(E,"detectIcon");function C(n,t){return n.includes(":")?n:n in I.icons||!t?`${I.prefix}:${n}`:`${t}:${n}`}v(C,"qualifyIcon");g(C,"qualifyIcon");function y(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=E(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${I.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}v(y,"getNodeIcon");g(y,"getNodeIcon");ne([{name:I.prefix,icons:I}]);var k=14,fe=4,ue=16,me=g(async(n,t)=>{const e=[],r=g(i=>{const o=y(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await ee(i,{height:k,width:k})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=k+fe,c=y(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:m}=h.node().getBBox(),f=l+s.paddingY*2,w=n+s.paddingX+(d?p:0);h.attr("x",w),h.attr("y",t+f/2);const u=w+m,b=m+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:b,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),_=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),xe=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,m)=>{const f=m*(l.rowIndent+l.paddingX),w=we(f,s,h,d,l,r);o.push(w);const{height:u,width:b}=h.BBox;_(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+b),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(w=>{p(w,h+1)});const{x:l,y:m,height:f}=d.BBox;if(d.children.length){const{y:w,height:u}=d.children[d.children.length-1].BBox;_(n,l+e.paddingX,m+f,l+e.paddingX,w+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+ue;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),ve=g(async(n,t,e,r)=>{S.debug(`Rendering treeView diagram
4
4
  `+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=U(t),p=a.append("g");p.attr("class","tree-view");const c=await me(i,o),{totalHeight:d,totalWidth:h}=xe(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),K(a,d,h,o.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=M(Ce,n);return`