lowcoder-comps 2.4.14 → 2.4.16

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.
Files changed (51) hide show
  1. package/{fc3b7856.js → 1043ea14.js} +247 -258
  2. package/{52a11357.js → 14530b4e.js} +5 -5
  3. package/{029476f8.js → 145794bd.js} +4 -4
  4. package/248f3eba.js +797 -0
  5. package/{e6f7d4a7.js → 28364e9c.js} +411 -451
  6. package/{a3820fc3.js → 38ec0f55.js} +3 -3
  7. package/{6296008d.js → 40bee586.js} +55069 -55754
  8. package/{256b619e.js → 428ebac9.js} +14 -15
  9. package/{21e8a932.js → 4407a5f9.js} +1 -1
  10. package/{286121b3.js → 474d7e5f.js} +6 -6
  11. package/{32d11caf.js → 48ca2a1e.js} +2 -2
  12. package/5b2c9b5c.js +206 -0
  13. package/{b42bc0a6.js → 633f4ede.js} +919 -969
  14. package/{35b2542e.js → 668d3da2.js} +1 -1
  15. package/{005a58c0.js → 78321d1a.js} +4 -4
  16. package/{2ea4f729.js → 7c479abc.js} +8 -8
  17. package/{09ab5d81.js → 7c7200e7.js} +7 -7
  18. package/{d42741f5.js → 7e6d090c.js} +1067 -1085
  19. package/7e78c333.js +373 -0
  20. package/{abadf1f6.js → 88415712.js} +140 -141
  21. package/{43254cb0.js → 8ae1f7a4.js} +4 -5
  22. package/{af28f5d5.js → 8e6be41e.js} +4 -4
  23. package/{a73a7fb8.js → 8ffe69e1.js} +6 -6
  24. package/{14a0be5d.js → 9afbfdff.js} +1 -1
  25. package/{25f232c1.js → a8987699.js} +6 -6
  26. package/afdeb8e9.js +190 -0
  27. package/c0405acc.js +1083 -0
  28. package/{08ea4a8f.js → ca993649.js} +2 -2
  29. package/{bf684fc8.js → cc8ba9a3.js} +12713 -12735
  30. package/{bcd4bce3.js → d27497a0.js} +18 -18
  31. package/{c69763fa.js → dbeb2d17.js} +2 -2
  32. package/{6741b2b9.js → de3e61cd.js} +68 -69
  33. package/df15a543.js +817 -0
  34. package/{47848c42.js → e5b014a9.js} +5 -5
  35. package/e86c3e3a.js +1264 -0
  36. package/{0f43fe1e.js → eb52cd1a.js} +8 -8
  37. package/{0da7ca4d.js → ebbe2009.js} +92 -92
  38. package/{cb338c34.js → ecab0a38.js} +96 -99
  39. package/{268c902c.js → f3455869.js} +26 -27
  40. package/f701d7da.js +433 -0
  41. package/{6402852d.js → fc681b47.js} +12 -12
  42. package/index.js +2 -2
  43. package/package.json +1 -1
  44. package/04c7d898.js +0 -819
  45. package/078d4a18.js +0 -818
  46. package/18cd6b56.js +0 -391
  47. package/1a8f0a25.js +0 -455
  48. package/2b4f4275.js +0 -1276
  49. package/2efee7c6.js +0 -1102
  50. package/a6a69647.js +0 -237
  51. package/c2bb8612.js +0 -208
