@layers-app/editor 0.0.21 → 0.0.23
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/README.md +47 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +195 -2
- package/dist/index.js +2 -2
- package/dist/layers.-RxAm5pH.js +795 -0
- package/dist/layers.-rS-aTo2.js +33 -0
- package/dist/layers.2ODaB2Pd.js +8 -0
- package/dist/layers.5BbX0Xoz.js +769 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.9QK1wiQj.js +1 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.B-6oGNjd.js +40 -0
- package/dist/layers.B-ie1_cm.js +6 -0
- package/dist/layers.B0EkntbT.js +32 -0
- package/dist/layers.B0pdr1hX.js +1619 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B39TZ2WV.js +11 -0
- package/dist/layers.B3odqoHb.js +9 -0
- package/dist/layers.B64g6Zx2.js +1 -0
- package/dist/layers.B6UkAKu5.js +434 -0
- package/dist/layers.B8i9d7Qz.js +192 -0
- package/dist/layers.B9NSFeaj.js +35 -0
- package/dist/layers.B9zrmkst.js +11 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BBB7YGK1.js +3 -0
- package/dist/layers.BBU3ik5q.js +51 -0
- package/dist/layers.BBwDvE6l.js +9122 -0
- package/dist/layers.BCFHxkpM.js +6 -0
- package/dist/layers.BD5uUnI2.js +1265 -0
- package/dist/layers.BDhuxbhX.js +44 -0
- package/dist/layers.BDxQSquK.js +10 -0
- package/dist/layers.BEE5yqs5.js +9 -0
- package/dist/layers.BFLg4UGe.js +8 -0
- package/dist/layers.BFOl7cA-.js +41 -0
- package/dist/layers.BHDiP2sq.js +21836 -0
- package/dist/layers.BIDnkNut.js +1510 -0
- package/dist/layers.BIVmclKv.js +41 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BJMMuP5r.js +9 -0
- package/dist/layers.BK01wvsE.js +10 -0
- package/dist/layers.BLB-feoT.js +8 -0
- package/dist/layers.BLSqqbWP.js +207 -0
- package/dist/layers.BO3dqWyO.js +10 -0
- package/dist/layers.BPe9NQzP.js +2963 -0
- package/dist/layers.BPnpanwd.js +39 -0
- package/dist/layers.BQLZhz6B.js +6 -0
- package/dist/layers.BST6tR9a.js +4 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BUSnd1Ro.js +5 -0
- package/dist/layers.BUkDq4ln.js +84 -0
- package/dist/layers.BUsBCyiL.js +202 -0
- package/dist/layers.BXGiOI1Z.js +7 -0
- package/dist/layers.BYVHkqLR.js +39 -0
- package/dist/layers.BYzN4Zxz.js +7 -0
- package/dist/layers.BZcZF6Ct.js +41 -0
- package/dist/layers.B_Hf0SF-.js +1359 -0
- package/dist/{layers.BYmCD0mp.js → layers.Ba97nTEK.js} +1 -1
- package/dist/layers.Bbl6qitU.js +40 -0
- package/dist/layers.BdanmQPF.js +11 -0
- package/dist/layers.Bfd5bOAD.js +37 -0
- package/dist/layers.BhM2iCwB.js +5 -0
- package/dist/layers.BjZInKjA.js +2 -0
- package/dist/layers.Bk2PdkMX.js +10 -0
- package/dist/layers.BkMfeJ9R.js +41 -0
- package/dist/layers.BkjjkAwW.js +2 -0
- package/dist/layers.Blho0qwc.js +1 -0
- package/dist/layers.BoabOlrX.js +36 -0
- package/dist/layers.BpXiFzvR.js +36 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.BuQ1nJmP.js +1 -0
- package/dist/layers.Bv0tGvGl.js +40 -0
- package/dist/layers.BvZFIFgz.js +9 -0
- package/dist/layers.BwfB_nzW.js +8 -0
- package/dist/layers.Bwpn7zKE.js +9 -0
- package/dist/layers.Bz0ApNUe.js +70 -0
- package/dist/layers.C-G7-Jg3.js +7 -0
- package/dist/layers.C0bumYdC.js +7 -0
- package/dist/layers.C1KhBpGU.js +7 -0
- package/dist/layers.C3K_Whht.js +42 -0
- package/dist/layers.C51kZnWr.js +37 -0
- package/dist/layers.C5rttXXy.js +10 -0
- package/dist/{layers.CKC0lJDn.js → layers.C5uR7AiN.js} +1 -1
- package/dist/layers.C6Rn8zoI.js +42 -0
- package/dist/layers.C7lIplJU.js +247 -0
- package/dist/layers.CBXpUMze.js +96 -0
- package/dist/layers.CCRe_IA7.js +36 -0
- package/dist/{layers.CFJiIrku.js → layers.CClfR9Rs.js} +14180 -12682
- package/dist/layers.CDLdte-o.js +9 -0
- package/dist/layers.CDzPpnhN.js +52 -0
- package/dist/layers.CEXVJbhn.js +8 -0
- package/dist/layers.CGX7Piy7.js +1 -0
- package/dist/layers.CGc04km7.js +42 -0
- package/dist/layers.CH23k4XD.js +6 -0
- package/dist/layers.CHHqQlm1.js +9 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CMS1o_sE.js +40 -0
- package/dist/layers.CO4NHmK3.js +40 -0
- package/dist/layers.COAF7f8g.js +1 -0
- package/dist/layers.CPV5PaJ7.js +33 -0
- package/dist/layers.CPqqkX8Z.js +23 -0
- package/dist/layers.CQXDzk5h.js +1 -0
- package/dist/layers.CQv0GMRl.js +1 -0
- package/dist/layers.CR10RAJi.js +116 -0
- package/dist/layers.CR4riLSc.js +2235 -0
- package/dist/layers.CSjWzlk9.js +1 -0
- package/dist/layers.CTmkjIN6.js +5 -0
- package/dist/layers.CZMy0ug4.js +6 -0
- package/dist/layers.CZh7NZyl.js +42 -0
- package/dist/layers.C_dOgKfE.js +10 -0
- package/dist/layers.CcJ28sUd.js +9 -0
- package/dist/layers.CeMe5scF.js +1 -0
- package/dist/layers.CeVpKhli.js +122 -0
- package/dist/layers.Ch7C0MR9.js +39 -0
- package/dist/layers.ChAMqLmE.js +160 -0
- package/dist/layers.ChJyurjQ.js +7 -0
- package/dist/layers.ChPHYv68.js +41 -0
- package/dist/layers.ChykDTOy.js +11 -0
- package/dist/layers.Ci0QS82_.js +1 -0
- package/dist/layers.Ci0x4aAi.js +139 -0
- package/dist/layers.CiNAQOA-.js +50 -0
- package/dist/layers.Ck0iJfoW.js +39 -0
- package/dist/layers.Ckbp-T9r.js +32 -0
- package/dist/layers.Cl9Tl2nd.js +1 -0
- package/dist/layers.ClQj75nc.js +11 -0
- package/dist/layers.ClaqpFnu.js +233 -0
- package/dist/layers.CmHSmrZm.js +40 -0
- package/dist/layers.Cn6OfRlw.js +40 -0
- package/dist/layers.CnD3z0eZ.js +8 -0
- package/dist/layers.CnloMtKN.js +268 -0
- package/dist/layers.Cp82yltX.js +32 -0
- package/dist/layers.CphCG076.js +6 -0
- package/dist/layers.CqM3rL4-.js +5 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.CvJxfPxo.js +9 -0
- package/dist/layers.CwPFdFUT.js +34 -0
- package/dist/layers.Cx14IKzN.js +4 -0
- package/dist/layers.Cxmncz59.js +32 -0
- package/dist/layers.D-ZYFolm.js +1 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D18RSmmQ.js +7 -0
- package/dist/layers.D1cZq8tq.js +373 -0
- package/dist/layers.D2q8ZYi2.js +425 -0
- package/dist/layers.D2vOkfMK.js +38 -0
- package/dist/layers.D3Hkinja.js +5 -0
- package/dist/layers.D4fGb2cV.js +1272 -0
- package/dist/layers.D68FZk66.js +39 -0
- package/dist/layers.D7HvMBb6.js +39 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D90-hSDT.js +4 -0
- package/dist/layers.D9A031XO.js +803 -0
- package/dist/layers.DARK07JA.js +42 -0
- package/dist/layers.DAx0hT2g.js +32 -0
- package/dist/layers.DCvUAfE1.js +40 -0
- package/dist/layers.DDRgaMwu.js +10 -0
- package/dist/layers.DEfJs03Z.js +1 -0
- package/dist/layers.DElpVOY-.js +8 -0
- package/dist/layers.DFd9A85i.js +14 -0
- package/dist/layers.DGZUGztZ.js +220 -0
- package/dist/layers.DHbdkCCU.js +38 -0
- package/dist/layers.DIrkcLlA.js +790 -0
- package/dist/layers.DKPzrygv.js +1 -0
- package/dist/layers.DK_t52oS.js +1126 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DMvWe0pJ.js +7 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DO-G3uLL.js +8 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DQCPMqIN.js +9 -0
- package/dist/layers.DTDpNGfk.js +1 -0
- package/dist/layers.DXTPaWjN.js +37 -0
- package/dist/layers.DXaSAlDN.js +13 -0
- package/dist/layers.DYx3Ot6h.js +139 -0
- package/dist/layers.D_MU5WlI.js +40 -0
- package/dist/layers.DalYdEkL.js +19 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.Dbuivk7d.js +36 -0
- package/dist/layers.DdTLZZKb.js +48146 -0
- package/dist/layers.DeB3waPT.js +8 -0
- package/dist/layers.Dg8Wbn90.js +35 -0
- package/dist/layers.DhiFm4jW.js +10 -0
- package/dist/layers.DhzTwBn5.js +37 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.Dk9dbz6F.js +118 -0
- package/dist/layers.Dklz2JqP.js +41 -0
- package/dist/layers.Dol0x5Jd.js +61 -0
- package/dist/layers.DrtkQKK7.js +1 -0
- package/dist/layers.Ds95POLS.js +1 -0
- package/dist/layers.DsAtBUs-.js +1283 -0
- package/dist/layers.DtoCH9Nn.js +1 -0
- package/dist/layers.DwLw5o0M.js +38 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.DxGDxkXA.js +164 -0
- package/dist/layers.Dxrm0nEM.js +2479 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.Dyor8Hot.js +186 -0
- package/dist/layers.Dyqg_e4P.js +41 -0
- package/dist/layers.DzaH7mDC.js +65 -0
- package/dist/layers.Dzc83sE7.js +1 -0
- package/dist/layers.FstVqdQC.js +804 -0
- package/dist/layers.HcI9cOEd.js +1089 -0
- package/dist/layers.I-MG0ir4.js +21461 -0
- package/dist/layers.I5-pSyca.js +1 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.LOjND5R4.js +320 -0
- package/dist/{layers.BKFthpnI.js → layers.L_XjkGw6.js} +24 -24
- package/dist/layers.Lhl12ohc.js +1 -0
- package/dist/layers.N4wL2Xyj.js +1083 -0
- package/dist/layers.OEP2K3db.js +4 -0
- package/dist/layers.PO65UmTA.js +10 -0
- package/dist/layers.PhLwHKUM.js +40 -0
- package/dist/layers.Tatx7z0m.js +55 -0
- package/dist/layers.UbqG2dp_.js +10 -0
- package/dist/layers.WsdOSV4y.js +2 -0
- package/dist/{layers.C99LCymA.js → layers.Y41CVpLS.js} +70 -70
- package/dist/layers.Ym7pRGM7.js +84 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.c_QDfgff.js +257 -0
- package/dist/layers.cp645rbn.js +7 -0
- package/dist/layers.dqI-yLmM.js +41 -0
- package/dist/layers.fTcEk1do.js +261 -0
- package/dist/layers.gRKbOYG-.js +960 -0
- package/dist/layers.gaT5_-NN.js +32 -0
- package/dist/layers.gzGcAwbO.js +904 -0
- package/dist/layers.h0tSRttU.js +1 -0
- package/dist/layers.hkFN-BS0.js +39 -0
- package/dist/layers.iw01AOuQ.js +931 -0
- package/dist/layers.k2UyvrHI.js +35 -0
- package/dist/layers.kY3ZYtED.js +1 -0
- package/dist/layers.kthR742N.js +39 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.lLRqycMO.js +39 -0
- package/dist/layers.oFAtdeQ1.js +501 -0
- package/dist/layers.p9hSNB6N.js +1 -0
- package/dist/layers.paz6tc0L.js +1034 -0
- package/dist/layers.rRMBW9ET.js +1580 -0
- package/dist/layers.tbRLuldN.js +1 -0
- package/dist/layers.x6Qk2Mwl.js +8 -0
- package/dist/layers.x6ioP3u0.js +423 -0
- package/dist/layers.za1sylgg.js +11692 -0
- package/package.json +6 -5
- package/dist/layers.F7W7VvW1.js +0 -164
|
@@ -0,0 +1,1359 @@
|
|
|
1
|
+
import { ab as Me, ac as Ye, ad as We, ae as _e, af as Ee, ag as de, ah as Ue, ai as Ve, aj as we, ak as ie, al as De, am as Q, an as Ge, ao as Xe, ap as He, aq as qe, ar as Ze, as as Je, at as Qe, W as ae, aa as $e, d as q, e as et, l as x, q as tt, j as nt, g as Te, _ as st } from "./layers.BBwDvE6l.js";
|
|
2
|
+
import { i as rt, c as it, b as at, d as lt, a as Ne, p as ot } from "./layers.N4wL2Xyj.js";
|
|
3
|
+
import { G as ct } from "./layers.C7lIplJU.js";
|
|
4
|
+
import "./layers.I-MG0ir4.js";
|
|
5
|
+
import { c as ut } from "./layers.BUSnd1Ro.js";
|
|
6
|
+
import { o as dt } from "./layers.b0h5ZBmD.js";
|
|
7
|
+
import { s as gt } from "./layers.D7jGxypv.js";
|
|
8
|
+
function ht(e, s) {
|
|
9
|
+
for (var l = -1, c = e == null ? 0 : e.length; ++l < c && s(e[l], l, e) !== !1; )
|
|
10
|
+
;
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function ke(e) {
|
|
14
|
+
return We(e) ? Me(e) : Ye(e);
|
|
15
|
+
}
|
|
16
|
+
function ft(e, s) {
|
|
17
|
+
return e && _e(s, ke(s), e);
|
|
18
|
+
}
|
|
19
|
+
function pt(e, s) {
|
|
20
|
+
for (var l = -1, c = e == null ? 0 : e.length, r = 0, g = []; ++l < c; ) {
|
|
21
|
+
var o = e[l];
|
|
22
|
+
s(o, l, e) && (g[r++] = o);
|
|
23
|
+
}
|
|
24
|
+
return g;
|
|
25
|
+
}
|
|
26
|
+
function bt() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
var St = Object.prototype, xt = St.propertyIsEnumerable, ge = Object.getOwnPropertySymbols, Oe = ge ? function(e) {
|
|
30
|
+
return e == null ? [] : (e = Object(e), pt(ge(e), function(s) {
|
|
31
|
+
return xt.call(e, s);
|
|
32
|
+
}));
|
|
33
|
+
} : bt;
|
|
34
|
+
function Lt(e, s) {
|
|
35
|
+
return _e(e, Oe(e), s);
|
|
36
|
+
}
|
|
37
|
+
function yt(e, s) {
|
|
38
|
+
for (var l = -1, c = s.length, r = e.length; ++l < c; )
|
|
39
|
+
e[r + l] = s[l];
|
|
40
|
+
return e;
|
|
41
|
+
}
|
|
42
|
+
function mt(e, s, l) {
|
|
43
|
+
var c = s(e);
|
|
44
|
+
return Ee(e) ? c : yt(c, l(e));
|
|
45
|
+
}
|
|
46
|
+
function _t(e) {
|
|
47
|
+
return mt(e, ke, Oe);
|
|
48
|
+
}
|
|
49
|
+
var Et = Object.prototype, wt = Et.hasOwnProperty;
|
|
50
|
+
function Dt(e) {
|
|
51
|
+
var s = e.length, l = new e.constructor(s);
|
|
52
|
+
return s && typeof e[0] == "string" && wt.call(e, "index") && (l.index = e.index, l.input = e.input), l;
|
|
53
|
+
}
|
|
54
|
+
function Tt(e, s) {
|
|
55
|
+
var l = e.buffer;
|
|
56
|
+
return new e.constructor(l, e.byteOffset, e.byteLength);
|
|
57
|
+
}
|
|
58
|
+
var Nt = /\w*$/;
|
|
59
|
+
function kt(e) {
|
|
60
|
+
var s = new e.constructor(e.source, Nt.exec(e));
|
|
61
|
+
return s.lastIndex = e.lastIndex, s;
|
|
62
|
+
}
|
|
63
|
+
var he = de ? de.prototype : void 0, fe = he ? he.valueOf : void 0;
|
|
64
|
+
function Ot(e) {
|
|
65
|
+
return fe ? Object(fe.call(e)) : {};
|
|
66
|
+
}
|
|
67
|
+
var It = "[object Boolean]", At = "[object Date]", Ct = "[object Map]", zt = "[object Number]", vt = "[object RegExp]", Rt = "[object Set]", Bt = "[object String]", jt = "[object Symbol]", Ft = "[object ArrayBuffer]", Pt = "[object DataView]", Kt = "[object Float32Array]", Mt = "[object Float64Array]", Yt = "[object Int8Array]", Wt = "[object Int16Array]", Ut = "[object Int32Array]", Vt = "[object Uint8Array]", Gt = "[object Uint8ClampedArray]", Xt = "[object Uint16Array]", Ht = "[object Uint32Array]";
|
|
68
|
+
function qt(e, s, l) {
|
|
69
|
+
var c = e.constructor;
|
|
70
|
+
switch (s) {
|
|
71
|
+
case Ft:
|
|
72
|
+
return Ve(e);
|
|
73
|
+
case It:
|
|
74
|
+
case At:
|
|
75
|
+
return new c(+e);
|
|
76
|
+
case Pt:
|
|
77
|
+
return Tt(e);
|
|
78
|
+
case Kt:
|
|
79
|
+
case Mt:
|
|
80
|
+
case Yt:
|
|
81
|
+
case Wt:
|
|
82
|
+
case Ut:
|
|
83
|
+
case Vt:
|
|
84
|
+
case Gt:
|
|
85
|
+
case Xt:
|
|
86
|
+
case Ht:
|
|
87
|
+
return Ue(e, l);
|
|
88
|
+
case Ct:
|
|
89
|
+
return new c();
|
|
90
|
+
case zt:
|
|
91
|
+
case Bt:
|
|
92
|
+
return new c(e);
|
|
93
|
+
case vt:
|
|
94
|
+
return kt(e);
|
|
95
|
+
case Rt:
|
|
96
|
+
return new c();
|
|
97
|
+
case jt:
|
|
98
|
+
return Ot(e);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
var Zt = "[object Map]";
|
|
102
|
+
function Jt(e) {
|
|
103
|
+
return we(e) && ie(e) == Zt;
|
|
104
|
+
}
|
|
105
|
+
var pe = Q && Q.isMap, Qt = pe ? De(pe) : Jt, $t = "[object Set]";
|
|
106
|
+
function en(e) {
|
|
107
|
+
return we(e) && ie(e) == $t;
|
|
108
|
+
}
|
|
109
|
+
var be = Q && Q.isSet, tn = be ? De(be) : en, nn = 1, Ie = "[object Arguments]", sn = "[object Array]", rn = "[object Boolean]", an = "[object Date]", ln = "[object Error]", Ae = "[object Function]", on = "[object GeneratorFunction]", cn = "[object Map]", un = "[object Number]", Ce = "[object Object]", dn = "[object RegExp]", gn = "[object Set]", hn = "[object String]", fn = "[object Symbol]", pn = "[object WeakMap]", bn = "[object ArrayBuffer]", Sn = "[object DataView]", xn = "[object Float32Array]", Ln = "[object Float64Array]", yn = "[object Int8Array]", mn = "[object Int16Array]", _n = "[object Int32Array]", En = "[object Uint8Array]", wn = "[object Uint8ClampedArray]", Dn = "[object Uint16Array]", Tn = "[object Uint32Array]", y = {};
|
|
110
|
+
y[Ie] = y[sn] = y[bn] = y[Sn] = y[rn] = y[an] = y[xn] = y[Ln] = y[yn] = y[mn] = y[_n] = y[cn] = y[un] = y[Ce] = y[dn] = y[gn] = y[hn] = y[fn] = y[En] = y[wn] = y[Dn] = y[Tn] = !0;
|
|
111
|
+
y[ln] = y[Ae] = y[pn] = !1;
|
|
112
|
+
function J(e, s, l, c, r, g) {
|
|
113
|
+
var o, p = s & nn;
|
|
114
|
+
if (o !== void 0)
|
|
115
|
+
return o;
|
|
116
|
+
if (!Ge(e))
|
|
117
|
+
return e;
|
|
118
|
+
var b = Ee(e);
|
|
119
|
+
if (b)
|
|
120
|
+
return o = Dt(e), Xe(e, o);
|
|
121
|
+
var f = ie(e), S = f == Ae || f == on;
|
|
122
|
+
if (He(e))
|
|
123
|
+
return qe(e, p);
|
|
124
|
+
if (f == Ce || f == Ie || S && !r)
|
|
125
|
+
return o = S ? {} : Ze(e), Lt(e, ft(o, e));
|
|
126
|
+
if (!y[f])
|
|
127
|
+
return r ? e : {};
|
|
128
|
+
o = qt(e, f, p), g || (g = new Je());
|
|
129
|
+
var w = g.get(e);
|
|
130
|
+
if (w)
|
|
131
|
+
return w;
|
|
132
|
+
g.set(e, o), tn(e) ? e.forEach(function(_) {
|
|
133
|
+
o.add(J(_, s, l, _, e, g));
|
|
134
|
+
}) : Qt(e) && e.forEach(function(_, L) {
|
|
135
|
+
o.set(L, J(_, s, l, L, e, g));
|
|
136
|
+
});
|
|
137
|
+
var I = _t, T = b ? void 0 : I(e);
|
|
138
|
+
return ht(T || e, function(_, L) {
|
|
139
|
+
T && (L = _, _ = e[L]), Qe(o, L, J(_, s, l, L, e, g));
|
|
140
|
+
}), o;
|
|
141
|
+
}
|
|
142
|
+
var Nn = 4;
|
|
143
|
+
function kn(e) {
|
|
144
|
+
return J(e, Nn);
|
|
145
|
+
}
|
|
146
|
+
var Se, xe, se = function() {
|
|
147
|
+
var e = function(k, u, n, i) {
|
|
148
|
+
for (n = n || {}, i = k.length; i--; n[k[i]] = u)
|
|
149
|
+
;
|
|
150
|
+
return n;
|
|
151
|
+
}, s = [1, 7], l = [1, 13], c = [1, 14], r = [1, 15], g = [1, 19], o = [1, 16], p = [1, 17], b = [1, 18], f = [8, 30], S = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], w = [1, 23], I = [1, 24], T = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], _ = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], L = [1, 49], m = {
|
|
152
|
+
trace: function() {
|
|
153
|
+
},
|
|
154
|
+
yy: {},
|
|
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, block: 31, NODE_ID: 32, nodeShapeNLabel: 33, dirList: 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: 49, $accept: 0, $end: 1 },
|
|
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: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" },
|
|
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], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
158
|
+
performAction: function(u, n, i, d, h, t, E) {
|
|
159
|
+
var a = t.length - 1;
|
|
160
|
+
switch (h) {
|
|
161
|
+
case 4:
|
|
162
|
+
d.getLogger().debug("Rule: separator (NL) ");
|
|
163
|
+
break;
|
|
164
|
+
case 5:
|
|
165
|
+
d.getLogger().debug("Rule: separator (Space) ");
|
|
166
|
+
break;
|
|
167
|
+
case 6:
|
|
168
|
+
d.getLogger().debug("Rule: separator (EOF) ");
|
|
169
|
+
break;
|
|
170
|
+
case 7:
|
|
171
|
+
d.getLogger().debug("Rule: hierarchy: ", t[a - 1]), d.setHierarchy(t[a - 1]);
|
|
172
|
+
break;
|
|
173
|
+
case 8:
|
|
174
|
+
d.getLogger().debug("Stop NL ");
|
|
175
|
+
break;
|
|
176
|
+
case 9:
|
|
177
|
+
d.getLogger().debug("Stop EOF ");
|
|
178
|
+
break;
|
|
179
|
+
case 10:
|
|
180
|
+
d.getLogger().debug("Stop NL2 ");
|
|
181
|
+
break;
|
|
182
|
+
case 11:
|
|
183
|
+
d.getLogger().debug("Stop EOF2 ");
|
|
184
|
+
break;
|
|
185
|
+
case 12:
|
|
186
|
+
d.getLogger().debug("Rule: statement: ", t[a]), typeof t[a].length == "number" ? this.$ = t[a] : this.$ = [t[a]];
|
|
187
|
+
break;
|
|
188
|
+
case 13:
|
|
189
|
+
d.getLogger().debug("Rule: statement #2: ", t[a - 1]), this.$ = [t[a - 1]].concat(t[a]);
|
|
190
|
+
break;
|
|
191
|
+
case 14:
|
|
192
|
+
d.getLogger().debug("Rule: link: ", t[a], u), this.$ = { edgeTypeStr: t[a], label: "" };
|
|
193
|
+
break;
|
|
194
|
+
case 15:
|
|
195
|
+
d.getLogger().debug("Rule: LABEL link: ", t[a - 3], t[a - 1], t[a]), this.$ = { edgeTypeStr: t[a], label: t[a - 1] };
|
|
196
|
+
break;
|
|
197
|
+
case 18:
|
|
198
|
+
const B = parseInt(t[a]), Y = d.generateId();
|
|
199
|
+
this.$ = { id: Y, type: "space", label: "", width: B, children: [] };
|
|
200
|
+
break;
|
|
201
|
+
case 23:
|
|
202
|
+
d.getLogger().debug("Rule: (nodeStatement link node) ", t[a - 2], t[a - 1], t[a], " typestr: ", t[a - 1].edgeTypeStr);
|
|
203
|
+
const P = d.edgeStrToEdgeData(t[a - 1].edgeTypeStr);
|
|
204
|
+
this.$ = [
|
|
205
|
+
{ id: t[a - 2].id, label: t[a - 2].label, type: t[a - 2].type, directions: t[a - 2].directions },
|
|
206
|
+
{ id: t[a - 2].id + "-" + t[a].id, start: t[a - 2].id, end: t[a].id, label: t[a - 1].label, type: "edge", directions: t[a].directions, arrowTypeEnd: P, arrowTypeStart: "arrow_open" },
|
|
207
|
+
{ id: t[a].id, label: t[a].label, type: d.typeStr2Type(t[a].typeStr), directions: t[a].directions }
|
|
208
|
+
];
|
|
209
|
+
break;
|
|
210
|
+
case 24:
|
|
211
|
+
d.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[a - 1], t[a]), this.$ = { id: t[a - 1].id, label: t[a - 1].label, type: d.typeStr2Type(t[a - 1].typeStr), directions: t[a - 1].directions, widthInColumns: parseInt(t[a], 10) };
|
|
212
|
+
break;
|
|
213
|
+
case 25:
|
|
214
|
+
d.getLogger().debug("Rule: nodeStatement (node) ", t[a]), this.$ = { id: t[a].id, label: t[a].label, type: d.typeStr2Type(t[a].typeStr), directions: t[a].directions, widthInColumns: 1 };
|
|
215
|
+
break;
|
|
216
|
+
case 26:
|
|
217
|
+
d.getLogger().debug("APA123", this ? this : "na"), d.getLogger().debug("COLUMNS: ", t[a]), this.$ = { type: "column-setting", columns: t[a] === "auto" ? -1 : parseInt(t[a]) };
|
|
218
|
+
break;
|
|
219
|
+
case 27:
|
|
220
|
+
d.getLogger().debug("Rule: id-block statement : ", t[a - 2], t[a - 1]), d.generateId(), this.$ = { ...t[a - 2], type: "composite", children: t[a - 1] };
|
|
221
|
+
break;
|
|
222
|
+
case 28:
|
|
223
|
+
d.getLogger().debug("Rule: blockStatement : ", t[a - 2], t[a - 1], t[a]);
|
|
224
|
+
const v = d.generateId();
|
|
225
|
+
this.$ = { id: v, type: "composite", label: "", children: t[a - 1] };
|
|
226
|
+
break;
|
|
227
|
+
case 29:
|
|
228
|
+
d.getLogger().debug("Rule: node (NODE_ID separator): ", t[a]), this.$ = { id: t[a] };
|
|
229
|
+
break;
|
|
230
|
+
case 30:
|
|
231
|
+
d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[a - 1], t[a]), this.$ = { id: t[a - 1], label: t[a].label, typeStr: t[a].typeStr, directions: t[a].directions };
|
|
232
|
+
break;
|
|
233
|
+
case 31:
|
|
234
|
+
d.getLogger().debug("Rule: dirList: ", t[a]), this.$ = [t[a]];
|
|
235
|
+
break;
|
|
236
|
+
case 32:
|
|
237
|
+
d.getLogger().debug("Rule: dirList: ", t[a - 1], t[a]), this.$ = [t[a - 1]].concat(t[a]);
|
|
238
|
+
break;
|
|
239
|
+
case 33:
|
|
240
|
+
d.getLogger().debug("Rule: nodeShapeNLabel: ", t[a - 2], t[a - 1], t[a]), this.$ = { typeStr: t[a - 2] + t[a], label: t[a - 1] };
|
|
241
|
+
break;
|
|
242
|
+
case 34:
|
|
243
|
+
d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[a - 3], t[a - 2], " #3:", t[a - 1], t[a]), this.$ = { typeStr: t[a - 3] + t[a], label: t[a - 2], directions: t[a - 1] };
|
|
244
|
+
break;
|
|
245
|
+
case 35:
|
|
246
|
+
case 36:
|
|
247
|
+
this.$ = { type: "classDef", id: t[a - 1].trim(), css: t[a].trim() };
|
|
248
|
+
break;
|
|
249
|
+
case 37:
|
|
250
|
+
this.$ = { type: "applyClass", id: t[a - 1].trim(), styleClass: t[a].trim() };
|
|
251
|
+
break;
|
|
252
|
+
case 38:
|
|
253
|
+
this.$ = { type: "applyStyles", id: t[a - 1].trim(), stylesStr: t[a].trim() };
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: s, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: l, 29: c, 31: r, 32: g, 40: o, 44: p, 47: b }, { 8: [1, 20] }, e(f, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: s, 28: l, 29: c, 31: r, 32: g, 40: o, 44: p, 47: b }), e(S, [2, 16], { 14: 22, 15: w, 16: I }), e(S, [2, 17]), e(S, [2, 18]), e(S, [2, 19]), e(S, [2, 20]), e(S, [2, 21]), e(S, [2, 22]), e(T, [2, 25], { 27: [1, 25] }), e(S, [2, 26]), { 19: 26, 26: 12, 32: g }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: s, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: l, 29: c, 31: r, 32: g, 40: o, 44: p, 47: b }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(_, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(f, [2, 13]), { 26: 35, 32: g }, { 32: [2, 14] }, { 17: [1, 36] }, e(T, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: w, 16: I, 19: 5, 20: 6, 21: s, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: l, 29: c, 31: r, 32: g, 40: o, 44: p, 47: b }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(_, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(T, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(S, [2, 28]), e(S, [2, 35]), e(S, [2, 36]), e(S, [2, 37]), e(S, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: L }, { 15: [1, 50] }, e(S, [2, 27]), e(_, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: L, 39: [2, 31] }, { 32: [2, 15] }, e(_, [2, 34]), { 39: [2, 32] }],
|
|
258
|
+
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
259
|
+
parseError: function(u, n) {
|
|
260
|
+
if (n.recoverable)
|
|
261
|
+
this.trace(u);
|
|
262
|
+
else {
|
|
263
|
+
var i = new Error(u);
|
|
264
|
+
throw i.hash = n, i;
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
parse: function(u) {
|
|
268
|
+
var n = this, i = [0], d = [], h = [null], t = [], E = this.table, a = "", B = 0, Y = 0, P = 2, v = 1, Fe = t.slice.call(arguments, 1), N = Object.create(this.lexer), K = { yy: {} };
|
|
269
|
+
for (var $ in this.yy)
|
|
270
|
+
Object.prototype.hasOwnProperty.call(this.yy, $) && (K.yy[$] = this.yy[$]);
|
|
271
|
+
N.setInput(u, K.yy), K.yy.lexer = N, K.yy.parser = this, typeof N.yylloc > "u" && (N.yylloc = {});
|
|
272
|
+
var ee = N.yylloc;
|
|
273
|
+
t.push(ee);
|
|
274
|
+
var Pe = N.options && N.options.ranges;
|
|
275
|
+
typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
276
|
+
function Ke() {
|
|
277
|
+
var F;
|
|
278
|
+
return F = d.pop() || N.lex() || v, typeof F != "number" && (F instanceof Array && (d = F, F = d.pop()), F = n.symbols_[F] || F), F;
|
|
279
|
+
}
|
|
280
|
+
for (var A, M, z, te, W = {}, X, j, ue, H; ; ) {
|
|
281
|
+
if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((A === null || typeof A > "u") && (A = Ke()), z = E[M] && E[M][A]), typeof z > "u" || !z.length || !z[0]) {
|
|
282
|
+
var ne = "";
|
|
283
|
+
H = [];
|
|
284
|
+
for (X in E[M])
|
|
285
|
+
this.terminals_[X] && X > P && H.push("'" + this.terminals_[X] + "'");
|
|
286
|
+
N.showPosition ? ne = "Parse error on line " + (B + 1) + `:
|
|
287
|
+
` + N.showPosition() + `
|
|
288
|
+
Expecting ` + H.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : ne = "Parse error on line " + (B + 1) + ": Unexpected " + (A == v ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(ne, {
|
|
289
|
+
text: N.match,
|
|
290
|
+
token: this.terminals_[A] || A,
|
|
291
|
+
line: N.yylineno,
|
|
292
|
+
loc: ee,
|
|
293
|
+
expected: H
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
if (z[0] instanceof Array && z.length > 1)
|
|
297
|
+
throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + A);
|
|
298
|
+
switch (z[0]) {
|
|
299
|
+
case 1:
|
|
300
|
+
i.push(A), h.push(N.yytext), t.push(N.yylloc), i.push(z[1]), A = null, Y = N.yyleng, a = N.yytext, B = N.yylineno, ee = N.yylloc;
|
|
301
|
+
break;
|
|
302
|
+
case 2:
|
|
303
|
+
if (j = this.productions_[z[1]][1], W.$ = h[h.length - j], W._$ = {
|
|
304
|
+
first_line: t[t.length - (j || 1)].first_line,
|
|
305
|
+
last_line: t[t.length - 1].last_line,
|
|
306
|
+
first_column: t[t.length - (j || 1)].first_column,
|
|
307
|
+
last_column: t[t.length - 1].last_column
|
|
308
|
+
}, Pe && (W._$.range = [
|
|
309
|
+
t[t.length - (j || 1)].range[0],
|
|
310
|
+
t[t.length - 1].range[1]
|
|
311
|
+
]), te = this.performAction.apply(W, [
|
|
312
|
+
a,
|
|
313
|
+
Y,
|
|
314
|
+
B,
|
|
315
|
+
K.yy,
|
|
316
|
+
z[1],
|
|
317
|
+
h,
|
|
318
|
+
t
|
|
319
|
+
].concat(Fe)), typeof te < "u")
|
|
320
|
+
return te;
|
|
321
|
+
j && (i = i.slice(0, -1 * j * 2), h = h.slice(0, -1 * j), t = t.slice(0, -1 * j)), i.push(this.productions_[z[1]][0]), h.push(W.$), t.push(W._$), ue = E[i[i.length - 2]][i[i.length - 1]], i.push(ue);
|
|
322
|
+
break;
|
|
323
|
+
case 3:
|
|
324
|
+
return !0;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return !0;
|
|
328
|
+
}
|
|
329
|
+
}, R = /* @__PURE__ */ function() {
|
|
330
|
+
var k = {
|
|
331
|
+
EOF: 1,
|
|
332
|
+
parseError: function(n, i) {
|
|
333
|
+
if (this.yy.parser)
|
|
334
|
+
this.yy.parser.parseError(n, i);
|
|
335
|
+
else
|
|
336
|
+
throw new Error(n);
|
|
337
|
+
},
|
|
338
|
+
// resets the lexer, sets new input
|
|
339
|
+
setInput: function(u, n) {
|
|
340
|
+
return this.yy = n || this.yy || {}, this._input = u, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
341
|
+
first_line: 1,
|
|
342
|
+
first_column: 0,
|
|
343
|
+
last_line: 1,
|
|
344
|
+
last_column: 0
|
|
345
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
346
|
+
},
|
|
347
|
+
// consumes and returns one char from the input
|
|
348
|
+
input: function() {
|
|
349
|
+
var u = this._input[0];
|
|
350
|
+
this.yytext += u, this.yyleng++, this.offset++, this.match += u, this.matched += u;
|
|
351
|
+
var n = u.match(/(?:\r\n?|\n).*/g);
|
|
352
|
+
return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), u;
|
|
353
|
+
},
|
|
354
|
+
// unshifts one char (or a string) into the input
|
|
355
|
+
unput: function(u) {
|
|
356
|
+
var n = u.length, i = u.split(/(?:\r\n?|\n)/g);
|
|
357
|
+
this._input = u + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
|
|
358
|
+
var d = this.match.split(/(?:\r\n?|\n)/g);
|
|
359
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), i.length - 1 && (this.yylineno -= i.length - 1);
|
|
360
|
+
var h = this.yylloc.range;
|
|
361
|
+
return this.yylloc = {
|
|
362
|
+
first_line: this.yylloc.first_line,
|
|
363
|
+
last_line: this.yylineno + 1,
|
|
364
|
+
first_column: this.yylloc.first_column,
|
|
365
|
+
last_column: i ? (i.length === d.length ? this.yylloc.first_column : 0) + d[d.length - i.length].length - i[0].length : this.yylloc.first_column - n
|
|
366
|
+
}, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
|
|
367
|
+
},
|
|
368
|
+
// When called from action, caches matched text and appends it on next action
|
|
369
|
+
more: function() {
|
|
370
|
+
return this._more = !0, this;
|
|
371
|
+
},
|
|
372
|
+
// 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.
|
|
373
|
+
reject: function() {
|
|
374
|
+
if (this.options.backtrack_lexer)
|
|
375
|
+
this._backtrack = !0;
|
|
376
|
+
else
|
|
377
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
378
|
+
` + this.showPosition(), {
|
|
379
|
+
text: "",
|
|
380
|
+
token: null,
|
|
381
|
+
line: this.yylineno
|
|
382
|
+
});
|
|
383
|
+
return this;
|
|
384
|
+
},
|
|
385
|
+
// retain first n characters of the match
|
|
386
|
+
less: function(u) {
|
|
387
|
+
this.unput(this.match.slice(u));
|
|
388
|
+
},
|
|
389
|
+
// displays already matched input, i.e. for error messages
|
|
390
|
+
pastInput: function() {
|
|
391
|
+
var u = this.matched.substr(0, this.matched.length - this.match.length);
|
|
392
|
+
return (u.length > 20 ? "..." : "") + u.substr(-20).replace(/\n/g, "");
|
|
393
|
+
},
|
|
394
|
+
// displays upcoming input, i.e. for error messages
|
|
395
|
+
upcomingInput: function() {
|
|
396
|
+
var u = this.match;
|
|
397
|
+
return u.length < 20 && (u += this._input.substr(0, 20 - u.length)), (u.substr(0, 20) + (u.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
398
|
+
},
|
|
399
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
400
|
+
showPosition: function() {
|
|
401
|
+
var u = this.pastInput(), n = new Array(u.length + 1).join("-");
|
|
402
|
+
return u + this.upcomingInput() + `
|
|
403
|
+
` + n + "^";
|
|
404
|
+
},
|
|
405
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
406
|
+
test_match: function(u, n) {
|
|
407
|
+
var i, d, h;
|
|
408
|
+
if (this.options.backtrack_lexer && (h = {
|
|
409
|
+
yylineno: this.yylineno,
|
|
410
|
+
yylloc: {
|
|
411
|
+
first_line: this.yylloc.first_line,
|
|
412
|
+
last_line: this.last_line,
|
|
413
|
+
first_column: this.yylloc.first_column,
|
|
414
|
+
last_column: this.yylloc.last_column
|
|
415
|
+
},
|
|
416
|
+
yytext: this.yytext,
|
|
417
|
+
match: this.match,
|
|
418
|
+
matches: this.matches,
|
|
419
|
+
matched: this.matched,
|
|
420
|
+
yyleng: this.yyleng,
|
|
421
|
+
offset: this.offset,
|
|
422
|
+
_more: this._more,
|
|
423
|
+
_input: this._input,
|
|
424
|
+
yy: this.yy,
|
|
425
|
+
conditionStack: this.conditionStack.slice(0),
|
|
426
|
+
done: this.done
|
|
427
|
+
}, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), d = u[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
|
|
428
|
+
first_line: this.yylloc.last_line,
|
|
429
|
+
last_line: this.yylineno + 1,
|
|
430
|
+
first_column: this.yylloc.last_column,
|
|
431
|
+
last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + u[0].length
|
|
432
|
+
}, this.yytext += u[0], this.match += u[0], this.matches = u, 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(u[0].length), this.matched += u[0], i = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i)
|
|
433
|
+
return i;
|
|
434
|
+
if (this._backtrack) {
|
|
435
|
+
for (var t in h)
|
|
436
|
+
this[t] = h[t];
|
|
437
|
+
return !1;
|
|
438
|
+
}
|
|
439
|
+
return !1;
|
|
440
|
+
},
|
|
441
|
+
// return next match in input
|
|
442
|
+
next: function() {
|
|
443
|
+
if (this.done)
|
|
444
|
+
return this.EOF;
|
|
445
|
+
this._input || (this.done = !0);
|
|
446
|
+
var u, n, i, d;
|
|
447
|
+
this._more || (this.yytext = "", this.match = "");
|
|
448
|
+
for (var h = this._currentRules(), t = 0; t < h.length; t++)
|
|
449
|
+
if (i = this._input.match(this.rules[h[t]]), i && (!n || i[0].length > n[0].length)) {
|
|
450
|
+
if (n = i, d = t, this.options.backtrack_lexer) {
|
|
451
|
+
if (u = this.test_match(i, h[t]), u !== !1)
|
|
452
|
+
return u;
|
|
453
|
+
if (this._backtrack) {
|
|
454
|
+
n = !1;
|
|
455
|
+
continue;
|
|
456
|
+
} else
|
|
457
|
+
return !1;
|
|
458
|
+
} else if (!this.options.flex)
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
return n ? (u = this.test_match(n, h[d]), u !== !1 ? u : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
462
|
+
` + this.showPosition(), {
|
|
463
|
+
text: "",
|
|
464
|
+
token: null,
|
|
465
|
+
line: this.yylineno
|
|
466
|
+
});
|
|
467
|
+
},
|
|
468
|
+
// return next match that has a token
|
|
469
|
+
lex: function() {
|
|
470
|
+
var n = this.next();
|
|
471
|
+
return n || this.lex();
|
|
472
|
+
},
|
|
473
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
474
|
+
begin: function(n) {
|
|
475
|
+
this.conditionStack.push(n);
|
|
476
|
+
},
|
|
477
|
+
// pop the previously active lexer condition state off the condition stack
|
|
478
|
+
popState: function() {
|
|
479
|
+
var n = this.conditionStack.length - 1;
|
|
480
|
+
return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
481
|
+
},
|
|
482
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
483
|
+
_currentRules: function() {
|
|
484
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
485
|
+
},
|
|
486
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
487
|
+
topState: function(n) {
|
|
488
|
+
return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
|
|
489
|
+
},
|
|
490
|
+
// alias for begin(condition)
|
|
491
|
+
pushState: function(n) {
|
|
492
|
+
this.begin(n);
|
|
493
|
+
},
|
|
494
|
+
// return the number of states currently on the stack
|
|
495
|
+
stateStackSize: function() {
|
|
496
|
+
return this.conditionStack.length;
|
|
497
|
+
},
|
|
498
|
+
options: {},
|
|
499
|
+
performAction: function(n, i, d, h) {
|
|
500
|
+
switch (d) {
|
|
501
|
+
case 0:
|
|
502
|
+
return 10;
|
|
503
|
+
case 1:
|
|
504
|
+
return n.getLogger().debug("Found space-block"), 31;
|
|
505
|
+
case 2:
|
|
506
|
+
return n.getLogger().debug("Found nl-block"), 31;
|
|
507
|
+
case 3:
|
|
508
|
+
return n.getLogger().debug("Found space-block"), 29;
|
|
509
|
+
case 4:
|
|
510
|
+
n.getLogger().debug(".", i.yytext);
|
|
511
|
+
break;
|
|
512
|
+
case 5:
|
|
513
|
+
n.getLogger().debug("_", i.yytext);
|
|
514
|
+
break;
|
|
515
|
+
case 6:
|
|
516
|
+
return 5;
|
|
517
|
+
case 7:
|
|
518
|
+
return i.yytext = -1, 28;
|
|
519
|
+
case 8:
|
|
520
|
+
return i.yytext = i.yytext.replace(/columns\s+/, ""), n.getLogger().debug("COLUMNS (LEX)", i.yytext), 28;
|
|
521
|
+
case 9:
|
|
522
|
+
this.pushState("md_string");
|
|
523
|
+
break;
|
|
524
|
+
case 10:
|
|
525
|
+
return "MD_STR";
|
|
526
|
+
case 11:
|
|
527
|
+
this.popState();
|
|
528
|
+
break;
|
|
529
|
+
case 12:
|
|
530
|
+
this.pushState("string");
|
|
531
|
+
break;
|
|
532
|
+
case 13:
|
|
533
|
+
n.getLogger().debug("LEX: POPPING STR:", i.yytext), this.popState();
|
|
534
|
+
break;
|
|
535
|
+
case 14:
|
|
536
|
+
return n.getLogger().debug("LEX: STR end:", i.yytext), "STR";
|
|
537
|
+
case 15:
|
|
538
|
+
return i.yytext = i.yytext.replace(/space\:/, ""), n.getLogger().debug("SPACE NUM (LEX)", i.yytext), 21;
|
|
539
|
+
case 16:
|
|
540
|
+
return i.yytext = "1", n.getLogger().debug("COLUMNS (LEX)", i.yytext), 21;
|
|
541
|
+
case 17:
|
|
542
|
+
return 43;
|
|
543
|
+
case 18:
|
|
544
|
+
return "LINKSTYLE";
|
|
545
|
+
case 19:
|
|
546
|
+
return "INTERPOLATE";
|
|
547
|
+
case 20:
|
|
548
|
+
return this.pushState("CLASSDEF"), 40;
|
|
549
|
+
case 21:
|
|
550
|
+
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
551
|
+
case 22:
|
|
552
|
+
return this.popState(), this.pushState("CLASSDEFID"), 41;
|
|
553
|
+
case 23:
|
|
554
|
+
return this.popState(), 42;
|
|
555
|
+
case 24:
|
|
556
|
+
return this.pushState("CLASS"), 44;
|
|
557
|
+
case 25:
|
|
558
|
+
return this.popState(), this.pushState("CLASS_STYLE"), 45;
|
|
559
|
+
case 26:
|
|
560
|
+
return this.popState(), 46;
|
|
561
|
+
case 27:
|
|
562
|
+
return this.pushState("STYLE_STMNT"), 47;
|
|
563
|
+
case 28:
|
|
564
|
+
return this.popState(), this.pushState("STYLE_DEFINITION"), 48;
|
|
565
|
+
case 29:
|
|
566
|
+
return this.popState(), 49;
|
|
567
|
+
case 30:
|
|
568
|
+
return this.pushState("acc_title"), "acc_title";
|
|
569
|
+
case 31:
|
|
570
|
+
return this.popState(), "acc_title_value";
|
|
571
|
+
case 32:
|
|
572
|
+
return this.pushState("acc_descr"), "acc_descr";
|
|
573
|
+
case 33:
|
|
574
|
+
return this.popState(), "acc_descr_value";
|
|
575
|
+
case 34:
|
|
576
|
+
this.pushState("acc_descr_multiline");
|
|
577
|
+
break;
|
|
578
|
+
case 35:
|
|
579
|
+
this.popState();
|
|
580
|
+
break;
|
|
581
|
+
case 36:
|
|
582
|
+
return "acc_descr_multiline_value";
|
|
583
|
+
case 37:
|
|
584
|
+
return 30;
|
|
585
|
+
case 38:
|
|
586
|
+
return this.popState(), n.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
587
|
+
case 39:
|
|
588
|
+
return this.popState(), n.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
589
|
+
case 40:
|
|
590
|
+
return this.popState(), n.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
591
|
+
case 41:
|
|
592
|
+
return this.popState(), n.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
593
|
+
case 42:
|
|
594
|
+
return this.popState(), n.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
595
|
+
case 43:
|
|
596
|
+
return this.popState(), n.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
597
|
+
case 44:
|
|
598
|
+
return this.popState(), n.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
599
|
+
case 45:
|
|
600
|
+
return this.popState(), n.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
601
|
+
case 46:
|
|
602
|
+
return this.popState(), n.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
603
|
+
case 47:
|
|
604
|
+
return this.popState(), n.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
605
|
+
case 48:
|
|
606
|
+
return this.popState(), n.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
607
|
+
case 49:
|
|
608
|
+
return this.popState(), n.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
609
|
+
case 50:
|
|
610
|
+
return this.popState(), n.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
611
|
+
case 51:
|
|
612
|
+
return this.popState(), n.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
613
|
+
case 52:
|
|
614
|
+
return this.popState(), n.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
615
|
+
case 53:
|
|
616
|
+
return this.popState(), n.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
617
|
+
case 54:
|
|
618
|
+
return this.popState(), n.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
619
|
+
case 55:
|
|
620
|
+
return n.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 36;
|
|
621
|
+
case 56:
|
|
622
|
+
return n.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 36;
|
|
623
|
+
case 57:
|
|
624
|
+
return n.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 36;
|
|
625
|
+
case 58:
|
|
626
|
+
return n.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
|
|
627
|
+
case 59:
|
|
628
|
+
return n.getLogger().debug("Lex: ((("), this.pushState("NODE"), 36;
|
|
629
|
+
case 60:
|
|
630
|
+
return n.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
|
|
631
|
+
case 61:
|
|
632
|
+
return n.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
|
|
633
|
+
case 62:
|
|
634
|
+
return n.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
|
|
635
|
+
case 63:
|
|
636
|
+
return n.getLogger().debug("Lexc: >"), this.pushState("NODE"), 36;
|
|
637
|
+
case 64:
|
|
638
|
+
return n.getLogger().debug("Lexa: (["), this.pushState("NODE"), 36;
|
|
639
|
+
case 65:
|
|
640
|
+
return n.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
|
|
641
|
+
case 66:
|
|
642
|
+
return this.pushState("NODE"), 36;
|
|
643
|
+
case 67:
|
|
644
|
+
return this.pushState("NODE"), 36;
|
|
645
|
+
case 68:
|
|
646
|
+
return this.pushState("NODE"), 36;
|
|
647
|
+
case 69:
|
|
648
|
+
return this.pushState("NODE"), 36;
|
|
649
|
+
case 70:
|
|
650
|
+
return this.pushState("NODE"), 36;
|
|
651
|
+
case 71:
|
|
652
|
+
return this.pushState("NODE"), 36;
|
|
653
|
+
case 72:
|
|
654
|
+
return this.pushState("NODE"), 36;
|
|
655
|
+
case 73:
|
|
656
|
+
return n.getLogger().debug("Lexa: ["), this.pushState("NODE"), 36;
|
|
657
|
+
case 74:
|
|
658
|
+
return this.pushState("BLOCK_ARROW"), n.getLogger().debug("LEX ARR START"), 38;
|
|
659
|
+
case 75:
|
|
660
|
+
return n.getLogger().debug("Lex: NODE_ID", i.yytext), 32;
|
|
661
|
+
case 76:
|
|
662
|
+
return n.getLogger().debug("Lex: EOF", i.yytext), 8;
|
|
663
|
+
case 77:
|
|
664
|
+
this.pushState("md_string");
|
|
665
|
+
break;
|
|
666
|
+
case 78:
|
|
667
|
+
this.pushState("md_string");
|
|
668
|
+
break;
|
|
669
|
+
case 79:
|
|
670
|
+
return "NODE_DESCR";
|
|
671
|
+
case 80:
|
|
672
|
+
this.popState();
|
|
673
|
+
break;
|
|
674
|
+
case 81:
|
|
675
|
+
n.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
676
|
+
break;
|
|
677
|
+
case 82:
|
|
678
|
+
n.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
679
|
+
break;
|
|
680
|
+
case 83:
|
|
681
|
+
return n.getLogger().debug("LEX: NODE_DESCR:", i.yytext), "NODE_DESCR";
|
|
682
|
+
case 84:
|
|
683
|
+
n.getLogger().debug("LEX POPPING"), this.popState();
|
|
684
|
+
break;
|
|
685
|
+
case 85:
|
|
686
|
+
n.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
687
|
+
break;
|
|
688
|
+
case 86:
|
|
689
|
+
return i.yytext = i.yytext.replace(/^,\s*/, ""), n.getLogger().debug("Lex (right): dir:", i.yytext), "DIR";
|
|
690
|
+
case 87:
|
|
691
|
+
return i.yytext = i.yytext.replace(/^,\s*/, ""), n.getLogger().debug("Lex (left):", i.yytext), "DIR";
|
|
692
|
+
case 88:
|
|
693
|
+
return i.yytext = i.yytext.replace(/^,\s*/, ""), n.getLogger().debug("Lex (x):", i.yytext), "DIR";
|
|
694
|
+
case 89:
|
|
695
|
+
return i.yytext = i.yytext.replace(/^,\s*/, ""), n.getLogger().debug("Lex (y):", i.yytext), "DIR";
|
|
696
|
+
case 90:
|
|
697
|
+
return i.yytext = i.yytext.replace(/^,\s*/, ""), n.getLogger().debug("Lex (up):", i.yytext), "DIR";
|
|
698
|
+
case 91:
|
|
699
|
+
return i.yytext = i.yytext.replace(/^,\s*/, ""), n.getLogger().debug("Lex (down):", i.yytext), "DIR";
|
|
700
|
+
case 92:
|
|
701
|
+
return i.yytext = "]>", n.getLogger().debug("Lex (ARROW_DIR end):", i.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
702
|
+
case 93:
|
|
703
|
+
return n.getLogger().debug("Lex: LINK", "#" + i.yytext + "#"), 15;
|
|
704
|
+
case 94:
|
|
705
|
+
return n.getLogger().debug("Lex: LINK", i.yytext), 15;
|
|
706
|
+
case 95:
|
|
707
|
+
return n.getLogger().debug("Lex: LINK", i.yytext), 15;
|
|
708
|
+
case 96:
|
|
709
|
+
return n.getLogger().debug("Lex: LINK", i.yytext), 15;
|
|
710
|
+
case 97:
|
|
711
|
+
return n.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
|
|
712
|
+
case 98:
|
|
713
|
+
return n.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
|
|
714
|
+
case 99:
|
|
715
|
+
return n.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
|
|
716
|
+
case 100:
|
|
717
|
+
this.pushState("md_string");
|
|
718
|
+
break;
|
|
719
|
+
case 101:
|
|
720
|
+
return n.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
721
|
+
case 102:
|
|
722
|
+
return this.popState(), n.getLogger().debug("Lex: LINK", "#" + i.yytext + "#"), 15;
|
|
723
|
+
case 103:
|
|
724
|
+
return this.popState(), n.getLogger().debug("Lex: LINK", i.yytext), 15;
|
|
725
|
+
case 104:
|
|
726
|
+
return this.popState(), n.getLogger().debug("Lex: LINK", i.yytext), 15;
|
|
727
|
+
case 105:
|
|
728
|
+
return n.getLogger().debug("Lex: COLON", i.yytext), i.yytext = i.yytext.slice(1), 27;
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
rules: [/^(?:block-beta\b)/, /^(?:block\s+)/, /^(?:block\n+)/, /^(?:block:)/, /^(?:[\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+)/],
|
|
732
|
+
conditions: { STYLE_DEFINITION: { rules: [29], inclusive: !1 }, STYLE_STMNT: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [23], inclusive: !1 }, CLASSDEF: { rules: [21, 22], inclusive: !1 }, CLASS_STYLE: { rules: [26], inclusive: !1 }, CLASS: { rules: [25], inclusive: !1 }, LLABEL: { rules: [100, 101, 102, 103, 104], inclusive: !1 }, ARROW_DIR: { rules: [86, 87, 88, 89, 90, 91, 92], inclusive: !1 }, BLOCK_ARROW: { rules: [77, 82, 85], inclusive: !1 }, NODE: { rules: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], inclusive: !1 }, md_string: { rules: [10, 11, 79, 80], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [13, 14, 83, 84], inclusive: !1 }, acc_descr_multiline: { rules: [35, 36], inclusive: !1 }, acc_descr: { rules: [33], inclusive: !1 }, acc_title: { rules: [31], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 24, 27, 30, 32, 34, 37, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 93, 94, 95, 96, 97, 98, 99, 105], inclusive: !0 } }
|
|
733
|
+
};
|
|
734
|
+
return k;
|
|
735
|
+
}();
|
|
736
|
+
m.lexer = R;
|
|
737
|
+
function O() {
|
|
738
|
+
this.yy = {};
|
|
739
|
+
}
|
|
740
|
+
return O.prototype = m, m.Parser = O, new O();
|
|
741
|
+
}();
|
|
742
|
+
se.parser = se;
|
|
743
|
+
const On = se;
|
|
744
|
+
let C = {}, le = [], U = {};
|
|
745
|
+
const Le = "color", ye = "fill", In = "bgFill", ze = ",", An = Te();
|
|
746
|
+
let V = {};
|
|
747
|
+
const Cn = (e) => nt.sanitizeText(e, An), zn = function(e, s = "") {
|
|
748
|
+
V[e] === void 0 && (V[e] = { id: e, styles: [], textStyles: [] });
|
|
749
|
+
const l = V[e];
|
|
750
|
+
s != null && s.split(ze).forEach((c) => {
|
|
751
|
+
const r = c.replace(/([^;]*);/, "$1").trim();
|
|
752
|
+
if (c.match(Le)) {
|
|
753
|
+
const o = r.replace(ye, In).replace(Le, ye);
|
|
754
|
+
l.textStyles.push(o);
|
|
755
|
+
}
|
|
756
|
+
l.styles.push(r);
|
|
757
|
+
});
|
|
758
|
+
}, vn = function(e, s = "") {
|
|
759
|
+
const l = C[e];
|
|
760
|
+
s != null && (l.styles = s.split(ze));
|
|
761
|
+
}, Rn = function(e, s) {
|
|
762
|
+
e.split(",").forEach(function(l) {
|
|
763
|
+
let c = C[l];
|
|
764
|
+
if (c === void 0) {
|
|
765
|
+
const r = l.trim();
|
|
766
|
+
C[r] = { id: r, type: "na", children: [] }, c = C[r];
|
|
767
|
+
}
|
|
768
|
+
c.classes || (c.classes = []), c.classes.push(s);
|
|
769
|
+
});
|
|
770
|
+
}, ve = (e, s) => {
|
|
771
|
+
const l = e.flat(), c = [];
|
|
772
|
+
for (const r of l) {
|
|
773
|
+
if (r.label && (r.label = Cn(r.label)), r.type === "classDef") {
|
|
774
|
+
zn(r.id, r.css);
|
|
775
|
+
continue;
|
|
776
|
+
}
|
|
777
|
+
if (r.type === "applyClass") {
|
|
778
|
+
Rn(r.id, (r == null ? void 0 : r.styleClass) || "");
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
if (r.type === "applyStyles") {
|
|
782
|
+
r != null && r.stylesStr && vn(r.id, r == null ? void 0 : r.stylesStr);
|
|
783
|
+
continue;
|
|
784
|
+
}
|
|
785
|
+
if (r.type === "column-setting")
|
|
786
|
+
s.columns = r.columns || -1;
|
|
787
|
+
else if (r.type === "edge")
|
|
788
|
+
U[r.id] ? U[r.id]++ : U[r.id] = 1, r.id = U[r.id] + "-" + r.id, le.push(r);
|
|
789
|
+
else {
|
|
790
|
+
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
791
|
+
const g = !C[r.id];
|
|
792
|
+
if (g ? C[r.id] = r : (r.type !== "na" && (C[r.id].type = r.type), r.label !== r.id && (C[r.id].label = r.label)), r.children && ve(r.children, r), r.type === "space") {
|
|
793
|
+
const o = r.width || 1;
|
|
794
|
+
for (let p = 0; p < o; p++) {
|
|
795
|
+
const b = kn(r);
|
|
796
|
+
b.id = b.id + "-" + p, C[b.id] = b, c.push(b);
|
|
797
|
+
}
|
|
798
|
+
} else g && c.push(r);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
s.children = c;
|
|
802
|
+
};
|
|
803
|
+
let oe = [], G = { id: "root", type: "composite", children: [], columns: -1 };
|
|
804
|
+
const Bn = () => {
|
|
805
|
+
x.debug("Clear called"), tt(), G = { id: "root", type: "composite", children: [], columns: -1 }, C = { root: G }, oe = [], V = {}, le = [], U = {};
|
|
806
|
+
};
|
|
807
|
+
function jn(e) {
|
|
808
|
+
switch (x.debug("typeStr2Type", e), e) {
|
|
809
|
+
case "[]":
|
|
810
|
+
return "square";
|
|
811
|
+
case "()":
|
|
812
|
+
return x.debug("we have a round"), "round";
|
|
813
|
+
case "(())":
|
|
814
|
+
return "circle";
|
|
815
|
+
case ">]":
|
|
816
|
+
return "rect_left_inv_arrow";
|
|
817
|
+
case "{}":
|
|
818
|
+
return "diamond";
|
|
819
|
+
case "{{}}":
|
|
820
|
+
return "hexagon";
|
|
821
|
+
case "([])":
|
|
822
|
+
return "stadium";
|
|
823
|
+
case "[[]]":
|
|
824
|
+
return "subroutine";
|
|
825
|
+
case "[()]":
|
|
826
|
+
return "cylinder";
|
|
827
|
+
case "((()))":
|
|
828
|
+
return "doublecircle";
|
|
829
|
+
case "[//]":
|
|
830
|
+
return "lean_right";
|
|
831
|
+
case "[\\\\]":
|
|
832
|
+
return "lean_left";
|
|
833
|
+
case "[/\\]":
|
|
834
|
+
return "trapezoid";
|
|
835
|
+
case "[\\/]":
|
|
836
|
+
return "inv_trapezoid";
|
|
837
|
+
case "<[]>":
|
|
838
|
+
return "block_arrow";
|
|
839
|
+
default:
|
|
840
|
+
return "na";
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
function Fn(e) {
|
|
844
|
+
switch (x.debug("typeStr2Type", e), e) {
|
|
845
|
+
case "==":
|
|
846
|
+
return "thick";
|
|
847
|
+
default:
|
|
848
|
+
return "normal";
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
function Pn(e) {
|
|
852
|
+
switch (e.trim()) {
|
|
853
|
+
case "--x":
|
|
854
|
+
return "arrow_cross";
|
|
855
|
+
case "--o":
|
|
856
|
+
return "arrow_circle";
|
|
857
|
+
default:
|
|
858
|
+
return "arrow_point";
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
let me = 0;
|
|
862
|
+
const Kn = () => (me++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + me), Mn = (e) => {
|
|
863
|
+
G.children = e, ve(e, G), oe = G.children;
|
|
864
|
+
}, Yn = (e) => {
|
|
865
|
+
const s = C[e];
|
|
866
|
+
return s ? s.columns ? s.columns : s.children ? s.children.length : -1 : -1;
|
|
867
|
+
}, Wn = () => [...Object.values(C)], Un = () => oe || [], Vn = () => le, Gn = (e) => C[e], Xn = (e) => {
|
|
868
|
+
C[e.id] = e;
|
|
869
|
+
}, Hn = () => console, qn = function() {
|
|
870
|
+
return V;
|
|
871
|
+
}, Zn = {
|
|
872
|
+
getConfig: () => ae().block,
|
|
873
|
+
typeStr2Type: jn,
|
|
874
|
+
edgeTypeStr2Type: Fn,
|
|
875
|
+
edgeStrToEdgeData: Pn,
|
|
876
|
+
getLogger: Hn,
|
|
877
|
+
getBlocksFlat: Wn,
|
|
878
|
+
getBlocks: Un,
|
|
879
|
+
getEdges: Vn,
|
|
880
|
+
setHierarchy: Mn,
|
|
881
|
+
getBlock: Gn,
|
|
882
|
+
setBlock: Xn,
|
|
883
|
+
getColumns: Yn,
|
|
884
|
+
getClasses: qn,
|
|
885
|
+
clear: Bn,
|
|
886
|
+
generateId: Kn
|
|
887
|
+
}, Jn = Zn, Z = (e, s) => {
|
|
888
|
+
const l = ut, c = l(e, "r"), r = l(e, "g"), g = l(e, "b");
|
|
889
|
+
return $e(c, r, g, s);
|
|
890
|
+
}, Qn = (e) => `.label {
|
|
891
|
+
font-family: ${e.fontFamily};
|
|
892
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
893
|
+
}
|
|
894
|
+
.cluster-label text {
|
|
895
|
+
fill: ${e.titleColor};
|
|
896
|
+
}
|
|
897
|
+
.cluster-label span,p {
|
|
898
|
+
color: ${e.titleColor};
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
.label text,span,p {
|
|
904
|
+
fill: ${e.nodeTextColor || e.textColor};
|
|
905
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.node rect,
|
|
909
|
+
.node circle,
|
|
910
|
+
.node ellipse,
|
|
911
|
+
.node polygon,
|
|
912
|
+
.node path {
|
|
913
|
+
fill: ${e.mainBkg};
|
|
914
|
+
stroke: ${e.nodeBorder};
|
|
915
|
+
stroke-width: 1px;
|
|
916
|
+
}
|
|
917
|
+
.flowchart-label text {
|
|
918
|
+
text-anchor: middle;
|
|
919
|
+
}
|
|
920
|
+
// .flowchart-label .text-outer-tspan {
|
|
921
|
+
// text-anchor: middle;
|
|
922
|
+
// }
|
|
923
|
+
// .flowchart-label .text-inner-tspan {
|
|
924
|
+
// text-anchor: start;
|
|
925
|
+
// }
|
|
926
|
+
|
|
927
|
+
.node .label {
|
|
928
|
+
text-align: center;
|
|
929
|
+
}
|
|
930
|
+
.node.clickable {
|
|
931
|
+
cursor: pointer;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.arrowheadPath {
|
|
935
|
+
fill: ${e.arrowheadColor};
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.edgePath .path {
|
|
939
|
+
stroke: ${e.lineColor};
|
|
940
|
+
stroke-width: 2.0px;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.flowchart-link {
|
|
944
|
+
stroke: ${e.lineColor};
|
|
945
|
+
fill: none;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.edgeLabel {
|
|
949
|
+
background-color: ${e.edgeLabelBackground};
|
|
950
|
+
rect {
|
|
951
|
+
opacity: 0.5;
|
|
952
|
+
background-color: ${e.edgeLabelBackground};
|
|
953
|
+
fill: ${e.edgeLabelBackground};
|
|
954
|
+
}
|
|
955
|
+
text-align: center;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
/* For html labels only */
|
|
959
|
+
.labelBkg {
|
|
960
|
+
background-color: ${Z(e.edgeLabelBackground, 0.5)};
|
|
961
|
+
// background-color:
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
.node .cluster {
|
|
965
|
+
// fill: ${Z(e.mainBkg, 0.5)};
|
|
966
|
+
fill: ${Z(e.clusterBkg, 0.5)};
|
|
967
|
+
stroke: ${Z(e.clusterBorder, 0.2)};
|
|
968
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
969
|
+
stroke-width: 1px;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.cluster text {
|
|
973
|
+
fill: ${e.titleColor};
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
.cluster span,p {
|
|
977
|
+
color: ${e.titleColor};
|
|
978
|
+
}
|
|
979
|
+
/* .cluster div {
|
|
980
|
+
color: ${e.titleColor};
|
|
981
|
+
} */
|
|
982
|
+
|
|
983
|
+
div.mermaidTooltip {
|
|
984
|
+
position: absolute;
|
|
985
|
+
text-align: center;
|
|
986
|
+
max-width: 200px;
|
|
987
|
+
padding: 2px;
|
|
988
|
+
font-family: ${e.fontFamily};
|
|
989
|
+
font-size: 12px;
|
|
990
|
+
background: ${e.tertiaryColor};
|
|
991
|
+
border: 1px solid ${e.border2};
|
|
992
|
+
border-radius: 2px;
|
|
993
|
+
pointer-events: none;
|
|
994
|
+
z-index: 100;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.flowchartTitleText {
|
|
998
|
+
text-anchor: middle;
|
|
999
|
+
font-size: 18px;
|
|
1000
|
+
fill: ${e.textColor};
|
|
1001
|
+
}
|
|
1002
|
+
`, $n = Qn;
|
|
1003
|
+
function Re(e, s, l = !1) {
|
|
1004
|
+
var c, r, g;
|
|
1005
|
+
const o = e;
|
|
1006
|
+
let p = "default";
|
|
1007
|
+
(((c = o == null ? void 0 : o.classes) == null ? void 0 : c.length) || 0) > 0 && (p = ((o == null ? void 0 : o.classes) || []).join(" ")), p = p + " flowchart-label";
|
|
1008
|
+
let b = 0, f = "", S;
|
|
1009
|
+
switch (o.type) {
|
|
1010
|
+
case "round":
|
|
1011
|
+
b = 5, f = "rect";
|
|
1012
|
+
break;
|
|
1013
|
+
case "composite":
|
|
1014
|
+
b = 0, f = "composite", S = 0;
|
|
1015
|
+
break;
|
|
1016
|
+
case "square":
|
|
1017
|
+
f = "rect";
|
|
1018
|
+
break;
|
|
1019
|
+
case "diamond":
|
|
1020
|
+
f = "question";
|
|
1021
|
+
break;
|
|
1022
|
+
case "hexagon":
|
|
1023
|
+
f = "hexagon";
|
|
1024
|
+
break;
|
|
1025
|
+
case "block_arrow":
|
|
1026
|
+
f = "block_arrow";
|
|
1027
|
+
break;
|
|
1028
|
+
case "odd":
|
|
1029
|
+
f = "rect_left_inv_arrow";
|
|
1030
|
+
break;
|
|
1031
|
+
case "lean_right":
|
|
1032
|
+
f = "lean_right";
|
|
1033
|
+
break;
|
|
1034
|
+
case "lean_left":
|
|
1035
|
+
f = "lean_left";
|
|
1036
|
+
break;
|
|
1037
|
+
case "trapezoid":
|
|
1038
|
+
f = "trapezoid";
|
|
1039
|
+
break;
|
|
1040
|
+
case "inv_trapezoid":
|
|
1041
|
+
f = "inv_trapezoid";
|
|
1042
|
+
break;
|
|
1043
|
+
case "rect_left_inv_arrow":
|
|
1044
|
+
f = "rect_left_inv_arrow";
|
|
1045
|
+
break;
|
|
1046
|
+
case "circle":
|
|
1047
|
+
f = "circle";
|
|
1048
|
+
break;
|
|
1049
|
+
case "ellipse":
|
|
1050
|
+
f = "ellipse";
|
|
1051
|
+
break;
|
|
1052
|
+
case "stadium":
|
|
1053
|
+
f = "stadium";
|
|
1054
|
+
break;
|
|
1055
|
+
case "subroutine":
|
|
1056
|
+
f = "subroutine";
|
|
1057
|
+
break;
|
|
1058
|
+
case "cylinder":
|
|
1059
|
+
f = "cylinder";
|
|
1060
|
+
break;
|
|
1061
|
+
case "group":
|
|
1062
|
+
f = "rect";
|
|
1063
|
+
break;
|
|
1064
|
+
case "doublecircle":
|
|
1065
|
+
f = "doublecircle";
|
|
1066
|
+
break;
|
|
1067
|
+
default:
|
|
1068
|
+
f = "rect";
|
|
1069
|
+
}
|
|
1070
|
+
const w = st((o == null ? void 0 : o.styles) || []), I = o.label, T = o.size || { width: 0, height: 0, x: 0, y: 0 };
|
|
1071
|
+
return {
|
|
1072
|
+
labelStyle: w.labelStyle,
|
|
1073
|
+
shape: f,
|
|
1074
|
+
labelText: I,
|
|
1075
|
+
rx: b,
|
|
1076
|
+
ry: b,
|
|
1077
|
+
class: p,
|
|
1078
|
+
style: w.style,
|
|
1079
|
+
id: o.id,
|
|
1080
|
+
directions: o.directions,
|
|
1081
|
+
width: T.width,
|
|
1082
|
+
height: T.height,
|
|
1083
|
+
x: T.x,
|
|
1084
|
+
y: T.y,
|
|
1085
|
+
positioned: l,
|
|
1086
|
+
intersect: void 0,
|
|
1087
|
+
type: o.type,
|
|
1088
|
+
padding: S ?? (((g = (r = ae()) == null ? void 0 : r.block) == null ? void 0 : g.padding) || 0)
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
async function es(e, s, l) {
|
|
1092
|
+
const c = Re(s, l, !1);
|
|
1093
|
+
if (c.type === "group")
|
|
1094
|
+
return;
|
|
1095
|
+
const r = await Ne(e, c), g = r.node().getBBox(), o = l.getBlock(c.id);
|
|
1096
|
+
o.size = { width: g.width, height: g.height, x: 0, y: 0, node: r }, l.setBlock(o), r.remove();
|
|
1097
|
+
}
|
|
1098
|
+
async function ts(e, s, l) {
|
|
1099
|
+
const c = Re(s, l, !0);
|
|
1100
|
+
l.getBlock(c.id).type !== "space" && (await Ne(e, c), s.intersect = c == null ? void 0 : c.intersect, ot(c));
|
|
1101
|
+
}
|
|
1102
|
+
async function ce(e, s, l, c) {
|
|
1103
|
+
for (const r of s)
|
|
1104
|
+
await c(e, r, l), r.children && await ce(e, r.children, l, c);
|
|
1105
|
+
}
|
|
1106
|
+
async function ns(e, s, l) {
|
|
1107
|
+
await ce(e, s, l, es);
|
|
1108
|
+
}
|
|
1109
|
+
async function ss(e, s, l) {
|
|
1110
|
+
await ce(e, s, l, ts);
|
|
1111
|
+
}
|
|
1112
|
+
async function rs(e, s, l, c, r) {
|
|
1113
|
+
const g = new ct({
|
|
1114
|
+
multigraph: !0,
|
|
1115
|
+
compound: !0
|
|
1116
|
+
});
|
|
1117
|
+
g.setGraph({
|
|
1118
|
+
rankdir: "TB",
|
|
1119
|
+
nodesep: 10,
|
|
1120
|
+
ranksep: 10,
|
|
1121
|
+
marginx: 8,
|
|
1122
|
+
marginy: 8
|
|
1123
|
+
});
|
|
1124
|
+
for (const o of l)
|
|
1125
|
+
o.size && g.setNode(o.id, {
|
|
1126
|
+
width: o.size.width,
|
|
1127
|
+
height: o.size.height,
|
|
1128
|
+
intersect: o.intersect
|
|
1129
|
+
});
|
|
1130
|
+
for (const o of s)
|
|
1131
|
+
if (o.start && o.end) {
|
|
1132
|
+
const p = c.getBlock(o.start), b = c.getBlock(o.end);
|
|
1133
|
+
if (p != null && p.size && (b != null && b.size)) {
|
|
1134
|
+
const f = p.size, S = b.size, w = [
|
|
1135
|
+
{ x: f.x, y: f.y },
|
|
1136
|
+
{ x: f.x + (S.x - f.x) / 2, y: f.y + (S.y - f.y) / 2 },
|
|
1137
|
+
{ x: S.x, y: S.y }
|
|
1138
|
+
];
|
|
1139
|
+
await it(
|
|
1140
|
+
e,
|
|
1141
|
+
{ v: o.start, w: o.end, name: o.id },
|
|
1142
|
+
{
|
|
1143
|
+
...o,
|
|
1144
|
+
arrowTypeEnd: o.arrowTypeEnd,
|
|
1145
|
+
arrowTypeStart: o.arrowTypeStart,
|
|
1146
|
+
points: w,
|
|
1147
|
+
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
1148
|
+
},
|
|
1149
|
+
void 0,
|
|
1150
|
+
"block",
|
|
1151
|
+
g,
|
|
1152
|
+
r
|
|
1153
|
+
), o.label && (await at(e, {
|
|
1154
|
+
...o,
|
|
1155
|
+
label: o.label,
|
|
1156
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
1157
|
+
arrowTypeEnd: o.arrowTypeEnd,
|
|
1158
|
+
arrowTypeStart: o.arrowTypeStart
|
|
1159
|
+
}), await lt(
|
|
1160
|
+
{ ...o, x: w[1].x, y: w[1].y },
|
|
1161
|
+
{
|
|
1162
|
+
originalPath: w
|
|
1163
|
+
}
|
|
1164
|
+
));
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
const D = ((xe = (Se = Te()) == null ? void 0 : Se.block) == null ? void 0 : xe.padding) || 8;
|
|
1169
|
+
function is(e, s) {
|
|
1170
|
+
if (e === 0 || !Number.isInteger(e))
|
|
1171
|
+
throw new Error("Columns must be an integer !== 0.");
|
|
1172
|
+
if (s < 0 || !Number.isInteger(s))
|
|
1173
|
+
throw new Error("Position must be a non-negative integer." + s);
|
|
1174
|
+
if (e < 0)
|
|
1175
|
+
return { px: s, py: 0 };
|
|
1176
|
+
if (e === 1)
|
|
1177
|
+
return { px: 0, py: s };
|
|
1178
|
+
const l = s % e, c = Math.floor(s / e);
|
|
1179
|
+
return { px: l, py: c };
|
|
1180
|
+
}
|
|
1181
|
+
const as = (e) => {
|
|
1182
|
+
let s = 0, l = 0;
|
|
1183
|
+
for (const c of e.children) {
|
|
1184
|
+
const { width: r, height: g, x: o, y: p } = c.size || { width: 0, height: 0, x: 0, y: 0 };
|
|
1185
|
+
x.debug(
|
|
1186
|
+
"getMaxChildSize abc95 child:",
|
|
1187
|
+
c.id,
|
|
1188
|
+
"width:",
|
|
1189
|
+
r,
|
|
1190
|
+
"height:",
|
|
1191
|
+
g,
|
|
1192
|
+
"x:",
|
|
1193
|
+
o,
|
|
1194
|
+
"y:",
|
|
1195
|
+
p,
|
|
1196
|
+
c.type
|
|
1197
|
+
), c.type !== "space" && (r > s && (s = r / (e.widthInColumns || 1)), g > l && (l = g));
|
|
1198
|
+
}
|
|
1199
|
+
return { width: s, height: l };
|
|
1200
|
+
};
|
|
1201
|
+
function re(e, s, l = 0, c = 0) {
|
|
1202
|
+
var r, g, o, p, b, f, S, w, I, T, _;
|
|
1203
|
+
x.debug(
|
|
1204
|
+
"setBlockSizes abc95 (start)",
|
|
1205
|
+
e.id,
|
|
1206
|
+
(r = e == null ? void 0 : e.size) == null ? void 0 : r.x,
|
|
1207
|
+
"block width =",
|
|
1208
|
+
e == null ? void 0 : e.size,
|
|
1209
|
+
"sieblingWidth",
|
|
1210
|
+
l
|
|
1211
|
+
), (g = e == null ? void 0 : e.size) != null && g.width || (e.size = {
|
|
1212
|
+
width: l,
|
|
1213
|
+
height: c,
|
|
1214
|
+
x: 0,
|
|
1215
|
+
y: 0
|
|
1216
|
+
});
|
|
1217
|
+
let L = 0, m = 0;
|
|
1218
|
+
if (((o = e.children) == null ? void 0 : o.length) > 0) {
|
|
1219
|
+
for (const h of e.children)
|
|
1220
|
+
re(h, s);
|
|
1221
|
+
const R = as(e);
|
|
1222
|
+
L = R.width, m = R.height, x.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", L, m);
|
|
1223
|
+
for (const h of e.children)
|
|
1224
|
+
h.size && (x.debug(
|
|
1225
|
+
`abc95 Setting size of children of ${e.id} id=${h.id} ${L} ${m} ${h.size}`
|
|
1226
|
+
), h.size.width = L * (h.widthInColumns || 1) + D * ((h.widthInColumns || 1) - 1), h.size.height = m, h.size.x = 0, h.size.y = 0, x.debug(
|
|
1227
|
+
`abc95 updating size of ${e.id} children child:${h.id} maxWidth:${L} maxHeight:${m}`
|
|
1228
|
+
));
|
|
1229
|
+
for (const h of e.children)
|
|
1230
|
+
re(h, s, L, m);
|
|
1231
|
+
const O = e.columns || -1;
|
|
1232
|
+
let k = 0;
|
|
1233
|
+
for (const h of e.children)
|
|
1234
|
+
k += h.widthInColumns || 1;
|
|
1235
|
+
let u = e.children.length;
|
|
1236
|
+
O > 0 && O < k && (u = O), e.widthInColumns;
|
|
1237
|
+
const n = Math.ceil(k / u);
|
|
1238
|
+
let i = u * (L + D) + D, d = n * (m + D) + D;
|
|
1239
|
+
if (i < l) {
|
|
1240
|
+
x.debug(
|
|
1241
|
+
`Detected to small siebling: abc95 ${e.id} sieblingWidth ${l} sieblingHeight ${c} width ${i}`
|
|
1242
|
+
), i = l, d = c;
|
|
1243
|
+
const h = (l - u * D - D) / u, t = (c - n * D - D) / n;
|
|
1244
|
+
x.debug("Size indata abc88", e.id, "childWidth", h, "maxWidth", L), x.debug("Size indata abc88", e.id, "childHeight", t, "maxHeight", m), x.debug("Size indata abc88 xSize", u, "padding", D);
|
|
1245
|
+
for (const E of e.children)
|
|
1246
|
+
E.size && (E.size.width = h, E.size.height = t, E.size.x = 0, E.size.y = 0);
|
|
1247
|
+
}
|
|
1248
|
+
if (x.debug(
|
|
1249
|
+
`abc95 (finale calc) ${e.id} xSize ${u} ySize ${n} columns ${O}${e.children.length} width=${Math.max(i, ((p = e.size) == null ? void 0 : p.width) || 0)}`
|
|
1250
|
+
), i < (((b = e == null ? void 0 : e.size) == null ? void 0 : b.width) || 0)) {
|
|
1251
|
+
i = ((f = e == null ? void 0 : e.size) == null ? void 0 : f.width) || 0;
|
|
1252
|
+
const h = O > 0 ? Math.min(e.children.length, O) : e.children.length;
|
|
1253
|
+
if (h > 0) {
|
|
1254
|
+
const t = (i - h * D - D) / h;
|
|
1255
|
+
x.debug("abc95 (growing to fit) width", e.id, i, (S = e.size) == null ? void 0 : S.width, t);
|
|
1256
|
+
for (const E of e.children)
|
|
1257
|
+
E.size && (E.size.width = t);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
e.size = {
|
|
1261
|
+
width: i,
|
|
1262
|
+
height: d,
|
|
1263
|
+
x: 0,
|
|
1264
|
+
y: 0
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
x.debug(
|
|
1268
|
+
"setBlockSizes abc94 (done)",
|
|
1269
|
+
e.id,
|
|
1270
|
+
(w = e == null ? void 0 : e.size) == null ? void 0 : w.x,
|
|
1271
|
+
(I = e == null ? void 0 : e.size) == null ? void 0 : I.width,
|
|
1272
|
+
(T = e == null ? void 0 : e.size) == null ? void 0 : T.y,
|
|
1273
|
+
(_ = e == null ? void 0 : e.size) == null ? void 0 : _.height
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
function Be(e, s) {
|
|
1277
|
+
var l, c, r, g, o, p, b, f, S, w, I, T, _, L, m, R, O;
|
|
1278
|
+
x.debug(
|
|
1279
|
+
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(l = e == null ? void 0 : e.size) == null ? void 0 : l.x} y: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.y} width: ${(r = e == null ? void 0 : e.size) == null ? void 0 : r.width}`
|
|
1280
|
+
);
|
|
1281
|
+
const k = e.columns || -1;
|
|
1282
|
+
if (x.debug("layoutBlocks columns abc95", e.id, "=>", k, e), e.children && // find max width of children
|
|
1283
|
+
e.children.length > 0) {
|
|
1284
|
+
const u = ((o = (g = e == null ? void 0 : e.children[0]) == null ? void 0 : g.size) == null ? void 0 : o.width) || 0, n = e.children.length * u + (e.children.length - 1) * D;
|
|
1285
|
+
x.debug("widthOfChildren 88", n, "posX");
|
|
1286
|
+
let i = 0;
|
|
1287
|
+
x.debug("abc91 block?.size?.x", e.id, (p = e == null ? void 0 : e.size) == null ? void 0 : p.x);
|
|
1288
|
+
let d = (b = e == null ? void 0 : e.size) != null && b.x ? ((f = e == null ? void 0 : e.size) == null ? void 0 : f.x) + (-((S = e == null ? void 0 : e.size) == null ? void 0 : S.width) / 2 || 0) : -D, h = 0;
|
|
1289
|
+
for (const t of e.children) {
|
|
1290
|
+
const E = e;
|
|
1291
|
+
if (!t.size)
|
|
1292
|
+
continue;
|
|
1293
|
+
const { width: a, height: B } = t.size, { px: Y, py: P } = is(k, i);
|
|
1294
|
+
if (P != h && (h = P, d = (w = e == null ? void 0 : e.size) != null && w.x ? ((I = e == null ? void 0 : e.size) == null ? void 0 : I.x) + (-((T = e == null ? void 0 : e.size) == null ? void 0 : T.width) / 2 || 0) : -D, x.debug("New row in layout for block", e.id, " and child ", t.id, h)), x.debug(
|
|
1295
|
+
`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${P} (${(_ = E == null ? void 0 : E.size) == null ? void 0 : _.x},${(L = E == null ? void 0 : E.size) == null ? void 0 : L.y}) parent: ${E.id} width: ${a}${D}`
|
|
1296
|
+
), E.size) {
|
|
1297
|
+
const v = a / 2;
|
|
1298
|
+
t.size.x = d + D + v, x.debug(
|
|
1299
|
+
`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${d} new startingPosX${t.size.x} ${v} padding=${D} width=${a} halfWidth=${v} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${a * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
|
|
1300
|
+
), d = t.size.x + v, t.size.y = E.size.y - E.size.height / 2 + P * (B + D) + B / 2 + D, x.debug(
|
|
1301
|
+
`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${d}${D}${v}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${a * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
t.children && Be(t), i += (t == null ? void 0 : t.widthInColumns) || 1, x.debug("abc88 columnsPos", t, i);
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
x.debug(
|
|
1308
|
+
`layout blocks (<==layoutBlocks) ${e.id} x: ${(m = e == null ? void 0 : e.size) == null ? void 0 : m.x} y: ${(R = e == null ? void 0 : e.size) == null ? void 0 : R.y} width: ${(O = e == null ? void 0 : e.size) == null ? void 0 : O.width}`
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
function je(e, { minX: s, minY: l, maxX: c, maxY: r } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1312
|
+
if (e.size && e.id !== "root") {
|
|
1313
|
+
const { x: g, y: o, width: p, height: b } = e.size;
|
|
1314
|
+
g - p / 2 < s && (s = g - p / 2), o - b / 2 < l && (l = o - b / 2), g + p / 2 > c && (c = g + p / 2), o + b / 2 > r && (r = o + b / 2);
|
|
1315
|
+
}
|
|
1316
|
+
if (e.children)
|
|
1317
|
+
for (const g of e.children)
|
|
1318
|
+
({ minX: s, minY: l, maxX: c, maxY: r } = je(g, { minX: s, minY: l, maxX: c, maxY: r }));
|
|
1319
|
+
return { minX: s, minY: l, maxX: c, maxY: r };
|
|
1320
|
+
}
|
|
1321
|
+
function ls(e) {
|
|
1322
|
+
const s = e.getBlock("root");
|
|
1323
|
+
if (!s)
|
|
1324
|
+
return;
|
|
1325
|
+
re(s, e, 0, 0), Be(s), x.debug("getBlocks", JSON.stringify(s, null, 2));
|
|
1326
|
+
const { minX: l, minY: c, maxX: r, maxY: g } = je(s), o = g - c, p = r - l;
|
|
1327
|
+
return { x: l, y: c, width: p, height: o };
|
|
1328
|
+
}
|
|
1329
|
+
const os = function(e, s) {
|
|
1330
|
+
return s.db.getClasses();
|
|
1331
|
+
}, cs = async function(e, s, l, c) {
|
|
1332
|
+
const { securityLevel: r, block: g } = ae(), o = c.db;
|
|
1333
|
+
let p;
|
|
1334
|
+
r === "sandbox" && (p = q("#i" + s));
|
|
1335
|
+
const b = r === "sandbox" ? q(p.nodes()[0].contentDocument.body) : q("body"), f = r === "sandbox" ? b.select(`[id="${s}"]`) : q(`[id="${s}"]`);
|
|
1336
|
+
rt(f, ["point", "circle", "cross"], c.type, s);
|
|
1337
|
+
const w = o.getBlocks(), I = o.getBlocksFlat(), T = o.getEdges(), _ = f.insert("g").attr("class", "block");
|
|
1338
|
+
await ns(_, w, o);
|
|
1339
|
+
const L = ls(o);
|
|
1340
|
+
if (await ss(_, w, o), await rs(_, T, I, o, s), L) {
|
|
1341
|
+
const m = L, R = Math.max(1, Math.round(0.125 * (m.width / m.height))), O = m.height + R + 10, k = m.width + 10, { useMaxWidth: u } = g;
|
|
1342
|
+
et(f, O, k, !!u), x.debug("Here Bounds", L, m), f.attr(
|
|
1343
|
+
"viewBox",
|
|
1344
|
+
`${m.x - 5} ${m.y - 5} ${m.width + 10} ${m.height + 10}`
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
dt(gt);
|
|
1348
|
+
}, us = {
|
|
1349
|
+
draw: cs,
|
|
1350
|
+
getClasses: os
|
|
1351
|
+
}, xs = {
|
|
1352
|
+
parser: On,
|
|
1353
|
+
db: Jn,
|
|
1354
|
+
renderer: us,
|
|
1355
|
+
styles: $n
|
|
1356
|
+
};
|
|
1357
|
+
export {
|
|
1358
|
+
xs as diagram
|
|
1359
|
+
};
|