mio-previewer 0.2.74 → 0.2.76

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 (280) hide show
  1. package/dist/_basePickBy-CXmXW7jd.js +166 -0
  2. package/dist/_basePickBy-CtuVwROD.cjs +1 -0
  3. package/dist/_baseUniq-CGoiOkSa.js +682 -0
  4. package/dist/_baseUniq-CYtOXxfV.cjs +1 -0
  5. package/dist/_createAssigner-DqH64jc7.cjs +1 -0
  6. package/dist/_createAssigner-IEX8lwxm.js +573 -0
  7. package/dist/arc-C78br9Yj.cjs +1 -0
  8. package/dist/arc-vLgDTVZZ.js +80 -0
  9. package/dist/architecture-O4VJ6CD3-B9qzjtV8.cjs +1 -0
  10. package/dist/architecture-O4VJ6CD3-wqAP4onK.js +2 -0
  11. package/dist/architectureDiagram-VXUJARFQ-CYbuyVAs.js +4039 -0
  12. package/dist/architectureDiagram-VXUJARFQ-DEGYSl1f.cjs +36 -0
  13. package/dist/array-CApNbSU9.js +6 -0
  14. package/dist/array-DZSRzHA_.cjs +1 -0
  15. package/dist/assets/parser.worker-Bzb1GItl.js +14 -0
  16. package/dist/blockDiagram-VD42YOAC-DaH3L5Ng.js +3009 -0
  17. package/dist/blockDiagram-VD42YOAC-DeX0dq72.cjs +122 -0
  18. package/dist/c4Diagram-YG6GDRKO-CIThIYo6.js +2959 -0
  19. package/dist/c4Diagram-YG6GDRKO-Dz6dif_9.cjs +10 -0
  20. package/dist/channel-BWHkpgVD.cjs +1 -0
  21. package/dist/channel-JT7eWw2w.js +5 -0
  22. package/dist/chunk-4BX2VUAB-BZTgbbzC.js +8 -0
  23. package/dist/chunk-4BX2VUAB-HXFjpyQg.cjs +1 -0
  24. package/dist/chunk-55IACEB6-DWUqxxdp.js +8 -0
  25. package/dist/chunk-55IACEB6-Hy_THNUs.cjs +1 -0
  26. package/dist/chunk-ABZYJK2D-CbIYYZa_.cjs +80 -0
  27. package/dist/chunk-ABZYJK2D-DDrmE3Q7.js +2518 -0
  28. package/dist/chunk-ATLVNIR6-DHlCNWnJ.js +67 -0
  29. package/dist/chunk-ATLVNIR6-shAOudT0.cjs +1 -0
  30. package/dist/chunk-B4BG7PRW-C67vroOS.cjs +165 -0
  31. package/dist/chunk-B4BG7PRW-DSYuK8dI.js +3116 -0
  32. package/dist/chunk-BNMv73og.cjs +1 -0
  33. package/dist/chunk-CVBHYZKI-CLVcv_xh.cjs +1 -0
  34. package/dist/chunk-CVBHYZKI-CiCGetln.js +12 -0
  35. package/dist/chunk-DI55MBZ5-BCvBgHrp.cjs +220 -0
  36. package/dist/chunk-DI55MBZ5-Clru0TyG.js +2000 -0
  37. package/dist/chunk-Dbv0sNQl.js +20 -0
  38. package/dist/chunk-FMBD7UC4-D4kohRVY.js +5 -0
  39. package/dist/{chunk-FMBD7UC4-DxkUZTpt.cjs → chunk-FMBD7UC4-DWMVCXKq.cjs} +2 -2
  40. package/dist/chunk-HN2XXSSU-BwmRMa2r.cjs +1 -0
  41. package/dist/chunk-HN2XXSSU-CJL8wAZ2.js +76 -0
  42. package/dist/chunk-JA3XYJ7Z-BaAdjYEy.cjs +70 -0
  43. package/dist/chunk-JA3XYJ7Z-CpKHrbOX.js +1849 -0
  44. package/dist/chunk-JZLCHNYA-CYo7ykJf.js +4863 -0
  45. package/dist/chunk-JZLCHNYA-CvPIQFXP.cjs +54 -0
  46. package/dist/chunk-QN33PNHL-BFbXAWI4.js +25 -0
  47. package/dist/chunk-QN33PNHL-Cu0FHarG.cjs +1 -0
  48. package/dist/chunk-QXUST7PY-CnnfdJrM.cjs +7 -0
  49. package/dist/chunk-QXUST7PY-CxCAwQqP.js +488 -0
  50. package/dist/chunk-QZHKN3VN-2e6nJr8c.cjs +1 -0
  51. package/dist/chunk-QZHKN3VN-Dal4kx9B.js +15 -0
  52. package/dist/chunk-S3R3BYOJ-B2ozcJNg.cjs +2 -0
  53. package/dist/chunk-S3R3BYOJ-CG6GoSCd.js +1119 -0
  54. package/dist/chunk-TZMSLE5B-CooeLs4Q.js +57 -0
  55. package/dist/chunk-TZMSLE5B-D92K1Ja5.cjs +1 -0
  56. package/dist/classDiagram-2ON5EDUG-Bv1XCvDZ.js +28 -0
  57. package/dist/classDiagram-2ON5EDUG-BzMV1CJW.cjs +1 -0
  58. package/dist/classDiagram-v2-WZHVMYZB-Bqxv5U7u.js +28 -0
  59. package/dist/classDiagram-v2-WZHVMYZB-BzMV1CJW.cjs +1 -0
  60. package/dist/clone-B0KDIkSS.js +8 -0
  61. package/dist/clone-wvtBTB6v.cjs +1 -0
  62. package/dist/cose-bilkent-S5V4N54A-DMHTv1aW.cjs +1 -0
  63. package/dist/cose-bilkent-S5V4N54A-bGPAcpg6.js +2250 -0
  64. package/dist/custom-Bl_fVJZ0.cjs +84 -0
  65. package/dist/custom-D-TzPpWT.js +5281 -0
  66. package/dist/cytoscape.esm-CElDUMAx.cjs +321 -0
  67. package/dist/cytoscape.esm-xf9dtmBj.js +18100 -0
  68. package/dist/dagre-6UL2VRFP-3bgUxzqG.js +294 -0
  69. package/dist/dagre-6UL2VRFP-B3NqmIxs.cjs +4 -0
  70. package/dist/dagre-BfAHSwtP.js +1472 -0
  71. package/dist/dagre-Buvkww-e.cjs +1 -0
  72. package/dist/defaultLocale-B5dSAwiC.js +201 -0
  73. package/dist/defaultLocale-G0HsdRIB.cjs +1 -0
  74. package/dist/diagram-PSM6KHXK-C4FjxUHt.cjs +24 -0
  75. package/dist/diagram-PSM6KHXK-CF8TkgzX.js +527 -0
  76. package/dist/diagram-QEK2KX5R-Dl3IHeA5.js +213 -0
  77. package/dist/diagram-QEK2KX5R-Z9DYjr44.cjs +43 -0
  78. package/dist/diagram-S2PKOQOG-Bib-zL2S.cjs +24 -0
  79. package/dist/diagram-S2PKOQOG-ZKvn7IEe.js +133 -0
  80. package/dist/dist-DC-lM4uX.cjs +1 -0
  81. package/dist/dist-zNcLEPGR.js +51 -0
  82. package/dist/erDiagram-Q2GNP2WA-DFMV9OUT.cjs +60 -0
  83. package/dist/erDiagram-Q2GNP2WA-DJYJEzEB.js +1600 -0
  84. package/dist/flowDiagram-NV44I4VS-7TxeawHS.cjs +162 -0
  85. package/dist/flowDiagram-NV44I4VS-CXa6ycqs.js +4128 -0
  86. package/dist/ganttDiagram-LVOFAZNH-DqT7pu4m.js +2869 -0
  87. package/dist/ganttDiagram-LVOFAZNH-iiExGpwF.cjs +267 -0
  88. package/dist/gitGraph-ZV4HHKMB-BjaEVcYh.cjs +1 -0
  89. package/dist/gitGraph-ZV4HHKMB-Cl2I6-l3.js +2 -0
  90. package/dist/gitGraphDiagram-NY62KEGX-Tphu_MeC.js +621 -0
  91. package/dist/gitGraphDiagram-NY62KEGX-k5xzXg7C.cjs +65 -0
  92. package/dist/graphlib-C3tPLMbC.js +225 -0
  93. package/dist/graphlib-Cdg0u3TT.cjs +1 -0
  94. package/dist/info-63CPKGFF-D2A5GDFo.js +2 -0
  95. package/dist/info-63CPKGFF-MRaucWlf.cjs +1 -0
  96. package/dist/infoDiagram-F6ZHWCRC-3Jwo4J0f.cjs +2 -0
  97. package/dist/infoDiagram-F6ZHWCRC-BUoruN76.js +19 -0
  98. package/dist/init-07zIhv_j.cjs +1 -0
  99. package/dist/init-Bwwdo3M6.js +15 -0
  100. package/dist/journeyDiagram-XKPGCS4Q-C_3oD9RV.cjs +139 -0
  101. package/dist/journeyDiagram-XKPGCS4Q-DB7INfrf.js +883 -0
  102. package/dist/kanban-definition-3W4ZIXB7-AVLIBuMF.js +968 -0
  103. package/dist/kanban-definition-3W4ZIXB7-txUXjKzB.cjs +89 -0
  104. package/dist/katex-6UpFeIdV.cjs +261 -0
  105. package/dist/katex-BHcJffnM.js +22112 -0
  106. package/dist/line-DYhVGH2B.js +34 -0
  107. package/dist/line-DdNAPGaw.cjs +1 -0
  108. package/dist/linear-n4_iirEu.js +289 -0
  109. package/dist/linear-rQLpRrSH.cjs +1 -0
  110. package/dist/loadCss-D6257oR0.js +8 -0
  111. package/dist/loadCss-DhrQh6-A.cjs +1 -0
  112. package/dist/markdown-it-Cz3KGZjR.cjs +2 -0
  113. package/dist/markdown-it-D-hH4G7k.js +173 -0
  114. package/dist/math-G8rF7UWn.cjs +1 -0
  115. package/dist/math-H49DsxYR.js +10 -0
  116. package/dist/mermaid-parser.core-B84fnaGG.js +11904 -0
  117. package/dist/mermaid-parser.core-C9EbhVVg.cjs +82 -0
  118. package/dist/mindmap-definition-VGOIOE7T-CXlyYsc6.cjs +68 -0
  119. package/dist/mindmap-definition-VGOIOE7T-VIt9sDN3.js +963 -0
  120. package/dist/mio-previewer.cjs.js +11 -21
  121. package/dist/mio-previewer.css +2 -9
  122. package/dist/mio-previewer.esm.js +4939 -0
  123. package/dist/ordinal-C55HfHHp.js +65 -0
  124. package/dist/ordinal-CUPR-p0T.cjs +1 -0
  125. package/dist/packet-HUATNLJX-CGNko_oS.cjs +1 -0
  126. package/dist/packet-HUATNLJX-CVx40lqO.js +2 -0
  127. package/dist/path-DNvJyUE8.js +85 -0
  128. package/dist/path-Kklx0M1v.cjs +1 -0
  129. package/dist/pie-WTHONI2E-BdPx0Cfg.cjs +1 -0
  130. package/dist/pie-WTHONI2E-DX5V8x0L.js +2 -0
  131. package/dist/pieDiagram-ADFJNKIX-BysReYfx.js +165 -0
  132. package/dist/pieDiagram-ADFJNKIX-CTT1YMsk.cjs +30 -0
  133. package/dist/plugins/custom.cjs.js +1 -1
  134. package/dist/plugins/custom.esm.js +2 -0
  135. package/dist/plugins/markdown-it.cjs.js +1 -3
  136. package/dist/plugins/markdown-it.esm.js +2 -0
  137. package/dist/quadrantDiagram-AYHSOK5B-8-V3cwsC.cjs +7 -0
  138. package/dist/quadrantDiagram-AYHSOK5B-DRutDK03.js +1974 -0
  139. package/dist/radar-NJJJXTRR-CTD6M8nl.js +2 -0
  140. package/dist/radar-NJJJXTRR-wJoTnQbj.cjs +1 -0
  141. package/dist/requirementDiagram-UZGBJVZJ-DFRpWnfW.cjs +64 -0
  142. package/dist/requirementDiagram-UZGBJVZJ-DNYoJyhG.js +2191 -0
  143. package/dist/sankeyDiagram-TZEHDZUN-B9fxDP0Q.cjs +10 -0
  144. package/dist/sankeyDiagram-TZEHDZUN-DD6bkI4Z.js +920 -0
  145. package/dist/sequenceDiagram-WL72ISMW-Bmptok1c.js +3562 -0
  146. package/dist/sequenceDiagram-WL72ISMW-D9sXtgAn.cjs +145 -0
  147. package/dist/src-BMjps4Ui.cjs +1 -0
  148. package/dist/src-BuisGndr.js +2149 -0
  149. package/dist/stateDiagram-FKZM4ZOC-Bmiw8fnW.js +217 -0
  150. package/dist/stateDiagram-FKZM4ZOC-DiD1WJPM.cjs +1 -0
  151. package/dist/stateDiagram-v2-4FDKWEC3-5ADhn1IF.js +27 -0
  152. package/dist/stateDiagram-v2-4FDKWEC3-BjhmCPL1.cjs +1 -0
  153. package/dist/timeline-definition-IT6M3QCI-C9VMls3W.js +830 -0
  154. package/dist/timeline-definition-IT6M3QCI-ZzbHXhNl.cjs +61 -0
  155. package/dist/treemap-75Q7IDZK-9TPMYr3R.cjs +1 -0
  156. package/dist/treemap-75Q7IDZK-u3p-cHDL.js +2 -0
  157. package/dist/types/plugins/custom/codeBlockPlugin.d.ts +8 -0
  158. package/dist/types/plugins/custom/mermaidPlugin.d.ts +4 -0
  159. package/dist/xychartDiagram-PRI3JC2R-BI6KuGZ2.cjs +7 -0
  160. package/dist/xychartDiagram-PRI3JC2R-BWabDL1u.js +2041 -0
  161. package/package.json +2 -2
  162. package/dist/_basePickBy-Be3yyf2d.js +0 -151
  163. package/dist/_basePickBy-Z0DtrAKQ.cjs +0 -1
  164. package/dist/_baseUniq-BXkA0Pgx.js +0 -614
  165. package/dist/_baseUniq-Dq2eV1vY.cjs +0 -1
  166. package/dist/arc-B-QGG8RZ.cjs +0 -1
  167. package/dist/arc-djW14lrn.js +0 -83
  168. package/dist/architecture-O4VJ6CD3-Cws_zM2K.cjs +0 -1
  169. package/dist/architecture-O4VJ6CD3-pdMXTCaT.js +0 -5
  170. package/dist/architectureDiagram-VXUJARFQ-BwchhvqL.js +0 -4661
  171. package/dist/architectureDiagram-VXUJARFQ-DxDLWGpO.cjs +0 -36
  172. package/dist/assets/parser.worker-67NQKZt5.js +0 -16
  173. package/dist/blockDiagram-VD42YOAC-B4Xc8gfX.cjs +0 -122
  174. package/dist/blockDiagram-VD42YOAC-DpPneP6J.js +0 -2261
  175. package/dist/c4Diagram-YG6GDRKO-695lQbrZ.cjs +0 -10
  176. package/dist/c4Diagram-YG6GDRKO-Cnlax2Xq.js +0 -1580
  177. package/dist/channel-D_ITz6Jy.cjs +0 -1
  178. package/dist/channel-sXy9EduO.js +0 -5
  179. package/dist/chunk-4BX2VUAB-Bdx3_f83.cjs +0 -1
  180. package/dist/chunk-4BX2VUAB-DRkGmgAZ.js +0 -8
  181. package/dist/chunk-55IACEB6-BB03hpRC.cjs +0 -1
  182. package/dist/chunk-55IACEB6-Ord5OQlh.js +0 -8
  183. package/dist/chunk-B4BG7PRW-Ca0fOgzA.cjs +0 -165
  184. package/dist/chunk-B4BG7PRW-D-cs8bDX.js +0 -1375
  185. package/dist/chunk-DI55MBZ5-BsRe2B2M.cjs +0 -220
  186. package/dist/chunk-DI55MBZ5-DSmlLD1s.js +0 -1370
  187. package/dist/chunk-FMBD7UC4-IYQmAMTo.js +0 -19
  188. package/dist/chunk-QN33PNHL-B7G6Qlf3.cjs +0 -1
  189. package/dist/chunk-QN33PNHL-EYMc4JVr.js +0 -19
  190. package/dist/chunk-QZHKN3VN-B8NJ6Ahx.cjs +0 -1
  191. package/dist/chunk-QZHKN3VN-C4WIG5z8.js +0 -15
  192. package/dist/chunk-TZMSLE5B-BoM53RHv.js +0 -64
  193. package/dist/chunk-TZMSLE5B-CgLDb48A.cjs +0 -1
  194. package/dist/classDiagram-2ON5EDUG-CxmdZvqc.js +0 -16
  195. package/dist/classDiagram-2ON5EDUG-DIRim8qa.cjs +0 -1
  196. package/dist/classDiagram-v2-WZHVMYZB-CxmdZvqc.js +0 -16
  197. package/dist/classDiagram-v2-WZHVMYZB-DIRim8qa.cjs +0 -1
  198. package/dist/clone-DOYxaT_d.js +0 -8
  199. package/dist/clone-DSlm33NG.cjs +0 -1
  200. package/dist/cose-bilkent-S5V4N54A-BD3p1OC_.cjs +0 -1
  201. package/dist/cose-bilkent-S5V4N54A-yLoaqH3G.js +0 -2608
  202. package/dist/cytoscape.esm-DHF7mANN.cjs +0 -331
  203. package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
  204. package/dist/dagre-6UL2VRFP-DG1oQ4B2.cjs +0 -4
  205. package/dist/dagre-6UL2VRFP-VjboDBbp.js +0 -444
  206. package/dist/defaultLocale-D7EN2tov.js +0 -171
  207. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
  208. package/dist/diagram-PSM6KHXK-C1p0l5TY.js +0 -531
  209. package/dist/diagram-PSM6KHXK-a4rni6rJ.cjs +0 -24
  210. package/dist/diagram-QEK2KX5R-CErKOsX1.cjs +0 -43
  211. package/dist/diagram-QEK2KX5R-CKmmuumX.js +0 -217
  212. package/dist/diagram-S2PKOQOG-B1M7qCNl.cjs +0 -24
  213. package/dist/diagram-S2PKOQOG-BMLCJExF.js +0 -142
  214. package/dist/erDiagram-Q2GNP2WA-BfuCa_Za.cjs +0 -60
  215. package/dist/erDiagram-Q2GNP2WA-fOTsQA-d.js +0 -841
  216. package/dist/flowDiagram-NV44I4VS-BEqeUuqz.cjs +0 -162
  217. package/dist/flowDiagram-NV44I4VS-DDwRAjVG.js +0 -1620
  218. package/dist/ganttDiagram-LVOFAZNH-BbuRS8g3.js +0 -2505
  219. package/dist/ganttDiagram-LVOFAZNH-BlVeWKRf.cjs +0 -267
  220. package/dist/gitGraph-ZV4HHKMB-Bmu8r_Iq.cjs +0 -1
  221. package/dist/gitGraph-ZV4HHKMB-DcQ2E4dF.js +0 -5
  222. package/dist/gitGraphDiagram-NY62KEGX-DcMEeNh7.cjs +0 -65
  223. package/dist/gitGraphDiagram-NY62KEGX-_sWVSKbL.js +0 -699
  224. package/dist/graph-DEnt0OtZ.js +0 -247
  225. package/dist/graph-Dgcjs2XL.cjs +0 -1
  226. package/dist/info-63CPKGFF-DVDDcoHy.js +0 -5
  227. package/dist/info-63CPKGFF-Dc3cWL0G.cjs +0 -1
  228. package/dist/infoDiagram-F6ZHWCRC-DoUSS0kC.js +0 -24
  229. package/dist/infoDiagram-F6ZHWCRC-ZeTrjgaE.cjs +0 -2
  230. package/dist/init-CHZsXQcr.cjs +0 -1
  231. package/dist/init-DjUOC4st.js +0 -16
  232. package/dist/journeyDiagram-XKPGCS4Q-DGe13iBu.js +0 -834
  233. package/dist/journeyDiagram-XKPGCS4Q-Ihl9g4mY.cjs +0 -139
  234. package/dist/kanban-definition-3W4ZIXB7-2qkrkVLK.cjs +0 -89
  235. package/dist/kanban-definition-3W4ZIXB7-BhWe5nMU.js +0 -719
  236. package/dist/katex-CmGeg_OO.js +0 -11692
  237. package/dist/katex-DEiiRhcn.cjs +0 -261
  238. package/dist/layout-BDNzBIaA.cjs +0 -1
  239. package/dist/layout-DTBfbHzy.js +0 -1324
  240. package/dist/linear-BRl2UYUr.cjs +0 -1
  241. package/dist/linear-CwbXkgvF.js +0 -259
  242. package/dist/loadCss-BbD6mdv-.cjs +0 -1
  243. package/dist/loadCss-DS0Fuaxe.js +0 -8
  244. package/dist/mermaid-parser.core-CJ1yJm0s.js +0 -12966
  245. package/dist/mermaid-parser.core-CxTcWSA2.cjs +0 -128
  246. package/dist/mindmap-definition-VGOIOE7T-BPUEmP7g.cjs +0 -68
  247. package/dist/mindmap-definition-VGOIOE7T-DSqZBgzR.js +0 -784
  248. package/dist/mio-previewer.es.js +0 -6171
  249. package/dist/ordinal-CagbB1m8.cjs +0 -1
  250. package/dist/ordinal-DfAQgscy.js +0 -61
  251. package/dist/packet-HUATNLJX-B-qfkr5X.cjs +0 -1
  252. package/dist/packet-HUATNLJX-Dxob_meO.js +0 -5
  253. package/dist/pie-WTHONI2E-BRtdTGWt.js +0 -5
  254. package/dist/pie-WTHONI2E-DK7f6qJw.cjs +0 -1
  255. package/dist/pieDiagram-ADFJNKIX-Dhq_bEzm.js +0 -161
  256. package/dist/pieDiagram-ADFJNKIX-V04ms3gr.cjs +0 -30
  257. package/dist/plugins/custom.es.js +0 -85
  258. package/dist/plugins/markdown-it.es.js +0 -173
  259. package/dist/quadrantDiagram-AYHSOK5B-C97bOmUE.js +0 -1022
  260. package/dist/quadrantDiagram-AYHSOK5B-DlqFPVhi.cjs +0 -7
  261. package/dist/radar-NJJJXTRR-B9jT3LP3.cjs +0 -1
  262. package/dist/radar-NJJJXTRR-D8plmle3.js +0 -5
  263. package/dist/requirementDiagram-UZGBJVZJ-BxVMLKfQ.js +0 -850
  264. package/dist/requirementDiagram-UZGBJVZJ-DENJ74Ew.cjs +0 -64
  265. package/dist/sankeyDiagram-TZEHDZUN-DwgW7Suq.js +0 -810
  266. package/dist/sankeyDiagram-TZEHDZUN-lTBLhaSq.cjs +0 -10
  267. package/dist/sequenceDiagram-WL72ISMW-BAOeX1dA.js +0 -2511
  268. package/dist/sequenceDiagram-WL72ISMW-BRVvH1X4.cjs +0 -145
  269. package/dist/stateDiagram-FKZM4ZOC-BrFQE7Gl.js +0 -263
  270. package/dist/stateDiagram-FKZM4ZOC-D8GjooGL.cjs +0 -1
  271. package/dist/stateDiagram-v2-4FDKWEC3-4VRIY-eH.cjs +0 -1
  272. package/dist/stateDiagram-v2-4FDKWEC3-DnrWD6a3.js +0 -16
  273. package/dist/timeline-definition-IT6M3QCI-BJMIlueb.js +0 -795
  274. package/dist/timeline-definition-IT6M3QCI-BQFGUuGP.cjs +0 -61
  275. package/dist/treemap-75Q7IDZK-BX1vBFWf.cjs +0 -1
  276. package/dist/treemap-75Q7IDZK-CMTkunTV.js +0 -5
  277. package/dist/viewer-CZUSHxhf.js +0 -19131
  278. package/dist/viewer-Canph5Zx.cjs +0 -305
  279. package/dist/xychartDiagram-PRI3JC2R-Sl8WX8wc.cjs +0 -7
  280. package/dist/xychartDiagram-PRI3JC2R-WnFI7Ezu.js +0 -1340
