@marimo-team/islands 0.14.11-dev2 → 0.14.11-dev21

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 (71) hide show
  1. package/dist/{ConnectedDataExplorerComponent-Dl7Gx8nj.js → ConnectedDataExplorerComponent-B98UAJGl.js} +4 -4
  2. package/dist/{ImageComparisonComponent-IsA0pccG.js → ImageComparisonComponent-3rx-X1eA.js} +1 -1
  3. package/dist/{VegaLite-C3jfIIJl.js → VegaLite-bssctYsi.js} +6961 -7180
  4. package/dist/{_baseUniq-DXGCzwrs.js → _baseUniq-n5nuGCm-.js} +36 -36
  5. package/dist/{any-language-editor-BbtP_crK.js → any-language-editor-CTuUQiXP.js} +1 -1
  6. package/dist/{architectureDiagram-IEHRJDOE-B5UTatfK.js → architectureDiagram-NQ2NVSRB-Ghs-gTjF.js} +897 -894
  7. package/dist/assets/{worker-BcyuOSTi.js → save-worker-fI5ofStJ.js} +1076 -1649
  8. package/dist/assets/{save-worker-BIDtxCd1.js → worker-Bfk1FrzG.js} +1627 -1747
  9. package/dist/assets/worker-BldghCZh.js +3752 -0
  10. package/dist/{blockDiagram-JOT3LUYC-BsdaPVqe.js → blockDiagram-PHRCVELO-BJrdpvE8.js} +534 -522
  11. package/dist/{c4Diagram-VJAJSXHY-mAt84R4z.js → c4Diagram-6F6E4RAY-C3mvzJPu.js} +4 -4
  12. package/dist/{channel-BQIWHLpc.js → channel-Dv_KwBSx.js} +1 -1
  13. package/dist/{chunk-4BMEZGHF-CKIxJWxP.js → chunk-353BL4L5-DE1uUKLI.js} +1 -1
  14. package/dist/{chunk-D6G4REZN-CgGV16Ao.js → chunk-67H74DCK-BSe-uUSS.js} +1 -1
  15. package/dist/chunk-6OLS64BW-lmSfyWue.js +1383 -0
  16. package/dist/{chunk-XZIHB7SX-Bwue5JjE.js → chunk-AACKK3MU-DAmuROVD.js} +1 -1
  17. package/dist/chunk-BFAMUDN2-D9C6R9UM.js +8 -0
  18. package/dist/chunk-E2GYISFI-BzFDmP6o.js +19 -0
  19. package/dist/{chunk-A2AXSNBT-wMvlVMnZ.js → chunk-QEP2MXWD-BILXx23p.js} +30 -27
  20. package/dist/chunk-SKB7J2MH-CxMkQppY.js +20 -0
  21. package/dist/{classDiagram-GIVACNV2-DOmcKRwM.js → classDiagram-BGRH5UQR-BbYr5aD9.js} +2 -2
  22. package/dist/{classDiagram-v2-COTLJTTW-DOmcKRwM.js → classDiagram-v2-O24JOBDK-BbYr5aD9.js} +2 -2
  23. package/dist/{clone-PHSHUhb-.js → clone-DuBujAk0.js} +1 -1
  24. package/dist/{dagre-OKDRZEBW-D5HNBllU.js → dagre-FFZHY6LT-DO5nLpLx.js} +8 -8
  25. package/dist/{data-editor-Coz_zrsX.js → data-editor-C8yM5wyh.js} +213 -201
  26. package/dist/diagram-3EMPZRKU-B1rYMJMS.js +313 -0
  27. package/dist/diagram-5UYTHUR4-BUu8PsmE.js +137 -0
  28. package/dist/{diagram-SSKATNLV-BsO89QJN.js → diagram-ZTM2IBQH-lz_uZrYh.js} +3 -3
  29. package/dist/{erDiagram-Q7BY3M3F-DWIMKTfS.js → erDiagram-R3QVA2FD-D_A2jrJV.js} +6 -5
  30. package/dist/{flowDiagram-4HSFHLVR-CnO0wmaL.js → flowDiagram-PKI6S5ZS-Bv6D_bIf.js} +283 -278
  31. package/dist/{ganttDiagram-APWFNJXF-otclLFL4.js → ganttDiagram-EK5VF46D-CbkaARm4.js} +453 -439
  32. package/dist/{gitGraphDiagram-7IBYFJ6S-C7F3RAja.js → gitGraphDiagram-GW3U2K7C-B8ZGoOT-.js} +35 -35
  33. package/dist/{graph-Btsdly6D.js → graph-txVVq_De.js} +3 -3
  34. package/dist/{index-BreCkhLm.js → index-BI6tloBb.js} +3 -3
  35. package/dist/{index-CcRF-HlA.js → index-CFJazcU-.js} +4 -4
  36. package/dist/{index-BGmzdYRo.js → index-OiR0LgXX.js} +6 -3
  37. package/dist/{index-z8OyYHEh.js → index-fJDj-gSp.js} +1 -1
  38. package/dist/index-pBmAzQJl.js +235 -0
  39. package/dist/{infoDiagram-PH2N3AL5-BwcXDzwE.js → infoDiagram-RLU2ROGC-DJw6nWp0.js} +5 -3
  40. package/dist/journeyDiagram-EWQZEKCU-1oCDdLcB.js +836 -0
  41. package/dist/{kanban-definition-NDS4AKOZ-3NJYjnpz.js → kanban-definition-ILFWEQ3N-nKJ02Ox0.js} +41 -39
  42. package/dist/{layout-qfivsCI_.js → layout-CbUwX9d6.js} +49 -49
  43. package/dist/{linear-D_Kojy5s.js → linear-sn9_bxtB.js} +22 -22
  44. package/dist/{main-DLuap1gp.js → main-D9-48wlP.js} +45053 -45130
  45. package/dist/main.js +1 -1
  46. package/dist/{mermaid-DCIbF0Rd.js → mermaid-CRRCnedu.js} +4925 -4853
  47. package/dist/min-CYaGuxZ4.js +80 -0
  48. package/dist/{mindmap-definition-ALO5MXBD-BtSBR7-c.js → mindmap-definition-CZNETY7S-CV62GMPJ.js} +3 -3
  49. package/dist/{pieDiagram-IB7DONF6-TiB_3g9z.js → pieDiagram-NIOCPIFQ-Bcs4p6kX.js} +3 -3
  50. package/dist/{quadrantDiagram-7GDLP6J5-B0DPjp7Z.js → quadrantDiagram-2OG54O6I-BlY5yea6.js} +2 -2
  51. package/dist/{react-plotly-BXWB3UQ5.js → react-plotly-B1SKP2B-.js} +1 -1
  52. package/dist/{requirementDiagram-KVF5MWMF-D_IlbRr_.js → requirementDiagram-SO3GGRV7-rmiJc5mh.js} +5 -4
  53. package/dist/{sankeyDiagram-QLVOVGJD-BHm9uvp_.js → sankeyDiagram-4UZDY2LN-TVzOLFCA.js} +11 -11
  54. package/dist/{sequenceDiagram-X6HHIX6F-3wcWWNtl.js → sequenceDiagram-ZIKVLSP4-POBNIgPB.js} +151 -149
  55. package/dist/{slides-component-JEGZbKgL.js → slides-component-5Y9DQzeV.js} +969 -962
  56. package/dist/stateDiagram-XX37X6EN-lR-7TG5f.js +264 -0
  57. package/dist/{stateDiagram-v2-YXO3MK2T-DTdt4vFc.js → stateDiagram-v2-GD6S3NHB-CYV2YCSY.js} +2 -2
  58. package/dist/style.css +1 -1
  59. package/dist/{time-DyZM4tB4.js → time-BytuUgXk.js} +2 -2
  60. package/dist/{timeline-definition-BDJGKUSR-Of4cvbYH.js → timeline-definition-RI47OAVP-DOrNrVHk.js} +99 -102
  61. package/dist/{radar-MK3ICKWK-BMSp8zaN.js → treemap-FKARHQ26-BOli4yXg.js} +2469 -2330
  62. package/dist/{vega-component-Dwc_9OTG.js → vega-component-KZ-3GH6H.js} +21 -21
  63. package/dist/{xychartDiagram-VJFVF3MP-5Jc993Va.js → xychartDiagram-H2YORKM3-CUOFDcIy.js} +409 -375
  64. package/package.json +37 -37
  65. package/dist/assets/worker-Dz6PPEGc.js +0 -4115
  66. package/dist/chunk-AEK57VVT-BAi7QtEw.js +0 -1416
  67. package/dist/chunk-RZ5BOZE2-D7Ag0UF8.js +0 -24
  68. package/dist/diagram-VNBRO52H-CA8VTm7L.js +0 -126
  69. package/dist/journeyDiagram-U35MCT3I-Co4hTdu9.js +0 -809
  70. package/dist/min-CQBZldos.js +0 -80
  71. package/dist/stateDiagram-DGXRK772-DbH3Rdz4.js +0 -271
@@ -1,14 +1,15 @@
1
1
  var _a, _b;
2
- import { _ as d, G as rt, d as O, e as oe, l as L, z as he, B as de, c as R, a2 as ge, a3 as j, a4 as Wt, a5 as ue, u as $, k as pe, a6 as fe, a7 as xt, a8 as xe, i as Tt } from "./mermaid-DCIbF0Rd.js";
3
- import { c as ye } from "./clone-PHSHUhb-.js";
4
- import { G as be } from "./graph-Btsdly6D.js";
5
- import { c as we } from "./channel-BQIWHLpc.js";
6
- import { l as me, k as Le } from "./timer-BYwnU4DF.js";
2
+ import { g as oe } from "./chunk-E2GYISFI-BzFDmP6o.js";
3
+ import { _ as d, G as rt, d as O, e as he, l as L, z as de, B as ge, c as R, a3 as ue, Q as pe, a4 as j, a5 as Wt, a6 as fe, u as $, k as xe, a7 as ye, a8 as xt, a9 as be, i as Tt } from "./mermaid-CRRCnedu.js";
4
+ import { c as we } from "./clone-DuBujAk0.js";
5
+ import { G as me } from "./graph-txVVq_De.js";
6
+ import { c as Le } from "./channel-Dv_KwBSx.js";
7
+ import { l as Se, k as ke } from "./timer-BYwnU4DF.js";
7
8
  var yt = function() {
8
9
  var e = /* @__PURE__ */ d(function(D, y, g, f) {
9
10
  for (g = g || {}, f = D.length; f--; g[D[f]] = y) ;
10
11
  return g;
11
- }, "o"), t = [1, 7], s = [1, 13], n = [1, 14], i = [1, 15], r = [1, 19], a = [1, 16], l = [1, 17], c = [1, 18], u = [8, 30], h = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], x = [1, 23], w = [1, 24], b = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], S = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], k = {
12
+ }, "o"), t = [1, 7], s = [1, 13], n = [1, 14], i = [1, 15], a = [1, 19], r = [1, 16], l = [1, 17], c = [1, 18], u = [8, 30], h = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], x = [1, 23], w = [1, 24], b = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], S = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], k = {
12
13
  trace: /* @__PURE__ */ d(function() {
13
14
  }, "trace"),
14
15
  yy: {},
@@ -114,7 +115,7 @@ var yt = function() {
114
115
  break;
115
116
  }
116
117
  }, "anonymous"),
