@layers-app/editor 0.7.18 → 0.7.21
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/index.cjs +2 -2
- package/dist/index.d.ts +77 -1
- package/dist/index.js +15 -9
- package/dist/layers.-s__T3tP.js +1 -0
- package/dist/layers.04i4fkj7.js +6 -0
- package/dist/layers.1SzEqGRR.js +41 -0
- package/dist/layers.2dTBEhuc.js +2 -0
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.58bCw_aL.js +4 -0
- package/dist/layers.5RtCiK8q.js +9 -0
- package/dist/layers.69cwQogW.js +40 -0
- package/dist/layers.6QD9G4kN.js +3 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.86s2RIyn.js +8 -0
- package/dist/layers.8Sq63dkZ.js +27040 -0
- package/dist/layers.9j1NNMqz.js +22 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.AYn1Jxgj.js +8 -0
- package/dist/layers.B-Fl_3EP.js +32 -0
- package/dist/layers.B0Xg4d5i.js +7 -0
- package/dist/layers.B0lSXbHP.js +10 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B3-xvp4C.js +39 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B3JU7UM6.js +2 -0
- package/dist/layers.B3gbBlxh.js +84 -0
- package/dist/layers.B4y9a-82.js +1 -0
- package/dist/layers.B5HBOY_H.js +37 -0
- package/dist/layers.B5gZXeOB.js +960 -0
- package/dist/layers.B7K7JjK6.js +1510 -0
- package/dist/layers.B7OVZYzM.js +1 -0
- package/dist/layers.B7a0NihO.js +32 -0
- package/dist/layers.B9bIdW-1.js +8 -0
- package/dist/layers.BAbr267F.js +8 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BE3zY9BD.js +7 -0
- package/dist/layers.BENQ0QOR.js +37 -0
- package/dist/layers.BEsv0Vnh.js +10 -0
- package/dist/layers.BGVB62eh.js +10 -0
- package/dist/layers.BHbCCtHz.js +41 -0
- package/dist/layers.BHnnpXsE.js +794 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BJDrjORS.js +244 -0
- package/dist/layers.BKP1mQ8Z.js +11 -0
- package/dist/layers.BLUIfQT4.js +11 -0
- package/dist/layers.BLd2spTm.js +1 -0
- package/dist/layers.BLwsSbt1.js +5 -0
- package/dist/layers.BPo1StNd.js +10 -0
- package/dist/layers.BQOvCWpV.js +2966 -0
- package/dist/layers.BRj7WXSC.js +1268 -0
- package/dist/layers.BSOcI_W1.js +271 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BU7Z5I9s.js +38 -0
- package/dist/layers.BVP5J-o1.js +257 -0
- package/dist/layers.BW2tS16y.js +9 -0
- package/dist/layers.BWg0ESYB.js +10 -0
- package/dist/layers.BXK1dt1S.js +38 -0
- package/dist/layers.BXTk_2Zm.js +118 -0
- package/dist/layers.BXe_WrOI.js +223 -0
- package/dist/layers.BXqUT1rh.js +1 -0
- package/dist/layers.Ba2h-Mfy.js +8 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.Bc0qQQCc.js +1089 -0
- package/dist/layers.Bci9vDR2.js +6 -0
- package/dist/layers.Bcv8luEU.js +40 -0
- package/dist/layers.BearaZFa.js +1 -0
- package/dist/layers.Bfe4gpo5.js +41 -0
- package/dist/layers.BjO63vzU.js +4 -0
- package/dist/layers.Bl2p9wCy.js +10 -0
- package/dist/layers.BoVXqWbw.js +7 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.BqD_vPBO.js +32 -0
- package/dist/layers.BqG-mFfW.js +129 -0
- package/dist/layers.BrEfKAWB.js +8 -0
- package/dist/layers.BtA2IPBg.js +2482 -0
- package/dist/layers.BuCZq_Yw.js +1088 -0
- package/dist/layers.BuidC-N0.js +7 -0
- package/dist/layers.BwCq95j_.js +323 -0
- package/dist/layers.BxlM82Ik.js +42 -0
- package/dist/layers.BzuIw3LZ.js +1 -0
- package/dist/layers.C14GGmi8.js +1034 -0
- package/dist/layers.C2-FVR7k.js +40 -0
- package/dist/layers.C7dDGsdF.js +42 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.C8bZft3d.js +1 -0
- package/dist/layers.CAGUssIj.js +39 -0
- package/dist/layers.CBhcfmKp.js +5 -0
- package/dist/layers.CBpxlm8J.js +1 -0
- package/dist/layers.CCi4tZEO.js +40 -0
- package/dist/layers.CCoKyGC6.js +423 -0
- package/dist/layers.CCyL2a0C.js +32 -0
- package/dist/layers.CHPa6_hS.js +1 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CLe82baP.js +38 -0
- package/dist/layers.CPMeVdt2.js +41 -0
- package/dist/layers.CQu2Kko1.js +139 -0
- package/dist/layers.CU-OGZof.js +41 -0
- package/dist/layers.CUP8yh26.js +9 -0
- package/dist/layers.CW0o_41a.js +36 -0
- package/dist/layers.CXxqYC1P.js +32 -0
- package/dist/layers.CYc8mNrI.js +8 -0
- package/dist/layers.CYotqhj5.js +1 -0
- package/dist/layers.C_IvrzZ3.js +7 -0
- package/dist/layers.C_nzdIcU.js +796 -0
- package/dist/layers.CaZtZB64.js +52 -0
- package/dist/layers.Ca_1CfOY.js +37 -0
- package/dist/layers.CanwFigF.js +11 -0
- package/dist/layers.Cb3j9TFj.js +198 -0
- package/dist/layers.CcPt099-.js +2238 -0
- package/dist/layers.CcbyELpn.js +39 -0
- package/dist/layers.Cd4iO7WE.js +437 -0
- package/dist/layers.Ce-Nta51.js +122 -0
- package/dist/layers.Cf67WsyM.js +116 -0
- package/dist/layers.CfwLs1b3.js +37 -0
- package/dist/layers.CgY2NiOs.js +76 -0
- package/dist/layers.Cgh_u2i4.js +96 -0
- package/dist/layers.CguGzf0B.js +48149 -0
- package/dist/layers.CjQa4sdf.js +1 -0
- package/dist/layers.Cl5Z_Igi.js +1 -0
- package/dist/layers.Cl6FTJOT.js +61 -0
- package/dist/layers.ClqPdhw8.js +10 -0
- package/dist/layers.CltSFkYd.js +9 -0
- package/dist/{layers.D99OBX9u.js → layers.CmSzOG_o.js} +88 -86
- package/dist/layers.CmknWZiw.js +41 -0
- package/dist/layers.CnEOgwwC.js +39 -0
- package/dist/layers.CoGQvGYd.js +1 -0
- package/dist/layers.CpUEfi8o.js +36 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.CusQc89U.js +4 -0
- package/dist/layers.Cv99Mgzq.js +11 -0
- package/dist/layers.CvsQlQrZ.js +295 -0
- package/dist/layers.Cxwmnhaz.js +13 -0
- package/dist/layers.Cyzu9PKQ.js +1 -0
- package/dist/layers.D-0SV7pN.js +39 -0
- package/dist/layers.D-Igy3Ua.js +40 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D1LcBaAa.js +8 -0
- package/dist/layers.D1uJtsEg.js +41 -0
- package/dist/layers.D2zC70FX.js +2 -0
- package/dist/layers.D3bZoMx9.js +160 -0
- package/dist/layers.D4MKjja_.js +14 -0
- package/dist/layers.D4T8fTcj.js +1223 -0
- package/dist/layers.D6RxNPR2.js +1 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D7kC0dCu.js +40 -0
- package/dist/layers.DCXvGSyA.js +271 -0
- package/dist/layers.DFQczRzZ.js +1286 -0
- package/dist/layers.DFQlsoOR.js +934 -0
- package/dist/layers.DHLN2SKV.js +213 -0
- package/dist/layers.DI1Px4LZ.js +1583 -0
- package/dist/layers.DIBXDI6n.js +11 -0
- package/dist/layers.DIZ_l0f6.js +1619 -0
- package/dist/layers.DIv8Ha88.js +6 -0
- package/dist/layers.DJ4l6yZ3.js +1 -0
- package/dist/layers.DJBIRB9P.js +40 -0
- package/dist/layers.DJO_9mJR.js +4 -0
- package/dist/layers.DJPr9JJL.js +806 -0
- package/dist/layers.DLa3syby.js +10 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DN-DRFO4.js +33 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DOIO1344.js +42 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DR0_dy2n.js +772 -0
- package/dist/layers.DS-UxTef.js +205 -0
- package/dist/layers.DSKXf25Y.js +51 -0
- package/dist/layers.DSnFA-e0.js +36 -0
- package/dist/layers.DV8OLPia.js +35 -0
- package/dist/layers.DV9x_QzT.js +42 -0
- package/dist/layers.DXSbtNid.js +84 -0
- package/dist/layers.DYYItiu_.js +7 -0
- package/dist/layers.DYhtNvuX.js +65 -0
- package/dist/layers.DYiXaBMd.js +5 -0
- package/dist/layers.D_dfc6vG.js +139 -0
- package/dist/layers.D_zh-C-v.js +44 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.Dfi_IB-0.js +1 -0
- package/dist/layers.Dj5SqV0K.js +1126 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.Dl7SEeb9.js +373 -0
- package/dist/layers.DlaGxCQI.js +6 -0
- package/dist/layers.DlseyPwp.js +9 -0
- package/dist/layers.DmxpB0Ld.js +39 -0
- package/dist/layers.Dn9sJSEy.js +1 -0
- package/dist/layers.DoTYGKth.js +9 -0
- package/dist/layers.Dof3PZvm.js +1 -0
- package/dist/layers.Doi5KI9F.js +1 -0
- package/dist/layers.Dq4zYIfC.js +7 -0
- package/dist/layers.DqHBlOg-.js +21941 -0
- package/dist/layers.DqpUYYTt.js +6 -0
- package/dist/layers.DrXdyG3Q.js +805 -0
- package/dist/layers.DrY_iQOk.js +70 -0
- package/dist/layers.Dtfu1_0i.js +35 -0
- package/dist/layers.DudnxBYL.js +8583 -0
- package/dist/layers.Dur5__LU.js +5 -0
- package/dist/layers.DwbZ0BBM.js +8 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.DyswrxrZ.js +41 -0
- package/dist/layers.FxMjbkmf.js +34 -0
- package/dist/layers.HxXfnDxz.js +21336 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.JdaN319C.js +1 -0
- package/dist/layers.JfY-At5A.js +7 -0
- package/dist/layers.MKp36N_b.js +36 -0
- package/dist/layers.OGmEyOFd.js +9 -0
- package/dist/layers.P0VXEM5n.js +9 -0
- package/dist/layers.PY5vr5EY.js +1 -0
- package/dist/layers.QfqvN0di.js +33 -0
- package/dist/layers.R8mPlCA0.js +261 -0
- package/dist/layers.Tp_UAZiz.js +5 -0
- package/dist/layers.UmFryx8m.js +1 -0
- package/dist/layers.VIA8sOZr.js +207 -0
- package/dist/layers.W54fHbsH.js +9 -0
- package/dist/layers.XQKBFj8F.js +40 -0
- package/dist/layers.Xuid21m7.js +10 -0
- package/dist/layers.YTXUQK8S.js +39 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.b9B2NY7n.js +11690 -0
- package/dist/layers.bgNJ7rmI.js +7 -0
- package/dist/layers.cxMp5Xa0.js +40 -0
- package/dist/layers.fV5OYtz9.js +32 -0
- package/dist/layers.goR33Dn9.js +907 -0
- package/dist/layers.hHZAR7op.js +10 -0
- package/dist/layers.iD1IDlF-.js +8 -0
- package/dist/layers.icLvHK2o.js +504 -0
- package/dist/layers.jk1Y4Qup.js +6 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.lW1mE-6u.js +1 -0
- package/dist/layers.lgiOeULL.js +39 -0
- package/dist/layers.mzdQbLys.js +40 -0
- package/dist/layers.nVLjsNoD.js +425 -0
- package/dist/layers.nf66LION.js +39 -0
- package/dist/layers.qLka9pGz.js +189 -0
- package/dist/layers.sP6EpGSd.js +1 -0
- package/dist/layers.uXNouSNW.js +1 -0
- package/dist/layers.uiGbxBln.js +42 -0
- package/dist/layers.wYs3Gn-e.js +9 -0
- package/dist/layers.ysXw42a5.js +35 -0
- package/dist/layers.z25N8Ql-.js +1225 -0
- package/package.json +2 -2
- package/dist/layers.94hwidA2.js +0 -198
- package/dist/layers.B4l6ta1Q.js +0 -1
- package/dist/layers.BMrOAD_P.js +0 -1
- package/dist/layers.DOzLBYZr.js +0 -304
- package/dist/layers.YRyXopy_.js +0 -151
- package/dist/layers.usKC_Id5.js +0 -1
- package/dist/layers.zu-IYGYU.js +0 -47463
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import { H as J, a as rt, s as at, b as lt, c as ot, n as ct, o as ht, l as et, g as it, a7 as ut, A as yt, T as ft, e as pt, i as gt, q as dt, P as mt } from "./layers.DudnxBYL.js";
|
|
2
|
+
import "./layers.HxXfnDxz.js";
|
|
3
|
+
import "lodash-es/memoize.js";
|
|
4
|
+
import "lodash-es/merge.js";
|
|
5
|
+
import "lodash-es/isEmpty.js";
|
|
6
|
+
import { a as tt } from "./layers.B3gbBlxh.js";
|
|
7
|
+
import { o as _t } from "./layers.b0h5ZBmD.js";
|
|
8
|
+
import { a as xt } from "./layers.CqVTtuYm.js";
|
|
9
|
+
import { c as F } from "./layers.DLwuMfdd.js";
|
|
10
|
+
function kt(e, u) {
|
|
11
|
+
return u < e ? -1 : u > e ? 1 : u >= e ? 0 : NaN;
|
|
12
|
+
}
|
|
13
|
+
function vt(e) {
|
|
14
|
+
return e;
|
|
15
|
+
}
|
|
16
|
+
function bt() {
|
|
17
|
+
var e = vt, u = kt, $ = null, p = F(0), g = F(J), A = F(0);
|
|
18
|
+
function y(a) {
|
|
19
|
+
var l, d = (a = xt(a)).length, k, I, T = 0, m = new Array(d), v = new Array(d), c = +p.apply(this, arguments), E = Math.min(J, Math.max(-J, g.apply(this, arguments) - c)), O, w = Math.min(Math.abs(E) / d, A.apply(this, arguments)), b = w * (E < 0 ? -1 : 1), t;
|
|
20
|
+
for (l = 0; l < d; ++l)
|
|
21
|
+
(t = v[m[l] = l] = +e(a[l], l, a)) > 0 && (T += t);
|
|
22
|
+
for (u != null ? m.sort(function(i, n) {
|
|
23
|
+
return u(v[i], v[n]);
|
|
24
|
+
}) : $ != null && m.sort(function(i, n) {
|
|
25
|
+
return $(a[i], a[n]);
|
|
26
|
+
}), l = 0, I = T ? (E - d * b) / T : 0; l < d; ++l, c = O)
|
|
27
|
+
k = m[l], t = v[k], O = c + (t > 0 ? t * I : 0) + b, v[k] = {
|
|
28
|
+
data: a[k],
|
|
29
|
+
index: l,
|
|
30
|
+
value: t,
|
|
31
|
+
startAngle: c,
|
|
32
|
+
endAngle: O,
|
|
33
|
+
padAngle: w
|
|
34
|
+
};
|
|
35
|
+
return v;
|
|
36
|
+
}
|
|
37
|
+
return y.value = function(a) {
|
|
38
|
+
return arguments.length ? (e = typeof a == "function" ? a : F(+a), y) : e;
|
|
39
|
+
}, y.sortValues = function(a) {
|
|
40
|
+
return arguments.length ? (u = a, $ = null, y) : u;
|
|
41
|
+
}, y.sort = function(a) {
|
|
42
|
+
return arguments.length ? ($ = a, u = null, y) : $;
|
|
43
|
+
}, y.startAngle = function(a) {
|
|
44
|
+
return arguments.length ? (p = typeof a == "function" ? a : F(+a), y) : p;
|
|
45
|
+
}, y.endAngle = function(a) {
|
|
46
|
+
return arguments.length ? (g = typeof a == "function" ? a : F(+a), y) : g;
|
|
47
|
+
}, y.padAngle = function(a) {
|
|
48
|
+
return arguments.length ? (A = typeof a == "function" ? a : F(+a), y) : A;
|
|
49
|
+
}, y;
|
|
50
|
+
}
|
|
51
|
+
var K = (function() {
|
|
52
|
+
var e = function(b, t, i, n) {
|
|
53
|
+
for (i = i || {}, n = b.length; n--; i[b[n]] = t)
|
|
54
|
+
;
|
|
55
|
+
return i;
|
|
56
|
+
}, u = [1, 3], $ = [1, 4], p = [1, 5], g = [1, 6], A = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], y = [2, 4], a = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], l = [20, 21, 22], d = [2, 7], k = [1, 12], I = [1, 13], T = [1, 14], m = [1, 15], v = [1, 16], c = [1, 17], E = {
|
|
57
|
+
trace: function() {
|
|
58
|
+
},
|
|
59
|
+
yy: {},
|
|
60
|
+
symbols_: { error: 2, start: 3, eol: 4, PIE: 5, document: 6, showData: 7, line: 8, statement: 9, txt: 10, value: 11, title: 12, title_value: 13, acc_title: 14, acc_title_value: 15, acc_descr: 16, acc_descr_value: 17, acc_descr_multiline_value: 18, section: 19, NEWLINE: 20, ";": 21, EOF: 22, $accept: 0, $end: 1 },
|
|
61
|
+
terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" },
|
|
62
|
+
productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]],
|
|
63
|
+
performAction: function(t, i, n, r, o, s, P) {
|
|
64
|
+
var _ = s.length - 1;
|
|
65
|
+
switch (o) {
|
|
66
|
+
case 3:
|
|
67
|
+
r.setShowData(!0);
|
|
68
|
+
break;
|
|
69
|
+
case 6:
|
|
70
|
+
this.$ = s[_ - 1];
|
|
71
|
+
break;
|
|
72
|
+
case 8:
|
|
73
|
+
r.addSection(s[_ - 1], r.cleanupValue(s[_]));
|
|
74
|
+
break;
|
|
75
|
+
case 9:
|
|
76
|
+
this.$ = s[_].trim(), r.setDiagramTitle(this.$);
|
|
77
|
+
break;
|
|
78
|
+
case 10:
|
|
79
|
+
this.$ = s[_].trim(), r.setAccTitle(this.$);
|
|
80
|
+
break;
|
|
81
|
+
case 11:
|
|
82
|
+
case 12:
|
|
83
|
+
this.$ = s[_].trim(), r.setAccDescription(this.$);
|
|
84
|
+
break;
|
|
85
|
+
case 13:
|
|
86
|
+
r.addSection(s[_].substr(8)), this.$ = s[_].substr(8);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
table: [{ 3: 1, 4: 2, 5: u, 20: $, 21: p, 22: g }, { 1: [3] }, { 3: 7, 4: 2, 5: u, 20: $, 21: p, 22: g }, e(A, y, { 6: 8, 7: [1, 9] }), e(a, [2, 14]), e(a, [2, 15]), e(a, [2, 16]), { 1: [2, 1] }, e(l, d, { 8: 10, 9: 11, 1: [2, 2], 10: k, 12: I, 14: T, 16: m, 18: v, 19: c }), e(A, y, { 6: 18 }), e(A, [2, 5]), { 4: 19, 20: $, 21: p, 22: g }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, e(l, [2, 12]), e(l, [2, 13]), e(l, d, { 8: 10, 9: 11, 1: [2, 3], 10: k, 12: I, 14: T, 16: m, 18: v, 19: c }), e(A, [2, 6]), e(l, [2, 8]), e(l, [2, 9]), e(l, [2, 10]), e(l, [2, 11])],
|
|
91
|
+
defaultActions: { 7: [2, 1] },
|
|
92
|
+
parseError: function(t, i) {
|
|
93
|
+
if (i.recoverable)
|
|
94
|
+
this.trace(t);
|
|
95
|
+
else {
|
|
96
|
+
var n = new Error(t);
|
|
97
|
+
throw n.hash = i, n;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
parse: function(t) {
|
|
101
|
+
var i = this, n = [0], r = [], o = [null], s = [], P = this.table, _ = "", f = 0, V = 0, R = 2, M = 1, B = s.slice.call(arguments, 1), h = Object.create(this.lexer), N = { yy: {} };
|
|
102
|
+
for (var Y in this.yy)
|
|
103
|
+
Object.prototype.hasOwnProperty.call(this.yy, Y) && (N.yy[Y] = this.yy[Y]);
|
|
104
|
+
h.setInput(t, N.yy), N.yy.lexer = h, N.yy.parser = this, typeof h.yylloc > "u" && (h.yylloc = {});
|
|
105
|
+
var q = h.yylloc;
|
|
106
|
+
s.push(q);
|
|
107
|
+
var nt = h.options && h.options.ranges;
|
|
108
|
+
typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
109
|
+
function st() {
|
|
110
|
+
var C;
|
|
111
|
+
return C = r.pop() || h.lex() || M, typeof C != "number" && (C instanceof Array && (r = C, C = r.pop()), C = i.symbols_[C] || C), C;
|
|
112
|
+
}
|
|
113
|
+
for (var x, L, S, H, z = {}, j, D, X, W; ; ) {
|
|
114
|
+
if (L = n[n.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((x === null || typeof x > "u") && (x = st()), S = P[L] && P[L][x]), typeof S > "u" || !S.length || !S[0]) {
|
|
115
|
+
var Z = "";
|
|
116
|
+
W = [];
|
|
117
|
+
for (j in P[L])
|
|
118
|
+
this.terminals_[j] && j > R && W.push("'" + this.terminals_[j] + "'");
|
|
119
|
+
h.showPosition ? Z = "Parse error on line " + (f + 1) + `:
|
|
120
|
+
` + h.showPosition() + `
|
|
121
|
+
Expecting ` + W.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : Z = "Parse error on line " + (f + 1) + ": Unexpected " + (x == M ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(Z, {
|
|
122
|
+
text: h.match,
|
|
123
|
+
token: this.terminals_[x] || x,
|
|
124
|
+
line: h.yylineno,
|
|
125
|
+
loc: q,
|
|
126
|
+
expected: W
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (S[0] instanceof Array && S.length > 1)
|
|
130
|
+
throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + x);
|
|
131
|
+
switch (S[0]) {
|
|
132
|
+
case 1:
|
|
133
|
+
n.push(x), o.push(h.yytext), s.push(h.yylloc), n.push(S[1]), x = null, V = h.yyleng, _ = h.yytext, f = h.yylineno, q = h.yylloc;
|
|
134
|
+
break;
|
|
135
|
+
case 2:
|
|
136
|
+
if (D = this.productions_[S[1]][1], z.$ = o[o.length - D], z._$ = {
|
|
137
|
+
first_line: s[s.length - (D || 1)].first_line,
|
|
138
|
+
last_line: s[s.length - 1].last_line,
|
|
139
|
+
first_column: s[s.length - (D || 1)].first_column,
|
|
140
|
+
last_column: s[s.length - 1].last_column
|
|
141
|
+
}, nt && (z._$.range = [
|
|
142
|
+
s[s.length - (D || 1)].range[0],
|
|
143
|
+
s[s.length - 1].range[1]
|
|
144
|
+
]), H = this.performAction.apply(z, [
|
|
145
|
+
_,
|
|
146
|
+
V,
|
|
147
|
+
f,
|
|
148
|
+
N.yy,
|
|
149
|
+
S[1],
|
|
150
|
+
o,
|
|
151
|
+
s
|
|
152
|
+
].concat(B)), typeof H < "u")
|
|
153
|
+
return H;
|
|
154
|
+
D && (n = n.slice(0, -1 * D * 2), o = o.slice(0, -1 * D), s = s.slice(0, -1 * D)), n.push(this.productions_[S[1]][0]), o.push(z.$), s.push(z._$), X = P[n[n.length - 2]][n[n.length - 1]], n.push(X);
|
|
155
|
+
break;
|
|
156
|
+
case 3:
|
|
157
|
+
return !0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return !0;
|
|
161
|
+
}
|
|
162
|
+
}, O = /* @__PURE__ */ (function() {
|
|
163
|
+
var b = {
|
|
164
|
+
EOF: 1,
|
|
165
|
+
parseError: function(i, n) {
|
|
166
|
+
if (this.yy.parser)
|
|
167
|
+
this.yy.parser.parseError(i, n);
|
|
168
|
+
else
|
|
169
|
+
throw new Error(i);
|
|
170
|
+
},
|
|
171
|
+
// resets the lexer, sets new input
|
|
172
|
+
setInput: function(t, i) {
|
|
173
|
+
return this.yy = i || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
174
|
+
first_line: 1,
|
|
175
|
+
first_column: 0,
|
|
176
|
+
last_line: 1,
|
|
177
|
+
last_column: 0
|
|
178
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
179
|
+
},
|
|
180
|
+
// consumes and returns one char from the input
|
|
181
|
+
input: function() {
|
|
182
|
+
var t = this._input[0];
|
|
183
|
+
this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
|
|
184
|
+
var i = t.match(/(?:\r\n?|\n).*/g);
|
|
185
|
+
return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
|
|
186
|
+
},
|
|
187
|
+
// unshifts one char (or a string) into the input
|
|
188
|
+
unput: function(t) {
|
|
189
|
+
var i = t.length, n = t.split(/(?:\r\n?|\n)/g);
|
|
190
|
+
this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
|
|
191
|
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
192
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
193
|
+
var o = this.yylloc.range;
|
|
194
|
+
return this.yylloc = {
|
|
195
|
+
first_line: this.yylloc.first_line,
|
|
196
|
+
last_line: this.yylineno + 1,
|
|
197
|
+
first_column: this.yylloc.first_column,
|
|
198
|
+
last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - i
|
|
199
|
+
}, this.options.ranges && (this.yylloc.range = [o[0], o[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
|
|
200
|
+
},
|
|
201
|
+
// When called from action, caches matched text and appends it on next action
|
|
202
|
+
more: function() {
|
|
203
|
+
return this._more = !0, this;
|
|
204
|
+
},
|
|
205
|
+
// 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.
|
|
206
|
+
reject: function() {
|
|
207
|
+
if (this.options.backtrack_lexer)
|
|
208
|
+
this._backtrack = !0;
|
|
209
|
+
else
|
|
210
|
+
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).
|
|
211
|
+
` + this.showPosition(), {
|
|
212
|
+
text: "",
|
|
213
|
+
token: null,
|
|
214
|
+
line: this.yylineno
|
|
215
|
+
});
|
|
216
|
+
return this;
|
|
217
|
+
},
|
|
218
|
+
// retain first n characters of the match
|
|
219
|
+
less: function(t) {
|
|
220
|
+
this.unput(this.match.slice(t));
|
|
221
|
+
},
|
|
222
|
+
// displays already matched input, i.e. for error messages
|
|
223
|
+
pastInput: function() {
|
|
224
|
+
var t = this.matched.substr(0, this.matched.length - this.match.length);
|
|
225
|
+
return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
|
|
226
|
+
},
|
|
227
|
+
// displays upcoming input, i.e. for error messages
|
|
228
|
+
upcomingInput: function() {
|
|
229
|
+
var t = this.match;
|
|
230
|
+
return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
231
|
+
},
|
|
232
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
233
|
+
showPosition: function() {
|
|
234
|
+
var t = this.pastInput(), i = new Array(t.length + 1).join("-");
|
|
235
|
+
return t + this.upcomingInput() + `
|
|
236
|
+
` + i + "^";
|
|
237
|
+
},
|
|
238
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
239
|
+
test_match: function(t, i) {
|
|
240
|
+
var n, r, o;
|
|
241
|
+
if (this.options.backtrack_lexer && (o = {
|
|
242
|
+
yylineno: this.yylineno,
|
|
243
|
+
yylloc: {
|
|
244
|
+
first_line: this.yylloc.first_line,
|
|
245
|
+
last_line: this.last_line,
|
|
246
|
+
first_column: this.yylloc.first_column,
|
|
247
|
+
last_column: this.yylloc.last_column
|
|
248
|
+
},
|
|
249
|
+
yytext: this.yytext,
|
|
250
|
+
match: this.match,
|
|
251
|
+
matches: this.matches,
|
|
252
|
+
matched: this.matched,
|
|
253
|
+
yyleng: this.yyleng,
|
|
254
|
+
offset: this.offset,
|
|
255
|
+
_more: this._more,
|
|
256
|
+
_input: this._input,
|
|
257
|
+
yy: this.yy,
|
|
258
|
+
conditionStack: this.conditionStack.slice(0),
|
|
259
|
+
done: this.done
|
|
260
|
+
}, this.options.ranges && (o.yylloc.range = this.yylloc.range.slice(0))), r = t[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
|
261
|
+
first_line: this.yylloc.last_line,
|
|
262
|
+
last_line: this.yylineno + 1,
|
|
263
|
+
first_column: this.yylloc.last_column,
|
|
264
|
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
|
|
265
|
+
}, this.yytext += t[0], this.match += t[0], this.matches = t, 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(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
266
|
+
return n;
|
|
267
|
+
if (this._backtrack) {
|
|
268
|
+
for (var s in o)
|
|
269
|
+
this[s] = o[s];
|
|
270
|
+
return !1;
|
|
271
|
+
}
|
|
272
|
+
return !1;
|
|
273
|
+
},
|
|
274
|
+
// return next match in input
|
|
275
|
+
next: function() {
|
|
276
|
+
if (this.done)
|
|
277
|
+
return this.EOF;
|
|
278
|
+
this._input || (this.done = !0);
|
|
279
|
+
var t, i, n, r;
|
|
280
|
+
this._more || (this.yytext = "", this.match = "");
|
|
281
|
+
for (var o = this._currentRules(), s = 0; s < o.length; s++)
|
|
282
|
+
if (n = this._input.match(this.rules[o[s]]), n && (!i || n[0].length > i[0].length)) {
|
|
283
|
+
if (i = n, r = s, this.options.backtrack_lexer) {
|
|
284
|
+
if (t = this.test_match(n, o[s]), t !== !1)
|
|
285
|
+
return t;
|
|
286
|
+
if (this._backtrack) {
|
|
287
|
+
i = !1;
|
|
288
|
+
continue;
|
|
289
|
+
} else
|
|
290
|
+
return !1;
|
|
291
|
+
} else if (!this.options.flex)
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
return i ? (t = this.test_match(i, o[r]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
295
|
+
` + this.showPosition(), {
|
|
296
|
+
text: "",
|
|
297
|
+
token: null,
|
|
298
|
+
line: this.yylineno
|
|
299
|
+
});
|
|
300
|
+
},
|
|
301
|
+
// return next match that has a token
|
|
302
|
+
lex: function() {
|
|
303
|
+
var i = this.next();
|
|
304
|
+
return i || this.lex();
|
|
305
|
+
},
|
|
306
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
307
|
+
begin: function(i) {
|
|
308
|
+
this.conditionStack.push(i);
|
|
309
|
+
},
|
|
310
|
+
// pop the previously active lexer condition state off the condition stack
|
|
311
|
+
popState: function() {
|
|
312
|
+
var i = this.conditionStack.length - 1;
|
|
313
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
314
|
+
},
|
|
315
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
316
|
+
_currentRules: function() {
|
|
317
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
318
|
+
},
|
|
319
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
320
|
+
topState: function(i) {
|
|
321
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
322
|
+
},
|
|
323
|
+
// alias for begin(condition)
|
|
324
|
+
pushState: function(i) {
|
|
325
|
+
this.begin(i);
|
|
326
|
+
},
|
|
327
|
+
// return the number of states currently on the stack
|
|
328
|
+
stateStackSize: function() {
|
|
329
|
+
return this.conditionStack.length;
|
|
330
|
+
},
|
|
331
|
+
options: { "case-insensitive": !0 },
|
|
332
|
+
performAction: function(i, n, r, o) {
|
|
333
|
+
switch (r) {
|
|
334
|
+
case 0:
|
|
335
|
+
break;
|
|
336
|
+
case 1:
|
|
337
|
+
break;
|
|
338
|
+
case 2:
|
|
339
|
+
return 20;
|
|
340
|
+
case 3:
|
|
341
|
+
break;
|
|
342
|
+
case 4:
|
|
343
|
+
break;
|
|
344
|
+
case 5:
|
|
345
|
+
return this.begin("title"), 12;
|
|
346
|
+
case 6:
|
|
347
|
+
return this.popState(), "title_value";
|
|
348
|
+
case 7:
|
|
349
|
+
return this.begin("acc_title"), 14;
|
|
350
|
+
case 8:
|
|
351
|
+
return this.popState(), "acc_title_value";
|
|
352
|
+
case 9:
|
|
353
|
+
return this.begin("acc_descr"), 16;
|
|
354
|
+
case 10:
|
|
355
|
+
return this.popState(), "acc_descr_value";
|
|
356
|
+
case 11:
|
|
357
|
+
this.begin("acc_descr_multiline");
|
|
358
|
+
break;
|
|
359
|
+
case 12:
|
|
360
|
+
this.popState();
|
|
361
|
+
break;
|
|
362
|
+
case 13:
|
|
363
|
+
return "acc_descr_multiline_value";
|
|
364
|
+
case 14:
|
|
365
|
+
this.begin("string");
|
|
366
|
+
break;
|
|
367
|
+
case 15:
|
|
368
|
+
this.popState();
|
|
369
|
+
break;
|
|
370
|
+
case 16:
|
|
371
|
+
return "txt";
|
|
372
|
+
case 17:
|
|
373
|
+
return 5;
|
|
374
|
+
case 18:
|
|
375
|
+
return 7;
|
|
376
|
+
case 19:
|
|
377
|
+
return "value";
|
|
378
|
+
case 20:
|
|
379
|
+
return 22;
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i],
|
|
383
|
+
conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [6], inclusive: !1 }, string: { rules: [15, 16], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], inclusive: !0 } }
|
|
384
|
+
};
|
|
385
|
+
return b;
|
|
386
|
+
})();
|
|
387
|
+
E.lexer = O;
|
|
388
|
+
function w() {
|
|
389
|
+
this.yy = {};
|
|
390
|
+
}
|
|
391
|
+
return w.prototype = E, E.Parser = w, new w();
|
|
392
|
+
})();
|
|
393
|
+
K.parser = K;
|
|
394
|
+
const St = K, $t = mt.pie, G = {
|
|
395
|
+
sections: {},
|
|
396
|
+
showData: !1
|
|
397
|
+
};
|
|
398
|
+
let U = G.sections, Q = G.showData;
|
|
399
|
+
const At = structuredClone($t), Et = () => structuredClone(At), wt = () => {
|
|
400
|
+
U = structuredClone(G.sections), Q = G.showData, dt();
|
|
401
|
+
}, Tt = (e, u) => {
|
|
402
|
+
e = gt(e, it()), U[e] === void 0 && (U[e] = u, et.debug(`added new section: ${e}, with value: ${u}`));
|
|
403
|
+
}, It = () => U, Dt = (e) => (e.substring(0, 1) === ":" && (e = e.substring(1).trim()), Number(e.trim())), Ct = (e) => {
|
|
404
|
+
Q = e;
|
|
405
|
+
}, Ot = () => Q, Pt = {
|
|
406
|
+
getConfig: Et,
|
|
407
|
+
clear: wt,
|
|
408
|
+
setDiagramTitle: ht,
|
|
409
|
+
getDiagramTitle: ct,
|
|
410
|
+
setAccTitle: ot,
|
|
411
|
+
getAccTitle: lt,
|
|
412
|
+
setAccDescription: at,
|
|
413
|
+
getAccDescription: rt,
|
|
414
|
+
addSection: Tt,
|
|
415
|
+
getSections: It,
|
|
416
|
+
cleanupValue: Dt,
|
|
417
|
+
setShowData: Ct,
|
|
418
|
+
getShowData: Ot
|
|
419
|
+
}, Vt = (e) => `
|
|
420
|
+
.pieCircle{
|
|
421
|
+
stroke: ${e.pieStrokeColor};
|
|
422
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
423
|
+
opacity : ${e.pieOpacity};
|
|
424
|
+
}
|
|
425
|
+
.pieOuterCircle{
|
|
426
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
427
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
428
|
+
fill: none;
|
|
429
|
+
}
|
|
430
|
+
.pieTitleText {
|
|
431
|
+
text-anchor: middle;
|
|
432
|
+
font-size: ${e.pieTitleTextSize};
|
|
433
|
+
fill: ${e.pieTitleTextColor};
|
|
434
|
+
font-family: ${e.fontFamily};
|
|
435
|
+
}
|
|
436
|
+
.slice {
|
|
437
|
+
font-family: ${e.fontFamily};
|
|
438
|
+
fill: ${e.pieSectionTextColor};
|
|
439
|
+
font-size:${e.pieSectionTextSize};
|
|
440
|
+
// fill: white;
|
|
441
|
+
}
|
|
442
|
+
.legend text {
|
|
443
|
+
fill: ${e.pieLegendTextColor};
|
|
444
|
+
font-family: ${e.fontFamily};
|
|
445
|
+
font-size: ${e.pieLegendTextSize};
|
|
446
|
+
}
|
|
447
|
+
`, Nt = Vt, Lt = (e) => {
|
|
448
|
+
const u = Object.entries(e).map((p) => ({
|
|
449
|
+
label: p[0],
|
|
450
|
+
value: p[1]
|
|
451
|
+
})).sort((p, g) => g.value - p.value);
|
|
452
|
+
return bt().value(
|
|
453
|
+
(p) => p.value
|
|
454
|
+
)(u);
|
|
455
|
+
}, Ft = (e, u, $, p) => {
|
|
456
|
+
et.debug(`rendering pie chart
|
|
457
|
+
` + e);
|
|
458
|
+
const g = p.db, A = it(), y = ut(g.getConfig(), A.pie), a = 40, l = 18, d = 4, k = 450, I = k, T = yt(u), m = T.append("g"), v = g.getSections();
|
|
459
|
+
m.attr("transform", "translate(" + I / 2 + "," + k / 2 + ")");
|
|
460
|
+
const { themeVariables: c } = A;
|
|
461
|
+
let [E] = ft(c.pieOuterStrokeWidth);
|
|
462
|
+
E ?? (E = 2);
|
|
463
|
+
const O = y.textPosition, w = Math.min(I, k) / 2 - a, b = tt().innerRadius(0).outerRadius(w), t = tt().innerRadius(w * O).outerRadius(w * O);
|
|
464
|
+
m.append("circle").attr("cx", 0).attr("cy", 0).attr("r", w + E / 2).attr("class", "pieOuterCircle");
|
|
465
|
+
const i = Lt(v), n = [
|
|
466
|
+
c.pie1,
|
|
467
|
+
c.pie2,
|
|
468
|
+
c.pie3,
|
|
469
|
+
c.pie4,
|
|
470
|
+
c.pie5,
|
|
471
|
+
c.pie6,
|
|
472
|
+
c.pie7,
|
|
473
|
+
c.pie8,
|
|
474
|
+
c.pie9,
|
|
475
|
+
c.pie10,
|
|
476
|
+
c.pie11,
|
|
477
|
+
c.pie12
|
|
478
|
+
], r = _t(n);
|
|
479
|
+
m.selectAll("mySlices").data(i).enter().append("path").attr("d", b).attr("fill", (f) => r(f.data.label)).attr("class", "pieCircle");
|
|
480
|
+
let o = 0;
|
|
481
|
+
Object.keys(v).forEach((f) => {
|
|
482
|
+
o += v[f];
|
|
483
|
+
}), m.selectAll("mySlices").data(i).enter().append("text").text((f) => (f.data.value / o * 100).toFixed(0) + "%").attr("transform", (f) => "translate(" + t.centroid(f) + ")").style("text-anchor", "middle").attr("class", "slice"), m.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
484
|
+
const s = m.selectAll(".legend").data(r.domain()).enter().append("g").attr("class", "legend").attr("transform", (f, V) => {
|
|
485
|
+
const R = l + d, M = R * r.domain().length / 2, B = 12 * l, h = V * R - M;
|
|
486
|
+
return "translate(" + B + "," + h + ")";
|
|
487
|
+
});
|
|
488
|
+
s.append("rect").attr("width", l).attr("height", l).style("fill", r).style("stroke", r), s.data(i).append("text").attr("x", l + d).attr("y", l - d).text((f) => {
|
|
489
|
+
const { label: V, value: R } = f.data;
|
|
490
|
+
return g.getShowData() ? `${V} [${R}]` : V;
|
|
491
|
+
});
|
|
492
|
+
const P = Math.max(
|
|
493
|
+
...s.selectAll("text").nodes().map((f) => (f == null ? void 0 : f.getBoundingClientRect().width) ?? 0)
|
|
494
|
+
), _ = I + a + l + d + P;
|
|
495
|
+
T.attr("viewBox", `0 0 ${_} ${k}`), pt(T, k, _, y.useMaxWidth);
|
|
496
|
+
}, Rt = { draw: Ft }, Ht = {
|
|
497
|
+
parser: St,
|
|
498
|
+
db: Pt,
|
|
499
|
+
renderer: Rt,
|
|
500
|
+
styles: Nt
|
|
501
|
+
};
|
|
502
|
+
export {
|
|
503
|
+
Ht as diagram
|
|
504
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var y = async (e, t = [{}], s = null, p = !1, o = null) => {
|
|
2
|
+
Array.isArray(t) || (t = [t]), t[0].fileName = t[0].fileName || "Untitled";
|
|
3
|
+
const n = [];
|
|
4
|
+
let i = null;
|
|
5
|
+
if (e instanceof Blob && e.type ? i = e.type : e.headers && e.headers.get("content-type") && (i = e.headers.get("content-type")), t.forEach((a, r) => {
|
|
6
|
+
n[r] = { description: a.description || "", accept: {} }, a.mimeTypes ? (r === 0 && i && a.mimeTypes.push(i), a.mimeTypes.map((d) => {
|
|
7
|
+
n[r].accept[d] = a.extensions || [];
|
|
8
|
+
})) : i && (n[r].accept[i] = a.extensions || []);
|
|
9
|
+
}), s) try {
|
|
10
|
+
await s.getFile();
|
|
11
|
+
} catch (a) {
|
|
12
|
+
if (s = null, p) throw a;
|
|
13
|
+
}
|
|
14
|
+
const c = s || await window.showSaveFilePicker({ suggestedName: t[0].fileName, id: t[0].id, startIn: t[0].startIn, types: n, excludeAcceptAllOption: t[0].excludeAcceptAllOption || !1 });
|
|
15
|
+
!s && o && o();
|
|
16
|
+
const l = await c.createWritable();
|
|
17
|
+
return "stream" in e ? (await e.stream().pipeTo(l), c) : "body" in e ? (await e.body.pipeTo(l), c) : (await l.write(await e), await l.close(), c);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
y as default
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const P=require("lodash-es"),J=require("./layers.Cyzu9PKQ.js"),k=require("./layers.BLd2spTm.js"),u=require("./layers.BjO63vzU.js"),i=require("./layers.Cgh_u2i4.js"),j=require("./layers.B0Xg4d5i.js");function G(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=G(P);function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:F(e)};return m.isUndefined(e.graph())||(t.value=m.clone(e.graph())),t}function M(e){return m.map(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m.isUndefined(n)||(s.value=n),m.isUndefined(r)||(s.parent=r),s})}function F(e){return m.map(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m.isUndefined(t.name)||(r.name=t.name),m.isUndefined(n)||(r.value=n),r})}let a={},w={},p={};const q=()=>{w={},p={},a={}},X=(e,t)=>(i.log$1.trace("In isDescendant",t," ",e," = ",w[t].includes(e)),!!w[t].includes(e)),_=(e,t)=>(i.log$1.info("Descendants of ",t," is ",w[t]),i.log$1.info("Edge is ",e),e.v===t||e.w===t?!1:w[t]?w[t].includes(e.v)||X(e.v,t)||X(e.w,t)||w[t].includes(e.w):(i.log$1.debug("Tilt, ",t,",not in descendants"),!1)),B=(e,t,n,r)=>{i.log$1.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.log$1.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)B(o,t,n,r);else{const f=t.node(o);i.log$1.info("cp ",o," to ",r," with parent ",e),n.setNode(o,f),r!==t.parent(o)&&(i.log$1.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==r&&o!==e?(i.log$1.debug("Setting parent",o,e),n.setParent(o,e)):(i.log$1.info("In copy ",e,"root",r,"data",t.node(e),r),i.log$1.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==r,"node!==clusterId",o!==e));const g=t.edges(o);i.log$1.debug("Copying Edges",g),g.forEach(d=>{i.log$1.info("Edge",d);const h=t.edge(d.v,d.w,d.name);i.log$1.info("Edge data",h,r);try{_(d,r)?(i.log$1.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),i.log$1.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.log$1.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch($){i.log$1.error($)}})}i.log$1.debug("Removing node",o),t.removeNode(o)})},D=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)p[s]=e,r=[...r,...D(s,t)];return r},C=(e,t)=>{i.log$1.trace("Searching",e);const n=t.children(e);if(i.log$1.trace("Searching children of id ",e,n),n.length<1)return i.log$1.trace("This is a valid node",e),e;for(const r of n){const s=C(r,t);if(s)return i.log$1.trace("Found replacement for",e," => ",s),s}},S=e=>!a[e]||!a[e].externalConnections?e:a[e]?a[e].id:e,U=(e,t)=>{if(!e||t>10){i.log$1.debug("Opting out, no graph ");return}else i.log$1.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.log$1.warn("Cluster identified",n," Replacement id in edges: ",C(n,e)),w[n]=D(n,e),a[n]={id:C(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.log$1.debug("Cluster identified",n,w),s.forEach(o=>{if(o.v!==n&&o.w!==n){const f=X(o.v,n),g=X(o.w,n);f^g&&(i.log$1.warn("Edge: ",o," leaves cluster ",n),i.log$1.warn("Descendants of XXX ",n,": ",w[n]),a[n].externalConnections=!0)}})):i.log$1.debug("Not a cluster ",n,w)});for(let n of Object.keys(a)){const r=a[n].id,s=e.parent(r);s!==n&&a[s]&&!a[s].externalConnections&&(a[n].id=s)}e.edges().forEach(function(n){const r=e.edge(n);i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(i.log$1.warn("Fix XXX",a,"ids:",n.v,n.w,"Translating: ",a[n.v]," --- ",a[n.w]),a[n.v]&&a[n.w]&&a[n.v]===a[n.w]){i.log$1.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name);const f=n.w+"---"+n.v;e.setNode(f,{domId:f,id:f,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const g=structuredClone(r),d=structuredClone(r);g.label="",g.arrowTypeEnd="none",d.label="",g.fromCluster=n.v,d.toCluster=n.v,e.setEdge(s,f,g,n.name+"-cyclic-special"),e.setEdge(f,o,d,n.name+"-cyclic-special")}else if(a[n.v]||a[n.w]){if(i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const f=e.parent(s);a[f].externalConnections=!0,r.fromCluster=n.v}if(o!==n.w){const f=e.parent(o);a[f].externalConnections=!0,r.toCluster=n.w}i.log$1.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,r,n.name)}}),i.log$1.warn("Adjusted Graph",x(e)),T(e,0),i.log$1.trace(a)},T=(e,t)=>{if(i.log$1.warn("extractor - ",t,x(e),e.children("D")),t>10){i.log$1.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const o=e.children(s);r=r||o.length>0}if(!r){i.log$1.debug("Done, no node has children",e.nodes());return}i.log$1.debug("Nodes = ",n,t);for(const s of n)if(i.log$1.debug("Extracting node",s,a,a[s]&&!a[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!a[s])i.log$1.debug("Not a cluster",s,t);else if(!a[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.log$1.warn("Cluster without external connections, without a parent and with children",s,t);let f=e.graph().rankdir==="TB"?"LR":"TB";a[s]&&a[s].clusterData&&a[s].clusterData.dir&&(f=a[s].clusterData.dir,i.log$1.warn("Fixing dir",a[s].clusterData.dir,f));const g=new k.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.log$1.warn("Old graph before copy",x(e)),B(s,e,g,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:a[s].clusterData,labelText:a[s].labelText,graph:g}),i.log$1.warn("New graph after copy node: (",s,")",x(g)),i.log$1.debug("Old graph after copy",x(e))}else i.log$1.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!a[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.log$1.debug(a);n=e.nodes(),i.log$1.warn("New list of nodes",n);for(const s of n){const o=e.node(s);i.log$1.warn(" Now next level",s,o),o.clusterNode&&T(o.graph,t+1)}},O=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),o=O(e,s);n=[...n,...o]}),n},A=e=>O(e,e.children()),H=(e,t)=>{i.log$1.info("Creating subgraph rect for ",t.id,t);const n=i.getConfig(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),s=r.insert("rect",":first-child"),o=i.evaluate(n.flowchart.htmlLabels),f=r.insert("g").attr("class","cluster-label"),g=t.labelType==="markdown"?j.createText(f,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):f.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}const h=0*t.padding,$=h/2,y=t.width<=d.width+h?d.width+h:t.width;t.width<=d.width+h?t.diff=(d.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.log$1.trace("Data ",t,JSON.stringify(t)),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-y/2).attr("y",t.y-t.height/2-$).attr("width",y).attr("height",t.height+h);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o?f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+N})`):f.attr("transform",`translate(${t.x}, ${t.y-t.height/2+N})`);const b=s.node().getBBox();return t.width=b.width,t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},V=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(g){return u.intersectRect$1(t,g)},n},z=(e,t)=>{const n=i.getConfig(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),s=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),f=r.append("rect"),g=o.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}d=g.getBBox();const h=0*t.padding,$=h/2,y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(d.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,s.attr("class","outer").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$).attr("width",y+h).attr("height",t.height+h),f.attr("class","inner").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$+d.height-1).attr("width",y+h).attr("height",t.height+h-d.height-3);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2-t.padding/3+(i.evaluate(n.flowchart.htmlLabels)?5:3)+N})`);const b=s.node().getBBox();return t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},W=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.diff=-t.padding/2,t.intersect=function(g){return u.intersectRect$1(t,g)},n},K={rect:H,roundedWithTitle:z,noteGroup:V,divider:W};let R={};const Q=(e,t)=>{i.log$1.trace("Inserting cluster");const n=t.shape||"rect";R[t.id]=K[n](e,t)},Y=()=>{R={}},L=async(e,t,n,r,s,o)=>{i.log$1.info("Graph in recursive render: XXX",x(t),s);const f=t.graph().rankdir;i.log$1.trace("Dir in recursive render - dir:",f);const g=e.insert("g").attr("class","root");t.nodes()?i.log$1.info("Recursive render XXX",t.nodes()):i.log$1.info("No nodes found for",t),t.edges().length>0&&i.log$1.trace("Recursive edges",t.edge(t.edges()[0]));const d=g.insert("g").attr("class","clusters"),h=g.insert("g").attr("class","edgePaths"),$=g.insert("g").attr("class","edgeLabels"),y=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(l){const c=t.node(l);if(s!==void 0){const v=JSON.parse(JSON.stringify(s.clusterData));i.log$1.info("Setting data for cluster XXX (",l,") ",v,s),t.setNode(s.id,v),t.parent(l)||(i.log$1.trace("Setting parent",l,s.id),t.setParent(l,s.id,v))}if(i.log$1.info("(Insert) Node XXX"+l+": "+JSON.stringify(t.node(l))),c&&c.clusterNode){i.log$1.info("Cluster identified",l,c.width,t.node(l));const v=await L(y,c.graph,n,r,t.node(l),o),E=v.elem;u.updateNodeBounds(c,E),c.diff=v.diff||0,i.log$1.info("Node bounds (abc123)",l,c,c.width,c.x,c.y),u.setNodeElem(E,c),i.log$1.warn("Recursive render complete ",E,c)}else t.children(l).length>0?(i.log$1.info("Cluster - the non recursive path XXX",l,c.id,c,t),i.log$1.info(C(c.id,t)),a[c.id]={id:C(c.id,t),node:c}):(i.log$1.info("Node - the non recursive path",l,c.id,c),await u.insertNode(y,t.node(l),f))})),t.edges().forEach(function(l){const c=t.edge(l.v,l.w,l.name);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l)),i.log$1.info("Edge "+l.v+" -> "+l.w+": ",l," ",JSON.stringify(t.edge(l))),i.log$1.info("Fix",a,"ids:",l.v,l.w,"Translating: ",a[l.v],a[l.w]),u.insertEdgeLabel($,c)}),t.edges().forEach(function(l){i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l))}),i.log$1.info("#############################################"),i.log$1.info("### Layout ###"),i.log$1.info("#############################################"),i.log$1.info(t),J.layout(t),i.log$1.info("Graph after layout:",x(t));let N=0;const{subGraphTitleTotalMargin:b}=u.getSubGraphTitleMargins(o);return A(t).forEach(function(l){const c=t.node(l);i.log$1.info("Position "+l+": "+JSON.stringify(t.node(l))),i.log$1.info("Position "+l+": ("+c.x,","+c.y,") width: ",c.width," height: ",c.height),c&&c.clusterNode?(c.y+=b,u.positionNode(c)):t.children(l).length>0?(c.height+=b,Q(d,c),a[c.id].node=c):(c.y+=b/2,u.positionNode(c))}),t.edges().forEach(function(l){const c=t.edge(l);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(c),c),c.points.forEach(E=>E.y+=b/2);const v=u.insertEdge(h,l,c,a,n,t,r);u.positionEdgeLabel(c,v)}),t.nodes().forEach(function(l){const c=t.node(l);i.log$1.info(l,c.type,c.diff),c.type==="group"&&(N=c.diff)}),{elem:g,diff:N}},Z=async(e,t,n,r,s)=>{u.insertMarkers$1(e,n,r,s),u.clear$1(),u.clear(),Y(),q(),i.log$1.warn("Graph at first:",JSON.stringify(x(t))),U(t),i.log$1.warn("Graph after:",JSON.stringify(x(t)));const o=i.getConfig();await L(e,t,r,s,void 0,o)};exports.render=Z;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { l as r, n as e, u as o, v as l, A as i, F as t, R as c, C as n, B as g, c as m, r as D, E as h, y as p, h as u, s as b, w as d, N as f, p as S, k, m as v, x, t as L, a as w, D as y, _ as C, f as E, S as P, I as B, g as q, i as z, b as A, T as F, L as I, d as N, z as R, P as T } from "./layers.HxXfnDxz.js";
|
|
2
|
+
export {
|
|
3
|
+
r as alerts,
|
|
4
|
+
e as buttons,
|
|
5
|
+
o as canvasError,
|
|
6
|
+
l as clearCanvasDialog,
|
|
7
|
+
i as colorPicker,
|
|
8
|
+
t as colors,
|
|
9
|
+
c as commandPalette,
|
|
10
|
+
n as confirmDialog,
|
|
11
|
+
g as default,
|
|
12
|
+
m as element,
|
|
13
|
+
D as elementLink,
|
|
14
|
+
h as encrypted,
|
|
15
|
+
p as errorDialog,
|
|
16
|
+
u as errorSplash,
|
|
17
|
+
b as errors,
|
|
18
|
+
d as exportDialog,
|
|
19
|
+
f as fontList,
|
|
20
|
+
S as headings,
|
|
21
|
+
k as helpDialog,
|
|
22
|
+
v as hints,
|
|
23
|
+
x as imageExportDialog,
|
|
24
|
+
L as labels,
|
|
25
|
+
w as library,
|
|
26
|
+
y as mermaid,
|
|
27
|
+
C as overwriteConfirm,
|
|
28
|
+
E as publishDialog,
|
|
29
|
+
P as publishSuccessDialog,
|
|
30
|
+
B as quickSearch,
|
|
31
|
+
q as roomDialog,
|
|
32
|
+
z as search,
|
|
33
|
+
A as shareDialog,
|
|
34
|
+
F as stats,
|
|
35
|
+
I as toast,
|
|
36
|
+
N as toolBar,
|
|
37
|
+
R as userList,
|
|
38
|
+
T as welcomeScreen
|
|
39
|
+
};
|