@intent-hq/web 2.285.2 → 2.286.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 (312) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{Cv9OIgSe.js → -4iKCYSl.js} +1 -1
  3. package/web/app/immutable/chunks/{BUYWrzfb.js → -fWJi05-.js} +1 -1
  4. package/web/app/immutable/chunks/{U18kRAfW.js → 172GvQgx.js} +2 -2
  5. package/web/app/immutable/chunks/{Bm2N3t4X.js → 1jz3AJ7K.js} +1 -1
  6. package/web/app/immutable/chunks/{Bz2ThdmF.js → 2FstYM1s.js} +1 -1
  7. package/web/app/immutable/chunks/{Blmgq1Ng.js → 2LPpSBFe.js} +1 -1
  8. package/web/app/immutable/chunks/{CtQ6ra1S.js → 2oaDc1nn.js} +1 -1
  9. package/web/app/immutable/chunks/{BBGMxKuT.js → 3QmaYnff.js} +1 -1
  10. package/web/app/immutable/chunks/{DVx_I_hW.js → 3q61Z6zu.js} +1 -1
  11. package/web/app/immutable/chunks/{BfnQ_oJR.js → 3sa2ZSPC.js} +1 -1
  12. package/web/app/immutable/chunks/{D3TYCYab.js → 4LCvEsVS.js} +1 -1
  13. package/web/app/immutable/chunks/{B1C9yD3K.js → 6hWyihnV.js} +1 -1
  14. package/web/app/immutable/chunks/{DFNyXhJT.js → 9JjZRepm.js} +64 -176
  15. package/web/app/immutable/chunks/{CasNMwyU.js → 9M3_vOvI.js} +1 -1
  16. package/web/app/immutable/chunks/{BjkG0GoW.js → ALbX902-.js} +1 -1
  17. package/web/app/immutable/chunks/{DVnFqbmq.js → B-34RgWF.js} +1 -1
  18. package/web/app/immutable/chunks/{RiuBRZY4.js → B-jWalbO.js} +1 -1
  19. package/web/app/immutable/chunks/{CZU65Loh.js → B0jdpkVd.js} +1 -1
  20. package/web/app/immutable/chunks/{CTMFE1LM.js → B1kJVNhf.js} +1 -1
  21. package/web/app/immutable/chunks/{BFRmf7wo.js → B2SAFlE_.js} +1 -1
  22. package/web/app/immutable/chunks/{uTcbYh1p.js → B5NXv3LV.js} +12 -12
  23. package/web/app/immutable/chunks/{D3srKfGI.js → B5OVBjIf.js} +1 -1
  24. package/web/app/immutable/chunks/{B7XTx9cc.js → B5VfU0KM.js} +1 -1
  25. package/web/app/immutable/chunks/{D8iEGEdh.js → B5WfnJ_I.js} +1 -1
  26. package/web/app/immutable/chunks/{BSJ1XOuD.js → B6LKhrY2.js} +1 -1
  27. package/web/app/immutable/chunks/{CBIEY7XB.js → B6pRjnl0.js} +1 -1
  28. package/web/app/immutable/chunks/{BdeY5a6v.js → B78OjmQ3.js} +1 -1
  29. package/web/app/immutable/chunks/{B9C9V_qL.js → B7mAnbbv.js} +1 -1
  30. package/web/app/immutable/chunks/{c_J_BfG0.js → B7wpfrW2.js} +1 -1
  31. package/web/app/immutable/chunks/{BCM6KcqI.js → B8N5zbP-.js} +1 -1
  32. package/web/app/immutable/chunks/{DEknUYzT.js → B8jzbPVu.js} +1 -1
  33. package/web/app/immutable/chunks/{D2zsyuer.js → BAEKjYyz.js} +1 -1
  34. package/web/app/immutable/chunks/{Bid9Ap_k.js → BB0aq9c_.js} +1 -1
  35. package/web/app/immutable/chunks/{DePeyicW.js → BCYRUItZ.js} +4 -4
  36. package/web/app/immutable/chunks/{3dddnXRn.js → BCiyShif.js} +1 -1
  37. package/web/app/immutable/chunks/{D8iiTvej.js → BCu94obu.js} +1 -1
  38. package/web/app/immutable/chunks/{B0g2pl5M.js → BDFJ3z4C.js} +1 -1
  39. package/web/app/immutable/chunks/{TQt9-VB1.js → BDq7EC2K.js} +1 -1
  40. package/web/app/immutable/chunks/{Dq5ZUD1k.js → BEmWnLiC.js} +1 -1
  41. package/web/app/immutable/chunks/{5iZ2wIez.js → BGgB8Pc0.js} +2 -2
  42. package/web/app/immutable/chunks/{qwXhlljn.js → BHwB2t2J.js} +6 -6
  43. package/web/app/immutable/chunks/{GvdVp0-P.js → BIGmpOjZ.js} +1 -1
  44. package/web/app/immutable/chunks/{8C3-mETY.js → BIY56SBV.js} +1 -1
  45. package/web/app/immutable/chunks/{4v_K7VfW.js → BKAT2tIv.js} +1 -1
  46. package/web/app/immutable/chunks/{FyN0A7AV.js → BKVXZiH3.js} +1 -1
  47. package/web/app/immutable/chunks/{FjgX31oc.js → BMfFFxXt.js} +1 -1
  48. package/web/app/immutable/chunks/{BkTmPNF1.js → BOFk1KrL.js} +1 -1
  49. package/web/app/immutable/chunks/{BUjG2l2R.js → BONnxsQv.js} +1 -1
  50. package/web/app/immutable/chunks/{TVTqPTWK.js → BR5lR6Td.js} +1 -1
  51. package/web/app/immutable/chunks/{cIkUUquE.js → BTRxaITj.js} +1 -1
  52. package/web/app/immutable/chunks/{C8IxeNxn.js → BUVaYTVI.js} +1 -1
  53. package/web/app/immutable/chunks/{BEYgNH0C.js → BUqUwu2G.js} +1 -1
  54. package/web/app/immutable/chunks/{iew6AFqX.js → BXGDMgsv.js} +1 -1
  55. package/web/app/immutable/chunks/{BkebGjs2.js → BY3DTY8F.js} +1 -1
  56. package/web/app/immutable/chunks/{CMIvYuSx.js → BY3Ptqbg.js} +1 -1
  57. package/web/app/immutable/chunks/{BW-6dkur.js → BYr8MV2A.js} +1 -1
  58. package/web/app/immutable/chunks/BZXl3la6.js +1 -0
  59. package/web/app/immutable/chunks/{Bta6aHrh.js → B_IE7AMR.js} +1 -1
  60. package/web/app/immutable/chunks/{BBHMDA7t.js → B_Ngo80M.js} +1 -1
  61. package/web/app/immutable/chunks/{C3eAseNm.js → BaWkgFPr.js} +1 -1
  62. package/web/app/immutable/chunks/Bb7OZuad.js +1 -0
  63. package/web/app/immutable/chunks/{BYPVMH5B.js → BbANJKYX.js} +1 -1
  64. package/web/app/immutable/chunks/{DWpT56xY.js → BdMP-rwq.js} +1 -1
  65. package/web/app/immutable/chunks/BdvBYYZC.js +1 -0
  66. package/web/app/immutable/chunks/{wt74fNt_.js → Bdxsm1jE.js} +1 -1
  67. package/web/app/immutable/chunks/{s3cncl0S.js → Be5P0JlV.js} +1 -1
  68. package/web/app/immutable/chunks/{CtmPq_C5.js → BfbDGmVv.js} +1 -1
  69. package/web/app/immutable/chunks/{BXIUuYhE.js → Bg8XhRuy.js} +1 -1
  70. package/web/app/immutable/chunks/{Bk7TZMmK.js → BgX6IJDk.js} +1 -1
  71. package/web/app/immutable/chunks/{CXSfGSsj.js → BhBL2il-.js} +1 -1
  72. package/web/app/immutable/chunks/{T5eAJQ5P.js → BhIrT2jr.js} +2 -2
  73. package/web/app/immutable/chunks/{BFt420O2.js → BhS3zmFy.js} +1 -1
  74. package/web/app/immutable/chunks/{D35akxD1.js → BjFoJgFv.js} +1 -1
  75. package/web/app/immutable/chunks/{sVDMg5h2.js → BkBZtLYF.js} +1 -1
  76. package/web/app/immutable/chunks/{BtUIZVIr.js → BkoH1phN.js} +1 -1
  77. package/web/app/immutable/chunks/{DZE6-UEM.js → Bl1K7xmJ.js} +1 -1
  78. package/web/app/immutable/chunks/{CZGA0a1i.js → BlJs0v1V.js} +1 -1
  79. package/web/app/immutable/chunks/{DEtTxbeY.js → Bluyq349.js} +1 -1
  80. package/web/app/immutable/chunks/{BRBPzczh.js → BmIqWliN.js} +1 -1
  81. package/web/app/immutable/chunks/{xFzmjbnd.js → BmnDHgDT.js} +1 -1
  82. package/web/app/immutable/chunks/{P5FoRduB.js → Bn4hj7HG.js} +1 -1
  83. package/web/app/immutable/chunks/{pQkRApuV.js → BnDVzHAF.js} +1 -1
  84. package/web/app/immutable/chunks/{GQGPhDcr.js → BnT9q9y-.js} +1 -1
  85. package/web/app/immutable/chunks/{mQEU-N_p.js → BqRJyrRC.js} +1 -1
  86. package/web/app/immutable/chunks/{Bg6ucgGL.js → Bqoyy9yx.js} +1 -1
  87. package/web/app/immutable/chunks/{BLhskmrd.js → BrVO-2UU.js} +1 -1
  88. package/web/app/immutable/chunks/{kU2gMO6Q.js → BsKoK3Rk.js} +1 -1
  89. package/web/app/immutable/chunks/{DWpX6Caf.js → BsNGkCax.js} +1 -1
  90. package/web/app/immutable/chunks/{BkfH-kwC.js → Bth7_IHu.js} +1 -1
  91. package/web/app/immutable/chunks/{DNezUHSG.js → Bwh6J9sG.js} +1 -1
  92. package/web/app/immutable/chunks/{BFkNTtC8.js → BwixslcF.js} +1 -1
  93. package/web/app/immutable/chunks/{CqyJ9ETw.js → BwqCA_Tg.js} +1 -1
  94. package/web/app/immutable/chunks/{C-LEC-SE.js → BxKmCVSh.js} +1 -1
  95. package/web/app/immutable/chunks/{DVTnkoPz.js → Bxc57npw.js} +1 -1
  96. package/web/app/immutable/chunks/{CycrwEDR.js → Bz08MgGK.js} +1 -1
  97. package/web/app/immutable/chunks/{BYknlOpg.js → C4Zcz5ig.js} +1 -1
  98. package/web/app/immutable/chunks/{CceoWbVF.js → C4lY6YLh.js} +1 -1
  99. package/web/app/immutable/chunks/{BdRm71a6.js → C563feV7.js} +1 -1
  100. package/web/app/immutable/chunks/{DfcEE8cz.js → C5E1PJb6.js} +2 -2
  101. package/web/app/immutable/chunks/{BWTPBBe6.js → C5RdKv5y.js} +1 -1
  102. package/web/app/immutable/chunks/{B-2t8jo3.js → C5Xi5eLp.js} +3 -3
  103. package/web/app/immutable/chunks/{CnVZjzuN.js → C68FzyYL.js} +1 -1
  104. package/web/app/immutable/chunks/{DhsW4MRu.js → C6RQmr0V.js} +1 -1
  105. package/web/app/immutable/chunks/{DUaZ1qia.js → C8sY1PbT.js} +1 -1
  106. package/web/app/immutable/chunks/{DXOtvPd1.js → C9129WmZ.js} +3 -3
  107. package/web/app/immutable/chunks/{BiD-G4M2.js → C9WpfWq_.js} +1 -1
  108. package/web/app/immutable/chunks/{B3fObOE3.js → C9g8CU4z.js} +1 -1
  109. package/web/app/immutable/chunks/{DFTQjdyb.js → CC-oK8xP.js} +2 -2
  110. package/web/app/immutable/chunks/{Cu2WCtWO.js → CD4CbF09.js} +1 -1
  111. package/web/app/immutable/chunks/{C4TS3VfR.js → CDuyWy4D.js} +1 -1
  112. package/web/app/immutable/chunks/{CgGTNk2L.js → CEiokx4X.js} +1 -1
  113. package/web/app/immutable/chunks/{CcaZ2B1J.js → CG-WEY6g.js} +1 -1
  114. package/web/app/immutable/chunks/{DYXED2G4.js → CHdmzkZm.js} +1 -1
  115. package/web/app/immutable/chunks/{CxHjI2Tg.js → CHtCNHFI.js} +1 -1
  116. package/web/app/immutable/chunks/{BUEprNJA.js → CJKeXT5H.js} +1 -1
  117. package/web/app/immutable/chunks/{B5TmUe1P.js → CJPP3n_b.js} +1 -1
  118. package/web/app/immutable/chunks/{sWXcWDw4.js → CJlBFmXK.js} +1 -1
  119. package/web/app/immutable/chunks/{BQmmLJ-E.js → CJvhopKt.js} +1 -1
  120. package/web/app/immutable/chunks/{mmA_Vmgh.js → CM-RTisq.js} +1 -1
  121. package/web/app/immutable/chunks/{2f-mANfy.js → CMieQf0P.js} +1 -1
  122. package/web/app/immutable/chunks/{-mncWYX6.js → CN1yc9sw.js} +1 -1
  123. package/web/app/immutable/chunks/{B64r-cFw.js → CN6UuCI4.js} +2 -2
  124. package/web/app/immutable/chunks/{qotowrm5.js → CNG6DDdt.js} +1 -1
  125. package/web/app/immutable/chunks/COCO5InB.js +1 -0
  126. package/web/app/immutable/chunks/{nwQDW4ZF.js → CPozPG26.js} +1 -1
  127. package/web/app/immutable/chunks/{9wyxCCG6.js → CQ8xUw8b.js} +1 -1
  128. package/web/app/immutable/chunks/{rcI9zJfc.js → CQlclm_i.js} +1 -1
  129. package/web/app/immutable/chunks/{BAtx4AAq.js → CTeTIheq.js} +1 -1
  130. package/web/app/immutable/chunks/{BCjCkpDT.js → CU9uaZDq.js} +1 -1
  131. package/web/app/immutable/chunks/{MMvgNBCX.js → CUBHTDNB.js} +3 -3
  132. package/web/app/immutable/chunks/{Bjn521ze.js → CVdwaaxP.js} +1 -1
  133. package/web/app/immutable/chunks/{DYBtbu7w.js → CZ9zPpOW.js} +1 -1
  134. package/web/app/immutable/chunks/{BEvgfoZ-.js → CaJjlkv1.js} +1 -1
  135. package/web/app/immutable/chunks/{cEXqcy6U.js → CaQ_vubD.js} +1 -1
  136. package/web/app/immutable/chunks/{dcub9TKu.js → CbQJkQ1_.js} +2 -2
  137. package/web/app/immutable/chunks/{CN-kAG5x.js → Cbe4LDCb.js} +1 -1
  138. package/web/app/immutable/chunks/{D7UERhiU.js → Cc8gV_FE.js} +1 -1
  139. package/web/app/immutable/chunks/{BJwpOHaV.js → CcDZ8sih.js} +4 -4
  140. package/web/app/immutable/chunks/{D9G_-pix.js → CcFGFqFC.js} +1 -1
  141. package/web/app/immutable/chunks/{C26VZzf0.js → Ccs3PzsG.js} +1 -1
  142. package/web/app/immutable/chunks/{pXKV3Ovh.js → CdEtW7wp.js} +1 -1
  143. package/web/app/immutable/chunks/{1mVnOdok.js → Cdhgfy6h.js} +1 -1
  144. package/web/app/immutable/chunks/{BfSDVDFf.js → Cdv2uRTZ.js} +1 -1
  145. package/web/app/immutable/chunks/{CkcASLw0.js → CeHlFtmN.js} +1 -1
  146. package/web/app/immutable/chunks/{D6uvKkqf.js → Cf1Jz9Vb.js} +1 -1
  147. package/web/app/immutable/chunks/{PWIIayd8.js → CfHaLL96.js} +1 -1
  148. package/web/app/immutable/chunks/{CS2qFATq.js → CfWtYm2O.js} +1 -1
  149. package/web/app/immutable/chunks/{CVEOLYKd.js → Cg71xtru.js} +1 -1
  150. package/web/app/immutable/chunks/{B0aENl7q.js → CgOfeXf8.js} +1 -1
  151. package/web/app/immutable/chunks/{A4DSFNiI.js → Ch5dX3SV.js} +1 -1
  152. package/web/app/immutable/chunks/{Dddo5_Ke.js → ChAC9BWJ.js} +1 -1
  153. package/web/app/immutable/chunks/{CudTayzY.js → ChMhvUux.js} +1 -1
  154. package/web/app/immutable/chunks/{DhhoUiRS.js → ChOA9PWi.js} +1 -1
  155. package/web/app/immutable/chunks/{BZ30EcZ0.js → Cic3Ymv4.js} +2 -2
  156. package/web/app/immutable/chunks/{DZSJnoMv.js → CjOA3fQ_.js} +1 -1
  157. package/web/app/immutable/chunks/{DoWd6zTc.js → CjOWZNUy.js} +1 -1
  158. package/web/app/immutable/chunks/{DYULb8CZ.js → CjVTzfqV.js} +1 -1
  159. package/web/app/immutable/chunks/{Cfcj1NKt.js → Ck11Hn8r.js} +1 -1
  160. package/web/app/immutable/chunks/{k5E4VfsL.js → CkcF_YO7.js} +1 -1
  161. package/web/app/immutable/chunks/{CYFUPy7X.js → CkjuLrGS.js} +1 -1
  162. package/web/app/immutable/chunks/{CyzhlhuH.js → ClYVhnOY.js} +1 -1
  163. package/web/app/immutable/chunks/{XQQW-aBJ.js → CnT2T-Bp.js} +5 -5
  164. package/web/app/immutable/chunks/{D-LYQeQ-.js → Co4sbmfD.js} +1 -1
  165. package/web/app/immutable/chunks/{DNZoksq4.js → CpWqDujk.js} +1 -1
  166. package/web/app/immutable/chunks/{CDoCDg8h.js → CqwbuddS.js} +1 -1
  167. package/web/app/immutable/chunks/{CIGHesQj.js → Crs9I2MT.js} +1 -1
  168. package/web/app/immutable/chunks/{Bw242gnT.js → Ct7iVnk5.js} +2 -2
  169. package/web/app/immutable/chunks/{Uh-UE9wM.js → CuR0GGFl.js} +1 -1
  170. package/web/app/immutable/chunks/{D4D7HYnP.js → CusMGTEg.js} +1 -1
  171. package/web/app/immutable/chunks/{BwKyFgJw.js → Cv6pFp-w.js} +1 -1
  172. package/web/app/immutable/chunks/{BTVL8u-m.js → CvodOZsR.js} +1 -1
  173. package/web/app/immutable/chunks/{DSoE1eag.js → Cx4f7t9d.js} +1 -1
  174. package/web/app/immutable/chunks/{l3kSG7UR.js → CyFrvxU5.js} +1 -1
  175. package/web/app/immutable/chunks/{Cm31fs63.js → CzK2fiHA.js} +1 -1
  176. package/web/app/immutable/chunks/{DTQY9iaC.js → D4uZwrDX.js} +1 -1
  177. package/web/app/immutable/chunks/{-l75u76-.js → D61mreVc.js} +1 -1
  178. package/web/app/immutable/chunks/{C90DpsQf.js → D62E6eA-.js} +1 -1
  179. package/web/app/immutable/chunks/{1-LmC8OR.js → D6eVIgjz.js} +1 -1
  180. package/web/app/immutable/chunks/{vYvFppOt.js → D7y4iPD0.js} +1 -1
  181. package/web/app/immutable/chunks/{C2rCMMRE.js → D9PvMI-Y.js} +1 -1
  182. package/web/app/immutable/chunks/{CcGTVp4j.js → D9qYrFLr.js} +1 -1
  183. package/web/app/immutable/chunks/{BVwxU13Q.js → DAPK9slU.js} +1 -1
  184. package/web/app/immutable/chunks/{CEer-6aX.js → DES0UXLU.js} +1 -1
  185. package/web/app/immutable/chunks/{CVYO3MCe.js → DGWxO_aL.js} +1 -1
  186. package/web/app/immutable/chunks/{BCf7gamQ.js → DHLYr2dR.js} +1 -1
  187. package/web/app/immutable/chunks/{B2LtcN3l.js → DJeS0Z6Z.js} +1 -1
  188. package/web/app/immutable/chunks/{D1MW0p1M.js → DJu_D7ND.js} +1 -1
  189. package/web/app/immutable/chunks/{lim2zDE2.js → DKnyYiOE.js} +1 -1
  190. package/web/app/immutable/chunks/{Dm9qsstx.js → DLOFCVO4.js} +1 -1
  191. package/web/app/immutable/chunks/{C7vqbdEX.js → DLa8qMgT.js} +1 -1
  192. package/web/app/immutable/chunks/{CVJBvnUl.js → DM4MRAyE.js} +1 -1
  193. package/web/app/immutable/chunks/{J1lXFz2y.js → DMtDzgot.js} +1 -1
  194. package/web/app/immutable/chunks/{CH5AyPs4.js → DNOilvOO.js} +3 -3
  195. package/web/app/immutable/chunks/{L8dUuijD.js → DQPsLJmj.js} +1 -1
  196. package/web/app/immutable/chunks/{Dk3HtdKK.js → DQprfQGN.js} +1 -1
  197. package/web/app/immutable/chunks/{CsPxG6yF.js → DROi8p_h.js} +1 -1
  198. package/web/app/immutable/chunks/{CsfuOIv6.js → DRt6izFN.js} +1 -1
  199. package/web/app/immutable/chunks/{NmSV7YqY.js → DU5u4CoB.js} +7 -7
  200. package/web/app/immutable/chunks/{DgqWupib.js → DUT4V6mb.js} +1 -1
  201. package/web/app/immutable/chunks/{Wv2toTdr.js → DWvbS4mu.js} +1 -1
  202. package/web/app/immutable/chunks/{BKgY2Jl-.js → DZ2EweHv.js} +1 -1
  203. package/web/app/immutable/chunks/{DRtAK_Ho.js → DaJca0wp.js} +1 -1
  204. package/web/app/immutable/chunks/{ljKTvebC.js → DcOGngFl.js} +1 -1
  205. package/web/app/immutable/chunks/{BRmWK7rc.js → Dck4Okga.js} +1 -1
  206. package/web/app/immutable/chunks/{CXdnEYDZ.js → DdZVLxLI.js} +1 -1
  207. package/web/app/immutable/chunks/{CrZPmKc1.js → De60mY1u.js} +1 -1
  208. package/web/app/immutable/chunks/{BDXMuX2f.js → DeD2_APR.js} +1 -1
  209. package/web/app/immutable/chunks/{Clb8R8dA.js → DeMWATch.js} +1 -1
  210. package/web/app/immutable/chunks/{DmAxjKP5.js → Dh52so4o.js} +3 -3
  211. package/web/app/immutable/chunks/{CSfGawHT.js → DiBTM3GP.js} +1 -1
  212. package/web/app/immutable/chunks/{Chnt0cvp.js → Dj9OdxPP.js} +1 -1
  213. package/web/app/immutable/chunks/{COeVbqbN.js → DjZWf4AT.js} +1 -1
  214. package/web/app/immutable/chunks/{B1a4c2h3.js → DoIwXvY5.js} +1 -1
  215. package/web/app/immutable/chunks/{BLArCgFy.js → DoLFtAtL.js} +1 -1
  216. package/web/app/immutable/chunks/{BwtTootF.js → DotyRxfG.js} +1 -1
  217. package/web/app/immutable/chunks/{ER83EupQ.js → DqkDKEMV.js} +1 -1
  218. package/web/app/immutable/chunks/{DUfRp1mg.js → DrI7rzCm.js} +1 -1
  219. package/web/app/immutable/chunks/{vi0NVewk.js → Ds-FLOE0.js} +1 -1
  220. package/web/app/immutable/chunks/{BQmBFkiw.js → Du9ULB4g.js} +1 -1
  221. package/web/app/immutable/chunks/{VIKn6Y9i.js → DuXpwSkB.js} +1 -1
  222. package/web/app/immutable/chunks/{DqH66s0-.js → DuzQF9m7.js} +1 -1
  223. package/web/app/immutable/chunks/{DMTaF0AC.js → DvDXb3dW.js} +1 -1
  224. package/web/app/immutable/chunks/{C1wu5rDo.js → Dx5-Ovf5.js} +1 -1
  225. package/web/app/immutable/chunks/{BuFV8TkD.js → Dxitz0gG.js} +1 -1
  226. package/web/app/immutable/chunks/{BagwB5zw.js → DyD06k4V.js} +1 -1
  227. package/web/app/immutable/chunks/{Dfewwg6c.js → DyjYgqtH.js} +1 -1
  228. package/web/app/immutable/chunks/{CL0gVjb2.js → Dz40TuR7.js} +1 -1
  229. package/web/app/immutable/chunks/{Cw00ec7E.js → F7QETuhI.js} +1 -1
  230. package/web/app/immutable/chunks/{01fEyy8F.js → F9nw4iUp.js} +1 -1
  231. package/web/app/immutable/chunks/{DF6DARvQ.js → Fy3QvGgT.js} +1 -1
  232. package/web/app/immutable/chunks/{1WCxedXI.js → HHGL3CBU.js} +1 -1
  233. package/web/app/immutable/chunks/{DJSDIQIJ.js → HjNzRj_q.js} +1 -1
  234. package/web/app/immutable/chunks/{Dtop3Yti.js → JgQtvDnb.js} +1 -1
  235. package/web/app/immutable/chunks/{9Nd0N_p1.js → JktSJt1s.js} +1 -1
  236. package/web/app/immutable/chunks/{B_mtugqw.js → MnYF9HDw.js} +1 -1
  237. package/web/app/immutable/chunks/{Cpe1M7DX.js → O_LhoKyf.js} +1 -1
  238. package/web/app/immutable/chunks/{C6By93LU.js → Ov_SEXEY.js} +1 -1
  239. package/web/app/immutable/chunks/{BkUc1pNC.js → PSWhBTN5.js} +1 -1
  240. package/web/app/immutable/chunks/{SM7MWiSc.js → QLmgzrwQ.js} +3 -3
  241. package/web/app/immutable/chunks/{DUeA5OOE.js → QOLdaLP0.js} +1 -1
  242. package/web/app/immutable/chunks/{Rd061ct8.js → R0wDqNpY.js} +1 -1
  243. package/web/app/immutable/chunks/{BduRIWZD.js → RNQdr-NN.js} +1 -1
  244. package/web/app/immutable/chunks/{6Kld8S57.js → TKnaMJht.js} +1 -1
  245. package/web/app/immutable/chunks/{BaVUClm6.js → TfEFcm0X.js} +1 -1
  246. package/web/app/immutable/chunks/{CZ3ut3WK.js → Uvf94Vit.js} +1 -1
  247. package/web/app/immutable/chunks/{B8s7KBCM.js → Ve0nl1oV.js} +1 -1
  248. package/web/app/immutable/chunks/{Dwnv6yhd.js → VwRqUxpW.js} +1 -1
  249. package/web/app/immutable/chunks/{CqHwkPsK.js → XgTDusK7.js} +1 -1
  250. package/web/app/immutable/chunks/{7jbSOAGl.js → YIljg4QC.js} +1 -1
  251. package/web/app/immutable/chunks/{5DJFYIPd.js → YJJNz-XI.js} +1 -1
  252. package/web/app/immutable/chunks/{C3eR-hfH.js → YNqTfGpO.js} +1 -1
  253. package/web/app/immutable/chunks/{Dvk-zN0g.js → _cwefpRI.js} +1 -1
  254. package/web/app/immutable/chunks/{v2EWEBoe.js → aWlYJ1qq.js} +1 -1
  255. package/web/app/immutable/chunks/{BFuTF0hE.js → b7qEBWdv.js} +1 -1
  256. package/web/app/immutable/chunks/{COK2LnAZ.js → bb6KeZoT.js} +1 -1
  257. package/web/app/immutable/chunks/{CotsFEBP.js → bjkNeafo.js} +1 -1
  258. package/web/app/immutable/chunks/{DONYESbJ.js → cKTNBTNE.js} +1 -1
  259. package/web/app/immutable/chunks/{CXzKXnDy.js → fqvfvcmd.js} +1 -1
  260. package/web/app/immutable/chunks/{BHDV7xy2.js → fsCYHFC5.js} +1 -1
  261. package/web/app/immutable/chunks/{DpuMOKOv.js → gn8kmMF6.js} +1 -1
  262. package/web/app/immutable/chunks/{BOB0swWW.js → hMX_6Iel.js} +1 -1
  263. package/web/app/immutable/chunks/{BGhKPfZ3.js → hTe-_Fjh.js} +3 -3
  264. package/web/app/immutable/chunks/{Do_iEIAT.js → kZqyWeDw.js} +1 -1
  265. package/web/app/immutable/chunks/{Cui74L_P.js → kpgdVhmB.js} +1 -1
  266. package/web/app/immutable/chunks/{CtXdddI-.js → l6-BV5ui.js} +2 -2
  267. package/web/app/immutable/chunks/{2OgS95T-.js → l9lbU6dU.js} +1 -1
  268. package/web/app/immutable/chunks/{DvAGFDsv.js → lN-utS8K.js} +1 -1
  269. package/web/app/immutable/chunks/{CiYbcJbc.js → laFenviK.js} +3 -3
  270. package/web/app/immutable/chunks/{ftWd1Zjf.js → mfJalPj6.js} +1 -1
  271. package/web/app/immutable/chunks/{Dv6Z2vIg.js → nvAK9EyO.js} +1 -1
  272. package/web/app/immutable/chunks/{C7UskoEr.js → oALOmsvi.js} +1 -1
  273. package/web/app/immutable/chunks/{A1TIfmo0.js → oTkHTTGI.js} +1 -1
  274. package/web/app/immutable/chunks/{Dlte6bLv.js → p20Ma5Ub.js} +1 -1
  275. package/web/app/immutable/chunks/{BtL5iOJF.js → pUHkzJ_d.js} +1 -1
  276. package/web/app/immutable/chunks/{BeqotHvt.js → ppWvCL4x.js} +1 -1
  277. package/web/app/immutable/chunks/{DDs_vRW4.js → pqiENG4w.js} +1 -1
  278. package/web/app/immutable/chunks/{Do7s1OwN.js → qk0mFpjO.js} +1 -1
  279. package/web/app/immutable/chunks/{jJz6_yuW.js → qsyNpi2_.js} +1 -1
  280. package/web/app/immutable/chunks/{Csj4pbMB.js → ulh-TYZ7.js} +1 -1
  281. package/web/app/immutable/chunks/{BXvjzr5P.js → vkDSSzeI.js} +1 -1
  282. package/web/app/immutable/chunks/{Dkbmzx7H.js → wGTbEzRg.js} +1 -1
  283. package/web/app/immutable/chunks/{_JxqnZOZ.js → xpCT4rnW.js} +1 -1
  284. package/web/app/immutable/chunks/{BNjffeJ6.js → ykvYWYIa.js} +1 -1
  285. package/web/app/immutable/chunks/{CiBXoTtR.js → zln0bEou.js} +1 -1
  286. package/web/app/immutable/entry/{app.Zrn5tWMU.js → app.BvKW_t2N.js} +3 -3
  287. package/web/app/immutable/entry/start.CQ7TZDH6.js +1 -0
  288. package/web/app/immutable/nodes/{0.BM7pEWx2.js → 0.BYMSP7Y-.js} +1 -1
  289. package/web/app/immutable/nodes/{1.JktrP7d9.js → 1.DIEji4Js.js} +1 -1
  290. package/web/app/immutable/nodes/{10.OPA46CBe.js → 10.DvTvrgji.js} +1 -1
  291. package/web/app/immutable/nodes/{11.AhtS-9g0.js → 11.UFQkf3wv.js} +1 -1
  292. package/web/app/immutable/nodes/{12.B7HQKMa-.js → 12.6a9ttQ9E.js} +1 -1
  293. package/web/app/immutable/nodes/{13.DPi0S1C2.js → 13.ghIWnT0h.js} +3 -3
  294. package/web/app/immutable/nodes/{14.DDlmGd9K.js → 14.CJs3OY3_.js} +1 -1
  295. package/web/app/immutable/nodes/{15.DU5PqzuZ.js → 15.ChCFmxtt.js} +1 -1
  296. package/web/app/immutable/nodes/{16.BwB-evW2.js → 16.DsO7YO_c.js} +2 -2
  297. package/web/app/immutable/nodes/{2.B-ceEPTc.js → 2.Cht0dQl2.js} +4 -4
  298. package/web/app/immutable/nodes/{3.B9VaWul3.js → 3.BGeidrSE.js} +1 -1
  299. package/web/app/immutable/nodes/{4.DerjOzjZ.js → 4.iguZO2rl.js} +1 -1
  300. package/web/app/immutable/nodes/{5.CW5Igcd8.js → 5.BppWO1IB.js} +1 -1
  301. package/web/app/immutable/nodes/{6.BDW6GbUk.js → 6.ChXOvT3x.js} +1 -1
  302. package/web/app/immutable/nodes/{7.hNduPSer.js → 7.CgsIeK3J.js} +1 -1
  303. package/web/app/immutable/nodes/{8.C6RbAqlx.js → 8.Bq2NzD4c.js} +4 -4
  304. package/web/app/immutable/nodes/{9.ExPUFxzp.js → 9.CvEBRJEV.js} +16 -16
  305. package/web/app/version.json +1 -1
  306. package/web/generated/paraglide.js +45 -45
  307. package/web/index.html +18 -18
  308. package/web/app/immutable/chunks/By1GAIbK.js +0 -1
  309. package/web/app/immutable/chunks/CNHLe0qt.js +0 -1
  310. package/web/app/immutable/chunks/DBUIDXRy.js +0 -1
  311. package/web/app/immutable/chunks/DQh9HtzB.js +0 -1
  312. package/web/app/immutable/entry/start.CVgJF78D.js +0 -1
