@antdv-next/x 1.0.2-beta.1 → 1.0.2-beta.2

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 (133) hide show
  1. package/dist/code-highlighter/CodeHighlighter.js +24 -7
  2. package/dist/index.umd.js +49 -8
  3. package/dist/package.js +1 -1
  4. package/dist/x-provider/context.d.ts +5 -1
  5. package/dist/x-provider/index.d.ts +47 -0
  6. package/dist/x-provider/index.js +25 -0
  7. package/{dist-browser/_basePickBy-Cy7KVmkk.js → es/_basePickBy-DPqob0cQ.js} +2 -2
  8. package/{dist-browser/_baseUniq-Ch3HuHeT.js → es/_baseUniq-AMhRdOMz.js} +2 -2
  9. package/es/antdv-next-x.esm.js +22171 -0
  10. package/es/architecture-PBZL5I3N-CBmkTWjb.js +3 -0
  11. package/{dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js → es/architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js} +84 -84
  12. package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-8iZwAKBK.js} +529 -529
  13. package/{dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js → es/c4Diagram-IC4MRINW-DrH9eRMR.js} +168 -168
  14. package/{dist-browser/channel-DoEe9DF9.js → es/channel-DIQFjdG3.js} +1 -1
  15. package/{dist-browser/chunk-4BX2VUAB-fLFD6XW0.js → es/chunk-4BX2VUAB-DUVpjbJi.js} +1 -1
  16. package/{dist-browser/chunk-55IACEB6-OtyKJzCH.js → es/chunk-55IACEB6-RlJ-J3tE.js} +1 -1
  17. package/{dist-browser/chunk-7E7YKBS2-C1dd36rm.js → es/chunk-7E7YKBS2-ChLFamzc.js} +1 -1
  18. package/{dist-browser/chunk-7R4GIKGN-DuTRhdsf.js → es/chunk-7R4GIKGN-B9vamSzt.js} +2 -2
  19. package/{dist-browser/chunk-C72U2L5F-ClmZGhFC.js → es/chunk-C72U2L5F-BV-rXau1.js} +1 -1
  20. package/{dist-browser/chunk-EGIJ26TM-Bar_u1MN.js → es/chunk-EGIJ26TM-GvsuORRL.js} +1 -1
  21. package/{dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js → es/chunk-FMBD7UC4-D6ZlqqMC.js} +1 -1
  22. package/{dist-browser/chunk-GEFDOKGD-P7WhyrTU.js → es/chunk-GEFDOKGD-DM6dsEsk.js} +251 -251
  23. package/{dist-browser/chunk-GLR3WWYH-BvazRgdo.js → es/chunk-GLR3WWYH-CqFdLic9.js} +16 -16
  24. package/{dist-browser/chunk-HHEYEP7N-rv5s5WD4.js → es/chunk-HHEYEP7N-FVfYw94p.js} +2 -2
  25. package/{dist-browser/chunk-JSJVCQXG-89HUGe9V.js → es/chunk-JSJVCQXG-Wr9uPcCh.js} +2 -2
  26. package/{dist-browser/chunk-KX2RTZJC-pMHnNRQg.js → es/chunk-KX2RTZJC-BGffjoxB.js} +2 -2
  27. package/{dist-browser/chunk-KYZI473N-DJmSs1gK.js → es/chunk-KYZI473N-Bit5smNE.js} +571 -571
  28. package/{dist-browser/chunk-L3YUKLVL-Ck54qytQ.js → es/chunk-L3YUKLVL-DBuHDpQ2.js} +1 -1
  29. package/{dist-browser/chunk-MX3YWQON-MkpK3uBD.js → es/chunk-MX3YWQON-Cbj2WwUZ.js} +1 -1
  30. package/{dist-browser/chunk-NQ4KR5QH-DGshodQv.js → es/chunk-NQ4KR5QH-FPQ-IHJN.js} +119 -119
  31. package/{dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js → es/chunk-O4XLMI2P-BCDk0ZIW.js} +237 -237
  32. package/{dist-browser/chunk-OZEHJAEY-DULNd43V.js → es/chunk-OZEHJAEY-BZ24IOgQ.js} +1 -1
  33. package/{dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js → es/chunk-PQ6SQG4A-DpwBx6Hx.js} +2 -2
  34. package/{dist-browser/chunk-PU5JKC2W-DkEFvrjH.js → es/chunk-PU5JKC2W-BNpJuXxn.js} +63 -63
  35. package/{dist-browser/chunk-QZHKN3VN-qww1plfw.js → es/chunk-QZHKN3VN-NEMwPryC.js} +1 -1
  36. package/{dist-browser/chunk-R5LLSJPH-BERXSDGJ.js → es/chunk-R5LLSJPH-g44vgerl.js} +1 -1
  37. package/{dist-browser/chunk-WL4C6EOR-C-d8WPS7.js → es/chunk-WL4C6EOR-B6l-Yy2t.js} +119 -119
  38. package/{dist-browser/chunk-XIRO2GV7-CFHofxVB.js → es/chunk-XIRO2GV7-CaFInIOW.js} +1 -1
  39. package/{dist-browser/chunk-XPW4576I-DgvoNZkW.js → es/chunk-XPW4576I-Cp1j6iTN.js} +1 -1
  40. package/{dist-browser/chunk-XZSTWKYB-k8_EXrSa.js → es/chunk-XZSTWKYB-CGk7ipHd.js} +5 -5
  41. package/{dist-browser/chunk-YBOYWFTD-BUW4AzEX.js → es/chunk-YBOYWFTD-dOTBpTYs.js} +7 -7
  42. package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +29 -0
  43. package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +29 -0
  44. package/{dist-browser/clone-BXDbKCDu.js → es/clone-DXVS0uSx.js} +1 -1
  45. package/{dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js → es/cose-bilkent-S5V4N54A-DlmXyn6m.js} +1 -1
  46. package/{dist-browser/css-Dh17kjFY.js → es/css-DyS1hwc1.js} +1 -1
  47. package/es/css-HrHT_VUz.js +2 -0
  48. package/{dist-browser/dagre-BJOzGlhW.js → es/dagre-B1qTL793.js} +6 -6
  49. package/es/dagre-KLK3FWXG-CEhXRLVR.js +294 -0
  50. package/{dist-browser/diagram-E7M64L7V-DxuJj8ZG.js → es/diagram-E7M64L7V-Dnd8N74o.js} +59 -59
  51. package/{dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js → es/diagram-IFDJBPK2-Dan7RsGr.js} +30 -30
  52. package/{dist-browser/diagram-P4PSJMXO--ChDmcya.js → es/diagram-P4PSJMXO-DwKJpttH.js} +31 -31
  53. package/{dist-browser/erDiagram-INFDFZHY-BA3m-v87.js → es/erDiagram-INFDFZHY-CGO6k23w.js} +127 -127
  54. package/{dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js → es/flowDiagram-PKNHOUZH-DFN1GsRx.js} +155 -155
  55. package/{dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js → es/ganttDiagram-A5KZAMGK-Cf5NxH1w.js} +599 -602
  56. package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +3 -0
  57. package/{dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → es/gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js} +175 -175
  58. package/{dist-browser/graphlib-C7ysKz4u.js → es/graphlib-DFxSohCv.js} +3 -3
  59. package/{dist-browser/html-BmZO1Eoo.js → es/html-C2-_98S6.js} +2 -2
  60. package/es/html-JbFqcNgP.js +2 -0
  61. package/es/info-3K5VOQVL-Dg3DCp4F.js +3 -0
  62. package/{dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js → es/infoDiagram-LFFYTUFH-WcApcdl5.js} +4 -4
  63. package/{dist-browser/isEmpty-2JxdWtc-.js → es/isEmpty-B1YrVV8B.js} +1 -1
  64. package/{dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js → es/ishikawaDiagram-PHBUUO56-DwK7J31a.js} +65 -65
  65. package/{dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js → es/journeyDiagram-4ABVD52K-CWuA57by.js} +4 -4
  66. package/{dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js → es/kanban-definition-K7BYSVSG-DBt3gYRQ.js} +10 -10
  67. package/{dist-browser/line-h2iCTGsE.js → es/line-zOBKZCP5.js} +1 -1
  68. package/{dist-browser/linear-Bv7XrZCH.js → es/linear-DttXWw4q.js} +1 -1
  69. package/{dist-browser/mermaid-parser.core-kTgpNO7M.js → es/mermaid-parser.core-CWNEdmZ_.js} +15 -15
  70. package/{dist-browser/mermaid.core-DRuUNxpC.js → es/mermaid.core-DPBXXViR.js} +206 -206
  71. package/{dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js → es/mindmap-definition-YRQLILUH-Bq2xqboX.js} +12 -12
  72. package/es/packet-RMMSAZCW-Dk7mKMJ4.js +3 -0
  73. package/es/pie-UPGHQEXC-CnM5YLNO.js +3 -0
  74. package/{dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js → es/pieDiagram-SKSYHLDU-D4iMzwzH.js} +24 -24
  75. package/{dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js → es/quadrantDiagram-337W2JSQ-DSbXC0z6.js} +3 -3
  76. package/es/radar-KQ55EAFF-BwfADDx8.js +3 -0
  77. package/{dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → es/requirementDiagram-Z7DCOOCP-D7eLn3fs.js} +58 -58
  78. package/{dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → es/sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js} +2 -2
  79. package/{dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js → es/sequenceDiagram-2WXFIKYE-CRFEBP8-.js} +388 -388
  80. package/{dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js → es/stateDiagram-RAJIS63D-CfO23QJX.js} +67 -67
  81. package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +27 -0
  82. package/{dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js → es/timeline-definition-YZTLITO2-DmpPrD-3.js} +2 -2
  83. package/es/treemap-KZPCXAKY-BWfn7JxQ.js +3 -0
  84. package/{dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js → es/vennDiagram-LZ73GAT5-B80Xr4jV.js} +104 -104
  85. package/{dist-browser/vue-BJ0ov2CZ.js → es/vue-DTiWrQBM.js} +3 -3
  86. package/{dist-browser/vue-html-D0gyDbfn.js → es/vue-html-BG3Xflut.js} +1 -1
  87. package/{dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js → es/xychartDiagram-JWTSCODW-DvQyPDr4.js} +98 -98
  88. package/package.json +13 -11
  89. package/dist/index.esm.js +0 -11377
  90. package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +0 -3
  91. package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
  92. package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
  93. package/dist-browser/css-D9vrnIUE.js +0 -2
  94. package/dist-browser/dagre-KLK3FWXG-CFC0naVr.js +0 -294
  95. package/dist-browser/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
  96. package/dist-browser/html-DnTYsv5k.js +0 -2
  97. package/dist-browser/index.es.js +0 -56150
  98. package/dist-browser/index.umd.js +0 -3281
  99. package/dist-browser/info-3K5VOQVL-CpUiQuel.js +0 -3
  100. package/dist-browser/packet-RMMSAZCW-UTFQ0FQx.js +0 -3
  101. package/dist-browser/pie-UPGHQEXC-CarAcBSi.js +0 -3
  102. package/dist-browser/radar-KQ55EAFF-NXK5PC9R.js +0 -3
  103. package/dist-browser/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +0 -27
  104. package/dist-browser/treemap-KZPCXAKY-Cj9QakFB.js +0 -3
  105. /package/{dist-browser → es}/Serializer-y_SfSPKv.js +0 -0
  106. /package/{dist-browser → es}/arc-caEkbRYF.js +0 -0
  107. /package/{dist-browser → es}/array-CWNufkl9.js +0 -0
  108. /package/{dist-browser → es}/bash-CXEwhtGQ.js +0 -0
  109. /package/{dist-browser → es}/chunk-WQLz0Won.js +0 -0
  110. /package/{dist-browser → es}/cytoscape.esm-BY3wHcbp.js +0 -0
  111. /package/{dist-browser → es}/defaultLocale-BaPFSbai.js +0 -0
  112. /package/{dist-browser → es}/diff-BSu5dsa2.js +0 -0
  113. /package/{dist-browser → es}/dist-DltyvPj3.js +0 -0
  114. /package/{dist-browser → es}/init-PAs0hR-b.js +0 -0
  115. /package/{dist-browser/isArrayLikeObject-y3HlYDaX.js → es/isArrayLikeObject-BEG9p74d.js} +0 -0
  116. /package/{dist-browser → es}/javascript-BXHK_bZ2.js +0 -0
  117. /package/{dist-browser → es}/javascript-NV_FQBab.js +0 -0
  118. /package/{dist-browser → es}/json-C8Y9C4Ne.js +0 -0
  119. /package/{dist-browser → es}/json-DZ_9-j3Q.js +0 -0
  120. /package/{dist-browser → es}/jsx-CxlNNvOI.js +0 -0
  121. /package/{dist-browser/katex-b-xdokOf.js → es/katex-OR8z_f6I.js} +0 -0
  122. /package/{dist-browser → es}/markdown-BKwT7HWz.js +0 -0
  123. /package/{dist-browser → es}/math-DPzKeDKn.js +0 -0
  124. /package/{dist-browser → es}/mermaid-C1RUu_Iw.js +0 -0
  125. /package/{dist-browser → es}/ordinal-D8PKtxfM.js +0 -0
  126. /package/{dist-browser → es}/path-DZ-6AyWK.js +0 -0
  127. /package/{dist-browser → es}/python-BQM8giqx.js +0 -0
  128. /package/{dist-browser → es}/rough.esm-C_hJ3ICT.js +0 -0
  129. /package/{dist-browser/src-BukXhifV.js → es/src-BH16DVv0.js} +0 -0
  130. /package/{dist-browser → es}/tsx-DIYEV_g7.js +0 -0
  131. /package/{dist-browser → es}/typescript-B6MWEsBH.js +0 -0
  132. /package/{dist-browser → es}/typescript-CR48gG1F.js +0 -0
  133. /package/{dist-browser → es}/yaml-Y0CqUPTQ.js +0 -0
