@sme.up/ketchup2 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/dist/{arc-Klgb378K.js → arc-D80gVCcI.js} +2 -2
  2. package/dist/{arc-CqG9Hxdf.cjs → arc-MUYNnJxV.cjs} +1 -1
  3. package/dist/architecture-7EHR7CIX-Bnyu5zgG.js +3 -0
  4. package/dist/architecture-7EHR7CIX-CKF7-4kH.cjs +1 -0
  5. package/dist/architectureDiagram-3BPJPVTR-BrmPrClJ.cjs +36 -0
  6. package/dist/{architectureDiagram-Q4EWVU46-CnzjcVBn.js → architectureDiagram-3BPJPVTR-EFK4DMha.js} +167 -166
  7. package/dist/assets/svg/barcode.svg +1 -0
  8. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  9. package/dist/basic-components/barcode/barcode-types.d.ts +16 -0
  10. package/dist/basic-components/barcode/barcode-types.d.ts.map +1 -0
  11. package/dist/basic-components/barcode/barcode.d.ts +3 -0
  12. package/dist/basic-components/barcode/barcode.d.ts.map +1 -0
  13. package/dist/basic-components/cell/cell-types.d.ts +7 -0
  14. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  15. package/dist/basic-components/cell/cell-utils.d.ts +3 -2
  16. package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
  17. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  18. package/dist/basic-components/cell/tests/utils.d.ts.map +1 -1
  19. package/dist/basic-components/icon/icon.d.ts.map +1 -1
  20. package/dist/basic-components/input-number/input-number.d.ts.map +1 -1
  21. package/dist/basic-components/qr-code/corners/qr-code-corner-utils.d.ts +4 -0
  22. package/dist/basic-components/qr-code/corners/qr-code-corner-utils.d.ts.map +1 -0
  23. package/dist/basic-components/qr-code/corners/qr-code-corner.d.ts +13 -0
  24. package/dist/basic-components/qr-code/corners/qr-code-corner.d.ts.map +1 -0
  25. package/dist/basic-components/qr-code/qr-code-encoding.d.ts +9 -0
  26. package/dist/basic-components/qr-code/qr-code-encoding.d.ts.map +1 -0
  27. package/dist/basic-components/qr-code/qr-code-error-correction.d.ts +10 -0
  28. package/dist/basic-components/qr-code/qr-code-error-correction.d.ts.map +1 -0
  29. package/dist/basic-components/qr-code/qr-code-helpers.d.ts +15 -0
  30. package/dist/basic-components/qr-code/qr-code-helpers.d.ts.map +1 -0
  31. package/dist/basic-components/qr-code/qr-code-mask.d.ts +9 -0
  32. package/dist/basic-components/qr-code/qr-code-mask.d.ts.map +1 -0
  33. package/dist/basic-components/qr-code/qr-code-matrix.d.ts +3 -0
  34. package/dist/basic-components/qr-code/qr-code-matrix.d.ts.map +1 -0
  35. package/dist/basic-components/qr-code/qr-code-renderer.d.ts +8 -0
  36. package/dist/basic-components/qr-code/qr-code-renderer.d.ts.map +1 -0
  37. package/dist/basic-components/qr-code/qr-code-types.d.ts +122 -0
  38. package/dist/basic-components/qr-code/qr-code-types.d.ts.map +1 -0
  39. package/dist/basic-components/qr-code/qr-code.d.ts +8 -0
  40. package/dist/basic-components/qr-code/qr-code.d.ts.map +1 -0
  41. package/dist/basic-components/text-editor/text-editor-utils.d.ts +11 -0
  42. package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
  43. package/dist/basic-components/text-editor/text-editor.d.ts.map +1 -1
  44. package/dist/basic-components/textarea/textarea-types.d.ts +2 -2
  45. package/dist/basic-components/textarea/textarea-types.d.ts.map +1 -1
  46. package/dist/basic-components/textarea/textarea.d.ts.map +1 -1
  47. package/dist/basic-components/textfield/textfield-types.d.ts +5 -0
  48. package/dist/basic-components/textfield/textfield-types.d.ts.map +1 -1
  49. package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
  50. package/dist/basic-components/tree/tree.d.ts.map +1 -1
  51. package/dist/basic-components/tree/tree.types.d.ts +6 -0
  52. package/dist/basic-components/tree/tree.types.d.ts.map +1 -1
  53. package/dist/basic-components/typography/typography-types.d.ts +1 -1
  54. package/dist/basic-components/typography/typography-types.d.ts.map +1 -1
  55. package/dist/{blockDiagram-DXYQGD6D-B0NvV2Ph.js → blockDiagram-GPEHLZMM-C3UgY0Z5.js} +999 -877
  56. package/dist/blockDiagram-GPEHLZMM-CuzoKhJT.cjs +132 -0
  57. package/dist/{c4Diagram-AHTNJAMY-Dgwv-e5O.cjs → c4Diagram-AAUBKEIU-DU8uXbgK.cjs} +6 -6
  58. package/dist/{c4Diagram-AHTNJAMY-DPijI3_r.js → c4Diagram-AAUBKEIU-klnmEOUo.js} +279 -279
  59. package/dist/channel-BbRDdbmM.js +5 -0
  60. package/dist/channel-intTktDQ.cjs +1 -0
  61. package/dist/chunk-2J33WTMH-EmvF7iYC.js +25 -0
  62. package/dist/chunk-2J33WTMH-PlcpVW8G.cjs +1 -0
  63. package/dist/{chunk-5FUZZQ4R-D3C0F0Tr.js → chunk-3OPIFGDE-C7wE5oN7.js} +957 -929
  64. package/dist/chunk-3OPIFGDE-CT5oNC5X.cjs +62 -0
  65. package/dist/{chunk-4BX2VUAB-BW54-JWg.js → chunk-4BX2VUAB-BO1KRGb1.js} +1 -1
  66. package/dist/{chunk-4BX2VUAB-Qba52sxc.cjs → chunk-4BX2VUAB-CtDGlaPx.cjs} +1 -1
  67. package/dist/{chunk-7N4EOEYR-C-GuhRgW.js → chunk-4EGX6M5U-BMVrizoY.js} +12 -12
  68. package/dist/{chunk-7N4EOEYR-jNBQwvHx.cjs → chunk-4EGX6M5U-VENLmgBt.cjs} +1 -1
  69. package/dist/{chunk-55IACEB6-DPatBzu7.cjs → chunk-55IACEB6-VJP3Osm7.cjs} +1 -1
  70. package/dist/{chunk-55IACEB6-Bu3k0Yz5.js → chunk-55IACEB6-b_Ivgrk-.js} +1 -1
  71. package/dist/chunk-5DO6E6H7-Cx6Mfbjl.cjs +1 -0
  72. package/dist/chunk-5DO6E6H7-QuTLwcim.js +23 -0
  73. package/dist/chunk-5ZQYHXKU-BMnKD7Zq.cjs +2 -0
  74. package/dist/{chunk-5PVQY5BW-Dn8n6moB.js → chunk-5ZQYHXKU-C4uam08j.js} +527 -461
  75. package/dist/chunk-727SXJPM-DTmqhRKX.cjs +206 -0
  76. package/dist/{chunk-4TB4RGXK-D2LRzcEP.js → chunk-727SXJPM-Dof0vDVV.js} +650 -554
  77. package/dist/{chunk-OYMX7WX6-CrK-lehh.cjs → chunk-AQP2D5EJ-DdWeFQ4O.cjs} +5 -5
  78. package/dist/{chunk-OYMX7WX6-DJkGVCqi.js → chunk-AQP2D5EJ-N9ii4fwJ.js} +349 -339
  79. package/dist/{chunk-LIHQZDEY-59I4-LWb.js → chunk-BR22UD5L-CS6hURQQ.js} +15 -15
  80. package/dist/{chunk-LIHQZDEY-CrogR3nT.cjs → chunk-BR22UD5L-wI1vkyAT.cjs} +1 -1
  81. package/dist/{chunk-BSJP7CBP-oNTXVRA7.js → chunk-BSJP7CBP-Bx5APwBA.js} +1 -1
  82. package/dist/{chunk-BSJP7CBP-CFzYPvgr.cjs → chunk-BSJP7CBP-CaeBFqNU.cjs} +1 -1
  83. package/dist/{chunk-ICPOFSXX-fQJ5ufMR.js → chunk-CSCIHK7Q-9WKhcDqw.js} +132 -38
  84. package/dist/chunk-CSCIHK7Q-BPMuICCz.cjs +123 -0
  85. package/dist/chunk-FHYWG6QK-CfRqYwCI.js +23 -0
  86. package/dist/chunk-FHYWG6QK-DxmnARsZ.cjs +1 -0
  87. package/dist/{chunk-FMBD7UC4-RRSc9jqt.js → chunk-FMBD7UC4-BbggSGOg.js} +1 -1
  88. package/dist/{chunk-FMBD7UC4-CS9_r76V.cjs → chunk-FMBD7UC4-CiO_59ls.cjs} +1 -1
  89. package/dist/{chunk-ENJZ2VHE-CZ7BvL2h.js → chunk-KSCS5N6A-BY1s4eGg.js} +205 -205
  90. package/dist/chunk-KSCS5N6A-DO8jEi0y.cjs +10 -0
  91. package/dist/{chunk-ZZ45TVLE-BfSqZnT4.cjs → chunk-L5ZTLDWV-BE9udiOh.cjs} +1 -1
  92. package/dist/{chunk-ZZ45TVLE-X2jolXSO.js → chunk-L5ZTLDWV-D3UwMopa.js} +8 -8
  93. package/dist/{chunk-336JU56O-DQhIGd25.cjs → chunk-LZXEDZCA-Dpz_wx3M.cjs} +1 -1
  94. package/dist/{chunk-336JU56O-DkZvWJVe.js → chunk-LZXEDZCA-KzBFuWPU.js} +18 -18
  95. package/dist/chunk-MPE355IW-4bpROspE.js +23 -0
  96. package/dist/chunk-MPE355IW-CxPw_dPP.cjs +1 -0
  97. package/dist/chunk-MZUSXYTE-DA5mUG5B.js +30 -0
  98. package/dist/chunk-MZUSXYTE-DIg1BPts.cjs +1 -0
  99. package/dist/chunk-N66VUXT2-DSbygtq1.cjs +1 -0
  100. package/dist/chunk-N66VUXT2-pDZ1b-B3.js +54 -0
  101. package/dist/{chunk-YZCP3GAM-D6P3SWmL.js → chunk-ND2GUHAM-CHTke4K8.js} +17 -17
  102. package/dist/{chunk-YZCP3GAM-qxaNo0r8.cjs → chunk-ND2GUHAM-DdBSZTft.cjs} +1 -1
  103. package/dist/chunk-NNHCCRGN-D_orSz6n.js +20630 -0
  104. package/dist/chunk-NNHCCRGN-aKMHXBzL.cjs +159 -0
  105. package/dist/{chunk-X2U36JSP-VxRY65ea.js → chunk-NZK2D7GU-BVOINLmx.js} +13 -13
  106. package/dist/{chunk-X2U36JSP-CtXjVqek.cjs → chunk-NZK2D7GU-_twqedIe.cjs} +1 -1
  107. package/dist/{chunk-U2HBQHQK-CJ77uizk.cjs → chunk-O5CBEL6O-CDvi2oZo.cjs} +6 -6
  108. package/dist/{chunk-U2HBQHQK-Ceyeq0IV.js → chunk-O5CBEL6O-VsMF4aZB.js} +108 -108
  109. package/dist/chunk-PUPMXCY4-CKjhJQnN.js +23 -0
  110. package/dist/chunk-PUPMXCY4-DsS_t57r.cjs +1 -0
  111. package/dist/{chunk-QZHKN3VN-CSMKL2rB.cjs → chunk-QZHKN3VN-CHjRGMI2.cjs} +1 -1
  112. package/dist/{chunk-QZHKN3VN-Bx8I6l3c.js → chunk-QZHKN3VN-DCddt14Q.js} +1 -1
  113. package/dist/chunk-UIBZB4QT-BZf7vqd9.cjs +1 -0
  114. package/dist/chunk-UIBZB4QT-BvFllM0Q.js +23 -0
  115. package/dist/chunk-WCWK7LTN-D_C1as0Y.js +31 -0
  116. package/dist/chunk-WCWK7LTN-Dl2uC9ZD.cjs +1 -0
  117. package/dist/chunk-WU5MYG2G-DgyP9QDj.cjs +1 -0
  118. package/dist/chunk-WU5MYG2G-mQn7Wt-i.js +9 -0
  119. package/dist/{chunk-XPW4576I-BcWkx-AL.js → chunk-XPW4576I-BCowsgDU.js} +1 -1
  120. package/dist/{chunk-XPW4576I-D8Pp6a3j.cjs → chunk-XPW4576I-D_mwgMVU.cjs} +1 -1
  121. package/dist/classDiagram-4FO5ZUOK-5DyhpZRK.cjs +1 -0
  122. package/dist/classDiagram-4FO5ZUOK-BHGLQIkz.js +29 -0
  123. package/dist/classDiagram-v2-Q7XG4LA2-CCAbBo05.js +29 -0
  124. package/dist/classDiagram-v2-Q7XG4LA2-D4TX4CLT.cjs +1 -0
  125. package/dist/components/dash-list/assets/dash-list.data.d.ts +1 -0
  126. package/dist/components/dash-list/assets/dash-list.data.d.ts.map +1 -1
  127. package/dist/components/dash-list/dash-list-types.d.ts +1 -0
  128. package/dist/components/dash-list/dash-list-types.d.ts.map +1 -1
  129. package/dist/components/dash-list/dash-list.d.ts.map +1 -1
  130. package/dist/components/dash-list/dash-list.utils.d.ts +1 -3
  131. package/dist/components/dash-list/dash-list.utils.d.ts.map +1 -1
  132. package/dist/components/field/field-types.d.ts +6 -0
  133. package/dist/components/field/field-types.d.ts.map +1 -1
  134. package/dist/components/field/field.d.ts.map +1 -1
  135. package/dist/components/htm/htm-types.d.ts +4 -0
  136. package/dist/components/htm/htm-types.d.ts.map +1 -1
  137. package/dist/components/htm/htm.d.ts.map +1 -1
  138. package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
  139. package/dist/components/input-panel/input-panel-types.d.ts +6 -0
  140. package/dist/components/input-panel/input-panel-types.d.ts.map +1 -1
  141. package/dist/components/input-panel/input-panel-utils.d.ts.map +1 -1
  142. package/dist/components/input-panel/input-panel.d.ts.map +1 -1
  143. package/dist/components/pdf/pdf-types.d.ts +8 -0
  144. package/dist/components/pdf/pdf-types.d.ts.map +1 -1
  145. package/dist/components/pdf/pdf-utils.d.ts +1 -1
  146. package/dist/components/pdf/pdf-utils.d.ts.map +1 -1
  147. package/dist/components/pdf/pdf.d.ts.map +1 -1
  148. package/dist/components/planner/planner-assets.d.ts +2 -2
  149. package/dist/components/planner/planner-assets.d.ts.map +1 -1
  150. package/dist/components/planner/planner-utils.d.ts +1 -0
  151. package/dist/components/planner/planner-utils.d.ts.map +1 -1
  152. package/dist/components/planner/planner.d.ts.map +1 -1
  153. package/dist/components/tab-bar/tab-bar-types.d.ts +1 -1
  154. package/dist/components/tab-bar/tab-bar-types.d.ts.map +1 -1
  155. package/dist/components/timeline/timeline.d.ts.map +1 -1
  156. package/dist/components/tooltip/tooltip-assets.d.ts +1 -0
  157. package/dist/components/tooltip/tooltip-assets.d.ts.map +1 -1
  158. package/dist/components/tooltip/tooltip-types.d.ts +4 -16
  159. package/dist/components/tooltip/tooltip-types.d.ts.map +1 -1
  160. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  161. package/dist/context/obj-metadata-context.d.ts +8 -0
  162. package/dist/context/obj-metadata-context.d.ts.map +1 -0
  163. package/dist/{cose-bilkent-S5V4N54A-B30Rh9DR.js → cose-bilkent-S5V4N54A-Bfb7U01p.js} +26 -27
  164. package/dist/cose-bilkent-S5V4N54A-CE-7Sw0Y.cjs +1 -0
  165. package/dist/dagre-BM42HDAG-BhbA1R8l.cjs +4 -0
  166. package/dist/dagre-BM42HDAG-D87Rv2R4.js +297 -0
  167. package/dist/dagre-CC68z3y6.cjs +1 -0
  168. package/dist/dagre-Cg4CV48I.js +1936 -0
  169. package/dist/diagram-2AECGRRQ-C6vI3yau.cjs +43 -0
  170. package/dist/{diagram-MMDJMWI5-DUpEI5ug.js → diagram-2AECGRRQ-OSYCK0tv.js} +36 -36
  171. package/dist/diagram-5GNKFQAL-BS9rRMAe.cjs +10 -0
  172. package/dist/diagram-5GNKFQAL-DnquluB9.js +101 -0
  173. package/dist/diagram-KO2AKTUF-CFi6eQYd.js +431 -0
  174. package/dist/diagram-KO2AKTUF-CjA_KTJj.cjs +3 -0
  175. package/dist/{diagram-TYMM5635-DHHPZ5ZJ.js → diagram-LMA3HP47-Cwm5bzeM.js} +38 -38
  176. package/dist/diagram-LMA3HP47-DBwSTp2j.cjs +24 -0
  177. package/dist/diagram-OG6HWLK6-BdLnbUYy.cjs +24 -0
  178. package/dist/{diagram-G4DWMVQ6-iYV58Drq.js → diagram-OG6HWLK6-DvGk1j55.js} +93 -93
  179. package/dist/{dist-DL30VIBI.js → dist-9MKIBfY4.js} +1 -1
  180. package/dist/dist-DC1YYeHc.cjs +1 -0
  181. package/dist/{erDiagram-SMLLAGMA-C8FM7wbJ.js → erDiagram-TEJ5UH35-B17mqgD_.js} +164 -164
  182. package/dist/erDiagram-TEJ5UH35-NlRiP_bX.cjs +85 -0
  183. package/dist/eventmodeling-FCH6USID-BVaFiLQO.js +3 -0
  184. package/dist/eventmodeling-FCH6USID-leiC8dtX.cjs +1 -0
  185. package/dist/{flowDiagram-DWJPFMVM-BGtX2gw0.js → flowDiagram-I6XJVG4X-C2G6Tgw_.js} +444 -444
  186. package/dist/{flowDiagram-DWJPFMVM-DWuKiJeo.cjs → flowDiagram-I6XJVG4X-ChI_6giU.cjs} +9 -9
  187. package/dist/functional-components/row/row-types.d.ts +6 -0
  188. package/dist/functional-components/row/row-types.d.ts.map +1 -1
  189. package/dist/functional-components/row/row.d.ts.map +1 -1
  190. package/dist/functional-components/timeline-engine/components/gantt/bar/gantt-bar.d.ts.map +1 -1
  191. package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.d.ts +106 -0
  192. package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.d.ts.map +1 -0
  193. package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.test.d.ts +2 -0
  194. package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.test.d.ts.map +1 -0
  195. package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow.d.ts +38 -0
  196. package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow.d.ts.map +1 -0
  197. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +23 -20
  198. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
  199. package/dist/functional-components/timeline-engine/components/gantt/gantt.d.ts.map +1 -1
  200. package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts +13 -2
  201. package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts.map +1 -1
  202. package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts +4 -0
  203. package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts.map +1 -1
  204. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts +24 -0
  205. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
  206. package/dist/functional-components/timeline-engine/timeline-engine.d.ts.map +1 -1
  207. package/dist/ganttDiagram-6RSMTGT7-B0DHqd7u.cjs +292 -0
  208. package/dist/{ganttDiagram-T4ZO3ILL-PY1BUp5b.js → ganttDiagram-6RSMTGT7-Bb6bqcaS.js} +278 -276
  209. package/dist/gitGraph-WXDBUCRP-BFFuTWG4.cjs +1 -0
  210. package/dist/gitGraph-WXDBUCRP-Fz2kRwJ-.js +3 -0
  211. package/dist/gitGraphDiagram-PVQCEYII-BzbgPrwe.cjs +106 -0
  212. package/dist/{gitGraphDiagram-UUTBAWPF-CDIW9-sX.js → gitGraphDiagram-PVQCEYII-DiJUr7lO.js} +255 -255
  213. package/dist/graphlib-B1zohIOM.js +1266 -0
  214. package/dist/graphlib-B5AXIZA4.cjs +1 -0
  215. package/dist/hooks/useFloating.d.ts.map +1 -1
  216. package/dist/index.d.ts +7 -1
  217. package/dist/index.d.ts.map +1 -1
  218. package/dist/info-J43DQDTF-CLRXRK49.js +3 -0
  219. package/dist/info-J43DQDTF-CmpcAuH-.cjs +1 -0
  220. package/dist/infoDiagram-5YYISTIA-C8P9DHlE.js +19 -0
  221. package/dist/infoDiagram-5YYISTIA-fhwEAAjF.cjs +2 -0
  222. package/dist/{ishikawaDiagram-UXIWVN3A-BfkF39Xv.cjs → ishikawaDiagram-YF4QCWOH-j6IZz59g.cjs} +6 -6
  223. package/dist/{ishikawaDiagram-UXIWVN3A-BblrAmns.js → ishikawaDiagram-YF4QCWOH-rqNbTKZp.js} +134 -134
  224. package/dist/{journeyDiagram-VCZTEJTY-UwcVOFtb.cjs → journeyDiagram-JHISSGLW-BhHdd4y3.cjs} +6 -6
  225. package/dist/{journeyDiagram-VCZTEJTY-CCOZ1XFK.js → journeyDiagram-JHISSGLW-peUJlm3L.js} +180 -180
  226. package/dist/{kanban-definition-6JOO6SKY-BWwfbdd6.js → kanban-definition-UN3LZRKU-DLxDqiQn.js} +151 -151
  227. package/dist/{kanban-definition-6JOO6SKY-Coxpi43B.cjs → kanban-definition-UN3LZRKU-TUg1x5yJ.cjs} +8 -8
  228. package/dist/{katex-SAH56fvc.cjs → katex-HkVgAsLB.cjs} +1 -1
  229. package/dist/ketchup2.cjs.js +107 -110
  230. package/dist/ketchup2.css +1 -1
  231. package/dist/ketchup2.es.js +90621 -90697
  232. package/dist/{line-CrxZdHmO.js → line-BhAnxCE8.js} +3 -3
  233. package/dist/line-CpcTW4h-.cjs +1 -0
  234. package/dist/{linear-CxHa1DsM.cjs → linear-D0eFmsG1.cjs} +1 -1
  235. package/dist/{linear-BsPvNLJv.js → linear-lSeWuvgy.js} +3 -3
  236. package/dist/locale/en/translation.json.d.ts +3 -0
  237. package/dist/locale/it/translation.json.d.ts +3 -0
  238. package/dist/{mermaid-parser.core-CERDf-UG.js → mermaid-parser.core-Dz33ts1l.js} +24 -19
  239. package/dist/mermaid-parser.core-HQxPJrkY.cjs +3 -0
  240. package/dist/{mindmap-definition-QFDTVHPH--xULjpFZ.cjs → mindmap-definition-RKZ34NQL-D9BOsg5W.cjs} +29 -29
  241. package/dist/{mindmap-definition-QFDTVHPH-dYQoMeA6.js → mindmap-definition-RKZ34NQL-DHkmUkxh.js} +148 -148
  242. package/dist/{ordinal-Civr0hZL.cjs → ordinal-BnUYNBtU.cjs} +1 -1
  243. package/dist/{ordinal-C-VoL0XF.js → ordinal-MD9_ORcM.js} +1 -1
  244. package/dist/packet-YPE3B663-BwjweAZY.cjs +1 -0
  245. package/dist/packet-YPE3B663-D1Hr9AQm.js +3 -0
  246. package/dist/pie-LRSECV5Y-CpDfN1P0.js +3 -0
  247. package/dist/pie-LRSECV5Y-I1-OkIXi.cjs +1 -0
  248. package/dist/{pieDiagram-DEJITSTG-Dj5pX4fC.js → pieDiagram-4H26LBE5-ByA7ytZx.js} +40 -40
  249. package/dist/pieDiagram-4H26LBE5-CrLJh4L9.cjs +30 -0
  250. package/dist/{quadrantDiagram-34T5L4WZ-BKNOJBiR.js → quadrantDiagram-W4KKPZXB-CHHpmu1l.js} +547 -520
  251. package/dist/quadrantDiagram-W4KKPZXB-CalC_db_.cjs +7 -0
  252. package/dist/radar-GUYGQ44K-BXt3oO8c.cjs +1 -0
  253. package/dist/radar-GUYGQ44K-ByzrmbOz.js +3 -0
  254. package/dist/{requirementDiagram-MS252O5E-r3eZu57d.js → requirementDiagram-4Y6WPE33-BVcDFSx8.js} +165 -165
  255. package/dist/requirementDiagram-4Y6WPE33-SsePLT8d.cjs +84 -0
  256. package/dist/sankeyDiagram-5OEKKPKP-BgvTZ7jd.cjs +40 -0
  257. package/dist/{sankeyDiagram-XADWPNL6-ErTVVewH.js → sankeyDiagram-5OEKKPKP-C-ODz9lV.js} +202 -153
  258. package/dist/{sequenceDiagram-FGHM5R23-BmqbzzHY.js → sequenceDiagram-3UESZ5HK-Cnc0aDO4.js} +786 -779
  259. package/dist/sequenceDiagram-3UESZ5HK-DEVLteqD.cjs +162 -0
  260. package/dist/src-BgvDIw01.cjs +1 -0
  261. package/dist/{src-BQiFKP24.js → src-v9RrE_4h.js} +578 -563
  262. package/dist/stateDiagram-AJRCARHV-CuHe6Iji.js +217 -0
  263. package/dist/stateDiagram-AJRCARHV-D_yPvIRw.cjs +1 -0
  264. package/dist/stateDiagram-v2-BHNVJYJU-CTnE6fOT.cjs +1 -0
  265. package/dist/stateDiagram-v2-BHNVJYJU-DqstYMSl.js +27 -0
  266. package/dist/{timeline-definition-GMOUNBTQ-DgcI7XnE.js → timeline-definition-PNZ67QCA-Bj1BItRB.js} +324 -324
  267. package/dist/{timeline-definition-GMOUNBTQ-BeTHmikc.cjs → timeline-definition-PNZ67QCA-Cynbc96w.cjs} +48 -48
  268. package/dist/treeView-BLDUP644-CxLhpd93.js +3 -0
  269. package/dist/treeView-BLDUP644-DMwVx0AR.cjs +1 -0
  270. package/dist/treemap-LRROVOQU-BqmiLdFI.js +3 -0
  271. package/dist/treemap-LRROVOQU-XhaFZdvI.cjs +1 -0
  272. package/dist/types/translation.d.ts +4 -1
  273. package/dist/types/translation.d.ts.map +1 -1
  274. package/dist/utils/translation.d.ts.map +1 -1
  275. package/dist/v4-BpDBEhLK.js +30 -0
  276. package/dist/v4-CA8ev9YY.cjs +1 -0
  277. package/dist/{vennDiagram-DHZGUBPP-7tx3VVDU.js → vennDiagram-CIIHVFJN-CdmcxixA.js} +192 -192
  278. package/dist/vennDiagram-CIIHVFJN-Dm4D6omA.cjs +34 -0
  279. package/dist/wardley-L42UT6IY-C7UjBmVh.js +3 -0
  280. package/dist/wardley-L42UT6IY-DFAYOpjD.cjs +1 -0
  281. package/dist/{wardleyDiagram-NUSXRM2D-DY51LHBa.cjs → wardleyDiagram-YWT4CUSO-C-DdutxP.cjs} +61 -3
  282. package/dist/{wardleyDiagram-NUSXRM2D-DGKU7A2U.js → wardleyDiagram-YWT4CUSO-D1o116Wi.js} +272 -206
  283. package/dist/{xychartDiagram-5P7HB3ND--7RYyckP.js → xychartDiagram-2RQKCTM6-Byw7djcg.js} +213 -213
  284. package/dist/{xychartDiagram-5P7HB3ND-Cj0HUNew.cjs → xychartDiagram-2RQKCTM6-D0D4PIQS.cjs} +6 -6
  285. package/package.json +6 -6
  286. package/dist/architecture-YZFGNWBL-BRqToLcm.js +0 -3
  287. package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +0 -1
  288. package/dist/architectureDiagram-Q4EWVU46-CX_6DnSJ.cjs +0 -36
  289. package/dist/blockDiagram-DXYQGD6D-D6DypQdM.cjs +0 -132
  290. package/dist/channel-CRWct3-i.js +0 -5
  291. package/dist/channel-DkTvdPpU.cjs +0 -1
  292. package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +0 -23
  293. package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +0 -1
  294. package/dist/chunk-426QAEUC-CDXJVpQr.js +0 -9
  295. package/dist/chunk-426QAEUC-CqN26l3E.cjs +0 -1
  296. package/dist/chunk-4TB4RGXK-B0SIkKDf.cjs +0 -206
  297. package/dist/chunk-5FUZZQ4R-Cj5KbGC7.cjs +0 -62
  298. package/dist/chunk-5PVQY5BW-DEPZKGvb.cjs +0 -2
  299. package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +0 -1
  300. package/dist/chunk-67CJDMHE-YMBkJcAO.js +0 -23
  301. package/dist/chunk-AA7GKIK3-B_ZB6dou.js +0 -30
  302. package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +0 -1
  303. package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +0 -1
  304. package/dist/chunk-CIAEETIT-XlxsAz-4.js +0 -23
  305. package/dist/chunk-D-IZpNpi.cjs +0 -1
  306. package/dist/chunk-EDXVE4YY-1dwNWzc7.cjs +0 -1
  307. package/dist/chunk-EDXVE4YY-CGNVB686.js +0 -25
  308. package/dist/chunk-ENJZ2VHE-BAWfx0nA.cjs +0 -10
  309. package/dist/chunk-FOC6F5B3-DcZs851j.cjs +0 -1
  310. package/dist/chunk-FOC6F5B3-E9n6-juB.js +0 -23
  311. package/dist/chunk-ICPOFSXX-hY6BIZ4Y.cjs +0 -122
  312. package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +0 -94
  313. package/dist/chunk-K5T4RW27-DY7TOEqa.js +0 -16070
  314. package/dist/chunk-KGLVRYIC-5OJpfQCj.js +0 -23
  315. package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +0 -1
  316. package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +0 -1
  317. package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +0 -31
  318. package/dist/chunk-WQLz0Won.js +0 -20
  319. package/dist/classDiagram-6PBFFD2Q-BT4_JTnP.cjs +0 -1
  320. package/dist/classDiagram-6PBFFD2Q-Dgaxt4wI.js +0 -29
  321. package/dist/classDiagram-v2-HSJHXN6E-CWhiK6nm.js +0 -29
  322. package/dist/classDiagram-v2-HSJHXN6E-DkBLzgTv.cjs +0 -1
  323. package/dist/clone-CQQwPjME.cjs +0 -1
  324. package/dist/clone-Dwbh_blD.js +0 -8
  325. package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +0 -1
  326. package/dist/dagre-BcwvU6ZF.cjs +0 -1
  327. package/dist/dagre-D17h-Z-U.js +0 -1606
  328. package/dist/dagre-KV5264BT-BnEKAAAn.js +0 -293
  329. package/dist/dagre-KV5264BT-DRbiLA37.cjs +0 -4
  330. package/dist/diagram-5BDNPKRD-B_Fa4dpl.js +0 -101
  331. package/dist/diagram-5BDNPKRD-CPN8m2Hl.cjs +0 -10
  332. package/dist/diagram-G4DWMVQ6-VpXkNb67.cjs +0 -24
  333. package/dist/diagram-MMDJMWI5-DGk_PUo9.cjs +0 -43
  334. package/dist/diagram-TYMM5635-BH_-vSv9.cjs +0 -24
  335. package/dist/dist-BgvMZbfo.cjs +0 -1
  336. package/dist/erDiagram-SMLLAGMA-vuYEmfFA.cjs +0 -85
  337. package/dist/flatten-BE1bWL-7.js +0 -40
  338. package/dist/flatten-DxvYSoR8.cjs +0 -1
  339. package/dist/ganttDiagram-T4ZO3ILL-C25CnBTv.cjs +0 -292
  340. package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +0 -1
  341. package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +0 -3
  342. package/dist/gitGraphDiagram-UUTBAWPF-0lCBo9nK.cjs +0 -106
  343. package/dist/graphlib-CdgJ32J_.cjs +0 -1
  344. package/dist/graphlib-DbQkSsC8.js +0 -373
  345. package/dist/identity-KQSjemTb.cjs +0 -1
  346. package/dist/identity-g0dsMjx7.js +0 -393
  347. package/dist/info-OMHHGYJF-Bk0VWVNW.js +0 -3
  348. package/dist/info-OMHHGYJF-C8QtwF0k.cjs +0 -1
  349. package/dist/infoDiagram-42DDH7IO-CQLxpytS.js +0 -19
  350. package/dist/infoDiagram-42DDH7IO-Da__a_a_.cjs +0 -2
  351. package/dist/isEmpty-CA3kJuev.cjs +0 -1
  352. package/dist/isEmpty-RwX-oIQS.js +0 -35
  353. package/dist/line-C7oijaT4.cjs +0 -1
  354. package/dist/mermaid-parser.core-DHpvGOZR.cjs +0 -3
  355. package/dist/packet-4T2RLAQJ-X0BMsNFj.js +0 -3
  356. package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +0 -1
  357. package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +0 -3
  358. package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +0 -1
  359. package/dist/pieDiagram-DEJITSTG-7we8s9eC.cjs +0 -30
  360. package/dist/quadrantDiagram-34T5L4WZ-B3BFuPYQ.cjs +0 -7
  361. package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +0 -1
  362. package/dist/radar-PYXPWWZC-DgZIW9Ah.js +0 -3
  363. package/dist/reduce-B7WW9rkU.cjs +0 -1
  364. package/dist/reduce-DNnkcf3M.js +0 -532
  365. package/dist/requirementDiagram-MS252O5E-BemsEy3Y.cjs +0 -84
  366. package/dist/sankeyDiagram-XADWPNL6-B9YCkPHh.cjs +0 -10
  367. package/dist/sequenceDiagram-FGHM5R23-CBpQL6X2.cjs +0 -157
  368. package/dist/src-DFxq-N5I.cjs +0 -1
  369. package/dist/stateDiagram-FHFEXIEX-CL9LE-W1.js +0 -217
  370. package/dist/stateDiagram-FHFEXIEX-Cju5Z2VS.cjs +0 -1
  371. package/dist/stateDiagram-v2-QKLJ7IA2-BHoytfGp.js +0 -27
  372. package/dist/stateDiagram-v2-QKLJ7IA2-DO1H6Vqa.cjs +0 -1
  373. package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +0 -1
  374. package/dist/treeView-SZITEDCU-Df3xzFtO.js +0 -3
  375. package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +0 -1
  376. package/dist/treemap-W4RFUUIX-ClUtdSdn.js +0 -3
  377. package/dist/v4-6yr83DbP.cjs +0 -1
  378. package/dist/v4-BR71w5_q.js +0 -33
  379. package/dist/vennDiagram-DHZGUBPP-C16dnMoe.cjs +0 -34
  380. package/dist/wardley-RL74JXVD-BtHQbnUy.js +0 -3
  381. package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +0 -1
  382. /package/dist/{array-D8NZ46Ht.js → array-CBdkHBGa.js} +0 -0
  383. /package/dist/{array-Dxz0O8Q3.cjs → array-Cx1JwiGD.cjs} +0 -0
  384. /package/dist/{cytoscape.esm-CrBwLFXE.cjs → cytoscape.esm-BzblyxzZ.cjs} +0 -0
  385. /package/dist/{cytoscape.esm-CPjF_mSK.js → cytoscape.esm-VShrX2U1.js} +0 -0
  386. /package/dist/{defaultLocale-DtzyZW63.cjs → defaultLocale-Bj_Ndo9V.cjs} +0 -0
  387. /package/dist/{defaultLocale-Dcyuaxxg.js → defaultLocale-dGy1YRID.js} +0 -0
  388. /package/dist/{init-BO60vQHJ.js → init-B7h4SEX5.js} +0 -0
  389. /package/dist/{init-B2MubQrj.cjs → init-CEL65JUo.cjs} +0 -0
  390. /package/dist/{katex-Du5WiYIy.js → katex-DWDh1q_h.js} +0 -0
  391. /package/dist/{path-CvfwEr8y.js → path-CAXMhBzK.js} +0 -0
  392. /package/dist/{path-Civic7PQ.cjs → path-CRahBUHI.cjs} +0 -0
  393. /package/dist/{rough.esm-BLKo1fIQ.cjs → rough.esm-BEA_SCZB.cjs} +0 -0
  394. /package/dist/{rough.esm-1mqTSjCt.js → rough.esm-TWNWL4Us.js} +0 -0