@@ -1,2 +1,2 @@
1
- import{N as L,f as G,an as j,ak as Q,au as V,o as X,c as z}from"./DgqWupib.js";import{G2 as u,mv as _,Gb as N,ba as v,W as Y,mh as B,pR as P,mu as W,qb as $,jo as Z,q9 as D,Gu as O,pB as J,fr as q,pS as K,Y as ee,b8 as te,g as ne}from"./D35akxD1.js";import{s as x,ac as se}from"./C8IxeNxn.js";const oe=["[WORKSPACE EVENTS]","[TASK WAKE]","[AGENT MESSAGE]"];function ie(e){const t=e.metadata;if(t&&typeof t=="object"){if(t.type==="question_answers")return!1;if(!L(t))return!0}const n=G(e);return oe.some(s=>n.startsWith(s))}const re=1440*60*1e3;function ae(e){let t=null;for(const n of e){if(ie({id:n.id,timestamp:n.createdAt,metadata:n.metadata,contentBlocks:[{type:"text",text:n.preview.trimStart()}]}))continue;const s=Date.parse(n.createdAt);Number.isFinite(s)&&(t===null||s>t)&&(t=s)}return t}const ce=50,le=20;function E(e,t){return e===null||t!==null&&t>e?t:e}async function _e(e,t){let n,s=null;for(let i=0;i<le;i++){const o=await e({limit:ce,nextToken:n});if(!o.ok)return null;const c=o.items;s===null&&c.length>0&&(s=c[c.length-1].id);const l=t?.newestId!=null?c.findIndex(a=>a.id===t.newestId):-1,r=ae(l>=0?c.slice(l+1):c);if(l>=0)return{latest:E(r,t?.latest??null),newestId:s};if(r!==null)return{latest:E(r,t?.latest??null),newestId:s};if(typeof o.nextToken!="string")return{latest:null,newestId:s};n=o.nextToken}return{latest:t?.latest??null,newestId:s}}function ue(e,t){return e!=null&&e<=t&&e>t-re}const y=new Map;function de(e){return y.has(e)}function Be(e){return y.get(e)}function We(e){y.set(e.agentId,e)}function Re(e){y.delete(e)}u.createSelector(e=>e.hud.active);u.createSelector(e=>e.hud.feed);u.createSelector(e=>e.hud.usage);u.createSelector(e=>e.hud.usageError);const De=u.createSelector(e=>e.hud.rateHistory),Ee=u.createSelector(e=>_(e.workspace.workspaces)),Ce=u.createSelector(e=>{const t=e.hud.usage?.totals;return t?N(t):0}),He=u.createSelector(e=>e.hud.burnRatePerMin),Ne=u.createSelector(e=>e.hud.burnTrend),Pe=u.createSelector(e=>{const{health:t,stats:n,lastUpdated:s,hostLocality:i}=e.daemonHealth,o=n?.hostname;return{online:t!=="down",uptimeSeconds:typeof n?.uptimeSeconds=="number"?n.uptimeSeconds:null,version:n?.version??null,fetchedAtMs:s?Date.parse(s):null,remoteHostname:i==="remote"&&o?o.split(".",1)[0]??o:null}}),qe=u.createSelector(e=>e.hud.gridFilter);u.createSelector(e=>e.hud.attentionByWorkspaceId);const Ke=u.createSelector((e,t)=>{const n=e.hud?.questionsByAgentId?.[t];if(!n)return!1;const s=e.agentSessions?.byAgentId[t]?.metadata??{};return!x(s,n.messageId)}),xe=u.createSelector(e=>e.hud.takeoverRequestWorkspaceId);function ge(e,t){return t[String(e.id)]??e.displayStatus}const A=u.createSelector(e=>{const t=e.hud.displayStatusByWorkspaceId;return _(e.workspace.workspaces).filter(n=>n.status!==v.Archived&&n.status!==v.Retired&&n.status!==v.Deleted).map(n=>{const s=ge(n,t);return s&&s!==n.displayStatus?{...n,displayStatus:s}:n})});function I(e){const t=e.agentSummary;return!t||!Array.isArray(t.agents)?[]:t.agents.filter(n=>!!n&&typeof n=="object"&&typeof n.id=="string"&&n.status!=="deleted"&&!de(n.id))}const Fe=u.createSelector(e=>{const t=Object.fromEntries(Y.map(n=>[n,0]));for(const n of A.select(e))for(const s of I(n))t[m(e,s).bucket]+=1;return t}),Ue=u.createSelector(e=>{const t={idle:0,unread:0,progress:0,attention:0,waiting:0,prOpen:0,prMerged:0,failed:0,completed:0,total:0};for(const n of R.select(e))switch(t.total+=1,n.isUnread&&(t.unread+=1),n.isWaiting&&(t.waiting+=1),n.stateKey){case"wait":case"blocked":t.attention+=1;break;case"failed":t.failed+=1;break;case"in_progress":t.progress+=1;break;case"complete":t.completed+=1;break;case"pr_open":case"pr_ready":case"pr_queued":t.prOpen+=1;break;case"pr_merged":t.prMerged+=1;break;default:t.idle+=1}return t}),fe=u.createSelector(e=>{const t={};for(const n of A.select(e))for(const s of I(n))typeof s.name=="string"&&s.name.length>0&&(t[s.id]=s.name);return t});function C(e){if(!e.sinceTs)return 0;const t=Date.parse(e.sinceTs);return Number.isFinite(t)?t:0}const Le=u.createSelector(e=>{const t=e.hud.attentionByWorkspaceId,n=e.hud.questionsByAgentId,s=[];for(const i of A.select(e)){const o=String(i.id);let c=!1;for(const r of w(i,e)){const{bucket:a,attentionKind:d,hasQuestion:g}=r;if(a!=="needs-attention"&&a!=="failed"||!r.topLevel||r.isBackground||S(e,r.id))continue;const k=g?n[r.id]:void 0,f=d?B(e.agentSessions?.byAgentId[r.id])?.reason:void 0,p=k?"question":d??void 0;s.push({workspaceId:o,workspaceTitle:i.title,kind:a==="needs-attention"?"agent_waiting":"agent_failed",...a==="needs-attention"&&p?{signal:p}:{},agentName:r.name,message:k?.question??f??null,sinceTs:r.lastActivityTs}),c=!0}const l=t[o];l&&P(l.attention)&&(s.push({workspaceId:o,workspaceTitle:i.title,kind:"workspace_attention",attention:l.attention,message:null,sinceTs:l.raisedAtTs}),c=!0),F.has(b(i))&&!c&&s.push({workspaceId:o,workspaceTitle:i.title,kind:"workspace_attention",message:null,sinceTs:null})}return s.sort((i,o)=>C(o)-C(i))}),Ge=u.createSelector(e=>{const t=fe.select(e);return e.hud.feed.map(n=>({...n,workspaceTitle:W(e.workspace.workspaces,n.source)?.title??null,resolvedAgentName:n.agentName??(n.agentId?t[n.agentId]??null:null)}))}),pe={total:0,completed:0,inProgress:0};function b(e){const t=$(e.displayStatus)?e.displayStatus:"not_started";return Z(t)??"not_started"}const F=new Set(["wait","blocked","failed"]);function ke(e,t,n){if(t==="failed"){const i=n.find(c=>c.bucket==="failed"&&!S(e,c.id)),o=i?e.agentSessions?.byAgentId[i.id]?.stopReason:null;return{kind:"failed",text:typeof o=="string"&&o.length>0?o:""}}if(t!=="wait"&&t!=="blocked")return null;const s=n.filter(i=>i.topLevel&&!i.isBackground&&!S(e,i.id));for(const i of s){if(!i.hasQuestion)continue;const o=e.hud.questionsByAgentId[i.id];if(o?.question)return{kind:"question",text:o.question}}for(const i of["blocker","discussion"])for(const o of s){if(o.attentionKind!==i)continue;const c=e.agentSessions?.byAgentId[o.id],l=B(c)?.reason;if(l)return{kind:i,text:l}}return{kind:"pending",text:""}}const h=new Set(["running","needs-attention","failed"]);function H(e){const t=typeof e.lastActivity=="string"?Date.parse(e.lastActivity):NaN;return Number.isFinite(t)?t:-1/0}function Ae(e){const t=n=>{const s=e.get(n.id)?.bucket;return s!==void 0&&h.has(s)?0:1};return(n,s)=>{const i=n.specialist==="spec-writer",o=s.specialist==="spec-writer";if(i!==o)return i?-1:1;const c=t(n)-t(s);if(c!==0)return c;const l=H(n),r=H(s);return l!==r?r-l:n.id<s.id?-1:n.id>s.id?1:0}}function Se(e,t){const n=new Set(e.map(r=>r.id)),s=new Map,i=[];for(const r of e){const a=typeof r.parentAgentId=="string"&&r.parentAgentId!==r.id&&n.has(r.parentAgentId)?r.parentAgentId:null;if(a){const d=s.get(a)??[];d.push(r),s.set(a,d)}else i.push(r)}i.sort(t);for(const r of s.values())r.sort(t);const o=[],c=new Set,l=(r,a,d)=>{if(!c.has(r.id)){c.add(r.id),o.push({info:r,depth:a,parentAgentId:d});for(const g of s.get(r.id)??[])l(g,a+1,r.id)}};for(const r of i)l(r,0,null);for(const r of e)l(r,0,null);return o}function m(e,t){const n=e.agentSessions?.byAgentId[t.id],s=n?.metadata??{},i=n?B(n)?.kind??null:null,o=n?j.select(e,t.id)||typeof n.status=="string"&&D(n.status):D(t.status),c=n?O(typeof n.status=="string"?n.status:t.status):null,l=!!n&&c!=="failed"&&c!=="done"&&(n.isWaitingForOtherAgents===!0||Array.isArray(n.waitingForAgentIds)&&n.waitingForAgentIds.length>0||Array.isArray(n.waitingOnHooks)&&n.waitingOnHooks.length>0||Array.isArray(n.waitingOnPrMonitors)&&n.waitingOnPrMonitors.length>0||Array.isArray(n.waitingOnScriptMonitors)&&n.waitingOnScriptMonitors.length>0),r=!!n&&(n.turnInFlight===!0||n.liveTurnOpen===!0);let a;n?l&&!r&&n.isStreaming!==!0&&n.isProcessing!==!0?a="idle":Q.select(e,t.id)?a="running":o?a="idle":a=O(typeof n.status=="string"?n.status:t.status):a=t.isResponding===!0||t.isStreaming===!0?"running":O(t.status);const d=e.hud.questionsByAgentId[t.id],g=a!=="failed"&&!!d&&!x(s,d.messageId);return{bucket:a==="failed"?"failed":i!==null||g?"needs-attention":a,attentionKind:i,hasQuestion:g,isRunning:a==="running"}}function U(e,t){const n=i=>typeof i=="string"&&i!==e.id?i:null,s=i=>({isBackground:i?.isBackground,createdByAgentId:n(i?.createdByAgentId)});return{parentAgentId:n(e.parentAgentId)??n(t?.parentAgentId),isBackground:e.isBackground??t?.isBackground,metadata:s(t?.metadata),agentMetadata:s(t?.agentMetadata)}}function S(e,t){return e.agentSessions?.byAgentId[t]?.notificationsMuted===!0}function he(e){if(!e)return null;switch(e.kind){case"attention":return e.attention.reason??null;case"live-tool":case"last-tool":{const t=z(e.toolUse.name,e.toolUse.input||{});return t.hidden?null:[t.verb,t.subject,t.path].filter(Boolean).join(" ").trim()||null}default:{const t=e.text||"";return t?t.includes(`
1
+ import{N as L,f as G,an as j,ak as Q,au as V,o as X,c as z}from"./DUT4V6mb.js";import{G2 as u,mv as _,Gb as N,ba as v,W as Y,mh as B,pR as P,mu as W,qb as $,jo as Z,q9 as D,Gu as O,pB as J,fr as q,pS as K,Y as ee,b8 as te,g as ne}from"./BjFoJgFv.js";import{s as x,ac as se}from"./BUVaYTVI.js";const oe=["[WORKSPACE EVENTS]","[TASK WAKE]","[AGENT MESSAGE]"];function ie(e){const t=e.metadata;if(t&&typeof t=="object"){if(t.type==="question_answers")return!1;if(!L(t))return!0}const n=G(e);return oe.some(s=>n.startsWith(s))}const re=1440*60*1e3;function ae(e){let t=null;for(const n of e){if(ie({id:n.id,timestamp:n.createdAt,metadata:n.metadata,contentBlocks:[{type:"text",text:n.preview.trimStart()}]}))continue;const s=Date.parse(n.createdAt);Number.isFinite(s)&&(t===null||s>t)&&(t=s)}return t}const ce=50,le=20;function E(e,t){return e===null||t!==null&&t>e?t:e}async function _e(e,t){let n,s=null;for(let i=0;i<le;i++){const o=await e({limit:ce,nextToken:n});if(!o.ok)return null;const c=o.items;s===null&&c.length>0&&(s=c[c.length-1].id);const l=t?.newestId!=null?c.findIndex(a=>a.id===t.newestId):-1,r=ae(l>=0?c.slice(l+1):c);if(l>=0)return{latest:E(r,t?.latest??null),newestId:s};if(r!==null)return{latest:E(r,t?.latest??null),newestId:s};if(typeof o.nextToken!="string")return{latest:null,newestId:s};n=o.nextToken}return{latest:t?.latest??null,newestId:s}}function ue(e,t){return e!=null&&e<=t&&e>t-re}const y=new Map;function de(e){return y.has(e)}function Be(e){return y.get(e)}function We(e){y.set(e.agentId,e)}function Re(e){y.delete(e)}u.createSelector(e=>e.hud.active);u.createSelector(e=>e.hud.feed);u.createSelector(e=>e.hud.usage);u.createSelector(e=>e.hud.usageError);const De=u.createSelector(e=>e.hud.rateHistory),Ee=u.createSelector(e=>_(e.workspace.workspaces)),Ce=u.createSelector(e=>{const t=e.hud.usage?.totals;return t?N(t):0}),He=u.createSelector(e=>e.hud.burnRatePerMin),Ne=u.createSelector(e=>e.hud.burnTrend),Pe=u.createSelector(e=>{const{health:t,stats:n,lastUpdated:s,hostLocality:i}=e.daemonHealth,o=n?.hostname;return{online:t!=="down",uptimeSeconds:typeof n?.uptimeSeconds=="number"?n.uptimeSeconds:null,version:n?.version??null,fetchedAtMs:s?Date.parse(s):null,remoteHostname:i==="remote"&&o?o.split(".",1)[0]??o:null}}),qe=u.createSelector(e=>e.hud.gridFilter);u.createSelector(e=>e.hud.attentionByWorkspaceId);const Ke=u.createSelector((e,t)=>{const n=e.hud?.questionsByAgentId?.[t];if(!n)return!1;const s=e.agentSessions?.byAgentId[t]?.metadata??{};return!x(s,n.messageId)}),xe=u.createSelector(e=>e.hud.takeoverRequestWorkspaceId);function ge(e,t){return t[String(e.id)]??e.displayStatus}const A=u.createSelector(e=>{const t=e.hud.displayStatusByWorkspaceId;return _(e.workspace.workspaces).filter(n=>n.status!==v.Archived&&n.status!==v.Retired&&n.status!==v.Deleted).map(n=>{const s=ge(n,t);return s&&s!==n.displayStatus?{...n,displayStatus:s}:n})});function I(e){const t=e.agentSummary;return!t||!Array.isArray(t.agents)?[]:t.agents.filter(n=>!!n&&typeof n=="object"&&typeof n.id=="string"&&n.status!=="deleted"&&!de(n.id))}const Fe=u.createSelector(e=>{const t=Object.fromEntries(Y.map(n=>[n,0]));for(const n of A.select(e))for(const s of I(n))t[m(e,s).bucket]+=1;return t}),Ue=u.createSelector(e=>{const t={idle:0,unread:0,progress:0,attention:0,waiting:0,prOpen:0,prMerged:0,failed:0,completed:0,total:0};for(const n of R.select(e))switch(t.total+=1,n.isUnread&&(t.unread+=1),n.isWaiting&&(t.waiting+=1),n.stateKey){case"wait":case"blocked":t.attention+=1;break;case"failed":t.failed+=1;break;case"in_progress":t.progress+=1;break;case"complete":t.completed+=1;break;case"pr_open":case"pr_ready":case"pr_queued":t.prOpen+=1;break;case"pr_merged":t.prMerged+=1;break;default:t.idle+=1}return t}),fe=u.createSelector(e=>{const t={};for(const n of A.select(e))for(const s of I(n))typeof s.name=="string"&&s.name.length>0&&(t[s.id]=s.name);return t});function C(e){if(!e.sinceTs)return 0;const t=Date.parse(e.sinceTs);return Number.isFinite(t)?t:0}const Le=u.createSelector(e=>{const t=e.hud.attentionByWorkspaceId,n=e.hud.questionsByAgentId,s=[];for(const i of A.select(e)){const o=String(i.id);let c=!1;for(const r of w(i,e)){const{bucket:a,attentionKind:d,hasQuestion:g}=r;if(a!=="needs-attention"&&a!=="failed"||!r.topLevel||r.isBackground||S(e,r.id))continue;const k=g?n[r.id]:void 0,f=d?B(e.agentSessions?.byAgentId[r.id])?.reason:void 0,p=k?"question":d??void 0;s.push({workspaceId:o,workspaceTitle:i.title,kind:a==="needs-attention"?"agent_waiting":"agent_failed",...a==="needs-attention"&&p?{signal:p}:{},agentName:r.name,message:k?.question??f??null,sinceTs:r.lastActivityTs}),c=!0}const l=t[o];l&&P(l.attention)&&(s.push({workspaceId:o,workspaceTitle:i.title,kind:"workspace_attention",attention:l.attention,message:null,sinceTs:l.raisedAtTs}),c=!0),F.has(b(i))&&!c&&s.push({workspaceId:o,workspaceTitle:i.title,kind:"workspace_attention",message:null,sinceTs:null})}return s.sort((i,o)=>C(o)-C(i))}),Ge=u.createSelector(e=>{const t=fe.select(e);return e.hud.feed.map(n=>({...n,workspaceTitle:W(e.workspace.workspaces,n.source)?.title??null,resolvedAgentName:n.agentName??(n.agentId?t[n.agentId]??null:null)}))}),pe={total:0,completed:0,inProgress:0};function b(e){const t=$(e.displayStatus)?e.displayStatus:"not_started";return Z(t)??"not_started"}const F=new Set(["wait","blocked","failed"]);function ke(e,t,n){if(t==="failed"){const i=n.find(c=>c.bucket==="failed"&&!S(e,c.id)),o=i?e.agentSessions?.byAgentId[i.id]?.stopReason:null;return{kind:"failed",text:typeof o=="string"&&o.length>0?o:""}}if(t!=="wait"&&t!=="blocked")return null;const s=n.filter(i=>i.topLevel&&!i.isBackground&&!S(e,i.id));for(const i of s){if(!i.hasQuestion)continue;const o=e.hud.questionsByAgentId[i.id];if(o?.question)return{kind:"question",text:o.question}}for(const i of["blocker","discussion"])for(const o of s){if(o.attentionKind!==i)continue;const c=e.agentSessions?.byAgentId[o.id],l=B(c)?.reason;if(l)return{kind:i,text:l}}return{kind:"pending",text:""}}const h=new Set(["running","needs-attention","failed"]);function H(e){const t=typeof e.lastActivity=="string"?Date.parse(e.lastActivity):NaN;return Number.isFinite(t)?t:-1/0}function Ae(e){const t=n=>{const s=e.get(n.id)?.bucket;return s!==void 0&&h.has(s)?0:1};return(n,s)=>{const i=n.specialist==="spec-writer",o=s.specialist==="spec-writer";if(i!==o)return i?-1:1;const c=t(n)-t(s);if(c!==0)return c;const l=H(n),r=H(s);return l!==r?r-l:n.id<s.id?-1:n.id>s.id?1:0}}function Se(e,t){const n=new Set(e.map(r=>r.id)),s=new Map,i=[];for(const r of e){const a=typeof r.parentAgentId=="string"&&r.parentAgentId!==r.id&&n.has(r.parentAgentId)?r.parentAgentId:null;if(a){const d=s.get(a)??[];d.push(r),s.set(a,d)}else i.push(r)}i.sort(t);for(const r of s.values())r.sort(t);const o=[],c=new Set,l=(r,a,d)=>{if(!c.has(r.id)){c.add(r.id),o.push({info:r,depth:a,parentAgentId:d});for(const g of s.get(r.id)??[])l(g,a+1,r.id)}};for(const r of i)l(r,0,null);for(const r of e)l(r,0,null);return o}function m(e,t){const n=e.agentSessions?.byAgentId[t.id],s=n?.metadata??{},i=n?B(n)?.kind??null:null,o=n?j.select(e,t.id)||typeof n.status=="string"&&D(n.status):D(t.status),c=n?O(typeof n.status=="string"?n.status:t.status):null,l=!!n&&c!=="failed"&&c!=="done"&&(n.isWaitingForOtherAgents===!0||Array.isArray(n.waitingForAgentIds)&&n.waitingForAgentIds.length>0||Array.isArray(n.waitingOnHooks)&&n.waitingOnHooks.length>0||Array.isArray(n.waitingOnPrMonitors)&&n.waitingOnPrMonitors.length>0||Array.isArray(n.waitingOnScriptMonitors)&&n.waitingOnScriptMonitors.length>0),r=!!n&&(n.turnInFlight===!0||n.liveTurnOpen===!0);let a;n?l&&!r&&n.isStreaming!==!0&&n.isProcessing!==!0?a="idle":Q.select(e,t.id)?a="running":o?a="idle":a=O(typeof n.status=="string"?n.status:t.status):a=t.isResponding===!0||t.isStreaming===!0?"running":O(t.status);const d=e.hud.questionsByAgentId[t.id],g=a!=="failed"&&!!d&&!x(s,d.messageId);return{bucket:a==="failed"?"failed":i!==null||g?"needs-attention":a,attentionKind:i,hasQuestion:g,isRunning:a==="running"}}function U(e,t){const n=i=>typeof i=="string"&&i!==e.id?i:null,s=i=>({isBackground:i?.isBackground,createdByAgentId:n(i?.createdByAgentId)});return{parentAgentId:n(e.parentAgentId)??n(t?.parentAgentId),isBackground:e.isBackground??t?.isBackground,metadata:s(t?.metadata),agentMetadata:s(t?.agentMetadata)}}function S(e,t){return e.agentSessions?.byAgentId[t]?.notificationsMuted===!0}function he(e){if(!e)return null;switch(e.kind){case"attention":return e.attention.reason??null;case"live-tool":case"last-tool":{const t=z(e.toolUse.name,e.toolUse.input||{});return t.hidden?null:[t.verb,t.subject,t.path].filter(Boolean).join(" ").trim()||null}default:{const t=e.text||"";return t?t.includes(`
2
2
  `)?X(t)||null:t:null}}}function w(e,t){const n=I(e),s=new Map(n.map(o=>[o.id,m(t,o)]));return Se(n,Ae(s)).map(({info:o,depth:c,parentAgentId:l})=>{const r=t.agentSessions?.byAgentId[o.id],a=U(o,r),{bucket:d,attentionKind:g,hasQuestion:k}=s.get(o.id)??m(t,o),f=Array.isArray(r?.waitingForAgentIds)?r.waitingForAgentIds.filter(p=>typeof p=="string"):[];return{id:o.id,name:o.name,bucket:d,lastActivityTs:o.lastActivity??null,line:he(V.select(t,o.id)),parentAgentId:l,depth:c,treePrefix:"",topLevel:q(a)==="topLevel",isBackground:J(a),attentionKind:g,hasQuestion:k,isWaitingForAgents:r?.isWaitingForOtherAgents===!0||f.length>0||Array.isArray(r?.waitingOnHooks)&&r.waitingOnHooks.length>0||Array.isArray(r?.waitingOnPrMonitors)&&r.waitingOnPrMonitors.length>0||Array.isArray(r?.waitingOnScriptMonitors)&&r.waitingOnScriptMonitors.length>0,waitingForAgentIds:f}})}function me(e){const t=new Set;for(const i of e)for(const o of i.waitingForAgentIds)t.add(o);const n=i=>h.has(i.bucket)||i.isWaitingForAgents||t.has(i.id);return e.filter((i,o)=>{if(n(i))return!0;for(let c=o+1;c<e.length&&!(e[c].depth<=i.depth);c++)if(n(e[c]))return!0;return!1}).map((i,o,c)=>{if(i.depth===0)return{...i,treePrefix:""};let l=!0;for(let r=o+1;r<c.length&&!(c[r].depth<i.depth);r++)if(c[r].depth===i.depth){l=!1;break}return{...i,treePrefix:(i.depth>=2?"│ ":"")+(l?"└─":"├─")}})}const R=u.createSelector(e=>{const t=e.hud.attentionByWorkspaceId,n=se.select(e);return A.select(e).map(s=>{const i=String(s.id),o=n.indexOf(i),c=t[i]?.attention??(typeof s.attention=="string"&&K(s.attention)?s.attention:null),l=w(s,e),r=b(s),a=e.tokenUsage?.byWorkspaceId[i]?.totals,d=e.workspaceTasks?.byWorkspaceId[i]?.stats,g=typeof s.statusMessage=="string"&&s.statusMessage.trim().length>0?s.statusMessage:null;return{workspaceId:i,title:s.title,repoRef:s.repositoryName?`${s.repositoryOwner?`${s.repositoryOwner}/`:""}${s.repositoryName}`:s.branch,stateKey:r,attention:c,isUnread:c===ee,isWaiting:s.waiting===!0,statusMessage:g,attentionSnippet:ke(e,r,l),prNumber:typeof s.prNumber=="number"?s.prNumber:null,keySlot:o===-1?null:o,tasks:d?{total:d.total,completed:d.completed,inProgress:d.inProgress}:pe,tokens:a?N(a):0,agents:me(l)}})}),M=4;function ye(e,t,n){const s=e.agentSessions?.byAgentId[n.id];return!s||String(s.workspaceId)!==t||s.pendingDeleteAt||q(U(n,s))!=="topLevel"?!1:!S(e,n.id)}const Ie=u.createSelector(e=>{const t={},n=e.hud.attentionByWorkspaceId;for(const s of A.select(e)){const i=String(s.id),o=new Map,c=(f,p)=>{const T=o.get(f)??[];T.includes(p)||T.push(p),o.set(f,T)},r=I(s).filter(f=>ye(e,i,f));for(const f of r){const p=m(e,f);p.bucket==="failed"?c("failed",f.name):p.hasQuestion?c("question",f.name):p.attentionKind==="blocker"?c("blocker",f.name):p.attentionKind==="discussion"&&c("discussion",f.name),p.isRunning&&c("running",f.name)}const a=b(s);a==="failed"&&!o.has("failed")&&o.set("failed",[]),a==="blocked"&&!o.has("blocker")&&o.set("blocker",[]),a==="wait"&&!o.has("question")&&!o.has("blocker")&&!o.has("discussion")&&o.set("needs_input",[]);const d=n[i]?.attention??(typeof s.attention=="string"&&K(s.attention)?s.attention:null);d==="review_required"&&o.set("review",[]),d==="unread"&&o.set("unread",[]),s.activity==="agent_running"&&!o.has("running")&&o.set("running",[]);const g=te.flatMap(f=>{const p=o.get(f);return p?[{category:f,count:Math.max(1,p.length),agentNames:p}]:[]});if(g.length===0)continue;const k=g.length>M;t[i]={agentCount:r.length,categories:g,visibleCategories:k?g.slice(0,M-1):g,hiddenCategoryCount:k?g.length-(M-1):0}}return t});u.createSelector(e=>{const t=e.hud.attentionByWorkspaceId;let n=0;for(const s of A.select(e)){let i=!1;for(const l of w(s,e))l.topLevel&&!l.isBackground&&!S(e,l.id)&&(l.bucket==="failed"||l.attentionKind!==null||l.hasQuestion)&&(n+=1,i=!0);const o=t[String(s.id)],c=o!==void 0&&P(o.attention);c&&(n+=1),F.has(b(s))&&!i&&!c&&(n+=1)}return n});function be(e,t,n,s){const i=s.slice().sort((r,a)=>a.createdAt-r.createdAt);for(const r of i){const d=e.agentSessions?.byAgentId[r.agentId]?.metadata?.completionReport;if(typeof d=="string"&&d.trim().length>0)return d}const o=e.workspaceNotes?.byWorkspaceId[t]?.notes,c=o?W(o,n):void 0,l=c?.content||c?.contentPreview;return typeof l=="string"&&l.trim().length>0?l:null}const je=u.createSelector((e,t)=>{const n=R.select(e).find(a=>a.workspaceId===t);if(!n)return null;const s=W(e.workspace.workspaces,t),i=s?w(s,e):[],o=new Map(i.map(a=>[a.id,a])),c=e.taskAgentAssociations?.byWorkspaceId[t]?.byNoteId??{},l=e.workspaceTasks?.byWorkspaceId[t],r=l?_(l.tasks).filter(a=>a.status!=="cancelled").map(a=>{const d=Object.values(c[a.id]??{});return{id:a.id,title:a.title,status:a.status,agents:d.map(g=>o.get(g.agentId)).filter(g=>!!g),report:a.status==="complete"?be(e,t,a.id,d):null,...a.specLinked!==void 0?{specLinked:a.specLinked}:{},...a.dependsOn?{dependsOn:a.dependsOn}:{},...a.conflictsWith?{conflictsWith:a.conflictsWith}:{},...a.unmetDependsOn?{unmetDependsOn:a.unmetDependsOn}:{}}}):[];return{workspaceId:t,title:n.title,repoRef:n.repoRef,statusMessage:n.statusMessage,keySlot:n.keySlot,stats:n.tasks,tasks:r,activeAgents:i.filter(a=>h.has(a.bucket)),idleAgents:i.filter(a=>!h.has(a.bucket))}}),we=new Set(["failed","blocker","question","discussion","needs_input","review"]);function Te(e){for(const t of e?.categories??[])switch(t.category){case"failed":return"failure";case"blocker":return"blocker";case"question":return"question";case"review":return"review"}return"none"}const Qe=u.createSelector(e=>{const t=R.select(e),n=Ie.select(e),s=new Map(A.select(e).map(o=>[String(o.id),o])),i={action:[],unread:[],active:[]};for(const o of t){const c=s.get(o.workspaceId);if(!c||c.id===ne||!ue(e.hud.dockConversationAtByWorkspaceId[o.workspaceId],e.hud.dockRecencyNow))continue;const l=n[o.workspaceId],r=l?.categories??[],a=r.some(f=>we.has(f.category)),d=o.isUnread,g=r.some(f=>f.category==="running"),k=a?"action":d?"unread":"active";i[k].push({workspace:c,badgeKind:Te(l),priorityGroup:k,isUnread:d,isRunning:g,isWaiting:o.isWaiting})}return[...i.action,...i.unread,...i.active].sort((o,c)=>e.hud.dockConversationAtByWorkspaceId[String(c.workspace.id)]-e.hud.dockConversationAtByWorkspaceId[String(o.workspace.id)]||String(o.workspace.id).localeCompare(String(c.workspace.id)))}),Ve=u.createSelector(e=>e.hud.dockPlacement),Xe=u.createSelector(e=>e.hud.dockPlacementError),ze=u.createSelector(e=>e.hud.dockFocusRequest),Ye=u.createSelector(e=>e.hud.dockDragStartResult),$e=u.createSelector(e=>e.hud.dockResizeStartResult),Ze=u.createSelector(e=>({pending:e.hud.dockMachineSwitching,error:e.hud.dockMachineSwitchError}));export{Ue as A,Ie as B,We as C,ie as a,Ye as b,ze as c,Ze as d,Ve as e,Xe as f,Be as g,$e as h,de as i,Qe as j,Ke as k,Fe as l,Le as m,He as n,Ne as o,Ge as p,qe as q,Re as r,_e as s,De as t,Pe as u,xe as v,je as w,Ce as x,R as y,Ee as z};
@@ -1 +1 @@
1
- import{c as h}from"./CXzKXnDy.js";import{C as c,H as u,d as p,D as m,R as f,g as _,h as w,b as k,F as v,a as D,S as P,c as R,f as I}from"./C2rCMMRE.js";import{e as H,i as U,j as y,t as T,k as x}from"./C2rCMMRE.js";import{l as s}from"./MMvgNBCX.js";const C=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/app/immutable/workers/css.worker-08QwUeFR.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function E(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,H as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,U as fromPosition,y as fromRange,E as setupMode,T as toRange,x as toTextEdit};
1
+ import{c as h}from"./fqvfvcmd.js";import{C as c,H as u,d as p,D as m,R as f,g as _,h as w,b as k,F as v,a as D,S as P,c as R,f as I}from"./D9PvMI-Y.js";import{e as H,i as U,j as y,t as T,k as x}from"./D9PvMI-Y.js";import{l as s}from"./CUBHTDNB.js";const C=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/app/immutable/workers/css.worker-08QwUeFR.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function E(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,H as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,U as fromPosition,y as fromRange,E as setupMode,T as toRange,x as toTextEdit};
@@ -1,4 +1,4 @@
1
- import{p as $}from"./CDoCDg8h.js";import{p as C}from"./DJSDIQIJ.js";import{a as u,j as m,aE as S,r as D,ad as w,aG as P,L as T,aI as E,O as F,K as z,aF as A,M as W,y as _,k as L}from"./NmSV7YqY.js";import{g as M}from"./qwXhlljn.js";var N=_.packet,b,v=(b=class{constructor(){this.packet=[],this.setAccTitle=P,this.getAccTitle=T,this.setDiagramTitle=E,this.getDiagramTitle=F,this.getAccDescription=z,this.setAccDescription=A}getConfig(){const t=m({...N,...W().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){L(),this.packet=[]}},M(b,"PacketDB"),u(b,"PacketDB"),b),I=1e4,O=u((e,t)=>{$(e,t);let r=-1,s=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);s.length<=l+1&&t.getPacket().length<I;){const[p,o]=Y({start:a,end:i,bits:d,label:c},n,l);if(s.push(p),p.end+1===n*l&&(t.pushWord(s),s=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(s)},"populate"),Y=u((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,n=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:u(async e=>{const t=await C("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),O(t,r)},"parse")},j=u((e,t,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=S(t);f.attr("viewBox",`0 0 ${k} ${g}`),D(f,g,k,l.useMaxWidth);for(const[y,B]of p.entries())G(f,B,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),G=u((e,t,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(s+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),K={draw:j},H={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},R=u(({packet:e}={})=>{const t=m(H,e);return`
1
+ import{p as $}from"./CqwbuddS.js";import{p as C}from"./HjNzRj_q.js";import{a as u,j as m,aE as S,r as D,ad as w,aG as P,L as T,aI as E,O as F,K as z,aF as A,M as W,y as _,k as L}from"./DU5u4CoB.js";import{g as M}from"./BHwB2t2J.js";var N=_.packet,b,v=(b=class{constructor(){this.packet=[],this.setAccTitle=P,this.getAccTitle=T,this.setDiagramTitle=E,this.getDiagramTitle=F,this.getAccDescription=z,this.setAccDescription=A}getConfig(){const t=m({...N,...W().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){L(),this.packet=[]}},M(b,"PacketDB"),u(b,"PacketDB"),b),I=1e4,O=u((e,t)=>{$(e,t);let r=-1,s=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);s.length<=l+1&&t.getPacket().length<I;){const[p,o]=Y({start:a,end:i,bits:d,label:c},n,l);if(s.push(p),p.end+1===n*l&&(t.pushWord(s),s=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(s)},"populate"),Y=u((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,n=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:u(async e=>{const t=await C("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),O(t,r)},"parse")},j=u((e,t,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=S(t);f.attr("viewBox",`0 0 ${k} ${g}`),D(f,g,k,l.useMaxWidth);for(const[y,B]of p.entries())G(f,B,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),G=u((e,t,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(s+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),K={draw:j},H={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},R=u(({packet:e}={})=>{const t=m(H,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{g as Xt}from"./D8iEGEdh.js";import{g as Qt}from"./BCM6KcqI.js";import{s as Zt}from"./Cm31fs63.js";import{f as k,aZ as Jt,c8 as Mt,bC as $,aO as ke,aS as $t,bZ as e1,cx as rt,c7 as t1,c6 as s1,c9 as i1,aL as r1,aK as a1,aP as n1,a4 as u1,bB as o1,J as l1,bw as c1,aQ as st,c3 as it,a0 as h1,aw as d1,c0 as p1}from"./qwXhlljn.js";import{c as f1}from"./CgGTNk2L.js";import{aI as g1}from"./1-LmC8OR.js";import{c as b1}from"./DQh9HtzB.js";var A1="flowchart-",Pe,k1=(Pe=class{constructor(){this.vertexCounter=0,this.config=ke(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=t1,this.setAccDescription=s1,this.setDiagramTitle=i1,this.getAccTitle=r1,this.getAccDescription=a1,this.getDiagramTitle=n1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return u1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,c,g,l={},m){if(!i||i.trim().length===0)return;let p;if(m!==void 0){let u;m.includes(`
1
+ import{g as Xt}from"./B5WfnJ_I.js";import{g as Qt}from"./B8N5zbP-.js";import{s as Zt}from"./CzK2fiHA.js";import{f as k,aZ as Jt,c8 as Mt,bC as $,aO as ke,aS as $t,bZ as e1,cx as rt,c7 as t1,c6 as s1,c9 as i1,aL as r1,aK as a1,aP as n1,a4 as u1,bB as o1,J as l1,bw as c1,aQ as st,c3 as it,a0 as h1,aw as d1,c0 as p1}from"./BHwB2t2J.js";import{c as f1}from"./CEiokx4X.js";import{aI as g1}from"./D6eVIgjz.js";import{c as b1}from"./BZXl3la6.js";var A1="flowchart-",Pe,k1=(Pe=class{constructor(){this.vertexCounter=0,this.config=ke(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=t1,this.setAccDescription=s1,this.setDiagramTitle=i1,this.getAccTitle=r1,this.getAccDescription=a1,this.getDiagramTitle=n1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return u1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,c,g,l={},m){if(!i||i.trim().length===0)return;let p;if(m!==void 0){let u;m.includes(`
2
2
  `)?u=m+`
3
3
  `:u=`{
4
4
  `+m+`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/8C3-mETY.js","/app/immutable/chunks/BdRm71a6.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/D35akxD1.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/chunks/BRmWK7rc.js","/app/immutable/chunks/CNHLe0qt.js","/app/immutable/chunks/1mVnOdok.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/C90DpsQf.js","/app/immutable/chunks/B-2t8jo3.js","/app/immutable/chunks/CIGHesQj.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/C7UskoEr.js","/app/immutable/chunks/CMIvYuSx.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/C1wu5rDo.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DgqWupib.js","/app/immutable/chunks/TQt9-VB1.js","/app/immutable/chunks/cEXqcy6U.js","/app/immutable/chunks/Bg6ucgGL.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/Bw242gnT.js","/app/immutable/chunks/BfSDVDFf.js"])))=>i.map(i=>d[i]);
2
- import{bo as c,_ as p}from"./CNHLe0qt.js";import{n as w}from"./BQmmLJ-E.js";import"./B8o4lNgr.js";import"./CIGHesQj.js";import"./BRmWK7rc.js";import{bw as A}from"./B-2t8jo3.js";import"./ChTqQfQN.js";import"./CZGA0a1i.js";import{g as L,G2 as d,tf as g,th as y}from"./D35akxD1.js";import{$ as R}from"./DgqWupib.js";import{l as v}from"./BSJ1XOuD.js";const F="intent://local/note/{note-id}",S="intent://local/{workspace-id}/note/{note-id}";function f(){return c.ui_linkHandler_invalidFormat_error({shortFormat:F,longFormat:S})}class u extends Error{constructor(r){super(r),this.name="NotFoundError"}}function W(e){try{const r=new URL(e.replace("intent://","http://")),t=r.hostname,n=r.pathname.replace(/^\/+/,"").split("/").filter(l=>l.length>0),a=e.replace("intent://","").split(/[?#]/)[0].split("/").slice(1);if(!t||n.length<2)return{type:"unknown",orgId:t||"",resourceId:"",valid:!1,error:f()};let o,s,i,_,I;if(a[0]==="workspace"&&(a.length===2||a.length===3&&a[2]==="")){const l=O(a[1]);if(!l)return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:f()};o=l,s="workspace",i=l}else if(a[0]==="file")s="file",i=h(a.slice(1));else if(a.length>=3&&k(a[0])&&a[1]==="file")o=a[0],s="file",i=h(a.slice(2));else if(a.length===5&&a[1]==="agent"&&a[3]==="message"&&k(a[0])&&k(a[2])&&k(a[4])&&n.length===5&&n[1]==="agent"&&n[3]==="message")o=n[0],s="message",_=n[2],i=n[4];else if(n[0]==="note"||n[0]==="task")s=n[0],i=n[1];else if(n.length>=3&&(n[1]==="note"||n[1]==="task"))o=n[0],s=n[1],i=n[2];else return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:f()};if(!i||i.trim().length===0)return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:c.ui_linkHandler_emptyResourceId_error()};if(s==="note"||s==="task")return{type:s,orgId:t,workspaceId:o,resourceId:i,valid:!0};if(s==="file"){const l=/^#L\d+(?:-\d+|C\d+)?$/.test(r.hash)?r.hash:"",E=a.slice(o?2:1).join("/"),m=A(E+l);return i=h(m.path.split("/")),I=m.line,H(i)?{type:"file",orgId:t,workspaceId:o,resourceId:i,...I!==void 0?{line:I}:{},valid:!0}:{type:"unknown",orgId:t,workspaceId:o,resourceId:"",valid:!1,error:c.ui_linkHandler_invalidFilePath_error()}}return s==="workspace"&&o?{type:"workspace",orgId:t,workspaceId:o,resourceId:i,valid:!0}:s==="message"&&o&&_?{type:"message",orgId:t,workspaceId:o,resourceId:i,agentId:_,valid:!0}:{type:"unknown",orgId:t,workspaceId:o,resourceId:i,valid:!1,error:c.ui_linkHandler_unknownResourceType_error({type:s})}}catch(r){return{type:"unknown",orgId:"",resourceId:"",valid:!1,error:r instanceof Error?r.message:c.ui_linkHandler_parseFailed_error()}}}function h(e){return e.map(r=>decodeURIComponent(r)).join("/")}function H(e){return/^[A-Za-z]:/.test(e)?!1:e.split(/[\\/]/).every(t=>t.length>0&&t!=="."&&t!=="..")}const j=new Set([L,"new"]);function O(e){if(e===void 0||!k(e))return null;const r=decodeURIComponent(e);return j.has(r)?null:r}function k(e){let r;try{r=decodeURIComponent(e)}catch{return!1}return r.length>0&&r!=="."&&r!==".."&&!/[\\/]/.test(r)}async function T(e,r={}){if(!e.startsWith("intent://"))return!1;const t=W(e);if(!t.valid)return w.error(c.ui_linkHandler_invalidLink_title(),{description:t.error||c.ui_linkHandler_invalidLink_description()}),!0;try{switch(t.type){case"note":case"task":await N(t,r);break;case"file":await b(t,r);break;case"workspace":await C(t.resourceId);break;case"message":{const{openMessage:n}=await p(async()=>{const{openMessage:a}=await import("./8C3-mETY.js");return{openMessage:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url);await n({workspaceId:t.workspaceId,agentId:t.agentId,messageId:t.resourceId});break}default:w.error(c.ui_linkHandler_unsupportedLink_title(),{description:c.ui_linkHandler_unsupportedLink_description({type:t.type})})}}catch(n){n instanceof u?w.error(c.ui_linkHandler_notFound_title(),{description:n.message}):w.error(c.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:c.ui_linkHandler_unknownError_label()})}return!0}function Z(e,r){return R(e,r)}function B(){return async(e,r,t)=>{const a=t.target.closest("a");return a?.href?.startsWith("intent://")?(t.preventDefault(),await T(a.href)):!1}}async function C(e){const{appClient:r}=await p(async()=>{const{appClient:a}=await import("./C90DpsQf.js").then(o=>o.X);return{appClient:a}},__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,12,21,22]),import.meta.url);if(!await r.workspaces.get(e).catch(()=>null))throw new u(c.workspace_loader_notFound_title());const{openAndShowWorkspace:n}=await p(async()=>{const{openAndShowWorkspace:a}=await import("./BfSDVDFf.js").then(o=>o.s);return{openAndShowWorkspace:a}},__vite__mapDeps([29,2,3,4,5,6,7,8,9,10,11,28]),import.meta.url);await n(e)}async function N(e,r){const t=r.workspaceId??v.select(d.state)??void 0;if(e.workspaceId){const a=!t||e.workspaceId!==t;if(!await P(e.workspaceId,e.resourceId))throw new u(c.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:e.workspaceId}));if(a){const{openAndShowWorkspace:s}=await p(async()=>{const{openAndShowWorkspace:i}=await import("./BfSDVDFf.js").then(_=>_.s);return{openAndShowWorkspace:i}},__vite__mapDeps([29,2,3,4,5,6,7,8,9,10,11,28]),import.meta.url);await s(e.workspaceId,{query:{note:e.resourceId}})}else d.dispatch(y(e.workspaceId,e.resourceId,{openInAdjacentPanel:r.openInAdjacentPanel??!1,openInNewAdjacentPanel:r.openInNewAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}));return}if(!t)throw new u(c.ui_linkHandler_noSpaceOpen_error());if(!await P(t,e.resourceId))throw new u(c.ui_linkHandler_noteNotFoundCurrent_error({noteId:e.resourceId}));d.dispatch(y(t,e.resourceId,{openInAdjacentPanel:r.openInAdjacentPanel??!1,openInNewAdjacentPanel:r.openInNewAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}))}async function b(e,r){const t=r.workspaceId??v.select(d.state)??void 0;if(e.workspaceId){const n=!t||e.workspaceId!==t;if(n){const{openAndShowWorkspace:a}=await p(async()=>{const{openAndShowWorkspace:o}=await import("./BfSDVDFf.js").then(s=>s.s);return{openAndShowWorkspace:o}},__vite__mapDeps([29,2,3,4,5,6,7,8,9,10,11,28]),import.meta.url);if(!await a(e.workspaceId))return}d.dispatch(g(e.workspaceId,e.resourceId,{filePathIsLiteral:!0,...e.line!==void 0?{line:e.line}:{},openInAdjacentPanel:n?!1:r.openInAdjacentPanel??!1,sourcePanelId:n?void 0:r.sourcePanelId}));return}if(!t)throw new u(c.ui_linkHandler_noSpaceOpen_error());d.dispatch(g(t,e.resourceId,{filePathIsLiteral:!0,...e.line!==void 0?{line:e.line}:{},openInAdjacentPanel:r.openInAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}))}async function P(e,r){try{const{backendRequest:t}=await p(async()=>{const{backendRequest:o}=await import("./B-2t8jo3.js").then(s=>s.az);return{backendRequest:o}},__vite__mapDeps([14,10,3,9,15,8,16,17,18,11,19,7,20]),import.meta.url),n=await t("note.get",{workspaceId:e,noteId:r}),a=n&&typeof n=="object"&&"note"in n?n.note:n;return a!=null&&typeof a=="object"}catch{return!1}}export{u as NotFoundError,B as createIntentLinkClickHandler,Z as generateNoteLink,T as handleIntentLink,W as parseIntentLink};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BIY56SBV.js","/app/immutable/chunks/C563feV7.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/BjFoJgFv.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/chunks/Dck4Okga.js","/app/immutable/chunks/COCO5InB.js","/app/immutable/chunks/Cdhgfy6h.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/D62E6eA-.js","/app/immutable/chunks/C5Xi5eLp.js","/app/immutable/chunks/Crs9I2MT.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/oALOmsvi.js","/app/immutable/chunks/BY3Ptqbg.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dx5-Ovf5.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DUT4V6mb.js","/app/immutable/chunks/BDq7EC2K.js","/app/immutable/chunks/CaQ_vubD.js","/app/immutable/chunks/Bqoyy9yx.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/Ct7iVnk5.js","/app/immutable/chunks/Cdv2uRTZ.js"])))=>i.map(i=>d[i]);
2
+ import{bo as c,_ as p}from"./COCO5InB.js";import{n as w}from"./CJvhopKt.js";import"./B8o4lNgr.js";import"./Crs9I2MT.js";import"./Dck4Okga.js";import{bw as A}from"./C5Xi5eLp.js";import"./ChTqQfQN.js";import"./BlJs0v1V.js";import{g as L,G2 as d,tf as g,th as y}from"./BjFoJgFv.js";import{$ as R}from"./DUT4V6mb.js";import{l as v}from"./B6LKhrY2.js";const F="intent://local/note/{note-id}",S="intent://local/{workspace-id}/note/{note-id}";function f(){return c.ui_linkHandler_invalidFormat_error({shortFormat:F,longFormat:S})}class u extends Error{constructor(r){super(r),this.name="NotFoundError"}}function W(e){try{const r=new URL(e.replace("intent://","http://")),t=r.hostname,n=r.pathname.replace(/^\/+/,"").split("/").filter(l=>l.length>0),a=e.replace("intent://","").split(/[?#]/)[0].split("/").slice(1);if(!t||n.length<2)return{type:"unknown",orgId:t||"",resourceId:"",valid:!1,error:f()};let o,s,i,_,I;if(a[0]==="workspace"&&(a.length===2||a.length===3&&a[2]==="")){const l=O(a[1]);if(!l)return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:f()};o=l,s="workspace",i=l}else if(a[0]==="file")s="file",i=h(a.slice(1));else if(a.length>=3&&k(a[0])&&a[1]==="file")o=a[0],s="file",i=h(a.slice(2));else if(a.length===5&&a[1]==="agent"&&a[3]==="message"&&k(a[0])&&k(a[2])&&k(a[4])&&n.length===5&&n[1]==="agent"&&n[3]==="message")o=n[0],s="message",_=n[2],i=n[4];else if(n[0]==="note"||n[0]==="task")s=n[0],i=n[1];else if(n.length>=3&&(n[1]==="note"||n[1]==="task"))o=n[0],s=n[1],i=n[2];else return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:f()};if(!i||i.trim().length===0)return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:c.ui_linkHandler_emptyResourceId_error()};if(s==="note"||s==="task")return{type:s,orgId:t,workspaceId:o,resourceId:i,valid:!0};if(s==="file"){const l=/^#L\d+(?:-\d+|C\d+)?$/.test(r.hash)?r.hash:"",E=a.slice(o?2:1).join("/"),m=A(E+l);return i=h(m.path.split("/")),I=m.line,H(i)?{type:"file",orgId:t,workspaceId:o,resourceId:i,...I!==void 0?{line:I}:{},valid:!0}:{type:"unknown",orgId:t,workspaceId:o,resourceId:"",valid:!1,error:c.ui_linkHandler_invalidFilePath_error()}}return s==="workspace"&&o?{type:"workspace",orgId:t,workspaceId:o,resourceId:i,valid:!0}:s==="message"&&o&&_?{type:"message",orgId:t,workspaceId:o,resourceId:i,agentId:_,valid:!0}:{type:"unknown",orgId:t,workspaceId:o,resourceId:i,valid:!1,error:c.ui_linkHandler_unknownResourceType_error({type:s})}}catch(r){return{type:"unknown",orgId:"",resourceId:"",valid:!1,error:r instanceof Error?r.message:c.ui_linkHandler_parseFailed_error()}}}function h(e){return e.map(r=>decodeURIComponent(r)).join("/")}function H(e){return/^[A-Za-z]:/.test(e)?!1:e.split(/[\\/]/).every(t=>t.length>0&&t!=="."&&t!=="..")}const j=new Set([L,"new"]);function O(e){if(e===void 0||!k(e))return null;const r=decodeURIComponent(e);return j.has(r)?null:r}function k(e){let r;try{r=decodeURIComponent(e)}catch{return!1}return r.length>0&&r!=="."&&r!==".."&&!/[\\/]/.test(r)}async function T(e,r={}){if(!e.startsWith("intent://"))return!1;const t=W(e);if(!t.valid)return w.error(c.ui_linkHandler_invalidLink_title(),{description:t.error||c.ui_linkHandler_invalidLink_description()}),!0;try{switch(t.type){case"note":case"task":await N(t,r);break;case"file":await b(t,r);break;case"workspace":await C(t.resourceId);break;case"message":{const{openMessage:n}=await p(async()=>{const{openMessage:a}=await import("./BIY56SBV.js");return{openMessage:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url);await n({workspaceId:t.workspaceId,agentId:t.agentId,messageId:t.resourceId});break}default:w.error(c.ui_linkHandler_unsupportedLink_title(),{description:c.ui_linkHandler_unsupportedLink_description({type:t.type})})}}catch(n){n instanceof u?w.error(c.ui_linkHandler_notFound_title(),{description:n.message}):w.error(c.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:c.ui_linkHandler_unknownError_label()})}return!0}function Z(e,r){return R(e,r)}function B(){return async(e,r,t)=>{const a=t.target.closest("a");return a?.href?.startsWith("intent://")?(t.preventDefault(),await T(a.href)):!1}}async function C(e){const{appClient:r}=await p(async()=>{const{appClient:a}=await import("./D62E6eA-.js").then(o=>o.X);return{appClient:a}},__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,12,21,22]),import.meta.url);if(!await r.workspaces.get(e).catch(()=>null))throw new u(c.workspace_loader_notFound_title());const{openAndShowWorkspace:n}=await p(async()=>{const{openAndShowWorkspace:a}=await import("./Cdv2uRTZ.js").then(o=>o.s);return{openAndShowWorkspace:a}},__vite__mapDeps([29,2,3,4,5,6,7,8,9,10,11,28]),import.meta.url);await n(e)}async function N(e,r){const t=r.workspaceId??v.select(d.state)??void 0;if(e.workspaceId){const a=!t||e.workspaceId!==t;if(!await P(e.workspaceId,e.resourceId))throw new u(c.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:e.workspaceId}));if(a){const{openAndShowWorkspace:s}=await p(async()=>{const{openAndShowWorkspace:i}=await import("./Cdv2uRTZ.js").then(_=>_.s);return{openAndShowWorkspace:i}},__vite__mapDeps([29,2,3,4,5,6,7,8,9,10,11,28]),import.meta.url);await s(e.workspaceId,{query:{note:e.resourceId}})}else d.dispatch(y(e.workspaceId,e.resourceId,{openInAdjacentPanel:r.openInAdjacentPanel??!1,openInNewAdjacentPanel:r.openInNewAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}));return}if(!t)throw new u(c.ui_linkHandler_noSpaceOpen_error());if(!await P(t,e.resourceId))throw new u(c.ui_linkHandler_noteNotFoundCurrent_error({noteId:e.resourceId}));d.dispatch(y(t,e.resourceId,{openInAdjacentPanel:r.openInAdjacentPanel??!1,openInNewAdjacentPanel:r.openInNewAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}))}async function b(e,r){const t=r.workspaceId??v.select(d.state)??void 0;if(e.workspaceId){const n=!t||e.workspaceId!==t;if(n){const{openAndShowWorkspace:a}=await p(async()=>{const{openAndShowWorkspace:o}=await import("./Cdv2uRTZ.js").then(s=>s.s);return{openAndShowWorkspace:o}},__vite__mapDeps([29,2,3,4,5,6,7,8,9,10,11,28]),import.meta.url);if(!await a(e.workspaceId))return}d.dispatch(g(e.workspaceId,e.resourceId,{filePathIsLiteral:!0,...e.line!==void 0?{line:e.line}:{},openInAdjacentPanel:n?!1:r.openInAdjacentPanel??!1,sourcePanelId:n?void 0:r.sourcePanelId}));return}if(!t)throw new u(c.ui_linkHandler_noSpaceOpen_error());d.dispatch(g(t,e.resourceId,{filePathIsLiteral:!0,...e.line!==void 0?{line:e.line}:{},openInAdjacentPanel:r.openInAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}))}async function P(e,r){try{const{backendRequest:t}=await p(async()=>{const{backendRequest:o}=await import("./C5Xi5eLp.js").then(s=>s.az);return{backendRequest:o}},__vite__mapDeps([14,10,3,9,15,8,16,17,18,11,19,7,20]),import.meta.url),n=await t("note.get",{workspaceId:e,noteId:r}),a=n&&typeof n=="object"&&"note"in n?n.note:n;return a!=null&&typeof a=="object"}catch{return!1}}export{u as NotFoundError,B as createIntentLinkClickHandler,Z as generateNoteLink,T as handleIntentLink,W as parseIntentLink};
@@ -1,3 +1,3 @@
1
- import{p as re}from"./TVTqPTWK.js";import{aP as oe,c9 as se,c6 as de,aK as le,aL as ce,c7 as me,f as o,bC as g,aO as T,c3 as ue,ce as xe,a0 as fe,$ as ge,aN as M,ax as he,c2 as y,cA as P,T as pe}from"./qwXhlljn.js";import{p as be,i as ve}from"./Dq5ZUD1k.js";var $="position frame",N="frame positioned",S="position relation",C="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){D(),fe()},"clear");function D(){B={}}o(D,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:$,index:a,frame:i,textProps:r});let d;z(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function L(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(L,"calculateSwimlaneProps");function _(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(_,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
1
+ import{p as re}from"./BR5lR6Td.js";import{aP as oe,c9 as se,c6 as de,aK as le,aL as ce,c7 as me,f as o,bC as g,aO as T,c3 as ue,ce as xe,a0 as fe,$ as ge,aN as M,ax as he,c2 as y,cA as P,T as pe}from"./BHwB2t2J.js";import{p as be,i as ve}from"./BEmWnLiC.js";var $="position frame",N="frame positioned",S="position relation",C="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){D(),fe()},"clear");function D(){B={}}o(D,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:$,index:a,frame:i,textProps:r});let d;z(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function L(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(L,"calculateSwimlaneProps");function _(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(_,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
2
2
  `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;"),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=_(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:N,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=L(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const w=f[p],R=f[p-1];w.y=R.y+R.height+s.swimlaneGap}return h}o(Y,"evolveFramePositioned");function K(e,n){return e===0&&n.sourceFrames.length===0}o(K,"isFirstFrame");function z(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(z,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||K(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:C,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[$]:V,[S]:J},Be={[N]:Y,[C]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=T(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var Te=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+`
3
3
  `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=T(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),$e={draw:Te},Ne=o(e=>"","getStyles"),Ce=Ne,We={parser:Ee,db:F,renderer:$e,styles:Ce};export{We as diagram};
@@ -1 +1 @@
1
- import{b as R,s as W,S as N}from"./CZ3ut3WK.js";import{l as P}from"./CEer-6aX.js";import{a as f,N as t,ad as S,r as U,G as _,p as z,V as C,aV as F}from"./NmSV7YqY.js";import{c3 as H,bz as O,ae as J}from"./qwXhlljn.js";import"./D3TYCYab.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},Q=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;U(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),P(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:Q,draw:et},ct={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ct as diagram};
1
+ import{b as R,s as W,S as N}from"./Uvf94Vit.js";import{l as P}from"./DES0UXLU.js";import{a as f,N as t,ad as S,r as U,G as _,p as z,V as C,aV as F}from"./DU5u4CoB.js";import{c3 as H,bz as O,ae as J}from"./BHwB2t2J.js";import"./4LCvEsVS.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},Q=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;U(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),P(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:Q,draw:et},ct={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ct as diagram};
@@ -1 +1 @@
1
- import{b8 as ce,aR as ue,by as fe,ao as Z,_ as $,ae as A,c0 as ze,c5 as Ae,aG as ve,bI as ge,bV as M,br as We,bH as L,aD as u,bs as be,a5 as Be,bA as Me,W,bn as me,aA as b,aB as j,bo as De,ay as qe,bS as He,c9 as k,be as Ve,b$ as Xe,b_ as Ye,bO as je}from"./B8o4lNgr.js";import{t as he,bq as m,by as pe,br as ye,b as xe,a_ as ee}from"./CNHLe0qt.js";import{c as V,f as D}from"./CIGHesQj.js";import{b as te}from"./D2g8BuR1.js";import{s as Ge}from"./BRmWK7rc.js";import{H as re,E as Ue,c as Ke}from"./Bg6ucgGL.js";import"./mQEU-N_p.js";import{bK as Je}from"./B-2t8jo3.js";function ne(e,t,n=t){var a=new WeakSet;ce(e,"input",async s=>{Z&&e.type==="checkbox"&&$();var i=s?e.defaultValue:e.value;if(i=q(e)?H(i):i,n(i),A!==null&&a.add(A),await ze(),i!==(i=t())){var f=e.selectionStart,c=e.selectionEnd,l=e.value.length;if(e.value=i??"",c!==null){var d=e.value.length;f===c&&c===l&&d>l?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=f,e.selectionEnd=Math.min(c,d))}}}),(ue&&e.defaultValue!==e.value||Ae(t)==null&&e.value)&&(n(q(e)?H(e.value):e.value),A!==null&&a.add(A)),fe(()=>{Z&&e.type==="checkbox"&&$();var s=t();if(e===document.activeElement){var i=A;if(a.has(i))return}q(e)&&s===H(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function q(e){var t=e.type;return t==="number"||t==="range"}function H(e){return e===""?null:+e}function Qe(e,t,n=t){ce(e,"change",()=>{n(e.files)}),ue&&e.files&&n(e.files),fe(()=>{e.files=t()})}let N=[],R=[],I=null,B=!1,z=0;function se(e){if(e.pending){e.pending=!1,z-=1;try{e.fn()}catch(t){queueMicrotask(()=>{throw t})}}}const X=-1;let Y=null;function _e(e){e.pending&&(e.pending=!1,z-=1,!(z>0||B)&&(I!==null&&I!==X&&cancelAnimationFrame(I),I=null,Y=null,N=[],R=[]))}function G(){const e=globalThis.requestAnimationFrame;if(I!==null&&Y===e)return;Y=e,I=X;const t=e(Ze);I===X&&(I=t)}function Ze(){I=null,B=!0;try{for(;N.length>0;){const e=N;N=[];for(const t of e)se(t)}for(;R.length>0;){const e=R;R=[];for(const t of e)se(t)}}finally{B=!1}z>0?G():(N=[],R=[])}function pt(e){const t={fn:e,pending:!0};return z+=1,N.push(t),B||G(),()=>_e(t)}function yt(e){const t={fn:e,pending:!0};return z+=1,R.push(t),B||G(),()=>_e(t)}const we=Symbol("owned-popup-context"),Ie=Symbol("owned-popup-close");function xt(e){ge(we,e)}function $e(){return ve(we)}function _t(e){ge(Ie,e)}function et(){return ve(Ie)}function wt(e){const t=$e(),n=e??et();return a=>({destroy:t?.register(a,n)})}function ae(e,t,n){const a=t+n;return e<t?t-e:e>a?e-a:0}function tt(e,t,n="y"){let a=null,s=Number.POSITIVE_INFINITY;for(let i=0;i<t.length;i+=1){const f=t[i];if(!f)continue;const c=ae(e.x,f.left,f.width),l=ae(e.y,f.top,f.height),d=n==="x"?c:n==="y"?l:Math.hypot(c,l);d<s&&(a=i,s=d)}return a}function It(e,t={}){const n=t.axis??"y",a=new Map;let s=M(null),i=M(We([])),f=M(null),c=M(0),l;const d=()=>{u(f)&&L(s,tt(u(f),u(i),n),!0)},_=g=>{const o=getComputedStyle(e),v=T=>Number.parseFloat(T)||0,x=o.boxSizing==="border-box",w=Number.parseFloat(o.width)+(x?0:v(o.paddingLeft)+v(o.paddingRight)+v(o.borderLeftWidth)+v(o.borderRightWidth)),P=Number.parseFloat(o.height)+(x?0:v(o.paddingTop)+v(o.paddingBottom)+v(o.borderTopWidth)+v(o.borderBottomWidth)),p=T=>Math.abs(T-1)<.001?1:T;return{x:p(w>0&&g.width/w||1),y:p(P>0&&g.height/P||1)}},S=()=>{const g=e.getBoundingClientRect(),{x:o,y:v}=_(g),x=[];for(const[w,P]of a){const p=P.getBoundingClientRect();x[w]={top:(p.top-g.top)/v-e.clientTop+e.scrollTop,left:(p.left-g.left)/o-e.clientLeft+e.scrollLeft,width:p.width/o,height:p.height/v}}L(i,x,!0),d()},C=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>{S()});C?.observe(e);const E=()=>{L(c,u(c)+1)},O=g=>{const o=e.getBoundingClientRect(),{x:v,y:x}=_(o);L(f,{x:(g.clientX-o.left)/v-e.clientLeft+e.scrollLeft,y:(g.clientY-o.top)/x-e.clientTop+e.scrollTop},!0),l!==void 0&&cancelAnimationFrame(l),l=requestAnimationFrame(()=>{l=void 0,d()})},F=()=>{l!==void 0&&cancelAnimationFrame(l),l=void 0,L(f,null),L(s,null)};return e.addEventListener("pointerenter",E),e.addEventListener("pointermove",O),e.addEventListener("pointerleave",F),{get activeIndex(){return u(s)},get itemRects(){return u(i)},get pointerPosition(){return u(f)},get sessionId(){return u(c)},measure:S,setActiveIndex(g){L(s,g,!0)},registerItem(g,o){const v=a.get(g);v&&C?.unobserve?.(v),o?(a.set(g,o),C?.observe(o)):a.delete(g),S()},destroy(){l!==void 0&&cancelAnimationFrame(l),C?.disconnect(),e.removeEventListener("pointerenter",E),e.removeEventListener("pointermove",O),e.removeEventListener("pointerleave",F)}}}const St=(e,t)=>{let n=t;return n.hover.registerItem(n.index,e),{update(a){(a.hover!==n.hover||a.index!==n.index)&&(n.hover.registerItem(n.index,null),a.hover.registerItem(a.index,e)),n=a},destroy(){n.hover.registerItem(n.index,null)}}},Ct="p-1",Et="type-caption min-h-(--control-height-small) justify-start rounded-(--radius-row) px-2 py-1 text-left font-normal",Ot="ml-auto first-line-icon w-(--menu-icon-size)";var rt=new Set(["$$slots","$$events","$$legacy","tone","children","class"]),nt=j("<p><!></p>");function Se(e,t){if(new.target)return he({component:Se,...e});be(t,!0);let n=m(t,"tone",7,"helper"),a=m(t,"children",7),s=m(t,"class",7),i=ye(t,rt);var f={get tone(){return n()},set tone(d="helper"){n(d),b()},get children(){return a()},set children(d){a(d),b()},get class(){return s()},set class(d){s(d),b()},$set:pe,$on:(d,_)=>xe(t,d,_)},c=nt();V(c,d=>({"data-slot":"input-message","data-tone":n(),role:n()==="error"?"alert":void 0,"aria-live":n()==="helper"?"polite":void 0,class:d,...i}),[()=>D("type-caption mt-1.5 pl-0.5 motion-reduce:transition-none",n()==="error"?"text-danger":"text-muted-foreground",s())]);var l=Be(c);return Ge(l,a),Me(c),re(1,c,()=>Ue,()=>({tier:"fast",y:-2,scale:1})),re(2,c,()=>Ke,()=>({tier:"fast"})),W(e,c),me(f)}const Ce="data-[state=hover]:bg-hover",oe=`border-border bg-transparent shadow-none transition-[background-color,border-color,box-shadow,color] duration-(--spring-fast) hover:bg-hover ${Ce} read-only:text-muted-foreground disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-60 disabled:hover:bg-transparent aria-invalid:border-danger motion-reduce:transition-none`,Pt=`border-border bg-transparent shadow-none outline-none transition-[background-color,border-color,box-shadow,color] duration-(--spring-fast) hover:bg-hover focus-within:outline-none focus-within:ring-0 ${Ce} data-[disabled=true]:pointer-events-none data-[disabled=true]:bg-transparent data-[disabled=true]:opacity-60 data-[disabled=true]:hover:bg-transparent data-[invalid=true]:border-danger motion-reduce:transition-none`,ie="focus-visible:!bg-transparent focus-visible:!shadow-none focus-visible:outline-none",st="focus-visible:outline-none focus-visible:shadow-none";function le(e){return e==="compact"?"h-(--control-height-small)":"h-(--control-height-medium)"}const at="type-body h-9 w-full min-w-0 rounded-(--radius-medium) border-0 bg-transparent px-3 text-foreground placeholder:text-muted-foreground/60! shadow-none outline-none ring-0 hover:bg-transparent focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-60 aria-invalid:ring-1 aria-invalid:ring-danger";var ot=new Set(["$$slots","$$events","$$legacy","ref","id","value","type","size","files","variant","noFocusStyle","message","error","messageId","aria-describedby","aria-invalid","class","data-slot"]),de=j("<input/>"),it=j("<!> <!>",1);function lt(e,t){const n=De();if(new.target)return he({component:lt,...e});be(t,!0);const a=Je();let s=m(t,"ref",15),i=m(t,"id",7),f=m(t,"value",15),c=m(t,"type",7),l=m(t,"size",7),d=m(t,"files",15),_=m(t,"variant",7,"default"),S=m(t,"noFocusStyle",7,!1),C=m(t,"message",7),E=m(t,"error",7),O=m(t,"messageId",23,()=>`${n}-message`),F=m(t,"aria-describedby",7),g=m(t,"aria-invalid",7),o=m(t,"class",7),v=m(t,"data-slot",7,"input"),x=ye(t,ot);const w=k(()=>typeof l()=="string"?l():a),P=k(()=>typeof l()=="number"?l():void 0),p=k(()=>E()??C()),T=k(()=>[F(),u(p)?O():void 0].filter(Boolean).join(" ")||void 0),U=k(()=>E()?!0:g());function Ee(){s()?.focus()}function Oe(){s()?.blur()}function Pe(){s()?.select()}function Te(r,h,y){s()?.setSelectionRange(r,h,y)}var Le={focus:Ee,blur:Oe,select:Pe,setSelectionRange:Te,get ref(){return s()},set ref(r){s(r),b()},get id(){return i()},set id(r){i(r),b()},get value(){return f()},set value(r){f(r),b()},get type(){return c()},set type(r){c(r),b()},get size(){return l()},set size(r){l(r),b()},get files(){return d()},set files(r){d(r),b()},get variant(){return _()},set variant(r="default"){_(r),b()},get noFocusStyle(){return S()},set noFocusStyle(r=!1){S(r),b()},get message(){return C()},set message(r){C(r),b()},get error(){return E()},set error(r){E(r),b()},get messageId(){return O()},set messageId(r=`${n}-message`){O(r),b()},get"aria-describedby"(){return F()},set"aria-describedby"(r){F(r),b()},get"aria-invalid"(){return g()},set"aria-invalid"(r){g(r),b()},get class(){return o()},set class(r){o(r),b()},get"data-slot"(){return v()},set"data-slot"(r="input"){v(r),b()},$set:pe,$on:(r,h)=>xe(t,r,h)},K=it(),J=qe(K);{var Fe=r=>{var h=de();V(h,y=>({id:i(),"data-slot":v(),"data-size":u(w),class:y,type:"file",size:u(P),"aria-describedby":u(T),"aria-invalid":u(U),...x}),[()=>D("type-caption text-foreground selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground flex w-full min-w-0 rounded-(--radius-medium) border px-3 file:mr-3 file:border-0 file:bg-transparent file:font-medium file:text-foreground",oe,"focus-visible:-outline-offset-2",le(u(w)),S()&&ie,o())],void 0,void 0,void 0,!0),te(h,y=>s(y),()=>s()),Qe(h,d),ne(h,f),W(r,h)},ke=r=>{var h=de();V(h,y=>({id:i(),"data-slot":v(),"data-size":u(w),"data-variant":_()==="search"?"search":void 0,class:y,type:c(),size:u(P),"aria-describedby":u(T),"aria-invalid":u(U),autocorrect:"off",autocapitalize:"off",spellcheck:"false",...x}),[()=>_()==="search"?D("flex selection:bg-primary selection:text-primary-foreground",at,o()):D("type-caption text-foreground selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground flex w-full min-w-0 rounded-(--radius-medium) border px-3 py-1",oe,st,le(u(w)),S()&&ie,o())],void 0,void 0,void 0,!0),te(h,y=>s(y),()=>s()),ne(h,f),W(r,h)};ee(J,r=>{c()==="file"?r(Fe):r(ke,-1)})}var Ne=He(J,2);{var Re=r=>{{let h=k(()=>E()?"error":"helper");Se(r,{get id(){return O()},get tone(){return u(h)},children:(y,dt)=>{Ve();var Q=Xe();Ye(()=>je(Q,u(p))),W(y,Q)},$$slots:{default:!0}})}};ee(Ne,r=>{u(p)&&r(Re)})}return W(e,K),me(Le)}export{lt as I,Ct as O,Se as a,Ot as b,Et as c,Qe as d,ne as e,wt as f,It as g,et as h,$e as i,yt as j,_t as k,xt as l,oe as m,ie as n,Pt as o,St as p,le as q,at as r,pt as s,st as t};
1
+ import{b8 as ce,aR as ue,by as fe,ao as Z,_ as $,ae as A,c0 as ze,c5 as Ae,aG as ve,bI as ge,bV as M,br as We,bH as L,aD as u,bs as be,a5 as Be,bA as Me,W,bn as me,aA as b,aB as j,bo as De,ay as qe,bS as He,c9 as k,be as Ve,b$ as Xe,b_ as Ye,bO as je}from"./B8o4lNgr.js";import{t as he,bq as m,by as pe,br as ye,b as xe,a_ as ee}from"./COCO5InB.js";import{c as V,f as D}from"./Crs9I2MT.js";import{b as te}from"./D2g8BuR1.js";import{s as Ge}from"./Dck4Okga.js";import{H as re,E as Ue,c as Ke}from"./Bqoyy9yx.js";import"./BqRJyrRC.js";import{bK as Je}from"./C5Xi5eLp.js";function ne(e,t,n=t){var a=new WeakSet;ce(e,"input",async s=>{Z&&e.type==="checkbox"&&$();var i=s?e.defaultValue:e.value;if(i=q(e)?H(i):i,n(i),A!==null&&a.add(A),await ze(),i!==(i=t())){var f=e.selectionStart,c=e.selectionEnd,l=e.value.length;if(e.value=i??"",c!==null){var d=e.value.length;f===c&&c===l&&d>l?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=f,e.selectionEnd=Math.min(c,d))}}}),(ue&&e.defaultValue!==e.value||Ae(t)==null&&e.value)&&(n(q(e)?H(e.value):e.value),A!==null&&a.add(A)),fe(()=>{Z&&e.type==="checkbox"&&$();var s=t();if(e===document.activeElement){var i=A;if(a.has(i))return}q(e)&&s===H(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function q(e){var t=e.type;return t==="number"||t==="range"}function H(e){return e===""?null:+e}function Qe(e,t,n=t){ce(e,"change",()=>{n(e.files)}),ue&&e.files&&n(e.files),fe(()=>{e.files=t()})}let N=[],R=[],I=null,B=!1,z=0;function se(e){if(e.pending){e.pending=!1,z-=1;try{e.fn()}catch(t){queueMicrotask(()=>{throw t})}}}const X=-1;let Y=null;function _e(e){e.pending&&(e.pending=!1,z-=1,!(z>0||B)&&(I!==null&&I!==X&&cancelAnimationFrame(I),I=null,Y=null,N=[],R=[]))}function G(){const e=globalThis.requestAnimationFrame;if(I!==null&&Y===e)return;Y=e,I=X;const t=e(Ze);I===X&&(I=t)}function Ze(){I=null,B=!0;try{for(;N.length>0;){const e=N;N=[];for(const t of e)se(t)}for(;R.length>0;){const e=R;R=[];for(const t of e)se(t)}}finally{B=!1}z>0?G():(N=[],R=[])}function pt(e){const t={fn:e,pending:!0};return z+=1,N.push(t),B||G(),()=>_e(t)}function yt(e){const t={fn:e,pending:!0};return z+=1,R.push(t),B||G(),()=>_e(t)}const we=Symbol("owned-popup-context"),Ie=Symbol("owned-popup-close");function xt(e){ge(we,e)}function $e(){return ve(we)}function _t(e){ge(Ie,e)}function et(){return ve(Ie)}function wt(e){const t=$e(),n=e??et();return a=>({destroy:t?.register(a,n)})}function ae(e,t,n){const a=t+n;return e<t?t-e:e>a?e-a:0}function tt(e,t,n="y"){let a=null,s=Number.POSITIVE_INFINITY;for(let i=0;i<t.length;i+=1){const f=t[i];if(!f)continue;const c=ae(e.x,f.left,f.width),l=ae(e.y,f.top,f.height),d=n==="x"?c:n==="y"?l:Math.hypot(c,l);d<s&&(a=i,s=d)}return a}function It(e,t={}){const n=t.axis??"y",a=new Map;let s=M(null),i=M(We([])),f=M(null),c=M(0),l;const d=()=>{u(f)&&L(s,tt(u(f),u(i),n),!0)},_=g=>{const o=getComputedStyle(e),v=T=>Number.parseFloat(T)||0,x=o.boxSizing==="border-box",w=Number.parseFloat(o.width)+(x?0:v(o.paddingLeft)+v(o.paddingRight)+v(o.borderLeftWidth)+v(o.borderRightWidth)),P=Number.parseFloat(o.height)+(x?0:v(o.paddingTop)+v(o.paddingBottom)+v(o.borderTopWidth)+v(o.borderBottomWidth)),p=T=>Math.abs(T-1)<.001?1:T;return{x:p(w>0&&g.width/w||1),y:p(P>0&&g.height/P||1)}},S=()=>{const g=e.getBoundingClientRect(),{x:o,y:v}=_(g),x=[];for(const[w,P]of a){const p=P.getBoundingClientRect();x[w]={top:(p.top-g.top)/v-e.clientTop+e.scrollTop,left:(p.left-g.left)/o-e.clientLeft+e.scrollLeft,width:p.width/o,height:p.height/v}}L(i,x,!0),d()},C=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>{S()});C?.observe(e);const E=()=>{L(c,u(c)+1)},O=g=>{const o=e.getBoundingClientRect(),{x:v,y:x}=_(o);L(f,{x:(g.clientX-o.left)/v-e.clientLeft+e.scrollLeft,y:(g.clientY-o.top)/x-e.clientTop+e.scrollTop},!0),l!==void 0&&cancelAnimationFrame(l),l=requestAnimationFrame(()=>{l=void 0,d()})},F=()=>{l!==void 0&&cancelAnimationFrame(l),l=void 0,L(f,null),L(s,null)};return e.addEventListener("pointerenter",E),e.addEventListener("pointermove",O),e.addEventListener("pointerleave",F),{get activeIndex(){return u(s)},get itemRects(){return u(i)},get pointerPosition(){return u(f)},get sessionId(){return u(c)},measure:S,setActiveIndex(g){L(s,g,!0)},registerItem(g,o){const v=a.get(g);v&&C?.unobserve?.(v),o?(a.set(g,o),C?.observe(o)):a.delete(g),S()},destroy(){l!==void 0&&cancelAnimationFrame(l),C?.disconnect(),e.removeEventListener("pointerenter",E),e.removeEventListener("pointermove",O),e.removeEventListener("pointerleave",F)}}}const St=(e,t)=>{let n=t;return n.hover.registerItem(n.index,e),{update(a){(a.hover!==n.hover||a.index!==n.index)&&(n.hover.registerItem(n.index,null),a.hover.registerItem(a.index,e)),n=a},destroy(){n.hover.registerItem(n.index,null)}}},Ct="p-1",Et="type-caption min-h-(--control-height-small) justify-start rounded-(--radius-row) px-2 py-1 text-left font-normal",Ot="ml-auto first-line-icon w-(--menu-icon-size)";var rt=new Set(["$$slots","$$events","$$legacy","tone","children","class"]),nt=j("<p><!></p>");function Se(e,t){if(new.target)return he({component:Se,...e});be(t,!0);let n=m(t,"tone",7,"helper"),a=m(t,"children",7),s=m(t,"class",7),i=ye(t,rt);var f={get tone(){return n()},set tone(d="helper"){n(d),b()},get children(){return a()},set children(d){a(d),b()},get class(){return s()},set class(d){s(d),b()},$set:pe,$on:(d,_)=>xe(t,d,_)},c=nt();V(c,d=>({"data-slot":"input-message","data-tone":n(),role:n()==="error"?"alert":void 0,"aria-live":n()==="helper"?"polite":void 0,class:d,...i}),[()=>D("type-caption mt-1.5 pl-0.5 motion-reduce:transition-none",n()==="error"?"text-danger":"text-muted-foreground",s())]);var l=Be(c);return Ge(l,a),Me(c),re(1,c,()=>Ue,()=>({tier:"fast",y:-2,scale:1})),re(2,c,()=>Ke,()=>({tier:"fast"})),W(e,c),me(f)}const Ce="data-[state=hover]:bg-hover",oe=`border-border bg-transparent shadow-none transition-[background-color,border-color,box-shadow,color] duration-(--spring-fast) hover:bg-hover ${Ce} read-only:text-muted-foreground disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-60 disabled:hover:bg-transparent aria-invalid:border-danger motion-reduce:transition-none`,Pt=`border-border bg-transparent shadow-none outline-none transition-[background-color,border-color,box-shadow,color] duration-(--spring-fast) hover:bg-hover focus-within:outline-none focus-within:ring-0 ${Ce} data-[disabled=true]:pointer-events-none data-[disabled=true]:bg-transparent data-[disabled=true]:opacity-60 data-[disabled=true]:hover:bg-transparent data-[invalid=true]:border-danger motion-reduce:transition-none`,ie="focus-visible:!bg-transparent focus-visible:!shadow-none focus-visible:outline-none",st="focus-visible:outline-none focus-visible:shadow-none";function le(e){return e==="compact"?"h-(--control-height-small)":"h-(--control-height-medium)"}const at="type-body h-9 w-full min-w-0 rounded-(--radius-medium) border-0 bg-transparent px-3 text-foreground placeholder:text-muted-foreground/60! shadow-none outline-none ring-0 hover:bg-transparent focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-60 aria-invalid:ring-1 aria-invalid:ring-danger";var ot=new Set(["$$slots","$$events","$$legacy","ref","id","value","type","size","files","variant","noFocusStyle","message","error","messageId","aria-describedby","aria-invalid","class","data-slot"]),de=j("<input/>"),it=j("<!> <!>",1);function lt(e,t){const n=De();if(new.target)return he({component:lt,...e});be(t,!0);const a=Je();let s=m(t,"ref",15),i=m(t,"id",7),f=m(t,"value",15),c=m(t,"type",7),l=m(t,"size",7),d=m(t,"files",15),_=m(t,"variant",7,"default"),S=m(t,"noFocusStyle",7,!1),C=m(t,"message",7),E=m(t,"error",7),O=m(t,"messageId",23,()=>`${n}-message`),F=m(t,"aria-describedby",7),g=m(t,"aria-invalid",7),o=m(t,"class",7),v=m(t,"data-slot",7,"input"),x=ye(t,ot);const w=k(()=>typeof l()=="string"?l():a),P=k(()=>typeof l()=="number"?l():void 0),p=k(()=>E()??C()),T=k(()=>[F(),u(p)?O():void 0].filter(Boolean).join(" ")||void 0),U=k(()=>E()?!0:g());function Ee(){s()?.focus()}function Oe(){s()?.blur()}function Pe(){s()?.select()}function Te(r,h,y){s()?.setSelectionRange(r,h,y)}var Le={focus:Ee,blur:Oe,select:Pe,setSelectionRange:Te,get ref(){return s()},set ref(r){s(r),b()},get id(){return i()},set id(r){i(r),b()},get value(){return f()},set value(r){f(r),b()},get type(){return c()},set type(r){c(r),b()},get size(){return l()},set size(r){l(r),b()},get files(){return d()},set files(r){d(r),b()},get variant(){return _()},set variant(r="default"){_(r),b()},get noFocusStyle(){return S()},set noFocusStyle(r=!1){S(r),b()},get message(){return C()},set message(r){C(r),b()},get error(){return E()},set error(r){E(r),b()},get messageId(){return O()},set messageId(r=`${n}-message`){O(r),b()},get"aria-describedby"(){return F()},set"aria-describedby"(r){F(r),b()},get"aria-invalid"(){return g()},set"aria-invalid"(r){g(r),b()},get class(){return o()},set class(r){o(r),b()},get"data-slot"(){return v()},set"data-slot"(r="input"){v(r),b()},$set:pe,$on:(r,h)=>xe(t,r,h)},K=it(),J=qe(K);{var Fe=r=>{var h=de();V(h,y=>({id:i(),"data-slot":v(),"data-size":u(w),class:y,type:"file",size:u(P),"aria-describedby":u(T),"aria-invalid":u(U),...x}),[()=>D("type-caption text-foreground selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground flex w-full min-w-0 rounded-(--radius-medium) border px-3 file:mr-3 file:border-0 file:bg-transparent file:font-medium file:text-foreground",oe,"focus-visible:-outline-offset-2",le(u(w)),S()&&ie,o())],void 0,void 0,void 0,!0),te(h,y=>s(y),()=>s()),Qe(h,d),ne(h,f),W(r,h)},ke=r=>{var h=de();V(h,y=>({id:i(),"data-slot":v(),"data-size":u(w),"data-variant":_()==="search"?"search":void 0,class:y,type:c(),size:u(P),"aria-describedby":u(T),"aria-invalid":u(U),autocorrect:"off",autocapitalize:"off",spellcheck:"false",...x}),[()=>_()==="search"?D("flex selection:bg-primary selection:text-primary-foreground",at,o()):D("type-caption text-foreground selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground flex w-full min-w-0 rounded-(--radius-medium) border px-3 py-1",oe,st,le(u(w)),S()&&ie,o())],void 0,void 0,void 0,!0),te(h,y=>s(y),()=>s()),ne(h,f),W(r,h)};ee(J,r=>{c()==="file"?r(Fe):r(ke,-1)})}var Ne=He(J,2);{var Re=r=>{{let h=k(()=>E()?"error":"helper");Se(r,{get id(){return O()},get tone(){return u(h)},children:(y,dt)=>{Ve();var Q=Xe();Ye(()=>je(Q,u(p))),W(y,Q)},$$slots:{default:!0}})}};ee(Ne,r=>{u(p)&&r(Re)})}return W(e,K),me(Le)}export{lt as I,Ct as O,Se as a,Ot as b,Et as c,Qe as d,ne as e,wt as f,It as g,et as h,$e as i,yt as j,_t as k,xt as l,oe as m,ie as n,Pt as o,St as p,le as q,at as r,pt as s,st as t};
@@ -1 +1 @@
1
- import{nv as r}from"./D35akxD1.js";import{aA as o}from"./DgqWupib.js";function c(n,e){if(!e)return!0;const t=o.select(n,e);return!!t&&!r(t)}export{c};
1
+ import{nv as r}from"./BjFoJgFv.js";import{aA as o}from"./DUT4V6mb.js";function c(n,e){if(!e)return!0;const t=o.select(n,e);return!!t&&!r(t)}export{c};
@@ -1 +1 @@
1
- import{l as e}from"./MMvgNBCX.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
1
+ import{l as e}from"./CUBHTDNB.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
@@ -1 +1 @@
1
- import{bF as b,d8 as _,de as P,bz as k,aP as C}from"./DgqWupib.js";import{c as v}from"./ChTqQfQN.js";import{bo as m}from"./CNHLe0qt.js";import{G2 as y}from"./D35akxD1.js";const A={narrowWidth:600,shortHeight:500,wideWidth:900};function I(e,c,t){let i;e<A.narrowWidth?i=2:(e<A.wideWidth,i=Math.min(3,t));let o;c<A.shortHeight?o=2:o=Math.min(3,Math.ceil(t/i));const n=i*o;return{columns:i,rows:o,maxItems:n}}const h=v("PresetExecutor");async function H(e,c,t){switch(h.info("Applying content preset",{presetId:e,context:t}),e){case"planning":return W(c,t);case"agents-row":return D(c,t);case"changes":return G(c,t);case"review":return L(c,t);default:return c.applyPreset(e),!0}}async function W(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_tabTypes_agent_title(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"note",title:m.layout_shared_spec_title(),noteId:"spec",closable:!0,workspaceId:t},n[1]),!0})}async function D(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=6,r=y.state,l=b.select(r,t),p=C.select(r,t).sort((s,a)=>{const d=s.status==="active"||s.isProcessing,u=a.status==="active"||a.isProcessing;if(d&&!u)return-1;if(!d&&u)return 1;const f=s.lastActivity?new Date(s.lastActivity).getTime():s.updatedAt?new Date(s.updatedAt).getTime():0;return(a.lastActivity?new Date(a.lastActivity).getTime():a.updatedAt?new Date(a.updatedAt).getTime():0)-f});h.info("Agents row preset - agent counts",{total:l.length+p.length,foreground:l.length,background:p.length});const g=[...l,...p.slice(0,n-l.length)].slice(0,n);if(g.length===0)return h.info("No agents to display for agents-row preset"),!1;const T=I(i,o,g.length);return h.info("Agent tiling calculated",{tiling:T,agentCount:g.length}),e.batchMutations(()=>{const s=e.createGridLayout(g.length);h.info("Created grid layout for agents",{panelIds:s,panelCount:s.length,agentCount:g.length});for(let a=0;a<g.length;a++){const d=s[a];d&&e.openTab({type:"agent",title:g[a].name||m.layout_tabTypes_agent_title(),agentId:g[a].id,closable:!0,workspaceId:t},d)}return!0})}async function G(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=y.state,r=_.select(n,t),l=P.select(n,t),p=k.select(n,t),g=l.map(a=>({path:a.relativePath,type:"unstaged"})),T=r.map(a=>({path:a.relativePath,type:"staged"}));let s=[...g,...T].slice(0,6);return s.length===0&&p.length>0&&p[0].files&&(s=p[0].files.slice(0,6).map(a=>({path:a.path,type:"committed"}))),e.batchMutations(()=>{if(s.length===0){h.info("No changes to display for changes preset");const u=e.createGridLayout(1);return e.openTab({type:"changes",title:m.layout_tabTypes_changes_title(),closable:!0,workspaceId:t},u[0]),!0}const a=I(i,o,s.length);h.info("Changes tiling calculated",{tiling:a,fileCount:s.length});const d=e.createGridLayout(s.length);h.info("Created grid layout for changes",{panelIds:d,panelCount:d.length,fileCount:s.length});for(let u=0;u<s.length;u++){const f=s[u],w=f.path.split("/").pop()||f.path;e.openTab({type:"diff",title:w,diffPath:f.path,closable:!0,workspaceId:t,data:{staged:f.type==="staged"}},d[u])}return!0})}async function L(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_presetExecutor_coordinator_fallback(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"local-changes",title:m.layout_presetExecutor_allChanges_title(),closable:!0,workspaceId:t},n[1]),!0})}export{H as applyContentPreset};
1
+ import{bF as b,d8 as _,de as P,bz as k,aP as C}from"./DUT4V6mb.js";import{c as v}from"./ChTqQfQN.js";import{bo as m}from"./COCO5InB.js";import{G2 as y}from"./BjFoJgFv.js";const A={narrowWidth:600,shortHeight:500,wideWidth:900};function I(e,c,t){let i;e<A.narrowWidth?i=2:(e<A.wideWidth,i=Math.min(3,t));let o;c<A.shortHeight?o=2:o=Math.min(3,Math.ceil(t/i));const n=i*o;return{columns:i,rows:o,maxItems:n}}const h=v("PresetExecutor");async function H(e,c,t){switch(h.info("Applying content preset",{presetId:e,context:t}),e){case"planning":return W(c,t);case"agents-row":return D(c,t);case"changes":return G(c,t);case"review":return L(c,t);default:return c.applyPreset(e),!0}}async function W(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_tabTypes_agent_title(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"note",title:m.layout_shared_spec_title(),noteId:"spec",closable:!0,workspaceId:t},n[1]),!0})}async function D(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=6,r=y.state,l=b.select(r,t),p=C.select(r,t).sort((s,a)=>{const d=s.status==="active"||s.isProcessing,u=a.status==="active"||a.isProcessing;if(d&&!u)return-1;if(!d&&u)return 1;const f=s.lastActivity?new Date(s.lastActivity).getTime():s.updatedAt?new Date(s.updatedAt).getTime():0;return(a.lastActivity?new Date(a.lastActivity).getTime():a.updatedAt?new Date(a.updatedAt).getTime():0)-f});h.info("Agents row preset - agent counts",{total:l.length+p.length,foreground:l.length,background:p.length});const g=[...l,...p.slice(0,n-l.length)].slice(0,n);if(g.length===0)return h.info("No agents to display for agents-row preset"),!1;const T=I(i,o,g.length);return h.info("Agent tiling calculated",{tiling:T,agentCount:g.length}),e.batchMutations(()=>{const s=e.createGridLayout(g.length);h.info("Created grid layout for agents",{panelIds:s,panelCount:s.length,agentCount:g.length});for(let a=0;a<g.length;a++){const d=s[a];d&&e.openTab({type:"agent",title:g[a].name||m.layout_tabTypes_agent_title(),agentId:g[a].id,closable:!0,workspaceId:t},d)}return!0})}async function G(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=y.state,r=_.select(n,t),l=P.select(n,t),p=k.select(n,t),g=l.map(a=>({path:a.relativePath,type:"unstaged"})),T=r.map(a=>({path:a.relativePath,type:"staged"}));let s=[...g,...T].slice(0,6);return s.length===0&&p.length>0&&p[0].files&&(s=p[0].files.slice(0,6).map(a=>({path:a.path,type:"committed"}))),e.batchMutations(()=>{if(s.length===0){h.info("No changes to display for changes preset");const u=e.createGridLayout(1);return e.openTab({type:"changes",title:m.layout_tabTypes_changes_title(),closable:!0,workspaceId:t},u[0]),!0}const a=I(i,o,s.length);h.info("Changes tiling calculated",{tiling:a,fileCount:s.length});const d=e.createGridLayout(s.length);h.info("Created grid layout for changes",{panelIds:d,panelCount:d.length,fileCount:s.length});for(let u=0;u<s.length;u++){const f=s[u],w=f.path.split("/").pop()||f.path;e.openTab({type:"diff",title:w,diffPath:f.path,closable:!0,workspaceId:t,data:{staged:f.type==="staged"}},d[u])}return!0})}async function L(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_presetExecutor_coordinator_fallback(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"local-changes",title:m.layout_presetExecutor_allChanges_title(),closable:!0,workspaceId:t},n[1]),!0})}export{H as applyContentPreset};
@@ -1 +1 @@
1
- import{ms as P,mC as g,G2 as h,s_ as d,t3 as p,t0 as y,gx as v,ga as f,gz as m,gy as A,y0 as u,x$ as L,AM as S,Ao as F,Ar as C,y2 as z,rK as B,y$ as H,rH as O,rL as x,rM as M,gp as R,gA as _,gd as j,gc as E,HU as D,HS as U,HT as V,HC as G,mb as N,FR as $,gr as q,rI as K,HP as W,HR as X,yT as J,GC as Q,yL as Y,cX as Z,n9 as ss,nb as es,na as ts,nc as as,Br as is,hi as os,wE as rs,fP as T,hy as cs,hs,pi as ls}from"./D35akxD1.js";import{bo as ns}from"./CNHLe0qt.js";import{E as ds,e as ps,y as us,p as I,v as Is,F as b,I as bs}from"./BSJ1XOuD.js";function ws(i,s,e,t){const a=s?.activeTabId;if(!s||!a||!s.tabs.some(r=>r.id===a))return null;const o=t?P(t).map(g):i.map(r=>[r]),c=o.findIndex(r=>r.includes(s.id));if(c<0)return null;const n=o[c+(e==="next"?1:-1)]?.[0];return n?{kind:"neighbor",tabId:a,targetPanelId:n}:o.length>=4||s.tabs.length<2&&o[c].length<2?null:{kind:"edge",tabId:a,position:e==="next"?"after":"before"}}class k{constructor(s){this.workspaceId=s}get state(){return h.state}dispatch(s){h.dispatch(s)}getPanelIds(){return ds.select(this.state,this.workspaceId)}getAllTabs(){return ps.select(this.state,this.workspaceId)}getPanel(s){return us.select(this.state,this.workspaceId,s)??null}getOtherPanelId(){const s=this.getPanelIds();if(s.length<2)return null;const e=I.select(this.state,this.workspaceId);return s.find(t=>t!==e)??null}openTab(s,e){if(e){this.dispatch(d(this.workspaceId,s,e));return}this.dispatch(p(this.workspaceId,s))}openUserTab(s,e){const t=e??I.select(this.state,this.workspaceId)??void 0;if(t){this.dispatch(d(this.workspaceId,s,t,void 0,!0));return}this.dispatch(p(this.workspaceId,s,{force:!0}))}openTabInAdjacentOrSplit(s,e,t){this.dispatch(y(this.workspaceId,s,e,t))}openBrowserPanel(s,e,t,a){const o={type:"browser",title:ns.layout_tabTypes_browser_title(),browserUrl:s??"about:blank",...a===void 0?{}:{browserRequestedUrl:a},contextItemId:e,closable:!0};this.openTabInAdjacentOrSplit(o,t)}closeTab(s,e){this.dispatch(v(this.workspaceId,s,e))}closeActiveTab(s){this.dispatch(f(this.workspaceId,s))}closeTabsByType(s,e,t){this.dispatch(m(this.workspaceId,s,e,t))}closeTabsByAgentId(s){this.dispatch(A(this.workspaceId,s))}reopenClosedTab(s,e){this.dispatch(u(this.workspaceId,void 0,s,e))}reopenLastClosed(){const s=Is.select(this.state,this.workspaceId);s?.kind==="column"?this.dispatch(L(this.workspaceId)):s?.kind==="tab"&&this.dispatch(u(this.workspaceId))}setActiveTab(s,e){this.dispatch(S(this.workspaceId,s,e))}selectNextTab(s){this.dispatch(F(this.workspaceId,s))}selectPreviousTab(s){this.dispatch(C(this.workspaceId,s))}reorderTabs(s,e,t){this.dispatch(z(this.workspaceId,s,e,t))}moveTabToPanel(s,e,t,a){this.dispatch(B(this.workspaceId,s,e,t,a))}moveActivePaneToColumn(s,e){const t=ws(this.getPanelIds(),this.getPanel(s),e,b.select(this.state,this.workspaceId));return t?(t.kind==="neighbor"?this.moveTabToPanel(t.tabId,s,t.targetPanelId):this.moveTabToSplitLevel(t.tabId,s,[],t.position,"horizontal"),!0):!1}canMoveActivePaneVertically(s,e){return H(b.select(this.state,this.workspaceId),this.getPanel(s),e)!==null}moveActivePaneVertically(s,e){return this.canMoveActivePaneVertically(s,e)?(this.dispatch(O(this.workspaceId,s,e)),!0):!1}moveTabToSplit(s,e,t,a){this.dispatch(x(this.workspaceId,s,e,t,a))}moveTabToSplitLevel(s,e,t,a,o){this.dispatch(M(this.workspaceId,s,e,t,a,o))}closeOtherTabs(s,e){this.dispatch(R(this.workspaceId,s,e))}closeTabsToRight(s,e){this.dispatch(_(this.workspaceId,s,e))}closeAllTabs(s){this.dispatch(j(this.workspaceId,s))}closeAllOthersEverywhere(s,e){this.dispatch(E(this.workspaceId,s,e))}updateTabTitle(s,e){this.dispatch(D(this.workspaceId,s,e))}updateTabBrowserUrl(s,e){this.dispatch(U(this.workspaceId,s,e))}updateTabFavicon(s,e){this.dispatch(V(this.workspaceId,s,e))}updateFileTabPath(s,e){this.dispatch(G(this.workspaceId,s,e))}focusPanel(s){this.dispatch(N(this.workspaceId,s))}splitPanel(s,e,t){this.dispatch($(this.workspaceId,s,e,t))}closePanel(s){this.dispatch(q(this.workspaceId,s))}movePanel(s,e,t){this.dispatch(K(this.workspaceId,s,e,t))}updateSizes(s,e){this.dispatch(W(this.workspaceId,s,e))}updateSplitSizes(s,e){this.dispatch(X(this.workspaceId,s,e))}resizeRootDivider(s,e){this.dispatch(J(this.workspaceId,s,e))}toggleExpandPanel(s){this.dispatch(Q(this.workspaceId,s))}resetLayout(){this.dispatch(Y(this.workspaceId))}applyPreset(s){this.dispatch(Z(this.workspaceId,s))}goBack(){this.dispatch(ss(this.workspaceId))}goForward(){this.dispatch(es(this.workspaceId))}goBackInFocusHistory(){this.dispatch(ts(this.workspaceId))}goForwardInFocusHistory(){this.dispatch(as(this.workspaceId))}setDeferSpecTab(s){this.dispatch(is(this.workspaceId,s))}consumePendingFocus(s){this.dispatch(os(this.workspaceId,s))}reconcileStaleAgentTabs(s,e,t){const a=Array.isArray(s)?s:Array.from(s);this.dispatch(rs(this.workspaceId,a,e,t))}clearLayout(){this.dispatch(T(this.workspaceId))}createGridLayout(s){return this.dispatch(cs(this.workspaceId,s)),this.getPanelIds()}batchMutations(s){return s()}initializeLayout(s){const e=s??hs();this.dispatch(ls(this.workspaceId,e))}cyclePresets(){const s=bs.select(this.state,this.workspaceId),e=Object.keys(s).length;e<=1?this.applyPreset("split-horizontal"):e===2?this.applyPreset("three-column"):this.applyPreset("single")}}const l=new Map;function Ts(i){let s=l.get(i);return s||(s=new k(i),l.set(i,s)),s}function ks(i){return!0}function Ps(i){l.delete(i)}function w(i){h.dispatch(T(i))}const fs=Object.freeze(Object.defineProperty({__proto__:null,PanelLayoutAdapter:k,clearPanelLayoutAdapter:Ps,clearPanelLayoutFn:w,clearPanelLayoutForWorkspace:w,getPanelLayoutManager:Ts,hasPanelLayoutManager:ks},Symbol.toStringTag,{value:"Module"}));export{Ps as c,Ts as g,ks as h,fs as p,ws as r};
1
+ import{ms as P,mC as g,G2 as h,s_ as d,t3 as p,t0 as y,gx as v,ga as f,gz as m,gy as A,y0 as u,x$ as L,AM as S,Ao as F,Ar as C,y2 as z,rK as B,y$ as H,rH as O,rL as x,rM as M,gp as R,gA as _,gd as j,gc as E,HU as D,HS as U,HT as V,HC as G,mb as N,FR as $,gr as q,rI as K,HP as W,HR as X,yT as J,GC as Q,yL as Y,cX as Z,n9 as ss,nb as es,na as ts,nc as as,Br as is,hi as os,wE as rs,fP as T,hy as cs,hs,pi as ls}from"./BjFoJgFv.js";import{bo as ns}from"./COCO5InB.js";import{E as ds,e as ps,y as us,p as I,v as Is,F as b,I as bs}from"./B6LKhrY2.js";function ws(i,s,e,t){const a=s?.activeTabId;if(!s||!a||!s.tabs.some(r=>r.id===a))return null;const o=t?P(t).map(g):i.map(r=>[r]),c=o.findIndex(r=>r.includes(s.id));if(c<0)return null;const n=o[c+(e==="next"?1:-1)]?.[0];return n?{kind:"neighbor",tabId:a,targetPanelId:n}:o.length>=4||s.tabs.length<2&&o[c].length<2?null:{kind:"edge",tabId:a,position:e==="next"?"after":"before"}}class k{constructor(s){this.workspaceId=s}get state(){return h.state}dispatch(s){h.dispatch(s)}getPanelIds(){return ds.select(this.state,this.workspaceId)}getAllTabs(){return ps.select(this.state,this.workspaceId)}getPanel(s){return us.select(this.state,this.workspaceId,s)??null}getOtherPanelId(){const s=this.getPanelIds();if(s.length<2)return null;const e=I.select(this.state,this.workspaceId);return s.find(t=>t!==e)??null}openTab(s,e){if(e){this.dispatch(d(this.workspaceId,s,e));return}this.dispatch(p(this.workspaceId,s))}openUserTab(s,e){const t=e??I.select(this.state,this.workspaceId)??void 0;if(t){this.dispatch(d(this.workspaceId,s,t,void 0,!0));return}this.dispatch(p(this.workspaceId,s,{force:!0}))}openTabInAdjacentOrSplit(s,e,t){this.dispatch(y(this.workspaceId,s,e,t))}openBrowserPanel(s,e,t,a){const o={type:"browser",title:ns.layout_tabTypes_browser_title(),browserUrl:s??"about:blank",...a===void 0?{}:{browserRequestedUrl:a},contextItemId:e,closable:!0};this.openTabInAdjacentOrSplit(o,t)}closeTab(s,e){this.dispatch(v(this.workspaceId,s,e))}closeActiveTab(s){this.dispatch(f(this.workspaceId,s))}closeTabsByType(s,e,t){this.dispatch(m(this.workspaceId,s,e,t))}closeTabsByAgentId(s){this.dispatch(A(this.workspaceId,s))}reopenClosedTab(s,e){this.dispatch(u(this.workspaceId,void 0,s,e))}reopenLastClosed(){const s=Is.select(this.state,this.workspaceId);s?.kind==="column"?this.dispatch(L(this.workspaceId)):s?.kind==="tab"&&this.dispatch(u(this.workspaceId))}setActiveTab(s,e){this.dispatch(S(this.workspaceId,s,e))}selectNextTab(s){this.dispatch(F(this.workspaceId,s))}selectPreviousTab(s){this.dispatch(C(this.workspaceId,s))}reorderTabs(s,e,t){this.dispatch(z(this.workspaceId,s,e,t))}moveTabToPanel(s,e,t,a){this.dispatch(B(this.workspaceId,s,e,t,a))}moveActivePaneToColumn(s,e){const t=ws(this.getPanelIds(),this.getPanel(s),e,b.select(this.state,this.workspaceId));return t?(t.kind==="neighbor"?this.moveTabToPanel(t.tabId,s,t.targetPanelId):this.moveTabToSplitLevel(t.tabId,s,[],t.position,"horizontal"),!0):!1}canMoveActivePaneVertically(s,e){return H(b.select(this.state,this.workspaceId),this.getPanel(s),e)!==null}moveActivePaneVertically(s,e){return this.canMoveActivePaneVertically(s,e)?(this.dispatch(O(this.workspaceId,s,e)),!0):!1}moveTabToSplit(s,e,t,a){this.dispatch(x(this.workspaceId,s,e,t,a))}moveTabToSplitLevel(s,e,t,a,o){this.dispatch(M(this.workspaceId,s,e,t,a,o))}closeOtherTabs(s,e){this.dispatch(R(this.workspaceId,s,e))}closeTabsToRight(s,e){this.dispatch(_(this.workspaceId,s,e))}closeAllTabs(s){this.dispatch(j(this.workspaceId,s))}closeAllOthersEverywhere(s,e){this.dispatch(E(this.workspaceId,s,e))}updateTabTitle(s,e){this.dispatch(D(this.workspaceId,s,e))}updateTabBrowserUrl(s,e){this.dispatch(U(this.workspaceId,s,e))}updateTabFavicon(s,e){this.dispatch(V(this.workspaceId,s,e))}updateFileTabPath(s,e){this.dispatch(G(this.workspaceId,s,e))}focusPanel(s){this.dispatch(N(this.workspaceId,s))}splitPanel(s,e,t){this.dispatch($(this.workspaceId,s,e,t))}closePanel(s){this.dispatch(q(this.workspaceId,s))}movePanel(s,e,t){this.dispatch(K(this.workspaceId,s,e,t))}updateSizes(s,e){this.dispatch(W(this.workspaceId,s,e))}updateSplitSizes(s,e){this.dispatch(X(this.workspaceId,s,e))}resizeRootDivider(s,e){this.dispatch(J(this.workspaceId,s,e))}toggleExpandPanel(s){this.dispatch(Q(this.workspaceId,s))}resetLayout(){this.dispatch(Y(this.workspaceId))}applyPreset(s){this.dispatch(Z(this.workspaceId,s))}goBack(){this.dispatch(ss(this.workspaceId))}goForward(){this.dispatch(es(this.workspaceId))}goBackInFocusHistory(){this.dispatch(ts(this.workspaceId))}goForwardInFocusHistory(){this.dispatch(as(this.workspaceId))}setDeferSpecTab(s){this.dispatch(is(this.workspaceId,s))}consumePendingFocus(s){this.dispatch(os(this.workspaceId,s))}reconcileStaleAgentTabs(s,e,t){const a=Array.isArray(s)?s:Array.from(s);this.dispatch(rs(this.workspaceId,a,e,t))}clearLayout(){this.dispatch(T(this.workspaceId))}createGridLayout(s){return this.dispatch(cs(this.workspaceId,s)),this.getPanelIds()}batchMutations(s){return s()}initializeLayout(s){const e=s??hs();this.dispatch(ls(this.workspaceId,e))}cyclePresets(){const s=bs.select(this.state,this.workspaceId),e=Object.keys(s).length;e<=1?this.applyPreset("split-horizontal"):e===2?this.applyPreset("three-column"):this.applyPreset("single")}}const l=new Map;function Ts(i){let s=l.get(i);return s||(s=new k(i),l.set(i,s)),s}function ks(i){return!0}function Ps(i){l.delete(i)}function w(i){h.dispatch(T(i))}const fs=Object.freeze(Object.defineProperty({__proto__:null,PanelLayoutAdapter:k,clearPanelLayoutAdapter:Ps,clearPanelLayoutFn:w,clearPanelLayoutForWorkspace:w,getPanelLayoutManager:Ts,hasPanelLayoutManager:ks},Symbol.toStringTag,{value:"Module"}));export{Ps as c,Ts as g,ks as h,fs as p,ws as r};