@kong-ui-public/documentation 0.7.83 → 0.7.85
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.
- package/dist/_basePickBy-CMfPif8e-CmRJF0Pz.js +151 -0
- package/dist/_baseUniq-CXqhI00C-BfnSCqya.js +615 -0
- package/dist/arc-JIMrD458-iE0qPqUL.js +83 -0
- package/dist/architecture-I3QFYML2-Bgw7-fJd-BmHcSoDq.js +5 -0
- package/dist/{architectureDiagram-V6B76FHG-CMXFnETI-RxxML1uW.js → architectureDiagram-AYX4OTIS-XPsSAXrN-CriQXfFm.js} +4 -4
- package/dist/blockDiagram-XN6IQ5JY-IfzOVP1S-DoilgKcQ.js +2247 -0
- package/dist/{c4Diagram-THADGKDP-BoXI_MdM-85LhjWUD.js → c4Diagram-GPMAACGM-RttNBnvg-DemUG3qf.js} +2 -2
- package/dist/{channel-BlAyqTfO-DcF7shsf.js → channel-DEiqvYYf-DqQTZyIM.js} +1 -1
- package/dist/{chunk-OQCM5LHU-BXp7HdZf-DAxyAqhb.js → chunk-BAOP5US2-D_mPkUfX-Dlqx79Tr.js} +1 -1
- package/dist/chunk-CXDZ2C6O-B6QVQzrJ-CdVn1xaX.js +1301 -0
- package/dist/{chunk-DUMQOTYW-BvseU82P-Cv9cgfHg.js → chunk-EICJXIV7-B3uVnKYK-BPFil4EM.js} +1 -1
- package/dist/{chunk-2JBRQKJ5-D-tjQIH--CX9PfGSj.js → chunk-JZAHL7AJ-B8L_7Xh_-C2ETRUtV.js} +21 -21
- package/dist/{chunk-2RYQ3QTB-CJAPCFIj-C6EEVa0L.js → chunk-RGXPSUNZ-PjQy3A3Y-BiDEi6k5.js} +1 -1
- package/dist/{chunk-XVOYOM2C-DSF8EQmO-CJoKjxiE.js → chunk-VCFP4HPQ-qZEjUbIz-7kfkUrsj.js} +1 -1
- package/dist/classDiagram-FEGYTUDG-Bu9qKgav-DF2ZcQyp.js +14 -0
- package/dist/classDiagram-v2-R65JCUOM-Bu9qKgav-DF2ZcQyp.js +14 -0
- package/dist/{clone-BxgFQWIV-C8w0qOf5.js → clone-elND5I63-U8WRvSPu.js} +1 -1
- package/dist/dagre-SWNTG5WE-CcKMLYcK-tREOd3Fb.js +447 -0
- package/dist/{diagram-QS5GVLUX-Ck_HO8gZ-CFWjkYXj.js → diagram-NZMEDLQF-vjbbgzvH-BDFE_-Eo.js} +6 -6
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +401 -273
- package/dist/{erDiagram-62CBQV5Y-CaO8CQzG-DYEXkRnA.js → erDiagram-WO52GFNT-N8TeMKSM-BojFH-Dn.js} +56 -56
- package/dist/flowDiagram-TSWR6T2D-DzECWIN--CnDMIIi-.js +1484 -0
- package/dist/{ganttDiagram-ASEIQ4P5-BiIuu6iJ-DXC89NBD.js → ganttDiagram-FAOCOTIY-DmxDGUpf-BGJLIQAo.js} +61 -61
- package/dist/gitGraph-YCYPL57B-BKlVjqGu-BRRTPERj.js +5 -0
- package/dist/{gitGraphDiagram-UL5UFKDR-C4dDL1m3-pGO-Nubf.js → gitGraphDiagram-5C7YHVU6-CfJ_hQ2h-C2aLT5AH.js} +21 -21
- package/dist/{graph-BDwITe7N-Dg4ZhErV.js → graph-C5siWsaJ-djbzUgq8.js} +52 -55
- package/dist/{index-D1jNpyAG.js → index-BXFfc1qh.js} +17314 -15496
- package/dist/info-46DW6VJ7-QBUrqpM0-D7DXfBfh.js +5 -0
- package/dist/{infoDiagram-7APDZ6AT-DQAU4aEA-ZuNKK8Q1.js → infoDiagram-P5D6MX3V-CthsN8fk-ju-grajk.js} +2 -2
- package/dist/{journeyDiagram-G5LC7W2K-BDjs8Ede-CBVXgKDg.js → journeyDiagram-UIGPPNLY-CB1xWSVF-CnOTIXjT.js} +3 -3
- package/dist/kanban-definition-KMT3NSR2-B76JZ_Kx-BuaYPyou.js +718 -0
- package/dist/layout-mwnMvyc4-B2PmGvWD.js +1321 -0
- package/dist/{linear-DJf2yjqH-Qa8JBmhC.js → linear-XztDb0hj-RsuwoFLQ.js} +46 -46
- package/dist/{mermaid-parser.core-DKcB0zTx-Cuc2e_U9.js → mermaid-parser.core-C4mt_cFi-BuaZi6gx.js} +9 -9
- package/dist/{mindmap-definition-FCEC46F3-Dfona71I-BMB5v8Sw.js → mindmap-definition-R7LC4OIY-Cg3Nsctr-BcCPx65V.js} +1 -1
- package/dist/packet-W2GHVCYJ-BJGXYVlB-DlnQVVmK.js +5 -0
- package/dist/pie-BEWT4RHE-XO1bTOj2-DEYSeXSg.js +5 -0
- package/dist/{pieDiagram-OZX6XH5M-CVVFrPaX-C40AWUnf.js → pieDiagram-BLWKPB35-Bs5Iyn_g-CnOiPji_.js} +27 -27
- package/dist/{quadrantDiagram-VG34DGKC-D_n6ouG0-B7tCVKZS.js → quadrantDiagram-QXWEEFXS-n8j7IqmF-CloVXY0U.js} +16 -16
- package/dist/{requirementDiagram-FPZB6IJI-DgzsPnSP-BdT6rZ42.js → requirementDiagram-XAUNFCZY-DI_Pyl2h-D8hqXle2.js} +20 -20
- package/dist/{sankeyDiagram-KMMQDL5K-slN_anzC-C8cSA1pn.js → sankeyDiagram-LVV36NHA-Bei7yBJl-DvbyWSci.js} +1 -1
- package/dist/{sequenceDiagram-PQT5PN7B-DmYxtSNe-kmiDoefU.js → sequenceDiagram-D25TJ2OB-NAPdhBbI-DQR1b0UZ.js} +21 -21
- package/dist/{stateDiagram-TQSDS2D4-DaGylNtS-DZvK22EK.js → stateDiagram-GNSP7T6Y-Dzq9j0YG-BgVCaCOx.js} +14 -15
- package/dist/{stateDiagram-v2-J5TZWJW5-CkpV3aOb-CRLcbMy9.js → stateDiagram-v2-HP6YRVRG-Jl4ubGlG-BeMvcZLQ.js} +2 -3
- package/dist/{timeline-definition-KYQAIZUX-BbQn7lRo-DdMJtCcZ.js → timeline-definition-27KQCCZ3-Dyj-cUhB-cBpLcB_z.js} +91 -91
- package/dist/{xychartDiagram-LESROZAQ-C5RGN8Yc-D1Q0T8zi.js → xychartDiagram-MYLB5AYS-Bc_nZcHL-YLCG5NJT.js} +2 -2
- package/package.json +5 -5
- package/dist/_basePickBy-C3_IHxiB-Bgb-nBpw.js +0 -143
- package/dist/_baseUniq-Cede_3wW-BVX848YU.js +0 -622
- package/dist/arc-CFIMKg_S-CJkN7pL8.js +0 -83
- package/dist/architecture-I3QFYML2-CsfpifL5-B7ba29Kf.js +0 -5
- package/dist/blockDiagram-EN3ZKWFM-CyddtNyi-BO48RJ5X.js +0 -1232
- package/dist/chunk-BAVOGKFW-DMR4mnUx-ZqKP-ubQ.js +0 -1092
- package/dist/chunk-UGV5ZQQN-DJ9JPuwX-CiNn-tmJ.js +0 -254
- package/dist/chunk-YWFND7JV-CJxpOF0s-CKv3TLz3.js +0 -786
- package/dist/classDiagram-4BHYIK4I-Bh2E4V_q-Bp1df6xf.js +0 -214
- package/dist/classDiagram-v2-FI7KE7WJ-zeS53lAE--zqW0wuN.js +0 -545
- package/dist/dagre-P3YPLUS5-DvPNKrZS-BqJ7-FR_.js +0 -421
- package/dist/flowDiagram-JSIZSE4D-C3p20RgK-76C6C_fU.js +0 -1380
- package/dist/gitGraph-YCYPL57B-BXHaWu1_-L6S_Q-ER.js +0 -5
- package/dist/info-46DW6VJ7-gLazUuGQ-CgME-TPe.js +0 -5
- package/dist/json-Dg9P6BhK-CcBa4IfV.js +0 -31
- package/dist/layout--tn8zpzB-CFuPSG6n.js +0 -1381
- package/dist/packet-W2GHVCYJ-Dn1-cCwP-_7hKzD3w.js +0 -5
- package/dist/pie-BEWT4RHE-DvPKCMtn-CWoQ7JX6.js +0 -5
|
@@ -1,786 +0,0 @@
|
|
|
1
|
-
import { _ as h, af as L, l as B, g as D, at as j, au as nt, av as H, aw as lt, ae as Y } from "./index-D1jNpyAG.js";
|
|
2
|
-
function F(l, t) {
|
|
3
|
-
t && l.attr("style", t);
|
|
4
|
-
}
|
|
5
|
-
h(F, "applyStyle");
|
|
6
|
-
function K(l) {
|
|
7
|
-
const t = L(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), n = t.append("xhtml:div"), a = l.label, i = l.isNode ? "nodeLabel" : "edgeLabel", e = n.append("span");
|
|
8
|
-
return e.html(a), F(e, l.labelStyle), e.attr("class", i), F(n, l.labelStyle), n.style("display", "inline-block"), n.style("white-space", "nowrap"), n.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
|
|
9
|
-
}
|
|
10
|
-
h(K, "addHtmlLabel");
|
|
11
|
-
var ot = /* @__PURE__ */ h((l, t, n, a) => {
|
|
12
|
-
let i = l || "";
|
|
13
|
-
if (typeof i == "object" && (i = i[0]), j(D().flowchart.htmlLabels)) {
|
|
14
|
-
i = i.replace(/\\n|\n/g, "<br />"), B.debug("vertexText" + i);
|
|
15
|
-
const e = {
|
|
16
|
-
isNode: a,
|
|
17
|
-
label: nt(H(i)),
|
|
18
|
-
labelStyle: t.replace("fill:", "color:")
|
|
19
|
-
};
|
|
20
|
-
return K(e);
|
|
21
|
-
} else {
|
|
22
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
23
|
-
e.setAttribute("style", t.replace("color:", "fill:"));
|
|
24
|
-
let r = [];
|
|
25
|
-
typeof i == "string" ? r = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? r = i : r = [];
|
|
26
|
-
for (const s of r) {
|
|
27
|
-
const o = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
28
|
-
o.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), o.setAttribute("dy", "1em"), o.setAttribute("x", "0"), n ? o.setAttribute("class", "title-row") : o.setAttribute("class", "row"), o.textContent = s.trim(), e.appendChild(o);
|
|
29
|
-
}
|
|
30
|
-
return e;
|
|
31
|
-
}
|
|
32
|
-
}, "createLabel"), z = ot, C = /* @__PURE__ */ h(async (l, t, n, a) => {
|
|
33
|
-
const i = D();
|
|
34
|
-
let e;
|
|
35
|
-
const r = t.useHtmlLabels || j(i.flowchart.htmlLabels);
|
|
36
|
-
n ? e = n : e = "node default";
|
|
37
|
-
const s = l.insert("g").attr("class", e).attr("id", t.domId || t.id), o = s.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
38
|
-
let c;
|
|
39
|
-
t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
40
|
-
const d = o.node();
|
|
41
|
-
let g;
|
|
42
|
-
t.labelType === "markdown" ? g = lt(
|
|
43
|
-
o,
|
|
44
|
-
Y(H(c), i),
|
|
45
|
-
{
|
|
46
|
-
useHtmlLabels: r,
|
|
47
|
-
width: t.width || i.flowchart.wrappingWidth,
|
|
48
|
-
classes: "markdown-node-label"
|
|
49
|
-
},
|
|
50
|
-
i
|
|
51
|
-
) : g = d.appendChild(
|
|
52
|
-
z(Y(H(c), i), t.labelStyle, !1, a)
|
|
53
|
-
);
|
|
54
|
-
let y = g.getBBox();
|
|
55
|
-
const p = t.padding / 2;
|
|
56
|
-
if (j(i.flowchart.htmlLabels)) {
|
|
57
|
-
const x = g.children[0], m = L(g), f = x.getElementsByTagName("img");
|
|
58
|
-
if (f) {
|
|
59
|
-
const E = c.replace(/<img[^>]*>/g, "").trim() === "";
|
|
60
|
-
await Promise.all(
|
|
61
|
-
[...f].map(
|
|
62
|
-
(w) => new Promise((P) => {
|
|
63
|
-
function _() {
|
|
64
|
-
if (w.style.display = "flex", w.style.flexDirection = "column", E) {
|
|
65
|
-
const k = i.fontSize ? i.fontSize : window.getComputedStyle(document.body).fontSize, $ = parseInt(k, 10) * 5 + "px";
|
|
66
|
-
w.style.minWidth = $, w.style.maxWidth = $;
|
|
67
|
-
} else
|
|
68
|
-
w.style.width = "100%";
|
|
69
|
-
P(w);
|
|
70
|
-
}
|
|
71
|
-
h(_, "setupImage"), setTimeout(() => {
|
|
72
|
-
w.complete && _();
|
|
73
|
-
}), w.addEventListener("error", _), w.addEventListener("load", _);
|
|
74
|
-
})
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
y = x.getBoundingClientRect(), m.attr("width", y.width), m.attr("height", y.height);
|
|
79
|
-
}
|
|
80
|
-
return r ? o.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : o.attr("transform", "translate(0, " + -y.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: s, bbox: y, halfPadding: p, label: o };
|
|
81
|
-
}, "labelHelper"), b = /* @__PURE__ */ h((l, t) => {
|
|
82
|
-
const n = t.node().getBBox();
|
|
83
|
-
l.width = n.width, l.height = n.height;
|
|
84
|
-
}, "updateNodeBounds");
|
|
85
|
-
function N(l, t, n, a) {
|
|
86
|
-
return l.insert("polygon", ":first-child").attr(
|
|
87
|
-
"points",
|
|
88
|
-
a.map(function(i) {
|
|
89
|
-
return i.x + "," + i.y;
|
|
90
|
-
}).join(" ")
|
|
91
|
-
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
92
|
-
}
|
|
93
|
-
h(N, "insertPolygonShape");
|
|
94
|
-
var dt = /* @__PURE__ */ h((l) => {
|
|
95
|
-
const t = /* @__PURE__ */ new Set();
|
|
96
|
-
for (const n of l)
|
|
97
|
-
switch (n) {
|
|
98
|
-
case "x":
|
|
99
|
-
t.add("right"), t.add("left");
|
|
100
|
-
break;
|
|
101
|
-
case "y":
|
|
102
|
-
t.add("up"), t.add("down");
|
|
103
|
-
break;
|
|
104
|
-
default:
|
|
105
|
-
t.add(n);
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
return t;
|
|
109
|
-
}, "expandAndDeduplicateDirections"), ht = /* @__PURE__ */ h((l, t, n) => {
|
|
110
|
-
const a = dt(l), i = 2, e = t.height + 2 * n.padding, r = e / i, s = t.width + 2 * r + n.padding, o = n.padding / 2;
|
|
111
|
-
return a.has("right") && a.has("left") && a.has("up") && a.has("down") ? [
|
|
112
|
-
// Bottom
|
|
113
|
-
{ x: 0, y: 0 },
|
|
114
|
-
{ x: r, y: 0 },
|
|
115
|
-
{ x: s / 2, y: 2 * o },
|
|
116
|
-
{ x: s - r, y: 0 },
|
|
117
|
-
{ x: s, y: 0 },
|
|
118
|
-
// Right
|
|
119
|
-
{ x: s, y: -e / 3 },
|
|
120
|
-
{ x: s + 2 * o, y: -e / 2 },
|
|
121
|
-
{ x: s, y: -2 * e / 3 },
|
|
122
|
-
{ x: s, y: -e },
|
|
123
|
-
// Top
|
|
124
|
-
{ x: s - r, y: -e },
|
|
125
|
-
{ x: s / 2, y: -e - 2 * o },
|
|
126
|
-
{ x: r, y: -e },
|
|
127
|
-
// Left
|
|
128
|
-
{ x: 0, y: -e },
|
|
129
|
-
{ x: 0, y: -2 * e / 3 },
|
|
130
|
-
{ x: -2 * o, y: -e / 2 },
|
|
131
|
-
{ x: 0, y: -e / 3 }
|
|
132
|
-
] : a.has("right") && a.has("left") && a.has("up") ? [
|
|
133
|
-
{ x: r, y: 0 },
|
|
134
|
-
{ x: s - r, y: 0 },
|
|
135
|
-
{ x: s, y: -e / 2 },
|
|
136
|
-
{ x: s - r, y: -e },
|
|
137
|
-
{ x: r, y: -e },
|
|
138
|
-
{ x: 0, y: -e / 2 }
|
|
139
|
-
] : a.has("right") && a.has("left") && a.has("down") ? [
|
|
140
|
-
{ x: 0, y: 0 },
|
|
141
|
-
{ x: r, y: -e },
|
|
142
|
-
{ x: s - r, y: -e },
|
|
143
|
-
{ x: s, y: 0 }
|
|
144
|
-
] : a.has("right") && a.has("up") && a.has("down") ? [
|
|
145
|
-
{ x: 0, y: 0 },
|
|
146
|
-
{ x: s, y: -r },
|
|
147
|
-
{ x: s, y: -e + r },
|
|
148
|
-
{ x: 0, y: -e }
|
|
149
|
-
] : a.has("left") && a.has("up") && a.has("down") ? [
|
|
150
|
-
{ x: s, y: 0 },
|
|
151
|
-
{ x: 0, y: -r },
|
|
152
|
-
{ x: 0, y: -e + r },
|
|
153
|
-
{ x: s, y: -e }
|
|
154
|
-
] : a.has("right") && a.has("left") ? [
|
|
155
|
-
{ x: r, y: 0 },
|
|
156
|
-
{ x: r, y: -o },
|
|
157
|
-
{ x: s - r, y: -o },
|
|
158
|
-
{ x: s - r, y: 0 },
|
|
159
|
-
{ x: s, y: -e / 2 },
|
|
160
|
-
{ x: s - r, y: -e },
|
|
161
|
-
{ x: s - r, y: -e + o },
|
|
162
|
-
{ x: r, y: -e + o },
|
|
163
|
-
{ x: r, y: -e },
|
|
164
|
-
{ x: 0, y: -e / 2 }
|
|
165
|
-
] : a.has("up") && a.has("down") ? [
|
|
166
|
-
// Bottom center
|
|
167
|
-
{ x: s / 2, y: 0 },
|
|
168
|
-
// Left pont of bottom arrow
|
|
169
|
-
{ x: 0, y: -o },
|
|
170
|
-
{ x: r, y: -o },
|
|
171
|
-
// Left top over vertical section
|
|
172
|
-
{ x: r, y: -e + o },
|
|
173
|
-
{ x: 0, y: -e + o },
|
|
174
|
-
// Top of arrow
|
|
175
|
-
{ x: s / 2, y: -e },
|
|
176
|
-
{ x: s, y: -e + o },
|
|
177
|
-
// Top of right vertical bar
|
|
178
|
-
{ x: s - r, y: -e + o },
|
|
179
|
-
{ x: s - r, y: -o },
|
|
180
|
-
{ x: s, y: -o }
|
|
181
|
-
] : a.has("right") && a.has("up") ? [
|
|
182
|
-
{ x: 0, y: 0 },
|
|
183
|
-
{ x: s, y: -r },
|
|
184
|
-
{ x: 0, y: -e }
|
|
185
|
-
] : a.has("right") && a.has("down") ? [
|
|
186
|
-
{ x: 0, y: 0 },
|
|
187
|
-
{ x: s, y: 0 },
|
|
188
|
-
{ x: 0, y: -e }
|
|
189
|
-
] : a.has("left") && a.has("up") ? [
|
|
190
|
-
{ x: s, y: 0 },
|
|
191
|
-
{ x: 0, y: -r },
|
|
192
|
-
{ x: s, y: -e }
|
|
193
|
-
] : a.has("left") && a.has("down") ? [
|
|
194
|
-
{ x: s, y: 0 },
|
|
195
|
-
{ x: 0, y: 0 },
|
|
196
|
-
{ x: s, y: -e }
|
|
197
|
-
] : a.has("right") ? [
|
|
198
|
-
{ x: r, y: -o },
|
|
199
|
-
{ x: r, y: -o },
|
|
200
|
-
{ x: s - r, y: -o },
|
|
201
|
-
{ x: s - r, y: 0 },
|
|
202
|
-
{ x: s, y: -e / 2 },
|
|
203
|
-
{ x: s - r, y: -e },
|
|
204
|
-
{ x: s - r, y: -e + o },
|
|
205
|
-
// top left corner of arrow
|
|
206
|
-
{ x: r, y: -e + o },
|
|
207
|
-
{ x: r, y: -e + o }
|
|
208
|
-
] : a.has("left") ? [
|
|
209
|
-
{ x: r, y: 0 },
|
|
210
|
-
{ x: r, y: -o },
|
|
211
|
-
// Two points, the right corners
|
|
212
|
-
{ x: s - r, y: -o },
|
|
213
|
-
{ x: s - r, y: -e + o },
|
|
214
|
-
{ x: r, y: -e + o },
|
|
215
|
-
{ x: r, y: -e },
|
|
216
|
-
{ x: 0, y: -e / 2 }
|
|
217
|
-
] : a.has("up") ? [
|
|
218
|
-
// Bottom center
|
|
219
|
-
{ x: r, y: -o },
|
|
220
|
-
// Left top over vertical section
|
|
221
|
-
{ x: r, y: -e + o },
|
|
222
|
-
{ x: 0, y: -e + o },
|
|
223
|
-
// Top of arrow
|
|
224
|
-
{ x: s / 2, y: -e },
|
|
225
|
-
{ x: s, y: -e + o },
|
|
226
|
-
// Top of right vertical bar
|
|
227
|
-
{ x: s - r, y: -e + o },
|
|
228
|
-
{ x: s - r, y: -o }
|
|
229
|
-
] : a.has("down") ? [
|
|
230
|
-
// Bottom center
|
|
231
|
-
{ x: s / 2, y: 0 },
|
|
232
|
-
// Left pont of bottom arrow
|
|
233
|
-
{ x: 0, y: -o },
|
|
234
|
-
{ x: r, y: -o },
|
|
235
|
-
// Left top over vertical section
|
|
236
|
-
{ x: r, y: -e + o },
|
|
237
|
-
{ x: s - r, y: -e + o },
|
|
238
|
-
{ x: s - r, y: -o },
|
|
239
|
-
{ x: s, y: -o }
|
|
240
|
-
] : [{ x: 0, y: 0 }];
|
|
241
|
-
}, "getArrowPoints");
|
|
242
|
-
function Z(l, t) {
|
|
243
|
-
return l.intersect(t);
|
|
244
|
-
}
|
|
245
|
-
h(Z, "intersectNode");
|
|
246
|
-
var ct = Z;
|
|
247
|
-
function tt(l, t, n, a) {
|
|
248
|
-
var i = l.x, e = l.y, r = i - a.x, s = e - a.y, o = Math.sqrt(t * t * s * s + n * n * r * r), c = Math.abs(t * n * r / o);
|
|
249
|
-
a.x < i && (c = -c);
|
|
250
|
-
var d = Math.abs(t * n * s / o);
|
|
251
|
-
return a.y < e && (d = -d), { x: i + c, y: e + d };
|
|
252
|
-
}
|
|
253
|
-
h(tt, "intersectEllipse");
|
|
254
|
-
var et = tt;
|
|
255
|
-
function at(l, t, n) {
|
|
256
|
-
return et(l, t, t, n);
|
|
257
|
-
}
|
|
258
|
-
h(at, "intersectCircle");
|
|
259
|
-
var yt = at;
|
|
260
|
-
function rt(l, t, n, a) {
|
|
261
|
-
var i, e, r, s, o, c, d, g, y, p, x, m, f, E, w;
|
|
262
|
-
if (i = t.y - l.y, r = l.x - t.x, o = t.x * l.y - l.x * t.y, y = i * n.x + r * n.y + o, p = i * a.x + r * a.y + o, !(y !== 0 && p !== 0 && U(y, p)) && (e = a.y - n.y, s = n.x - a.x, c = a.x * n.y - n.x * a.y, d = e * l.x + s * l.y + c, g = e * t.x + s * t.y + c, !(d !== 0 && g !== 0 && U(d, g)) && (x = i * s - e * r, x !== 0)))
|
|
263
|
-
return m = Math.abs(x / 2), f = r * c - s * o, E = f < 0 ? (f - m) / x : (f + m) / x, f = e * o - i * c, w = f < 0 ? (f - m) / x : (f + m) / x, { x: E, y: w };
|
|
264
|
-
}
|
|
265
|
-
h(rt, "intersectLine");
|
|
266
|
-
function U(l, t) {
|
|
267
|
-
return l * t > 0;
|
|
268
|
-
}
|
|
269
|
-
h(U, "sameSign");
|
|
270
|
-
var gt = rt, xt = it;
|
|
271
|
-
function it(l, t, n) {
|
|
272
|
-
var a = l.x, i = l.y, e = [], r = Number.POSITIVE_INFINITY, s = Number.POSITIVE_INFINITY;
|
|
273
|
-
typeof t.forEach == "function" ? t.forEach(function(x) {
|
|
274
|
-
r = Math.min(r, x.x), s = Math.min(s, x.y);
|
|
275
|
-
}) : (r = Math.min(r, t.x), s = Math.min(s, t.y));
|
|
276
|
-
for (var o = a - l.width / 2 - r, c = i - l.height / 2 - s, d = 0; d < t.length; d++) {
|
|
277
|
-
var g = t[d], y = t[d < t.length - 1 ? d + 1 : 0], p = gt(
|
|
278
|
-
l,
|
|
279
|
-
n,
|
|
280
|
-
{ x: o + g.x, y: c + g.y },
|
|
281
|
-
{ x: o + y.x, y: c + y.y }
|
|
282
|
-
);
|
|
283
|
-
p && e.push(p);
|
|
284
|
-
}
|
|
285
|
-
return e.length ? (e.length > 1 && e.sort(function(x, m) {
|
|
286
|
-
var f = x.x - n.x, E = x.y - n.y, w = Math.sqrt(f * f + E * E), P = m.x - n.x, _ = m.y - n.y, k = Math.sqrt(P * P + _ * _);
|
|
287
|
-
return w < k ? -1 : w === k ? 0 : 1;
|
|
288
|
-
}), e[0]) : l;
|
|
289
|
-
}
|
|
290
|
-
h(it, "intersectPolygon");
|
|
291
|
-
var pt = /* @__PURE__ */ h((l, t) => {
|
|
292
|
-
var n = l.x, a = l.y, i = t.x - n, e = t.y - a, r = l.width / 2, s = l.height / 2, o, c;
|
|
293
|
-
return Math.abs(e) * r > Math.abs(i) * s ? (e < 0 && (s = -s), o = e === 0 ? 0 : s * i / e, c = s) : (i < 0 && (r = -r), o = r, c = i === 0 ? 0 : r * e / i), { x: n + o, y: a + c };
|
|
294
|
-
}, "intersectRect"), ut = pt, u = {
|
|
295
|
-
node: ct,
|
|
296
|
-
circle: yt,
|
|
297
|
-
ellipse: et,
|
|
298
|
-
polygon: xt,
|
|
299
|
-
rect: ut
|
|
300
|
-
}, wt = /* @__PURE__ */ h(async (l, t) => {
|
|
301
|
-
t.useHtmlLabels || D().flowchart.htmlLabels || (t.centerLabel = !0);
|
|
302
|
-
const { shapeSvg: n, bbox: a, halfPadding: i } = await C(
|
|
303
|
-
l,
|
|
304
|
-
t,
|
|
305
|
-
"node " + t.classes,
|
|
306
|
-
!0
|
|
307
|
-
);
|
|
308
|
-
B.info("Classes = ", t.classes);
|
|
309
|
-
const e = n.insert("rect", ":first-child");
|
|
310
|
-
return e.attr("rx", t.rx).attr("ry", t.ry).attr("x", -a.width / 2 - i).attr("y", -a.height / 2 - i).attr("width", a.width + t.padding).attr("height", a.height + t.padding), b(t, e), t.intersect = function(r) {
|
|
311
|
-
return u.rect(t, r);
|
|
312
|
-
}, n;
|
|
313
|
-
}, "note"), ft = wt, Q = /* @__PURE__ */ h((l) => l ? " " + l : "", "formatClass"), I = /* @__PURE__ */ h((l, t) => `${t || "node default"}${Q(l.classes)} ${Q(
|
|
314
|
-
l.class
|
|
315
|
-
)}`, "getClassesFromNode"), X = /* @__PURE__ */ h(async (l, t) => {
|
|
316
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
317
|
-
l,
|
|
318
|
-
t,
|
|
319
|
-
I(t, void 0),
|
|
320
|
-
!0
|
|
321
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = i + e, s = [
|
|
322
|
-
{ x: r / 2, y: 0 },
|
|
323
|
-
{ x: r, y: -r / 2 },
|
|
324
|
-
{ x: r / 2, y: -r },
|
|
325
|
-
{ x: 0, y: -r / 2 }
|
|
326
|
-
];
|
|
327
|
-
B.info("Question main (Circle)");
|
|
328
|
-
const o = N(n, r, r, s);
|
|
329
|
-
return o.attr("style", t.style), b(t, o), t.intersect = function(c) {
|
|
330
|
-
return B.warn("Intersect called"), u.polygon(t, s, c);
|
|
331
|
-
}, n;
|
|
332
|
-
}, "question"), bt = /* @__PURE__ */ h((l, t) => {
|
|
333
|
-
const n = l.insert("g").attr("class", "node default").attr("id", t.domId || t.id), a = 28, i = [
|
|
334
|
-
{ x: 0, y: a / 2 },
|
|
335
|
-
{ x: a / 2, y: 0 },
|
|
336
|
-
{ x: 0, y: -a / 2 },
|
|
337
|
-
{ x: -a / 2, y: 0 }
|
|
338
|
-
];
|
|
339
|
-
return n.insert("polygon", ":first-child").attr(
|
|
340
|
-
"points",
|
|
341
|
-
i.map(function(e) {
|
|
342
|
-
return e.x + "," + e.y;
|
|
343
|
-
}).join(" ")
|
|
344
|
-
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
|
|
345
|
-
return u.circle(t, 14, e);
|
|
346
|
-
}, n;
|
|
347
|
-
}, "choice"), mt = /* @__PURE__ */ h(async (l, t) => {
|
|
348
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
349
|
-
l,
|
|
350
|
-
t,
|
|
351
|
-
I(t, void 0),
|
|
352
|
-
!0
|
|
353
|
-
), i = 4, e = a.height + t.padding, r = e / i, s = a.width + 2 * r + t.padding, o = [
|
|
354
|
-
{ x: r, y: 0 },
|
|
355
|
-
{ x: s - r, y: 0 },
|
|
356
|
-
{ x: s, y: -e / 2 },
|
|
357
|
-
{ x: s - r, y: -e },
|
|
358
|
-
{ x: r, y: -e },
|
|
359
|
-
{ x: 0, y: -e / 2 }
|
|
360
|
-
], c = N(n, s, e, o);
|
|
361
|
-
return c.attr("style", t.style), b(t, c), t.intersect = function(d) {
|
|
362
|
-
return u.polygon(t, o, d);
|
|
363
|
-
}, n;
|
|
364
|
-
}, "hexagon"), vt = /* @__PURE__ */ h(async (l, t) => {
|
|
365
|
-
const { shapeSvg: n, bbox: a } = await C(l, t, void 0, !0), i = 2, e = a.height + 2 * t.padding, r = e / i, s = a.width + 2 * r + t.padding, o = ht(t.directions, a, t), c = N(n, s, e, o);
|
|
366
|
-
return c.attr("style", t.style), b(t, c), t.intersect = function(d) {
|
|
367
|
-
return u.polygon(t, o, d);
|
|
368
|
-
}, n;
|
|
369
|
-
}, "block_arrow"), St = /* @__PURE__ */ h(async (l, t) => {
|
|
370
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
371
|
-
l,
|
|
372
|
-
t,
|
|
373
|
-
I(t, void 0),
|
|
374
|
-
!0
|
|
375
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
376
|
-
{ x: -e / 2, y: 0 },
|
|
377
|
-
{ x: i, y: 0 },
|
|
378
|
-
{ x: i, y: -e },
|
|
379
|
-
{ x: -e / 2, y: -e },
|
|
380
|
-
{ x: 0, y: -e / 2 }
|
|
381
|
-
];
|
|
382
|
-
return N(n, i, e, r).attr("style", t.style), t.width = i + e, t.height = e, t.intersect = function(s) {
|
|
383
|
-
return u.polygon(t, r, s);
|
|
384
|
-
}, n;
|
|
385
|
-
}, "rect_left_inv_arrow"), Bt = /* @__PURE__ */ h(async (l, t) => {
|
|
386
|
-
const { shapeSvg: n, bbox: a } = await C(l, t, I(t), !0), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
387
|
-
{ x: -2 * e / 6, y: 0 },
|
|
388
|
-
{ x: i - e / 6, y: 0 },
|
|
389
|
-
{ x: i + 2 * e / 6, y: -e },
|
|
390
|
-
{ x: e / 6, y: -e }
|
|
391
|
-
], s = N(n, i, e, r);
|
|
392
|
-
return s.attr("style", t.style), b(t, s), t.intersect = function(o) {
|
|
393
|
-
return u.polygon(t, r, o);
|
|
394
|
-
}, n;
|
|
395
|
-
}, "lean_right"), Ct = /* @__PURE__ */ h(async (l, t) => {
|
|
396
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
397
|
-
l,
|
|
398
|
-
t,
|
|
399
|
-
I(t, void 0),
|
|
400
|
-
!0
|
|
401
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
402
|
-
{ x: 2 * e / 6, y: 0 },
|
|
403
|
-
{ x: i + e / 6, y: 0 },
|
|
404
|
-
{ x: i - 2 * e / 6, y: -e },
|
|
405
|
-
{ x: -e / 6, y: -e }
|
|
406
|
-
], s = N(n, i, e, r);
|
|
407
|
-
return s.attr("style", t.style), b(t, s), t.intersect = function(o) {
|
|
408
|
-
return u.polygon(t, r, o);
|
|
409
|
-
}, n;
|
|
410
|
-
}, "lean_left"), Lt = /* @__PURE__ */ h(async (l, t) => {
|
|
411
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
412
|
-
l,
|
|
413
|
-
t,
|
|
414
|
-
I(t, void 0),
|
|
415
|
-
!0
|
|
416
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
417
|
-
{ x: -2 * e / 6, y: 0 },
|
|
418
|
-
{ x: i + 2 * e / 6, y: 0 },
|
|
419
|
-
{ x: i - e / 6, y: -e },
|
|
420
|
-
{ x: e / 6, y: -e }
|
|
421
|
-
], s = N(n, i, e, r);
|
|
422
|
-
return s.attr("style", t.style), b(t, s), t.intersect = function(o) {
|
|
423
|
-
return u.polygon(t, r, o);
|
|
424
|
-
}, n;
|
|
425
|
-
}, "trapezoid"), _t = /* @__PURE__ */ h(async (l, t) => {
|
|
426
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
427
|
-
l,
|
|
428
|
-
t,
|
|
429
|
-
I(t, void 0),
|
|
430
|
-
!0
|
|
431
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
432
|
-
{ x: e / 6, y: 0 },
|
|
433
|
-
{ x: i - e / 6, y: 0 },
|
|
434
|
-
{ x: i + 2 * e / 6, y: -e },
|
|
435
|
-
{ x: -2 * e / 6, y: -e }
|
|
436
|
-
], s = N(n, i, e, r);
|
|
437
|
-
return s.attr("style", t.style), b(t, s), t.intersect = function(o) {
|
|
438
|
-
return u.polygon(t, r, o);
|
|
439
|
-
}, n;
|
|
440
|
-
}, "inv_trapezoid"), kt = /* @__PURE__ */ h(async (l, t) => {
|
|
441
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
442
|
-
l,
|
|
443
|
-
t,
|
|
444
|
-
I(t, void 0),
|
|
445
|
-
!0
|
|
446
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
447
|
-
{ x: 0, y: 0 },
|
|
448
|
-
{ x: i + e / 2, y: 0 },
|
|
449
|
-
{ x: i, y: -e / 2 },
|
|
450
|
-
{ x: i + e / 2, y: -e },
|
|
451
|
-
{ x: 0, y: -e }
|
|
452
|
-
], s = N(n, i, e, r);
|
|
453
|
-
return s.attr("style", t.style), b(t, s), t.intersect = function(o) {
|
|
454
|
-
return u.polygon(t, r, o);
|
|
455
|
-
}, n;
|
|
456
|
-
}, "rect_right_inv_arrow"), Tt = /* @__PURE__ */ h(async (l, t) => {
|
|
457
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
458
|
-
l,
|
|
459
|
-
t,
|
|
460
|
-
I(t, void 0),
|
|
461
|
-
!0
|
|
462
|
-
), i = a.width + t.padding, e = i / 2, r = e / (2.5 + i / 50), s = a.height + r + t.padding, o = "M 0," + r + " a " + e + "," + r + " 0,0,0 " + i + " 0 a " + e + "," + r + " 0,0,0 " + -i + " 0 l 0," + s + " a " + e + "," + r + " 0,0,0 " + i + " 0 l 0," + -s, c = n.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + r) + ")");
|
|
463
|
-
return b(t, c), t.intersect = function(d) {
|
|
464
|
-
const g = u.rect(t, d), y = g.x - t.x;
|
|
465
|
-
if (e != 0 && (Math.abs(y) < t.width / 2 || Math.abs(y) == t.width / 2 && Math.abs(g.y - t.y) > t.height / 2 - r)) {
|
|
466
|
-
let p = r * r * (1 - y * y / (e * e));
|
|
467
|
-
p != 0 && (p = Math.sqrt(p)), p = r - p, d.y - t.y > 0 && (p = -p), g.y += p;
|
|
468
|
-
}
|
|
469
|
-
return g;
|
|
470
|
-
}, n;
|
|
471
|
-
}, "cylinder"), Dt = /* @__PURE__ */ h(async (l, t) => {
|
|
472
|
-
const { shapeSvg: n, bbox: a, halfPadding: i } = await C(
|
|
473
|
-
l,
|
|
474
|
-
t,
|
|
475
|
-
"node " + t.classes + " " + t.class,
|
|
476
|
-
!0
|
|
477
|
-
), e = n.insert("rect", ":first-child"), r = t.positioned ? t.width : a.width + t.padding, s = t.positioned ? t.height : a.height + t.padding, o = t.positioned ? -r / 2 : -a.width / 2 - i, c = t.positioned ? -s / 2 : -a.height / 2 - i;
|
|
478
|
-
if (e.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", c).attr("width", r).attr("height", s), t.props) {
|
|
479
|
-
const d = new Set(Object.keys(t.props));
|
|
480
|
-
t.props.borders && (W(e, t.props.borders, r, s), d.delete("borders")), d.forEach((g) => {
|
|
481
|
-
B.warn(`Unknown node property ${g}`);
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
return b(t, e), t.intersect = function(d) {
|
|
485
|
-
return u.rect(t, d);
|
|
486
|
-
}, n;
|
|
487
|
-
}, "rect"), It = /* @__PURE__ */ h(async (l, t) => {
|
|
488
|
-
const { shapeSvg: n, bbox: a, halfPadding: i } = await C(
|
|
489
|
-
l,
|
|
490
|
-
t,
|
|
491
|
-
"node " + t.classes,
|
|
492
|
-
!0
|
|
493
|
-
), e = n.insert("rect", ":first-child"), r = t.positioned ? t.width : a.width + t.padding, s = t.positioned ? t.height : a.height + t.padding, o = t.positioned ? -r / 2 : -a.width / 2 - i, c = t.positioned ? -s / 2 : -a.height / 2 - i;
|
|
494
|
-
if (e.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", c).attr("width", r).attr("height", s), t.props) {
|
|
495
|
-
const d = new Set(Object.keys(t.props));
|
|
496
|
-
t.props.borders && (W(e, t.props.borders, r, s), d.delete("borders")), d.forEach((g) => {
|
|
497
|
-
B.warn(`Unknown node property ${g}`);
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
return b(t, e), t.intersect = function(d) {
|
|
501
|
-
return u.rect(t, d);
|
|
502
|
-
}, n;
|
|
503
|
-
}, "composite"), Et = /* @__PURE__ */ h(async (l, t) => {
|
|
504
|
-
const { shapeSvg: n } = await C(l, t, "label", !0);
|
|
505
|
-
B.trace("Classes = ", t.class);
|
|
506
|
-
const a = n.insert("rect", ":first-child"), i = 0, e = 0;
|
|
507
|
-
if (a.attr("width", i).attr("height", e), n.attr("class", "label edgeLabel"), t.props) {
|
|
508
|
-
const r = new Set(Object.keys(t.props));
|
|
509
|
-
t.props.borders && (W(a, t.props.borders, i, e), r.delete("borders")), r.forEach((s) => {
|
|
510
|
-
B.warn(`Unknown node property ${s}`);
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
return b(t, a), t.intersect = function(r) {
|
|
514
|
-
return u.rect(t, r);
|
|
515
|
-
}, n;
|
|
516
|
-
}, "labelRect");
|
|
517
|
-
function W(l, t, n, a) {
|
|
518
|
-
const i = [], e = /* @__PURE__ */ h((s) => {
|
|
519
|
-
i.push(s, 0);
|
|
520
|
-
}, "addBorder"), r = /* @__PURE__ */ h((s) => {
|
|
521
|
-
i.push(0, s);
|
|
522
|
-
}, "skipBorder");
|
|
523
|
-
t.includes("t") ? (B.debug("add top border"), e(n)) : r(n), t.includes("r") ? (B.debug("add right border"), e(a)) : r(a), t.includes("b") ? (B.debug("add bottom border"), e(n)) : r(n), t.includes("l") ? (B.debug("add left border"), e(a)) : r(a), l.attr("stroke-dasharray", i.join(" "));
|
|
524
|
-
}
|
|
525
|
-
h(W, "applyNodePropertyBorders");
|
|
526
|
-
var Nt = /* @__PURE__ */ h((l, t) => {
|
|
527
|
-
let n;
|
|
528
|
-
t.classes ? n = "node " + t.classes : n = "node default";
|
|
529
|
-
const a = l.insert("g").attr("class", n).attr("id", t.domId || t.id), i = a.insert("rect", ":first-child"), e = a.insert("line"), r = a.insert("g").attr("class", "label"), s = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
530
|
-
let o = "";
|
|
531
|
-
typeof s == "object" ? o = s[0] : o = s, B.info("Label text abc79", o, s, typeof s == "object");
|
|
532
|
-
const c = r.node().appendChild(z(o, t.labelStyle, !0, !0));
|
|
533
|
-
let d = { width: 0, height: 0 };
|
|
534
|
-
if (j(D().flowchart.htmlLabels)) {
|
|
535
|
-
const m = c.children[0], f = L(c);
|
|
536
|
-
d = m.getBoundingClientRect(), f.attr("width", d.width), f.attr("height", d.height);
|
|
537
|
-
}
|
|
538
|
-
B.info("Text 2", s);
|
|
539
|
-
const g = s.slice(1, s.length);
|
|
540
|
-
let y = c.getBBox();
|
|
541
|
-
const p = r.node().appendChild(
|
|
542
|
-
z(g.join ? g.join("<br/>") : g, t.labelStyle, !0, !0)
|
|
543
|
-
);
|
|
544
|
-
if (j(D().flowchart.htmlLabels)) {
|
|
545
|
-
const m = p.children[0], f = L(p);
|
|
546
|
-
d = m.getBoundingClientRect(), f.attr("width", d.width), f.attr("height", d.height);
|
|
547
|
-
}
|
|
548
|
-
const x = t.padding / 2;
|
|
549
|
-
return L(p).attr(
|
|
550
|
-
"transform",
|
|
551
|
-
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
552
|
-
(d.width > y.width ? 0 : (y.width - d.width) / 2) + ", " + (y.height + x + 5) + ")"
|
|
553
|
-
), L(c).attr(
|
|
554
|
-
"transform",
|
|
555
|
-
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
556
|
-
(d.width < y.width ? 0 : -(y.width - d.width) / 2) + ", 0)"
|
|
557
|
-
), d = r.node().getBBox(), r.attr(
|
|
558
|
-
"transform",
|
|
559
|
-
"translate(" + -d.width / 2 + ", " + (-d.height / 2 - x + 3) + ")"
|
|
560
|
-
), i.attr("class", "outer title-state").attr("x", -d.width / 2 - x).attr("y", -d.height / 2 - x).attr("width", d.width + t.padding).attr("height", d.height + t.padding), e.attr("class", "divider").attr("x1", -d.width / 2 - x).attr("x2", d.width / 2 + x).attr("y1", -d.height / 2 - x + y.height + x).attr("y2", -d.height / 2 - x + y.height + x), b(t, i), t.intersect = function(m) {
|
|
561
|
-
return u.rect(t, m);
|
|
562
|
-
}, a;
|
|
563
|
-
}, "rectWithTitle"), Mt = /* @__PURE__ */ h(async (l, t) => {
|
|
564
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
565
|
-
l,
|
|
566
|
-
t,
|
|
567
|
-
I(t, void 0),
|
|
568
|
-
!0
|
|
569
|
-
), i = a.height + t.padding, e = a.width + i / 4 + t.padding, r = n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -e / 2).attr("y", -i / 2).attr("width", e).attr("height", i);
|
|
570
|
-
return b(t, r), t.intersect = function(s) {
|
|
571
|
-
return u.rect(t, s);
|
|
572
|
-
}, n;
|
|
573
|
-
}, "stadium"), jt = /* @__PURE__ */ h(async (l, t) => {
|
|
574
|
-
const { shapeSvg: n, bbox: a, halfPadding: i } = await C(
|
|
575
|
-
l,
|
|
576
|
-
t,
|
|
577
|
-
I(t, void 0),
|
|
578
|
-
!0
|
|
579
|
-
), e = n.insert("circle", ":first-child");
|
|
580
|
-
return e.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", a.width / 2 + i).attr("width", a.width + t.padding).attr("height", a.height + t.padding), B.info("Circle main"), b(t, e), t.intersect = function(r) {
|
|
581
|
-
return B.info("Circle intersect", t, a.width / 2 + i, r), u.circle(t, a.width / 2 + i, r);
|
|
582
|
-
}, n;
|
|
583
|
-
}, "circle"), Pt = /* @__PURE__ */ h(async (l, t) => {
|
|
584
|
-
const { shapeSvg: n, bbox: a, halfPadding: i } = await C(
|
|
585
|
-
l,
|
|
586
|
-
t,
|
|
587
|
-
I(t, void 0),
|
|
588
|
-
!0
|
|
589
|
-
), e = 5, r = n.insert("g", ":first-child"), s = r.insert("circle"), o = r.insert("circle");
|
|
590
|
-
return r.attr("class", t.class), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", a.width / 2 + i + e).attr("width", a.width + t.padding + e * 2).attr("height", a.height + t.padding + e * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", a.width / 2 + i).attr("width", a.width + t.padding).attr("height", a.height + t.padding), B.info("DoubleCircle main"), b(t, s), t.intersect = function(c) {
|
|
591
|
-
return B.info("DoubleCircle intersect", t, a.width / 2 + i + e, c), u.circle(t, a.width / 2 + i + e, c);
|
|
592
|
-
}, n;
|
|
593
|
-
}, "doublecircle"), Rt = /* @__PURE__ */ h(async (l, t) => {
|
|
594
|
-
const { shapeSvg: n, bbox: a } = await C(
|
|
595
|
-
l,
|
|
596
|
-
t,
|
|
597
|
-
I(t, void 0),
|
|
598
|
-
!0
|
|
599
|
-
), i = a.width + t.padding, e = a.height + t.padding, r = [
|
|
600
|
-
{ x: 0, y: 0 },
|
|
601
|
-
{ x: i, y: 0 },
|
|
602
|
-
{ x: i, y: -e },
|
|
603
|
-
{ x: 0, y: -e },
|
|
604
|
-
{ x: 0, y: 0 },
|
|
605
|
-
{ x: -8, y: 0 },
|
|
606
|
-
{ x: i + 8, y: 0 },
|
|
607
|
-
{ x: i + 8, y: -e },
|
|
608
|
-
{ x: -8, y: -e },
|
|
609
|
-
{ x: -8, y: 0 }
|
|
610
|
-
], s = N(n, i, e, r);
|
|
611
|
-
return s.attr("style", t.style), b(t, s), t.intersect = function(o) {
|
|
612
|
-
return u.polygon(t, r, o);
|
|
613
|
-
}, n;
|
|
614
|
-
}, "subroutine"), zt = /* @__PURE__ */ h((l, t) => {
|
|
615
|
-
const n = l.insert("g").attr("class", "node default").attr("id", t.domId || t.id), a = n.insert("circle", ":first-child");
|
|
616
|
-
return a.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), b(t, a), t.intersect = function(i) {
|
|
617
|
-
return u.circle(t, 7, i);
|
|
618
|
-
}, n;
|
|
619
|
-
}, "start"), G = /* @__PURE__ */ h((l, t, n) => {
|
|
620
|
-
const a = l.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
621
|
-
let i = 70, e = 10;
|
|
622
|
-
n === "LR" && (i = 10, e = 70);
|
|
623
|
-
const r = a.append("rect").attr("x", -1 * i / 2).attr("y", -1 * e / 2).attr("width", i).attr("height", e).attr("class", "fork-join");
|
|
624
|
-
return b(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(s) {
|
|
625
|
-
return u.rect(t, s);
|
|
626
|
-
}, a;
|
|
627
|
-
}, "forkJoin"), At = /* @__PURE__ */ h((l, t) => {
|
|
628
|
-
const n = l.insert("g").attr("class", "node default").attr("id", t.domId || t.id), a = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
|
|
629
|
-
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), a.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), b(t, i), t.intersect = function(e) {
|
|
630
|
-
return u.circle(t, 7, e);
|
|
631
|
-
}, n;
|
|
632
|
-
}, "end"), $t = /* @__PURE__ */ h((l, t) => {
|
|
633
|
-
var n;
|
|
634
|
-
const a = t.padding / 2, i = 4, e = 8;
|
|
635
|
-
let r;
|
|
636
|
-
t.classes ? r = "node " + t.classes : r = "node default";
|
|
637
|
-
const s = l.insert("g").attr("class", r).attr("id", t.domId || t.id), o = s.insert("rect", ":first-child"), c = s.insert("line"), d = s.insert("line");
|
|
638
|
-
let g = 0, y = i;
|
|
639
|
-
const p = s.insert("g").attr("class", "label");
|
|
640
|
-
let x = 0;
|
|
641
|
-
const m = (n = t.classData.annotations) == null ? void 0 : n[0], f = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", E = p.node().appendChild(z(f, t.labelStyle, !0, !0));
|
|
642
|
-
let w = E.getBBox();
|
|
643
|
-
if (j(D().flowchart.htmlLabels)) {
|
|
644
|
-
const v = E.children[0], S = L(E);
|
|
645
|
-
w = v.getBoundingClientRect(), S.attr("width", w.width), S.attr("height", w.height);
|
|
646
|
-
}
|
|
647
|
-
t.classData.annotations[0] && (y += w.height + i, g += w.width);
|
|
648
|
-
let P = t.classData.label;
|
|
649
|
-
t.classData.type !== void 0 && t.classData.type !== "" && (D().flowchart.htmlLabels ? P += "<" + t.classData.type + ">" : P += "<" + t.classData.type + ">");
|
|
650
|
-
const _ = p.node().appendChild(z(P, t.labelStyle, !0, !0));
|
|
651
|
-
L(_).attr("class", "classTitle");
|
|
652
|
-
let k = _.getBBox();
|
|
653
|
-
if (j(D().flowchart.htmlLabels)) {
|
|
654
|
-
const v = _.children[0], S = L(_);
|
|
655
|
-
k = v.getBoundingClientRect(), S.attr("width", k.width), S.attr("height", k.height);
|
|
656
|
-
}
|
|
657
|
-
y += k.height + i, k.width > g && (g = k.width);
|
|
658
|
-
const $ = [];
|
|
659
|
-
t.classData.members.forEach((v) => {
|
|
660
|
-
const S = v.getDisplayDetails();
|
|
661
|
-
let R = S.displayText;
|
|
662
|
-
D().flowchart.htmlLabels && (R = R.replace(/</g, "<").replace(/>/g, ">"));
|
|
663
|
-
const M = p.node().appendChild(
|
|
664
|
-
z(
|
|
665
|
-
R,
|
|
666
|
-
S.cssStyle ? S.cssStyle : t.labelStyle,
|
|
667
|
-
!0,
|
|
668
|
-
!0
|
|
669
|
-
)
|
|
670
|
-
);
|
|
671
|
-
let T = M.getBBox();
|
|
672
|
-
if (j(D().flowchart.htmlLabels)) {
|
|
673
|
-
const q = M.children[0], O = L(M);
|
|
674
|
-
T = q.getBoundingClientRect(), O.attr("width", T.width), O.attr("height", T.height);
|
|
675
|
-
}
|
|
676
|
-
T.width > g && (g = T.width), y += T.height + i, $.push(M);
|
|
677
|
-
}), y += e;
|
|
678
|
-
const V = [];
|
|
679
|
-
if (t.classData.methods.forEach((v) => {
|
|
680
|
-
const S = v.getDisplayDetails();
|
|
681
|
-
let R = S.displayText;
|
|
682
|
-
D().flowchart.htmlLabels && (R = R.replace(/</g, "<").replace(/>/g, ">"));
|
|
683
|
-
const M = p.node().appendChild(
|
|
684
|
-
z(
|
|
685
|
-
R,
|
|
686
|
-
S.cssStyle ? S.cssStyle : t.labelStyle,
|
|
687
|
-
!0,
|
|
688
|
-
!0
|
|
689
|
-
)
|
|
690
|
-
);
|
|
691
|
-
let T = M.getBBox();
|
|
692
|
-
if (j(D().flowchart.htmlLabels)) {
|
|
693
|
-
const q = M.children[0], O = L(M);
|
|
694
|
-
T = q.getBoundingClientRect(), O.attr("width", T.width), O.attr("height", T.height);
|
|
695
|
-
}
|
|
696
|
-
T.width > g && (g = T.width), y += T.height + i, V.push(M);
|
|
697
|
-
}), y += e, m) {
|
|
698
|
-
let v = (g - w.width) / 2;
|
|
699
|
-
L(E).attr(
|
|
700
|
-
"transform",
|
|
701
|
-
"translate( " + (-1 * g / 2 + v) + ", " + -1 * y / 2 + ")"
|
|
702
|
-
), x = w.height + i;
|
|
703
|
-
}
|
|
704
|
-
let st = (g - k.width) / 2;
|
|
705
|
-
return L(_).attr(
|
|
706
|
-
"transform",
|
|
707
|
-
"translate( " + (-1 * g / 2 + st) + ", " + (-1 * y / 2 + x) + ")"
|
|
708
|
-
), x += k.height + i, c.attr("class", "divider").attr("x1", -g / 2 - a).attr("x2", g / 2 + a).attr("y1", -y / 2 - a + e + x).attr("y2", -y / 2 - a + e + x), x += e, $.forEach((v) => {
|
|
709
|
-
L(v).attr(
|
|
710
|
-
"transform",
|
|
711
|
-
"translate( " + -g / 2 + ", " + (-1 * y / 2 + x + e / 2) + ")"
|
|
712
|
-
);
|
|
713
|
-
const S = v == null ? void 0 : v.getBBox();
|
|
714
|
-
x += ((S == null ? void 0 : S.height) ?? 0) + i;
|
|
715
|
-
}), x += e, d.attr("class", "divider").attr("x1", -g / 2 - a).attr("x2", g / 2 + a).attr("y1", -y / 2 - a + e + x).attr("y2", -y / 2 - a + e + x), x += e, V.forEach((v) => {
|
|
716
|
-
L(v).attr(
|
|
717
|
-
"transform",
|
|
718
|
-
"translate( " + -g / 2 + ", " + (-1 * y / 2 + x) + ")"
|
|
719
|
-
);
|
|
720
|
-
const S = v == null ? void 0 : v.getBBox();
|
|
721
|
-
x += ((S == null ? void 0 : S.height) ?? 0) + i;
|
|
722
|
-
}), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -g / 2 - a).attr("y", -(y / 2) - a).attr("width", g + t.padding).attr("height", y + t.padding), b(t, o), t.intersect = function(v) {
|
|
723
|
-
return u.rect(t, v);
|
|
724
|
-
}, s;
|
|
725
|
-
}, "class_box"), J = {
|
|
726
|
-
rhombus: X,
|
|
727
|
-
composite: It,
|
|
728
|
-
question: X,
|
|
729
|
-
rect: Dt,
|
|
730
|
-
labelRect: Et,
|
|
731
|
-
rectWithTitle: Nt,
|
|
732
|
-
choice: bt,
|
|
733
|
-
circle: jt,
|
|
734
|
-
doublecircle: Pt,
|
|
735
|
-
stadium: Mt,
|
|
736
|
-
hexagon: mt,
|
|
737
|
-
block_arrow: vt,
|
|
738
|
-
rect_left_inv_arrow: St,
|
|
739
|
-
lean_right: Bt,
|
|
740
|
-
lean_left: Ct,
|
|
741
|
-
trapezoid: Lt,
|
|
742
|
-
inv_trapezoid: _t,
|
|
743
|
-
rect_right_inv_arrow: kt,
|
|
744
|
-
cylinder: Tt,
|
|
745
|
-
start: zt,
|
|
746
|
-
end: At,
|
|
747
|
-
note: ft,
|
|
748
|
-
subroutine: Rt,
|
|
749
|
-
fork: G,
|
|
750
|
-
join: G,
|
|
751
|
-
class_box: $t
|
|
752
|
-
}, A = {}, Wt = /* @__PURE__ */ h(async (l, t, n) => {
|
|
753
|
-
let a, i;
|
|
754
|
-
if (t.link) {
|
|
755
|
-
let e;
|
|
756
|
-
D().securityLevel === "sandbox" ? e = "_top" : t.linkTarget && (e = t.linkTarget || "_blank"), a = l.insert("svg:a").attr("xlink:href", t.link).attr("target", e), i = await J[t.shape](a, t, n);
|
|
757
|
-
} else
|
|
758
|
-
i = await J[t.shape](l, t, n), a = i;
|
|
759
|
-
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), A[t.id] = a, t.haveCallback && A[t.id].attr("class", A[t.id].attr("class") + " clickable"), a;
|
|
760
|
-
}, "insertNode"), qt = /* @__PURE__ */ h((l, t) => {
|
|
761
|
-
A[t.id] = l;
|
|
762
|
-
}, "setNodeElem"), Ht = /* @__PURE__ */ h(() => {
|
|
763
|
-
A = {};
|
|
764
|
-
}, "clear"), Ft = /* @__PURE__ */ h((l) => {
|
|
765
|
-
const t = A[l.id];
|
|
766
|
-
B.trace(
|
|
767
|
-
"Transforming node",
|
|
768
|
-
l.diff,
|
|
769
|
-
l,
|
|
770
|
-
"translate(" + (l.x - l.width / 2 - 5) + ", " + l.width / 2 + ")"
|
|
771
|
-
);
|
|
772
|
-
const n = 8, a = l.diff || 0;
|
|
773
|
-
return l.clusterNode ? t.attr(
|
|
774
|
-
"transform",
|
|
775
|
-
"translate(" + (l.x + a - l.width / 2) + ", " + (l.y - l.height / 2 - n) + ")"
|
|
776
|
-
) : t.attr("transform", "translate(" + l.x + ", " + l.y + ")"), a;
|
|
777
|
-
}, "positionNode");
|
|
778
|
-
export {
|
|
779
|
-
Ht as $,
|
|
780
|
-
Wt as O,
|
|
781
|
-
z as R,
|
|
782
|
-
Ft as U,
|
|
783
|
-
qt as W,
|
|
784
|
-
ut as p,
|
|
785
|
-
b as w
|
|
786
|
-
};
|