@countermeasure-platform/web-components 1.2.1 → 1.2.2-dev.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/dist/{arc-jVbrWVYZ.js → arc-DOJ9myHo.js} +21 -21
  2. package/dist/{arc-jVbrWVYZ.js.map → arc-DOJ9myHo.js.map} +1 -1
  3. package/dist/architecture-7EHR7CIX-RjIwnEbG.js +3 -0
  4. package/dist/{architectureDiagram-2XIMDMQ5-D5q0ma9h.js → architectureDiagram-3BPJPVTR-cYFnhp15.js} +165 -152
  5. package/dist/{architectureDiagram-2XIMDMQ5-D5q0ma9h.js.map → architectureDiagram-3BPJPVTR-cYFnhp15.js.map} +1 -1
  6. package/dist/{array-DXadUs1s.js → array-BLp0zq5K.js} +1 -1
  7. package/dist/{array-DXadUs1s.js.map → array-BLp0zq5K.js.map} +1 -1
  8. package/dist/{blockDiagram-WCTKOSBZ-BH3jwWeU.js → blockDiagram-GPEHLZMM-DNLPMFXL.js} +994 -864
  9. package/dist/blockDiagram-GPEHLZMM-DNLPMFXL.js.map +1 -0
  10. package/dist/{c4Diagram-IC4MRINW-OFLrunYI.js → c4Diagram-AAUBKEIU-G8g3OBBg.js} +232 -235
  11. package/dist/c4Diagram-AAUBKEIU-G8g3OBBg.js.map +1 -0
  12. package/dist/channel-MTYqUJFm.js +7 -0
  13. package/dist/{channel-LRbq43st.js.map → channel-MTYqUJFm.js.map} +1 -1
  14. package/dist/{chunk-KX2RTZJC-d9jFqUAY.js → chunk-2J33WTMH-BKsVIUnb.js} +4 -4
  15. package/dist/{chunk-KX2RTZJC-d9jFqUAY.js.map → chunk-2J33WTMH-BKsVIUnb.js.map} +1 -1
  16. package/dist/chunk-3OPIFGDE-CcNRL44h.js +3669 -0
  17. package/dist/chunk-3OPIFGDE-CcNRL44h.js.map +1 -0
  18. package/dist/{chunk-4BX2VUAB-BS9gpN-y.js → chunk-4BX2VUAB-BeLKo9Pn.js} +2 -2
  19. package/dist/{chunk-4BX2VUAB-BS9gpN-y.js.map → chunk-4BX2VUAB-BeLKo9Pn.js.map} +1 -1
  20. package/dist/{chunk-R5LLSJPH-c1IfaK5D.js → chunk-4EGX6M5U-Bh9as06l.js} +13 -13
  21. package/dist/chunk-4EGX6M5U-Bh9as06l.js.map +1 -0
  22. package/dist/{chunk-55IACEB6-DZ-UBhHX.js → chunk-55IACEB6-CuKbiO89.js} +3 -3
  23. package/dist/{chunk-55IACEB6-DZ-UBhHX.js.map → chunk-55IACEB6-CuKbiO89.js.map} +1 -1
  24. package/dist/chunk-5DO6E6H7-CAB8pWf5.js +25 -0
  25. package/dist/chunk-5DO6E6H7-CAB8pWf5.js.map +1 -0
  26. package/dist/{chunk-GEFDOKGD-DGJJEGSm.js → chunk-5ZQYHXKU-CjOcwRY6.js} +570 -326
  27. package/dist/chunk-5ZQYHXKU-CjOcwRY6.js.map +1 -0
  28. package/dist/{chunk-WL4C6EOR-BV-op7zg.js → chunk-727SXJPM-kowsFLrz.js} +724 -569
  29. package/dist/chunk-727SXJPM-kowsFLrz.js.map +1 -0
  30. package/dist/{chunk-NQ4KR5QH-C0nWShNk.js → chunk-AQP2D5EJ-Bc1gUIeA.js} +384 -362
  31. package/dist/chunk-AQP2D5EJ-Bc1gUIeA.js.map +1 -0
  32. package/dist/{chunk-OZEHJAEY-BsQ56PV-.js → chunk-BR22UD5L-BCFxmd5-.js} +16 -16
  33. package/dist/chunk-BR22UD5L-BCFxmd5-.js.map +1 -0
  34. package/dist/{chunk-MX3YWQON-D43mcq1f.js → chunk-BSJP7CBP-Bl94i3-1.js} +7 -5
  35. package/dist/chunk-BSJP7CBP-Bl94i3-1.js.map +1 -0
  36. package/dist/chunk-CSCIHK7Q-DyRIc27i.js +2868 -0
  37. package/dist/chunk-CSCIHK7Q-DyRIc27i.js.map +1 -0
  38. package/dist/chunk-FHYWG6QK-kLWdRarG.js +25 -0
  39. package/dist/chunk-FHYWG6QK-kLWdRarG.js.map +1 -0
  40. package/dist/{chunk-FMBD7UC4-1IxrpdPX.js → chunk-FMBD7UC4-IdpWVRCU.js} +2 -2
  41. package/dist/{chunk-FMBD7UC4-1IxrpdPX.js.map → chunk-FMBD7UC4-IdpWVRCU.js.map} +1 -1
  42. package/dist/chunk-KSCS5N6A-CVcDS9QV.js +563 -0
  43. package/dist/chunk-KSCS5N6A-CVcDS9QV.js.map +1 -0
  44. package/dist/{chunk-YBOYWFTD-DkjEOcgZ.js → chunk-L5ZTLDWV-Day0EgsR.js} +9 -9
  45. package/dist/{chunk-YBOYWFTD-DkjEOcgZ.js.map → chunk-L5ZTLDWV-Day0EgsR.js.map} +1 -1
  46. package/dist/chunk-LZXEDZCA-BO_GpQSR.js +51 -0
  47. package/dist/chunk-LZXEDZCA-BO_GpQSR.js.map +1 -0
  48. package/dist/chunk-MPE355IW-BkN6MrMO.js +25 -0
  49. package/dist/chunk-MPE355IW-BkN6MrMO.js.map +1 -0
  50. package/dist/chunk-MZUSXYTE-94iWO-dh.js +32 -0
  51. package/dist/chunk-MZUSXYTE-94iWO-dh.js.map +1 -0
  52. package/dist/chunk-N66VUXT2-QbIUkiJZ.js +56 -0
  53. package/dist/chunk-N66VUXT2-QbIUkiJZ.js.map +1 -0
  54. package/dist/{chunk-JSJVCQXG-Do17yYig.js → chunk-ND2GUHAM-Boh7GenS.js} +6 -6
  55. package/dist/{chunk-JSJVCQXG-Do17yYig.js.map → chunk-ND2GUHAM-Boh7GenS.js.map} +1 -1
  56. package/dist/chunk-NNHCCRGN-CNU0zvRn.js +20603 -0
  57. package/dist/chunk-NNHCCRGN-CNU0zvRn.js.map +1 -0
  58. package/dist/{chunk-PQ6SQG4A-Cpfc5F4u.js → chunk-NZK2D7GU-D4Ird7wv.js} +4 -4
  59. package/dist/{chunk-PQ6SQG4A-Cpfc5F4u.js.map → chunk-NZK2D7GU-D4Ird7wv.js.map} +1 -1
  60. package/dist/{chunk-PU5JKC2W-DNpn_Yik.js → chunk-O5CBEL6O-DThtyjPO.js} +85 -74
  61. package/dist/{chunk-PU5JKC2W-DNpn_Yik.js.map → chunk-O5CBEL6O-DThtyjPO.js.map} +1 -1
  62. package/dist/chunk-PUPMXCY4-DsO2K8st.js +25 -0
  63. package/dist/chunk-PUPMXCY4-DsO2K8st.js.map +1 -0
  64. package/dist/{chunk-QZHKN3VN-kDNdTVLo.js → chunk-QZHKN3VN-DC5aJQQT.js} +2 -2
  65. package/dist/{chunk-QZHKN3VN-kDNdTVLo.js.map → chunk-QZHKN3VN-DC5aJQQT.js.map} +1 -1
  66. package/dist/chunk-UIBZB4QT-Cu3IcTk1.js +25 -0
  67. package/dist/chunk-UIBZB4QT-Cu3IcTk1.js.map +1 -0
  68. package/dist/chunk-WCWK7LTN-DpMt57Ty.js +33 -0
  69. package/dist/chunk-WCWK7LTN-DpMt57Ty.js.map +1 -0
  70. package/dist/chunk-WU5MYG2G-mzocEmS2.js +12 -0
  71. package/dist/{chunk-HHEYEP7N-DJ1b-gA8.js.map → chunk-WU5MYG2G-mzocEmS2.js.map} +1 -1
  72. package/dist/{chunk-XPW4576I-BqiPnb3d.js → chunk-XPW4576I-BwxN5U1_.js} +2 -2
  73. package/dist/{chunk-XPW4576I-BqiPnb3d.js.map → chunk-XPW4576I-BwxN5U1_.js.map} +1 -1
  74. package/dist/classDiagram-4FO5ZUOK-CZv04EX-.js +31 -0
  75. package/dist/{classDiagram-VBA2DB6C-DZfC0xPM.js.map → classDiagram-4FO5ZUOK-CZv04EX-.js.map} +1 -1
  76. package/dist/classDiagram-v2-Q7XG4LA2-aOPSPoxt.js +31 -0
  77. package/dist/{classDiagram-v2-RAHNMMFH-CtWRD1ax.js.map → classDiagram-v2-Q7XG4LA2-aOPSPoxt.js.map} +1 -1
  78. package/dist/component-CBXhVCNE.js +163 -0
  79. package/dist/component-CBXhVCNE.js.map +1 -0
  80. package/dist/components/brand/index.d.ts +8 -2
  81. package/dist/components/brand/index.d.ts.map +1 -1
  82. package/dist/components/brand/index.js +58 -31
  83. package/dist/components/brand/index.js.map +1 -1
  84. package/dist/components/brand/types.d.ts +8 -0
  85. package/dist/components/brand/types.d.ts.map +1 -1
  86. package/dist/{cose-bilkent-S5V4N54A-DxM02fly.js → cose-bilkent-S5V4N54A-D_hwzCJc.js} +7 -8
  87. package/dist/{cose-bilkent-S5V4N54A-DxM02fly.js.map → cose-bilkent-S5V4N54A-D_hwzCJc.js.map} +1 -1
  88. package/dist/{cytoscape.esm-2vKMh7AJ.js → cytoscape.esm-C85eXBIz.js} +1 -1
  89. package/dist/{cytoscape.esm-2vKMh7AJ.js.map → cytoscape.esm-C85eXBIz.js.map} +1 -1
  90. package/dist/dagre-BM42HDAG-DBqY2dVf.js +299 -0
  91. package/dist/dagre-BM42HDAG-DBqY2dVf.js.map +1 -0
  92. package/dist/dagre-IxFkiJHF.js +1938 -0
  93. package/dist/dagre-IxFkiJHF.js.map +1 -0
  94. package/dist/{defaultLocale-PLHpRrsr.js → defaultLocale-DSDxELFN.js} +1 -1
  95. package/dist/{defaultLocale-PLHpRrsr.js.map → defaultLocale-DSDxELFN.js.map} +1 -1
  96. package/dist/{diagram-IFDJBPK2-D-Enf1mK.js → diagram-2AECGRRQ-BwC5Qbme.js} +39 -39
  97. package/dist/{diagram-IFDJBPK2-D-Enf1mK.js.map → diagram-2AECGRRQ-BwC5Qbme.js.map} +1 -1
  98. package/dist/diagram-5GNKFQAL-BpJ9oZ4s.js +103 -0
  99. package/dist/diagram-5GNKFQAL-BpJ9oZ4s.js.map +1 -0
  100. package/dist/diagram-KO2AKTUF-kSLn21uw.js +434 -0
  101. package/dist/diagram-KO2AKTUF-kSLn21uw.js.map +1 -0
  102. package/dist/{diagram-P4PSJMXO-O8g_RIkM.js → diagram-LMA3HP47-BRqyGMLP.js} +43 -43
  103. package/dist/{diagram-P4PSJMXO-O8g_RIkM.js.map → diagram-LMA3HP47-BRqyGMLP.js.map} +1 -1
  104. package/dist/{diagram-E7M64L7V-Co7O3gub.js → diagram-OG6HWLK6-BsskLXHm.js} +171 -174
  105. package/dist/diagram-OG6HWLK6-BsskLXHm.js.map +1 -0
  106. package/dist/{dist-BrNloUiz.js → dist-BScrlPBC.js} +32 -23
  107. package/dist/dist-BScrlPBC.js.map +1 -0
  108. package/dist/{erDiagram-INFDFZHY-C42JeR9I.js → erDiagram-TEJ5UH35-DzB7hnCi.js} +198 -164
  109. package/dist/erDiagram-TEJ5UH35-DzB7hnCi.js.map +1 -0
  110. package/dist/eventmodeling-FCH6USID-HcA67HMu.js +3 -0
  111. package/dist/{flowDiagram-PKNHOUZH-DInJjOz3.js → flowDiagram-I6XJVG4X-RYkPtPRG.js} +453 -469
  112. package/dist/flowDiagram-I6XJVG4X-RYkPtPRG.js.map +1 -0
  113. package/dist/{ganttDiagram-A5KZAMGK-Dgp-4Yss.js → ganttDiagram-6RSMTGT7-BfjlFVNd.js} +340 -333
  114. package/dist/ganttDiagram-6RSMTGT7-BfjlFVNd.js.map +1 -0
  115. package/dist/gitGraph-WXDBUCRP-D60yP8mT.js +3 -0
  116. package/dist/gitGraphDiagram-PVQCEYII-DbUp_ElG.js +731 -0
  117. package/dist/gitGraphDiagram-PVQCEYII-DbUp_ElG.js.map +1 -0
  118. package/dist/graphlib-k-wJtbbK.js +1268 -0
  119. package/dist/graphlib-k-wJtbbK.js.map +1 -0
  120. package/dist/icons/lucide.d.ts +1 -2
  121. package/dist/icons/lucide.d.ts.map +1 -1
  122. package/dist/icons/lucide.js.map +1 -1
  123. package/dist/info-J43DQDTF-DDmtkMBG.js +3 -0
  124. package/dist/{infoDiagram-LFFYTUFH-DajJJRvc.js → infoDiagram-5YYISTIA-C0TqWTrr.js} +7 -7
  125. package/dist/{infoDiagram-LFFYTUFH-DajJJRvc.js.map → infoDiagram-5YYISTIA-C0TqWTrr.js.map} +1 -1
  126. package/dist/{init-DcLTaNW1.js → init-CGzIZb6J.js} +1 -1
  127. package/dist/{init-DcLTaNW1.js.map → init-CGzIZb6J.js.map} +1 -1
  128. package/dist/{ishikawaDiagram-PHBUUO56-qHBJm2LT.js → ishikawaDiagram-YF4QCWOH-Cyk_Antz.js} +98 -97
  129. package/dist/ishikawaDiagram-YF4QCWOH-Cyk_Antz.js.map +1 -0
  130. package/dist/{journeyDiagram-4ABVD52K-PgfYdoDM.js → journeyDiagram-JHISSGLW-CTl8eDDe.js} +78 -78
  131. package/dist/journeyDiagram-JHISSGLW-CTl8eDDe.js.map +1 -0
  132. package/dist/{kanban-definition-K7BYSVSG-DFRT8j7A.js → kanban-definition-UN3LZRKU-homeDoHF.js} +46 -44
  133. package/dist/{kanban-definition-K7BYSVSG-DFRT8j7A.js.map → kanban-definition-UN3LZRKU-homeDoHF.js.map} +1 -1
  134. package/dist/{katex-BZdHnXin.js → katex-CgkxVokH.js} +1 -1
  135. package/dist/{katex-BZdHnXin.js.map → katex-CgkxVokH.js.map} +1 -1
  136. package/dist/line-k_aZSToM.js +36 -0
  137. package/dist/{line-Cq1AZT4f.js.map → line-k_aZSToM.js.map} +1 -1
  138. package/dist/{linear-BnJD01Xn.js → linear-Dpcbf4VP.js} +5 -5
  139. package/dist/{linear-BnJD01Xn.js.map → linear-Dpcbf4VP.js.map} +1 -1
  140. package/dist/{mermaid-parser.core-Dz5qv4CI.js → mermaid-parser.core-B_q76LYz.js} +32 -17
  141. package/dist/mermaid-parser.core-B_q76LYz.js.map +1 -0
  142. package/dist/mermaid.core-DAh-gNcn.js +997 -0
  143. package/dist/mermaid.core-DAh-gNcn.js.map +1 -0
  144. package/dist/{mindmap-definition-YRQLILUH-D95OPRMh.js → mindmap-definition-RKZ34NQL-Cjglmmr7.js} +153 -108
  145. package/dist/mindmap-definition-RKZ34NQL-Cjglmmr7.js.map +1 -0
  146. package/dist/{ordinal-CC9tfh_g.js → ordinal-DHGdAr1Y.js} +2 -2
  147. package/dist/{ordinal-CC9tfh_g.js.map → ordinal-DHGdAr1Y.js.map} +1 -1
  148. package/dist/packet-YPE3B663-Bo9N32Mb.js +3 -0
  149. package/dist/{path-y0uQCOMW.js → path-D-DDb3Wo.js} +1 -1
  150. package/dist/{path-y0uQCOMW.js.map → path-D-DDb3Wo.js.map} +1 -1
  151. package/dist/pie-LRSECV5Y-DndCyILX.js +3 -0
  152. package/dist/pieDiagram-4H26LBE5-Swbny_uk.js +167 -0
  153. package/dist/pieDiagram-4H26LBE5-Swbny_uk.js.map +1 -0
  154. package/dist/{quadrantDiagram-337W2JSQ-CcKc-h2o.js → quadrantDiagram-W4KKPZXB-kyt1iJkC.js} +359 -332
  155. package/dist/quadrantDiagram-W4KKPZXB-kyt1iJkC.js.map +1 -0
  156. package/dist/radar-GUYGQ44K-DpLG1fRN.js +3 -0
  157. package/dist/react/brand/index.d.ts +13 -1
  158. package/dist/react/brand/index.d.ts.map +1 -1
  159. package/dist/react/brand.js +28 -3
  160. package/dist/react/brand.js.map +1 -1
  161. package/dist/react/sidebar.d.ts +22 -1
  162. package/dist/react/sidebar.d.ts.map +1 -1
  163. package/dist/react/sidebar.js +26 -2
  164. package/dist/react/sidebar.js.map +1 -1
  165. package/dist/react/topology.js +1 -1
  166. package/dist/react.js +100 -100
  167. package/dist/{requirementDiagram-Z7DCOOCP-aPcaPduF.js → requirementDiagram-4Y6WPE33-DWRks7dz.js} +153 -133
  168. package/dist/requirementDiagram-4Y6WPE33-DWRks7dz.js.map +1 -0
  169. package/dist/{rough.esm-C9rQ9YkE.js → rough.esm-C7tiDdBn.js} +1 -1
  170. package/dist/{rough.esm-C9rQ9YkE.js.map → rough.esm-C7tiDdBn.js.map} +1 -1
  171. package/dist/{sankeyDiagram-WA2Y5GQK-CO_lUqQX.js → sankeyDiagram-5OEKKPKP-J_SVMd-0.js} +125 -76
  172. package/dist/{sankeyDiagram-WA2Y5GQK-CO_lUqQX.js.map → sankeyDiagram-5OEKKPKP-J_SVMd-0.js.map} +1 -1
  173. package/dist/sequenceDiagram-3UESZ5HK-BMhjbe8U.js +4167 -0
  174. package/dist/sequenceDiagram-3UESZ5HK-BMhjbe8U.js.map +1 -0
  175. package/dist/sidebar/component.d.ts +5 -0
  176. package/dist/sidebar/component.d.ts.map +1 -1
  177. package/dist/sidebar/index.d.ts +1 -1
  178. package/dist/sidebar/index.d.ts.map +1 -1
  179. package/dist/sidebar/index.js +1 -1
  180. package/dist/sidebar/index.js.map +1 -1
  181. package/dist/sidebar/types.d.ts +59 -0
  182. package/dist/sidebar/types.d.ts.map +1 -1
  183. package/dist/{src-D1EMXotX.js → src-CWnvxuyh.js} +603 -591
  184. package/dist/{src-D1EMXotX.js.map → src-CWnvxuyh.js.map} +1 -1
  185. package/dist/{src-BhNgmpel.js → src-DngnQkx_.js} +4 -5
  186. package/dist/{src-BhNgmpel.js.map → src-DngnQkx_.js.map} +1 -1
  187. package/dist/stateDiagram-AJRCARHV-x4JHehDk.js +220 -0
  188. package/dist/stateDiagram-AJRCARHV-x4JHehDk.js.map +1 -0
  189. package/dist/stateDiagram-v2-BHNVJYJU-CO93vpHl.js +29 -0
  190. package/dist/{stateDiagram-v2-FVOUBMTO-CAWy0Pkh.js.map → stateDiagram-v2-BHNVJYJU-CO93vpHl.js.map} +1 -1
  191. package/dist/styles/components/brand.css +30 -0
  192. package/dist/styles/sidebar.css +568 -0
  193. package/dist/styles/tenant-ui.css +3 -4
  194. package/dist/styles/threat-library.css +0 -1
  195. package/dist/styles/tokens.css +0 -1
  196. package/dist/{timeline-definition-YZTLITO2-CjxxCuOg.js → timeline-definition-PNZ67QCA-rsiMN1-p.js} +517 -279
  197. package/dist/timeline-definition-PNZ67QCA-rsiMN1-p.js.map +1 -0
  198. package/dist/{topology-C8cyIHlB.js → topology-B9Lv-y1-.js} +181 -182
  199. package/dist/{topology-C8cyIHlB.js.map → topology-B9Lv-y1-.js.map} +1 -1
  200. package/dist/treeView-BLDUP644-mJdM3Q6x.js +3 -0
  201. package/dist/treemap-LRROVOQU-BbNMhR6z.js +3 -0
  202. package/dist/{value-gSPnIECy.js → value-CnwEagIg.js} +2 -2
  203. package/dist/{value-gSPnIECy.js.map → value-CnwEagIg.js.map} +1 -1
  204. package/dist/{vennDiagram-LZ73GAT5-FqpGoq2s.js → vennDiagram-CIIHVFJN-JUCgWboO.js} +98 -98
  205. package/dist/{vennDiagram-LZ73GAT5-FqpGoq2s.js.map → vennDiagram-CIIHVFJN-JUCgWboO.js.map} +1 -1
  206. package/dist/visualization/mermaid-diagram/index.js +1 -1
  207. package/dist/wardley-L42UT6IY-DB53GwcN.js +3 -0
  208. package/dist/wardleyDiagram-YWT4CUSO-D9ZPcSHL.js +646 -0
  209. package/dist/wardleyDiagram-YWT4CUSO-D9ZPcSHL.js.map +1 -0
  210. package/dist/{xychartDiagram-JWTSCODW-BNEAK79X.js → xychartDiagram-2RQKCTM6-D3ufsY0S.js} +146 -143
  211. package/dist/{xychartDiagram-JWTSCODW-BNEAK79X.js.map → xychartDiagram-2RQKCTM6-D3ufsY0S.js.map} +1 -1
  212. package/package.json +1 -1
  213. package/src/components/brand/index.ts +63 -0
  214. package/src/components/brand/types.ts +9 -0
  215. package/src/components/theme/theme-studio-review.test.ts +34 -0
  216. package/src/icons/lucide.ts +1 -2
  217. package/src/react/brand/index.test.tsx +28 -0
  218. package/src/react/brand/index.tsx +38 -0
  219. package/src/react/sidebar.test.tsx +30 -0
  220. package/src/react/sidebar.tsx +52 -1
  221. package/src/sidebar/component.test.ts +109 -0
  222. package/src/sidebar/component.ts +231 -42
  223. package/src/sidebar/index.ts +1 -0
  224. package/src/sidebar/types.ts +60 -0
  225. package/src/styles/components/brand.css +30 -0
  226. package/src/styles/sidebar.css +568 -0
  227. package/src/styles/tenant-ui.css +3 -4
  228. package/src/styles/threat-library.css +0 -1
  229. package/src/styles/tokens.css +0 -1
  230. package/dist/_basePickBy-BQMPE4-n.js +0 -168
  231. package/dist/_basePickBy-BQMPE4-n.js.map +0 -1
  232. package/dist/_baseUniq-Bdp_vFUv.js +0 -684
  233. package/dist/_baseUniq-Bdp_vFUv.js.map +0 -1
  234. package/dist/architecture-PBZL5I3N-Zk3GmKE8.js +0 -3
  235. package/dist/blockDiagram-WCTKOSBZ-BH3jwWeU.js.map +0 -1
  236. package/dist/c4Diagram-IC4MRINW-OFLrunYI.js.map +0 -1
  237. package/dist/channel-LRbq43st.js +0 -7
  238. package/dist/chunk-7E7YKBS2-BsywoVTt.js +0 -25
  239. package/dist/chunk-7E7YKBS2-BsywoVTt.js.map +0 -1
  240. package/dist/chunk-7R4GIKGN-DJmroLCH.js +0 -2054
  241. package/dist/chunk-7R4GIKGN-DJmroLCH.js.map +0 -1
  242. package/dist/chunk-C72U2L5F-BwPwVDcP.js +0 -25
  243. package/dist/chunk-C72U2L5F-BwPwVDcP.js.map +0 -1
  244. package/dist/chunk-EGIJ26TM-DKd5cEgn.js +0 -25
  245. package/dist/chunk-EGIJ26TM-DKd5cEgn.js.map +0 -1
  246. package/dist/chunk-GEFDOKGD-DGJJEGSm.js.map +0 -1
  247. package/dist/chunk-GLR3WWYH-BDwmgwCA.js +0 -43
  248. package/dist/chunk-GLR3WWYH-BDwmgwCA.js.map +0 -1
  249. package/dist/chunk-HHEYEP7N-DJ1b-gA8.js +0 -12
  250. package/dist/chunk-KYZI473N-BXYCe83A.js +0 -3437
  251. package/dist/chunk-KYZI473N-BXYCe83A.js.map +0 -1
  252. package/dist/chunk-L3YUKLVL-Y5k8UNMf.js +0 -25
  253. package/dist/chunk-L3YUKLVL-Y5k8UNMf.js.map +0 -1
  254. package/dist/chunk-MX3YWQON-D43mcq1f.js.map +0 -1
  255. package/dist/chunk-NBPlniwU.js +0 -23
  256. package/dist/chunk-NQ4KR5QH-C0nWShNk.js.map +0 -1
  257. package/dist/chunk-O4XLMI2P-DtGEm9QX.js +0 -514
  258. package/dist/chunk-O4XLMI2P-DtGEm9QX.js.map +0 -1
  259. package/dist/chunk-OZEHJAEY-BsQ56PV-.js.map +0 -1
  260. package/dist/chunk-R5LLSJPH-c1IfaK5D.js.map +0 -1
  261. package/dist/chunk-WL4C6EOR-BV-op7zg.js.map +0 -1
  262. package/dist/chunk-XIRO2GV7-Bv1hlNLi.js +0 -32
  263. package/dist/chunk-XIRO2GV7-Bv1hlNLi.js.map +0 -1
  264. package/dist/chunk-XZSTWKYB-C7maKWEr.js +0 -15799
  265. package/dist/chunk-XZSTWKYB-C7maKWEr.js.map +0 -1
  266. package/dist/classDiagram-VBA2DB6C-DZfC0xPM.js +0 -31
  267. package/dist/classDiagram-v2-RAHNMMFH-CtWRD1ax.js +0 -31
  268. package/dist/clone-CliVdNc8.js +0 -10
  269. package/dist/clone-CliVdNc8.js.map +0 -1
  270. package/dist/component-C1Jiz1Ki.js +0 -103
  271. package/dist/component-C1Jiz1Ki.js.map +0 -1
  272. package/dist/dagre-BqC9mhMk.js +0 -1485
  273. package/dist/dagre-BqC9mhMk.js.map +0 -1
  274. package/dist/dagre-KLK3FWXG-DTKcsol6.js +0 -296
  275. package/dist/dagre-KLK3FWXG-DTKcsol6.js.map +0 -1
  276. package/dist/diagram-E7M64L7V-Co7O3gub.js.map +0 -1
  277. package/dist/dist-BrNloUiz.js.map +0 -1
  278. package/dist/erDiagram-INFDFZHY-C42JeR9I.js.map +0 -1
  279. package/dist/flowDiagram-PKNHOUZH-DInJjOz3.js.map +0 -1
  280. package/dist/ganttDiagram-A5KZAMGK-Dgp-4Yss.js.map +0 -1
  281. package/dist/gitGraph-HDMCJU4V-D_QsK6Rt.js +0 -3
  282. package/dist/gitGraphDiagram-K3NZZRJ6-Dr_X0dND.js +0 -628
  283. package/dist/gitGraphDiagram-K3NZZRJ6-Dr_X0dND.js.map +0 -1
  284. package/dist/graphlib-ecencZTG.js +0 -227
  285. package/dist/graphlib-ecencZTG.js.map +0 -1
  286. package/dist/info-3K5VOQVL-BbLiZXwn.js +0 -3
  287. package/dist/isArrayLikeObject-Bjsxaqj7.js +0 -580
  288. package/dist/isArrayLikeObject-Bjsxaqj7.js.map +0 -1
  289. package/dist/isEmpty-CeZZUVts.js +0 -37
  290. package/dist/isEmpty-CeZZUVts.js.map +0 -1
  291. package/dist/ishikawaDiagram-PHBUUO56-qHBJm2LT.js.map +0 -1
  292. package/dist/journeyDiagram-4ABVD52K-PgfYdoDM.js.map +0 -1
  293. package/dist/line-Cq1AZT4f.js +0 -36
  294. package/dist/math-D4gdAuwG.js +0 -12
  295. package/dist/math-D4gdAuwG.js.map +0 -1
  296. package/dist/mermaid-parser.core-Dz5qv4CI.js.map +0 -1
  297. package/dist/mermaid.core-DTiIXVKa.js +0 -923
  298. package/dist/mermaid.core-DTiIXVKa.js.map +0 -1
  299. package/dist/mindmap-definition-YRQLILUH-D95OPRMh.js.map +0 -1
  300. package/dist/packet-RMMSAZCW-D72DRs1N.js +0 -3
  301. package/dist/pie-UPGHQEXC-C8RDLrEi.js +0 -3
  302. package/dist/pieDiagram-SKSYHLDU-BREEn_Sk.js +0 -167
  303. package/dist/pieDiagram-SKSYHLDU-BREEn_Sk.js.map +0 -1
  304. package/dist/quadrantDiagram-337W2JSQ-CcKc-h2o.js.map +0 -1
  305. package/dist/radar-KQ55EAFF-DhmvjiyN.js +0 -3
  306. package/dist/requirementDiagram-Z7DCOOCP-aPcaPduF.js.map +0 -1
  307. package/dist/sequenceDiagram-2WXFIKYE-D7Vh1Zld.js +0 -4112
  308. package/dist/sequenceDiagram-2WXFIKYE-D7Vh1Zld.js.map +0 -1
  309. package/dist/stateDiagram-RAJIS63D-DdiY5cf3.js +0 -220
  310. package/dist/stateDiagram-RAJIS63D-DdiY5cf3.js.map +0 -1
  311. package/dist/stateDiagram-v2-FVOUBMTO-CAWy0Pkh.js +0 -29
  312. package/dist/timeline-definition-YZTLITO2-CjxxCuOg.js.map +0 -1
  313. package/dist/treemap-KZPCXAKY-BvLvHb2t.js +0 -3
