@qwen-code/qwen-code 0.22.3 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +30 -0
  2. package/bundled/computer-use/SKILL.md +116 -180
  3. package/bundled/goal-draft/SKILL.md +5 -1
  4. package/bundled/qc-helper/docs/common-workflow.md +32 -0
  5. package/bundled/qc-helper/docs/configuration/auth.md +6 -6
  6. package/bundled/qc-helper/docs/configuration/model-providers.md +8 -2
  7. package/bundled/qc-helper/docs/configuration/settings.md +63 -58
  8. package/bundled/qc-helper/docs/extension/introduction.md +1 -1
  9. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  10. package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
  11. package/bundled/qc-helper/docs/features/auto-mode.md +34 -17
  12. package/bundled/qc-helper/docs/features/channels/dingtalk.md +4 -2
  13. package/bundled/qc-helper/docs/features/channels/dws.md +6 -2
  14. package/bundled/qc-helper/docs/features/channels/overview.md +5 -2
  15. package/bundled/qc-helper/docs/features/code-review.md +2 -2
  16. package/bundled/qc-helper/docs/features/commands.md +79 -1
  17. package/bundled/qc-helper/docs/features/computer-use.md +2 -2
  18. package/bundled/qc-helper/docs/features/goals.md +9 -3
  19. package/bundled/qc-helper/docs/features/headless.md +16 -1
  20. package/bundled/qc-helper/docs/features/hooks.md +8 -3
  21. package/bundled/qc-helper/docs/features/memory.md +1 -0
  22. package/bundled/qc-helper/docs/features/output-styles.md +38 -0
  23. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +17 -7
  24. package/bundled/qc-helper/docs/qwen-serve.md +74 -55
  25. package/bundled/review/SKILL.md +16 -7
  26. package/bundled/review/references/posting.md +3 -3
  27. package/chunks/MaxSizedBox-B3D7545A.js +111 -0
  28. package/chunks/{StandaloneSessionPicker-2FJAOLGG.js → StandaloneSessionPicker-QUMO4LLQ.js} +88 -86
  29. package/chunks/{acp-startup-profiler-GNYAL6LI.js → acp-startup-profiler-M4X5F3VK.js} +2 -2
  30. package/chunks/{acpAgent-2ZMIJAFV.js → acpAgent-2GTFCIEP.js} +2041 -444
  31. package/chunks/{agent-X5WX3L2I.js → agent-XKF5SZWU.js} +46 -46
  32. package/chunks/agent-headless-OC2IB55D.js +85 -0
  33. package/chunks/{anthropicContentGenerator-YVTB6QX7.js → anthropicContentGenerator-L76MR5OR.js} +53 -20
  34. package/chunks/{artifact-tool-XSMPHZBT.js → artifact-tool-MYCL2QCS.js} +3 -4
  35. package/chunks/{askUserQuestion-4SWJY65V.js → askUserQuestion-THQZMG44.js} +45 -7
  36. package/chunks/bridge-IHSBI2YJ.js +118 -0
  37. package/chunks/{build-INBK7IXX.js → build-63BIOYWK.js} +1 -1
  38. package/chunks/{ca-7HPYOYSZ.js → ca-BNU7YNDE.js} +3 -0
  39. package/chunks/{channel-management-service-HQ6KDS7C.js → channel-management-service-4MTCEGJB.js} +4 -4
  40. package/chunks/channel-settings-store-BVKWAI2T.js +121 -0
  41. package/chunks/{channel-worker-group-6NA6BBZV.js → channel-worker-group-47F4ISUZ.js} +7 -7
  42. package/chunks/{channel-worker-manager-NEZ2J6RK.js → channel-worker-manager-I5Y44GYR.js} +51 -10
  43. package/chunks/{channel-worker-supervisor-FKU7DIHJ.js → channel-worker-supervisor-6VCLUXFE.js} +4 -4
  44. package/chunks/{chunk-PPKZ7JOE.js → chunk-22UH7VTP.js} +1 -1
  45. package/chunks/chunk-24FVUD5P.js +49 -0
  46. package/chunks/{chunk-MZCJWS5Y.js → chunk-2M3EWQNG.js} +20 -0
  47. package/chunks/{chunk-7T52W4SW.js → chunk-32LU3APX.js} +1 -1
  48. package/chunks/{chunk-42IDLQWS.js → chunk-373DQUVA.js} +48 -13
  49. package/chunks/{chunk-MSBO7X2W.js → chunk-37JFWFCD.js} +1 -1
  50. package/chunks/{chunk-3JXM2CVW.js → chunk-3AKCBZVW.js} +3 -3
  51. package/chunks/{chunk-TVC6HQ2U.js → chunk-3JQZVCBI.js} +2 -2
  52. package/chunks/{chunk-2LNNVAUV.js → chunk-3L724BJ5.js} +246 -15
  53. package/chunks/{chunk-E7REAOTN.js → chunk-47ECGEJC.js} +4 -0
  54. package/chunks/{chunk-WNPDGUJO.js → chunk-47RYEQW5.js} +2 -3
  55. package/chunks/{chunk-TZBSGJ6C.js → chunk-4BGDFKQE.js} +7 -7
  56. package/chunks/{chunk-PZ66FRIC.js → chunk-4F7GQGXB.js} +11772 -4773
  57. package/chunks/{chunk-DMLVSW7L.js → chunk-4HVH57J3.js} +713 -9
  58. package/chunks/{chunk-CMHFCLBU.js → chunk-4LIFGNI4.js} +1 -1
  59. package/chunks/{chunk-3SZC4VP4.js → chunk-4M24B5J5.js} +88 -49
  60. package/chunks/{chunk-BOWFGCEU.js → chunk-4PSDSCW3.js} +3 -3
  61. package/chunks/chunk-4UANMABT.js +1026 -0
  62. package/chunks/{chunk-M3QRM3DE.js → chunk-54C6PIGT.js} +5 -5
  63. package/chunks/{chunk-HP5LR5HL.js → chunk-5EIOJGCR.js} +4 -4
  64. package/chunks/{chunk-64REQJJ2.js → chunk-5H5S4UY5.js} +3 -3
  65. package/chunks/chunk-5IENVM7Z.js +35 -0
  66. package/chunks/{chunk-I6LYRJPB.js → chunk-5Q5RC2WE.js} +2 -2
  67. package/chunks/{chunk-WGY3AVGM.js → chunk-5RTTI4GE.js} +79 -5
  68. package/chunks/{chunk-KID24ZFN.js → chunk-64QH2UC6.js} +13 -1
  69. package/chunks/{chunk-MF7HCQWZ.js → chunk-65HWLGA7.js} +3 -3
  70. package/chunks/{chunk-OU5APVWO.js → chunk-6A2D4QSO.js} +13 -7
  71. package/chunks/chunk-6HUXPLB5.js +110 -0
  72. package/chunks/{chunk-VQUGEVGR.js → chunk-7IKXTGZT.js} +1 -1
  73. package/chunks/{chunk-UTLCH2FK.js → chunk-7JMGTOH7.js} +437 -136
  74. package/chunks/{chunk-7LOELM2I.js → chunk-7RB56BRJ.js} +3 -3
  75. package/chunks/{chunk-NIFYWDYN.js → chunk-7TBU7PU2.js} +1 -1
  76. package/chunks/{chunk-V2NDP3I4.js → chunk-7XL4WRXM.js} +2 -2
  77. package/chunks/chunk-ADJD4LZF.js +210 -0
  78. package/chunks/{chunk-T7KMERIX.js → chunk-ADYN7P2Y.js} +2 -2
  79. package/chunks/{chunk-TPI7O7HR.js → chunk-AHYTURFB.js} +1 -1
  80. package/chunks/{chunk-LUEHOUHM.js → chunk-AI35S34R.js} +3 -3
  81. package/chunks/{chunk-CIZCL2MW.js → chunk-ALUYNJPM.js} +1486 -2172
  82. package/chunks/{chunk-ABS25QER.js → chunk-ANVG3BVV.js} +1 -1
  83. package/chunks/{chunk-6ZPDLGHN.js → chunk-AZJLY2XZ.js} +5 -5
  84. package/chunks/{chunk-A3LWD5MK.js → chunk-BA4WJC4L.js} +1 -1
  85. package/chunks/{chunk-W3JH33JE.js → chunk-BFY33IB4.js} +18 -10
  86. package/chunks/{chunk-N4X7G4J2.js → chunk-BHTYRHJF.js} +1 -1
  87. package/chunks/{chunk-TEBDFQBZ.js → chunk-BJXCYUGM.js} +11 -6
  88. package/chunks/{chunk-7VMIMAVB.js → chunk-C2VWOXHS.js} +8 -8
  89. package/chunks/{chunk-XHF7WQ6B.js → chunk-C4TIXFDZ.js} +16 -5
  90. package/chunks/chunk-CHEIIBT3.js +40 -0
  91. package/chunks/chunk-CVX63TFJ.js +348 -0
  92. package/chunks/{chunk-RXFQM6FQ.js → chunk-DMEUXLSS.js} +16 -1
  93. package/chunks/{chunk-EKSCLBBF.js → chunk-DQCKVAF5.js} +23 -5
  94. package/chunks/{chunk-734C6JGI.js → chunk-DSX7KQPM.js} +5195 -666
  95. package/chunks/{chunk-4CMJKUND.js → chunk-DTVQSSNM.js} +67 -2
  96. package/chunks/{chunk-BKWNKLZB.js → chunk-DYTW3QVG.js} +24 -9
  97. package/chunks/{chunk-C2X7KY45.js → chunk-E4JNFXNI.js} +3 -3
  98. package/chunks/{chunk-UHQFIS7N.js → chunk-EAHOJF6V.js} +28 -4
  99. package/chunks/{chunk-YLSQLSH7.js → chunk-EBDGRBZX.js} +24 -16
  100. package/chunks/{chunk-DJBQCO2E.js → chunk-EFTPIZIC.js} +412 -3
  101. package/chunks/{chunk-6DIGWMGT.js → chunk-EIJT2PQ6.js} +2 -2
  102. package/chunks/{chunk-4TT3IVGA.js → chunk-EIY7SUPZ.js} +1 -1
  103. package/chunks/{chunk-XQFT3QUF.js → chunk-ENYUKMFK.js} +1 -1
  104. package/chunks/{chunk-ZWJDJ6RU.js → chunk-EVFDRBUM.js} +157 -153
  105. package/chunks/{chunk-4VPCTGH6.js → chunk-EWRW2WQC.js} +15 -9
  106. package/chunks/{chunk-VBCPNIQD.js → chunk-F33GFWPR.js} +47 -184
  107. package/chunks/{chunk-ERFDKH32.js → chunk-F47DITLZ.js} +19 -8
  108. package/chunks/{chunk-73RM4POK.js → chunk-F7NF2IOE.js} +7 -7
  109. package/chunks/{chunk-EB6QRGHM.js → chunk-FD5SJOWT.js} +10 -7
  110. package/chunks/{chunk-SS5SDCD3.js → chunk-FRICLXCZ.js} +7 -7
  111. package/chunks/{chunk-NU7RKEZR.js → chunk-FUO5V5KI.js} +14 -7
  112. package/chunks/{chunk-G6FECKTJ.js → chunk-G5PBOQWI.js} +9 -6
  113. package/chunks/{chunk-CAJTKR6W.js → chunk-G7HBEEX7.js} +15 -9
  114. package/chunks/{chunk-4QHPPXK2.js → chunk-GB4UKWY5.js} +2 -2
  115. package/chunks/{chunk-QYMAKPY5.js → chunk-GH2S4GD5.js} +350 -12
  116. package/chunks/{chunk-LHBUKJG2.js → chunk-GXUTFQXK.js} +28 -25
  117. package/chunks/{chunk-KJO2LBUK.js → chunk-H43PSPYS.js} +5 -5
  118. package/chunks/{chunk-XSG6G3G6.js → chunk-HJBHMANB.js} +12 -14
  119. package/chunks/chunk-HRPFBHW7.js +336 -0
  120. package/chunks/{chunk-6PJOTWAN.js → chunk-HT5S5TRQ.js} +1 -1
  121. package/chunks/{chunk-HCOBAG2L.js → chunk-HWVUSYSN.js} +3 -8
  122. package/chunks/{chunk-2OUD5T67.js → chunk-I2TMJPCV.js} +213 -185
  123. package/chunks/{chunk-CLWO3B77.js → chunk-I4NRYS6A.js} +11 -11
  124. package/chunks/{chunk-V7EESTJV.js → chunk-I5N4EAS6.js} +1 -1
  125. package/chunks/{chunk-K5KXUXWC.js → chunk-IG4W5SJR.js} +3 -3
  126. package/chunks/{chunk-FROAFEFB.js → chunk-IPATA3T2.js} +3 -3
  127. package/chunks/{chunk-NKLP3DCK.js → chunk-IQAFKVXS.js} +1 -1
  128. package/chunks/{chunk-AYHQZBJ4.js → chunk-IRKQ4YYX.js} +3 -3
  129. package/chunks/{chunk-J3NNHTV6.js → chunk-J5TTWBZK.js} +6 -0
  130. package/chunks/{chunk-QFCDF5PL.js → chunk-JHN7UIDW.js} +1 -1
  131. package/chunks/{chunk-AVNATYLY.js → chunk-JJKNYRFY.js} +1 -1
  132. package/chunks/{chunk-CQH5KTKC.js → chunk-JR42V4UY.js} +1 -1
  133. package/chunks/chunk-JS73NNWF.js +30 -0
  134. package/chunks/{chunk-NV55WWD6.js → chunk-JUARRUMA.js} +802 -2011
  135. package/chunks/chunk-JX6XHPTX.js +26 -0
  136. package/chunks/{chunk-5JTIYALA.js → chunk-JZWOCUZ3.js} +1 -1
  137. package/chunks/{chunk-P2G476QN.js → chunk-KEVYJSI4.js} +13 -13
  138. package/chunks/{chunk-B466ZSHZ.js → chunk-KFN2IZYR.js} +3 -3
  139. package/chunks/{chunk-JWALNCLT.js → chunk-KGV55H53.js} +1 -1
  140. package/chunks/{chunk-23RFD54N.js → chunk-KHP66DFN.js} +1 -1
  141. package/chunks/{chunk-2SXSLSQE.js → chunk-KM3XVTMO.js} +12 -6
  142. package/chunks/{chunk-GPGU4S2N.js → chunk-KMU3ZHH4.js} +3 -3
  143. package/chunks/chunk-KOGW3YWJ.js +2054 -0
  144. package/chunks/{chunk-NMOD2FXQ.js → chunk-L26ONV2Y.js} +8 -8
  145. package/chunks/chunk-L34XSHIZ.js +28 -0
  146. package/chunks/{chunk-SEONHUS3.js → chunk-LAUEEBDL.js} +2 -0
  147. package/chunks/{chunk-3WK3QDNV.js → chunk-LB3WQQJK.js} +2 -2
  148. package/chunks/{chunk-URE3QBBB.js → chunk-LEPCWS5A.js} +3 -3
  149. package/chunks/{chunk-36GSQ3MM.js → chunk-LHBNR6EU.js} +2 -2
  150. package/chunks/{chunk-V4264FEG.js → chunk-LKODFJRD.js} +1 -1
  151. package/chunks/{chunk-PADPMMYM.js → chunk-LOBDDFYK.js} +5 -29
  152. package/chunks/{chunk-BXDAPVQU.js → chunk-LU77UT4D.js} +28 -4
  153. package/chunks/{chunk-RFIDDFAL.js → chunk-M4KFODIP.js} +1 -1
  154. package/chunks/{chunk-CFJY4DGX.js → chunk-M4LBBSVP.js} +4 -2
  155. package/chunks/{chunk-KYWTPLBJ.js → chunk-MOF6VZN2.js} +2 -2
  156. package/chunks/{chunk-DJPASAUV.js → chunk-MP6YZ4RK.js} +4829 -3638
  157. package/chunks/{chunk-T26EAKDL.js → chunk-N2TNM3QB.js} +2 -6
  158. package/chunks/{chunk-2TNL5KPM.js → chunk-N4QWUPDM.js} +7 -0
  159. package/chunks/{chunk-7S226YTK.js → chunk-NFIDVZND.js} +11 -1
  160. package/chunks/{chunk-ZEYFMJQA.js → chunk-NQ4L2CMD.js} +83 -18
  161. package/chunks/{chunk-ZZUKP7HV.js → chunk-NRL5CUZT.js} +1 -1
  162. package/chunks/{chunk-WXEA74YB.js → chunk-NSUKQ4DN.js} +9 -3
  163. package/chunks/chunk-NUHOLAQ6.js +59 -0
  164. package/chunks/{chunk-DJEZ55D4.js → chunk-NVVJTUSL.js} +336 -140
  165. package/chunks/{chunk-3XKLXHGK.js → chunk-NXKOVOM5.js} +9 -9
  166. package/chunks/{chunk-5Q372OFJ.js → chunk-O4KNCAX4.js} +57 -10
  167. package/chunks/{chunk-GOXKNSDZ.js → chunk-O5CD7T4T.js} +40 -9
  168. package/chunks/{chunk-XIQ5HQ2F.js → chunk-OBTWL6ZW.js} +1 -1
  169. package/chunks/{chunk-PDQGMSZK.js → chunk-ODZF64DM.js} +1 -1
  170. package/chunks/{chunk-5MK45KZ3.js → chunk-OHOO527W.js} +1 -1
  171. package/chunks/{chunk-36LGBEM6.js → chunk-OHU2H5CS.js} +1 -1
  172. package/chunks/{chunk-JB4JIVTJ.js → chunk-OKTNXDVO.js} +1 -1
  173. package/chunks/{chunk-CETB5XY4.js → chunk-ORFIYTI2.js} +1 -1
  174. package/chunks/{chunk-7E7UCJHS.js → chunk-OSHQMOBS.js} +18 -17
  175. package/chunks/chunk-OSSTATJF.js +1310 -0
  176. package/chunks/chunk-P6UIF2OW.js +400 -0
  177. package/chunks/{chunk-U54AYGEC.js → chunk-PB7JBAHF.js} +15 -49
  178. package/chunks/{chunk-Y5S7LBOZ.js → chunk-PCRBLMIN.js} +17 -3
  179. package/chunks/{chunk-WAOIHTJS.js → chunk-PDAKFU7M.js} +1 -1
  180. package/chunks/{chunk-YTDVNSUQ.js → chunk-QAK5475D.js} +1 -1
  181. package/chunks/{chunk-ST5MDGH3.js → chunk-QI27MKNQ.js} +27 -19
  182. package/chunks/{chunk-MK2GIB46.js → chunk-QJGYU5PG.js} +1 -1
  183. package/chunks/{chunk-SMPR7SPO.js → chunk-QJNDUTOL.js} +45 -239
  184. package/chunks/{chunk-MQM5PJML.js → chunk-QJVZLILI.js} +1 -1
  185. package/chunks/{chunk-B5PHIJGI.js → chunk-QKDNS6FU.js} +2 -2
  186. package/chunks/{chunk-ZU4UDIWX.js → chunk-QQD2GART.js} +15 -9
  187. package/chunks/{chunk-62GQFYID.js → chunk-RAFQIHN2.js} +3 -3
  188. package/chunks/{chunk-MO3FC2WT.js → chunk-RJUVTJEZ.js} +1 -1
  189. package/chunks/{chunk-M6FOJXW3.js → chunk-RKW36UWC.js} +1 -1
  190. package/chunks/{chunk-GBJBJ4HX.js → chunk-RM4WT2XB.js} +4 -26
  191. package/chunks/{chunk-VGIFXISB.js → chunk-RN3YGDCA.js} +7 -5
  192. package/chunks/{chunk-DYXFD5RO.js → chunk-S2T7H5MI.js} +1 -1
  193. package/chunks/{chunk-FTF2YIZ5.js → chunk-S6H3ELPG.js} +1 -1
  194. package/chunks/{chunk-4NDLQAY2.js → chunk-SI7WDR3U.js} +524 -16
  195. package/chunks/{chunk-2YOHKHYR.js → chunk-SRF4KTAG.js} +6 -6
  196. package/chunks/{chunk-ZZMSC3RG.js → chunk-STCVJXQB.js} +24 -24
  197. package/chunks/{chunk-ST5V3ZOC.js → chunk-SULZPKTA.js} +3 -3
  198. package/chunks/{chunk-6X7EU5TI.js → chunk-SX2QIMJV.js} +9 -7
  199. package/chunks/{chunk-V5J4J5TP.js → chunk-TJYRTS4S.js} +2 -20
  200. package/chunks/{chunk-C3PEFRKD.js → chunk-TMKTOTMQ.js} +5 -5
  201. package/chunks/{chunk-ISKH4QX3.js → chunk-TQHPVKO6.js} +4 -4
  202. package/chunks/{chunk-HVC3PNVC.js → chunk-TSZSGQ3N.js} +1 -1
  203. package/chunks/{chunk-ICURCKIU.js → chunk-U4DJ5XB3.js} +594 -91
  204. package/chunks/{chunk-TTX2JUE6.js → chunk-U6D2PPMN.js} +1 -1
  205. package/chunks/{chunk-GVIVASYK.js → chunk-UAKRDON5.js} +4 -4
  206. package/chunks/{chunk-D5LUXLUH.js → chunk-UJ4DUYIH.js} +18 -4
  207. package/chunks/{chunk-VTHREBQM.js → chunk-UKYXYWI2.js} +2 -2
  208. package/chunks/{chunk-ZYMLPEZQ.js → chunk-UM2FFKXN.js} +3 -3
  209. package/chunks/{chunk-2OBKDPZZ.js → chunk-UPFRILIL.js} +2 -2
  210. package/chunks/{chunk-2HYKTO7V.js → chunk-UUASLXHW.js} +55 -6
  211. package/chunks/chunk-V5U2NZNJ.js +29 -0
  212. package/chunks/{chunk-P5Y23G2L.js → chunk-V7RNNPGC.js} +1 -18
  213. package/chunks/{chunk-Q2MSPKIJ.js → chunk-VBWD6C27.js} +1 -1
  214. package/chunks/chunk-VGHZT6JR.js +51 -0
  215. package/chunks/{chunk-MPNBVAEU.js → chunk-VNAYZAFX.js} +4 -4
  216. package/chunks/chunk-VPSIC437.js +780 -0
  217. package/chunks/{chunk-AIAOIFY4.js → chunk-VWTSRH6C.js} +92 -17
  218. package/chunks/{chunk-4K7KNVWH.js → chunk-VYIUNFEA.js} +3 -3
  219. package/chunks/{chunk-EQSBPBZ3.js → chunk-WP4AX3XD.js} +5 -7
  220. package/chunks/{chunk-BFPESSTR.js → chunk-XEAAO654.js} +1 -1
  221. package/chunks/{chunk-RU7BK6B3.js → chunk-XLXAZLDR.js} +3 -3
  222. package/chunks/{chunk-EFWRMA2I.js → chunk-YPWZTR7F.js} +3 -3
  223. package/chunks/{chunk-XF63PKEN.js → chunk-ZDFQGHZH.js} +1 -1
  224. package/chunks/{chunk-OZ6KS6KW.js → chunk-ZGCKTAL5.js} +6 -1
  225. package/chunks/chunk-ZHO2CW6D.js +205 -0
  226. package/chunks/chunk-ZJ2LM2SI.js +198 -0
  227. package/chunks/{chunk-AYFA7MZV.js → chunk-ZKFTS3OV.js} +6 -6
  228. package/chunks/{chunk-HMJ2P3SV.js → chunk-ZL4HFSL6.js} +91 -29
  229. package/chunks/{chunk-DJECZIJX.js → chunk-ZTPGUFQV.js} +30 -8
  230. package/chunks/{chunk-7EQQR46F.js → chunk-ZVP4PWBU.js} +1 -1
  231. package/chunks/chunk-bdqvmfwv-ZTSOWAFE.js +17446 -0
  232. package/chunks/config-utils-LVSYDLHZ.js +114 -0
  233. package/chunks/contextCommand-TZD7UAJK.js +107 -0
  234. package/chunks/{core-runtime-AXB6SK5D.js → core-runtime-B4UKKIAQ.js} +63 -62
  235. package/chunks/{create-sub-session-23ITIELI.js → create-sub-session-LUPWEUHR.js} +3 -3
  236. package/chunks/{create-sub-session-4QNE64MR.js → create-sub-session-NJ24B4US.js} +94 -66
  237. package/chunks/{cron-create-KJ4IY6PP.js → cron-create-CRSPET3H.js} +4 -4
  238. package/chunks/{cron-delete-MBLQCAYY.js → cron-delete-DB77SZTU.js} +4 -4
  239. package/chunks/{cron-list-DWH2PQ47.js → cron-list-U2JNYWV6.js} +4 -4
  240. package/chunks/{daemon-3GNHB3M2.js → daemon-RKDGBFLK.js} +613 -102
  241. package/chunks/{daemon-git-worktree-guard-IVAJJWYK.js → daemon-git-worktree-guard-O2HPOBAB.js} +62 -61
  242. package/chunks/daemon-status-provider-GRRVCJFW.js +117 -0
  243. package/chunks/daemon-trust-policy-YJL442BK.js +113 -0
  244. package/chunks/{daemon-trust-policy-monitor-KGGROSIV.js → daemon-trust-policy-monitor-JL7F4Y4Q.js} +68 -67
  245. package/chunks/{de-X6HLSIFE.js → de-T4BLOKEC.js} +3 -0
  246. package/chunks/deferred-core-runtime-S32AYVZI.js +115 -0
  247. package/chunks/{devtools-JCG4K2NZ.js → devtools-VDRJYPZF.js} +1 -1
  248. package/chunks/{discovery-X2NV535U.js → discovery-TUM3ZQ6U.js} +2 -2
  249. package/chunks/{display-image-BE7I6ZB6.js → display-image-73C7XNRK.js} +5 -5
  250. package/chunks/{dist-LVZCXVPF.js → dist-62OZ7QXB.js} +44 -26
  251. package/chunks/{dist-GFN5DCBX.js → dist-EDHQIBYD.js} +152 -63
  252. package/chunks/{dist-N6W6E753.js → dist-GT64AAUR.js} +135 -26
  253. package/chunks/{dist-6BPYWHVD.js → dist-JVXT4VUJ.js} +14 -7
  254. package/chunks/{dist-4WXLCBDR.js → dist-L6URO6CK.js} +12 -5
  255. package/chunks/{dist-5VXFRTWU.js → dist-LXFYIJNG.js} +866 -172
  256. package/chunks/{dist-SWQMYP2Q.js → dist-PDGNRVPY.js} +27 -8
  257. package/chunks/{dist-NSV4NBPK.js → dist-QAF5DO3Y.js} +380 -83
  258. package/chunks/{dist-HZNT6GQS.js → dist-ZCJLKQSP.js} +28 -14
  259. package/chunks/earlyInputCapture-BBPCIVZG.js +108 -0
  260. package/chunks/{edit-LEQLAGPZ.js → edit-SUGXY63Y.js} +47 -47
  261. package/chunks/{en-YLXBXM4Z.js → en-2RATMNX7.js} +5 -0
  262. package/chunks/{enter-worktree-35QCAAFP.js → enter-worktree-B6USKSIK.js} +7 -7
  263. package/chunks/{enterPlanMode-ONQN3WHE.js → enterPlanMode-MDX4RVVL.js} +48 -48
  264. package/chunks/{environment-UANTR7A4.js → environment-VN6RXDVN.js} +63 -62
  265. package/chunks/errors-UEY36PIT.js +114 -0
  266. package/chunks/{exit-worktree-XQD6D543.js → exit-worktree-DLQ73SJH.js} +10 -8
  267. package/chunks/exitPlanMode-EPHIEDAA.js +83 -0
  268. package/chunks/{fast-path-WUL7UZ6H.js → fast-path-Y73R42LV.js} +8 -7
  269. package/chunks/{fast-path-settings-XH426LUU.js → fast-path-settings-MFUR3IWK.js} +3 -3
  270. package/chunks/{fr-FTZWF462.js → fr-BGHGYX6A.js} +3 -0
  271. package/chunks/{glob-Y54QUWDY.js → glob-DMGH7EZN.js} +47 -47
  272. package/chunks/goal-tools-3RF3PXCL.js +99 -0
  273. package/chunks/{grep-5GPICQBU.js → grep-AJVLCVXC.js} +9 -7
  274. package/chunks/handleAutoUpdate-HVWQT2AU.js +110 -0
  275. package/chunks/i18n-5OR7NTRZ.js +125 -0
  276. package/chunks/{image-gen-J6FDGUZP.js → image-gen-VOIDOHOB.js} +8 -8
  277. package/chunks/initializer-JE5RQSOE.js +114 -0
  278. package/chunks/installationInfo-KO3CCSCK.js +108 -0
  279. package/chunks/{ja-2GL5FKYJ.js → ja-G3FTD5XE.js} +3 -0
  280. package/chunks/{keychain-token-storage-37XPR34V.js → keychain-token-storage-REZVMJA6.js} +2 -2
  281. package/chunks/list-3IORSFIY.js +117 -0
  282. package/chunks/list-agents-SBMONIUK.js +128 -0
  283. package/chunks/{llm-NSAVK5V3.js → llm-K26SUDVK.js} +223 -140
  284. package/chunks/{llm-content-generator-AY2QKXHE.js → llm-content-generator-TT6EAUD4.js} +11 -12
  285. package/chunks/loadedSettingsAdapter-KLLFZF3M.js +111 -0
  286. package/chunks/{loggingContentGenerator-DSFQHXIF.js → loggingContentGenerator-EYQBA4M4.js} +66 -65
  287. package/chunks/{loop-wakeup-XJFONSQ7.js → loop-wakeup-QA6SHCZT.js} +5 -5
  288. package/chunks/{ls-3VAT2J7A.js → ls-HEJNCEYO.js} +4 -4
  289. package/chunks/{lsp-5W7IRUBH.js → lsp-WOQKNZP6.js} +2 -2
  290. package/chunks/{managed-npm-update-TSWENTK5.js → managed-npm-update-HIJTODQT.js} +61 -60
  291. package/chunks/mcp-A2UEHETW.js +111 -0
  292. package/chunks/{monitor-RW4GWJHB.js → monitor-DKNZQAB2.js} +46 -46
  293. package/chunks/{node-QKLNSZMX.js → node-UETAYMMO.js} +3 -3
  294. package/chunks/nonInteractiveCli-YA47F2F4.js +190 -0
  295. package/chunks/{notebook-edit-CQNYS5OR.js → notebook-edit-MGHTRL2D.js} +47 -47
  296. package/chunks/{open-with-auth-YN3QZHVM.js → open-with-auth-D6JD6LDS.js} +3 -3
  297. package/chunks/{openaiContentGenerator-J6QIF7EX.js → openaiContentGenerator-ZJIEQ3ZJ.js} +26 -28
  298. package/chunks/pidfile-ETHAZNMY.js +112 -0
  299. package/chunks/{processUtils-GPHNANKZ.js → processUtils-UY3SAJJZ.js} +2 -2
  300. package/chunks/prompt-terminal-ledger-GZ747VYE.js +106 -0
  301. package/chunks/{pt-XN2YWJVM.js → pt-D73IFYT7.js} +3 -0
  302. package/chunks/{qwenContentGenerator-WWDXPYQI.js → qwenContentGenerator-VI4KATRY.js} +58 -58
  303. package/chunks/{qwenOAuth2-OF5WRBQT.js → qwenOAuth2-7AOCKSOQ.js} +7 -7
  304. package/chunks/{read-file-FQUQHC6N.js → read-file-P7F4P7LV.js} +11 -13
  305. package/chunks/{read-mcp-resource-XD257PGJ.js → read-mcp-resource-GLAGB6R7.js} +2 -2
  306. package/chunks/{record-artifact-VW23GS4F.js → record-artifact-SWVR7NSU.js} +4 -4
  307. package/chunks/renderer-selection-M4UN63VJ.js +99 -0
  308. package/chunks/{report-findings-AO5VYFLR.js → report-findings-AL5YW3KI.js} +5 -5
  309. package/chunks/{request-shutdown-BCLA3JV2.js → request-shutdown-5YK4IZ54.js} +8 -7
  310. package/chunks/resumeHistoryUtils-DPZKFW24.js +119 -0
  311. package/chunks/ripGrep-C7LJKUPZ.js +37 -0
  312. package/chunks/{ru-OLTMFJEW.js → ru-QMISLKRH.js} +3 -0
  313. package/chunks/{run-qwen-serve-5X6IDZER.js → run-qwen-serve-OGTEEUR2.js} +589 -251
  314. package/chunks/{runtime-HK27GMPF.js → runtime-LNBLEMZS.js} +73 -72
  315. package/chunks/scheduled-tasks-FLDYZQOF.js +128 -0
  316. package/chunks/{scheduler-WD4MHMO5.js → scheduler-73YXGUGW.js} +62 -61
  317. package/chunks/{sdk-exporters-grpc-G5IT4XS4.js → sdk-exporters-grpc-MXTVSE3C.js} +2 -2
  318. package/chunks/{sdk-exporters-http-TTU2CHBU.js → sdk-exporters-http-3JO5TJNU.js} +4 -4
  319. package/chunks/{sdk-impl-UUMVYMAL.js → sdk-impl-HZAUUTHJ.js} +6 -6
  320. package/chunks/{send-message-AJ4OCUBV.js → send-message-JC7NJTY6.js} +166 -35
  321. package/chunks/serve-3UR2H4CV.js +119 -0
  322. package/chunks/{server-GO2N5DH7.js → server-AOYZVVOM.js} +2904 -860
  323. package/chunks/{session-IFNHTUBT.js → session-UAWFNFGI.js} +119 -114
  324. package/chunks/session-attachments-root-ZCGXQQTR.js +104 -0
  325. package/chunks/{session-pr-refresh-I3UBWMVP.js → session-pr-refresh-CT2INROL.js} +157 -88
  326. package/chunks/{settings-L6N54CU6.js → settings-BHRGDASJ.js} +67 -66
  327. package/chunks/{shell-4Y5LLW6N.js → shell-YHOGC7TO.js} +46 -46
  328. package/chunks/{skill-YOWTRAKQ.js → skill-ZGBKNCHQ.js} +131 -97
  329. package/chunks/skill-settings-AKSP665O.js +119 -0
  330. package/chunks/spawnChannel-N25MBB6F.js +112 -0
  331. package/chunks/standalone-update-XGPWJDRN.js +119 -0
  332. package/chunks/start-opentui-ui-FZ4USOU7.js +55342 -0
  333. package/chunks/{startInteractiveUI-XDFSHBZD.js → startInteractiveUI-E2WQJUOA.js} +3509 -4706
  334. package/chunks/{syntheticOutput-ML43GEFN.js → syntheticOutput-HJNZSEHN.js} +3 -3
  335. package/chunks/{task-create-QN4LYRSE.js → task-create-6RSD54S5.js} +12 -12
  336. package/chunks/{task-list-JPLGK45U.js → task-list-IQSACPOM.js} +34 -11
  337. package/chunks/{task-stop-CXEH5L2D.js → task-stop-HE2LRQNW.js} +2 -2
  338. package/chunks/{task-update-IWEOJFV2.js → task-update-XAJ2NYOA.js} +13 -14
  339. package/chunks/{team-create-OOPXCDBA.js → team-create-SOKMYSQU.js} +54 -55
  340. package/chunks/{team-delete-RZVVSGCY.js → team-delete-NGNNKGMG.js} +25 -8
  341. package/chunks/{team-plan-approval-DSX5EWAT.js → team-plan-approval-U7ZWXYAY.js} +46 -46
  342. package/chunks/terminal-image-renderer-KKM4OBLO.js +117 -0
  343. package/chunks/theme-manager-GQHF3A7T.js +103 -0
  344. package/chunks/{todoWrite-WDJNQEMW.js → todoWrite-5UTVUXHA.js} +39 -9
  345. package/chunks/{tool-search-J5Q6U7DN.js → tool-search-IAI2RVWT.js} +21 -19
  346. package/chunks/total-session-admission-G4CGCSTG.js +113 -0
  347. package/chunks/trustedFolders-D2I3FDPB.js +123 -0
  348. package/chunks/{update-relaunch-SIKHLHVR.js → update-relaunch-5RWKZAL3.js} +5 -5
  349. package/chunks/updateCheck-ZXOQDFEI.js +119 -0
  350. package/chunks/useAutoAcceptIndicator-6EK4QGAH.js +121 -0
  351. package/chunks/{validateNonInterActiveAuth-JUDQP6V4.js → validateNonInterActiveAuth-QPFEKATS.js} +113 -109
  352. package/chunks/{version-C63GDDWN.js → version-JKNG7YDH.js} +1 -1
  353. package/chunks/{web-fetch-FOQZMNSC.js → web-fetch-X3AHIIHW.js} +16 -19
  354. package/chunks/{web-search-PUJTBFUC.js → web-search-K2FMOGS5.js} +10 -11
  355. package/chunks/{web-shell-static-HNB4FDOE.js → web-shell-static-POZHGGXE.js} +5 -4
  356. package/chunks/{workflow-Y5IPINVH.js → workflow-TOLPAK5G.js} +213 -119
  357. package/chunks/workspace-providers-status-PCJK3RC7.js +115 -0
  358. package/chunks/{workspace-registration-store-SMJWI2AI.js → workspace-registration-store-KQWVVW4Y.js} +2 -1
  359. package/chunks/workspace-registry-YNIOB6HJ.js +122 -0
  360. package/chunks/workspace-runtime-coordinator-WG2RNEN7.js +123 -0
  361. package/chunks/workspace-service-G4ZNBOFH.js +127 -0
  362. package/chunks/workspace-skills-status-FMTPPMWC.js +114 -0
  363. package/chunks/{workspace-trust-reconciler-PLIDLJZX.js → workspace-trust-reconciler-IBDFQBQS.js} +76 -77
  364. package/chunks/wrapper-JH3IFHT2.js +35 -0
  365. package/chunks/write-file-YTLFY2S5.js +88 -0
  366. package/chunks/{zh-UNY63FR3.js → zh-25DF7OGK.js} +5 -0
  367. package/chunks/{zh-TW-RPTMRTHG.js → zh-TW-5EDMZVGK.js} +5 -0
  368. package/chunks/{zoom-image-LYQD7BQA.js → zoom-image-IFXSN74N.js} +11 -13
  369. package/cli.js +131 -90
  370. package/locales/ca.js +6 -0
  371. package/locales/de.js +6 -0
  372. package/locales/en.js +9 -0
  373. package/locales/fr.js +6 -0
  374. package/locales/ja.js +6 -0
  375. package/locales/pt.js +6 -0
  376. package/locales/ru.js +6 -0
  377. package/locales/zh-TW.js +9 -0
  378. package/locales/zh.js +9 -0
  379. package/package.json +3 -3
  380. package/web-shell/assets/{abnfDiagram-VCTEODGH-TRCMSA_6.js → abnfDiagram-VCTEODGH-Cxf7xE_Z.js} +1 -1
  381. package/web-shell/assets/{arc-D9Uls5b3.js → arc-ESi1eNkE.js} +1 -1
  382. package/web-shell/assets/{architectureDiagram-5GKGNRK7-Bwb8jPXg.js → architectureDiagram-5GKGNRK7-D9l7-bDo.js} +1 -1
  383. package/web-shell/assets/{blockDiagram-NRAW4CY4-DHj71TSX.js → blockDiagram-NRAW4CY4-Bc8DEasw.js} +1 -1
  384. package/web-shell/assets/{c4Diagram-UCG6FXSJ-uKBBdbyr.js → c4Diagram-UCG6FXSJ-Dimb2Hmh.js} +1 -1
  385. package/web-shell/assets/channel-B7ohGDil.js +1 -0
  386. package/web-shell/assets/{chunk-2Q5K7J3B-BZd0Phrl.js → chunk-2Q5K7J3B-jVDmOpAQ.js} +1 -1
  387. package/web-shell/assets/{chunk-5VM5RSS4-7KNeNBqN.js → chunk-5VM5RSS4-DbG_SwdB.js} +1 -1
  388. package/web-shell/assets/{chunk-F27PBJKO-BeboS7Fi.js → chunk-F27PBJKO-QEc4cY1v.js} +1 -1
  389. package/web-shell/assets/{chunk-G27WJ6UU-RV3JONoj.js → chunk-G27WJ6UU-iJ36lQ3X.js} +1 -1
  390. package/web-shell/assets/{chunk-JWPE2WC7-Yw9FCFsP.js → chunk-JWPE2WC7-DuArnVtF.js} +1 -1
  391. package/web-shell/assets/{chunk-LCL6LL3I-GIMnydDe.js → chunk-LCL6LL3I-DxOf1zwL.js} +1 -1
  392. package/web-shell/assets/{chunk-POPQ4Y6H-Cfrux7bL.js → chunk-POPQ4Y6H-lVLu9Ild.js} +1 -1
  393. package/web-shell/assets/{chunk-SVP7TREG-BlvIN0CO.js → chunk-SVP7TREG-C6XYlIer.js} +1 -1
  394. package/web-shell/assets/{chunk-XXDRQBXY-DMs7Rr4t.js → chunk-XXDRQBXY-CiG2j2Ji.js} +1 -1
  395. package/web-shell/assets/classDiagram-DTDB5LWJ-DdFpqpfD.js +1 -0
  396. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DdFpqpfD.js +1 -0
  397. package/web-shell/assets/{cose-bilkent-JH36ORCC-DNGqTNwI.js → cose-bilkent-JH36ORCC-DGVHMMVm.js} +1 -1
  398. package/web-shell/assets/{cynefin-OW5HDTMX-CojMpaoH.js → cynefin-OW5HDTMX-D6cgpCnH.js} +1 -1
  399. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DF07YXGo.js → cynefinDiagram-5FMLGOSQ-BKv4Z-UX.js} +1 -1
  400. package/web-shell/assets/{dagre-3AP2YEHR-17-4WtCH.js → dagre-3AP2YEHR-B4ABMIG-.js} +1 -1
  401. package/web-shell/assets/{diagram-S7CK7UJ4-G3Wuyz9m.js → diagram-S7CK7UJ4-DgCkp_Lm.js} +1 -1
  402. package/web-shell/assets/{diagram-UQ7AKVKN-nyWIKZ8P.js → diagram-UQ7AKVKN-FG0FNokz.js} +1 -1
  403. package/web-shell/assets/{diagram-VSXAHHWV-tKHhmYSC.js → diagram-VSXAHHWV-JgkP9qg-.js} +1 -1
  404. package/web-shell/assets/{diagram-VX7I27RA-CpDf1hYk.js → diagram-VX7I27RA-ADh2x83l.js} +1 -1
  405. package/web-shell/assets/{diagram-Z3DM3KII-Cah2IFXG.js → diagram-Z3DM3KII-yXqoYF1J.js} +1 -1
  406. package/web-shell/assets/{ebnfDiagram-PWID7BFC-DNaCkgxy.js → ebnfDiagram-PWID7BFC-Duk83Ek_.js} +1 -1
  407. package/web-shell/assets/{erDiagram-SSCWMZ5O-CAdRgcf1.js → erDiagram-SSCWMZ5O-DMdvxySG.js} +1 -1
  408. package/web-shell/assets/{flowDiagram-A5DVABFB-CMUJAShL.js → flowDiagram-A5DVABFB-DHjVgSji.js} +1 -1
  409. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-o-_MUNey.js → ganttDiagram-EL5Y4UJY-DMM9DkCE.js} +1 -1
  410. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-_aG-2Z7O.js → gitGraphDiagram-WWUBYQGX-t_ug9vO8.js} +1 -1
  411. package/web-shell/assets/index-BGZRqbRo.css +36 -0
  412. package/web-shell/assets/index-DRri_6_x.js +2067 -0
  413. package/web-shell/assets/{index-BK_NKxiJ.js → index-zqvnpGHv.js} +1 -1
  414. package/web-shell/assets/{infoDiagram-RXCK75RN-qJPeZbGP.js → infoDiagram-RXCK75RN-eT1fANNm.js} +1 -1
  415. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-7Om4vNo1.js → ishikawaDiagram-5VMMS53U-k3evzZNn.js} +1 -1
  416. package/web-shell/assets/{journeyDiagram-EYS64GPL-BNtXqmBW.js → journeyDiagram-EYS64GPL-CGim3EAi.js} +1 -1
  417. package/web-shell/assets/{kanban-definition-3QL26DDD-COgFec8P.js → kanban-definition-3QL26DDD-WHfJo-22.js} +1 -1
  418. package/web-shell/assets/{layout-B9n81PC9.js → layout-DkqIaFlJ.js} +1 -1
  419. package/web-shell/assets/{linear-Bb6nXZQq.js → linear-Bdkd3mCz.js} +1 -1
  420. package/web-shell/assets/{mermaid.core-Cgrm3JVT.js → mermaid.core-CGw0LkT_.js} +6 -6
  421. package/web-shell/assets/{mindmap-definition-FBJOCRG2-TKwLTjnG.js → mindmap-definition-FBJOCRG2-C9V4rBvo.js} +1 -1
  422. package/web-shell/assets/{pegDiagram-XKGWAZYB-BJPuvlpi.js → pegDiagram-XKGWAZYB-CwoI2T5G.js} +1 -1
  423. package/web-shell/assets/{pieDiagram-E7YTZNPT-D01VkNsW.js → pieDiagram-E7YTZNPT-DaTmBmPG.js} +1 -1
  424. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-C4hHsiv-.js → quadrantDiagram-AXDQQJYC-plh6MyGI.js} +1 -1
  425. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CuEO4xK2.js → railroadDiagram-O6MQD6OU-D_b-S0iK.js} +1 -1
  426. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-D5J_vIo5.js → requirementDiagram-EFPCY7ZU-zUzTN7VE.js} +1 -1
  427. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-DQKY223V.js → sankeyDiagram-P5KCCOFB-m6AhoD0l.js} +1 -1
  428. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-D27YV_cm.js → sequenceDiagram-WJ2MYXX4-Cwhzsine.js} +1 -1
  429. package/web-shell/assets/{sizeCapture-X5ZJPWSS-TJg8UcwV.js → sizeCapture-X5ZJPWSS-CcZuKIae.js} +1 -1
  430. package/web-shell/assets/{stateDiagram-HBIQ2CUA-CmnPzUIx.js → stateDiagram-HBIQ2CUA-CFoiJwD_.js} +1 -1
  431. package/web-shell/assets/stateDiagram-v2-4QOOHH4V--H8HdEmk.js +1 -0
  432. package/web-shell/assets/{swimlanes-XN3QIQJK-ByeP3_Nu.js → swimlanes-XN3QIQJK-CgS9hcaV.js} +1 -1
  433. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ShE9OIgf.js +8 -0
  434. package/web-shell/assets/{timeline-definition-24CTP7MA-BsFA5juR.js → timeline-definition-24CTP7MA-Dzzc05t9.js} +1 -1
  435. package/web-shell/assets/{vennDiagram-4TSXK5OY-DREP2ECo.js → vennDiagram-4TSXK5OY-DemK0f7Y.js} +1 -1
  436. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-iyd9lKi2.js → wardleyDiagram-VM6X3IG4-CquLxtMr.js} +1 -1
  437. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CVr1_j9q.js → xychartDiagram-S5SC5T6Z-BTBKTM5g.js} +1 -1
  438. package/web-shell/index.html +196 -2
  439. package/chunks/MaxSizedBox-X42SXBJH.js +0 -110
  440. package/chunks/agent-headless-IZM25LJA.js +0 -85
  441. package/chunks/bridge-ME6QXZNA.js +0 -119
  442. package/chunks/channel-settings-store-PEOI7XCG.js +0 -120
  443. package/chunks/chunk-7J6OTNGO.js +0 -424
  444. package/chunks/chunk-BWORX6FA.js +0 -135
  445. package/chunks/chunk-CPBF7KYF.js +0 -51
  446. package/chunks/chunk-H72BQNM3.js +0 -645
  447. package/chunks/chunk-JHYH6PYQ.js +0 -3096
  448. package/chunks/chunk-SS4MRMKE.js +0 -3525
  449. package/chunks/chunk-T4EFG2P5.js +0 -113
  450. package/chunks/chunk-XZA32HII.js +0 -19
  451. package/chunks/chunk-ZYNTSXWK.js +0 -32
  452. package/chunks/config-utils-R6M3TA34.js +0 -113
  453. package/chunks/contextCommand-ZCAP23J6.js +0 -106
  454. package/chunks/daemon-status-provider-K3SJ5C2U.js +0 -117
  455. package/chunks/daemon-trust-policy-DOR3YG62.js +0 -112
  456. package/chunks/deferred-core-runtime-WOYLUQQ7.js +0 -114
  457. package/chunks/earlyInputCapture-OHBEVO4K.js +0 -107
  458. package/chunks/errors-WAK6KFBC.js +0 -113
  459. package/chunks/exitPlanMode-UEYBG6P5.js +0 -83
  460. package/chunks/goal-tools-PTD3MBA7.js +0 -411
  461. package/chunks/handleAutoUpdate-FP3NWNSG.js +0 -109
  462. package/chunks/i18n-INIU5X7A.js +0 -124
  463. package/chunks/initializer-TYODV6GE.js +0 -113
  464. package/chunks/installationInfo-AAPKYDSZ.js +0 -107
  465. package/chunks/list-TUODDN6J.js +0 -116
  466. package/chunks/list-agents-DI3YFTDT.js +0 -80
  467. package/chunks/loadedSettingsAdapter-KJCLZ3C4.js +0 -110
  468. package/chunks/mcp-MWSAPFOL.js +0 -110
  469. package/chunks/nonInteractiveCli-JXKL343Q.js +0 -185
  470. package/chunks/pidfile-QOIQZFT2.js +0 -111
  471. package/chunks/prompt-terminal-ledger-FOMFTYOM.js +0 -105
  472. package/chunks/resumeHistoryUtils-NSGF3UCB.js +0 -118
  473. package/chunks/ripGrep-4CAT6SKV.js +0 -39
  474. package/chunks/scheduled-tasks-MN2ZZ5P6.js +0 -127
  475. package/chunks/serve-2XCHPPGG.js +0 -118
  476. package/chunks/skill-settings-ZL4JY5UE.js +0 -118
  477. package/chunks/spawnChannel-ZST6XJVJ.js +0 -112
  478. package/chunks/standalone-update-THVU3OKY.js +0 -118
  479. package/chunks/terminal-image-renderer-KS25G33E.js +0 -114
  480. package/chunks/theme-manager-YMZNG45F.js +0 -102
  481. package/chunks/total-session-admission-PVN64JVV.js +0 -114
  482. package/chunks/trustedFolders-FATSC4YI.js +0 -122
  483. package/chunks/updateCheck-D3YG2WCD.js +0 -118
  484. package/chunks/useAutoAcceptIndicator-ILINOSAS.js +0 -120
  485. package/chunks/workspace-providers-status-IJ4VHFMB.js +0 -114
  486. package/chunks/workspace-registry-BTGZIMPK.js +0 -123
  487. package/chunks/workspace-service-SIN67ITC.js +0 -126
  488. package/chunks/workspace-skills-status-F3RKCUIX.js +0 -113
  489. package/chunks/write-file-PAIGB33C.js +0 -88
  490. package/web-shell/assets/channel-CXjVLaBa.js +0 -1
  491. package/web-shell/assets/classDiagram-DTDB5LWJ-DANEijO3.js +0 -1
  492. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DANEijO3.js +0 -1
  493. package/web-shell/assets/index-Ci-z4zWY.js +0 -1913
  494. package/web-shell/assets/index-LDlXZRHA.css +0 -36
  495. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DNKPyrDc.js +0 -1
  496. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ZL1HPC6w.js +0 -8
  497. /package/chunks/{chunk-FOGQO4FG.js → chunk-JA5CBKRP.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{p as xt}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{s as gt,g as $t,q as bt,p as wt,a as Ct,b as vt,_ as s,l as Y,G as Dt,d as kt,r as At,D as U,A as Q,E as Tt,X as ot}from"./mermaid.core-Cgrm3JVT.js";import{p as Bt}from"./cynefin-OW5HDTMX-CojMpaoH.js";import"./index-Ci-z4zWY.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,W=e/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*17)*m*2-m;d.push({x:c+p,y:o*W})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*31+7),R=p.x+h,_=f,E=i.x-h;D+=` C${R},${_} ${E},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,W=t/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*23)*m*2-m;d.push({x:o*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*37+11),R=f,_=p.y+h,E=f,z=i.y-h;D+=` C${R},${_} ${E},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
1
+ import{p as xt}from"./chunk-JWPE2WC7-DuArnVtF.js";import{s as gt,g as $t,q as bt,p as wt,a as Ct,b as vt,_ as s,l as Y,G as Dt,d as kt,r as At,D as U,A as Q,E as Tt,X as ot}from"./mermaid.core-CGw0LkT_.js";import{p as Bt}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import"./index-DRri_6_x.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,W=e/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*17)*m*2-m;d.push({x:c+p,y:o*W})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*31+7),R=p.x+h,_=f,E=i.x-h;D+=` C${R},${_} ${E},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,W=t/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*23)*m*2-m;d.push({x:o*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*37+11),R=f,_=p.y+h,E=f,z=i.y-h;D+=` C${R},${_} ${E},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
2
2
  .cynefinDomain {
3
3
  stroke: none;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{_ as m,ao as D,c as A,a8 as Y,l as p,ap as _,aq as z,ar as b,as as H,at as J,au as T,av as R,aw as F,ax as j,ay as C,aj as P,ah as q,az as W,aA as U}from"./mermaid.core-Cgrm3JVT.js";import{l as K}from"./layout-B9n81PC9.js";import"./index-Ci-z4zWY.js";var v=m((t,e,d)=>Math.max(e,Math.min(d,t)),"clamp"),B=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),Q=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),V=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Z=m((t,e,d,g,s)=>{const h=[],L=new Set;if(d.forEach(({start:l,end:r})=>{l!==g&&L.add(l),r!==g&&L.add(r)}),L.forEach(l=>{const r=t.node(l);typeof(r==null?void 0:r.x)=="number"&&typeof(r==null?void 0:r.y)=="number"&&h.push(r)}),h.length===0&&d.forEach(({edge:l})=>{(l.points??[]).forEach(r=>{typeof(r==null?void 0:r.x)=="number"&&typeof(r==null?void 0:r.y)=="number"&&h.push(r)})}),h.length===0)return B(s);const c=h.reduce((l,r)=>({x:l.x+r.x/h.length,y:l.y+r.y/h.length}),{x:0,y:0}),i=c.x-e.x,o=c.y-e.y;return Math.abs(i)>Math.abs(o)?i>0?"right":"left":Math.abs(o)>0?o>0?"bottom":"top":B(s)},"getSelfLoopSide"),$=m((t,e="top",d=0,g=0)=>{const s=t.x,h=t.y-d,L=t.width/2,c=t.height/2,i=Math.max(36,Math.min(100,t.width*.8)),o=v(Math.max(g,t.width*.35),36,i),l=v(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const r=h+c;return[{x:s-o/2,y:r},{x:s-o/2,y:r+l},{x:s+o/2,y:r+l},{x:s+o/2,y:r}]}case"right":{const r=s+L;return[{x:r,y:h-o/2},{x:r+l,y:h-o/2},{x:r+l,y:h+o/2},{x:r,y:h+o/2}]}case"left":{const r=s-L;return[{x:r,y:h-o/2},{x:r-l,y:h-o/2},{x:r-l,y:h+o/2},{x:r,y:h+o/2}]}case"top":default:{const r=h-c;return[{x:s-o/2,y:r},{x:s-o/2,y:r-l},{x:s+o/2,y:r-l},{x:s+o/2,y:r}]}}},"getSelfLoopPoints"),ee=m((t,e,d="top",g=0,s={})=>{const L=t.x,c=t.y-g,i=s.width??0,o=s.height??0;switch(d){case"bottom":return{x:L,y:Math.max(...e.map(l=>l.y))+o/2+4};case"right":return{x:Math.max(...e.map(l=>l.x))+i/2+4,y:c};case"left":return{x:Math.min(...e.map(l=>l.x))-i/2-4,y:c};case"top":default:return{x:L,y:Math.min(...e.map(l=>l.y))-o/2-4}}},"getSelfLoopLabelPosition"),M=m((t,e=0,{mergeSelfLoops:d=!0}={})=>{var L;const g=new Map,s=[],h=(L=t.graph())==null?void 0:L.rankdir;return t.edges().forEach(c=>{const i=t.edge(c);if(d&&i.selfLoop){const o=i.selfLoop.id;g.has(o)||g.set(o,[]),g.get(o).push({edge:i,start:c.v,end:c.w})}else s.push({edge:i,start:c.v,end:c.w})}),g.forEach(c=>{if(c.length!==3){c.forEach(E=>s.push(E));return}c.sort((E,x)=>E.edge.selfLoop.order-x.edge.selfLoop.order);const[i,o,l]=c,r=i.edge.originalEdge??o.edge.originalEdge??l.edge.originalEdge??o.edge,a=t.node(r.start);if(!a){c.forEach(E=>s.push(E));return}const w={width:o.edge.width,height:o.edge.height},y=Z(t,a,c,r.start,h),f=$(a,y,e,w.width??0),n=ee(a,f,y,e,w),u={...o.edge,...r,id:r.id,points:f,start:r.start,end:r.end,x:n.x,y:n.y,width:w.width,height:w.height,labelStyle:o.edge.labelStyle,fromCluster:i.edge.fromCluster??o.edge.fromCluster??l.edge.fromCluster,toCluster:i.edge.toCluster??o.edge.toCluster??l.edge.toCluster};delete u.selfLoop,delete u.originalEdge,s.push({edge:u,start:u.start,end:u.end})}),s},"getEdgesToRender"),G=m(async({element:t,graph:e,diagramType:d,id:g,parentCluster:s,siteConfig:h})=>{const L=e.graph().rankdir;p.trace("Dir in recursive render - dir:",L);const{clusters:c,edgePaths:i,edgeLabels:o,nodes:l,rootGroups:r}=H(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const a=Q(d);await Promise.all(e.nodes().map(async function(f){const n=e.node(f);if(s!==void 0){const u=JSON.parse(JSON.stringify(s.clusterData));p.trace(`Setting data for parent cluster XXX
1
+ import{_ as m,ao as D,c as A,a8 as Y,l as p,ap as _,aq as z,ar as b,as as H,at as J,au as T,av as R,aw as F,ax as j,ay as C,aj as P,ah as q,az as W,aA as U}from"./mermaid.core-CGw0LkT_.js";import{l as K}from"./layout-DkqIaFlJ.js";import"./index-DRri_6_x.js";var v=m((t,e,d)=>Math.max(e,Math.min(d,t)),"clamp"),B=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),Q=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),V=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Z=m((t,e,d,g,s)=>{const h=[],L=new Set;if(d.forEach(({start:l,end:r})=>{l!==g&&L.add(l),r!==g&&L.add(r)}),L.forEach(l=>{const r=t.node(l);typeof(r==null?void 0:r.x)=="number"&&typeof(r==null?void 0:r.y)=="number"&&h.push(r)}),h.length===0&&d.forEach(({edge:l})=>{(l.points??[]).forEach(r=>{typeof(r==null?void 0:r.x)=="number"&&typeof(r==null?void 0:r.y)=="number"&&h.push(r)})}),h.length===0)return B(s);const c=h.reduce((l,r)=>({x:l.x+r.x/h.length,y:l.y+r.y/h.length}),{x:0,y:0}),i=c.x-e.x,o=c.y-e.y;return Math.abs(i)>Math.abs(o)?i>0?"right":"left":Math.abs(o)>0?o>0?"bottom":"top":B(s)},"getSelfLoopSide"),$=m((t,e="top",d=0,g=0)=>{const s=t.x,h=t.y-d,L=t.width/2,c=t.height/2,i=Math.max(36,Math.min(100,t.width*.8)),o=v(Math.max(g,t.width*.35),36,i),l=v(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const r=h+c;return[{x:s-o/2,y:r},{x:s-o/2,y:r+l},{x:s+o/2,y:r+l},{x:s+o/2,y:r}]}case"right":{const r=s+L;return[{x:r,y:h-o/2},{x:r+l,y:h-o/2},{x:r+l,y:h+o/2},{x:r,y:h+o/2}]}case"left":{const r=s-L;return[{x:r,y:h-o/2},{x:r-l,y:h-o/2},{x:r-l,y:h+o/2},{x:r,y:h+o/2}]}case"top":default:{const r=h-c;return[{x:s-o/2,y:r},{x:s-o/2,y:r-l},{x:s+o/2,y:r-l},{x:s+o/2,y:r}]}}},"getSelfLoopPoints"),ee=m((t,e,d="top",g=0,s={})=>{const L=t.x,c=t.y-g,i=s.width??0,o=s.height??0;switch(d){case"bottom":return{x:L,y:Math.max(...e.map(l=>l.y))+o/2+4};case"right":return{x:Math.max(...e.map(l=>l.x))+i/2+4,y:c};case"left":return{x:Math.min(...e.map(l=>l.x))-i/2-4,y:c};case"top":default:return{x:L,y:Math.min(...e.map(l=>l.y))-o/2-4}}},"getSelfLoopLabelPosition"),M=m((t,e=0,{mergeSelfLoops:d=!0}={})=>{var L;const g=new Map,s=[],h=(L=t.graph())==null?void 0:L.rankdir;return t.edges().forEach(c=>{const i=t.edge(c);if(d&&i.selfLoop){const o=i.selfLoop.id;g.has(o)||g.set(o,[]),g.get(o).push({edge:i,start:c.v,end:c.w})}else s.push({edge:i,start:c.v,end:c.w})}),g.forEach(c=>{if(c.length!==3){c.forEach(E=>s.push(E));return}c.sort((E,x)=>E.edge.selfLoop.order-x.edge.selfLoop.order);const[i,o,l]=c,r=i.edge.originalEdge??o.edge.originalEdge??l.edge.originalEdge??o.edge,a=t.node(r.start);if(!a){c.forEach(E=>s.push(E));return}const w={width:o.edge.width,height:o.edge.height},y=Z(t,a,c,r.start,h),f=$(a,y,e,w.width??0),n=ee(a,f,y,e,w),u={...o.edge,...r,id:r.id,points:f,start:r.start,end:r.end,x:n.x,y:n.y,width:w.width,height:w.height,labelStyle:o.edge.labelStyle,fromCluster:i.edge.fromCluster??o.edge.fromCluster??l.edge.fromCluster,toCluster:i.edge.toCluster??o.edge.toCluster??l.edge.toCluster};delete u.selfLoop,delete u.originalEdge,s.push({edge:u,start:u.start,end:u.end})}),s},"getEdgesToRender"),G=m(async({element:t,graph:e,diagramType:d,id:g,parentCluster:s,siteConfig:h})=>{const L=e.graph().rankdir;p.trace("Dir in recursive render - dir:",L);const{clusters:c,edgePaths:i,edgeLabels:o,nodes:l,rootGroups:r}=H(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const a=Q(d);await Promise.all(e.nodes().map(async function(f){const n=e.node(f);if(s!==void 0){const u=JSON.parse(JSON.stringify(s.clusterData));p.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,f,`
3
3
  data=`,u.height,`
4
4
  Parent cluster`,s.height),e.setNode(s.id,u),e.parent(f)||(p.trace("Setting parent",f,s.id),e.setParent(f,s.id,u))}if(p.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),n!=null&&n.clusterNode){p.info("Cluster identified XBX",f,n.width,e.node(f));const{ranksep:u,nodesep:E}=e.graph();n.graph.setGraph({...n.graph.graph(),ranksep:u+25,nodesep:E});const x=await ne({element:l,graph:n.graph,diagramType:d,id:g,parentCluster:e.node(f),siteConfig:h}),S=x.elem;J(n,S),n.diff=x.diff||0,p.info("New compound node after recursive render XAX",f,"width",n.width,"height",n.height),T(S,n)}else e.children(f).length>0?(p.trace("Cluster - the non recursive path XBX",f,n.id,n,n.width,"Graph:",e),p.trace(R(n.id,e)),b.set(n.id,{id:R(n.id,e),node:n})):(p.trace("Node - the non recursive path XAX",f,l,e.node(f),L),await F(l,e.node(f),{config:h,dir:L}))})),await m(async()=>{const f=e.edges().map(async function(n){var E,x,S,X;const u=e.edge(n.v,n.w,n.name);if(p.info("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),p.info("Edge "+n.v+" -> "+n.w+": ",n," ",JSON.stringify(e.edge(n))),p.info("Fix",b,"ids:",n.v,n.w,"Translating: ",b.get(n.v),b.get(n.w)),a&&u.selfLoop){if(u.selfLoop.order!==1)return;const N={...u.originalEdge,...u,id:u.selfLoop.id,startLabelLeft:((E=u.originalEdge)==null?void 0:E.startLabelLeft)??u.startLabelLeft,startLabelRight:((x=u.originalEdge)==null?void 0:x.startLabelRight)??u.startLabelRight,endLabelLeft:((S=u.originalEdge)==null?void 0:S.endLabelLeft)??u.endLabelLeft,endLabelRight:((X=u.originalEdge)==null?void 0:X.endLabelRight)??u.endLabelRight};await C(o,N),u.width=N.width,u.height=N.height,u.labelStyle=N.labelStyle;return}await C(o,u)});await Promise.all(f)},"processEdges")();const{subGraphTitleTotalMargin:y}=j(h);return{elem:r,graph:e,groups:{clusters:c,edgePaths:i,edgeLabels:o,nodes:l,rootGroups:r},diagramType:d,id:g,mergeSelfLoops:a,subGraphTitleTotalMargin:y}},"measureDagreGraph"),k=m(t=>{p.info("############################################# XXX"),p.info("### Layout ### XXX"),p.info("############################################# XXX"),K(t)},"runDagreGraphLayout"),te=m((t,e,d)=>{const g=t.node(e);if(!g)return;const s={...g};return g!=null&&g.clusterNode?s.y=(g.y??0)+d:t.children(e).length>0?s.height=(g.height??0)+d:s.y=(g.y??0)+d/2,s},"normalizeDagreNode"),I=m((t,e)=>{V.forEach(d=>{e[d]!==void 0&&(t[d]=e[d])})},"applyDagreNodeLayout"),re=m((t,e,d,g)=>({...t,start:t.start??e,end:t.end??d,points:(t.points??[]).map(s=>({...s,y:typeof s.y=="number"?s.y+g:s.y}))}),"normalizeDagreEdge"),ae=m((t,e)=>{const{graph:d,mergeSelfLoops:g,subGraphTitleTotalMargin:s=0}=e,h=new Map(t.nodes.map(c=>[c.id,c]));D(d).forEach(c=>{const i=te(d,c,s);if(!i)return;I(d.node(c),i);const o=h.get(c);o&&I(o,i)});const L=s/2;return t.edges=M(d,L,{mergeSelfLoops:g}).map(({edge:c,start:i,end:o})=>re(c,i,o,L)),t},"applyDagreLayoutResult"),oe=m(async({elem:t,graph:e,groups:{clusters:d,edgePaths:g},diagramType:s,id:h,mergeSelfLoops:L,subGraphTitleTotalMargin:c})=>{let i=0;await Promise.all(D(e).map(async function(r){var w;const a=e.node(r);if(p.info("Position XBX => "+r+": ("+a.x,","+a.y,") width: ",a.width," height: ",a.height),a!=null&&a.clusterNode)a.y+=c,p.info("A tainted cluster node XBX1",r,a.id,a.width,a.height,a.x,a.y,e.parent(r)),b.get(a.id).node=a,P(a);else if(e.children(r).length>0){p.info("A pure cluster node XBX1",r,a.id,a.x,a.y,a.width,a.height,e.parent(r)),a.height+=c,e.node(a.parentId);const y=(a==null?void 0:a.padding)/2||0,f=((w=a==null?void 0:a.labelBBox)==null?void 0:w.height)||0,n=f-y||0;p.debug("OffsetY",n,"labelHeight",f,"halfPadding",y),await q(d,a),b.get(a.id).node=a}else{const y=e.node(a.parentId);a.y+=c/2,p.info("A regular node XBX1 - using the padding",a.id,"parent",a.parentId,a.width,a.height,a.x,a.y,"offsetY",a.offsetY,"parent",y,y==null?void 0:y.offsetY,a),P(a)}}));const o=c/2;return M(e,o,{mergeSelfLoops:L}).forEach(function({edge:r,start:a,end:w}){p.info("Edge "+a+" -> "+w+": "+JSON.stringify(r),r),r.points.forEach(u=>u.y+=o);const y=e.node(a),f=e.node(w),n=W(g,r,b,s,y,f,h);U(r,n)}),e.nodes().forEach(function(r){const a=e.node(r);p.info(r,a.type,a.diff),a.isGroup&&(i=a.diff)}),p.warn("Returning from recursive render XAX",t,i),{elem:t,diff:i}},"paintDagreLayoutCore"),ne=m(async t=>{const e=await G(t);return k(e.graph),await oe(e)},"renderDagreSubgraph"),O=m(t=>{var d,g,s,h,L,c;const e=new Y({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:((d=t.config)==null?void 0:d.nodeSpacing)||t.nodeSpacing||((s=(g=t.config)==null?void 0:g.flowchart)==null?void 0:s.nodeSpacing),ranksep:((h=t.config)==null?void 0:h.rankSpacing)||t.rankSpacing||((c=(L=t.config)==null?void 0:L.flowchart)==null?void 0:c.rankSpacing),marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(i=>{e.setNode(i.id,{...i}),i.parentId&&e.setParent(i.id,i.parentId)}),p.debug("Edges:",t.edges),t.edges.forEach(i=>{if(i.start===i.end){const o=i.start,l=o+"---"+o+"---1",r=o+"---"+o+"---2",a=e.node(o);e.setNode(l,{domId:l,id:l,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(l,a.parentId),e.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(r,a.parentId);const w=structuredClone(i),y=structuredClone(i),f=structuredClone(i),n=structuredClone(i);y.originalEdge=w,y.selfLoop={id:w.id,order:0},f.originalEdge=w,f.selfLoop={id:w.id,order:1},n.originalEdge=w,n.selfLoop={id:w.id,order:2},y.label="",y.arrowTypeEnd="none",y.endLabelLeft="",y.endLabelRight="",y.startLabelLeft="",y.id=o+"-cyclic-special-1",f.startLabelRight="",f.startLabelLeft="",f.endLabelLeft="",f.endLabelRight="",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=o+"-cyclic-special-mid",n.label="",n.startLabelRight="",n.startLabelLeft="",n.arrowTypeStart="none",a.isGroup&&(y.fromCluster=o,n.toCluster=o),n.id=o+"-cyclic-special-2",n.arrowTypeStart="none",e.setEdge(o,l,y,o+"-cyclic-special-0"),e.setEdge(l,r,f,o+"-cyclic-special-1"),e.setEdge(r,o,n,o+"-cyclic-special-2")}else e.setEdge(i.start,i.end,{...i},i.id)}),_(e),{graph:e}},"prepareLayoutForDagre"),se=m(async(t,{element:e,preparedLayout:d})=>{const g=d??O(t),s=A(),h=await G({element:e,graph:g.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:s});return g.measuredLayout=h,h},"measureDagreLayout"),ie=m((t,e)=>{var g;const d=(g=e.preparedLayout)==null?void 0:g.measuredLayout;if(!d)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return k(d.graph),ae(t,d),d},"runDagreLayoutCore"),de=m((t,{measure:e})=>D(e.graph).map(d=>e.graph.node(d)).filter(Boolean),"getDagrePaintNodes"),le=m((t,e,{measure:d})=>t?d.graph.node(t):void 0,"getDagreEdgeNode"),he=z({prepareLayout:O,measureLayout:se,runLayoutCore:ie,paintOptions:{clusterDb:b,getNodes:de,getEdgeNode:le,skipNode:m((t,{measure:e})=>!e.graph.hasNode(t.id),"skipNode"),isCluster:m((t,{measure:e})=>e.graph.hasNode(t.id)&&(e.graph.children(t.id)??[]).length>0,"isCluster")}});export{ae as applyDagreLayoutResult,M as getEdgesToRender,se as measureDagreLayout,O as prepareLayoutForDagre,he as render,ie as runDagreLayoutCore};
@@ -1,4 +1,4 @@
1
- import{I as X}from"./chunk-2Q5K7J3B-BZd0Phrl.js";import{p as z}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as A,l as E,G as Z,d as U,A as D,r as j,i as J,ak as K,E as Q,al as ee}from"./mermaid.core-Cgrm3JVT.js";import{p as te}from"./cynefin-OW5HDTMX-CojMpaoH.js";import"./index-Ci-z4zWY.js";var L=/[─━│┃└┗├┣]/,_=/[└┗├┣]/,re=/[─━]/,T=/^[\s│┃]+$/,V=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,ne=" ";function S(r){return r.some(t=>L.test(t))}g(S,"isBoxDrawingFormat");function M(r){for(const t of r){const e=_.exec(t);if(e!=null&&e.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function R(r,t){return r.replace(/\bline\s+(\d+)\b/gi,(e,i)=>{const s=parseInt(i,10),o=t.get(s);return o?`line ${o}`:e})}g(R,"remapErrorLines");function H(r){const t=r.split(`
1
+ import{I as X}from"./chunk-2Q5K7J3B-jVDmOpAQ.js";import{p as z}from"./chunk-JWPE2WC7-DuArnVtF.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as A,l as E,G as Z,d as U,A as D,r as j,i as J,ak as K,E as Q,al as ee}from"./mermaid.core-CGw0LkT_.js";import{p as te}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import"./index-DRri_6_x.js";var L=/[─━│┃└┗├┣]/,_=/[└┗├┣]/,re=/[─━]/,T=/^[\s│┃]+$/,V=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,ne=" ";function S(r){return r.some(t=>L.test(t))}g(S,"isBoxDrawingFormat");function M(r){for(const t of r){const e=_.exec(t);if(e!=null&&e.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function R(r,t){return r.replace(/\bline\s+(\d+)\b/gi,(e,i)=>{const s=parseInt(i,10),o=t.get(s);return o?`line ${o}`:e})}g(R,"remapErrorLines");function H(r){const t=r.split(`
2
2
  `),e=new Map;let i=-1;for(const[d,l]of t.entries())if(l.trim()==="treeView-beta"){i=d;break}if(i===-1)return{text:r,lineMap:e};const s=[];for(let d=i+1;d<t.length;d++){const l=t[d];l.trim()===""||$.test(l)||V.test(l)||T.test(l)||s.push(l.replace(/\t/g," "))}if(!S(s))return{text:r,lineMap:e};const o=M(s),n=[];let c=0;for(let d=0;d<=i;d++)n.push(t[d]),c++,e.set(c,d+1);for(let d=i+1;d<t.length;d++){const l=t[d],u=l.trim(),a=d+1;if(u===""){n.push(l),c++,e.set(c,a);continue}if($.test(l)){n.push(l),c++,e.set(c,a);continue}if(V.test(l)){n.push(l),c++,e.set(c,a);continue}if(T.test(l))continue;const p=l.replace(/\t/g," "),h=_.exec(p);if((h==null?void 0:h.index)!==void 0){const m=h.index,w=Math.round(m/o)+1;let f=m+1;for(;f<p.length&&re.test(p[f]);)f++;for(;f<p.length&&p[f]===" ";)f++;const v=p.slice(f).trimEnd();if(!v)throw new Error(`Line ${a}: Empty node — expected a filename or directory name after the box-drawing prefix`);const b=ne.repeat(w);n.push(b+v),c++,e.set(c,a)}else{if(/^[\s─━│┃└┗├┣]+$/.test(p))continue;if(L.test(p))n.push(l),c++,e.set(c,a);else{if(/^\s+/.test(p))throw new Error(`Line ${a}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);n.push(l),c++,e.set(c,a)}}}return{text:n.join(`
3
3
  `),lineMap:e}}g(H,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),j()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>A(ae,D().treeView),"getConfig"),le=g((r,t,e,i,s,o)=>{for(;r<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const n={id:x.records.cnt++,level:r,name:t,nodeType:e,icon:s,cssClass:i,description:o,children:[]};x.records.stack[x.records.stack.length-1].children.push(n),x.records.stack.push(n)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:q,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:O},I=de,he=g(r=>{z(r,I);for(const t of r.nodes){const e=typeof t.indent=="number"?t.indent:0;let i=t.name;const s=i.endsWith("/");s&&(i=i.slice(0,-1));const o=s?"directory":"file",n=t.classAnnotation||void 0,c=t.iconAnnotation,d=c!==void 0?c||"none":void 0,l=t.descAnnotation||void 0,u=l?J(l,D()):void 0;I.addNode(e,i,o,n,d,u)}},"populate"),pe={parse:g(async r=>{const{text:t,lineMap:e}=H(r);try{const i=await te("treeView",t);E.debug(i),he(i)}catch(i){throw e.size>0&&i instanceof Error&&(i.message=R(i.message,e)),i}},"parse")},C={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function W(r,t){var s;const e=(s=t==null?void 0:t.filenameIcons)==null?void 0:s[r];if(e)return e;const i=r.lastIndexOf(".");if(i>0){const o=r.substring(i).toLowerCase(),n=t==null?void 0:t.extensionIcons;return(n==null?void 0:n[o])??(n==null?void 0:n[o.slice(1)])}}g(W,"detectIcon");function y(r,t){return r.includes(":")?r:r in C.icons||!t?`${C.prefix}:${r}`:`${t}:${r}`}g(y,"qualifyIcon");function k(r,t){if(r.icon!=="none"){if(r.icon)return y(r.icon,t.defaultIconPack);if(t.showIcons){if(r.nodeType==="file"){const e=W(r.name,t);if(e==="none")return;if(e)return y(e,t.defaultIconPack)}return`${C.prefix}:${r.nodeType==="directory"?"folder":"file"}`}}}g(k,"getNodeIcon");ee([{name:C.prefix,icons:C}]);var B=14,ge=4,fe=16,ue=g(async(r,t)=>{const e=[],i=g(o=>{const n=k(o,t);n&&e.push({icon:n,node:o}),o.children.forEach(i)},"collect");i(r);const s=await Promise.all(e.map(async({icon:o,node:n})=>({id:n.id,svg:await K(o,{height:B,width:B})})));return new Map(s.map(({id:o,svg:n})=>[o,n]))},"resolveNodeIcons"),we=g((r,t,e,i,s,o)=>{var b;const n=i.append("g");let c="treeView-node-label";e.nodeType==="directory"&&(c+=" treeView-node-dir"),e.cssClass&&(c+=` ${e.cssClass}`);const d=B+ge,l=k(e,s),u=l!==void 0;l&&n.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${r+s.paddingX}, ${t+s.paddingY})`).html(o.get(e.id)??"");const a=n.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",c),{height:p,width:h}=a.node().getBBox(),m=p+s.paddingY*2,w=r+s.paddingX+(u?d:0);a.attr("x",w),a.attr("y",t+m/2);const f=w+h,v=h+s.paddingX*2+(u?d:0);return e.BBox={x:r,y:t,width:v,height:m},(b=e.cssClass)!=null&&b.split(/\s+/).includes("highlight")&&n.insert("rect",":first-child").attr("x",r).attr("y",t+1).attr("width",0).attr("height",m-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:n,labelRightEdge:f,centerY:t+m/2}},"positionLabel"),N=g((r,t,e,i,s,o)=>r.append("line").attr("x1",t).attr("y1",e).attr("x2",i).attr("y2",s).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),me=g((r,t,e,i)=>{var u;let s=0,o=0;const n=[],c=g((a,p,h,m)=>{const w=m*(h.rowIndent+h.paddingX),f=we(w,s,p,a,h,i);n.push(f);const{height:v,width:b}=p.BBox;N(a,w-h.rowIndent,s+v/2,w,s+v/2,h.lineThickness),o=Math.max(o,w+b),s+=v},"drawNode"),d=g((a,p=0)=>{c(r,a,e,p),a.children.forEach(f=>{d(f,p+1)});const{x:h,y:m,height:w}=a.BBox;if(a.children.length){const{y:f,height:v}=a.children[a.children.length-1].BBox;N(r,h+e.paddingX,m+w,h+e.paddingX,f+v/2+e.lineThickness/2,e.lineThickness)}},"processNode");d(t);const l=n.filter(a=>a.node.description);if(l.length>0){const p=Math.max(...n.map(h=>h.labelRightEdge))+fe;for(const h of l){const w=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",h.centerY).node().getBBox();o=Math.max(o,p+w.width+e.paddingX)}}for(const a of n)if((u=a.node.cssClass)!=null&&u.split(/\s+/).includes("highlight")){const p=a.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const h=o-a.node.BBox.x+8;p.attr("width",h),o=Math.max(o,a.node.BBox.x+h+2)}}return{totalHeight:s,totalWidth:o}},"drawTree"),ve=g(async(r,t,e,i)=>{E.debug(`Rendering treeView diagram
4
4
  `+r);const s=i.db,o=s.getRoot(),n=s.getConfig(),c=Z(t),d=c.append("g");d.attr("class","tree-view");const l=await ue(o,n),{totalHeight:u,totalWidth:a}=me(d,o,n,l);c.attr("viewBox",`-${n.lineThickness/2} 0 ${a} ${u}`),U(c,u,a,n.useMaxWidth)},"draw"),xe={draw:ve},be=xe,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ie=g(({treeView:r})=>{const{labelFontSize:t,labelColor:e,lineColor:i,iconColor:s,descriptionColor:o,highlightBg:n,highlightStroke:c}=A(Ce,r);return`
@@ -1,4 +1,4 @@
1
- import{p as I}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{s as _,g as E,q as D,p as F,a as G,b as P,_ as c,G as z,r as B,D as w,A as C,E as W,l as b,X as V,d as H}from"./mermaid.core-Cgrm3JVT.js";import{p as X}from"./cynefin-OW5HDTMX-CojMpaoH.js";import"./index-Ci-z4zWY.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:x},m=structuredClone(A),j=W.radar,U=c(()=>w({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var n;return((n=s.axis)==null?void 0:n.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{var e,r,s,n,l;const t=a.reduce((o,i)=>(o[i.name]=i,o),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??x.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??x.ticks,max:((s=t.max)==null?void 0:s.value)??x.max,min:((n=t.min)==null?void 0:n.value)??x.min,graticule:((l=t.graticule)==null?void 0:l.value)??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,n=s.getAxes(),l=s.getCurves(),o=s.getOptions(),i=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,i),g=o.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=o.min,v=Math.min(i.width,i.height)/2;st(u,n,v,o.ticks,o.graticule),nt(u,n,v,i),L(u,n,l,h,g,o.graticule,i),k(u,l,o.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let n=0;n<r;n++){const l=e*(n+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const n=t.length;for(let l=0;l<r;l++){const o=e*(l+1)/r,i=t.map((d,p)=>{const u=2*p*Math.PI/n-Math.PI/2,g=o*Math.cos(u),h=o*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let n=0;n<s;n++){const l=t[n].label,o=2*n*Math.PI/s-Math.PI/2,i=Math.cos(o),d=Math.sin(o);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*i).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=i>.01?"start":i<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*i+g*i).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,n,l){const o=t.length,i=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==o)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/o-Math.PI/2,f=T(g,r,s,i),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});n==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):n==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const n=a[(s-1+e)%e],l=a[s],o=a[(s+1)%e],i=a[(s+2)%e],d={x:l.x+(o.x-n.x)*t,y:l.y+(o.y-n.y)*t},p={x:o.x-(i.x-l.x)*t,y:o.y-(i.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${o.x},${o.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,n=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((o,i)=>{const d=a.append("g").attr("transform",`translate(${s}, ${n+i*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
1
+ import{p as I}from"./chunk-JWPE2WC7-DuArnVtF.js";import{s as _,g as E,q as D,p as F,a as G,b as P,_ as c,G as z,r as B,D as w,A as C,E as W,l as b,X as V,d as H}from"./mermaid.core-CGw0LkT_.js";import{p as X}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import"./index-DRri_6_x.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:x},m=structuredClone(A),j=W.radar,U=c(()=>w({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var n;return((n=s.axis)==null?void 0:n.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{var e,r,s,n,l;const t=a.reduce((o,i)=>(o[i.name]=i,o),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??x.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??x.ticks,max:((s=t.max)==null?void 0:s.value)??x.max,min:((n=t.min)==null?void 0:n.value)??x.min,graticule:((l=t.graticule)==null?void 0:l.value)??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,n=s.getAxes(),l=s.getCurves(),o=s.getOptions(),i=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,i),g=o.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=o.min,v=Math.min(i.width,i.height)/2;st(u,n,v,o.ticks,o.graticule),nt(u,n,v,i),L(u,n,l,h,g,o.graticule,i),k(u,l,o.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let n=0;n<r;n++){const l=e*(n+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const n=t.length;for(let l=0;l<r;l++){const o=e*(l+1)/r,i=t.map((d,p)=>{const u=2*p*Math.PI/n-Math.PI/2,g=o*Math.cos(u),h=o*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let n=0;n<s;n++){const l=t[n].label,o=2*n*Math.PI/s-Math.PI/2,i=Math.cos(o),d=Math.sin(o);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*i).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=i>.01?"start":i<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*i+g*i).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,n,l){const o=t.length,i=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==o)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/o-Math.PI/2,f=T(g,r,s,i),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});n==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):n==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const n=a[(s-1+e)%e],l=a[s],o=a[(s+1)%e],i=a[(s+2)%e],d={x:l.x+(o.x-n.x)*t,y:l.y+(o.y-n.y)*t},p={x:o.x-(i.x-l.x)*t,y:o.y-(i.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${o.x},${o.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,n=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((o,i)=>{const d=a.append("g").attr("transform",`translate(${s}, ${n+i*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${s};
4
4
  fill: ${s};
@@ -1,3 +1,3 @@
1
- import{p as oe}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{q as se,p as de,s as le,g as ce,a as me,b as ue,_ as o,l as g,c as D,j as xe,B as fe,r as ge,D as he,A as E,E as pe,i as P,w as S,am as be}from"./mermaid.core-Cgrm3JVT.js";import{p as ve,i as we}from"./cynefin-OW5HDTMX-CojMpaoH.js";import"./index-Ci-z4zWY.js";var T="position frame",N="frame positioned",M="position relation",C="relation positioned",ye=o(function(e){g.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){O(),ge()},"clear");function O(){A={}}o(O,"reset");var ke=pe.eventmodeling,Me=o(()=>he({...ke,...E().eventmodeling}),"getConfig"),A={};function W(){let e=Be;const{ast:n}=A,t=R();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=X(i,n.dataEntities,t);e=w(e,{$kind:T,index:a,frame:i,textProps:r});let d;q(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=w(e,{$kind:M,index:a,frame:i,sourceFrame:l})})):e=w(e,{$kind:M,index:a,frame:i})}),e={...e,sortedSwimlanesArray:$(e.swimlanes)},e}o(W,"getState");function I(e){A.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:450-2*10,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function R(){return s}o(R,"getDiagramProps");var Be={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function H(e){const n=e.split(".");if(n.length===2)return n[0]}o(H,"extractNamespace");function U(e){const n=e.split(".");return n.length===2?n[1]:e}o(U,"extractName");function _(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(_,"findSwimlaneByNamespace");function v(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(v,"findNextAvailableIndex");function V(e,n){const t=H(e.entityIdentifier),i=_(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:v(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:v(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:v(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(V,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=E();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(L,"calculateEntityVisualProps");function X(e,n,t){const i=E(),a=P(U(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${S(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=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(y=>{var b;return y.name===((b=e.dataReference)==null?void 0:b.$refText)});p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
1
+ import{p as oe}from"./chunk-JWPE2WC7-DuArnVtF.js";import{q as se,p as de,s as le,g as ce,a as me,b as ue,_ as o,l as g,c as D,j as xe,B as fe,r as ge,D as he,A as E,E as pe,i as P,w as S,am as be}from"./mermaid.core-CGw0LkT_.js";import{p as ve,i as we}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import"./index-DRri_6_x.js";var T="position frame",N="frame positioned",M="position relation",C="relation positioned",ye=o(function(e){g.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){O(),ge()},"clear");function O(){A={}}o(O,"reset");var ke=pe.eventmodeling,Me=o(()=>he({...ke,...E().eventmodeling}),"getConfig"),A={};function W(){let e=Be;const{ast:n}=A,t=R();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=X(i,n.dataEntities,t);e=w(e,{$kind:T,index:a,frame:i,textProps:r});let d;q(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=w(e,{$kind:M,index:a,frame:i,sourceFrame:l})})):e=w(e,{$kind:M,index:a,frame:i})}),e={...e,sortedSwimlanesArray:$(e.swimlanes)},e}o(W,"getState");function I(e){A.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:450-2*10,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function R(){return s}o(R,"getDiagramProps");var Be={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function H(e){const n=e.split(".");if(n.length===2)return n[0]}o(H,"extractNamespace");function U(e){const n=e.split(".");return n.length===2?n[1]:e}o(U,"extractName");function _(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(_,"findSwimlaneByNamespace");function v(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(v,"findNextAvailableIndex");function V(e,n){const t=H(e.entityIdentifier),i=_(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:v(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:v(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:v(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(V,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=E();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(L,"calculateEntityVisualProps");function X(e,n,t){const i=E(),a=P(U(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${S(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=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(y=>{var b;return y.name===((b=e.dataReference)==null?void 0:b.$refText)});p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
2
2
  `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(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=be(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(X,"calculateTextProps");function j(e,n){const t=n,i=L(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(j,"decidePositionFrame");function G(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(G,"calculateX");function Y(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(Y,"calculateMaxRight");function $(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o($,"sortedSwimlanesArray");function z(e,n){const t=n,i=V(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=G(a,d,r),m=c+l.width+s.boxPadding,x=Y(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=$(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const y=f[p],b=f[p-1];y.y=b.y+b.height+s.swimlaneGap}return h}o(z,"evolveFramePositioned");function K(e,n){return e===0&&n.sourceFrames.length===0}o(K,"isFirstFrame");function q(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(q,"hasSourceFrame");function B(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(B,"findBoxByFrame");function J(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(J,"findBoxByLineIndex");function Q(e,n){const t=n;if(we(t.frame)||K(t.index,t.frame))return[];const i=B(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=B(e.boxes,t.sourceFrame):a=J(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:C,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(Q,"decidePositionRelation");function Z(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(Z,"evolveRelationPositioned");var Fe={[T]:j,[M]:Q},Ee={[N]:z,[C]:Z};function ee(e,n){const t=Fe[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(ee,"decide");function te(e,n){const t=n.reduce((i,a)=>{const r=Ee[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(te,"evolve");function w(e,n){const t=ee(e,n);return te(e,t)}o(w,"dispatch");var F={getConfig:Me,setOptions:ye,getOptions:Pe,clear:Se,setAccTitle:ue,getAccTitle:me,getAccDescription:ce,setAccDescription:le,setDiagramTitle:de,getDiagramTitle:se,setAst:I,getDiagramProps:R,getState:W},Ae={parse:o(async e=>{const n=await ve("eventmodeling",e);g.debug(n),F.setAst(n),oe(n,F)},"parse")},k=D(),Re=k==null?void 0:k.eventmodeling;function ne(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(ne,"renderD3Box");function ie(e,n){return e>n}o(ie,"dirUpwards");function ae(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ie(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(ae,"renderD3Relation");function re(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(re,"renderD3Swimlane");var $e=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}=D(),l=xe(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(re(l,m.maxR,c,r)),m.boxes.forEach(ne(l,c)),m.relations.forEach(ae(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),fe(void 0,l,(d==null?void 0:d.padding)??30,d==null?void 0:d.useMaxWidth)},"draw"),De={draw:$e},Te=o(e=>"","getStyles"),Ne=Te,He={parser:Ae,db:F,renderer:De,styles:Ne};export{He as diagram};
@@ -1,4 +1,4 @@
1
- import{p as ge}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{_ as w,X as ye,A as ae,D as ee,G as Se,d as ve,l as te,bd as B,j as U,b as xe,a as be,p as we,q as Ce,g as Te,s as Le,E as $e,be as Ae,r as Fe}from"./mermaid.core-Cgrm3JVT.js";import{s as Ne}from"./chunk-POPQ4Y6H-Cfrux7bL.js";import{p as Me}from"./cynefin-OW5HDTMX-CojMpaoH.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as Q}from"./ordinal-Cboi1Yqb.js";import"./index-Ci-z4zWY.js";import"./init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],r,s,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function De(t,a){for(var l=this,n=[l],r=[],s,h,d,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(h=0,d=s.length;h<d;++h)n.push(s[h]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function Ee(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Re(t){for(var a=this,l=We(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function We(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*qe(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r<s;++r)l.push(n[r]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ye)):a===void 0&&(a=je);for(var l=new Z(t),n,r=[l],s,h,d,g;n=r.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)r.push(s=h[d]=new Z(h[d])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function je(t){return t.children}function Ye(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:Ee,path:Re,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:Xe,[Symbol.iterator]:qe};function Je(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,r){for(var s=t.children,h,d=-1,g=s.length,c=t.value&&(n-a)/t.value;++d<g;)h=s[d],h.y0=l,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,r){for(var s=t.children,h,d=-1,g=s.length,c=t.value&&(r-l)/t.value;++d<g;)h=s[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,r,s){for(var h=[],d=a.children,g,c,u=0,b=0,i=d.length,x,S,v=a.value,p,y,M,A,V,W,_;u<i;){x=r-l,S=s-n;do p=d[b++].value;while(!p&&b<i);for(y=M=p,W=Math.max(S/x,x/S)/(v*t),_=p*p*W,V=Math.max(M/_,_/y);b<i;++b){if(p+=c=d[b].value,c<y&&(y=c),c>M&&(M=c),_=p*p*W,A=Math.max(M/_,_/y),A>V){p-=c;break}V=A}h.push(g={value:p,dice:x<S,children:d.slice(u,b)}),g.dice?Qe(g,l,n,r,v?n+=S*p/v:s):et(g,l,n,v?l+=x*p/v:r,s),v-=p,u=b}return h}const nt=function t(a){function l(n,r,s,h,d){at(a,n,r,s,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l}(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],s=G,h=G,d=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Ke),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,y=i.y1-x;p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),i.x0=S,i.y0=v,i.x1=p,i.y1=y,i.children&&(x=r[i.depth+1]=s(i)/2,S+=c(i)-x,v+=h(i)-x,p-=d(i)-x,y-=g(i)-x,p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),t(i,S,v,p,y))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=Je(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(s=typeof i=="function"?i:q(+i),u):s},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(h=typeof i=="function"?i:q(+i),u):h},u.paddingRight=function(i){return arguments.length?(d=typeof i=="function"?i:q(+i),u):d},u.paddingBottom=function(i){return arguments.length?(g=typeof i=="function"?i:q(+i),u):g},u.paddingLeft=function(i){return arguments.length?(c=typeof i=="function"?i:q(+i),u):c},u}var R,oe=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=xe,this.getAccTitle=be,this.setDiagramTitle=we,this.getDiagramTitle=Ce,this.getAccDescription=Te,this.setAccDescription=Le}getNodes(){return this.nodes}getConfig(){const a=$e,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{Ae(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const h=s.item;if(!h)continue;const d=s.indent?parseInt(s.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],u=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(b)}const n=ce(l),r=w((s,h)=>{for(const d of s)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Me("treemap",t);te.debug("Treemap AST:",n);const r=(a=he.parser)==null?void 0:a.yy;if(!(r instanceof oe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(n,r)}catch(l){throw te.error("Error parsing treemap:",l),l}},"parse")},it=10,E=10,X=25,ot=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),h=s.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const u=d?30:0,b=Se(a),i=s.nodeWidth?s.nodeWidth*E:960,x=s.nodeHeight?s.nodeHeight*E:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const y=Q().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=Q().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),A=Q().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),W=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?X+E:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?E:0).paddingRight(e=>e.children&&e.children.length>0?E:0).paddingBottom(e=>e.children&&e.children.length>0?E:0).round(!0)(W),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=V.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=U(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let T;s.showValues!==!1&&e.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),k=o.node();if(k.getComputedTextLength()>m){const $="...";let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){o.text($),k.getComputedTextLength()>m&&o.text("");break}if(o.text(z+$),k.getComputedTextLength()<=m)break}}}),s.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),F=re.length>20,ue=F?16:38,j=F?14:28,D=F?4:8,I=F?4:6,J=F?2:4,se=F?8:10,K=F?1:2,Y=V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:`+A(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=U(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),T=f-2*J,P=C-2*J;if(T<se||P<se){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const k=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,o.style("font-size",`${m}px`);let N=Math.max(I,Math.min(j,Math.round(m*k))),$=m+K+N;for(;$>P&&m>D&&(m--,N=Math.max(I,Math.min(j,Math.round(m*k))),!(N<I&&m===D));)o.style("font-size",`${m}px`),$=m+K+N;o.style("font-size",`${m}px`),F?(m<D||P<D)&&o.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&o.style("display","none")}),s.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:`+A(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=U(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=U(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(I,Math.min(j,Math.round(T*.6)));f.style("font-size",`${m}px`);const N=(o.y1-o.y0)/2+T/2+K;f.attr("y",N);const $=o.x1-o.x0,ie=o.y1-o.y0-4,me=$-2*J;f.node().getComputedTextLength()>me||N+m>ie||m<I?f.style("display","none"):f.style("display",null)});const pe=s.diagramPadding??8;Ne(b,pe,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),ct=w(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=w(({treemap:t}={})=>{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),s=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return`
1
+ import{p as ge}from"./chunk-JWPE2WC7-DuArnVtF.js";import{_ as w,X as ye,A as ae,D as ee,G as Se,d as ve,l as te,bd as B,j as U,b as xe,a as be,p as we,q as Ce,g as Te,s as Le,E as $e,be as Ae,r as Fe}from"./mermaid.core-CGw0LkT_.js";import{s as Ne}from"./chunk-POPQ4Y6H-lVLu9Ild.js";import{p as Me}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as Q}from"./ordinal-Cboi1Yqb.js";import"./index-DRri_6_x.js";import"./init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],r,s,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function De(t,a){for(var l=this,n=[l],r=[],s,h,d,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(h=0,d=s.length;h<d;++h)n.push(s[h]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function Ee(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Re(t){for(var a=this,l=We(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function We(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*qe(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r<s;++r)l.push(n[r]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ye)):a===void 0&&(a=je);for(var l=new Z(t),n,r=[l],s,h,d,g;n=r.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)r.push(s=h[d]=new Z(h[d])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function je(t){return t.children}function Ye(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:Ee,path:Re,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:Xe,[Symbol.iterator]:qe};function Je(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,r){for(var s=t.children,h,d=-1,g=s.length,c=t.value&&(n-a)/t.value;++d<g;)h=s[d],h.y0=l,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,r){for(var s=t.children,h,d=-1,g=s.length,c=t.value&&(r-l)/t.value;++d<g;)h=s[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,r,s){for(var h=[],d=a.children,g,c,u=0,b=0,i=d.length,x,S,v=a.value,p,y,M,A,V,W,_;u<i;){x=r-l,S=s-n;do p=d[b++].value;while(!p&&b<i);for(y=M=p,W=Math.max(S/x,x/S)/(v*t),_=p*p*W,V=Math.max(M/_,_/y);b<i;++b){if(p+=c=d[b].value,c<y&&(y=c),c>M&&(M=c),_=p*p*W,A=Math.max(M/_,_/y),A>V){p-=c;break}V=A}h.push(g={value:p,dice:x<S,children:d.slice(u,b)}),g.dice?Qe(g,l,n,r,v?n+=S*p/v:s):et(g,l,n,v?l+=x*p/v:r,s),v-=p,u=b}return h}const nt=function t(a){function l(n,r,s,h,d){at(a,n,r,s,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l}(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],s=G,h=G,d=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Ke),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,y=i.y1-x;p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),i.x0=S,i.y0=v,i.x1=p,i.y1=y,i.children&&(x=r[i.depth+1]=s(i)/2,S+=c(i)-x,v+=h(i)-x,p-=d(i)-x,y-=g(i)-x,p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),t(i,S,v,p,y))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=Je(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(s=typeof i=="function"?i:q(+i),u):s},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(h=typeof i=="function"?i:q(+i),u):h},u.paddingRight=function(i){return arguments.length?(d=typeof i=="function"?i:q(+i),u):d},u.paddingBottom=function(i){return arguments.length?(g=typeof i=="function"?i:q(+i),u):g},u.paddingLeft=function(i){return arguments.length?(c=typeof i=="function"?i:q(+i),u):c},u}var R,oe=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=xe,this.getAccTitle=be,this.setDiagramTitle=we,this.getDiagramTitle=Ce,this.getAccDescription=Te,this.setAccDescription=Le}getNodes(){return this.nodes}getConfig(){const a=$e,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{Ae(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const h=s.item;if(!h)continue;const d=s.indent?parseInt(s.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],u=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(b)}const n=ce(l),r=w((s,h)=>{for(const d of s)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Me("treemap",t);te.debug("Treemap AST:",n);const r=(a=he.parser)==null?void 0:a.yy;if(!(r instanceof oe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(n,r)}catch(l){throw te.error("Error parsing treemap:",l),l}},"parse")},it=10,E=10,X=25,ot=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),h=s.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const u=d?30:0,b=Se(a),i=s.nodeWidth?s.nodeWidth*E:960,x=s.nodeHeight?s.nodeHeight*E:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const y=Q().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=Q().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),A=Q().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),W=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?X+E:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?E:0).paddingRight(e=>e.children&&e.children.length>0?E:0).paddingBottom(e=>e.children&&e.children.length>0?E:0).round(!0)(W),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=V.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=U(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let T;s.showValues!==!1&&e.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),k=o.node();if(k.getComputedTextLength()>m){const $="...";let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){o.text($),k.getComputedTextLength()>m&&o.text("");break}if(o.text(z+$),k.getComputedTextLength()<=m)break}}}),s.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),F=re.length>20,ue=F?16:38,j=F?14:28,D=F?4:8,I=F?4:6,J=F?2:4,se=F?8:10,K=F?1:2,Y=V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:`+A(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=U(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),T=f-2*J,P=C-2*J;if(T<se||P<se){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const k=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,o.style("font-size",`${m}px`);let N=Math.max(I,Math.min(j,Math.round(m*k))),$=m+K+N;for(;$>P&&m>D&&(m--,N=Math.max(I,Math.min(j,Math.round(m*k))),!(N<I&&m===D));)o.style("font-size",`${m}px`),$=m+K+N;o.style("font-size",`${m}px`),F?(m<D||P<D)&&o.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&o.style("display","none")}),s.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:`+A(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=U(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=U(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(I,Math.min(j,Math.round(T*.6)));f.style("font-size",`${m}px`);const N=(o.y1-o.y0)/2+T/2+K;f.attr("y",N);const $=o.x1-o.x0,ie=o.y1-o.y0-4,me=$-2*J;f.node().getComputedTextLength()>me||N+m>ie||m<I?f.style("display","none"):f.style("display",null)});const pe=s.diagramPadding??8;Ne(b,pe,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),ct=w(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=w(({treemap:t}={})=>{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),s=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${r.sectionStrokeColor};
4
4
  stroke-width: ${r.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{p as B}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{_ as b,D as m,G as C,d as S,l as w,b as D,a as T,p as E,q as P,g as z,s as A,A as F,E as W,r as _}from"./mermaid.core-Cgrm3JVT.js";import{p as N}from"./cynefin-OW5HDTMX-CojMpaoH.js";import"./index-Ci-z4zWY.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=T,this.setDiagramTitle=E,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}getConfig(){const t=m({...L,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{B(e,t);let s=-1,r=[],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??(a=s+1),a!==s+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${s+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),s=i,w.debug(`Packet block ${a} - ${s} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,o]=G({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(r)},"populate"),G=b((e,t,s)=>{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*s)return[e,void 0];const r=t*s-1,n=t*s;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),s=(r=x.parser)==null?void 0:r.yy;if(!(s 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),Y(t,s)},"parse")},I=b((e,t,s,r)=>{const n=r.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=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,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"),O=b((e,t,s,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=s*(r+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",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/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"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=b(({packet:e}={})=>{const t=m(q,e);return`
1
+ import{p as B}from"./chunk-JWPE2WC7-DuArnVtF.js";import{_ as b,D as m,G as C,d as S,l as w,b as D,a as T,p as E,q as P,g as z,s as A,A as F,E as W,r as _}from"./mermaid.core-CGw0LkT_.js";import{p as N}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import"./index-DRri_6_x.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=T,this.setDiagramTitle=E,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}getConfig(){const t=m({...L,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{B(e,t);let s=-1,r=[],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??(a=s+1),a!==s+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${s+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),s=i,w.debug(`Packet block ${a} - ${s} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,o]=G({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(r)},"populate"),G=b((e,t,s)=>{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*s)return[e,void 0];const r=t*s-1,n=t*s;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),s=(r=x.parser)==null?void 0:r.yy;if(!(s 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),Y(t,s)},"parse")},I=b((e,t,s,r)=>{const n=r.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=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,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"),O=b((e,t,s,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=s*(r+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",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/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"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=b(({packet:e}={})=>{const t=m(q,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1 +1 @@
1
- import{g as l,r as m,d as n}from"./chunk-SVP7TREG-BlvIN0CO.js";import{p}from"./chunk-JWPE2WC7-Yw9FCFsP.js";import{_ as t,l as o}from"./mermaid.core-Cgrm3JVT.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-CojMpaoH.js";import"./index-Ci-z4zWY.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},R={parser:g,db:n,renderer:m,styles:l};export{R as diagram};
1
+ import{g as l,r as m,d as n}from"./chunk-SVP7TREG-C6XYlIer.js";import{p}from"./chunk-JWPE2WC7-DuArnVtF.js";import{_ as t,l as o}from"./mermaid.core-CGw0LkT_.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-D6cgpCnH.js";import"./index-DRri_6_x.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},R={parser:g,db:n,renderer:m,styles:l};export{R as diagram};
@@ -1,4 +1,4 @@
1
- import{g as Ut}from"./chunk-XXDRQBXY-DMs7Rr4t.js";import{s as Kt}from"./chunk-POPQ4Y6H-Cfrux7bL.js";import{_ as f,b as Zt,a as jt,s as qt,g as Wt,p as Ht,q as Qt,c as tt,l as F,k as Xt,r as Jt,t as $t,u as te,v as ee,x as se,y as ie,j as re,z as ne}from"./mermaid.core-Cgrm3JVT.js";import{c as ae}from"./channel-CXjVLaBa.js";import"./index-Ci-z4zWY.js";var Ot=function(){var s=f(function(G,a,h,d){for(h=h||{},d=G.length;d--;h[G[d]]=a);return h},"o"),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],c=[2,2],o=[1,7],r=[1,9],l=[1,10],y=[1,11],b=[1,12],k=[1,30],R=[1,23],p=[1,24],g=[1,25],C=[1,26],v=[1,27],x=[1,19],T=[1,28],I=[1,29],N=[1,20],D=[1,18],L=[1,21],w=[1,22],xt=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],pt=[1,36],ft=[1,37],bt=[1,38],gt=[1,39],yt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],Ct=[1,91],It=[6,9,45,50],z=[6,9,12,44,45,50,51,52],nt=[1,101],at=[1,100],ot=[1,99],J=[18,61],At=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],_t=[18,61,64,66],kt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(a,h,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(n,c,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:r,23:l,25:y,27:b,28:13,29:14,30:15,31:16,32:17,34:k,37:R,38:p,39:g,40:C,41:v,43:x,46:T,47:I,51:N,53:D,54:L,55:w},s(n,xt,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:pt,70:ft,71:bt,72:gt,73:yt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,c,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:x,51:N,53:D,54:L,55:w},{10:51,43:x,51:N,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:x,51:N,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:r,23:l,25:y,27:b,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:R,38:p,39:g,40:C,41:v,43:x,46:T,47:I,51:N,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:B,69:pt,70:ft,71:bt,72:gt,73:yt}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:pt,70:ft,71:bt,72:gt,73:yt},s(Nt,[2,82]),s(Nt,[2,83]),s(u,[2,31]),s(u,xt),{6:st,9:it,35:90,45:Ct,50:rt},{43:[1,92],44:[1,93]},s(It,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(u,[2,45],{45:B}),{6:st,9:it,35:95,45:Ct,50:rt},s(u,[2,32]),{10:97,36:96,43:x,51:N,53:D,54:L,55:w},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:nt,53:at,76:ot},{15:102,43:V,44:M},{10:103,43:x,51:N,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(u,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:At,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:x,51:N,53:D,54:L,55:w},s(vt,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(_t,[2,72]),s(J,[2,75]),s(_t,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(It,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:nt,53:at,76:ot},{15:127,43:V,44:M},{13:128,43:nt,53:at,76:ot},s(u,[2,12]),s(J,[2,68]),{63:129,65:At},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:B}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:B},s(u,[2,9]),s(_t,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:nt,53:at,76:ot},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(a,h){if(h.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=h,d}},"parseError"),parse:f(function(a){var h=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(Y.yy[mt]=this.yy[mt]);m.setInput(a,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Et=m.yylloc;t.push(Et);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=h.symbols_[S]||S),S}f(wt,"lex");for(var E,P,O,St,U={},ht,A,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?O=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),O=$[P]&&$[P][E]),typeof O>"u"||!O.length||!O[0]){var Tt="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?Tt="Parse error on line "+(lt+1)+`:
1
+ import{g as Ut}from"./chunk-XXDRQBXY-CiG2j2Ji.js";import{s as Kt}from"./chunk-POPQ4Y6H-lVLu9Ild.js";import{_ as f,b as Zt,a as jt,s as qt,g as Wt,p as Ht,q as Qt,c as tt,l as F,k as Xt,r as Jt,t as $t,u as te,v as ee,x as se,y as ie,j as re,z as ne}from"./mermaid.core-CGw0LkT_.js";import{c as ae}from"./channel-B7ohGDil.js";import"./index-DRri_6_x.js";var Ot=function(){var s=f(function(G,a,h,d){for(h=h||{},d=G.length;d--;h[G[d]]=a);return h},"o"),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],c=[2,2],o=[1,7],r=[1,9],l=[1,10],y=[1,11],b=[1,12],k=[1,30],R=[1,23],p=[1,24],g=[1,25],C=[1,26],v=[1,27],x=[1,19],T=[1,28],I=[1,29],N=[1,20],D=[1,18],L=[1,21],w=[1,22],xt=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],pt=[1,36],ft=[1,37],bt=[1,38],gt=[1,39],yt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],Ct=[1,91],It=[6,9,45,50],z=[6,9,12,44,45,50,51,52],nt=[1,101],at=[1,100],ot=[1,99],J=[18,61],At=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],_t=[18,61,64,66],kt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(a,h,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(n,c,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:r,23:l,25:y,27:b,28:13,29:14,30:15,31:16,32:17,34:k,37:R,38:p,39:g,40:C,41:v,43:x,46:T,47:I,51:N,53:D,54:L,55:w},s(n,xt,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:pt,70:ft,71:bt,72:gt,73:yt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,c,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:x,51:N,53:D,54:L,55:w},{10:51,43:x,51:N,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:x,51:N,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:r,23:l,25:y,27:b,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:R,38:p,39:g,40:C,41:v,43:x,46:T,47:I,51:N,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:B,69:pt,70:ft,71:bt,72:gt,73:yt}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:pt,70:ft,71:bt,72:gt,73:yt},s(Nt,[2,82]),s(Nt,[2,83]),s(u,[2,31]),s(u,xt),{6:st,9:it,35:90,45:Ct,50:rt},{43:[1,92],44:[1,93]},s(It,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(u,[2,45],{45:B}),{6:st,9:it,35:95,45:Ct,50:rt},s(u,[2,32]),{10:97,36:96,43:x,51:N,53:D,54:L,55:w},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:nt,53:at,76:ot},{15:102,43:V,44:M},{10:103,43:x,51:N,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(u,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:At,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:x,51:N,53:D,54:L,55:w},s(vt,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(_t,[2,72]),s(J,[2,75]),s(_t,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(It,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:nt,53:at,76:ot},{15:127,43:V,44:M},{13:128,43:nt,53:at,76:ot},s(u,[2,12]),s(J,[2,68]),{63:129,65:At},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:B}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:B},s(u,[2,9]),s(_t,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:nt,53:at,76:ot},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(a,h){if(h.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=h,d}},"parseError"),parse:f(function(a){var h=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(Y.yy[mt]=this.yy[mt]);m.setInput(a,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Et=m.yylloc;t.push(Et);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=h.symbols_[S]||S),S}f(wt,"lex");for(var E,P,O,St,U={},ht,A,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?O=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),O=$[P]&&$[P][E]),typeof O>"u"||!O.length||!O[0]){var Tt="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?Tt="Parse error on line "+(lt+1)+`:
2
2
  `+m.showPosition()+`
3
3
  Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Tt="Parse error on line "+(lt+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Tt,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:Et,expected:ut})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(O[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(O[1]),E=null,Dt=m.yyleng,e=m.yytext,lt=m.yylineno,Et=m.yylloc;break;case 2:if(A=this.productions_[O[1]][1],U.$=_[_.length-A],U._$={first_line:t[t.length-(A||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(A||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(A||1)].range[0],t[t.length-1].range[1]]),St=this.performAction.apply(U,[e,Dt,lt,Y.yy,O[1],_,t].concat(Yt)),typeof St<"u")return St;A&&(d=d.slice(0,-1*A*2),_=_.slice(0,-1*A),t=t.slice(0,-1*A)),d.push(this.productions_[O[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=function(){var G={EOF:1,parseError:f(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:f(function(a,h){return this.yy=h||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var h=a.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var h=a.length,d=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),h=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as Xt}from"./chunk-5VM5RSS4-7KNeNBqN.js";import{g as Qt}from"./chunk-XXDRQBXY-DMs7Rr4t.js";import{s as Zt}from"./chunk-POPQ4Y6H-Cfrux7bL.js";import{_ as k,b4 as Jt,Y as Mt,l as $,c as ke,x as $t,y as e1,z as rt,b as t1,s as s1,p as i1,a as r1,g as a1,q as n1,k as u1,Z as o1,$ as l1,ca as c1,t as st,j as it,a6 as h1,r as d1,b7 as p1,u as f1}from"./mermaid.core-Cgrm3JVT.js";import{f as g1}from"./chunk-F27PBJKO-BeboS7Fi.js";import{c as b1}from"./channel-CXjVLaBa.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,l,g,h={},m){var F,c;if(!i||i.trim().length===0)return;let u;if(m!==void 0){let d;m.includes(`
1
+ import{g as Xt}from"./chunk-5VM5RSS4-DbG_SwdB.js";import{g as Qt}from"./chunk-XXDRQBXY-CiG2j2Ji.js";import{s as Zt}from"./chunk-POPQ4Y6H-lVLu9Ild.js";import{_ as k,b4 as Jt,Y as Mt,l as $,c as ke,x as $t,y as e1,z as rt,b as t1,s as s1,p as i1,a as r1,g as a1,q as n1,k as u1,Z as o1,$ as l1,ca as c1,t as st,j as it,a6 as h1,r as d1,b7 as p1,u as f1}from"./mermaid.core-CGw0LkT_.js";import{f as g1}from"./chunk-F27PBJKO-QEc4cY1v.js";import{c as b1}from"./channel-B7ohGDil.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,l,g,h={},m){var F,c;if(!i||i.trim().length===0)return;let u;if(m!==void 0){let d;m.includes(`
2
2
  `)?d=m+`
3
3
  `:d=`{
4
4
  `+m+`