package/078d4a18.js DELETED
@@ -1,818 +0,0 @@
1
- import { e as rt, a as mt, s as kt, b as _t, d as xt, G as vt, F as bt, H as wt, m as St, ar as Lt, j as G, v as Et } from "./6296008d.js";
2
- import { o as At } from "./92e85b65.js";
3
- import { s as Tt } from "./2ff7471d.js";
4
- import "./f9637058.js";
5
- function ot(t, i) {
6
- let r;
7
- if (i === void 0)
8
- for (const c of t)
9
- c != null && (r < c || r === void 0 && c >= c) && (r = c);
10
- else {
11
- let c = -1;
12
- for (let h of t)
13
- (h = i(h, ++c, t)) != null && (r < h || r === void 0 && h >= h) && (r = h);
14
- }
15
- return r;
16
- }
17
- function yt(t, i) {
18
- let r;
19
- if (i === void 0)
20
- for (const c of t)
21
- c != null && (r > c || r === void 0 && c >= c) && (r = c);
22
- else {
23
- let c = -1;
24
- for (let h of t)
25
- (h = i(h, ++c, t)) != null && (r > h || r === void 0 && h >= h) && (r = h);
26
- }
27
- return r;
28
- }
29
- function Z(t, i) {
30
- let r = 0;
31
- if (i === void 0)
32
- for (let c of t)
33
- (c = +c) && (r += c);
34
- else {
35
- let c = -1;
36
- for (let h of t)
37
- (h = +i(h, ++c, t)) && (r += h);
38
- }
39
- return r;
40
- }
41
- function Mt(t) {
42
- return t.target.depth;
43
- }
44
- function Nt(t) {
45
- return t.depth;
46
- }
47
- function Pt(t, i) {
48
- return i - 1 - t.height;
49
- }
50
- function dt(t, i) {
51
- return t.sourceLinks.length ? t.depth : i - 1;
52
- }
53
- function Ct(t) {
54
- return t.targetLinks.length ? t.depth : t.sourceLinks.length ? yt(t.sourceLinks, Mt) - 1 : 0;
55
- }
56
- function H(t) {
57
- return function() {
58
- return t;
59
- };
60
- }
61
- function lt(t, i) {
62
- return Y(t.source, i.source) || t.index - i.index;
63
- }
64
- function at(t, i) {
65
- return Y(t.target, i.target) || t.index - i.index;
66
- }
67
- function Y(t, i) {
68
- return t.y0 - i.y0;
69
- }
70
- function J(t) {
71
- return t.value;
72
- }
73
- function It(t) {
74
- return t.index;
75
- }
76
- function $t(t) {
77
- return t.nodes;
78
- }
79
- function Ot(t) {
80
- return t.links;
81
- }
82
- function ct(t, i) {
83
- const r = t.get(i);
84
- if (!r)
85
- throw new Error("missing: " + i);
86
- return r;
87
- }
88
- function ut({ nodes: t }) {
89
- for (const i of t) {
90
- let r = i.y0, c = r;
91
- for (const h of i.sourceLinks)
92
- h.y0 = r + h.width / 2, r += h.width;
93
- for (const h of i.targetLinks)
94
- h.y1 = c + h.width / 2, c += h.width;
95
- }
96
- }
97
- function jt() {
98
- let t = 0, i = 0, r = 1, c = 1, h = 24, k = 8, d, g = It, s = dt, l, u, p = $t, v = Ot, y = 6;
99
- function _() {
100
- const n = { nodes: p.apply(null, arguments), links: v.apply(null, arguments) };
101
- return E(n), L(n), A(n), N(n), b(n), ut(n), n;
102
- }
103
- _.update = function(n) {
104
- return ut(n), n;
105
- }, _.nodeId = function(n) {
106
- return arguments.length ? (g = typeof n == "function" ? n : H(n), _) : g;
107
- }, _.nodeAlign = function(n) {
108
- return arguments.length ? (s = typeof n == "function" ? n : H(n), _) : s;
109
- }, _.nodeSort = function(n) {
110
- return arguments.length ? (l = n, _) : l;
111
- }, _.nodeWidth = function(n) {
112
- return arguments.length ? (h = +n, _) : h;
113
- }, _.nodePadding = function(n) {
114
- return arguments.length ? (k = d = +n, _) : k;
115
- }, _.nodes = function(n) {
116
- return arguments.length ? (p = typeof n == "function" ? n : H(n), _) : p;
117
- }, _.links = function(n) {
118
- return arguments.length ? (v = typeof n == "function" ? n : H(n), _) : v;
119
- }, _.linkSort = function(n) {
120
- return arguments.length ? (u = n, _) : u;
121
- }, _.size = function(n) {
122
- return arguments.length ? (t = i = 0, r = +n[0], c = +n[1], _) : [r - t, c - i];
123
- }, _.extent = function(n) {
124
- return arguments.length ? (t = +n[0][0], r = +n[1][0], i = +n[0][1], c = +n[1][1], _) : [[t, i], [r, c]];
125
- }, _.iterations = function(n) {
126
- return arguments.length ? (y = +n, _) : y;
127
- };
128
- function E({ nodes: n, links: f }) {
129
- for (const [a, o] of n.entries())
130
- o.index = a, o.sourceLinks = [], o.targetLinks = [];
131
- const e = new Map(n.map((a, o) => [g(a, o, n), a]));
132
- for (const [a, o] of f.entries()) {
133
- o.index = a;
134
- let { source: m, target: x } = o;
135
- typeof m != "object" && (m = o.source = ct(e, m)), typeof x != "object" && (x = o.target = ct(e, x)), m.sourceLinks.push(o), x.targetLinks.push(o);
136
- }
137
- if (u != null)
138
- for (const { sourceLinks: a, targetLinks: o } of n)
139
- a.sort(u), o.sort(u);
140
- }
141
- function L({ nodes: n }) {
142
- for (const f of n)
143
- f.value = f.fixedValue === void 0 ? Math.max(Z(f.sourceLinks, J), Z(f.targetLinks, J)) : f.fixedValue;
144
- }
145
- function A({ nodes: n }) {
146
- const f = n.length;
147
- let e = new Set(n), a = /* @__PURE__ */ new Set(), o = 0;
148
- for (; e.size; ) {
149
- for (const m of e) {
150
- m.depth = o;
151
- for (const { target: x } of m.sourceLinks)
152
- a.add(x);
153
- }
154
- if (++o > f)
155
- throw new Error("circular link");
156
- e = a, a = /* @__PURE__ */ new Set();
157
- }
158
- }
159
- function N({ nodes: n }) {
160
- const f = n.length;
161
- let e = new Set(n), a = /* @__PURE__ */ new Set(), o = 0;
162
- for (; e.size; ) {
163
- for (const m of e) {
164
- m.height = o;
165
- for (const { source: x } of m.targetLinks)
166
- a.add(x);
167
- }
168
- if (++o > f)
169
- throw new Error("circular link");
170
- e = a, a = /* @__PURE__ */ new Set();
171
- }
172
- }
173
- function P({ nodes: n }) {
174
- const f = ot(n, (o) => o.depth) + 1, e = (r - t - h) / (f - 1), a = new Array(f);
175
- for (const o of n) {
176
- const m = Math.max(0, Math.min(f - 1, Math.floor(s.call(null, o, f))));
177
- o.layer = m, o.x0 = t + m * e, o.x1 = o.x0 + h, a[m] ? a[m].push(o) : a[m] = [o];
178
- }
179
- if (l)
180
- for (const o of a)
181
- o.sort(l);
182
- return a;
183
- }
184
- function j(n) {
185
- const f = yt(n, (e) => (c - i - (e.length - 1) * d) / Z(e, J));
186
- for (const e of n) {
187
- let a = i;
188
- for (const o of e) {
189
- o.y0 = a, o.y1 = a + o.value * f, a = o.y1 + d;
190
- for (const m of o.sourceLinks)
191
- m.width = m.value * f;
192
- }
193
- a = (c - a + d) / (e.length + 1);
194
- for (let o = 0; o < e.length; ++o) {
195
- const m = e[o];
196
- m.y0 += a * (o + 1), m.y1 += a * (o + 1);
197
- }
198
- T(e);
199
- }
200
- }
201
- function b(n) {
202
- const f = P(n);
203
- d = Math.min(k, (c - i) / (ot(f, (e) => e.length) - 1)), j(f);
204
- for (let e = 0; e < y; ++e) {
205
- const a = Math.pow(0.99, e), o = Math.max(1 - a, (e + 1) / y);
206
- $(f, a, o), M(f, a, o);
207
- }
208
- }
209
- function M(n, f, e) {
210
- for (let a = 1, o = n.length; a < o; ++a) {
211
- const m = n[a];
212
- for (const x of m) {
213
- let F = 0, D = 0;
214
- for (const { source: U, value: K } of x.targetLinks) {
215
- let W = K * (x.layer - U.layer);
216
- F += S(U, x) * W, D += W;
217
- }
218
- if (!(D > 0))
219
- continue;
220
- let R = (F / D - x.y0) * f;
221
- x.y0 += R, x.y1 += R, w(x);
222
- }
223
- l === void 0 && m.sort(Y), C(m, e);
224
- }
225
- }
226
- function $(n, f, e) {
227
- for (let a = n.length, o = a - 2; o >= 0; --o) {
228
- const m = n[o];
229
- for (const x of m) {
230
- let F = 0, D = 0;
231
- for (const { target: U, value: K } of x.sourceLinks) {
232
- let W = K * (U.layer - x.layer);
233
- F += O(x, U) * W, D += W;
234
- }
235
- if (!(D > 0))
236
- continue;
237
- let R = (F / D - x.y0) * f;
238
- x.y0 += R, x.y1 += R, w(x);
239
- }
240
- l === void 0 && m.sort(Y), C(m, e);
241
- }
242
- }
243
- function C(n, f) {
244
- const e = n.length >> 1, a = n[e];
245
- z(n, a.y0 - d, e - 1, f), I(n, a.y1 + d, e + 1, f), z(n, c, n.length - 1, f), I(n, i, 0, f);
246
- }
247
- function I(n, f, e, a) {
248
- for (; e < n.length; ++e) {
249
- const o = n[e], m = (f - o.y0) * a;
250
- m > 1e-6 && (o.y0 += m, o.y1 += m), f = o.y1 + d;
251
- }
252
- }
253
- function z(n, f, e, a) {
254
- for (; e >= 0; --e) {
255
- const o = n[e], m = (o.y1 - f) * a;
256
- m > 1e-6 && (o.y0 -= m, o.y1 -= m), f = o.y0 - d;
257
- }
258
- }
259
- function w({ sourceLinks: n, targetLinks: f }) {
260
- if (u === void 0) {
261
- for (const { source: { sourceLinks: e } } of f)
262
- e.sort(at);
263
- for (const { target: { targetLinks: e } } of n)
264
- e.sort(lt);
265
- }
266
- }
267
- function T(n) {
268
- if (u === void 0)
269
- for (const { sourceLinks: f, targetLinks: e } of n)
270
- f.sort(at), e.sort(lt);
271
- }
272
- function S(n, f) {
273
- let e = n.y0 - (n.sourceLinks.length - 1) * d / 2;
274
- for (const { target: a, width: o } of n.sourceLinks) {
275
- if (a === f)
276
- break;
277
- e += o + d;
278
- }
279
- for (const { source: a, width: o } of f.targetLinks) {
280
- if (a === n)
281
- break;
282
- e -= o;
283
- }
284
- return e;
285
- }
286
- function O(n, f) {
287
- let e = f.y0 - (f.targetLinks.length - 1) * d / 2;
288
- for (const { source: a, width: o } of f.targetLinks) {
289
- if (a === n)
290
- break;
291
- e += o + d;
292
- }
293
- for (const { target: a, width: o } of n.sourceLinks) {
294
- if (a === f)
295
- break;
296
- e -= o;
297
- }
298
- return e;
299
- }
300
- return _;
301
- }
302
- var tt = Math.PI, et = 2 * tt, B = 1e-6, zt = et - B;
303
- function nt() {
304
- this._x0 = this._y0 = // start of current subpath
305
- this._x1 = this._y1 = null, this._ = "";
306
- }
307
- function gt() {
308
- return new nt();
309
- }
310
- nt.prototype = gt.prototype = {
311
- constructor: nt,
312
- moveTo: function(t, i) {
313
- this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +i);
314
- },
315
- closePath: function() {
316
- this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
317
- },
318
- lineTo: function(t, i) {
319
- this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +i);
320
- },
321
- quadraticCurveTo: function(t, i, r, c) {
322
- this._ += "Q" + +t + "," + +i + "," + (this._x1 = +r) + "," + (this._y1 = +c);
323
- },
324
- bezierCurveTo: function(t, i, r, c, h, k) {
325
- this._ += "C" + +t + "," + +i + "," + +r + "," + +c + "," + (this._x1 = +h) + "," + (this._y1 = +k);
326
- },
327
- arcTo: function(t, i, r, c, h) {
328
- t = +t, i = +i, r = +r, c = +c, h = +h;
329
- var k = this._x1, d = this._y1, g = r - t, s = c - i, l = k - t, u = d - i, p = l * l + u * u;
330
- if (h < 0)
331
- throw new Error("negative radius: " + h);
332
- if (this._x1 === null)
333
- this._ += "M" + (this._x1 = t) + "," + (this._y1 = i);
334
- else if (p > B)
335
- if (!(Math.abs(u * g - s * l) > B) || !h)
336
- this._ += "L" + (this._x1 = t) + "," + (this._y1 = i);
337
- else {
338
- var v = r - k, y = c - d, _ = g * g + s * s, E = v * v + y * y, L = Math.sqrt(_), A = Math.sqrt(p), N = h * Math.tan((tt - Math.acos((_ + p - E) / (2 * L * A))) / 2), P = N / A, j = N / L;
339
- Math.abs(P - 1) > B && (this._ += "L" + (t + P * l) + "," + (i + P * u)), this._ += "A" + h + "," + h + ",0,0," + +(u * v > l * y) + "," + (this._x1 = t + j * g) + "," + (this._y1 = i + j * s);
340
- }
341
- },
342
- arc: function(t, i, r, c, h, k) {
343
- t = +t, i = +i, r = +r, k = !!k;
344
- var d = r * Math.cos(c), g = r * Math.sin(c), s = t + d, l = i + g, u = 1 ^ k, p = k ? c - h : h - c;
345
- if (r < 0)
346
- throw new Error("negative radius: " + r);
347
- this._x1 === null ? this._ += "M" + s + "," + l : (Math.abs(this._x1 - s) > B || Math.abs(this._y1 - l) > B) && (this._ += "L" + s + "," + l), r && (p < 0 && (p = p % et + et), p > zt ? this._ += "A" + r + "," + r + ",0,1," + u + "," + (t - d) + "," + (i - g) + "A" + r + "," + r + ",0,1," + u + "," + (this._x1 = s) + "," + (this._y1 = l) : p > B && (this._ += "A" + r + "," + r + ",0," + +(p >= tt) + "," + u + "," + (this._x1 = t + r * Math.cos(h)) + "," + (this._y1 = i + r * Math.sin(h))));
348
- },
349
- rect: function(t, i, r, c) {
350
- this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +i) + "h" + +r + "v" + +c + "h" + -r + "Z";
351
- },
352
- toString: function() {
353
- return this._;
354
- }
355
- };
356
- function ht(t) {
357
- return function() {
358
- return t;
359
- };
360
- }
361
- function Dt(t) {
362
- return t[0];
363
- }
364
- function Bt(t) {
365
- return t[1];
366
- }
367
- var Vt = Array.prototype.slice;
368
- function Ft(t) {
369
- return t.source;
370
- }
371
- function Rt(t) {
372
- return t.target;
373
- }
374
- function Ut(t) {
375
- var i = Ft, r = Rt, c = Dt, h = Bt, k = null;
376
- function d() {
377
- var g, s = Vt.call(arguments), l = i.apply(this, s), u = r.apply(this, s);
378
- if (k || (k = g = gt()), t(k, +c.apply(this, (s[0] = l, s)), +h.apply(this, s), +c.apply(this, (s[0] = u, s)), +h.apply(this, s)), g)
379
- return k = null, g + "" || null;
380
- }
381
- return d.source = function(g) {
382
- return arguments.length ? (i = g, d) : i;
383
- }, d.target = function(g) {
384
- return arguments.length ? (r = g, d) : r;
385
- }, d.x = function(g) {
386
- return arguments.length ? (c = typeof g == "function" ? g : ht(+g), d) : c;
387
- }, d.y = function(g) {
388
- return arguments.length ? (h = typeof g == "function" ? g : ht(+g), d) : h;
389
- }, d.context = function(g) {
390
- return arguments.length ? (k = g == null ? null : g, d) : k;
391
- }, d;
392
- }
393
- function Wt(t, i, r, c, h) {
394
- t.moveTo(i, r), t.bezierCurveTo(i = (i + c) / 2, r, i, h, c, h);
395
- }
396
- function Gt() {
397
- return Ut(Wt);
398
- }
399
- function Ht(t) {
400
- return [t.source.x1, t.y0];
401
- }
402
- function Yt(t) {
403
- return [t.target.x0, t.y1];
404
- }
405
- function Xt() {
406
- return Gt().source(Ht).target(Yt);
407
- }
408
- var it = function() {
409
- var t = function(g, s, l, u) {
410
- for (l = l || {}, u = g.length; u--; l[g[u]] = s)
411
- ;
412
- return l;
413
- }, i = [1, 9], r = [1, 10], c = [1, 5, 10, 12], h = {
414
- trace: function() {
415
- },
416
- yy: {},
417
- 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 },
418
- 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" },
419
- productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
420
- performAction: function(s, l, u, p, v, y, _) {
421
- var E = y.length - 1;
422
- switch (v) {
423
- case 7:
424
- const L = p.findOrCreateNode(y[E - 4].trim().replaceAll('""', '"')), A = p.findOrCreateNode(y[E - 2].trim().replaceAll('""', '"')), N = parseFloat(y[E].trim());
425
- p.addLink(L, A, N);
426
- break;
427
- case 8:
428
- case 9:
429
- case 11:
430
- this.$ = y[E];
431
- break;
432
- case 10:
433
- this.$ = y[E - 1];
434
- break;
435
- }
436
- },
437
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: i, 20: r }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(r, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(c, [2, 8]), t(c, [2, 9]), { 19: [1, 16] }, t(c, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(r, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: i, 20: r }, { 15: 18, 16: 7, 17: 8, 18: i, 20: r }, { 18: [1, 19] }, t(r, [2, 3]), { 12: [1, 20] }, t(c, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: i, 20: r }, t([1, 5, 10], [2, 7])],
438
- defaultActions: { 11: [2, 1], 12: [2, 5] },
439
- parseError: function(s, l) {
440
- if (l.recoverable)
441
- this.trace(s);
442
- else {
443
- var u = new Error(s);
444
- throw u.hash = l, u;
445
- }
446
- },
447
- parse: function(s) {
448
- var l = this, u = [0], p = [], v = [null], y = [], _ = this.table, E = "", L = 0, A = 0, N = 2, P = 1, j = y.slice.call(arguments, 1), b = Object.create(this.lexer), M = { yy: {} };
449
- for (var $ in this.yy)
450
- Object.prototype.hasOwnProperty.call(this.yy, $) && (M.yy[$] = this.yy[$]);
451
- b.setInput(s, M.yy), M.yy.lexer = b, M.yy.parser = this, typeof b.yylloc == "undefined" && (b.yylloc = {});
452
- var C = b.yylloc;
453
- y.push(C);
454
- var I = b.options && b.options.ranges;
455
- typeof M.yy.parseError == "function" ? this.parseError = M.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
456
- function z() {
457
- var x;
458
- return x = p.pop() || b.lex() || P, typeof x != "number" && (x instanceof Array && (p = x, x = p.pop()), x = l.symbols_[x] || x), x;
459
- }
460
- for (var w, T, S, O, n = {}, f, e, a, o; ; ) {
461
- if (T = u[u.length - 1], this.defaultActions[T] ? S = this.defaultActions[T] : ((w === null || typeof w == "undefined") && (w = z()), S = _[T] && _[T][w]), typeof S == "undefined" || !S.length || !S[0]) {
462
- var m = "";
463
- o = [];
464
- for (f in _[T])
465
- this.terminals_[f] && f > N && o.push("'" + this.terminals_[f] + "'");
466
- b.showPosition ? m = "Parse error on line " + (L + 1) + `:
467
- ` + b.showPosition() + `
468
- Expecting ` + o.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : m = "Parse error on line " + (L + 1) + ": Unexpected " + (w == P ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(m, {
469
- text: b.match,
470
- token: this.terminals_[w] || w,
471
- line: b.yylineno,
472
- loc: C,
473
- expected: o
474
- });
475
- }
476
- if (S[0] instanceof Array && S.length > 1)
477
- throw new Error("Parse Error: multiple actions possible at state: " + T + ", token: " + w);
478
- switch (S[0]) {
479
- case 1:
480
- u.push(w), v.push(b.yytext), y.push(b.yylloc), u.push(S[1]), w = null, A = b.yyleng, E = b.yytext, L = b.yylineno, C = b.yylloc;
481
- break;
482
- case 2:
483
- if (e = this.productions_[S[1]][1], n.$ = v[v.length - e], n._$ = {
484
- first_line: y[y.length - (e || 1)].first_line,
485
- last_line: y[y.length - 1].last_line,
486
- first_column: y[y.length - (e || 1)].first_column,
487
- last_column: y[y.length - 1].last_column
488
- }, I && (n._$.range = [
489
- y[y.length - (e || 1)].range[0],
490
- y[y.length - 1].range[1]
491
- ]), O = this.performAction.apply(n, [
492
- E,
493
- A,
494
- L,
495
- M.yy,
496
- S[1],
497
- v,
498
- y
499
- ].concat(j)), typeof O != "undefined")
500
- return O;
501
- e && (u = u.slice(0, -1 * e * 2), v = v.slice(0, -1 * e), y = y.slice(0, -1 * e)), u.push(this.productions_[S[1]][0]), v.push(n.$), y.push(n._$), a = _[u[u.length - 2]][u[u.length - 1]], u.push(a);
502
- break;
503
- case 3:
504
- return !0;
505
- }
506
- }
507
- return !0;
508
- }
509
- }, k = function() {
510
- var g = {
511
- EOF: 1,
512
- parseError: function(l, u) {
513
- if (this.yy.parser)
514
- this.yy.parser.parseError(l, u);
515
- else
516
- throw new Error(l);
517
- },
518
- // resets the lexer, sets new input
519
- setInput: function(s, l) {
520
- return this.yy = l || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
521
- first_line: 1,
522
- first_column: 0,
523
- last_line: 1,
524
- last_column: 0
525
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
526
- },
527
- // consumes and returns one char from the input
528
- input: function() {
529
- var s = this._input[0];
530
- this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
531
- var l = s.match(/(?:\r\n?|\n).*/g);
532
- return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
533
- },
534
- // unshifts one char (or a string) into the input
535
- unput: function(s) {
536
- var l = s.length, u = s.split(/(?:\r\n?|\n)/g);
537
- this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
538
- var p = this.match.split(/(?:\r\n?|\n)/g);
539
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
540
- var v = this.yylloc.range;
541
- return this.yylloc = {
542
- first_line: this.yylloc.first_line,
543
- last_line: this.yylineno + 1,
544
- first_column: this.yylloc.first_column,
545
- last_column: u ? (u.length === p.length ? this.yylloc.first_column : 0) + p[p.length - u.length].length - u[0].length : this.yylloc.first_column - l
546
- }, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
547
- },
548
- // When called from action, caches matched text and appends it on next action
549
- more: function() {
550
- return this._more = !0, this;
551
- },
552
- // 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.
553
- reject: function() {
554
- if (this.options.backtrack_lexer)
555
- this._backtrack = !0;
556
- else
557
- 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).
558
- ` + this.showPosition(), {
559
- text: "",
560
- token: null,
561
- line: this.yylineno
562
- });
563
- return this;
564
- },
565
- // retain first n characters of the match
566
- less: function(s) {
567
- this.unput(this.match.slice(s));
568
- },
569
- // displays already matched input, i.e. for error messages
570
- pastInput: function() {
571
- var s = this.matched.substr(0, this.matched.length - this.match.length);
572
- return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
573
- },
574
- // displays upcoming input, i.e. for error messages
575
- upcomingInput: function() {
576
- var s = this.match;
577
- return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
578
- },
579
- // displays the character position where the lexing error occurred, i.e. for error messages
580
- showPosition: function() {
581
- var s = this.pastInput(), l = new Array(s.length + 1).join("-");
582
- return s + this.upcomingInput() + `
583
- ` + l + "^";
584
- },
585
- // test the lexed token: return FALSE when not a match, otherwise return token
586
- test_match: function(s, l) {
587
- var u, p, v;
588
- if (this.options.backtrack_lexer && (v = {
589
- yylineno: this.yylineno,
590
- yylloc: {
591
- first_line: this.yylloc.first_line,
592
- last_line: this.last_line,
593
- first_column: this.yylloc.first_column,
594
- last_column: this.yylloc.last_column
595
- },
596
- yytext: this.yytext,
597
- match: this.match,
598
- matches: this.matches,
599
- matched: this.matched,
600
- yyleng: this.yyleng,
601
- offset: this.offset,
602
- _more: this._more,
603
- _input: this._input,
604
- yy: this.yy,
605
- conditionStack: this.conditionStack.slice(0),
606
- done: this.done
607
- }, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), p = s[0].match(/(?:\r\n?|\n).*/g), p && (this.yylineno += p.length), this.yylloc = {
608
- first_line: this.yylloc.last_line,
609
- last_line: this.yylineno + 1,
610
- first_column: this.yylloc.last_column,
611
- last_column: p ? p[p.length - 1].length - p[p.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
612
- }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u)
613
- return u;
614
- if (this._backtrack) {
615
- for (var y in v)
616
- this[y] = v[y];
617
- return !1;
618
- }
619
- return !1;
620
- },
621
- // return next match in input
622
- next: function() {
623
- if (this.done)
624
- return this.EOF;
625
- this._input || (this.done = !0);
626
- var s, l, u, p;
627
- this._more || (this.yytext = "", this.match = "");
628
- for (var v = this._currentRules(), y = 0; y < v.length; y++)
629
- if (u = this._input.match(this.rules[v[y]]), u && (!l || u[0].length > l[0].length)) {
630
- if (l = u, p = y, this.options.backtrack_lexer) {
631
- if (s = this.test_match(u, v[y]), s !== !1)
632
- return s;
633
- if (this._backtrack) {
634
- l = !1;
635
- continue;
636
- } else
637
- return !1;
638
- } else if (!this.options.flex)
639
- break;
640
- }
641
- return l ? (s = this.test_match(l, v[p]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
642
- ` + this.showPosition(), {
643
- text: "",
644
- token: null,
645
- line: this.yylineno
646
- });
647
- },
648
- // return next match that has a token
649
- lex: function() {
650
- var l = this.next();
651
- return l || this.lex();
652
- },
653
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
654
- begin: function(l) {
655
- this.conditionStack.push(l);
656
- },
657
- // pop the previously active lexer condition state off the condition stack
658
- popState: function() {
659
- var l = this.conditionStack.length - 1;
660
- return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
661
- },
662
- // produce the lexer rule set which is active for the currently active lexer condition state
663
- _currentRules: function() {
664
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
665
- },
666
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
667
- topState: function(l) {
668
- return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
669
- },
670
- // alias for begin(condition)
671
- pushState: function(l) {
672
- this.begin(l);
673
- },
674
- // return the number of states currently on the stack
675
- stateStackSize: function() {
676
- return this.conditionStack.length;
677
- },
678
- options: { "case-insensitive": !0 },
679
- performAction: function(l, u, p, v) {
680
- switch (p) {
681
- case 0:
682
- return this.pushState("csv"), 4;
683
- case 1:
684
- return 10;
685
- case 2:
686
- return 5;
687
- case 3:
688
- return 12;
689
- case 4:
690
- return this.pushState("escaped_text"), 18;
691
- case 5:
692
- return 20;
693
- case 6:
694
- return this.popState("escaped_text"), 18;
695
- case 7:
696
- return 19;
697
- }
698
- },
699
- 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],
700
- 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 } }
701
- };
702
- return g;
703
- }();
704
- h.lexer = k;
705
- function d() {
706
- this.yy = {};
707
- }
708
- return d.prototype = h, h.Parser = d, new d();
709
- }();
710
- it.parser = it;
711
- const X = it;
712
- let q = [], Q = [], V = {};
713
- const qt = () => {
714
- q = [], Q = [], V = {}, wt();
715
- };
716
- class Qt {
717
- constructor(i, r, c = 0) {
718
- this.source = i, this.target = r, this.value = c;
719
- }
720
- }
721
- const Kt = (t, i, r) => {
722
- q.push(new Qt(t, i, r));
723
- };
724
- class Zt {
725
- constructor(i) {
726
- this.ID = i;
727
- }
728
- }
729
- const Jt = (t) => (t = St.sanitizeText(t, rt()), V[t] || (V[t] = new Zt(t), Q.push(V[t])), V[t]), te = () => Q, ee = () => q, ne = () => ({
730
- nodes: Q.map((t) => ({ id: t.ID })),
731
- links: q.map((t) => ({
732
- source: t.source.ID,
733
- target: t.target.ID,
734
- value: t.value
735
- }))
736
- }), ie = {
737
- nodesMap: V,
738
- getConfig: () => rt().sankey,
739
- getNodes: te,
740
- getLinks: ee,
741
- getGraph: ne,
742
- addLink: Kt,
743
- findOrCreateNode: Jt,
744
- getAccTitle: mt,
745
- setAccTitle: kt,
746
- getAccDescription: _t,
747
- setAccDescription: xt,
748
- getDiagramTitle: vt,
749
- setDiagramTitle: bt,
750
- clear: qt
751
- }, pt = class st {
752
- static next(i) {
753
- return new st(i + ++st.count);
754
- }
755
- constructor(i) {
756
- this.id = i, this.href = `#${i}`;
757
- }
758
- toString() {
759
- return "url(" + this.href + ")";
760
- }
761
- };
762
- pt.count = 0;
763
- let ft = pt;
764
- const se = {
765
- left: Nt,
766
- right: Pt,
767
- center: Ct,
768
- justify: dt
769
- }, re = function(t, i, r, c) {
770
- var z, w, T, S, O, n, f;
771
- const { securityLevel: h, sankey: k } = rt(), d = Lt.sankey;
772
- let g;
773
- h === "sandbox" && (g = G("#i" + i));
774
- const s = h === "sandbox" ? G(g.nodes()[0].contentDocument.body) : G("body"), l = h === "sandbox" ? s.select(`[id="${i}"]`) : G(`[id="${i}"]`), u = (z = k == null ? void 0 : k.width) != null ? z : d.width, p = (w = k == null ? void 0 : k.height) != null ? w : d.width, v = (T = k == null ? void 0 : k.useMaxWidth) != null ? T : d.useMaxWidth, y = (S = k == null ? void 0 : k.nodeAlignment) != null ? S : d.nodeAlignment, _ = (O = k == null ? void 0 : k.prefix) != null ? O : d.prefix, E = (n = k == null ? void 0 : k.suffix) != null ? n : d.suffix, L = (f = k == null ? void 0 : k.showValues) != null ? f : d.showValues, A = c.db.getGraph(), N = se[y], P = 10;
775
- jt().nodeId((e) => e.id).nodeWidth(P).nodePadding(10 + (L ? 15 : 0)).nodeAlign(N).extent([
776
- [0, 0],
777
- [u, p]
778
- ])(A);
779
- const b = At(Tt);
780
- l.append("g").attr("class", "nodes").selectAll(".node").data(A.nodes).join("g").attr("class", "node").attr("id", (e) => (e.uid = ft.next("node-")).id).attr("transform", function(e) {
781
- return "translate(" + e.x0 + "," + e.y0 + ")";
782
- }).attr("x", (e) => e.x0).attr("y", (e) => e.y0).append("rect").attr("height", (e) => e.y1 - e.y0).attr("width", (e) => e.x1 - e.x0).attr("fill", (e) => b(e.id));
783
- const M = ({ id: e, value: a }) => L ? `${e}
784
- ${_}${Math.round(a * 100) / 100}${E}` : e;
785
- l.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(A.nodes).join("text").attr("x", (e) => e.x0 < u / 2 ? e.x1 + 6 : e.x0 - 6).attr("y", (e) => (e.y1 + e.y0) / 2).attr("dy", `${L ? "0" : "0.35"}em`).attr("text-anchor", (e) => e.x0 < u / 2 ? "start" : "end").text(M);
786
- const $ = l.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(A.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), C = (k == null ? void 0 : k.linkColor) || "gradient";
787
- if (C === "gradient") {
788
- const e = $.append("linearGradient").attr("id", (a) => (a.uid = ft.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (a) => a.source.x1).attr("x2", (a) => a.target.x0);
789
- e.append("stop").attr("offset", "0%").attr("stop-color", (a) => b(a.source.id)), e.append("stop").attr("offset", "100%").attr("stop-color", (a) => b(a.target.id));
790
- }
791
- let I;
792
- switch (C) {
793
- case "gradient":
794
- I = (e) => e.uid;
795
- break;
796
- case "source":
797
- I = (e) => b(e.source.id);
798
- break;
799
- case "target":
800
- I = (e) => b(e.target.id);
801
- break;
802
- default:
803
- I = C;
804
- }
805
- $.append("path").attr("d", Xt()).attr("stroke", I).attr("stroke-width", (e) => Math.max(1, e.width)), Et(void 0, l, 0, v);
806
- }, oe = {
807
- draw: re
808
- }, le = (t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
809
- `).trim(), ae = X.parse.bind(X);
810
- X.parse = (t) => ae(le(t));
811
- const ye = {
812
- parser: X,
813
- db: ie,
814
- renderer: oe
815
- };
816
- export {
817
- ye as diagram
818
- };