@@ -1,21 +1,118 @@
1
- import { w as e } from "./src-D1EMXotX.js";
2
- import { T as t, c as n, h as r, i } from "./chunk-GEFDOKGD-DGJJEGSm.js";
3
- import { t as a } from "./clone-CliVdNc8.js";
4
- import { t as o } from "./graphlib-ecencZTG.js";
5
- import { n as s, r as c } from "./src-BhNgmpel.js";
6
- import { D as l, L as u, a as d, b as f, c as p, s as m, tt as h, w as g, y as _ } from "./chunk-7R4GIKGN-DJmroLCH.js";
7
- import { t as v } from "./channel-LRbq43st.js";
8
- import { t as y } from "./line-Cq1AZT4f.js";
9
- import { n as b } from "./chunk-PU5JKC2W-DNpn_Yik.js";
10
- import { t as x } from "./chunk-FMBD7UC4-1IxrpdPX.js";
11
- import { n as S, t as C } from "./chunk-MX3YWQON-D43mcq1f.js";
12
- import { n as w, t as T } from "./chunk-YBOYWFTD-DkjEOcgZ.js";
13
- //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs
14
- var E = (function() {
15
- var e = /* @__PURE__ */ s(function(e, t, n, r) {
1
+ import { w as e } from "./src-CWnvxuyh.js";
2
+ import { n as t, r as n } from "./src-DngnQkx_.js";
3
+ 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-DyRIc27i.js";
4
+ import { t as f } from "./channel-MTYqUJFm.js";
5
+ 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-CjOcwRY6.js";
6
+ import { t as ce } from "./line-k_aZSToM.js";
7
+ import { n as le } from "./chunk-O5CBEL6O-DThtyjPO.js";
8
+ import { t as ue } from "./chunk-FMBD7UC4-IdpWVRCU.js";
9
+ import { n as de, t as P } from "./chunk-BSJP7CBP-Bl94i3-1.js";
10
+ import { n as fe, t as pe } from "./chunk-L5ZTLDWV-Day0EgsR.js";
11
+ import { t as me } from "./graphlib-k-wJtbbK.js";
12
+ //#region node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
13
+ function he(e) {
14
+ return Array.isArray(e);
15
+ }
16
+ //#endregion
17
+ //#region node_modules/es-toolkit/dist/compat/object/clone.mjs
18
+ function ge(e) {
19
+ if (j(e)) return e;
20
+ let t = k(e);
21
+ if (!_e(e)) return {};
22
+ if (he(e)) {
23
+ let t = Array.from(e);
24
+ return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
25
+ }
26
+ if (ie(e)) {
27
+ let t = e, n = t.constructor;
28
+ return new n(t.buffer, t.byteOffset, t.length);
29
+ }
30
+ if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
31
+ if (t === "[object DataView]") {
32
+ let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
33
+ return new Uint8Array(a).set(o), new DataView(a);
34
+ }
35
+ if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
36
+ let n = e.constructor, r = new n(e.valueOf());
37
+ return t === "[object String]" ? be(r, e) : ve(r, e), r;
38
+ }
39
+ if (t === "[object Date]") return new Date(Number(e));
40
+ if (t === "[object RegExp]") {
41
+ let t = e, n = new RegExp(t.source, t.flags);
42
+ return n.lastIndex = t.lastIndex, n;
43
+ }
44
+ if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
45
+ if (t === "[object Map]") {
46
+ let t = e, n = /* @__PURE__ */ new Map();
47
+ return t.forEach((e, t) => {
48
+ n.set(t, e);
49
+ }), n;
50
+ }
51
+ if (t === "[object Set]") {
52
+ let t = e, n = /* @__PURE__ */ new Set();
53
+ return t.forEach((e) => {
54
+ n.add(e);
55
+ }), n;
56
+ }
57
+ if (t === "[object Arguments]") {
58
+ let t = e, n = {};
59
+ return ve(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
60
+ }
61
+ let n = {};
62
+ return xe(n, e), ve(n, e), ye(n, e), n;
63
+ }
64
+ function _e(e) {
65
+ switch (k(e)) {
66
+ case oe:
67
+ case h:
68
+ case D:
69
+ case O:
70
+ case ae:
71
+ case _:
72
+ case g:
73
+ case w:
74
+ case te:
75
+ case ne:
76
+ case p:
77
+ case S:
78
+ case C:
79
+ case T:
80
+ case v:
81
+ case b:
82
+ case x:
83
+ case E:
84
+ case A:
85
+ case y:
86
+ case se:
87
+ case m: return !0;
88
+ default: return !1;
89
+ }
90
+ }
91
+ function ve(e, t) {
92
+ for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
93
+ }
94
+ function ye(e, t) {
95
+ let n = Object.getOwnPropertySymbols(t);
96
+ for (let r = 0; r < n.length; r++) {
97
+ let i = n[r];
98
+ Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
99
+ }
100
+ }
101
+ function be(e, t) {
102
+ let n = t.valueOf().length;
103
+ for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
104
+ }
105
+ function xe(e, t) {
106
+ let n = Object.getPrototypeOf(t);
107
+ n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
108
+ }
109
+ //#endregion
110
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.mjs
111
+ var Se = (function() {
112
+ var e = /* @__PURE__ */ t(function(e, t, n, r) {
16
113
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
17
114
  return n;
18
- }, "o"), t = [1, 15], n = [1, 7], r = [1, 13], i = [1, 14], a = [1, 19], o = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
115
+ }, "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 = [
19
116
  8,
20
117
  10,
21
118
  21,
@@ -54,7 +151,7 @@ var E = (function() {
54
151
  43,
55
152
  46
56
153
  ], g = [1, 49], _ = {
57
- trace: /* @__PURE__ */ s(function() {}, "trace"),
154
+ trace: /* @__PURE__ */ t(function() {}, "trace"),
58
155
  yy: {},
59
156
  symbols_: {
60
157
  error: 2,
@@ -181,7 +278,7 @@ var E = (function() {
181
278
  [24, 3],
182
279
  [25, 3]
183
280
  ],
184
- performAction: /* @__PURE__ */ s(function(e, t, n, r, i, a, o) {
281
+ performAction: /* @__PURE__ */ t(function(e, t, n, r, i, a, o) {
185
282
  var s = a.length - 1;
186
283
  switch (i) {
187
284
  case 4:
@@ -238,7 +335,7 @@ var E = (function() {
238
335
  break;
239
336
  case 23:
240
337
  r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
241
- let n = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr);
338
+ 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);
242
339
  this.$ = [
243
340
  {
244
341
  id: a[s - 2].id,
@@ -252,9 +349,11 @@ var E = (function() {
252
349
  end: a[s].id,
253
350
  label: a[s - 1].label,
254
351
  type: "edge",
352
+ thickness: o,
353
+ pattern: c,
255
354
  directions: a[s].directions,
256
355
  arrowTypeEnd: n,
257
- arrowTypeStart: "arrow_open"
356
+ arrowTypeStart: i
258
357
  },
259
358
  {
260
359
  id: a[s].id,
@@ -364,21 +463,21 @@ var E = (function() {
364
463
  },
365
464
  { 1: [3] },
366
465
  {
367
- 10: t,
466
+ 10: n,
368
467
  11: 3,
369
468
  13: 4,
370
469
  19: 5,
371
470
  20: 6,
372
- 21: n,
471
+ 21: r,
373
472
  22: 8,
374
473
  23: 9,
375
474
  24: 10,
376
475
  25: 11,
377
476
  26: 12,
378
- 28: r,
379
- 29: i,
380
- 31: a,
381
- 39: o,
477
+ 28: i,
478
+ 29: a,
479
+ 31: o,
480
+ 39: s,
382
481
  43: c,
383
482
  46: l
384
483
  },
@@ -393,12 +492,12 @@ var E = (function() {
393
492
  25: 11,
394
493
  26: 12,
395
494
  11: 21,
396
- 10: t,
397
- 21: n,
398
- 28: r,
399
- 29: i,
400
- 31: a,
401
- 39: o,
495
+ 10: n,
496
+ 21: r,
497
+ 28: i,
498
+ 29: a,
499
+ 31: o,
500
+ 39: s,
402
501
  43: c,
403
502
  46: l
404
503
  }),
@@ -418,24 +517,24 @@ var E = (function() {
418
517
  {
419
518
  19: 26,
420
519
  26: 12,
421
- 31: a
520
+ 31: o
422
521
  },
423
522
  {
424
- 10: t,
523
+ 10: n,
425
524
  11: 27,
426
525
  13: 4,
427
526
  19: 5,
428
527
  20: 6,
429
- 21: n,
528
+ 21: r,
430
529
  22: 8,
431
530
  23: 9,
432
531
  24: 10,
433
532
  25: 11,
434
533
  26: 12,
435
- 28: r,
436
- 29: i,
437
- 31: a,
438
- 39: o,
534
+ 28: i,
535
+ 29: a,
536
+ 31: o,
537
+ 39: s,
439
538
  43: c,
440
539
  46: l
441
540
  },
@@ -454,13 +553,13 @@ var E = (function() {
454
553
  e(u, [2, 13]),
455
554
  {
456
555
  26: 35,
457
- 31: a
556
+ 31: o
458
557
  },
459
558
  { 31: [2, 14] },
460
559
  { 17: [1, 36] },
461
560
  e(m, [2, 24]),
462
561
  {
463
- 10: t,
562
+ 10: n,
464
563
  11: 37,
465
564
  13: 4,
466
565
  14: 22,
@@ -468,16 +567,16 @@ var E = (function() {
468
567
  16: p,
469
568
  19: 5,
470
569
  20: 6,
471
- 21: n,
570
+ 21: r,
472
571
  22: 8,
473
572
  23: 9,
474
573
  24: 10,
475
574
  25: 11,
476
575
  26: 12,
477
- 28: r,
478
- 29: i,
479
- 31: a,
480
- 39: o,
576
+ 28: i,
577
+ 29: a,
578
+ 31: o,
579
+ 39: s,
481
580
  43: c,
482
581
  46: l
483
582
  },
@@ -521,34 +620,34 @@ var E = (function() {
521
620
  50: [2, 15],
522
621
  52: [2, 32]
523
622
  },
524
- parseError: /* @__PURE__ */ s(function(e, t) {
623
+ parseError: /* @__PURE__ */ t(function(e, t) {
525
624
  if (t.recoverable) this.trace(e);
526
625
  else {
527
626
  var n = Error(e);
528
627
  throw n.hash = t, n;
529
628
  }
530
629
  }, "parseError"),
531
- parse: /* @__PURE__ */ s(function(e) {
532
- var t = this, n = [0], r = [], i = [null], a = [], o = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = a.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
630
+ parse: /* @__PURE__ */ t(function(e) {
631
+ 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: {} };
533
632
  for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
534
633
  h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
535
634
  var v = h.yylloc;
536
- a.push(v);
635
+ o.push(v);
537
636
  var y = h.options && h.options.ranges;
538
637
  typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
539
638
  function b(e) {
540
- n.length -= 2 * e, i.length -= e, a.length -= e;
639
+ r.length -= 2 * e, a.length -= e, o.length -= e;
541
640
  }
542
- s(b, "popStack");
641
+ t(b, "popStack");
543
642
  function x() {
544
- var e = r.pop() || h.lex() || p;
545
- return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
643
+ var e = i.pop() || h.lex() || p;
644
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
546
645
  }
547
- s(x, "lex");
646
+ t(x, "lex");
548
647
  for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
549
- 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]) {
648
+ 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]) {
550
649
  var M = "";
551
- for (O in j = [], o[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
650
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
552
651
  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, {
553
652
  text: h.match,
554
653
  token: this.terminals_[S] || S,
@@ -560,24 +659,24 @@ var E = (function() {
560
659
  if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
561
660
  switch (T[0]) {
562
661
  case 1:
563
- n.push(S), i.push(h.yytext), a.push(h.yylloc), n.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--);
662
+ 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--);
564
663
  break;
565
664
  case 2:
566
- if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
567
- first_line: a[a.length - (k || 1)].first_line,
568
- last_line: a[a.length - 1].last_line,
569
- first_column: a[a.length - (k || 1)].first_column,
570
- last_column: a[a.length - 1].last_column
571
- }, y && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
665
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
666
+ first_line: o[o.length - (k || 1)].first_line,
667
+ last_line: o[o.length - 1].last_line,
668
+ first_column: o[o.length - (k || 1)].first_column,
669
+ last_column: o[o.length - 1].last_column
670
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
572
671
  c,
573
672
  u,
574
673
  l,
575
674
  g.yy,
576
675
  T[1],
577
- i,
578
- a
676
+ a,
677
+ o
579
678
  ].concat(m)), E !== void 0) return E;
580
- 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);
679
+ 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);
581
680
  break;
582
681
  case 3: return !0;
583
682
  }
@@ -588,11 +687,11 @@ var E = (function() {
588
687
  _.lexer = /* @__PURE__ */ (function() {
589
688
  return {
590
689
  EOF: 1,
591
- parseError: /* @__PURE__ */ s(function(e, t) {
690
+ parseError: /* @__PURE__ */ t(function(e, t) {
592
691
  if (this.yy.parser) this.yy.parser.parseError(e, t);
593
692
  else throw Error(e);
594
693
  }, "parseError"),
595
- setInput: /* @__PURE__ */ s(function(e, t) {
694
+ setInput: /* @__PURE__ */ t(function(e, t) {
596
695
  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 = {
597
696
  first_line: 1,
598
697
  first_column: 0,
@@ -600,11 +699,11 @@ var E = (function() {
600
699
  last_column: 0
601
700
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
602
701
  }, "setInput"),
603
- input: /* @__PURE__ */ s(function() {
702
+ input: /* @__PURE__ */ t(function() {
604
703
  var e = this._input[0];
605
704
  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;
606
705
  }, "input"),
607
- unput: /* @__PURE__ */ s(function(e) {
706
+ unput: /* @__PURE__ */ t(function(e) {
608
707
  var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
609
708
  this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
610
709
  var r = this.match.split(/(?:\r\n?|\n)/g);
@@ -617,10 +716,10 @@ var E = (function() {
617
716
  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
618
717
  }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
619
718
  }, "unput"),
620
- more: /* @__PURE__ */ s(function() {
719
+ more: /* @__PURE__ */ t(function() {
621
720
  return this._more = !0, this;
622
721
  }, "more"),
623
- reject: /* @__PURE__ */ s(function() {
722
+ reject: /* @__PURE__ */ t(function() {
624
723
  if (this.options.backtrack_lexer) this._backtrack = !0;
625
724
  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(), {
626
725
  text: "",
@@ -629,22 +728,22 @@ var E = (function() {
629
728
  });
630
729
  return this;
631
730
  }, "reject"),
632
- less: /* @__PURE__ */ s(function(e) {
731
+ less: /* @__PURE__ */ t(function(e) {
633
732
  this.unput(this.match.slice(e));
634
733
  }, "less"),
635
- pastInput: /* @__PURE__ */ s(function() {
734
+ pastInput: /* @__PURE__ */ t(function() {
636
735
  var e = this.matched.substr(0, this.matched.length - this.match.length);
637
736
  return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
638
737
  }, "pastInput"),
639
- upcomingInput: /* @__PURE__ */ s(function() {
738
+ upcomingInput: /* @__PURE__ */ t(function() {
640
739
  var e = this.match;
641
740
  return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
642
741
  }, "upcomingInput"),
643
- showPosition: /* @__PURE__ */ s(function() {
742
+ showPosition: /* @__PURE__ */ t(function() {
644
743
  var e = this.pastInput(), t = Array(e.length + 1).join("-");
645
744
  return e + this.upcomingInput() + "\n" + t + "^";
646
745
  }, "showPosition"),
647
- test_match: /* @__PURE__ */ s(function(e, t) {
746
+ test_match: /* @__PURE__ */ t(function(e, t) {
648
747
  var n, r, i;
649
748
  if (this.options.backtrack_lexer && (i = {
650
749
  yylineno: this.yylineno,
@@ -677,7 +776,7 @@ var E = (function() {
677
776
  }
678
777
  return !1;
679
778
  }, "test_match"),
680
- next: /* @__PURE__ */ s(function() {
779
+ next: /* @__PURE__ */ t(function() {
681
780
  if (this.done) return this.EOF;
682
781
  this._input || (this.done = !0);
683
782
  var e, t, n, r;
@@ -697,29 +796,29 @@ var E = (function() {
697
796
  line: this.yylineno
698
797
  });
699
798
  }, "next"),
700
- lex: /* @__PURE__ */ s(function() {
799
+ lex: /* @__PURE__ */ t(function() {
701
800
  return this.next() || this.lex();
702
801
  }, "lex"),
703
- begin: /* @__PURE__ */ s(function(e) {
802
+ begin: /* @__PURE__ */ t(function(e) {
704
803
  this.conditionStack.push(e);
705
804
  }, "begin"),
706
- popState: /* @__PURE__ */ s(function() {
805
+ popState: /* @__PURE__ */ t(function() {
707
806
  return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
708
807
  }, "popState"),
709
- _currentRules: /* @__PURE__ */ s(function() {
808
+ _currentRules: /* @__PURE__ */ t(function() {
710
809
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
711
810
  }, "_currentRules"),
712
- topState: /* @__PURE__ */ s(function(e) {
811
+ topState: /* @__PURE__ */ t(function(e) {
713
812
  return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
714
813
  }, "topState"),
715
- pushState: /* @__PURE__ */ s(function(e) {
814
+ pushState: /* @__PURE__ */ t(function(e) {
716
815
  this.begin(e);
717
816
  }, "pushState"),
718
- stateStackSize: /* @__PURE__ */ s(function() {
817
+ stateStackSize: /* @__PURE__ */ t(function() {
719
818
  return this.conditionStack.length;
720
819
  }, "stateStackSize"),
721
820
  options: {},
722
- performAction: /* @__PURE__ */ s(function(e, t, n, r) {
821
+ performAction: /* @__PURE__ */ t(function(e, t, n, r) {
723
822
  switch (n) {
724
823
  case 0: return e.getLogger().debug("Found block-beta"), 10;
725
824
  case 1: return e.getLogger().debug("Found id-block"), 29;
@@ -935,7 +1034,7 @@ var E = (function() {
935
1034
  /^(?:\[\\)/,
936
1035
  /^(?:\[)/,
937
1036
  /^(?:<\[)/,
938
- /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,
1037
+ /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
939
1038
  /^(?:$)/,
940
1039
  /^(?:["][`])/,
941
1040
  /^(?:["][`])/,
@@ -1143,88 +1242,88 @@ var E = (function() {
1143
1242
  function v() {
1144
1243
  this.yy = {};
1145
1244
  }
1146
- return s(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1245
+ return t(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1147
1246
  })();
1148
- E.parser = E;
1149
- var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = f(), N = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ s((e) => m.sanitizeText(e, ne), "sanitizeText"), ie = /* @__PURE__ */ s(function(e, t = "") {
1150
- let n = N.get(e);
1247
+ Se.parser = Se;
1248
+ 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 = "") {
1249
+ let n = R.get(e);
1151
1250
  n || (n = {
1152
1251
  id: e,
1153
1252
  styles: [],
1154
1253
  textStyles: []
1155
- }, N.set(e, n)), t?.split(te).forEach((e) => {
1254
+ }, R.set(e, n)), t?.split(De).forEach((e) => {
1156
1255
  let t = e.replace(/([^;]*);/, "$1").trim();
1157
- if (RegExp(j).exec(e)) {
1158
- let e = t.replace(M, ee).replace(j, M);
1256
+ if (RegExp(we).exec(e)) {
1257
+ let e = t.replace(Te, Ee).replace(we, Te);
1159
1258
  n.textStyles.push(e);
1160
1259
  }
1161
1260
  n.styles.push(t);
1162
1261
  });
1163
- }, "addStyleClass"), ae = /* @__PURE__ */ s(function(e, t = "") {
1164
- let n = O.get(e);
1165
- t != null && (n.styles = t.split(te));
1166
- }, "addStyle2Node"), oe = /* @__PURE__ */ s(function(e, t) {
1262
+ }, "addStyleClass"), je = /* @__PURE__ */ t(function(e, t = "") {
1263
+ let n = F.get(e);
1264
+ t != null && (n.styles = t.split(De));
1265
+ }, "addStyle2Node"), Me = /* @__PURE__ */ t(function(e, t) {
1167
1266
  e.split(",").forEach(function(e) {
1168
- let n = O.get(e);
1267
+ let n = F.get(e);
1169
1268
  if (n === void 0) {
1170
1269
  let t = e.trim();
1171
1270
  n = {
1172
1271
  id: t,
1173
1272
  type: "na",
1174
1273
  children: []
1175
- }, O.set(t, n);
1274
+ }, F.set(t, n);
1176
1275
  }
1177
1276
  n.classes ||= [], n.classes.push(t);
1178
1277
  });
1179
- }, "setCssClass"), se = /* @__PURE__ */ s((e, t) => {
1180
- let n = e.flat(), r = [], i = n.find((e) => e?.type === "column-setting")?.columns ?? -1;
1181
- for (let e of n) {
1182
- if (typeof i == "number" && i > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > i && c.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${i}`), e.label &&= re(e.label), e.type === "classDef") {
1183
- ie(e.id, e.css);
1278
+ }, "setCssClass"), Ne = /* @__PURE__ */ t((e, t) => {
1279
+ let r = e.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1280
+ for (let e of r) {
1281
+ if (typeof a == "number" && a > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > a && n.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`), e.label &&= ke(e.label), e.type === "classDef") {
1282
+ Ae(e.id, e.css);
1184
1283
  continue;
1185
1284
  }
1186
1285
  if (e.type === "applyClass") {
1187
- oe(e.id, e?.styleClass ?? "");
1286
+ Me(e.id, e?.styleClass ?? "");
1188
1287
  continue;
1189
1288
  }
1190
1289
  if (e.type === "applyStyles") {
1191
- e?.stylesStr && ae(e.id, e?.stylesStr);
1290
+ e?.stylesStr && je(e.id, e?.stylesStr);
1192
1291
  continue;
1193
1292
  }
1194
1293
  if (e.type === "column-setting") t.columns = e.columns ?? -1;
1195
1294
  else if (e.type === "edge") {
1196
- let t = (A.get(e.id) ?? 0) + 1;
1197
- A.set(e.id, t), e.id = t + "-" + e.id, k.push(e);
1295
+ let t = (L.get(e.id) ?? 0) + 1;
1296
+ L.set(e.id, t), e.id = t + "-" + e.id, I.push(e);
1198
1297
  } else {
1199
1298
  e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
1200
- let t = O.get(e.id);
1201
- 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 && se(e.children, e), e.type === "space") {
1299
+ let t = F.get(e.id);
1300
+ if (t === void 0 ? F.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && Ne(e.children, e), e.type === "space") {
1202
1301
  let t = e.width ?? 1;
1203
1302
  for (let n = 0; n < t; n++) {
1204
- let t = a(e);
1205
- t.id = t.id + "-" + n, O.set(t.id, t), r.push(t);
1303
+ let t = ge(e);
1304
+ t.id = t.id + "-" + n, F.set(t.id, t), i.push(t);
1206
1305
  }
1207
- } else t === void 0 && r.push(e);
1306
+ } else t === void 0 && i.push(e);
1208
1307
  }
1209
1308
  }
1210
- t.children = r;
1211
- }, "populateBlockDatabase"), P = [], F = {
1309
+ t.children = i;
1310
+ }, "populateBlockDatabase"), Pe = [], B = {
1212
1311
  id: "root",
1213
1312
  type: "composite",
1214
1313
  children: [],
1215
1314
  columns: -1
1216
- }, ce = /* @__PURE__ */ s(() => {
1217
- c.debug("Clear called"), d(), F = {
1315
+ }, Fe = /* @__PURE__ */ t(() => {
1316
+ n.debug("Clear called"), a(), B = {
1218
1317
  id: "root",
1219
1318
  type: "composite",
1220
1319
  children: [],
1221
1320
  columns: -1
1222
- }, O = /* @__PURE__ */ new Map([["root", F]]), P = [], N = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map();
1321
+ }, F = /* @__PURE__ */ new Map([["root", B]]), Pe = [], R = /* @__PURE__ */ new Map(), I = [], L = /* @__PURE__ */ new Map(), z = "";
1223
1322
  }, "clear");
1224
- function le(e) {
1225
- switch (c.debug("typeStr2Type", e), e) {
1323
+ function Ie(e) {
1324
+ switch (n.debug("typeStr2Type", e), e) {
1226
1325
  case "[]": return "square";
1227
- case "()": return c.debug("we have a round"), "round";
1326
+ case "()": return n.debug("we have a round"), "round";
1228
1327
  case "(())": return "circle";
1229
1328
  case ">]": return "rect_left_inv_arrow";
1230
1329
  case "{}": return "diamond";
@@ -1241,52 +1340,76 @@ function le(e) {
1241
1340
  default: return "na";
1242
1341
  }
1243
1342
  }
1244
- s(le, "typeStr2Type");
1245
- function ue(e) {
1246
- switch (c.debug("typeStr2Type", e), e) {
1343
+ t(Ie, "typeStr2Type");
1344
+ function Le(e) {
1345
+ switch (n.debug("typeStr2Type", e), e) {
1247
1346
  case "==": return "thick";
1248
1347
  default: return "normal";
1249
1348
  }
1250
1349
  }
1251
- s(ue, "edgeTypeStr2Type");
1252
- function de(e) {
1253
- switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
1350
+ t(Le, "edgeTypeStr2Type");
1351
+ function Re(e) {
1352
+ switch (e.trim().slice(-1)) {
1254
1353
  case "x": return "arrow_cross";
1255
1354
  case "o": return "arrow_circle";
1256
1355
  case ">": return "arrow_point";
1257
1356
  default: return "";
1258
1357
  }
1259
1358
  }
1260
- s(de, "edgeStrToEdgeData");
1261
- var fe = 0, pe = {
1262
- getConfig: /* @__PURE__ */ s(() => _().block, "getConfig"),
1263
- typeStr2Type: le,
1264
- edgeTypeStr2Type: ue,
1265
- edgeStrToEdgeData: de,
1266
- getLogger: /* @__PURE__ */ s(() => c, "getLogger"),
1267
- getBlocksFlat: /* @__PURE__ */ s(() => [...O.values()], "getBlocksFlat"),
1268
- getBlocks: /* @__PURE__ */ s(() => P || [], "getBlocks"),
1269
- getEdges: /* @__PURE__ */ s(() => k, "getEdges"),
1270
- setHierarchy: /* @__PURE__ */ s((e) => {
1271
- F.children = e, se(e, F), P = F.children;
1359
+ t(Re, "edgeStrToEdgeData");
1360
+ function ze(e) {
1361
+ switch (e.trim().charAt(0)) {
1362
+ case "x": return "arrow_cross";
1363
+ case "o": return "arrow_circle";
1364
+ case "<": return "arrow_point";
1365
+ default: return "arrow_open";
1366
+ }
1367
+ }
1368
+ t(ze, "edgeStrToEdgeStartData");
1369
+ function Be(e) {
1370
+ return e.includes("==") ? "thick" : "normal";
1371
+ }
1372
+ t(Be, "edgeStrToThickness");
1373
+ function Ve(e) {
1374
+ return e.includes(".-") ? "dotted" : "solid";
1375
+ }
1376
+ t(Ve, "edgeStrToPattern");
1377
+ var He = 0, Ue = {
1378
+ getConfig: /* @__PURE__ */ t(() => o().block, "getConfig"),
1379
+ typeStr2Type: Ie,
1380
+ edgeTypeStr2Type: Le,
1381
+ edgeStrToEdgeData: Re,
1382
+ edgeStrToEdgeStartData: ze,
1383
+ edgeStrToThickness: Be,
1384
+ edgeStrToPattern: Ve,
1385
+ getLogger: /* @__PURE__ */ t(() => n, "getLogger"),
1386
+ getBlocksFlat: /* @__PURE__ */ t(() => [...F.values()], "getBlocksFlat"),
1387
+ getBlocks: /* @__PURE__ */ t(() => Pe || [], "getBlocks"),
1388
+ getEdges: /* @__PURE__ */ t(() => I, "getEdges"),
1389
+ setHierarchy: /* @__PURE__ */ t((e) => {
1390
+ B.children = e, Ne(e, B), Pe = B.children;
1272
1391
  }, "setHierarchy"),
1273
- getBlock: /* @__PURE__ */ s((e) => O.get(e), "getBlock"),
1274
- setBlock: /* @__PURE__ */ s((e) => {
1275
- O.set(e.id, e);
1392
+ getBlock: /* @__PURE__ */ t((e) => F.get(e), "getBlock"),
1393
+ setBlock: /* @__PURE__ */ t((e) => {
1394
+ F.set(e.id, e);
1276
1395
  }, "setBlock"),
1277
- getColumns: /* @__PURE__ */ s((e) => {
1278
- let t = O.get(e);
1396
+ getColumns: /* @__PURE__ */ t((e) => {
1397
+ let t = F.get(e);
1279
1398
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1280
1399
  }, "getColumns"),
1281
- getClasses: /* @__PURE__ */ s(function() {
1282
- return N;
1400
+ getClasses: /* @__PURE__ */ t(function() {
1401
+ return R;
1283
1402
  }, "getClasses"),
1284
- clear: ce,
1285
- generateId: /* @__PURE__ */ s(() => (fe++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + fe), "generateId")
1286
- }, I = /* @__PURE__ */ s((e, t) => {
1287
- let n = v;
1288
- return h(n(e, "r"), n(e, "g"), n(e, "b"), t);
1289
- }, "fade"), me = /* @__PURE__ */ s((e) => `.label {
1403
+ clear: Fe,
1404
+ generateId: /* @__PURE__ */ t(() => (He++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + He), "generateId"),
1405
+ setDiagramId: /* @__PURE__ */ t((e) => {
1406
+ z = e;
1407
+ }, "setDiagramId"),
1408
+ getDiagramId: /* @__PURE__ */ t(() => z, "getDiagramId")
1409
+ }, We = /* @__PURE__ */ t((e, t) => {
1410
+ let n = f;
1411
+ return c(n(e, "r"), n(e, "g"), n(e, "b"), t);
1412
+ }, "fade"), Ge = /* @__PURE__ */ t((e) => `.label {
1290
1413
  font-family: ${e.fontFamily};
1291
1414
  color: ${e.nodeTextColor || e.textColor};
1292
1415
  }
@@ -1371,9 +1494,9 @@ var fe = 0, pe = {
1371
1494
  }
1372
1495
 
1373
1496
  .node .cluster {
1374
- // fill: ${I(e.mainBkg, .5)};
1375
- fill: ${I(e.clusterBkg, .5)};
1376
- stroke: ${I(e.clusterBorder, .2)};
1497
+ // fill: ${We(e.mainBkg, .5)};
1498
+ fill: ${We(e.clusterBkg, .5)};
1499
+ stroke: ${We(e.clusterBorder, .2)};
1377
1500
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1378
1501
  stroke-width: 1px;
1379
1502
  }
@@ -1408,41 +1531,41 @@ var fe = 0, pe = {
1408
1531
  font-size: 18px;
1409
1532
  fill: ${e.textColor};
1410
1533
  }
1411
- ${x()}
1412
- `, "getStyles"), he = /* @__PURE__ */ s((e, t, n, r) => {
1534
+ ${ue()}
1535
+ `, "getStyles"), Ke = /* @__PURE__ */ t((e, t, n, r) => {
1413
1536
  t.forEach((t) => {
1414
- ge[t](e, n, r);
1537
+ qe[t](e, n, r);
1415
1538
  });
1416
- }, "insertMarkers"), ge = {
1417
- extension: /* @__PURE__ */ s((e, t, n) => {
1418
- c.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");
1539
+ }, "insertMarkers"), qe = {
1540
+ extension: /* @__PURE__ */ t((e, t, r) => {
1541
+ n.trace("Making markers for ", r), e.append("defs").append("marker").attr("id", r + "_" + 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", r + "_" + 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");
1419
1542
  }, "extension"),
1420
- composition: /* @__PURE__ */ s((e, t, n) => {
1543
+ composition: /* @__PURE__ */ t((e, t, n) => {
1421
1544
  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");
1422
1545
  }, "composition"),
1423
- aggregation: /* @__PURE__ */ s((e, t, n) => {
1546
+ aggregation: /* @__PURE__ */ t((e, t, n) => {
1424
1547
  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");
1425
1548
  }, "aggregation"),
1426
- dependency: /* @__PURE__ */ s((e, t, n) => {
1549
+ dependency: /* @__PURE__ */ t((e, t, n) => {
1427
1550
  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");
1428
1551
  }, "dependency"),
1429
- lollipop: /* @__PURE__ */ s((e, t, n) => {
1552
+ lollipop: /* @__PURE__ */ t((e, t, n) => {
1430
1553
  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);
1431
1554
  }, "lollipop"),
1432
- point: /* @__PURE__ */ s((e, t, n) => {
1555
+ point: /* @__PURE__ */ t((e, t, n) => {
1433
1556
  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");
1434
1557
  }, "point"),
1435
- circle: /* @__PURE__ */ s((e, t, n) => {
1558
+ circle: /* @__PURE__ */ t((e, t, n) => {
1436
1559
  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");
1437
1560
  }, "circle"),
1438
- cross: /* @__PURE__ */ s((e, t, n) => {
1561
+ cross: /* @__PURE__ */ t((e, t, n) => {
1439
1562
  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");
1440
1563
  }, "cross"),
1441
- barb: /* @__PURE__ */ s((e, t, n) => {
1564
+ barb: /* @__PURE__ */ t((e, t, n) => {
1442
1565
  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");
1443
1566
  }, "barb")
1444
- }, _e = he, L = f()?.block?.padding ?? 8;
1445
- function R(e, t) {
1567
+ }, Je = Ke, V = u()?.block?.padding ?? 8;
1568
+ function Ye(e, t) {
1446
1569
  if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1447
1570
  if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1448
1571
  return e < 0 ? {
@@ -1456,55 +1579,57 @@ function R(e, t) {
1456
1579
  py: Math.floor(t / e)
1457
1580
  };
1458
1581
  }
1459
- s(R, "calculateBlockPosition");
1460
- var ve = /* @__PURE__ */ s((e) => {
1461
- let t = 0, n = 0;
1462
- for (let r of e.children) {
1463
- let { width: e, height: i, x: a, y: o } = r.size ?? {
1582
+ t(Ye, "calculateBlockPosition");
1583
+ var Xe = /* @__PURE__ */ t((e) => {
1584
+ let t = 0, r = 0;
1585
+ for (let i of e.children) {
1586
+ let { width: e, height: a, x: o, y: s } = i.size ?? {
1464
1587
  width: 0,
1465
1588
  height: 0,
1466
1589
  x: 0,
1467
1590
  y: 0
1468
1591
  };
1469
- c.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));
1592
+ if (n.debug("getMaxChildSize abc95 child:", i.id, "width:", e, "height:", a, "x:", o, "y:", s, i.type), i.type === "space") continue;
1593
+ let c = e / (i.widthInColumns ?? 1);
1594
+ c > t && (t = c), a > r && (r = a);
1470
1595
  }
1471
1596
  return {
1472
1597
  width: t,
1473
- height: n
1598
+ height: r
1474
1599
  };
1475
1600
  }, "getMaxChildSize");
1476
- function z(e, t, n = 0, r = 0) {
1477
- c.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", n), e?.size?.width || (e.size = {
1478
- width: n,
1479
- height: r,
1601
+ function H(e, t, r = 0, i = 0) {
1602
+ n.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", r), e?.size?.width || (e.size = {
1603
+ width: r,
1604
+ height: i,
1480
1605
  x: 0,
1481
1606
  y: 0
1482
1607
  });
1483
- let i = 0, a = 0;
1608
+ let a = 0, o = 0;
1484
1609
  if (e.children?.length > 0) {
1485
- for (let n of e.children) z(n, t);
1486
- let o = ve(e);
1487
- i = o.width, a = o.height, c.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
1488
- for (let t of e.children) t.size && (c.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) + L * ((t.widthInColumns ?? 1) - 1), t.size.height = a, t.size.x = 0, t.size.y = 0, c.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${i} maxHeight:${a}`));
1489
- for (let n of e.children) z(n, t, i, a);
1490
- let s = e.columns ?? -1, l = 0;
1610
+ for (let n of e.children) H(n, t);
1611
+ let s = Xe(e);
1612
+ a = s.width, o = s.height, n.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", a, o);
1613
+ for (let t of e.children) t.size && (n.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${a} ${o} ${JSON.stringify(t.size)}`), t.size.width = a * (t.widthInColumns ?? 1) + V * ((t.widthInColumns ?? 1) - 1), t.size.height = o, t.size.x = 0, t.size.y = 0, n.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${a} maxHeight:${o}`));
1614
+ for (let n of e.children) H(n, t, a, o);
1615
+ let c = e.columns ?? -1, l = 0;
1491
1616
  for (let t of e.children) l += t.widthInColumns ?? 1;
1492
1617
  let u = e.children.length;
1493
- s > 0 && s < l && (u = s);
1494
- let d = Math.ceil(l / u), f = u * (i + L) + L, p = d * (a + L) + L;
1495
- if (f < n) {
1496
- c.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`), f = n, p = r;
1497
- let t = (n - u * L - L) / u, o = (r - d * L - L) / d;
1498
- c.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", i), c.debug("Size indata abc88", e.id, "childHeight", o, "maxHeight", a), c.debug("Size indata abc88 xSize", u, "padding", L);
1499
- for (let n of e.children) n.size && (n.size.width = t, n.size.height = o, n.size.x = 0, n.size.y = 0);
1618
+ c > 0 && c < l && (u = c);
1619
+ let d = Math.ceil(l / u), f = u * (a + V) + V, p = d * (o + V) + V;
1620
+ if (f < r) {
1621
+ n.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${i} width ${f}`), f = r, p = i;
1622
+ let t = (r - u * V - V) / u, s = (i - d * V - V) / d;
1623
+ n.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", a), n.debug("Size indata abc88", e.id, "childHeight", s, "maxHeight", o), n.debug("Size indata abc88 xSize", u, "padding", V);
1624
+ for (let n of e.children) n.size && (n.size.width = t, n.size.height = s, n.size.x = 0, n.size.y = 0);
1500
1625
  }
1501
- if (c.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)) {
1626
+ if (n.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${d} columns ${c}${e.children.length} width=${Math.max(f, e.size?.width || 0)}`), f < (e?.size?.width || 0)) {
1502
1627
  f = e?.size?.width || 0;
1503
- let t = s > 0 ? Math.min(e.children.length, s) : e.children.length;
1628
+ let t = c > 0 ? Math.min(e.children.length, c) : e.children.length;
1504
1629
  if (t > 0) {
1505
- let n = (f - t * L - L) / t;
1506
- c.debug("abc95 (growing to fit) width", e.id, f, e.size?.width, n);
1507
- for (let t of e.children) t.size && (t.size.width = n);
1630
+ let r = (f - t * V - V) / t;
1631
+ n.debug("abc95 (growing to fit) width", e.id, f, e.size?.width, r);
1632
+ for (let t of e.children) t.size && (t.size.width = r);
1508
1633
  }
1509
1634
  }
1510
1635
  e.size = {
@@ -1514,53 +1639,53 @@ function z(e, t, n = 0, r = 0) {
1514
1639
  y: 0
1515
1640
  };
1516
1641
  }
1517
- c.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
1642
+ n.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
1518
1643
  }
1519
- s(z, "setBlockSizes");
1520
- function ye(e, t) {
1521
- c.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1522
- let n = e.columns ?? -1;
1523
- if (c.debug("layoutBlocks columns abc95", e.id, "=>", n, e), e.children && e.children.length > 0) {
1524
- let r = e?.children[0]?.size?.width ?? 0, i = e.children.length * r + (e.children.length - 1) * L;
1525
- c.debug("widthOfChildren 88", i, "posX");
1526
- let a = /* @__PURE__ */ new Map();
1644
+ t(H, "setBlockSizes");
1645
+ function Ze(e, t) {
1646
+ n.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1647
+ let r = e.columns ?? -1;
1648
+ if (n.debug("layoutBlocks columns abc95", e.id, "=>", r, e), e.children && e.children.length > 0) {
1649
+ let i = e?.children[0]?.size?.width ?? 0, a = e.children.length * i + (e.children.length - 1) * V;
1650
+ n.debug("widthOfChildren 88", a, "posX");
1651
+ let o = /* @__PURE__ */ new Map();
1527
1652
  {
1528
1653
  let t = 0;
1529
- for (let r of e.children) {
1530
- if (!r.size) continue;
1531
- let { py: e } = R(n, t), i = a.get(e) ?? 0;
1532
- r.size.height > i && a.set(e, r.size.height);
1533
- let o = r?.widthInColumns ?? 1;
1534
- n > 0 && (o = Math.min(o, n - t % n)), t += o;
1654
+ for (let n of e.children) {
1655
+ if (!n.size) continue;
1656
+ let { py: e } = Ye(r, t), i = o.get(e) ?? 0;
1657
+ n.size.height > i && o.set(e, n.size.height);
1658
+ let a = n?.widthInColumns ?? 1;
1659
+ r > 0 && (a = Math.min(a, r - t % r)), t += a;
1535
1660
  }
1536
1661
  }
1537
- let o = /* @__PURE__ */ new Map();
1662
+ let s = /* @__PURE__ */ new Map();
1538
1663
  {
1539
- let e = 0, t = [...a.keys()].sort((e, t) => e - t);
1540
- for (let n of t) o.set(n, e), e += (a.get(n) ?? 0) + L;
1664
+ let e = 0, t = [...o.keys()].sort((e, t) => e - t);
1665
+ for (let n of t) s.set(n, e), e += (o.get(n) ?? 0) + V;
1541
1666
  }
1542
- let s = 0;
1543
- c.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1544
- let l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -L, u = 0;
1545
- for (let r of e.children) {
1546
- let i = e;
1547
- if (!r.size) continue;
1548
- let { width: d, height: f } = r.size, { px: p, py: m } = R(n, s);
1549
- if (m != u && (u = m, l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -L, c.debug("New row in layout for block", e.id, " and child ", r.id, u)), c.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}${L}`), i.size) {
1667
+ let c = 0;
1668
+ n.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1669
+ let l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -V, u = 0;
1670
+ for (let i of e.children) {
1671
+ let a = e;
1672
+ if (!i.size) continue;
1673
+ let { width: d, height: f } = i.size, { px: p, py: m } = Ye(r, c);
1674
+ if (m != u && (u = m, l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -V, n.debug("New row in layout for block", e.id, " and child ", i.id, u)), n.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) {
1550
1675
  let e = d / 2;
1551
- r.size.x = l + L + e, c.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${l} new startingPosX${r.size.x} ${e} padding=${L} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (r?.widthInColumns ?? 1) / 2}`), l = r.size.x + e;
1552
- let t = o.get(m) ?? 0, n = a.get(m) ?? f;
1553
- r.size.y = i.size.y - i.size.height / 2 + t + n / 2 + L, c.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${l}${L}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d * (r?.widthInColumns ?? 1) / 2}`);
1676
+ i.size.x = l + V + e, n.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${l} new startingPosX${i.size.x} ${e} padding=${V} width=${d} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (i?.widthInColumns ?? 1) / 2}`), l = i.size.x + e;
1677
+ let t = s.get(m) ?? 0, r = o.get(m) ?? f;
1678
+ i.size.y = a.size.y - a.size.height / 2 + t + r / 2 + V, n.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${l}${V}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${d * (i?.widthInColumns ?? 1) / 2}`);
1554
1679
  }
1555
- r.children && ye(r, t);
1556
- let h = r?.widthInColumns ?? 1;
1557
- n > 0 && (h = Math.min(h, n - s % n)), s += h, c.debug("abc88 columnsPos", r, s);
1680
+ i.children && Ze(i, t);
1681
+ let h = i?.widthInColumns ?? 1;
1682
+ r > 0 && (h = Math.min(h, r - c % r)), c += h, n.debug("abc88 columnsPos", i, c);
1558
1683
  }
1559
1684
  }
1560
- c.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1685
+ n.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1561
1686
  }
1562
- s(ye, "layoutBlocks");
1563
- function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1687
+ t(Ze, "layoutBlocks");
1688
+ function Qe(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1564
1689
  minX: 0,
1565
1690
  minY: 0,
1566
1691
  maxX: 0,
@@ -1570,7 +1695,7 @@ function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1570
1695
  let { x: a, y: o, width: s, height: c } = e.size;
1571
1696
  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);
1572
1697
  }
1573
- if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = be(a, {
1698
+ if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = Qe(a, {
1574
1699
  minX: t,
1575
1700
  minY: n,
1576
1701
  maxX: r,
@@ -1583,35 +1708,35 @@ function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1583
1708
  maxY: i
1584
1709
  };
1585
1710
  }
1586
- s(be, "findBounds");
1587
- function xe(e) {
1711
+ t(Qe, "findBounds");
1712
+ function $e(e) {
1588
1713
  let t = e.getBlock("root");
1589
1714
  if (!t) return;
1590
- z(t, e, 0, 0), ye(t, e), c.debug("getBlocks", JSON.stringify(t, null, 2));
1591
- let { minX: n, minY: r, maxX: i, maxY: a } = be(t), o = a - r;
1715
+ H(t, e, 0, 0), Ze(t, e), n.debug("getBlocks", JSON.stringify(t, null, 2));
1716
+ let { minX: r, minY: i, maxX: a, maxY: o } = Qe(t), s = o - i;
1592
1717
  return {
1593
- x: n,
1594
- y: r,
1595
- width: i - n,
1596
- height: o
1718
+ x: r,
1719
+ y: i,
1720
+ width: a - r,
1721
+ height: s
1597
1722
  };
1598
1723
  }
1599
- s(xe, "layout");
1600
- var B = /* @__PURE__ */ s(async (e, t, n, r = !1, i = !1) => {
1601
- let a = t || "";
1602
- typeof a == "object" && (a = a[0]);
1603
- let o = f(), s = g(o);
1604
- return await b(e, a, {
1724
+ t($e, "layout");
1725
+ var U = /* @__PURE__ */ t(async (e, t, n, r = !1, a = !1) => {
1726
+ let o = t || "";
1727
+ typeof o == "object" && (o = o[0]);
1728
+ let s = u(), c = i(s);
1729
+ return await le(e, o, {
1605
1730
  style: n,
1606
1731
  isTitle: r,
1607
- useHtmlLabels: s,
1732
+ useHtmlLabels: c,
1608
1733
  markdown: !1,
1609
- isNode: i,
1734
+ isNode: a,
1610
1735
  width: Infinity
1611
- }, o);
1612
- }, "createLabel"), Se = /* @__PURE__ */ s((e, t, n, r, i) => {
1613
- t.arrowTypeStart && we(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && we(e, "end", t.arrowTypeEnd, n, r, i);
1614
- }, "addEdgeMarkers"), Ce = {
1736
+ }, s);
1737
+ }, "createLabel"), et = /* @__PURE__ */ t((e, t, n, r, i) => {
1738
+ t.arrowTypeStart && nt(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && nt(e, "end", t.arrowTypeEnd, n, r, i);
1739
+ }, "addEdgeMarkers"), tt = {
1615
1740
  arrow_cross: "cross",
1616
1741
  arrow_point: "point",
1617
1742
  arrow_barb: "barb",
@@ -1621,199 +1746,199 @@ var B = /* @__PURE__ */ s(async (e, t, n, r = !1, i = !1) => {
1621
1746
  composition: "composition",
1622
1747
  dependency: "dependency",
1623
1748
  lollipop: "lollipop"
1624
- }, we = /* @__PURE__ */ s((e, t, n, r, i, a) => {
1625
- let o = Ce[n];
1626
- if (!o) {
1627
- c.warn(`Unknown arrow type: ${n}`);
1749
+ }, nt = /* @__PURE__ */ t((e, t, r, i, a, o) => {
1750
+ let s = tt[r];
1751
+ if (!s) {
1752
+ n.warn(`Unknown arrow type: ${r}`);
1628
1753
  return;
1629
1754
  }
1630
- let s = t === "start" ? "Start" : "End";
1631
- e.attr(`marker-${t}`, `url(${r}#${i}_${a}-${o}${s})`);
1632
- }, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */ s(async (t, n) => {
1633
- let r = f(), i = g(r), a = t.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label"), s = n.labelType === "markdown", c = await b(t, n.label, {
1755
+ let c = t === "start" ? "Start" : "End";
1756
+ e.attr(`marker-${t}`, `url(${i}#${a}_${o}-${s}${c})`);
1757
+ }, "addEdgeMarker"), rt = {}, W = {}, it = /* @__PURE__ */ t(async (t, n) => {
1758
+ let r = u(), a = i(r), o = t.insert("g").attr("class", "edgeLabel"), s = o.insert("g").attr("class", "label"), c = n.labelType === "markdown", l = await le(t, n.label, {
1634
1759
  style: n.labelStyle,
1635
- useHtmlLabels: i,
1636
- addSvgBackground: s,
1760
+ useHtmlLabels: a,
1761
+ addSvgBackground: c,
1637
1762
  isNode: !1,
1638
- markdown: s,
1639
- width: s ? void 0 : Infinity
1763
+ markdown: c,
1764
+ width: c ? void 0 : Infinity
1640
1765
  }, r);
1641
- o.node().appendChild(c);
1642
- let l = c.getBBox(), u = l;
1643
- if (i) {
1644
- let t = c.children[0], n = e(c);
1645
- l = t.getBoundingClientRect(), u = l, n.attr("width", l.width), n.attr("height", l.height);
1766
+ s.node().appendChild(l);
1767
+ let d = l.getBBox(), f = d;
1768
+ if (a) {
1769
+ let t = l.children[0], n = e(l);
1770
+ d = t.getBoundingClientRect(), f = d, n.attr("width", d.width), n.attr("height", d.height);
1646
1771
  } else {
1647
- let t = e(c).select("text").node();
1648
- t && typeof t.getBBox == "function" && (u = t.getBBox());
1772
+ let t = e(l).select("text").node();
1773
+ t && typeof t.getBBox == "function" && (f = t.getBBox());
1649
1774
  }
1650
- o.attr("transform", C(u, i)), V[n.id] = a, n.width = l.width, n.height = l.height;
1651
- let d;
1775
+ s.attr("transform", P(f, a)), rt[n.id] = o, n.width = d.width, n.height = d.height;
1776
+ let p;
1652
1777
  if (n.startLabelLeft) {
1653
- let r = t.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, n.startLabelLeft, n.labelStyle);
1654
- d = o;
1778
+ let r = t.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(i, n.startLabelLeft, n.labelStyle);
1779
+ p = o;
1655
1780
  let s = o.getBBox();
1656
- if (i) {
1781
+ if (a) {
1657
1782
  let t = o.children[0], n = e(o);
1658
1783
  s = t.getBoundingClientRect(), n.attr("width", s.width), n.attr("height", s.height);
1659
1784
  }
1660
- a.attr("transform", C(s, i)), H[n.id] || (H[n.id] = {}), H[n.id].startLeft = r, U(d, n.startLabelLeft);
1785
+ i.attr("transform", P(s, a)), W[n.id] || (W[n.id] = {}), W[n.id].startLeft = r, G(p, n.startLabelLeft);
1661
1786
  }
1662
1787
  if (n.startLabelRight) {
1663
- let r = t.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(r, n.startLabelRight, n.labelStyle);
1664
- d = o, a.node().appendChild(o);
1788
+ let r = t.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(i, n.startLabelRight, n.labelStyle);
1789
+ p = o;
1665
1790
  let s = o.getBBox();
1666
- if (i) {
1791
+ if (a) {
1667
1792
  let t = o.children[0], n = e(o);
1668
1793
  s = t.getBoundingClientRect(), n.attr("width", s.width), n.attr("height", s.height);
1669
1794
  }
1670
- a.attr("transform", C(s, i)), H[n.id] || (H[n.id] = {}), H[n.id].startRight = r, U(d, n.startLabelRight);
1795
+ i.attr("transform", P(s, a)), W[n.id] || (W[n.id] = {}), W[n.id].startRight = r, G(p, n.startLabelRight);
1671
1796
  }
1672
1797
  if (n.endLabelLeft) {
1673
- let r = t.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, n.endLabelLeft, n.labelStyle);
1674
- d = o;
1798
+ let r = t.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(r, n.endLabelLeft, n.labelStyle);
1799
+ p = o;
1675
1800
  let s = o.getBBox();
1676
- if (i) {
1801
+ if (a) {
1677
1802
  let t = o.children[0], n = e(o);
1678
1803
  s = t.getBoundingClientRect(), n.attr("width", s.width), n.attr("height", s.height);
1679
1804
  }
1680
- a.attr("transform", C(s, i)), r.node().appendChild(o), H[n.id] || (H[n.id] = {}), H[n.id].endLeft = r, U(d, n.endLabelLeft);
1805
+ i.attr("transform", P(s, a)), W[n.id] || (W[n.id] = {}), W[n.id].endLeft = r, G(p, n.endLabelLeft);
1681
1806
  }
1682
1807
  if (n.endLabelRight) {
1683
- let r = t.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, n.endLabelRight, n.labelStyle);
1684
- d = o;
1808
+ let r = t.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(r, n.endLabelRight, n.labelStyle);
1809
+ p = o;
1685
1810
  let s = o.getBBox();
1686
- if (i) {
1811
+ if (a) {
1687
1812
  let t = o.children[0], n = e(o);
1688
1813
  s = t.getBoundingClientRect(), n.attr("width", s.width), n.attr("height", s.height);
1689
1814
  }
1690
- a.attr("transform", C(s, i)), r.node().appendChild(o), H[n.id] || (H[n.id] = {}), H[n.id].endRight = r, U(d, n.endLabelRight);
1815
+ i.attr("transform", P(s, a)), W[n.id] || (W[n.id] = {}), W[n.id].endRight = r, G(p, n.endLabelRight);
1691
1816
  }
1692
- return c;
1817
+ return l;
1693
1818
  }, "insertEdgeLabel");
1694
- function U(e, t) {
1695
- g(f()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1819
+ function G(e, t) {
1820
+ i(u()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1696
1821
  }
1697
- s(U, "setTerminalWidth");
1698
- var Ee = /* @__PURE__ */ s((e, t) => {
1699
- c.debug("Moving label abc88 ", e.id, e.label, V[e.id], t);
1700
- let n = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = w(f());
1822
+ t(G, "setTerminalWidth");
1823
+ var at = /* @__PURE__ */ t((e, t) => {
1824
+ n.debug("Moving label abc88 ", e.id, e.label, rt[e.id], t);
1825
+ let r = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = fe(u());
1701
1826
  if (e.label) {
1702
- let a = V[e.id], o = e.x, s = e.y;
1703
- if (n) {
1704
- let i = r.calcLabelPosition(n);
1705
- c.debug("Moving label " + e.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), t.updatedPath && (o = i.x, s = i.y);
1827
+ let a = rt[e.id], o = e.x, s = e.y;
1828
+ if (r) {
1829
+ let i = N.calcLabelPosition(r);
1830
+ n.debug("Moving label " + e.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), t.updatedPath && (o = i.x, s = i.y);
1706
1831
  }
1707
1832
  a.attr("transform", `translate(${o}, ${s + i / 2})`);
1708
1833
  }
1709
1834
  if (e.startLabelLeft) {
1710
- let t = H[e.id].startLeft, i = e.x, a = e.y;
1711
- if (n) {
1712
- let t = r.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", n);
1713
- i = t.x, a = t.y;
1835
+ let t = W[e.id].startLeft, n = e.x, i = e.y;
1836
+ if (r) {
1837
+ let t = N.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
1838
+ n = t.x, i = t.y;
1714
1839
  }
1715
- t.attr("transform", `translate(${i}, ${a})`);
1840
+ t.attr("transform", `translate(${n}, ${i})`);
1716
1841
  }
1717
1842
  if (e.startLabelRight) {
1718
- let t = H[e.id].startRight, i = e.x, a = e.y;
1719
- if (n) {
1720
- let t = r.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", n);
1721
- i = t.x, a = t.y;
1843
+ let t = W[e.id].startRight, n = e.x, i = e.y;
1844
+ if (r) {
1845
+ let t = N.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", r);
1846
+ n = t.x, i = t.y;
1722
1847
  }
1723
- t.attr("transform", `translate(${i}, ${a})`);
1848
+ t.attr("transform", `translate(${n}, ${i})`);
1724
1849
  }
1725
1850
  if (e.endLabelLeft) {
1726
- let t = H[e.id].endLeft, i = e.x, a = e.y;
1727
- if (n) {
1728
- let t = r.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", n);
1729
- i = t.x, a = t.y;
1851
+ let t = W[e.id].endLeft, n = e.x, i = e.y;
1852
+ if (r) {
1853
+ let t = N.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
1854
+ n = t.x, i = t.y;
1730
1855
  }
1731
- t.attr("transform", `translate(${i}, ${a})`);
1856
+ t.attr("transform", `translate(${n}, ${i})`);
1732
1857
  }
1733
1858
  if (e.endLabelRight) {
1734
- let t = H[e.id].endRight, i = e.x, a = e.y;
1735
- if (n) {
1736
- let t = r.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", n);
1737
- i = t.x, a = t.y;
1859
+ let t = W[e.id].endRight, n = e.x, i = e.y;
1860
+ if (r) {
1861
+ let t = N.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
1862
+ n = t.x, i = t.y;
1738
1863
  }
1739
- t.attr("transform", `translate(${i}, ${a})`);
1864
+ t.attr("transform", `translate(${n}, ${i})`);
1740
1865
  }
1741
- }, "positionEdgeLabel"), De = /* @__PURE__ */ s((e, t) => {
1866
+ }, "positionEdgeLabel"), ot = /* @__PURE__ */ t((e, t) => {
1742
1867
  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;
1743
1868
  return i >= o || a >= s;
1744
- }, "outsideNode"), Oe = /* @__PURE__ */ s((e, t, n) => {
1745
- c.debug(`intersection calc abc89:
1869
+ }, "outsideNode"), st = /* @__PURE__ */ t((e, t, r) => {
1870
+ n.debug(`intersection calc abc89:
1746
1871
  outsidePoint: ${JSON.stringify(t)}
1747
- insidePoint : ${JSON.stringify(n)}
1872
+ insidePoint : ${JSON.stringify(r)}
1748
1873
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1749
- 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, l = e.height / 2, u = Math.abs(t.y - n.y), d = Math.abs(t.x - n.x);
1750
- if (Math.abs(i - t.y) * o > Math.abs(r - t.x) * l) {
1751
- let e = n.y < t.y ? t.y - l - i : i - l - t.y;
1752
- s = d * e / u;
1753
- let r = {
1754
- x: n.x < t.x ? n.x + s : n.x - d + s,
1755
- y: n.y < t.y ? n.y + u - e : n.y - u + e
1874
+ let i = e.x, a = e.y, o = Math.abs(i - r.x), s = e.width / 2, c = r.x < t.x ? s - o : s + o, l = e.height / 2, u = Math.abs(t.y - r.y), d = Math.abs(t.x - r.x);
1875
+ if (Math.abs(a - t.y) * s > Math.abs(i - t.x) * l) {
1876
+ let e = r.y < t.y ? t.y - l - a : a - l - t.y;
1877
+ c = d * e / u;
1878
+ let i = {
1879
+ x: r.x < t.x ? r.x + c : r.x - d + c,
1880
+ y: r.y < t.y ? r.y + u - e : r.y - u + e
1756
1881
  };
1757
- return s === 0 && (r.x = t.x, r.y = t.y), d === 0 && (r.x = t.x), u === 0 && (r.y = t.y), c.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${s}`, r), r;
1882
+ return c === 0 && (i.x = t.x, i.y = t.y), d === 0 && (i.x = t.x), u === 0 && (i.y = t.y), n.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`, i), i;
1758
1883
  } else {
1759
- s = n.x < t.x ? t.x - o - r : r - o - t.x;
1760
- 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;
1761
- return c.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${s}`, {
1762
- _x: i,
1763
- _y: a
1764
- }), s === 0 && (i = t.x, a = t.y), d === 0 && (i = t.x), u === 0 && (a = t.y), {
1765
- x: i,
1766
- y: a
1884
+ c = r.x < t.x ? t.x - s - i : i - s - t.x;
1885
+ let e = u * c / d, a = r.x < t.x ? r.x + d - c : r.x - d + c, o = r.y < t.y ? r.y + e : r.y - e;
1886
+ return n.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`, {
1887
+ _x: a,
1888
+ _y: o
1889
+ }), c === 0 && (a = t.x, o = t.y), d === 0 && (a = t.x), u === 0 && (o = t.y), {
1890
+ x: a,
1891
+ y: o
1767
1892
  };
1768
1893
  }
1769
- }, "intersection"), ke = /* @__PURE__ */ s((e, t) => {
1770
- c.debug("abc88 cutPathAtIntersect", e, t);
1771
- let n = [], r = e[0], i = !1;
1894
+ }, "intersection"), ct = /* @__PURE__ */ t((e, t) => {
1895
+ n.debug("abc88 cutPathAtIntersect", e, t);
1896
+ let r = [], i = e[0], a = !1;
1772
1897
  return e.forEach((e) => {
1773
- if (!De(t, e) && !i) {
1774
- let a = Oe(t, r, e), o = !1;
1775
- n.forEach((e) => {
1776
- o ||= e.x === a.x && e.y === a.y;
1777
- }), n.some((e) => e.x === a.x && e.y === a.y) || n.push(a), i = !0;
1778
- } else r = e, i || n.push(e);
1779
- }), n;
1780
- }, "cutPathAtIntersect"), Ae = /* @__PURE__ */ s(function(e, n, r, i, a, o, s) {
1781
- let u = r.points;
1782
- c.debug("abc88 InsertEdge: edge=", r, "e=", n);
1783
- let d = !1, p = o.node(n.v);
1784
- var m = o.node(n.w);
1785
- m?.intersect && p?.intersect && (u = u.slice(1, r.points.length - 1), u.unshift(p.intersect(u[0])), u.push(m.intersect(u[u.length - 1]))), r.toCluster && (c.debug("to cluster abc88", i[r.toCluster]), u = ke(r.points, i[r.toCluster].node), d = !0), r.fromCluster && (c.debug("from cluster abc88", i[r.fromCluster]), u = ke(u.reverse(), i[r.fromCluster].node).reverse(), d = !0);
1786
- let h = u.filter((e) => !Number.isNaN(e.y)), g = t;
1787
- r.curve && (a === "graph" || a === "flowchart") && (g = r.curve);
1788
- let { x: _, y: v } = S(r), b = y().x(_).y(v).curve(g), x;
1789
- switch (r.thickness) {
1898
+ if (!ot(t, e) && !a) {
1899
+ let n = st(t, i, e), o = !1;
1900
+ r.forEach((e) => {
1901
+ o ||= e.x === n.x && e.y === n.y;
1902
+ }), r.some((e) => e.x === n.x && e.y === n.y) || r.push(n), a = !0;
1903
+ } else i = e, a || r.push(e);
1904
+ }), r;
1905
+ }, "cutPathAtIntersect"), lt = /* @__PURE__ */ t(function(e, t, i, a, o, s, c) {
1906
+ let l = i.points;
1907
+ n.debug("abc88 InsertEdge: edge=", i, "e=", t);
1908
+ let d = !1, f = s.node(t.v);
1909
+ var p = s.node(t.w);
1910
+ 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 && (n.debug("to cluster abc88", a[i.toCluster]), l = ct(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (n.debug("from cluster abc88", a[i.fromCluster]), l = ct(l.reverse(), a[i.fromCluster].node).reverse(), d = !0);
1911
+ let m = l.filter((e) => !Number.isNaN(e.y)), h = ee;
1912
+ i.curve && (o === "graph" || o === "flowchart") && (h = i.curve);
1913
+ let { x: g, y: _ } = de(i), v = ce().x(g).y(_).curve(h), y;
1914
+ switch (i.thickness) {
1790
1915
  case "normal":
1791
- x = "edge-thickness-normal";
1916
+ y = "edge-thickness-normal";
1792
1917
  break;
1793
1918
  case "thick":
1794
- x = "edge-thickness-thick";
1919
+ y = "edge-thickness-thick";
1795
1920
  break;
1796
1921
  case "invisible":
1797
- x = "edge-thickness-thick";
1922
+ y = "edge-thickness-thick";
1798
1923
  break;
1799
- default: x = "";
1924
+ default: y = "";
1800
1925
  }
1801
- switch (r.pattern) {
1926
+ switch (i.pattern) {
1802
1927
  case "solid":
1803
- x += " edge-pattern-solid";
1928
+ y += " edge-pattern-solid";
1804
1929
  break;
1805
1930
  case "dotted":
1806
- x += " edge-pattern-dotted";
1931
+ y += " edge-pattern-dotted";
1807
1932
  break;
1808
1933
  case "dashed":
1809
- x += " edge-pattern-dashed";
1934
+ y += " edge-pattern-dashed";
1810
1935
  break;
1811
1936
  }
1812
- let C = e.append("path").attr("d", b(h)).attr("id", r.id).attr("class", " " + x + (r.classes ? " " + r.classes : "")).attr("style", r.style), w = "";
1813
- (f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C, r, w, s, a);
1814
- let T = {};
1815
- return d && (T.updatedPath = u), T.originalPath = r.points, T;
1816
- }, "insertEdge"), je = /* @__PURE__ */ s((e) => {
1937
+ let b = e.append("path").attr("d", v(m)).attr("id", i.id).attr("class", " " + y + (i.classes ? " " + i.classes : "")).attr("style", i.style), x = "";
1938
+ (u().flowchart.arrowMarkerAbsolute || u().state.arrowMarkerAbsolute) && (x = r(!0)), et(b, i, x, c, o);
1939
+ let S = {};
1940
+ return d && (S.updatedPath = l), S.originalPath = i.points, S;
1941
+ }, "insertEdge"), ut = /* @__PURE__ */ t((e) => {
1817
1942
  let t = /* @__PURE__ */ new Set();
1818
1943
  for (let n of e) switch (n) {
1819
1944
  case "x":
@@ -1827,273 +1952,273 @@ var Ee = /* @__PURE__ */ s((e, t) => {
1827
1952
  break;
1828
1953
  }
1829
1954
  return t;
1830
- }, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ s((e, t, n) => {
1831
- let r = je(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
1832
- return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
1955
+ }, "expandAndDeduplicateDirections"), dt = /* @__PURE__ */ t((e, t, n, r) => {
1956
+ 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;
1957
+ return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1833
1958
  {
1834
1959
  x: 0,
1835
1960
  y: 0
1836
1961
  },
1837
1962
  {
1838
- x: a,
1963
+ x: o,
1839
1964
  y: 0
1840
1965
  },
1841
1966
  {
1842
- x: o / 2,
1843
- y: 2 * s
1967
+ x: s / 2,
1968
+ y: 2 * c
1844
1969
  },
1845
1970
  {
1846
- x: o - a,
1971
+ x: s - o,
1847
1972
  y: 0
1848
1973
  },
1849
1974
  {
1850
- x: o,
1975
+ x: s,
1851
1976
  y: 0
1852
1977
  },
1853
1978
  {
1854
- x: o,
1855
- y: -i / 3
1979
+ x: s,
1980
+ y: -a / 3
1856
1981
  },
1857
1982
  {
1858
- x: o + 2 * s,
1859
- y: -i / 2
1983
+ x: s + 2 * c,
1984
+ y: -a / 2
1860
1985
  },
1861
1986
  {
1862
- x: o,
1863
- y: -2 * i / 3
1987
+ x: s,
1988
+ y: -2 * a / 3
1864
1989
  },
1865
1990
  {
1866
- x: o,
1867
- y: -i
1991
+ x: s,
1992
+ y: -a
1868
1993
  },
1869
1994
  {
1870
- x: o - a,
1871
- y: -i
1995
+ x: s - o,
1996
+ y: -a
1872
1997
  },
1873
1998
  {
1874
- x: o / 2,
1875
- y: -i - 2 * s
1999
+ x: s / 2,
2000
+ y: -a - 2 * c
1876
2001
  },
1877
2002
  {
1878
- x: a,
1879
- y: -i
2003
+ x: o,
2004
+ y: -a
1880
2005
  },
1881
2006
  {
1882
2007
  x: 0,
1883
- y: -i
2008
+ y: -a
1884
2009
  },
1885
2010
  {
1886
2011
  x: 0,
1887
- y: -2 * i / 3
2012
+ y: -2 * a / 3
1888
2013
  },
1889
2014
  {
1890
- x: -2 * s,
1891
- y: -i / 2
2015
+ x: -2 * c,
2016
+ y: -a / 2
1892
2017
  },
1893
2018
  {
1894
2019
  x: 0,
1895
- y: -i / 3
2020
+ y: -a / 3
1896
2021
  }
1897
- ] : r.has("right") && r.has("left") && r.has("up") ? [
2022
+ ] : i.has("right") && i.has("left") && i.has("up") ? [
1898
2023
  {
1899
- x: a,
2024
+ x: o,
1900
2025
  y: 0
1901
2026
  },
1902
2027
  {
1903
- x: o - a,
2028
+ x: s - o,
1904
2029
  y: 0
1905
2030
  },
1906
2031
  {
1907
- x: o,
1908
- y: -i / 2
2032
+ x: s,
2033
+ y: -a / 2
1909
2034
  },
1910
2035
  {
1911
- x: o - a,
1912
- y: -i
2036
+ x: s - o,
2037
+ y: -a
1913
2038
  },
1914
2039
  {
1915
- x: a,
1916
- y: -i
2040
+ x: o,
2041
+ y: -a
1917
2042
  },
1918
2043
  {
1919
2044
  x: 0,
1920
- y: -i / 2
2045
+ y: -a / 2
1921
2046
  }
1922
- ] : r.has("right") && r.has("left") && r.has("down") ? [
2047
+ ] : i.has("right") && i.has("left") && i.has("down") ? [
1923
2048
  {
1924
2049
  x: 0,
1925
2050
  y: 0
1926
2051
  },
1927
2052
  {
1928
- x: a,
1929
- y: -i
2053
+ x: o,
2054
+ y: -a
1930
2055
  },
1931
2056
  {
1932
- x: o - a,
1933
- y: -i
2057
+ x: s - o,
2058
+ y: -a
1934
2059
  },
1935
2060
  {
1936
- x: o,
2061
+ x: s,
1937
2062
  y: 0
1938
2063
  }
1939
- ] : r.has("right") && r.has("up") && r.has("down") ? [
2064
+ ] : i.has("right") && i.has("up") && i.has("down") ? [
1940
2065
  {
1941
2066
  x: 0,
1942
2067
  y: 0
1943
2068
  },
1944
2069
  {
1945
- x: o,
1946
- y: -a
2070
+ x: s,
2071
+ y: -o
1947
2072
  },
1948
2073
  {
1949
- x: o,
1950
- y: -i + a
2074
+ x: s,
2075
+ y: -a + o
1951
2076
  },
1952
2077
  {
1953
2078
  x: 0,
1954
- y: -i
2079
+ y: -a
1955
2080
  }
1956
- ] : r.has("left") && r.has("up") && r.has("down") ? [
2081
+ ] : i.has("left") && i.has("up") && i.has("down") ? [
1957
2082
  {
1958
- x: o,
2083
+ x: s,
1959
2084
  y: 0
1960
2085
  },
1961
2086
  {
1962
2087
  x: 0,
1963
- y: -a
2088
+ y: -o
1964
2089
  },
1965
2090
  {
1966
2091
  x: 0,
1967
- y: -i + a
2092
+ y: -a + o
1968
2093
  },
1969
2094
  {
1970
- x: o,
1971
- y: -i
2095
+ x: s,
2096
+ y: -a
1972
2097
  }
1973
- ] : r.has("right") && r.has("left") ? [
2098
+ ] : i.has("right") && i.has("left") ? [
1974
2099
  {
1975
- x: a,
2100
+ x: o,
1976
2101
  y: 0
1977
2102
  },
1978
2103
  {
1979
- x: a,
1980
- y: -s
2104
+ x: o,
2105
+ y: -c
1981
2106
  },
1982
2107
  {
1983
- x: o - a,
1984
- y: -s
2108
+ x: s - o,
2109
+ y: -c
1985
2110
  },
1986
2111
  {
1987
- x: o - a,
2112
+ x: s - o,
1988
2113
  y: 0
1989
2114
  },
1990
2115
  {
1991
- x: o,
1992
- y: -i / 2
2116
+ x: s,
2117
+ y: -a / 2
1993
2118
  },
1994
2119
  {
1995
- x: o - a,
1996
- y: -i
2120
+ x: s - o,
2121
+ y: -a
1997
2122
  },
1998
2123
  {
1999
- x: o - a,
2000
- y: -i + s
2124
+ x: s - o,
2125
+ y: -a + c
2001
2126
  },
2002
2127
  {
2003
- x: a,
2004
- y: -i + s
2128
+ x: o,
2129
+ y: -a + c
2005
2130
  },
2006
2131
  {
2007
- x: a,
2008
- y: -i
2132
+ x: o,
2133
+ y: -a
2009
2134
  },
2010
2135
  {
2011
2136
  x: 0,
2012
- y: -i / 2
2137
+ y: -a / 2
2013
2138
  }
2014
- ] : r.has("up") && r.has("down") ? [
2139
+ ] : i.has("up") && i.has("down") ? [
2015
2140
  {
2016
- x: o / 2,
2141
+ x: s / 2,
2017
2142
  y: 0
2018
2143
  },
2019
2144
  {
2020
2145
  x: 0,
2021
- y: -s
2146
+ y: -c
2022
2147
  },
2023
2148
  {
2024
- x: a,
2025
- y: -s
2149
+ x: o,
2150
+ y: -c
2026
2151
  },
2027
2152
  {
2028
- x: a,
2029
- y: -i + s
2153
+ x: o,
2154
+ y: -a + c
2030
2155
  },
2031
2156
  {
2032
2157
  x: 0,
2033
- y: -i + s
2158
+ y: -a + c
2034
2159
  },
2035
2160
  {
2036
- x: o / 2,
2037
- y: -i
2161
+ x: s / 2,
2162
+ y: -a
2038
2163
  },
2039
2164
  {
2040
- x: o,
2041
- y: -i + s
2165
+ x: s,
2166
+ y: -a + c
2042
2167
  },
2043
2168
  {
2044
- x: o - a,
2045
- y: -i + s
2169
+ x: s - o,
2170
+ y: -a + c
2046
2171
  },
2047
2172
  {
2048
- x: o - a,
2049
- y: -s
2173
+ x: s - o,
2174
+ y: -c
2050
2175
  },
2051
2176
  {
2052
- x: o,
2053
- y: -s
2177
+ x: s,
2178
+ y: -c
2054
2179
  }
2055
- ] : r.has("right") && r.has("up") ? [
2180
+ ] : i.has("right") && i.has("up") ? [
2056
2181
  {
2057
2182
  x: 0,
2058
2183
  y: 0
2059
2184
  },
2060
2185
  {
2061
- x: o,
2062
- y: -a
2186
+ x: s,
2187
+ y: -o
2063
2188
  },
2064
2189
  {
2065
2190
  x: 0,
2066
- y: -i
2191
+ y: -a
2067
2192
  }
2068
- ] : r.has("right") && r.has("down") ? [
2193
+ ] : i.has("right") && i.has("down") ? [
2069
2194
  {
2070
2195
  x: 0,
2071
2196
  y: 0
2072
2197
  },
2073
2198
  {
2074
- x: o,
2199
+ x: s,
2075
2200
  y: 0
2076
2201
  },
2077
2202
  {
2078
2203
  x: 0,
2079
- y: -i
2204
+ y: -a
2080
2205
  }
2081
- ] : r.has("left") && r.has("up") ? [
2206
+ ] : i.has("left") && i.has("up") ? [
2082
2207
  {
2083
- x: o,
2208
+ x: s,
2084
2209
  y: 0
2085
2210
  },
2086
2211
  {
2087
2212
  x: 0,
2088
- y: -a
2213
+ y: -o
2089
2214
  },
2090
2215
  {
2091
- x: o,
2092
- y: -i
2216
+ x: s,
2217
+ y: -a
2093
2218
  }
2094
- ] : r.has("left") && r.has("down") ? [
2219
+ ] : i.has("left") && i.has("down") ? [
2095
2220
  {
2096
- x: o,
2221
+ x: s,
2097
2222
  y: 0
2098
2223
  },
2099
2224
  {
@@ -2101,144 +2226,144 @@ var Ee = /* @__PURE__ */ s((e, t) => {
2101
2226
  y: 0
2102
2227
  },
2103
2228
  {
2104
- x: o,
2105
- y: -i
2229
+ x: s,
2230
+ y: -a
2106
2231
  }
2107
- ] : r.has("right") ? [
2232
+ ] : i.has("right") ? [
2108
2233
  {
2109
- x: a,
2110
- y: -s
2234
+ x: o,
2235
+ y: -c
2111
2236
  },
2112
2237
  {
2113
- x: a,
2114
- y: -s
2238
+ x: o,
2239
+ y: -c
2115
2240
  },
2116
2241
  {
2117
- x: o - a,
2118
- y: -s
2242
+ x: s - o,
2243
+ y: -c
2119
2244
  },
2120
2245
  {
2121
- x: o - a,
2246
+ x: s - o,
2122
2247
  y: 0
2123
2248
  },
2124
2249
  {
2125
- x: o,
2126
- y: -i / 2
2250
+ x: s,
2251
+ y: -a / 2
2127
2252
  },
2128
2253
  {
2129
- x: o - a,
2130
- y: -i
2254
+ x: s - o,
2255
+ y: -a
2131
2256
  },
2132
2257
  {
2133
- x: o - a,
2134
- y: -i + s
2258
+ x: s - o,
2259
+ y: -a + c
2135
2260
  },
2136
2261
  {
2137
- x: a,
2138
- y: -i + s
2262
+ x: o,
2263
+ y: -a + c
2139
2264
  },
2140
2265
  {
2141
- x: a,
2142
- y: -i + s
2266
+ x: o,
2267
+ y: -a + c
2143
2268
  }
2144
- ] : r.has("left") ? [
2269
+ ] : i.has("left") ? [
2145
2270
  {
2146
- x: a,
2271
+ x: o,
2147
2272
  y: 0
2148
2273
  },
2149
2274
  {
2150
- x: a,
2151
- y: -s
2275
+ x: o,
2276
+ y: -c
2152
2277
  },
2153
2278
  {
2154
- x: o - a,
2155
- y: -s
2279
+ x: s - o,
2280
+ y: -c
2156
2281
  },
2157
2282
  {
2158
- x: o - a,
2159
- y: -i + s
2283
+ x: s - o,
2284
+ y: -a + c
2160
2285
  },
2161
2286
  {
2162
- x: a,
2163
- y: -i + s
2287
+ x: o,
2288
+ y: -a + c
2164
2289
  },
2165
2290
  {
2166
- x: a,
2167
- y: -i
2291
+ x: o,
2292
+ y: -a
2168
2293
  },
2169
2294
  {
2170
2295
  x: 0,
2171
- y: -i / 2
2296
+ y: -a / 2
2172
2297
  }
2173
- ] : r.has("up") ? [
2298
+ ] : i.has("up") ? [
2174
2299
  {
2175
- x: a,
2176
- y: -s
2300
+ x: o,
2301
+ y: -c
2177
2302
  },
2178
2303
  {
2179
- x: a,
2180
- y: -i + s
2304
+ x: o,
2305
+ y: -a + c
2181
2306
  },
2182
2307
  {
2183
2308
  x: 0,
2184
- y: -i + s
2309
+ y: -a + c
2185
2310
  },
2186
2311
  {
2187
- x: o / 2,
2188
- y: -i
2312
+ x: s / 2,
2313
+ y: -a
2189
2314
  },
2190
2315
  {
2191
- x: o,
2192
- y: -i + s
2316
+ x: s,
2317
+ y: -a + c
2193
2318
  },
2194
2319
  {
2195
- x: o - a,
2196
- y: -i + s
2320
+ x: s - o,
2321
+ y: -a + c
2197
2322
  },
2198
2323
  {
2199
- x: o - a,
2200
- y: -s
2324
+ x: s - o,
2325
+ y: -c
2201
2326
  }
2202
- ] : r.has("down") ? [
2327
+ ] : i.has("down") ? [
2203
2328
  {
2204
- x: o / 2,
2329
+ x: s / 2,
2205
2330
  y: 0
2206
2331
  },
2207
2332
  {
2208
2333
  x: 0,
2209
- y: -s
2334
+ y: -c
2210
2335
  },
2211
2336
  {
2212
- x: a,
2213
- y: -s
2337
+ x: o,
2338
+ y: -c
2214
2339
  },
2215
2340
  {
2216
- x: a,
2217
- y: -i + s
2341
+ x: o,
2342
+ y: -a + c
2218
2343
  },
2219
2344
  {
2220
- x: o - a,
2221
- y: -i + s
2345
+ x: s - o,
2346
+ y: -a + c
2222
2347
  },
2223
2348
  {
2224
- x: o - a,
2225
- y: -s
2349
+ x: s - o,
2350
+ y: -c
2226
2351
  },
2227
2352
  {
2228
- x: o,
2229
- y: -s
2353
+ x: s,
2354
+ y: -c
2230
2355
  }
2231
2356
  ] : [{
2232
2357
  x: 0,
2233
2358
  y: 0
2234
2359
  }];
2235
2360
  }, "getArrowPoints");
2236
- function Ne(e, t) {
2361
+ function ft(e, t) {
2237
2362
  return e.intersect(t);
2238
2363
  }
2239
- s(Ne, "intersectNode");
2240
- var Pe = Ne;
2241
- function Fe(e, t, n, r) {
2364
+ t(ft, "intersectNode");
2365
+ var pt = ft;
2366
+ function mt(e, t, n, r) {
2242
2367
  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);
2243
2368
  r.x < i && (l = -l);
2244
2369
  var u = Math.abs(t * n * s / c);
@@ -2247,33 +2372,33 @@ function Fe(e, t, n, r) {
2247
2372
  y: a + u
2248
2373
  };
2249
2374
  }
2250
- s(Fe, "intersectEllipse");
2251
- var Ie = Fe;
2252
- function Le(e, t, n) {
2253
- return Ie(e, t, t, n);
2375
+ t(mt, "intersectEllipse");
2376
+ var ht = mt;
2377
+ function gt(e, t, n) {
2378
+ return ht(e, t, t, n);
2254
2379
  }
2255
- s(Le, "intersectCircle");
2256
- var Re = Le;
2257
- function ze(e, t, n, r) {
2380
+ t(gt, "intersectCircle");
2381
+ var _t = gt;
2382
+ function vt(e, t, n, r) {
2258
2383
  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;
2259
- if (!(f !== 0 && p !== 0 && W(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 && W(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, {
2384
+ 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, {
2260
2385
  x: _,
2261
2386
  y: v
2262
2387
  };
2263
2388
  }
2264
- s(ze, "intersectLine");
2265
- function W(e, t) {
2389
+ t(vt, "intersectLine");
2390
+ function yt(e, t) {
2266
2391
  return e * t > 0;
2267
2392
  }
2268
- s(W, "sameSign");
2269
- var Be = ze, Ve = He;
2270
- function He(e, t, n) {
2393
+ t(yt, "sameSign");
2394
+ var bt = vt, xt = St;
2395
+ function St(e, t, n) {
2271
2396
  var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
2272
2397
  typeof t.forEach == "function" ? t.forEach(function(e) {
2273
2398
  o = Math.min(o, e.x), s = Math.min(s, e.y);
2274
2399
  }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
2275
2400
  for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
2276
- var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = Be(e, n, {
2401
+ var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = bt(e, n, {
2277
2402
  x: c + d.x,
2278
2403
  y: l + d.y
2279
2404
  }, {
@@ -2287,84 +2412,84 @@ function He(e, t, n) {
2287
2412
  return a < c ? -1 : a === c ? 0 : 1;
2288
2413
  }), a[0]) : e;
2289
2414
  }
2290
- s(He, "intersectPolygon");
2291
- var G = {
2292
- node: Pe,
2293
- circle: Re,
2294
- ellipse: Ie,
2295
- polygon: Ve,
2296
- rect: /* @__PURE__ */ s((e, t) => {
2415
+ t(St, "intersectPolygon");
2416
+ var K = {
2417
+ node: pt,
2418
+ circle: _t,
2419
+ ellipse: ht,
2420
+ polygon: xt,
2421
+ rect: /* @__PURE__ */ t((e, t) => {
2297
2422
  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;
2298
2423
  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), {
2299
2424
  x: n + c,
2300
2425
  y: r + l
2301
2426
  };
2302
2427
  }, "intersectRect")
2303
- }, K = /* @__PURE__ */ s(async (t, n, r, a) => {
2304
- let o = f(), s, c = n.useHtmlLabels || g(o);
2428
+ }, q = /* @__PURE__ */ t(async (t, n, r, a) => {
2429
+ let o = u(), s, c = n.useHtmlLabels || i(o);
2305
2430
  s = r || "node default";
2306
- let l = t.insert("g").attr("class", s).attr("id", n.domId || n.id), d = l.insert("g").attr("class", "label").attr("style", n.labelStyle), p;
2431
+ let l = t.insert("g").attr("class", s).attr("id", n.domId || n.id), f = l.insert("g").attr("class", "label").attr("style", n.labelStyle), p;
2307
2432
  p = n.labelText === void 0 ? "" : typeof n.labelText == "string" ? n.labelText : n.labelText[0];
2308
2433
  let m;
2309
- m = n.labelType === "markdown" ? b(d, u(i(p), o), {
2434
+ m = n.labelType === "markdown" ? le(f, d(M(p), o), {
2310
2435
  useHtmlLabels: c,
2311
2436
  width: n.width || o.flowchart.wrappingWidth,
2312
2437
  classes: "markdown-node-label"
2313
- }, o) : await B(d, u(i(p), o), n.labelStyle, !1, a);
2314
- let h = m.getBBox(), _ = n.padding / 2;
2315
- if (g(o)) {
2438
+ }, o) : await U(f, d(M(p), o), n.labelStyle, !1, a);
2439
+ let h = m.getBBox(), g = n.padding / 2;
2440
+ if (i(o)) {
2316
2441
  let t = m.children[0], n = e(m);
2317
- await T(t, p), h = t.getBoundingClientRect(), n.attr("width", h.width), n.attr("height", h.height);
2442
+ await pe(t, p), h = t.getBoundingClientRect(), n.attr("width", h.width), n.attr("height", h.height);
2318
2443
  }
2319
- return c ? d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : d.attr("transform", "translate(0, " + -h.height / 2 + ")"), n.centerLabel && d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), d.insert("rect", ":first-child"), {
2444
+ return c ? 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"), {
2320
2445
  shapeSvg: l,
2321
2446
  bbox: h,
2322
- halfPadding: _,
2323
- label: d
2447
+ halfPadding: g,
2448
+ label: f
2324
2449
  };
2325
- }, "labelHelper"), q = /* @__PURE__ */ s((e, t) => {
2450
+ }, "labelHelper"), J = /* @__PURE__ */ t((e, t) => {
2326
2451
  let n = t.node().getBBox();
2327
2452
  e.width = n.width, e.height = n.height;
2328
2453
  }, "updateNodeBounds");
2329
- function J(e, t, n, r) {
2454
+ function Y(e, t, n, r) {
2330
2455
  return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
2331
2456
  return e.x + "," + e.y;
2332
2457
  }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
2333
2458
  }
2334
- s(J, "insertPolygonShape");
2335
- var Ue = /* @__PURE__ */ s(async (e, t) => {
2336
- t.useHtmlLabels || g(f()) || (t.centerLabel = !0);
2337
- let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes, !0);
2338
- c.info("Classes = ", t.classes);
2339
- let a = n.insert("rect", ":first-child");
2340
- return a.attr("rx", t.rx).attr("ry", t.ry).attr("x", -r.width / 2 - i).attr("y", -r.height / 2 - i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), q(t, a), t.intersect = function(e) {
2341
- return G.rect(t, e);
2342
- }, n;
2343
- }, "note"), We = /* @__PURE__ */ s((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ s((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ s(async (e, t) => {
2344
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding + (r.height + t.padding), a = [
2459
+ t(Y, "insertPolygonShape");
2460
+ var Ct = /* @__PURE__ */ t(async (e, t) => {
2461
+ t.useHtmlLabels || i(u()) || (t.centerLabel = !0);
2462
+ let { shapeSvg: r, bbox: a, halfPadding: o } = await q(e, t, "node " + t.classes, !0);
2463
+ n.info("Classes = ", t.classes);
2464
+ let s = r.insert("rect", ":first-child");
2465
+ return s.attr("rx", t.rx).attr("ry", t.ry).attr("x", -a.width / 2 - o).attr("y", -a.height / 2 - o).attr("width", a.width + t.padding).attr("height", a.height + t.padding), J(t, s), t.intersect = function(e) {
2466
+ return K.rect(t, e);
2467
+ }, r;
2468
+ }, "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 (e, t) => {
2469
+ let { shapeSvg: r, bbox: i } = await q(e, t, X(t, void 0), !0), a = i.width + t.padding + (i.height + t.padding), o = [
2345
2470
  {
2346
- x: i / 2,
2471
+ x: a / 2,
2347
2472
  y: 0
2348
2473
  },
2349
2474
  {
2350
- x: i,
2351
- y: -i / 2
2475
+ x: a,
2476
+ y: -a / 2
2352
2477
  },
2353
2478
  {
2354
- x: i / 2,
2355
- y: -i
2479
+ x: a / 2,
2480
+ y: -a
2356
2481
  },
2357
2482
  {
2358
2483
  x: 0,
2359
- y: -i / 2
2484
+ y: -a / 2
2360
2485
  }
2361
2486
  ];
2362
- c.info("Question main (Circle)");
2363
- let o = J(n, i, i, a);
2364
- return o.attr("style", t.style), q(t, o), t.intersect = function(e) {
2365
- return c.warn("Intersect called"), G.polygon(t, a, e);
2366
- }, n;
2367
- }, "question"), Ke = /* @__PURE__ */ s((e, t) => {
2487
+ n.info("Question main (Circle)");
2488
+ let s = Y(r, a, a, o);
2489
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2490
+ return n.warn("Intersect called"), K.polygon(t, o, e);
2491
+ }, r;
2492
+ }, "question"), Et = /* @__PURE__ */ t((e, t) => {
2368
2493
  let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2369
2494
  return n.insert("polygon", ":first-child").attr("points", [
2370
2495
  {
@@ -2386,10 +2511,10 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2386
2511
  ].map(function(e) {
2387
2512
  return e.x + "," + e.y;
2388
2513
  }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
2389
- return G.circle(t, 14, e);
2514
+ return K.circle(t, 14, e);
2390
2515
  }, n;
2391
- }, "choice"), qe = /* @__PURE__ */ s(async (e, t) => {
2392
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = i / 4, o = r.width + 2 * a + t.padding, s = [
2516
+ }, "choice"), Dt = /* @__PURE__ */ t(async (e, t) => {
2517
+ 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 = [
2393
2518
  {
2394
2519
  x: a,
2395
2520
  y: 0
@@ -2414,17 +2539,17 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2414
2539
  x: 0,
2415
2540
  y: -i / 2
2416
2541
  }
2417
- ], c = J(n, o, i, s);
2418
- return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
2419
- return G.polygon(t, s, e);
2542
+ ], c = Y(n, o, i, s);
2543
+ return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2544
+ return K.polygon(t, s, e);
2420
2545
  }, n;
2421
- }, "hexagon"), Je = /* @__PURE__ */ s(async (e, t) => {
2422
- let { shapeSvg: n, bbox: r } = await K(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 = J(n, o, i, s);
2423
- return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
2424
- return G.polygon(t, s, e);
2546
+ }, "hexagon"), Ot = /* @__PURE__ */ t(async (e, t) => {
2547
+ 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);
2548
+ return l.attr("style", t.style), J(t, l), t.intersect = function(e) {
2549
+ return K.polygon(t, c, e);
2425
2550
  }, n;
2426
- }, "block_arrow"), Ye = /* @__PURE__ */ s(async (e, t) => {
2427
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2551
+ }, "block_arrow"), kt = /* @__PURE__ */ t(async (e, t) => {
2552
+ 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 = [
2428
2553
  {
2429
2554
  x: -a / 2,
2430
2555
  y: 0
@@ -2446,11 +2571,11 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2446
2571
  y: -a / 2
2447
2572
  }
2448
2573
  ];
2449
- return J(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2450
- return G.polygon(t, o, e);
2574
+ return Y(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2575
+ return K.polygon(t, o, e);
2451
2576
  }, n;
2452
- }, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ s(async (e, t) => {
2453
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2577
+ }, "rect_left_inv_arrow"), At = /* @__PURE__ */ t(async (e, t) => {
2578
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2454
2579
  {
2455
2580
  x: -2 * a / 6,
2456
2581
  y: 0
@@ -2467,12 +2592,12 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2467
2592
  x: a / 6,
2468
2593
  y: -a
2469
2594
  }
2470
- ], s = J(n, i, a, o);
2471
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2472
- return G.polygon(t, o, e);
2595
+ ], s = Y(n, i, a, o);
2596
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2597
+ return K.polygon(t, o, e);
2473
2598
  }, n;
2474
- }, "lean_right"), Ze = /* @__PURE__ */ s(async (e, t) => {
2475
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2599
+ }, "lean_right"), jt = /* @__PURE__ */ t(async (e, t) => {
2600
+ 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 = [
2476
2601
  {
2477
2602
  x: 2 * a / 6,
2478
2603
  y: 0
@@ -2489,12 +2614,12 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2489
2614
  x: -a / 6,
2490
2615
  y: -a
2491
2616
  }
2492
- ], s = J(n, i, a, o);
2493
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2494
- return G.polygon(t, o, e);
2617
+ ], s = Y(n, i, a, o);
2618
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2619
+ return K.polygon(t, o, e);
2495
2620
  }, n;
2496
- }, "lean_left"), Qe = /* @__PURE__ */ s(async (e, t) => {
2497
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2621
+ }, "lean_left"), Mt = /* @__PURE__ */ t(async (e, t) => {
2622
+ 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 = [
2498
2623
  {
2499
2624
  x: -2 * a / 6,
2500
2625
  y: 0
@@ -2511,12 +2636,12 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2511
2636
  x: a / 6,
2512
2637
  y: -a
2513
2638
  }
2514
- ], s = J(n, i, a, o);
2515
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2516
- return G.polygon(t, o, e);
2639
+ ], s = Y(n, i, a, o);
2640
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2641
+ return K.polygon(t, o, e);
2517
2642
  }, n;
2518
- }, "trapezoid"), $e = /* @__PURE__ */ s(async (e, t) => {
2519
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2643
+ }, "trapezoid"), Nt = /* @__PURE__ */ t(async (e, t) => {
2644
+ 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 = [
2520
2645
  {
2521
2646
  x: a / 6,
2522
2647
  y: 0
@@ -2533,12 +2658,12 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2533
2658
  x: -2 * a / 6,
2534
2659
  y: -a
2535
2660
  }
2536
- ], s = J(n, i, a, o);
2537
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2538
- return G.polygon(t, o, e);
2661
+ ], s = Y(n, i, a, o);
2662
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2663
+ return K.polygon(t, o, e);
2539
2664
  }, n;
2540
- }, "inv_trapezoid"), et = /* @__PURE__ */ s(async (e, t) => {
2541
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2665
+ }, "inv_trapezoid"), Pt = /* @__PURE__ */ t(async (e, t) => {
2666
+ 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 = [
2542
2667
  {
2543
2668
  x: 0,
2544
2669
  y: 0
@@ -2559,105 +2684,105 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
2559
2684
  x: 0,
2560
2685
  y: -a
2561
2686
  }
2562
- ], s = J(n, i, a, o);
2563
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2564
- return G.polygon(t, o, e);
2687
+ ], s = Y(n, i, a, o);
2688
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2689
+ return K.polygon(t, o, e);
2565
2690
  }, n;
2566
- }, "rect_right_inv_arrow"), tt = /* @__PURE__ */ s(async (e, t) => {
2567
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(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;
2568
- return q(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) {
2569
- let n = G.rect(t, e), r = n.x - t.x;
2691
+ }, "rect_right_inv_arrow"), Ft = /* @__PURE__ */ t(async (e, t) => {
2692
+ 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;
2693
+ 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) {
2694
+ let n = K.rect(t, e), r = n.x - t.x;
2570
2695
  if (a != 0 && (Math.abs(r) < t.width / 2 || Math.abs(r) == t.width / 2 && Math.abs(n.y - t.y) > t.height / 2 - o)) {
2571
2696
  let i = o * o * (1 - r * r / (a * a));
2572
2697
  i != 0 && (i = Math.sqrt(i)), i = o - i, e.y - t.y > 0 && (i = -i), n.y += i;
2573
2698
  }
2574
2699
  return n;
2575
2700
  }, n;
2576
- }, "cylinder"), nt = /* @__PURE__ */ s(async (e, t) => {
2577
- let { shapeSvg: n, bbox: r, halfPadding: i } = await K(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, l = t.positioned ? -o / 2 : -r.width / 2 - i, u = t.positioned ? -s / 2 : -r.height / 2 - i;
2578
- if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", o).attr("height", s), t.props) {
2701
+ }, "cylinder"), It = /* @__PURE__ */ t(async (e, t) => {
2702
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes + " " + t.class, !0), o = r.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, c = t.positioned ? t.height : i.height + t.padding, l = t.positioned ? -s / 2 : -i.width / 2 - a, u = t.positioned ? -c / 2 : -i.height / 2 - a;
2703
+ if (o.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
2579
2704
  let e = new Set(Object.keys(t.props));
2580
- t.props.borders && (X(a, t.props.borders, o, s), e.delete("borders")), e.forEach((e) => {
2581
- c.warn(`Unknown node property ${e}`);
2705
+ t.props.borders && (Z(o, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
2706
+ n.warn(`Unknown node property ${e}`);
2582
2707
  });
2583
2708
  }
2584
- return q(t, a), t.intersect = function(e) {
2585
- return G.rect(t, e);
2586
- }, n;
2587
- }, "rect"), rt = /* @__PURE__ */ s(async (e, t) => {
2588
- let { shapeSvg: n, bbox: r, halfPadding: i } = await K(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, l = t.positioned ? -o / 2 : -r.width / 2 - i, u = t.positioned ? -s / 2 : -r.height / 2 - i;
2589
- if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", o).attr("height", s), t.props) {
2709
+ return J(t, o), t.intersect = function(e) {
2710
+ return K.rect(t, e);
2711
+ }, r;
2712
+ }, "rect"), Lt = /* @__PURE__ */ t(async (e, t) => {
2713
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes, !0), o = r.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, c = t.positioned ? t.height : i.height + t.padding, l = t.positioned ? -s / 2 : -i.width / 2 - a, u = t.positioned ? -c / 2 : -i.height / 2 - a;
2714
+ if (o.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
2590
2715
  let e = new Set(Object.keys(t.props));
2591
- t.props.borders && (X(a, t.props.borders, o, s), e.delete("borders")), e.forEach((e) => {
2592
- c.warn(`Unknown node property ${e}`);
2716
+ t.props.borders && (Z(o, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
2717
+ n.warn(`Unknown node property ${e}`);
2593
2718
  });
2594
2719
  }
2595
- return q(t, a), t.intersect = function(e) {
2596
- return G.rect(t, e);
2597
- }, n;
2598
- }, "composite"), it = /* @__PURE__ */ s(async (e, t) => {
2599
- let { shapeSvg: n } = await K(e, t, "label", !0);
2600
- c.trace("Classes = ", t.class);
2601
- let r = n.insert("rect", ":first-child");
2602
- if (r.attr("width", 0).attr("height", 0), n.attr("class", "label edgeLabel"), t.props) {
2720
+ return J(t, o), t.intersect = function(e) {
2721
+ return K.rect(t, e);
2722
+ }, r;
2723
+ }, "composite"), Rt = /* @__PURE__ */ t(async (e, t) => {
2724
+ let { shapeSvg: r } = await q(e, t, "label", !0);
2725
+ n.trace("Classes = ", t.class);
2726
+ let i = r.insert("rect", ":first-child");
2727
+ if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), t.props) {
2603
2728
  let e = new Set(Object.keys(t.props));
2604
- t.props.borders && (X(r, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
2605
- c.warn(`Unknown node property ${e}`);
2729
+ t.props.borders && (Z(i, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
2730
+ n.warn(`Unknown node property ${e}`);
2606
2731
  });
2607
2732
  }
2608
- return q(t, r), t.intersect = function(e) {
2609
- return G.rect(t, e);
2610
- }, n;
2733
+ return J(t, i), t.intersect = function(e) {
2734
+ return K.rect(t, e);
2735
+ }, r;
2611
2736
  }, "labelRect");
2612
- function X(e, t, n, r) {
2613
- let i = [], a = /* @__PURE__ */ s((e) => {
2614
- i.push(e, 0);
2615
- }, "addBorder"), o = /* @__PURE__ */ s((e) => {
2616
- i.push(0, e);
2737
+ function Z(e, r, i, a) {
2738
+ let o = [], s = /* @__PURE__ */ t((e) => {
2739
+ o.push(e, 0);
2740
+ }, "addBorder"), c = /* @__PURE__ */ t((e) => {
2741
+ o.push(0, e);
2617
2742
  }, "skipBorder");
2618
- t.includes("t") ? (c.debug("add top border"), a(n)) : o(n), t.includes("r") ? (c.debug("add right border"), a(r)) : o(r), t.includes("b") ? (c.debug("add bottom border"), a(n)) : o(n), t.includes("l") ? (c.debug("add left border"), a(r)) : o(r), e.attr("stroke-dasharray", i.join(" "));
2743
+ r.includes("t") ? (n.debug("add top border"), s(i)) : c(i), r.includes("r") ? (n.debug("add right border"), s(a)) : c(a), r.includes("b") ? (n.debug("add bottom border"), s(i)) : c(i), r.includes("l") ? (n.debug("add left border"), s(a)) : c(a), e.attr("stroke-dasharray", o.join(" "));
2619
2744
  }
2620
- s(X, "applyNodePropertyBorders");
2621
- var at = /* @__PURE__ */ s(async (t, n) => {
2622
- let r;
2623
- r = n.classes ? "node " + n.classes : "node default";
2624
- let i = t.insert("g").attr("class", r).attr("id", n.domId || n.id), a = i.insert("rect", ":first-child"), o = i.insert("line"), s = i.insert("g").attr("class", "label"), l = n.labelText.flat ? n.labelText.flat() : n.labelText, u = "";
2625
- u = typeof l == "object" ? l[0] : l, c.info("Label text abc79", u, l, typeof l == "object");
2626
- let d = await B(s, u, n.labelStyle, !0, !0), p = {
2745
+ t(Z, "applyNodePropertyBorders");
2746
+ var zt = /* @__PURE__ */ t(async (t, r) => {
2747
+ let a;
2748
+ a = r.classes ? "node " + r.classes : "node default";
2749
+ 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 = "";
2750
+ f = typeof d == "object" ? d[0] : d, n.info("Label text abc79", f, d, typeof d == "object");
2751
+ let p = await U(l, f, r.labelStyle, !0, !0), m = {
2627
2752
  width: 0,
2628
2753
  height: 0
2629
2754
  };
2630
- if (g(f())) {
2631
- let t = d.children[0], n = e(d);
2632
- p = t.getBoundingClientRect(), n.attr("width", p.width), n.attr("height", p.height);
2755
+ if (i(u())) {
2756
+ let t = p.children[0], n = e(p);
2757
+ m = t.getBoundingClientRect(), n.attr("width", m.width), n.attr("height", m.height);
2633
2758
  }
2634
- c.info("Text 2", l);
2635
- let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(s, m.join ? m.join("<br/>") : m, n.labelStyle, !0, !0);
2636
- if (g(f())) {
2759
+ n.info("Text 2", d);
2760
+ let h = d.slice(1, d.length), g = p.getBBox(), _ = await U(l, h.join ? h.join("<br/>") : h, r.labelStyle, !0, !0);
2761
+ if (i(u())) {
2637
2762
  let t = _.children[0], n = e(_);
2638
- p = t.getBoundingClientRect(), n.attr("width", p.width), n.attr("height", p.height);
2763
+ m = t.getBoundingClientRect(), n.attr("width", m.width), n.attr("height", m.height);
2639
2764
  }
2640
- let v = n.padding / 2;
2641
- return e(_).attr("transform", "translate( " + (p.width > h.width ? 0 : (h.width - p.width) / 2) + ", " + (h.height + v + 5) + ")"), e(d).attr("transform", "translate( " + (p.width < h.width ? 0 : -(h.width - p.width) / 2) + ", 0)"), p = s.node().getBBox(), s.attr("transform", "translate(" + -p.width / 2 + ", " + (-p.height / 2 - v + 3) + ")"), a.attr("class", "outer title-state").attr("x", -p.width / 2 - v).attr("y", -p.height / 2 - v).attr("width", p.width + n.padding).attr("height", p.height + n.padding), o.attr("class", "divider").attr("x1", -p.width / 2 - v).attr("x2", p.width / 2 + v).attr("y1", -p.height / 2 - v + h.height + v).attr("y2", -p.height / 2 - v + h.height + v), q(n, a), n.intersect = function(e) {
2642
- return G.rect(n, e);
2643
- }, i;
2644
- }, "rectWithTitle"), ot = /* @__PURE__ */ s(async (e, t) => {
2645
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
2646
- return q(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) {
2647
- return G.rect(t, e);
2648
- }, n;
2649
- }, "stadium"), st = /* @__PURE__ */ s(async (e, t) => {
2650
- let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, Y(t, void 0), !0), a = n.insert("circle", ":first-child");
2651
- 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), c.info("Circle main"), q(t, a), t.intersect = function(e) {
2652
- return c.info("Circle intersect", t, r.width / 2 + i, e), G.circle(t, r.width / 2 + i, e);
2653
- }, n;
2654
- }, "circle"), ct = /* @__PURE__ */ s(async (e, t) => {
2655
- let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, Y(t, void 0), !0), a = n.insert("g", ":first-child"), o = a.insert("circle"), s = a.insert("circle");
2656
- 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), c.info("DoubleCircle main"), q(t, o), t.intersect = function(e) {
2657
- return c.info("DoubleCircle intersect", t, r.width / 2 + i + 5, e), G.circle(t, r.width / 2 + i + 5, e);
2765
+ let v = r.padding / 2;
2766
+ return e(_).attr("transform", "translate( " + (m.width > g.width ? 0 : (g.width - m.width) / 2) + ", " + (g.height + v + 5) + ")"), e(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) {
2767
+ return K.rect(r, e);
2768
+ }, o;
2769
+ }, "rectWithTitle"), Bt = /* @__PURE__ */ t(async (e, t) => {
2770
+ 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;
2771
+ 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) {
2772
+ return K.rect(t, e);
2658
2773
  }, n;
2659
- }, "doublecircle"), lt = /* @__PURE__ */ s(async (e, t) => {
2660
- let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2774
+ }, "stadium"), Vt = /* @__PURE__ */ t(async (e, t) => {
2775
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, X(t, void 0), !0), o = r.insert("circle", ":first-child");
2776
+ return o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), n.info("Circle main"), J(t, o), t.intersect = function(e) {
2777
+ return n.info("Circle intersect", t, i.width / 2 + a, e), K.circle(t, i.width / 2 + a, e);
2778
+ }, r;
2779
+ }, "circle"), Ht = /* @__PURE__ */ t(async (e, t) => {
2780
+ let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, X(t, void 0), !0), o = r.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
2781
+ return o.attr("class", t.class), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + a + 5).attr("width", i.width + t.padding + 10).attr("height", i.height + t.padding + 10), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), n.info("DoubleCircle main"), J(t, s), t.intersect = function(e) {
2782
+ return n.info("DoubleCircle intersect", t, i.width / 2 + a + 5, e), K.circle(t, i.width / 2 + a + 5, e);
2783
+ }, r;
2784
+ }, "doublecircle"), Ut = /* @__PURE__ */ t(async (e, t) => {
2785
+ 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 = [
2661
2786
  {
2662
2787
  x: 0,
2663
2788
  y: 0
@@ -2698,131 +2823,131 @@ var at = /* @__PURE__ */ s(async (t, n) => {
2698
2823
  x: -8,
2699
2824
  y: 0
2700
2825
  }
2701
- ], s = J(n, i, a, o);
2702
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2703
- return G.polygon(t, o, e);
2826
+ ], s = Y(n, i, a, o);
2827
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2828
+ return K.polygon(t, o, e);
2704
2829
  }, n;
2705
- }, "subroutine"), ut = /* @__PURE__ */ s((e, t) => {
2830
+ }, "subroutine"), Wt = /* @__PURE__ */ t((e, t) => {
2706
2831
  let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
2707
- return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), q(t, r), t.intersect = function(e) {
2708
- return G.circle(t, 7, e);
2832
+ return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), J(t, r), t.intersect = function(e) {
2833
+ return K.circle(t, 7, e);
2709
2834
  }, n;
2710
- }, "start"), dt = /* @__PURE__ */ s((e, t, n) => {
2835
+ }, "start"), Gt = /* @__PURE__ */ t((e, t, n) => {
2711
2836
  let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
2712
- return n === "LR" && (i = 10, a = 70), q(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) {
2713
- return G.rect(t, e);
2837
+ 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) {
2838
+ return K.rect(t, e);
2714
2839
  }, r;
2715
- }, "forkJoin"), ft = {
2716
- rhombus: Ge,
2717
- composite: rt,
2718
- question: Ge,
2719
- rect: nt,
2720
- labelRect: it,
2721
- rectWithTitle: at,
2722
- choice: Ke,
2723
- circle: st,
2724
- doublecircle: ct,
2725
- stadium: ot,
2726
- hexagon: qe,
2727
- block_arrow: Je,
2728
- rect_left_inv_arrow: Ye,
2729
- lean_right: Xe,
2730
- lean_left: Ze,
2731
- trapezoid: Qe,
2732
- inv_trapezoid: $e,
2733
- rect_right_inv_arrow: et,
2734
- cylinder: tt,
2735
- start: ut,
2736
- end: /* @__PURE__ */ s((e, t) => {
2840
+ }, "forkJoin"), Kt = {
2841
+ rhombus: Tt,
2842
+ composite: Lt,
2843
+ question: Tt,
2844
+ rect: It,
2845
+ labelRect: Rt,
2846
+ rectWithTitle: zt,
2847
+ choice: Et,
2848
+ circle: Vt,
2849
+ doublecircle: Ht,
2850
+ stadium: Bt,
2851
+ hexagon: Dt,
2852
+ block_arrow: Ot,
2853
+ rect_left_inv_arrow: kt,
2854
+ lean_right: At,
2855
+ lean_left: jt,
2856
+ trapezoid: Mt,
2857
+ inv_trapezoid: Nt,
2858
+ rect_right_inv_arrow: Pt,
2859
+ cylinder: Ft,
2860
+ start: Wt,
2861
+ end: /* @__PURE__ */ t((e, t) => {
2737
2862
  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");
2738
- 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), q(t, i), t.intersect = function(e) {
2739
- return G.circle(t, 7, e);
2863
+ 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) {
2864
+ return K.circle(t, 7, e);
2740
2865
  }, n;
2741
2866
  }, "end"),
2742
- note: Ue,
2743
- subroutine: lt,
2744
- fork: dt,
2745
- join: dt,
2746
- class_box: /* @__PURE__ */ s(async (t, n) => {
2747
- let r = n.padding / 2, i;
2748
- i = n.classes ? "node " + n.classes : "node default";
2749
- let a = t.insert("g").attr("class", i).attr("id", n.domId || n.id), o = a.insert("rect", ":first-child"), s = a.insert("line"), c = a.insert("line"), l = 0, u = 4, d = a.insert("g").attr("class", "label"), p = 0, m = n.classData.annotations?.[0], h = await B(d, n.classData.annotations[0] ? "«" + n.classData.annotations[0] + "»" : "", n.labelStyle, !0, !0), _ = h.getBBox();
2750
- if (g(f())) {
2751
- let t = h.children[0], n = e(h);
2867
+ note: Ct,
2868
+ subroutine: Ut,
2869
+ fork: Gt,
2870
+ join: Gt,
2871
+ class_box: /* @__PURE__ */ t(async (t, n) => {
2872
+ let r = n.padding / 2, a;
2873
+ a = n.classes ? "node " + n.classes : "node default";
2874
+ let o = t.insert("g").attr("class", a).attr("id", n.domId || n.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 = n.classData.annotations?.[0], g = await U(p, n.classData.annotations[0] ? "«" + n.classData.annotations[0] + "»" : "", n.labelStyle, !0, !0), _ = g.getBBox();
2875
+ if (i(u())) {
2876
+ let t = g.children[0], n = e(g);
2752
2877
  _ = t.getBoundingClientRect(), n.attr("width", _.width), n.attr("height", _.height);
2753
2878
  }
2754
- n.classData.annotations[0] && (u += _.height + 4, l += _.width);
2879
+ n.classData.annotations[0] && (f += _.height + 4, d += _.width);
2755
2880
  let v = n.classData.label;
2756
- n.classData.type !== void 0 && n.classData.type !== "" && (g(f()) ? v += "&lt;" + n.classData.type + "&gt;" : v += "<" + n.classData.type + ">");
2757
- let y = await B(d, v, n.labelStyle, !0, !0);
2881
+ n.classData.type !== void 0 && n.classData.type !== "" && (i(u()) ? v += "&lt;" + n.classData.type + "&gt;" : v += "<" + n.classData.type + ">");
2882
+ let y = await U(p, v, n.labelStyle, !0, !0);
2758
2883
  e(y).attr("class", "classTitle");
2759
2884
  let b = y.getBBox();
2760
- if (g(f())) {
2885
+ if (i(u())) {
2761
2886
  let t = y.children[0], n = e(y);
2762
2887
  b = t.getBoundingClientRect(), n.attr("width", b.width), n.attr("height", b.height);
2763
2888
  }
2764
- u += b.height + 4, b.width > l && (l = b.width);
2889
+ f += b.height + 4, b.width > d && (d = b.width);
2765
2890
  let x = [];
2766
2891
  n.classData.members.forEach(async (t) => {
2767
- let r = t.getDisplayDetails(), i = r.displayText;
2768
- g(f()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2769
- let a = await B(d, i, r.cssStyle ? r.cssStyle : n.labelStyle, !0, !0), o = a.getBBox();
2770
- if (g(f())) {
2771
- let t = a.children[0], n = e(a);
2772
- o = t.getBoundingClientRect(), n.attr("width", o.width), n.attr("height", o.height);
2892
+ let r = t.getDisplayDetails(), a = r.displayText;
2893
+ i(u()) && (a = a.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2894
+ let o = await U(p, a, r.cssStyle ? r.cssStyle : n.labelStyle, !0, !0), s = o.getBBox();
2895
+ if (i(u())) {
2896
+ let t = o.children[0], n = e(o);
2897
+ s = t.getBoundingClientRect(), n.attr("width", s.width), n.attr("height", s.height);
2773
2898
  }
2774
- o.width > l && (l = o.width), u += o.height + 4, x.push(a);
2775
- }), u += 8;
2899
+ s.width > d && (d = s.width), f += s.height + 4, x.push(o);
2900
+ }), f += 8;
2776
2901
  let S = [];
2777
2902
  if (n.classData.methods.forEach(async (t) => {
2778
- let r = t.getDisplayDetails(), i = r.displayText;
2779
- g(f()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2780
- let a = await B(d, i, r.cssStyle ? r.cssStyle : n.labelStyle, !0, !0), o = a.getBBox();
2781
- if (g(f())) {
2782
- let t = a.children[0], n = e(a);
2783
- o = t.getBoundingClientRect(), n.attr("width", o.width), n.attr("height", o.height);
2903
+ let r = t.getDisplayDetails(), a = r.displayText;
2904
+ i(u()) && (a = a.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2905
+ let o = await U(p, a, r.cssStyle ? r.cssStyle : n.labelStyle, !0, !0), s = o.getBBox();
2906
+ if (i(u())) {
2907
+ let t = o.children[0], n = e(o);
2908
+ s = t.getBoundingClientRect(), n.attr("width", s.width), n.attr("height", s.height);
2784
2909
  }
2785
- o.width > l && (l = o.width), u += o.height + 4, S.push(a);
2786
- }), u += 8, m) {
2787
- let t = (l - _.width) / 2;
2788
- e(h).attr("transform", "translate( " + (-1 * l / 2 + t) + ", " + -1 * u / 2 + ")"), p = _.height + 4;
2910
+ s.width > d && (d = s.width), f += s.height + 4, S.push(o);
2911
+ }), f += 8, h) {
2912
+ let t = (d - _.width) / 2;
2913
+ e(g).attr("transform", "translate( " + (-1 * d / 2 + t) + ", " + -1 * f / 2 + ")"), m = _.height + 4;
2789
2914
  }
2790
- let C = (l - b.width) / 2;
2791
- return e(y).attr("transform", "translate( " + (-1 * l / 2 + C) + ", " + (-1 * u / 2 + p) + ")"), p += b.height + 4, s.attr("class", "divider").attr("x1", -l / 2 - r).attr("x2", l / 2 + r).attr("y1", -u / 2 - r + 8 + p).attr("y2", -u / 2 - r + 8 + p), p += 8, x.forEach((t) => {
2792
- e(t).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p + 8 / 2) + ")");
2915
+ let C = (d - b.width) / 2;
2916
+ return e(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((t) => {
2917
+ e(t).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m + 8 / 2) + ")");
2793
2918
  let n = t?.getBBox();
2794
- p += (n?.height ?? 0) + 4;
2795
- }), p += 8, c.attr("class", "divider").attr("x1", -l / 2 - r).attr("x2", l / 2 + r).attr("y1", -u / 2 - r + 8 + p).attr("y2", -u / 2 - r + 8 + p), p += 8, S.forEach((t) => {
2796
- e(t).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p) + ")");
2919
+ m += (n?.height ?? 0) + 4;
2920
+ }), 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((t) => {
2921
+ e(t).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m) + ")");
2797
2922
  let n = t?.getBBox();
2798
- p += (n?.height ?? 0) + 4;
2799
- }), o.attr("style", n.style).attr("class", "outer title-state").attr("x", -l / 2 - r).attr("y", -(u / 2) - r).attr("width", l + n.padding).attr("height", u + n.padding), q(n, o), n.intersect = function(e) {
2800
- return G.rect(n, e);
2801
- }, a;
2923
+ m += (n?.height ?? 0) + 4;
2924
+ }), s.attr("style", n.style).attr("class", "outer title-state").attr("x", -d / 2 - r).attr("y", -(f / 2) - r).attr("width", d + n.padding).attr("height", f + n.padding), J(n, s), n.intersect = function(e) {
2925
+ return K.rect(n, e);
2926
+ }, o;
2802
2927
  }, "class_box")
2803
- }, Z = {}, pt = /* @__PURE__ */ s(async (e, t, n) => {
2928
+ }, Q = {}, qt = /* @__PURE__ */ t(async (e, t, n) => {
2804
2929
  let r, i;
2805
2930
  if (t.link) {
2806
2931
  let a;
2807
- f().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await ft[t.shape](r, t, n);
2808
- } else i = await ft[t.shape](e, t, n), r = i;
2809
- return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Z[t.id] = r, t.haveCallback && Z[t.id].attr("class", Z[t.id].attr("class") + " clickable"), r;
2810
- }, "insertNode"), mt = /* @__PURE__ */ s((e) => {
2811
- let t = Z[e.id];
2812
- c.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
2813
- let n = e.diff || 0;
2814
- 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;
2932
+ 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);
2933
+ } else i = await Kt[t.shape](e, t, n), r = i;
2934
+ 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;
2935
+ }, "insertNode"), Jt = /* @__PURE__ */ t((e) => {
2936
+ let t = Q[e.id];
2937
+ n.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
2938
+ let r = e.diff || 0;
2939
+ return e.clusterNode ? t.attr("transform", "translate(" + (e.x + r - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), r;
2815
2940
  }, "positionNode");
2816
- function Q(e, t, r = !1) {
2817
- let i = e, a = "default";
2818
- (i?.classes?.length || 0) > 0 && (a = (i?.classes ?? []).join(" ")), a += " flowchart-label";
2819
- let o = 0, s = "", c;
2820
- switch (i.type) {
2941
+ function Yt(e, t, n = !1) {
2942
+ let r = e, i = "default";
2943
+ (r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
2944
+ let a = 0, s = "", c;
2945
+ switch (r.type) {
2821
2946
  case "round":
2822
- o = 5, s = "rect";
2947
+ a = 5, s = "rect";
2823
2948
  break;
2824
2949
  case "composite":
2825
- o = 0, s = "composite", c = 0;
2950
+ a = 0, s = "composite", c = 0;
2826
2951
  break;
2827
2952
  case "square":
2828
2953
  s = "rect";
@@ -2877,65 +3002,67 @@ function Q(e, t, r = !1) {
2877
3002
  break;
2878
3003
  default: s = "rect";
2879
3004
  }
2880
- let l = n(i?.styles ?? []), u = i.label, d = i.size ?? {
3005
+ let l = re(r?.styles ?? []), u = r.label, d = r.size ?? {
2881
3006
  width: 0,
2882
3007
  height: 0,
2883
3008
  x: 0,
2884
3009
  y: 0
2885
- };
3010
+ }, f = t.getDiagramId();
2886
3011
  return {
2887
3012
  labelStyle: l.labelStyle,
2888
3013
  shape: s,
2889
3014
  labelText: u,
2890
- rx: o,
2891
- ry: o,
2892
- class: a,
3015
+ rx: a,
3016
+ ry: a,
3017
+ class: i,
2893
3018
  style: l.style,
2894
- id: i.id,
2895
- directions: i.directions,
3019
+ id: r.id,
3020
+ domId: f ? `${f}-${r.id}` : r.id,
3021
+ directions: r.directions,
2896
3022
  width: d.width,
2897
3023
  height: d.height,
2898
3024
  x: d.x,
2899
3025
  y: d.y,
2900
- positioned: r,
3026
+ positioned: n,
2901
3027
  intersect: void 0,
2902
- type: i.type,
2903
- padding: c ?? _()?.block?.padding ?? 0
3028
+ type: r.type,
3029
+ padding: c ?? o()?.block?.padding ?? 0,
3030
+ widthInColumns: r.widthInColumns ?? 1
2904
3031
  };
2905
3032
  }
2906
- s(Q, "getNodeFromBlock");
2907
- async function ht(e, t, n) {
2908
- let r = Q(t, n, !1);
3033
+ t(Yt, "getNodeFromBlock");
3034
+ async function Xt(e, t, n) {
3035
+ let r = Yt(t, n, !1);
2909
3036
  if (r.type === "group") return;
2910
- let i = await pt(e, r, { config: _() }), a = i.node().getBBox(), o = n.getBlock(r.id);
2911
- o.size = {
3037
+ let i = await qt(e, r, { config: o() }), a = i.node().getBBox(), s = n.getBlock(r.id);
3038
+ s.size = {
2912
3039
  width: a.width,
2913
3040
  height: a.height,
2914
3041
  x: 0,
2915
3042
  y: 0,
2916
3043
  node: i
2917
- }, n.setBlock(o), i.remove();
3044
+ }, n.setBlock(s), i.remove();
2918
3045
  }
2919
- s(ht, "calculateBlockSize");
2920
- async function gt(e, t, n) {
2921
- let r = Q(t, n, !0);
2922
- n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: _() }), t.intersect = r?.intersect, mt(r));
3046
+ t(Xt, "calculateBlockSize");
3047
+ async function Zt(e, t, n) {
3048
+ let r = Yt(t, n, !0);
3049
+ n.getBlock(r.id).type !== "space" && (await qt(e, r, { config: o() }), t.intersect = r?.intersect, Jt(r));
2923
3050
  }
2924
- s(gt, "insertBlockPositioned");
3051
+ t(Zt, "insertBlockPositioned");
2925
3052
  async function $(e, t, n, r) {
2926
3053
  for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
2927
3054
  }
2928
- s($, "performOperations");
2929
- async function _t(e, t, n) {
2930
- await $(e, t, n, ht);
3055
+ t($, "performOperations");
3056
+ async function Qt(e, t, n) {
3057
+ await $(e, t, n, Xt);
2931
3058
  }
2932
- s(_t, "calculateBlockSizes");
2933
- async function vt(e, t, n) {
2934
- await $(e, t, n, gt);
3059
+ t(Qt, "calculateBlockSizes");
3060
+ async function $t(e, t, n) {
3061
+ await $(e, t, n, Zt);
2935
3062
  }
2936
- s(vt, "insertBlocks");
2937
- async function yt(e, t, n, r, i) {
2938
- let a = new o({
3063
+ t($t, "insertBlocks");
3064
+ async function en(e, t, n, r, i) {
3065
+ let a = new me({
2939
3066
  multigraph: !0,
2940
3067
  compound: !0
2941
3068
  });
@@ -2967,26 +3094,27 @@ async function yt(e, t, n, r, i) {
2967
3094
  x: s.x,
2968
3095
  y: s.y
2969
3096
  }
2970
- ];
2971
- Ae(e, {
3097
+ ], 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`;
3098
+ lt(e, {
2972
3099
  v: n.start,
2973
3100
  w: n.end,
2974
- name: n.id
3101
+ name: l
2975
3102
  }, {
2976
3103
  ...n,
3104
+ id: l,
2977
3105
  arrowTypeEnd: n.arrowTypeEnd,
2978
3106
  arrowTypeStart: n.arrowTypeStart,
2979
3107
  points: c,
2980
- classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2981
- }, void 0, "block", a, i), n.label && (await Te(e, {
3108
+ classes: u
3109
+ }, void 0, "block", a, i), n.label && (await it(e, {
2982
3110
  ...n,
2983
3111
  label: n.label,
2984
3112
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2985
3113
  arrowTypeEnd: n.arrowTypeEnd,
2986
3114
  arrowTypeStart: n.arrowTypeStart,
2987
3115
  points: c,
2988
- classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2989
- }), Ee({
3116
+ classes: u
3117
+ }), at({
2990
3118
  ...n,
2991
3119
  x: c[1].x,
2992
3120
  y: c[1].y
@@ -2994,35 +3122,37 @@ async function yt(e, t, n, r, i) {
2994
3122
  }
2995
3123
  }
2996
3124
  }
2997
- s(yt, "insertEdges");
2998
- var bt = {
2999
- parser: D,
3000
- db: pe,
3125
+ t(en, "insertEdges");
3126
+ var tn = {
3127
+ parser: Ce,
3128
+ db: Ue,
3001
3129
  renderer: {
3002
- draw: /* @__PURE__ */ s(async function(t, n, r, i) {
3003
- let { securityLevel: a, block: o } = _(), s = i.db, l;
3004
- a === "sandbox" && (l = e("#i" + n));
3005
- let u = e(a === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = a === "sandbox" ? u.select(`[id="${n}"]`) : e(`[id="${n}"]`);
3006
- _e(d, [
3130
+ draw: /* @__PURE__ */ t(async function(t, r, i, a) {
3131
+ let { securityLevel: c, block: l } = o(), u = a.db;
3132
+ u.setDiagramId(r);
3133
+ let d;
3134
+ c === "sandbox" && (d = e("#i" + r));
3135
+ let f = e(c === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = c === "sandbox" ? f.select(`[id="${r}"]`) : e(`[id="${r}"]`);
3136
+ Je(p, [
3007
3137
  "point",
3008
3138
  "circle",
3009
3139
  "cross"
3010
- ], i.type, n);
3011
- let f = s.getBlocks(), m = s.getBlocksFlat(), h = s.getEdges(), g = d.insert("g").attr("class", "block");
3012
- await _t(g, f, s);
3013
- let v = xe(s);
3014
- if (await vt(g, f, s), await yt(g, h, m, s, n), v) {
3015
- let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), n = e.height + t + 10, r = e.width + 10, { useMaxWidth: i } = o;
3016
- p(d, n, r, !!i), c.debug("Here Bounds", v, e), d.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
3140
+ ], a.type, r);
3141
+ let m = u.getBlocks(), h = u.getBlocksFlat(), g = u.getEdges(), _ = p.insert("g").attr("class", "block");
3142
+ await Qt(_, m, u);
3143
+ let v = $e(u);
3144
+ if (await $t(_, m, u), await en(_, g, h, u, r), v) {
3145
+ let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), r = e.height + t + 10, i = e.width + 10, { useMaxWidth: a } = l;
3146
+ s(p, r, i, !!a), n.debug("Here Bounds", v, e), p.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
3017
3147
  }
3018
3148
  }, "draw"),
3019
- getClasses: /* @__PURE__ */ s(function(e, t) {
3149
+ getClasses: /* @__PURE__ */ t(function(e, t) {
3020
3150
  return t.db.getClasses();
3021
3151
  }, "getClasses")
3022
3152
  },
3023
- styles: me
3153
+ styles: Ge
3024
3154
  };
3025
3155
  //#endregion
3026
- export { bt as diagram };
3156
+ export { tn as diagram };
3027
3157
 
3028
- //# sourceMappingURL=blockDiagram-WCTKOSBZ-BH3jwWeU.js.map
3158
+ //# sourceMappingURL=blockDiagram-GPEHLZMM-DNLPMFXL.js.map