@@ -1,20 +1,20 @@
1
- import { g as e, h as t, p as n } from "./src-BukXhifV.js";
2
- import { T as r, c as i, h as a, i as o } from "./chunk-GEFDOKGD-P7WhyrTU.js";
3
- import { t as s } from "./clone-BXDbKCDu.js";
4
- import { t as c } from "./graphlib-C7ysKz4u.js";
5
- import { D as l, L as u, a as d, b as f, c as p, nt as m, s as h, w as g, y as _ } from "./chunk-7R4GIKGN-DuTRhdsf.js";
6
- import { t as v } from "./channel-DoEe9DF9.js";
7
- import { t as y } from "./line-h2iCTGsE.js";
8
- import { n as b } from "./chunk-PU5JKC2W-DkEFvrjH.js";
9
- import { t as x } from "./chunk-FMBD7UC4-C_uJ_JJA.js";
10
- import { n as S, t as C } from "./chunk-MX3YWQON-MkpK3uBD.js";
11
- import { n as w, t as T } from "./chunk-YBOYWFTD-BUW4AzEX.js";
1
+ import { T as e, c as t, h as n, i as r } from "./chunk-GEFDOKGD-DM6dsEsk.js";
2
+ import { t as i } from "./clone-DXVS0uSx.js";
3
+ import { t as a } from "./graphlib-DFxSohCv.js";
4
+ import { g as o, h as s, p as c } from "./src-BH16DVv0.js";
5
+ import { D as l, L as u, a as d, b as f, c as p, nt as m, s as h, w as g, y as _ } from "./chunk-7R4GIKGN-B9vamSzt.js";
6
+ import { t as v } from "./channel-DIQFjdG3.js";
7
+ import { t as y } from "./line-zOBKZCP5.js";
8
+ import { n as b } from "./chunk-PU5JKC2W-BNpJuXxn.js";
9
+ import { t as x } from "./chunk-FMBD7UC4-D6ZlqqMC.js";
10
+ import { n as S, t as C } from "./chunk-MX3YWQON-Cbj2WwUZ.js";
11
+ import { n as w, t as T } from "./chunk-YBOYWFTD-dOTBpTYs.js";
12
12
  //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs
