lowcoder-comps 0.0.31 → 0.0.33

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 (87) hide show
  1. package/00bb478a.js +1102 -0
  2. package/02bef5a4.js +505 -0
  3. package/057d2a44.js +1127 -0
  4. package/0964fcc6.js +34 -0
  5. package/14220e98.js +1276 -0
  6. package/1c074fe4.js +25 -0
  7. package/250a6954.js +804 -0
  8. package/256b619e.js +92 -0
  9. package/2cd27cf0.js +2501 -0
  10. package/2f064957.js +64 -0
  11. package/2ff2c7a6.js +6 -0
  12. package/2ff7471d.js +9 -0
  13. package/30c4916b.js +8 -0
  14. package/36ec7270.js +915 -0
  15. package/38c14832.js +960 -0
  16. package/3ae34bed.js +819 -0
  17. package/3e2939fa.js +237 -0
  18. package/3f5f874f.js +86 -0
  19. package/3fb86fb9.js +447 -0
  20. package/415177f9.js +1579 -0
  21. package/47848c42.js +11636 -0
  22. package/4c6a0ece.js +162535 -0
  23. package/4db8e48b.js +2284 -0
  24. package/531065f1.js +1089 -0
  25. package/5a398ea8.js +881 -0
  26. package/5ab1614c.js +268 -0
  27. package/65bbb6ae.js +1536 -0
  28. package/777cd15c.js +48428 -0
  29. package/7dacfa82.js +220 -0
  30. package/800cf0d0.js +796 -0
  31. package/92e85b65.js +65 -0
  32. package/93e9bd3a.js +391 -0
  33. package/98622dfa.js +16582 -0
  34. package/a2e74e62.js +2967 -0
  35. package/a61c3bd3.js +5 -0
  36. package/b8f48ff4.js +769 -0
  37. package/bd0f5f65.js +319 -0
  38. package/bf4428f5.js +1269 -0
  39. package/cb1972f7.js +455 -0
  40. package/dfc10c94.js +818 -0
  41. package/ed2c9753.js +208 -0
  42. package/ef2833e6.js +927 -0
  43. package/f9637058.js +16 -0
  44. package/f9e72519.js +1284 -0
  45. package/fe063d15.js +19339 -0
  46. package/index.js +5 -0
  47. package/package.json +30 -3
  48. package/README.md +0 -120
  49. package/index.html +0 -26
  50. package/index.tsx +0 -21
  51. package/jest.config.js +0 -6
  52. package/src/__test__/allComp.test.tsx +0 -61
  53. package/src/app-env.d.ts +0 -3
  54. package/src/comps/calendarComp/calendarComp.tsx +0 -633
  55. package/src/comps/calendarComp/calendarConstants.tsx +0 -1048
  56. package/src/comps/calendarComp/errorBoundary.tsx +0 -30
  57. package/src/comps/chartComp/chartComp.tsx +0 -442
  58. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +0 -51
  59. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +0 -307
  60. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +0 -9
  61. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +0 -55
  62. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +0 -96
  63. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +0 -83
  64. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +0 -62
  65. package/src/comps/chartComp/chartConstants.tsx +0 -299
  66. package/src/comps/chartComp/chartPropertyView.tsx +0 -235
  67. package/src/comps/chartComp/chartUtils.ts +0 -291
  68. package/src/comps/chartComp/reactEcharts/core.tsx +0 -194
  69. package/src/comps/chartComp/reactEcharts/index.ts +0 -21
  70. package/src/comps/chartComp/reactEcharts/types.ts +0 -76
  71. package/src/comps/chartComp/seriesComp.tsx +0 -119
  72. package/src/comps/imageEditorComp/imageEditorClass.tsx +0 -52
  73. package/src/comps/imageEditorComp/imageEditorConstants.tsx +0 -109
  74. package/src/comps/imageEditorComp/index.tsx +0 -184
  75. package/src/comps/mermaidComp/index.tsx +0 -44
  76. package/src/comps/mermaidComp/mermaid.tsx +0 -29
  77. package/src/global.ts +0 -1
  78. package/src/i18n/comps/index.tsx +0 -29
  79. package/src/i18n/comps/locales/en.ts +0 -163
  80. package/src/i18n/comps/locales/enObj.tsx +0 -198
  81. package/src/i18n/comps/locales/index.ts +0 -7
  82. package/src/i18n/comps/locales/types.tsx +0 -10
  83. package/src/i18n/comps/locales/zh.ts +0 -156
  84. package/src/i18n/comps/locales/zhObj.tsx +0 -4
  85. package/src/index.ts +0 -11
  86. package/tsconfig.json +0 -22
  87. package/vite.config.js +0 -10