@@ -1,20 +1,117 @@
1
- import { D as e, L as t, a as n, b as r, c as i, s as a, tt as o, w as s, y as c } from "./chunk-ICPOFSXX-fQJ5ufMR.js";
2
- import { g as l, h as u, p as d } from "./src-BQiFKP24.js";
3
- import { t as f } from "./channel-CRWct3-i.js";
4
- import { H as p, c as m, h, i as g } from "./chunk-5PVQY5BW-Dn8n6moB.js";
5
- import { t as _ } from "./line-CrxZdHmO.js";
6
- import { n as v, t as y } from "./chunk-BSJP7CBP-oNTXVRA7.js";
7
- import { n as b, t as x } from "./chunk-ZZ45TVLE-X2jolXSO.js";
8
- import { n as S } from "./chunk-U2HBQHQK-Ceyeq0IV.js";
9
- import { t as C } from "./chunk-FMBD7UC4-RRSc9jqt.js";
10
- import { t as w } from "./graphlib-DbQkSsC8.js";
11
- import { t as T } from "./clone-Dwbh_blD.js";
12
- //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs
13
- var E = (function() {
14
- var e = /* @__PURE__ */ u(function(e, t, n, r) {
1
+ import { g as e, h as t, p as n } from "./src-v9RrE_4h.js";
2
+ import { O as r, T as i, a, b as o, c as s, rt as c, s as l, x as u, z as d } from "./chunk-CSCIHK7Q-9WKhcDqw.js";
3
+ import { t as f } from "./channel-BbRDdbmM.js";
4
+ import { A as p, B as m, C as h, D as g, E as _, F as v, H as y, I as b, L as x, M as S, N as C, O as w, P as T, R as E, S as D, T as O, U as k, V as A, W as j, a as M, et as ee, g as N, j as te, k as ne, l as re, v as ie, w as ae, x as oe, z as se } from "./chunk-5ZQYHXKU-C4uam08j.js";
5
+ import { t as ce } from "./line-BhAnxCE8.js";
6
+ import { n as le, t as P } from "./chunk-BSJP7CBP-Bx5APwBA.js";
7
+ import { n as ue, t as de } from "./chunk-L5ZTLDWV-D3UwMopa.js";
8
+ import { n as fe } from "./chunk-O5CBEL6O-VsMF4aZB.js";
9
+ import { t as pe } from "./chunk-FMBD7UC4-BbggSGOg.js";
10
+ import { t as me } from "./graphlib-B1zohIOM.js";
11
+ //#region node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
12
+ function he(e) {
13
+ return Array.isArray(e);
14
+ }
15
+ //#endregion
16
+ //#region node_modules/es-toolkit/dist/compat/object/clone.mjs
17
+ function ge(e) {
18
+ if (j(e)) return e;
19
+ let t = k(e);
20
+ if (!_e(e)) return {};
21
+ if (he(e)) {
22
+ let t = Array.from(e);
23
+ return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
24
+ }
25
+ if (ie(e)) {
26
+ let t = e, n = t.constructor;
27
+ return new n(t.buffer, t.byteOffset, t.length);
28
+ }
29
+ if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
30
+ if (t === "[object DataView]") {
31
+ let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
32
+ return new Uint8Array(a).set(o), new DataView(a);
33
+ }
34
+ if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
35
+ let n = e.constructor, r = new n(e.valueOf());
36
+ return t === "[object String]" ? be(r, e) : ve(r, e), r;
37
+ }
38
+ if (t === "[object Date]") return new Date(Number(e));
39
+ if (t === "[object RegExp]") {
40
+ let t = e, n = new RegExp(t.source, t.flags);
41
+ return n.lastIndex = t.lastIndex, n;
42
+ }
43
+ if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
44
+ if (t === "[object Map]") {
45
+ let t = e, n = /* @__PURE__ */ new Map();
46
+ return t.forEach((e, t) => {
47
+ n.set(t, e);
48
+ }), n;
49
+ }
50
+ if (t === "[object Set]") {
51
+ let t = e, n = /* @__PURE__ */ new Set();
52
+ return t.forEach((e) => {
53
+ n.add(e);
54
+ }), n;
55
+ }
56
+ if (t === "[object Arguments]") {
57
+ let t = e, n = {};
58
+ return ve(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
59
+ }
60
+ let n = {};
61
+ return xe(n, e), ve(n, e), ye(n, e), n;
62
+ }
63
+ function _e(e) {
64
+ switch (k(e)) {
65
+ case oe:
66
+ case h:
67
+ case D:
68
+ case O:
69
+ case ae:
70
+ case _:
71
+ case g:
72
+ case w:
73
+ case te:
74
+ case ne:
75
+ case p:
76
+ case S:
77
+ case C:
78
+ case T:
79
+ case v:
80
+ case b:
81
+ case x:
82
+ case E:
83
+ case A:
84
+ case y:
85
+ case se:
86
+ case m: return !0;
87
+ default: return !1;
88
+ }
89
+ }
90
+ function ve(e, t) {
91
+ for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
92
+ }
93
+ function ye(e, t) {
94
+ let n = Object.getOwnPropertySymbols(t);
95
+ for (let r = 0; r < n.length; r++) {
96
+ let i = n[r];
97
+ Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
98
+ }
99
+ }
100
+ function be(e, t) {
101
+ let n = t.valueOf().length;
102
+ for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
103
+ }
104
+ function xe(e, t) {
105
+ let n = Object.getPrototypeOf(t);
106
+ n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
107
+ }
108
+ //#endregion
109
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.mjs
110
+ var Se = (function() {
111
+ var e = /* @__PURE__ */ t(function(e, t, n, r) {
15
112
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
16
113
  return n;
17
- }, "o"), t = [1, 15], n = [1, 7], r = [1, 13], i = [1, 14], a = [1, 19], o = [1, 16], s = [1, 17], c = [1, 18], l = [8, 30], d = [
114
+ }, "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
115
  8,
19
116
  10,
20
117
  21,
@@ -53,7 +150,7 @@ var E = (function() {
53
150
  43,
54
151
  46
55
152
  ], g = [1, 49], _ = {
56
- trace: /* @__PURE__ */ u(function() {}, "trace"),
153
+ trace: /* @__PURE__ */ t(function() {}, "trace"),
57
154
  yy: {},
58
155
  symbols_: {
59
156
  error: 2,
@@ -180,7 +277,7 @@ var E = (function() {
180
277
  [24, 3],
181
278
  [25, 3]
182
279
  ],
183
- performAction: /* @__PURE__ */ u(function(e, t, n, r, i, a, o) {
280
+ performAction: /* @__PURE__ */ t(function(e, t, n, r, i, a, o) {
184
281
  var s = a.length - 1;
185
282
  switch (i) {
186
283
  case 4:
@@ -237,7 +334,7 @@ var E = (function() {
237
334
  break;
238
335
  case 23:
239
336
  r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
240
- let n = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr);
337
+ let n = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr), i = r.edgeStrToEdgeStartData(a[s - 1].edgeTypeStr), o = r.edgeStrToThickness(a[s - 1].edgeTypeStr), c = r.edgeStrToPattern(a[s - 1].edgeTypeStr);
241
338
  this.$ = [
242
339
  {
243
340
  id: a[s - 2].id,
@@ -251,9 +348,11 @@ var E = (function() {
251
348
  end: a[s].id,
252
349
  label: a[s - 1].label,
253
350
  type: "edge",
351
+ thickness: o,
352
+ pattern: c,
254
353
  directions: a[s].directions,
255
354
  arrowTypeEnd: n,
256
- arrowTypeStart: "arrow_open"
355
+ arrowTypeStart: i
257
356
  },
258
357
  {
259
358
  id: a[s].id,
@@ -363,26 +462,26 @@ var E = (function() {
363
462
  },
364
463
  { 1: [3] },
365
464
  {
366
- 10: t,
465
+ 10: n,
367
466
  11: 3,
368
467
  13: 4,
369
468
  19: 5,
370
469
  20: 6,
371
- 21: n,
470
+ 21: r,
372
471
  22: 8,
373
472
  23: 9,
374
473
  24: 10,
375
474
  25: 11,
376
475
  26: 12,
377
- 28: r,
378
- 29: i,
379
- 31: a,
380
- 39: o,
381
- 43: s,
382
- 46: c
476
+ 28: i,
477
+ 29: a,
478
+ 31: o,
479
+ 39: s,
480
+ 43: c,
481
+ 46: l
383
482
  },
384
483
  { 8: [1, 20] },
385
- e(l, [2, 12], {
484
+ e(u, [2, 12], {
386
485
  13: 4,
387
486
  19: 5,
388
487
  20: 6,
@@ -392,14 +491,14 @@ var E = (function() {
392
491
  25: 11,
393
492
  26: 12,
394
493
  11: 21,
395
- 10: t,
396
- 21: n,
397
- 28: r,
398
- 29: i,
399
- 31: a,
400
- 39: o,
401
- 43: s,
402
- 46: c
494
+ 10: n,
495
+ 21: r,
496
+ 28: i,
497
+ 29: a,
498
+ 31: o,
499
+ 39: s,
500
+ 43: c,
501
+ 46: l
403
502
  }),
404
503
  e(d, [2, 16], {
405
504
  14: 22,
@@ -417,26 +516,26 @@ var E = (function() {
417
516
  {
418
517
  19: 26,
419
518
  26: 12,
420
- 31: a
519
+ 31: o
421
520
  },
422
521
  {
423
- 10: t,
522
+ 10: n,
424
523
  11: 27,
425
524
  13: 4,
426
525
  19: 5,
427
526
  20: 6,
428
- 21: n,
527
+ 21: r,
429
528
  22: 8,
430
529
  23: 9,
431
530
  24: 10,
432
531
  25: 11,
433
532
  26: 12,
434
- 28: r,
435
- 29: i,
436
- 31: a,
437
- 39: o,
438
- 43: s,
439
- 46: c
533
+ 28: i,
534
+ 29: a,
535
+ 31: o,
536
+ 39: s,
537
+ 43: c,
538
+ 46: l
440
539
  },
441
540
  {
442
541
  40: [1, 28],
@@ -450,16 +549,16 @@ var E = (function() {
450
549
  37: [1, 34]
451
550
  }),
452
551
  { 1: [2, 7] },
453
- e(l, [2, 13]),
552
+ e(u, [2, 13]),
454
553
  {
455
554
  26: 35,
456
- 31: a
555
+ 31: o
457
556
  },
458
557
  { 31: [2, 14] },
459
558
  { 17: [1, 36] },
460
559
  e(m, [2, 24]),
461
560
  {
462
- 10: t,
561
+ 10: n,
463
562
  11: 37,
464
563
  13: 4,
465
564
  14: 22,
@@ -467,18 +566,18 @@ var E = (function() {
467
566
  16: p,
468
567
  19: 5,
469
568
  20: 6,
470
- 21: n,
569
+ 21: r,
471
570
  22: 8,
472
571
  23: 9,
473
572
  24: 10,
474
573
  25: 11,
475
574
  26: 12,
476
- 28: r,
477
- 29: i,
478
- 31: a,
479
- 39: o,
480
- 43: s,
481
- 46: c
575
+ 28: i,
576
+ 29: a,
577
+ 31: o,
578
+ 39: s,
579
+ 43: c,
580
+ 46: l
482
581
  },
483
582
  { 30: [1, 38] },
484
583
  { 41: [1, 39] },
@@ -520,35 +619,35 @@ var E = (function() {
520
619
  50: [2, 15],
521
620
  52: [2, 32]
522
621
  },
523
- parseError: /* @__PURE__ */ u(function(e, t) {
622
+ parseError: /* @__PURE__ */ t(function(e, t) {
524
623
  if (t.recoverable) this.trace(e);
525
624
  else {
526
625
  var n = Error(e);
527
626
  throw n.hash = t, n;
528
627
  }
529
628
  }, "parseError"),
530
- parse: /* @__PURE__ */ u(function(e) {
531
- var t = this, n = [0], r = [], i = [null], a = [], o = this.table, s = "", c = 0, l = 0, d = 0, f = 2, p = 1, m = a.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
629
+ parse: /* @__PURE__ */ t(function(e) {
630
+ 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: {} };
532
631
  for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
533
632
  h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
534
633
  var v = h.yylloc;
535
- a.push(v);
634
+ o.push(v);
536
635
  var y = h.options && h.options.ranges;
537
636
  typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
538
637
  function b(e) {
539
- n.length -= 2 * e, i.length -= e, a.length -= e;
638
+ r.length -= 2 * e, a.length -= e, o.length -= e;
540
639
  }
541
- u(b, "popStack");
640
+ t(b, "popStack");
542
641
  function x() {
543
- var e = r.pop() || h.lex() || p;
544
- return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
642
+ var e = i.pop() || h.lex() || p;
643
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
545
644
  }
546
- u(x, "lex");
645
+ t(x, "lex");
547
646
  for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
548
- if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = o[w] && o[w][S]), T === void 0 || !T.length || !T[0]) {
647
+ 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]) {
549
648
  var M = "";
550
- for (O in j = [], o[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
551
- M = h.showPosition ? "Parse error on line " + (c + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (c + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
649
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
650
+ 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, {
552
651
  text: h.match,
553
652
  token: this.terminals_[S] || S,
554
653
  line: h.yylineno,
@@ -559,24 +658,24 @@ var E = (function() {
559
658
  if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
560
659
  switch (T[0]) {
561
660
  case 1:
562
- n.push(S), i.push(h.yytext), a.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (l = h.yyleng, s = h.yytext, c = h.yylineno, v = h.yylloc, d > 0 && d--);
661
+ 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--);
563
662
  break;
564
663
  case 2:
565
- if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
566
- first_line: a[a.length - (k || 1)].first_line,
567
- last_line: a[a.length - 1].last_line,
568
- first_column: a[a.length - (k || 1)].first_column,
569
- last_column: a[a.length - 1].last_column
570
- }, y && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
571
- s,
572
- l,
664
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
665
+ first_line: o[o.length - (k || 1)].first_line,
666
+ last_line: o[o.length - 1].last_line,
667
+ first_column: o[o.length - (k || 1)].first_column,
668
+ last_column: o[o.length - 1].last_column
669
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
573
670
  c,
671
+ u,
672
+ l,
574
673
  g.yy,
575
674
  T[1],
576
- i,
577
- a
675
+ a,
676
+ o
578
677
  ].concat(m)), E !== void 0) return E;
579
- k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), a = a.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), a.push(D._$), A = o[n[n.length - 2]][n[n.length - 1]], n.push(A);
678
+ 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);
580
679
  break;
581
680
  case 3: return !0;
582
681
  }
@@ -587,11 +686,11 @@ var E = (function() {
587
686
  _.lexer = /* @__PURE__ */ (function() {
588
687
  return {
589
688
  EOF: 1,
590
- parseError: /* @__PURE__ */ u(function(e, t) {
689
+ parseError: /* @__PURE__ */ t(function(e, t) {
591
690
  if (this.yy.parser) this.yy.parser.parseError(e, t);
592
691
  else throw Error(e);
593
692
  }, "parseError"),
594
- setInput: /* @__PURE__ */ u(function(e, t) {
693
+ setInput: /* @__PURE__ */ t(function(e, t) {
595
694
  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 = {
596
695
  first_line: 1,
597
696
  first_column: 0,
@@ -599,11 +698,11 @@ var E = (function() {
599
698
  last_column: 0
600
699
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
601
700
  }, "setInput"),
602
- input: /* @__PURE__ */ u(function() {
701
+ input: /* @__PURE__ */ t(function() {
603
702
  var e = this._input[0];
604
703
  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;
605
704
  }, "input"),
606
- unput: /* @__PURE__ */ u(function(e) {
705
+ unput: /* @__PURE__ */ t(function(e) {
607
706
  var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
608
707
  this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
609
708
  var r = this.match.split(/(?:\r\n?|\n)/g);
@@ -616,10 +715,10 @@ var E = (function() {
616
715
  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
617
716
  }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
618
717
  }, "unput"),
619
- more: /* @__PURE__ */ u(function() {
718
+ more: /* @__PURE__ */ t(function() {
620
719
  return this._more = !0, this;
621
720
  }, "more"),
622
- reject: /* @__PURE__ */ u(function() {
721
+ reject: /* @__PURE__ */ t(function() {
623
722
  if (this.options.backtrack_lexer) this._backtrack = !0;
624
723
  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(), {
625
724
  text: "",
@@ -628,22 +727,22 @@ var E = (function() {
628
727
  });
629
728
  return this;
630
729
  }, "reject"),
631
- less: /* @__PURE__ */ u(function(e) {
730
+ less: /* @__PURE__ */ t(function(e) {
632
731
  this.unput(this.match.slice(e));
633
732
  }, "less"),
634
- pastInput: /* @__PURE__ */ u(function() {
733
+ pastInput: /* @__PURE__ */ t(function() {
635
734
  var e = this.matched.substr(0, this.matched.length - this.match.length);
636
735
  return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
637
736
  }, "pastInput"),
638
- upcomingInput: /* @__PURE__ */ u(function() {
737
+ upcomingInput: /* @__PURE__ */ t(function() {
639
738
  var e = this.match;
640
739
  return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
641
740
  }, "upcomingInput"),
642
- showPosition: /* @__PURE__ */ u(function() {
741
+ showPosition: /* @__PURE__ */ t(function() {
643
742
  var e = this.pastInput(), t = Array(e.length + 1).join("-");
644
743
  return e + this.upcomingInput() + "\n" + t + "^";
645
744
  }, "showPosition"),
646
- test_match: /* @__PURE__ */ u(function(e, t) {
745
+ test_match: /* @__PURE__ */ t(function(e, t) {
647
746
  var n, r, i;
648
747
  if (this.options.backtrack_lexer && (i = {
649
748
  yylineno: this.yylineno,
@@ -676,7 +775,7 @@ var E = (function() {
676
775
  }
677
776
  return !1;
678
777
  }, "test_match"),
679
- next: /* @__PURE__ */ u(function() {
778
+ next: /* @__PURE__ */ t(function() {
680
779
  if (this.done) return this.EOF;
681
780
  this._input || (this.done = !0);
682
781
  var e, t, n, r;
@@ -696,29 +795,29 @@ var E = (function() {
696
795
  line: this.yylineno
697
796
  });
698
797
  }, "next"),
699
- lex: /* @__PURE__ */ u(function() {
798
+ lex: /* @__PURE__ */ t(function() {
700
799
  return this.next() || this.lex();
701
800
  }, "lex"),
702
- begin: /* @__PURE__ */ u(function(e) {
801
+ begin: /* @__PURE__ */ t(function(e) {
703
802
  this.conditionStack.push(e);
704
803
  }, "begin"),
705
- popState: /* @__PURE__ */ u(function() {
804
+ popState: /* @__PURE__ */ t(function() {
706
805
  return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
707
806
  }, "popState"),
708
- _currentRules: /* @__PURE__ */ u(function() {
807
+ _currentRules: /* @__PURE__ */ t(function() {
709
808
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
710
809
  }, "_currentRules"),
711
- topState: /* @__PURE__ */ u(function(e) {
810
+ topState: /* @__PURE__ */ t(function(e) {
712
811
  return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
713
812
  }, "topState"),
714
- pushState: /* @__PURE__ */ u(function(e) {
813
+ pushState: /* @__PURE__ */ t(function(e) {
715
814
  this.begin(e);
716
815
  }, "pushState"),
717
- stateStackSize: /* @__PURE__ */ u(function() {
816
+ stateStackSize: /* @__PURE__ */ t(function() {
718
817
  return this.conditionStack.length;
719
818
  }, "stateStackSize"),
720
819
  options: {},
721
- performAction: /* @__PURE__ */ u(function(e, t, n, r) {
820
+ performAction: /* @__PURE__ */ t(function(e, t, n, r) {
722
821
  switch (n) {
723
822
  case 0: return e.getLogger().debug("Found block-beta"), 10;
724
823
  case 1: return e.getLogger().debug("Found id-block"), 29;
@@ -934,7 +1033,7 @@ var E = (function() {
934
1033
  /^(?:\[\\)/,
935
1034
  /^(?:\[)/,
936
1035
  /^(?:<\[)/,
937
- /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,
1036
+ /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
938
1037
  /^(?:$)/,
939
1038
  /^(?:["][`])/,
940
1039
  /^(?:["][`])/,
@@ -1142,88 +1241,88 @@ var E = (function() {
1142
1241
  function v() {
1143
1242
  this.yy = {};
1144
1243
  }
1145
- return u(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1244
+ return t(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1146
1245
  })();
1147
- E.parser = E;
1148
- var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = r(), N = /* @__PURE__ */ new Map(), re = "", ie = /* @__PURE__ */ u((e) => a.sanitizeText(e, ne), "sanitizeText"), ae = /* @__PURE__ */ u(function(e, t = "") {
1149
- let n = N.get(e);
1246
+ Se.parser = Se;
1247
+ var Ce = Se, F = /* @__PURE__ */ new Map(), I = [], L = /* @__PURE__ */ new Map(), we = "color", Te = "fill", Ee = "bgFill", De = ",", Oe = u(), R = /* @__PURE__ */ new Map(), z = "", ke = /* @__PURE__ */ t((e) => l.sanitizeText(e, Oe), "sanitizeText"), Ae = /* @__PURE__ */ t(function(e, t = "") {
1248
+ let n = R.get(e);
1150
1249
  n || (n = {
1151
1250
  id: e,
1152
1251
  styles: [],
1153
1252
  textStyles: []
1154
- }, N.set(e, n)), t?.split(te).forEach((e) => {
1253
+ }, R.set(e, n)), t?.split(De).forEach((e) => {
1155
1254
  let t = e.replace(/([^;]*);/, "$1").trim();
1156
- if (RegExp(j).exec(e)) {
1157
- let e = t.replace(M, ee).replace(j, M);
1255
+ if (RegExp(we).exec(e)) {
1256
+ let e = t.replace(Te, Ee).replace(we, Te);
1158
1257
  n.textStyles.push(e);
1159
1258
  }
1160
1259
  n.styles.push(t);
1161
1260
  });
1162
- }, "addStyleClass"), oe = /* @__PURE__ */ u(function(e, t = "") {
1163
- let n = O.get(e);
1164
- t != null && (n.styles = t.split(te));
1165
- }, "addStyle2Node"), se = /* @__PURE__ */ u(function(e, t) {
1261
+ }, "addStyleClass"), je = /* @__PURE__ */ t(function(e, t = "") {
1262
+ let n = F.get(e);
1263
+ t != null && (n.styles = t.split(De));
1264
+ }, "addStyle2Node"), Me = /* @__PURE__ */ t(function(e, t) {
1166
1265
  e.split(",").forEach(function(e) {
1167
- let n = O.get(e);
1266
+ let n = F.get(e);
1168
1267
  if (n === void 0) {
1169
1268
  let t = e.trim();
1170
1269
  n = {
1171
1270
  id: t,
1172
1271
  type: "na",
1173
1272
  children: []
1174
- }, O.set(t, n);
1273
+ }, F.set(t, n);
1175
1274
  }
1176
1275
  n.classes ||= [], n.classes.push(t);
1177
1276
  });
1178
- }, "setCssClass"), ce = /* @__PURE__ */ u((e, t) => {
1179
- let n = e.flat(), r = [], i = n.find((e) => e?.type === "column-setting")?.columns ?? -1;
1180
- for (let e of n) {
1181
- if (typeof i == "number" && i > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > i && l.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${i}`), e.label &&= ie(e.label), e.type === "classDef") {
1182
- ae(e.id, e.css);
1277
+ }, "setCssClass"), Ne = /* @__PURE__ */ t((t, n) => {
1278
+ let r = t.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1279
+ for (let t of r) {
1280
+ 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 &&= ke(t.label), t.type === "classDef") {
1281
+ Ae(t.id, t.css);
1183
1282
  continue;
1184
1283
  }
1185
- if (e.type === "applyClass") {
1186
- se(e.id, e?.styleClass ?? "");
1284
+ if (t.type === "applyClass") {
1285
+ Me(t.id, t?.styleClass ?? "");
1187
1286
  continue;
1188
1287
  }
1189
- if (e.type === "applyStyles") {
1190
- e?.stylesStr && oe(e.id, e?.stylesStr);
1288
+ if (t.type === "applyStyles") {
1289
+ t?.stylesStr && je(t.id, t?.stylesStr);
1191
1290
  continue;
1192
1291
  }
1193
- if (e.type === "column-setting") t.columns = e.columns ?? -1;
1194
- else if (e.type === "edge") {
1195
- let t = (A.get(e.id) ?? 0) + 1;
1196
- A.set(e.id, t), e.id = t + "-" + e.id, k.push(e);
1292
+ if (t.type === "column-setting") n.columns = t.columns ?? -1;
1293
+ else if (t.type === "edge") {
1294
+ let e = (L.get(t.id) ?? 0) + 1;
1295
+ L.set(t.id, e), t.id = e + "-" + t.id, I.push(t);
1197
1296
  } else {
1198
- e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
1199
- let t = O.get(e.id);
1200
- if (t === void 0 ? O.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && ce(e.children, e), e.type === "space") {
1201
- let t = e.width ?? 1;
1202
- for (let n = 0; n < t; n++) {
1203
- let t = T(e);
1204
- t.id = t.id + "-" + n, O.set(t.id, t), r.push(t);
1297
+ t.label || (t.type === "composite" ? t.label = "" : t.label = t.id);
1298
+ let e = F.get(t.id);
1299
+ if (e === void 0 ? F.set(t.id, t) : (t.type !== "na" && (e.type = t.type), t.label !== t.id && (e.label = t.label)), t.children && Ne(t.children, t), t.type === "space") {
1300
+ let e = t.width ?? 1;
1301
+ for (let n = 0; n < e; n++) {
1302
+ let e = ge(t);
1303
+ e.id = e.id + "-" + n, F.set(e.id, e), i.push(e);
1205
1304
  }
1206
- } else t === void 0 && r.push(e);
1305
+ } else e === void 0 && i.push(t);
1207
1306
  }
1208
1307
  }
1209
- t.children = r;
1210
- }, "populateBlockDatabase"), le = [], P = {
1308
+ n.children = i;
1309
+ }, "populateBlockDatabase"), Pe = [], B = {
1211
1310
  id: "root",
1212
1311
  type: "composite",
1213
1312
  children: [],
1214
1313
  columns: -1
1215
- }, ue = /* @__PURE__ */ u(() => {
1216
- l.debug("Clear called"), n(), P = {
1314
+ }, Fe = /* @__PURE__ */ t(() => {
1315
+ e.debug("Clear called"), a(), B = {
1217
1316
  id: "root",
1218
1317
  type: "composite",
1219
1318
  children: [],
1220
1319
  columns: -1
1221
- }, O = /* @__PURE__ */ new Map([["root", P]]), le = [], N = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), re = "";
1320
+ }, F = /* @__PURE__ */ new Map([["root", B]]), Pe = [], R = /* @__PURE__ */ new Map(), I = [], L = /* @__PURE__ */ new Map(), z = "";
1222
1321
  }, "clear");
1223
- function de(e) {
1224
- switch (l.debug("typeStr2Type", e), e) {
1322
+ function Ie(t) {
1323
+ switch (e.debug("typeStr2Type", t), t) {
1225
1324
  case "[]": return "square";
1226
- case "()": return l.debug("we have a round"), "round";
1325
+ case "()": return e.debug("we have a round"), "round";
1227
1326
  case "(())": return "circle";
1228
1327
  case ">]": return "rect_left_inv_arrow";
1229
1328
  case "{}": return "diamond";
@@ -1240,56 +1339,76 @@ function de(e) {
1240
1339
  default: return "na";
1241
1340
  }
1242
1341
  }
1243
- u(de, "typeStr2Type");
1244
- function fe(e) {
1245
- switch (l.debug("typeStr2Type", e), e) {
1342
+ t(Ie, "typeStr2Type");
1343
+ function Le(t) {
1344
+ switch (e.debug("typeStr2Type", t), t) {
1246
1345
  case "==": return "thick";
1247
1346
  default: return "normal";
1248
1347
  }
1249
1348
  }
1250
- u(fe, "edgeTypeStr2Type");
1251
- function pe(e) {
1252
- switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
1349
+ t(Le, "edgeTypeStr2Type");
1350
+ function Re(e) {
1351
+ switch (e.trim().slice(-1)) {
1253
1352
  case "x": return "arrow_cross";
1254
1353
  case "o": return "arrow_circle";
1255
1354
  case ">": return "arrow_point";
1256
1355
  default: return "";
1257
1356
  }
1258
1357
  }
1259
- u(pe, "edgeStrToEdgeData");
1260
- var me = 0, he = {
1261
- getConfig: /* @__PURE__ */ u(() => c().block, "getConfig"),
1262
- typeStr2Type: de,
1263
- edgeTypeStr2Type: fe,
1264
- edgeStrToEdgeData: pe,
1265
- getLogger: /* @__PURE__ */ u(() => l, "getLogger"),
1266
- getBlocksFlat: /* @__PURE__ */ u(() => [...O.values()], "getBlocksFlat"),
1267
- getBlocks: /* @__PURE__ */ u(() => le || [], "getBlocks"),
1268
- getEdges: /* @__PURE__ */ u(() => k, "getEdges"),
1269
- setHierarchy: /* @__PURE__ */ u((e) => {
1270
- P.children = e, ce(e, P), le = P.children;
1358
+ t(Re, "edgeStrToEdgeData");
1359
+ function ze(e) {
1360
+ switch (e.trim().charAt(0)) {
1361
+ case "x": return "arrow_cross";
1362
+ case "o": return "arrow_circle";
1363
+ case "<": return "arrow_point";
1364
+ default: return "arrow_open";
1365
+ }
1366
+ }
1367
+ t(ze, "edgeStrToEdgeStartData");
1368
+ function Be(e) {
1369
+ return e.includes("==") ? "thick" : "normal";
1370
+ }
1371
+ t(Be, "edgeStrToThickness");
1372
+ function Ve(e) {
1373
+ return e.includes(".-") ? "dotted" : "solid";
1374
+ }
1375
+ t(Ve, "edgeStrToPattern");
1376
+ var He = 0, Ue = {
1377
+ getConfig: /* @__PURE__ */ t(() => o().block, "getConfig"),
1378
+ typeStr2Type: Ie,
1379
+ edgeTypeStr2Type: Le,
1380
+ edgeStrToEdgeData: Re,
1381
+ edgeStrToEdgeStartData: ze,
1382
+ edgeStrToThickness: Be,
1383
+ edgeStrToPattern: Ve,
1384
+ getLogger: /* @__PURE__ */ t(() => e, "getLogger"),
1385
+ getBlocksFlat: /* @__PURE__ */ t(() => [...F.values()], "getBlocksFlat"),
1386
+ getBlocks: /* @__PURE__ */ t(() => Pe || [], "getBlocks"),
1387
+ getEdges: /* @__PURE__ */ t(() => I, "getEdges"),
1388
+ setHierarchy: /* @__PURE__ */ t((e) => {
1389
+ B.children = e, Ne(e, B), Pe = B.children;
1271
1390
  }, "setHierarchy"),
1272
- getBlock: /* @__PURE__ */ u((e) => O.get(e), "getBlock"),
1273
- setBlock: /* @__PURE__ */ u((e) => {
1274
- O.set(e.id, e);
1391
+ getBlock: /* @__PURE__ */ t((e) => F.get(e), "getBlock"),
1392
+ setBlock: /* @__PURE__ */ t((e) => {
1393
+ F.set(e.id, e);
1275
1394
  }, "setBlock"),
1276
- getColumns: /* @__PURE__ */ u((e) => {
1277
- let t = O.get(e);
1395
+ getColumns: /* @__PURE__ */ t((e) => {
1396
+ let t = F.get(e);
1278
1397
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1279
1398
  }, "getColumns"),
1280
- getClasses: /* @__PURE__ */ u(function() {
1281
- return N;
1399
+ getClasses: /* @__PURE__ */ t(function() {
1400
+ return R;
1282
1401
  }, "getClasses"),
1283
- clear: ue,
1284
- generateId: /* @__PURE__ */ u(() => (me++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + me), "generateId"),
1285
- setDiagramId: /* @__PURE__ */ u((e) => {
1286
- re = e;
1402
+ clear: Fe,
1403
+ generateId: /* @__PURE__ */ t(() => (He++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + He), "generateId"),
1404
+ setDiagramId: /* @__PURE__ */ t((e) => {
1405
+ z = e;
1287
1406
  }, "setDiagramId"),
1288
- getDiagramId: /* @__PURE__ */ u(() => re, "getDiagramId")
1289
- }, F = /* @__PURE__ */ u((e, t) => {
1407
+ getDiagramId: /* @__PURE__ */ t(() => z, "getDiagramId")
1408
+ }, We = /* @__PURE__ */ t((e, t) => {
1290
1409
  let n = f;
1291
- return o(n(e, "r"), n(e, "g"), n(e, "b"), t);
1292
- }, "fade"), ge = /* @__PURE__ */ u((e) => `.label {
1410
+ return c(n(e, "r"), n(e, "g"), n(e, "b"), t);
1411
+ }, "fade"), Ge = /* @__PURE__ */ t((e) => `.label {
1293
1412
  font-family: ${e.fontFamily};
1294
1413
  color: ${e.nodeTextColor || e.textColor};
1295
1414
  }
@@ -1374,9 +1493,9 @@ var me = 0, he = {
1374
1493
  }
1375
1494
 
1376
1495
  .node .cluster {
1377
- // fill: ${F(e.mainBkg, .5)};
1378
- fill: ${F(e.clusterBkg, .5)};
1379
- stroke: ${F(e.clusterBorder, .2)};
1496
+ // fill: ${We(e.mainBkg, .5)};
1497
+ fill: ${We(e.clusterBkg, .5)};
1498
+ stroke: ${We(e.clusterBorder, .2)};
1380
1499
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1381
1500
  stroke-width: 1px;
1382
1501
  }
@@ -1411,41 +1530,41 @@ var me = 0, he = {
1411
1530
  font-size: 18px;
1412
1531
  fill: ${e.textColor};
1413
1532
  }
1414
- ${C()}
1415
- `, "getStyles"), _e = /* @__PURE__ */ u((e, t, n, r) => {
1533
+ ${pe()}
1534
+ `, "getStyles"), Ke = /* @__PURE__ */ t((e, t, n, r) => {
1416
1535
  t.forEach((t) => {
1417
- ve[t](e, n, r);
1536
+ qe[t](e, n, r);
1418
1537
  });
1419
- }, "insertMarkers"), ve = {
1420
- extension: /* @__PURE__ */ u((e, t, n) => {
1421
- l.trace("Making markers for ", n), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionStart").attr("class", "marker extension " + t).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"), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).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");
1538
+ }, "insertMarkers"), qe = {
1539
+ extension: /* @__PURE__ */ t((t, n, r) => {
1540
+ 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");
1422
1541
  }, "extension"),
1423
- composition: /* @__PURE__ */ u((e, t, n) => {
1542
+ composition: /* @__PURE__ */ t((e, t, n) => {
1424
1543
  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");
1425
1544
  }, "composition"),
1426
- aggregation: /* @__PURE__ */ u((e, t, n) => {
1545
+ aggregation: /* @__PURE__ */ t((e, t, n) => {
1427
1546
  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");
1428
1547
  }, "aggregation"),
1429
- dependency: /* @__PURE__ */ u((e, t, n) => {
1548
+ dependency: /* @__PURE__ */ t((e, t, n) => {
1430
1549
  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");
1431
1550
  }, "dependency"),
1432
- lollipop: /* @__PURE__ */ u((e, t, n) => {
1551
+ lollipop: /* @__PURE__ */ t((e, t, n) => {
1433
1552
  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);
1434
1553
  }, "lollipop"),
1435
- point: /* @__PURE__ */ u((e, t, n) => {
1554
+ point: /* @__PURE__ */ t((e, t, n) => {
1436
1555
  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");
1437
1556
  }, "point"),
1438
- circle: /* @__PURE__ */ u((e, t, n) => {
1557
+ circle: /* @__PURE__ */ t((e, t, n) => {
1439
1558
  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");
1440
1559
  }, "circle"),
1441
- cross: /* @__PURE__ */ u((e, t, n) => {
1560
+ cross: /* @__PURE__ */ t((e, t, n) => {
1442
1561
  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");
1443
1562
  }, "cross"),
1444
- barb: /* @__PURE__ */ u((e, t, n) => {
1563
+ barb: /* @__PURE__ */ t((e, t, n) => {
1445
1564
  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");
1446
1565
  }, "barb")
1447
- }, ye = _e, I = r()?.block?.padding ?? 8;
1448
- function L(e, t) {
1566
+ }, Je = Ke, V = u()?.block?.padding ?? 8;
1567
+ function Ye(e, t) {
1449
1568
  if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1450
1569
  if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1451
1570
  return e < 0 ? {
@@ -1459,111 +1578,113 @@ function L(e, t) {
1459
1578
  py: Math.floor(t / e)
1460
1579
  };
1461
1580
  }
1462
- u(L, "calculateBlockPosition");
1463
- var be = /* @__PURE__ */ u((e) => {
1464
- let t = 0, n = 0;
1465
- for (let r of e.children) {
1466
- let { width: e, height: i, x: a, y: o } = r.size ?? {
1581
+ t(Ye, "calculateBlockPosition");
1582
+ var Xe = /* @__PURE__ */ t((t) => {
1583
+ let n = 0, r = 0;
1584
+ for (let i of t.children) {
1585
+ let { width: t, height: a, x: o, y: s } = i.size ?? {
1467
1586
  width: 0,
1468
1587
  height: 0,
1469
1588
  x: 0,
1470
1589
  y: 0
1471
1590
  };
1472
- l.debug("getMaxChildSize abc95 child:", r.id, "width:", e, "height:", i, "x:", a, "y:", o, r.type), r.type !== "space" && (e > t && (t = e / (r.widthInColumns ?? 1)), i > n && (n = i));
1591
+ if (e.debug("getMaxChildSize abc95 child:", i.id, "width:", t, "height:", a, "x:", o, "y:", s, i.type), i.type === "space") continue;
1592
+ let c = t / (i.widthInColumns ?? 1);
1593
+ c > n && (n = c), a > r && (r = a);
1473
1594
  }
1474
1595
  return {
1475
- width: t,
1476
- height: n
1596
+ width: n,
1597
+ height: r
1477
1598
  };
1478
1599
  }, "getMaxChildSize");
1479
- function R(e, t, n = 0, r = 0) {
1480
- l.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", n), e?.size?.width || (e.size = {
1481
- width: n,
1482
- height: r,
1600
+ function H(t, n, r = 0, i = 0) {
1601
+ e.debug("setBlockSizes abc95 (start)", t.id, t?.size?.x, "block width =", t?.size, "siblingWidth", r), t?.size?.width || (t.size = {
1602
+ width: r,
1603
+ height: i,
1483
1604
  x: 0,
1484
1605
  y: 0
1485
1606
  });
1486
- let i = 0, a = 0;
1487
- if (e.children?.length > 0) {
1488
- for (let n of e.children) R(n, t);
1489
- let o = be(e);
1490
- i = o.width, a = o.height, l.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
1491
- for (let t of e.children) t.size && (l.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${i} ${a} ${JSON.stringify(t.size)}`), t.size.width = i * (t.widthInColumns ?? 1) + I * ((t.widthInColumns ?? 1) - 1), t.size.height = a, t.size.x = 0, t.size.y = 0, l.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${i} maxHeight:${a}`));
1492
- for (let n of e.children) R(n, t, i, a);
1493
- let s = e.columns ?? -1, c = 0;
1494
- for (let t of e.children) c += t.widthInColumns ?? 1;
1495
- let u = e.children.length;
1496
- s > 0 && s < c && (u = s);
1497
- let d = Math.ceil(c / u), f = u * (i + I) + I, p = d * (a + I) + I;
1498
- if (f < n) {
1499
- l.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`), f = n, p = r;
1500
- let t = (n - u * I - I) / u, o = (r - d * I - I) / d;
1501
- l.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", i), l.debug("Size indata abc88", e.id, "childHeight", o, "maxHeight", a), l.debug("Size indata abc88 xSize", u, "padding", I);
1502
- for (let n of e.children) n.size && (n.size.width = t, n.size.height = o, n.size.x = 0, n.size.y = 0);
1607
+ let a = 0, o = 0;
1608
+ if (t.children?.length > 0) {
1609
+ for (let e of t.children) H(e, n);
1610
+ let s = Xe(t);
1611
+ a = s.width, o = s.height, e.debug("setBlockSizes abc95 maxWidth of", t.id, ":s children is ", a, o);
1612
+ 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) + V * ((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}`));
1613
+ for (let e of t.children) H(e, n, a, o);
1614
+ let c = t.columns ?? -1, l = 0;
1615
+ for (let e of t.children) l += e.widthInColumns ?? 1;
1616
+ let u = t.children.length;
1617
+ c > 0 && c < l && (u = c);
1618
+ let d = Math.ceil(l / u), f = u * (a + V) + V, p = d * (o + V) + V;
1619
+ if (f < r) {
1620
+ e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${f}`), f = r, p = i;
1621
+ let n = (r - u * V - V) / u, s = (i - d * V - V) / d;
1622
+ 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", V);
1623
+ for (let e of t.children) e.size && (e.size.width = n, e.size.height = s, e.size.x = 0, e.size.y = 0);
1503
1624
  }
1504
- if (l.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${d} columns ${s}${e.children.length} width=${Math.max(f, e.size?.width || 0)}`), f < (e?.size?.width || 0)) {
1505
- f = e?.size?.width || 0;
1506
- let t = s > 0 ? Math.min(e.children.length, s) : e.children.length;
1507
- if (t > 0) {
1508
- let n = (f - t * I - I) / t;
1509
- l.debug("abc95 (growing to fit) width", e.id, f, e.size?.width, n);
1510
- for (let t of e.children) t.size && (t.size.width = n);
1625
+ 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)) {
1626
+ f = t?.size?.width || 0;
1627
+ let n = c > 0 ? Math.min(t.children.length, c) : t.children.length;
1628
+ if (n > 0) {
1629
+ let r = (f - n * V - V) / n;
1630
+ e.debug("abc95 (growing to fit) width", t.id, f, t.size?.width, r);
1631
+ for (let e of t.children) e.size && (e.size.width = r);
1511
1632
  }
1512
1633
  }
1513
- e.size = {
1634
+ t.size = {
1514
1635
  width: f,
1515
1636
  height: p,
1516
1637
  x: 0,
1517
1638
  y: 0
1518
1639
  };
1519
1640
  }
1520
- l.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
1641
+ e.debug("setBlockSizes abc94 (done)", t.id, t?.size?.x, t?.size?.width, t?.size?.y, t?.size?.height);
1521
1642
  }
1522
- u(R, "setBlockSizes");
1523
- function z(e, t) {
1524
- l.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1525
- let n = e.columns ?? -1;
1526
- if (l.debug("layoutBlocks columns abc95", e.id, "=>", n, e), e.children && e.children.length > 0) {
1527
- let r = e?.children[0]?.size?.width ?? 0, i = e.children.length * r + (e.children.length - 1) * I;
1528
- l.debug("widthOfChildren 88", i, "posX");
1529
- let a = /* @__PURE__ */ new Map();
1530
- {
1531
- let t = 0;
1532
- for (let r of e.children) {
1533
- if (!r.size) continue;
1534
- let { py: e } = L(n, t), i = a.get(e) ?? 0;
1535
- r.size.height > i && a.set(e, r.size.height);
1536
- let o = r?.widthInColumns ?? 1;
1537
- n > 0 && (o = Math.min(o, n - t % n)), t += o;
1643
+ t(H, "setBlockSizes");
1644
+ function Ze(t, n) {
1645
+ e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1646
+ let r = t.columns ?? -1;
1647
+ if (e.debug("layoutBlocks columns abc95", t.id, "=>", r, t), t.children && t.children.length > 0) {
1648
+ let i = t?.children[0]?.size?.width ?? 0, a = t.children.length * i + (t.children.length - 1) * V;
1649
+ e.debug("widthOfChildren 88", a, "posX");
1650
+ let o = /* @__PURE__ */ new Map();
1651
+ {
1652
+ let e = 0;
1653
+ for (let n of t.children) {
1654
+ if (!n.size) continue;
1655
+ let { py: t } = Ye(r, e), i = o.get(t) ?? 0;
1656
+ n.size.height > i && o.set(t, n.size.height);
1657
+ let a = n?.widthInColumns ?? 1;
1658
+ r > 0 && (a = Math.min(a, r - e % r)), e += a;
1538
1659
  }
1539
1660
  }
1540
- let o = /* @__PURE__ */ new Map();
1661
+ let s = /* @__PURE__ */ new Map();
1541
1662
  {
1542
- let e = 0, t = [...a.keys()].sort((e, t) => e - t);
1543
- for (let n of t) o.set(n, e), e += (a.get(n) ?? 0) + I;
1663
+ let e = 0, t = [...o.keys()].sort((e, t) => e - t);
1664
+ for (let n of t) s.set(n, e), e += (o.get(n) ?? 0) + V;
1544
1665
  }
1545
- let s = 0;
1546
- l.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1547
- let c = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -I, u = 0;
1548
- for (let r of e.children) {
1549
- let i = e;
1550
- if (!r.size) continue;
1551
- let { width: d, height: f } = r.size, { px: p, py: m } = L(n, s);
1552
- if (m != u && (u = m, c = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -I, l.debug("New row in layout for block", e.id, " and child ", r.id, u)), l.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${s} (px, py) ${p},${m} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${d}${I}`), i.size) {
1553
- let e = d / 2;
1554
- r.size.x = c + I + e, l.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${c} new startingPosX${r.size.x} ${e} padding=${I} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (r?.widthInColumns ?? 1) / 2}`), c = r.size.x + e;
1555
- let t = o.get(m) ?? 0, n = a.get(m) ?? f;
1556
- r.size.y = i.size.y - i.size.height / 2 + t + n / 2 + I, l.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${c}${I}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d * (r?.widthInColumns ?? 1) / 2}`);
1666
+ let c = 0;
1667
+ e.debug("abc91 block?.size?.x", t.id, t?.size?.x);
1668
+ let l = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -V, u = 0;
1669
+ for (let i of t.children) {
1670
+ let a = t;
1671
+ if (!i.size) continue;
1672
+ let { width: d, height: f } = i.size, { px: p, py: m } = Ye(r, c);
1673
+ if (m != u && (u = m, l = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -V, e.debug("New row in layout for block", t.id, " and child ", i.id, u)), e.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${c} (px, py) ${p},${m} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${d}${V}`), a.size) {
1674
+ let t = d / 2;
1675
+ i.size.x = l + V + t, e.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${l} new startingPosX${i.size.x} ${t} padding=${V} width=${d} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (i?.widthInColumns ?? 1) / 2}`), l = i.size.x + t;
1676
+ let n = s.get(m) ?? 0, r = o.get(m) ?? f;
1677
+ i.size.y = a.size.y - a.size.height / 2 + n + r / 2 + V, e.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${l}${V}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${d * (i?.widthInColumns ?? 1) / 2}`);
1557
1678
  }
1558
- r.children && z(r, t);
1559
- let h = r?.widthInColumns ?? 1;
1560
- n > 0 && (h = Math.min(h, n - s % n)), s += h, l.debug("abc88 columnsPos", r, s);
1679
+ i.children && Ze(i, n);
1680
+ let h = i?.widthInColumns ?? 1;
1681
+ r > 0 && (h = Math.min(h, r - c % r)), c += h, e.debug("abc88 columnsPos", i, c);
1561
1682
  }
1562
1683
  }
1563
- l.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1684
+ e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1564
1685
  }
1565
- u(z, "layoutBlocks");
1566
- function B(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1686
+ t(Ze, "layoutBlocks");
1687
+ function Qe(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1567
1688
  minX: 0,
1568
1689
  minY: 0,
1569
1690
  maxX: 0,
@@ -1573,7 +1694,7 @@ function B(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1573
1694
  let { x: a, y: o, width: s, height: c } = e.size;
1574
1695
  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);
1575
1696
  }
1576
- if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = B(a, {
1697
+ if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = Qe(a, {
1577
1698
  minX: t,
1578
1699
  minY: n,
1579
1700
  maxX: r,
@@ -1586,35 +1707,35 @@ function B(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1586
1707
  maxY: i
1587
1708
  };
1588
1709
  }
1589
- u(B, "findBounds");
1590
- function xe(e) {
1591
- let t = e.getBlock("root");
1592
- if (!t) return;
1593
- R(t, e, 0, 0), z(t, e), l.debug("getBlocks", JSON.stringify(t, null, 2));
1594
- let { minX: n, minY: r, maxX: i, maxY: a } = B(t), o = a - r;
1710
+ t(Qe, "findBounds");
1711
+ function $e(t) {
1712
+ let n = t.getBlock("root");
1713
+ if (!n) return;
1714
+ H(n, t, 0, 0), Ze(n, t), e.debug("getBlocks", JSON.stringify(n, null, 2));
1715
+ let { minX: r, minY: i, maxX: a, maxY: o } = Qe(n), s = o - i;
1595
1716
  return {
1596
- x: n,
1597
- y: r,
1598
- width: i - n,
1599
- height: o
1717
+ x: r,
1718
+ y: i,
1719
+ width: a - r,
1720
+ height: s
1600
1721
  };
1601
1722
  }
1602
- u(xe, "layout");
1603
- var V = /* @__PURE__ */ u(async (e, t, n, i = !1, a = !1) => {
1723
+ t($e, "layout");
1724
+ var U = /* @__PURE__ */ t(async (e, t, n, r = !1, a = !1) => {
1604
1725
  let o = t || "";
1605
1726
  typeof o == "object" && (o = o[0]);
1606
- let c = r(), l = s(c);
1607
- return await S(e, o, {
1727
+ let s = u(), c = i(s);
1728
+ return await fe(e, o, {
1608
1729
  style: n,
1609
- isTitle: i,
1610
- useHtmlLabels: l,
1730
+ isTitle: r,
1731
+ useHtmlLabels: c,
1611
1732
  markdown: !1,
1612
1733
  isNode: a,
1613
1734
  width: Infinity
1614
- }, c);
1615
- }, "createLabel"), Se = /* @__PURE__ */ u((e, t, n, r, i) => {
1616
- t.arrowTypeStart && we(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && we(e, "end", t.arrowTypeEnd, n, r, i);
1617
- }, "addEdgeMarkers"), Ce = {
1735
+ }, s);
1736
+ }, "createLabel"), et = /* @__PURE__ */ t((e, t, n, r, i) => {
1737
+ t.arrowTypeStart && nt(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && nt(e, "end", t.arrowTypeEnd, n, r, i);
1738
+ }, "addEdgeMarkers"), tt = {
1618
1739
  arrow_cross: "cross",
1619
1740
  arrow_point: "point",
1620
1741
  arrow_barb: "barb",
@@ -1624,199 +1745,199 @@ var V = /* @__PURE__ */ u(async (e, t, n, i = !1, a = !1) => {
1624
1745
  composition: "composition",
1625
1746
  dependency: "dependency",
1626
1747
  lollipop: "lollipop"
1627
- }, we = /* @__PURE__ */ u((e, t, n, r, i, a) => {
1628
- let o = Ce[n];
1629
- if (!o) {
1630
- l.warn(`Unknown arrow type: ${n}`);
1748
+ }, nt = /* @__PURE__ */ t((t, n, r, i, a, o) => {
1749
+ let s = tt[r];
1750
+ if (!s) {
1751
+ e.warn(`Unknown arrow type: ${r}`);
1631
1752
  return;
1632
1753
  }
1633
- let s = t === "start" ? "Start" : "End";
1634
- e.attr(`marker-${t}`, `url(${r}#${i}_${a}-${o}${s})`);
1635
- }, "addEdgeMarker"), H = {}, U = {}, Te = /* @__PURE__ */ u(async (e, t) => {
1636
- let n = r(), i = s(n), a = e.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label"), c = t.labelType === "markdown", l = await S(e, t.label, {
1754
+ let c = n === "start" ? "Start" : "End";
1755
+ t.attr(`marker-${n}`, `url(${i}#${a}_${o}-${s}${c})`);
1756
+ }, "addEdgeMarker"), rt = {}, W = {}, it = /* @__PURE__ */ t(async (e, t) => {
1757
+ let r = u(), a = i(r), o = e.insert("g").attr("class", "edgeLabel"), s = o.insert("g").attr("class", "label"), c = t.labelType === "markdown", l = await fe(e, t.label, {
1637
1758
  style: t.labelStyle,
1638
- useHtmlLabels: i,
1759
+ useHtmlLabels: a,
1639
1760
  addSvgBackground: c,
1640
1761
  isNode: !1,
1641
1762
  markdown: c,
1642
1763
  width: c ? void 0 : Infinity
1643
- }, n);
1644
- o.node().appendChild(l);
1645
- let u = l.getBBox(), f = u;
1646
- if (i) {
1647
- let e = l.children[0], t = d(l);
1648
- u = e.getBoundingClientRect(), f = u, t.attr("width", u.width), t.attr("height", u.height);
1764
+ }, r);
1765
+ s.node().appendChild(l);
1766
+ let d = l.getBBox(), f = d;
1767
+ if (a) {
1768
+ let e = l.children[0], t = n(l);
1769
+ d = e.getBoundingClientRect(), f = d, t.attr("width", d.width), t.attr("height", d.height);
1649
1770
  } else {
1650
- let e = d(l).select("text").node();
1771
+ let e = n(l).select("text").node();
1651
1772
  e && typeof e.getBBox == "function" && (f = e.getBBox());
1652
1773
  }
1653
- o.attr("transform", y(f, i)), H[t.id] = a, t.width = u.width, t.height = u.height;
1774
+ s.attr("transform", P(f, a)), rt[t.id] = o, t.width = d.width, t.height = d.height;
1654
1775
  let p;
1655
1776
  if (t.startLabelLeft) {
1656
- let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(r, t.startLabelLeft, t.labelStyle);
1657
- p = a;
1658
- let o = a.getBBox();
1659
- if (i) {
1660
- let e = a.children[0], t = d(a);
1661
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1777
+ let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(i, t.startLabelLeft, t.labelStyle);
1778
+ p = o;
1779
+ let s = o.getBBox();
1780
+ if (a) {
1781
+ let e = o.children[0], t = n(o);
1782
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1662
1783
  }
1663
- r.attr("transform", y(o, i)), U[t.id] || (U[t.id] = {}), U[t.id].startLeft = n, W(p, t.startLabelLeft);
1784
+ i.attr("transform", P(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = r, G(p, t.startLabelLeft);
1664
1785
  }
1665
1786
  if (t.startLabelRight) {
1666
- let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(n, t.startLabelRight, t.labelStyle);
1667
- p = a, r.node().appendChild(a);
1668
- let o = a.getBBox();
1669
- if (i) {
1670
- let e = a.children[0], t = d(a);
1671
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1787
+ let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(i, t.startLabelRight, t.labelStyle);
1788
+ p = o;
1789
+ let s = o.getBBox();
1790
+ if (a) {
1791
+ let e = o.children[0], t = n(o);
1792
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1672
1793
  }
1673
- r.attr("transform", y(o, i)), U[t.id] || (U[t.id] = {}), U[t.id].startRight = n, W(p, t.startLabelRight);
1794
+ i.attr("transform", P(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].startRight = r, G(p, t.startLabelRight);
1674
1795
  }
1675
1796
  if (t.endLabelLeft) {
1676
- let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(r, t.endLabelLeft, t.labelStyle);
1677
- p = a;
1678
- let o = a.getBBox();
1679
- if (i) {
1680
- let e = a.children[0], t = d(a);
1681
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1797
+ let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(r, t.endLabelLeft, t.labelStyle);
1798
+ p = o;
1799
+ let s = o.getBBox();
1800
+ if (a) {
1801
+ let e = o.children[0], t = n(o);
1802
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1682
1803
  }
1683
- r.attr("transform", y(o, i)), n.node().appendChild(a), U[t.id] || (U[t.id] = {}), U[t.id].endLeft = n, W(p, t.endLabelLeft);
1804
+ i.attr("transform", P(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = r, G(p, t.endLabelLeft);
1684
1805
  }
1685
1806
  if (t.endLabelRight) {
1686
- let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(r, t.endLabelRight, t.labelStyle);
1687
- p = a;
1688
- let o = a.getBBox();
1689
- if (i) {
1690
- let e = a.children[0], t = d(a);
1691
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1807
+ let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(r, t.endLabelRight, t.labelStyle);
1808
+ p = o;
1809
+ let s = o.getBBox();
1810
+ if (a) {
1811
+ let e = o.children[0], t = n(o);
1812
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1692
1813
  }
1693
- r.attr("transform", y(o, i)), n.node().appendChild(a), U[t.id] || (U[t.id] = {}), U[t.id].endRight = n, W(p, t.endLabelRight);
1814
+ i.attr("transform", P(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].endRight = r, G(p, t.endLabelRight);
1694
1815
  }
1695
1816
  return l;
1696
1817
  }, "insertEdgeLabel");
1697
- function W(e, t) {
1698
- s(r()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1818
+ function G(e, t) {
1819
+ i(u()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1699
1820
  }
1700
- u(W, "setTerminalWidth");
1701
- var Ee = /* @__PURE__ */ u((e, t) => {
1702
- l.debug("Moving label abc88 ", e.id, e.label, H[e.id], t);
1703
- let n = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = b(r());
1704
- if (e.label) {
1705
- let r = H[e.id], a = e.x, o = e.y;
1706
- if (n) {
1707
- let r = h.calcLabelPosition(n);
1708
- l.debug("Moving label " + e.label + " from (", a, ",", o, ") to (", r.x, ",", r.y, ") abc88"), t.updatedPath && (a = r.x, o = r.y);
1821
+ t(G, "setTerminalWidth");
1822
+ var at = /* @__PURE__ */ t((t, n) => {
1823
+ e.debug("Moving label abc88 ", t.id, t.label, rt[t.id], n);
1824
+ let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = ue(u());
1825
+ if (t.label) {
1826
+ let a = rt[t.id], o = t.x, s = t.y;
1827
+ if (r) {
1828
+ let i = N.calcLabelPosition(r);
1829
+ e.debug("Moving label " + t.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (o = i.x, s = i.y);
1709
1830
  }
1710
- r.attr("transform", `translate(${a}, ${o + i / 2})`);
1831
+ a.attr("transform", `translate(${o}, ${s + i / 2})`);
1711
1832
  }
1712
- if (e.startLabelLeft) {
1713
- let t = U[e.id].startLeft, r = e.x, i = e.y;
1714
- if (n) {
1715
- let t = h.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", n);
1716
- r = t.x, i = t.y;
1833
+ if (t.startLabelLeft) {
1834
+ let e = W[t.id].startLeft, n = t.x, i = t.y;
1835
+ if (r) {
1836
+ let e = N.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
1837
+ n = e.x, i = e.y;
1717
1838
  }
1718
- t.attr("transform", `translate(${r}, ${i})`);
1839
+ e.attr("transform", `translate(${n}, ${i})`);
1719
1840
  }
1720
- if (e.startLabelRight) {
1721
- let t = U[e.id].startRight, r = e.x, i = e.y;
1722
- if (n) {
1723
- let t = h.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", n);
1724
- r = t.x, i = t.y;
1841
+ if (t.startLabelRight) {
1842
+ let e = W[t.id].startRight, n = t.x, i = t.y;
1843
+ if (r) {
1844
+ let e = N.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", r);
1845
+ n = e.x, i = e.y;
1725
1846
  }
1726
- t.attr("transform", `translate(${r}, ${i})`);
1847
+ e.attr("transform", `translate(${n}, ${i})`);
1727
1848
  }
1728
- if (e.endLabelLeft) {
1729
- let t = U[e.id].endLeft, r = e.x, i = e.y;
1730
- if (n) {
1731
- let t = h.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", n);
1732
- r = t.x, i = t.y;
1849
+ if (t.endLabelLeft) {
1850
+ let e = W[t.id].endLeft, n = t.x, i = t.y;
1851
+ if (r) {
1852
+ let e = N.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
1853
+ n = e.x, i = e.y;
1733
1854
  }
1734
- t.attr("transform", `translate(${r}, ${i})`);
1855
+ e.attr("transform", `translate(${n}, ${i})`);
1735
1856
  }
1736
- if (e.endLabelRight) {
1737
- let t = U[e.id].endRight, r = e.x, i = e.y;
1738
- if (n) {
1739
- let t = h.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", n);
1740
- r = t.x, i = t.y;
1857
+ if (t.endLabelRight) {
1858
+ let e = W[t.id].endRight, n = t.x, i = t.y;
1859
+ if (r) {
1860
+ let e = N.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
1861
+ n = e.x, i = e.y;
1741
1862
  }
1742
- t.attr("transform", `translate(${r}, ${i})`);
1863
+ e.attr("transform", `translate(${n}, ${i})`);
1743
1864
  }
1744
- }, "positionEdgeLabel"), De = /* @__PURE__ */ u((e, t) => {
1865
+ }, "positionEdgeLabel"), ot = /* @__PURE__ */ t((e, t) => {
1745
1866
  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;
1746
1867
  return i >= o || a >= s;
1747
- }, "outsideNode"), Oe = /* @__PURE__ */ u((e, t, n) => {
1748
- l.debug(`intersection calc abc89:
1749
- outsidePoint: ${JSON.stringify(t)}
1750
- insidePoint : ${JSON.stringify(n)}
1751
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1752
- let r = e.x, i = e.y, a = Math.abs(r - n.x), o = e.width / 2, s = n.x < t.x ? o - a : o + a, c = e.height / 2, u = Math.abs(t.y - n.y), d = Math.abs(t.x - n.x);
1753
- if (Math.abs(i - t.y) * o > Math.abs(r - t.x) * c) {
1754
- let e = n.y < t.y ? t.y - c - i : i - c - t.y;
1755
- s = d * e / u;
1756
- let r = {
1757
- x: n.x < t.x ? n.x + s : n.x - d + s,
1758
- y: n.y < t.y ? n.y + u - e : n.y - u + e
1868
+ }, "outsideNode"), st = /* @__PURE__ */ t((t, n, r) => {
1869
+ e.debug(`intersection calc abc89:
1870
+ outsidePoint: ${JSON.stringify(n)}
1871
+ insidePoint : ${JSON.stringify(r)}
1872
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
1873
+ 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);
1874
+ if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
1875
+ let t = r.y < n.y ? n.y - l - a : a - l - n.y;
1876
+ c = d * t / u;
1877
+ let i = {
1878
+ x: r.x < n.x ? r.x + c : r.x - d + c,
1879
+ y: r.y < n.y ? r.y + u - t : r.y - u + t
1759
1880
  };
1760
- return s === 0 && (r.x = t.x, r.y = t.y), d === 0 && (r.x = t.x), u === 0 && (r.y = t.y), l.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${s}`, r), r;
1881
+ 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;
1761
1882
  } else {
1762
- s = n.x < t.x ? t.x - o - r : r - o - t.x;
1763
- let e = u * s / d, i = n.x < t.x ? n.x + d - s : n.x - d + s, a = n.y < t.y ? n.y + e : n.y - e;
1764
- return l.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${s}`, {
1765
- _x: i,
1766
- _y: a
1767
- }), s === 0 && (i = t.x, a = t.y), d === 0 && (i = t.x), u === 0 && (a = t.y), {
1768
- x: i,
1769
- y: a
1883
+ c = r.x < n.x ? n.x - s - i : i - s - n.x;
1884
+ 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;
1885
+ return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`, {
1886
+ _x: a,
1887
+ _y: o
1888
+ }), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
1889
+ x: a,
1890
+ y: o
1770
1891
  };
1771
1892
  }
1772
- }, "intersection"), ke = /* @__PURE__ */ u((e, t) => {
1773
- l.debug("abc88 cutPathAtIntersect", e, t);
1774
- let n = [], r = e[0], i = !1;
1775
- return e.forEach((e) => {
1776
- if (!De(t, e) && !i) {
1777
- let a = Oe(t, r, e), o = !1;
1778
- n.forEach((e) => {
1779
- o ||= e.x === a.x && e.y === a.y;
1780
- }), n.some((e) => e.x === a.x && e.y === a.y) || n.push(a), i = !0;
1781
- } else r = e, i || n.push(e);
1782
- }), n;
1783
- }, "cutPathAtIntersect"), Ae = /* @__PURE__ */ u(function(t, n, i, a, o, s, c) {
1784
- let u = i.points;
1785
- l.debug("abc88 InsertEdge: edge=", i, "e=", n);
1893
+ }, "intersection"), ct = /* @__PURE__ */ t((t, n) => {
1894
+ e.debug("abc88 cutPathAtIntersect", t, n);
1895
+ let r = [], i = t[0], a = !1;
1896
+ return t.forEach((e) => {
1897
+ if (!ot(n, e) && !a) {
1898
+ let t = st(n, i, e), o = !1;
1899
+ r.forEach((e) => {
1900
+ o ||= e.x === t.x && e.y === t.y;
1901
+ }), r.some((e) => e.x === t.x && e.y === t.y) || r.push(t), a = !0;
1902
+ } else i = e, a || r.push(e);
1903
+ }), r;
1904
+ }, "cutPathAtIntersect"), lt = /* @__PURE__ */ t(function(t, n, i, a, o, s, c) {
1905
+ let l = i.points;
1906
+ e.debug("abc88 InsertEdge: edge=", i, "e=", n);
1786
1907
  let d = !1, f = s.node(n.v);
1787
- var m = s.node(n.w);
1788
- 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 && (l.debug("to cluster abc88", a[i.toCluster]), u = ke(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (l.debug("from cluster abc88", a[i.fromCluster]), u = ke(u.reverse(), a[i.fromCluster].node).reverse(), d = !0);
1789
- let h = u.filter((e) => !Number.isNaN(e.y)), g = p;
1790
- i.curve && (o === "graph" || o === "flowchart") && (g = i.curve);
1791
- let { x: y, y: b } = v(i), x = _().x(y).y(b).curve(g), S;
1908
+ var p = s.node(n.w);
1909
+ p?.intersect && f?.intersect && (l = l.slice(1, i.points.length - 1), l.unshift(f.intersect(l[0])), l.push(p.intersect(l[l.length - 1]))), i.toCluster && (e.debug("to cluster abc88", a[i.toCluster]), l = ct(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (e.debug("from cluster abc88", a[i.fromCluster]), l = ct(l.reverse(), a[i.fromCluster].node).reverse(), d = !0);
1910
+ let m = l.filter((e) => !Number.isNaN(e.y)), h = ee;
1911
+ i.curve && (o === "graph" || o === "flowchart") && (h = i.curve);
1912
+ let { x: g, y: _ } = le(i), v = ce().x(g).y(_).curve(h), y;
1792
1913
  switch (i.thickness) {
1793
1914
  case "normal":
1794
- S = "edge-thickness-normal";
1915
+ y = "edge-thickness-normal";
1795
1916
  break;
1796
1917
  case "thick":
1797
- S = "edge-thickness-thick";
1918
+ y = "edge-thickness-thick";
1798
1919
  break;
1799
1920
  case "invisible":
1800
- S = "edge-thickness-thick";
1921
+ y = "edge-thickness-thick";
1801
1922
  break;
1802
- default: S = "";
1923
+ default: y = "";
1803
1924
  }
1804
1925
  switch (i.pattern) {
1805
1926
  case "solid":
1806
- S += " edge-pattern-solid";
1927
+ y += " edge-pattern-solid";
1807
1928
  break;
1808
1929
  case "dotted":
1809
- S += " edge-pattern-dotted";
1930
+ y += " edge-pattern-dotted";
1810
1931
  break;
1811
1932
  case "dashed":
1812
- S += " edge-pattern-dashed";
1933
+ y += " edge-pattern-dashed";
1813
1934
  break;
1814
1935
  }
1815
- 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 = "";
1816
- (r().flowchart.arrowMarkerAbsolute || r().state.arrowMarkerAbsolute) && (w = e(!0)), Se(C, i, w, c, o);
1817
- let T = {};
1818
- return d && (T.updatedPath = u), T.originalPath = i.points, T;
1819
- }, "insertEdge"), je = /* @__PURE__ */ u((e) => {
1936
+ let b = t.append("path").attr("d", v(m)).attr("id", i.id).attr("class", " " + y + (i.classes ? " " + i.classes : "")).attr("style", i.style), x = "";
1937
+ (u().flowchart.arrowMarkerAbsolute || u().state.arrowMarkerAbsolute) && (x = r(!0)), et(b, i, x, c, o);
1938
+ let S = {};
1939
+ return d && (S.updatedPath = l), S.originalPath = i.points, S;
1940
+ }, "insertEdge"), ut = /* @__PURE__ */ t((e) => {
1820
1941
  let t = /* @__PURE__ */ new Set();
1821
1942
  for (let n of e) switch (n) {
1822
1943
  case "x":
@@ -1830,273 +1951,273 @@ var Ee = /* @__PURE__ */ u((e, t) => {
1830
1951
  break;
1831
1952
  }
1832
1953
  return t;
1833
- }, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ u((e, t, n) => {
1834
- let r = je(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
1835
- return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
1954
+ }, "expandAndDeduplicateDirections"), dt = /* @__PURE__ */ t((e, t, n, r) => {
1955
+ let i = ut(e), a = t.height + 2 * n.padding, o = a / 2, s = r ?? t.width + 2 * o + n.padding, c = n.padding / 2;
1956
+ return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1836
1957
  {
1837
1958
  x: 0,
1838
1959
  y: 0
1839
1960
  },
1840
1961
  {
1841
- x: a,
1962
+ x: o,
1842
1963
  y: 0
1843
1964
  },
1844
1965
  {
1845
- x: o / 2,
1846
- y: 2 * s
1966
+ x: s / 2,
1967
+ y: 2 * c
1847
1968
  },
1848
1969
  {
1849
- x: o - a,
1970
+ x: s - o,
1850
1971
  y: 0
1851
1972
  },
1852
1973
  {
1853
- x: o,
1974
+ x: s,
1854
1975
  y: 0
1855
1976
  },
1856
1977
  {
1857
- x: o,
1858
- y: -i / 3
1978
+ x: s,
1979
+ y: -a / 3
1859
1980
  },
1860
1981
  {
1861
- x: o + 2 * s,
1862
- y: -i / 2
1982
+ x: s + 2 * c,
1983
+ y: -a / 2
1863
1984
  },
1864
1985
  {
1865
- x: o,
1866
- y: -2 * i / 3
1986
+ x: s,
1987
+ y: -2 * a / 3
1867
1988
  },
1868
1989
  {
1869
- x: o,
1870
- y: -i
1990
+ x: s,
1991
+ y: -a
1871
1992
  },
1872
1993
  {
1873
- x: o - a,
1874
- y: -i
1994
+ x: s - o,
1995
+ y: -a
1875
1996
  },
1876
1997
  {
1877
- x: o / 2,
1878
- y: -i - 2 * s
1998
+ x: s / 2,
1999
+ y: -a - 2 * c
1879
2000
  },
1880
2001
  {
1881
- x: a,
1882
- y: -i
2002
+ x: o,
2003
+ y: -a
1883
2004
  },
1884
2005
  {
1885
2006
  x: 0,
1886
- y: -i
2007
+ y: -a
1887
2008
  },
1888
2009
  {
1889
2010
  x: 0,
1890
- y: -2 * i / 3
2011
+ y: -2 * a / 3
1891
2012
  },
1892
2013
  {
1893
- x: -2 * s,
1894
- y: -i / 2
2014
+ x: -2 * c,
2015
+ y: -a / 2
1895
2016
  },
1896
2017
  {
1897
2018
  x: 0,
1898
- y: -i / 3
2019
+ y: -a / 3
1899
2020
  }
1900
- ] : r.has("right") && r.has("left") && r.has("up") ? [
2021
+ ] : i.has("right") && i.has("left") && i.has("up") ? [
1901
2022
  {
1902
- x: a,
2023
+ x: o,
1903
2024
  y: 0
1904
2025
  },
1905
2026
  {
1906
- x: o - a,
2027
+ x: s - o,
1907
2028
  y: 0
1908
2029
  },
1909
2030
  {
1910
- x: o,
1911
- y: -i / 2
2031
+ x: s,
2032
+ y: -a / 2
1912
2033
  },
1913
2034
  {
1914
- x: o - a,
1915
- y: -i
2035
+ x: s - o,
2036
+ y: -a
1916
2037
  },
1917
2038
  {
1918
- x: a,
1919
- y: -i
2039
+ x: o,
2040
+ y: -a
1920
2041
  },
1921
2042
  {
1922
2043
  x: 0,
1923
- y: -i / 2
2044
+ y: -a / 2
1924
2045
  }
1925
- ] : r.has("right") && r.has("left") && r.has("down") ? [
2046
+ ] : i.has("right") && i.has("left") && i.has("down") ? [
1926
2047
  {
1927
2048
  x: 0,
1928
2049
  y: 0
1929
2050
  },
1930
2051
  {
1931
- x: a,
1932
- y: -i
2052
+ x: o,
2053
+ y: -a
1933
2054
  },
1934
2055
  {
1935
- x: o - a,
1936
- y: -i
2056
+ x: s - o,
2057
+ y: -a
1937
2058
  },
1938
2059
  {
1939
- x: o,
2060
+ x: s,
1940
2061
  y: 0
1941
2062
  }
1942
- ] : r.has("right") && r.has("up") && r.has("down") ? [
2063
+ ] : i.has("right") && i.has("up") && i.has("down") ? [
1943
2064
  {
1944
2065
  x: 0,
1945
2066
  y: 0
1946
2067
  },
1947
2068
  {
1948
- x: o,
1949
- y: -a
2069
+ x: s,
2070
+ y: -o
1950
2071
  },
1951
2072
  {
1952
- x: o,
1953
- y: -i + a
2073
+ x: s,
2074
+ y: -a + o
1954
2075
  },
1955
2076
  {
1956
2077
  x: 0,
1957
- y: -i
2078
+ y: -a
1958
2079
  }
1959
- ] : r.has("left") && r.has("up") && r.has("down") ? [
2080
+ ] : i.has("left") && i.has("up") && i.has("down") ? [
1960
2081
  {
1961
- x: o,
2082
+ x: s,
1962
2083
  y: 0
1963
2084
  },
1964
2085
  {
1965
2086
  x: 0,
1966
- y: -a
2087
+ y: -o
1967
2088
  },
1968
2089
  {
1969
2090
  x: 0,
1970
- y: -i + a
2091
+ y: -a + o
1971
2092
  },
1972
2093
  {
1973
- x: o,
1974
- y: -i
2094
+ x: s,
2095
+ y: -a
1975
2096
  }
1976
- ] : r.has("right") && r.has("left") ? [
2097
+ ] : i.has("right") && i.has("left") ? [
1977
2098
  {
1978
- x: a,
2099
+ x: o,
1979
2100
  y: 0
1980
2101
  },
1981
2102
  {
1982
- x: a,
1983
- y: -s
2103
+ x: o,
2104
+ y: -c
1984
2105
  },
1985
2106
  {
1986
- x: o - a,
1987
- y: -s
2107
+ x: s - o,
2108
+ y: -c
1988
2109
  },
1989
2110
  {
1990
- x: o - a,
2111
+ x: s - o,
1991
2112
  y: 0
1992
2113
  },
1993
2114
  {
1994
- x: o,
1995
- y: -i / 2
2115
+ x: s,
2116
+ y: -a / 2
1996
2117
  },
1997
2118
  {
1998
- x: o - a,
1999
- y: -i
2119
+ x: s - o,
2120
+ y: -a
2000
2121
  },
2001
2122
  {
2002
- x: o - a,
2003
- y: -i + s
2123
+ x: s - o,
2124
+ y: -a + c
2004
2125
  },
2005
2126
  {
2006
- x: a,
2007
- y: -i + s
2127
+ x: o,
2128
+ y: -a + c
2008
2129
  },
2009
2130
  {
2010
- x: a,
2011
- y: -i
2131
+ x: o,
2132
+ y: -a
2012
2133
  },
2013
2134
  {
2014
2135
  x: 0,
2015
- y: -i / 2
2136
+ y: -a / 2
2016
2137
  }
2017
- ] : r.has("up") && r.has("down") ? [
2138
+ ] : i.has("up") && i.has("down") ? [
2018
2139
  {
2019
- x: o / 2,
2140
+ x: s / 2,
2020
2141
  y: 0
2021
2142
  },
2022
2143
  {
2023
2144
  x: 0,
2024
- y: -s
2145
+ y: -c
2025
2146
  },
2026
2147
  {
2027
- x: a,
2028
- y: -s
2148
+ x: o,
2149
+ y: -c
2029
2150
  },
2030
2151
  {
2031
- x: a,
2032
- y: -i + s
2152
+ x: o,
2153
+ y: -a + c
2033
2154
  },
2034
2155
  {
2035
2156
  x: 0,
2036
- y: -i + s
2157
+ y: -a + c
2037
2158
  },
2038
2159
  {
2039
- x: o / 2,
2040
- y: -i
2160
+ x: s / 2,
2161
+ y: -a
2041
2162
  },
2042
2163
  {
2043
- x: o,
2044
- y: -i + s
2164
+ x: s,
2165
+ y: -a + c
2045
2166
  },
2046
2167
  {
2047
- x: o - a,
2048
- y: -i + s
2168
+ x: s - o,
2169
+ y: -a + c
2049
2170
  },
2050
2171
  {
2051
- x: o - a,
2052
- y: -s
2172
+ x: s - o,
2173
+ y: -c
2053
2174
  },
2054
2175
  {
2055
- x: o,
2056
- y: -s
2176
+ x: s,
2177
+ y: -c
2057
2178
  }
2058
- ] : r.has("right") && r.has("up") ? [
2179
+ ] : i.has("right") && i.has("up") ? [
2059
2180
  {
2060
2181
  x: 0,
2061
2182
  y: 0
2062
2183
  },
2063
2184
  {
2064
- x: o,
2065
- y: -a
2185
+ x: s,
2186
+ y: -o
2066
2187
  },
2067
2188
  {
2068
2189
  x: 0,
2069
- y: -i
2190
+ y: -a
2070
2191
  }
2071
- ] : r.has("right") && r.has("down") ? [
2192
+ ] : i.has("right") && i.has("down") ? [
2072
2193
  {
2073
2194
  x: 0,
2074
2195
  y: 0
2075
2196
  },
2076
2197
  {
2077
- x: o,
2198
+ x: s,
2078
2199
  y: 0
2079
2200
  },
2080
2201
  {
2081
2202
  x: 0,
2082
- y: -i
2203
+ y: -a
2083
2204
  }
2084
- ] : r.has("left") && r.has("up") ? [
2205
+ ] : i.has("left") && i.has("up") ? [
2085
2206
  {
2086
- x: o,
2207
+ x: s,
2087
2208
  y: 0
2088
2209
  },
2089
2210
  {
2090
2211
  x: 0,
2091
- y: -a
2212
+ y: -o
2092
2213
  },
2093
2214
  {
2094
- x: o,
2095
- y: -i
2215
+ x: s,
2216
+ y: -a
2096
2217
  }
2097
- ] : r.has("left") && r.has("down") ? [
2218
+ ] : i.has("left") && i.has("down") ? [
2098
2219
  {
2099
- x: o,
2220
+ x: s,
2100
2221
  y: 0
2101
2222
  },
2102
2223
  {
@@ -2104,144 +2225,144 @@ var Ee = /* @__PURE__ */ u((e, t) => {
2104
2225
  y: 0
2105
2226
  },
2106
2227
  {
2107
- x: o,
2108
- y: -i
2228
+ x: s,
2229
+ y: -a
2109
2230
  }
2110
- ] : r.has("right") ? [
2231
+ ] : i.has("right") ? [
2111
2232
  {
2112
- x: a,
2113
- y: -s
2233
+ x: o,
2234
+ y: -c
2114
2235
  },
2115
2236
  {
2116
- x: a,
2117
- y: -s
2237
+ x: o,
2238
+ y: -c
2118
2239
  },
2119
2240
  {
2120
- x: o - a,
2121
- y: -s
2241
+ x: s - o,
2242
+ y: -c
2122
2243
  },
2123
2244
  {
2124
- x: o - a,
2245
+ x: s - o,
2125
2246
  y: 0
2126
2247
  },
2127
2248
  {
2128
- x: o,
2129
- y: -i / 2
2249
+ x: s,
2250
+ y: -a / 2
2130
2251
  },
2131
2252
  {
2132
- x: o - a,
2133
- y: -i
2253
+ x: s - o,
2254
+ y: -a
2134
2255
  },
2135
2256
  {
2136
- x: o - a,
2137
- y: -i + s
2257
+ x: s - o,
2258
+ y: -a + c
2138
2259
  },
2139
2260
  {
2140
- x: a,
2141
- y: -i + s
2261
+ x: o,
2262
+ y: -a + c
2142
2263
  },
2143
2264
  {
2144
- x: a,
2145
- y: -i + s
2265
+ x: o,
2266
+ y: -a + c
2146
2267
  }
2147
- ] : r.has("left") ? [
2268
+ ] : i.has("left") ? [
2148
2269
  {
2149
- x: a,
2270
+ x: o,
2150
2271
  y: 0
2151
2272
  },
2152
2273
  {
2153
- x: a,
2154
- y: -s
2274
+ x: o,
2275
+ y: -c
2155
2276
  },
2156
2277
  {
2157
- x: o - a,
2158
- y: -s
2278
+ x: s - o,
2279
+ y: -c
2159
2280
  },
2160
2281
  {
2161
- x: o - a,
2162
- y: -i + s
2282
+ x: s - o,
2283
+ y: -a + c
2163
2284
  },
2164
2285
  {
2165
- x: a,
2166
- y: -i + s
2286
+ x: o,
2287
+ y: -a + c
2167
2288
  },
2168
2289
  {
2169
- x: a,
2170
- y: -i
2290
+ x: o,
2291
+ y: -a
2171
2292
  },
2172
2293
  {
2173
2294
  x: 0,
2174
- y: -i / 2
2295
+ y: -a / 2
2175
2296
  }
2176
- ] : r.has("up") ? [
2297
+ ] : i.has("up") ? [
2177
2298
  {
2178
- x: a,
2179
- y: -s
2299
+ x: o,
2300
+ y: -c
2180
2301
  },
2181
2302
  {
2182
- x: a,
2183
- y: -i + s
2303
+ x: o,
2304
+ y: -a + c
2184
2305
  },
2185
2306
  {
2186
2307
  x: 0,
2187
- y: -i + s
2308
+ y: -a + c
2188
2309
  },
2189
2310
  {
2190
- x: o / 2,
2191
- y: -i
2311
+ x: s / 2,
2312
+ y: -a
2192
2313
  },
2193
2314
  {
2194
- x: o,
2195
- y: -i + s
2315
+ x: s,
2316
+ y: -a + c
2196
2317
  },
2197
2318
  {
2198
- x: o - a,
2199
- y: -i + s
2319
+ x: s - o,
2320
+ y: -a + c
2200
2321
  },
2201
2322
  {
2202
- x: o - a,
2203
- y: -s
2323
+ x: s - o,
2324
+ y: -c
2204
2325
  }
2205
- ] : r.has("down") ? [
2326
+ ] : i.has("down") ? [
2206
2327
  {
2207
- x: o / 2,
2328
+ x: s / 2,
2208
2329
  y: 0
2209
2330
  },
2210
2331
  {
2211
2332
  x: 0,
2212
- y: -s
2333
+ y: -c
2213
2334
  },
2214
2335
  {
2215
- x: a,
2216
- y: -s
2336
+ x: o,
2337
+ y: -c
2217
2338
  },
2218
2339
  {
2219
- x: a,
2220
- y: -i + s
2340
+ x: o,
2341
+ y: -a + c
2221
2342
  },
2222
2343
  {
2223
- x: o - a,
2224
- y: -i + s
2344
+ x: s - o,
2345
+ y: -a + c
2225
2346
  },
2226
2347
  {
2227
- x: o - a,
2228
- y: -s
2348
+ x: s - o,
2349
+ y: -c
2229
2350
  },
2230
2351
  {
2231
- x: o,
2232
- y: -s
2352
+ x: s,
2353
+ y: -c
2233
2354
  }
2234
2355
  ] : [{
2235
2356
  x: 0,
2236
2357
  y: 0
2237
2358
  }];
2238
2359
  }, "getArrowPoints");
2239
- function Ne(e, t) {
2360
+ function ft(e, t) {
2240
2361
  return e.intersect(t);
2241
2362
  }
2242
- u(Ne, "intersectNode");
2243
- var Pe = Ne;
2244
- function Fe(e, t, n, r) {
2363
+ t(ft, "intersectNode");
2364
+ var pt = ft;
2365
+ function mt(e, t, n, r) {
2245
2366
  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);
2246
2367
  r.x < i && (l = -l);
2247
2368
  var u = Math.abs(t * n * s / c);
@@ -2250,33 +2371,33 @@ function Fe(e, t, n, r) {
2250
2371
  y: a + u
2251
2372
  };
2252
2373
  }
2253
- u(Fe, "intersectEllipse");
2254
- var Ie = Fe;
2255
- function Le(e, t, n) {
2256
- return Ie(e, t, t, n);
2374
+ t(mt, "intersectEllipse");
2375
+ var ht = mt;
2376
+ function gt(e, t, n) {
2377
+ return ht(e, t, t, n);
2257
2378
  }
2258
- u(Le, "intersectCircle");
2259
- var Re = Le;
2260
- function ze(e, t, n, r) {
2379
+ t(gt, "intersectCircle");
2380
+ var _t = gt;
2381
+ function vt(e, t, n, r) {
2261
2382
  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;
2262
- if (!(f !== 0 && p !== 0 && G(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 && G(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, {
2383
+ if (!(f !== 0 && p !== 0 && yt(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 && yt(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, {
2263
2384
  x: _,
2264
2385
  y: v
2265
2386
  };
2266
2387
  }
2267
- u(ze, "intersectLine");
2268
- function G(e, t) {
2388
+ t(vt, "intersectLine");
2389
+ function yt(e, t) {
2269
2390
  return e * t > 0;
2270
2391
  }
2271
- u(G, "sameSign");
2272
- var Be = ze, Ve = He;
2273
- function He(e, t, n) {
2392
+ t(yt, "sameSign");
2393
+ var bt = vt, xt = St;
2394
+ function St(e, t, n) {
2274
2395
  var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
2275
2396
  typeof t.forEach == "function" ? t.forEach(function(e) {
2276
2397
  o = Math.min(o, e.x), s = Math.min(s, e.y);
2277
2398
  }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
2278
2399
  for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
2279
- var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = Be(e, n, {
2400
+ var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = bt(e, n, {
2280
2401
  x: c + d.x,
2281
2402
  y: l + d.y
2282
2403
  }, {
@@ -2290,42 +2411,42 @@ function He(e, t, n) {
2290
2411
  return a < c ? -1 : a === c ? 0 : 1;
2291
2412
  }), a[0]) : e;
2292
2413
  }
2293
- u(He, "intersectPolygon");
2414
+ t(St, "intersectPolygon");
2294
2415
  var K = {
2295
- node: Pe,
2296
- circle: Re,
2297
- ellipse: Ie,
2298
- polygon: Ve,
2299
- rect: /* @__PURE__ */ u((e, t) => {
2416
+ node: pt,
2417
+ circle: _t,
2418
+ ellipse: ht,
2419
+ polygon: xt,
2420
+ rect: /* @__PURE__ */ t((e, t) => {
2300
2421
  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;
2301
2422
  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), {
2302
2423
  x: n + c,
2303
2424
  y: r + l
2304
2425
  };
2305
2426
  }, "intersectRect")
2306
- }, q = /* @__PURE__ */ u(async (e, n, i, a) => {
2307
- let o = r(), c, l = n.useHtmlLabels || s(o);
2308
- c = i || "node default";
2309
- let u = e.insert("g").attr("class", c).attr("id", n.domId || n.id), f = u.insert("g").attr("class", "label").attr("style", n.labelStyle), p;
2310
- p = n.labelText === void 0 ? "" : typeof n.labelText == "string" ? n.labelText : n.labelText[0];
2427
+ }, q = /* @__PURE__ */ t(async (e, t, r, a) => {
2428
+ let o = u(), s, c = t.useHtmlLabels || i(o);
2429
+ s = r || "node default";
2430
+ let l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), f = l.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
2431
+ p = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
2311
2432
  let m;
2312
- m = n.labelType === "markdown" ? S(f, t(g(p), o), {
2313
- useHtmlLabels: l,
2314
- width: n.width || o.flowchart.wrappingWidth,
2433
+ m = t.labelType === "markdown" ? fe(f, d(M(p), o), {
2434
+ useHtmlLabels: c,
2435
+ width: t.width || o.flowchart.wrappingWidth,
2315
2436
  classes: "markdown-node-label"
2316
- }, o) : await V(f, t(g(p), o), n.labelStyle, !1, a);
2317
- let h = m.getBBox(), _ = n.padding / 2;
2318
- if (s(o)) {
2319
- let e = m.children[0], t = d(m);
2320
- await x(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2437
+ }, o) : await U(f, d(M(p), o), t.labelStyle, !1, a);
2438
+ let h = m.getBBox(), g = t.padding / 2;
2439
+ if (i(o)) {
2440
+ let e = m.children[0], t = n(m);
2441
+ await de(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2321
2442
  }
2322
- return l ? f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : f.attr("transform", "translate(0, " + -h.height / 2 + ")"), n.centerLabel && f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), f.insert("rect", ":first-child"), {
2323
- shapeSvg: u,
2443
+ return c ? f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : f.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), f.insert("rect", ":first-child"), {
2444
+ shapeSvg: l,
2324
2445
  bbox: h,
2325
- halfPadding: _,
2446
+ halfPadding: g,
2326
2447
  label: f
2327
2448
  };
2328
- }, "labelHelper"), J = /* @__PURE__ */ u((e, t) => {
2449
+ }, "labelHelper"), J = /* @__PURE__ */ t((e, t) => {
2329
2450
  let n = t.node().getBBox();
2330
2451
  e.width = n.width, e.height = n.height;
2331
2452
  }, "updateNodeBounds");
@@ -2334,40 +2455,40 @@ function Y(e, t, n, r) {
2334
2455
  return e.x + "," + e.y;
2335
2456
  }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
2336
2457
  }
2337
- u(Y, "insertPolygonShape");
2338
- var Ue = /* @__PURE__ */ u(async (e, t) => {
2339
- t.useHtmlLabels || s(r()) || (t.centerLabel = !0);
2340
- let { shapeSvg: n, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes, !0);
2341
- l.info("Classes = ", t.classes);
2342
- let o = n.insert("rect", ":first-child");
2343
- return o.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), J(t, o), t.intersect = function(e) {
2344
- return K.rect(t, e);
2345
- }, n;
2346
- }, "note"), We = /* @__PURE__ */ u((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ u((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ u(async (e, t) => {
2347
- let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding + (r.height + t.padding), a = [
2458
+ t(Y, "insertPolygonShape");
2459
+ var Ct = /* @__PURE__ */ t(async (t, n) => {
2460
+ n.useHtmlLabels || i(u()) || (n.centerLabel = !0);
2461
+ let { shapeSvg: r, bbox: a, halfPadding: o } = await q(t, n, "node " + n.classes, !0);
2462
+ e.info("Classes = ", n.classes);
2463
+ let s = r.insert("rect", ":first-child");
2464
+ return s.attr("rx", n.rx).attr("ry", n.ry).attr("x", -a.width / 2 - o).attr("y", -a.height / 2 - o).attr("width", a.width + n.padding).attr("height", a.height + n.padding), J(n, s), n.intersect = function(e) {
2465
+ return K.rect(n, e);
2466
+ }, r;
2467
+ }, "note"), wt = /* @__PURE__ */ t((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ t((e, t) => `${t || "node default"}${wt(e.classes)} ${wt(e.class)}`, "getClassesFromNode"), Tt = /* @__PURE__ */ t(async (t, n) => {
2468
+ let { shapeSvg: r, bbox: i } = await q(t, n, X(n, void 0), !0), a = i.width + n.padding + (i.height + n.padding), o = [
2348
2469
  {
2349
- x: i / 2,
2470
+ x: a / 2,
2350
2471
  y: 0
2351
2472
  },
2352
2473
  {
2353
- x: i,
2354
- y: -i / 2
2474
+ x: a,
2475
+ y: -a / 2
2355
2476
  },
2356
2477
  {
2357
- x: i / 2,
2358
- y: -i
2478
+ x: a / 2,
2479
+ y: -a
2359
2480
  },
2360
2481
  {
2361
2482
  x: 0,
2362
- y: -i / 2
2483
+ y: -a / 2
2363
2484
  }
2364
2485
  ];
2365
- l.info("Question main (Circle)");
2366
- let o = Y(n, i, i, a);
2367
- return o.attr("style", t.style), J(t, o), t.intersect = function(e) {
2368
- return l.warn("Intersect called"), K.polygon(t, a, e);
2369
- }, n;
2370
- }, "question"), Ke = /* @__PURE__ */ u((e, t) => {
2486
+ e.info("Question main (Circle)");
2487
+ let s = Y(r, a, a, o);
2488
+ return s.attr("style", n.style), J(n, s), n.intersect = function(t) {
2489
+ return e.warn("Intersect called"), K.polygon(n, o, t);
2490
+ }, r;
2491
+ }, "question"), Et = /* @__PURE__ */ t((e, t) => {
2371
2492
  let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2372
2493
  return n.insert("polygon", ":first-child").attr("points", [
2373
2494
  {
@@ -2391,8 +2512,8 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2391
2512
  }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
2392
2513
  return K.circle(t, 14, e);
2393
2514
  }, n;
2394
- }, "choice"), qe = /* @__PURE__ */ u(async (e, t) => {
2395
- 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 = [
2515
+ }, "choice"), Dt = /* @__PURE__ */ t(async (e, t) => {
2516
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = t.positioned ? t.height : r.height + t.padding, a = i / 4, o = t.positioned ? t.width : r.width + 2 * a + t.padding, s = [
2396
2517
  {
2397
2518
  x: a,
2398
2519
  y: 0
@@ -2421,12 +2542,12 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2421
2542
  return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2422
2543
  return K.polygon(t, s, e);
2423
2544
  }, n;
2424
- }, "hexagon"), Je = /* @__PURE__ */ u(async (e, t) => {
2425
- 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 = Me(t.directions, r, t), c = Y(n, o, i, s);
2426
- return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2427
- return K.polygon(t, s, e);
2545
+ }, "hexagon"), Ot = /* @__PURE__ */ t(async (e, t) => {
2546
+ 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 = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > o ? t.width : o, c = dt(t.directions, r, t, s), l = Y(n, s, i, c);
2547
+ return l.attr("style", t.style), J(t, l), t.intersect = function(e) {
2548
+ return K.polygon(t, c, e);
2428
2549
  }, n;
2429
- }, "block_arrow"), Ye = /* @__PURE__ */ u(async (e, t) => {
2550
+ }, "block_arrow"), kt = /* @__PURE__ */ t(async (e, t) => {
2430
2551
  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 = [
2431
2552
  {
2432
2553
  x: -a / 2,
@@ -2452,7 +2573,7 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2452
2573
  return Y(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2453
2574
  return K.polygon(t, o, e);
2454
2575
  }, n;
2455
- }, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ u(async (e, t) => {
2576
+ }, "rect_left_inv_arrow"), At = /* @__PURE__ */ t(async (e, t) => {
2456
2577
  let { shapeSvg: n, bbox: r } = await q(e, t, X(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2457
2578
  {
2458
2579
  x: -2 * a / 6,
@@ -2474,7 +2595,7 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2474
2595
  return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2475
2596
  return K.polygon(t, o, e);
2476
2597
  }, n;
2477
- }, "lean_right"), Ze = /* @__PURE__ */ u(async (e, t) => {
2598
+ }, "lean_right"), jt = /* @__PURE__ */ t(async (e, t) => {
2478
2599
  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 = [
2479
2600
  {
2480
2601
  x: 2 * a / 6,
@@ -2496,7 +2617,7 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2496
2617
  return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2497
2618
  return K.polygon(t, o, e);
2498
2619
  }, n;
2499
- }, "lean_left"), Qe = /* @__PURE__ */ u(async (e, t) => {
2620
+ }, "lean_left"), Mt = /* @__PURE__ */ t(async (e, t) => {
2500
2621
  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 = [
2501
2622
  {
2502
2623
  x: -2 * a / 6,
@@ -2518,7 +2639,7 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2518
2639
  return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2519
2640
  return K.polygon(t, o, e);
2520
2641
  }, n;
2521
- }, "trapezoid"), $e = /* @__PURE__ */ u(async (e, t) => {
2642
+ }, "trapezoid"), Nt = /* @__PURE__ */ t(async (e, t) => {
2522
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 = [
2523
2644
  {
2524
2645
  x: a / 6,
@@ -2540,7 +2661,7 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2540
2661
  return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2541
2662
  return K.polygon(t, o, e);
2542
2663
  }, n;
2543
- }, "inv_trapezoid"), et = /* @__PURE__ */ u(async (e, t) => {
2664
+ }, "inv_trapezoid"), Pt = /* @__PURE__ */ t(async (e, t) => {
2544
2665
  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 = [
2545
2666
  {
2546
2667
  x: 0,
@@ -2566,7 +2687,7 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2566
2687
  return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2567
2688
  return K.polygon(t, o, e);
2568
2689
  }, n;
2569
- }, "rect_right_inv_arrow"), tt = /* @__PURE__ */ u(async (e, t) => {
2690
+ }, "rect_right_inv_arrow"), Ft = /* @__PURE__ */ t(async (e, t) => {
2570
2691
  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;
2571
2692
  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) {
2572
2693
  let n = K.rect(t, e), r = n.x - t.x;
@@ -2576,90 +2697,90 @@ var Ue = /* @__PURE__ */ u(async (e, t) => {
2576
2697
  }
2577
2698
  return n;
2578
2699
  }, n;
2579
- }, "cylinder"), nt = /* @__PURE__ */ u(async (e, t) => {
2580
- let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, "node " + t.classes + " " + t.class, !0), a = n.insert("rect", ":first-child"), o = t.positioned ? t.width : r.width + t.padding, s = t.positioned ? t.height : r.height + t.padding, c = t.positioned ? -o / 2 : -r.width / 2 - i, u = t.positioned ? -s / 2 : -r.height / 2 - i;
2581
- if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", o).attr("height", s), t.props) {
2582
- let e = new Set(Object.keys(t.props));
2583
- t.props.borders && (Z(a, t.props.borders, o, s), e.delete("borders")), e.forEach((e) => {
2584
- l.warn(`Unknown node property ${e}`);
2700
+ }, "cylinder"), It = /* @__PURE__ */ t(async (t, n) => {
2701
+ 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;
2702
+ 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) {
2703
+ let t = new Set(Object.keys(n.props));
2704
+ n.props.borders && (Z(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
2705
+ e.warn(`Unknown node property ${t}`);
2585
2706
  });
2586
2707
  }
2587
- return J(t, a), t.intersect = function(e) {
2588
- return K.rect(t, e);
2589
- }, n;
2590
- }, "rect"), rt = /* @__PURE__ */ u(async (e, t) => {
2591
- let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, "node " + t.classes, !0), a = n.insert("rect", ":first-child"), o = t.positioned ? t.width : r.width + t.padding, s = t.positioned ? t.height : r.height + t.padding, c = t.positioned ? -o / 2 : -r.width / 2 - i, u = t.positioned ? -s / 2 : -r.height / 2 - i;
2592
- if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", o).attr("height", s), t.props) {
2593
- let e = new Set(Object.keys(t.props));
2594
- t.props.borders && (Z(a, t.props.borders, o, s), e.delete("borders")), e.forEach((e) => {
2595
- l.warn(`Unknown node property ${e}`);
2708
+ return J(n, o), n.intersect = function(e) {
2709
+ return K.rect(n, e);
2710
+ }, r;
2711
+ }, "rect"), Lt = /* @__PURE__ */ t(async (t, n) => {
2712
+ 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;
2713
+ 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) {
2714
+ let t = new Set(Object.keys(n.props));
2715
+ n.props.borders && (Z(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
2716
+ e.warn(`Unknown node property ${t}`);
2596
2717
  });
2597
2718
  }
2598
- return J(t, a), t.intersect = function(e) {
2599
- return K.rect(t, e);
2600
- }, n;
2601
- }, "composite"), it = /* @__PURE__ */ u(async (e, t) => {
2602
- let { shapeSvg: n } = await q(e, t, "label", !0);
2603
- l.trace("Classes = ", t.class);
2604
- let r = n.insert("rect", ":first-child");
2605
- if (r.attr("width", 0).attr("height", 0), n.attr("class", "label edgeLabel"), t.props) {
2606
- let e = new Set(Object.keys(t.props));
2607
- t.props.borders && (Z(r, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
2608
- l.warn(`Unknown node property ${e}`);
2719
+ return J(n, o), n.intersect = function(e) {
2720
+ return K.rect(n, e);
2721
+ }, r;
2722
+ }, "composite"), Rt = /* @__PURE__ */ t(async (t, n) => {
2723
+ let { shapeSvg: r } = await q(t, n, "label", !0);
2724
+ e.trace("Classes = ", n.class);
2725
+ let i = r.insert("rect", ":first-child");
2726
+ if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), n.props) {
2727
+ let t = new Set(Object.keys(n.props));
2728
+ n.props.borders && (Z(i, n.props.borders, 0, 0), t.delete("borders")), t.forEach((t) => {
2729
+ e.warn(`Unknown node property ${t}`);
2609
2730
  });
2610
2731
  }
2611
- return J(t, r), t.intersect = function(e) {
2612
- return K.rect(t, e);
2613
- }, n;
2732
+ return J(n, i), n.intersect = function(e) {
2733
+ return K.rect(n, e);
2734
+ }, r;
2614
2735
  }, "labelRect");
2615
- function Z(e, t, n, r) {
2616
- let i = [], a = /* @__PURE__ */ u((e) => {
2617
- i.push(e, 0);
2618
- }, "addBorder"), o = /* @__PURE__ */ u((e) => {
2619
- i.push(0, e);
2736
+ function Z(n, r, i, a) {
2737
+ let o = [], s = /* @__PURE__ */ t((e) => {
2738
+ o.push(e, 0);
2739
+ }, "addBorder"), c = /* @__PURE__ */ t((e) => {
2740
+ o.push(0, e);
2620
2741
  }, "skipBorder");
2621
- t.includes("t") ? (l.debug("add top border"), a(n)) : o(n), t.includes("r") ? (l.debug("add right border"), a(r)) : o(r), t.includes("b") ? (l.debug("add bottom border"), a(n)) : o(n), t.includes("l") ? (l.debug("add left border"), a(r)) : o(r), e.attr("stroke-dasharray", i.join(" "));
2742
+ 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(" "));
2622
2743
  }
2623
- u(Z, "applyNodePropertyBorders");
2624
- var at = /* @__PURE__ */ u(async (e, t) => {
2625
- let n;
2626
- n = t.classes ? "node " + t.classes : "node default";
2627
- let i = e.insert("g").attr("class", n).attr("id", t.domId || t.id), a = i.insert("rect", ":first-child"), o = i.insert("line"), c = i.insert("g").attr("class", "label"), u = t.labelText.flat ? t.labelText.flat() : t.labelText, f = "";
2628
- f = typeof u == "object" ? u[0] : u, l.info("Label text abc79", f, u, typeof u == "object");
2629
- let p = await V(c, f, t.labelStyle, !0, !0), m = {
2744
+ t(Z, "applyNodePropertyBorders");
2745
+ var zt = /* @__PURE__ */ t(async (t, r) => {
2746
+ let a;
2747
+ a = r.classes ? "node " + r.classes : "node default";
2748
+ let o = t.insert("g").attr("class", a).attr("id", r.domId || r.id), s = o.insert("rect", ":first-child"), c = o.insert("line"), l = o.insert("g").attr("class", "label"), d = r.labelText.flat ? r.labelText.flat() : r.labelText, f = "";
2749
+ f = typeof d == "object" ? d[0] : d, e.info("Label text abc79", f, d, typeof d == "object");
2750
+ let p = await U(l, f, r.labelStyle, !0, !0), m = {
2630
2751
  width: 0,
2631
2752
  height: 0
2632
2753
  };
2633
- if (s(r())) {
2634
- let e = p.children[0], t = d(p);
2754
+ if (i(u())) {
2755
+ let e = p.children[0], t = n(p);
2635
2756
  m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
2636
2757
  }
2637
- l.info("Text 2", u);
2638
- let h = u.slice(1, u.length), g = p.getBBox(), _ = await V(c, h.join ? h.join("<br/>") : h, t.labelStyle, !0, !0);
2639
- if (s(r())) {
2640
- let e = _.children[0], t = d(_);
2758
+ e.info("Text 2", d);
2759
+ let h = d.slice(1, d.length), g = p.getBBox(), _ = await U(l, h.join ? h.join("<br/>") : h, r.labelStyle, !0, !0);
2760
+ if (i(u())) {
2761
+ let e = _.children[0], t = n(_);
2641
2762
  m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
2642
2763
  }
2643
- let v = t.padding / 2;
2644
- return d(_).attr("transform", "translate( " + (m.width > g.width ? 0 : (g.width - m.width) / 2) + ", " + (g.height + v + 5) + ")"), d(p).attr("transform", "translate( " + (m.width < g.width ? 0 : -(g.width - m.width) / 2) + ", 0)"), m = c.node().getBBox(), c.attr("transform", "translate(" + -m.width / 2 + ", " + (-m.height / 2 - v + 3) + ")"), a.attr("class", "outer title-state").attr("x", -m.width / 2 - v).attr("y", -m.height / 2 - v).attr("width", m.width + t.padding).attr("height", m.height + t.padding), o.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(t, a), t.intersect = function(e) {
2645
- return K.rect(t, e);
2646
- }, i;
2647
- }, "rectWithTitle"), ot = /* @__PURE__ */ u(async (e, t) => {
2764
+ let v = r.padding / 2;
2765
+ 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 = l.node().getBBox(), l.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) {
2766
+ return K.rect(r, e);
2767
+ }, o;
2768
+ }, "rectWithTitle"), Bt = /* @__PURE__ */ t(async (e, t) => {
2648
2769
  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;
2649
2770
  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) {
2650
2771
  return K.rect(t, e);
2651
2772
  }, n;
2652
- }, "stadium"), st = /* @__PURE__ */ u(async (e, t) => {
2653
- let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, X(t, void 0), !0), a = n.insert("circle", ":first-child");
2654
- return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), l.info("Circle main"), J(t, a), t.intersect = function(e) {
2655
- return l.info("Circle intersect", t, r.width / 2 + i, e), K.circle(t, r.width / 2 + i, e);
2656
- }, n;
2657
- }, "circle"), ct = /* @__PURE__ */ u(async (e, t) => {
2658
- let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, X(t, void 0), !0), a = n.insert("g", ":first-child"), o = a.insert("circle"), s = a.insert("circle");
2659
- return a.attr("class", t.class), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i + 5).attr("width", r.width + t.padding + 10).attr("height", r.height + t.padding + 10), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), l.info("DoubleCircle main"), J(t, o), t.intersect = function(e) {
2660
- return l.info("DoubleCircle intersect", t, r.width / 2 + i + 5, e), K.circle(t, r.width / 2 + i + 5, e);
2661
- }, n;
2662
- }, "doublecircle"), lt = /* @__PURE__ */ u(async (e, t) => {
2773
+ }, "stadium"), Vt = /* @__PURE__ */ t(async (t, n) => {
2774
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(t, n, X(n, void 0), !0), o = r.insert("circle", ":first-child");
2775
+ 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) {
2776
+ return e.info("Circle intersect", n, i.width / 2 + a, t), K.circle(n, i.width / 2 + a, t);
2777
+ }, r;
2778
+ }, "circle"), Ht = /* @__PURE__ */ t(async (t, n) => {
2779
+ 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");
2780
+ 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) {
2781
+ return e.info("DoubleCircle intersect", n, i.width / 2 + a + 5, t), K.circle(n, i.width / 2 + a + 5, t);
2782
+ }, r;
2783
+ }, "doublecircle"), Ut = /* @__PURE__ */ t(async (e, t) => {
2663
2784
  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 = [
2664
2785
  {
2665
2786
  x: 0,
@@ -2705,182 +2826,182 @@ var at = /* @__PURE__ */ u(async (e, t) => {
2705
2826
  return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2706
2827
  return K.polygon(t, o, e);
2707
2828
  }, n;
2708
- }, "subroutine"), ut = /* @__PURE__ */ u((e, t) => {
2829
+ }, "subroutine"), Wt = /* @__PURE__ */ t((e, t) => {
2709
2830
  let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
2710
2831
  return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), J(t, r), t.intersect = function(e) {
2711
2832
  return K.circle(t, 7, e);
2712
2833
  }, n;
2713
- }, "start"), dt = /* @__PURE__ */ u((e, t, n) => {
2834
+ }, "start"), Gt = /* @__PURE__ */ t((e, t, n) => {
2714
2835
  let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
2715
2836
  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) {
2716
2837
  return K.rect(t, e);
2717
2838
  }, r;
2718
- }, "forkJoin"), ft = {
2719
- rhombus: Ge,
2720
- composite: rt,
2721
- question: Ge,
2722
- rect: nt,
2723
- labelRect: it,
2724
- rectWithTitle: at,
2725
- choice: Ke,
2726
- circle: st,
2727
- doublecircle: ct,
2728
- stadium: ot,
2729
- hexagon: qe,
2730
- block_arrow: Je,
2731
- rect_left_inv_arrow: Ye,
2732
- lean_right: Xe,
2733
- lean_left: Ze,
2734
- trapezoid: Qe,
2735
- inv_trapezoid: $e,
2736
- rect_right_inv_arrow: et,
2737
- cylinder: tt,
2738
- start: ut,
2739
- end: /* @__PURE__ */ u((e, t) => {
2839
+ }, "forkJoin"), Kt = {
2840
+ rhombus: Tt,
2841
+ composite: Lt,
2842
+ question: Tt,
2843
+ rect: It,
2844
+ labelRect: Rt,
2845
+ rectWithTitle: zt,
2846
+ choice: Et,
2847
+ circle: Vt,
2848
+ doublecircle: Ht,
2849
+ stadium: Bt,
2850
+ hexagon: Dt,
2851
+ block_arrow: Ot,
2852
+ rect_left_inv_arrow: kt,
2853
+ lean_right: At,
2854
+ lean_left: jt,
2855
+ trapezoid: Mt,
2856
+ inv_trapezoid: Nt,
2857
+ rect_right_inv_arrow: Pt,
2858
+ cylinder: Ft,
2859
+ start: Wt,
2860
+ end: /* @__PURE__ */ t((e, t) => {
2740
2861
  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");
2741
2862
  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) {
2742
2863
  return K.circle(t, 7, e);
2743
2864
  }, n;
2744
2865
  }, "end"),
2745
- note: Ue,
2746
- subroutine: lt,
2747
- fork: dt,
2748
- join: dt,
2749
- class_box: /* @__PURE__ */ u(async (e, t) => {
2750
- let n = t.padding / 2, i;
2751
- i = t.classes ? "node " + t.classes : "node default";
2752
- let a = e.insert("g").attr("class", i).attr("id", t.domId || t.id), o = a.insert("rect", ":first-child"), c = a.insert("line"), l = a.insert("line"), u = 0, f = 4, p = a.insert("g").attr("class", "label"), m = 0, h = t.classData.annotations?.[0], g = await V(p, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = g.getBBox();
2753
- if (s(r())) {
2754
- let e = g.children[0], t = d(g);
2866
+ note: Ct,
2867
+ subroutine: Ut,
2868
+ fork: Gt,
2869
+ join: Gt,
2870
+ class_box: /* @__PURE__ */ t(async (e, t) => {
2871
+ let r = t.padding / 2, a;
2872
+ a = t.classes ? "node " + t.classes : "node default";
2873
+ let o = e.insert("g").attr("class", a).attr("id", t.domId || t.id), s = o.insert("rect", ":first-child"), c = o.insert("line"), l = o.insert("line"), d = 0, f = 4, p = o.insert("g").attr("class", "label"), m = 0, h = t.classData.annotations?.[0], g = await U(p, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = g.getBBox();
2874
+ if (i(u())) {
2875
+ let e = g.children[0], t = n(g);
2755
2876
  _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
2756
2877
  }
2757
- t.classData.annotations[0] && (f += _.height + 4, u += _.width);
2878
+ t.classData.annotations[0] && (f += _.height + 4, d += _.width);
2758
2879
  let v = t.classData.label;
2759
- t.classData.type !== void 0 && t.classData.type !== "" && (s(r()) ? v += "&lt;" + t.classData.type + "&gt;" : v += "<" + t.classData.type + ">");
2760
- let y = await V(p, v, t.labelStyle, !0, !0);
2761
- d(y).attr("class", "classTitle");
2880
+ t.classData.type !== void 0 && t.classData.type !== "" && (i(u()) ? v += "&lt;" + t.classData.type + "&gt;" : v += "<" + t.classData.type + ">");
2881
+ let y = await U(p, v, t.labelStyle, !0, !0);
2882
+ n(y).attr("class", "classTitle");
2762
2883
  let b = y.getBBox();
2763
- if (s(r())) {
2764
- let e = y.children[0], t = d(y);
2884
+ if (i(u())) {
2885
+ let e = y.children[0], t = n(y);
2765
2886
  b = e.getBoundingClientRect(), t.attr("width", b.width), t.attr("height", b.height);
2766
2887
  }
2767
- f += b.height + 4, b.width > u && (u = b.width);
2888
+ f += b.height + 4, b.width > d && (d = b.width);
2768
2889
  let x = [];
2769
2890
  t.classData.members.forEach(async (e) => {
2770
- let n = e.getDisplayDetails(), i = n.displayText;
2771
- s(r()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2772
- let a = await V(p, i, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
2773
- if (s(r())) {
2774
- let e = a.children[0], t = d(a);
2775
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
2891
+ let r = e.getDisplayDetails(), a = r.displayText;
2892
+ i(u()) && (a = a.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2893
+ let o = await U(p, a, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), s = o.getBBox();
2894
+ if (i(u())) {
2895
+ let e = o.children[0], t = n(o);
2896
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
2776
2897
  }
2777
- o.width > u && (u = o.width), f += o.height + 4, x.push(a);
2898
+ s.width > d && (d = s.width), f += s.height + 4, x.push(o);
2778
2899
  }), f += 8;
2779
2900
  let S = [];
2780
2901
  if (t.classData.methods.forEach(async (e) => {
2781
- let n = e.getDisplayDetails(), i = n.displayText;
2782
- s(r()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2783
- let a = await V(p, i, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
2784
- if (s(r())) {
2785
- let e = a.children[0], t = d(a);
2786
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
2902
+ let r = e.getDisplayDetails(), a = r.displayText;
2903
+ i(u()) && (a = a.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2904
+ let o = await U(p, a, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), s = o.getBBox();
2905
+ if (i(u())) {
2906
+ let e = o.children[0], t = n(o);
2907
+ s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
2787
2908
  }
2788
- o.width > u && (u = o.width), f += o.height + 4, S.push(a);
2909
+ s.width > d && (d = s.width), f += s.height + 4, S.push(o);
2789
2910
  }), f += 8, h) {
2790
- let e = (u - _.width) / 2;
2791
- d(g).attr("transform", "translate( " + (-1 * u / 2 + e) + ", " + -1 * f / 2 + ")"), m = _.height + 4;
2911
+ let e = (d - _.width) / 2;
2912
+ n(g).attr("transform", "translate( " + (-1 * d / 2 + e) + ", " + -1 * f / 2 + ")"), m = _.height + 4;
2792
2913
  }
2793
- let C = (u - b.width) / 2;
2794
- return d(y).attr("transform", "translate( " + (-1 * u / 2 + C) + ", " + (-1 * f / 2 + m) + ")"), m += b.height + 4, c.attr("class", "divider").attr("x1", -u / 2 - n).attr("x2", u / 2 + n).attr("y1", -f / 2 - n + 8 + m).attr("y2", -f / 2 - n + 8 + m), m += 8, x.forEach((e) => {
2795
- d(e).attr("transform", "translate( " + -u / 2 + ", " + (-1 * f / 2 + m + 8 / 2) + ")");
2914
+ let C = (d - b.width) / 2;
2915
+ return n(y).attr("transform", "translate( " + (-1 * d / 2 + C) + ", " + (-1 * f / 2 + m) + ")"), m += b.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, x.forEach((e) => {
2916
+ n(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m + 8 / 2) + ")");
2796
2917
  let t = e?.getBBox();
2797
2918
  m += (t?.height ?? 0) + 4;
2798
- }), m += 8, l.attr("class", "divider").attr("x1", -u / 2 - n).attr("x2", u / 2 + n).attr("y1", -f / 2 - n + 8 + m).attr("y2", -f / 2 - n + 8 + m), m += 8, S.forEach((e) => {
2799
- d(e).attr("transform", "translate( " + -u / 2 + ", " + (-1 * f / 2 + m) + ")");
2919
+ }), m += 8, l.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) => {
2920
+ n(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m) + ")");
2800
2921
  let t = e?.getBBox();
2801
2922
  m += (t?.height ?? 0) + 4;
2802
- }), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -u / 2 - n).attr("y", -(f / 2) - n).attr("width", u + t.padding).attr("height", f + t.padding), J(t, o), t.intersect = function(e) {
2923
+ }), 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) {
2803
2924
  return K.rect(t, e);
2804
- }, a;
2925
+ }, o;
2805
2926
  }, "class_box")
2806
- }, Q = {}, pt = /* @__PURE__ */ u(async (e, t, n) => {
2807
- let i, a;
2927
+ }, Q = {}, qt = /* @__PURE__ */ t(async (e, t, n) => {
2928
+ let r, i;
2808
2929
  if (t.link) {
2809
- let o;
2810
- r().securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o), a = await ft[t.shape](i, t, n);
2811
- } else a = await ft[t.shape](e, t, n), i = a;
2812
- return t.tooltip && a.attr("title", t.tooltip), t.class && a.attr("class", "node default " + t.class), Q[t.id] = i, t.haveCallback && Q[t.id].attr("class", Q[t.id].attr("class") + " clickable"), i;
2813
- }, "insertNode"), mt = /* @__PURE__ */ u((e) => {
2814
- let t = Q[e.id];
2815
- l.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
2816
- let n = e.diff || 0;
2817
- return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
2930
+ let a;
2931
+ u().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 Kt[t.shape](r, t, n);
2932
+ } else i = await Kt[t.shape](e, t, n), r = i;
2933
+ 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;
2934
+ }, "insertNode"), Jt = /* @__PURE__ */ t((t) => {
2935
+ let n = Q[t.id];
2936
+ e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
2937
+ let r = t.diff || 0;
2938
+ 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;
2818
2939
  }, "positionNode");
2819
- function ht(e, t, n = !1) {
2940
+ function Yt(e, t, n = !1) {
2820
2941
  let r = e, i = "default";
2821
2942
  (r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
2822
- let a = 0, o = "", s;
2943
+ let a = 0, s = "", c;
2823
2944
  switch (r.type) {
2824
2945
  case "round":
2825
- a = 5, o = "rect";
2946
+ a = 5, s = "rect";
2826
2947
  break;
2827
2948
  case "composite":
2828
- a = 0, o = "composite", s = 0;
2949
+ a = 0, s = "composite", c = 0;
2829
2950
  break;
2830
2951
  case "square":
2831
- o = "rect";
2952
+ s = "rect";
2832
2953
  break;
2833
2954
  case "diamond":
2834
- o = "question";
2955
+ s = "question";
2835
2956
  break;
2836
2957
  case "hexagon":
2837
- o = "hexagon";
2958
+ s = "hexagon";
2838
2959
  break;
2839
2960
  case "block_arrow":
2840
- o = "block_arrow";
2961
+ s = "block_arrow";
2841
2962
  break;
2842
2963
  case "odd":
2843
- o = "rect_left_inv_arrow";
2964
+ s = "rect_left_inv_arrow";
2844
2965
  break;
2845
2966
  case "lean_right":
2846
- o = "lean_right";
2967
+ s = "lean_right";
2847
2968
  break;
2848
2969
  case "lean_left":
2849
- o = "lean_left";
2970
+ s = "lean_left";
2850
2971
  break;
2851
2972
  case "trapezoid":
2852
- o = "trapezoid";
2973
+ s = "trapezoid";
2853
2974
  break;
2854
2975
  case "inv_trapezoid":
2855
- o = "inv_trapezoid";
2976
+ s = "inv_trapezoid";
2856
2977
  break;
2857
2978
  case "rect_left_inv_arrow":
2858
- o = "rect_left_inv_arrow";
2979
+ s = "rect_left_inv_arrow";
2859
2980
  break;
2860
2981
  case "circle":
2861
- o = "circle";
2982
+ s = "circle";
2862
2983
  break;
2863
2984
  case "ellipse":
2864
- o = "ellipse";
2985
+ s = "ellipse";
2865
2986
  break;
2866
2987
  case "stadium":
2867
- o = "stadium";
2988
+ s = "stadium";
2868
2989
  break;
2869
2990
  case "subroutine":
2870
- o = "subroutine";
2991
+ s = "subroutine";
2871
2992
  break;
2872
2993
  case "cylinder":
2873
- o = "cylinder";
2994
+ s = "cylinder";
2874
2995
  break;
2875
2996
  case "group":
2876
- o = "rect";
2997
+ s = "rect";
2877
2998
  break;
2878
2999
  case "doublecircle":
2879
- o = "doublecircle";
3000
+ s = "doublecircle";
2880
3001
  break;
2881
- default: o = "rect";
3002
+ default: s = "rect";
2882
3003
  }
2883
- let l = m(r?.styles ?? []), u = r.label, d = r.size ?? {
3004
+ let l = re(r?.styles ?? []), u = r.label, d = r.size ?? {
2884
3005
  width: 0,
2885
3006
  height: 0,
2886
3007
  x: 0,
@@ -2888,7 +3009,7 @@ function ht(e, t, n = !1) {
2888
3009
  }, f = t.getDiagramId();
2889
3010
  return {
2890
3011
  labelStyle: l.labelStyle,
2891
- shape: o,
3012
+ shape: s,
2892
3013
  labelText: u,
2893
3014
  rx: a,
2894
3015
  ry: a,
@@ -2904,42 +3025,43 @@ function ht(e, t, n = !1) {
2904
3025
  positioned: n,
2905
3026
  intersect: void 0,
2906
3027
  type: r.type,
2907
- padding: s ?? c()?.block?.padding ?? 0
3028
+ padding: c ?? o()?.block?.padding ?? 0,
3029
+ widthInColumns: r.widthInColumns ?? 1
2908
3030
  };
2909
3031
  }
2910
- u(ht, "getNodeFromBlock");
2911
- async function gt(e, t, n) {
2912
- let r = ht(t, n, !1);
3032
+ t(Yt, "getNodeFromBlock");
3033
+ async function Xt(e, t, n) {
3034
+ let r = Yt(t, n, !1);
2913
3035
  if (r.type === "group") return;
2914
- let i = await pt(e, r, { config: c() }), a = i.node().getBBox(), o = n.getBlock(r.id);
2915
- o.size = {
3036
+ let i = await qt(e, r, { config: o() }), a = i.node().getBBox(), s = n.getBlock(r.id);
3037
+ s.size = {
2916
3038
  width: a.width,
2917
3039
  height: a.height,
2918
3040
  x: 0,
2919
3041
  y: 0,
2920
3042
  node: i
2921
- }, n.setBlock(o), i.remove();
3043
+ }, n.setBlock(s), i.remove();
2922
3044
  }
2923
- u(gt, "calculateBlockSize");
2924
- async function _t(e, t, n) {
2925
- let r = ht(t, n, !0);
2926
- n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: c() }), t.intersect = r?.intersect, mt(r));
3045
+ t(Xt, "calculateBlockSize");
3046
+ async function Zt(e, t, n) {
3047
+ let r = Yt(t, n, !0);
3048
+ n.getBlock(r.id).type !== "space" && (await qt(e, r, { config: o() }), t.intersect = r?.intersect, Jt(r));
2927
3049
  }
2928
- u(_t, "insertBlockPositioned");
3050
+ t(Zt, "insertBlockPositioned");
2929
3051
  async function $(e, t, n, r) {
2930
3052
  for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
2931
3053
  }
2932
- u($, "performOperations");
2933
- async function vt(e, t, n) {
2934
- await $(e, t, n, gt);
3054
+ t($, "performOperations");
3055
+ async function Qt(e, t, n) {
3056
+ await $(e, t, n, Xt);
2935
3057
  }
2936
- u(vt, "calculateBlockSizes");
2937
- async function yt(e, t, n) {
2938
- await $(e, t, n, _t);
3058
+ t(Qt, "calculateBlockSizes");
3059
+ async function $t(e, t, n) {
3060
+ await $(e, t, n, Zt);
2939
3061
  }
2940
- u(yt, "insertBlocks");
2941
- async function bt(e, t, n, r, i) {
2942
- let a = new w({
3062
+ t($t, "insertBlocks");
3063
+ async function en(e, t, n, r, i) {
3064
+ let a = new me({
2943
3065
  multigraph: !0,
2944
3066
  compound: !0
2945
3067
  });
@@ -2971,8 +3093,8 @@ async function bt(e, t, n, r, i) {
2971
3093
  x: s.x,
2972
3094
  y: s.y
2973
3095
  }
2974
- ], l = i ? `${i}-${n.id}` : n.id;
2975
- Ae(e, {
3096
+ ], l = i ? `${i}-${n.id}` : n.id, u = `${n.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${n.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
3097
+ lt(e, {
2976
3098
  v: n.start,
2977
3099
  w: n.end,
2978
3100
  name: l
@@ -2982,16 +3104,16 @@ async function bt(e, t, n, r, i) {
2982
3104
  arrowTypeEnd: n.arrowTypeEnd,
2983
3105
  arrowTypeStart: n.arrowTypeStart,
2984
3106
  points: c,
2985
- classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2986
- }, void 0, "block", a, i), n.label && (await Te(e, {
3107
+ classes: u
3108
+ }, void 0, "block", a, i), n.label && (await it(e, {
2987
3109
  ...n,
2988
3110
  label: n.label,
2989
3111
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2990
3112
  arrowTypeEnd: n.arrowTypeEnd,
2991
3113
  arrowTypeStart: n.arrowTypeStart,
2992
3114
  points: c,
2993
- classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2994
- }), Ee({
3115
+ classes: u
3116
+ }), at({
2995
3117
  ...n,
2996
3118
  x: c[1].x,
2997
3119
  y: c[1].y
@@ -2999,35 +3121,35 @@ async function bt(e, t, n, r, i) {
2999
3121
  }
3000
3122
  }
3001
3123
  }
3002
- u(bt, "insertEdges");
3003
- var xt = {
3004
- parser: D,
3005
- db: he,
3124
+ t(en, "insertEdges");
3125
+ var tn = {
3126
+ parser: Ce,
3127
+ db: Ue,
3006
3128
  renderer: {
3007
- draw: /* @__PURE__ */ u(async function(e, t, n, r) {
3008
- let { securityLevel: a, block: o } = c(), s = r.db;
3009
- s.setDiagramId(t);
3010
- let u;
3011
- a === "sandbox" && (u = d("#i" + t));
3012
- let f = d(a === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), p = a === "sandbox" ? f.select(`[id="${t}"]`) : d(`[id="${t}"]`);
3013
- ye(p, [
3129
+ draw: /* @__PURE__ */ t(async function(t, r, i, a) {
3130
+ let { securityLevel: c, block: l } = o(), u = a.db;
3131
+ u.setDiagramId(r);
3132
+ let d;
3133
+ c === "sandbox" && (d = n("#i" + r));
3134
+ let f = n(c === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = c === "sandbox" ? f.select(`[id="${r}"]`) : n(`[id="${r}"]`);
3135
+ Je(p, [
3014
3136
  "point",
3015
3137
  "circle",
3016
3138
  "cross"
3017
- ], r.type, t);
3018
- let m = s.getBlocks(), h = s.getBlocksFlat(), g = s.getEdges(), _ = p.insert("g").attr("class", "block");
3019
- await vt(_, m, s);
3020
- let v = xe(s);
3021
- if (await yt(_, m, s), await bt(_, g, h, s, t), v) {
3022
- let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), n = e.height + t + 10, r = e.width + 10, { useMaxWidth: a } = o;
3023
- i(p, n, r, !!a), l.debug("Here Bounds", v, e), p.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
3139
+ ], a.type, r);
3140
+ let m = u.getBlocks(), h = u.getBlocksFlat(), g = u.getEdges(), _ = p.insert("g").attr("class", "block");
3141
+ await Qt(_, m, u);
3142
+ let v = $e(u);
3143
+ if (await $t(_, m, u), await en(_, g, h, u, r), v) {
3144
+ 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 } = l;
3145
+ 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}`);
3024
3146
  }
3025
3147
  }, "draw"),
3026
- getClasses: /* @__PURE__ */ u(function(e, t) {
3148
+ getClasses: /* @__PURE__ */ t(function(e, t) {
3027
3149
  return t.db.getClasses();
3028
3150
  }, "getClasses")
3029
3151
  },
3030
- styles: ge
3152
+ styles: Ge
3031
3153
  };
3032
3154
  //#endregion
3033
- export { xt as diagram };
3155
+ export { tn as diagram };