13
13
  var E = (function() {
14
- var e = /* @__PURE__ */ t(function(e, t, n, r) {
14
+ var e = /* @__PURE__ */ s(function(e, t, n, r) {
15
15
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
16
16
  return n;
17
- }, "o"), n = [1, 15], r = [1, 7], i = [1, 13], a = [1, 14], o = [1, 19], s = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
17
+ }, "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 = [
18
18
  8,
19
19
  10,
20
20
  21,
@@ -53,7 +53,7 @@ var E = (function() {
53
53
  43,
54
54
  46
55
55
  ], g = [1, 49], _ = {
56
- trace: /* @__PURE__ */ t(function() {}, "trace"),
56
+ trace: /* @__PURE__ */ s(function() {}, "trace"),
57
57
  yy: {},
58
58
  symbols_: {
59
59
  error: 2,
@@ -180,7 +180,7 @@ var E = (function() {
180
180
  [24, 3],
181
181
  [25, 3]
182
182
  ],
183
- performAction: /* @__PURE__ */ t(function(e, t, n, r, i, a, o) {
183
+ performAction: /* @__PURE__ */ s(function(e, t, n, r, i, a, o) {
184
184
  var s = a.length - 1;
185
185
  switch (i) {
186
186
  case 4:
@@ -363,21 +363,21 @@ var E = (function() {
363
363
  },
364
364
  { 1: [3] },
365
365
  {
366
- 10: n,
366
+ 10: t,
367
367
  11: 3,
368
368
  13: 4,
369
369
  19: 5,
370
370
  20: 6,
371
- 21: r,
371
+ 21: n,
372
372
  22: 8,
373
373
  23: 9,
374
374
  24: 10,
375
375
  25: 11,
376
376
  26: 12,
377
- 28: i,
378
- 29: a,
379
- 31: o,
380
- 39: s,
377
+ 28: r,
378
+ 29: i,
379
+ 31: a,
380
+ 39: o,
381
381
  43: c,
382
382
  46: l
383
383
  },
@@ -392,12 +392,12 @@ var E = (function() {
392
392
  25: 11,
393
393
  26: 12,
394
394
  11: 21,
395
- 10: n,
396
- 21: r,
397
- 28: i,
398
- 29: a,
399
- 31: o,
400
- 39: s,
395
+ 10: t,
396
+ 21: n,
397
+ 28: r,
398
+ 29: i,
399
+ 31: a,
400
+ 39: o,
401
401
  43: c,
402
402
  46: l
403
403
  }),
@@ -417,24 +417,24 @@ var E = (function() {
417
417
  {
418
418
  19: 26,
419
419
  26: 12,
420
- 31: o
420
+ 31: a
421
421
  },
422
422
  {
423
- 10: n,
423
+ 10: t,
424
424
  11: 27,
425
425
  13: 4,
426
426
  19: 5,
427
427
  20: 6,
428
- 21: r,
428
+ 21: n,
429
429
  22: 8,
430
430
  23: 9,
431
431
  24: 10,
432
432
  25: 11,
433
433
  26: 12,
434
- 28: i,
435
- 29: a,
436
- 31: o,
437
- 39: s,
434
+ 28: r,
435
+ 29: i,
436
+ 31: a,
437
+ 39: o,
438
438
  43: c,
439
439
  46: l
440
440
  },
@@ -453,13 +453,13 @@ var E = (function() {
453
453
  e(u, [2, 13]),
454
454
  {
455
455
  26: 35,
456
- 31: o
456
+ 31: a
457
457
  },
458
458
  { 31: [2, 14] },
459
459
  { 17: [1, 36] },
460
460
  e(m, [2, 24]),
461
461
  {
462
- 10: n,
462
+ 10: t,
463
463
  11: 37,
464
464
  13: 4,
465
465
  14: 22,
@@ -467,16 +467,16 @@ var E = (function() {
467
467
  16: p,
468
468
  19: 5,
469
469
  20: 6,
470
- 21: r,
470
+ 21: n,
471
471
  22: 8,
472
472
  23: 9,
473
473
  24: 10,
474
474
  25: 11,
475
475
  26: 12,
476
- 28: i,
477
- 29: a,
478
- 31: o,
479
- 39: s,
476
+ 28: r,
477
+ 29: i,
478
+ 31: a,
479
+ 39: o,
480
480
  43: c,
481
481
  46: l
482
482
  },
@@ -520,34 +520,34 @@ var E = (function() {
520
520
  50: [2, 15],
521
521
  52: [2, 32]
522
522
  },
523
- parseError: /* @__PURE__ */ t(function(e, t) {
523
+ parseError: /* @__PURE__ */ s(function(e, t) {
524
524
  if (t.recoverable) this.trace(e);
525
525
  else {
526
526
  var n = Error(e);
527
527
  throw n.hash = t, n;
528
528
  }
529
529
  }, "parseError"),
530
- parse: /* @__PURE__ */ t(function(e) {
531
- 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: {} };
530
+ parse: /* @__PURE__ */ s(function(e) {
531
+ 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: {} };
532
532
  for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
533
533
  h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
534
534
  var v = h.yylloc;
535
- o.push(v);
535
+ a.push(v);
536
536
  var y = h.options && h.options.ranges;
537
537
  typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
538
538
  function b(e) {
539
- r.length -= 2 * e, a.length -= e, o.length -= e;
539
+ n.length -= 2 * e, i.length -= e, a.length -= e;
540
540
  }
541
- t(b, "popStack");
541
+ s(b, "popStack");
542
542
  function x() {
543
- var e = i.pop() || h.lex() || p;
544
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
543
+ var e = r.pop() || h.lex() || p;
544
+ return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
545
545
  }
546
- t(x, "lex");
546
+ s(x, "lex");
547
547
  for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
548
- 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]) {
548
+ if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = o[w] && o[w][S]), T === void 0 || !T.length || !T[0]) {
549
549
  var M = "";
550
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
550
+ for (O in j = [], o[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
551
551
  M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
552
552
  text: h.match,
553
553
  token: this.terminals_[S] || S,
@@ -559,24 +559,24 @@ var E = (function() {
559
559
  if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
560
560
  switch (T[0]) {
561
561
  case 1:
562
- 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--);
562
+ 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--);
563
563
  break;
564
564
  case 2:
565
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
566
- first_line: o[o.length - (k || 1)].first_line,
567
- last_line: o[o.length - 1].last_line,
568
- first_column: o[o.length - (k || 1)].first_column,
569
- last_column: o[o.length - 1].last_column
570
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
565
+ if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
566
+ first_line: a[a.length - (k || 1)].first_line,
567
+ last_line: a[a.length - 1].last_line,
568
+ first_column: a[a.length - (k || 1)].first_column,
569
+ last_column: a[a.length - 1].last_column
570
+ }, y && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
571
571
  c,
572
572
  u,
573
573
  l,
574
574
  g.yy,
575
575
  T[1],
576
- a,
577
- o
576
+ i,
577
+ a
578
578
  ].concat(m)), E !== void 0) return E;
579
- 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);
579
+ k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), a = a.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), a.push(D._$), A = o[n[n.length - 2]][n[n.length - 1]], n.push(A);
580
580
  break;
581
581
  case 3: return !0;
582
582
  }
@@ -587,11 +587,11 @@ var E = (function() {
587
587
  _.lexer = /* @__PURE__ */ (function() {
588
588
  return {
589
589
  EOF: 1,
590
- parseError: /* @__PURE__ */ t(function(e, t) {
590
+ parseError: /* @__PURE__ */ s(function(e, t) {
591
591
  if (this.yy.parser) this.yy.parser.parseError(e, t);
592
592
  else throw Error(e);
593
593
  }, "parseError"),
594
- setInput: /* @__PURE__ */ t(function(e, t) {
594
+ setInput: /* @__PURE__ */ s(function(e, t) {
595
595
  return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
596
596
  first_line: 1,
597
597
  first_column: 0,
@@ -599,11 +599,11 @@ var E = (function() {
599
599
  last_column: 0
600
600
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
601
601
  }, "setInput"),
602
- input: /* @__PURE__ */ t(function() {
602
+ input: /* @__PURE__ */ s(function() {
603
603
  var e = this._input[0];
604
604
  return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
605
605
  }, "input"),
606
- unput: /* @__PURE__ */ t(function(e) {
606
+ unput: /* @__PURE__ */ s(function(e) {
607
607
  var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
608
608
  this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
609
609
  var r = this.match.split(/(?:\r\n?|\n)/g);
@@ -616,10 +616,10 @@ var E = (function() {
616
616
  last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
617
617
  }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
618
618
  }, "unput"),
619
- more: /* @__PURE__ */ t(function() {
619
+ more: /* @__PURE__ */ s(function() {
620
620
  return this._more = !0, this;
621
621
  }, "more"),
622
- reject: /* @__PURE__ */ t(function() {
622
+ reject: /* @__PURE__ */ s(function() {
623
623
  if (this.options.backtrack_lexer) this._backtrack = !0;
624
624
  else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
625
625
  text: "",
@@ -628,22 +628,22 @@ var E = (function() {
628
628
  });
629
629
  return this;
630
630
  }, "reject"),
631
- less: /* @__PURE__ */ t(function(e) {
631
+ less: /* @__PURE__ */ s(function(e) {
632
632
  this.unput(this.match.slice(e));
633
633
  }, "less"),
634
- pastInput: /* @__PURE__ */ t(function() {
634
+ pastInput: /* @__PURE__ */ s(function() {
635
635
  var e = this.matched.substr(0, this.matched.length - this.match.length);
636
636
  return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
637
637
  }, "pastInput"),
638
- upcomingInput: /* @__PURE__ */ t(function() {
638
+ upcomingInput: /* @__PURE__ */ s(function() {
639
639
  var e = this.match;
640
640
  return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
641
641
  }, "upcomingInput"),
642
- showPosition: /* @__PURE__ */ t(function() {
642
+ showPosition: /* @__PURE__ */ s(function() {
643
643
  var e = this.pastInput(), t = Array(e.length + 1).join("-");
644
644
  return e + this.upcomingInput() + "\n" + t + "^";
645
645
  }, "showPosition"),
646
- test_match: /* @__PURE__ */ t(function(e, t) {
646
+ test_match: /* @__PURE__ */ s(function(e, t) {
647
647
  var n, r, i;
648
648
  if (this.options.backtrack_lexer && (i = {
649
649
  yylineno: this.yylineno,
@@ -676,7 +676,7 @@ var E = (function() {
676
676
  }
677
677
  return !1;
678
678
  }, "test_match"),
679
- next: /* @__PURE__ */ t(function() {
679
+ next: /* @__PURE__ */ s(function() {
680
680
  if (this.done) return this.EOF;
681
681
  this._input || (this.done = !0);
682
682
  var e, t, n, r;
@@ -696,29 +696,29 @@ var E = (function() {
696
696
  line: this.yylineno
697
697
  });
698
698
  }, "next"),
699
- lex: /* @__PURE__ */ t(function() {
699
+ lex: /* @__PURE__ */ s(function() {
700
700
  return this.next() || this.lex();
701
701
  }, "lex"),
702
- begin: /* @__PURE__ */ t(function(e) {
702
+ begin: /* @__PURE__ */ s(function(e) {
703
703
  this.conditionStack.push(e);
704
704
  }, "begin"),
705
- popState: /* @__PURE__ */ t(function() {
705
+ popState: /* @__PURE__ */ s(function() {
706
706
  return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
707
707
  }, "popState"),
708
- _currentRules: /* @__PURE__ */ t(function() {
708
+ _currentRules: /* @__PURE__ */ s(function() {
709
709
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
710
710
  }, "_currentRules"),
711
- topState: /* @__PURE__ */ t(function(e) {
711
+ topState: /* @__PURE__ */ s(function(e) {
712
712
  return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
713
713
  }, "topState"),
714
- pushState: /* @__PURE__ */ t(function(e) {
714
+ pushState: /* @__PURE__ */ s(function(e) {
715
715
  this.begin(e);
716
716
  }, "pushState"),
717
- stateStackSize: /* @__PURE__ */ t(function() {
717
+ stateStackSize: /* @__PURE__ */ s(function() {
718
718
  return this.conditionStack.length;
719
719
  }, "stateStackSize"),
720
720
  options: {},
721
- performAction: /* @__PURE__ */ t(function(e, t, n, r) {
721
+ performAction: /* @__PURE__ */ s(function(e, t, n, r) {
722
722
  switch (n) {
723
723
  case 0: return e.getLogger().debug("Found block-beta"), 10;
724
724
  case 1: return e.getLogger().debug("Found id-block"), 29;
@@ -1142,10 +1142,10 @@ var E = (function() {
1142
1142
  function v() {
1143
1143
  this.yy = {};
1144
1144
  }
1145
- return t(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1145
+ return s(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1146
1146
  })();
1147
1147
  E.parser = E;
1148
- var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = f(), N = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ t((e) => h.sanitizeText(e, ne), "sanitizeText"), ie = /* @__PURE__ */ t(function(e, t = "") {
1148
+ 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) => h.sanitizeText(e, ne), "sanitizeText"), ie = /* @__PURE__ */ s(function(e, t = "") {
1149
1149
  let n = N.get(e);
1150
1150
  n || (n = {
1151
1151
  id: e,
@@ -1159,10 +1159,10 @@ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(),
1159
1159
  }
1160
1160
  n.styles.push(t);
1161
1161
  });
1162
- }, "addStyleClass"), ae = /* @__PURE__ */ t(function(e, t = "") {
1162
+ }, "addStyleClass"), ae = /* @__PURE__ */ s(function(e, t = "") {
1163
1163
  let n = O.get(e);
1164
1164
  t != null && (n.styles = t.split(te));
1165
- }, "addStyle2Node"), oe = /* @__PURE__ */ t(function(e, t) {
1165
+ }, "addStyle2Node"), oe = /* @__PURE__ */ s(function(e, t) {
1166
1166
  e.split(",").forEach(function(e) {
1167
1167
  let n = O.get(e);
1168
1168
  if (n === void 0) {
@@ -1175,55 +1175,55 @@ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(),
1175
1175
  }
1176
1176
  n.classes ||= [], n.classes.push(t);
1177
1177
  });
1178
- }, "setCssClass"), se = /* @__PURE__ */ t((t, n) => {
1179
- let r = t.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1180
- for (let t of r) {
1181
- if (typeof a == "number" && a > 0 && t.type !== "column-setting" && typeof t.widthInColumns == "number" && t.widthInColumns > a && e.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${a}`), t.label &&= re(t.label), t.type === "classDef") {
1182
- ie(t.id, t.css);
1178
+ }, "setCssClass"), se = /* @__PURE__ */ s((e, t) => {
1179
+ let n = e.flat(), r = [], a = n.find((e) => e?.type === "column-setting")?.columns ?? -1;
1180
+ for (let e of n) {
1181
+ if (typeof a == "number" && a > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > a && o.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`), e.label &&= re(e.label), e.type === "classDef") {
1182
+ ie(e.id, e.css);
1183
1183
  continue;
1184
1184
  }
1185
- if (t.type === "applyClass") {
1186
- oe(t.id, t?.styleClass ?? "");
1185
+ if (e.type === "applyClass") {
1186
+ oe(e.id, e?.styleClass ?? "");
1187
1187
  continue;
1188
1188
  }
1189
- if (t.type === "applyStyles") {
1190
- t?.stylesStr && ae(t.id, t?.stylesStr);
1189
+ if (e.type === "applyStyles") {
1190
+ e?.stylesStr && ae(e.id, e?.stylesStr);
1191
1191
  continue;
1192
1192
  }
1193
- if (t.type === "column-setting") n.columns = t.columns ?? -1;
1194
- else if (t.type === "edge") {
1195
- let e = (A.get(t.id) ?? 0) + 1;
1196
- A.set(t.id, e), t.id = e + "-" + t.id, k.push(t);
1193
+ if (e.type === "column-setting") t.columns = e.columns ?? -1;
1194
+ else if (e.type === "edge") {
1195
+ let t = (A.get(e.id) ?? 0) + 1;
1196
+ A.set(e.id, t), e.id = t + "-" + e.id, k.push(e);
1197
1197
  } else {
1198
- t.label || (t.type === "composite" ? t.label = "" : t.label = t.id);
1199
- let e = O.get(t.id);
1200
- if (e === void 0 ? O.set(t.id, t) : (t.type !== "na" && (e.type = t.type), t.label !== t.id && (e.label = t.label)), t.children && se(t.children, t), t.type === "space") {
1201
- let e = t.width ?? 1;
1202
- for (let n = 0; n < e; n++) {
1203
- let e = s(t);
1204
- e.id = e.id + "-" + n, O.set(e.id, e), i.push(e);
1198
+ e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
1199
+ let t = O.get(e.id);
1200
+ if (t === void 0 ? O.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && se(e.children, e), e.type === "space") {
1201
+ let t = e.width ?? 1;
1202
+ for (let n = 0; n < t; n++) {
1203
+ let t = i(e);
1204
+ t.id = t.id + "-" + n, O.set(t.id, t), r.push(t);
1205
1205
  }
1206
- } else e === void 0 && i.push(t);
1206
+ } else t === void 0 && r.push(e);
1207
1207
  }
1208
1208
  }
1209
- n.children = i;
1209
+ t.children = r;
1210
1210
  }, "populateBlockDatabase"), P = [], F = {
1211
1211
  id: "root",
1212
1212
  type: "composite",
1213
1213
  children: [],
1214
1214
  columns: -1
1215
- }, ce = /* @__PURE__ */ t(() => {
1216
- e.debug("Clear called"), d(), F = {
1215
+ }, ce = /* @__PURE__ */ s(() => {
1216
+ o.debug("Clear called"), d(), F = {
1217
1217
  id: "root",
1218
1218
  type: "composite",
1219
1219
  children: [],
1220
1220
  columns: -1
1221
1221
  }, O = /* @__PURE__ */ new Map([["root", F]]), P = [], N = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map();
1222
1222
  }, "clear");
1223
- function le(t) {
1224
- switch (e.debug("typeStr2Type", t), t) {
1223
+ function le(e) {
1224
+ switch (o.debug("typeStr2Type", e), e) {
1225
1225
  case "[]": return "square";
1226
- case "()": return e.debug("we have a round"), "round";
1226
+ case "()": return o.debug("we have a round"), "round";
1227
1227
  case "(())": return "circle";
1228
1228
  case ">]": return "rect_left_inv_arrow";
1229
1229
  case "{}": return "diamond";
@@ -1240,14 +1240,14 @@ function le(t) {
1240
1240
  default: return "na";
1241
1241
  }
1242
1242
  }
1243
- t(le, "typeStr2Type");
1244
- function ue(t) {
1245
- switch (e.debug("typeStr2Type", t), t) {
1243
+ s(le, "typeStr2Type");
1244
+ function ue(e) {
1245
+ switch (o.debug("typeStr2Type", e), e) {
1246
1246
  case "==": return "thick";
1247
1247
  default: return "normal";
1248
1248
  }
1249
1249
  }
1250
- t(ue, "edgeTypeStr2Type");
1250
+ s(ue, "edgeTypeStr2Type");
1251
1251
  function de(e) {
1252
1252
  switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
1253
1253
  case "x": return "arrow_cross";
@@ -1256,36 +1256,36 @@ function de(e) {
1256
1256
  default: return "";
1257
1257
  }
1258
1258
  }
1259
- t(de, "edgeStrToEdgeData");
1259
+ s(de, "edgeStrToEdgeData");
1260
1260
  var fe = 0, pe = {
1261
- getConfig: /* @__PURE__ */ t(() => _().block, "getConfig"),
1261
+ getConfig: /* @__PURE__ */ s(() => _().block, "getConfig"),
1262
1262
  typeStr2Type: le,
1263
1263
  edgeTypeStr2Type: ue,
1264
1264
  edgeStrToEdgeData: de,
1265
- getLogger: /* @__PURE__ */ t(() => e, "getLogger"),
1266
- getBlocksFlat: /* @__PURE__ */ t(() => [...O.values()], "getBlocksFlat"),
1267
- getBlocks: /* @__PURE__ */ t(() => P || [], "getBlocks"),
1268
- getEdges: /* @__PURE__ */ t(() => k, "getEdges"),
1269
- setHierarchy: /* @__PURE__ */ t((e) => {
1265
+ getLogger: /* @__PURE__ */ s(() => o, "getLogger"),
1266
+ getBlocksFlat: /* @__PURE__ */ s(() => [...O.values()], "getBlocksFlat"),
1267
+ getBlocks: /* @__PURE__ */ s(() => P || [], "getBlocks"),
1268
+ getEdges: /* @__PURE__ */ s(() => k, "getEdges"),
1269
+ setHierarchy: /* @__PURE__ */ s((e) => {
1270
1270
  F.children = e, se(e, F), P = F.children;
1271
1271
  }, "setHierarchy"),
1272
- getBlock: /* @__PURE__ */ t((e) => O.get(e), "getBlock"),
1273
- setBlock: /* @__PURE__ */ t((e) => {
1272
+ getBlock: /* @__PURE__ */ s((e) => O.get(e), "getBlock"),
1273
+ setBlock: /* @__PURE__ */ s((e) => {
1274
1274
  O.set(e.id, e);
1275
1275
  }, "setBlock"),
1276
- getColumns: /* @__PURE__ */ t((e) => {
1276
+ getColumns: /* @__PURE__ */ s((e) => {
1277
1277
  let t = O.get(e);
1278
1278
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1279
1279
  }, "getColumns"),
1280
- getClasses: /* @__PURE__ */ t(function() {
1280
+ getClasses: /* @__PURE__ */ s(function() {
1281
1281
  return N;
1282
1282
  }, "getClasses"),
1283
1283
  clear: ce,
1284
- generateId: /* @__PURE__ */ t(() => (fe++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + fe), "generateId")
1285
- }, I = /* @__PURE__ */ t((e, t) => {
1284
+ generateId: /* @__PURE__ */ s(() => (fe++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + fe), "generateId")
1285
+ }, I = /* @__PURE__ */ s((e, t) => {
1286
1286
  let n = v;
1287
1287
  return m(n(e, "r"), n(e, "g"), n(e, "b"), t);
1288
- }, "fade"), me = /* @__PURE__ */ t((e) => `.label {
1288
+ }, "fade"), me = /* @__PURE__ */ s((e) => `.label {
1289
1289
  font-family: ${e.fontFamily};
1290
1290
  color: ${e.nodeTextColor || e.textColor};
1291
1291
  }
@@ -1408,36 +1408,36 @@ var fe = 0, pe = {
1408
1408
  fill: ${e.textColor};
1409
1409
  }
1410
1410
  ${x()}
1411
- `, "getStyles"), he = /* @__PURE__ */ t((e, t, n, r) => {
1411
+ `, "getStyles"), he = /* @__PURE__ */ s((e, t, n, r) => {
1412
1412
  t.forEach((t) => {
1413
1413
  ge[t](e, n, r);
1414
1414
  });
1415
1415
  }, "insertMarkers"), ge = {
1416
- extension: /* @__PURE__ */ t((t, n, r) => {
1417
- e.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionStart").attr("class", "marker extension " + n).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionEnd").attr("class", "marker extension " + n).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
1416
+ extension: /* @__PURE__ */ s((e, t, n) => {
1417
+ o.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");
1418
1418
  }, "extension"),
1419
- composition: /* @__PURE__ */ t((e, t, n) => {
1419
+ composition: /* @__PURE__ */ s((e, t, n) => {
1420
1420
  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");
1421
1421
  }, "composition"),
1422
- aggregation: /* @__PURE__ */ t((e, t, n) => {
1422
+ aggregation: /* @__PURE__ */ s((e, t, n) => {
1423
1423
  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");
1424
1424
  }, "aggregation"),
1425
- dependency: /* @__PURE__ */ t((e, t, n) => {
1425
+ dependency: /* @__PURE__ */ s((e, t, n) => {
1426
1426
  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");
1427
1427
  }, "dependency"),
1428
- lollipop: /* @__PURE__ */ t((e, t, n) => {
1428
+ lollipop: /* @__PURE__ */ s((e, t, n) => {
1429
1429
  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);
1430
1430
  }, "lollipop"),
1431
- point: /* @__PURE__ */ t((e, t, n) => {
1431
+ point: /* @__PURE__ */ s((e, t, n) => {
1432
1432
  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");
1433
1433
  }, "point"),
1434
- circle: /* @__PURE__ */ t((e, t, n) => {
1434
+ circle: /* @__PURE__ */ s((e, t, n) => {
1435
1435
  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");
1436
1436
  }, "circle"),
1437
- cross: /* @__PURE__ */ t((e, t, n) => {
1437
+ cross: /* @__PURE__ */ s((e, t, n) => {
1438
1438
  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");
1439
1439
  }, "cross"),
1440
- barb: /* @__PURE__ */ t((e, t, n) => {
1440
+ barb: /* @__PURE__ */ s((e, t, n) => {
1441
1441
  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");
1442
1442
  }, "barb")
1443
1443
  }, _e = he, L = f()?.block?.padding ?? 8;
@@ -1455,110 +1455,110 @@ function R(e, t) {
1455
1455
  py: Math.floor(t / e)
1456
1456
  };
1457
1457
  }
1458
- t(R, "calculateBlockPosition");
1459
- var ve = /* @__PURE__ */ t((t) => {
1460
- let n = 0, r = 0;
1461
- for (let i of t.children) {
1462
- let { width: t, height: a, x: o, y: s } = i.size ?? {
1458
+ s(R, "calculateBlockPosition");
1459
+ var ve = /* @__PURE__ */ s((e) => {
1460
+ let t = 0, n = 0;
1461
+ for (let r of e.children) {
1462
+ let { width: e, height: i, x: a, y: s } = r.size ?? {
1463
1463
  width: 0,
1464
1464
  height: 0,
1465
1465
  x: 0,
1466
1466
  y: 0
1467
1467
  };
1468
- e.debug("getMaxChildSize abc95 child:", i.id, "width:", t, "height:", a, "x:", o, "y:", s, i.type), i.type !== "space" && (t > n && (n = t / (i.widthInColumns ?? 1)), a > r && (r = a));
1468
+ o.debug("getMaxChildSize abc95 child:", r.id, "width:", e, "height:", i, "x:", a, "y:", s, r.type), r.type !== "space" && (e > t && (t = e / (r.widthInColumns ?? 1)), i > n && (n = i));
1469
1469
  }
1470
1470
  return {
1471
- width: n,
1472
- height: r
1471
+ width: t,
1472
+ height: n
1473
1473
  };
1474
1474
  }, "getMaxChildSize");
1475
- function z(t, n, r = 0, i = 0) {
1476
- e.debug("setBlockSizes abc95 (start)", t.id, t?.size?.x, "block width =", t?.size, "siblingWidth", r), t?.size?.width || (t.size = {
1477
- width: r,
1478
- height: i,
1475
+ function z(e, t, n = 0, r = 0) {
1476
+ o.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", n), e?.size?.width || (e.size = {
1477
+ width: n,
1478
+ height: r,
1479
1479
  x: 0,
1480
1480
  y: 0
1481
1481
  });
1482
- let a = 0, o = 0;
1483
- if (t.children?.length > 0) {
1484
- for (let e of t.children) z(e, n);
1485
- let s = ve(t);
1486
- a = s.width, o = s.height, e.debug("setBlockSizes abc95 maxWidth of", t.id, ":s children is ", a, o);
1487
- for (let n of t.children) n.size && (e.debug(`abc95 Setting size of children of ${t.id} id=${n.id} ${a} ${o} ${JSON.stringify(n.size)}`), n.size.width = a * (n.widthInColumns ?? 1) + L * ((n.widthInColumns ?? 1) - 1), n.size.height = o, n.size.x = 0, n.size.y = 0, e.debug(`abc95 updating size of ${t.id} children child:${n.id} maxWidth:${a} maxHeight:${o}`));
1488
- for (let e of t.children) z(e, n, a, o);
1489
- let c = t.columns ?? -1, l = 0;
1490
- for (let e of t.children) l += e.widthInColumns ?? 1;
1491
- let u = t.children.length;
1482
+ let i = 0, a = 0;
1483
+ if (e.children?.length > 0) {
1484
+ for (let n of e.children) z(n, t);
1485
+ let s = ve(e);
1486
+ i = s.width, a = s.height, o.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
1487
+ for (let t of e.children) t.size && (o.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, o.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${i} maxHeight:${a}`));
1488
+ for (let n of e.children) z(n, t, i, a);
1489
+ let c = e.columns ?? -1, l = 0;
1490
+ for (let t of e.children) l += t.widthInColumns ?? 1;
1491
+ let u = e.children.length;
1492
1492
  c > 0 && c < l && (u = c);
1493
- let d = Math.ceil(l / u), f = u * (a + L) + L, p = d * (o + L) + L;
1494
- if (f < r) {
1495
- e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${f}`), f = r, p = i;
1496
- let n = (r - u * L - L) / u, s = (i - d * L - L) / d;
1497
- e.debug("Size indata abc88", t.id, "childWidth", n, "maxWidth", a), e.debug("Size indata abc88", t.id, "childHeight", s, "maxHeight", o), e.debug("Size indata abc88 xSize", u, "padding", L);
1498
- for (let e of t.children) e.size && (e.size.width = n, e.size.height = s, e.size.x = 0, e.size.y = 0);
1493
+ let d = Math.ceil(l / u), f = u * (i + L) + L, p = d * (a + L) + L;
1494
+ if (f < n) {
1495
+ o.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`), f = n, p = r;
1496
+ let t = (n - u * L - L) / u, s = (r - d * L - L) / d;
1497
+ o.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", i), o.debug("Size indata abc88", e.id, "childHeight", s, "maxHeight", a), o.debug("Size indata abc88 xSize", u, "padding", L);
1498
+ for (let n of e.children) n.size && (n.size.width = t, n.size.height = s, n.size.x = 0, n.size.y = 0);
1499
1499
  }
1500
- if (e.debug(`abc95 (finale calc) ${t.id} xSize ${u} ySize ${d} columns ${c}${t.children.length} width=${Math.max(f, t.size?.width || 0)}`), f < (t?.size?.width || 0)) {
1501
- f = t?.size?.width || 0;
1502
- let n = c > 0 ? Math.min(t.children.length, c) : t.children.length;
1503
- if (n > 0) {
1504
- let r = (f - n * L - L) / n;
1505
- e.debug("abc95 (growing to fit) width", t.id, f, t.size?.width, r);
1506
- for (let e of t.children) e.size && (e.size.width = r);
1500
+ if (o.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)) {
1501
+ f = e?.size?.width || 0;
1502
+ let t = c > 0 ? Math.min(e.children.length, c) : e.children.length;
1503
+ if (t > 0) {
1504
+ let n = (f - t * L - L) / t;
1505
+ o.debug("abc95 (growing to fit) width", e.id, f, e.size?.width, n);
1506
+ for (let t of e.children) t.size && (t.size.width = n);
1507
1507
  }
1508
1508
  }
1509
- t.size = {
1509
+ e.size = {
1510
1510
  width: f,
1511
1511
  height: p,
1512
1512
  x: 0,
1513
1513
  y: 0
1514
1514
  };
1515
1515
  }
1516
- e.debug("setBlockSizes abc94 (done)", t.id, t?.size?.x, t?.size?.width, t?.size?.y, t?.size?.height);
1516
+ o.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
1517
1517
  }
1518
- t(z, "setBlockSizes");
1519
- function ye(t, n) {
1520
- e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1521
- let r = t.columns ?? -1;
1522
- if (e.debug("layoutBlocks columns abc95", t.id, "=>", r, t), t.children && t.children.length > 0) {
1523
- let i = t?.children[0]?.size?.width ?? 0, a = t.children.length * i + (t.children.length - 1) * L;
1524
- e.debug("widthOfChildren 88", a, "posX");
1525
- let o = /* @__PURE__ */ new Map();
1526
- {
1527
- let e = 0;
1528
- for (let n of t.children) {
1529
- if (!n.size) continue;
1530
- let { py: t } = R(r, e), i = o.get(t) ?? 0;
1531
- n.size.height > i && o.set(t, n.size.height);
1532
- let a = n?.widthInColumns ?? 1;
1533
- r > 0 && (a = Math.min(a, r - e % r)), e += a;
1518
+ s(z, "setBlockSizes");
1519
+ function ye(e, t) {
1520
+ o.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1521
+ let n = e.columns ?? -1;
1522
+ if (o.debug("layoutBlocks columns abc95", e.id, "=>", n, e), e.children && e.children.length > 0) {
1523
+ let r = e?.children[0]?.size?.width ?? 0, i = e.children.length * r + (e.children.length - 1) * L;
1524
+ o.debug("widthOfChildren 88", i, "posX");
1525
+ let a = /* @__PURE__ */ new Map();
1526
+ {
1527
+ let t = 0;
1528
+ for (let r of e.children) {
1529
+ if (!r.size) continue;
1530
+ let { py: e } = R(n, t), i = a.get(e) ?? 0;
1531
+ r.size.height > i && a.set(e, r.size.height);
1532
+ let o = r?.widthInColumns ?? 1;
1533
+ n > 0 && (o = Math.min(o, n - t % n)), t += o;
1534
1534
  }
1535
1535
  }
1536
1536
  let s = /* @__PURE__ */ new Map();
1537
1537
  {
1538
- let e = 0, t = [...o.keys()].sort((e, t) => e - t);
1539
- for (let n of t) s.set(n, e), e += (o.get(n) ?? 0) + L;
1538
+ let e = 0, t = [...a.keys()].sort((e, t) => e - t);
1539
+ for (let n of t) s.set(n, e), e += (a.get(n) ?? 0) + L;
1540
1540
  }
1541
1541
  let c = 0;
1542
- e.debug("abc91 block?.size?.x", t.id, t?.size?.x);
1543
- let l = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -L, u = 0;
1544
- for (let i of t.children) {
1545
- let a = t;
1546
- if (!i.size) continue;
1547
- let { width: d, height: f } = i.size, { px: p, py: m } = R(r, c);
1548
- if (m != u && (u = m, l = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -L, e.debug("New row in layout for block", t.id, " and child ", i.id, u)), e.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${c} (px, py) ${p},${m} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${d}${L}`), a.size) {
1549
- let t = d / 2;
1550
- i.size.x = l + L + t, e.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${l} new startingPosX${i.size.x} ${t} padding=${L} width=${d} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (i?.widthInColumns ?? 1) / 2}`), l = i.size.x + t;
1551
- let n = s.get(m) ?? 0, r = o.get(m) ?? f;
1552
- i.size.y = a.size.y - a.size.height / 2 + n + r / 2 + L, e.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${l}${L}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${d * (i?.widthInColumns ?? 1) / 2}`);
1542
+ o.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1543
+ let l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -L, u = 0;
1544
+ for (let r of e.children) {
1545
+ let i = e;
1546
+ if (!r.size) continue;
1547
+ let { width: d, height: f } = r.size, { px: p, py: m } = R(n, c);
1548
+ if (m != u && (u = m, l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -L, o.debug("New row in layout for block", e.id, " and child ", r.id, u)), o.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${c} (px, py) ${p},${m} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${d}${L}`), i.size) {
1549
+ let e = d / 2;
1550
+ r.size.x = l + L + e, o.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;
1551
+ let t = s.get(m) ?? 0, n = a.get(m) ?? f;
1552
+ r.size.y = i.size.y - i.size.height / 2 + t + n / 2 + L, o.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}`);
1553
1553
  }
1554
- i.children && ye(i, n);
1555
- let h = i?.widthInColumns ?? 1;
1556
- r > 0 && (h = Math.min(h, r - c % r)), c += h, e.debug("abc88 columnsPos", i, c);
1554
+ r.children && ye(r, t);
1555
+ let h = r?.widthInColumns ?? 1;
1556
+ n > 0 && (h = Math.min(h, n - c % n)), c += h, o.debug("abc88 columnsPos", r, c);
1557
1557
  }
1558
1558
  }
1559
- e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1559
+ o.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1560
1560
  }
1561
- t(ye, "layoutBlocks");
1561
+ s(ye, "layoutBlocks");
1562
1562
  function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1563
1563
  minX: 0,
1564
1564
  minY: 0,
@@ -1582,21 +1582,21 @@ function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1582
1582
  maxY: i
1583
1583
  };
1584
1584
  }
1585
- t(be, "findBounds");
1586
- function xe(t) {
1587
- let n = t.getBlock("root");
1588
- if (!n) return;
1589
- z(n, t, 0, 0), ye(n, t), e.debug("getBlocks", JSON.stringify(n, null, 2));
1590
- let { minX: r, minY: i, maxX: a, maxY: o } = be(n), s = o - i;
1585
+ s(be, "findBounds");
1586
+ function xe(e) {
1587
+ let t = e.getBlock("root");
1588
+ if (!t) return;
1589
+ z(t, e, 0, 0), ye(t, e), o.debug("getBlocks", JSON.stringify(t, null, 2));
1590
+ let { minX: n, minY: r, maxX: i, maxY: a } = be(t), s = a - r;
1591
1591
  return {
1592
- x: r,
1593
- y: i,
1594
- width: a - r,
1592
+ x: n,
1593
+ y: r,
1594
+ width: i - n,
1595
1595
  height: s
1596
1596
  };
1597
1597
  }
1598
- t(xe, "layout");
1599
- var B = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
1598
+ s(xe, "layout");
1599
+ var B = /* @__PURE__ */ s(async (e, t, n, r = !1, i = !1) => {
1600
1600
  let a = t || "";
1601
1601
  typeof a == "object" && (a = a[0]);
1602
1602
  let o = f(), s = g(o);
@@ -1608,7 +1608,7 @@ var B = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
1608
1608
  isNode: i,
1609
1609
  width: Infinity
1610
1610
  }, o);
1611
- }, "createLabel"), Se = /* @__PURE__ */ t((e, t, n, r, i) => {
1611
+ }, "createLabel"), Se = /* @__PURE__ */ s((e, t, n, r, i) => {
1612
1612
  t.arrowTypeStart && we(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && we(e, "end", t.arrowTypeEnd, n, r, i);
1613
1613
  }, "addEdgeMarkers"), Ce = {
1614
1614
  arrow_cross: "cross",
@@ -1620,172 +1620,172 @@ var B = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
1620
1620
  composition: "composition",
1621
1621
  dependency: "dependency",
1622
1622
  lollipop: "lollipop"
1623
- }, we = /* @__PURE__ */ t((t, n, r, i, a, o) => {
1624
- let s = Ce[r];
1623
+ }, we = /* @__PURE__ */ s((e, t, n, r, i, a) => {
1624
+ let s = Ce[n];
1625
1625
  if (!s) {
1626
- e.warn(`Unknown arrow type: ${r}`);
1626
+ o.warn(`Unknown arrow type: ${n}`);
1627
1627
  return;
1628
1628
  }
1629
- let c = n === "start" ? "Start" : "End";
1630
- t.attr(`marker-${n}`, `url(${i}#${a}_${o}-${s}${c})`);
1631
- }, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */ t(async (e, t) => {
1632
- let r = f(), i = g(r), a = e.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label"), s = t.labelType === "markdown", c = await b(e, t.label, {
1629
+ let c = t === "start" ? "Start" : "End";
1630
+ e.attr(`marker-${t}`, `url(${r}#${i}_${a}-${s}${c})`);
1631
+ }, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */ s(async (e, t) => {
1632
+ let n = f(), r = g(n), i = e.insert("g").attr("class", "edgeLabel"), a = i.insert("g").attr("class", "label"), o = t.labelType === "markdown", s = await b(e, t.label, {
1633
1633
  style: t.labelStyle,
1634
- useHtmlLabels: i,
1635
- addSvgBackground: s,
1634
+ useHtmlLabels: r,
1635
+ addSvgBackground: o,
1636
1636
  isNode: !1,
1637
- markdown: s,
1638
- width: s ? void 0 : Infinity
1639
- }, r);
1640
- o.node().appendChild(c);
1641
- let l = c.getBBox(), u = l;
1642
- if (i) {
1643
- let e = c.children[0], t = n(c);
1637
+ markdown: o,
1638
+ width: o ? void 0 : Infinity
1639
+ }, n);
1640
+ a.node().appendChild(s);
1641
+ let l = s.getBBox(), u = l;
1642
+ if (r) {
1643
+ let e = s.children[0], t = c(s);
1644
1644
  l = e.getBoundingClientRect(), u = l, t.attr("width", l.width), t.attr("height", l.height);
1645
1645
  } else {
1646
- let e = n(c).select("text").node();
1646
+ let e = c(s).select("text").node();
1647
1647
  e && typeof e.getBBox == "function" && (u = e.getBBox());
1648
1648
  }
1649
- o.attr("transform", C(u, i)), V[t.id] = a, t.width = l.width, t.height = l.height;
1649
+ a.attr("transform", C(u, r)), V[t.id] = i, t.width = l.width, t.height = l.height;
1650
1650
  let d;
1651
1651
  if (t.startLabelLeft) {
1652
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, t.startLabelLeft, t.labelStyle);
1653
- d = o;
1654
- let s = o.getBBox();
1655
- if (i) {
1656
- let e = o.children[0], t = n(o);
1657
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1652
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(i, t.startLabelLeft, t.labelStyle);
1653
+ d = a;
1654
+ let o = a.getBBox();
1655
+ if (r) {
1656
+ let e = a.children[0], t = c(a);
1657
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1658
1658
  }
1659
- a.attr("transform", C(s, i)), H[t.id] || (H[t.id] = {}), H[t.id].startLeft = r, U(d, t.startLabelLeft);
1659
+ i.attr("transform", C(o, r)), H[t.id] || (H[t.id] = {}), H[t.id].startLeft = n, U(d, t.startLabelLeft);
1660
1660
  }
1661
1661
  if (t.startLabelRight) {
1662
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(r, t.startLabelRight, t.labelStyle);
1663
- d = o, a.node().appendChild(o);
1664
- let s = o.getBBox();
1665
- if (i) {
1666
- let e = o.children[0], t = n(o);
1667
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1662
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(n, t.startLabelRight, t.labelStyle);
1663
+ d = a, i.node().appendChild(a);
1664
+ let o = a.getBBox();
1665
+ if (r) {
1666
+ let e = a.children[0], t = c(a);
1667
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1668
1668
  }
1669
- a.attr("transform", C(s, i)), H[t.id] || (H[t.id] = {}), H[t.id].startRight = r, U(d, t.startLabelRight);
1669
+ i.attr("transform", C(o, r)), H[t.id] || (H[t.id] = {}), H[t.id].startRight = n, U(d, t.startLabelRight);
1670
1670
  }
1671
1671
  if (t.endLabelLeft) {
1672
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, t.endLabelLeft, t.labelStyle);
1673
- d = o;
1674
- let s = o.getBBox();
1675
- if (i) {
1676
- let e = o.children[0], t = n(o);
1677
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1672
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(i, t.endLabelLeft, t.labelStyle);
1673
+ d = a;
1674
+ let o = a.getBBox();
1675
+ if (r) {
1676
+ let e = a.children[0], t = c(a);
1677
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1678
1678
  }
1679
- a.attr("transform", C(s, i)), r.node().appendChild(o), H[t.id] || (H[t.id] = {}), H[t.id].endLeft = r, U(d, t.endLabelLeft);
1679
+ i.attr("transform", C(o, r)), n.node().appendChild(a), H[t.id] || (H[t.id] = {}), H[t.id].endLeft = n, U(d, t.endLabelLeft);
1680
1680
  }
1681
1681
  if (t.endLabelRight) {
1682
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, t.endLabelRight, t.labelStyle);
1683
- d = o;
1684
- let s = o.getBBox();
1685
- if (i) {
1686
- let e = o.children[0], t = n(o);
1687
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
1682
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(i, t.endLabelRight, t.labelStyle);
1683
+ d = a;
1684
+ let o = a.getBBox();
1685
+ if (r) {
1686
+ let e = a.children[0], t = c(a);
1687
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1688
1688
  }
1689
- a.attr("transform", C(s, i)), r.node().appendChild(o), H[t.id] || (H[t.id] = {}), H[t.id].endRight = r, U(d, t.endLabelRight);
1689
+ i.attr("transform", C(o, r)), n.node().appendChild(a), H[t.id] || (H[t.id] = {}), H[t.id].endRight = n, U(d, t.endLabelRight);
1690
1690
  }
1691
- return c;
1691
+ return s;
1692
1692
  }, "insertEdgeLabel");
1693
1693
  function U(e, t) {
1694
1694
  g(f()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1695
1695
  }
1696
- t(U, "setTerminalWidth");
1697
- var Ee = /* @__PURE__ */ t((t, n) => {
1698
- e.debug("Moving label abc88 ", t.id, t.label, V[t.id], n);
1699
- let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = w(f());
1700
- if (t.label) {
1701
- let o = V[t.id], s = t.x, c = t.y;
1696
+ s(U, "setTerminalWidth");
1697
+ var Ee = /* @__PURE__ */ s((e, t) => {
1698
+ o.debug("Moving label abc88 ", e.id, e.label, V[e.id], t);
1699
+ let r = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = w(f());
1700
+ if (e.label) {
1701
+ let a = V[e.id], s = e.x, c = e.y;
1702
1702
  if (r) {
1703
- let i = a.calcLabelPosition(r);
1704
- e.debug("Moving label " + t.label + " from (", s, ",", c, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (s = i.x, c = i.y);
1703
+ let i = n.calcLabelPosition(r);
1704
+ o.debug("Moving label " + e.label + " from (", s, ",", c, ") to (", i.x, ",", i.y, ") abc88"), t.updatedPath && (s = i.x, c = i.y);
1705
1705
  }
1706
- o.attr("transform", `translate(${s}, ${c + i / 2})`);
1706
+ a.attr("transform", `translate(${s}, ${c + i / 2})`);
1707
1707
  }
1708
- if (t.startLabelLeft) {
1709
- let e = H[t.id].startLeft, n = t.x, i = t.y;
1708
+ if (e.startLabelLeft) {
1709
+ let t = H[e.id].startLeft, i = e.x, a = e.y;
1710
1710
  if (r) {
1711
- let e = a.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
1712
- n = e.x, i = e.y;
1711
+ let t = n.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
1712
+ i = t.x, a = t.y;
1713
1713
  }
1714
- e.attr("transform", `translate(${n}, ${i})`);
1714
+ t.attr("transform", `translate(${i}, ${a})`);
1715
1715
  }
1716
- if (t.startLabelRight) {
1717
- let e = H[t.id].startRight, n = t.x, i = t.y;
1716
+ if (e.startLabelRight) {
1717
+ let t = H[e.id].startRight, i = e.x, a = e.y;
1718
1718
  if (r) {
1719
- let e = a.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", r);
1720
- n = e.x, i = e.y;
1719
+ let t = n.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", r);
1720
+ i = t.x, a = t.y;
1721
1721
  }
1722
- e.attr("transform", `translate(${n}, ${i})`);
1722
+ t.attr("transform", `translate(${i}, ${a})`);
1723
1723
  }
1724
- if (t.endLabelLeft) {
1725
- let e = H[t.id].endLeft, n = t.x, i = t.y;
1724
+ if (e.endLabelLeft) {
1725
+ let t = H[e.id].endLeft, i = e.x, a = e.y;
1726
1726
  if (r) {
1727
- let e = a.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
1728
- n = e.x, i = e.y;
1727
+ let t = n.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
1728
+ i = t.x, a = t.y;
1729
1729
  }
1730
- e.attr("transform", `translate(${n}, ${i})`);
1730
+ t.attr("transform", `translate(${i}, ${a})`);
1731
1731
  }
1732
- if (t.endLabelRight) {
1733
- let e = H[t.id].endRight, n = t.x, i = t.y;
1732
+ if (e.endLabelRight) {
1733
+ let t = H[e.id].endRight, i = e.x, a = e.y;
1734
1734
  if (r) {
1735
- let e = a.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
1736
- n = e.x, i = e.y;
1735
+ let t = n.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
1736
+ i = t.x, a = t.y;
1737
1737
  }
1738
- e.attr("transform", `translate(${n}, ${i})`);
1738
+ t.attr("transform", `translate(${i}, ${a})`);
1739
1739
  }
1740
- }, "positionEdgeLabel"), De = /* @__PURE__ */ t((e, t) => {
1740
+ }, "positionEdgeLabel"), De = /* @__PURE__ */ s((e, t) => {
1741
1741
  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;
1742
1742
  return i >= o || a >= s;
1743
- }, "outsideNode"), Oe = /* @__PURE__ */ t((t, n, r) => {
1744
- e.debug(`intersection calc abc89:
1745
- outsidePoint: ${JSON.stringify(n)}
1746
- insidePoint : ${JSON.stringify(r)}
1747
- node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
1748
- let i = t.x, a = t.y, o = Math.abs(i - r.x), s = t.width / 2, c = r.x < n.x ? s - o : s + o, l = t.height / 2, u = Math.abs(n.y - r.y), d = Math.abs(n.x - r.x);
1749
- if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
1750
- let t = r.y < n.y ? n.y - l - a : a - l - n.y;
1751
- c = d * t / u;
1752
- let i = {
1753
- x: r.x < n.x ? r.x + c : r.x - d + c,
1754
- y: r.y < n.y ? r.y + u - t : r.y - u + t
1743
+ }, "outsideNode"), Oe = /* @__PURE__ */ s((e, t, n) => {
1744
+ o.debug(`intersection calc abc89:
1745
+ outsidePoint: ${JSON.stringify(t)}
1746
+ insidePoint : ${JSON.stringify(n)}
1747
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1748
+ let r = e.x, i = e.y, a = Math.abs(r - n.x), s = e.width / 2, c = n.x < t.x ? s - a : s + a, l = e.height / 2, u = Math.abs(t.y - n.y), d = Math.abs(t.x - n.x);
1749
+ if (Math.abs(i - t.y) * s > Math.abs(r - t.x) * l) {
1750
+ let e = n.y < t.y ? t.y - l - i : i - l - t.y;
1751
+ c = d * e / u;
1752
+ let r = {
1753
+ x: n.x < t.x ? n.x + c : n.x - d + c,
1754
+ y: n.y < t.y ? n.y + u - e : n.y - u + e
1755
1755
  };
1756
- return c === 0 && (i.x = n.x, i.y = n.y), d === 0 && (i.x = n.x), u === 0 && (i.y = n.y), e.debug(`abc89 topp/bott calc, Q ${u}, q ${t}, R ${d}, r ${c}`, i), i;
1756
+ return c === 0 && (r.x = t.x, r.y = t.y), d === 0 && (r.x = t.x), u === 0 && (r.y = t.y), o.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`, r), r;
1757
1757
  } else {
1758
- c = r.x < n.x ? n.x - s - i : i - s - n.x;
1759
- let t = u * c / d, a = r.x < n.x ? r.x + d - c : r.x - d + c, o = r.y < n.y ? r.y + t : r.y - t;
1760
- return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`, {
1761
- _x: a,
1762
- _y: o
1763
- }), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
1764
- x: a,
1765
- y: o
1758
+ c = n.x < t.x ? t.x - s - r : r - s - t.x;
1759
+ let e = u * c / d, i = n.x < t.x ? n.x + d - c : n.x - d + c, a = n.y < t.y ? n.y + e : n.y - e;
1760
+ return o.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`, {
1761
+ _x: i,
1762
+ _y: a
1763
+ }), c === 0 && (i = t.x, a = t.y), d === 0 && (i = t.x), u === 0 && (a = t.y), {
1764
+ x: i,
1765
+ y: a
1766
1766
  };
1767
1767
  }
1768
- }, "intersection"), ke = /* @__PURE__ */ t((t, n) => {
1769
- e.debug("abc88 cutPathAtIntersect", t, n);
1770
- let r = [], i = t[0], a = !1;
1771
- return t.forEach((e) => {
1772
- if (!De(n, e) && !a) {
1773
- let t = Oe(n, i, e), o = !1;
1774
- r.forEach((e) => {
1775
- o ||= e.x === t.x && e.y === t.y;
1776
- }), r.some((e) => e.x === t.x && e.y === t.y) || r.push(t), a = !0;
1777
- } else i = e, a || r.push(e);
1778
- }), r;
1779
- }, "cutPathAtIntersect"), Ae = /* @__PURE__ */ t(function(t, n, i, a, o, s, c) {
1780
- let u = i.points;
1781
- e.debug("abc88 InsertEdge: edge=", i, "e=", n);
1768
+ }, "intersection"), ke = /* @__PURE__ */ s((e, t) => {
1769
+ o.debug("abc88 cutPathAtIntersect", e, t);
1770
+ let n = [], r = e[0], i = !1;
1771
+ return e.forEach((e) => {
1772
+ if (!De(t, e) && !i) {
1773
+ let a = Oe(t, r, e), o = !1;
1774
+ n.forEach((e) => {
1775
+ o ||= e.x === a.x && e.y === a.y;
1776
+ }), n.some((e) => e.x === a.x && e.y === a.y) || n.push(a), i = !0;
1777
+ } else r = e, i || n.push(e);
1778
+ }), n;
1779
+ }, "cutPathAtIntersect"), Ae = /* @__PURE__ */ s(function(t, n, r, i, a, s, c) {
1780
+ let u = r.points;
1781
+ o.debug("abc88 InsertEdge: edge=", r, "e=", n);
1782
1782
  let d = !1, p = s.node(n.v);
1783
1783
  var m = s.node(n.w);
1784
- m?.intersect && p?.intersect && (u = u.slice(1, i.points.length - 1), u.unshift(p.intersect(u[0])), u.push(m.intersect(u[u.length - 1]))), i.toCluster && (e.debug("to cluster abc88", a[i.toCluster]), u = ke(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (e.debug("from cluster abc88", a[i.fromCluster]), u = ke(u.reverse(), a[i.fromCluster].node).reverse(), d = !0);
1785
- let h = u.filter((e) => !Number.isNaN(e.y)), g = r;
1786
- i.curve && (o === "graph" || o === "flowchart") && (g = i.curve);
1787
- let { x: _, y: v } = S(i), b = y().x(_).y(v).curve(g), x;
1788
- switch (i.thickness) {
1784
+ 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 && (o.debug("to cluster abc88", i[r.toCluster]), u = ke(r.points, i[r.toCluster].node), d = !0), r.fromCluster && (o.debug("from cluster abc88", i[r.fromCluster]), u = ke(u.reverse(), i[r.fromCluster].node).reverse(), d = !0);
1785
+ let h = u.filter((e) => !Number.isNaN(e.y)), g = e;
1786
+ r.curve && (a === "graph" || a === "flowchart") && (g = r.curve);
1787
+ let { x: _, y: v } = S(r), b = y().x(_).y(v).curve(g), x;
1788
+ switch (r.thickness) {
1789
1789
  case "normal":
1790
1790
  x = "edge-thickness-normal";
1791
1791
  break;
@@ -1797,7 +1797,7 @@ var Ee = /* @__PURE__ */ t((t, n) => {
1797
1797
  break;
1798
1798
  default: x = "";
1799
1799
  }
1800
- switch (i.pattern) {
1800
+ switch (r.pattern) {
1801
1801
  case "solid":
1802
1802
  x += " edge-pattern-solid";
1803
1803
  break;
@@ -1808,11 +1808,11 @@ var Ee = /* @__PURE__ */ t((t, n) => {
1808
1808
  x += " edge-pattern-dashed";
1809
1809
  break;
1810
1810
  }
1811
- let C = t.append("path").attr("d", b(h)).attr("id", i.id).attr("class", " " + x + (i.classes ? " " + i.classes : "")).attr("style", i.style), w = "";
1812
- (f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C, i, w, c, o);
1811
+ let C = t.append("path").attr("d", b(h)).attr("id", r.id).attr("class", " " + x + (r.classes ? " " + r.classes : "")).attr("style", r.style), w = "";
1812
+ (f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C, r, w, c, a);
1813
1813
  let T = {};
1814
- return d && (T.updatedPath = u), T.originalPath = i.points, T;
1815
- }, "insertEdge"), je = /* @__PURE__ */ t((e) => {
1814
+ return d && (T.updatedPath = u), T.originalPath = r.points, T;
1815
+ }, "insertEdge"), je = /* @__PURE__ */ s((e) => {
1816
1816
  let t = /* @__PURE__ */ new Set();
1817
1817
  for (let n of e) switch (n) {
1818
1818
  case "x":
@@ -1826,7 +1826,7 @@ var Ee = /* @__PURE__ */ t((t, n) => {
1826
1826
  break;
1827
1827
  }
1828
1828
  return t;
1829
- }, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ t((e, t, n) => {
1829
+ }, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ s((e, t, n) => {
1830
1830
  let r = je(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
1831
1831
  return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
1832
1832
  {
@@ -2235,7 +2235,7 @@ var Ee = /* @__PURE__ */ t((t, n) => {
2235
2235
  function Ne(e, t) {
2236
2236
  return e.intersect(t);
2237
2237
  }
2238
- t(Ne, "intersectNode");
2238
+ s(Ne, "intersectNode");
2239
2239
  var Pe = Ne;
2240
2240
  function Fe(e, t, n, r) {
2241
2241
  var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
@@ -2246,12 +2246,12 @@ function Fe(e, t, n, r) {
2246
2246
  y: a + u
2247
2247
  };
2248
2248
  }
2249
- t(Fe, "intersectEllipse");
2249
+ s(Fe, "intersectEllipse");
2250
2250
  var Ie = Fe;
2251
2251
  function Le(e, t, n) {
2252
2252
  return Ie(e, t, t, n);
2253
2253
  }
2254
- t(Le, "intersectCircle");
2254
+ s(Le, "intersectCircle");
2255
2255
  var Re = Le;
2256
2256
  function ze(e, t, n, r) {
2257
2257
  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;
@@ -2260,11 +2260,11 @@ function ze(e, t, n, r) {
2260
2260
  y: v
2261
2261
  };
2262
2262
  }
2263
- t(ze, "intersectLine");
2263
+ s(ze, "intersectLine");
2264
2264
  function W(e, t) {
2265
2265
  return e * t > 0;
2266
2266
  }
2267
- t(W, "sameSign");
2267
+ s(W, "sameSign");
2268
2268
  var Be = ze, Ve = He;
2269
2269
  function He(e, t, n) {
2270
2270
  var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
@@ -2286,42 +2286,42 @@ function He(e, t, n) {
2286
2286
  return a < c ? -1 : a === c ? 0 : 1;
2287
2287
  }), a[0]) : e;
2288
2288
  }
2289
- t(He, "intersectPolygon");
2289
+ s(He, "intersectPolygon");
2290
2290
  var G = {
2291
2291
  node: Pe,
2292
2292
  circle: Re,
2293
2293
  ellipse: Ie,
2294
2294
  polygon: Ve,
2295
- rect: /* @__PURE__ */ t((e, t) => {
2295
+ rect: /* @__PURE__ */ s((e, t) => {
2296
2296
  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;
2297
2297
  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), {
2298
2298
  x: n + c,
2299
2299
  y: r + l
2300
2300
  };
2301
2301
  }, "intersectRect")
2302
- }, K = /* @__PURE__ */ t(async (e, t, r, i) => {
2303
- let a = f(), s, c = t.useHtmlLabels || g(a);
2304
- s = r || "node default";
2305
- let l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), d = l.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
2302
+ }, K = /* @__PURE__ */ s(async (e, t, n, i) => {
2303
+ let a = f(), o, s = t.useHtmlLabels || g(a);
2304
+ o = n || "node default";
2305
+ let l = e.insert("g").attr("class", o).attr("id", t.domId || t.id), d = l.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
2306
2306
  p = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
2307
2307
  let m;
2308
- m = t.labelType === "markdown" ? b(d, u(o(p), a), {
2309
- useHtmlLabels: c,
2308
+ m = t.labelType === "markdown" ? b(d, u(r(p), a), {
2309
+ useHtmlLabels: s,
2310
2310
  width: t.width || a.flowchart.wrappingWidth,
2311
2311
  classes: "markdown-node-label"
2312
- }, a) : await B(d, u(o(p), a), t.labelStyle, !1, i);
2312
+ }, a) : await B(d, u(r(p), a), t.labelStyle, !1, i);
2313
2313
  let h = m.getBBox(), _ = t.padding / 2;
2314
2314
  if (g(a)) {
2315
- let e = m.children[0], t = n(m);
2315
+ let e = m.children[0], t = c(m);
2316
2316
  await T(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2317
2317
  }
2318
- return c ? d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : d.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), d.insert("rect", ":first-child"), {
2318
+ return s ? d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : d.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), d.insert("rect", ":first-child"), {
2319
2319
  shapeSvg: l,
2320
2320
  bbox: h,
2321
2321
  halfPadding: _,
2322
2322
  label: d
2323
2323
  };
2324
- }, "labelHelper"), q = /* @__PURE__ */ t((e, t) => {
2324
+ }, "labelHelper"), q = /* @__PURE__ */ s((e, t) => {
2325
2325
  let n = t.node().getBBox();
2326
2326
  e.width = n.width, e.height = n.height;
2327
2327
  }, "updateNodeBounds");
@@ -2330,40 +2330,40 @@ function J(e, t, n, r) {
2330
2330
  return e.x + "," + e.y;
2331
2331
  }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
2332
2332
  }
2333
- t(J, "insertPolygonShape");
2334
- var Ue = /* @__PURE__ */ t(async (t, n) => {
2335
- n.useHtmlLabels || g(f()) || (n.centerLabel = !0);
2336
- let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, "node " + n.classes, !0);
2337
- e.info("Classes = ", n.classes);
2338
- let o = r.insert("rect", ":first-child");
2339
- return o.attr("rx", n.rx).attr("ry", n.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), q(n, o), n.intersect = function(e) {
2340
- return G.rect(n, e);
2341
- }, r;
2342
- }, "note"), We = /* @__PURE__ */ t((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ t((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ t(async (t, n) => {
2343
- let { shapeSvg: r, bbox: i } = await K(t, n, Y(n, void 0), !0), a = i.width + n.padding + (i.height + n.padding), o = [
2333
+ s(J, "insertPolygonShape");
2334
+ var Ue = /* @__PURE__ */ s(async (e, t) => {
2335
+ t.useHtmlLabels || g(f()) || (t.centerLabel = !0);
2336
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes, !0);
2337
+ o.info("Classes = ", t.classes);
2338
+ let a = n.insert("rect", ":first-child");
2339
+ 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) {
2340
+ return G.rect(t, e);
2341
+ }, n;
2342
+ }, "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) => {
2343
+ let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding + (r.height + t.padding), a = [
2344
2344
  {
2345
- x: a / 2,
2345
+ x: i / 2,
2346
2346
  y: 0
2347
2347
  },
2348
2348
  {
2349
- x: a,
2350
- y: -a / 2
2349
+ x: i,
2350
+ y: -i / 2
2351
2351
  },
2352
2352
  {
2353
- x: a / 2,
2354
- y: -a
2353
+ x: i / 2,
2354
+ y: -i
2355
2355
  },
2356
2356
  {
2357
2357
  x: 0,
2358
- y: -a / 2
2358
+ y: -i / 2
2359
2359
  }
2360
2360
  ];
2361
- e.info("Question main (Circle)");
2362
- let s = J(r, a, a, o);
2363
- return s.attr("style", n.style), q(n, s), n.intersect = function(t) {
2364
- return e.warn("Intersect called"), G.polygon(n, o, t);
2365
- }, r;
2366
- }, "question"), Ke = /* @__PURE__ */ t((e, t) => {
2361
+ o.info("Question main (Circle)");
2362
+ let s = J(n, i, i, a);
2363
+ return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2364
+ return o.warn("Intersect called"), G.polygon(t, a, e);
2365
+ }, n;
2366
+ }, "question"), Ke = /* @__PURE__ */ s((e, t) => {
2367
2367
  let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2368
2368
  return n.insert("polygon", ":first-child").attr("points", [
2369
2369
  {
@@ -2387,7 +2387,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2387
2387
  }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
2388
2388
  return G.circle(t, 14, e);
2389
2389
  }, n;
2390
- }, "choice"), qe = /* @__PURE__ */ t(async (e, t) => {
2390
+ }, "choice"), qe = /* @__PURE__ */ s(async (e, t) => {
2391
2391
  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 = [
2392
2392
  {
2393
2393
  x: a,
@@ -2417,12 +2417,12 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2417
2417
  return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
2418
2418
  return G.polygon(t, s, e);
2419
2419
  }, n;
2420
- }, "hexagon"), Je = /* @__PURE__ */ t(async (e, t) => {
2420
+ }, "hexagon"), Je = /* @__PURE__ */ s(async (e, t) => {
2421
2421
  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);
2422
2422
  return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
2423
2423
  return G.polygon(t, s, e);
2424
2424
  }, n;
2425
- }, "block_arrow"), Ye = /* @__PURE__ */ t(async (e, t) => {
2425
+ }, "block_arrow"), Ye = /* @__PURE__ */ s(async (e, t) => {
2426
2426
  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 = [
2427
2427
  {
2428
2428
  x: -a / 2,
@@ -2448,7 +2448,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2448
2448
  return J(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2449
2449
  return G.polygon(t, o, e);
2450
2450
  }, n;
2451
- }, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ t(async (e, t) => {
2451
+ }, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ s(async (e, t) => {
2452
2452
  let { shapeSvg: n, bbox: r } = await K(e, t, Y(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2453
2453
  {
2454
2454
  x: -2 * a / 6,
@@ -2470,7 +2470,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2470
2470
  return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2471
2471
  return G.polygon(t, o, e);
2472
2472
  }, n;
2473
- }, "lean_right"), Ze = /* @__PURE__ */ t(async (e, t) => {
2473
+ }, "lean_right"), Ze = /* @__PURE__ */ s(async (e, t) => {
2474
2474
  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 = [
2475
2475
  {
2476
2476
  x: 2 * a / 6,
@@ -2492,7 +2492,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2492
2492
  return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2493
2493
  return G.polygon(t, o, e);
2494
2494
  }, n;
2495
- }, "lean_left"), Qe = /* @__PURE__ */ t(async (e, t) => {
2495
+ }, "lean_left"), Qe = /* @__PURE__ */ s(async (e, t) => {
2496
2496
  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 = [
2497
2497
  {
2498
2498
  x: -2 * a / 6,
@@ -2514,7 +2514,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2514
2514
  return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2515
2515
  return G.polygon(t, o, e);
2516
2516
  }, n;
2517
- }, "trapezoid"), $e = /* @__PURE__ */ t(async (e, t) => {
2517
+ }, "trapezoid"), $e = /* @__PURE__ */ s(async (e, t) => {
2518
2518
  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 = [
2519
2519
  {
2520
2520
  x: a / 6,
@@ -2536,7 +2536,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2536
2536
  return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2537
2537
  return G.polygon(t, o, e);
2538
2538
  }, n;
2539
- }, "inv_trapezoid"), et = /* @__PURE__ */ t(async (e, t) => {
2539
+ }, "inv_trapezoid"), et = /* @__PURE__ */ s(async (e, t) => {
2540
2540
  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 = [
2541
2541
  {
2542
2542
  x: 0,
@@ -2562,7 +2562,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2562
2562
  return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2563
2563
  return G.polygon(t, o, e);
2564
2564
  }, n;
2565
- }, "rect_right_inv_arrow"), tt = /* @__PURE__ */ t(async (e, t) => {
2565
+ }, "rect_right_inv_arrow"), tt = /* @__PURE__ */ s(async (e, t) => {
2566
2566
  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;
2567
2567
  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) {
2568
2568
  let n = G.rect(t, e), r = n.x - t.x;
@@ -2572,90 +2572,90 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
2572
2572
  }
2573
2573
  return n;
2574
2574
  }, n;
2575
- }, "cylinder"), nt = /* @__PURE__ */ t(async (t, n) => {
2576
- let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, "node " + n.classes + " " + n.class, !0), o = r.insert("rect", ":first-child"), s = n.positioned ? n.width : i.width + n.padding, c = n.positioned ? n.height : i.height + n.padding, l = n.positioned ? -s / 2 : -i.width / 2 - a, u = n.positioned ? -c / 2 : -i.height / 2 - a;
2577
- if (o.attr("class", "basic label-container").attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), n.props) {
2578
- let t = new Set(Object.keys(n.props));
2579
- n.props.borders && (X(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
2580
- e.warn(`Unknown node property ${t}`);
2575
+ }, "cylinder"), nt = /* @__PURE__ */ s(async (e, t) => {
2576
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes + " " + t.class, !0), a = n.insert("rect", ":first-child"), s = t.positioned ? t.width : r.width + t.padding, c = t.positioned ? t.height : r.height + t.padding, l = t.positioned ? -s / 2 : -r.width / 2 - i, u = t.positioned ? -c / 2 : -r.height / 2 - i;
2577
+ 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", s).attr("height", c), t.props) {
2578
+ let e = new Set(Object.keys(t.props));
2579
+ t.props.borders && (X(a, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
2580
+ o.warn(`Unknown node property ${e}`);
2581
2581
  });
2582
2582
  }
2583
- return q(n, o), n.intersect = function(e) {
2584
- return G.rect(n, e);
2585
- }, r;
2586
- }, "rect"), rt = /* @__PURE__ */ t(async (t, n) => {
2587
- let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, "node " + n.classes, !0), o = r.insert("rect", ":first-child"), s = n.positioned ? n.width : i.width + n.padding, c = n.positioned ? n.height : i.height + n.padding, l = n.positioned ? -s / 2 : -i.width / 2 - a, u = n.positioned ? -c / 2 : -i.height / 2 - a;
2588
- if (o.attr("class", "basic cluster composite label-container").attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), n.props) {
2589
- let t = new Set(Object.keys(n.props));
2590
- n.props.borders && (X(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
2591
- e.warn(`Unknown node property ${t}`);
2583
+ return q(t, a), t.intersect = function(e) {
2584
+ return G.rect(t, e);
2585
+ }, n;
2586
+ }, "rect"), rt = /* @__PURE__ */ s(async (e, t) => {
2587
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes, !0), a = n.insert("rect", ":first-child"), s = t.positioned ? t.width : r.width + t.padding, c = t.positioned ? t.height : r.height + t.padding, l = t.positioned ? -s / 2 : -r.width / 2 - i, u = t.positioned ? -c / 2 : -r.height / 2 - i;
2588
+ 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", s).attr("height", c), t.props) {
2589
+ let e = new Set(Object.keys(t.props));
2590
+ t.props.borders && (X(a, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
2591
+ o.warn(`Unknown node property ${e}`);
2592
2592
  });
2593
2593
  }
2594
- return q(n, o), n.intersect = function(e) {
2595
- return G.rect(n, e);
2596
- }, r;
2597
- }, "composite"), it = /* @__PURE__ */ t(async (t, n) => {
2598
- let { shapeSvg: r } = await K(t, n, "label", !0);
2599
- e.trace("Classes = ", n.class);
2600
- let i = r.insert("rect", ":first-child");
2601
- if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), n.props) {
2602
- let t = new Set(Object.keys(n.props));
2603
- n.props.borders && (X(i, n.props.borders, 0, 0), t.delete("borders")), t.forEach((t) => {
2604
- e.warn(`Unknown node property ${t}`);
2594
+ return q(t, a), t.intersect = function(e) {
2595
+ return G.rect(t, e);
2596
+ }, n;
2597
+ }, "composite"), it = /* @__PURE__ */ s(async (e, t) => {
2598
+ let { shapeSvg: n } = await K(e, t, "label", !0);
2599
+ o.trace("Classes = ", t.class);
2600
+ let r = n.insert("rect", ":first-child");
2601
+ if (r.attr("width", 0).attr("height", 0), n.attr("class", "label edgeLabel"), t.props) {
2602
+ let e = new Set(Object.keys(t.props));
2603
+ t.props.borders && (X(r, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
2604
+ o.warn(`Unknown node property ${e}`);
2605
2605
  });
2606
2606
  }
2607
- return q(n, i), n.intersect = function(e) {
2608
- return G.rect(n, e);
2609
- }, r;
2607
+ return q(t, r), t.intersect = function(e) {
2608
+ return G.rect(t, e);
2609
+ }, n;
2610
2610
  }, "labelRect");
2611
- function X(n, r, i, a) {
2612
- let o = [], s = /* @__PURE__ */ t((e) => {
2613
- o.push(e, 0);
2614
- }, "addBorder"), c = /* @__PURE__ */ t((e) => {
2615
- o.push(0, e);
2611
+ function X(e, t, n, r) {
2612
+ let i = [], a = /* @__PURE__ */ s((e) => {
2613
+ i.push(e, 0);
2614
+ }, "addBorder"), c = /* @__PURE__ */ s((e) => {
2615
+ i.push(0, e);
2616
2616
  }, "skipBorder");
2617
- r.includes("t") ? (e.debug("add top border"), s(i)) : c(i), r.includes("r") ? (e.debug("add right border"), s(a)) : c(a), r.includes("b") ? (e.debug("add bottom border"), s(i)) : c(i), r.includes("l") ? (e.debug("add left border"), s(a)) : c(a), n.attr("stroke-dasharray", o.join(" "));
2617
+ t.includes("t") ? (o.debug("add top border"), a(n)) : c(n), t.includes("r") ? (o.debug("add right border"), a(r)) : c(r), t.includes("b") ? (o.debug("add bottom border"), a(n)) : c(n), t.includes("l") ? (o.debug("add left border"), a(r)) : c(r), e.attr("stroke-dasharray", i.join(" "));
2618
2618
  }
2619
- t(X, "applyNodePropertyBorders");
2620
- var at = /* @__PURE__ */ t(async (t, r) => {
2621
- let i;
2622
- i = r.classes ? "node " + r.classes : "node default";
2623
- let a = t.insert("g").attr("class", i).attr("id", r.domId || r.id), o = a.insert("rect", ":first-child"), s = a.insert("line"), c = a.insert("g").attr("class", "label"), l = r.labelText.flat ? r.labelText.flat() : r.labelText, u = "";
2624
- u = typeof l == "object" ? l[0] : l, e.info("Label text abc79", u, l, typeof l == "object");
2625
- let d = await B(c, u, r.labelStyle, !0, !0), p = {
2619
+ s(X, "applyNodePropertyBorders");
2620
+ var at = /* @__PURE__ */ s(async (e, t) => {
2621
+ let n;
2622
+ n = t.classes ? "node " + t.classes : "node default";
2623
+ let r = e.insert("g").attr("class", n).attr("id", t.domId || t.id), i = r.insert("rect", ":first-child"), a = r.insert("line"), s = r.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText, u = "";
2624
+ u = typeof l == "object" ? l[0] : l, o.info("Label text abc79", u, l, typeof l == "object");
2625
+ let d = await B(s, u, t.labelStyle, !0, !0), p = {
2626
2626
  width: 0,
2627
2627
  height: 0
2628
2628
  };
2629
2629
  if (g(f())) {
2630
- let e = d.children[0], t = n(d);
2630
+ let e = d.children[0], t = c(d);
2631
2631
  p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
2632
2632
  }
2633
- e.info("Text 2", l);
2634
- let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(c, m.join ? m.join("<br/>") : m, r.labelStyle, !0, !0);
2633
+ o.info("Text 2", l);
2634
+ let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(s, m.join ? m.join("<br/>") : m, t.labelStyle, !0, !0);
2635
2635
  if (g(f())) {
2636
- let e = _.children[0], t = n(_);
2636
+ let e = _.children[0], t = c(_);
2637
2637
  p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
2638
2638
  }
2639
- let v = r.padding / 2;
2640
- return n(_).attr("transform", "translate( " + (p.width > h.width ? 0 : (h.width - p.width) / 2) + ", " + (h.height + v + 5) + ")"), n(d).attr("transform", "translate( " + (p.width < h.width ? 0 : -(h.width - p.width) / 2) + ", 0)"), p = c.node().getBBox(), c.attr("transform", "translate(" + -p.width / 2 + ", " + (-p.height / 2 - v + 3) + ")"), o.attr("class", "outer title-state").attr("x", -p.width / 2 - v).attr("y", -p.height / 2 - v).attr("width", p.width + r.padding).attr("height", p.height + r.padding), s.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(r, o), r.intersect = function(e) {
2641
- return G.rect(r, e);
2642
- }, a;
2643
- }, "rectWithTitle"), ot = /* @__PURE__ */ t(async (e, t) => {
2639
+ let v = t.padding / 2;
2640
+ return c(_).attr("transform", "translate( " + (p.width > h.width ? 0 : (h.width - p.width) / 2) + ", " + (h.height + v + 5) + ")"), c(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) + ")"), i.attr("class", "outer title-state").attr("x", -p.width / 2 - v).attr("y", -p.height / 2 - v).attr("width", p.width + t.padding).attr("height", p.height + t.padding), a.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(t, i), t.intersect = function(e) {
2641
+ return G.rect(t, e);
2642
+ }, r;
2643
+ }, "rectWithTitle"), ot = /* @__PURE__ */ s(async (e, t) => {
2644
2644
  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;
2645
2645
  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) {
2646
2646
  return G.rect(t, e);
2647
2647
  }, n;
2648
- }, "stadium"), st = /* @__PURE__ */ t(async (t, n) => {
2649
- let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, Y(n, void 0), !0), o = r.insert("circle", ":first-child");
2650
- return o.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), e.info("Circle main"), q(n, o), n.intersect = function(t) {
2651
- return e.info("Circle intersect", n, i.width / 2 + a, t), G.circle(n, i.width / 2 + a, t);
2652
- }, r;
2653
- }, "circle"), ct = /* @__PURE__ */ t(async (t, n) => {
2654
- let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, Y(n, void 0), !0), o = r.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
2655
- return o.attr("class", n.class), s.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a + 5).attr("width", i.width + n.padding + 10).attr("height", i.height + n.padding + 10), c.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), e.info("DoubleCircle main"), q(n, s), n.intersect = function(t) {
2656
- return e.info("DoubleCircle intersect", n, i.width / 2 + a + 5, t), G.circle(n, i.width / 2 + a + 5, t);
2657
- }, r;
2658
- }, "doublecircle"), lt = /* @__PURE__ */ t(async (e, t) => {
2648
+ }, "stadium"), st = /* @__PURE__ */ s(async (e, t) => {
2649
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, Y(t, void 0), !0), a = n.insert("circle", ":first-child");
2650
+ 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), o.info("Circle main"), q(t, a), t.intersect = function(e) {
2651
+ return o.info("Circle intersect", t, r.width / 2 + i, e), G.circle(t, r.width / 2 + i, e);
2652
+ }, n;
2653
+ }, "circle"), ct = /* @__PURE__ */ s(async (e, t) => {
2654
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, Y(t, void 0), !0), a = n.insert("g", ":first-child"), s = a.insert("circle"), c = a.insert("circle");
2655
+ return a.attr("class", t.class), s.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), c.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), o.info("DoubleCircle main"), q(t, s), t.intersect = function(e) {
2656
+ return o.info("DoubleCircle intersect", t, r.width / 2 + i + 5, e), G.circle(t, r.width / 2 + i + 5, e);
2657
+ }, n;
2658
+ }, "doublecircle"), lt = /* @__PURE__ */ s(async (e, t) => {
2659
2659
  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 = [
2660
2660
  {
2661
2661
  x: 0,
@@ -2701,12 +2701,12 @@ var at = /* @__PURE__ */ t(async (t, r) => {
2701
2701
  return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2702
2702
  return G.polygon(t, o, e);
2703
2703
  }, n;
2704
- }, "subroutine"), ut = /* @__PURE__ */ t((e, t) => {
2704
+ }, "subroutine"), ut = /* @__PURE__ */ s((e, t) => {
2705
2705
  let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
2706
2706
  return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), q(t, r), t.intersect = function(e) {
2707
2707
  return G.circle(t, 7, e);
2708
2708
  }, n;
2709
- }, "start"), dt = /* @__PURE__ */ t((e, t, n) => {
2709
+ }, "start"), dt = /* @__PURE__ */ s((e, t, n) => {
2710
2710
  let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
2711
2711
  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) {
2712
2712
  return G.rect(t, e);
@@ -2732,7 +2732,7 @@ var at = /* @__PURE__ */ t(async (t, r) => {
2732
2732
  rect_right_inv_arrow: et,
2733
2733
  cylinder: tt,
2734
2734
  start: ut,
2735
- end: /* @__PURE__ */ t((e, t) => {
2735
+ end: /* @__PURE__ */ s((e, t) => {
2736
2736
  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");
2737
2737
  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) {
2738
2738
  return G.circle(t, 7, e);
@@ -2742,81 +2742,81 @@ var at = /* @__PURE__ */ t(async (t, r) => {
2742
2742
  subroutine: lt,
2743
2743
  fork: dt,
2744
2744
  join: dt,
2745
- class_box: /* @__PURE__ */ t(async (e, t) => {
2746
- let r = t.padding / 2, i;
2747
- i = t.classes ? "node " + t.classes : "node default";
2748
- let a = e.insert("g").attr("class", i).attr("id", t.domId || t.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 = t.classData.annotations?.[0], h = await B(d, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = h.getBBox();
2745
+ class_box: /* @__PURE__ */ s(async (e, t) => {
2746
+ let n = t.padding / 2, r;
2747
+ r = t.classes ? "node " + t.classes : "node default";
2748
+ let i = e.insert("g").attr("class", r).attr("id", t.domId || t.id), a = i.insert("rect", ":first-child"), o = i.insert("line"), s = i.insert("line"), l = 0, u = 4, d = i.insert("g").attr("class", "label"), p = 0, m = t.classData.annotations?.[0], h = await B(d, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = h.getBBox();
2749
2749
  if (g(f())) {
2750
- let e = h.children[0], t = n(h);
2750
+ let e = h.children[0], t = c(h);
2751
2751
  _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
2752
2752
  }
2753
2753
  t.classData.annotations[0] && (u += _.height + 4, l += _.width);
2754
2754
  let v = t.classData.label;
2755
2755
  t.classData.type !== void 0 && t.classData.type !== "" && (g(f()) ? v += "&lt;" + t.classData.type + "&gt;" : v += "<" + t.classData.type + ">");
2756
2756
  let y = await B(d, v, t.labelStyle, !0, !0);
2757
- n(y).attr("class", "classTitle");
2757
+ c(y).attr("class", "classTitle");
2758
2758
  let b = y.getBBox();
2759
2759
  if (g(f())) {
2760
- let e = y.children[0], t = n(y);
2760
+ let e = y.children[0], t = c(y);
2761
2761
  b = e.getBoundingClientRect(), t.attr("width", b.width), t.attr("height", b.height);
2762
2762
  }
2763
2763
  u += b.height + 4, b.width > l && (l = b.width);
2764
2764
  let x = [];
2765
2765
  t.classData.members.forEach(async (e) => {
2766
- let r = e.getDisplayDetails(), i = r.displayText;
2767
- g(f()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2768
- let a = await B(d, i, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
2766
+ let n = e.getDisplayDetails(), r = n.displayText;
2767
+ g(f()) && (r = r.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2768
+ let i = await B(d, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), a = i.getBBox();
2769
2769
  if (g(f())) {
2770
- let e = a.children[0], t = n(a);
2771
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
2770
+ let e = i.children[0], t = c(i);
2771
+ a = e.getBoundingClientRect(), t.attr("width", a.width), t.attr("height", a.height);
2772
2772
  }
2773
- o.width > l && (l = o.width), u += o.height + 4, x.push(a);
2773
+ a.width > l && (l = a.width), u += a.height + 4, x.push(i);
2774
2774
  }), u += 8;
2775
2775
  let S = [];
2776
2776
  if (t.classData.methods.forEach(async (e) => {
2777
- let r = e.getDisplayDetails(), i = r.displayText;
2778
- g(f()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2779
- let a = await B(d, i, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
2777
+ let n = e.getDisplayDetails(), r = n.displayText;
2778
+ g(f()) && (r = r.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2779
+ let i = await B(d, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), a = i.getBBox();
2780
2780
  if (g(f())) {
2781
- let e = a.children[0], t = n(a);
2782
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
2781
+ let e = i.children[0], t = c(i);
2782
+ a = e.getBoundingClientRect(), t.attr("width", a.width), t.attr("height", a.height);
2783
2783
  }
2784
- o.width > l && (l = o.width), u += o.height + 4, S.push(a);
2784
+ a.width > l && (l = a.width), u += a.height + 4, S.push(i);
2785
2785
  }), u += 8, m) {
2786
2786
  let e = (l - _.width) / 2;
2787
- n(h).attr("transform", "translate( " + (-1 * l / 2 + e) + ", " + -1 * u / 2 + ")"), p = _.height + 4;
2787
+ c(h).attr("transform", "translate( " + (-1 * l / 2 + e) + ", " + -1 * u / 2 + ")"), p = _.height + 4;
2788
2788
  }
2789
2789
  let C = (l - b.width) / 2;
2790
- return n(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((e) => {
2791
- n(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p + 8 / 2) + ")");
2790
+ return c(y).attr("transform", "translate( " + (-1 * l / 2 + C) + ", " + (-1 * u / 2 + p) + ")"), p += b.height + 4, o.attr("class", "divider").attr("x1", -l / 2 - n).attr("x2", l / 2 + n).attr("y1", -u / 2 - n + 8 + p).attr("y2", -u / 2 - n + 8 + p), p += 8, x.forEach((e) => {
2791
+ c(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p + 8 / 2) + ")");
2792
2792
  let t = e?.getBBox();
2793
2793
  p += (t?.height ?? 0) + 4;
2794
- }), 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((e) => {
2795
- n(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p) + ")");
2794
+ }), p += 8, s.attr("class", "divider").attr("x1", -l / 2 - n).attr("x2", l / 2 + n).attr("y1", -u / 2 - n + 8 + p).attr("y2", -u / 2 - n + 8 + p), p += 8, S.forEach((e) => {
2795
+ c(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p) + ")");
2796
2796
  let t = e?.getBBox();
2797
2797
  p += (t?.height ?? 0) + 4;
2798
- }), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -l / 2 - r).attr("y", -(u / 2) - r).attr("width", l + t.padding).attr("height", u + t.padding), q(t, o), t.intersect = function(e) {
2798
+ }), a.attr("style", t.style).attr("class", "outer title-state").attr("x", -l / 2 - n).attr("y", -(u / 2) - n).attr("width", l + t.padding).attr("height", u + t.padding), q(t, a), t.intersect = function(e) {
2799
2799
  return G.rect(t, e);
2800
- }, a;
2800
+ }, i;
2801
2801
  }, "class_box")
2802
- }, Z = {}, pt = /* @__PURE__ */ t(async (e, t, n) => {
2802
+ }, Z = {}, pt = /* @__PURE__ */ s(async (e, t, n) => {
2803
2803
  let r, i;
2804
2804
  if (t.link) {
2805
2805
  let a;
2806
2806
  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);
2807
2807
  } else i = await ft[t.shape](e, t, n), r = i;
2808
2808
  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;
2809
- }, "insertNode"), mt = /* @__PURE__ */ t((t) => {
2810
- let n = Z[t.id];
2811
- e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
2812
- let r = t.diff || 0;
2813
- return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
2809
+ }, "insertNode"), mt = /* @__PURE__ */ s((e) => {
2810
+ let t = Z[e.id];
2811
+ o.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
2812
+ let n = e.diff || 0;
2813
+ 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;
2814
2814
  }, "positionNode");
2815
- function Q(e, t, n = !1) {
2816
- let r = e, a = "default";
2817
- (r?.classes?.length || 0) > 0 && (a = (r?.classes ?? []).join(" ")), a += " flowchart-label";
2815
+ function Q(e, n, r = !1) {
2816
+ let i = e, a = "default";
2817
+ (i?.classes?.length || 0) > 0 && (a = (i?.classes ?? []).join(" ")), a += " flowchart-label";
2818
2818
  let o = 0, s = "", c;
2819
- switch (r.type) {
2819
+ switch (i.type) {
2820
2820
  case "round":
2821
2821
  o = 5, s = "rect";
2822
2822
  break;
@@ -2876,7 +2876,7 @@ function Q(e, t, n = !1) {
2876
2876
  break;
2877
2877
  default: s = "rect";
2878
2878
  }
2879
- let l = i(r?.styles ?? []), u = r.label, d = r.size ?? {
2879
+ let l = t(i?.styles ?? []), u = i.label, d = i.size ?? {
2880
2880
  width: 0,
2881
2881
  height: 0,
2882
2882
  x: 0,
@@ -2890,19 +2890,19 @@ function Q(e, t, n = !1) {
2890
2890
  ry: o,
2891
2891
  class: a,
2892
2892
  style: l.style,
2893
- id: r.id,
2894
- directions: r.directions,
2893
+ id: i.id,
2894
+ directions: i.directions,
2895
2895
  width: d.width,
2896
2896
  height: d.height,
2897
2897
  x: d.x,
2898
2898
  y: d.y,
2899
- positioned: n,
2899
+ positioned: r,
2900
2900
  intersect: void 0,
2901
- type: r.type,
2901
+ type: i.type,
2902
2902
  padding: c ?? _()?.block?.padding ?? 0
2903
2903
  };
2904
2904
  }
2905
- t(Q, "getNodeFromBlock");
2905
+ s(Q, "getNodeFromBlock");
2906
2906
  async function ht(e, t, n) {
2907
2907
  let r = Q(t, n, !1);
2908
2908
  if (r.type === "group") return;
@@ -2915,45 +2915,45 @@ async function ht(e, t, n) {
2915
2915
  node: i
2916
2916
  }, n.setBlock(o), i.remove();
2917
2917
  }
2918
- t(ht, "calculateBlockSize");
2918
+ s(ht, "calculateBlockSize");
2919
2919
  async function gt(e, t, n) {
2920
2920
  let r = Q(t, n, !0);
2921
2921
  n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: _() }), t.intersect = r?.intersect, mt(r));
2922
2922
  }
2923
- t(gt, "insertBlockPositioned");
2923
+ s(gt, "insertBlockPositioned");
2924
2924
  async function $(e, t, n, r) {
2925
2925
  for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
2926
2926
  }
2927
- t($, "performOperations");
2927
+ s($, "performOperations");
2928
2928
  async function _t(e, t, n) {
2929
2929
  await $(e, t, n, ht);
2930
2930
  }
2931
- t(_t, "calculateBlockSizes");
2931
+ s(_t, "calculateBlockSizes");
2932
2932
  async function vt(e, t, n) {
2933
2933
  await $(e, t, n, gt);
2934
2934
  }
2935
- t(vt, "insertBlocks");
2935
+ s(vt, "insertBlocks");
2936
2936
  async function yt(e, t, n, r, i) {
2937
- let a = new c({
2937
+ let o = new a({
2938
2938
  multigraph: !0,
2939
2939
  compound: !0
2940
2940
  });
2941
- a.setGraph({
2941
+ o.setGraph({
2942
2942
  rankdir: "TB",
2943
2943
  nodesep: 10,
2944
2944
  ranksep: 10,
2945
2945
  marginx: 8,
2946
2946
  marginy: 8
2947
2947
  });
2948
- for (let e of n) e.size && a.setNode(e.id, {
2948
+ for (let e of n) e.size && o.setNode(e.id, {
2949
2949
  width: e.size.width,
2950
2950
  height: e.size.height,
2951
2951
  intersect: e.intersect
2952
2952
  });
2953
2953
  for (let n of t) if (n.start && n.end) {
2954
- let t = r.getBlock(n.start), o = r.getBlock(n.end);
2955
- if (t?.size && o?.size) {
2956
- let r = t.size, s = o.size, c = [
2954
+ let t = r.getBlock(n.start), a = r.getBlock(n.end);
2955
+ if (t?.size && a?.size) {
2956
+ let r = t.size, s = a.size, c = [
2957
2957
  {
2958
2958
  x: r.x,
2959
2959
  y: r.y
@@ -2977,7 +2977,7 @@ async function yt(e, t, n, r, i) {
2977
2977
  arrowTypeStart: n.arrowTypeStart,
2978
2978
  points: c,
2979
2979
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2980
- }, void 0, "block", a, i), n.label && (await Te(e, {
2980
+ }, void 0, "block", o, i), n.label && (await Te(e, {
2981
2981
  ...n,
2982
2982
  label: n.label,
2983
2983
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
@@ -2993,29 +2993,29 @@ async function yt(e, t, n, r, i) {
2993
2993
  }
2994
2994
  }
2995
2995
  }
2996
- t(yt, "insertEdges");
2996
+ s(yt, "insertEdges");
2997
2997
  var bt = {
2998
2998
  parser: D,
2999
2999
  db: pe,
3000
3000
  renderer: {
3001
- draw: /* @__PURE__ */ t(async function(t, r, i, a) {
3002
- let { securityLevel: o, block: s } = _(), c = a.db, l;
3003
- o === "sandbox" && (l = n("#i" + r));
3004
- let u = n(o === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = o === "sandbox" ? u.select(`[id="${r}"]`) : n(`[id="${r}"]`);
3001
+ draw: /* @__PURE__ */ s(async function(e, t, n, r) {
3002
+ let { securityLevel: i, block: a } = _(), s = r.db, l;
3003
+ i === "sandbox" && (l = c("#i" + t));
3004
+ let u = c(i === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = i === "sandbox" ? u.select(`[id="${t}"]`) : c(`[id="${t}"]`);
3005
3005
  _e(d, [
3006
3006
  "point",
3007
3007
  "circle",
3008
3008
  "cross"
3009
- ], a.type, r);
3010
- let f = c.getBlocks(), m = c.getBlocksFlat(), h = c.getEdges(), g = d.insert("g").attr("class", "block");
3011
- await _t(g, f, c);
3012
- let v = xe(c);
3013
- if (await vt(g, f, c), await yt(g, h, m, c, r), v) {
3014
- let t = v, n = Math.max(1, Math.round(.125 * (t.width / t.height))), r = t.height + n + 10, i = t.width + 10, { useMaxWidth: a } = s;
3015
- p(d, r, i, !!a), e.debug("Here Bounds", v, t), d.attr("viewBox", `${t.x - 5} ${t.y - 5} ${t.width + 10} ${t.height + 10}`);
3009
+ ], r.type, t);
3010
+ let f = s.getBlocks(), m = s.getBlocksFlat(), h = s.getEdges(), g = d.insert("g").attr("class", "block");
3011
+ await _t(g, f, s);
3012
+ let v = xe(s);
3013
+ if (await vt(g, f, s), await yt(g, h, m, s, t), v) {
3014
+ 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 } = a;
3015
+ p(d, n, r, !!i), o.debug("Here Bounds", v, e), d.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
3016
3016
  }
3017
3017
  }, "draw"),
3018
- getClasses: /* @__PURE__ */ t(function(e, t) {
3018
+ getClasses: /* @__PURE__ */ s(function(e, t) {
3019
3019
  return t.db.getClasses();
3020
3020
  }, "getClasses")
3021
3021
  },