@schmitech/chatbot-widget 0.5.2 → 0.5.4
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/Tableau10-D7jGxypv-BNlEL2G_.js +9 -0
- package/dist/arc-D-ZI5fuh-CvDHBzlN.js +84 -0
- package/dist/blockDiagram-c4efeb88-DUnNxfIR-Bhh-x1q6.js +1221 -0
- package/dist/c4Diagram-c83219d4-cC4OxfBG-DRTO_jy5.js +1580 -0
- package/dist/channel-hcYozyrT-BSOc2Hp-.js +6 -0
- package/dist/chatbot-widget.bundle.js +3881 -1586
- package/dist/chatbot-widget.css +1 -1
- package/dist/chatbot-widget.es.js +12 -63652
- package/dist/chatbot-widget.umd.js +3880 -1585
- package/dist/classDiagram-beda092f-BLYhf5Mr-vk4Ko58U.js +218 -0
- package/dist/classDiagram-v2-2358418a-VBkbF8mr-Ca0l1fEs.js +201 -0
- package/dist/clone-BZIkCMuw-B9owNq6E.js +9 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/createText-1719965b-UejsQ47k-B1DYw0WW.js +2955 -0
- package/dist/edges-96097737-1M5QvjOd-BpQVVoQN.js +1088 -0
- package/dist/erDiagram-0228fc6a-CjBNxHoC-DXDVlH55.js +929 -0
- package/dist/flowDb-c6c81e3f-Q2aoOxdz-DfrfI3H1.js +1127 -0
- package/dist/flowDiagram-50d868cf-zizL6ppE-BAH-_juu.js +788 -0
- package/dist/flowDiagram-v2-4f6560a1-DVx_vlO5-bkcRE0UW.js +18 -0
- package/dist/flowchart-elk-definition-6af322e1-Eyez36go-B_lk3oHt.js +48132 -0
- package/dist/ganttDiagram-a2739b55-C82Jv-TO-DoS-s1Yu.js +1743 -0
- package/dist/gitGraphDiagram-82fe8481-D9o_9-U8-DJF-ZeR8.js +1265 -0
- package/dist/graph-BjmGDpTe-DgbYS1Ie.js +848 -0
- package/dist/index-5325376f-CJL5w-Sw-BXp44Ej5.js +374 -0
- package/dist/index-s6Yb6o1D.js +116386 -0
- package/dist/infoDiagram-8eee0895-FpS-TLK_-BnvO_wUe.js +320 -0
- package/dist/journeyDiagram-c64418c1-CMj1efQ9-CshcRDhm.js +802 -0
- package/dist/layout-D_6hdlf3-B7guhEBN.js +1470 -0
- package/dist/mindmap-definition-8da855dc-D4SxHjUd-jFZFomnk.js +21924 -0
- package/dist/pieDiagram-a8764435-BF5ZqOjB-Mqzg2J4Q.js +498 -0
- package/dist/quadrantDiagram-1e28029f-GtQb80VU-DCy1QjzW.js +903 -0
- package/dist/requirementDiagram-08caed73-CHtPj3FO-AHEP0cIt.js +767 -0
- package/dist/sankeyDiagram-a04cb91d-CBlXzOgd-CWJTc5AX.js +802 -0
- package/dist/sequenceDiagram-c5b8d532-Cs1iyw97-oayOJE8v.js +2235 -0
- package/dist/shared/styles.d.ts +1 -1
- package/dist/stateDiagram-1ecb1508-CpRKICMQ-C5OFJeRZ.js +266 -0
- package/dist/stateDiagram-v2-c2b004d7-BtkhFyQ5-DxzE8Je5.js +185 -0
- package/dist/styles-b4e223ce-D0oeHeKH-BmNvk4NR.js +1090 -0
- package/dist/styles-ca3715f6-BouNgl-L-_qXsPDP3.js +961 -0
- package/dist/styles-d45a18b0-Cvhb8Ltu-43I3Cd_I.js +437 -0
- package/dist/svgDrawCommon-b86b1483-mg-1NjZY-DrmnILcc.js +65 -0
- package/dist/timeline-definition-faaaa080-3olbep_P-BqKpgsPZ.js +793 -0
- package/dist/ui/Message.d.ts +1 -5
- package/dist/ui/MessagesList.d.ts +1 -5
- package/dist/xychartDiagram-f5964ef8-BN6HXpmW-C-g_F1w2.js +1238 -0
- package/package.json +3 -3
- package/dist/ui/TypingEffect.d.ts +0 -18
|
@@ -0,0 +1,802 @@
|
|
|
1
|
+
import { x as _t, w as mt, y as xt, v as kt, a as vt, b as bt, g as rt, aJ as wt, P as G, ad as Et, d as Lt, m as At, l as St } from "./index-s6Yb6o1D.js";
|
|
2
|
+
import { r as Mt } from "./Tableau10-D7jGxypv-BNlEL2G_.js";
|
|
3
|
+
typeof window < "u" && (window.global = window);
|
|
4
|
+
function ot(t, e) {
|
|
5
|
+
let s;
|
|
6
|
+
if (e === void 0)
|
|
7
|
+
for (const a of t)
|
|
8
|
+
a != null && (s < a || s === void 0 && a >= a) && (s = a);
|
|
9
|
+
else {
|
|
10
|
+
let a = -1;
|
|
11
|
+
for (let l of t)
|
|
12
|
+
(l = e(l, ++a, t)) != null && (s < l || s === void 0 && l >= l) && (s = l);
|
|
13
|
+
}
|
|
14
|
+
return s;
|
|
15
|
+
}
|
|
16
|
+
function yt(t, e) {
|
|
17
|
+
let s;
|
|
18
|
+
if (e === void 0)
|
|
19
|
+
for (const a of t)
|
|
20
|
+
a != null && (s > a || s === void 0 && a >= a) && (s = a);
|
|
21
|
+
else {
|
|
22
|
+
let a = -1;
|
|
23
|
+
for (let l of t)
|
|
24
|
+
(l = e(l, ++a, t)) != null && (s > l || s === void 0 && l >= l) && (s = l);
|
|
25
|
+
}
|
|
26
|
+
return s;
|
|
27
|
+
}
|
|
28
|
+
function Z(t, e) {
|
|
29
|
+
let s = 0;
|
|
30
|
+
if (e === void 0)
|
|
31
|
+
for (let a of t)
|
|
32
|
+
(a = +a) && (s += a);
|
|
33
|
+
else {
|
|
34
|
+
let a = -1;
|
|
35
|
+
for (let l of t)
|
|
36
|
+
(l = +e(l, ++a, t)) && (s += l);
|
|
37
|
+
}
|
|
38
|
+
return s;
|
|
39
|
+
}
|
|
40
|
+
function It(t) {
|
|
41
|
+
return t.target.depth;
|
|
42
|
+
}
|
|
43
|
+
function Pt(t) {
|
|
44
|
+
return t.depth;
|
|
45
|
+
}
|
|
46
|
+
function Dt(t, e) {
|
|
47
|
+
return e - 1 - t.height;
|
|
48
|
+
}
|
|
49
|
+
function gt(t, e) {
|
|
50
|
+
return t.sourceLinks.length ? t.depth : e - 1;
|
|
51
|
+
}
|
|
52
|
+
function Nt(t) {
|
|
53
|
+
return t.targetLinks.length ? t.depth : t.sourceLinks.length ? yt(t.sourceLinks, It) - 1 : 0;
|
|
54
|
+
}
|
|
55
|
+
function K(t) {
|
|
56
|
+
return function() {
|
|
57
|
+
return t;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function at(t, e) {
|
|
61
|
+
return Q(t.source, e.source) || t.index - e.index;
|
|
62
|
+
}
|
|
63
|
+
function lt(t, e) {
|
|
64
|
+
return Q(t.target, e.target) || t.index - e.index;
|
|
65
|
+
}
|
|
66
|
+
function Q(t, e) {
|
|
67
|
+
return t.y0 - e.y0;
|
|
68
|
+
}
|
|
69
|
+
function H(t) {
|
|
70
|
+
return t.value;
|
|
71
|
+
}
|
|
72
|
+
function Ct(t) {
|
|
73
|
+
return t.index;
|
|
74
|
+
}
|
|
75
|
+
function Ot(t) {
|
|
76
|
+
return t.nodes;
|
|
77
|
+
}
|
|
78
|
+
function Tt(t) {
|
|
79
|
+
return t.links;
|
|
80
|
+
}
|
|
81
|
+
function ct(t, e) {
|
|
82
|
+
const s = t.get(e);
|
|
83
|
+
if (!s) throw new Error("missing: " + e);
|
|
84
|
+
return s;
|
|
85
|
+
}
|
|
86
|
+
function ht({ nodes: t }) {
|
|
87
|
+
for (const e of t) {
|
|
88
|
+
let s = e.y0, a = s;
|
|
89
|
+
for (const l of e.sourceLinks)
|
|
90
|
+
l.y0 = s + l.width / 2, s += l.width;
|
|
91
|
+
for (const l of e.targetLinks)
|
|
92
|
+
l.y1 = a + l.width / 2, a += l.width;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function jt() {
|
|
96
|
+
let t = 0, e = 0, s = 1, a = 1, l = 24, x = 8, p, _ = Ct, i = gt, o, f, m = Ot, y = Tt, v = 6;
|
|
97
|
+
function k() {
|
|
98
|
+
const n = { nodes: m.apply(null, arguments), links: y.apply(null, arguments) };
|
|
99
|
+
return P(n), S(n), M(n), O(n), D(n), ht(n), n;
|
|
100
|
+
}
|
|
101
|
+
k.update = function(n) {
|
|
102
|
+
return ht(n), n;
|
|
103
|
+
}, k.nodeId = function(n) {
|
|
104
|
+
return arguments.length ? (_ = typeof n == "function" ? n : K(n), k) : _;
|
|
105
|
+
}, k.nodeAlign = function(n) {
|
|
106
|
+
return arguments.length ? (i = typeof n == "function" ? n : K(n), k) : i;
|
|
107
|
+
}, k.nodeSort = function(n) {
|
|
108
|
+
return arguments.length ? (o = n, k) : o;
|
|
109
|
+
}, k.nodeWidth = function(n) {
|
|
110
|
+
return arguments.length ? (l = +n, k) : l;
|
|
111
|
+
}, k.nodePadding = function(n) {
|
|
112
|
+
return arguments.length ? (x = p = +n, k) : x;
|
|
113
|
+
}, k.nodes = function(n) {
|
|
114
|
+
return arguments.length ? (m = typeof n == "function" ? n : K(n), k) : m;
|
|
115
|
+
}, k.links = function(n) {
|
|
116
|
+
return arguments.length ? (y = typeof n == "function" ? n : K(n), k) : y;
|
|
117
|
+
}, k.linkSort = function(n) {
|
|
118
|
+
return arguments.length ? (f = n, k) : f;
|
|
119
|
+
}, k.size = function(n) {
|
|
120
|
+
return arguments.length ? (t = e = 0, s = +n[0], a = +n[1], k) : [s - t, a - e];
|
|
121
|
+
}, k.extent = function(n) {
|
|
122
|
+
return arguments.length ? (t = +n[0][0], s = +n[1][0], e = +n[0][1], a = +n[1][1], k) : [[t, e], [s, a]];
|
|
123
|
+
}, k.iterations = function(n) {
|
|
124
|
+
return arguments.length ? (v = +n, k) : v;
|
|
125
|
+
};
|
|
126
|
+
function P({ nodes: n, links: c }) {
|
|
127
|
+
for (const [u, r] of n.entries())
|
|
128
|
+
r.index = u, r.sourceLinks = [], r.targetLinks = [];
|
|
129
|
+
const h = new Map(n.map((u, r) => [_(u, r, n), u]));
|
|
130
|
+
for (const [u, r] of c.entries()) {
|
|
131
|
+
r.index = u;
|
|
132
|
+
let { source: g, target: w } = r;
|
|
133
|
+
typeof g != "object" && (g = r.source = ct(h, g)), typeof w != "object" && (w = r.target = ct(h, w)), g.sourceLinks.push(r), w.targetLinks.push(r);
|
|
134
|
+
}
|
|
135
|
+
if (f != null)
|
|
136
|
+
for (const { sourceLinks: u, targetLinks: r } of n)
|
|
137
|
+
u.sort(f), r.sort(f);
|
|
138
|
+
}
|
|
139
|
+
function S({ nodes: n }) {
|
|
140
|
+
for (const c of n)
|
|
141
|
+
c.value = c.fixedValue === void 0 ? Math.max(Z(c.sourceLinks, H), Z(c.targetLinks, H)) : c.fixedValue;
|
|
142
|
+
}
|
|
143
|
+
function M({ nodes: n }) {
|
|
144
|
+
const c = n.length;
|
|
145
|
+
let h = new Set(n), u = /* @__PURE__ */ new Set(), r = 0;
|
|
146
|
+
for (; h.size; ) {
|
|
147
|
+
for (const g of h) {
|
|
148
|
+
g.depth = r;
|
|
149
|
+
for (const { target: w } of g.sourceLinks)
|
|
150
|
+
u.add(w);
|
|
151
|
+
}
|
|
152
|
+
if (++r > c) throw new Error("circular link");
|
|
153
|
+
h = u, u = /* @__PURE__ */ new Set();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function O({ nodes: n }) {
|
|
157
|
+
const c = n.length;
|
|
158
|
+
let h = new Set(n), u = /* @__PURE__ */ new Set(), r = 0;
|
|
159
|
+
for (; h.size; ) {
|
|
160
|
+
for (const g of h) {
|
|
161
|
+
g.height = r;
|
|
162
|
+
for (const { source: w } of g.targetLinks)
|
|
163
|
+
u.add(w);
|
|
164
|
+
}
|
|
165
|
+
if (++r > c) throw new Error("circular link");
|
|
166
|
+
h = u, u = /* @__PURE__ */ new Set();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function I({ nodes: n }) {
|
|
170
|
+
const c = ot(n, (r) => r.depth) + 1, h = (s - t - l) / (c - 1), u = new Array(c);
|
|
171
|
+
for (const r of n) {
|
|
172
|
+
const g = Math.max(0, Math.min(c - 1, Math.floor(i.call(null, r, c))));
|
|
173
|
+
r.layer = g, r.x0 = t + g * h, r.x1 = r.x0 + l, u[g] ? u[g].push(r) : u[g] = [r];
|
|
174
|
+
}
|
|
175
|
+
if (o) for (const r of u)
|
|
176
|
+
r.sort(o);
|
|
177
|
+
return u;
|
|
178
|
+
}
|
|
179
|
+
function b(n) {
|
|
180
|
+
const c = yt(n, (h) => (a - e - (h.length - 1) * p) / Z(h, H));
|
|
181
|
+
for (const h of n) {
|
|
182
|
+
let u = e;
|
|
183
|
+
for (const r of h) {
|
|
184
|
+
r.y0 = u, r.y1 = u + r.value * c, u = r.y1 + p;
|
|
185
|
+
for (const g of r.sourceLinks)
|
|
186
|
+
g.width = g.value * c;
|
|
187
|
+
}
|
|
188
|
+
u = (a - u + p) / (h.length + 1);
|
|
189
|
+
for (let r = 0; r < h.length; ++r) {
|
|
190
|
+
const g = h[r];
|
|
191
|
+
g.y0 += u * (r + 1), g.y1 += u * (r + 1);
|
|
192
|
+
}
|
|
193
|
+
A(h);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function D(n) {
|
|
197
|
+
const c = I(n);
|
|
198
|
+
p = Math.min(x, (a - e) / (ot(c, (h) => h.length) - 1)), b(c);
|
|
199
|
+
for (let h = 0; h < v; ++h) {
|
|
200
|
+
const u = Math.pow(0.99, h), r = Math.max(1 - u, (h + 1) / v);
|
|
201
|
+
N(c, u, r), T(c, u, r);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function T(n, c, h) {
|
|
205
|
+
for (let u = 1, r = n.length; u < r; ++u) {
|
|
206
|
+
const g = n[u];
|
|
207
|
+
for (const w of g) {
|
|
208
|
+
let W = 0, $ = 0;
|
|
209
|
+
for (const { source: X, value: V } of w.targetLinks) {
|
|
210
|
+
let q = V * (w.layer - X.layer);
|
|
211
|
+
W += U(X, w) * q, $ += q;
|
|
212
|
+
}
|
|
213
|
+
if (!($ > 0)) continue;
|
|
214
|
+
let R = (W / $ - w.y0) * c;
|
|
215
|
+
w.y0 += R, w.y1 += R, C(w);
|
|
216
|
+
}
|
|
217
|
+
o === void 0 && g.sort(Q), d(g, h);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function N(n, c, h) {
|
|
221
|
+
for (let u = n.length, r = u - 2; r >= 0; --r) {
|
|
222
|
+
const g = n[r];
|
|
223
|
+
for (const w of g) {
|
|
224
|
+
let W = 0, $ = 0;
|
|
225
|
+
for (const { target: X, value: V } of w.sourceLinks) {
|
|
226
|
+
let q = V * (X.layer - w.layer);
|
|
227
|
+
W += j(w, X) * q, $ += q;
|
|
228
|
+
}
|
|
229
|
+
if (!($ > 0)) continue;
|
|
230
|
+
let R = (W / $ - w.y0) * c;
|
|
231
|
+
w.y0 += R, w.y1 += R, C(w);
|
|
232
|
+
}
|
|
233
|
+
o === void 0 && g.sort(Q), d(g, h);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function d(n, c) {
|
|
237
|
+
const h = n.length >> 1, u = n[h];
|
|
238
|
+
E(n, u.y0 - p, h - 1, c), L(n, u.y1 + p, h + 1, c), E(n, a, n.length - 1, c), L(n, e, 0, c);
|
|
239
|
+
}
|
|
240
|
+
function L(n, c, h, u) {
|
|
241
|
+
for (; h < n.length; ++h) {
|
|
242
|
+
const r = n[h], g = (c - r.y0) * u;
|
|
243
|
+
g > 1e-6 && (r.y0 += g, r.y1 += g), c = r.y1 + p;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function E(n, c, h, u) {
|
|
247
|
+
for (; h >= 0; --h) {
|
|
248
|
+
const r = n[h], g = (r.y1 - c) * u;
|
|
249
|
+
g > 1e-6 && (r.y0 -= g, r.y1 -= g), c = r.y0 - p;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function C({ sourceLinks: n, targetLinks: c }) {
|
|
253
|
+
if (f === void 0) {
|
|
254
|
+
for (const { source: { sourceLinks: h } } of c)
|
|
255
|
+
h.sort(lt);
|
|
256
|
+
for (const { target: { targetLinks: h } } of n)
|
|
257
|
+
h.sort(at);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function A(n) {
|
|
261
|
+
if (f === void 0)
|
|
262
|
+
for (const { sourceLinks: c, targetLinks: h } of n)
|
|
263
|
+
c.sort(lt), h.sort(at);
|
|
264
|
+
}
|
|
265
|
+
function U(n, c) {
|
|
266
|
+
let h = n.y0 - (n.sourceLinks.length - 1) * p / 2;
|
|
267
|
+
for (const { target: u, width: r } of n.sourceLinks) {
|
|
268
|
+
if (u === c) break;
|
|
269
|
+
h += r + p;
|
|
270
|
+
}
|
|
271
|
+
for (const { source: u, width: r } of c.targetLinks) {
|
|
272
|
+
if (u === n) break;
|
|
273
|
+
h -= r;
|
|
274
|
+
}
|
|
275
|
+
return h;
|
|
276
|
+
}
|
|
277
|
+
function j(n, c) {
|
|
278
|
+
let h = c.y0 - (c.targetLinks.length - 1) * p / 2;
|
|
279
|
+
for (const { source: u, width: r } of c.targetLinks) {
|
|
280
|
+
if (u === n) break;
|
|
281
|
+
h += r + p;
|
|
282
|
+
}
|
|
283
|
+
for (const { target: u, width: r } of n.sourceLinks) {
|
|
284
|
+
if (u === c) break;
|
|
285
|
+
h -= r;
|
|
286
|
+
}
|
|
287
|
+
return h;
|
|
288
|
+
}
|
|
289
|
+
return k;
|
|
290
|
+
}
|
|
291
|
+
var tt = Math.PI, nt = 2 * tt, z = 1e-6, $t = nt - z;
|
|
292
|
+
function et() {
|
|
293
|
+
this._x0 = this._y0 = // start of current subpath
|
|
294
|
+
this._x1 = this._y1 = null, this._ = "";
|
|
295
|
+
}
|
|
296
|
+
function dt() {
|
|
297
|
+
return new et();
|
|
298
|
+
}
|
|
299
|
+
et.prototype = dt.prototype = {
|
|
300
|
+
constructor: et,
|
|
301
|
+
moveTo: function(t, e) {
|
|
302
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
|
|
303
|
+
},
|
|
304
|
+
closePath: function() {
|
|
305
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
|
|
306
|
+
},
|
|
307
|
+
lineTo: function(t, e) {
|
|
308
|
+
this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
|
|
309
|
+
},
|
|
310
|
+
quadraticCurveTo: function(t, e, s, a) {
|
|
311
|
+
this._ += "Q" + +t + "," + +e + "," + (this._x1 = +s) + "," + (this._y1 = +a);
|
|
312
|
+
},
|
|
313
|
+
bezierCurveTo: function(t, e, s, a, l, x) {
|
|
314
|
+
this._ += "C" + +t + "," + +e + "," + +s + "," + +a + "," + (this._x1 = +l) + "," + (this._y1 = +x);
|
|
315
|
+
},
|
|
316
|
+
arcTo: function(t, e, s, a, l) {
|
|
317
|
+
t = +t, e = +e, s = +s, a = +a, l = +l;
|
|
318
|
+
var x = this._x1, p = this._y1, _ = s - t, i = a - e, o = x - t, f = p - e, m = o * o + f * f;
|
|
319
|
+
if (l < 0) throw new Error("negative radius: " + l);
|
|
320
|
+
if (this._x1 === null)
|
|
321
|
+
this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
|
|
322
|
+
else if (m > z) if (!(Math.abs(f * _ - i * o) > z) || !l)
|
|
323
|
+
this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
|
|
324
|
+
else {
|
|
325
|
+
var y = s - x, v = a - p, k = _ * _ + i * i, P = y * y + v * v, S = Math.sqrt(k), M = Math.sqrt(m), O = l * Math.tan((tt - Math.acos((k + m - P) / (2 * S * M))) / 2), I = O / M, b = O / S;
|
|
326
|
+
Math.abs(I - 1) > z && (this._ += "L" + (t + I * o) + "," + (e + I * f)), this._ += "A" + l + "," + l + ",0,0," + +(f * y > o * v) + "," + (this._x1 = t + b * _) + "," + (this._y1 = e + b * i);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
arc: function(t, e, s, a, l, x) {
|
|
330
|
+
t = +t, e = +e, s = +s, x = !!x;
|
|
331
|
+
var p = s * Math.cos(a), _ = s * Math.sin(a), i = t + p, o = e + _, f = 1 ^ x, m = x ? a - l : l - a;
|
|
332
|
+
if (s < 0) throw new Error("negative radius: " + s);
|
|
333
|
+
this._x1 === null ? this._ += "M" + i + "," + o : (Math.abs(this._x1 - i) > z || Math.abs(this._y1 - o) > z) && (this._ += "L" + i + "," + o), s && (m < 0 && (m = m % nt + nt), m > $t ? this._ += "A" + s + "," + s + ",0,1," + f + "," + (t - p) + "," + (e - _) + "A" + s + "," + s + ",0,1," + f + "," + (this._x1 = i) + "," + (this._y1 = o) : m > z && (this._ += "A" + s + "," + s + ",0," + +(m >= tt) + "," + f + "," + (this._x1 = t + s * Math.cos(l)) + "," + (this._y1 = e + s * Math.sin(l))));
|
|
334
|
+
},
|
|
335
|
+
rect: function(t, e, s, a) {
|
|
336
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +s + "v" + +a + "h" + -s + "Z";
|
|
337
|
+
},
|
|
338
|
+
toString: function() {
|
|
339
|
+
return this._;
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
function ut(t) {
|
|
343
|
+
return function() {
|
|
344
|
+
return t;
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function zt(t) {
|
|
348
|
+
return t[0];
|
|
349
|
+
}
|
|
350
|
+
function Ft(t) {
|
|
351
|
+
return t[1];
|
|
352
|
+
}
|
|
353
|
+
var Ut = Array.prototype.slice;
|
|
354
|
+
function Wt(t) {
|
|
355
|
+
return t.source;
|
|
356
|
+
}
|
|
357
|
+
function Rt(t) {
|
|
358
|
+
return t.target;
|
|
359
|
+
}
|
|
360
|
+
function Xt(t) {
|
|
361
|
+
var e = Wt, s = Rt, a = zt, l = Ft, x = null;
|
|
362
|
+
function p() {
|
|
363
|
+
var _, i = Ut.call(arguments), o = e.apply(this, i), f = s.apply(this, i);
|
|
364
|
+
if (x || (x = _ = dt()), t(x, +a.apply(this, (i[0] = o, i)), +l.apply(this, i), +a.apply(this, (i[0] = f, i)), +l.apply(this, i)), _) return x = null, _ + "" || null;
|
|
365
|
+
}
|
|
366
|
+
return p.source = function(_) {
|
|
367
|
+
return arguments.length ? (e = _, p) : e;
|
|
368
|
+
}, p.target = function(_) {
|
|
369
|
+
return arguments.length ? (s = _, p) : s;
|
|
370
|
+
}, p.x = function(_) {
|
|
371
|
+
return arguments.length ? (a = typeof _ == "function" ? _ : ut(+_), p) : a;
|
|
372
|
+
}, p.y = function(_) {
|
|
373
|
+
return arguments.length ? (l = typeof _ == "function" ? _ : ut(+_), p) : l;
|
|
374
|
+
}, p.context = function(_) {
|
|
375
|
+
return arguments.length ? (x = _ ?? null, p) : x;
|
|
376
|
+
}, p;
|
|
377
|
+
}
|
|
378
|
+
function qt(t, e, s, a, l) {
|
|
379
|
+
t.moveTo(e, s), t.bezierCurveTo(e = (e + a) / 2, s, e, l, a, l);
|
|
380
|
+
}
|
|
381
|
+
function Gt() {
|
|
382
|
+
return Xt(qt);
|
|
383
|
+
}
|
|
384
|
+
function Kt(t) {
|
|
385
|
+
return [t.source.x1, t.y0];
|
|
386
|
+
}
|
|
387
|
+
function Qt(t) {
|
|
388
|
+
return [t.target.x0, t.y1];
|
|
389
|
+
}
|
|
390
|
+
function Yt() {
|
|
391
|
+
return Gt().source(Kt).target(Qt);
|
|
392
|
+
}
|
|
393
|
+
var it = function() {
|
|
394
|
+
var t = function(_, i, o, f) {
|
|
395
|
+
for (o = o || {}, f = _.length; f--; o[_[f]] = i)
|
|
396
|
+
;
|
|
397
|
+
return o;
|
|
398
|
+
}, e = [1, 9], s = [1, 10], a = [1, 5, 10, 12], l = {
|
|
399
|
+
trace: function() {
|
|
400
|
+
},
|
|
401
|
+
yy: {},
|
|
402
|
+
symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
|
|
403
|
+
terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
|
|
404
|
+
productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
|
|
405
|
+
performAction: function(_, i, o, f, m, y, v) {
|
|
406
|
+
var k = y.length - 1;
|
|
407
|
+
switch (m) {
|
|
408
|
+
case 7:
|
|
409
|
+
const P = f.findOrCreateNode(y[k - 4].trim().replaceAll('""', '"')), S = f.findOrCreateNode(y[k - 2].trim().replaceAll('""', '"')), M = parseFloat(y[k].trim());
|
|
410
|
+
f.addLink(P, S, M);
|
|
411
|
+
break;
|
|
412
|
+
case 8:
|
|
413
|
+
case 9:
|
|
414
|
+
case 11:
|
|
415
|
+
this.$ = y[k];
|
|
416
|
+
break;
|
|
417
|
+
case 10:
|
|
418
|
+
this.$ = y[k - 1];
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: s }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(s, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(s, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: s }, { 15: 18, 16: 7, 17: 8, 18: e, 20: s }, { 18: [1, 19] }, t(s, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: e, 20: s }, t([1, 5, 10], [2, 7])],
|
|
423
|
+
defaultActions: { 11: [2, 1], 12: [2, 5] },
|
|
424
|
+
parseError: function(_, i) {
|
|
425
|
+
if (i.recoverable)
|
|
426
|
+
this.trace(_);
|
|
427
|
+
else {
|
|
428
|
+
var o = new Error(_);
|
|
429
|
+
throw o.hash = i, o;
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
parse: function(_) {
|
|
433
|
+
var i = this, o = [0], f = [], m = [null], y = [], v = this.table, k = "", P = 0, S = 0, M = 2, O = 1, I = y.slice.call(arguments, 1), b = Object.create(this.lexer), D = { yy: {} };
|
|
434
|
+
for (var T in this.yy)
|
|
435
|
+
Object.prototype.hasOwnProperty.call(this.yy, T) && (D.yy[T] = this.yy[T]);
|
|
436
|
+
b.setInput(_, D.yy), D.yy.lexer = b, D.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
437
|
+
var N = b.yylloc;
|
|
438
|
+
y.push(N);
|
|
439
|
+
var d = b.options && b.options.ranges;
|
|
440
|
+
typeof D.yy.parseError == "function" ? this.parseError = D.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
441
|
+
function L() {
|
|
442
|
+
var g;
|
|
443
|
+
return g = f.pop() || b.lex() || O, typeof g != "number" && (g instanceof Array && (f = g, g = f.pop()), g = i.symbols_[g] || g), g;
|
|
444
|
+
}
|
|
445
|
+
for (var E, C, A, U, j = {}, n, c, h, u; ; ) {
|
|
446
|
+
if (C = o[o.length - 1], this.defaultActions[C] ? A = this.defaultActions[C] : ((E === null || typeof E > "u") && (E = L()), A = v[C] && v[C][E]), typeof A > "u" || !A.length || !A[0]) {
|
|
447
|
+
var r = "";
|
|
448
|
+
u = [];
|
|
449
|
+
for (n in v[C])
|
|
450
|
+
this.terminals_[n] && n > M && u.push("'" + this.terminals_[n] + "'");
|
|
451
|
+
b.showPosition ? r = "Parse error on line " + (P + 1) + `:
|
|
452
|
+
` + b.showPosition() + `
|
|
453
|
+
Expecting ` + u.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : r = "Parse error on line " + (P + 1) + ": Unexpected " + (E == O ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError(r, {
|
|
454
|
+
text: b.match,
|
|
455
|
+
token: this.terminals_[E] || E,
|
|
456
|
+
line: b.yylineno,
|
|
457
|
+
loc: N,
|
|
458
|
+
expected: u
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
if (A[0] instanceof Array && A.length > 1)
|
|
462
|
+
throw new Error("Parse Error: multiple actions possible at state: " + C + ", token: " + E);
|
|
463
|
+
switch (A[0]) {
|
|
464
|
+
case 1:
|
|
465
|
+
o.push(E), m.push(b.yytext), y.push(b.yylloc), o.push(A[1]), E = null, S = b.yyleng, k = b.yytext, P = b.yylineno, N = b.yylloc;
|
|
466
|
+
break;
|
|
467
|
+
case 2:
|
|
468
|
+
if (c = this.productions_[A[1]][1], j.$ = m[m.length - c], j._$ = {
|
|
469
|
+
first_line: y[y.length - (c || 1)].first_line,
|
|
470
|
+
last_line: y[y.length - 1].last_line,
|
|
471
|
+
first_column: y[y.length - (c || 1)].first_column,
|
|
472
|
+
last_column: y[y.length - 1].last_column
|
|
473
|
+
}, d && (j._$.range = [
|
|
474
|
+
y[y.length - (c || 1)].range[0],
|
|
475
|
+
y[y.length - 1].range[1]
|
|
476
|
+
]), U = this.performAction.apply(j, [
|
|
477
|
+
k,
|
|
478
|
+
S,
|
|
479
|
+
P,
|
|
480
|
+
D.yy,
|
|
481
|
+
A[1],
|
|
482
|
+
m,
|
|
483
|
+
y
|
|
484
|
+
].concat(I)), typeof U < "u")
|
|
485
|
+
return U;
|
|
486
|
+
c && (o = o.slice(0, -1 * c * 2), m = m.slice(0, -1 * c), y = y.slice(0, -1 * c)), o.push(this.productions_[A[1]][0]), m.push(j.$), y.push(j._$), h = v[o[o.length - 2]][o[o.length - 1]], o.push(h);
|
|
487
|
+
break;
|
|
488
|
+
case 3:
|
|
489
|
+
return !0;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return !0;
|
|
493
|
+
}
|
|
494
|
+
}, x = /* @__PURE__ */ function() {
|
|
495
|
+
var _ = {
|
|
496
|
+
EOF: 1,
|
|
497
|
+
parseError: function(i, o) {
|
|
498
|
+
if (this.yy.parser)
|
|
499
|
+
this.yy.parser.parseError(i, o);
|
|
500
|
+
else
|
|
501
|
+
throw new Error(i);
|
|
502
|
+
},
|
|
503
|
+
// resets the lexer, sets new input
|
|
504
|
+
setInput: function(i, o) {
|
|
505
|
+
return this.yy = o || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
506
|
+
first_line: 1,
|
|
507
|
+
first_column: 0,
|
|
508
|
+
last_line: 1,
|
|
509
|
+
last_column: 0
|
|
510
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
511
|
+
},
|
|
512
|
+
// consumes and returns one char from the input
|
|
513
|
+
input: function() {
|
|
514
|
+
var i = this._input[0];
|
|
515
|
+
this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
|
|
516
|
+
var o = i.match(/(?:\r\n?|\n).*/g);
|
|
517
|
+
return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
|
|
518
|
+
},
|
|
519
|
+
// unshifts one char (or a string) into the input
|
|
520
|
+
unput: function(i) {
|
|
521
|
+
var o = i.length, f = i.split(/(?:\r\n?|\n)/g);
|
|
522
|
+
this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
|
|
523
|
+
var m = this.match.split(/(?:\r\n?|\n)/g);
|
|
524
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
525
|
+
var y = this.yylloc.range;
|
|
526
|
+
return this.yylloc = {
|
|
527
|
+
first_line: this.yylloc.first_line,
|
|
528
|
+
last_line: this.yylineno + 1,
|
|
529
|
+
first_column: this.yylloc.first_column,
|
|
530
|
+
last_column: f ? (f.length === m.length ? this.yylloc.first_column : 0) + m[m.length - f.length].length - f[0].length : this.yylloc.first_column - o
|
|
531
|
+
}, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
|
|
532
|
+
},
|
|
533
|
+
// When called from action, caches matched text and appends it on next action
|
|
534
|
+
more: function() {
|
|
535
|
+
return this._more = !0, this;
|
|
536
|
+
},
|
|
537
|
+
// 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.
|
|
538
|
+
reject: function() {
|
|
539
|
+
if (this.options.backtrack_lexer)
|
|
540
|
+
this._backtrack = !0;
|
|
541
|
+
else
|
|
542
|
+
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).
|
|
543
|
+
` + this.showPosition(), {
|
|
544
|
+
text: "",
|
|
545
|
+
token: null,
|
|
546
|
+
line: this.yylineno
|
|
547
|
+
});
|
|
548
|
+
return this;
|
|
549
|
+
},
|
|
550
|
+
// retain first n characters of the match
|
|
551
|
+
less: function(i) {
|
|
552
|
+
this.unput(this.match.slice(i));
|
|
553
|
+
},
|
|
554
|
+
// displays already matched input, i.e. for error messages
|
|
555
|
+
pastInput: function() {
|
|
556
|
+
var i = this.matched.substr(0, this.matched.length - this.match.length);
|
|
557
|
+
return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
|
|
558
|
+
},
|
|
559
|
+
// displays upcoming input, i.e. for error messages
|
|
560
|
+
upcomingInput: function() {
|
|
561
|
+
var i = this.match;
|
|
562
|
+
return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
563
|
+
},
|
|
564
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
565
|
+
showPosition: function() {
|
|
566
|
+
var i = this.pastInput(), o = new Array(i.length + 1).join("-");
|
|
567
|
+
return i + this.upcomingInput() + `
|
|
568
|
+
` + o + "^";
|
|
569
|
+
},
|
|
570
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
571
|
+
test_match: function(i, o) {
|
|
572
|
+
var f, m, y;
|
|
573
|
+
if (this.options.backtrack_lexer && (y = {
|
|
574
|
+
yylineno: this.yylineno,
|
|
575
|
+
yylloc: {
|
|
576
|
+
first_line: this.yylloc.first_line,
|
|
577
|
+
last_line: this.last_line,
|
|
578
|
+
first_column: this.yylloc.first_column,
|
|
579
|
+
last_column: this.yylloc.last_column
|
|
580
|
+
},
|
|
581
|
+
yytext: this.yytext,
|
|
582
|
+
match: this.match,
|
|
583
|
+
matches: this.matches,
|
|
584
|
+
matched: this.matched,
|
|
585
|
+
yyleng: this.yyleng,
|
|
586
|
+
offset: this.offset,
|
|
587
|
+
_more: this._more,
|
|
588
|
+
_input: this._input,
|
|
589
|
+
yy: this.yy,
|
|
590
|
+
conditionStack: this.conditionStack.slice(0),
|
|
591
|
+
done: this.done
|
|
592
|
+
}, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), m = i[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
|
|
593
|
+
first_line: this.yylloc.last_line,
|
|
594
|
+
last_line: this.yylineno + 1,
|
|
595
|
+
first_column: this.yylloc.last_column,
|
|
596
|
+
last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
|
|
597
|
+
}, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], f = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
|
|
598
|
+
return f;
|
|
599
|
+
if (this._backtrack) {
|
|
600
|
+
for (var v in y)
|
|
601
|
+
this[v] = y[v];
|
|
602
|
+
return !1;
|
|
603
|
+
}
|
|
604
|
+
return !1;
|
|
605
|
+
},
|
|
606
|
+
// return next match in input
|
|
607
|
+
next: function() {
|
|
608
|
+
if (this.done)
|
|
609
|
+
return this.EOF;
|
|
610
|
+
this._input || (this.done = !0);
|
|
611
|
+
var i, o, f, m;
|
|
612
|
+
this._more || (this.yytext = "", this.match = "");
|
|
613
|
+
for (var y = this._currentRules(), v = 0; v < y.length; v++)
|
|
614
|
+
if (f = this._input.match(this.rules[y[v]]), f && (!o || f[0].length > o[0].length)) {
|
|
615
|
+
if (o = f, m = v, this.options.backtrack_lexer) {
|
|
616
|
+
if (i = this.test_match(f, y[v]), i !== !1)
|
|
617
|
+
return i;
|
|
618
|
+
if (this._backtrack) {
|
|
619
|
+
o = !1;
|
|
620
|
+
continue;
|
|
621
|
+
} else
|
|
622
|
+
return !1;
|
|
623
|
+
} else if (!this.options.flex)
|
|
624
|
+
break;
|
|
625
|
+
}
|
|
626
|
+
return o ? (i = this.test_match(o, y[m]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
627
|
+
` + this.showPosition(), {
|
|
628
|
+
text: "",
|
|
629
|
+
token: null,
|
|
630
|
+
line: this.yylineno
|
|
631
|
+
});
|
|
632
|
+
},
|
|
633
|
+
// return next match that has a token
|
|
634
|
+
lex: function() {
|
|
635
|
+
var i = this.next();
|
|
636
|
+
return i || this.lex();
|
|
637
|
+
},
|
|
638
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
639
|
+
begin: function(i) {
|
|
640
|
+
this.conditionStack.push(i);
|
|
641
|
+
},
|
|
642
|
+
// pop the previously active lexer condition state off the condition stack
|
|
643
|
+
popState: function() {
|
|
644
|
+
var i = this.conditionStack.length - 1;
|
|
645
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
646
|
+
},
|
|
647
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
648
|
+
_currentRules: function() {
|
|
649
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
650
|
+
},
|
|
651
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
652
|
+
topState: function(i) {
|
|
653
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
654
|
+
},
|
|
655
|
+
// alias for begin(condition)
|
|
656
|
+
pushState: function(i) {
|
|
657
|
+
this.begin(i);
|
|
658
|
+
},
|
|
659
|
+
// return the number of states currently on the stack
|
|
660
|
+
stateStackSize: function() {
|
|
661
|
+
return this.conditionStack.length;
|
|
662
|
+
},
|
|
663
|
+
options: { "case-insensitive": !0 },
|
|
664
|
+
performAction: function(i, o, f, m) {
|
|
665
|
+
switch (f) {
|
|
666
|
+
case 0:
|
|
667
|
+
return this.pushState("csv"), 4;
|
|
668
|
+
case 1:
|
|
669
|
+
return 10;
|
|
670
|
+
case 2:
|
|
671
|
+
return 5;
|
|
672
|
+
case 3:
|
|
673
|
+
return 12;
|
|
674
|
+
case 4:
|
|
675
|
+
return this.pushState("escaped_text"), 18;
|
|
676
|
+
case 5:
|
|
677
|
+
return 20;
|
|
678
|
+
case 6:
|
|
679
|
+
return this.popState("escaped_text"), 18;
|
|
680
|
+
case 7:
|
|
681
|
+
return 19;
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
rules: [/^(?:sankey-beta\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
|
|
685
|
+
conditions: { csv: { rules: [1, 2, 3, 4, 5, 6, 7], inclusive: !1 }, escaped_text: { rules: [6, 7], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7], inclusive: !0 } }
|
|
686
|
+
};
|
|
687
|
+
return _;
|
|
688
|
+
}();
|
|
689
|
+
l.lexer = x;
|
|
690
|
+
function p() {
|
|
691
|
+
this.yy = {};
|
|
692
|
+
}
|
|
693
|
+
return p.prototype = l, l.Parser = p, new p();
|
|
694
|
+
}();
|
|
695
|
+
it.parser = it;
|
|
696
|
+
const Y = it;
|
|
697
|
+
let B = [], J = [], F = {};
|
|
698
|
+
const Bt = () => {
|
|
699
|
+
B = [], J = [], F = {}, At();
|
|
700
|
+
};
|
|
701
|
+
class Jt {
|
|
702
|
+
constructor(e, s, a = 0) {
|
|
703
|
+
this.source = e, this.target = s, this.value = a;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
const Vt = (t, e, s) => {
|
|
707
|
+
B.push(new Jt(t, e, s));
|
|
708
|
+
};
|
|
709
|
+
class Zt {
|
|
710
|
+
constructor(e) {
|
|
711
|
+
this.ID = e;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
const Ht = (t) => (t = St.sanitizeText(t, rt()), F[t] || (F[t] = new Zt(t), J.push(F[t])), F[t]), tn = () => J, nn = () => B, en = () => ({
|
|
715
|
+
nodes: J.map((t) => ({ id: t.ID })),
|
|
716
|
+
links: B.map((t) => ({
|
|
717
|
+
source: t.source.ID,
|
|
718
|
+
target: t.target.ID,
|
|
719
|
+
value: t.value
|
|
720
|
+
}))
|
|
721
|
+
}), sn = {
|
|
722
|
+
nodesMap: F,
|
|
723
|
+
getConfig: () => rt().sankey,
|
|
724
|
+
getNodes: tn,
|
|
725
|
+
getLinks: nn,
|
|
726
|
+
getGraph: en,
|
|
727
|
+
addLink: Vt,
|
|
728
|
+
findOrCreateNode: Ht,
|
|
729
|
+
getAccTitle: bt,
|
|
730
|
+
setAccTitle: vt,
|
|
731
|
+
getAccDescription: kt,
|
|
732
|
+
setAccDescription: xt,
|
|
733
|
+
getDiagramTitle: mt,
|
|
734
|
+
setDiagramTitle: _t,
|
|
735
|
+
clear: Bt
|
|
736
|
+
}, pt = class st {
|
|
737
|
+
static next(e) {
|
|
738
|
+
return new st(e + ++st.count);
|
|
739
|
+
}
|
|
740
|
+
constructor(e) {
|
|
741
|
+
this.id = e, this.href = `#${e}`;
|
|
742
|
+
}
|
|
743
|
+
toString() {
|
|
744
|
+
return "url(" + this.href + ")";
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
pt.count = 0;
|
|
748
|
+
let ft = pt;
|
|
749
|
+
const rn = {
|
|
750
|
+
left: Pt,
|
|
751
|
+
right: Dt,
|
|
752
|
+
center: Nt,
|
|
753
|
+
justify: gt
|
|
754
|
+
}, on = function(t, e, s, a) {
|
|
755
|
+
const { securityLevel: l, sankey: x } = rt(), p = wt.sankey;
|
|
756
|
+
let _;
|
|
757
|
+
l === "sandbox" && (_ = G("#i" + e));
|
|
758
|
+
const i = l === "sandbox" ? G(_.nodes()[0].contentDocument.body) : G("body"), o = l === "sandbox" ? i.select(`[id="${e}"]`) : G(`[id="${e}"]`), f = (x == null ? void 0 : x.width) ?? p.width, m = (x == null ? void 0 : x.height) ?? p.width, y = (x == null ? void 0 : x.useMaxWidth) ?? p.useMaxWidth, v = (x == null ? void 0 : x.nodeAlignment) ?? p.nodeAlignment, k = (x == null ? void 0 : x.prefix) ?? p.prefix, P = (x == null ? void 0 : x.suffix) ?? p.suffix, S = (x == null ? void 0 : x.showValues) ?? p.showValues, M = a.db.getGraph(), O = rn[v];
|
|
759
|
+
jt().nodeId((d) => d.id).nodeWidth(10).nodePadding(10 + (S ? 15 : 0)).nodeAlign(O).extent([
|
|
760
|
+
[0, 0],
|
|
761
|
+
[f, m]
|
|
762
|
+
])(M);
|
|
763
|
+
const I = Et(Mt);
|
|
764
|
+
o.append("g").attr("class", "nodes").selectAll(".node").data(M.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = ft.next("node-")).id).attr("transform", function(d) {
|
|
765
|
+
return "translate(" + d.x0 + "," + d.y0 + ")";
|
|
766
|
+
}).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => d.y1 - d.y0).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => I(d.id));
|
|
767
|
+
const b = ({ id: d, value: L }) => S ? `${d}
|
|
768
|
+
${k}${Math.round(L * 100) / 100}${P}` : d;
|
|
769
|
+
o.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(M.nodes).join("text").attr("x", (d) => d.x0 < f / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${S ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < f / 2 ? "start" : "end").text(b);
|
|
770
|
+
const D = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(M.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), T = (x == null ? void 0 : x.linkColor) || "gradient";
|
|
771
|
+
if (T === "gradient") {
|
|
772
|
+
const d = D.append("linearGradient").attr("id", (L) => (L.uid = ft.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (L) => L.source.x1).attr("x2", (L) => L.target.x0);
|
|
773
|
+
d.append("stop").attr("offset", "0%").attr("stop-color", (L) => I(L.source.id)), d.append("stop").attr("offset", "100%").attr("stop-color", (L) => I(L.target.id));
|
|
774
|
+
}
|
|
775
|
+
let N;
|
|
776
|
+
switch (T) {
|
|
777
|
+
case "gradient":
|
|
778
|
+
N = (d) => d.uid;
|
|
779
|
+
break;
|
|
780
|
+
case "source":
|
|
781
|
+
N = (d) => I(d.source.id);
|
|
782
|
+
break;
|
|
783
|
+
case "target":
|
|
784
|
+
N = (d) => I(d.target.id);
|
|
785
|
+
break;
|
|
786
|
+
default:
|
|
787
|
+
N = T;
|
|
788
|
+
}
|
|
789
|
+
D.append("path").attr("d", Yt()).attr("stroke", N).attr("stroke-width", (d) => Math.max(1, d.width)), Lt(void 0, o, 0, y);
|
|
790
|
+
}, an = {
|
|
791
|
+
draw: on
|
|
792
|
+
}, ln = (t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
|
|
793
|
+
`).trim(), cn = Y.parse.bind(Y);
|
|
794
|
+
Y.parse = (t) => cn(ln(t));
|
|
795
|
+
const fn = {
|
|
796
|
+
parser: Y,
|
|
797
|
+
db: sn,
|
|
798
|
+
renderer: an
|
|
799
|
+
};
|
|
800
|
+
export {
|
|
801
|
+
fn as diagram
|
|
802
|
+
};
|