@foris/ai-agent 0.7.1-beta.3 → 0.8.0
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/ai-agent.es.js +1 -1
- package/dist/ai-agent.umd.js +502 -502
- package/dist/ai-chat-panel/ChatPanel.d.ts +2 -1
- package/dist/ai-prompt-code-editor/editable-code-block.d.ts +1 -0
- package/dist/{arc-Wu0dsAQD.js → arc-BRoeV3x1.js} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-CGExNZV3.js → architectureDiagram-VXUJARFQ-DlXeVW-a.js} +6 -8
- package/dist/{blockDiagram-VD42YOAC-D-hjneUG.js → blockDiagram-VD42YOAC-BfZS7X1O.js} +937 -801
- package/dist/{c4Diagram-YG6GDRKO-BwAuRcl2.js → c4Diagram-YG6GDRKO-xpEM9wCB.js} +3 -3
- package/dist/{channel-B1_Ce2Yg.js → channel-JeGeO1Zp.js} +1 -1
- package/dist/{chunk-4BX2VUAB-CDlBQ27V.js → chunk-4BX2VUAB-BGAa-3ms.js} +1 -1
- package/dist/{chunk-55IACEB6-Dn85BeOh.js → chunk-55IACEB6-CnR34TgU.js} +1 -1
- package/dist/{chunk-B4BG7PRW-CXUpk3iw.js → chunk-B4BG7PRW-DCNEwqKB.js} +4 -4
- package/dist/{chunk-DI55MBZ5-DB1YB-ft.js → chunk-DI55MBZ5-BVxhMnzb.js} +3 -3
- package/dist/{chunk-FMBD7UC4-QeKawObj.js → chunk-FMBD7UC4-DjmkRf4b.js} +1 -1
- package/dist/{chunk-QN33PNHL-CqsxRADU.js → chunk-QN33PNHL-B_7Txh-U.js} +1 -1
- package/dist/{chunk-QZHKN3VN-BEjdyvs2.js → chunk-QZHKN3VN-5W1GYc66.js} +1 -1
- package/dist/{chunk-TZMSLE5B-D3aWvksH.js → chunk-TZMSLE5B-BNRMBojh.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-CuYM0l4-.js → classDiagram-2ON5EDUG-Dlyq6Vmg.js} +6 -6
- package/dist/{classDiagram-v2-WZHVMYZB-CuYM0l4-.js → classDiagram-v2-WZHVMYZB-Dlyq6Vmg.js} +6 -6
- package/dist/{code-block-QI2IAROF-Bm7cPeE2.js → code-block-QI2IAROF-BjMjcmla.js} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-CV9T2raK.js → cose-bilkent-S5V4N54A-Csti_aEo.js} +2 -2
- package/dist/{dagre-6UL2VRFP-CkGy1SPP.js → dagre-6UL2VRFP-Bh2GjDYa.js} +55 -54
- package/dist/{diagram-PSM6KHXK-Dz6QTppc.js → diagram-PSM6KHXK-CrvXU1JM.js} +7 -9
- package/dist/{diagram-QEK2KX5R-DS7wiHqx.js → diagram-QEK2KX5R-B-5EUreG.js} +6 -8
- package/dist/{diagram-S2PKOQOG-U3PH655h.js → diagram-S2PKOQOG-AlO7kn8U.js} +10 -12
- package/dist/{erDiagram-Q2GNP2WA-BgiguBGO.js → erDiagram-Q2GNP2WA-CSZH_0UJ.js} +5 -5
- package/dist/{flowDiagram-NV44I4VS-CGnJJWUc.js → flowDiagram-NV44I4VS-DmV_5lwY.js} +6 -6
- package/dist/{ganttDiagram-JELNMOA3-BZut2_ro.js → ganttDiagram-JELNMOA3-Bi0Iriew.js} +3 -3
- package/dist/{gitGraphDiagram-NY62KEGX-Ko7ejj4P.js → gitGraphDiagram-NY62KEGX-B_I1dga0.js} +69 -71
- package/dist/graph-DB2UxkYH.js +1190 -0
- package/dist/hooks/useChat.d.ts +2 -1
- package/dist/{index-nM9Hb2PH.js → index-UUiGcdde.js} +4072 -4052
- package/dist/infoDiagram-WHAUD3N6-C9iL1g2C.js +27 -0
- package/dist/{journeyDiagram-XKPGCS4Q-Bk6cS03S.js → journeyDiagram-XKPGCS4Q-DFeltaeb.js} +5 -5
- package/dist/{kanban-definition-3W4ZIXB7-CO2z9atp.js → kanban-definition-3W4ZIXB7-BCyW9NoI.js} +3 -3
- package/dist/layout-Q6wQN5dr.js +1730 -0
- package/dist/{linear-Ds5BxNS_.js → linear-Db-pud29.js} +25 -25
- package/dist/{mermaid-NA5CF7SZ-CeanUKWc.js → mermaid-NA5CF7SZ-DOM-Rawi.js} +1 -1
- package/dist/{mermaid.core-k2xOhYmU.js → mermaid.core-j6dO_BgQ.js} +88 -112
- package/dist/{mindmap-definition-VGOIOE7T-CXPoZUZt.js → mindmap-definition-VGOIOE7T-BAYL2amM.js} +15 -15
- package/dist/pieDiagram-ADFJNKIX-D85JopGU.js +166 -0
- package/dist/{quadrantDiagram-AYHSOK5B-DX0ztbXq.js → quadrantDiagram-AYHSOK5B-D1f6I9np.js} +3 -3
- package/dist/{requirementDiagram-UZGBJVZJ-Bjq7IlHD.js → requirementDiagram-UZGBJVZJ-EWyQ1SfM.js} +4 -4
- package/dist/{sankeyDiagram-TZEHDZUN-Di1wSLyw.js → sankeyDiagram-TZEHDZUN-CP9LZjFl.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-DAAtQabY.js → sequenceDiagram-WL72ISMW-Dy6Sg9qq.js} +4 -4
- package/dist/{stateDiagram-FKZM4ZOC-4B4wCz0Q.js → stateDiagram-FKZM4ZOC-BUl7oQFe.js} +9 -11
- package/dist/{stateDiagram-v2-4FDKWEC3-DM2c_x-L.js → stateDiagram-v2-4FDKWEC3-DeXvmQnv.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-CxOVjHP0.js → timeline-definition-IT6M3QCI-WwPgWCvF.js} +3 -3
- package/dist/{mermaid-parser.core-BusZ3tY0.js → treemap-KMMF4GRG-D_L55G0b.js} +5422 -5563
- package/dist/{xychartDiagram-PRI3JC2R-ZZwLndM0.js → xychartDiagram-PRI3JC2R-HfbXXBBx.js} +3 -3
- package/package.json +1 -1
- package/dist/_baseUniq-D_c7bZcr.js +0 -479
- package/dist/architecture-U656AL7Q-BlbJAzdI.js +0 -11
- package/dist/clone-BnCR5QBv.js +0 -8
- package/dist/gitGraph-F6HP7TQM-rUrF0DJh.js +0 -11
- package/dist/graph-gyKNuAoW.js +0 -381
- package/dist/info-NVLQJR56-BtETYYUU.js +0 -11
- package/dist/infoDiagram-WHAUD3N6-D5_1b0Fb.js +0 -29
- package/dist/layout-CC628tC7.js +0 -1443
- package/dist/min-CBrz-SV8.js +0 -38
- package/dist/packet-BFZMPI3H-BC_UbwOj.js +0 -11
- package/dist/pie-7BOR55EZ-CCxt2Pec.js +0 -11
- package/dist/pieDiagram-ADFJNKIX-Dszo87H-.js +0 -168
- package/dist/radar-NHE76QYJ-DBloKqTS.js +0 -11
- package/dist/treemap-KMMF4GRG-CTrbzZ2L.js +0 -11
|
@@ -1,27 +1,163 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { _ as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import "./index-nM9Hb2PH.js";
|
|
1
|
+
import { g as Ce } from "./chunk-FMBD7UC4-DjmkRf4b.js";
|
|
2
|
+
import { aG as Ie, aH as Be, aI as Oe, aJ as Jt, aK as Qt, aL as Rt, aM as Ae, aN as Re, aO as te, aP as Tt, aQ as gt, aR as ee, aS as ze, aT as Me, aU as je, aV as Fe, aW as Pe, aX as We, aY as Ye, _ as g, d as z, l as L, j as R, i as mt, aZ as Ke, G as it, a_ as Z, az as re, ar as Ue, u as rt, a$ as He, a9 as Xe, a4 as Ve, k as Ge, v as $e, B as Ze, aa as qe, b0 as Je, b1 as Lt, e as Qe } from "./mermaid.core-j6dO_BgQ.js";
|
|
3
|
+
import { G as tr } from "./graph-DB2UxkYH.js";
|
|
4
|
+
import { c as er } from "./channel-JeGeO1Zp.js";
|
|
5
|
+
import "./index-UUiGcdde.js";
|
|
7
6
|
import "react";
|
|
8
7
|
import "react-dom";
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function rr(e, t) {
|
|
9
|
+
for (var a = -1, i = e == null ? 0 : e.length; ++a < i && t(e[a], a, e) !== !1; )
|
|
10
|
+
;
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function ae(e) {
|
|
14
|
+
return Ie(e) ? Be(e) : Oe(e);
|
|
15
|
+
}
|
|
16
|
+
function ar(e, t) {
|
|
17
|
+
return e && Jt(t, ae(t), e);
|
|
18
|
+
}
|
|
19
|
+
function sr(e, t) {
|
|
20
|
+
for (var a = -1, i = e == null ? 0 : e.length, l = 0, s = []; ++a < i; ) {
|
|
21
|
+
var r = e[a];
|
|
22
|
+
t(r, a, e) && (s[l++] = r);
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
function ir() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
var nr = Object.prototype, lr = nr.propertyIsEnumerable, zt = Object.getOwnPropertySymbols, se = zt ? function(e) {
|
|
30
|
+
return e == null ? [] : (e = Object(e), sr(zt(e), function(t) {
|
|
31
|
+
return lr.call(e, t);
|
|
32
|
+
}));
|
|
33
|
+
} : ir;
|
|
34
|
+
function cr(e, t) {
|
|
35
|
+
return Jt(e, se(e), t);
|
|
36
|
+
}
|
|
37
|
+
function or(e, t) {
|
|
38
|
+
for (var a = -1, i = t.length, l = e.length; ++a < i; )
|
|
39
|
+
e[l + a] = t[a];
|
|
40
|
+
return e;
|
|
41
|
+
}
|
|
42
|
+
function hr(e, t, a) {
|
|
43
|
+
var i = t(e);
|
|
44
|
+
return Qt(e) ? i : or(i, a(e));
|
|
45
|
+
}
|
|
46
|
+
function gr(e) {
|
|
47
|
+
return hr(e, ae, se);
|
|
48
|
+
}
|
|
49
|
+
var ur = Object.prototype, dr = ur.hasOwnProperty;
|
|
50
|
+
function pr(e) {
|
|
51
|
+
var t = e.length, a = new e.constructor(t);
|
|
52
|
+
return t && typeof e[0] == "string" && dr.call(e, "index") && (a.index = e.index, a.input = e.input), a;
|
|
53
|
+
}
|
|
54
|
+
function fr(e, t) {
|
|
55
|
+
var a = e.buffer;
|
|
56
|
+
return new e.constructor(a, e.byteOffset, e.byteLength);
|
|
57
|
+
}
|
|
58
|
+
var yr = /\w*$/;
|
|
59
|
+
function xr(e) {
|
|
60
|
+
var t = new e.constructor(e.source, yr.exec(e));
|
|
61
|
+
return t.lastIndex = e.lastIndex, t;
|
|
62
|
+
}
|
|
63
|
+
var Mt = Rt ? Rt.prototype : void 0, jt = Mt ? Mt.valueOf : void 0;
|
|
64
|
+
function br(e) {
|
|
65
|
+
return jt ? Object(jt.call(e)) : {};
|
|
66
|
+
}
|
|
67
|
+
var wr = "[object Boolean]", mr = "[object Date]", Lr = "[object Map]", Sr = "[object Number]", vr = "[object RegExp]", Er = "[object Set]", _r = "[object String]", kr = "[object Symbol]", Tr = "[object ArrayBuffer]", Dr = "[object DataView]", Nr = "[object Float32Array]", Cr = "[object Float64Array]", Ir = "[object Int8Array]", Br = "[object Int16Array]", Or = "[object Int32Array]", Ar = "[object Uint8Array]", Rr = "[object Uint8ClampedArray]", zr = "[object Uint16Array]", Mr = "[object Uint32Array]";
|
|
68
|
+
function jr(e, t, a) {
|
|
69
|
+
var i = e.constructor;
|
|
70
|
+
switch (t) {
|
|
71
|
+
case Tr:
|
|
72
|
+
return Re(e);
|
|
73
|
+
case wr:
|
|
74
|
+
case mr:
|
|
75
|
+
return new i(+e);
|
|
76
|
+
case Dr:
|
|
77
|
+
return fr(e);
|
|
78
|
+
case Nr:
|
|
79
|
+
case Cr:
|
|
80
|
+
case Ir:
|
|
81
|
+
case Br:
|
|
82
|
+
case Or:
|
|
83
|
+
case Ar:
|
|
84
|
+
case Rr:
|
|
85
|
+
case zr:
|
|
86
|
+
case Mr:
|
|
87
|
+
return Ae(e, a);
|
|
88
|
+
case Lr:
|
|
89
|
+
return new i();
|
|
90
|
+
case Sr:
|
|
91
|
+
case _r:
|
|
92
|
+
return new i(e);
|
|
93
|
+
case vr:
|
|
94
|
+
return xr(e);
|
|
95
|
+
case Er:
|
|
96
|
+
return new i();
|
|
97
|
+
case kr:
|
|
98
|
+
return br(e);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
var Fr = "[object Map]";
|
|
102
|
+
function Pr(e) {
|
|
103
|
+
return te(e) && Tt(e) == Fr;
|
|
104
|
+
}
|
|
105
|
+
var Ft = gt && gt.isMap, Wr = Ft ? ee(Ft) : Pr, Yr = "[object Set]";
|
|
106
|
+
function Kr(e) {
|
|
107
|
+
return te(e) && Tt(e) == Yr;
|
|
108
|
+
}
|
|
109
|
+
var Pt = gt && gt.isSet, Ur = Pt ? ee(Pt) : Kr, Hr = 1, ie = "[object Arguments]", Xr = "[object Array]", Vr = "[object Boolean]", Gr = "[object Date]", $r = "[object Error]", ne = "[object Function]", Zr = "[object GeneratorFunction]", qr = "[object Map]", Jr = "[object Number]", le = "[object Object]", Qr = "[object RegExp]", ta = "[object Set]", ea = "[object String]", ra = "[object Symbol]", aa = "[object WeakMap]", sa = "[object ArrayBuffer]", ia = "[object DataView]", na = "[object Float32Array]", la = "[object Float64Array]", ca = "[object Int8Array]", oa = "[object Int16Array]", ha = "[object Int32Array]", ga = "[object Uint8Array]", ua = "[object Uint8ClampedArray]", da = "[object Uint16Array]", pa = "[object Uint32Array]", C = {};
|
|
110
|
+
C[ie] = C[Xr] = C[sa] = C[ia] = C[Vr] = C[Gr] = C[na] = C[la] = C[ca] = C[oa] = C[ha] = C[qr] = C[Jr] = C[le] = C[Qr] = C[ta] = C[ea] = C[ra] = C[ga] = C[ua] = C[da] = C[pa] = !0;
|
|
111
|
+
C[$r] = C[ne] = C[aa] = !1;
|
|
112
|
+
function ot(e, t, a, i, l, s) {
|
|
113
|
+
var r, n = t & Hr;
|
|
114
|
+
if (r !== void 0)
|
|
115
|
+
return r;
|
|
116
|
+
if (!ze(e))
|
|
117
|
+
return e;
|
|
118
|
+
var o = Qt(e);
|
|
119
|
+
if (o)
|
|
120
|
+
return r = pr(e), Me(e, r);
|
|
121
|
+
var d = Tt(e), h = d == ne || d == Zr;
|
|
122
|
+
if (je(e))
|
|
123
|
+
return Fe(e, n);
|
|
124
|
+
if (d == le || d == ie || h && !l)
|
|
125
|
+
return r = h ? {} : Pe(e), cr(e, ar(r, e));
|
|
126
|
+
if (!C[d])
|
|
127
|
+
return l ? e : {};
|
|
128
|
+
r = jr(e, d, n), s || (s = new We());
|
|
129
|
+
var x = s.get(e);
|
|
130
|
+
if (x)
|
|
131
|
+
return x;
|
|
132
|
+
s.set(e, r), Ur(e) ? e.forEach(function(S) {
|
|
133
|
+
r.add(ot(S, t, a, S, e, s));
|
|
134
|
+
}) : Wr(e) && e.forEach(function(S, k) {
|
|
135
|
+
r.set(k, ot(S, t, a, k, e, s));
|
|
136
|
+
});
|
|
137
|
+
var b = gr, m = o ? void 0 : b(e);
|
|
138
|
+
return rr(m || e, function(S, k) {
|
|
139
|
+
m && (k = S, S = e[k]), Ye(r, k, ot(S, t, a, k, e, s));
|
|
140
|
+
}), r;
|
|
141
|
+
}
|
|
142
|
+
var fa = 4;
|
|
143
|
+
function ya(e) {
|
|
144
|
+
return ot(e, fa);
|
|
145
|
+
}
|
|
146
|
+
var St = function() {
|
|
147
|
+
var e = /* @__PURE__ */ g(function(D, y, u, p) {
|
|
148
|
+
for (u = u || {}, p = D.length; p--; u[D[p]] = y)
|
|
13
149
|
;
|
|
14
|
-
return
|
|
15
|
-
}, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], o = [1, 18],
|
|
16
|
-
trace: /* @__PURE__ */
|
|
150
|
+
return u;
|
|
151
|
+
}, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], o = [1, 18], d = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], x = [1, 23], b = [1, 24], m = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], k = [1, 49], E = {
|
|
152
|
+
trace: /* @__PURE__ */ g(function() {
|
|
17
153
|
}, "trace"),
|
|
18
154
|
yy: {},
|
|
19
155
|
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
|
|
20
156
|
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
|
|
21
157
|
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
22
|
-
performAction: /* @__PURE__ */
|
|
158
|
+
performAction: /* @__PURE__ */ g(function(y, u, p, w, v, c, _) {
|
|
23
159
|
var f = c.length - 1;
|
|
24
|
-
switch (
|
|
160
|
+
switch (v) {
|
|
25
161
|
case 4:
|
|
26
162
|
w.getLogger().debug("Rule: separator (NL) ");
|
|
27
163
|
break;
|
|
@@ -53,21 +189,21 @@ var wt = function() {
|
|
|
53
189
|
w.getLogger().debug("Rule: statement #2: ", c[f - 1]), this.$ = [c[f - 1]].concat(c[f]);
|
|
54
190
|
break;
|
|
55
191
|
case 14:
|
|
56
|
-
w.getLogger().debug("Rule: link: ", c[f],
|
|
192
|
+
w.getLogger().debug("Rule: link: ", c[f], y), this.$ = { edgeTypeStr: c[f], label: "" };
|
|
57
193
|
break;
|
|
58
194
|
case 15:
|
|
59
195
|
w.getLogger().debug("Rule: LABEL link: ", c[f - 3], c[f - 1], c[f]), this.$ = { edgeTypeStr: c[f], label: c[f - 1] };
|
|
60
196
|
break;
|
|
61
197
|
case 18:
|
|
62
|
-
const
|
|
63
|
-
this.$ = { id:
|
|
198
|
+
const M = parseInt(c[f]), A = w.generateId();
|
|
199
|
+
this.$ = { id: A, type: "space", label: "", width: M, children: [] };
|
|
64
200
|
break;
|
|
65
201
|
case 23:
|
|
66
202
|
w.getLogger().debug("Rule: (nodeStatement link node) ", c[f - 2], c[f - 1], c[f], " typestr: ", c[f - 1].edgeTypeStr);
|
|
67
|
-
const
|
|
203
|
+
const H = w.edgeStrToEdgeData(c[f - 1].edgeTypeStr);
|
|
68
204
|
this.$ = [
|
|
69
205
|
{ id: c[f - 2].id, label: c[f - 2].label, type: c[f - 2].type, directions: c[f - 2].directions },
|
|
70
|
-
{ id: c[f - 2].id + "-" + c[f].id, start: c[f - 2].id, end: c[f].id, label: c[f - 1].label, type: "edge", directions: c[f].directions, arrowTypeEnd:
|
|
206
|
+
{ id: c[f - 2].id + "-" + c[f].id, start: c[f - 2].id, end: c[f].id, label: c[f - 1].label, type: "edge", directions: c[f].directions, arrowTypeEnd: H, arrowTypeStart: "arrow_open" },
|
|
71
207
|
{ id: c[f].id, label: c[f].label, type: w.typeStr2Type(c[f].typeStr), directions: c[f].directions }
|
|
72
208
|
];
|
|
73
209
|
break;
|
|
@@ -85,8 +221,8 @@ var wt = function() {
|
|
|
85
221
|
break;
|
|
86
222
|
case 28:
|
|
87
223
|
w.getLogger().debug("Rule: blockStatement : ", c[f - 2], c[f - 1], c[f]);
|
|
88
|
-
const
|
|
89
|
-
this.$ = { id:
|
|
224
|
+
const W = w.generateId();
|
|
225
|
+
this.$ = { id: W, type: "composite", label: "", children: c[f - 1] };
|
|
90
226
|
break;
|
|
91
227
|
case 29:
|
|
92
228
|
w.getLogger().debug("Rule: node (NODE_ID separator): ", c[f]), this.$ = { id: c[f] };
|
|
@@ -118,76 +254,76 @@ var wt = function() {
|
|
|
118
254
|
break;
|
|
119
255
|
}
|
|
120
256
|
}, "anonymous"),
|
|
121
|
-
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 8: [1, 20] }, e(
|
|
257
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 8: [1, 20] }, e(d, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }), e(h, [2, 16], { 14: 22, 15: x, 16: b }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(m, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(d, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(m, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: x, 16: b, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(m, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: k }, { 15: [1, 50] }, e(h, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: k, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
|
|
122
258
|
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
123
|
-
parseError: /* @__PURE__ */
|
|
124
|
-
if (
|
|
125
|
-
this.trace(
|
|
259
|
+
parseError: /* @__PURE__ */ g(function(y, u) {
|
|
260
|
+
if (u.recoverable)
|
|
261
|
+
this.trace(y);
|
|
126
262
|
else {
|
|
127
|
-
var p = new Error(
|
|
128
|
-
throw p.hash =
|
|
263
|
+
var p = new Error(y);
|
|
264
|
+
throw p.hash = u, p;
|
|
129
265
|
}
|
|
130
266
|
}, "parseError"),
|
|
131
|
-
parse: /* @__PURE__ */
|
|
132
|
-
var
|
|
133
|
-
for (var
|
|
134
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
135
|
-
|
|
136
|
-
var
|
|
137
|
-
c.push(
|
|
138
|
-
var
|
|
267
|
+
parse: /* @__PURE__ */ g(function(y) {
|
|
268
|
+
var u = this, p = [0], w = [], v = [null], c = [], _ = this.table, f = "", M = 0, A = 0, H = 2, W = 1, J = c.slice.call(arguments, 1), j = Object.create(this.lexer), Q = { yy: {} };
|
|
269
|
+
for (var yt in this.yy)
|
|
270
|
+
Object.prototype.hasOwnProperty.call(this.yy, yt) && (Q.yy[yt] = this.yy[yt]);
|
|
271
|
+
j.setInput(y, Q.yy), Q.yy.lexer = j, Q.yy.parser = this, typeof j.yylloc > "u" && (j.yylloc = {});
|
|
272
|
+
var xt = j.yylloc;
|
|
273
|
+
c.push(xt);
|
|
274
|
+
var De = j.options && j.options.ranges;
|
|
139
275
|
typeof Q.yy.parseError == "function" ? this.parseError = Q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
140
|
-
function
|
|
141
|
-
p.length = p.length - 2 *
|
|
276
|
+
function Ne(K) {
|
|
277
|
+
p.length = p.length - 2 * K, v.length = v.length - K, c.length = c.length - K;
|
|
142
278
|
}
|
|
143
|
-
|
|
144
|
-
function
|
|
145
|
-
var
|
|
146
|
-
return
|
|
279
|
+
g(Ne, "popStack");
|
|
280
|
+
function Ot() {
|
|
281
|
+
var K;
|
|
282
|
+
return K = w.pop() || j.lex() || W, typeof K != "number" && (K instanceof Array && (w = K, K = w.pop()), K = u.symbols_[K] || K), K;
|
|
147
283
|
}
|
|
148
|
-
|
|
149
|
-
for (var Y,
|
|
150
|
-
if (
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
for (
|
|
154
|
-
this.terminals_[
|
|
155
|
-
|
|
156
|
-
` +
|
|
157
|
-
Expecting ` +
|
|
158
|
-
text:
|
|
284
|
+
g(Ot, "lex");
|
|
285
|
+
for (var Y, tt, X, bt, et = {}, nt, q, At, lt; ; ) {
|
|
286
|
+
if (tt = p[p.length - 1], this.defaultActions[tt] ? X = this.defaultActions[tt] : ((Y === null || typeof Y > "u") && (Y = Ot()), X = _[tt] && _[tt][Y]), typeof X > "u" || !X.length || !X[0]) {
|
|
287
|
+
var wt = "";
|
|
288
|
+
lt = [];
|
|
289
|
+
for (nt in _[tt])
|
|
290
|
+
this.terminals_[nt] && nt > H && lt.push("'" + this.terminals_[nt] + "'");
|
|
291
|
+
j.showPosition ? wt = "Parse error on line " + (M + 1) + `:
|
|
292
|
+
` + j.showPosition() + `
|
|
293
|
+
Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt = "Parse error on line " + (M + 1) + ": Unexpected " + (Y == W ? "end of input" : "'" + (this.terminals_[Y] || Y) + "'"), this.parseError(wt, {
|
|
294
|
+
text: j.match,
|
|
159
295
|
token: this.terminals_[Y] || Y,
|
|
160
|
-
line:
|
|
161
|
-
loc:
|
|
162
|
-
expected:
|
|
296
|
+
line: j.yylineno,
|
|
297
|
+
loc: xt,
|
|
298
|
+
expected: lt
|
|
163
299
|
});
|
|
164
300
|
}
|
|
165
|
-
if (
|
|
166
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
167
|
-
switch (
|
|
301
|
+
if (X[0] instanceof Array && X.length > 1)
|
|
302
|
+
throw new Error("Parse Error: multiple actions possible at state: " + tt + ", token: " + Y);
|
|
303
|
+
switch (X[0]) {
|
|
168
304
|
case 1:
|
|
169
|
-
p.push(Y),
|
|
305
|
+
p.push(Y), v.push(j.yytext), c.push(j.yylloc), p.push(X[1]), Y = null, A = j.yyleng, f = j.yytext, M = j.yylineno, xt = j.yylloc;
|
|
170
306
|
break;
|
|
171
307
|
case 2:
|
|
172
|
-
if (q = this.productions_[
|
|
308
|
+
if (q = this.productions_[X[1]][1], et.$ = v[v.length - q], et._$ = {
|
|
173
309
|
first_line: c[c.length - (q || 1)].first_line,
|
|
174
310
|
last_line: c[c.length - 1].last_line,
|
|
175
311
|
first_column: c[c.length - (q || 1)].first_column,
|
|
176
312
|
last_column: c[c.length - 1].last_column
|
|
177
|
-
},
|
|
313
|
+
}, De && (et._$.range = [
|
|
178
314
|
c[c.length - (q || 1)].range[0],
|
|
179
315
|
c[c.length - 1].range[1]
|
|
180
|
-
]),
|
|
316
|
+
]), bt = this.performAction.apply(et, [
|
|
181
317
|
f,
|
|
182
|
-
O,
|
|
183
318
|
A,
|
|
319
|
+
M,
|
|
184
320
|
Q.yy,
|
|
185
|
-
|
|
186
|
-
|
|
321
|
+
X[1],
|
|
322
|
+
v,
|
|
187
323
|
c
|
|
188
|
-
].concat(J)), typeof
|
|
189
|
-
return
|
|
190
|
-
q && (p = p.slice(0, -1 * q * 2),
|
|
324
|
+
].concat(J)), typeof bt < "u")
|
|
325
|
+
return bt;
|
|
326
|
+
q && (p = p.slice(0, -1 * q * 2), v = v.slice(0, -1 * q), c = c.slice(0, -1 * q)), p.push(this.productions_[X[1]][0]), v.push(et.$), c.push(et._$), At = _[p[p.length - 2]][p[p.length - 1]], p.push(At);
|
|
191
327
|
break;
|
|
192
328
|
case 3:
|
|
193
329
|
return !0;
|
|
@@ -195,18 +331,18 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
195
331
|
}
|
|
196
332
|
return !0;
|
|
197
333
|
}, "parse")
|
|
198
|
-
},
|
|
199
|
-
var
|
|
334
|
+
}, N = /* @__PURE__ */ function() {
|
|
335
|
+
var D = {
|
|
200
336
|
EOF: 1,
|
|
201
|
-
parseError: /* @__PURE__ */
|
|
337
|
+
parseError: /* @__PURE__ */ g(function(u, p) {
|
|
202
338
|
if (this.yy.parser)
|
|
203
|
-
this.yy.parser.parseError(
|
|
339
|
+
this.yy.parser.parseError(u, p);
|
|
204
340
|
else
|
|
205
|
-
throw new Error(
|
|
341
|
+
throw new Error(u);
|
|
206
342
|
}, "parseError"),
|
|
207
343
|
// resets the lexer, sets new input
|
|
208
|
-
setInput: /* @__PURE__ */
|
|
209
|
-
return this.yy =
|
|
344
|
+
setInput: /* @__PURE__ */ g(function(y, u) {
|
|
345
|
+
return this.yy = u || this.yy || {}, this._input = y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
210
346
|
first_line: 1,
|
|
211
347
|
first_column: 0,
|
|
212
348
|
last_line: 1,
|
|
@@ -214,32 +350,32 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
214
350
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
215
351
|
}, "setInput"),
|
|
216
352
|
// consumes and returns one char from the input
|
|
217
|
-
input: /* @__PURE__ */
|
|
218
|
-
var
|
|
219
|
-
this.yytext +=
|
|
220
|
-
var
|
|
221
|
-
return
|
|
353
|
+
input: /* @__PURE__ */ g(function() {
|
|
354
|
+
var y = this._input[0];
|
|
355
|
+
this.yytext += y, this.yyleng++, this.offset++, this.match += y, this.matched += y;
|
|
356
|
+
var u = y.match(/(?:\r\n?|\n).*/g);
|
|
357
|
+
return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), y;
|
|
222
358
|
}, "input"),
|
|
223
359
|
// unshifts one char (or a string) into the input
|
|
224
|
-
unput: /* @__PURE__ */
|
|
225
|
-
var
|
|
226
|
-
this._input =
|
|
360
|
+
unput: /* @__PURE__ */ g(function(y) {
|
|
361
|
+
var u = y.length, p = y.split(/(?:\r\n?|\n)/g);
|
|
362
|
+
this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
|
|
227
363
|
var w = this.match.split(/(?:\r\n?|\n)/g);
|
|
228
364
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
|
|
229
|
-
var
|
|
365
|
+
var v = this.yylloc.range;
|
|
230
366
|
return this.yylloc = {
|
|
231
367
|
first_line: this.yylloc.first_line,
|
|
232
368
|
last_line: this.yylineno + 1,
|
|
233
369
|
first_column: this.yylloc.first_column,
|
|
234
|
-
last_column: p ? (p.length === w.length ? this.yylloc.first_column : 0) + w[w.length - p.length].length - p[0].length : this.yylloc.first_column -
|
|
235
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
370
|
+
last_column: p ? (p.length === w.length ? this.yylloc.first_column : 0) + w[w.length - p.length].length - p[0].length : this.yylloc.first_column - u
|
|
371
|
+
}, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
|
|
236
372
|
}, "unput"),
|
|
237
373
|
// When called from action, caches matched text and appends it on next action
|
|
238
|
-
more: /* @__PURE__ */
|
|
374
|
+
more: /* @__PURE__ */ g(function() {
|
|
239
375
|
return this._more = !0, this;
|
|
240
376
|
}, "more"),
|
|
241
377
|
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
242
|
-
reject: /* @__PURE__ */
|
|
378
|
+
reject: /* @__PURE__ */ g(function() {
|
|
243
379
|
if (this.options.backtrack_lexer)
|
|
244
380
|
this._backtrack = !0;
|
|
245
381
|
else
|
|
@@ -252,29 +388,29 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
252
388
|
return this;
|
|
253
389
|
}, "reject"),
|
|
254
390
|
// retain first n characters of the match
|
|
255
|
-
less: /* @__PURE__ */
|
|
256
|
-
this.unput(this.match.slice(
|
|
391
|
+
less: /* @__PURE__ */ g(function(y) {
|
|
392
|
+
this.unput(this.match.slice(y));
|
|
257
393
|
}, "less"),
|
|
258
394
|
// displays already matched input, i.e. for error messages
|
|
259
|
-
pastInput: /* @__PURE__ */
|
|
260
|
-
var
|
|
261
|
-
return (
|
|
395
|
+
pastInput: /* @__PURE__ */ g(function() {
|
|
396
|
+
var y = this.matched.substr(0, this.matched.length - this.match.length);
|
|
397
|
+
return (y.length > 20 ? "..." : "") + y.substr(-20).replace(/\n/g, "");
|
|
262
398
|
}, "pastInput"),
|
|
263
399
|
// displays upcoming input, i.e. for error messages
|
|
264
|
-
upcomingInput: /* @__PURE__ */
|
|
265
|
-
var
|
|
266
|
-
return
|
|
400
|
+
upcomingInput: /* @__PURE__ */ g(function() {
|
|
401
|
+
var y = this.match;
|
|
402
|
+
return y.length < 20 && (y += this._input.substr(0, 20 - y.length)), (y.substr(0, 20) + (y.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
267
403
|
}, "upcomingInput"),
|
|
268
404
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
269
|
-
showPosition: /* @__PURE__ */
|
|
270
|
-
var
|
|
271
|
-
return
|
|
272
|
-
` +
|
|
405
|
+
showPosition: /* @__PURE__ */ g(function() {
|
|
406
|
+
var y = this.pastInput(), u = new Array(y.length + 1).join("-");
|
|
407
|
+
return y + this.upcomingInput() + `
|
|
408
|
+
` + u + "^";
|
|
273
409
|
}, "showPosition"),
|
|
274
410
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
275
|
-
test_match: /* @__PURE__ */
|
|
276
|
-
var p, w,
|
|
277
|
-
if (this.options.backtrack_lexer && (
|
|
411
|
+
test_match: /* @__PURE__ */ g(function(y, u) {
|
|
412
|
+
var p, w, v;
|
|
413
|
+
if (this.options.backtrack_lexer && (v = {
|
|
278
414
|
yylineno: this.yylineno,
|
|
279
415
|
yylloc: {
|
|
280
416
|
first_line: this.yylloc.first_line,
|
|
@@ -293,41 +429,41 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
293
429
|
yy: this.yy,
|
|
294
430
|
conditionStack: this.conditionStack.slice(0),
|
|
295
431
|
done: this.done
|
|
296
|
-
}, this.options.ranges && (
|
|
432
|
+
}, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), w = y[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
|
|
297
433
|
first_line: this.yylloc.last_line,
|
|
298
434
|
last_line: this.yylineno + 1,
|
|
299
435
|
first_column: this.yylloc.last_column,
|
|
300
|
-
last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column +
|
|
301
|
-
}, this.yytext +=
|
|
436
|
+
last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + y[0].length
|
|
437
|
+
}, this.yytext += y[0], this.match += y[0], this.matches = y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(y[0].length), this.matched += y[0], p = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
|
|
302
438
|
return p;
|
|
303
439
|
if (this._backtrack) {
|
|
304
|
-
for (var c in
|
|
305
|
-
this[c] =
|
|
440
|
+
for (var c in v)
|
|
441
|
+
this[c] = v[c];
|
|
306
442
|
return !1;
|
|
307
443
|
}
|
|
308
444
|
return !1;
|
|
309
445
|
}, "test_match"),
|
|
310
446
|
// return next match in input
|
|
311
|
-
next: /* @__PURE__ */
|
|
447
|
+
next: /* @__PURE__ */ g(function() {
|
|
312
448
|
if (this.done)
|
|
313
449
|
return this.EOF;
|
|
314
450
|
this._input || (this.done = !0);
|
|
315
|
-
var
|
|
451
|
+
var y, u, p, w;
|
|
316
452
|
this._more || (this.yytext = "", this.match = "");
|
|
317
|
-
for (var
|
|
318
|
-
if (p = this._input.match(this.rules[
|
|
319
|
-
if (
|
|
320
|
-
if (
|
|
321
|
-
return
|
|
453
|
+
for (var v = this._currentRules(), c = 0; c < v.length; c++)
|
|
454
|
+
if (p = this._input.match(this.rules[v[c]]), p && (!u || p[0].length > u[0].length)) {
|
|
455
|
+
if (u = p, w = c, this.options.backtrack_lexer) {
|
|
456
|
+
if (y = this.test_match(p, v[c]), y !== !1)
|
|
457
|
+
return y;
|
|
322
458
|
if (this._backtrack) {
|
|
323
|
-
|
|
459
|
+
u = !1;
|
|
324
460
|
continue;
|
|
325
461
|
} else
|
|
326
462
|
return !1;
|
|
327
463
|
} else if (!this.options.flex)
|
|
328
464
|
break;
|
|
329
465
|
}
|
|
330
|
-
return
|
|
466
|
+
return u ? (y = this.test_match(u, v[w]), y !== !1 ? y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
331
467
|
` + this.showPosition(), {
|
|
332
468
|
text: "",
|
|
333
469
|
token: null,
|
|
@@ -335,56 +471,56 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
335
471
|
});
|
|
336
472
|
}, "next"),
|
|
337
473
|
// return next match that has a token
|
|
338
|
-
lex: /* @__PURE__ */
|
|
339
|
-
var
|
|
340
|
-
return
|
|
474
|
+
lex: /* @__PURE__ */ g(function() {
|
|
475
|
+
var u = this.next();
|
|
476
|
+
return u || this.lex();
|
|
341
477
|
}, "lex"),
|
|
342
478
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
343
|
-
begin: /* @__PURE__ */
|
|
344
|
-
this.conditionStack.push(
|
|
479
|
+
begin: /* @__PURE__ */ g(function(u) {
|
|
480
|
+
this.conditionStack.push(u);
|
|
345
481
|
}, "begin"),
|
|
346
482
|
// pop the previously active lexer condition state off the condition stack
|
|
347
|
-
popState: /* @__PURE__ */
|
|
348
|
-
var
|
|
349
|
-
return
|
|
483
|
+
popState: /* @__PURE__ */ g(function() {
|
|
484
|
+
var u = this.conditionStack.length - 1;
|
|
485
|
+
return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
350
486
|
}, "popState"),
|
|
351
487
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
352
|
-
_currentRules: /* @__PURE__ */
|
|
488
|
+
_currentRules: /* @__PURE__ */ g(function() {
|
|
353
489
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
354
490
|
}, "_currentRules"),
|
|
355
491
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
356
|
-
topState: /* @__PURE__ */
|
|
357
|
-
return
|
|
492
|
+
topState: /* @__PURE__ */ g(function(u) {
|
|
493
|
+
return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
|
|
358
494
|
}, "topState"),
|
|
359
495
|
// alias for begin(condition)
|
|
360
|
-
pushState: /* @__PURE__ */
|
|
361
|
-
this.begin(
|
|
496
|
+
pushState: /* @__PURE__ */ g(function(u) {
|
|
497
|
+
this.begin(u);
|
|
362
498
|
}, "pushState"),
|
|
363
499
|
// return the number of states currently on the stack
|
|
364
|
-
stateStackSize: /* @__PURE__ */
|
|
500
|
+
stateStackSize: /* @__PURE__ */ g(function() {
|
|
365
501
|
return this.conditionStack.length;
|
|
366
502
|
}, "stateStackSize"),
|
|
367
503
|
options: {},
|
|
368
|
-
performAction: /* @__PURE__ */
|
|
504
|
+
performAction: /* @__PURE__ */ g(function(u, p, w, v) {
|
|
369
505
|
switch (w) {
|
|
370
506
|
case 0:
|
|
371
|
-
return
|
|
507
|
+
return u.getLogger().debug("Found block-beta"), 10;
|
|
372
508
|
case 1:
|
|
373
|
-
return
|
|
509
|
+
return u.getLogger().debug("Found id-block"), 29;
|
|
374
510
|
case 2:
|
|
375
|
-
return
|
|
511
|
+
return u.getLogger().debug("Found block"), 10;
|
|
376
512
|
case 3:
|
|
377
|
-
|
|
513
|
+
u.getLogger().debug(".", p.yytext);
|
|
378
514
|
break;
|
|
379
515
|
case 4:
|
|
380
|
-
|
|
516
|
+
u.getLogger().debug("_", p.yytext);
|
|
381
517
|
break;
|
|
382
518
|
case 5:
|
|
383
519
|
return 5;
|
|
384
520
|
case 6:
|
|
385
521
|
return p.yytext = -1, 28;
|
|
386
522
|
case 7:
|
|
387
|
-
return p.yytext = p.yytext.replace(/columns\s+/, ""),
|
|
523
|
+
return p.yytext = p.yytext.replace(/columns\s+/, ""), u.getLogger().debug("COLUMNS (LEX)", p.yytext), 28;
|
|
388
524
|
case 8:
|
|
389
525
|
this.pushState("md_string");
|
|
390
526
|
break;
|
|
@@ -397,14 +533,14 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
397
533
|
this.pushState("string");
|
|
398
534
|
break;
|
|
399
535
|
case 12:
|
|
400
|
-
|
|
536
|
+
u.getLogger().debug("LEX: POPPING STR:", p.yytext), this.popState();
|
|
401
537
|
break;
|
|
402
538
|
case 13:
|
|
403
|
-
return
|
|
539
|
+
return u.getLogger().debug("LEX: STR end:", p.yytext), "STR";
|
|
404
540
|
case 14:
|
|
405
|
-
return p.yytext = p.yytext.replace(/space\:/, ""),
|
|
541
|
+
return p.yytext = p.yytext.replace(/space\:/, ""), u.getLogger().debug("SPACE NUM (LEX)", p.yytext), 21;
|
|
406
542
|
case 15:
|
|
407
|
-
return p.yytext = "1",
|
|
543
|
+
return p.yytext = "1", u.getLogger().debug("COLUMNS (LEX)", p.yytext), 21;
|
|
408
544
|
case 16:
|
|
409
545
|
return 42;
|
|
410
546
|
case 17:
|
|
@@ -450,61 +586,61 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
450
586
|
case 36:
|
|
451
587
|
return 30;
|
|
452
588
|
case 37:
|
|
453
|
-
return this.popState(),
|
|
589
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
454
590
|
case 38:
|
|
455
|
-
return this.popState(),
|
|
591
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
456
592
|
case 39:
|
|
457
|
-
return this.popState(),
|
|
593
|
+
return this.popState(), u.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
458
594
|
case 40:
|
|
459
|
-
return this.popState(),
|
|
595
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
460
596
|
case 41:
|
|
461
|
-
return this.popState(),
|
|
597
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
462
598
|
case 42:
|
|
463
|
-
return this.popState(),
|
|
599
|
+
return this.popState(), u.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
464
600
|
case 43:
|
|
465
|
-
return this.popState(),
|
|
601
|
+
return this.popState(), u.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
466
602
|
case 44:
|
|
467
|
-
return this.popState(),
|
|
603
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
468
604
|
case 45:
|
|
469
|
-
return this.popState(),
|
|
605
|
+
return this.popState(), u.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
470
606
|
case 46:
|
|
471
|
-
return this.popState(),
|
|
607
|
+
return this.popState(), u.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
472
608
|
case 47:
|
|
473
|
-
return this.popState(),
|
|
609
|
+
return this.popState(), u.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
474
610
|
case 48:
|
|
475
|
-
return this.popState(),
|
|
611
|
+
return this.popState(), u.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
476
612
|
case 49:
|
|
477
|
-
return this.popState(),
|
|
613
|
+
return this.popState(), u.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
478
614
|
case 50:
|
|
479
|
-
return this.popState(),
|
|
615
|
+
return this.popState(), u.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
480
616
|
case 51:
|
|
481
|
-
return this.popState(),
|
|
617
|
+
return this.popState(), u.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
482
618
|
case 52:
|
|
483
|
-
return this.popState(),
|
|
619
|
+
return this.popState(), u.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
484
620
|
case 53:
|
|
485
|
-
return this.popState(),
|
|
621
|
+
return this.popState(), u.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
486
622
|
case 54:
|
|
487
|
-
return
|
|
623
|
+
return u.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
488
624
|
case 55:
|
|
489
|
-
return
|
|
625
|
+
return u.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
490
626
|
case 56:
|
|
491
|
-
return
|
|
627
|
+
return u.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
492
628
|
case 57:
|
|
493
|
-
return
|
|
629
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
494
630
|
case 58:
|
|
495
|
-
return
|
|
631
|
+
return u.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
496
632
|
case 59:
|
|
497
|
-
return
|
|
633
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
498
634
|
case 60:
|
|
499
|
-
return
|
|
635
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
500
636
|
case 61:
|
|
501
|
-
return
|
|
637
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
502
638
|
case 62:
|
|
503
|
-
return
|
|
639
|
+
return u.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
504
640
|
case 63:
|
|
505
|
-
return
|
|
641
|
+
return u.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
506
642
|
case 64:
|
|
507
|
-
return
|
|
643
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
508
644
|
case 65:
|
|
509
645
|
return this.pushState("NODE"), 35;
|
|
510
646
|
case 66:
|
|
@@ -520,13 +656,13 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
520
656
|
case 71:
|
|
521
657
|
return this.pushState("NODE"), 35;
|
|
522
658
|
case 72:
|
|
523
|
-
return
|
|
659
|
+
return u.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
524
660
|
case 73:
|
|
525
|
-
return this.pushState("BLOCK_ARROW"),
|
|
661
|
+
return this.pushState("BLOCK_ARROW"), u.getLogger().debug("LEX ARR START"), 37;
|
|
526
662
|
case 74:
|
|
527
|
-
return
|
|
663
|
+
return u.getLogger().debug("Lex: NODE_ID", p.yytext), 31;
|
|
528
664
|
case 75:
|
|
529
|
-
return
|
|
665
|
+
return u.getLogger().debug("Lex: EOF", p.yytext), 8;
|
|
530
666
|
case 76:
|
|
531
667
|
this.pushState("md_string");
|
|
532
668
|
break;
|
|
@@ -539,141 +675,141 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt =
|
|
|
539
675
|
this.popState();
|
|
540
676
|
break;
|
|
541
677
|
case 80:
|
|
542
|
-
|
|
678
|
+
u.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
543
679
|
break;
|
|
544
680
|
case 81:
|
|
545
|
-
|
|
681
|
+
u.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
546
682
|
break;
|
|
547
683
|
case 82:
|
|
548
|
-
return
|
|
684
|
+
return u.getLogger().debug("LEX: NODE_DESCR:", p.yytext), "NODE_DESCR";
|
|
549
685
|
case 83:
|
|
550
|
-
|
|
686
|
+
u.getLogger().debug("LEX POPPING"), this.popState();
|
|
551
687
|
break;
|
|
552
688
|
case 84:
|
|
553
|
-
|
|
689
|
+
u.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
554
690
|
break;
|
|
555
691
|
case 85:
|
|
556
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""),
|
|
692
|
+
return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (right): dir:", p.yytext), "DIR";
|
|
557
693
|
case 86:
|
|
558
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""),
|
|
694
|
+
return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (left):", p.yytext), "DIR";
|
|
559
695
|
case 87:
|
|
560
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""),
|
|
696
|
+
return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (x):", p.yytext), "DIR";
|
|
561
697
|
case 88:
|
|
562
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""),
|
|
698
|
+
return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (y):", p.yytext), "DIR";
|
|
563
699
|
case 89:
|
|
564
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""),
|
|
700
|
+
return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (up):", p.yytext), "DIR";
|
|
565
701
|
case 90:
|
|
566
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""),
|
|
702
|
+
return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (down):", p.yytext), "DIR";
|
|
567
703
|
case 91:
|
|
568
|
-
return p.yytext = "]>",
|
|
704
|
+
return p.yytext = "]>", u.getLogger().debug("Lex (ARROW_DIR end):", p.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
569
705
|
case 92:
|
|
570
|
-
return
|
|
706
|
+
return u.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
|
|
571
707
|
case 93:
|
|
572
|
-
return
|
|
708
|
+
return u.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
573
709
|
case 94:
|
|
574
|
-
return
|
|
710
|
+
return u.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
575
711
|
case 95:
|
|
576
|
-
return
|
|
712
|
+
return u.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
577
713
|
case 96:
|
|
578
|
-
return
|
|
714
|
+
return u.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
|
|
579
715
|
case 97:
|
|
580
|
-
return
|
|
716
|
+
return u.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
|
|
581
717
|
case 98:
|
|
582
|
-
return
|
|
718
|
+
return u.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
|
|
583
719
|
case 99:
|
|
584
720
|
this.pushState("md_string");
|
|
585
721
|
break;
|
|
586
722
|
case 100:
|
|
587
|
-
return
|
|
723
|
+
return u.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
588
724
|
case 101:
|
|
589
|
-
return this.popState(),
|
|
725
|
+
return this.popState(), u.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
|
|
590
726
|
case 102:
|
|
591
|
-
return this.popState(),
|
|
727
|
+
return this.popState(), u.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
592
728
|
case 103:
|
|
593
|
-
return this.popState(),
|
|
729
|
+
return this.popState(), u.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
594
730
|
case 104:
|
|
595
|
-
return
|
|
731
|
+
return u.getLogger().debug("Lex: COLON", p.yytext), p.yytext = p.yytext.slice(1), 27;
|
|
596
732
|
}
|
|
597
733
|
}, "anonymous"),
|
|
598
734
|
rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
|
|
599
735
|
conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
|
|
600
736
|
};
|
|
601
|
-
return
|
|
737
|
+
return D;
|
|
602
738
|
}();
|
|
603
|
-
|
|
604
|
-
function
|
|
739
|
+
E.lexer = N;
|
|
740
|
+
function T() {
|
|
605
741
|
this.yy = {};
|
|
606
742
|
}
|
|
607
|
-
return
|
|
743
|
+
return g(T, "Parser"), T.prototype = E, E.Parser = T, new T();
|
|
608
744
|
}();
|
|
609
|
-
|
|
610
|
-
var
|
|
611
|
-
let a =
|
|
612
|
-
a || (a = { id: e, styles: [], textStyles: [] },
|
|
745
|
+
St.parser = St;
|
|
746
|
+
var xa = St, G = /* @__PURE__ */ new Map(), Dt = [], vt = /* @__PURE__ */ new Map(), Wt = "color", Yt = "fill", ba = "bgFill", ce = ",", wa = z(), ut = /* @__PURE__ */ new Map(), ma = /* @__PURE__ */ g((e) => Qe.sanitizeText(e, wa), "sanitizeText"), La = /* @__PURE__ */ g(function(e, t = "") {
|
|
747
|
+
let a = ut.get(e);
|
|
748
|
+
a || (a = { id: e, styles: [], textStyles: [] }, ut.set(e, a)), t != null && t.split(ce).forEach((i) => {
|
|
613
749
|
const l = i.replace(/([^;]*);/, "$1").trim();
|
|
614
|
-
if (RegExp(
|
|
615
|
-
const r = l.replace(
|
|
750
|
+
if (RegExp(Wt).exec(i)) {
|
|
751
|
+
const r = l.replace(Yt, ba).replace(Wt, Yt);
|
|
616
752
|
a.textStyles.push(r);
|
|
617
753
|
}
|
|
618
754
|
a.styles.push(l);
|
|
619
755
|
});
|
|
620
|
-
}, "addStyleClass"),
|
|
621
|
-
const a =
|
|
622
|
-
t != null && (a.styles = t.split(
|
|
623
|
-
}, "addStyle2Node"),
|
|
756
|
+
}, "addStyleClass"), Sa = /* @__PURE__ */ g(function(e, t = "") {
|
|
757
|
+
const a = G.get(e);
|
|
758
|
+
t != null && (a.styles = t.split(ce));
|
|
759
|
+
}, "addStyle2Node"), va = /* @__PURE__ */ g(function(e, t) {
|
|
624
760
|
e.split(",").forEach(function(a) {
|
|
625
|
-
let i =
|
|
761
|
+
let i = G.get(a);
|
|
626
762
|
if (i === void 0) {
|
|
627
763
|
const l = a.trim();
|
|
628
|
-
i = { id: l, type: "na", children: [] },
|
|
764
|
+
i = { id: l, type: "na", children: [] }, G.set(l, i);
|
|
629
765
|
}
|
|
630
766
|
i.classes || (i.classes = []), i.classes.push(t);
|
|
631
767
|
});
|
|
632
|
-
}, "setCssClass"),
|
|
768
|
+
}, "setCssClass"), oe = /* @__PURE__ */ g((e, t) => {
|
|
633
769
|
const a = e.flat(), i = [], l = a.find((r) => (r == null ? void 0 : r.type) === "column-setting"), s = (l == null ? void 0 : l.columns) ?? -1;
|
|
634
770
|
for (const r of a) {
|
|
635
|
-
if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s &&
|
|
771
|
+
if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && L.warn(
|
|
636
772
|
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`
|
|
637
|
-
), r.label && (r.label =
|
|
638
|
-
|
|
773
|
+
), r.label && (r.label = ma(r.label)), r.type === "classDef") {
|
|
774
|
+
La(r.id, r.css);
|
|
639
775
|
continue;
|
|
640
776
|
}
|
|
641
777
|
if (r.type === "applyClass") {
|
|
642
|
-
|
|
778
|
+
va(r.id, (r == null ? void 0 : r.styleClass) ?? "");
|
|
643
779
|
continue;
|
|
644
780
|
}
|
|
645
781
|
if (r.type === "applyStyles") {
|
|
646
|
-
r != null && r.stylesStr &&
|
|
782
|
+
r != null && r.stylesStr && Sa(r.id, r == null ? void 0 : r.stylesStr);
|
|
647
783
|
continue;
|
|
648
784
|
}
|
|
649
785
|
if (r.type === "column-setting")
|
|
650
786
|
t.columns = r.columns ?? -1;
|
|
651
787
|
else if (r.type === "edge") {
|
|
652
|
-
const n = (
|
|
653
|
-
|
|
788
|
+
const n = (vt.get(r.id) ?? 0) + 1;
|
|
789
|
+
vt.set(r.id, n), r.id = n + "-" + r.id, Dt.push(r);
|
|
654
790
|
} else {
|
|
655
791
|
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
656
|
-
const n =
|
|
657
|
-
if (n === void 0 ?
|
|
792
|
+
const n = G.get(r.id);
|
|
793
|
+
if (n === void 0 ? G.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && oe(r.children, r), r.type === "space") {
|
|
658
794
|
const o = r.width ?? 1;
|
|
659
|
-
for (let
|
|
660
|
-
const h =
|
|
661
|
-
h.id = h.id + "-" +
|
|
795
|
+
for (let d = 0; d < o; d++) {
|
|
796
|
+
const h = ya(r);
|
|
797
|
+
h.id = h.id + "-" + d, G.set(h.id, h), i.push(h);
|
|
662
798
|
}
|
|
663
799
|
} else
|
|
664
800
|
n === void 0 && i.push(r);
|
|
665
801
|
}
|
|
666
802
|
}
|
|
667
803
|
t.children = i;
|
|
668
|
-
}, "populateBlockDatabase"),
|
|
669
|
-
|
|
804
|
+
}, "populateBlockDatabase"), Nt = [], st = { id: "root", type: "composite", children: [], columns: -1 }, Ea = /* @__PURE__ */ g(() => {
|
|
805
|
+
L.debug("Clear called"), $e(), st = { id: "root", type: "composite", children: [], columns: -1 }, G = /* @__PURE__ */ new Map([["root", st]]), Nt = [], ut = /* @__PURE__ */ new Map(), Dt = [], vt = /* @__PURE__ */ new Map();
|
|
670
806
|
}, "clear");
|
|
671
|
-
function
|
|
672
|
-
switch (
|
|
807
|
+
function he(e) {
|
|
808
|
+
switch (L.debug("typeStr2Type", e), e) {
|
|
673
809
|
case "[]":
|
|
674
810
|
return "square";
|
|
675
811
|
case "()":
|
|
676
|
-
return
|
|
812
|
+
return L.debug("we have a round"), "round";
|
|
677
813
|
case "(())":
|
|
678
814
|
return "circle";
|
|
679
815
|
case ">]":
|
|
@@ -704,17 +840,17 @@ function Ut(e) {
|
|
|
704
840
|
return "na";
|
|
705
841
|
}
|
|
706
842
|
}
|
|
707
|
-
|
|
708
|
-
function
|
|
709
|
-
switch (
|
|
843
|
+
g(he, "typeStr2Type");
|
|
844
|
+
function ge(e) {
|
|
845
|
+
switch (L.debug("typeStr2Type", e), e) {
|
|
710
846
|
case "==":
|
|
711
847
|
return "thick";
|
|
712
848
|
default:
|
|
713
849
|
return "normal";
|
|
714
850
|
}
|
|
715
851
|
}
|
|
716
|
-
|
|
717
|
-
function
|
|
852
|
+
g(ge, "edgeTypeStr2Type");
|
|
853
|
+
function ue(e) {
|
|
718
854
|
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
719
855
|
case "x":
|
|
720
856
|
return "arrow_cross";
|
|
@@ -726,36 +862,36 @@ function Vt(e) {
|
|
|
726
862
|
return "";
|
|
727
863
|
}
|
|
728
864
|
}
|
|
729
|
-
|
|
730
|
-
var
|
|
731
|
-
|
|
732
|
-
}, "setHierarchy"),
|
|
733
|
-
const t =
|
|
865
|
+
g(ue, "edgeStrToEdgeData");
|
|
866
|
+
var Kt = 0, _a = /* @__PURE__ */ g(() => (Kt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Kt), "generateId"), ka = /* @__PURE__ */ g((e) => {
|
|
867
|
+
st.children = e, oe(e, st), Nt = st.children;
|
|
868
|
+
}, "setHierarchy"), Ta = /* @__PURE__ */ g((e) => {
|
|
869
|
+
const t = G.get(e);
|
|
734
870
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
735
|
-
}, "getColumns"),
|
|
736
|
-
|
|
737
|
-
}, "setBlock"),
|
|
738
|
-
return
|
|
739
|
-
}, "getClasses"),
|
|
740
|
-
getConfig: /* @__PURE__ */
|
|
741
|
-
typeStr2Type:
|
|
742
|
-
edgeTypeStr2Type:
|
|
743
|
-
edgeStrToEdgeData:
|
|
744
|
-
getLogger:
|
|
745
|
-
getBlocksFlat:
|
|
746
|
-
getBlocks:
|
|
747
|
-
getEdges:
|
|
748
|
-
setHierarchy:
|
|
749
|
-
getBlock:
|
|
750
|
-
setBlock:
|
|
751
|
-
getColumns:
|
|
752
|
-
getClasses:
|
|
753
|
-
clear:
|
|
754
|
-
generateId:
|
|
755
|
-
},
|
|
756
|
-
const a =
|
|
757
|
-
return
|
|
758
|
-
}, "fade"),
|
|
871
|
+
}, "getColumns"), Da = /* @__PURE__ */ g(() => [...G.values()], "getBlocksFlat"), Na = /* @__PURE__ */ g(() => Nt || [], "getBlocks"), Ca = /* @__PURE__ */ g(() => Dt, "getEdges"), Ia = /* @__PURE__ */ g((e) => G.get(e), "getBlock"), Ba = /* @__PURE__ */ g((e) => {
|
|
872
|
+
G.set(e.id, e);
|
|
873
|
+
}, "setBlock"), Oa = /* @__PURE__ */ g(() => L, "getLogger"), Aa = /* @__PURE__ */ g(function() {
|
|
874
|
+
return ut;
|
|
875
|
+
}, "getClasses"), Ra = {
|
|
876
|
+
getConfig: /* @__PURE__ */ g(() => it().block, "getConfig"),
|
|
877
|
+
typeStr2Type: he,
|
|
878
|
+
edgeTypeStr2Type: ge,
|
|
879
|
+
edgeStrToEdgeData: ue,
|
|
880
|
+
getLogger: Oa,
|
|
881
|
+
getBlocksFlat: Da,
|
|
882
|
+
getBlocks: Na,
|
|
883
|
+
getEdges: Ca,
|
|
884
|
+
setHierarchy: ka,
|
|
885
|
+
getBlock: Ia,
|
|
886
|
+
setBlock: Ba,
|
|
887
|
+
getColumns: Ta,
|
|
888
|
+
getClasses: Aa,
|
|
889
|
+
clear: Ea,
|
|
890
|
+
generateId: _a
|
|
891
|
+
}, za = Ra, ct = /* @__PURE__ */ g((e, t) => {
|
|
892
|
+
const a = er, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
|
|
893
|
+
return Ze(i, l, s, t);
|
|
894
|
+
}, "fade"), Ma = /* @__PURE__ */ g((e) => `.label {
|
|
759
895
|
font-family: ${e.fontFamily};
|
|
760
896
|
color: ${e.nodeTextColor || e.textColor};
|
|
761
897
|
}
|
|
@@ -825,14 +961,14 @@ var Ot = 0, Re = /* @__PURE__ */ d(() => (Ot++, "id-" + Math.random().toString(3
|
|
|
825
961
|
|
|
826
962
|
/* For html labels only */
|
|
827
963
|
.labelBkg {
|
|
828
|
-
background-color: ${
|
|
964
|
+
background-color: ${ct(e.edgeLabelBackground, 0.5)};
|
|
829
965
|
// background-color:
|
|
830
966
|
}
|
|
831
967
|
|
|
832
968
|
.node .cluster {
|
|
833
|
-
// fill: ${
|
|
834
|
-
fill: ${
|
|
835
|
-
stroke: ${
|
|
969
|
+
// fill: ${ct(e.mainBkg, 0.5)};
|
|
970
|
+
fill: ${ct(e.clusterBkg, 0.5)};
|
|
971
|
+
stroke: ${ct(e.clusterBorder, 0.2)};
|
|
836
972
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
837
973
|
stroke-width: 1px;
|
|
838
974
|
}
|
|
@@ -867,41 +1003,41 @@ var Ot = 0, Re = /* @__PURE__ */ d(() => (Ot++, "id-" + Math.random().toString(3
|
|
|
867
1003
|
font-size: 18px;
|
|
868
1004
|
fill: ${e.textColor};
|
|
869
1005
|
}
|
|
870
|
-
${
|
|
871
|
-
`, "getStyles"),
|
|
1006
|
+
${Ce()}
|
|
1007
|
+
`, "getStyles"), ja = Ma, Fa = /* @__PURE__ */ g((e, t, a, i) => {
|
|
872
1008
|
t.forEach((l) => {
|
|
873
|
-
|
|
1009
|
+
$a[l](e, a, i);
|
|
874
1010
|
});
|
|
875
|
-
}, "insertMarkers"),
|
|
876
|
-
|
|
877
|
-
}, "extension"),
|
|
1011
|
+
}, "insertMarkers"), Pa = /* @__PURE__ */ g((e, t, a) => {
|
|
1012
|
+
L.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
1013
|
+
}, "extension"), Wa = /* @__PURE__ */ g((e, t, a) => {
|
|
878
1014
|
e.append("defs").append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
879
|
-
}, "composition"),
|
|
1015
|
+
}, "composition"), Ya = /* @__PURE__ */ g((e, t, a) => {
|
|
880
1016
|
e.append("defs").append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
881
|
-
}, "aggregation"),
|
|
1017
|
+
}, "aggregation"), Ka = /* @__PURE__ */ g((e, t, a) => {
|
|
882
1018
|
e.append("defs").append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
883
|
-
}, "dependency"),
|
|
1019
|
+
}, "dependency"), Ua = /* @__PURE__ */ g((e, t, a) => {
|
|
884
1020
|
e.append("defs").append("marker").attr("id", a + "_" + 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", a + "_" + 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);
|
|
885
|
-
}, "lollipop"),
|
|
1021
|
+
}, "lollipop"), Ha = /* @__PURE__ */ g((e, t, a) => {
|
|
886
1022
|
e.append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
887
|
-
}, "point"),
|
|
1023
|
+
}, "point"), Xa = /* @__PURE__ */ g((e, t, a) => {
|
|
888
1024
|
e.append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
889
|
-
}, "circle"),
|
|
1025
|
+
}, "circle"), Va = /* @__PURE__ */ g((e, t, a) => {
|
|
890
1026
|
e.append("marker").attr("id", a + "_" + 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", a + "_" + 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");
|
|
891
|
-
}, "cross"),
|
|
1027
|
+
}, "cross"), Ga = /* @__PURE__ */ g((e, t, a) => {
|
|
892
1028
|
e.append("defs").append("marker").attr("id", a + "_" + 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");
|
|
893
|
-
}, "barb"),
|
|
894
|
-
extension:
|
|
895
|
-
composition:
|
|
896
|
-
aggregation:
|
|
897
|
-
dependency:
|
|
898
|
-
lollipop:
|
|
899
|
-
point:
|
|
900
|
-
circle:
|
|
901
|
-
cross:
|
|
902
|
-
barb:
|
|
903
|
-
},
|
|
904
|
-
function
|
|
1029
|
+
}, "barb"), $a = {
|
|
1030
|
+
extension: Pa,
|
|
1031
|
+
composition: Wa,
|
|
1032
|
+
aggregation: Ya,
|
|
1033
|
+
dependency: Ka,
|
|
1034
|
+
lollipop: Ua,
|
|
1035
|
+
point: Ha,
|
|
1036
|
+
circle: Xa,
|
|
1037
|
+
cross: Va,
|
|
1038
|
+
barb: Ga
|
|
1039
|
+
}, Za = Fa, Zt, qt, O = ((qt = (Zt = z()) == null ? void 0 : Zt.block) == null ? void 0 : qt.padding) ?? 8;
|
|
1040
|
+
function de(e, t) {
|
|
905
1041
|
if (e === 0 || !Number.isInteger(e))
|
|
906
1042
|
throw new Error("Columns must be an integer !== 0.");
|
|
907
1043
|
if (t < 0 || !Number.isInteger(t))
|
|
@@ -913,12 +1049,12 @@ function Gt(e, t) {
|
|
|
913
1049
|
const a = t % e, i = Math.floor(t / e);
|
|
914
1050
|
return { px: a, py: i };
|
|
915
1051
|
}
|
|
916
|
-
|
|
917
|
-
var
|
|
1052
|
+
g(de, "calculateBlockPosition");
|
|
1053
|
+
var qa = /* @__PURE__ */ g((e) => {
|
|
918
1054
|
let t = 0, a = 0;
|
|
919
1055
|
for (const i of e.children) {
|
|
920
1056
|
const { width: l, height: s, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
921
|
-
|
|
1057
|
+
L.debug(
|
|
922
1058
|
"getMaxChildSize abc95 child:",
|
|
923
1059
|
i.id,
|
|
924
1060
|
"width:",
|
|
@@ -934,9 +1070,9 @@ var nr = /* @__PURE__ */ d((e) => {
|
|
|
934
1070
|
}
|
|
935
1071
|
return { width: t, height: a };
|
|
936
1072
|
}, "getMaxChildSize");
|
|
937
|
-
function
|
|
938
|
-
var r, n, o,
|
|
939
|
-
|
|
1073
|
+
function dt(e, t, a = 0, i = 0) {
|
|
1074
|
+
var r, n, o, d, h, x, b, m, S, k, E;
|
|
1075
|
+
L.debug(
|
|
940
1076
|
"setBlockSizes abc95 (start)",
|
|
941
1077
|
e.id,
|
|
942
1078
|
(r = e == null ? void 0 : e.size) == null ? void 0 : r.x,
|
|
@@ -952,43 +1088,43 @@ function ht(e, t, a = 0, i = 0) {
|
|
|
952
1088
|
});
|
|
953
1089
|
let l = 0, s = 0;
|
|
954
1090
|
if (((o = e.children) == null ? void 0 : o.length) > 0) {
|
|
955
|
-
for (const
|
|
956
|
-
|
|
957
|
-
const
|
|
958
|
-
l =
|
|
959
|
-
for (const
|
|
960
|
-
|
|
961
|
-
`abc95 Setting size of children of ${e.id} id=${
|
|
962
|
-
),
|
|
963
|
-
`abc95 updating size of ${e.id} children child:${
|
|
1091
|
+
for (const v of e.children)
|
|
1092
|
+
dt(v, t);
|
|
1093
|
+
const N = qa(e);
|
|
1094
|
+
l = N.width, s = N.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
|
|
1095
|
+
for (const v of e.children)
|
|
1096
|
+
v.size && (L.debug(
|
|
1097
|
+
`abc95 Setting size of children of ${e.id} id=${v.id} ${l} ${s} ${JSON.stringify(v.size)}`
|
|
1098
|
+
), v.size.width = l * (v.widthInColumns ?? 1) + O * ((v.widthInColumns ?? 1) - 1), v.size.height = s, v.size.x = 0, v.size.y = 0, L.debug(
|
|
1099
|
+
`abc95 updating size of ${e.id} children child:${v.id} maxWidth:${l} maxHeight:${s}`
|
|
964
1100
|
));
|
|
965
|
-
for (const
|
|
966
|
-
|
|
967
|
-
const
|
|
968
|
-
let
|
|
969
|
-
for (const
|
|
970
|
-
|
|
971
|
-
let
|
|
972
|
-
|
|
973
|
-
const
|
|
974
|
-
let p =
|
|
1101
|
+
for (const v of e.children)
|
|
1102
|
+
dt(v, t, l, s);
|
|
1103
|
+
const T = e.columns ?? -1;
|
|
1104
|
+
let D = 0;
|
|
1105
|
+
for (const v of e.children)
|
|
1106
|
+
D += v.widthInColumns ?? 1;
|
|
1107
|
+
let y = e.children.length;
|
|
1108
|
+
T > 0 && T < D && (y = T);
|
|
1109
|
+
const u = Math.ceil(D / y);
|
|
1110
|
+
let p = y * (l + O) + O, w = u * (s + O) + O;
|
|
975
1111
|
if (p < a) {
|
|
976
|
-
|
|
1112
|
+
L.debug(
|
|
977
1113
|
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${p}`
|
|
978
1114
|
), p = a, w = i;
|
|
979
|
-
const
|
|
980
|
-
|
|
1115
|
+
const v = (a - y * O - O) / y, c = (i - u * O - O) / u;
|
|
1116
|
+
L.debug("Size indata abc88", e.id, "childWidth", v, "maxWidth", l), L.debug("Size indata abc88", e.id, "childHeight", c, "maxHeight", s), L.debug("Size indata abc88 xSize", y, "padding", O);
|
|
981
1117
|
for (const _ of e.children)
|
|
982
|
-
_.size && (_.size.width =
|
|
1118
|
+
_.size && (_.size.width = v, _.size.height = c, _.size.x = 0, _.size.y = 0);
|
|
983
1119
|
}
|
|
984
|
-
if (
|
|
985
|
-
`abc95 (finale calc) ${e.id} xSize ${
|
|
1120
|
+
if (L.debug(
|
|
1121
|
+
`abc95 (finale calc) ${e.id} xSize ${y} ySize ${u} columns ${T}${e.children.length} width=${Math.max(p, ((d = e.size) == null ? void 0 : d.width) || 0)}`
|
|
986
1122
|
), p < (((h = e == null ? void 0 : e.size) == null ? void 0 : h.width) || 0)) {
|
|
987
|
-
p = ((
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
const c = (p -
|
|
991
|
-
|
|
1123
|
+
p = ((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) || 0;
|
|
1124
|
+
const v = T > 0 ? Math.min(e.children.length, T) : e.children.length;
|
|
1125
|
+
if (v > 0) {
|
|
1126
|
+
const c = (p - v * O - O) / v;
|
|
1127
|
+
L.debug("abc95 (growing to fit) width", e.id, p, (b = e.size) == null ? void 0 : b.width, c);
|
|
992
1128
|
for (const _ of e.children)
|
|
993
1129
|
_.size && (_.size.width = c);
|
|
994
1130
|
}
|
|
@@ -1000,109 +1136,109 @@ function ht(e, t, a = 0, i = 0) {
|
|
|
1000
1136
|
y: 0
|
|
1001
1137
|
};
|
|
1002
1138
|
}
|
|
1003
|
-
|
|
1139
|
+
L.debug(
|
|
1004
1140
|
"setBlockSizes abc94 (done)",
|
|
1005
1141
|
e.id,
|
|
1006
|
-
(
|
|
1007
|
-
(
|
|
1008
|
-
(
|
|
1009
|
-
(
|
|
1142
|
+
(m = e == null ? void 0 : e.size) == null ? void 0 : m.x,
|
|
1143
|
+
(S = e == null ? void 0 : e.size) == null ? void 0 : S.width,
|
|
1144
|
+
(k = e == null ? void 0 : e.size) == null ? void 0 : k.y,
|
|
1145
|
+
(E = e == null ? void 0 : e.size) == null ? void 0 : E.height
|
|
1010
1146
|
);
|
|
1011
1147
|
}
|
|
1012
|
-
|
|
1013
|
-
function
|
|
1014
|
-
var i, l, s, r, n, o,
|
|
1015
|
-
|
|
1148
|
+
g(dt, "setBlockSizes");
|
|
1149
|
+
function Ct(e, t) {
|
|
1150
|
+
var i, l, s, r, n, o, d, h, x, b, m, S, k, E, N, T, D;
|
|
1151
|
+
L.debug(
|
|
1016
1152
|
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.x} y: ${(l = e == null ? void 0 : e.size) == null ? void 0 : l.y} width: ${(s = e == null ? void 0 : e.size) == null ? void 0 : s.width}`
|
|
1017
1153
|
);
|
|
1018
1154
|
const a = e.columns ?? -1;
|
|
1019
|
-
if (
|
|
1155
|
+
if (L.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
|
|
1020
1156
|
e.children.length > 0) {
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1157
|
+
const y = ((n = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : n.width) ?? 0, u = e.children.length * y + (e.children.length - 1) * O;
|
|
1158
|
+
L.debug("widthOfChildren 88", u, "posX");
|
|
1023
1159
|
let p = 0;
|
|
1024
|
-
|
|
1025
|
-
let w = (
|
|
1160
|
+
L.debug("abc91 block?.size?.x", e.id, (o = e == null ? void 0 : e.size) == null ? void 0 : o.x);
|
|
1161
|
+
let w = (d = e == null ? void 0 : e.size) != null && d.x ? ((h = e == null ? void 0 : e.size) == null ? void 0 : h.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -O, v = 0;
|
|
1026
1162
|
for (const c of e.children) {
|
|
1027
1163
|
const _ = e;
|
|
1028
1164
|
if (!c.size)
|
|
1029
1165
|
continue;
|
|
1030
|
-
const { width: f, height:
|
|
1031
|
-
if (
|
|
1032
|
-
`abc89 layout blocks (child) id: ${c.id} Pos: ${p} (px, py) ${
|
|
1166
|
+
const { width: f, height: M } = c.size, { px: A, py: H } = de(a, p);
|
|
1167
|
+
if (H != v && (v = H, w = (b = e == null ? void 0 : e.size) != null && b.x ? ((m = e == null ? void 0 : e.size) == null ? void 0 : m.x) + (-((S = e == null ? void 0 : e.size) == null ? void 0 : S.width) / 2 || 0) : -O, L.debug("New row in layout for block", e.id, " and child ", c.id, v)), L.debug(
|
|
1168
|
+
`abc89 layout blocks (child) id: ${c.id} Pos: ${p} (px, py) ${A},${H} (${(k = _ == null ? void 0 : _.size) == null ? void 0 : k.x},${(E = _ == null ? void 0 : _.size) == null ? void 0 : E.y}) parent: ${_.id} width: ${f}${O}`
|
|
1033
1169
|
), _.size) {
|
|
1034
1170
|
const J = f / 2;
|
|
1035
|
-
c.size.x = w +
|
|
1036
|
-
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${J} padding=${
|
|
1037
|
-
), w = c.size.x + J, c.size.y = _.size.y - _.size.height / 2 +
|
|
1038
|
-
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${
|
|
1171
|
+
c.size.x = w + O + J, L.debug(
|
|
1172
|
+
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${J} padding=${O} width=${f} halfWidth=${J} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
|
|
1173
|
+
), w = c.size.x + J, c.size.y = _.size.y - _.size.height / 2 + H * (M + O) + M / 2 + O, L.debug(
|
|
1174
|
+
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${O}${J}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
|
|
1039
1175
|
);
|
|
1040
1176
|
}
|
|
1041
|
-
c.children &&
|
|
1042
|
-
let
|
|
1043
|
-
a > 0 && (
|
|
1177
|
+
c.children && Ct(c);
|
|
1178
|
+
let W = (c == null ? void 0 : c.widthInColumns) ?? 1;
|
|
1179
|
+
a > 0 && (W = Math.min(W, a - p % a)), p += W, L.debug("abc88 columnsPos", c, p);
|
|
1044
1180
|
}
|
|
1045
1181
|
}
|
|
1046
|
-
|
|
1047
|
-
`layout blocks (<==layoutBlocks) ${e.id} x: ${(
|
|
1182
|
+
L.debug(
|
|
1183
|
+
`layout blocks (<==layoutBlocks) ${e.id} x: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.x} y: ${(T = e == null ? void 0 : e.size) == null ? void 0 : T.y} width: ${(D = e == null ? void 0 : e.size) == null ? void 0 : D.width}`
|
|
1048
1184
|
);
|
|
1049
1185
|
}
|
|
1050
|
-
|
|
1051
|
-
function
|
|
1186
|
+
g(Ct, "layoutBlocks");
|
|
1187
|
+
function It(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1052
1188
|
if (e.size && e.id !== "root") {
|
|
1053
1189
|
const { x: s, y: r, width: n, height: o } = e.size;
|
|
1054
1190
|
s - n / 2 < t && (t = s - n / 2), r - o / 2 < a && (a = r - o / 2), s + n / 2 > i && (i = s + n / 2), r + o / 2 > l && (l = r + o / 2);
|
|
1055
1191
|
}
|
|
1056
1192
|
if (e.children)
|
|
1057
1193
|
for (const s of e.children)
|
|
1058
|
-
({ minX: t, minY: a, maxX: i, maxY: l } =
|
|
1194
|
+
({ minX: t, minY: a, maxX: i, maxY: l } = It(s, { minX: t, minY: a, maxX: i, maxY: l }));
|
|
1059
1195
|
return { minX: t, minY: a, maxX: i, maxY: l };
|
|
1060
1196
|
}
|
|
1061
|
-
|
|
1062
|
-
function
|
|
1197
|
+
g(It, "findBounds");
|
|
1198
|
+
function pe(e) {
|
|
1063
1199
|
const t = e.getBlock("root");
|
|
1064
1200
|
if (!t)
|
|
1065
1201
|
return;
|
|
1066
|
-
|
|
1067
|
-
const { minX: a, minY: i, maxX: l, maxY: s } =
|
|
1202
|
+
dt(t, e, 0, 0), Ct(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1203
|
+
const { minX: a, minY: i, maxX: l, maxY: s } = It(t), r = s - i, n = l - a;
|
|
1068
1204
|
return { x: a, y: i, width: n, height: r };
|
|
1069
1205
|
}
|
|
1070
|
-
|
|
1071
|
-
function
|
|
1206
|
+
g(pe, "layout");
|
|
1207
|
+
function Et(e, t) {
|
|
1072
1208
|
t && e.attr("style", t);
|
|
1073
1209
|
}
|
|
1074
|
-
|
|
1075
|
-
function
|
|
1210
|
+
g(Et, "applyStyle");
|
|
1211
|
+
function fe(e, t) {
|
|
1076
1212
|
const a = R(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
|
|
1077
|
-
return r.html(
|
|
1213
|
+
return r.html(mt(l, t)), Et(r, e.labelStyle), r.attr("class", s), Et(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
|
|
1078
1214
|
}
|
|
1079
|
-
|
|
1080
|
-
var
|
|
1215
|
+
g(fe, "addHtmlLabel");
|
|
1216
|
+
var Ja = /* @__PURE__ */ g(async (e, t, a, i) => {
|
|
1081
1217
|
let l = e || "";
|
|
1082
1218
|
typeof l == "object" && (l = l[0]);
|
|
1083
1219
|
const s = z();
|
|
1084
1220
|
if (Z(s.flowchart.htmlLabels)) {
|
|
1085
|
-
l = l.replace(/\\n|\n/g, "<br />"),
|
|
1086
|
-
const r = await
|
|
1221
|
+
l = l.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + l);
|
|
1222
|
+
const r = await Je(Lt(l)), n = {
|
|
1087
1223
|
isNode: i,
|
|
1088
1224
|
label: r,
|
|
1089
1225
|
labelStyle: t.replace("fill:", "color:")
|
|
1090
1226
|
};
|
|
1091
|
-
return
|
|
1227
|
+
return fe(n, s);
|
|
1092
1228
|
} else {
|
|
1093
1229
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1094
1230
|
r.setAttribute("style", t.replace("color:", "fill:"));
|
|
1095
1231
|
let n = [];
|
|
1096
1232
|
typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
|
|
1097
1233
|
for (const o of n) {
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1234
|
+
const d = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
1235
|
+
d.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), d.setAttribute("dy", "1em"), d.setAttribute("x", "0"), a ? d.setAttribute("class", "title-row") : d.setAttribute("class", "row"), d.textContent = o.trim(), r.appendChild(d);
|
|
1100
1236
|
}
|
|
1101
1237
|
return r;
|
|
1102
1238
|
}
|
|
1103
|
-
}, "createLabel"),
|
|
1104
|
-
t.arrowTypeStart &&
|
|
1105
|
-
}, "addEdgeMarkers"),
|
|
1239
|
+
}, "createLabel"), V = Ja, Qa = /* @__PURE__ */ g((e, t, a, i, l) => {
|
|
1240
|
+
t.arrowTypeStart && Ut(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Ut(e, "end", t.arrowTypeEnd, a, i, l);
|
|
1241
|
+
}, "addEdgeMarkers"), ts = {
|
|
1106
1242
|
arrow_cross: "cross",
|
|
1107
1243
|
arrow_point: "point",
|
|
1108
1244
|
arrow_barb: "barb",
|
|
@@ -1112,16 +1248,16 @@ var lr = /* @__PURE__ */ d(async (e, t, a, i) => {
|
|
|
1112
1248
|
composition: "composition",
|
|
1113
1249
|
dependency: "dependency",
|
|
1114
1250
|
lollipop: "lollipop"
|
|
1115
|
-
},
|
|
1116
|
-
const r =
|
|
1251
|
+
}, Ut = /* @__PURE__ */ g((e, t, a, i, l, s) => {
|
|
1252
|
+
const r = ts[a];
|
|
1117
1253
|
if (!r) {
|
|
1118
|
-
|
|
1254
|
+
L.warn(`Unknown arrow type: ${a}`);
|
|
1119
1255
|
return;
|
|
1120
1256
|
}
|
|
1121
1257
|
const n = t === "start" ? "Start" : "End";
|
|
1122
1258
|
e.attr(`marker-${t}`, `url(${i}#${l}_${s}-${r}${n})`);
|
|
1123
|
-
}, "addEdgeMarker"),
|
|
1124
|
-
const a = z(), i = Z(a.flowchart.htmlLabels), l = t.labelType === "markdown" ?
|
|
1259
|
+
}, "addEdgeMarker"), _t = {}, P = {}, es = /* @__PURE__ */ g(async (e, t) => {
|
|
1260
|
+
const a = z(), i = Z(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? re(
|
|
1125
1261
|
e,
|
|
1126
1262
|
t.label,
|
|
1127
1263
|
{
|
|
@@ -1130,55 +1266,55 @@ var lr = /* @__PURE__ */ d(async (e, t, a, i) => {
|
|
|
1130
1266
|
addSvgBackground: !0
|
|
1131
1267
|
},
|
|
1132
1268
|
a
|
|
1133
|
-
) : await
|
|
1269
|
+
) : await V(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
|
|
1134
1270
|
r.node().appendChild(l);
|
|
1135
1271
|
let n = l.getBBox();
|
|
1136
1272
|
if (i) {
|
|
1137
|
-
const
|
|
1138
|
-
n =
|
|
1273
|
+
const d = l.children[0], h = R(l);
|
|
1274
|
+
n = d.getBoundingClientRect(), h.attr("width", n.width), h.attr("height", n.height);
|
|
1139
1275
|
}
|
|
1140
|
-
r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"),
|
|
1276
|
+
r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), _t[t.id] = s, t.width = n.width, t.height = n.height;
|
|
1141
1277
|
let o;
|
|
1142
1278
|
if (t.startLabelLeft) {
|
|
1143
|
-
const
|
|
1144
|
-
o =
|
|
1145
|
-
const b =
|
|
1146
|
-
|
|
1279
|
+
const d = await V(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1280
|
+
o = x.node().appendChild(d);
|
|
1281
|
+
const b = d.getBBox();
|
|
1282
|
+
x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startLeft = h, at(o, t.startLabelLeft);
|
|
1147
1283
|
}
|
|
1148
1284
|
if (t.startLabelRight) {
|
|
1149
|
-
const
|
|
1150
|
-
o = h.node().appendChild(
|
|
1151
|
-
const b =
|
|
1152
|
-
|
|
1285
|
+
const d = await V(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1286
|
+
o = h.node().appendChild(d), x.node().appendChild(d);
|
|
1287
|
+
const b = d.getBBox();
|
|
1288
|
+
x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startRight = h, at(o, t.startLabelRight);
|
|
1153
1289
|
}
|
|
1154
1290
|
if (t.endLabelLeft) {
|
|
1155
|
-
const
|
|
1156
|
-
o =
|
|
1157
|
-
const b =
|
|
1158
|
-
|
|
1291
|
+
const d = await V(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1292
|
+
o = x.node().appendChild(d);
|
|
1293
|
+
const b = d.getBBox();
|
|
1294
|
+
x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(d), P[t.id] || (P[t.id] = {}), P[t.id].endLeft = h, at(o, t.endLabelLeft);
|
|
1159
1295
|
}
|
|
1160
1296
|
if (t.endLabelRight) {
|
|
1161
|
-
const
|
|
1162
|
-
o =
|
|
1163
|
-
const b =
|
|
1164
|
-
|
|
1297
|
+
const d = await V(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1298
|
+
o = x.node().appendChild(d);
|
|
1299
|
+
const b = d.getBBox();
|
|
1300
|
+
x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(d), P[t.id] || (P[t.id] = {}), P[t.id].endRight = h, at(o, t.endLabelRight);
|
|
1165
1301
|
}
|
|
1166
1302
|
return l;
|
|
1167
1303
|
}, "insertEdgeLabel");
|
|
1168
|
-
function
|
|
1304
|
+
function at(e, t) {
|
|
1169
1305
|
z().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1170
1306
|
}
|
|
1171
|
-
|
|
1172
|
-
var
|
|
1173
|
-
|
|
1307
|
+
g(at, "setTerminalWidth");
|
|
1308
|
+
var rs = /* @__PURE__ */ g((e, t) => {
|
|
1309
|
+
L.debug("Moving label abc88 ", e.id, e.label, _t[e.id], t);
|
|
1174
1310
|
let a = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1175
|
-
const i = z(), { subGraphTitleTotalMargin: l } =
|
|
1311
|
+
const i = z(), { subGraphTitleTotalMargin: l } = Ue(i);
|
|
1176
1312
|
if (e.label) {
|
|
1177
|
-
const s =
|
|
1313
|
+
const s = _t[e.id];
|
|
1178
1314
|
let r = e.x, n = e.y;
|
|
1179
1315
|
if (a) {
|
|
1180
|
-
const o =
|
|
1181
|
-
|
|
1316
|
+
const o = rt.calcLabelPosition(a);
|
|
1317
|
+
L.debug(
|
|
1182
1318
|
"Moving label " + e.label + " from (",
|
|
1183
1319
|
r,
|
|
1184
1320
|
",",
|
|
@@ -1193,19 +1329,19 @@ var dr = /* @__PURE__ */ d((e, t) => {
|
|
|
1193
1329
|
s.attr("transform", `translate(${r}, ${n + l / 2})`);
|
|
1194
1330
|
}
|
|
1195
1331
|
if (e.startLabelLeft) {
|
|
1196
|
-
const s =
|
|
1332
|
+
const s = P[e.id].startLeft;
|
|
1197
1333
|
let r = e.x, n = e.y;
|
|
1198
1334
|
if (a) {
|
|
1199
|
-
const o =
|
|
1335
|
+
const o = rt.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
1200
1336
|
r = o.x, n = o.y;
|
|
1201
1337
|
}
|
|
1202
1338
|
s.attr("transform", `translate(${r}, ${n})`);
|
|
1203
1339
|
}
|
|
1204
1340
|
if (e.startLabelRight) {
|
|
1205
|
-
const s =
|
|
1341
|
+
const s = P[e.id].startRight;
|
|
1206
1342
|
let r = e.x, n = e.y;
|
|
1207
1343
|
if (a) {
|
|
1208
|
-
const o =
|
|
1344
|
+
const o = rt.calcTerminalLabelPosition(
|
|
1209
1345
|
e.arrowTypeStart ? 10 : 0,
|
|
1210
1346
|
"start_right",
|
|
1211
1347
|
a
|
|
@@ -1215,53 +1351,53 @@ var dr = /* @__PURE__ */ d((e, t) => {
|
|
|
1215
1351
|
s.attr("transform", `translate(${r}, ${n})`);
|
|
1216
1352
|
}
|
|
1217
1353
|
if (e.endLabelLeft) {
|
|
1218
|
-
const s =
|
|
1354
|
+
const s = P[e.id].endLeft;
|
|
1219
1355
|
let r = e.x, n = e.y;
|
|
1220
1356
|
if (a) {
|
|
1221
|
-
const o =
|
|
1357
|
+
const o = rt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
1222
1358
|
r = o.x, n = o.y;
|
|
1223
1359
|
}
|
|
1224
1360
|
s.attr("transform", `translate(${r}, ${n})`);
|
|
1225
1361
|
}
|
|
1226
1362
|
if (e.endLabelRight) {
|
|
1227
|
-
const s =
|
|
1363
|
+
const s = P[e.id].endRight;
|
|
1228
1364
|
let r = e.x, n = e.y;
|
|
1229
1365
|
if (a) {
|
|
1230
|
-
const o =
|
|
1366
|
+
const o = rt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
1231
1367
|
r = o.x, n = o.y;
|
|
1232
1368
|
}
|
|
1233
1369
|
s.attr("transform", `translate(${r}, ${n})`);
|
|
1234
1370
|
}
|
|
1235
|
-
}, "positionEdgeLabel"),
|
|
1371
|
+
}, "positionEdgeLabel"), as = /* @__PURE__ */ g((e, t) => {
|
|
1236
1372
|
const a = e.x, i = e.y, l = Math.abs(t.x - a), s = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
|
|
1237
1373
|
return l >= r || s >= n;
|
|
1238
|
-
}, "outsideNode"),
|
|
1239
|
-
|
|
1374
|
+
}, "outsideNode"), ss = /* @__PURE__ */ g((e, t, a) => {
|
|
1375
|
+
L.debug(`intersection calc abc89:
|
|
1240
1376
|
outsidePoint: ${JSON.stringify(t)}
|
|
1241
1377
|
insidePoint : ${JSON.stringify(a)}
|
|
1242
1378
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1243
1379
|
const i = e.x, l = e.y, s = Math.abs(i - a.x), r = e.width / 2;
|
|
1244
1380
|
let n = a.x < t.x ? r - s : r + s;
|
|
1245
|
-
const o = e.height / 2,
|
|
1381
|
+
const o = e.height / 2, d = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
|
|
1246
1382
|
if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * o) {
|
|
1247
|
-
let
|
|
1248
|
-
n = h *
|
|
1383
|
+
let x = a.y < t.y ? t.y - o - l : l - o - t.y;
|
|
1384
|
+
n = h * x / d;
|
|
1249
1385
|
const b = {
|
|
1250
1386
|
x: a.x < t.x ? a.x + n : a.x - h + n,
|
|
1251
|
-
y: a.y < t.y ? a.y +
|
|
1387
|
+
y: a.y < t.y ? a.y + d - x : a.y - d + x
|
|
1252
1388
|
};
|
|
1253
|
-
return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x),
|
|
1389
|
+
return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), d === 0 && (b.y = t.y), L.debug(`abc89 topp/bott calc, Q ${d}, q ${x}, R ${h}, r ${n}`, b), b;
|
|
1254
1390
|
} else {
|
|
1255
1391
|
a.x < t.x ? n = t.x - r - i : n = i - r - t.x;
|
|
1256
|
-
let
|
|
1257
|
-
return
|
|
1392
|
+
let x = d * n / h, b = a.x < t.x ? a.x + h - n : a.x - h + n, m = a.y < t.y ? a.y + x : a.y - x;
|
|
1393
|
+
return L.debug(`sides calc abc89, Q ${d}, q ${x}, R ${h}, r ${n}`, { _x: b, _y: m }), n === 0 && (b = t.x, m = t.y), h === 0 && (b = t.x), d === 0 && (m = t.y), { x: b, y: m };
|
|
1258
1394
|
}
|
|
1259
|
-
}, "intersection"),
|
|
1260
|
-
|
|
1395
|
+
}, "intersection"), Ht = /* @__PURE__ */ g((e, t) => {
|
|
1396
|
+
L.debug("abc88 cutPathAtIntersect", e, t);
|
|
1261
1397
|
let a = [], i = e[0], l = !1;
|
|
1262
1398
|
return e.forEach((s) => {
|
|
1263
|
-
if (!
|
|
1264
|
-
const r =
|
|
1399
|
+
if (!as(t, s) && !l) {
|
|
1400
|
+
const r = ss(t, i, s);
|
|
1265
1401
|
let n = !1;
|
|
1266
1402
|
a.forEach((o) => {
|
|
1267
1403
|
n = n || o.x === r.x && o.y === r.y;
|
|
@@ -1269,48 +1405,48 @@ var dr = /* @__PURE__ */ d((e, t) => {
|
|
|
1269
1405
|
} else
|
|
1270
1406
|
i = s, l || a.push(s);
|
|
1271
1407
|
}), a;
|
|
1272
|
-
}, "cutPathAtIntersect"),
|
|
1408
|
+
}, "cutPathAtIntersect"), is = /* @__PURE__ */ g(function(e, t, a, i, l, s, r) {
|
|
1273
1409
|
let n = a.points;
|
|
1274
|
-
|
|
1410
|
+
L.debug("abc88 InsertEdge: edge=", a, "e=", t);
|
|
1275
1411
|
let o = !1;
|
|
1276
|
-
const
|
|
1412
|
+
const d = s.node(t.v);
|
|
1277
1413
|
var h = s.node(t.w);
|
|
1278
|
-
h != null && h.intersect && (
|
|
1279
|
-
const
|
|
1280
|
-
let b =
|
|
1414
|
+
h != null && h.intersect && (d != null && d.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(d.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (L.debug("to cluster abc88", i[a.toCluster]), n = Ht(a.points, i[a.toCluster].node), o = !0), a.fromCluster && (L.debug("from cluster abc88", i[a.fromCluster]), n = Ht(n.reverse(), i[a.fromCluster].node).reverse(), o = !0);
|
|
1415
|
+
const x = n.filter((y) => !Number.isNaN(y.y));
|
|
1416
|
+
let b = qe;
|
|
1281
1417
|
a.curve && (l === "graph" || l === "flowchart") && (b = a.curve);
|
|
1282
|
-
const { x:
|
|
1283
|
-
let
|
|
1418
|
+
const { x: m, y: S } = He(a), k = Xe().x(m).y(S).curve(b);
|
|
1419
|
+
let E;
|
|
1284
1420
|
switch (a.thickness) {
|
|
1285
1421
|
case "normal":
|
|
1286
|
-
|
|
1422
|
+
E = "edge-thickness-normal";
|
|
1287
1423
|
break;
|
|
1288
1424
|
case "thick":
|
|
1289
|
-
|
|
1425
|
+
E = "edge-thickness-thick";
|
|
1290
1426
|
break;
|
|
1291
1427
|
case "invisible":
|
|
1292
|
-
|
|
1428
|
+
E = "edge-thickness-thick";
|
|
1293
1429
|
break;
|
|
1294
1430
|
default:
|
|
1295
|
-
|
|
1431
|
+
E = "";
|
|
1296
1432
|
}
|
|
1297
1433
|
switch (a.pattern) {
|
|
1298
1434
|
case "solid":
|
|
1299
|
-
|
|
1435
|
+
E += " edge-pattern-solid";
|
|
1300
1436
|
break;
|
|
1301
1437
|
case "dotted":
|
|
1302
|
-
|
|
1438
|
+
E += " edge-pattern-dotted";
|
|
1303
1439
|
break;
|
|
1304
1440
|
case "dashed":
|
|
1305
|
-
|
|
1441
|
+
E += " edge-pattern-dashed";
|
|
1306
1442
|
break;
|
|
1307
1443
|
}
|
|
1308
|
-
const
|
|
1309
|
-
let
|
|
1310
|
-
(z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (
|
|
1311
|
-
let
|
|
1312
|
-
return o && (
|
|
1313
|
-
}, "insertEdge"),
|
|
1444
|
+
const N = e.append("path").attr("d", k(x)).attr("id", a.id).attr("class", " " + E + (a.classes ? " " + a.classes : "")).attr("style", a.style);
|
|
1445
|
+
let T = "";
|
|
1446
|
+
(z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (T = Ve(!0)), Qa(N, a, T, r, l);
|
|
1447
|
+
let D = {};
|
|
1448
|
+
return o && (D.updatedPath = n), D.originalPath = a.points, D;
|
|
1449
|
+
}, "insertEdge"), ns = /* @__PURE__ */ g((e) => {
|
|
1314
1450
|
const t = /* @__PURE__ */ new Set();
|
|
1315
1451
|
for (const a of e)
|
|
1316
1452
|
switch (a) {
|
|
@@ -1325,8 +1461,8 @@ var dr = /* @__PURE__ */ d((e, t) => {
|
|
|
1325
1461
|
break;
|
|
1326
1462
|
}
|
|
1327
1463
|
return t;
|
|
1328
|
-
}, "expandAndDeduplicateDirections"),
|
|
1329
|
-
const i =
|
|
1464
|
+
}, "expandAndDeduplicateDirections"), ls = /* @__PURE__ */ g((e, t, a) => {
|
|
1465
|
+
const i = ns(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, o = a.padding / 2;
|
|
1330
1466
|
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1331
1467
|
// Bottom
|
|
1332
1468
|
{ x: 0, y: 0 },
|
|
@@ -1458,123 +1594,123 @@ var dr = /* @__PURE__ */ d((e, t) => {
|
|
|
1458
1594
|
{ x: n, y: -o }
|
|
1459
1595
|
] : [{ x: 0, y: 0 }];
|
|
1460
1596
|
}, "getArrowPoints");
|
|
1461
|
-
function
|
|
1597
|
+
function ye(e, t) {
|
|
1462
1598
|
return e.intersect(t);
|
|
1463
1599
|
}
|
|
1464
|
-
|
|
1465
|
-
var
|
|
1466
|
-
function
|
|
1467
|
-
var l = e.x, s = e.y, r = l - i.x, n = s - i.y, o = Math.sqrt(t * t * n * n + a * a * r * r),
|
|
1468
|
-
i.x < l && (
|
|
1600
|
+
g(ye, "intersectNode");
|
|
1601
|
+
var cs = ye;
|
|
1602
|
+
function xe(e, t, a, i) {
|
|
1603
|
+
var l = e.x, s = e.y, r = l - i.x, n = s - i.y, o = Math.sqrt(t * t * n * n + a * a * r * r), d = Math.abs(t * a * r / o);
|
|
1604
|
+
i.x < l && (d = -d);
|
|
1469
1605
|
var h = Math.abs(t * a * n / o);
|
|
1470
|
-
return i.y < s && (h = -h), { x: l +
|
|
1606
|
+
return i.y < s && (h = -h), { x: l + d, y: s + h };
|
|
1471
1607
|
}
|
|
1472
|
-
|
|
1473
|
-
var
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1608
|
+
g(xe, "intersectEllipse");
|
|
1609
|
+
var be = xe;
|
|
1610
|
+
function we(e, t, a) {
|
|
1611
|
+
return be(e, t, t, a);
|
|
1476
1612
|
}
|
|
1477
|
-
|
|
1478
|
-
var
|
|
1479
|
-
function
|
|
1480
|
-
var l, s, r, n, o,
|
|
1481
|
-
if (l = t.y - e.y, r = e.x - t.x, o = t.x * e.y - e.x * t.y, b = l * a.x + r * a.y + o,
|
|
1482
|
-
return
|
|
1613
|
+
g(we, "intersectCircle");
|
|
1614
|
+
var os = we;
|
|
1615
|
+
function me(e, t, a, i) {
|
|
1616
|
+
var l, s, r, n, o, d, h, x, b, m, S, k, E, N, T;
|
|
1617
|
+
if (l = t.y - e.y, r = e.x - t.x, o = t.x * e.y - e.x * t.y, b = l * a.x + r * a.y + o, m = l * i.x + r * i.y + o, !(b !== 0 && m !== 0 && kt(b, m)) && (s = i.y - a.y, n = a.x - i.x, d = i.x * a.y - a.x * i.y, h = s * e.x + n * e.y + d, x = s * t.x + n * t.y + d, !(h !== 0 && x !== 0 && kt(h, x)) && (S = l * n - s * r, S !== 0)))
|
|
1618
|
+
return k = Math.abs(S / 2), E = r * d - n * o, N = E < 0 ? (E - k) / S : (E + k) / S, E = s * o - l * d, T = E < 0 ? (E - k) / S : (E + k) / S, { x: N, y: T };
|
|
1483
1619
|
}
|
|
1484
|
-
|
|
1485
|
-
function
|
|
1620
|
+
g(me, "intersectLine");
|
|
1621
|
+
function kt(e, t) {
|
|
1486
1622
|
return e * t > 0;
|
|
1487
1623
|
}
|
|
1488
|
-
|
|
1489
|
-
var
|
|
1490
|
-
function
|
|
1624
|
+
g(kt, "sameSign");
|
|
1625
|
+
var hs = me, gs = Le;
|
|
1626
|
+
function Le(e, t, a) {
|
|
1491
1627
|
var i = e.x, l = e.y, s = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
1492
|
-
typeof t.forEach == "function" ? t.forEach(function(
|
|
1493
|
-
r = Math.min(r,
|
|
1628
|
+
typeof t.forEach == "function" ? t.forEach(function(S) {
|
|
1629
|
+
r = Math.min(r, S.x), n = Math.min(n, S.y);
|
|
1494
1630
|
}) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
|
|
1495
|
-
for (var o = i - e.width / 2 - r,
|
|
1496
|
-
var
|
|
1631
|
+
for (var o = i - e.width / 2 - r, d = l - e.height / 2 - n, h = 0; h < t.length; h++) {
|
|
1632
|
+
var x = t[h], b = t[h < t.length - 1 ? h + 1 : 0], m = hs(
|
|
1497
1633
|
e,
|
|
1498
1634
|
a,
|
|
1499
|
-
{ x: o +
|
|
1500
|
-
{ x: o + b.x, y:
|
|
1635
|
+
{ x: o + x.x, y: d + x.y },
|
|
1636
|
+
{ x: o + b.x, y: d + b.y }
|
|
1501
1637
|
);
|
|
1502
|
-
|
|
1638
|
+
m && s.push(m);
|
|
1503
1639
|
}
|
|
1504
|
-
return s.length ? (s.length > 1 && s.sort(function(
|
|
1505
|
-
var
|
|
1506
|
-
return
|
|
1640
|
+
return s.length ? (s.length > 1 && s.sort(function(S, k) {
|
|
1641
|
+
var E = S.x - a.x, N = S.y - a.y, T = Math.sqrt(E * E + N * N), D = k.x - a.x, y = k.y - a.y, u = Math.sqrt(D * D + y * y);
|
|
1642
|
+
return T < u ? -1 : T === u ? 0 : 1;
|
|
1507
1643
|
}), s[0]) : e;
|
|
1508
1644
|
}
|
|
1509
|
-
|
|
1510
|
-
var
|
|
1511
|
-
var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, o,
|
|
1512
|
-
return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), o = s === 0 ? 0 : n * l / s,
|
|
1513
|
-
}, "intersectRect"),
|
|
1514
|
-
node:
|
|
1515
|
-
circle:
|
|
1516
|
-
ellipse:
|
|
1517
|
-
polygon:
|
|
1518
|
-
rect:
|
|
1519
|
-
}, F = /* @__PURE__ */
|
|
1645
|
+
g(Le, "intersectPolygon");
|
|
1646
|
+
var us = /* @__PURE__ */ g((e, t) => {
|
|
1647
|
+
var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, o, d;
|
|
1648
|
+
return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), o = s === 0 ? 0 : n * l / s, d = n) : (l < 0 && (r = -r), o = r, d = l === 0 ? 0 : r * s / l), { x: a + o, y: i + d };
|
|
1649
|
+
}, "intersectRect"), ds = us, I = {
|
|
1650
|
+
node: cs,
|
|
1651
|
+
circle: os,
|
|
1652
|
+
ellipse: be,
|
|
1653
|
+
polygon: gs,
|
|
1654
|
+
rect: ds
|
|
1655
|
+
}, F = /* @__PURE__ */ g(async (e, t, a, i) => {
|
|
1520
1656
|
const l = z();
|
|
1521
1657
|
let s;
|
|
1522
1658
|
const r = t.useHtmlLabels || Z(l.flowchart.htmlLabels);
|
|
1523
1659
|
a ? s = a : s = "node default";
|
|
1524
1660
|
const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), o = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
1525
|
-
let
|
|
1526
|
-
t.labelText === void 0 ?
|
|
1661
|
+
let d;
|
|
1662
|
+
t.labelText === void 0 ? d = "" : d = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1527
1663
|
const h = o.node();
|
|
1528
|
-
let
|
|
1529
|
-
t.labelType === "markdown" ?
|
|
1664
|
+
let x;
|
|
1665
|
+
t.labelType === "markdown" ? x = re(
|
|
1530
1666
|
o,
|
|
1531
|
-
|
|
1667
|
+
mt(Lt(d), l),
|
|
1532
1668
|
{
|
|
1533
1669
|
useHtmlLabels: r,
|
|
1534
1670
|
width: t.width || l.flowchart.wrappingWidth,
|
|
1535
1671
|
classes: "markdown-node-label"
|
|
1536
1672
|
},
|
|
1537
1673
|
l
|
|
1538
|
-
) :
|
|
1539
|
-
await
|
|
1540
|
-
|
|
1674
|
+
) : x = h.appendChild(
|
|
1675
|
+
await V(
|
|
1676
|
+
mt(Lt(d), l),
|
|
1541
1677
|
t.labelStyle,
|
|
1542
1678
|
!1,
|
|
1543
1679
|
i
|
|
1544
1680
|
)
|
|
1545
1681
|
);
|
|
1546
|
-
let b =
|
|
1547
|
-
const
|
|
1682
|
+
let b = x.getBBox();
|
|
1683
|
+
const m = t.padding / 2;
|
|
1548
1684
|
if (Z(l.flowchart.htmlLabels)) {
|
|
1549
|
-
const
|
|
1550
|
-
if (
|
|
1551
|
-
const
|
|
1685
|
+
const S = x.children[0], k = R(x), E = S.getElementsByTagName("img");
|
|
1686
|
+
if (E) {
|
|
1687
|
+
const N = d.replace(/<img[^>]*>/g, "").trim() === "";
|
|
1552
1688
|
await Promise.all(
|
|
1553
|
-
[...
|
|
1554
|
-
(
|
|
1555
|
-
function
|
|
1556
|
-
if (
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1689
|
+
[...E].map(
|
|
1690
|
+
(T) => new Promise((D) => {
|
|
1691
|
+
function y() {
|
|
1692
|
+
if (T.style.display = "flex", T.style.flexDirection = "column", N) {
|
|
1693
|
+
const u = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, w = parseInt(u, 10) * 5 + "px";
|
|
1694
|
+
T.style.minWidth = w, T.style.maxWidth = w;
|
|
1559
1695
|
} else
|
|
1560
|
-
|
|
1561
|
-
|
|
1696
|
+
T.style.width = "100%";
|
|
1697
|
+
D(T);
|
|
1562
1698
|
}
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
}),
|
|
1699
|
+
g(y, "setupImage"), setTimeout(() => {
|
|
1700
|
+
T.complete && y();
|
|
1701
|
+
}), T.addEventListener("error", y), T.addEventListener("load", y);
|
|
1566
1702
|
})
|
|
1567
1703
|
)
|
|
1568
1704
|
);
|
|
1569
1705
|
}
|
|
1570
|
-
b =
|
|
1706
|
+
b = S.getBoundingClientRect(), k.attr("width", b.width), k.attr("height", b.height);
|
|
1571
1707
|
}
|
|
1572
|
-
return r ? o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")") : o.attr("transform", "translate(0, " + -b.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: n, bbox: b, halfPadding:
|
|
1573
|
-
}, "labelHelper"),
|
|
1708
|
+
return r ? o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")") : o.attr("transform", "translate(0, " + -b.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: n, bbox: b, halfPadding: m, label: o };
|
|
1709
|
+
}, "labelHelper"), B = /* @__PURE__ */ g((e, t) => {
|
|
1574
1710
|
const a = t.node().getBBox();
|
|
1575
1711
|
e.width = a.width, e.height = a.height;
|
|
1576
1712
|
}, "updateNodeBounds");
|
|
1577
|
-
function
|
|
1713
|
+
function $(e, t, a, i) {
|
|
1578
1714
|
return e.insert("polygon", ":first-child").attr(
|
|
1579
1715
|
"points",
|
|
1580
1716
|
i.map(function(l) {
|
|
@@ -1582,8 +1718,8 @@ function G(e, t, a, i) {
|
|
|
1582
1718
|
}).join(" ")
|
|
1583
1719
|
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
|
|
1584
1720
|
}
|
|
1585
|
-
|
|
1586
|
-
var
|
|
1721
|
+
g($, "insertPolygonShape");
|
|
1722
|
+
var ps = /* @__PURE__ */ g(async (e, t) => {
|
|
1587
1723
|
t.useHtmlLabels || z().flowchart.htmlLabels || (t.centerLabel = !0);
|
|
1588
1724
|
const { shapeSvg: i, bbox: l, halfPadding: s } = await F(
|
|
1589
1725
|
e,
|
|
@@ -1591,18 +1727,18 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1591
1727
|
"node " + t.classes,
|
|
1592
1728
|
!0
|
|
1593
1729
|
);
|
|
1594
|
-
|
|
1730
|
+
L.info("Classes = ", t.classes);
|
|
1595
1731
|
const r = i.insert("rect", ":first-child");
|
|
1596
|
-
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding),
|
|
1597
|
-
return
|
|
1732
|
+
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), B(t, r), t.intersect = function(n) {
|
|
1733
|
+
return I.rect(t, n);
|
|
1598
1734
|
}, i;
|
|
1599
|
-
}, "note"),
|
|
1735
|
+
}, "note"), fs = ps, Xt = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), U = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Xt(e.classes)} ${Xt(
|
|
1600
1736
|
e.class
|
|
1601
|
-
)}`, "getClassesFromNode"),
|
|
1737
|
+
)}`, "getClassesFromNode"), Vt = /* @__PURE__ */ g(async (e, t) => {
|
|
1602
1738
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1603
1739
|
e,
|
|
1604
1740
|
t,
|
|
1605
|
-
|
|
1741
|
+
U(t, void 0),
|
|
1606
1742
|
!0
|
|
1607
1743
|
), l = i.width + t.padding, s = i.height + t.padding, r = l + s, n = [
|
|
1608
1744
|
{ x: r / 2, y: 0 },
|
|
@@ -1610,12 +1746,12 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1610
1746
|
{ x: r / 2, y: -r },
|
|
1611
1747
|
{ x: 0, y: -r / 2 }
|
|
1612
1748
|
];
|
|
1613
|
-
|
|
1614
|
-
const o =
|
|
1615
|
-
return o.attr("style", t.style),
|
|
1616
|
-
return
|
|
1749
|
+
L.info("Question main (Circle)");
|
|
1750
|
+
const o = $(a, r, r, n);
|
|
1751
|
+
return o.attr("style", t.style), B(t, o), t.intersect = function(d) {
|
|
1752
|
+
return L.warn("Intersect called"), I.polygon(t, n, d);
|
|
1617
1753
|
}, a;
|
|
1618
|
-
}, "question"),
|
|
1754
|
+
}, "question"), ys = /* @__PURE__ */ g((e, t) => {
|
|
1619
1755
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
|
|
1620
1756
|
{ x: 0, y: i / 2 },
|
|
1621
1757
|
{ x: i / 2, y: 0 },
|
|
@@ -1628,13 +1764,13 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1628
1764
|
return r.x + "," + r.y;
|
|
1629
1765
|
}).join(" ")
|
|
1630
1766
|
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
|
|
1631
|
-
return
|
|
1767
|
+
return I.circle(t, 14, r);
|
|
1632
1768
|
}, a;
|
|
1633
|
-
}, "choice"),
|
|
1769
|
+
}, "choice"), xs = /* @__PURE__ */ g(async (e, t) => {
|
|
1634
1770
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1635
1771
|
e,
|
|
1636
1772
|
t,
|
|
1637
|
-
|
|
1773
|
+
U(t, void 0),
|
|
1638
1774
|
!0
|
|
1639
1775
|
), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = [
|
|
1640
1776
|
{ x: r, y: 0 },
|
|
@@ -1643,20 +1779,20 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1643
1779
|
{ x: n - r, y: -s },
|
|
1644
1780
|
{ x: r, y: -s },
|
|
1645
1781
|
{ x: 0, y: -s / 2 }
|
|
1646
|
-
],
|
|
1647
|
-
return
|
|
1648
|
-
return
|
|
1782
|
+
], d = $(a, n, s, o);
|
|
1783
|
+
return d.attr("style", t.style), B(t, d), t.intersect = function(h) {
|
|
1784
|
+
return I.polygon(t, o, h);
|
|
1649
1785
|
}, a;
|
|
1650
|
-
}, "hexagon"),
|
|
1651
|
-
const { shapeSvg: a, bbox: i } = await F(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, o =
|
|
1652
|
-
return
|
|
1653
|
-
return
|
|
1786
|
+
}, "hexagon"), bs = /* @__PURE__ */ g(async (e, t) => {
|
|
1787
|
+
const { shapeSvg: a, bbox: i } = await F(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = ls(t.directions, i, t), d = $(a, n, s, o);
|
|
1788
|
+
return d.attr("style", t.style), B(t, d), t.intersect = function(h) {
|
|
1789
|
+
return I.polygon(t, o, h);
|
|
1654
1790
|
}, a;
|
|
1655
|
-
}, "block_arrow"),
|
|
1791
|
+
}, "block_arrow"), ws = /* @__PURE__ */ g(async (e, t) => {
|
|
1656
1792
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1657
1793
|
e,
|
|
1658
1794
|
t,
|
|
1659
|
-
|
|
1795
|
+
U(t, void 0),
|
|
1660
1796
|
!0
|
|
1661
1797
|
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1662
1798
|
{ x: -s / 2, y: 0 },
|
|
@@ -1665,69 +1801,69 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1665
1801
|
{ x: -s / 2, y: -s },
|
|
1666
1802
|
{ x: 0, y: -s / 2 }
|
|
1667
1803
|
];
|
|
1668
|
-
return
|
|
1669
|
-
return
|
|
1804
|
+
return $(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(o) {
|
|
1805
|
+
return I.polygon(t, r, o);
|
|
1670
1806
|
}, a;
|
|
1671
|
-
}, "rect_left_inv_arrow"),
|
|
1672
|
-
const { shapeSvg: a, bbox: i } = await F(e, t,
|
|
1807
|
+
}, "rect_left_inv_arrow"), ms = /* @__PURE__ */ g(async (e, t) => {
|
|
1808
|
+
const { shapeSvg: a, bbox: i } = await F(e, t, U(t), !0), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1673
1809
|
{ x: -2 * s / 6, y: 0 },
|
|
1674
1810
|
{ x: l - s / 6, y: 0 },
|
|
1675
1811
|
{ x: l + 2 * s / 6, y: -s },
|
|
1676
1812
|
{ x: s / 6, y: -s }
|
|
1677
|
-
], n =
|
|
1678
|
-
return n.attr("style", t.style),
|
|
1679
|
-
return
|
|
1813
|
+
], n = $(a, l, s, r);
|
|
1814
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
|
|
1815
|
+
return I.polygon(t, r, o);
|
|
1680
1816
|
}, a;
|
|
1681
|
-
}, "lean_right"),
|
|
1817
|
+
}, "lean_right"), Ls = /* @__PURE__ */ g(async (e, t) => {
|
|
1682
1818
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1683
1819
|
e,
|
|
1684
1820
|
t,
|
|
1685
|
-
|
|
1821
|
+
U(t, void 0),
|
|
1686
1822
|
!0
|
|
1687
1823
|
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1688
1824
|
{ x: 2 * s / 6, y: 0 },
|
|
1689
1825
|
{ x: l + s / 6, y: 0 },
|
|
1690
1826
|
{ x: l - 2 * s / 6, y: -s },
|
|
1691
1827
|
{ x: -s / 6, y: -s }
|
|
1692
|
-
], n =
|
|
1693
|
-
return n.attr("style", t.style),
|
|
1694
|
-
return
|
|
1828
|
+
], n = $(a, l, s, r);
|
|
1829
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
|
|
1830
|
+
return I.polygon(t, r, o);
|
|
1695
1831
|
}, a;
|
|
1696
|
-
}, "lean_left"),
|
|
1832
|
+
}, "lean_left"), Ss = /* @__PURE__ */ g(async (e, t) => {
|
|
1697
1833
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1698
1834
|
e,
|
|
1699
1835
|
t,
|
|
1700
|
-
|
|
1836
|
+
U(t, void 0),
|
|
1701
1837
|
!0
|
|
1702
1838
|
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1703
1839
|
{ x: -2 * s / 6, y: 0 },
|
|
1704
1840
|
{ x: l + 2 * s / 6, y: 0 },
|
|
1705
1841
|
{ x: l - s / 6, y: -s },
|
|
1706
1842
|
{ x: s / 6, y: -s }
|
|
1707
|
-
], n =
|
|
1708
|
-
return n.attr("style", t.style),
|
|
1709
|
-
return
|
|
1843
|
+
], n = $(a, l, s, r);
|
|
1844
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
|
|
1845
|
+
return I.polygon(t, r, o);
|
|
1710
1846
|
}, a;
|
|
1711
|
-
}, "trapezoid"),
|
|
1847
|
+
}, "trapezoid"), vs = /* @__PURE__ */ g(async (e, t) => {
|
|
1712
1848
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1713
1849
|
e,
|
|
1714
1850
|
t,
|
|
1715
|
-
|
|
1851
|
+
U(t, void 0),
|
|
1716
1852
|
!0
|
|
1717
1853
|
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1718
1854
|
{ x: s / 6, y: 0 },
|
|
1719
1855
|
{ x: l - s / 6, y: 0 },
|
|
1720
1856
|
{ x: l + 2 * s / 6, y: -s },
|
|
1721
1857
|
{ x: -2 * s / 6, y: -s }
|
|
1722
|
-
], n =
|
|
1723
|
-
return n.attr("style", t.style),
|
|
1724
|
-
return
|
|
1858
|
+
], n = $(a, l, s, r);
|
|
1859
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
|
|
1860
|
+
return I.polygon(t, r, o);
|
|
1725
1861
|
}, a;
|
|
1726
|
-
}, "inv_trapezoid"),
|
|
1862
|
+
}, "inv_trapezoid"), Es = /* @__PURE__ */ g(async (e, t) => {
|
|
1727
1863
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1728
1864
|
e,
|
|
1729
1865
|
t,
|
|
1730
|
-
|
|
1866
|
+
U(t, void 0),
|
|
1731
1867
|
!0
|
|
1732
1868
|
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1733
1869
|
{ x: 0, y: 0 },
|
|
@@ -1735,157 +1871,157 @@ var vr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1735
1871
|
{ x: l, y: -s / 2 },
|
|
1736
1872
|
{ x: l + s / 2, y: -s },
|
|
1737
1873
|
{ x: 0, y: -s }
|
|
1738
|
-
], n =
|
|
1739
|
-
return n.attr("style", t.style),
|
|
1740
|
-
return
|
|
1874
|
+
], n = $(a, l, s, r);
|
|
1875
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
|
|
1876
|
+
return I.polygon(t, r, o);
|
|
1741
1877
|
}, a;
|
|
1742
|
-
}, "rect_right_inv_arrow"),
|
|
1878
|
+
}, "rect_right_inv_arrow"), _s = /* @__PURE__ */ g(async (e, t) => {
|
|
1743
1879
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1744
1880
|
e,
|
|
1745
1881
|
t,
|
|
1746
|
-
|
|
1882
|
+
U(t, void 0),
|
|
1747
1883
|
!0
|
|
1748
|
-
), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, o = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n,
|
|
1749
|
-
return
|
|
1750
|
-
const
|
|
1751
|
-
if (s != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(
|
|
1752
|
-
let
|
|
1753
|
-
|
|
1884
|
+
), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, o = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, d = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
|
|
1885
|
+
return B(t, d), t.intersect = function(h) {
|
|
1886
|
+
const x = I.rect(t, h), b = x.x - t.x;
|
|
1887
|
+
if (s != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
|
|
1888
|
+
let m = r * r * (1 - b * b / (s * s));
|
|
1889
|
+
m != 0 && (m = Math.sqrt(m)), m = r - m, h.y - t.y > 0 && (m = -m), x.y += m;
|
|
1754
1890
|
}
|
|
1755
|
-
return
|
|
1891
|
+
return x;
|
|
1756
1892
|
}, a;
|
|
1757
|
-
}, "cylinder"),
|
|
1893
|
+
}, "cylinder"), ks = /* @__PURE__ */ g(async (e, t) => {
|
|
1758
1894
|
const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
|
|
1759
1895
|
e,
|
|
1760
1896
|
t,
|
|
1761
1897
|
"node " + t.classes + " " + t.class,
|
|
1762
1898
|
!0
|
|
1763
|
-
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l,
|
|
1764
|
-
if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y",
|
|
1899
|
+
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, d = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1900
|
+
if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", d).attr("width", r).attr("height", n), t.props) {
|
|
1765
1901
|
const h = new Set(Object.keys(t.props));
|
|
1766
|
-
t.props.borders && (
|
|
1767
|
-
|
|
1902
|
+
t.props.borders && (pt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((x) => {
|
|
1903
|
+
L.warn(`Unknown node property ${x}`);
|
|
1768
1904
|
});
|
|
1769
1905
|
}
|
|
1770
|
-
return
|
|
1771
|
-
return
|
|
1906
|
+
return B(t, s), t.intersect = function(h) {
|
|
1907
|
+
return I.rect(t, h);
|
|
1772
1908
|
}, a;
|
|
1773
|
-
}, "rect"),
|
|
1909
|
+
}, "rect"), Ts = /* @__PURE__ */ g(async (e, t) => {
|
|
1774
1910
|
const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
|
|
1775
1911
|
e,
|
|
1776
1912
|
t,
|
|
1777
1913
|
"node " + t.classes,
|
|
1778
1914
|
!0
|
|
1779
|
-
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l,
|
|
1780
|
-
if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y",
|
|
1915
|
+
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, d = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1916
|
+
if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", d).attr("width", r).attr("height", n), t.props) {
|
|
1781
1917
|
const h = new Set(Object.keys(t.props));
|
|
1782
|
-
t.props.borders && (
|
|
1783
|
-
|
|
1918
|
+
t.props.borders && (pt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((x) => {
|
|
1919
|
+
L.warn(`Unknown node property ${x}`);
|
|
1784
1920
|
});
|
|
1785
1921
|
}
|
|
1786
|
-
return
|
|
1787
|
-
return
|
|
1922
|
+
return B(t, s), t.intersect = function(h) {
|
|
1923
|
+
return I.rect(t, h);
|
|
1788
1924
|
}, a;
|
|
1789
|
-
}, "composite"),
|
|
1925
|
+
}, "composite"), Ds = /* @__PURE__ */ g(async (e, t) => {
|
|
1790
1926
|
const { shapeSvg: a } = await F(e, t, "label", !0);
|
|
1791
|
-
|
|
1927
|
+
L.trace("Classes = ", t.class);
|
|
1792
1928
|
const i = a.insert("rect", ":first-child"), l = 0, s = 0;
|
|
1793
1929
|
if (i.attr("width", l).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
|
|
1794
1930
|
const r = new Set(Object.keys(t.props));
|
|
1795
|
-
t.props.borders && (
|
|
1796
|
-
|
|
1931
|
+
t.props.borders && (pt(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
|
|
1932
|
+
L.warn(`Unknown node property ${n}`);
|
|
1797
1933
|
});
|
|
1798
1934
|
}
|
|
1799
|
-
return
|
|
1800
|
-
return
|
|
1935
|
+
return B(t, i), t.intersect = function(r) {
|
|
1936
|
+
return I.rect(t, r);
|
|
1801
1937
|
}, a;
|
|
1802
1938
|
}, "labelRect");
|
|
1803
|
-
function
|
|
1804
|
-
const l = [], s = /* @__PURE__ */
|
|
1939
|
+
function pt(e, t, a, i) {
|
|
1940
|
+
const l = [], s = /* @__PURE__ */ g((n) => {
|
|
1805
1941
|
l.push(n, 0);
|
|
1806
|
-
}, "addBorder"), r = /* @__PURE__ */
|
|
1942
|
+
}, "addBorder"), r = /* @__PURE__ */ g((n) => {
|
|
1807
1943
|
l.push(0, n);
|
|
1808
1944
|
}, "skipBorder");
|
|
1809
|
-
t.includes("t") ? (
|
|
1945
|
+
t.includes("t") ? (L.debug("add top border"), s(a)) : r(a), t.includes("r") ? (L.debug("add right border"), s(i)) : r(i), t.includes("b") ? (L.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (L.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
|
|
1810
1946
|
}
|
|
1811
|
-
|
|
1812
|
-
var
|
|
1947
|
+
g(pt, "applyNodePropertyBorders");
|
|
1948
|
+
var Ns = /* @__PURE__ */ g(async (e, t) => {
|
|
1813
1949
|
let a;
|
|
1814
1950
|
t.classes ? a = "node " + t.classes : a = "node default";
|
|
1815
1951
|
const i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), s = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
1816
1952
|
let o = "";
|
|
1817
|
-
typeof n == "object" ? o = n[0] : o = n,
|
|
1818
|
-
const
|
|
1953
|
+
typeof n == "object" ? o = n[0] : o = n, L.info("Label text abc79", o, n, typeof n == "object");
|
|
1954
|
+
const d = r.node().appendChild(await V(o, t.labelStyle, !0, !0));
|
|
1819
1955
|
let h = { width: 0, height: 0 };
|
|
1820
1956
|
if (Z(z().flowchart.htmlLabels)) {
|
|
1821
|
-
const
|
|
1822
|
-
h =
|
|
1957
|
+
const k = d.children[0], E = R(d);
|
|
1958
|
+
h = k.getBoundingClientRect(), E.attr("width", h.width), E.attr("height", h.height);
|
|
1823
1959
|
}
|
|
1824
|
-
|
|
1825
|
-
const
|
|
1826
|
-
let b =
|
|
1827
|
-
const
|
|
1828
|
-
await
|
|
1829
|
-
|
|
1960
|
+
L.info("Text 2", n);
|
|
1961
|
+
const x = n.slice(1, n.length);
|
|
1962
|
+
let b = d.getBBox();
|
|
1963
|
+
const m = r.node().appendChild(
|
|
1964
|
+
await V(
|
|
1965
|
+
x.join ? x.join("<br/>") : x,
|
|
1830
1966
|
t.labelStyle,
|
|
1831
1967
|
!0,
|
|
1832
1968
|
!0
|
|
1833
1969
|
)
|
|
1834
1970
|
);
|
|
1835
1971
|
if (Z(z().flowchart.htmlLabels)) {
|
|
1836
|
-
const
|
|
1837
|
-
h =
|
|
1972
|
+
const k = m.children[0], E = R(m);
|
|
1973
|
+
h = k.getBoundingClientRect(), E.attr("width", h.width), E.attr("height", h.height);
|
|
1838
1974
|
}
|
|
1839
|
-
const
|
|
1840
|
-
return R(
|
|
1975
|
+
const S = t.padding / 2;
|
|
1976
|
+
return R(m).attr(
|
|
1841
1977
|
"transform",
|
|
1842
1978
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1843
|
-
(h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height +
|
|
1844
|
-
), R(
|
|
1979
|
+
(h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + S + 5) + ")"
|
|
1980
|
+
), R(d).attr(
|
|
1845
1981
|
"transform",
|
|
1846
1982
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1847
1983
|
(h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
|
|
1848
1984
|
), h = r.node().getBBox(), r.attr(
|
|
1849
1985
|
"transform",
|
|
1850
|
-
"translate(" + -h.width / 2 + ", " + (-h.height / 2 -
|
|
1851
|
-
), l.attr("class", "outer title-state").attr("x", -h.width / 2 -
|
|
1852
|
-
return
|
|
1986
|
+
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - S + 3) + ")"
|
|
1987
|
+
), l.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + b.height + S).attr("y2", -h.height / 2 - S + b.height + S), B(t, l), t.intersect = function(k) {
|
|
1988
|
+
return I.rect(t, k);
|
|
1853
1989
|
}, i;
|
|
1854
|
-
}, "rectWithTitle"),
|
|
1990
|
+
}, "rectWithTitle"), Cs = /* @__PURE__ */ g(async (e, t) => {
|
|
1855
1991
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1856
1992
|
e,
|
|
1857
1993
|
t,
|
|
1858
|
-
|
|
1994
|
+
U(t, void 0),
|
|
1859
1995
|
!0
|
|
1860
1996
|
), l = i.height + t.padding, s = i.width + l / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -s / 2).attr("y", -l / 2).attr("width", s).attr("height", l);
|
|
1861
|
-
return
|
|
1862
|
-
return
|
|
1997
|
+
return B(t, r), t.intersect = function(n) {
|
|
1998
|
+
return I.rect(t, n);
|
|
1863
1999
|
}, a;
|
|
1864
|
-
}, "stadium"),
|
|
2000
|
+
}, "stadium"), Is = /* @__PURE__ */ g(async (e, t) => {
|
|
1865
2001
|
const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
|
|
1866
2002
|
e,
|
|
1867
2003
|
t,
|
|
1868
|
-
|
|
2004
|
+
U(t, void 0),
|
|
1869
2005
|
!0
|
|
1870
2006
|
), s = a.insert("circle", ":first-child");
|
|
1871
|
-
return s.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),
|
|
1872
|
-
return
|
|
2007
|
+
return s.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), L.info("Circle main"), B(t, s), t.intersect = function(r) {
|
|
2008
|
+
return L.info("Circle intersect", t, i.width / 2 + l, r), I.circle(t, i.width / 2 + l, r);
|
|
1873
2009
|
}, a;
|
|
1874
|
-
}, "circle"),
|
|
2010
|
+
}, "circle"), Bs = /* @__PURE__ */ g(async (e, t) => {
|
|
1875
2011
|
const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
|
|
1876
2012
|
e,
|
|
1877
2013
|
t,
|
|
1878
|
-
|
|
2014
|
+
U(t, void 0),
|
|
1879
2015
|
!0
|
|
1880
2016
|
), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), o = r.insert("circle");
|
|
1881
|
-
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), o.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),
|
|
1882
|
-
return
|
|
2017
|
+
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), o.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), L.info("DoubleCircle main"), B(t, n), t.intersect = function(d) {
|
|
2018
|
+
return L.info("DoubleCircle intersect", t, i.width / 2 + l + s, d), I.circle(t, i.width / 2 + l + s, d);
|
|
1883
2019
|
}, a;
|
|
1884
|
-
}, "doublecircle"),
|
|
2020
|
+
}, "doublecircle"), Os = /* @__PURE__ */ g(async (e, t) => {
|
|
1885
2021
|
const { shapeSvg: a, bbox: i } = await F(
|
|
1886
2022
|
e,
|
|
1887
2023
|
t,
|
|
1888
|
-
|
|
2024
|
+
U(t, void 0),
|
|
1889
2025
|
!0
|
|
1890
2026
|
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1891
2027
|
{ x: 0, y: 0 },
|
|
@@ -1898,159 +2034,159 @@ var Fr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1898
2034
|
{ x: l + 8, y: -s },
|
|
1899
2035
|
{ x: -8, y: -s },
|
|
1900
2036
|
{ x: -8, y: 0 }
|
|
1901
|
-
], n =
|
|
1902
|
-
return n.attr("style", t.style),
|
|
1903
|
-
return
|
|
2037
|
+
], n = $(a, l, s, r);
|
|
2038
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
|
|
2039
|
+
return I.polygon(t, r, o);
|
|
1904
2040
|
}, a;
|
|
1905
|
-
}, "subroutine"),
|
|
2041
|
+
}, "subroutine"), As = /* @__PURE__ */ g((e, t) => {
|
|
1906
2042
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
|
|
1907
|
-
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14),
|
|
1908
|
-
return
|
|
2043
|
+
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), B(t, i), t.intersect = function(l) {
|
|
2044
|
+
return I.circle(t, 7, l);
|
|
1909
2045
|
}, a;
|
|
1910
|
-
}, "start"),
|
|
2046
|
+
}, "start"), Gt = /* @__PURE__ */ g((e, t, a) => {
|
|
1911
2047
|
const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
1912
2048
|
let l = 70, s = 10;
|
|
1913
2049
|
a === "LR" && (l = 10, s = 70);
|
|
1914
2050
|
const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * s / 2).attr("width", l).attr("height", s).attr("class", "fork-join");
|
|
1915
|
-
return
|
|
1916
|
-
return
|
|
2051
|
+
return B(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
|
|
2052
|
+
return I.rect(t, n);
|
|
1917
2053
|
}, i;
|
|
1918
|
-
}, "forkJoin"),
|
|
2054
|
+
}, "forkJoin"), Rs = /* @__PURE__ */ g((e, t) => {
|
|
1919
2055
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
|
|
1920
|
-
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),
|
|
1921
|
-
return
|
|
2056
|
+
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), B(t, l), t.intersect = function(s) {
|
|
2057
|
+
return I.circle(t, 7, s);
|
|
1922
2058
|
}, a;
|
|
1923
|
-
}, "end"),
|
|
1924
|
-
var
|
|
2059
|
+
}, "end"), zs = /* @__PURE__ */ g(async (e, t) => {
|
|
2060
|
+
var v;
|
|
1925
2061
|
const a = t.padding / 2, i = 4, l = 8;
|
|
1926
2062
|
let s;
|
|
1927
2063
|
t.classes ? s = "node " + t.classes : s = "node default";
|
|
1928
|
-
const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), o = r.insert("line"),
|
|
1929
|
-
let h = 0,
|
|
2064
|
+
const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), o = r.insert("line"), d = r.insert("line");
|
|
2065
|
+
let h = 0, x = i;
|
|
1930
2066
|
const b = r.insert("g").attr("class", "label");
|
|
1931
|
-
let
|
|
1932
|
-
const
|
|
1933
|
-
let
|
|
2067
|
+
let m = 0;
|
|
2068
|
+
const S = (v = t.classData.annotations) == null ? void 0 : v[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", E = b.node().appendChild(await V(k, t.labelStyle, !0, !0));
|
|
2069
|
+
let N = E.getBBox();
|
|
1934
2070
|
if (Z(z().flowchart.htmlLabels)) {
|
|
1935
|
-
const c =
|
|
1936
|
-
|
|
2071
|
+
const c = E.children[0], _ = R(E);
|
|
2072
|
+
N = c.getBoundingClientRect(), _.attr("width", N.width), _.attr("height", N.height);
|
|
1937
2073
|
}
|
|
1938
|
-
t.classData.annotations[0] && (
|
|
1939
|
-
let
|
|
1940
|
-
t.classData.type !== void 0 && t.classData.type !== "" && (z().flowchart.htmlLabels ?
|
|
1941
|
-
const
|
|
1942
|
-
R(
|
|
1943
|
-
let
|
|
2074
|
+
t.classData.annotations[0] && (x += N.height + i, h += N.width);
|
|
2075
|
+
let T = t.classData.label;
|
|
2076
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (z().flowchart.htmlLabels ? T += "<" + t.classData.type + ">" : T += "<" + t.classData.type + ">");
|
|
2077
|
+
const D = b.node().appendChild(await V(T, t.labelStyle, !0, !0));
|
|
2078
|
+
R(D).attr("class", "classTitle");
|
|
2079
|
+
let y = D.getBBox();
|
|
1944
2080
|
if (Z(z().flowchart.htmlLabels)) {
|
|
1945
|
-
const c =
|
|
1946
|
-
|
|
2081
|
+
const c = D.children[0], _ = R(D);
|
|
2082
|
+
y = c.getBoundingClientRect(), _.attr("width", y.width), _.attr("height", y.height);
|
|
1947
2083
|
}
|
|
1948
|
-
|
|
1949
|
-
const
|
|
2084
|
+
x += y.height + i, y.width > h && (h = y.width);
|
|
2085
|
+
const u = [];
|
|
1950
2086
|
t.classData.members.forEach(async (c) => {
|
|
1951
2087
|
const _ = c.getDisplayDetails();
|
|
1952
2088
|
let f = _.displayText;
|
|
1953
2089
|
z().flowchart.htmlLabels && (f = f.replace(/</g, "<").replace(/>/g, ">"));
|
|
1954
|
-
const
|
|
1955
|
-
await
|
|
2090
|
+
const M = b.node().appendChild(
|
|
2091
|
+
await V(
|
|
1956
2092
|
f,
|
|
1957
2093
|
_.cssStyle ? _.cssStyle : t.labelStyle,
|
|
1958
2094
|
!0,
|
|
1959
2095
|
!0
|
|
1960
2096
|
)
|
|
1961
2097
|
);
|
|
1962
|
-
let
|
|
2098
|
+
let A = M.getBBox();
|
|
1963
2099
|
if (Z(z().flowchart.htmlLabels)) {
|
|
1964
|
-
const
|
|
1965
|
-
|
|
2100
|
+
const H = M.children[0], W = R(M);
|
|
2101
|
+
A = H.getBoundingClientRect(), W.attr("width", A.width), W.attr("height", A.height);
|
|
1966
2102
|
}
|
|
1967
|
-
|
|
1968
|
-
}),
|
|
2103
|
+
A.width > h && (h = A.width), x += A.height + i, u.push(M);
|
|
2104
|
+
}), x += l;
|
|
1969
2105
|
const p = [];
|
|
1970
2106
|
if (t.classData.methods.forEach(async (c) => {
|
|
1971
2107
|
const _ = c.getDisplayDetails();
|
|
1972
2108
|
let f = _.displayText;
|
|
1973
2109
|
z().flowchart.htmlLabels && (f = f.replace(/</g, "<").replace(/>/g, ">"));
|
|
1974
|
-
const
|
|
1975
|
-
await
|
|
2110
|
+
const M = b.node().appendChild(
|
|
2111
|
+
await V(
|
|
1976
2112
|
f,
|
|
1977
2113
|
_.cssStyle ? _.cssStyle : t.labelStyle,
|
|
1978
2114
|
!0,
|
|
1979
2115
|
!0
|
|
1980
2116
|
)
|
|
1981
2117
|
);
|
|
1982
|
-
let
|
|
2118
|
+
let A = M.getBBox();
|
|
1983
2119
|
if (Z(z().flowchart.htmlLabels)) {
|
|
1984
|
-
const
|
|
1985
|
-
|
|
2120
|
+
const H = M.children[0], W = R(M);
|
|
2121
|
+
A = H.getBoundingClientRect(), W.attr("width", A.width), W.attr("height", A.height);
|
|
1986
2122
|
}
|
|
1987
|
-
|
|
1988
|
-
}),
|
|
1989
|
-
let c = (h -
|
|
1990
|
-
R(
|
|
2123
|
+
A.width > h && (h = A.width), x += A.height + i, p.push(M);
|
|
2124
|
+
}), x += l, S) {
|
|
2125
|
+
let c = (h - N.width) / 2;
|
|
2126
|
+
R(E).attr(
|
|
1991
2127
|
"transform",
|
|
1992
|
-
"translate( " + (-1 * h / 2 + c) + ", " + -1 *
|
|
1993
|
-
),
|
|
2128
|
+
"translate( " + (-1 * h / 2 + c) + ", " + -1 * x / 2 + ")"
|
|
2129
|
+
), m = N.height + i;
|
|
1994
2130
|
}
|
|
1995
|
-
let w = (h -
|
|
1996
|
-
return R(
|
|
2131
|
+
let w = (h - y.width) / 2;
|
|
2132
|
+
return R(D).attr(
|
|
1997
2133
|
"transform",
|
|
1998
|
-
"translate( " + (-1 * h / 2 + w) + ", " + (-1 *
|
|
1999
|
-
),
|
|
2134
|
+
"translate( " + (-1 * h / 2 + w) + ", " + (-1 * x / 2 + m) + ")"
|
|
2135
|
+
), m += y.height + i, o.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -x / 2 - a + l + m).attr("y2", -x / 2 - a + l + m), m += l, u.forEach((c) => {
|
|
2000
2136
|
R(c).attr(
|
|
2001
2137
|
"transform",
|
|
2002
|
-
"translate( " + -h / 2 + ", " + (-1 *
|
|
2138
|
+
"translate( " + -h / 2 + ", " + (-1 * x / 2 + m + l / 2) + ")"
|
|
2003
2139
|
);
|
|
2004
2140
|
const _ = c == null ? void 0 : c.getBBox();
|
|
2005
|
-
|
|
2006
|
-
}),
|
|
2141
|
+
m += ((_ == null ? void 0 : _.height) ?? 0) + i;
|
|
2142
|
+
}), m += l, d.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -x / 2 - a + l + m).attr("y2", -x / 2 - a + l + m), m += l, p.forEach((c) => {
|
|
2007
2143
|
R(c).attr(
|
|
2008
2144
|
"transform",
|
|
2009
|
-
"translate( " + -h / 2 + ", " + (-1 *
|
|
2145
|
+
"translate( " + -h / 2 + ", " + (-1 * x / 2 + m) + ")"
|
|
2010
2146
|
);
|
|
2011
2147
|
const _ = c == null ? void 0 : c.getBBox();
|
|
2012
|
-
|
|
2013
|
-
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(
|
|
2014
|
-
return
|
|
2148
|
+
m += ((_ == null ? void 0 : _.height) ?? 0) + i;
|
|
2149
|
+
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(x / 2) - a).attr("width", h + t.padding).attr("height", x + t.padding), B(t, n), t.intersect = function(c) {
|
|
2150
|
+
return I.rect(t, c);
|
|
2015
2151
|
}, r;
|
|
2016
|
-
}, "class_box"),
|
|
2017
|
-
rhombus:
|
|
2018
|
-
composite:
|
|
2019
|
-
question:
|
|
2020
|
-
rect:
|
|
2021
|
-
labelRect:
|
|
2022
|
-
rectWithTitle:
|
|
2023
|
-
choice:
|
|
2024
|
-
circle:
|
|
2025
|
-
doublecircle:
|
|
2026
|
-
stadium:
|
|
2027
|
-
hexagon:
|
|
2028
|
-
block_arrow:
|
|
2029
|
-
rect_left_inv_arrow:
|
|
2030
|
-
lean_right:
|
|
2031
|
-
lean_left:
|
|
2032
|
-
trapezoid:
|
|
2033
|
-
inv_trapezoid:
|
|
2034
|
-
rect_right_inv_arrow:
|
|
2035
|
-
cylinder:
|
|
2036
|
-
start:
|
|
2037
|
-
end:
|
|
2038
|
-
note:
|
|
2039
|
-
subroutine:
|
|
2040
|
-
fork:
|
|
2041
|
-
join:
|
|
2042
|
-
class_box:
|
|
2043
|
-
},
|
|
2152
|
+
}, "class_box"), $t = {
|
|
2153
|
+
rhombus: Vt,
|
|
2154
|
+
composite: Ts,
|
|
2155
|
+
question: Vt,
|
|
2156
|
+
rect: ks,
|
|
2157
|
+
labelRect: Ds,
|
|
2158
|
+
rectWithTitle: Ns,
|
|
2159
|
+
choice: ys,
|
|
2160
|
+
circle: Is,
|
|
2161
|
+
doublecircle: Bs,
|
|
2162
|
+
stadium: Cs,
|
|
2163
|
+
hexagon: xs,
|
|
2164
|
+
block_arrow: bs,
|
|
2165
|
+
rect_left_inv_arrow: ws,
|
|
2166
|
+
lean_right: ms,
|
|
2167
|
+
lean_left: Ls,
|
|
2168
|
+
trapezoid: Ss,
|
|
2169
|
+
inv_trapezoid: vs,
|
|
2170
|
+
rect_right_inv_arrow: Es,
|
|
2171
|
+
cylinder: _s,
|
|
2172
|
+
start: As,
|
|
2173
|
+
end: Rs,
|
|
2174
|
+
note: fs,
|
|
2175
|
+
subroutine: Os,
|
|
2176
|
+
fork: Gt,
|
|
2177
|
+
join: Gt,
|
|
2178
|
+
class_box: zs
|
|
2179
|
+
}, ht = {}, Se = /* @__PURE__ */ g(async (e, t, a) => {
|
|
2044
2180
|
let i, l;
|
|
2045
2181
|
if (t.link) {
|
|
2046
2182
|
let s;
|
|
2047
|
-
z().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await
|
|
2183
|
+
z().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await $t[t.shape](i, t, a);
|
|
2048
2184
|
} else
|
|
2049
|
-
l = await
|
|
2050
|
-
return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class),
|
|
2051
|
-
}, "insertNode"),
|
|
2052
|
-
const t =
|
|
2053
|
-
|
|
2185
|
+
l = await $t[t.shape](e, t, a), i = l;
|
|
2186
|
+
return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), ht[t.id] = i, t.haveCallback && ht[t.id].attr("class", ht[t.id].attr("class") + " clickable"), i;
|
|
2187
|
+
}, "insertNode"), Ms = /* @__PURE__ */ g((e) => {
|
|
2188
|
+
const t = ht[e.id];
|
|
2189
|
+
L.trace(
|
|
2054
2190
|
"Transforming node",
|
|
2055
2191
|
e.diff,
|
|
2056
2192
|
e,
|
|
@@ -2062,8 +2198,8 @@ var Fr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
2062
2198
|
"translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
|
|
2063
2199
|
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
|
|
2064
2200
|
}, "positionNode");
|
|
2065
|
-
function
|
|
2066
|
-
var b,
|
|
2201
|
+
function Bt(e, t, a = !1) {
|
|
2202
|
+
var b, m, S;
|
|
2067
2203
|
const i = e;
|
|
2068
2204
|
let l = "default";
|
|
2069
2205
|
(((b = i == null ? void 0 : i.classes) == null ? void 0 : b.length) || 0) > 0 && (l = ((i == null ? void 0 : i.classes) ?? []).join(" ")), l = l + " flowchart-label";
|
|
@@ -2129,11 +2265,11 @@ function Nt(e, t, a = !1) {
|
|
|
2129
2265
|
default:
|
|
2130
2266
|
r = "rect";
|
|
2131
2267
|
}
|
|
2132
|
-
const o =
|
|
2268
|
+
const o = Ke((i == null ? void 0 : i.styles) ?? []), d = i.label, h = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
2133
2269
|
return {
|
|
2134
2270
|
labelStyle: o.labelStyle,
|
|
2135
2271
|
shape: r,
|
|
2136
|
-
labelText:
|
|
2272
|
+
labelText: d,
|
|
2137
2273
|
rx: s,
|
|
2138
2274
|
ry: s,
|
|
2139
2275
|
class: l,
|
|
@@ -2147,41 +2283,41 @@ function Nt(e, t, a = !1) {
|
|
|
2147
2283
|
positioned: a,
|
|
2148
2284
|
intersect: void 0,
|
|
2149
2285
|
type: i.type,
|
|
2150
|
-
padding: n ?? ((
|
|
2286
|
+
padding: n ?? ((S = (m = it()) == null ? void 0 : m.block) == null ? void 0 : S.padding) ?? 0
|
|
2151
2287
|
};
|
|
2152
2288
|
}
|
|
2153
|
-
|
|
2154
|
-
async function
|
|
2155
|
-
const i =
|
|
2289
|
+
g(Bt, "getNodeFromBlock");
|
|
2290
|
+
async function ve(e, t, a) {
|
|
2291
|
+
const i = Bt(t, a, !1);
|
|
2156
2292
|
if (i.type === "group")
|
|
2157
2293
|
return;
|
|
2158
|
-
const l =
|
|
2294
|
+
const l = it(), s = await Se(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
|
|
2159
2295
|
n.size = { width: r.width, height: r.height, x: 0, y: 0, node: s }, a.setBlock(n), s.remove();
|
|
2160
2296
|
}
|
|
2161
|
-
|
|
2162
|
-
async function
|
|
2163
|
-
const i =
|
|
2297
|
+
g(ve, "calculateBlockSize");
|
|
2298
|
+
async function Ee(e, t, a) {
|
|
2299
|
+
const i = Bt(t, a, !0);
|
|
2164
2300
|
if (a.getBlock(i.id).type !== "space") {
|
|
2165
|
-
const s =
|
|
2166
|
-
await
|
|
2301
|
+
const s = it();
|
|
2302
|
+
await Se(e, i, { config: s }), t.intersect = i == null ? void 0 : i.intersect, Ms(i);
|
|
2167
2303
|
}
|
|
2168
2304
|
}
|
|
2169
|
-
|
|
2170
|
-
async function
|
|
2305
|
+
g(Ee, "insertBlockPositioned");
|
|
2306
|
+
async function ft(e, t, a, i) {
|
|
2171
2307
|
for (const l of t)
|
|
2172
|
-
await i(e, l, a), l.children && await
|
|
2308
|
+
await i(e, l, a), l.children && await ft(e, l.children, a, i);
|
|
2173
2309
|
}
|
|
2174
|
-
|
|
2175
|
-
async function
|
|
2176
|
-
await
|
|
2310
|
+
g(ft, "performOperations");
|
|
2311
|
+
async function _e(e, t, a) {
|
|
2312
|
+
await ft(e, t, a, ve);
|
|
2177
2313
|
}
|
|
2178
|
-
|
|
2179
|
-
async function
|
|
2180
|
-
await
|
|
2314
|
+
g(_e, "calculateBlockSizes");
|
|
2315
|
+
async function ke(e, t, a) {
|
|
2316
|
+
await ft(e, t, a, Ee);
|
|
2181
2317
|
}
|
|
2182
|
-
|
|
2183
|
-
async function
|
|
2184
|
-
const s = new
|
|
2318
|
+
g(ke, "insertBlocks");
|
|
2319
|
+
async function Te(e, t, a, i, l) {
|
|
2320
|
+
const s = new tr({
|
|
2185
2321
|
multigraph: !0,
|
|
2186
2322
|
compound: !0
|
|
2187
2323
|
});
|
|
@@ -2202,70 +2338,70 @@ async function ce(e, t, a, i, l) {
|
|
|
2202
2338
|
if (r.start && r.end) {
|
|
2203
2339
|
const n = i.getBlock(r.start), o = i.getBlock(r.end);
|
|
2204
2340
|
if (n != null && n.size && (o != null && o.size)) {
|
|
2205
|
-
const
|
|
2206
|
-
{ x:
|
|
2207
|
-
{ x:
|
|
2341
|
+
const d = n.size, h = o.size, x = [
|
|
2342
|
+
{ x: d.x, y: d.y },
|
|
2343
|
+
{ x: d.x + (h.x - d.x) / 2, y: d.y + (h.y - d.y) / 2 },
|
|
2208
2344
|
{ x: h.x, y: h.y }
|
|
2209
2345
|
];
|
|
2210
|
-
|
|
2346
|
+
is(
|
|
2211
2347
|
e,
|
|
2212
2348
|
{ v: r.start, w: r.end, name: r.id },
|
|
2213
2349
|
{
|
|
2214
2350
|
...r,
|
|
2215
2351
|
arrowTypeEnd: r.arrowTypeEnd,
|
|
2216
2352
|
arrowTypeStart: r.arrowTypeStart,
|
|
2217
|
-
points:
|
|
2353
|
+
points: x,
|
|
2218
2354
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2219
2355
|
},
|
|
2220
2356
|
void 0,
|
|
2221
2357
|
"block",
|
|
2222
2358
|
s,
|
|
2223
2359
|
l
|
|
2224
|
-
), r.label && (await
|
|
2360
|
+
), r.label && (await es(e, {
|
|
2225
2361
|
...r,
|
|
2226
2362
|
label: r.label,
|
|
2227
2363
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
2228
2364
|
arrowTypeEnd: r.arrowTypeEnd,
|
|
2229
2365
|
arrowTypeStart: r.arrowTypeStart,
|
|
2230
|
-
points:
|
|
2366
|
+
points: x,
|
|
2231
2367
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2232
|
-
}),
|
|
2233
|
-
{ ...r, x:
|
|
2368
|
+
}), rs(
|
|
2369
|
+
{ ...r, x: x[1].x, y: x[1].y },
|
|
2234
2370
|
{
|
|
2235
|
-
originalPath:
|
|
2371
|
+
originalPath: x
|
|
2236
2372
|
}
|
|
2237
2373
|
));
|
|
2238
2374
|
}
|
|
2239
2375
|
}
|
|
2240
2376
|
}
|
|
2241
|
-
|
|
2242
|
-
var
|
|
2377
|
+
g(Te, "insertEdges");
|
|
2378
|
+
var js = /* @__PURE__ */ g(function(e, t) {
|
|
2243
2379
|
return t.db.getClasses();
|
|
2244
|
-
}, "getClasses"),
|
|
2245
|
-
const { securityLevel: l, block: s } =
|
|
2380
|
+
}, "getClasses"), Fs = /* @__PURE__ */ g(async function(e, t, a, i) {
|
|
2381
|
+
const { securityLevel: l, block: s } = it(), r = i.db;
|
|
2246
2382
|
let n;
|
|
2247
2383
|
l === "sandbox" && (n = R("#i" + t));
|
|
2248
|
-
const o = l === "sandbox" ? R(n.nodes()[0].contentDocument.body) : R("body"),
|
|
2249
|
-
|
|
2250
|
-
const
|
|
2251
|
-
await
|
|
2252
|
-
const
|
|
2253
|
-
if (await
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2384
|
+
const o = l === "sandbox" ? R(n.nodes()[0].contentDocument.body) : R("body"), d = l === "sandbox" ? o.select(`[id="${t}"]`) : R(`[id="${t}"]`);
|
|
2385
|
+
Za(d, ["point", "circle", "cross"], i.type, t);
|
|
2386
|
+
const x = r.getBlocks(), b = r.getBlocksFlat(), m = r.getEdges(), S = d.insert("g").attr("class", "block");
|
|
2387
|
+
await _e(S, x, r);
|
|
2388
|
+
const k = pe(r);
|
|
2389
|
+
if (await ke(S, x, r), await Te(S, m, b, r, t), k) {
|
|
2390
|
+
const E = k, N = Math.max(1, Math.round(0.125 * (E.width / E.height))), T = E.height + N + 10, D = E.width + 10, { useMaxWidth: y } = s;
|
|
2391
|
+
Ge(d, T, D, !!y), L.debug("Here Bounds", k, E), d.attr(
|
|
2256
2392
|
"viewBox",
|
|
2257
|
-
`${
|
|
2393
|
+
`${E.x - 5} ${E.y - 5} ${E.width + 10} ${E.height + 10}`
|
|
2258
2394
|
);
|
|
2259
2395
|
}
|
|
2260
|
-
}, "draw"),
|
|
2261
|
-
draw:
|
|
2262
|
-
getClasses:
|
|
2263
|
-
},
|
|
2264
|
-
parser:
|
|
2265
|
-
db:
|
|
2266
|
-
renderer:
|
|
2267
|
-
styles:
|
|
2396
|
+
}, "draw"), Ps = {
|
|
2397
|
+
draw: Fs,
|
|
2398
|
+
getClasses: js
|
|
2399
|
+
}, Gs = {
|
|
2400
|
+
parser: xa,
|
|
2401
|
+
db: za,
|
|
2402
|
+
renderer: Ps,
|
|
2403
|
+
styles: ja
|
|
2268
2404
|
};
|
|
2269
2405
|
export {
|
|
2270
|
-
|
|
2406
|
+
Gs as diagram
|
|
2271
2407
|
};
|