@@ -0,0 +1,3009 @@
1
+ import { g as e, h as t, p as n } from "./src-BuisGndr.js";
2
+ import { E as r, I as i, a, b as o, c as s, et as c, h as l, s as u, y as d } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
3
+ import { t as f } from "./channel-JT7eWw2w.js";
4
+ import { E as p, c as m, h, i as g } from "./chunk-S3R3BYOJ-CG6GoSCd.js";
5
+ import { t as _ } from "./line-DYhVGH2B.js";
6
+ import { t as v } from "./chunk-HN2XXSSU-CJL8wAZ2.js";
7
+ import { t as y } from "./chunk-CVBHYZKI-CiCGetln.js";
8
+ import { a as b, n as x } from "./chunk-JA3XYJ7Z-CpKHrbOX.js";
9
+ import { t as S } from "./clone-B0KDIkSS.js";
10
+ import { t as C } from "./graphlib-C3tPLMbC.js";
11
+ import { t as w } from "./chunk-FMBD7UC4-D4kohRVY.js";
12
+ //#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.mjs
13
+ var T = (function() {
14
+ var e = /* @__PURE__ */ t(function(e, t, n, r) {
15
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
16
+ return n;
17
+ }, "o"), n = [1, 15], r = [1, 7], i = [1, 13], a = [1, 14], o = [1, 19], s = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
18
+ 8,
19
+ 10,
20
+ 21,
21
+ 28,
22
+ 29,
23
+ 30,
24
+ 31,
25
+ 39,
26
+ 43,
27
+ 46
28
+ ], f = [1, 23], p = [1, 24], m = [
29
+ 8,
30
+ 10,
31
+ 15,
32
+ 16,
33
+ 21,
34
+ 28,
35
+ 29,
36
+ 30,
37
+ 31,
38
+ 39,
39
+ 43,
40
+ 46
41
+ ], h = [
42
+ 8,
43
+ 10,
44
+ 15,
45
+ 16,
46
+ 21,
47
+ 27,
48
+ 28,
49
+ 29,
50
+ 30,
51
+ 31,
52
+ 39,
53
+ 43,
54
+ 46
55
+ ], g = [1, 49], _ = {
56
+ trace: /* @__PURE__ */ t(function() {}, "trace"),
57
+ yy: {},
58
+ symbols_: {
59
+ error: 2,
60
+ spaceLines: 3,
61
+ SPACELINE: 4,
62
+ NL: 5,
63
+ separator: 6,
64
+ SPACE: 7,
65
+ EOF: 8,
66
+ start: 9,
67
+ BLOCK_DIAGRAM_KEY: 10,
68
+ document: 11,
69
+ stop: 12,
70
+ statement: 13,
71
+ link: 14,
72
+ LINK: 15,
73
+ START_LINK: 16,
74
+ LINK_LABEL: 17,
75
+ STR: 18,
76
+ nodeStatement: 19,
77
+ columnsStatement: 20,
78
+ SPACE_BLOCK: 21,
79
+ blockStatement: 22,
80
+ classDefStatement: 23,
81
+ cssClassStatement: 24,
82
+ styleStatement: 25,
83
+ node: 26,
84
+ SIZE: 27,
85
+ COLUMNS: 28,
86
+ "id-block": 29,
87
+ end: 30,
88
+ NODE_ID: 31,
89
+ nodeShapeNLabel: 32,
90
+ dirList: 33,
91
+ DIR: 34,
92
+ NODE_DSTART: 35,
93
+ NODE_DEND: 36,
94
+ BLOCK_ARROW_START: 37,
95
+ BLOCK_ARROW_END: 38,
96
+ classDef: 39,
97
+ CLASSDEF_ID: 40,
98
+ CLASSDEF_STYLEOPTS: 41,
99
+ DEFAULT: 42,
100
+ class: 43,
101
+ CLASSENTITY_IDS: 44,
102
+ STYLECLASS: 45,
103
+ style: 46,
104
+ STYLE_ENTITY_IDS: 47,
105
+ STYLE_DEFINITION_DATA: 48,
106
+ $accept: 0,
107
+ $end: 1
108
+ },
109
+ terminals_: {
110
+ 2: "error",
111
+ 4: "SPACELINE",
112
+ 5: "NL",
113
+ 7: "SPACE",
114
+ 8: "EOF",
115
+ 10: "BLOCK_DIAGRAM_KEY",
116
+ 15: "LINK",
117
+ 16: "START_LINK",
118
+ 17: "LINK_LABEL",
119
+ 18: "STR",
120
+ 21: "SPACE_BLOCK",
121
+ 27: "SIZE",
122
+ 28: "COLUMNS",
123
+ 29: "id-block",
124
+ 30: "end",
125
+ 31: "NODE_ID",
126
+ 34: "DIR",
127
+ 35: "NODE_DSTART",
128
+ 36: "NODE_DEND",
129
+ 37: "BLOCK_ARROW_START",
130
+ 38: "BLOCK_ARROW_END",
131
+ 39: "classDef",
132
+ 40: "CLASSDEF_ID",
133
+ 41: "CLASSDEF_STYLEOPTS",
134
+ 42: "DEFAULT",
135
+ 43: "class",
136
+ 44: "CLASSENTITY_IDS",
137
+ 45: "STYLECLASS",
138
+ 46: "style",
139
+ 47: "STYLE_ENTITY_IDS",
140
+ 48: "STYLE_DEFINITION_DATA"
141
+ },
142
+ productions_: [
143
+ 0,
144
+ [3, 1],
145
+ [3, 2],
146
+ [3, 2],
147
+ [6, 1],
148
+ [6, 1],
149
+ [6, 1],
150
+ [9, 3],
151
+ [12, 1],
152
+ [12, 1],
153
+ [12, 2],
154
+ [12, 2],
155
+ [11, 1],
156
+ [11, 2],
157
+ [14, 1],
158
+ [14, 4],
159
+ [13, 1],
160
+ [13, 1],
161
+ [13, 1],
162
+ [13, 1],
163
+ [13, 1],
164
+ [13, 1],
165
+ [13, 1],
166
+ [19, 3],
167
+ [19, 2],
168
+ [19, 1],
169
+ [20, 1],
170
+ [22, 4],
171
+ [22, 3],
172
+ [26, 1],
173
+ [26, 2],
174
+ [33, 1],
175
+ [33, 2],
176
+ [32, 3],
177
+ [32, 4],
178
+ [23, 3],
179
+ [23, 3],
180
+ [24, 3],
181
+ [25, 3]
182
+ ],
183
+ performAction: /* @__PURE__ */ t(function(e, t, n, r, i, a, o) {
184
+ var s = a.length - 1;
185
+ switch (i) {
186
+ case 4:
187
+ r.getLogger().debug("Rule: separator (NL) ");
188
+ break;
189
+ case 5:
190
+ r.getLogger().debug("Rule: separator (Space) ");
191
+ break;
192
+ case 6:
193
+ r.getLogger().debug("Rule: separator (EOF) ");
194
+ break;
195
+ case 7:
196
+ r.getLogger().debug("Rule: hierarchy: ", a[s - 1]), r.setHierarchy(a[s - 1]);
197
+ break;
198
+ case 8:
199
+ r.getLogger().debug("Stop NL ");
200
+ break;
201
+ case 9:
202
+ r.getLogger().debug("Stop EOF ");
203
+ break;
204
+ case 10:
205
+ r.getLogger().debug("Stop NL2 ");
206
+ break;
207
+ case 11:
208
+ r.getLogger().debug("Stop EOF2 ");
209
+ break;
210
+ case 12:
211
+ r.getLogger().debug("Rule: statement: ", a[s]), typeof a[s].length == "number" ? this.$ = a[s] : this.$ = [a[s]];
212
+ break;
213
+ case 13:
214
+ r.getLogger().debug("Rule: statement #2: ", a[s - 1]), this.$ = [a[s - 1]].concat(a[s]);
215
+ break;
216
+ case 14:
217
+ r.getLogger().debug("Rule: link: ", a[s], e), this.$ = {
218
+ edgeTypeStr: a[s],
219
+ label: ""
220
+ };
221
+ break;
222
+ case 15:
223
+ r.getLogger().debug("Rule: LABEL link: ", a[s - 3], a[s - 1], a[s]), this.$ = {
224
+ edgeTypeStr: a[s],
225
+ label: a[s - 1]
226
+ };
227
+ break;
228
+ case 18:
229
+ let t = parseInt(a[s]), n = r.generateId();
230
+ this.$ = {
231
+ id: n,
232
+ type: "space",
233
+ label: "",
234
+ width: t,
235
+ children: []
236
+ };
237
+ break;
238
+ case 23:
239
+ r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
240
+ let i = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr);
241
+ this.$ = [
242
+ {
243
+ id: a[s - 2].id,
244
+ label: a[s - 2].label,
245
+ type: a[s - 2].type,
246
+ directions: a[s - 2].directions
247
+ },
248
+ {
249
+ id: a[s - 2].id + "-" + a[s].id,
250
+ start: a[s - 2].id,
251
+ end: a[s].id,
252
+ label: a[s - 1].label,
253
+ type: "edge",
254
+ directions: a[s].directions,
255
+ arrowTypeEnd: i,
256
+ arrowTypeStart: "arrow_open"
257
+ },
258
+ {
259
+ id: a[s].id,
260
+ label: a[s].label,
261
+ type: r.typeStr2Type(a[s].typeStr),
262
+ directions: a[s].directions
263
+ }
264
+ ];
265
+ break;
266
+ case 24:
267
+ r.getLogger().debug("Rule: nodeStatement (abc88 node size) ", a[s - 1], a[s]), this.$ = {
268
+ id: a[s - 1].id,
269
+ label: a[s - 1].label,
270
+ type: r.typeStr2Type(a[s - 1].typeStr),
271
+ directions: a[s - 1].directions,
272
+ widthInColumns: parseInt(a[s], 10)
273
+ };
274
+ break;
275
+ case 25:
276
+ r.getLogger().debug("Rule: nodeStatement (node) ", a[s]), this.$ = {
277
+ id: a[s].id,
278
+ label: a[s].label,
279
+ type: r.typeStr2Type(a[s].typeStr),
280
+ directions: a[s].directions,
281
+ widthInColumns: 1
282
+ };
283
+ break;
284
+ case 26:
285
+ r.getLogger().debug("APA123", this ? this : "na"), r.getLogger().debug("COLUMNS: ", a[s]), this.$ = {
286
+ type: "column-setting",
287
+ columns: a[s] === "auto" ? -1 : parseInt(a[s])
288
+ };
289
+ break;
290
+ case 27:
291
+ r.getLogger().debug("Rule: id-block statement : ", a[s - 2], a[s - 1]), r.generateId(), this.$ = {
292
+ ...a[s - 2],
293
+ type: "composite",
294
+ children: a[s - 1]
295
+ };
296
+ break;
297
+ case 28:
298
+ r.getLogger().debug("Rule: blockStatement : ", a[s - 2], a[s - 1], a[s]);
299
+ let o = r.generateId();
300
+ this.$ = {
301
+ id: o,
302
+ type: "composite",
303
+ label: "",
304
+ children: a[s - 1]
305
+ };
306
+ break;
307
+ case 29:
308
+ r.getLogger().debug("Rule: node (NODE_ID separator): ", a[s]), this.$ = { id: a[s] };
309
+ break;
310
+ case 30:
311
+ r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", a[s - 1], a[s]), this.$ = {
312
+ id: a[s - 1],
313
+ label: a[s].label,
314
+ typeStr: a[s].typeStr,
315
+ directions: a[s].directions
316
+ };
317
+ break;
318
+ case 31:
319
+ r.getLogger().debug("Rule: dirList: ", a[s]), this.$ = [a[s]];
320
+ break;
321
+ case 32:
322
+ r.getLogger().debug("Rule: dirList: ", a[s - 1], a[s]), this.$ = [a[s - 1]].concat(a[s]);
323
+ break;
324
+ case 33:
325
+ r.getLogger().debug("Rule: nodeShapeNLabel: ", a[s - 2], a[s - 1], a[s]), this.$ = {
326
+ typeStr: a[s - 2] + a[s],
327
+ label: a[s - 1]
328
+ };
329
+ break;
330
+ case 34:
331
+ r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", a[s - 3], a[s - 2], " #3:", a[s - 1], a[s]), this.$ = {
332
+ typeStr: a[s - 3] + a[s],
333
+ label: a[s - 2],
334
+ directions: a[s - 1]
335
+ };
336
+ break;
337
+ case 35:
338
+ case 36:
339
+ this.$ = {
340
+ type: "classDef",
341
+ id: a[s - 1].trim(),
342
+ css: a[s].trim()
343
+ };
344
+ break;
345
+ case 37:
346
+ this.$ = {
347
+ type: "applyClass",
348
+ id: a[s - 1].trim(),
349
+ styleClass: a[s].trim()
350
+ };
351
+ break;
352
+ case 38:
353
+ this.$ = {
354
+ type: "applyStyles",
355
+ id: a[s - 1].trim(),
356
+ stylesStr: a[s].trim()
357
+ };
358
+ break;
359
+ }
360
+ }, "anonymous"),
361
+ table: [
362
+ {
363
+ 9: 1,
364
+ 10: [1, 2]
365
+ },
366
+ { 1: [3] },
367
+ {
368
+ 10: n,
369
+ 11: 3,
370
+ 13: 4,
371
+ 19: 5,
372
+ 20: 6,
373
+ 21: r,
374
+ 22: 8,
375
+ 23: 9,
376
+ 24: 10,
377
+ 25: 11,
378
+ 26: 12,
379
+ 28: i,
380
+ 29: a,
381
+ 31: o,
382
+ 39: s,
383
+ 43: c,
384
+ 46: l
385
+ },
386
+ { 8: [1, 20] },
387
+ e(u, [2, 12], {
388
+ 13: 4,
389
+ 19: 5,
390
+ 20: 6,
391
+ 22: 8,
392
+ 23: 9,
393
+ 24: 10,
394
+ 25: 11,
395
+ 26: 12,
396
+ 11: 21,
397
+ 10: n,
398
+ 21: r,
399
+ 28: i,
400
+ 29: a,
401
+ 31: o,
402
+ 39: s,
403
+ 43: c,
404
+ 46: l
405
+ }),
406
+ e(d, [2, 16], {
407
+ 14: 22,
408
+ 15: f,
409
+ 16: p
410
+ }),
411
+ e(d, [2, 17]),
412
+ e(d, [2, 18]),
413
+ e(d, [2, 19]),
414
+ e(d, [2, 20]),
415
+ e(d, [2, 21]),
416
+ e(d, [2, 22]),
417
+ e(m, [2, 25], { 27: [1, 25] }),
418
+ e(d, [2, 26]),
419
+ {
420
+ 19: 26,
421
+ 26: 12,
422
+ 31: o
423
+ },
424
+ {
425
+ 10: n,
426
+ 11: 27,
427
+ 13: 4,
428
+ 19: 5,
429
+ 20: 6,
430
+ 21: r,
431
+ 22: 8,
432
+ 23: 9,
433
+ 24: 10,
434
+ 25: 11,
435
+ 26: 12,
436
+ 28: i,
437
+ 29: a,
438
+ 31: o,
439
+ 39: s,
440
+ 43: c,
441
+ 46: l
442
+ },
443
+ {
444
+ 40: [1, 28],
445
+ 42: [1, 29]
446
+ },
447
+ { 44: [1, 30] },
448
+ { 47: [1, 31] },
449
+ e(h, [2, 29], {
450
+ 32: 32,
451
+ 35: [1, 33],
452
+ 37: [1, 34]
453
+ }),
454
+ { 1: [2, 7] },
455
+ e(u, [2, 13]),
456
+ {
457
+ 26: 35,
458
+ 31: o
459
+ },
460
+ { 31: [2, 14] },
461
+ { 17: [1, 36] },
462
+ e(m, [2, 24]),
463
+ {
464
+ 10: n,
465
+ 11: 37,
466
+ 13: 4,
467
+ 14: 22,
468
+ 15: f,
469
+ 16: p,
470
+ 19: 5,
471
+ 20: 6,
472
+ 21: r,
473
+ 22: 8,
474
+ 23: 9,
475
+ 24: 10,
476
+ 25: 11,
477
+ 26: 12,
478
+ 28: i,
479
+ 29: a,
480
+ 31: o,
481
+ 39: s,
482
+ 43: c,
483
+ 46: l
484
+ },
485
+ { 30: [1, 38] },
486
+ { 41: [1, 39] },
487
+ { 41: [1, 40] },
488
+ { 45: [1, 41] },
489
+ { 48: [1, 42] },
490
+ e(h, [2, 30]),
491
+ { 18: [1, 43] },
492
+ { 18: [1, 44] },
493
+ e(m, [2, 23]),
494
+ { 18: [1, 45] },
495
+ { 30: [1, 46] },
496
+ e(d, [2, 28]),
497
+ e(d, [2, 35]),
498
+ e(d, [2, 36]),
499
+ e(d, [2, 37]),
500
+ e(d, [2, 38]),
501
+ { 36: [1, 47] },
502
+ {
503
+ 33: 48,
504
+ 34: g
505
+ },
506
+ { 15: [1, 50] },
507
+ e(d, [2, 27]),
508
+ e(h, [2, 33]),
509
+ { 38: [1, 51] },
510
+ {
511
+ 33: 52,
512
+ 34: g,
513
+ 38: [2, 31]
514
+ },
515
+ { 31: [2, 15] },
516
+ e(h, [2, 34]),
517
+ { 38: [2, 32] }
518
+ ],
519
+ defaultActions: {
520
+ 20: [2, 7],
521
+ 23: [2, 14],
522
+ 50: [2, 15],
523
+ 52: [2, 32]
524
+ },
525
+ parseError: /* @__PURE__ */ t(function(e, t) {
526
+ if (t.recoverable) this.trace(e);
527
+ else {
528
+ var n = Error(e);
529
+ throw n.hash = t, n;
530
+ }
531
+ }, "parseError"),
532
+ parse: /* @__PURE__ */ t(function(e) {
533
+ var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
534
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
535
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
536
+ var v = h.yylloc;
537
+ o.push(v);
538
+ var y = h.options && h.options.ranges;
539
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
540
+ function b(e) {
541
+ r.length -= 2 * e, a.length -= e, o.length -= e;
542
+ }
543
+ t(b, "popStack");
544
+ function x() {
545
+ var e = i.pop() || h.lex() || p;
546
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
547
+ }
548
+ t(x, "lex");
549
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
550
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
551
+ var M = "";
552
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
553
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
554
+ text: h.match,
555
+ token: this.terminals_[S] || S,
556
+ line: h.yylineno,
557
+ loc: v,
558
+ expected: j
559
+ });
560
+ }
561
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
562
+ switch (T[0]) {
563
+ case 1:
564
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
565
+ break;
566
+ case 2:
567
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
568
+ first_line: o[o.length - (k || 1)].first_line,
569
+ last_line: o[o.length - 1].last_line,
570
+ first_column: o[o.length - (k || 1)].first_column,
571
+ last_column: o[o.length - 1].last_column
572
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
573
+ c,
574
+ u,
575
+ l,
576
+ g.yy,
577
+ T[1],
578
+ a,
579
+ o
580
+ ].concat(m)), E !== void 0) return E;
581
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
582
+ break;
583
+ case 3: return !0;
584
+ }
585
+ }
586
+ return !0;
587
+ }, "parse")
588
+ };
589
+ _.lexer = /* @__PURE__ */ (function() {
590
+ return {
591
+ EOF: 1,
592
+ parseError: /* @__PURE__ */ t(function(e, t) {
593
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
594
+ else throw Error(e);
595
+ }, "parseError"),
596
+ setInput: /* @__PURE__ */ t(function(e, t) {
597
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
598
+ first_line: 1,
599
+ first_column: 0,
600
+ last_line: 1,
601
+ last_column: 0
602
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
603
+ }, "setInput"),
604
+ input: /* @__PURE__ */ t(function() {
605
+ var e = this._input[0];
606
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
607
+ }, "input"),
608
+ unput: /* @__PURE__ */ t(function(e) {
609
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
610
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
611
+ var r = this.match.split(/(?:\r\n?|\n)/g);
612
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
613
+ var i = this.yylloc.range;
614
+ return this.yylloc = {
615
+ first_line: this.yylloc.first_line,
616
+ last_line: this.yylineno + 1,
617
+ first_column: this.yylloc.first_column,
618
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
619
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
620
+ }, "unput"),
621
+ more: /* @__PURE__ */ t(function() {
622
+ return this._more = !0, this;
623
+ }, "more"),
624
+ reject: /* @__PURE__ */ t(function() {
625
+ if (this.options.backtrack_lexer) this._backtrack = !0;
626
+ 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).\n" + this.showPosition(), {
627
+ text: "",
628
+ token: null,
629
+ line: this.yylineno
630
+ });
631
+ return this;
632
+ }, "reject"),
633
+ less: /* @__PURE__ */ t(function(e) {
634
+ this.unput(this.match.slice(e));
635
+ }, "less"),
636
+ pastInput: /* @__PURE__ */ t(function() {
637
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
638
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
639
+ }, "pastInput"),
640
+ upcomingInput: /* @__PURE__ */ t(function() {
641
+ var e = this.match;
642
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
643
+ }, "upcomingInput"),
644
+ showPosition: /* @__PURE__ */ t(function() {
645
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
646
+ return e + this.upcomingInput() + "\n" + t + "^";
647
+ }, "showPosition"),
648
+ test_match: /* @__PURE__ */ t(function(e, t) {
649
+ var n, r, i;
650
+ if (this.options.backtrack_lexer && (i = {
651
+ yylineno: this.yylineno,
652
+ yylloc: {
653
+ first_line: this.yylloc.first_line,
654
+ last_line: this.last_line,
655
+ first_column: this.yylloc.first_column,
656
+ last_column: this.yylloc.last_column
657
+ },
658
+ yytext: this.yytext,
659
+ match: this.match,
660
+ matches: this.matches,
661
+ matched: this.matched,
662
+ yyleng: this.yyleng,
663
+ offset: this.offset,
664
+ _more: this._more,
665
+ _input: this._input,
666
+ yy: this.yy,
667
+ conditionStack: this.conditionStack.slice(0),
668
+ done: this.done
669
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
670
+ first_line: this.yylloc.last_line,
671
+ last_line: this.yylineno + 1,
672
+ first_column: this.yylloc.last_column,
673
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
674
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
675
+ if (this._backtrack) {
676
+ for (var a in i) this[a] = i[a];
677
+ return !1;
678
+ }
679
+ return !1;
680
+ }, "test_match"),
681
+ next: /* @__PURE__ */ t(function() {
682
+ if (this.done) return this.EOF;
683
+ this._input || (this.done = !0);
684
+ var e, t, n, r;
685
+ this._more || (this.yytext = "", this.match = "");
686
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
687
+ if (t = n, r = a, this.options.backtrack_lexer) {
688
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
689
+ if (this._backtrack) {
690
+ t = !1;
691
+ continue;
692
+ } else return !1;
693
+ } else if (!this.options.flex) break;
694
+ }
695
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
696
+ text: "",
697
+ token: null,
698
+ line: this.yylineno
699
+ });
700
+ }, "next"),
701
+ lex: /* @__PURE__ */ t(function() {
702
+ return this.next() || this.lex();
703
+ }, "lex"),
704
+ begin: /* @__PURE__ */ t(function(e) {
705
+ this.conditionStack.push(e);
706
+ }, "begin"),
707
+ popState: /* @__PURE__ */ t(function() {
708
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
709
+ }, "popState"),
710
+ _currentRules: /* @__PURE__ */ t(function() {
711
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
712
+ }, "_currentRules"),
713
+ topState: /* @__PURE__ */ t(function(e) {
714
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
715
+ }, "topState"),
716
+ pushState: /* @__PURE__ */ t(function(e) {
717
+ this.begin(e);
718
+ }, "pushState"),
719
+ stateStackSize: /* @__PURE__ */ t(function() {
720
+ return this.conditionStack.length;
721
+ }, "stateStackSize"),
722
+ options: {},
723
+ performAction: /* @__PURE__ */ t(function(e, t, n, r) {
724
+ switch (n) {
725
+ case 0: return e.getLogger().debug("Found block-beta"), 10;
726
+ case 1: return e.getLogger().debug("Found id-block"), 29;
727
+ case 2: return e.getLogger().debug("Found block"), 10;
728
+ case 3:
729
+ e.getLogger().debug(".", t.yytext);
730
+ break;
731
+ case 4:
732
+ e.getLogger().debug("_", t.yytext);
733
+ break;
734
+ case 5: return 5;
735
+ case 6: return t.yytext = -1, 28;
736
+ case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
737
+ case 8:
738
+ this.pushState("md_string");
739
+ break;
740
+ case 9: return "MD_STR";
741
+ case 10:
742
+ this.popState();
743
+ break;
744
+ case 11:
745
+ this.pushState("string");
746
+ break;
747
+ case 12:
748
+ e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
749
+ break;
750
+ case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
751
+ case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
752
+ case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
753
+ case 16: return 42;
754
+ case 17: return "LINKSTYLE";
755
+ case 18: return "INTERPOLATE";
756
+ case 19: return this.pushState("CLASSDEF"), 39;
757
+ case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
758
+ case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
759
+ case 22: return this.popState(), 41;
760
+ case 23: return this.pushState("CLASS"), 43;
761
+ case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
762
+ case 25: return this.popState(), 45;
763
+ case 26: return this.pushState("STYLE_STMNT"), 46;
764
+ case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
765
+ case 28: return this.popState(), 48;
766
+ case 29: return this.pushState("acc_title"), "acc_title";
767
+ case 30: return this.popState(), "acc_title_value";
768
+ case 31: return this.pushState("acc_descr"), "acc_descr";
769
+ case 32: return this.popState(), "acc_descr_value";
770
+ case 33:
771
+ this.pushState("acc_descr_multiline");
772
+ break;
773
+ case 34:
774
+ this.popState();
775
+ break;
776
+ case 35: return "acc_descr_multiline_value";
777
+ case 36: return 30;
778
+ case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
779
+ case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
780
+ case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
781
+ case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
782
+ case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
783
+ case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
784
+ case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
785
+ case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
786
+ case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
787
+ case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
788
+ case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
789
+ case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
790
+ case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
791
+ case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
792
+ case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
793
+ case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
794
+ case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
795
+ case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
796
+ case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
797
+ case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
798
+ case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
799
+ case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
800
+ case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
801
+ case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
802
+ case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
803
+ case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
804
+ case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
805
+ case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
806
+ case 65: return this.pushState("NODE"), 35;
807
+ case 66: return this.pushState("NODE"), 35;
808
+ case 67: return this.pushState("NODE"), 35;
809
+ case 68: return this.pushState("NODE"), 35;
810
+ case 69: return this.pushState("NODE"), 35;
811
+ case 70: return this.pushState("NODE"), 35;
812
+ case 71: return this.pushState("NODE"), 35;
813
+ case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
814
+ case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
815
+ case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
816
+ case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
817
+ case 76:
818
+ this.pushState("md_string");
819
+ break;
820
+ case 77:
821
+ this.pushState("md_string");
822
+ break;
823
+ case 78: return "NODE_DESCR";
824
+ case 79:
825
+ this.popState();
826
+ break;
827
+ case 80:
828
+ e.getLogger().debug("Lex: Starting string"), this.pushState("string");
829
+ break;
830
+ case 81:
831
+ e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
832
+ break;
833
+ case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
834
+ case 83:
835
+ e.getLogger().debug("LEX POPPING"), this.popState();
836
+ break;
837
+ case 84:
838
+ e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
839
+ break;
840
+ case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
841
+ case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
842
+ case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
843
+ case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
844
+ case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
845
+ case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
846
+ case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
847
+ case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
848
+ case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
849
+ case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
850
+ case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
851
+ case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
852
+ case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
853
+ case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
854
+ case 99:
855
+ this.pushState("md_string");
856
+ break;
857
+ case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
858
+ case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
859
+ case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
860
+ case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
861
+ case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
862
+ }
863
+ }, "anonymous"),
864
+ rules: [
865
+ /^(?:block-beta\b)/,
866
+ /^(?:block:)/,
867
+ /^(?:block\b)/,
868
+ /^(?:[\s]+)/,
869
+ /^(?:[\n]+)/,
870
+ /^(?:((\u000D\u000A)|(\u000A)))/,
871
+ /^(?:columns\s+auto\b)/,
872
+ /^(?:columns\s+[\d]+)/,
873
+ /^(?:["][`])/,
874
+ /^(?:[^`"]+)/,
875
+ /^(?:[`]["])/,
876
+ /^(?:["])/,
877
+ /^(?:["])/,
878
+ /^(?:[^"]*)/,
879
+ /^(?:space[:]\d+)/,
880
+ /^(?:space\b)/,
881
+ /^(?:default\b)/,
882
+ /^(?:linkStyle\b)/,
883
+ /^(?:interpolate\b)/,
884
+ /^(?:classDef\s+)/,
885
+ /^(?:DEFAULT\s+)/,
886
+ /^(?:\w+\s+)/,
887
+ /^(?:[^\n]*)/,
888
+ /^(?:class\s+)/,
889
+ /^(?:(\w+)+((,\s*\w+)*))/,
890
+ /^(?:[^\n]*)/,
891
+ /^(?:style\s+)/,
892
+ /^(?:(\w+)+((,\s*\w+)*))/,
893
+ /^(?:[^\n]*)/,
894
+ /^(?:accTitle\s*:\s*)/,
895
+ /^(?:(?!\n||)*[^\n]*)/,
896
+ /^(?:accDescr\s*:\s*)/,
897
+ /^(?:(?!\n||)*[^\n]*)/,
898
+ /^(?:accDescr\s*\{\s*)/,
899
+ /^(?:[\}])/,
900
+ /^(?:[^\}]*)/,
901
+ /^(?:end\b\s*)/,
902
+ /^(?:\(\(\()/,
903
+ /^(?:\)\)\))/,
904
+ /^(?:[\)]\))/,
905
+ /^(?:\}\})/,
906
+ /^(?:\})/,
907
+ /^(?:\(-)/,
908
+ /^(?:-\))/,
909
+ /^(?:\(\()/,
910
+ /^(?:\]\])/,
911
+ /^(?:\()/,
912
+ /^(?:\]\))/,
913
+ /^(?:\\\])/,
914
+ /^(?:\/\])/,
915
+ /^(?:\)\])/,
916
+ /^(?:[\)])/,
917
+ /^(?:\]>)/,
918
+ /^(?:[\]])/,
919
+ /^(?:-\))/,
920
+ /^(?:\(-)/,
921
+ /^(?:\)\))/,
922
+ /^(?:\))/,
923
+ /^(?:\(\(\()/,
924
+ /^(?:\(\()/,
925
+ /^(?:\{\{)/,
926
+ /^(?:\{)/,
927
+ /^(?:>)/,
928
+ /^(?:\(\[)/,
929
+ /^(?:\()/,
930
+ /^(?:\[\[)/,
931
+ /^(?:\[\|)/,
932
+ /^(?:\[\()/,
933
+ /^(?:\)\)\))/,
934
+ /^(?:\[\\)/,
935
+ /^(?:\[\/)/,
936
+ /^(?:\[\\)/,
937
+ /^(?:\[)/,
938
+ /^(?:<\[)/,
939
+ /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,
940
+ /^(?:$)/,
941
+ /^(?:["][`])/,
942
+ /^(?:["][`])/,
943
+ /^(?:[^`"]+)/,
944
+ /^(?:[`]["])/,
945
+ /^(?:["])/,
946
+ /^(?:["])/,
947
+ /^(?:[^"]+)/,
948
+ /^(?:["])/,
949
+ /^(?:\]>\s*\()/,
950
+ /^(?:,?\s*right\s*)/,
951
+ /^(?:,?\s*left\s*)/,
952
+ /^(?:,?\s*x\s*)/,
953
+ /^(?:,?\s*y\s*)/,
954
+ /^(?:,?\s*up\s*)/,
955
+ /^(?:,?\s*down\s*)/,
956
+ /^(?:\)\s*)/,
957
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
958
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
959
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
960
+ /^(?:\s*~~[\~]+\s*)/,
961
+ /^(?:\s*[xo<]?--\s*)/,
962
+ /^(?:\s*[xo<]?==\s*)/,
963
+ /^(?:\s*[xo<]?-\.\s*)/,
964
+ /^(?:["][`])/,
965
+ /^(?:["])/,
966
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
967
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
968
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
969
+ /^(?::\d+)/
970
+ ],
971
+ conditions: {
972
+ STYLE_DEFINITION: {
973
+ rules: [28],
974
+ inclusive: !1
975
+ },
976
+ STYLE_STMNT: {
977
+ rules: [27],
978
+ inclusive: !1
979
+ },
980
+ CLASSDEFID: {
981
+ rules: [22],
982
+ inclusive: !1
983
+ },
984
+ CLASSDEF: {
985
+ rules: [20, 21],
986
+ inclusive: !1
987
+ },
988
+ CLASS_STYLE: {
989
+ rules: [25],
990
+ inclusive: !1
991
+ },
992
+ CLASS: {
993
+ rules: [24],
994
+ inclusive: !1
995
+ },
996
+ LLABEL: {
997
+ rules: [
998
+ 99,
999
+ 100,
1000
+ 101,
1001
+ 102,
1002
+ 103
1003
+ ],
1004
+ inclusive: !1
1005
+ },
1006
+ ARROW_DIR: {
1007
+ rules: [
1008
+ 85,
1009
+ 86,
1010
+ 87,
1011
+ 88,
1012
+ 89,
1013
+ 90,
1014
+ 91
1015
+ ],
1016
+ inclusive: !1
1017
+ },
1018
+ BLOCK_ARROW: {
1019
+ rules: [
1020
+ 76,
1021
+ 81,
1022
+ 84
1023
+ ],
1024
+ inclusive: !1
1025
+ },
1026
+ NODE: {
1027
+ rules: [
1028
+ 37,
1029
+ 38,
1030
+ 39,
1031
+ 40,
1032
+ 41,
1033
+ 42,
1034
+ 43,
1035
+ 44,
1036
+ 45,
1037
+ 46,
1038
+ 47,
1039
+ 48,
1040
+ 49,
1041
+ 50,
1042
+ 51,
1043
+ 52,
1044
+ 53,
1045
+ 77,
1046
+ 80
1047
+ ],
1048
+ inclusive: !1
1049
+ },
1050
+ md_string: {
1051
+ rules: [
1052
+ 9,
1053
+ 10,
1054
+ 78,
1055
+ 79
1056
+ ],
1057
+ inclusive: !1
1058
+ },
1059
+ space: {
1060
+ rules: [],
1061
+ inclusive: !1
1062
+ },
1063
+ string: {
1064
+ rules: [
1065
+ 12,
1066
+ 13,
1067
+ 82,
1068
+ 83
1069
+ ],
1070
+ inclusive: !1
1071
+ },
1072
+ acc_descr_multiline: {
1073
+ rules: [34, 35],
1074
+ inclusive: !1
1075
+ },
1076
+ acc_descr: {
1077
+ rules: [32],
1078
+ inclusive: !1
1079
+ },
1080
+ acc_title: {
1081
+ rules: [30],
1082
+ inclusive: !1
1083
+ },
1084
+ INITIAL: {
1085
+ rules: [
1086
+ 0,
1087
+ 1,
1088
+ 2,
1089
+ 3,
1090
+ 4,
1091
+ 5,
1092
+ 6,
1093
+ 7,
1094
+ 8,
1095
+ 11,
1096
+ 14,
1097
+ 15,
1098
+ 16,
1099
+ 17,
1100
+ 18,
1101
+ 19,
1102
+ 23,
1103
+ 26,
1104
+ 29,
1105
+ 31,
1106
+ 33,
1107
+ 36,
1108
+ 54,
1109
+ 55,
1110
+ 56,
1111
+ 57,
1112
+ 58,
1113
+ 59,
1114
+ 60,
1115
+ 61,
1116
+ 62,
1117
+ 63,
1118
+ 64,
1119
+ 65,
1120
+ 66,
1121
+ 67,
1122
+ 68,
1123
+ 69,
1124
+ 70,
1125
+ 71,
1126
+ 72,
1127
+ 73,
1128
+ 74,
1129
+ 75,
1130
+ 92,
1131
+ 93,
1132
+ 94,
1133
+ 95,
1134
+ 96,
1135
+ 97,
1136
+ 98,
1137
+ 104
1138
+ ],
1139
+ inclusive: !0
1140
+ }
1141
+ }
1142
+ };
1143
+ })();
1144
+ function v() {
1145
+ this.yy = {};
1146
+ }
1147
+ return t(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1148
+ })();
1149
+ T.parser = T;
1150
+ var E = T, D = /* @__PURE__ */ new Map(), O = [], k = /* @__PURE__ */ new Map(), A = "color", j = "fill", M = "bgFill", ee = ",", te = o(), N = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ t((e) => u.sanitizeText(e, te), "sanitizeText"), re = /* @__PURE__ */ t(function(e, t = "") {
1151
+ let n = N.get(e);
1152
+ n || (n = {
1153
+ id: e,
1154
+ styles: [],
1155
+ textStyles: []
1156
+ }, N.set(e, n)), t?.split(ee).forEach((e) => {
1157
+ let t = e.replace(/([^;]*);/, "$1").trim();
1158
+ if (RegExp(A).exec(e)) {
1159
+ let e = t.replace(j, M).replace(A, j);
1160
+ n.textStyles.push(e);
1161
+ }
1162
+ n.styles.push(t);
1163
+ });
1164
+ }, "addStyleClass"), ie = /* @__PURE__ */ t(function(e, t = "") {
1165
+ let n = D.get(e);
1166
+ t != null && (n.styles = t.split(ee));
1167
+ }, "addStyle2Node"), ae = /* @__PURE__ */ t(function(e, t) {
1168
+ e.split(",").forEach(function(e) {
1169
+ let n = D.get(e);
1170
+ if (n === void 0) {
1171
+ let t = e.trim();
1172
+ n = {
1173
+ id: t,
1174
+ type: "na",
1175
+ children: []
1176
+ }, D.set(t, n);
1177
+ }
1178
+ n.classes ||= [], n.classes.push(t);
1179
+ });
1180
+ }, "setCssClass"), oe = /* @__PURE__ */ t((t, n) => {
1181
+ let r = t.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1182
+ for (let t of r) {
1183
+ if (typeof a == "number" && a > 0 && t.type !== "column-setting" && typeof t.widthInColumns == "number" && t.widthInColumns > a && e.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${a}`), t.label &&= ne(t.label), t.type === "classDef") {
1184
+ re(t.id, t.css);
1185
+ continue;
1186
+ }
1187
+ if (t.type === "applyClass") {
1188
+ ae(t.id, t?.styleClass ?? "");
1189
+ continue;
1190
+ }
1191
+ if (t.type === "applyStyles") {
1192
+ t?.stylesStr && ie(t.id, t?.stylesStr);
1193
+ continue;
1194
+ }
1195
+ if (t.type === "column-setting") n.columns = t.columns ?? -1;
1196
+ else if (t.type === "edge") {
1197
+ let e = (k.get(t.id) ?? 0) + 1;
1198
+ k.set(t.id, e), t.id = e + "-" + t.id, O.push(t);
1199
+ } else {
1200
+ t.label || (t.type === "composite" ? t.label = "" : t.label = t.id);
1201
+ let e = D.get(t.id);
1202
+ if (e === void 0 ? D.set(t.id, t) : (t.type !== "na" && (e.type = t.type), t.label !== t.id && (e.label = t.label)), t.children && oe(t.children, t), t.type === "space") {
1203
+ let e = t.width ?? 1;
1204
+ for (let n = 0; n < e; n++) {
1205
+ let e = S(t);
1206
+ e.id = e.id + "-" + n, D.set(e.id, e), i.push(e);
1207
+ }
1208
+ } else e === void 0 && i.push(t);
1209
+ }
1210
+ }
1211
+ n.children = i;
1212
+ }, "populateBlockDatabase"), P = [], F = {
1213
+ id: "root",
1214
+ type: "composite",
1215
+ children: [],
1216
+ columns: -1
1217
+ }, se = /* @__PURE__ */ t(() => {
1218
+ e.debug("Clear called"), a(), F = {
1219
+ id: "root",
1220
+ type: "composite",
1221
+ children: [],
1222
+ columns: -1
1223
+ }, D = /* @__PURE__ */ new Map([["root", F]]), P = [], N = /* @__PURE__ */ new Map(), O = [], k = /* @__PURE__ */ new Map();
1224
+ }, "clear");
1225
+ function ce(t) {
1226
+ switch (e.debug("typeStr2Type", t), t) {
1227
+ case "[]": return "square";
1228
+ case "()": return e.debug("we have a round"), "round";
1229
+ case "(())": return "circle";
1230
+ case ">]": return "rect_left_inv_arrow";
1231
+ case "{}": return "diamond";
1232
+ case "{{}}": return "hexagon";
1233
+ case "([])": return "stadium";
1234
+ case "[[]]": return "subroutine";
1235
+ case "[()]": return "cylinder";
1236
+ case "((()))": return "doublecircle";
1237
+ case "[//]": return "lean_right";
1238
+ case "[\\\\]": return "lean_left";
1239
+ case "[/\\]": return "trapezoid";
1240
+ case "[\\/]": return "inv_trapezoid";
1241
+ case "<[]>": return "block_arrow";
1242
+ default: return "na";
1243
+ }
1244
+ }
1245
+ t(ce, "typeStr2Type");
1246
+ function le(t) {
1247
+ switch (e.debug("typeStr2Type", t), t) {
1248
+ case "==": return "thick";
1249
+ default: return "normal";
1250
+ }
1251
+ }
1252
+ t(le, "edgeTypeStr2Type");
1253
+ function ue(e) {
1254
+ switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
1255
+ case "x": return "arrow_cross";
1256
+ case "o": return "arrow_circle";
1257
+ case ">": return "arrow_point";
1258
+ default: return "";
1259
+ }
1260
+ }
1261
+ t(ue, "edgeStrToEdgeData");
1262
+ var de = 0, fe = {
1263
+ getConfig: /* @__PURE__ */ t(() => d().block, "getConfig"),
1264
+ typeStr2Type: ce,
1265
+ edgeTypeStr2Type: le,
1266
+ edgeStrToEdgeData: ue,
1267
+ getLogger: /* @__PURE__ */ t(() => e, "getLogger"),
1268
+ getBlocksFlat: /* @__PURE__ */ t(() => [...D.values()], "getBlocksFlat"),
1269
+ getBlocks: /* @__PURE__ */ t(() => P || [], "getBlocks"),
1270
+ getEdges: /* @__PURE__ */ t(() => O, "getEdges"),
1271
+ setHierarchy: /* @__PURE__ */ t((e) => {
1272
+ F.children = e, oe(e, F), P = F.children;
1273
+ }, "setHierarchy"),
1274
+ getBlock: /* @__PURE__ */ t((e) => D.get(e), "getBlock"),
1275
+ setBlock: /* @__PURE__ */ t((e) => {
1276
+ D.set(e.id, e);
1277
+ }, "setBlock"),
1278
+ getColumns: /* @__PURE__ */ t((e) => {
1279
+ let t = D.get(e);
1280
+ return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1281
+ }, "getColumns"),
1282
+ getClasses: /* @__PURE__ */ t(function() {
1283
+ return N;
1284
+ }, "getClasses"),
1285
+ clear: se,
1286
+ generateId: /* @__PURE__ */ t(() => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + de), "generateId")
1287
+ }, I = /* @__PURE__ */ t((e, t) => {
1288
+ let n = f;
1289
+ return c(n(e, "r"), n(e, "g"), n(e, "b"), t);
1290
+ }, "fade"), pe = /* @__PURE__ */ t((e) => `.label {
1291
+ font-family: ${e.fontFamily};
1292
+ color: ${e.nodeTextColor || e.textColor};
1293
+ }
1294
+ .cluster-label text {
1295
+ fill: ${e.titleColor};
1296
+ }
1297
+ .cluster-label span,p {
1298
+ color: ${e.titleColor};
1299
+ }
1300
+
1301
+
1302
+
1303
+ .label text,span,p {
1304
+ fill: ${e.nodeTextColor || e.textColor};
1305
+ color: ${e.nodeTextColor || e.textColor};
1306
+ }
1307
+
1308
+ .node rect,
1309
+ .node circle,
1310
+ .node ellipse,
1311
+ .node polygon,
1312
+ .node path {
1313
+ fill: ${e.mainBkg};
1314
+ stroke: ${e.nodeBorder};
1315
+ stroke-width: 1px;
1316
+ }
1317
+ .flowchart-label text {
1318
+ text-anchor: middle;
1319
+ }
1320
+ // .flowchart-label .text-outer-tspan {
1321
+ // text-anchor: middle;
1322
+ // }
1323
+ // .flowchart-label .text-inner-tspan {
1324
+ // text-anchor: start;
1325
+ // }
1326
+
1327
+ .node .label {
1328
+ text-align: center;
1329
+ }
1330
+ .node.clickable {
1331
+ cursor: pointer;
1332
+ }
1333
+
1334
+ .arrowheadPath {
1335
+ fill: ${e.arrowheadColor};
1336
+ }
1337
+
1338
+ .edgePath .path {
1339
+ stroke: ${e.lineColor};
1340
+ stroke-width: 2.0px;
1341
+ }
1342
+
1343
+ .flowchart-link {
1344
+ stroke: ${e.lineColor};
1345
+ fill: none;
1346
+ }
1347
+
1348
+ .edgeLabel {
1349
+ background-color: ${e.edgeLabelBackground};
1350
+ rect {
1351
+ opacity: 0.5;
1352
+ background-color: ${e.edgeLabelBackground};
1353
+ fill: ${e.edgeLabelBackground};
1354
+ }
1355
+ text-align: center;
1356
+ }
1357
+
1358
+ /* For html labels only */
1359
+ .labelBkg {
1360
+ background-color: ${I(e.edgeLabelBackground, .5)};
1361
+ // background-color:
1362
+ }
1363
+
1364
+ .node .cluster {
1365
+ // fill: ${I(e.mainBkg, .5)};
1366
+ fill: ${I(e.clusterBkg, .5)};
1367
+ stroke: ${I(e.clusterBorder, .2)};
1368
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1369
+ stroke-width: 1px;
1370
+ }
1371
+
1372
+ .cluster text {
1373
+ fill: ${e.titleColor};
1374
+ }
1375
+
1376
+ .cluster span,p {
1377
+ color: ${e.titleColor};
1378
+ }
1379
+ /* .cluster div {
1380
+ color: ${e.titleColor};
1381
+ } */
1382
+
1383
+ div.mermaidTooltip {
1384
+ position: absolute;
1385
+ text-align: center;
1386
+ max-width: 200px;
1387
+ padding: 2px;
1388
+ font-family: ${e.fontFamily};
1389
+ font-size: 12px;
1390
+ background: ${e.tertiaryColor};
1391
+ border: 1px solid ${e.border2};
1392
+ border-radius: 2px;
1393
+ pointer-events: none;
1394
+ z-index: 100;
1395
+ }
1396
+
1397
+ .flowchartTitleText {
1398
+ text-anchor: middle;
1399
+ font-size: 18px;
1400
+ fill: ${e.textColor};
1401
+ }
1402
+ ${w()}
1403
+ `, "getStyles"), me = /* @__PURE__ */ t((e, t, n, r) => {
1404
+ t.forEach((t) => {
1405
+ he[t](e, n, r);
1406
+ });
1407
+ }, "insertMarkers"), he = {
1408
+ extension: /* @__PURE__ */ t((t, n, r) => {
1409
+ e.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionStart").attr("class", "marker extension " + n).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionEnd").attr("class", "marker extension " + n).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
1410
+ }, "extension"),
1411
+ composition: /* @__PURE__ */ t((e, t, n) => {
1412
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1413
+ }, "composition"),
1414
+ aggregation: /* @__PURE__ */ t((e, t, n) => {
1415
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1416
+ }, "aggregation"),
1417
+ dependency: /* @__PURE__ */ t((e, t, n) => {
1418
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1419
+ }, "dependency"),
1420
+ lollipop: /* @__PURE__ */ t((e, t, n) => {
1421
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
1422
+ }, "lollipop"),
1423
+ point: /* @__PURE__ */ t((e, t, n) => {
1424
+ e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1425
+ }, "point"),
1426
+ circle: /* @__PURE__ */ t((e, t, n) => {
1427
+ e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1428
+ }, "circle"),
1429
+ cross: /* @__PURE__ */ t((e, t, n) => {
1430
+ e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
1431
+ }, "cross"),
1432
+ barb: /* @__PURE__ */ t((e, t, n) => {
1433
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
1434
+ }, "barb")
1435
+ }, ge = me, L = o()?.block?.padding ?? 8;
1436
+ function _e(e, t) {
1437
+ if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1438
+ if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1439
+ return e < 0 ? {
1440
+ px: t,
1441
+ py: 0
1442
+ } : e === 1 ? {
1443
+ px: 0,
1444
+ py: t
1445
+ } : {
1446
+ px: t % e,
1447
+ py: Math.floor(t / e)
1448
+ };
1449
+ }
1450
+ t(_e, "calculateBlockPosition");
1451
+ var ve = /* @__PURE__ */ t((t) => {
1452
+ let n = 0, r = 0;
1453
+ for (let i of t.children) {
1454
+ let { width: a, height: o, x: s, y: c } = i.size ?? {
1455
+ width: 0,
1456
+ height: 0,
1457
+ x: 0,
1458
+ y: 0
1459
+ };
1460
+ e.debug("getMaxChildSize abc95 child:", i.id, "width:", a, "height:", o, "x:", s, "y:", c, i.type), i.type !== "space" && (a > n && (n = a / (t.widthInColumns ?? 1)), o > r && (r = o));
1461
+ }
1462
+ return {
1463
+ width: n,
1464
+ height: r
1465
+ };
1466
+ }, "getMaxChildSize");
1467
+ function R(t, n, r = 0, i = 0) {
1468
+ e.debug("setBlockSizes abc95 (start)", t.id, t?.size?.x, "block width =", t?.size, "siblingWidth", r), t?.size?.width || (t.size = {
1469
+ width: r,
1470
+ height: i,
1471
+ x: 0,
1472
+ y: 0
1473
+ });
1474
+ let a = 0, o = 0;
1475
+ if (t.children?.length > 0) {
1476
+ for (let e of t.children) R(e, n);
1477
+ let s = ve(t);
1478
+ a = s.width, o = s.height, e.debug("setBlockSizes abc95 maxWidth of", t.id, ":s children is ", a, o);
1479
+ for (let n of t.children) n.size && (e.debug(`abc95 Setting size of children of ${t.id} id=${n.id} ${a} ${o} ${JSON.stringify(n.size)}`), n.size.width = a * (n.widthInColumns ?? 1) + L * ((n.widthInColumns ?? 1) - 1), n.size.height = o, n.size.x = 0, n.size.y = 0, e.debug(`abc95 updating size of ${t.id} children child:${n.id} maxWidth:${a} maxHeight:${o}`));
1480
+ for (let e of t.children) R(e, n, a, o);
1481
+ let c = t.columns ?? -1, l = 0;
1482
+ for (let e of t.children) l += e.widthInColumns ?? 1;
1483
+ let u = t.children.length;
1484
+ c > 0 && c < l && (u = c);
1485
+ let d = Math.ceil(l / u), f = u * (a + L) + L, p = d * (o + L) + L;
1486
+ if (f < r) {
1487
+ e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${f}`), f = r, p = i;
1488
+ let n = (r - u * L - L) / u, s = (i - d * L - L) / d;
1489
+ e.debug("Size indata abc88", t.id, "childWidth", n, "maxWidth", a), e.debug("Size indata abc88", t.id, "childHeight", s, "maxHeight", o), e.debug("Size indata abc88 xSize", u, "padding", L);
1490
+ for (let e of t.children) e.size && (e.size.width = n, e.size.height = s, e.size.x = 0, e.size.y = 0);
1491
+ }
1492
+ if (e.debug(`abc95 (finale calc) ${t.id} xSize ${u} ySize ${d} columns ${c}${t.children.length} width=${Math.max(f, t.size?.width || 0)}`), f < (t?.size?.width || 0)) {
1493
+ f = t?.size?.width || 0;
1494
+ let n = c > 0 ? Math.min(t.children.length, c) : t.children.length;
1495
+ if (n > 0) {
1496
+ let r = (f - n * L - L) / n;
1497
+ e.debug("abc95 (growing to fit) width", t.id, f, t.size?.width, r);
1498
+ for (let e of t.children) e.size && (e.size.width = r);
1499
+ }
1500
+ }
1501
+ t.size = {
1502
+ width: f,
1503
+ height: p,
1504
+ x: 0,
1505
+ y: 0
1506
+ };
1507
+ }
1508
+ e.debug("setBlockSizes abc94 (done)", t.id, t?.size?.x, t?.size?.width, t?.size?.y, t?.size?.height);
1509
+ }
1510
+ t(R, "setBlockSizes");
1511
+ function z(t, n) {
1512
+ e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1513
+ let r = t.columns ?? -1;
1514
+ if (e.debug("layoutBlocks columns abc95", t.id, "=>", r, t), t.children && t.children.length > 0) {
1515
+ let i = t?.children[0]?.size?.width ?? 0, a = t.children.length * i + (t.children.length - 1) * L;
1516
+ e.debug("widthOfChildren 88", a, "posX");
1517
+ let o = 0;
1518
+ e.debug("abc91 block?.size?.x", t.id, t?.size?.x);
1519
+ let s = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -L, c = 0;
1520
+ for (let i of t.children) {
1521
+ let a = t;
1522
+ if (!i.size) continue;
1523
+ let { width: l, height: u } = i.size, { px: d, py: f } = _e(r, o);
1524
+ if (f != c && (c = f, s = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -L, e.debug("New row in layout for block", t.id, " and child ", i.id, c)), e.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${o} (px, py) ${d},${f} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${l}${L}`), a.size) {
1525
+ let t = l / 2;
1526
+ i.size.x = s + L + t, e.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${s} new startingPosX${i.size.x} ${t} padding=${L} width=${l} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${l * (i?.widthInColumns ?? 1) / 2}`), s = i.size.x + t, i.size.y = a.size.y - a.size.height / 2 + f * (u + L) + u / 2 + L, e.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${s}${L}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${l * (i?.widthInColumns ?? 1) / 2}`);
1527
+ }
1528
+ i.children && z(i, n);
1529
+ let p = i?.widthInColumns ?? 1;
1530
+ r > 0 && (p = Math.min(p, r - o % r)), o += p, e.debug("abc88 columnsPos", i, o);
1531
+ }
1532
+ }
1533
+ e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1534
+ }
1535
+ t(z, "layoutBlocks");
1536
+ function B(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1537
+ minX: 0,
1538
+ minY: 0,
1539
+ maxX: 0,
1540
+ maxY: 0
1541
+ }) {
1542
+ if (e.size && e.id !== "root") {
1543
+ let { x: a, y: o, width: s, height: c } = e.size;
1544
+ a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
1545
+ }
1546
+ if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = B(a, {
1547
+ minX: t,
1548
+ minY: n,
1549
+ maxX: r,
1550
+ maxY: i
1551
+ }));
1552
+ return {
1553
+ minX: t,
1554
+ minY: n,
1555
+ maxX: r,
1556
+ maxY: i
1557
+ };
1558
+ }
1559
+ t(B, "findBounds");
1560
+ function ye(t) {
1561
+ let n = t.getBlock("root");
1562
+ if (!n) return;
1563
+ R(n, t, 0, 0), z(n, t), e.debug("getBlocks", JSON.stringify(n, null, 2));
1564
+ let { minX: r, minY: i, maxX: a, maxY: o } = B(n), s = o - i;
1565
+ return {
1566
+ x: r,
1567
+ y: i,
1568
+ width: a - r,
1569
+ height: s
1570
+ };
1571
+ }
1572
+ t(ye, "layout");
1573
+ function V(e, t) {
1574
+ t && e.attr("style", t);
1575
+ }
1576
+ t(V, "applyStyle");
1577
+ function be(e, t) {
1578
+ let r = n(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), a = r.append("xhtml:div"), o = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", c = a.append("span");
1579
+ return c.html(i(o, t)), V(c, e.labelStyle), c.attr("class", s), V(a, e.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"), a.attr("xmlns", "http://www.w3.org/1999/xhtml"), r.node();
1580
+ }
1581
+ t(be, "addHtmlLabel");
1582
+ var H = /* @__PURE__ */ t(async (t, n, r, i) => {
1583
+ let a = t || "";
1584
+ typeof a == "object" && (a = a[0]);
1585
+ let s = o();
1586
+ if (l(s.flowchart.htmlLabels)) return a = a.replace(/\\n|\n/g, "<br />"), e.debug("vertexText" + a), be({
1587
+ isNode: i,
1588
+ label: await b(g(a)),
1589
+ labelStyle: n.replace("fill:", "color:")
1590
+ }, s);
1591
+ {
1592
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "text");
1593
+ e.setAttribute("style", n.replace("color:", "fill:"));
1594
+ let t = [];
1595
+ t = typeof a == "string" ? a.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(a) ? a : [];
1596
+ for (let n of t) {
1597
+ let t = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1598
+ t.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), t.setAttribute("dy", "1em"), t.setAttribute("x", "0"), r ? t.setAttribute("class", "title-row") : t.setAttribute("class", "row"), t.textContent = n.trim(), e.appendChild(t);
1599
+ }
1600
+ return e;
1601
+ }
1602
+ }, "createLabel"), xe = /* @__PURE__ */ t((e, t, n, r, i) => {
1603
+ t.arrowTypeStart && Ce(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && Ce(e, "end", t.arrowTypeEnd, n, r, i);
1604
+ }, "addEdgeMarkers"), Se = {
1605
+ arrow_cross: "cross",
1606
+ arrow_point: "point",
1607
+ arrow_barb: "barb",
1608
+ arrow_circle: "circle",
1609
+ aggregation: "aggregation",
1610
+ extension: "extension",
1611
+ composition: "composition",
1612
+ dependency: "dependency",
1613
+ lollipop: "lollipop"
1614
+ }, Ce = /* @__PURE__ */ t((t, n, r, i, a, o) => {
1615
+ let s = Se[r];
1616
+ if (!s) {
1617
+ e.warn(`Unknown arrow type: ${r}`);
1618
+ return;
1619
+ }
1620
+ let c = n === "start" ? "Start" : "End";
1621
+ t.attr(`marker-${n}`, `url(${i}#${a}_${o}-${s}${c})`);
1622
+ }, "addEdgeMarker"), U = {}, W = {}, we = /* @__PURE__ */ t(async (e, t) => {
1623
+ let r = o(), i = l(r.flowchart.htmlLabels), a = t.labelType === "markdown" ? x(e, t.label, {
1624
+ style: t.labelStyle,
1625
+ useHtmlLabels: i,
1626
+ addSvgBackground: !0
1627
+ }, r) : await H(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), c = s.insert("g").attr("class", "label");
1628
+ c.node().appendChild(a);
1629
+ let u = a.getBBox();
1630
+ if (i) {
1631
+ let e = a.children[0], t = n(a);
1632
+ u = e.getBoundingClientRect(), t.attr("width", u.width), t.attr("height", u.height);
1633
+ }
1634
+ c.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), U[t.id] = s, t.width = u.width, t.height = u.height;
1635
+ let d;
1636
+ if (t.startLabelLeft) {
1637
+ let n = await H(t.startLabelLeft, t.labelStyle), r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner");
1638
+ d = i.node().appendChild(n);
1639
+ let a = n.getBBox();
1640
+ i.attr("transform", "translate(" + -a.width / 2 + ", " + -a.height / 2 + ")"), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = r, G(d, t.startLabelLeft);
1641
+ }
1642
+ if (t.startLabelRight) {
1643
+ let n = await H(t.startLabelRight, t.labelStyle), r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner");
1644
+ d = r.node().appendChild(n), i.node().appendChild(n);
1645
+ let a = n.getBBox();
1646
+ i.attr("transform", "translate(" + -a.width / 2 + ", " + -a.height / 2 + ")"), W[t.id] || (W[t.id] = {}), W[t.id].startRight = r, G(d, t.startLabelRight);
1647
+ }
1648
+ if (t.endLabelLeft) {
1649
+ let n = await H(t.endLabelLeft, t.labelStyle), r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner");
1650
+ d = i.node().appendChild(n);
1651
+ let a = n.getBBox();
1652
+ i.attr("transform", "translate(" + -a.width / 2 + ", " + -a.height / 2 + ")"), r.node().appendChild(n), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = r, G(d, t.endLabelLeft);
1653
+ }
1654
+ if (t.endLabelRight) {
1655
+ let n = await H(t.endLabelRight, t.labelStyle), r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner");
1656
+ d = i.node().appendChild(n);
1657
+ let a = n.getBBox();
1658
+ i.attr("transform", "translate(" + -a.width / 2 + ", " + -a.height / 2 + ")"), r.node().appendChild(n), W[t.id] || (W[t.id] = {}), W[t.id].endRight = r, G(d, t.endLabelRight);
1659
+ }
1660
+ return a;
1661
+ }, "insertEdgeLabel");
1662
+ function G(e, t) {
1663
+ o().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1664
+ }
1665
+ t(G, "setTerminalWidth");
1666
+ var Te = /* @__PURE__ */ t((t, n) => {
1667
+ e.debug("Moving label abc88 ", t.id, t.label, U[t.id], n);
1668
+ let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = y(o());
1669
+ if (t.label) {
1670
+ let a = U[t.id], o = t.x, s = t.y;
1671
+ if (r) {
1672
+ let i = h.calcLabelPosition(r);
1673
+ e.debug("Moving label " + t.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (o = i.x, s = i.y);
1674
+ }
1675
+ a.attr("transform", `translate(${o}, ${s + i / 2})`);
1676
+ }
1677
+ if (t.startLabelLeft) {
1678
+ let e = W[t.id].startLeft, n = t.x, i = t.y;
1679
+ if (r) {
1680
+ let e = h.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
1681
+ n = e.x, i = e.y;
1682
+ }
1683
+ e.attr("transform", `translate(${n}, ${i})`);
1684
+ }
1685
+ if (t.startLabelRight) {
1686
+ let e = W[t.id].startRight, n = t.x, i = t.y;
1687
+ if (r) {
1688
+ let e = h.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", r);
1689
+ n = e.x, i = e.y;
1690
+ }
1691
+ e.attr("transform", `translate(${n}, ${i})`);
1692
+ }
1693
+ if (t.endLabelLeft) {
1694
+ let e = W[t.id].endLeft, n = t.x, i = t.y;
1695
+ if (r) {
1696
+ let e = h.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
1697
+ n = e.x, i = e.y;
1698
+ }
1699
+ e.attr("transform", `translate(${n}, ${i})`);
1700
+ }
1701
+ if (t.endLabelRight) {
1702
+ let e = W[t.id].endRight, n = t.x, i = t.y;
1703
+ if (r) {
1704
+ let e = h.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
1705
+ n = e.x, i = e.y;
1706
+ }
1707
+ e.attr("transform", `translate(${n}, ${i})`);
1708
+ }
1709
+ }, "positionEdgeLabel"), Ee = /* @__PURE__ */ t((e, t) => {
1710
+ let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
1711
+ return i >= o || a >= s;
1712
+ }, "outsideNode"), De = /* @__PURE__ */ t((t, n, r) => {
1713
+ e.debug(`intersection calc abc89:
1714
+ outsidePoint: ${JSON.stringify(n)}
1715
+ insidePoint : ${JSON.stringify(r)}
1716
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
1717
+ let i = t.x, a = t.y, o = Math.abs(i - r.x), s = t.width / 2, c = r.x < n.x ? s - o : s + o, l = t.height / 2, u = Math.abs(n.y - r.y), d = Math.abs(n.x - r.x);
1718
+ if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
1719
+ let t = r.y < n.y ? n.y - l - a : a - l - n.y;
1720
+ c = d * t / u;
1721
+ let i = {
1722
+ x: r.x < n.x ? r.x + c : r.x - d + c,
1723
+ y: r.y < n.y ? r.y + u - t : r.y - u + t
1724
+ };
1725
+ return c === 0 && (i.x = n.x, i.y = n.y), d === 0 && (i.x = n.x), u === 0 && (i.y = n.y), e.debug(`abc89 topp/bott calc, Q ${u}, q ${t}, R ${d}, r ${c}`, i), i;
1726
+ } else {
1727
+ c = r.x < n.x ? n.x - s - i : i - s - n.x;
1728
+ let t = u * c / d, a = r.x < n.x ? r.x + d - c : r.x - d + c, o = r.y < n.y ? r.y + t : r.y - t;
1729
+ return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`, {
1730
+ _x: a,
1731
+ _y: o
1732
+ }), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
1733
+ x: a,
1734
+ y: o
1735
+ };
1736
+ }
1737
+ }, "intersection"), Oe = /* @__PURE__ */ t((t, n) => {
1738
+ e.debug("abc88 cutPathAtIntersect", t, n);
1739
+ let r = [], i = t[0], a = !1;
1740
+ return t.forEach((e) => {
1741
+ if (!Ee(n, e) && !a) {
1742
+ let t = De(n, i, e), o = !1;
1743
+ r.forEach((e) => {
1744
+ o ||= e.x === t.x && e.y === t.y;
1745
+ }), r.some((e) => e.x === t.x && e.y === t.y) || r.push(t), a = !0;
1746
+ } else i = e, a || r.push(e);
1747
+ }), r;
1748
+ }, "cutPathAtIntersect"), ke = /* @__PURE__ */ t(function(t, n, i, a, s, c, l) {
1749
+ let u = i.points;
1750
+ e.debug("abc88 InsertEdge: edge=", i, "e=", n);
1751
+ let d = !1, f = c.node(n.v);
1752
+ var m = c.node(n.w);
1753
+ m?.intersect && f?.intersect && (u = u.slice(1, i.points.length - 1), u.unshift(f.intersect(u[0])), u.push(m.intersect(u[u.length - 1]))), i.toCluster && (e.debug("to cluster abc88", a[i.toCluster]), u = Oe(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (e.debug("from cluster abc88", a[i.fromCluster]), u = Oe(u.reverse(), a[i.fromCluster].node).reverse(), d = !0);
1754
+ let h = u.filter((e) => !Number.isNaN(e.y)), g = p;
1755
+ i.curve && (s === "graph" || s === "flowchart") && (g = i.curve);
1756
+ let { x: y, y: b } = v(i), x = _().x(y).y(b).curve(g), S;
1757
+ switch (i.thickness) {
1758
+ case "normal":
1759
+ S = "edge-thickness-normal";
1760
+ break;
1761
+ case "thick":
1762
+ S = "edge-thickness-thick";
1763
+ break;
1764
+ case "invisible":
1765
+ S = "edge-thickness-thick";
1766
+ break;
1767
+ default: S = "";
1768
+ }
1769
+ switch (i.pattern) {
1770
+ case "solid":
1771
+ S += " edge-pattern-solid";
1772
+ break;
1773
+ case "dotted":
1774
+ S += " edge-pattern-dotted";
1775
+ break;
1776
+ case "dashed":
1777
+ S += " edge-pattern-dashed";
1778
+ break;
1779
+ }
1780
+ let C = t.append("path").attr("d", x(h)).attr("id", i.id).attr("class", " " + S + (i.classes ? " " + i.classes : "")).attr("style", i.style), w = "";
1781
+ (o().flowchart.arrowMarkerAbsolute || o().state.arrowMarkerAbsolute) && (w = r(!0)), xe(C, i, w, l, s);
1782
+ let T = {};
1783
+ return d && (T.updatedPath = u), T.originalPath = i.points, T;
1784
+ }, "insertEdge"), Ae = /* @__PURE__ */ t((e) => {
1785
+ let t = /* @__PURE__ */ new Set();
1786
+ for (let n of e) switch (n) {
1787
+ case "x":
1788
+ t.add("right"), t.add("left");
1789
+ break;
1790
+ case "y":
1791
+ t.add("up"), t.add("down");
1792
+ break;
1793
+ default:
1794
+ t.add(n);
1795
+ break;
1796
+ }
1797
+ return t;
1798
+ }, "expandAndDeduplicateDirections"), je = /* @__PURE__ */ t((e, t, n) => {
1799
+ let r = Ae(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
1800
+ return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
1801
+ {
1802
+ x: 0,
1803
+ y: 0
1804
+ },
1805
+ {
1806
+ x: a,
1807
+ y: 0
1808
+ },
1809
+ {
1810
+ x: o / 2,
1811
+ y: 2 * s
1812
+ },
1813
+ {
1814
+ x: o - a,
1815
+ y: 0
1816
+ },
1817
+ {
1818
+ x: o,
1819
+ y: 0
1820
+ },
1821
+ {
1822
+ x: o,
1823
+ y: -i / 3
1824
+ },
1825
+ {
1826
+ x: o + 2 * s,
1827
+ y: -i / 2
1828
+ },
1829
+ {
1830
+ x: o,
1831
+ y: -2 * i / 3
1832
+ },
1833
+ {
1834
+ x: o,
1835
+ y: -i
1836
+ },
1837
+ {
1838
+ x: o - a,
1839
+ y: -i
1840
+ },
1841
+ {
1842
+ x: o / 2,
1843
+ y: -i - 2 * s
1844
+ },
1845
+ {
1846
+ x: a,
1847
+ y: -i
1848
+ },
1849
+ {
1850
+ x: 0,
1851
+ y: -i
1852
+ },
1853
+ {
1854
+ x: 0,
1855
+ y: -2 * i / 3
1856
+ },
1857
+ {
1858
+ x: -2 * s,
1859
+ y: -i / 2
1860
+ },
1861
+ {
1862
+ x: 0,
1863
+ y: -i / 3
1864
+ }
1865
+ ] : r.has("right") && r.has("left") && r.has("up") ? [
1866
+ {
1867
+ x: a,
1868
+ y: 0
1869
+ },
1870
+ {
1871
+ x: o - a,
1872
+ y: 0
1873
+ },
1874
+ {
1875
+ x: o,
1876
+ y: -i / 2
1877
+ },
1878
+ {
1879
+ x: o - a,
1880
+ y: -i
1881
+ },
1882
+ {
1883
+ x: a,
1884
+ y: -i
1885
+ },
1886
+ {
1887
+ x: 0,
1888
+ y: -i / 2
1889
+ }
1890
+ ] : r.has("right") && r.has("left") && r.has("down") ? [
1891
+ {
1892
+ x: 0,
1893
+ y: 0
1894
+ },
1895
+ {
1896
+ x: a,
1897
+ y: -i
1898
+ },
1899
+ {
1900
+ x: o - a,
1901
+ y: -i
1902
+ },
1903
+ {
1904
+ x: o,
1905
+ y: 0
1906
+ }
1907
+ ] : r.has("right") && r.has("up") && r.has("down") ? [
1908
+ {
1909
+ x: 0,
1910
+ y: 0
1911
+ },
1912
+ {
1913
+ x: o,
1914
+ y: -a
1915
+ },
1916
+ {
1917
+ x: o,
1918
+ y: -i + a
1919
+ },
1920
+ {
1921
+ x: 0,
1922
+ y: -i
1923
+ }
1924
+ ] : r.has("left") && r.has("up") && r.has("down") ? [
1925
+ {
1926
+ x: o,
1927
+ y: 0
1928
+ },
1929
+ {
1930
+ x: 0,
1931
+ y: -a
1932
+ },
1933
+ {
1934
+ x: 0,
1935
+ y: -i + a
1936
+ },
1937
+ {
1938
+ x: o,
1939
+ y: -i
1940
+ }
1941
+ ] : r.has("right") && r.has("left") ? [
1942
+ {
1943
+ x: a,
1944
+ y: 0
1945
+ },
1946
+ {
1947
+ x: a,
1948
+ y: -s
1949
+ },
1950
+ {
1951
+ x: o - a,
1952
+ y: -s
1953
+ },
1954
+ {
1955
+ x: o - a,
1956
+ y: 0
1957
+ },
1958
+ {
1959
+ x: o,
1960
+ y: -i / 2
1961
+ },
1962
+ {
1963
+ x: o - a,
1964
+ y: -i
1965
+ },
1966
+ {
1967
+ x: o - a,
1968
+ y: -i + s
1969
+ },
1970
+ {
1971
+ x: a,
1972
+ y: -i + s
1973
+ },
1974
+ {
1975
+ x: a,
1976
+ y: -i
1977
+ },
1978
+ {
1979
+ x: 0,
1980
+ y: -i / 2
1981
+ }
1982
+ ] : r.has("up") && r.has("down") ? [
1983
+ {
1984
+ x: o / 2,
1985
+ y: 0
1986
+ },
1987
+ {
1988
+ x: 0,
1989
+ y: -s
1990
+ },
1991
+ {
1992
+ x: a,
1993
+ y: -s
1994
+ },
1995
+ {
1996
+ x: a,
1997
+ y: -i + s
1998
+ },
1999
+ {
2000
+ x: 0,
2001
+ y: -i + s
2002
+ },
2003
+ {
2004
+ x: o / 2,
2005
+ y: -i
2006
+ },
2007
+ {
2008
+ x: o,
2009
+ y: -i + s
2010
+ },
2011
+ {
2012
+ x: o - a,
2013
+ y: -i + s
2014
+ },
2015
+ {
2016
+ x: o - a,
2017
+ y: -s
2018
+ },
2019
+ {
2020
+ x: o,
2021
+ y: -s
2022
+ }
2023
+ ] : r.has("right") && r.has("up") ? [
2024
+ {
2025
+ x: 0,
2026
+ y: 0
2027
+ },
2028
+ {
2029
+ x: o,
2030
+ y: -a
2031
+ },
2032
+ {
2033
+ x: 0,
2034
+ y: -i
2035
+ }
2036
+ ] : r.has("right") && r.has("down") ? [
2037
+ {
2038
+ x: 0,
2039
+ y: 0
2040
+ },
2041
+ {
2042
+ x: o,
2043
+ y: 0
2044
+ },
2045
+ {
2046
+ x: 0,
2047
+ y: -i
2048
+ }
2049
+ ] : r.has("left") && r.has("up") ? [
2050
+ {
2051
+ x: o,
2052
+ y: 0
2053
+ },
2054
+ {
2055
+ x: 0,
2056
+ y: -a
2057
+ },
2058
+ {
2059
+ x: o,
2060
+ y: -i
2061
+ }
2062
+ ] : r.has("left") && r.has("down") ? [
2063
+ {
2064
+ x: o,
2065
+ y: 0
2066
+ },
2067
+ {
2068
+ x: 0,
2069
+ y: 0
2070
+ },
2071
+ {
2072
+ x: o,
2073
+ y: -i
2074
+ }
2075
+ ] : r.has("right") ? [
2076
+ {
2077
+ x: a,
2078
+ y: -s
2079
+ },
2080
+ {
2081
+ x: a,
2082
+ y: -s
2083
+ },
2084
+ {
2085
+ x: o - a,
2086
+ y: -s
2087
+ },
2088
+ {
2089
+ x: o - a,
2090
+ y: 0
2091
+ },
2092
+ {
2093
+ x: o,
2094
+ y: -i / 2
2095
+ },
2096
+ {
2097
+ x: o - a,
2098
+ y: -i
2099
+ },
2100
+ {
2101
+ x: o - a,
2102
+ y: -i + s
2103
+ },
2104
+ {
2105
+ x: a,
2106
+ y: -i + s
2107
+ },
2108
+ {
2109
+ x: a,
2110
+ y: -i + s
2111
+ }
2112
+ ] : r.has("left") ? [
2113
+ {
2114
+ x: a,
2115
+ y: 0
2116
+ },
2117
+ {
2118
+ x: a,
2119
+ y: -s
2120
+ },
2121
+ {
2122
+ x: o - a,
2123
+ y: -s
2124
+ },
2125
+ {
2126
+ x: o - a,
2127
+ y: -i + s
2128
+ },
2129
+ {
2130
+ x: a,
2131
+ y: -i + s
2132
+ },
2133
+ {
2134
+ x: a,
2135
+ y: -i
2136
+ },
2137
+ {
2138
+ x: 0,
2139
+ y: -i / 2
2140
+ }
2141
+ ] : r.has("up") ? [
2142
+ {
2143
+ x: a,
2144
+ y: -s
2145
+ },
2146
+ {
2147
+ x: a,
2148
+ y: -i + s
2149
+ },
2150
+ {
2151
+ x: 0,
2152
+ y: -i + s
2153
+ },
2154
+ {
2155
+ x: o / 2,
2156
+ y: -i
2157
+ },
2158
+ {
2159
+ x: o,
2160
+ y: -i + s
2161
+ },
2162
+ {
2163
+ x: o - a,
2164
+ y: -i + s
2165
+ },
2166
+ {
2167
+ x: o - a,
2168
+ y: -s
2169
+ }
2170
+ ] : r.has("down") ? [
2171
+ {
2172
+ x: o / 2,
2173
+ y: 0
2174
+ },
2175
+ {
2176
+ x: 0,
2177
+ y: -s
2178
+ },
2179
+ {
2180
+ x: a,
2181
+ y: -s
2182
+ },
2183
+ {
2184
+ x: a,
2185
+ y: -i + s
2186
+ },
2187
+ {
2188
+ x: o - a,
2189
+ y: -i + s
2190
+ },
2191
+ {
2192
+ x: o - a,
2193
+ y: -s
2194
+ },
2195
+ {
2196
+ x: o,
2197
+ y: -s
2198
+ }
2199
+ ] : [{
2200
+ x: 0,
2201
+ y: 0
2202
+ }];
2203
+ }, "getArrowPoints");
2204
+ function Me(e, t) {
2205
+ return e.intersect(t);
2206
+ }
2207
+ t(Me, "intersectNode");
2208
+ var Ne = Me;
2209
+ function Pe(e, t, n, r) {
2210
+ var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
2211
+ r.x < i && (l = -l);
2212
+ var u = Math.abs(t * n * s / c);
2213
+ return r.y < a && (u = -u), {
2214
+ x: i + l,
2215
+ y: a + u
2216
+ };
2217
+ }
2218
+ t(Pe, "intersectEllipse");
2219
+ var Fe = Pe;
2220
+ function Ie(e, t, n) {
2221
+ return Fe(e, t, t, n);
2222
+ }
2223
+ t(Ie, "intersectCircle");
2224
+ var Le = Ie;
2225
+ function Re(e, t, n, r) {
2226
+ var i = t.y - e.y, a, o = e.x - t.x, s, c = t.x * e.y - e.x * t.y, l, u, d, f = i * n.x + o * n.y + c, p = i * r.x + o * r.y + c, m, h, g, _, v;
2227
+ if (!(f !== 0 && p !== 0 && ze(f, p)) && (a = r.y - n.y, s = n.x - r.x, l = r.x * n.y - n.x * r.y, u = a * e.x + s * e.y + l, d = a * t.x + s * t.y + l, !(u !== 0 && d !== 0 && ze(u, d)) && (m = i * s - a * o, m !== 0))) return h = Math.abs(m / 2), g = o * l - s * c, _ = g < 0 ? (g - h) / m : (g + h) / m, g = a * c - i * l, v = g < 0 ? (g - h) / m : (g + h) / m, {
2228
+ x: _,
2229
+ y: v
2230
+ };
2231
+ }
2232
+ t(Re, "intersectLine");
2233
+ function ze(e, t) {
2234
+ return e * t > 0;
2235
+ }
2236
+ t(ze, "sameSign");
2237
+ var Be = Re, Ve = He;
2238
+ function He(e, t, n) {
2239
+ var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
2240
+ typeof t.forEach == "function" ? t.forEach(function(e) {
2241
+ o = Math.min(o, e.x), s = Math.min(s, e.y);
2242
+ }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
2243
+ for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
2244
+ var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = Be(e, n, {
2245
+ x: c + d.x,
2246
+ y: l + d.y
2247
+ }, {
2248
+ x: c + f.x,
2249
+ y: l + f.y
2250
+ });
2251
+ p && a.push(p);
2252
+ }
2253
+ return a.length ? (a.length > 1 && a.sort(function(e, t) {
2254
+ var r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
2255
+ return a < c ? -1 : a === c ? 0 : 1;
2256
+ }), a[0]) : e;
2257
+ }
2258
+ t(He, "intersectPolygon");
2259
+ var K = {
2260
+ node: Ne,
2261
+ circle: Le,
2262
+ ellipse: Fe,
2263
+ polygon: Ve,
2264
+ rect: /* @__PURE__ */ t((e, t) => {
2265
+ var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
2266
+ return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
2267
+ x: n + c,
2268
+ y: r + l
2269
+ };
2270
+ }, "intersectRect")
2271
+ }, q = /* @__PURE__ */ t(async (e, r, a, s) => {
2272
+ let c = o(), u, d = r.useHtmlLabels || l(c.flowchart.htmlLabels);
2273
+ u = a || "node default";
2274
+ let f = e.insert("g").attr("class", u).attr("id", r.domId || r.id), p = f.insert("g").attr("class", "label").attr("style", r.labelStyle), m;
2275
+ m = r.labelText === void 0 ? "" : typeof r.labelText == "string" ? r.labelText : r.labelText[0];
2276
+ let h = p.node(), _;
2277
+ _ = r.labelType === "markdown" ? x(p, i(g(m), c), {
2278
+ useHtmlLabels: d,
2279
+ width: r.width || c.flowchart.wrappingWidth,
2280
+ classes: "markdown-node-label"
2281
+ }, c) : h.appendChild(await H(i(g(m), c), r.labelStyle, !1, s));
2282
+ let v = _.getBBox(), y = r.padding / 2;
2283
+ if (l(c.flowchart.htmlLabels)) {
2284
+ let e = _.children[0], r = n(_), i = e.getElementsByTagName("img");
2285
+ if (i) {
2286
+ let e = m.replace(/<img[^>]*>/g, "").trim() === "";
2287
+ await Promise.all([...i].map((n) => new Promise((r) => {
2288
+ function i() {
2289
+ if (n.style.display = "flex", n.style.flexDirection = "column", e) {
2290
+ let e = c.fontSize ? c.fontSize : window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
2291
+ n.style.minWidth = t, n.style.maxWidth = t;
2292
+ } else n.style.width = "100%";
2293
+ r(n);
2294
+ }
2295
+ t(i, "setupImage"), setTimeout(() => {
2296
+ n.complete && i();
2297
+ }), n.addEventListener("error", i), n.addEventListener("load", i);
2298
+ })));
2299
+ }
2300
+ v = e.getBoundingClientRect(), r.attr("width", v.width), r.attr("height", v.height);
2301
+ }
2302
+ return d ? p.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")") : p.attr("transform", "translate(0, " + -v.height / 2 + ")"), r.centerLabel && p.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")"), p.insert("rect", ":first-child"), {
2303
+ shapeSvg: f,
2304
+ bbox: v,
2305
+ halfPadding: y,
2306
+ label: p
2307
+ };
2308
+ }, "labelHelper"), J = /* @__PURE__ */ t((e, t) => {
2309
+ let n = t.node().getBBox();
2310
+ e.width = n.width, e.height = n.height;
2311
+ }, "updateNodeBounds");
2312
+ function Y(e, t, n, r) {
2313
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
2314
+ return e.x + "," + e.y;
2315
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
2316
+ }
2317
+ t(Y, "insertPolygonShape");
2318
+ var Ue = /* @__PURE__ */ t(async (t, n) => {
2319
+ n.useHtmlLabels || o().flowchart.htmlLabels || (n.centerLabel = !0);
2320
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(t, n, "node " + n.classes, !0);
2321
+ e.info("Classes = ", n.classes);
2322
+ let s = r.insert("rect", ":first-child");
2323
+ return s.attr("rx", n.rx).attr("ry", n.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), J(n, s), n.intersect = function(e) {
2324
+ return K.rect(n, e);
2325
+ }, r;
2326
+ }, "note"), We = /* @__PURE__ */ t((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ t((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ t(async (t, n) => {
2327
+ let { shapeSvg: r, bbox: i } = await q(t, n, X(n, void 0), !0), a = i.width + n.padding + (i.height + n.padding), o = [
2328
+ {
2329
+ x: a / 2,
2330
+ y: 0
2331
+ },
2332
+ {
2333
+ x: a,
2334
+ y: -a / 2
2335
+ },
2336
+ {
2337
+ x: a / 2,
2338
+ y: -a
2339
+ },
2340
+ {
2341
+ x: 0,
2342
+ y: -a / 2
2343
+ }
2344
+ ];
2345
+ e.info("Question main (Circle)");
2346
+ let s = Y(r, a, a, o);
2347
+ return s.attr("style", n.style), J(n, s), n.intersect = function(t) {
2348
+ return e.warn("Intersect called"), K.polygon(n, o, t);
2349
+ }, r;
2350
+ }, "question"), Ke = /* @__PURE__ */ t((e, t) => {
2351
+ let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2352
+ return n.insert("polygon", ":first-child").attr("points", [
2353
+ {
2354
+ x: 0,
2355
+ y: 28 / 2
2356
+ },
2357
+ {
2358
+ x: 28 / 2,
2359
+ y: 0
2360
+ },
2361
+ {
2362
+ x: 0,
2363
+ y: -28 / 2
2364
+ },
2365
+ {
2366
+ x: -28 / 2,
2367
+ y: 0
2368
+ }
2369
+ ].map(function(e) {
2370
+ return e.x + "," + e.y;
2371
+ }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
2372
+ return K.circle(t, 14, e);
2373
+ }, n;
2374
+ }, "choice"), qe = /* @__PURE__ */ t(async (e, t) => {
2375
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = i / 4, o = r.width + 2 * a + t.padding, s = [
2376
+ {
2377
+ x: a,
2378
+ y: 0
2379
+ },
2380
+ {
2381
+ x: o - a,
2382
+ y: 0
2383
+ },
2384
+ {
2385
+ x: o,
2386
+ y: -i / 2
2387
+ },
2388
+ {
2389
+ x: o - a,
2390
+ y: -i
2391
+ },
2392
+ {
2393
+ x: a,
2394
+ y: -i
2395
+ },
2396
+ {
2397
+ x: 0,
2398
+ y: -i / 2
2399
+ }
2400
+ ], c = Y(n, o, i, s);
2401
+ return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2402
+ return K.polygon(t, s, e);
2403
+ }, n;
2404
+ }, "hexagon"), Je = /* @__PURE__ */ t(async (e, t) => {
2405
+ let { shapeSvg: n, bbox: r } = await q(e, t, void 0, !0), i = r.height + 2 * t.padding, a = i / 2, o = r.width + 2 * a + t.padding, s = je(t.directions, r, t), c = Y(n, o, i, s);
2406
+ return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2407
+ return K.polygon(t, s, e);
2408
+ }, n;
2409
+ }, "block_arrow"), Ye = /* @__PURE__ */ t(async (e, t) => {
2410
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2411
+ {
2412
+ x: -a / 2,
2413
+ y: 0
2414
+ },
2415
+ {
2416
+ x: i,
2417
+ y: 0
2418
+ },
2419
+ {
2420
+ x: i,
2421
+ y: -a
2422
+ },
2423
+ {
2424
+ x: -a / 2,
2425
+ y: -a
2426
+ },
2427
+ {
2428
+ x: 0,
2429
+ y: -a / 2
2430
+ }
2431
+ ];
2432
+ return Y(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2433
+ return K.polygon(t, o, e);
2434
+ }, n;
2435
+ }, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ t(async (e, t) => {
2436
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2437
+ {
2438
+ x: -2 * a / 6,
2439
+ y: 0
2440
+ },
2441
+ {
2442
+ x: i - a / 6,
2443
+ y: 0
2444
+ },
2445
+ {
2446
+ x: i + 2 * a / 6,
2447
+ y: -a
2448
+ },
2449
+ {
2450
+ x: a / 6,
2451
+ y: -a
2452
+ }
2453
+ ], s = Y(n, i, a, o);
2454
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2455
+ return K.polygon(t, o, e);
2456
+ }, n;
2457
+ }, "lean_right"), Ze = /* @__PURE__ */ t(async (e, t) => {
2458
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2459
+ {
2460
+ x: 2 * a / 6,
2461
+ y: 0
2462
+ },
2463
+ {
2464
+ x: i + a / 6,
2465
+ y: 0
2466
+ },
2467
+ {
2468
+ x: i - 2 * a / 6,
2469
+ y: -a
2470
+ },
2471
+ {
2472
+ x: -a / 6,
2473
+ y: -a
2474
+ }
2475
+ ], s = Y(n, i, a, o);
2476
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2477
+ return K.polygon(t, o, e);
2478
+ }, n;
2479
+ }, "lean_left"), Qe = /* @__PURE__ */ t(async (e, t) => {
2480
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2481
+ {
2482
+ x: -2 * a / 6,
2483
+ y: 0
2484
+ },
2485
+ {
2486
+ x: i + 2 * a / 6,
2487
+ y: 0
2488
+ },
2489
+ {
2490
+ x: i - a / 6,
2491
+ y: -a
2492
+ },
2493
+ {
2494
+ x: a / 6,
2495
+ y: -a
2496
+ }
2497
+ ], s = Y(n, i, a, o);
2498
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2499
+ return K.polygon(t, o, e);
2500
+ }, n;
2501
+ }, "trapezoid"), $e = /* @__PURE__ */ t(async (e, t) => {
2502
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2503
+ {
2504
+ x: a / 6,
2505
+ y: 0
2506
+ },
2507
+ {
2508
+ x: i - a / 6,
2509
+ y: 0
2510
+ },
2511
+ {
2512
+ x: i + 2 * a / 6,
2513
+ y: -a
2514
+ },
2515
+ {
2516
+ x: -2 * a / 6,
2517
+ y: -a
2518
+ }
2519
+ ], s = Y(n, i, a, o);
2520
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2521
+ return K.polygon(t, o, e);
2522
+ }, n;
2523
+ }, "inv_trapezoid"), et = /* @__PURE__ */ t(async (e, t) => {
2524
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2525
+ {
2526
+ x: 0,
2527
+ y: 0
2528
+ },
2529
+ {
2530
+ x: i + a / 2,
2531
+ y: 0
2532
+ },
2533
+ {
2534
+ x: i,
2535
+ y: -a / 2
2536
+ },
2537
+ {
2538
+ x: i + a / 2,
2539
+ y: -a
2540
+ },
2541
+ {
2542
+ x: 0,
2543
+ y: -a
2544
+ }
2545
+ ], s = Y(n, i, a, o);
2546
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2547
+ return K.polygon(t, o, e);
2548
+ }, n;
2549
+ }, "rect_right_inv_arrow"), tt = /* @__PURE__ */ t(async (e, t) => {
2550
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = i / 2, o = a / (2.5 + i / 50), s = r.height + o + t.padding, c = "M 0," + o + " a " + a + "," + o + " 0,0,0 " + i + " 0 a " + a + "," + o + " 0,0,0 " + -i + " 0 l 0," + s + " a " + a + "," + o + " 0,0,0 " + i + " 0 l 0," + -s;
2551
+ return J(t, n.attr("label-offset-y", o).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + o) + ")")), t.intersect = function(e) {
2552
+ let n = K.rect(t, e), r = n.x - t.x;
2553
+ if (a != 0 && (Math.abs(r) < t.width / 2 || Math.abs(r) == t.width / 2 && Math.abs(n.y - t.y) > t.height / 2 - o)) {
2554
+ let i = o * o * (1 - r * r / (a * a));
2555
+ i != 0 && (i = Math.sqrt(i)), i = o - i, e.y - t.y > 0 && (i = -i), n.y += i;
2556
+ }
2557
+ return n;
2558
+ }, n;
2559
+ }, "cylinder"), nt = /* @__PURE__ */ t(async (t, n) => {
2560
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(t, n, "node " + n.classes + " " + n.class, !0), o = r.insert("rect", ":first-child"), s = n.positioned ? n.width : i.width + n.padding, c = n.positioned ? n.height : i.height + n.padding, l = n.positioned ? -s / 2 : -i.width / 2 - a, u = n.positioned ? -c / 2 : -i.height / 2 - a;
2561
+ if (o.attr("class", "basic label-container").attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), n.props) {
2562
+ let t = new Set(Object.keys(n.props));
2563
+ n.props.borders && (Z(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
2564
+ e.warn(`Unknown node property ${t}`);
2565
+ });
2566
+ }
2567
+ return J(n, o), n.intersect = function(e) {
2568
+ return K.rect(n, e);
2569
+ }, r;
2570
+ }, "rect"), rt = /* @__PURE__ */ t(async (t, n) => {
2571
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(t, n, "node " + n.classes, !0), o = r.insert("rect", ":first-child"), s = n.positioned ? n.width : i.width + n.padding, c = n.positioned ? n.height : i.height + n.padding, l = n.positioned ? -s / 2 : -i.width / 2 - a, u = n.positioned ? -c / 2 : -i.height / 2 - a;
2572
+ if (o.attr("class", "basic cluster composite label-container").attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), n.props) {
2573
+ let t = new Set(Object.keys(n.props));
2574
+ n.props.borders && (Z(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
2575
+ e.warn(`Unknown node property ${t}`);
2576
+ });
2577
+ }
2578
+ return J(n, o), n.intersect = function(e) {
2579
+ return K.rect(n, e);
2580
+ }, r;
2581
+ }, "composite"), it = /* @__PURE__ */ t(async (t, n) => {
2582
+ let { shapeSvg: r } = await q(t, n, "label", !0);
2583
+ e.trace("Classes = ", n.class);
2584
+ let i = r.insert("rect", ":first-child");
2585
+ if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), n.props) {
2586
+ let t = new Set(Object.keys(n.props));
2587
+ n.props.borders && (Z(i, n.props.borders, 0, 0), t.delete("borders")), t.forEach((t) => {
2588
+ e.warn(`Unknown node property ${t}`);
2589
+ });
2590
+ }
2591
+ return J(n, i), n.intersect = function(e) {
2592
+ return K.rect(n, e);
2593
+ }, r;
2594
+ }, "labelRect");
2595
+ function Z(n, r, i, a) {
2596
+ let o = [], s = /* @__PURE__ */ t((e) => {
2597
+ o.push(e, 0);
2598
+ }, "addBorder"), c = /* @__PURE__ */ t((e) => {
2599
+ o.push(0, e);
2600
+ }, "skipBorder");
2601
+ r.includes("t") ? (e.debug("add top border"), s(i)) : c(i), r.includes("r") ? (e.debug("add right border"), s(a)) : c(a), r.includes("b") ? (e.debug("add bottom border"), s(i)) : c(i), r.includes("l") ? (e.debug("add left border"), s(a)) : c(a), n.attr("stroke-dasharray", o.join(" "));
2602
+ }
2603
+ t(Z, "applyNodePropertyBorders");
2604
+ var at = /* @__PURE__ */ t(async (t, r) => {
2605
+ let i;
2606
+ i = r.classes ? "node " + r.classes : "node default";
2607
+ let a = t.insert("g").attr("class", i).attr("id", r.domId || r.id), s = a.insert("rect", ":first-child"), c = a.insert("line"), u = a.insert("g").attr("class", "label"), d = r.labelText.flat ? r.labelText.flat() : r.labelText, f = "";
2608
+ f = typeof d == "object" ? d[0] : d, e.info("Label text abc79", f, d, typeof d == "object");
2609
+ let p = u.node().appendChild(await H(f, r.labelStyle, !0, !0)), m = {
2610
+ width: 0,
2611
+ height: 0
2612
+ };
2613
+ if (l(o().flowchart.htmlLabels)) {
2614
+ let e = p.children[0], t = n(p);
2615
+ m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
2616
+ }
2617
+ e.info("Text 2", d);
2618
+ let h = d.slice(1, d.length), g = p.getBBox(), _ = u.node().appendChild(await H(h.join ? h.join("<br/>") : h, r.labelStyle, !0, !0));
2619
+ if (l(o().flowchart.htmlLabels)) {
2620
+ let e = _.children[0], t = n(_);
2621
+ m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
2622
+ }
2623
+ let v = r.padding / 2;
2624
+ return n(_).attr("transform", "translate( " + (m.width > g.width ? 0 : (g.width - m.width) / 2) + ", " + (g.height + v + 5) + ")"), n(p).attr("transform", "translate( " + (m.width < g.width ? 0 : -(g.width - m.width) / 2) + ", 0)"), m = u.node().getBBox(), u.attr("transform", "translate(" + -m.width / 2 + ", " + (-m.height / 2 - v + 3) + ")"), s.attr("class", "outer title-state").attr("x", -m.width / 2 - v).attr("y", -m.height / 2 - v).attr("width", m.width + r.padding).attr("height", m.height + r.padding), c.attr("class", "divider").attr("x1", -m.width / 2 - v).attr("x2", m.width / 2 + v).attr("y1", -m.height / 2 - v + g.height + v).attr("y2", -m.height / 2 - v + g.height + v), J(r, s), r.intersect = function(e) {
2625
+ return K.rect(r, e);
2626
+ }, a;
2627
+ }, "rectWithTitle"), ot = /* @__PURE__ */ t(async (e, t) => {
2628
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
2629
+ return J(t, n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i)), t.intersect = function(e) {
2630
+ return K.rect(t, e);
2631
+ }, n;
2632
+ }, "stadium"), st = /* @__PURE__ */ t(async (t, n) => {
2633
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(t, n, X(n, void 0), !0), o = r.insert("circle", ":first-child");
2634
+ return o.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), e.info("Circle main"), J(n, o), n.intersect = function(t) {
2635
+ return e.info("Circle intersect", n, i.width / 2 + a, t), K.circle(n, i.width / 2 + a, t);
2636
+ }, r;
2637
+ }, "circle"), ct = /* @__PURE__ */ t(async (t, n) => {
2638
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(t, n, X(n, void 0), !0), o = r.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
2639
+ return o.attr("class", n.class), s.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a + 5).attr("width", i.width + n.padding + 10).attr("height", i.height + n.padding + 10), c.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), e.info("DoubleCircle main"), J(n, s), n.intersect = function(t) {
2640
+ return e.info("DoubleCircle intersect", n, i.width / 2 + a + 5, t), K.circle(n, i.width / 2 + a + 5, t);
2641
+ }, r;
2642
+ }, "doublecircle"), lt = /* @__PURE__ */ t(async (e, t) => {
2643
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2644
+ {
2645
+ x: 0,
2646
+ y: 0
2647
+ },
2648
+ {
2649
+ x: i,
2650
+ y: 0
2651
+ },
2652
+ {
2653
+ x: i,
2654
+ y: -a
2655
+ },
2656
+ {
2657
+ x: 0,
2658
+ y: -a
2659
+ },
2660
+ {
2661
+ x: 0,
2662
+ y: 0
2663
+ },
2664
+ {
2665
+ x: -8,
2666
+ y: 0
2667
+ },
2668
+ {
2669
+ x: i + 8,
2670
+ y: 0
2671
+ },
2672
+ {
2673
+ x: i + 8,
2674
+ y: -a
2675
+ },
2676
+ {
2677
+ x: -8,
2678
+ y: -a
2679
+ },
2680
+ {
2681
+ x: -8,
2682
+ y: 0
2683
+ }
2684
+ ], s = Y(n, i, a, o);
2685
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2686
+ return K.polygon(t, o, e);
2687
+ }, n;
2688
+ }, "subroutine"), ut = /* @__PURE__ */ t((e, t) => {
2689
+ let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
2690
+ return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), J(t, r), t.intersect = function(e) {
2691
+ return K.circle(t, 7, e);
2692
+ }, n;
2693
+ }, "start"), dt = /* @__PURE__ */ t((e, t, n) => {
2694
+ let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
2695
+ return n === "LR" && (i = 10, a = 70), J(t, r.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(e) {
2696
+ return K.rect(t, e);
2697
+ }, r;
2698
+ }, "forkJoin"), ft = {
2699
+ rhombus: Ge,
2700
+ composite: rt,
2701
+ question: Ge,
2702
+ rect: nt,
2703
+ labelRect: it,
2704
+ rectWithTitle: at,
2705
+ choice: Ke,
2706
+ circle: st,
2707
+ doublecircle: ct,
2708
+ stadium: ot,
2709
+ hexagon: qe,
2710
+ block_arrow: Je,
2711
+ rect_left_inv_arrow: Ye,
2712
+ lean_right: Xe,
2713
+ lean_left: Ze,
2714
+ trapezoid: Qe,
2715
+ inv_trapezoid: $e,
2716
+ rect_right_inv_arrow: et,
2717
+ cylinder: tt,
2718
+ start: ut,
2719
+ end: /* @__PURE__ */ t((e, t) => {
2720
+ let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
2721
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), r.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), J(t, i), t.intersect = function(e) {
2722
+ return K.circle(t, 7, e);
2723
+ }, n;
2724
+ }, "end"),
2725
+ note: Ue,
2726
+ subroutine: lt,
2727
+ fork: dt,
2728
+ join: dt,
2729
+ class_box: /* @__PURE__ */ t(async (e, t) => {
2730
+ let r = t.padding / 2, i;
2731
+ i = t.classes ? "node " + t.classes : "node default";
2732
+ let a = e.insert("g").attr("class", i).attr("id", t.domId || t.id), s = a.insert("rect", ":first-child"), c = a.insert("line"), u = a.insert("line"), d = 0, f = 4, p = a.insert("g").attr("class", "label"), m = 0, h = t.classData.annotations?.[0], g = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", _ = p.node().appendChild(await H(g, t.labelStyle, !0, !0)), v = _.getBBox();
2733
+ if (l(o().flowchart.htmlLabels)) {
2734
+ let e = _.children[0], t = n(_);
2735
+ v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
2736
+ }
2737
+ t.classData.annotations[0] && (f += v.height + 4, d += v.width);
2738
+ let y = t.classData.label;
2739
+ t.classData.type !== void 0 && t.classData.type !== "" && (o().flowchart.htmlLabels ? y += "&lt;" + t.classData.type + "&gt;" : y += "<" + t.classData.type + ">");
2740
+ let b = p.node().appendChild(await H(y, t.labelStyle, !0, !0));
2741
+ n(b).attr("class", "classTitle");
2742
+ let x = b.getBBox();
2743
+ if (l(o().flowchart.htmlLabels)) {
2744
+ let e = b.children[0], t = n(b);
2745
+ x = e.getBoundingClientRect(), t.attr("width", x.width), t.attr("height", x.height);
2746
+ }
2747
+ f += x.height + 4, x.width > d && (d = x.width);
2748
+ let S = [];
2749
+ t.classData.members.forEach(async (e) => {
2750
+ let r = e.getDisplayDetails(), i = r.displayText;
2751
+ o().flowchart.htmlLabels && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2752
+ let a = p.node().appendChild(await H(i, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0)), s = a.getBBox();
2753
+ if (l(o().flowchart.htmlLabels)) {
2754
+ let e = a.children[0], t = n(a);
2755
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
2756
+ }
2757
+ s.width > d && (d = s.width), f += s.height + 4, S.push(a);
2758
+ }), f += 8;
2759
+ let C = [];
2760
+ if (t.classData.methods.forEach(async (e) => {
2761
+ let r = e.getDisplayDetails(), i = r.displayText;
2762
+ o().flowchart.htmlLabels && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2763
+ let a = p.node().appendChild(await H(i, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0)), s = a.getBBox();
2764
+ if (l(o().flowchart.htmlLabels)) {
2765
+ let e = a.children[0], t = n(a);
2766
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
2767
+ }
2768
+ s.width > d && (d = s.width), f += s.height + 4, C.push(a);
2769
+ }), f += 8, h) {
2770
+ let e = (d - v.width) / 2;
2771
+ n(_).attr("transform", "translate( " + (-1 * d / 2 + e) + ", " + -1 * f / 2 + ")"), m = v.height + 4;
2772
+ }
2773
+ let w = (d - x.width) / 2;
2774
+ return n(b).attr("transform", "translate( " + (-1 * d / 2 + w) + ", " + (-1 * f / 2 + m) + ")"), m += x.height + 4, c.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -f / 2 - r + 8 + m).attr("y2", -f / 2 - r + 8 + m), m += 8, S.forEach((e) => {
2775
+ n(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m + 8 / 2) + ")");
2776
+ let t = e?.getBBox();
2777
+ m += (t?.height ?? 0) + 4;
2778
+ }), m += 8, u.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -f / 2 - r + 8 + m).attr("y2", -f / 2 - r + 8 + m), m += 8, C.forEach((e) => {
2779
+ n(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m) + ")");
2780
+ let t = e?.getBBox();
2781
+ m += (t?.height ?? 0) + 4;
2782
+ }), s.attr("style", t.style).attr("class", "outer title-state").attr("x", -d / 2 - r).attr("y", -(f / 2) - r).attr("width", d + t.padding).attr("height", f + t.padding), J(t, s), t.intersect = function(e) {
2783
+ return K.rect(t, e);
2784
+ }, a;
2785
+ }, "class_box")
2786
+ }, Q = {}, pt = /* @__PURE__ */ t(async (e, t, n) => {
2787
+ let r, i;
2788
+ if (t.link) {
2789
+ let a;
2790
+ o().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await ft[t.shape](r, t, n);
2791
+ } else i = await ft[t.shape](e, t, n), r = i;
2792
+ return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Q[t.id] = r, t.haveCallback && Q[t.id].attr("class", Q[t.id].attr("class") + " clickable"), r;
2793
+ }, "insertNode"), mt = /* @__PURE__ */ t((t) => {
2794
+ let n = Q[t.id];
2795
+ e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
2796
+ let r = t.diff || 0;
2797
+ return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
2798
+ }, "positionNode");
2799
+ function ht(e, t, n = !1) {
2800
+ let r = e, i = "default";
2801
+ (r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
2802
+ let a = 0, o = "", s;
2803
+ switch (r.type) {
2804
+ case "round":
2805
+ a = 5, o = "rect";
2806
+ break;
2807
+ case "composite":
2808
+ a = 0, o = "composite", s = 0;
2809
+ break;
2810
+ case "square":
2811
+ o = "rect";
2812
+ break;
2813
+ case "diamond":
2814
+ o = "question";
2815
+ break;
2816
+ case "hexagon":
2817
+ o = "hexagon";
2818
+ break;
2819
+ case "block_arrow":
2820
+ o = "block_arrow";
2821
+ break;
2822
+ case "odd":
2823
+ o = "rect_left_inv_arrow";
2824
+ break;
2825
+ case "lean_right":
2826
+ o = "lean_right";
2827
+ break;
2828
+ case "lean_left":
2829
+ o = "lean_left";
2830
+ break;
2831
+ case "trapezoid":
2832
+ o = "trapezoid";
2833
+ break;
2834
+ case "inv_trapezoid":
2835
+ o = "inv_trapezoid";
2836
+ break;
2837
+ case "rect_left_inv_arrow":
2838
+ o = "rect_left_inv_arrow";
2839
+ break;
2840
+ case "circle":
2841
+ o = "circle";
2842
+ break;
2843
+ case "ellipse":
2844
+ o = "ellipse";
2845
+ break;
2846
+ case "stadium":
2847
+ o = "stadium";
2848
+ break;
2849
+ case "subroutine":
2850
+ o = "subroutine";
2851
+ break;
2852
+ case "cylinder":
2853
+ o = "cylinder";
2854
+ break;
2855
+ case "group":
2856
+ o = "rect";
2857
+ break;
2858
+ case "doublecircle":
2859
+ o = "doublecircle";
2860
+ break;
2861
+ default: o = "rect";
2862
+ }
2863
+ let c = m(r?.styles ?? []), l = r.label, u = r.size ?? {
2864
+ width: 0,
2865
+ height: 0,
2866
+ x: 0,
2867
+ y: 0
2868
+ };
2869
+ return {
2870
+ labelStyle: c.labelStyle,
2871
+ shape: o,
2872
+ labelText: l,
2873
+ rx: a,
2874
+ ry: a,
2875
+ class: i,
2876
+ style: c.style,
2877
+ id: r.id,
2878
+ directions: r.directions,
2879
+ width: u.width,
2880
+ height: u.height,
2881
+ x: u.x,
2882
+ y: u.y,
2883
+ positioned: n,
2884
+ intersect: void 0,
2885
+ type: r.type,
2886
+ padding: s ?? d()?.block?.padding ?? 0
2887
+ };
2888
+ }
2889
+ t(ht, "getNodeFromBlock");
2890
+ async function gt(e, t, n) {
2891
+ let r = ht(t, n, !1);
2892
+ if (r.type === "group") return;
2893
+ let i = await pt(e, r, { config: d() }), a = i.node().getBBox(), o = n.getBlock(r.id);
2894
+ o.size = {
2895
+ width: a.width,
2896
+ height: a.height,
2897
+ x: 0,
2898
+ y: 0,
2899
+ node: i
2900
+ }, n.setBlock(o), i.remove();
2901
+ }
2902
+ t(gt, "calculateBlockSize");
2903
+ async function _t(e, t, n) {
2904
+ let r = ht(t, n, !0);
2905
+ n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: d() }), t.intersect = r?.intersect, mt(r));
2906
+ }
2907
+ t(_t, "insertBlockPositioned");
2908
+ async function $(e, t, n, r) {
2909
+ for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
2910
+ }
2911
+ t($, "performOperations");
2912
+ async function vt(e, t, n) {
2913
+ await $(e, t, n, gt);
2914
+ }
2915
+ t(vt, "calculateBlockSizes");
2916
+ async function yt(e, t, n) {
2917
+ await $(e, t, n, _t);
2918
+ }
2919
+ t(yt, "insertBlocks");
2920
+ async function bt(e, t, n, r, i) {
2921
+ let a = new C({
2922
+ multigraph: !0,
2923
+ compound: !0
2924
+ });
2925
+ a.setGraph({
2926
+ rankdir: "TB",
2927
+ nodesep: 10,
2928
+ ranksep: 10,
2929
+ marginx: 8,
2930
+ marginy: 8
2931
+ });
2932
+ for (let e of n) e.size && a.setNode(e.id, {
2933
+ width: e.size.width,
2934
+ height: e.size.height,
2935
+ intersect: e.intersect
2936
+ });
2937
+ for (let n of t) if (n.start && n.end) {
2938
+ let t = r.getBlock(n.start), o = r.getBlock(n.end);
2939
+ if (t?.size && o?.size) {
2940
+ let r = t.size, s = o.size, c = [
2941
+ {
2942
+ x: r.x,
2943
+ y: r.y
2944
+ },
2945
+ {
2946
+ x: r.x + (s.x - r.x) / 2,
2947
+ y: r.y + (s.y - r.y) / 2
2948
+ },
2949
+ {
2950
+ x: s.x,
2951
+ y: s.y
2952
+ }
2953
+ ];
2954
+ ke(e, {
2955
+ v: n.start,
2956
+ w: n.end,
2957
+ name: n.id
2958
+ }, {
2959
+ ...n,
2960
+ arrowTypeEnd: n.arrowTypeEnd,
2961
+ arrowTypeStart: n.arrowTypeStart,
2962
+ points: c,
2963
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2964
+ }, void 0, "block", a, i), n.label && (await we(e, {
2965
+ ...n,
2966
+ label: n.label,
2967
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2968
+ arrowTypeEnd: n.arrowTypeEnd,
2969
+ arrowTypeStart: n.arrowTypeStart,
2970
+ points: c,
2971
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2972
+ }), Te({
2973
+ ...n,
2974
+ x: c[1].x,
2975
+ y: c[1].y
2976
+ }, { originalPath: c }));
2977
+ }
2978
+ }
2979
+ }
2980
+ t(bt, "insertEdges");
2981
+ var xt = {
2982
+ parser: E,
2983
+ db: fe,
2984
+ renderer: {
2985
+ draw: /* @__PURE__ */ t(async function(t, r, i, a) {
2986
+ let { securityLevel: o, block: c } = d(), l = a.db, u;
2987
+ o === "sandbox" && (u = n("#i" + r));
2988
+ let f = n(o === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), p = o === "sandbox" ? f.select(`[id="${r}"]`) : n(`[id="${r}"]`);
2989
+ ge(p, [
2990
+ "point",
2991
+ "circle",
2992
+ "cross"
2993
+ ], a.type, r);
2994
+ let m = l.getBlocks(), h = l.getBlocksFlat(), g = l.getEdges(), _ = p.insert("g").attr("class", "block");
2995
+ await vt(_, m, l);
2996
+ let v = ye(l);
2997
+ if (await yt(_, m, l), await bt(_, g, h, l, r), v) {
2998
+ let t = v, n = Math.max(1, Math.round(.125 * (t.width / t.height))), r = t.height + n + 10, i = t.width + 10, { useMaxWidth: a } = c;
2999
+ s(p, r, i, !!a), e.debug("Here Bounds", v, t), p.attr("viewBox", `${t.x - 5} ${t.y - 5} ${t.width + 10} ${t.height + 10}`);
3000
+ }
3001
+ }, "draw"),
3002
+ getClasses: /* @__PURE__ */ t(function(e, t) {
3003
+ return t.db.getClasses();
3004
+ }, "getClasses")
3005
+ },
3006
+ styles: pe
3007
+ };
3008
+ //#endregion
3009
+ export { xt as diagram };