117
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: t, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }), e(h, [2, 16], { 14: 22, 15: x, 16: w }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 32: r }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(S, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 32: r }, { 32: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(h, [2, 27]), e(S, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(S, [2, 34]), { 39: [2, 32] }],
118
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 47: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: t, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 47: c }), e(h, [2, 16], { 14: 22, 15: x, 16: w }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 32: a }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 47: c }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(S, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 32: a }, { 32: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: a, 40: r, 44: l, 47: c }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(h, [2, 27]), e(S, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(S, [2, 34]), { 39: [2, 32] }],
118
119
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
119
120
  parseError: /* @__PURE__ */ d(function(y, g) {
120
121
  if (g.recoverable)
@@ -605,20 +606,20 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
605
606
  return d(_, "Parser"), _.prototype = k, k.Parser = _, new _();
606
607
  }();
607
608
  yt.parser = yt;
608
- var Se = yt, X = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", ke = "bgFill", Pt = ",", ve = R(), ct = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ d((e) => pe.sanitizeText(e, ve), "sanitizeText"), _e = /* @__PURE__ */ d(function(e, t = "") {
609
+ var ve = yt, X = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", Ee = "bgFill", Pt = ",", _e = R(), ct = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ d((e) => xe.sanitizeText(e, _e), "sanitizeText"), Ne = /* @__PURE__ */ d(function(e, t = "") {
609
610
  let s = ct.get(e);
610
611
  s || (s = { id: e, styles: [], textStyles: [] }, ct.set(e, s)), t == null ? void 0 : t.split(Pt).forEach((n) => {
611
612
  const i = n.replace(/([^;]*);/, "$1").trim();
612
613
  if (RegExp(Bt).exec(n)) {
613
- const a = i.replace(Ct, ke).replace(Bt, Ct);
614
- s.textStyles.push(a);
614
+ const r = i.replace(Ct, Ee).replace(Bt, Ct);
615
+ s.textStyles.push(r);
615
616
  }
616
617
  s.styles.push(i);
617
618
  });
618
- }, "addStyleClass"), De = /* @__PURE__ */ d(function(e, t = "") {
619
+ }, "addStyleClass"), Te = /* @__PURE__ */ d(function(e, t = "") {
619
620
  const s = X.get(e);
620
621
  t != null && (s.styles = t.split(Pt));
621
- }, "addStyle2Node"), Ne = /* @__PURE__ */ d(function(e, t) {
622
+ }, "addStyle2Node"), Be = /* @__PURE__ */ d(function(e, t) {
622
623
  e.split(",").forEach(function(s) {
623
624
  let n = X.get(s);
624
625
  if (n === void 0) {
@@ -630,38 +631,38 @@ var Se = yt, X = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Ma
630
631
  }, "setCssClass"), Yt = /* @__PURE__ */ d((e, t) => {
631
632
  const s = e.flat(), n = [];
632
633
  for (const i of s) {
633
- if (i.label && (i.label = Ee(i.label)), i.type === "classDef") {
634
- _e(i.id, i.css);
634
+ if (i.label && (i.label = De(i.label)), i.type === "classDef") {
635
+ Ne(i.id, i.css);
635
636
  continue;
636
637
  }
637
638
  if (i.type === "applyClass") {
638
- Ne(i.id, (i == null ? void 0 : i.styleClass) ?? "");
639
+ Be(i.id, (i == null ? void 0 : i.styleClass) ?? "");
639
640
  continue;
640
641
  }
641
642
  if (i.type === "applyStyles") {
642
- (i == null ? void 0 : i.stylesStr) && De(i.id, i == null ? void 0 : i.stylesStr);
643
+ (i == null ? void 0 : i.stylesStr) && Te(i.id, i == null ? void 0 : i.stylesStr);
643
644
  continue;
644
645
  }
645
646
  if (i.type === "column-setting")
646
647
  t.columns = i.columns ?? -1;
647
648
  else if (i.type === "edge") {
648
- const r = (bt.get(i.id) ?? 0) + 1;
649
- bt.set(i.id, r), i.id = r + "-" + i.id, St.push(i);
649
+ const a = (bt.get(i.id) ?? 0) + 1;
650
+ bt.set(i.id, a), i.id = a + "-" + i.id, St.push(i);
650
651
  } else {
651
652
  i.label || (i.type === "composite" ? i.label = "" : i.label = i.id);
652
- const r = X.get(i.id);
653
- if (r === void 0 ? X.set(i.id, i) : (i.type !== "na" && (r.type = i.type), i.label !== i.id && (r.label = i.label)), i.children && Yt(i.children, i), i.type === "space") {
654
- const a = i.width ?? 1;
655
- for (let l = 0; l < a; l++) {
656
- const c = ye(i);
653
+ const a = X.get(i.id);
654
+ if (a === void 0 ? X.set(i.id, i) : (i.type !== "na" && (a.type = i.type), i.label !== i.id && (a.label = i.label)), i.children && Yt(i.children, i), i.type === "space") {
655
+ const r = i.width ?? 1;
656
+ for (let l = 0; l < r; l++) {
657
+ const c = we(i);
657
658
  c.id = c.id + "-" + l, X.set(c.id, c), n.push(c);
658
659
  }
659
- } else r === void 0 && n.push(i);
660
+ } else a === void 0 && n.push(i);
660
661
  }
661
662
  }
662
663
  t.children = n;
663
- }, "populateBlockDatabase"), kt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Te = /* @__PURE__ */ d(() => {
664
- L.debug("Clear called"), he(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), kt = [], ct = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map();
664
+ }, "populateBlockDatabase"), kt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Ce = /* @__PURE__ */ d(() => {
665
+ L.debug("Clear called"), de(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), kt = [], ct = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map();
665
666
  }, "clear");
666
667
  function Ht(e) {
667
668
  switch (L.debug("typeStr2Type", e), e) {
@@ -720,35 +721,35 @@ function Xt(e) {
720
721
  }
721
722
  }
722
723
  d(Xt, "edgeStrToEdgeData");
723
- var It = 0, Be = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Ce = /* @__PURE__ */ d((e) => {
724
+ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Oe = /* @__PURE__ */ d((e) => {
724
725
  et.children = e, Yt(e, et), kt = et.children;
725
- }, "setHierarchy"), Ie = /* @__PURE__ */ d((e) => {
726
+ }, "setHierarchy"), Re = /* @__PURE__ */ d((e) => {
726
727
  const t = X.get(e);
727
728
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
728
- }, "getColumns"), Oe = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Re = /* @__PURE__ */ d(() => kt || [], "getBlocks"), ze = /* @__PURE__ */ d(() => St, "getEdges"), Ae = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), Me = /* @__PURE__ */ d((e) => {
729
+ }, "getColumns"), ze = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Ae = /* @__PURE__ */ d(() => kt || [], "getBlocks"), Me = /* @__PURE__ */ d(() => St, "getEdges"), Fe = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), We = /* @__PURE__ */ d((e) => {
729
730
  X.set(e.id, e);
730
- }, "setBlock"), Fe = /* @__PURE__ */ d(() => console, "getLogger"), We = /* @__PURE__ */ d(function() {
731
+ }, "setBlock"), Pe = /* @__PURE__ */ d(() => console, "getLogger"), Ye = /* @__PURE__ */ d(function() {
731
732
  return ct;
732
- }, "getClasses"), Pe = {
733
+ }, "getClasses"), He = {
733
734
  getConfig: /* @__PURE__ */ d(() => rt().block, "getConfig"),
734
735
  typeStr2Type: Ht,
735
736
  edgeTypeStr2Type: Kt,
736
737
  edgeStrToEdgeData: Xt,
737
- getLogger: Fe,
738
- getBlocksFlat: Oe,
739
- getBlocks: Re,
740
- getEdges: ze,
741
- setHierarchy: Ce,
742
- getBlock: Ae,
743
- setBlock: Me,
744
- getColumns: Ie,
745
- getClasses: We,
746
- clear: Te,
747
- generateId: Be
748
- }, Ye = Pe, nt = /* @__PURE__ */ d((e, t) => {
749
- const s = we, n = s(e, "r"), i = s(e, "g"), r = s(e, "b");
750
- return de(n, i, r, t);
751
- }, "fade"), He = /* @__PURE__ */ d((e) => `.label {
738
+ getLogger: Pe,
739
+ getBlocksFlat: ze,
740
+ getBlocks: Ae,
741
+ getEdges: Me,
742
+ setHierarchy: Oe,
743
+ getBlock: Fe,
744
+ setBlock: We,
745
+ getColumns: Re,
746
+ getClasses: Ye,
747
+ clear: Ce,
748
+ generateId: Ie
749
+ }, Ke = He, nt = /* @__PURE__ */ d((e, t) => {
750
+ const s = Le, n = s(e, "r"), i = s(e, "g"), a = s(e, "b");
751
+ return ge(n, i, a, t);
752
+ }, "fade"), Xe = /* @__PURE__ */ d((e) => `.label {
752
753
  font-family: ${e.fontFamily};
753
754
  color: ${e.nodeTextColor || e.textColor};
754
755
  }
@@ -860,39 +861,40 @@ var It = 0, Be = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(3
860
861
  font-size: 18px;
861
862
  fill: ${e.textColor};
862
863
  }
863
- `, "getStyles"), Ke = He, Xe = /* @__PURE__ */ d((e, t, s, n) => {
864
+ ${oe()}
865
+ `, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t, s, n) => {
864
866
  t.forEach((i) => {
865
- tr[i](e, s, n);
867
+ rr[i](e, s, n);
866
868
  });
867
- }, "insertMarkers"), Ue = /* @__PURE__ */ d((e, t, s) => {
869
+ }, "insertMarkers"), Ve = /* @__PURE__ */ d((e, t, s) => {
868
870
  L.trace("Making markers for ", s), e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
869
- }, "extension"), je = /* @__PURE__ */ d((e, t, s) => {
871
+ }, "extension"), Ge = /* @__PURE__ */ d((e, t, s) => {
870
872
  e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
871
- }, "composition"), Ve = /* @__PURE__ */ d((e, t, s) => {
873
+ }, "composition"), Ze = /* @__PURE__ */ d((e, t, s) => {
872
874
  e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
873
- }, "aggregation"), Ge = /* @__PURE__ */ d((e, t, s) => {
875
+ }, "aggregation"), qe = /* @__PURE__ */ d((e, t, s) => {
874
876
  e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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");
875
- }, "dependency"), Ze = /* @__PURE__ */ d((e, t, s) => {
877
+ }, "dependency"), Je = /* @__PURE__ */ d((e, t, s) => {
876
878
  e.append("defs").append("marker").attr("id", s + "_" + 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", s + "_" + 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);
877
- }, "lollipop"), qe = /* @__PURE__ */ d((e, t, s) => {
879
+ }, "lollipop"), Qe = /* @__PURE__ */ d((e, t, s) => {
878
880
  e.append("marker").attr("id", s + "_" + 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", s + "_" + 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");
879
- }, "point"), Je = /* @__PURE__ */ d((e, t, s) => {
881
+ }, "point"), $e = /* @__PURE__ */ d((e, t, s) => {
880
882
  e.append("marker").attr("id", s + "_" + 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", s + "_" + 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");
881
- }, "circle"), Qe = /* @__PURE__ */ d((e, t, s) => {
883
+ }, "circle"), tr = /* @__PURE__ */ d((e, t, s) => {
882
884
  e.append("marker").attr("id", s + "_" + 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", s + "_" + 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");
883
- }, "cross"), $e = /* @__PURE__ */ d((e, t, s) => {
885
+ }, "cross"), er = /* @__PURE__ */ d((e, t, s) => {
884
886
  e.append("defs").append("marker").attr("id", s + "_" + 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");
885
- }, "barb"), tr = {
886
- extension: Ue,
887
- composition: je,
888
- aggregation: Ve,
889
- dependency: Ge,
890
- lollipop: Ze,
891
- point: qe,
892
- circle: Je,
893
- cross: Qe,
894
- barb: $e
895
- }, er = Xe, C = ((_b = (_a = R()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) ?? 8;
887
+ }, "barb"), rr = {
888
+ extension: Ve,
889
+ composition: Ge,
890
+ aggregation: Ze,
891
+ dependency: qe,
892
+ lollipop: Je,
893
+ point: Qe,
894
+ circle: $e,
895
+ cross: tr,
896
+ barb: er
897
+ }, ar = je, C = ((_b = (_a = R()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) ?? 8;
896
898
  function Ut(e, t) {
897
899
  if (e === 0 || !Number.isInteger(e))
898
900
  throw new Error("Columns must be an integer !== 0.");
@@ -906,23 +908,23 @@ function Ut(e, t) {
906
908
  return { px: s, py: n };
907
909
  }
908
910
  d(Ut, "calculateBlockPosition");
909
- var rr = /* @__PURE__ */ d((e) => {
911
+ var sr = /* @__PURE__ */ d((e) => {
910
912
  let t = 0, s = 0;
911
913
  for (const n of e.children) {
912
- const { width: i, height: r, x: a, y: l } = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
914
+ const { width: i, height: a, x: r, y: l } = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
913
915
  L.debug(
914
916
  "getMaxChildSize abc95 child:",
915
917
  n.id,
916
918
  "width:",
917
919
  i,
918
920
  "height:",
919
- r,
920
- "x:",
921
921
  a,
922
+ "x:",
923
+ r,
922
924
  "y:",
923
925
  l,
924
926
  n.type
925
- ), n.type !== "space" && (i > t && (t = i / (e.widthInColumns ?? 1)), r > s && (s = r));
927
+ ), n.type !== "space" && (i > t && (t = i / (e.widthInColumns ?? 1)), a > s && (s = a));
926
928
  }
927
929
  return { width: t, height: s };
928
930
  }, "getMaxChildSize");
@@ -934,7 +936,7 @@ function ot(e, t, s = 0, n = 0) {
934
936
  (_a2 = e == null ? void 0 : e.size) == null ? void 0 : _a2.x,
935
937
  "block width =",
936
938
  e == null ? void 0 : e.size,
937
- "sieblingWidth",
939
+ "siblingWidth",
938
940
  s
939
941
  ), ((_b2 = e == null ? void 0 : e.size) == null ? void 0 : _b2.width) || (e.size = {
940
942
  width: s,
@@ -942,20 +944,20 @@ function ot(e, t, s = 0, n = 0) {
942
944
  x: 0,
943
945
  y: 0
944
946
  });
945
- let i = 0, r = 0;
947
+ let i = 0, a = 0;
946
948
  if (((_c = e.children) == null ? void 0 : _c.length) > 0) {
947
949
  for (const b of e.children)
948
950
  ot(b, t);
949
- const a = rr(e);
950
- i = a.width, r = a.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, r);
951
+ const r = sr(e);
952
+ i = r.width, a = r.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
951
953
  for (const b of e.children)
952
954
  b.size && (L.debug(
953
- `abc95 Setting size of children of ${e.id} id=${b.id} ${i} ${r} ${JSON.stringify(b.size)}`
954
- ), b.size.width = i * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = r, b.size.x = 0, b.size.y = 0, L.debug(
955
- `abc95 updating size of ${e.id} children child:${b.id} maxWidth:${i} maxHeight:${r}`
955
+ `abc95 Setting size of children of ${e.id} id=${b.id} ${i} ${a} ${JSON.stringify(b.size)}`
956
+ ), b.size.width = i * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = a, b.size.x = 0, b.size.y = 0, L.debug(
957
+ `abc95 updating size of ${e.id} children child:${b.id} maxWidth:${i} maxHeight:${a}`
956
958
  ));
957
959
  for (const b of e.children)
958
- ot(b, t, i, r);
960
+ ot(b, t, i, a);
959
961
  const l = e.columns ?? -1;
960
962
  let c = 0;
961
963
  for (const b of e.children)
@@ -963,13 +965,13 @@ function ot(e, t, s = 0, n = 0) {
963
965
  let u = e.children.length;
964
966
  l > 0 && l < c && (u = l);
965
967
  const h = Math.ceil(c / u);
966
- let x = u * (i + C) + C, w = h * (r + C) + C;
968
+ let x = u * (i + C) + C, w = h * (a + C) + C;
967
969
  if (x < s) {
968
970
  L.debug(
969
- `Detected to small siebling: abc95 ${e.id} sieblingWidth ${s} sieblingHeight ${n} width ${x}`
971
+ `Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${n} width ${x}`
970
972
  ), x = s, w = n;
971
973
  const b = (s - u * C - C) / u, S = (n - h * C - C) / h;
972
- L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", i), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", r), L.debug("Size indata abc88 xSize", u, "padding", C);
974
+ L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", i), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", a), L.debug("Size indata abc88 xSize", u, "padding", C);
973
975
  for (const E of e.children)
974
976
  E.size && (E.size.width = b, E.size.height = S, E.size.x = 0, E.size.y = 0);
975
977
  }
@@ -1012,25 +1014,25 @@ function vt(e, t) {
1012
1014
  e.children.length > 0) {
1013
1015
  const n = ((_e2 = (_d = e == null ? void 0 : e.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e2.width) ?? 0, i = e.children.length * n + (e.children.length - 1) * C;
1014
1016
  L.debug("widthOfChildren 88", i, "posX");
1015
- let r = 0;
1017
+ let a = 0;
1016
1018
  L.debug("abc91 block?.size?.x", e.id, (_f = e == null ? void 0 : e.size) == null ? void 0 : _f.x);
1017
- let a = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C, l = 0;
1019
+ let r = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C, l = 0;
1018
1020
  for (const c of e.children) {
1019
1021
  const u = e;
1020
1022
  if (!c.size)
1021
1023
  continue;
1022
- const { width: h, height: x } = c.size, { px: w, py: b } = Ut(s, r);
1023
- if (b != l && (l = b, a = ((_j = e == null ? void 0 : e.size) == null ? void 0 : _j.x) ? ((_k = e == null ? void 0 : e.size) == null ? void 0 : _k.x) + (-((_l = e == null ? void 0 : e.size) == null ? void 0 : _l.width) / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, l)), L.debug(
1024
- `abc89 layout blocks (child) id: ${c.id} Pos: ${r} (px, py) ${w},${b} (${(_m = u == null ? void 0 : u.size) == null ? void 0 : _m.x},${(_n = u == null ? void 0 : u.size) == null ? void 0 : _n.y}) parent: ${u.id} width: ${h}${C}`
1024
+ const { width: h, height: x } = c.size, { px: w, py: b } = Ut(s, a);
1025
+ if (b != l && (l = b, r = ((_j = e == null ? void 0 : e.size) == null ? void 0 : _j.x) ? ((_k = e == null ? void 0 : e.size) == null ? void 0 : _k.x) + (-((_l = e == null ? void 0 : e.size) == null ? void 0 : _l.width) / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, l)), L.debug(
1026
+ `abc89 layout blocks (child) id: ${c.id} Pos: ${a} (px, py) ${w},${b} (${(_m = u == null ? void 0 : u.size) == null ? void 0 : _m.x},${(_n = u == null ? void 0 : u.size) == null ? void 0 : _n.y}) parent: ${u.id} width: ${h}${C}`
1025
1027
  ), u.size) {
1026
1028
  const S = h / 2;
1027
- c.size.x = a + C + S, L.debug(
1028
- `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${a} new startingPosX${c.size.x} ${S} padding=${C} width=${h} halfWidth=${S} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1029
- ), a = c.size.x + S, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
1030
- `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${a}${C}${S}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1029
+ c.size.x = r + C + S, L.debug(
1030
+ `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${S} padding=${C} width=${h} halfWidth=${S} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1031
+ ), r = c.size.x + S, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
1032
+ `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${S}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1031
1033
  );
1032
1034
  }
1033
- c.children && vt(c), r += (c == null ? void 0 : c.widthInColumns) ?? 1, L.debug("abc88 columnsPos", c, r);
1035
+ c.children && vt(c), a += (c == null ? void 0 : c.widthInColumns) ?? 1, L.debug("abc88 columnsPos", c, a);
1034
1036
  }
1035
1037
  }
1036
1038
  L.debug(
@@ -1040,12 +1042,12 @@ function vt(e, t) {
1040
1042
  d(vt, "layoutBlocks");
1041
1043
  function Et(e, { minX: t, minY: s, maxX: n, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1042
1044
  if (e.size && e.id !== "root") {
1043
- const { x: r, y: a, width: l, height: c } = e.size;
1044
- r - l / 2 < t && (t = r - l / 2), a - c / 2 < s && (s = a - c / 2), r + l / 2 > n && (n = r + l / 2), a + c / 2 > i && (i = a + c / 2);
1045
+ const { x: a, y: r, width: l, height: c } = e.size;
1046
+ a - l / 2 < t && (t = a - l / 2), r - c / 2 < s && (s = r - c / 2), a + l / 2 > n && (n = a + l / 2), r + c / 2 > i && (i = r + c / 2);
1045
1047
  }
1046
1048
  if (e.children)
1047
- for (const r of e.children)
1048
- ({ minX: t, minY: s, maxX: n, maxY: i } = Et(r, { minX: t, minY: s, maxX: n, maxY: i }));
1049
+ for (const a of e.children)
1050
+ ({ minX: t, minY: s, maxX: n, maxY: i } = Et(a, { minX: t, minY: s, maxX: n, maxY: i }));
1049
1051
  return { minX: t, minY: s, maxX: n, maxY: i };
1050
1052
  }
1051
1053
  d(Et, "findBounds");
@@ -1054,8 +1056,8 @@ function jt(e) {
1054
1056
  if (!t)
1055
1057
  return;
1056
1058
  ot(t, e, 0, 0), vt(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
1057
- const { minX: s, minY: n, maxX: i, maxY: r } = Et(t), a = r - n, l = i - s;
1058
- return { x: s, y: n, width: l, height: a };
1059
+ const { minX: s, minY: n, maxX: i, maxY: a } = Et(t), r = a - n, l = i - s;
1060
+ return { x: s, y: n, width: l, height: r };
1059
1061
  }
1060
1062
  d(jt, "layout");
1061
1063
  function wt(e, t) {
@@ -1063,34 +1065,34 @@ function wt(e, t) {
1063
1065
  }
1064
1066
  d(wt, "applyStyle");
1065
1067
  function Vt(e) {
1066
- const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), s = t.append("xhtml:div"), n = e.label, i = e.isNode ? "nodeLabel" : "edgeLabel", r = s.append("span");
1067
- return r.html(n), wt(r, e.labelStyle), r.attr("class", i), wt(s, e.labelStyle), s.style("display", "inline-block"), s.style("white-space", "nowrap"), s.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
1068
+ const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), s = t.append("xhtml:div"), n = e.label, i = e.isNode ? "nodeLabel" : "edgeLabel", a = s.append("span");
1069
+ return a.html(n), wt(a, e.labelStyle), a.attr("class", i), wt(s, e.labelStyle), s.style("display", "inline-block"), s.style("white-space", "nowrap"), s.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
1068
1070
  }
1069
1071
  d(Vt, "addHtmlLabel");
1070
- var ar = /* @__PURE__ */ d((e, t, s, n) => {
1072
+ var ir = /* @__PURE__ */ d(async (e, t, s, n) => {
1071
1073
  let i = e || "";
1072
1074
  if (typeof i == "object" && (i = i[0]), j(R().flowchart.htmlLabels)) {
1073
1075
  i = i.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + i);
1074
- const r = {
1076
+ const a = await ye(xt(i)), r = {
1075
1077
  isNode: n,
1076
- label: fe(xt(i)),
1078
+ label: a,
1077
1079
  labelStyle: t.replace("fill:", "color:")
1078
1080
  };
1079
1081
  return Vt(r);
1080
1082
  } else {
1081
- const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
1082
- r.setAttribute("style", t.replace("color:", "fill:"));
1083
- let a = [];
1084
- typeof i == "string" ? a = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? a = i : a = [];
1085
- for (const l of a) {
1083
+ const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
1084
+ a.setAttribute("style", t.replace("color:", "fill:"));
1085
+ let r = [];
1086
+ typeof i == "string" ? r = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? r = i : r = [];
1087
+ for (const l of r) {
1086
1088
  const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1087
- c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), s ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), r.appendChild(c);
1089
+ c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), s ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), a.appendChild(c);
1088
1090
  }
1089
- return r;
1091
+ return a;
1090
1092
  }
1091
- }, "createLabel"), K = ar, sr = /* @__PURE__ */ d((e, t, s, n, i) => {
1093
+ }, "createLabel"), K = ir, nr = /* @__PURE__ */ d((e, t, s, n, i) => {
1092
1094
  t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart, s, n, i), t.arrowTypeEnd && Ot(e, "end", t.arrowTypeEnd, s, n, i);
1093
- }, "addEdgeMarkers"), ir = {
1095
+ }, "addEdgeMarkers"), lr = {
1094
1096
  arrow_cross: "cross",
1095
1097
  arrow_point: "point",
1096
1098
  arrow_barb: "barb",
@@ -1100,15 +1102,15 @@ var ar = /* @__PURE__ */ d((e, t, s, n) => {
1100
1102
  composition: "composition",
1101
1103
  dependency: "dependency",
1102
1104
  lollipop: "lollipop"
1103
- }, Ot = /* @__PURE__ */ d((e, t, s, n, i, r) => {
1104
- const a = ir[s];
1105
- if (!a) {
1105
+ }, Ot = /* @__PURE__ */ d((e, t, s, n, i, a) => {
1106
+ const r = lr[s];
1107
+ if (!r) {
1106
1108
  L.warn(`Unknown arrow type: ${s}`);
1107
1109
  return;
1108
1110
  }
1109
1111
  const l = t === "start" ? "Start" : "End";
1110
- e.attr(`marker-${t}`, `url(${n}#${i}_${r}-${a}${l})`);
1111
- }, "addEdgeMarker"), mt = {}, M = {}, nr = /* @__PURE__ */ d((e, t) => {
1112
+ e.attr(`marker-${t}`, `url(${n}#${i}_${a}-${r}${l})`);
1113
+ }, "addEdgeMarker"), mt = {}, M = {}, cr = /* @__PURE__ */ d(async (e, t) => {
1112
1114
  const s = R(), n = j(s.flowchart.htmlLabels), i = t.labelType === "markdown" ? Wt(
1113
1115
  e,
1114
1116
  t.label,
@@ -1118,35 +1120,35 @@ var ar = /* @__PURE__ */ d((e, t, s, n) => {
1118
1120
  addSvgBackground: true
1119
1121
  },
1120
1122
  s
1121
- ) : K(t.label, t.labelStyle), r = e.insert("g").attr("class", "edgeLabel"), a = r.insert("g").attr("class", "label");
1122
- a.node().appendChild(i);
1123
+ ) : await K(t.label, t.labelStyle), a = e.insert("g").attr("class", "edgeLabel"), r = a.insert("g").attr("class", "label");
1124
+ r.node().appendChild(i);
1123
1125
  let l = i.getBBox();
1124
1126
  if (n) {
1125
1127
  const u = i.children[0], h = O(i);
1126
1128
  l = u.getBoundingClientRect(), h.attr("width", l.width), h.attr("height", l.height);
1127
1129
  }
1128
- a.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), mt[t.id] = r, t.width = l.width, t.height = l.height;
1130
+ r.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), mt[t.id] = a, t.width = l.width, t.height = l.height;
1129
1131
  let c;
1130
1132
  if (t.startLabelLeft) {
1131
- const u = K(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1133
+ const u = await K(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1132
1134
  c = x.node().appendChild(u);
1133
1135
  const w = u.getBBox();
1134
1136
  x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft = h, tt(c, t.startLabelLeft);
1135
1137
  }
1136
1138
  if (t.startLabelRight) {
1137
- const u = K(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1139
+ const u = await K(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1138
1140
  c = h.node().appendChild(u), x.node().appendChild(u);
1139
1141
  const w = u.getBBox();
1140
1142
  x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight = h, tt(c, t.startLabelRight);
1141
1143
  }
1142
1144
  if (t.endLabelLeft) {
1143
- const u = K(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1145
+ const u = await K(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1144
1146
  c = x.node().appendChild(u);
1145
1147
  const w = u.getBBox();
1146
1148
  x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), h.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endLeft = h, tt(c, t.endLabelLeft);
1147
1149
  }
1148
1150
  if (t.endLabelRight) {
1149
- const u = K(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1151
+ const u = await K(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1150
1152
  c = x.node().appendChild(u);
1151
1153
  const w = u.getBBox();
1152
1154
  x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), h.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endRight = h, tt(c, t.endLabelRight);
@@ -1157,18 +1159,18 @@ function tt(e, t) {
1157
1159
  R().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1158
1160
  }
1159
1161
  d(tt, "setTerminalWidth");
1160
- var lr = /* @__PURE__ */ d((e, t) => {
1162
+ var or = /* @__PURE__ */ d((e, t) => {
1161
1163
  L.debug("Moving label abc88 ", e.id, e.label, mt[e.id], t);
1162
1164
  let s = t.updatedPath ? t.updatedPath : t.originalPath;
1163
- const n = R(), { subGraphTitleTotalMargin: i } = ue(n);
1165
+ const n = R(), { subGraphTitleTotalMargin: i } = fe(n);
1164
1166
  if (e.label) {
1165
- const r = mt[e.id];
1166
- let a = e.x, l = e.y;
1167
+ const a = mt[e.id];
1168
+ let r = e.x, l = e.y;
1167
1169
  if (s) {
1168
1170
  const c = $.calcLabelPosition(s);
1169
1171
  L.debug(
1170
1172
  "Moving label " + e.label + " from (",
1171
- a,
1173
+ r,
1172
1174
  ",",
1173
1175
  l,
1174
1176
  ") to (",
@@ -1176,62 +1178,62 @@ var lr = /* @__PURE__ */ d((e, t) => {
1176
1178
  ",",
1177
1179
  c.y,
1178
1180
  ") abc88"
1179
- ), t.updatedPath && (a = c.x, l = c.y);
1181
+ ), t.updatedPath && (r = c.x, l = c.y);
1180
1182
  }
1181
- r.attr("transform", `translate(${a}, ${l + i / 2})`);
1183
+ a.attr("transform", `translate(${r}, ${l + i / 2})`);
1182
1184
  }
1183
1185
  if (e.startLabelLeft) {
1184
- const r = M[e.id].startLeft;
1185
- let a = e.x, l = e.y;
1186
+ const a = M[e.id].startLeft;
1187
+ let r = e.x, l = e.y;
1186
1188
  if (s) {
1187
1189
  const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", s);
1188
- a = c.x, l = c.y;
1190
+ r = c.x, l = c.y;
1189
1191
  }
1190
- r.attr("transform", `translate(${a}, ${l})`);
1192
+ a.attr("transform", `translate(${r}, ${l})`);
1191
1193
  }
1192
1194
  if (e.startLabelRight) {
1193
- const r = M[e.id].startRight;
1194
- let a = e.x, l = e.y;
1195
+ const a = M[e.id].startRight;
1196
+ let r = e.x, l = e.y;
1195
1197
  if (s) {
1196
1198
  const c = $.calcTerminalLabelPosition(
1197
1199
  e.arrowTypeStart ? 10 : 0,
1198
1200
  "start_right",
1199
1201
  s
1200
1202
  );
1201
- a = c.x, l = c.y;
1203
+ r = c.x, l = c.y;
1202
1204
  }
1203
- r.attr("transform", `translate(${a}, ${l})`);
1205
+ a.attr("transform", `translate(${r}, ${l})`);
1204
1206
  }
1205
1207
  if (e.endLabelLeft) {
1206
- const r = M[e.id].endLeft;
1207
- let a = e.x, l = e.y;
1208
+ const a = M[e.id].endLeft;
1209
+ let r = e.x, l = e.y;
1208
1210
  if (s) {
1209
1211
  const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", s);
1210
- a = c.x, l = c.y;
1212
+ r = c.x, l = c.y;
1211
1213
  }
1212
- r.attr("transform", `translate(${a}, ${l})`);
1214
+ a.attr("transform", `translate(${r}, ${l})`);
1213
1215
  }
1214
1216
  if (e.endLabelRight) {
1215
- const r = M[e.id].endRight;
1216
- let a = e.x, l = e.y;
1217
+ const a = M[e.id].endRight;
1218
+ let r = e.x, l = e.y;
1217
1219
  if (s) {
1218
1220
  const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", s);
1219
- a = c.x, l = c.y;
1221
+ r = c.x, l = c.y;
1220
1222
  }
1221
- r.attr("transform", `translate(${a}, ${l})`);
1223
+ a.attr("transform", `translate(${r}, ${l})`);
1222
1224
  }
1223
- }, "positionEdgeLabel"), cr = /* @__PURE__ */ d((e, t) => {
1224
- const s = e.x, n = e.y, i = Math.abs(t.x - s), r = Math.abs(t.y - n), a = e.width / 2, l = e.height / 2;
1225
- return i >= a || r >= l;
1226
- }, "outsideNode"), or = /* @__PURE__ */ d((e, t, s) => {
1225
+ }, "positionEdgeLabel"), hr = /* @__PURE__ */ d((e, t) => {
1226
+ const s = e.x, n = e.y, i = Math.abs(t.x - s), a = Math.abs(t.y - n), r = e.width / 2, l = e.height / 2;
1227
+ return i >= r || a >= l;
1228
+ }, "outsideNode"), dr = /* @__PURE__ */ d((e, t, s) => {
1227
1229
  L.debug(`intersection calc abc89:
1228
1230
  outsidePoint: ${JSON.stringify(t)}
1229
1231
  insidePoint : ${JSON.stringify(s)}
1230
1232
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1231
- const n = e.x, i = e.y, r = Math.abs(n - s.x), a = e.width / 2;
1232
- let l = s.x < t.x ? a - r : a + r;
1233
+ const n = e.x, i = e.y, a = Math.abs(n - s.x), r = e.width / 2;
1234
+ let l = s.x < t.x ? r - a : r + a;
1233
1235
  const c = e.height / 2, u = Math.abs(t.y - s.y), h = Math.abs(t.x - s.x);
1234
- if (Math.abs(i - t.y) * a > Math.abs(n - t.x) * c) {
1236
+ if (Math.abs(i - t.y) * r > Math.abs(n - t.x) * c) {
1235
1237
  let x = s.y < t.y ? t.y - c - i : i - c - t.y;
1236
1238
  l = h * x / u;
1237
1239
  const w = {
@@ -1240,34 +1242,34 @@ var lr = /* @__PURE__ */ d((e, t) => {
1240
1242
  };
1241
1243
  return l === 0 && (w.x = t.x, w.y = t.y), h === 0 && (w.x = t.x), u === 0 && (w.y = t.y), L.debug(`abc89 topp/bott calc, Q ${u}, q ${x}, R ${h}, r ${l}`, w), w;
1242
1244
  } else {
1243
- s.x < t.x ? l = t.x - a - n : l = n - a - t.x;
1245
+ s.x < t.x ? l = t.x - r - n : l = n - r - t.x;
1244
1246
  let x = u * l / h, w = s.x < t.x ? s.x + h - l : s.x - h + l, b = s.y < t.y ? s.y + x : s.y - x;
1245
1247
  return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${h}, r ${l}`, { _x: w, _y: b }), l === 0 && (w = t.x, b = t.y), h === 0 && (w = t.x), u === 0 && (b = t.y), { x: w, y: b };
1246
1248
  }
1247
1249
  }, "intersection"), Rt = /* @__PURE__ */ d((e, t) => {
1248
1250
  L.debug("abc88 cutPathAtIntersect", e, t);
1249
1251
  let s = [], n = e[0], i = false;
1250
- return e.forEach((r) => {
1251
- if (!cr(t, r) && !i) {
1252
- const a = or(t, n, r);
1252
+ return e.forEach((a) => {
1253
+ if (!hr(t, a) && !i) {
1254
+ const r = dr(t, n, a);
1253
1255
  let l = false;
1254
1256
  s.forEach((c) => {
1255
- l = l || c.x === a.x && c.y === a.y;
1256
- }), s.some((c) => c.x === a.x && c.y === a.y) || s.push(a), i = true;
1257
+ l = l || c.x === r.x && c.y === r.y;
1258
+ }), s.some((c) => c.x === r.x && c.y === r.y) || s.push(r), i = true;
1257
1259
  } else
1258
- n = r, i || s.push(r);
1260
+ n = a, i || s.push(a);
1259
1261
  }), s;
1260
- }, "cutPathAtIntersect"), hr = /* @__PURE__ */ d(function(e, t, s, n, i, r, a) {
1262
+ }, "cutPathAtIntersect"), gr = /* @__PURE__ */ d(function(e, t, s, n, i, a, r) {
1261
1263
  let l = s.points;
1262
1264
  L.debug("abc88 InsertEdge: edge=", s, "e=", t);
1263
1265
  let c = false;
1264
- const u = r.node(t.v);
1265
- var h = r.node(t.w);
1266
+ const u = a.node(t.v);
1267
+ var h = a.node(t.w);
1266
1268
  (h == null ? void 0 : h.intersect) && (u == null ? void 0 : u.intersect) && (l = l.slice(1, s.points.length - 1), l.unshift(u.intersect(l[0])), l.push(h.intersect(l[l.length - 1]))), s.toCluster && (L.debug("to cluster abc88", n[s.toCluster]), l = Rt(s.points, n[s.toCluster].node), c = true), s.fromCluster && (L.debug("from cluster abc88", n[s.fromCluster]), l = Rt(l.reverse(), n[s.fromCluster].node).reverse(), c = true);
1267
1269
  const x = l.filter((y) => !Number.isNaN(y.y));
1268
- let w = Le;
1270
+ let w = ke;
1269
1271
  s.curve && (i === "graph" || i === "flowchart") && (w = s.curve);
1270
- const { x: b, y: S } = ge(s), E = me().x(b).y(S).curve(w);
1272
+ const { x: b, y: S } = ue(s), E = Se().x(b).y(S).curve(w);
1271
1273
  let k;
1272
1274
  switch (s.thickness) {
1273
1275
  case "normal":
@@ -1295,10 +1297,10 @@ var lr = /* @__PURE__ */ d((e, t) => {
1295
1297
  }
1296
1298
  const B = e.append("path").attr("d", E(x)).attr("id", s.id).attr("class", " " + k + (s.classes ? " " + s.classes : "")).attr("style", s.style);
1297
1299
  let _ = "";
1298
- (R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), sr(B, s, _, a, i);
1300
+ (R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = pe(true)), nr(B, s, _, r, i);
1299
1301
  let D = {};
1300
1302
  return c && (D.updatedPath = l), D.originalPath = s.points, D;
1301
- }, "insertEdge"), dr = /* @__PURE__ */ d((e) => {
1303
+ }, "insertEdge"), ur = /* @__PURE__ */ d((e) => {
1302
1304
  const t = /* @__PURE__ */ new Set();
1303
1305
  for (const s of e)
1304
1306
  switch (s) {
@@ -1313,136 +1315,136 @@ var lr = /* @__PURE__ */ d((e, t) => {
1313
1315
  break;
1314
1316
  }
1315
1317
  return t;
1316
- }, "expandAndDeduplicateDirections"), gr = /* @__PURE__ */ d((e, t, s) => {
1317
- const n = dr(e), i = 2, r = t.height + 2 * s.padding, a = r / i, l = t.width + 2 * a + s.padding, c = s.padding / 2;
1318
+ }, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ d((e, t, s) => {
1319
+ const n = ur(e), i = 2, a = t.height + 2 * s.padding, r = a / i, l = t.width + 2 * r + s.padding, c = s.padding / 2;
1318
1320
  return n.has("right") && n.has("left") && n.has("up") && n.has("down") ? [
1319
1321
  // Bottom
1320
1322
  { x: 0, y: 0 },
1321
- { x: a, y: 0 },
1323
+ { x: r, y: 0 },
1322
1324
  { x: l / 2, y: 2 * c },
1323
- { x: l - a, y: 0 },
1325
+ { x: l - r, y: 0 },
1324
1326
  { x: l, y: 0 },
1325
1327
  // Right
1326
- { x: l, y: -r / 3 },
1327
- { x: l + 2 * c, y: -r / 2 },
1328
- { x: l, y: -2 * r / 3 },
1329
- { x: l, y: -r },
1328
+ { x: l, y: -a / 3 },
1329
+ { x: l + 2 * c, y: -a / 2 },
1330
+ { x: l, y: -2 * a / 3 },
1331
+ { x: l, y: -a },
1330
1332
  // Top
1331
- { x: l - a, y: -r },
1332
- { x: l / 2, y: -r - 2 * c },
1333
- { x: a, y: -r },
1333
+ { x: l - r, y: -a },
1334
+ { x: l / 2, y: -a - 2 * c },
1335
+ { x: r, y: -a },
1334
1336
  // Left
1335
- { x: 0, y: -r },
1336
- { x: 0, y: -2 * r / 3 },
1337
- { x: -2 * c, y: -r / 2 },
1338
- { x: 0, y: -r / 3 }
1337
+ { x: 0, y: -a },
1338
+ { x: 0, y: -2 * a / 3 },
1339
+ { x: -2 * c, y: -a / 2 },
1340
+ { x: 0, y: -a / 3 }
1339
1341
  ] : n.has("right") && n.has("left") && n.has("up") ? [
1340
- { x: a, y: 0 },
1341
- { x: l - a, y: 0 },
1342
- { x: l, y: -r / 2 },
1343
- { x: l - a, y: -r },
1344
- { x: a, y: -r },
1345
- { x: 0, y: -r / 2 }
1342
+ { x: r, y: 0 },
1343
+ { x: l - r, y: 0 },
1344
+ { x: l, y: -a / 2 },
1345
+ { x: l - r, y: -a },
1346
+ { x: r, y: -a },
1347
+ { x: 0, y: -a / 2 }
1346
1348
  ] : n.has("right") && n.has("left") && n.has("down") ? [
1347
1349
  { x: 0, y: 0 },
1348
- { x: a, y: -r },
1349
- { x: l - a, y: -r },
1350
+ { x: r, y: -a },
1351
+ { x: l - r, y: -a },
1350
1352
  { x: l, y: 0 }
1351
1353
  ] : n.has("right") && n.has("up") && n.has("down") ? [
1352
1354
  { x: 0, y: 0 },
1353
- { x: l, y: -a },
1354
- { x: l, y: -r + a },
1355
- { x: 0, y: -r }
1355
+ { x: l, y: -r },
1356
+ { x: l, y: -a + r },
1357
+ { x: 0, y: -a }
1356
1358
  ] : n.has("left") && n.has("up") && n.has("down") ? [
1357
1359
  { x: l, y: 0 },
1358
- { x: 0, y: -a },
1359
- { x: 0, y: -r + a },
1360
- { x: l, y: -r }
1360
+ { x: 0, y: -r },
1361
+ { x: 0, y: -a + r },
1362
+ { x: l, y: -a }
1361
1363
  ] : n.has("right") && n.has("left") ? [
1362
- { x: a, y: 0 },
1363
- { x: a, y: -c },
1364
- { x: l - a, y: -c },
1365
- { x: l - a, y: 0 },
1366
- { x: l, y: -r / 2 },
1367
- { x: l - a, y: -r },
1368
- { x: l - a, y: -r + c },
1369
- { x: a, y: -r + c },
1370
- { x: a, y: -r },
1371
- { x: 0, y: -r / 2 }
1364
+ { x: r, y: 0 },
1365
+ { x: r, y: -c },
1366
+ { x: l - r, y: -c },
1367
+ { x: l - r, y: 0 },
1368
+ { x: l, y: -a / 2 },
1369
+ { x: l - r, y: -a },
1370
+ { x: l - r, y: -a + c },
1371
+ { x: r, y: -a + c },
1372
+ { x: r, y: -a },
1373
+ { x: 0, y: -a / 2 }
1372
1374
  ] : n.has("up") && n.has("down") ? [
1373
1375
  // Bottom center
1374
1376
  { x: l / 2, y: 0 },
1375
1377
  // Left pont of bottom arrow
1376
1378
  { x: 0, y: -c },
1377
- { x: a, y: -c },
1379
+ { x: r, y: -c },
1378
1380
  // Left top over vertical section
1379
- { x: a, y: -r + c },
1380
- { x: 0, y: -r + c },
1381
+ { x: r, y: -a + c },
1382
+ { x: 0, y: -a + c },
1381
1383
  // Top of arrow
1382
- { x: l / 2, y: -r },
1383
- { x: l, y: -r + c },
1384
+ { x: l / 2, y: -a },
1385
+ { x: l, y: -a + c },
1384
1386
  // Top of right vertical bar
1385
- { x: l - a, y: -r + c },
1386
- { x: l - a, y: -c },
1387
+ { x: l - r, y: -a + c },
1388
+ { x: l - r, y: -c },
1387
1389
  { x: l, y: -c }
1388
1390
  ] : n.has("right") && n.has("up") ? [
1389
1391
  { x: 0, y: 0 },
1390
- { x: l, y: -a },
1391
- { x: 0, y: -r }
1392
+ { x: l, y: -r },
1393
+ { x: 0, y: -a }
1392
1394
  ] : n.has("right") && n.has("down") ? [
1393
1395
  { x: 0, y: 0 },
1394
1396
  { x: l, y: 0 },
1395
- { x: 0, y: -r }
1397
+ { x: 0, y: -a }
1396
1398
  ] : n.has("left") && n.has("up") ? [
1397
1399
  { x: l, y: 0 },
1398
- { x: 0, y: -a },
1399
- { x: l, y: -r }
1400
+ { x: 0, y: -r },
1401
+ { x: l, y: -a }
1400
1402
  ] : n.has("left") && n.has("down") ? [
1401
1403
  { x: l, y: 0 },
1402
1404
  { x: 0, y: 0 },
1403
- { x: l, y: -r }
1405
+ { x: l, y: -a }
1404
1406
  ] : n.has("right") ? [
1405
- { x: a, y: -c },
1406
- { x: a, y: -c },
1407
- { x: l - a, y: -c },
1408
- { x: l - a, y: 0 },
1409
- { x: l, y: -r / 2 },
1410
- { x: l - a, y: -r },
1411
- { x: l - a, y: -r + c },
1407
+ { x: r, y: -c },
1408
+ { x: r, y: -c },
1409
+ { x: l - r, y: -c },
1410
+ { x: l - r, y: 0 },
1411
+ { x: l, y: -a / 2 },
1412
+ { x: l - r, y: -a },
1413
+ { x: l - r, y: -a + c },
1412
1414
  // top left corner of arrow
1413
- { x: a, y: -r + c },
1414
- { x: a, y: -r + c }
1415
+ { x: r, y: -a + c },
1416
+ { x: r, y: -a + c }
1415
1417
  ] : n.has("left") ? [
1416
- { x: a, y: 0 },
1417
- { x: a, y: -c },
1418
+ { x: r, y: 0 },
1419
+ { x: r, y: -c },
1418
1420
  // Two points, the right corners
1419
- { x: l - a, y: -c },
1420
- { x: l - a, y: -r + c },
1421
- { x: a, y: -r + c },
1422
- { x: a, y: -r },
1423
- { x: 0, y: -r / 2 }
1421
+ { x: l - r, y: -c },
1422
+ { x: l - r, y: -a + c },
1423
+ { x: r, y: -a + c },
1424
+ { x: r, y: -a },
1425
+ { x: 0, y: -a / 2 }
1424
1426
  ] : n.has("up") ? [
1425
1427
  // Bottom center
1426
- { x: a, y: -c },
1428
+ { x: r, y: -c },
1427
1429
  // Left top over vertical section
1428
- { x: a, y: -r + c },
1429
- { x: 0, y: -r + c },
1430
+ { x: r, y: -a + c },
1431
+ { x: 0, y: -a + c },
1430
1432
  // Top of arrow
1431
- { x: l / 2, y: -r },
1432
- { x: l, y: -r + c },
1433
+ { x: l / 2, y: -a },
1434
+ { x: l, y: -a + c },
1433
1435
  // Top of right vertical bar
1434
- { x: l - a, y: -r + c },
1435
- { x: l - a, y: -c }
1436
+ { x: l - r, y: -a + c },
1437
+ { x: l - r, y: -c }
1436
1438
  ] : n.has("down") ? [
1437
1439
  // Bottom center
1438
1440
  { x: l / 2, y: 0 },
1439
1441
  // Left pont of bottom arrow
1440
1442
  { x: 0, y: -c },
1441
- { x: a, y: -c },
1443
+ { x: r, y: -c },
1442
1444
  // Left top over vertical section
1443
- { x: a, y: -r + c },
1444
- { x: l - a, y: -r + c },
1445
- { x: l - a, y: -c },
1445
+ { x: r, y: -a + c },
1446
+ { x: l - r, y: -a + c },
1447
+ { x: l - r, y: -c },
1446
1448
  { x: l, y: -c }
1447
1449
  ] : [{ x: 0, y: 0 }];
1448
1450
  }, "getArrowPoints");
@@ -1450,12 +1452,12 @@ function Gt(e, t) {
1450
1452
  return e.intersect(t);
1451
1453
  }
1452
1454
  d(Gt, "intersectNode");
1453
- var ur = Gt;
1455
+ var fr = Gt;
1454
1456
  function Zt(e, t, s, n) {
1455
- var i = e.x, r = e.y, a = i - n.x, l = r - n.y, c = Math.sqrt(t * t * l * l + s * s * a * a), u = Math.abs(t * s * a / c);
1457
+ var i = e.x, a = e.y, r = i - n.x, l = a - n.y, c = Math.sqrt(t * t * l * l + s * s * r * r), u = Math.abs(t * s * r / c);
1456
1458
  n.x < i && (u = -u);
1457
1459
  var h = Math.abs(t * s * l / c);
1458
- return n.y < r && (h = -h), { x: i + u, y: r + h };
1460
+ return n.y < a && (h = -h), { x: i + u, y: a + h };
1459
1461
  }
1460
1462
  d(Zt, "intersectEllipse");
1461
1463
  var qt = Zt;
@@ -1463,53 +1465,53 @@ function Jt(e, t, s) {
1463
1465
  return qt(e, t, t, s);
1464
1466
  }
1465
1467
  d(Jt, "intersectCircle");
1466
- var pr = Jt;
1468
+ var xr = Jt;
1467
1469
  function Qt(e, t, s, n) {
1468
- var i, r, a, l, c, u, h, x, w, b, S, E, k, B, _;
1469
- if (i = t.y - e.y, a = e.x - t.x, c = t.x * e.y - e.x * t.y, w = i * s.x + a * s.y + c, b = i * n.x + a * n.y + c, !(w !== 0 && b !== 0 && Lt(w, b)) && (r = n.y - s.y, l = s.x - n.x, u = n.x * s.y - s.x * n.y, h = r * e.x + l * e.y + u, x = r * t.x + l * t.y + u, !(h !== 0 && x !== 0 && Lt(h, x)) && (S = i * l - r * a, S !== 0)))
1470
- return E = Math.abs(S / 2), k = a * u - l * c, B = k < 0 ? (k - E) / S : (k + E) / S, k = r * c - i * u, _ = k < 0 ? (k - E) / S : (k + E) / S, { x: B, y: _ };
1470
+ var i, a, r, l, c, u, h, x, w, b, S, E, k, B, _;
1471
+ if (i = t.y - e.y, r = e.x - t.x, c = t.x * e.y - e.x * t.y, w = i * s.x + r * s.y + c, b = i * n.x + r * n.y + c, !(w !== 0 && b !== 0 && Lt(w, b)) && (a = n.y - s.y, l = s.x - n.x, u = n.x * s.y - s.x * n.y, h = a * e.x + l * e.y + u, x = a * t.x + l * t.y + u, !(h !== 0 && x !== 0 && Lt(h, x)) && (S = i * l - a * r, S !== 0)))
1472
+ return E = Math.abs(S / 2), k = r * u - l * c, B = k < 0 ? (k - E) / S : (k + E) / S, k = a * c - i * u, _ = k < 0 ? (k - E) / S : (k + E) / S, { x: B, y: _ };
1471
1473
  }
1472
1474
  d(Qt, "intersectLine");
1473
1475
  function Lt(e, t) {
1474
1476
  return e * t > 0;
1475
1477
  }
1476
1478
  d(Lt, "sameSign");
1477
- var fr = Qt, xr = $t;
1479
+ var yr = Qt, br = $t;
1478
1480
  function $t(e, t, s) {
1479
- var n = e.x, i = e.y, r = [], a = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
1481
+ var n = e.x, i = e.y, a = [], r = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
1480
1482
  typeof t.forEach == "function" ? t.forEach(function(S) {
1481
- a = Math.min(a, S.x), l = Math.min(l, S.y);
1482
- }) : (a = Math.min(a, t.x), l = Math.min(l, t.y));
1483
- for (var c = n - e.width / 2 - a, u = i - e.height / 2 - l, h = 0; h < t.length; h++) {
1484
- var x = t[h], w = t[h < t.length - 1 ? h + 1 : 0], b = fr(
1483
+ r = Math.min(r, S.x), l = Math.min(l, S.y);
1484
+ }) : (r = Math.min(r, t.x), l = Math.min(l, t.y));
1485
+ for (var c = n - e.width / 2 - r, u = i - e.height / 2 - l, h = 0; h < t.length; h++) {
1486
+ var x = t[h], w = t[h < t.length - 1 ? h + 1 : 0], b = yr(
1485
1487
  e,
1486
1488
  s,
1487
1489
  { x: c + x.x, y: u + x.y },
1488
1490
  { x: c + w.x, y: u + w.y }
1489
1491
  );
1490
- b && r.push(b);
1492
+ b && a.push(b);
1491
1493
  }
1492
- return r.length ? (r.length > 1 && r.sort(function(S, E) {
1494
+ return a.length ? (a.length > 1 && a.sort(function(S, E) {
1493
1495
  var k = S.x - s.x, B = S.y - s.y, _ = Math.sqrt(k * k + B * B), D = E.x - s.x, y = E.y - s.y, g = Math.sqrt(D * D + y * y);
1494
1496
  return _ < g ? -1 : _ === g ? 0 : 1;
1495
- }), r[0]) : e;
1497
+ }), a[0]) : e;
1496
1498
  }
1497
1499
  d($t, "intersectPolygon");
1498
- var yr = /* @__PURE__ */ d((e, t) => {
1499
- var s = e.x, n = e.y, i = t.x - s, r = t.y - n, a = e.width / 2, l = e.height / 2, c, u;
1500
- return Math.abs(r) * a > Math.abs(i) * l ? (r < 0 && (l = -l), c = r === 0 ? 0 : l * i / r, u = l) : (i < 0 && (a = -a), c = a, u = i === 0 ? 0 : a * r / i), { x: s + c, y: n + u };
1501
- }, "intersectRect"), br = yr, N = {
1502
- node: ur,
1503
- circle: pr,
1500
+ var wr = /* @__PURE__ */ d((e, t) => {
1501
+ var s = e.x, n = e.y, i = t.x - s, a = t.y - n, r = e.width / 2, l = e.height / 2, c, u;
1502
+ return Math.abs(a) * r > Math.abs(i) * l ? (a < 0 && (l = -l), c = a === 0 ? 0 : l * i / a, u = l) : (i < 0 && (r = -r), c = r, u = i === 0 ? 0 : r * a / i), { x: s + c, y: n + u };
1503
+ }, "intersectRect"), mr = wr, N = {
1504
+ node: fr,
1505
+ circle: xr,
1504
1506
  ellipse: qt,
1505
- polygon: xr,
1506
- rect: br
1507
+ polygon: br,
1508
+ rect: mr
1507
1509
  }, A = /* @__PURE__ */ d(async (e, t, s, n) => {
1508
1510
  const i = R();
1509
- let r;
1510
- const a = t.useHtmlLabels || j(i.flowchart.htmlLabels);
1511
- s ? r = s : r = "node default";
1512
- const l = e.insert("g").attr("class", r).attr("id", t.domId || t.id), c = l.insert("g").attr("class", "label").attr("style", t.labelStyle);
1511
+ let a;
1512
+ const r = t.useHtmlLabels || j(i.flowchart.htmlLabels);
1513
+ s ? a = s : a = "node default";
1514
+ const l = e.insert("g").attr("class", a).attr("id", t.domId || t.id), c = l.insert("g").attr("class", "label").attr("style", t.labelStyle);
1513
1515
  let u;
1514
1516
  t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1515
1517
  const h = c.node();
@@ -1518,13 +1520,18 @@ var yr = /* @__PURE__ */ d((e, t) => {
1518
1520
  c,
1519
1521
  Tt(xt(u), i),
1520
1522
  {
1521
- useHtmlLabels: a,
1523
+ useHtmlLabels: r,
1522
1524
  width: t.width || i.flowchart.wrappingWidth,
1523
1525
  classes: "markdown-node-label"
1524
1526
  },
1525
1527
  i
1526
1528
  ) : x = h.appendChild(
1527
- K(Tt(xt(u), i), t.labelStyle, false, n)
1529
+ await K(
1530
+ Tt(xt(u), i),
1531
+ t.labelStyle,
1532
+ false,
1533
+ n
1534
+ )
1528
1535
  );
1529
1536
  let w = x.getBBox();
1530
1537
  const b = t.padding / 2;
@@ -1552,7 +1559,7 @@ var yr = /* @__PURE__ */ d((e, t) => {
1552
1559
  }
1553
1560
  w = S.getBoundingClientRect(), E.attr("width", w.width), E.attr("height", w.height);
1554
1561
  }
1555
- return a ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: l, bbox: w, halfPadding: b, label: c };
1562
+ return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: l, bbox: w, halfPadding: b, label: c };
1556
1563
  }, "labelHelper"), T = /* @__PURE__ */ d((e, t) => {
1557
1564
  const s = t.node().getBBox();
1558
1565
  e.width = s.width, e.height = s.height;
@@ -1566,20 +1573,20 @@ function U(e, t, s, n) {
1566
1573
  ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + s / 2 + ")");
1567
1574
  }
1568
1575
  d(U, "insertPolygonShape");
1569
- var wr = /* @__PURE__ */ d(async (e, t) => {
1576
+ var Lr = /* @__PURE__ */ d(async (e, t) => {
1570
1577
  t.useHtmlLabels || R().flowchart.htmlLabels || (t.centerLabel = true);
1571
- const { shapeSvg: n, bbox: i, halfPadding: r } = await A(
1578
+ const { shapeSvg: n, bbox: i, halfPadding: a } = await A(
1572
1579
  e,
1573
1580
  t,
1574
1581
  "node " + t.classes,
1575
1582
  true
1576
1583
  );
1577
1584
  L.info("Classes = ", t.classes);
1578
- const a = n.insert("rect", ":first-child");
1579
- return a.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - r).attr("y", -i.height / 2 - r).attr("width", i.width + t.padding).attr("height", i.height + t.padding), T(t, a), t.intersect = function(l) {
1585
+ const r = n.insert("rect", ":first-child");
1586
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), T(t, r), t.intersect = function(l) {
1580
1587
  return N.rect(t, l);
1581
1588
  }, n;
1582
- }, "note"), mr = wr, zt = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ d((e, t) => `${t || "node default"}${zt(e.classes)} ${zt(
1589
+ }, "note"), Sr = Lr, zt = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ d((e, t) => `${t || "node default"}${zt(e.classes)} ${zt(
1583
1590
  e.class
1584
1591
  )}`, "getClassesFromNode"), At = /* @__PURE__ */ d(async (e, t) => {
1585
1592
  const { shapeSvg: s, bbox: n } = await A(
@@ -1587,18 +1594,18 @@ var wr = /* @__PURE__ */ d(async (e, t) => {
1587
1594
  t,
1588
1595
  Y(t, void 0),
1589
1596
  true
1590
- ), i = n.width + t.padding, r = n.height + t.padding, a = i + r, l = [
1591
- { x: a / 2, y: 0 },
1592
- { x: a, y: -a / 2 },
1593
- { x: a / 2, y: -a },
1594
- { x: 0, y: -a / 2 }
1597
+ ), i = n.width + t.padding, a = n.height + t.padding, r = i + a, l = [
1598
+ { x: r / 2, y: 0 },
1599
+ { x: r, y: -r / 2 },
1600
+ { x: r / 2, y: -r },
1601
+ { x: 0, y: -r / 2 }
1595
1602
  ];
1596
1603
  L.info("Question main (Circle)");
1597
- const c = U(s, a, a, l);
1604
+ const c = U(s, r, r, l);
1598
1605
  return c.attr("style", t.style), T(t, c), t.intersect = function(u) {
1599
1606
  return L.warn("Intersect called"), N.polygon(t, l, u);
1600
1607
  }, s;
1601
- }, "question"), Lr = /* @__PURE__ */ d((e, t) => {
1608
+ }, "question"), kr = /* @__PURE__ */ d((e, t) => {
1602
1609
  const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, i = [
1603
1610
  { x: 0, y: n / 2 },
1604
1611
  { x: n / 2, y: 0 },
@@ -1607,198 +1614,198 @@ var wr = /* @__PURE__ */ d(async (e, t) => {
1607
1614
  ];
1608
1615
  return s.insert("polygon", ":first-child").attr(
1609
1616
  "points",
1610
- i.map(function(a) {
1611
- return a.x + "," + a.y;
1617
+ i.map(function(r) {
1618
+ return r.x + "," + r.y;
1612
1619
  }).join(" ")
1613
- ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(a) {
1614
- return N.circle(t, 14, a);
1620
+ ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
1621
+ return N.circle(t, 14, r);
1615
1622
  }, s;
1616
- }, "choice"), Sr = /* @__PURE__ */ d(async (e, t) => {
1623
+ }, "choice"), vr = /* @__PURE__ */ d(async (e, t) => {
1617
1624
  const { shapeSvg: s, bbox: n } = await A(
1618
1625
  e,
1619
1626
  t,
1620
1627
  Y(t, void 0),
1621
1628
  true
1622
- ), i = 4, r = n.height + t.padding, a = r / i, l = n.width + 2 * a + t.padding, c = [
1623
- { x: a, y: 0 },
1624
- { x: l - a, y: 0 },
1625
- { x: l, y: -r / 2 },
1626
- { x: l - a, y: -r },
1627
- { x: a, y: -r },
1628
- { x: 0, y: -r / 2 }
1629
- ], u = U(s, l, r, c);
1629
+ ), i = 4, a = n.height + t.padding, r = a / i, l = n.width + 2 * r + t.padding, c = [
1630
+ { x: r, y: 0 },
1631
+ { x: l - r, y: 0 },
1632
+ { x: l, y: -a / 2 },
1633
+ { x: l - r, y: -a },
1634
+ { x: r, y: -a },
1635
+ { x: 0, y: -a / 2 }
1636
+ ], u = U(s, l, a, c);
1630
1637
  return u.attr("style", t.style), T(t, u), t.intersect = function(h) {
1631
1638
  return N.polygon(t, c, h);
1632
1639
  }, s;
1633
- }, "hexagon"), kr = /* @__PURE__ */ d(async (e, t) => {
1634
- const { shapeSvg: s, bbox: n } = await A(e, t, void 0, true), i = 2, r = n.height + 2 * t.padding, a = r / i, l = n.width + 2 * a + t.padding, c = gr(t.directions, n, t), u = U(s, l, r, c);
1640
+ }, "hexagon"), Er = /* @__PURE__ */ d(async (e, t) => {
1641
+ const { shapeSvg: s, bbox: n } = await A(e, t, void 0, true), i = 2, a = n.height + 2 * t.padding, r = a / i, l = n.width + 2 * r + t.padding, c = pr(t.directions, n, t), u = U(s, l, a, c);
1635
1642
  return u.attr("style", t.style), T(t, u), t.intersect = function(h) {
1636
1643
  return N.polygon(t, c, h);
1637
1644
  }, s;
1638
- }, "block_arrow"), vr = /* @__PURE__ */ d(async (e, t) => {
1645
+ }, "block_arrow"), _r = /* @__PURE__ */ d(async (e, t) => {
1639
1646
  const { shapeSvg: s, bbox: n } = await A(
1640
1647
  e,
1641
1648
  t,
1642
1649
  Y(t, void 0),
1643
1650
  true
1644
- ), i = n.width + t.padding, r = n.height + t.padding, a = [
1645
- { x: -r / 2, y: 0 },
1651
+ ), i = n.width + t.padding, a = n.height + t.padding, r = [
1652
+ { x: -a / 2, y: 0 },
1646
1653
  { x: i, y: 0 },
1647
- { x: i, y: -r },
1648
- { x: -r / 2, y: -r },
1649
- { x: 0, y: -r / 2 }
1654
+ { x: i, y: -a },
1655
+ { x: -a / 2, y: -a },
1656
+ { x: 0, y: -a / 2 }
1650
1657
  ];
1651
- return U(s, i, r, a).attr("style", t.style), t.width = i + r, t.height = r, t.intersect = function(c) {
1652
- return N.polygon(t, a, c);
1658
+ return U(s, i, a, r).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(c) {
1659
+ return N.polygon(t, r, c);
1653
1660
  }, s;
1654
- }, "rect_left_inv_arrow"), Er = /* @__PURE__ */ d(async (e, t) => {
1655
- const { shapeSvg: s, bbox: n } = await A(e, t, Y(t), true), i = n.width + t.padding, r = n.height + t.padding, a = [
1656
- { x: -2 * r / 6, y: 0 },
1657
- { x: i - r / 6, y: 0 },
1658
- { x: i + 2 * r / 6, y: -r },
1659
- { x: r / 6, y: -r }
1660
- ], l = U(s, i, r, a);
1661
+ }, "rect_left_inv_arrow"), Dr = /* @__PURE__ */ d(async (e, t) => {
1662
+ const { shapeSvg: s, bbox: n } = await A(e, t, Y(t), true), i = n.width + t.padding, a = n.height + t.padding, r = [
1663
+ { x: -2 * a / 6, y: 0 },
1664
+ { x: i - a / 6, y: 0 },
1665
+ { x: i + 2 * a / 6, y: -a },
1666
+ { x: a / 6, y: -a }
1667
+ ], l = U(s, i, a, r);
1661
1668
  return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1662
- return N.polygon(t, a, c);
1669
+ return N.polygon(t, r, c);
1663
1670
  }, s;
1664
- }, "lean_right"), _r = /* @__PURE__ */ d(async (e, t) => {
1671
+ }, "lean_right"), Nr = /* @__PURE__ */ d(async (e, t) => {
1665
1672
  const { shapeSvg: s, bbox: n } = await A(
1666
1673
  e,
1667
1674
  t,
1668
1675
  Y(t, void 0),
1669
1676
  true
1670
- ), i = n.width + t.padding, r = n.height + t.padding, a = [
1671
- { x: 2 * r / 6, y: 0 },
1672
- { x: i + r / 6, y: 0 },
1673
- { x: i - 2 * r / 6, y: -r },
1674
- { x: -r / 6, y: -r }
1675
- ], l = U(s, i, r, a);
1677
+ ), i = n.width + t.padding, a = n.height + t.padding, r = [
1678
+ { x: 2 * a / 6, y: 0 },
1679
+ { x: i + a / 6, y: 0 },
1680
+ { x: i - 2 * a / 6, y: -a },
1681
+ { x: -a / 6, y: -a }
1682
+ ], l = U(s, i, a, r);
1676
1683
  return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1677
- return N.polygon(t, a, c);
1684
+ return N.polygon(t, r, c);
1678
1685
  }, s;
1679
- }, "lean_left"), Dr = /* @__PURE__ */ d(async (e, t) => {
1686
+ }, "lean_left"), Tr = /* @__PURE__ */ d(async (e, t) => {
1680
1687
  const { shapeSvg: s, bbox: n } = await A(
1681
1688
  e,
1682
1689
  t,
1683
1690
  Y(t, void 0),
1684
1691
  true
1685
- ), i = n.width + t.padding, r = n.height + t.padding, a = [
1686
- { x: -2 * r / 6, y: 0 },
1687
- { x: i + 2 * r / 6, y: 0 },
1688
- { x: i - r / 6, y: -r },
1689
- { x: r / 6, y: -r }
1690
- ], l = U(s, i, r, a);
1692
+ ), i = n.width + t.padding, a = n.height + t.padding, r = [
1693
+ { x: -2 * a / 6, y: 0 },
1694
+ { x: i + 2 * a / 6, y: 0 },
1695
+ { x: i - a / 6, y: -a },
1696
+ { x: a / 6, y: -a }
1697
+ ], l = U(s, i, a, r);
1691
1698
  return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1692
- return N.polygon(t, a, c);
1699
+ return N.polygon(t, r, c);
1693
1700
  }, s;
1694
- }, "trapezoid"), Nr = /* @__PURE__ */ d(async (e, t) => {
1701
+ }, "trapezoid"), Br = /* @__PURE__ */ d(async (e, t) => {
1695
1702
  const { shapeSvg: s, bbox: n } = await A(
1696
1703
  e,
1697
1704
  t,
1698
1705
  Y(t, void 0),
1699
1706
  true
1700
- ), i = n.width + t.padding, r = n.height + t.padding, a = [
1701
- { x: r / 6, y: 0 },
1702
- { x: i - r / 6, y: 0 },
1703
- { x: i + 2 * r / 6, y: -r },
1704
- { x: -2 * r / 6, y: -r }
1705
- ], l = U(s, i, r, a);
1707
+ ), i = n.width + t.padding, a = n.height + t.padding, r = [
1708
+ { x: a / 6, y: 0 },
1709
+ { x: i - a / 6, y: 0 },
1710
+ { x: i + 2 * a / 6, y: -a },
1711
+ { x: -2 * a / 6, y: -a }
1712
+ ], l = U(s, i, a, r);
1706
1713
  return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1707
- return N.polygon(t, a, c);
1714
+ return N.polygon(t, r, c);
1708
1715
  }, s;
1709
- }, "inv_trapezoid"), Tr = /* @__PURE__ */ d(async (e, t) => {
1716
+ }, "inv_trapezoid"), Cr = /* @__PURE__ */ d(async (e, t) => {
1710
1717
  const { shapeSvg: s, bbox: n } = await A(
1711
1718
  e,
1712
1719
  t,
1713
1720
  Y(t, void 0),
1714
1721
  true
1715
- ), i = n.width + t.padding, r = n.height + t.padding, a = [
1722
+ ), i = n.width + t.padding, a = n.height + t.padding, r = [
1716
1723
  { x: 0, y: 0 },
1717
- { x: i + r / 2, y: 0 },
1718
- { x: i, y: -r / 2 },
1719
- { x: i + r / 2, y: -r },
1720
- { x: 0, y: -r }
1721
- ], l = U(s, i, r, a);
1724
+ { x: i + a / 2, y: 0 },
1725
+ { x: i, y: -a / 2 },
1726
+ { x: i + a / 2, y: -a },
1727
+ { x: 0, y: -a }
1728
+ ], l = U(s, i, a, r);
1722
1729
  return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1723
- return N.polygon(t, a, c);
1730
+ return N.polygon(t, r, c);
1724
1731
  }, s;
1725
- }, "rect_right_inv_arrow"), Br = /* @__PURE__ */ d(async (e, t) => {
1732
+ }, "rect_right_inv_arrow"), Ir = /* @__PURE__ */ d(async (e, t) => {
1726
1733
  const { shapeSvg: s, bbox: n } = await A(
1727
1734
  e,
1728
1735
  t,
1729
1736
  Y(t, void 0),
1730
1737
  true
1731
- ), i = n.width + t.padding, r = i / 2, a = r / (2.5 + i / 50), l = n.height + a + t.padding, c = "M 0," + a + " a " + r + "," + a + " 0,0,0 " + i + " 0 a " + r + "," + a + " 0,0,0 " + -i + " 0 l 0," + l + " a " + r + "," + a + " 0,0,0 " + i + " 0 l 0," + -l, u = s.attr("label-offset-y", a).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(l / 2 + a) + ")");
1738
+ ), i = n.width + t.padding, a = i / 2, r = a / (2.5 + i / 50), l = n.height + r + t.padding, c = "M 0," + r + " a " + a + "," + r + " 0,0,0 " + i + " 0 a " + a + "," + r + " 0,0,0 " + -i + " 0 l 0," + l + " a " + a + "," + r + " 0,0,0 " + i + " 0 l 0," + -l, u = s.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(l / 2 + r) + ")");
1732
1739
  return T(t, u), t.intersect = function(h) {
1733
1740
  const x = N.rect(t, h), w = x.x - t.x;
1734
- if (r != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - a)) {
1735
- let b = a * a * (1 - w * w / (r * r));
1736
- b != 0 && (b = Math.sqrt(b)), b = a - b, h.y - t.y > 0 && (b = -b), x.y += b;
1741
+ if (a != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
1742
+ let b = r * r * (1 - w * w / (a * a));
1743
+ b != 0 && (b = Math.sqrt(b)), b = r - b, h.y - t.y > 0 && (b = -b), x.y += b;
1737
1744
  }
1738
1745
  return x;
1739
1746
  }, s;
1740
- }, "cylinder"), Cr = /* @__PURE__ */ d(async (e, t) => {
1747
+ }, "cylinder"), Or = /* @__PURE__ */ d(async (e, t) => {
1741
1748
  const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1742
1749
  e,
1743
1750
  t,
1744
1751
  "node " + t.classes + " " + t.class,
1745
1752
  true
1746
- ), r = s.insert("rect", ":first-child"), a = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -a / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
1747
- if (r.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", a).attr("height", l), t.props) {
1753
+ ), a = s.insert("rect", ":first-child"), r = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -r / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
1754
+ if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", l), t.props) {
1748
1755
  const h = new Set(Object.keys(t.props));
1749
- t.props.borders && (ht(r, t.props.borders, a, l), h.delete("borders")), h.forEach((x) => {
1756
+ t.props.borders && (ht(a, t.props.borders, r, l), h.delete("borders")), h.forEach((x) => {
1750
1757
  L.warn(`Unknown node property ${x}`);
1751
1758
  });
1752
1759
  }
1753
- return T(t, r), t.intersect = function(h) {
1760
+ return T(t, a), t.intersect = function(h) {
1754
1761
  return N.rect(t, h);
1755
1762
  }, s;
1756
- }, "rect"), Ir = /* @__PURE__ */ d(async (e, t) => {
1763
+ }, "rect"), Rr = /* @__PURE__ */ d(async (e, t) => {
1757
1764
  const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1758
1765
  e,
1759
1766
  t,
1760
1767
  "node " + t.classes,
1761
1768
  true
1762
- ), r = s.insert("rect", ":first-child"), a = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -a / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
1763
- if (r.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", a).attr("height", l), t.props) {
1769
+ ), a = s.insert("rect", ":first-child"), r = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -r / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
1770
+ if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", l), t.props) {
1764
1771
  const h = new Set(Object.keys(t.props));
1765
- t.props.borders && (ht(r, t.props.borders, a, l), h.delete("borders")), h.forEach((x) => {
1772
+ t.props.borders && (ht(a, t.props.borders, r, l), h.delete("borders")), h.forEach((x) => {
1766
1773
  L.warn(`Unknown node property ${x}`);
1767
1774
  });
1768
1775
  }
1769
- return T(t, r), t.intersect = function(h) {
1776
+ return T(t, a), t.intersect = function(h) {
1770
1777
  return N.rect(t, h);
1771
1778
  }, s;
1772
- }, "composite"), Or = /* @__PURE__ */ d(async (e, t) => {
1779
+ }, "composite"), zr = /* @__PURE__ */ d(async (e, t) => {
1773
1780
  const { shapeSvg: s } = await A(e, t, "label", true);
1774
1781
  L.trace("Classes = ", t.class);
1775
- const n = s.insert("rect", ":first-child"), i = 0, r = 0;
1776
- if (n.attr("width", i).attr("height", r), s.attr("class", "label edgeLabel"), t.props) {
1777
- const a = new Set(Object.keys(t.props));
1778
- t.props.borders && (ht(n, t.props.borders, i, r), a.delete("borders")), a.forEach((l) => {
1782
+ const n = s.insert("rect", ":first-child"), i = 0, a = 0;
1783
+ if (n.attr("width", i).attr("height", a), s.attr("class", "label edgeLabel"), t.props) {
1784
+ const r = new Set(Object.keys(t.props));
1785
+ t.props.borders && (ht(n, t.props.borders, i, a), r.delete("borders")), r.forEach((l) => {
1779
1786
  L.warn(`Unknown node property ${l}`);
1780
1787
  });
1781
1788
  }
1782
- return T(t, n), t.intersect = function(a) {
1783
- return N.rect(t, a);
1789
+ return T(t, n), t.intersect = function(r) {
1790
+ return N.rect(t, r);
1784
1791
  }, s;
1785
1792
  }, "labelRect");
1786
1793
  function ht(e, t, s, n) {
1787
- const i = [], r = /* @__PURE__ */ d((l) => {
1794
+ const i = [], a = /* @__PURE__ */ d((l) => {
1788
1795
  i.push(l, 0);
1789
- }, "addBorder"), a = /* @__PURE__ */ d((l) => {
1796
+ }, "addBorder"), r = /* @__PURE__ */ d((l) => {
1790
1797
  i.push(0, l);
1791
1798
  }, "skipBorder");
1792
- t.includes("t") ? (L.debug("add top border"), r(s)) : a(s), t.includes("r") ? (L.debug("add right border"), r(n)) : a(n), t.includes("b") ? (L.debug("add bottom border"), r(s)) : a(s), t.includes("l") ? (L.debug("add left border"), r(n)) : a(n), e.attr("stroke-dasharray", i.join(" "));
1799
+ t.includes("t") ? (L.debug("add top border"), a(s)) : r(s), t.includes("r") ? (L.debug("add right border"), a(n)) : r(n), t.includes("b") ? (L.debug("add bottom border"), a(s)) : r(s), t.includes("l") ? (L.debug("add left border"), a(n)) : r(n), e.attr("stroke-dasharray", i.join(" "));
1793
1800
  }
1794
1801
  d(ht, "applyNodePropertyBorders");
1795
- var Rr = /* @__PURE__ */ d((e, t) => {
1802
+ var Ar = /* @__PURE__ */ d(async (e, t) => {
1796
1803
  let s;
1797
1804
  t.classes ? s = "node " + t.classes : s = "node default";
1798
- const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), r = n.insert("line"), a = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
1805
+ const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), a = n.insert("line"), r = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
1799
1806
  let c = "";
1800
1807
  typeof l == "object" ? c = l[0] : c = l, L.info("Label text abc79", c, l, typeof l == "object");
1801
- const u = a.node().appendChild(K(c, t.labelStyle, true, true));
1808
+ const u = r.node().appendChild(await K(c, t.labelStyle, true, true));
1802
1809
  let h = { width: 0, height: 0 };
1803
1810
  if (j(R().flowchart.htmlLabels)) {
1804
1811
  const E = u.children[0], k = O(u);
@@ -1807,8 +1814,13 @@ var Rr = /* @__PURE__ */ d((e, t) => {
1807
1814
  L.info("Text 2", l);
1808
1815
  const x = l.slice(1, l.length);
1809
1816
  let w = u.getBBox();
1810
- const b = a.node().appendChild(
1811
- K(x.join ? x.join("<br/>") : x, t.labelStyle, true, true)
1817
+ const b = r.node().appendChild(
1818
+ await K(
1819
+ x.join ? x.join("<br/>") : x,
1820
+ t.labelStyle,
1821
+ true,
1822
+ true
1823
+ )
1812
1824
  );
1813
1825
  if (j(R().flowchart.htmlLabels)) {
1814
1826
  const E = b.children[0], k = O(b);
@@ -1823,91 +1835,91 @@ var Rr = /* @__PURE__ */ d((e, t) => {
1823
1835
  "transform",
1824
1836
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1825
1837
  (h.width < w.width ? 0 : -(w.width - h.width) / 2) + ", 0)"
1826
- ), h = a.node().getBBox(), a.attr(
1838
+ ), h = r.node().getBBox(), r.attr(
1827
1839
  "transform",
1828
1840
  "translate(" + -h.width / 2 + ", " + (-h.height / 2 - S + 3) + ")"
1829
- ), i.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), r.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + w.height + S).attr("y2", -h.height / 2 - S + w.height + S), T(t, i), t.intersect = function(E) {
1841
+ ), i.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), a.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + w.height + S).attr("y2", -h.height / 2 - S + w.height + S), T(t, i), t.intersect = function(E) {
1830
1842
  return N.rect(t, E);
1831
1843
  }, n;
1832
- }, "rectWithTitle"), zr = /* @__PURE__ */ d(async (e, t) => {
1844
+ }, "rectWithTitle"), Mr = /* @__PURE__ */ d(async (e, t) => {
1833
1845
  const { shapeSvg: s, bbox: n } = await A(
1834
1846
  e,
1835
1847
  t,
1836
1848
  Y(t, void 0),
1837
1849
  true
1838
- ), i = n.height + t.padding, r = n.width + i / 4 + t.padding, a = s.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -r / 2).attr("y", -i / 2).attr("width", r).attr("height", i);
1839
- return T(t, a), t.intersect = function(l) {
1850
+ ), i = n.height + t.padding, a = n.width + i / 4 + t.padding, r = s.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);
1851
+ return T(t, r), t.intersect = function(l) {
1840
1852
  return N.rect(t, l);
1841
1853
  }, s;
1842
- }, "stadium"), Ar = /* @__PURE__ */ d(async (e, t) => {
1854
+ }, "stadium"), Fr = /* @__PURE__ */ d(async (e, t) => {
1843
1855
  const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1844
1856
  e,
1845
1857
  t,
1846
1858
  Y(t, void 0),
1847
1859
  true
1848
- ), r = s.insert("circle", ":first-child");
1849
- return r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), T(t, r), t.intersect = function(a) {
1850
- return L.info("Circle intersect", t, n.width / 2 + i, a), N.circle(t, n.width / 2 + i, a);
1860
+ ), a = s.insert("circle", ":first-child");
1861
+ return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), T(t, a), t.intersect = function(r) {
1862
+ return L.info("Circle intersect", t, n.width / 2 + i, r), N.circle(t, n.width / 2 + i, r);
1851
1863
  }, s;
1852
- }, "circle"), Mr = /* @__PURE__ */ d(async (e, t) => {
1864
+ }, "circle"), Wr = /* @__PURE__ */ d(async (e, t) => {
1853
1865
  const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
1854
1866
  e,
1855
1867
  t,
1856
1868
  Y(t, void 0),
1857
1869
  true
1858
- ), r = 5, a = s.insert("g", ":first-child"), l = a.insert("circle"), c = a.insert("circle");
1859
- return a.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i + r).attr("width", n.width + t.padding + r * 2).attr("height", n.height + t.padding + r * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), T(t, l), t.intersect = function(u) {
1860
- return L.info("DoubleCircle intersect", t, n.width / 2 + i + r, u), N.circle(t, n.width / 2 + i + r, u);
1870
+ ), a = 5, r = s.insert("g", ":first-child"), l = r.insert("circle"), c = r.insert("circle");
1871
+ return r.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i + a).attr("width", n.width + t.padding + a * 2).attr("height", n.height + t.padding + a * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), T(t, l), t.intersect = function(u) {
1872
+ return L.info("DoubleCircle intersect", t, n.width / 2 + i + a, u), N.circle(t, n.width / 2 + i + a, u);
1861
1873
  }, s;
1862
- }, "doublecircle"), Fr = /* @__PURE__ */ d(async (e, t) => {
1874
+ }, "doublecircle"), Pr = /* @__PURE__ */ d(async (e, t) => {
1863
1875
  const { shapeSvg: s, bbox: n } = await A(
1864
1876
  e,
1865
1877
  t,
1866
1878
  Y(t, void 0),
1867
1879
  true
1868
- ), i = n.width + t.padding, r = n.height + t.padding, a = [
1880
+ ), i = n.width + t.padding, a = n.height + t.padding, r = [
1869
1881
  { x: 0, y: 0 },
1870
1882
  { x: i, y: 0 },
1871
- { x: i, y: -r },
1872
- { x: 0, y: -r },
1883
+ { x: i, y: -a },
1884
+ { x: 0, y: -a },
1873
1885
  { x: 0, y: 0 },
1874
1886
  { x: -8, y: 0 },
1875
1887
  { x: i + 8, y: 0 },
1876
- { x: i + 8, y: -r },
1877
- { x: -8, y: -r },
1888
+ { x: i + 8, y: -a },
1889
+ { x: -8, y: -a },
1878
1890
  { x: -8, y: 0 }
1879
- ], l = U(s, i, r, a);
1891
+ ], l = U(s, i, a, r);
1880
1892
  return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
1881
- return N.polygon(t, a, c);
1893
+ return N.polygon(t, r, c);
1882
1894
  }, s;
1883
- }, "subroutine"), Wr = /* @__PURE__ */ d((e, t) => {
1895
+ }, "subroutine"), Yr = /* @__PURE__ */ d((e, t) => {
1884
1896
  const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = s.insert("circle", ":first-child");
1885
1897
  return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), T(t, n), t.intersect = function(i) {
1886
1898
  return N.circle(t, 7, i);
1887
1899
  }, s;
1888
1900
  }, "start"), Mt = /* @__PURE__ */ d((e, t, s) => {
1889
1901
  const n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1890
- let i = 70, r = 10;
1891
- s === "LR" && (i = 10, r = 70);
1892
- const a = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * r / 2).attr("width", i).attr("height", r).attr("class", "fork-join");
1893
- return T(t, a), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) {
1902
+ let i = 70, a = 10;
1903
+ s === "LR" && (i = 10, a = 70);
1904
+ const r = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join");
1905
+ return T(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) {
1894
1906
  return N.rect(t, l);
1895
1907
  }, n;
1896
- }, "forkJoin"), Pr = /* @__PURE__ */ d((e, t) => {
1908
+ }, "forkJoin"), Hr = /* @__PURE__ */ d((e, t) => {
1897
1909
  const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = s.insert("circle", ":first-child"), i = s.insert("circle", ":first-child");
1898
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, i), t.intersect = function(r) {
1899
- return N.circle(t, 7, r);
1910
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, i), t.intersect = function(a) {
1911
+ return N.circle(t, 7, a);
1900
1912
  }, s;
1901
- }, "end"), Yr = /* @__PURE__ */ d((e, t) => {
1913
+ }, "end"), Kr = /* @__PURE__ */ d(async (e, t) => {
1902
1914
  var _a2;
1903
1915
  const s = t.padding / 2, n = 4, i = 8;
1904
- let r;
1905
- t.classes ? r = "node " + t.classes : r = "node default";
1906
- const a = e.insert("g").attr("class", r).attr("id", t.domId || t.id), l = a.insert("rect", ":first-child"), c = a.insert("line"), u = a.insert("line");
1916
+ let a;
1917
+ t.classes ? a = "node " + t.classes : a = "node default";
1918
+ const r = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = r.insert("rect", ":first-child"), c = r.insert("line"), u = r.insert("line");
1907
1919
  let h = 0, x = n;
1908
- const w = a.insert("g").attr("class", "label");
1920
+ const w = r.insert("g").attr("class", "label");
1909
1921
  let b = 0;
1910
- const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], E = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(K(E, t.labelStyle, true, true));
1922
+ const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], E = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(await K(E, t.labelStyle, true, true));
1911
1923
  let B = k.getBBox();
1912
1924
  if (j(R().flowchart.htmlLabels)) {
1913
1925
  const v = k.children[0], o = O(k);
@@ -1916,7 +1928,7 @@ var Rr = /* @__PURE__ */ d((e, t) => {
1916
1928
  t.classData.annotations[0] && (x += B.height + n, h += B.width);
1917
1929
  let _ = t.classData.label;
1918
1930
  t.classData.type !== void 0 && t.classData.type !== "" && (R().flowchart.htmlLabels ? _ += "&lt;" + t.classData.type + "&gt;" : _ += "<" + t.classData.type + ">");
1919
- const D = w.node().appendChild(K(_, t.labelStyle, true, true));
1931
+ const D = w.node().appendChild(await K(_, t.labelStyle, true, true));
1920
1932
  O(D).attr("class", "classTitle");
1921
1933
  let y = D.getBBox();
1922
1934
  if (j(R().flowchart.htmlLabels)) {
@@ -1925,12 +1937,12 @@ var Rr = /* @__PURE__ */ d((e, t) => {
1925
1937
  }
1926
1938
  x += y.height + n, y.width > h && (h = y.width);
1927
1939
  const g = [];
1928
- t.classData.members.forEach((v) => {
1940
+ t.classData.members.forEach(async (v) => {
1929
1941
  const o = v.getDisplayDetails();
1930
1942
  let W = o.displayText;
1931
1943
  R().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1932
1944
  const p = w.node().appendChild(
1933
- K(
1945
+ await K(
1934
1946
  W,
1935
1947
  o.cssStyle ? o.cssStyle : t.labelStyle,
1936
1948
  true,
@@ -1945,12 +1957,12 @@ var Rr = /* @__PURE__ */ d((e, t) => {
1945
1957
  I.width > h && (h = I.width), x += I.height + n, g.push(p);
1946
1958
  }), x += i;
1947
1959
  const f = [];
1948
- if (t.classData.methods.forEach((v) => {
1960
+ if (t.classData.methods.forEach(async (v) => {
1949
1961
  const o = v.getDisplayDetails();
1950
1962
  let W = o.displayText;
1951
1963
  R().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1952
1964
  const p = w.node().appendChild(
1953
- K(
1965
+ await K(
1954
1966
  W,
1955
1967
  o.cssStyle ? o.cssStyle : t.labelStyle,
1956
1968
  true,
@@ -1990,43 +2002,43 @@ var Rr = /* @__PURE__ */ d((e, t) => {
1990
2002
  b += ((o == null ? void 0 : o.height) ?? 0) + n;
1991
2003
  }), l.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - s).attr("y", -(x / 2) - s).attr("width", h + t.padding).attr("height", x + t.padding), T(t, l), t.intersect = function(v) {
1992
2004
  return N.rect(t, v);
1993
- }, a;
2005
+ }, r;
1994
2006
  }, "class_box"), Ft = {
1995
2007
  rhombus: At,
1996
- composite: Ir,
2008
+ composite: Rr,
1997
2009
  question: At,
1998
- rect: Cr,
1999
- labelRect: Or,
2000
- rectWithTitle: Rr,
2001
- choice: Lr,
2002
- circle: Ar,
2003
- doublecircle: Mr,
2004
- stadium: zr,
2005
- hexagon: Sr,
2006
- block_arrow: kr,
2007
- rect_left_inv_arrow: vr,
2008
- lean_right: Er,
2009
- lean_left: _r,
2010
- trapezoid: Dr,
2011
- inv_trapezoid: Nr,
2012
- rect_right_inv_arrow: Tr,
2013
- cylinder: Br,
2014
- start: Wr,
2015
- end: Pr,
2016
- note: mr,
2017
- subroutine: Fr,
2010
+ rect: Or,
2011
+ labelRect: zr,
2012
+ rectWithTitle: Ar,
2013
+ choice: kr,
2014
+ circle: Fr,
2015
+ doublecircle: Wr,
2016
+ stadium: Mr,
2017
+ hexagon: vr,
2018
+ block_arrow: Er,
2019
+ rect_left_inv_arrow: _r,
2020
+ lean_right: Dr,
2021
+ lean_left: Nr,
2022
+ trapezoid: Tr,
2023
+ inv_trapezoid: Br,
2024
+ rect_right_inv_arrow: Cr,
2025
+ cylinder: Ir,
2026
+ start: Yr,
2027
+ end: Hr,
2028
+ note: Sr,
2029
+ subroutine: Pr,
2018
2030
  fork: Mt,
2019
2031
  join: Mt,
2020
- class_box: Yr
2032
+ class_box: Kr
2021
2033
  }, lt = {}, te = /* @__PURE__ */ d(async (e, t, s) => {
2022
2034
  let n, i;
2023
2035
  if (t.link) {
2024
- let r;
2025
- R().securityLevel === "sandbox" ? r = "_top" : t.linkTarget && (r = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", r), i = await Ft[t.shape](n, t, s);
2036
+ let a;
2037
+ R().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await Ft[t.shape](n, t, s);
2026
2038
  } else
2027
2039
  i = await Ft[t.shape](e, t, s), n = i;
2028
2040
  return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), lt[t.id] = n, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), n;
2029
- }, "insertNode"), Hr = /* @__PURE__ */ d((e) => {
2041
+ }, "insertNode"), Xr = /* @__PURE__ */ d((e) => {
2030
2042
  const t = lt[e.id];
2031
2043
  L.trace(
2032
2044
  "Transforming node",
@@ -2045,75 +2057,75 @@ function _t(e, t, s = false) {
2045
2057
  const n = e;
2046
2058
  let i = "default";
2047
2059
  (((_a2 = n == null ? void 0 : n.classes) == null ? void 0 : _a2.length) || 0) > 0 && (i = ((n == null ? void 0 : n.classes) ?? []).join(" ")), i = i + " flowchart-label";
2048
- let r = 0, a = "", l;
2060
+ let a = 0, r = "", l;
2049
2061
  switch (n.type) {
2050
2062
  case "round":
2051
- r = 5, a = "rect";
2063
+ a = 5, r = "rect";
2052
2064
  break;
2053
2065
  case "composite":
2054
- r = 0, a = "composite", l = 0;
2066
+ a = 0, r = "composite", l = 0;
2055
2067
  break;
2056
2068
  case "square":
2057
- a = "rect";
2069
+ r = "rect";
2058
2070
  break;
2059
2071
  case "diamond":
2060
- a = "question";
2072
+ r = "question";
2061
2073
  break;
2062
2074
  case "hexagon":
2063
- a = "hexagon";
2075
+ r = "hexagon";
2064
2076
  break;
2065
2077
  case "block_arrow":
2066
- a = "block_arrow";
2078
+ r = "block_arrow";
2067
2079
  break;
2068
2080
  case "odd":
2069
- a = "rect_left_inv_arrow";
2081
+ r = "rect_left_inv_arrow";
2070
2082
  break;
2071
2083
  case "lean_right":
2072
- a = "lean_right";
2084
+ r = "lean_right";
2073
2085
  break;
2074
2086
  case "lean_left":
2075
- a = "lean_left";
2087
+ r = "lean_left";
2076
2088
  break;
2077
2089
  case "trapezoid":
2078
- a = "trapezoid";
2090
+ r = "trapezoid";
2079
2091
  break;
2080
2092
  case "inv_trapezoid":
2081
- a = "inv_trapezoid";
2093
+ r = "inv_trapezoid";
2082
2094
  break;
2083
2095
  case "rect_left_inv_arrow":
2084
- a = "rect_left_inv_arrow";
2096
+ r = "rect_left_inv_arrow";
2085
2097
  break;
2086
2098
  case "circle":
2087
- a = "circle";
2099
+ r = "circle";
2088
2100
  break;
2089
2101
  case "ellipse":
2090
- a = "ellipse";
2102
+ r = "ellipse";
2091
2103
  break;
2092
2104
  case "stadium":
2093
- a = "stadium";
2105
+ r = "stadium";
2094
2106
  break;
2095
2107
  case "subroutine":
2096
- a = "subroutine";
2108
+ r = "subroutine";
2097
2109
  break;
2098
2110
  case "cylinder":
2099
- a = "cylinder";
2111
+ r = "cylinder";
2100
2112
  break;
2101
2113
  case "group":
2102
- a = "rect";
2114
+ r = "rect";
2103
2115
  break;
2104
2116
  case "doublecircle":
2105
- a = "doublecircle";
2117
+ r = "doublecircle";
2106
2118
  break;
2107
2119
  default:
2108
- a = "rect";
2120
+ r = "rect";
2109
2121
  }
2110
- const c = xe((n == null ? void 0 : n.styles) ?? []), u = n.label, h = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
2122
+ const c = be((n == null ? void 0 : n.styles) ?? []), u = n.label, h = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
2111
2123
  return {
2112
2124
  labelStyle: c.labelStyle,
2113
- shape: a,
2125
+ shape: r,
2114
2126
  labelText: u,
2115
- rx: r,
2116
- ry: r,
2127
+ rx: a,
2128
+ ry: a,
2117
2129
  class: i,
2118
2130
  style: c.style,
2119
2131
  id: n.id,
@@ -2133,15 +2145,15 @@ async function ee(e, t, s) {
2133
2145
  const n = _t(t, s, false);
2134
2146
  if (n.type === "group")
2135
2147
  return;
2136
- const i = rt(), r = await te(e, n, { config: i }), a = r.node().getBBox(), l = s.getBlock(n.id);
2137
- l.size = { width: a.width, height: a.height, x: 0, y: 0, node: r }, s.setBlock(l), r.remove();
2148
+ const i = rt(), a = await te(e, n, { config: i }), r = a.node().getBBox(), l = s.getBlock(n.id);
2149
+ l.size = { width: r.width, height: r.height, x: 0, y: 0, node: a }, s.setBlock(l), a.remove();
2138
2150
  }
2139
2151
  d(ee, "calculateBlockSize");
2140
2152
  async function re(e, t, s) {
2141
2153
  const n = _t(t, s, true);
2142
2154
  if (s.getBlock(n.id).type !== "space") {
2143
- const r = rt();
2144
- await te(e, n, { config: r }), t.intersect = n == null ? void 0 : n.intersect, Hr(n);
2155
+ const a = rt();
2156
+ await te(e, n, { config: a }), t.intersect = n == null ? void 0 : n.intersect, Xr(n);
2145
2157
  }
2146
2158
  }
2147
2159
  d(re, "insertBlockPositioned");
@@ -2159,56 +2171,56 @@ async function se(e, t, s) {
2159
2171
  }
2160
2172
  d(se, "insertBlocks");
2161
2173
  async function ie(e, t, s, n, i) {
2162
- const r = new be({
2174
+ const a = new me({
2163
2175
  multigraph: true,
2164
2176
  compound: true
2165
2177
  });
2166
- r.setGraph({
2178
+ a.setGraph({
2167
2179
  rankdir: "TB",
2168
2180
  nodesep: 10,
2169
2181
  ranksep: 10,
2170
2182
  marginx: 8,
2171
2183
  marginy: 8
2172
2184
  });
2173
- for (const a of s)
2174
- a.size && r.setNode(a.id, {
2175
- width: a.size.width,
2176
- height: a.size.height,
2177
- intersect: a.intersect
2185
+ for (const r of s)
2186
+ r.size && a.setNode(r.id, {
2187
+ width: r.size.width,
2188
+ height: r.size.height,
2189
+ intersect: r.intersect
2178
2190
  });
2179
- for (const a of t)
2180
- if (a.start && a.end) {
2181
- const l = n.getBlock(a.start), c = n.getBlock(a.end);
2191
+ for (const r of t)
2192
+ if (r.start && r.end) {
2193
+ const l = n.getBlock(r.start), c = n.getBlock(r.end);
2182
2194
  if ((l == null ? void 0 : l.size) && (c == null ? void 0 : c.size)) {
2183
2195
  const u = l.size, h = c.size, x = [
2184
2196
  { x: u.x, y: u.y },
2185
2197
  { x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
2186
2198
  { x: h.x, y: h.y }
2187
2199
  ];
2188
- hr(
2200
+ gr(
2189
2201
  e,
2190
- { v: a.start, w: a.end, name: a.id },
2202
+ { v: r.start, w: r.end, name: r.id },
2191
2203
  {
2192
- ...a,
2193
- arrowTypeEnd: a.arrowTypeEnd,
2194
- arrowTypeStart: a.arrowTypeStart,
2204
+ ...r,
2205
+ arrowTypeEnd: r.arrowTypeEnd,
2206
+ arrowTypeStart: r.arrowTypeStart,
2195
2207
  points: x,
2196
2208
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2197
2209
  },
2198
2210
  void 0,
2199
2211
  "block",
2200
- r,
2212
+ a,
2201
2213
  i
2202
- ), a.label && (await nr(e, {
2203
- ...a,
2204
- label: a.label,
2214
+ ), r.label && (await cr(e, {
2215
+ ...r,
2216
+ label: r.label,
2205
2217
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2206
- arrowTypeEnd: a.arrowTypeEnd,
2207
- arrowTypeStart: a.arrowTypeStart,
2218
+ arrowTypeEnd: r.arrowTypeEnd,
2219
+ arrowTypeStart: r.arrowTypeStart,
2208
2220
  points: x,
2209
2221
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2210
- }), lr(
2211
- { ...a, x: x[1].x, y: x[1].y },
2222
+ }), or(
2223
+ { ...r, x: x[1].x, y: x[1].y },
2212
2224
  {
2213
2225
  originalPath: x
2214
2226
  }
@@ -2217,33 +2229,33 @@ async function ie(e, t, s, n, i) {
2217
2229
  }
2218
2230
  }
2219
2231
  d(ie, "insertEdges");
2220
- var Kr = /* @__PURE__ */ d(function(e, t) {
2232
+ var Ur = /* @__PURE__ */ d(function(e, t) {
2221
2233
  return t.db.getClasses();
2222
- }, "getClasses"), Xr = /* @__PURE__ */ d(async function(e, t, s, n) {
2223
- const { securityLevel: i, block: r } = rt(), a = n.db;
2234
+ }, "getClasses"), jr = /* @__PURE__ */ d(async function(e, t, s, n) {
2235
+ const { securityLevel: i, block: a } = rt(), r = n.db;
2224
2236
  let l;
2225
2237
  i === "sandbox" && (l = O("#i" + t));
2226
2238
  const c = i === "sandbox" ? O(l.nodes()[0].contentDocument.body) : O("body"), u = i === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2227
- er(u, ["point", "circle", "cross"], n.type, t);
2228
- const x = a.getBlocks(), w = a.getBlocksFlat(), b = a.getEdges(), S = u.insert("g").attr("class", "block");
2229
- await ae(S, x, a);
2230
- const E = jt(a);
2231
- if (await se(S, x, a), await ie(S, b, w, a, t), E) {
2232
- const k = E, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = r;
2233
- oe(u, _, D, !!y), L.debug("Here Bounds", E, k), u.attr(
2239
+ ar(u, ["point", "circle", "cross"], n.type, t);
2240
+ const x = r.getBlocks(), w = r.getBlocksFlat(), b = r.getEdges(), S = u.insert("g").attr("class", "block");
2241
+ await ae(S, x, r);
2242
+ const E = jt(r);
2243
+ if (await se(S, x, r), await ie(S, b, w, r, t), E) {
2244
+ const k = E, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = a;
2245
+ he(u, _, D, !!y), L.debug("Here Bounds", E, k), u.attr(
2234
2246
  "viewBox",
2235
2247
  `${k.x - 5} ${k.y - 5} ${k.width + 10} ${k.height + 10}`
2236
2248
  );
2237
2249
  }
2238
- }, "draw"), Ur = {
2239
- draw: Xr,
2240
- getClasses: Kr
2241
- }, Jr = {
2242
- parser: Se,
2243
- db: Ye,
2244
- renderer: Ur,
2245
- styles: Ke
2250
+ }, "draw"), Vr = {
2251
+ draw: jr,
2252
+ getClasses: Ur
2253
+ }, ta = {
2254
+ parser: ve,
2255
+ db: Ke,
2256
+ renderer: Vr,
2257
+ styles: Ue
2246
2258
  };
2247
2259
  export {
2248
- Jr as diagram
2260
+ ta as diagram
2249
2261
  };