package/00bb478a.js ADDED
@@ -0,0 +1,1102 @@
1
+ var v = (e, t, r) => new Promise((i, l) => {
2
+ var a = (c) => {
3
+ try {
4
+ n(r.next(c));
5
+ } catch (o) {
6
+ l(o);
7
+ }
8
+ }, s = (c) => {
9
+ try {
10
+ n(r.throw(c));
11
+ } catch (o) {
12
+ l(o);
13
+ }
14
+ }, n = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(a, s);
15
+ n((r = r.apply(e, t)).next());
16
+ });
17
+ import { r as N, e as b, f as J, b7 as V, j as C, l as g, C as U, I as ct } from "./4c6a0ece.js";
18
+ import { a as it } from "./a2e74e62.js";
19
+ import { l as ht } from "./0964fcc6.js";
20
+ const ot = (e, t, r, i) => {
21
+ t.forEach((l) => {
22
+ mt[l](e, r, i);
23
+ });
24
+ }, yt = (e, t, r) => {
25
+ g.trace("Making markers for ", r), e.append("defs").append("marker").attr("id", r + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", r + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
26
+ }, pt = (e, t, r) => {
27
+ e.append("defs").append("marker").attr("id", r + "_" + 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", r + "_" + 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");
28
+ }, ft = (e, t, r) => {
29
+ e.append("defs").append("marker").attr("id", r + "_" + 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", r + "_" + 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");
30
+ }, xt = (e, t, r) => {
31
+ e.append("defs").append("marker").attr("id", r + "_" + 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", r + "_" + 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");
32
+ }, dt = (e, t, r) => {
33
+ e.append("defs").append("marker").attr("id", r + "_" + 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", r + "_" + 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);
34
+ }, gt = (e, t, r) => {
35
+ e.append("marker").attr("id", r + "_" + 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", r + "_" + 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");
36
+ }, ut = (e, t, r) => {
37
+ e.append("marker").attr("id", r + "_" + 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", r + "_" + 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");
38
+ }, bt = (e, t, r) => {
39
+ e.append("marker").attr("id", r + "_" + 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", r + "_" + 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");
40
+ }, wt = (e, t, r) => {
41
+ e.append("defs").append("marker").attr("id", r + "_" + 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");
42
+ }, mt = {
43
+ extension: yt,
44
+ composition: pt,
45
+ aggregation: ft,
46
+ dependency: xt,
47
+ lollipop: dt,
48
+ point: gt,
49
+ circle: ut,
50
+ cross: bt,
51
+ barb: wt
52
+ }, yr = ot;
53
+ function kt(e, t) {
54
+ t && e.attr("style", t);
55
+ }
56
+ function vt(e) {
57
+ const t = C(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), r = t.append("xhtml:div"), i = e.label, l = e.isNode ? "nodeLabel" : "edgeLabel";
58
+ return r.html(
59
+ '<span class="' + l + '" ' + (e.labelStyle ? 'style="' + e.labelStyle + '"' : "") + ">" + i + "</span>"
60
+ ), kt(r, e.labelStyle), r.style("display", "inline-block"), r.style("white-space", "nowrap"), r.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
61
+ }
62
+ const Lt = (e, t, r, i) => {
63
+ let l = e || "";
64
+ if (typeof l == "object" && (l = l[0]), N(b().flowchart.htmlLabels)) {
65
+ l = l.replace(/\\n|\n/g, "<br />"), g.debug("vertexText" + l);
66
+ const a = {
67
+ isNode: i,
68
+ label: V(l).replace(
69
+ /fa[blrs]?:fa-[\w-]+/g,
70
+ // cspell: disable-line
71
+ (n) => `<i class='${n.replace(":", " ")}'></i>`
72
+ ),
73
+ labelStyle: t.replace("fill:", "color:")
74
+ };
75
+ return vt(a);
76
+ } else {
77
+ const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
78
+ a.setAttribute("style", t.replace("color:", "fill:"));
79
+ let s = [];
80
+ typeof l == "string" ? s = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? s = l : s = [];
81
+ for (const n of s) {
82
+ const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
83
+ c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), r ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = n.trim(), a.appendChild(c);
84
+ }
85
+ return a;
86
+ }
87
+ }, H = Lt, T = (e, t, r, i) => v(void 0, null, function* () {
88
+ let l;
89
+ const a = t.useHtmlLabels || N(b().flowchart.htmlLabels);
90
+ r ? l = r : l = "node default";
91
+ const s = e.insert("g").attr("class", l).attr("id", t.domId || t.id), n = s.insert("g").attr("class", "label").attr("style", t.labelStyle);
92
+ let c;
93
+ t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
94
+ const o = n.node();
95
+ let h;
96
+ t.labelType === "markdown" ? h = it(n, J(V(c), b()), {
97
+ useHtmlLabels: a,
98
+ width: t.width || b().flowchart.wrappingWidth,
99
+ classes: "markdown-node-label"
100
+ }) : h = o.appendChild(
101
+ H(
102
+ J(V(c), b()),
103
+ t.labelStyle,
104
+ !1,
105
+ i
106
+ )
107
+ );
108
+ let y = h.getBBox();
109
+ const f = t.padding / 2;
110
+ if (N(b().flowchart.htmlLabels)) {
111
+ const p = h.children[0], d = C(h), k = p.getElementsByTagName("img");
112
+ if (k) {
113
+ const x = c.replace(/<img[^>]*>/g, "").trim() === "";
114
+ yield Promise.all(
115
+ [...k].map(
116
+ (u) => new Promise((M) => {
117
+ function E() {
118
+ if (u.style.display = "flex", u.style.flexDirection = "column", x) {
119
+ const $ = b().fontSize ? b().fontSize : window.getComputedStyle(document.body).fontSize, Y = 5, A = parseInt($, 10) * Y + "px";
120
+ u.style.minWidth = A, u.style.maxWidth = A;
121
+ } else
122
+ u.style.width = "100%";
123
+ M(u);
124
+ }
125
+ setTimeout(() => {
126
+ u.complete && E();
127
+ }), u.addEventListener("error", E), u.addEventListener("load", E);
128
+ })
129
+ )
130
+ );
131
+ }
132
+ y = p.getBoundingClientRect(), d.attr("width", y.width), d.attr("height", y.height);
133
+ }
134
+ return a ? n.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : n.attr("transform", "translate(0, " + -y.height / 2 + ")"), t.centerLabel && n.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), n.insert("rect", ":first-child"), { shapeSvg: s, bbox: y, halfPadding: f, label: n };
135
+ }), m = (e, t) => {
136
+ const r = t.node().getBBox();
137
+ e.width = r.width, e.height = r.height;
138
+ };
139
+ function O(e, t, r, i) {
140
+ return e.insert("polygon", ":first-child").attr(
141
+ "points",
142
+ i.map(function(l) {
143
+ return l.x + "," + l.y;
144
+ }).join(" ")
145
+ ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + r / 2 + ")");
146
+ }
147
+ function St(e, t) {
148
+ return e.intersect(t);
149
+ }
150
+ function nt(e, t, r, i) {
151
+ var l = e.x, a = e.y, s = l - i.x, n = a - i.y, c = Math.sqrt(t * t * n * n + r * r * s * s), o = Math.abs(t * r * s / c);
152
+ i.x < l && (o = -o);
153
+ var h = Math.abs(t * r * n / c);
154
+ return i.y < a && (h = -h), { x: l + o, y: a + h };
155
+ }
156
+ function Mt(e, t, r) {
157
+ return nt(e, t, t, r);
158
+ }
159
+ function Tt(e, t, r, i) {
160
+ var l, a, s, n, c, o, h, y, f, p, d, k, x, u, M;
161
+ if (l = t.y - e.y, s = e.x - t.x, c = t.x * e.y - e.x * t.y, f = l * r.x + s * r.y + c, p = l * i.x + s * i.y + c, !(f !== 0 && p !== 0 && K(f, p)) && (a = i.y - r.y, n = r.x - i.x, o = i.x * r.y - r.x * i.y, h = a * e.x + n * e.y + o, y = a * t.x + n * t.y + o, !(h !== 0 && y !== 0 && K(h, y)) && (d = l * n - a * s, d !== 0)))
162
+ return k = Math.abs(d / 2), x = s * o - n * c, u = x < 0 ? (x - k) / d : (x + k) / d, x = a * c - l * o, M = x < 0 ? (x - k) / d : (x + k) / d, { x: u, y: M };
163
+ }
164
+ function K(e, t) {
165
+ return e * t > 0;
166
+ }
167
+ function Bt(e, t, r) {
168
+ var i = e.x, l = e.y, a = [], s = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
169
+ typeof t.forEach == "function" ? t.forEach(function(d) {
170
+ s = Math.min(s, d.x), n = Math.min(n, d.y);
171
+ }) : (s = Math.min(s, t.x), n = Math.min(n, t.y));
172
+ for (var c = i - e.width / 2 - s, o = l - e.height / 2 - n, h = 0; h < t.length; h++) {
173
+ var y = t[h], f = t[h < t.length - 1 ? h + 1 : 0], p = Tt(
174
+ e,
175
+ r,
176
+ { x: c + y.x, y: o + y.y },
177
+ { x: c + f.x, y: o + f.y }
178
+ );
179
+ p && a.push(p);
180
+ }
181
+ return a.length ? (a.length > 1 && a.sort(function(d, k) {
182
+ var x = d.x - r.x, u = d.y - r.y, M = Math.sqrt(x * x + u * u), E = k.x - r.x, $ = k.y - r.y, Y = Math.sqrt(E * E + $ * $);
183
+ return M < Y ? -1 : M === Y ? 0 : 1;
184
+ }), a[0]) : e;
185
+ }
186
+ const Et = (e, t) => {
187
+ var r = e.x, i = e.y, l = t.x - r, a = t.y - i, s = e.width / 2, n = e.height / 2, c, o;
188
+ return Math.abs(a) * s > Math.abs(l) * n ? (a < 0 && (n = -n), c = a === 0 ? 0 : n * l / a, o = n) : (l < 0 && (s = -s), c = s, o = l === 0 ? 0 : s * a / l), { x: r + c, y: i + o };
189
+ }, Ct = Et, w = {
190
+ node: St,
191
+ circle: Mt,
192
+ ellipse: nt,
193
+ polygon: Bt,
194
+ rect: Ct
195
+ }, $t = (e, t) => v(void 0, null, function* () {
196
+ t.useHtmlLabels || b().flowchart.htmlLabels || (t.centerLabel = !0);
197
+ const { shapeSvg: i, bbox: l, halfPadding: a } = yield T(
198
+ e,
199
+ t,
200
+ "node " + t.classes,
201
+ !0
202
+ );
203
+ g.info("Classes = ", t.classes);
204
+ const s = i.insert("rect", ":first-child");
205
+ return s.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - a).attr("y", -l.height / 2 - a).attr("width", l.width + t.padding).attr("height", l.height + t.padding), m(t, s), t.intersect = function(n) {
206
+ return w.rect(t, n);
207
+ }, i;
208
+ }), _t = $t, Rt = (e) => {
209
+ const t = /* @__PURE__ */ new Set();
210
+ for (const r of e)
211
+ switch (r) {
212
+ case "x":
213
+ t.add("right"), t.add("left");
214
+ break;
215
+ case "y":
216
+ t.add("up"), t.add("down");
217
+ break;
218
+ default:
219
+ t.add(r);
220
+ break;
221
+ }
222
+ return t;
223
+ }, It = (e, t, r) => {
224
+ const i = Rt(e), l = 2, a = t.height + 2 * r.padding, s = a / l, n = t.width + 2 * s + r.padding, c = r.padding / 2;
225
+ return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
226
+ // Bottom
227
+ { x: 0, y: 0 },
228
+ { x: s, y: 0 },
229
+ { x: n / 2, y: 2 * c },
230
+ { x: n - s, y: 0 },
231
+ { x: n, y: 0 },
232
+ // Right
233
+ { x: n, y: -a / 3 },
234
+ { x: n + 2 * c, y: -a / 2 },
235
+ { x: n, y: -2 * a / 3 },
236
+ { x: n, y: -a },
237
+ // Top
238
+ { x: n - s, y: -a },
239
+ { x: n / 2, y: -a - 2 * c },
240
+ { x: s, y: -a },
241
+ // Left
242
+ { x: 0, y: -a },
243
+ { x: 0, y: -2 * a / 3 },
244
+ { x: -2 * c, y: -a / 2 },
245
+ { x: 0, y: -a / 3 }
246
+ ] : i.has("right") && i.has("left") && i.has("up") ? [
247
+ { x: s, y: 0 },
248
+ { x: n - s, y: 0 },
249
+ { x: n, y: -a / 2 },
250
+ { x: n - s, y: -a },
251
+ { x: s, y: -a },
252
+ { x: 0, y: -a / 2 }
253
+ ] : i.has("right") && i.has("left") && i.has("down") ? [
254
+ { x: 0, y: 0 },
255
+ { x: s, y: -a },
256
+ { x: n - s, y: -a },
257
+ { x: n, y: 0 }
258
+ ] : i.has("right") && i.has("up") && i.has("down") ? [
259
+ { x: 0, y: 0 },
260
+ { x: n, y: -s },
261
+ { x: n, y: -a + s },
262
+ { x: 0, y: -a }
263
+ ] : i.has("left") && i.has("up") && i.has("down") ? [
264
+ { x: n, y: 0 },
265
+ { x: 0, y: -s },
266
+ { x: 0, y: -a + s },
267
+ { x: n, y: -a }
268
+ ] : i.has("right") && i.has("left") ? [
269
+ { x: s, y: 0 },
270
+ { x: s, y: -c },
271
+ { x: n - s, y: -c },
272
+ { x: n - s, y: 0 },
273
+ { x: n, y: -a / 2 },
274
+ { x: n - s, y: -a },
275
+ { x: n - s, y: -a + c },
276
+ { x: s, y: -a + c },
277
+ { x: s, y: -a },
278
+ { x: 0, y: -a / 2 }
279
+ ] : i.has("up") && i.has("down") ? [
280
+ // Bottom center
281
+ { x: n / 2, y: 0 },
282
+ // Left pont of bottom arrow
283
+ { x: 0, y: -c },
284
+ { x: s, y: -c },
285
+ // Left top over vertical section
286
+ { x: s, y: -a + c },
287
+ { x: 0, y: -a + c },
288
+ // Top of arrow
289
+ { x: n / 2, y: -a },
290
+ { x: n, y: -a + c },
291
+ // Top of right vertical bar
292
+ { x: n - s, y: -a + c },
293
+ { x: n - s, y: -c },
294
+ { x: n, y: -c }
295
+ ] : i.has("right") && i.has("up") ? [
296
+ { x: 0, y: 0 },
297
+ { x: n, y: -s },
298
+ { x: 0, y: -a }
299
+ ] : i.has("right") && i.has("down") ? [
300
+ { x: 0, y: 0 },
301
+ { x: n, y: 0 },
302
+ { x: 0, y: -a }
303
+ ] : i.has("left") && i.has("up") ? [
304
+ { x: n, y: 0 },
305
+ { x: 0, y: -s },
306
+ { x: n, y: -a }
307
+ ] : i.has("left") && i.has("down") ? [
308
+ { x: n, y: 0 },
309
+ { x: 0, y: 0 },
310
+ { x: n, y: -a }
311
+ ] : i.has("right") ? [
312
+ { x: s, y: -c },
313
+ { x: s, y: -c },
314
+ { x: n - s, y: -c },
315
+ { x: n - s, y: 0 },
316
+ { x: n, y: -a / 2 },
317
+ { x: n - s, y: -a },
318
+ { x: n - s, y: -a + c },
319
+ // top left corner of arrow
320
+ { x: s, y: -a + c },
321
+ { x: s, y: -a + c }
322
+ ] : i.has("left") ? [
323
+ { x: s, y: 0 },
324
+ { x: s, y: -c },
325
+ // Two points, the right corners
326
+ { x: n - s, y: -c },
327
+ { x: n - s, y: -a + c },
328
+ { x: s, y: -a + c },
329
+ { x: s, y: -a },
330
+ { x: 0, y: -a / 2 }
331
+ ] : i.has("up") ? [
332
+ // Bottom center
333
+ { x: s, y: -c },
334
+ // Left top over vertical section
335
+ { x: s, y: -a + c },
336
+ { x: 0, y: -a + c },
337
+ // Top of arrow
338
+ { x: n / 2, y: -a },
339
+ { x: n, y: -a + c },
340
+ // Top of right vertical bar
341
+ { x: n - s, y: -a + c },
342
+ { x: n - s, y: -c }
343
+ ] : i.has("down") ? [
344
+ // Bottom center
345
+ { x: n / 2, y: 0 },
346
+ // Left pont of bottom arrow
347
+ { x: 0, y: -c },
348
+ { x: s, y: -c },
349
+ // Left top over vertical section
350
+ { x: s, y: -a + c },
351
+ { x: n - s, y: -a + c },
352
+ { x: n - s, y: -c },
353
+ { x: n, y: -c }
354
+ ] : [{ x: 0, y: 0 }];
355
+ }, P = (e) => e ? " " + e : "", I = (e, t) => `${t || "node default"}${P(e.classes)} ${P(
356
+ e.class
357
+ )}`, tt = (e, t) => v(void 0, null, function* () {
358
+ const { shapeSvg: r, bbox: i } = yield T(
359
+ e,
360
+ t,
361
+ I(t, void 0),
362
+ !0
363
+ ), l = i.width + t.padding, a = i.height + t.padding, s = l + a, n = [
364
+ { x: s / 2, y: 0 },
365
+ { x: s, y: -s / 2 },
366
+ { x: s / 2, y: -s },
367
+ { x: 0, y: -s / 2 }
368
+ ];
369
+ g.info("Question main (Circle)");
370
+ const c = O(r, s, s, n);
371
+ return c.attr("style", t.style), m(t, c), t.intersect = function(o) {
372
+ return g.warn("Intersect called"), w.polygon(t, n, o);
373
+ }, r;
374
+ }), Ht = (e, t) => {
375
+ const r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
376
+ { x: 0, y: i / 2 },
377
+ { x: i / 2, y: 0 },
378
+ { x: 0, y: -i / 2 },
379
+ { x: -i / 2, y: 0 }
380
+ ];
381
+ return r.insert("polygon", ":first-child").attr(
382
+ "points",
383
+ l.map(function(s) {
384
+ return s.x + "," + s.y;
385
+ }).join(" ")
386
+ ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(s) {
387
+ return w.circle(t, 14, s);
388
+ }, r;
389
+ }, Nt = (e, t) => v(void 0, null, function* () {
390
+ const { shapeSvg: r, bbox: i } = yield T(
391
+ e,
392
+ t,
393
+ I(t, void 0),
394
+ !0
395
+ ), l = 4, a = i.height + t.padding, s = a / l, n = i.width + 2 * s + t.padding, c = [
396
+ { x: s, y: 0 },
397
+ { x: n - s, y: 0 },
398
+ { x: n, y: -a / 2 },
399
+ { x: n - s, y: -a },
400
+ { x: s, y: -a },
401
+ { x: 0, y: -a / 2 }
402
+ ], o = O(r, n, a, c);
403
+ return o.attr("style", t.style), m(t, o), t.intersect = function(h) {
404
+ return w.polygon(t, c, h);
405
+ }, r;
406
+ }), Ot = (e, t) => v(void 0, null, function* () {
407
+ const { shapeSvg: r, bbox: i } = yield T(e, t, void 0, !0), l = 2, a = i.height + 2 * t.padding, s = a / l, n = i.width + 2 * s + t.padding, c = It(t.directions, i, t), o = O(r, n, a, c);
408
+ return o.attr("style", t.style), m(t, o), t.intersect = function(h) {
409
+ return w.polygon(t, c, h);
410
+ }, r;
411
+ }), Wt = (e, t) => v(void 0, null, function* () {
412
+ const { shapeSvg: r, bbox: i } = yield T(
413
+ e,
414
+ t,
415
+ I(t, void 0),
416
+ !0
417
+ ), l = i.width + t.padding, a = i.height + t.padding, s = [
418
+ { x: -a / 2, y: 0 },
419
+ { x: l, y: 0 },
420
+ { x: l, y: -a },
421
+ { x: -a / 2, y: -a },
422
+ { x: 0, y: -a / 2 }
423
+ ];
424
+ return O(r, l, a, s).attr("style", t.style), t.width = l + a, t.height = a, t.intersect = function(c) {
425
+ return w.polygon(t, s, c);
426
+ }, r;
427
+ }), Xt = (e, t) => v(void 0, null, function* () {
428
+ const { shapeSvg: r, bbox: i } = yield T(e, t, I(t), !0), l = i.width + t.padding, a = i.height + t.padding, s = [
429
+ { x: -2 * a / 6, y: 0 },
430
+ { x: l - a / 6, y: 0 },
431
+ { x: l + 2 * a / 6, y: -a },
432
+ { x: a / 6, y: -a }
433
+ ], n = O(r, l, a, s);
434
+ return n.attr("style", t.style), m(t, n), t.intersect = function(c) {
435
+ return w.polygon(t, s, c);
436
+ }, r;
437
+ }), Yt = (e, t) => v(void 0, null, function* () {
438
+ const { shapeSvg: r, bbox: i } = yield T(
439
+ e,
440
+ t,
441
+ I(t, void 0),
442
+ !0
443
+ ), l = i.width + t.padding, a = i.height + t.padding, s = [
444
+ { x: 2 * a / 6, y: 0 },
445
+ { x: l + a / 6, y: 0 },
446
+ { x: l - 2 * a / 6, y: -a },
447
+ { x: -a / 6, y: -a }
448
+ ], n = O(r, l, a, s);
449
+ return n.attr("style", t.style), m(t, n), t.intersect = function(c) {
450
+ return w.polygon(t, s, c);
451
+ }, r;
452
+ }), Dt = (e, t) => v(void 0, null, function* () {
453
+ const { shapeSvg: r, bbox: i } = yield T(
454
+ e,
455
+ t,
456
+ I(t, void 0),
457
+ !0
458
+ ), l = i.width + t.padding, a = i.height + t.padding, s = [
459
+ { x: -2 * a / 6, y: 0 },
460
+ { x: l + 2 * a / 6, y: 0 },
461
+ { x: l - a / 6, y: -a },
462
+ { x: a / 6, y: -a }
463
+ ], n = O(r, l, a, s);
464
+ return n.attr("style", t.style), m(t, n), t.intersect = function(c) {
465
+ return w.polygon(t, s, c);
466
+ }, r;
467
+ }), At = (e, t) => v(void 0, null, function* () {
468
+ const { shapeSvg: r, bbox: i } = yield T(
469
+ e,
470
+ t,
471
+ I(t, void 0),
472
+ !0
473
+ ), l = i.width + t.padding, a = i.height + t.padding, s = [
474
+ { x: a / 6, y: 0 },
475
+ { x: l - a / 6, y: 0 },
476
+ { x: l + 2 * a / 6, y: -a },
477
+ { x: -2 * a / 6, y: -a }
478
+ ], n = O(r, l, a, s);
479
+ return n.attr("style", t.style), m(t, n), t.intersect = function(c) {
480
+ return w.polygon(t, s, c);
481
+ }, r;
482
+ }), jt = (e, t) => v(void 0, null, function* () {
483
+ const { shapeSvg: r, bbox: i } = yield T(
484
+ e,
485
+ t,
486
+ I(t, void 0),
487
+ !0
488
+ ), l = i.width + t.padding, a = i.height + t.padding, s = [
489
+ { x: 0, y: 0 },
490
+ { x: l + a / 2, y: 0 },
491
+ { x: l, y: -a / 2 },
492
+ { x: l + a / 2, y: -a },
493
+ { x: 0, y: -a }
494
+ ], n = O(r, l, a, s);
495
+ return n.attr("style", t.style), m(t, n), t.intersect = function(c) {
496
+ return w.polygon(t, s, c);
497
+ }, r;
498
+ }), Ut = (e, t) => v(void 0, null, function* () {
499
+ const { shapeSvg: r, bbox: i } = yield T(
500
+ e,
501
+ t,
502
+ I(t, void 0),
503
+ !0
504
+ ), l = i.width + t.padding, a = l / 2, s = a / (2.5 + l / 50), n = i.height + s + t.padding, c = "M 0," + s + " a " + a + "," + s + " 0,0,0 " + l + " 0 a " + a + "," + s + " 0,0,0 " + -l + " 0 l 0," + n + " a " + a + "," + s + " 0,0,0 " + l + " 0 l 0," + -n, o = r.attr("label-offset-y", s).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + s) + ")");
505
+ return m(t, o), t.intersect = function(h) {
506
+ const y = w.rect(t, h), f = y.x - t.x;
507
+ if (a != 0 && (Math.abs(f) < t.width / 2 || Math.abs(f) == t.width / 2 && Math.abs(y.y - t.y) > t.height / 2 - s)) {
508
+ let p = s * s * (1 - f * f / (a * a));
509
+ p != 0 && (p = Math.sqrt(p)), p = s - p, h.y - t.y > 0 && (p = -p), y.y += p;
510
+ }
511
+ return y;
512
+ }, r;
513
+ }), zt = (e, t) => v(void 0, null, function* () {
514
+ const { shapeSvg: r, bbox: i, halfPadding: l } = yield T(
515
+ e,
516
+ t,
517
+ "node " + t.classes + " " + t.class,
518
+ !0
519
+ ), a = r.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -s / 2 : -i.width / 2 - l, o = t.positioned ? -n / 2 : -i.height / 2 - l;
520
+ if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", o).attr("width", s).attr("height", n), t.props) {
521
+ const h = new Set(Object.keys(t.props));
522
+ t.props.borders && (q(a, t.props.borders, s, n), h.delete("borders")), h.forEach((y) => {
523
+ g.warn(`Unknown node property ${y}`);
524
+ });
525
+ }
526
+ return m(t, a), t.intersect = function(h) {
527
+ return w.rect(t, h);
528
+ }, r;
529
+ }), Zt = (e, t) => v(void 0, null, function* () {
530
+ const { shapeSvg: r, bbox: i, halfPadding: l } = yield T(
531
+ e,
532
+ t,
533
+ "node " + t.classes,
534
+ !0
535
+ ), a = r.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -s / 2 : -i.width / 2 - l, o = t.positioned ? -n / 2 : -i.height / 2 - l;
536
+ 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", o).attr("width", s).attr("height", n), t.props) {
537
+ const h = new Set(Object.keys(t.props));
538
+ t.props.borders && (q(a, t.props.borders, s, n), h.delete("borders")), h.forEach((y) => {
539
+ g.warn(`Unknown node property ${y}`);
540
+ });
541
+ }
542
+ return m(t, a), t.intersect = function(h) {
543
+ return w.rect(t, h);
544
+ }, r;
545
+ }), Gt = (e, t) => v(void 0, null, function* () {
546
+ const { shapeSvg: r } = yield T(e, t, "label", !0);
547
+ g.trace("Classes = ", t.class);
548
+ const i = r.insert("rect", ":first-child"), l = 0, a = 0;
549
+ if (i.attr("width", l).attr("height", a), r.attr("class", "label edgeLabel"), t.props) {
550
+ const s = new Set(Object.keys(t.props));
551
+ t.props.borders && (q(i, t.props.borders, l, a), s.delete("borders")), s.forEach((n) => {
552
+ g.warn(`Unknown node property ${n}`);
553
+ });
554
+ }
555
+ return m(t, i), t.intersect = function(s) {
556
+ return w.rect(t, s);
557
+ }, r;
558
+ });
559
+ function q(e, t, r, i) {
560
+ const l = [], a = (n) => {
561
+ l.push(n, 0);
562
+ }, s = (n) => {
563
+ l.push(0, n);
564
+ };
565
+ t.includes("t") ? (g.debug("add top border"), a(r)) : s(r), t.includes("r") ? (g.debug("add right border"), a(i)) : s(i), t.includes("b") ? (g.debug("add bottom border"), a(r)) : s(r), t.includes("l") ? (g.debug("add left border"), a(i)) : s(i), e.attr("stroke-dasharray", l.join(" "));
566
+ }
567
+ const Ft = (e, t) => {
568
+ let r;
569
+ t.classes ? r = "node " + t.classes : r = "node default";
570
+ const i = e.insert("g").attr("class", r).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), a = i.insert("line"), s = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
571
+ let c = "";
572
+ typeof n == "object" ? c = n[0] : c = n, g.info("Label text abc79", c, n, typeof n == "object");
573
+ const o = s.node().appendChild(H(c, t.labelStyle, !0, !0));
574
+ let h = { width: 0, height: 0 };
575
+ if (N(b().flowchart.htmlLabels)) {
576
+ const k = o.children[0], x = C(o);
577
+ h = k.getBoundingClientRect(), x.attr("width", h.width), x.attr("height", h.height);
578
+ }
579
+ g.info("Text 2", n);
580
+ const y = n.slice(1, n.length);
581
+ let f = o.getBBox();
582
+ const p = s.node().appendChild(
583
+ H(y.join ? y.join("<br/>") : y, t.labelStyle, !0, !0)
584
+ );
585
+ if (N(b().flowchart.htmlLabels)) {
586
+ const k = p.children[0], x = C(p);
587
+ h = k.getBoundingClientRect(), x.attr("width", h.width), x.attr("height", h.height);
588
+ }
589
+ const d = t.padding / 2;
590
+ return C(p).attr(
591
+ "transform",
592
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
593
+ (h.width > f.width ? 0 : (f.width - h.width) / 2) + ", " + (f.height + d + 5) + ")"
594
+ ), C(o).attr(
595
+ "transform",
596
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
597
+ (h.width < f.width ? 0 : -(f.width - h.width) / 2) + ", 0)"
598
+ ), h = s.node().getBBox(), s.attr(
599
+ "transform",
600
+ "translate(" + -h.width / 2 + ", " + (-h.height / 2 - d + 3) + ")"
601
+ ), l.attr("class", "outer title-state").attr("x", -h.width / 2 - d).attr("y", -h.height / 2 - d).attr("width", h.width + t.padding).attr("height", h.height + t.padding), a.attr("class", "divider").attr("x1", -h.width / 2 - d).attr("x2", h.width / 2 + d).attr("y1", -h.height / 2 - d + f.height + d).attr("y2", -h.height / 2 - d + f.height + d), m(t, l), t.intersect = function(k) {
602
+ return w.rect(t, k);
603
+ }, i;
604
+ }, Qt = (e, t) => v(void 0, null, function* () {
605
+ const { shapeSvg: r, bbox: i } = yield T(
606
+ e,
607
+ t,
608
+ I(t, void 0),
609
+ !0
610
+ ), l = i.height + t.padding, a = i.width + l / 4 + t.padding, s = r.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -a / 2).attr("y", -l / 2).attr("width", a).attr("height", l);
611
+ return m(t, s), t.intersect = function(n) {
612
+ return w.rect(t, n);
613
+ }, r;
614
+ }), Vt = (e, t) => v(void 0, null, function* () {
615
+ const { shapeSvg: r, bbox: i, halfPadding: l } = yield T(
616
+ e,
617
+ t,
618
+ I(t, void 0),
619
+ !0
620
+ ), a = r.insert("circle", ":first-child");
621
+ return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), g.info("Circle main"), m(t, a), t.intersect = function(s) {
622
+ return g.info("Circle intersect", t, i.width / 2 + l, s), w.circle(t, i.width / 2 + l, s);
623
+ }, r;
624
+ }), qt = (e, t) => v(void 0, null, function* () {
625
+ const { shapeSvg: r, bbox: i, halfPadding: l } = yield T(
626
+ e,
627
+ t,
628
+ I(t, void 0),
629
+ !0
630
+ ), a = 5, s = r.insert("g", ":first-child"), n = s.insert("circle"), c = s.insert("circle");
631
+ return s.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + a).attr("width", i.width + t.padding + a * 2).attr("height", i.height + t.padding + a * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), g.info("DoubleCircle main"), m(t, n), t.intersect = function(o) {
632
+ return g.info("DoubleCircle intersect", t, i.width / 2 + l + a, o), w.circle(t, i.width / 2 + l + a, o);
633
+ }, r;
634
+ }), Jt = (e, t) => v(void 0, null, function* () {
635
+ const { shapeSvg: r, bbox: i } = yield T(
636
+ e,
637
+ t,
638
+ I(t, void 0),
639
+ !0
640
+ ), l = i.width + t.padding, a = i.height + t.padding, s = [
641
+ { x: 0, y: 0 },
642
+ { x: l, y: 0 },
643
+ { x: l, y: -a },
644
+ { x: 0, y: -a },
645
+ { x: 0, y: 0 },
646
+ { x: -8, y: 0 },
647
+ { x: l + 8, y: 0 },
648
+ { x: l + 8, y: -a },
649
+ { x: -8, y: -a },
650
+ { x: -8, y: 0 }
651
+ ], n = O(r, l, a, s);
652
+ return n.attr("style", t.style), m(t, n), t.intersect = function(c) {
653
+ return w.polygon(t, s, c);
654
+ }, r;
655
+ }), Kt = (e, t) => {
656
+ const r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = r.insert("circle", ":first-child");
657
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), m(t, i), t.intersect = function(l) {
658
+ return w.circle(t, 7, l);
659
+ }, r;
660
+ }, rt = (e, t, r) => {
661
+ const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
662
+ let l = 70, a = 10;
663
+ r === "LR" && (l = 10, a = 70);
664
+ const s = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * a / 2).attr("width", l).attr("height", a).attr("class", "fork-join");
665
+ return m(t, s), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
666
+ return w.rect(t, n);
667
+ }, i;
668
+ }, Pt = (e, t) => {
669
+ const r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = r.insert("circle", ":first-child"), l = r.insert("circle", ":first-child");
670
+ return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), m(t, l), t.intersect = function(a) {
671
+ return w.circle(t, 7, a);
672
+ }, r;
673
+ }, tr = (e, t) => {
674
+ const r = t.padding / 2, i = 4, l = 8;
675
+ let a;
676
+ t.classes ? a = "node " + t.classes : a = "node default";
677
+ const s = e.insert("g").attr("class", a).attr("id", t.domId || t.id), n = s.insert("rect", ":first-child"), c = s.insert("line"), o = s.insert("line");
678
+ let h = 0, y = i;
679
+ const f = s.insert("g").attr("class", "label");
680
+ let p = 0;
681
+ const d = t.classData.annotations && t.classData.annotations[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", x = f.node().appendChild(H(k, t.labelStyle, !0, !0));
682
+ let u = x.getBBox();
683
+ if (N(b().flowchart.htmlLabels)) {
684
+ const L = x.children[0], S = C(x);
685
+ u = L.getBoundingClientRect(), S.attr("width", u.width), S.attr("height", u.height);
686
+ }
687
+ t.classData.annotations[0] && (y += u.height + i, h += u.width);
688
+ let M = t.classData.label;
689
+ t.classData.type !== void 0 && t.classData.type !== "" && (b().flowchart.htmlLabels ? M += "&lt;" + t.classData.type + "&gt;" : M += "<" + t.classData.type + ">");
690
+ const E = f.node().appendChild(H(M, t.labelStyle, !0, !0));
691
+ C(E).attr("class", "classTitle");
692
+ let $ = E.getBBox();
693
+ if (N(b().flowchart.htmlLabels)) {
694
+ const L = E.children[0], S = C(E);
695
+ $ = L.getBoundingClientRect(), S.attr("width", $.width), S.attr("height", $.height);
696
+ }
697
+ y += $.height + i, $.width > h && (h = $.width);
698
+ const Y = [];
699
+ t.classData.members.forEach((L) => {
700
+ const S = L.getDisplayDetails();
701
+ let _ = S.displayText;
702
+ b().flowchart.htmlLabels && (_ = _.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
703
+ const W = f.node().appendChild(
704
+ H(
705
+ _,
706
+ S.cssStyle ? S.cssStyle : t.labelStyle,
707
+ !0,
708
+ !0
709
+ )
710
+ );
711
+ let R = W.getBBox();
712
+ if (N(b().flowchart.htmlLabels)) {
713
+ const Q = W.children[0], j = C(W);
714
+ R = Q.getBoundingClientRect(), j.attr("width", R.width), j.attr("height", R.height);
715
+ }
716
+ R.width > h && (h = R.width), y += R.height + i, Y.push(W);
717
+ }), y += l;
718
+ const A = [];
719
+ if (t.classData.methods.forEach((L) => {
720
+ const S = L.getDisplayDetails();
721
+ let _ = S.displayText;
722
+ b().flowchart.htmlLabels && (_ = _.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
723
+ const W = f.node().appendChild(
724
+ H(
725
+ _,
726
+ S.cssStyle ? S.cssStyle : t.labelStyle,
727
+ !0,
728
+ !0
729
+ )
730
+ );
731
+ let R = W.getBBox();
732
+ if (N(b().flowchart.htmlLabels)) {
733
+ const Q = W.children[0], j = C(W);
734
+ R = Q.getBoundingClientRect(), j.attr("width", R.width), j.attr("height", R.height);
735
+ }
736
+ R.width > h && (h = R.width), y += R.height + i, A.push(W);
737
+ }), y += l, d) {
738
+ let L = (h - u.width) / 2;
739
+ C(x).attr(
740
+ "transform",
741
+ "translate( " + (-1 * h / 2 + L) + ", " + -1 * y / 2 + ")"
742
+ ), p = u.height + i;
743
+ }
744
+ let lt = (h - $.width) / 2;
745
+ return C(E).attr(
746
+ "transform",
747
+ "translate( " + (-1 * h / 2 + lt) + ", " + (-1 * y / 2 + p) + ")"
748
+ ), p += $.height + i, c.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -y / 2 - r + l + p).attr("y2", -y / 2 - r + l + p), p += l, Y.forEach((L) => {
749
+ var _;
750
+ C(L).attr(
751
+ "transform",
752
+ "translate( " + -h / 2 + ", " + (-1 * y / 2 + p + l / 2) + ")"
753
+ );
754
+ const S = L == null ? void 0 : L.getBBox();
755
+ p += ((_ = S == null ? void 0 : S.height) != null ? _ : 0) + i;
756
+ }), p += l, o.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -y / 2 - r + l + p).attr("y2", -y / 2 - r + l + p), p += l, A.forEach((L) => {
757
+ var _;
758
+ C(L).attr(
759
+ "transform",
760
+ "translate( " + -h / 2 + ", " + (-1 * y / 2 + p) + ")"
761
+ );
762
+ const S = L == null ? void 0 : L.getBBox();
763
+ p += ((_ = S == null ? void 0 : S.height) != null ? _ : 0) + i;
764
+ }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - r).attr("y", -(y / 2) - r).attr("width", h + t.padding).attr("height", y + t.padding), m(t, n), t.intersect = function(L) {
765
+ return w.rect(t, L);
766
+ }, s;
767
+ }, at = {
768
+ rhombus: tt,
769
+ composite: Zt,
770
+ question: tt,
771
+ rect: zt,
772
+ labelRect: Gt,
773
+ rectWithTitle: Ft,
774
+ choice: Ht,
775
+ circle: Vt,
776
+ doublecircle: qt,
777
+ stadium: Qt,
778
+ hexagon: Nt,
779
+ block_arrow: Ot,
780
+ rect_left_inv_arrow: Wt,
781
+ lean_right: Xt,
782
+ lean_left: Yt,
783
+ trapezoid: Dt,
784
+ inv_trapezoid: At,
785
+ rect_right_inv_arrow: jt,
786
+ cylinder: Ut,
787
+ start: Kt,
788
+ end: Pt,
789
+ note: _t,
790
+ subroutine: Jt,
791
+ fork: rt,
792
+ join: rt,
793
+ class_box: tr
794
+ };
795
+ let D = {};
796
+ const pr = (e, t, r) => v(void 0, null, function* () {
797
+ let i, l;
798
+ if (t.link) {
799
+ let a;
800
+ b().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), l = yield at[t.shape](i, t, r);
801
+ } else
802
+ l = yield at[t.shape](e, t, r), i = l;
803
+ return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), i.attr("data-node", "true"), i.attr("data-id", t.id), D[t.id] = i, t.haveCallback && D[t.id].attr("class", D[t.id].attr("class") + " clickable"), i;
804
+ }), fr = (e, t) => {
805
+ D[t.id] = e;
806
+ }, xr = () => {
807
+ D = {};
808
+ }, dr = (e) => {
809
+ const t = D[e.id];
810
+ g.trace(
811
+ "Transforming node",
812
+ e.diff,
813
+ e,
814
+ "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")"
815
+ );
816
+ const r = 8, i = e.diff || 0;
817
+ return e.clusterNode ? t.attr(
818
+ "transform",
819
+ "translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - r) + ")"
820
+ ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
821
+ }, rr = ({
822
+ flowchart: e
823
+ }) => {
824
+ var s, n;
825
+ var t, r;
826
+ const i = (s = (t = e == null ? void 0 : e.subGraphTitleMargin) == null ? void 0 : t.top) != null ? s : 0, l = (n = (r = e == null ? void 0 : e.subGraphTitleMargin) == null ? void 0 : r.bottom) != null ? n : 0, a = i + l;
827
+ return {
828
+ subGraphTitleTopMargin: i,
829
+ subGraphTitleBottomMargin: l,
830
+ subGraphTitleTotalMargin: a
831
+ };
832
+ }, X = {
833
+ aggregation: 18,
834
+ extension: 18,
835
+ composition: 18,
836
+ dependency: 6,
837
+ lollipop: 13.5,
838
+ arrow_point: 5.3
839
+ };
840
+ function z(e, t) {
841
+ if (e === void 0 || t === void 0)
842
+ return { angle: 0, deltaX: 0, deltaY: 0 };
843
+ e = G(e), t = G(t);
844
+ const [r, i] = [e.x, e.y], [l, a] = [t.x, t.y], s = l - r, n = a - i;
845
+ return { angle: Math.atan(n / s), deltaX: s, deltaY: n };
846
+ }
847
+ const G = (e) => Array.isArray(e) ? { x: e[0], y: e[1] } : e, ar = (e) => ({
848
+ x: function(t, r, i) {
849
+ let l = 0;
850
+ if (r === 0 && Object.hasOwn(X, e.arrowTypeStart)) {
851
+ const { angle: a, deltaX: s } = z(i[0], i[1]);
852
+ l = X[e.arrowTypeStart] * Math.cos(a) * (s >= 0 ? 1 : -1);
853
+ } else if (r === i.length - 1 && Object.hasOwn(X, e.arrowTypeEnd)) {
854
+ const { angle: a, deltaX: s } = z(
855
+ i[i.length - 1],
856
+ i[i.length - 2]
857
+ );
858
+ l = X[e.arrowTypeEnd] * Math.cos(a) * (s >= 0 ? 1 : -1);
859
+ }
860
+ return G(t).x + l;
861
+ },
862
+ y: function(t, r, i) {
863
+ let l = 0;
864
+ if (r === 0 && Object.hasOwn(X, e.arrowTypeStart)) {
865
+ const { angle: a, deltaY: s } = z(i[0], i[1]);
866
+ l = X[e.arrowTypeStart] * Math.abs(Math.sin(a)) * (s >= 0 ? 1 : -1);
867
+ } else if (r === i.length - 1 && Object.hasOwn(X, e.arrowTypeEnd)) {
868
+ const { angle: a, deltaY: s } = z(
869
+ i[i.length - 1],
870
+ i[i.length - 2]
871
+ );
872
+ l = X[e.arrowTypeEnd] * Math.abs(Math.sin(a)) * (s >= 0 ? 1 : -1);
873
+ }
874
+ return G(t).y + l;
875
+ }
876
+ }), er = (e, t, r, i, l) => {
877
+ t.arrowTypeStart && et(e, "start", t.arrowTypeStart, r, i, l), t.arrowTypeEnd && et(e, "end", t.arrowTypeEnd, r, i, l);
878
+ }, sr = {
879
+ arrow_cross: "cross",
880
+ arrow_point: "point",
881
+ arrow_barb: "barb",
882
+ arrow_circle: "circle",
883
+ aggregation: "aggregation",
884
+ extension: "extension",
885
+ composition: "composition",
886
+ dependency: "dependency",
887
+ lollipop: "lollipop"
888
+ }, et = (e, t, r, i, l, a) => {
889
+ const s = sr[r];
890
+ if (!s) {
891
+ g.warn(`Unknown arrow type: ${r}`);
892
+ return;
893
+ }
894
+ const n = t === "start" ? "Start" : "End";
895
+ e.attr(`marker-${t}`, `url(${i}#${l}_${a}-${s}${n})`);
896
+ };
897
+ let F = {}, B = {};
898
+ const gr = () => {
899
+ F = {}, B = {};
900
+ }, ur = (e, t) => {
901
+ const r = N(b().flowchart.htmlLabels), i = t.labelType === "markdown" ? it(e, t.label, {
902
+ style: t.labelStyle,
903
+ useHtmlLabels: r,
904
+ addSvgBackground: !0
905
+ }) : H(t.label, t.labelStyle), l = e.insert("g").attr("class", "edgeLabel"), a = l.insert("g").attr("class", "label");
906
+ a.node().appendChild(i);
907
+ let s = i.getBBox();
908
+ if (r) {
909
+ const c = i.children[0], o = C(i);
910
+ s = c.getBoundingClientRect(), o.attr("width", s.width), o.attr("height", s.height);
911
+ }
912
+ a.attr("transform", "translate(" + -s.width / 2 + ", " + -s.height / 2 + ")"), F[t.id] = l, t.width = s.width, t.height = s.height;
913
+ let n;
914
+ if (t.startLabelLeft) {
915
+ const c = H(t.startLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
916
+ n = h.node().appendChild(c);
917
+ const y = c.getBBox();
918
+ h.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), B[t.id] || (B[t.id] = {}), B[t.id].startLeft = o, Z(n, t.startLabelLeft);
919
+ }
920
+ if (t.startLabelRight) {
921
+ const c = H(t.startLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
922
+ n = o.node().appendChild(c), h.node().appendChild(c);
923
+ const y = c.getBBox();
924
+ h.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), B[t.id] || (B[t.id] = {}), B[t.id].startRight = o, Z(n, t.startLabelRight);
925
+ }
926
+ if (t.endLabelLeft) {
927
+ const c = H(t.endLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
928
+ n = h.node().appendChild(c);
929
+ const y = c.getBBox();
930
+ h.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), o.node().appendChild(c), B[t.id] || (B[t.id] = {}), B[t.id].endLeft = o, Z(n, t.endLabelLeft);
931
+ }
932
+ if (t.endLabelRight) {
933
+ const c = H(t.endLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
934
+ n = h.node().appendChild(c);
935
+ const y = c.getBBox();
936
+ h.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), o.node().appendChild(c), B[t.id] || (B[t.id] = {}), B[t.id].endRight = o, Z(n, t.endLabelRight);
937
+ }
938
+ return i;
939
+ };
940
+ function Z(e, t) {
941
+ b().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
942
+ }
943
+ const br = (e, t) => {
944
+ g.debug("Moving label abc88 ", e.id, e.label, F[e.id], t);
945
+ let r = t.updatedPath ? t.updatedPath : t.originalPath;
946
+ const i = b(), { subGraphTitleTotalMargin: l } = rr(i);
947
+ if (e.label) {
948
+ const a = F[e.id];
949
+ let s = e.x, n = e.y;
950
+ if (r) {
951
+ const c = U.calcLabelPosition(r);
952
+ g.debug(
953
+ "Moving label " + e.label + " from (",
954
+ s,
955
+ ",",
956
+ n,
957
+ ") to (",
958
+ c.x,
959
+ ",",
960
+ c.y,
961
+ ") abc88"
962
+ ), t.updatedPath && (s = c.x, n = c.y);
963
+ }
964
+ a.attr("transform", `translate(${s}, ${n + l / 2})`);
965
+ }
966
+ if (e.startLabelLeft) {
967
+ const a = B[e.id].startLeft;
968
+ let s = e.x, n = e.y;
969
+ if (r) {
970
+ const c = U.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
971
+ s = c.x, n = c.y;
972
+ }
973
+ a.attr("transform", `translate(${s}, ${n})`);
974
+ }
975
+ if (e.startLabelRight) {
976
+ const a = B[e.id].startRight;
977
+ let s = e.x, n = e.y;
978
+ if (r) {
979
+ const c = U.calcTerminalLabelPosition(
980
+ e.arrowTypeStart ? 10 : 0,
981
+ "start_right",
982
+ r
983
+ );
984
+ s = c.x, n = c.y;
985
+ }
986
+ a.attr("transform", `translate(${s}, ${n})`);
987
+ }
988
+ if (e.endLabelLeft) {
989
+ const a = B[e.id].endLeft;
990
+ let s = e.x, n = e.y;
991
+ if (r) {
992
+ const c = U.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
993
+ s = c.x, n = c.y;
994
+ }
995
+ a.attr("transform", `translate(${s}, ${n})`);
996
+ }
997
+ if (e.endLabelRight) {
998
+ const a = B[e.id].endRight;
999
+ let s = e.x, n = e.y;
1000
+ if (r) {
1001
+ const c = U.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
1002
+ s = c.x, n = c.y;
1003
+ }
1004
+ a.attr("transform", `translate(${s}, ${n})`);
1005
+ }
1006
+ }, ir = (e, t) => {
1007
+ const r = e.x, i = e.y, l = Math.abs(t.x - r), a = Math.abs(t.y - i), s = e.width / 2, n = e.height / 2;
1008
+ return l >= s || a >= n;
1009
+ }, nr = (e, t, r) => {
1010
+ g.debug(`intersection calc abc89:
1011
+ outsidePoint: ${JSON.stringify(t)}
1012
+ insidePoint : ${JSON.stringify(r)}
1013
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1014
+ const i = e.x, l = e.y, a = Math.abs(i - r.x), s = e.width / 2;
1015
+ let n = r.x < t.x ? s - a : s + a;
1016
+ const c = e.height / 2, o = Math.abs(t.y - r.y), h = Math.abs(t.x - r.x);
1017
+ if (Math.abs(l - t.y) * s > Math.abs(i - t.x) * c) {
1018
+ let y = r.y < t.y ? t.y - c - l : l - c - t.y;
1019
+ n = h * y / o;
1020
+ const f = {
1021
+ x: r.x < t.x ? r.x + n : r.x - h + n,
1022
+ y: r.y < t.y ? r.y + o - y : r.y - o + y
1023
+ };
1024
+ return n === 0 && (f.x = t.x, f.y = t.y), h === 0 && (f.x = t.x), o === 0 && (f.y = t.y), g.debug(`abc89 topp/bott calc, Q ${o}, q ${y}, R ${h}, r ${n}`, f), f;
1025
+ } else {
1026
+ r.x < t.x ? n = t.x - s - i : n = i - s - t.x;
1027
+ let y = o * n / h, f = r.x < t.x ? r.x + h - n : r.x - h + n, p = r.y < t.y ? r.y + y : r.y - y;
1028
+ return g.debug(`sides calc abc89, Q ${o}, q ${y}, R ${h}, r ${n}`, { _x: f, _y: p }), n === 0 && (f = t.x, p = t.y), h === 0 && (f = t.x), o === 0 && (p = t.y), { x: f, y: p };
1029
+ }
1030
+ }, st = (e, t) => {
1031
+ g.debug("abc88 cutPathAtIntersect", e, t);
1032
+ let r = [], i = e[0], l = !1;
1033
+ return e.forEach((a) => {
1034
+ if (!ir(t, a) && !l) {
1035
+ const s = nr(t, i, a);
1036
+ let n = !1;
1037
+ r.forEach((c) => {
1038
+ n = n || c.x === s.x && c.y === s.y;
1039
+ }), r.some((c) => c.x === s.x && c.y === s.y) || r.push(s), l = !0;
1040
+ } else
1041
+ i = a, l || r.push(a);
1042
+ }), r;
1043
+ }, wr = function(e, t, r, i, l, a, s) {
1044
+ let n = r.points;
1045
+ g.debug("abc88 InsertEdge: edge=", r, "e=", t);
1046
+ let c = !1;
1047
+ const o = a.node(t.v);
1048
+ var h = a.node(t.w);
1049
+ h != null && h.intersect && (o != null && o.intersect) && (n = n.slice(1, r.points.length - 1), n.unshift(o.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), r.toCluster && (g.debug("to cluster abc88", i[r.toCluster]), n = st(r.points, i[r.toCluster].node), c = !0), r.fromCluster && (g.debug("from cluster abc88", i[r.fromCluster]), n = st(n.reverse(), i[r.fromCluster].node).reverse(), c = !0);
1050
+ const y = n.filter(($) => !Number.isNaN($.y));
1051
+ let f = ct;
1052
+ r.curve && (l === "graph" || l === "flowchart") && (f = r.curve);
1053
+ const { x: p, y: d } = ar(r), k = ht().x(p).y(d).curve(f);
1054
+ let x;
1055
+ switch (r.thickness) {
1056
+ case "normal":
1057
+ x = "edge-thickness-normal";
1058
+ break;
1059
+ case "thick":
1060
+ x = "edge-thickness-thick";
1061
+ break;
1062
+ case "invisible":
1063
+ x = "edge-thickness-thick";
1064
+ break;
1065
+ default:
1066
+ x = "";
1067
+ }
1068
+ switch (r.pattern) {
1069
+ case "solid":
1070
+ x += " edge-pattern-solid";
1071
+ break;
1072
+ case "dotted":
1073
+ x += " edge-pattern-dotted";
1074
+ break;
1075
+ case "dashed":
1076
+ x += " edge-pattern-dashed";
1077
+ break;
1078
+ }
1079
+ const u = e.append("path").attr("d", k(y)).attr("id", r.id).attr("class", " " + x + (r.classes ? " " + r.classes : "")).attr("style", r.style);
1080
+ let M = "";
1081
+ (b().flowchart.arrowMarkerAbsolute || b().state.arrowMarkerAbsolute) && (M = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, M = M.replace(/\(/g, "\\("), M = M.replace(/\)/g, "\\)")), er(u, r, M, s, l);
1082
+ let E = {};
1083
+ return c && (E.updatedPath = n), E.originalPath = r.points, E;
1084
+ };
1085
+ export {
1086
+ pr as a,
1087
+ ur as b,
1088
+ wr as c,
1089
+ br as d,
1090
+ xr as e,
1091
+ gr as f,
1092
+ rr as g,
1093
+ H as h,
1094
+ yr as i,
1095
+ Ct as j,
1096
+ ar as k,
1097
+ T as l,
1098
+ er as m,
1099
+ dr as p,
1100
+ fr as s,
1101
+ m as u
1102
+ };