lowcoder-comps 2.4.13 → 2.4.15

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/{0fa873f8.js → 0bb0c92e.js} +4 -4
  2. package/{1d0578cc.js → 0cc36377.js} +919 -969
  3. package/{4ee1107f.js → 0fa86771.js} +411 -451
  4. package/{7ceb1a86.js → 19a2ee87.js} +1067 -1085
  5. package/{62a4e802.js → 1b41afb7.js} +6 -6
  6. package/{140d1965.js → 1e5b4466.js} +1 -1
  7. package/21ce624b.js +433 -0
  8. package/247d363c.js +797 -0
  9. package/{66d40f47.js → 2dc10e5c.js} +96 -99
  10. package/{48262065.js → 3a91cb5c.js} +8 -8
  11. package/{bfff0c9e.js → 3ebe8123.js} +26 -27
  12. package/{e60eb1d6.js → 3f2bde45.js} +1 -1
  13. package/{08ce8965.js → 4046c39a.js} +247 -258
  14. package/{256b619e.js → 428ebac9.js} +14 -15
  15. package/{f85b9955.js → 4b8936b0.js} +68 -69
  16. package/{722d14f3.js → 4d48e6df.js} +6 -6
  17. package/{93e77b54.js → 558e8ee5.js} +4 -4
  18. package/{d2b89014.js → 56f6e990.js} +92 -92
  19. package/{6c5168e9.js → 5a31cef7.js} +2 -2
  20. package/{7873457c.js → 5d41cf38.js} +6 -6
  21. package/{5d259708.js → 5fd9a898.js} +4 -5
  22. package/{2c7a98c7.js → 63a771ab.js} +8 -8
  23. package/6a32f1c1.js +206 -0
  24. package/{e7717e30.js → 7035666f.js} +7 -7
  25. package/{c840f94c.js → 74ef17ae.js} +140 -141
  26. package/{eeeac330.js → 7cc252e4.js} +65540 -59868
  27. package/81d6ce63.js +817 -0
  28. package/{c8211b18.js → 832e744b.js} +1 -1
  29. package/{81a0d6f1.js → 8718dc59.js} +12 -12
  30. package/{7a22ada0.js → 88953f96.js} +18 -18
  31. package/a8d4a50e.js +373 -0
  32. package/aa88392e.js +190 -0
  33. package/b0862b2f.js +1083 -0
  34. package/{62c4dc6e.js → c1b710aa.js} +5 -5
  35. package/{4cf9b6b3.js → d72b57c8.js} +12713 -12735
  36. package/{629dfdca.js → e441921a.js} +4 -4
  37. package/{47848c42.js → e5b014a9.js} +5 -5
  38. package/{b7fefb34.js → eb3bf879.js} +2 -2
  39. package/{febae45b.js → eb5cf40c.js} +2 -2
  40. package/{ddee0e99.js → edc74d11.js} +3 -3
  41. package/f0f41787.js +1264 -0
  42. package/index.js +2 -2
  43. package/package.json +1 -1
  44. package/1de1a3c9.js +0 -1102
  45. package/2510669f.js +0 -237
  46. package/68ee7280.js +0 -1276
  47. package/89baa2e6.js +0 -391
  48. package/9dc6adcd.js +0 -819
  49. package/ab55adad.js +0 -818
  50. package/c459c043.js +0 -208
  51. package/e47dc9ca.js +0 -455
package/81d6ce63.js ADDED
@@ -0,0 +1,817 @@
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 "./7cc252e4.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, n) {
6
+ let s;
7
+ if (n === void 0)
8
+ for (const a of t)
9
+ a != null && (s < a || s === void 0 && a >= a) && (s = a);
10
+ else {
11
+ let a = -1;
12
+ for (let u of t)
13
+ (u = n(u, ++a, t)) != null && (s < u || s === void 0 && u >= u) && (s = u);
14
+ }
15
+ return s;
16
+ }
17
+ function yt(t, n) {
18
+ let s;
19
+ if (n === void 0)
20
+ for (const a of t)
21
+ a != null && (s > a || s === void 0 && a >= a) && (s = a);
22
+ else {
23
+ let a = -1;
24
+ for (let u of t)
25
+ (u = n(u, ++a, t)) != null && (s > u || s === void 0 && u >= u) && (s = u);
26
+ }
27
+ return s;
28
+ }
29
+ function Z(t, n) {
30
+ let s = 0;
31
+ if (n === void 0)
32
+ for (let a of t)
33
+ (a = +a) && (s += a);
34
+ else {
35
+ let a = -1;
36
+ for (let u of t)
37
+ (u = +n(u, ++a, t)) && (s += u);
38
+ }
39
+ return s;
40
+ }
41
+ function Mt(t) {
42
+ return t.target.depth;
43
+ }
44
+ function Nt(t) {
45
+ return t.depth;
46
+ }
47
+ function Pt(t, n) {
48
+ return n - 1 - t.height;
49
+ }
50
+ function dt(t, n) {
51
+ return t.sourceLinks.length ? t.depth : n - 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, n) {
62
+ return Y(t.source, n.source) || t.index - n.index;
63
+ }
64
+ function at(t, n) {
65
+ return Y(t.target, n.target) || t.index - n.index;
66
+ }
67
+ function Y(t, n) {
68
+ return t.y0 - n.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, n) {
83
+ const s = t.get(n);
84
+ if (!s)
85
+ throw new Error("missing: " + n);
86
+ return s;
87
+ }
88
+ function ut({ nodes: t }) {
89
+ for (const n of t) {
90
+ let s = n.y0, a = s;
91
+ for (const u of n.sourceLinks)
92
+ u.y0 = s + u.width / 2, s += u.width;
93
+ for (const u of n.targetLinks)
94
+ u.y1 = a + u.width / 2, a += u.width;
95
+ }
96
+ }
97
+ function jt() {
98
+ let t = 0, n = 0, s = 1, a = 1, u = 24, _ = 8, g, p = It, i = dt, o, c, m = $t, b = Ot, y = 6;
99
+ function x() {
100
+ const e = { nodes: m.apply(null, arguments), links: b.apply(null, arguments) };
101
+ return E(e), L(e), A(e), N(e), S(e), ut(e), e;
102
+ }
103
+ x.update = function(e) {
104
+ return ut(e), e;
105
+ }, x.nodeId = function(e) {
106
+ return arguments.length ? (p = typeof e == "function" ? e : H(e), x) : p;
107
+ }, x.nodeAlign = function(e) {
108
+ return arguments.length ? (i = typeof e == "function" ? e : H(e), x) : i;
109
+ }, x.nodeSort = function(e) {
110
+ return arguments.length ? (o = e, x) : o;
111
+ }, x.nodeWidth = function(e) {
112
+ return arguments.length ? (u = +e, x) : u;
113
+ }, x.nodePadding = function(e) {
114
+ return arguments.length ? (_ = g = +e, x) : _;
115
+ }, x.nodes = function(e) {
116
+ return arguments.length ? (m = typeof e == "function" ? e : H(e), x) : m;
117
+ }, x.links = function(e) {
118
+ return arguments.length ? (b = typeof e == "function" ? e : H(e), x) : b;
119
+ }, x.linkSort = function(e) {
120
+ return arguments.length ? (c = e, x) : c;
121
+ }, x.size = function(e) {
122
+ return arguments.length ? (t = n = 0, s = +e[0], a = +e[1], x) : [s - t, a - n];
123
+ }, x.extent = function(e) {
124
+ return arguments.length ? (t = +e[0][0], s = +e[1][0], n = +e[0][1], a = +e[1][1], x) : [[t, n], [s, a]];
125
+ }, x.iterations = function(e) {
126
+ return arguments.length ? (y = +e, x) : y;
127
+ };
128
+ function E({ nodes: e, links: f }) {
129
+ for (const [h, r] of e.entries())
130
+ r.index = h, r.sourceLinks = [], r.targetLinks = [];
131
+ const l = new Map(e.map((h, r) => [p(h, r, e), h]));
132
+ for (const [h, r] of f.entries()) {
133
+ r.index = h;
134
+ let { source: k, target: v } = r;
135
+ typeof k != "object" && (k = r.source = ct(l, k)), typeof v != "object" && (v = r.target = ct(l, v)), k.sourceLinks.push(r), v.targetLinks.push(r);
136
+ }
137
+ if (c != null)
138
+ for (const { sourceLinks: h, targetLinks: r } of e)
139
+ h.sort(c), r.sort(c);
140
+ }
141
+ function L({ nodes: e }) {
142
+ for (const f of e)
143
+ f.value = f.fixedValue === void 0 ? Math.max(Z(f.sourceLinks, J), Z(f.targetLinks, J)) : f.fixedValue;
144
+ }
145
+ function A({ nodes: e }) {
146
+ const f = e.length;
147
+ let l = new Set(e), h = /* @__PURE__ */ new Set(), r = 0;
148
+ for (; l.size; ) {
149
+ for (const k of l) {
150
+ k.depth = r;
151
+ for (const { target: v } of k.sourceLinks)
152
+ h.add(v);
153
+ }
154
+ if (++r > f)
155
+ throw new Error("circular link");
156
+ l = h, h = /* @__PURE__ */ new Set();
157
+ }
158
+ }
159
+ function N({ nodes: e }) {
160
+ const f = e.length;
161
+ let l = new Set(e), h = /* @__PURE__ */ new Set(), r = 0;
162
+ for (; l.size; ) {
163
+ for (const k of l) {
164
+ k.height = r;
165
+ for (const { source: v } of k.targetLinks)
166
+ h.add(v);
167
+ }
168
+ if (++r > f)
169
+ throw new Error("circular link");
170
+ l = h, h = /* @__PURE__ */ new Set();
171
+ }
172
+ }
173
+ function P({ nodes: e }) {
174
+ const f = ot(e, (r) => r.depth) + 1, l = (s - t - u) / (f - 1), h = new Array(f);
175
+ for (const r of e) {
176
+ const k = Math.max(0, Math.min(f - 1, Math.floor(i.call(null, r, f))));
177
+ r.layer = k, r.x0 = t + k * l, r.x1 = r.x0 + u, h[k] ? h[k].push(r) : h[k] = [r];
178
+ }
179
+ if (o)
180
+ for (const r of h)
181
+ r.sort(o);
182
+ return h;
183
+ }
184
+ function j(e) {
185
+ const f = yt(e, (l) => (a - n - (l.length - 1) * g) / Z(l, J));
186
+ for (const l of e) {
187
+ let h = n;
188
+ for (const r of l) {
189
+ r.y0 = h, r.y1 = h + r.value * f, h = r.y1 + g;
190
+ for (const k of r.sourceLinks)
191
+ k.width = k.value * f;
192
+ }
193
+ h = (a - h + g) / (l.length + 1);
194
+ for (let r = 0; r < l.length; ++r) {
195
+ const k = l[r];
196
+ k.y0 += h * (r + 1), k.y1 += h * (r + 1);
197
+ }
198
+ $(l);
199
+ }
200
+ }
201
+ function S(e) {
202
+ const f = P(e);
203
+ g = Math.min(_, (a - n) / (ot(f, (l) => l.length) - 1)), j(f);
204
+ for (let l = 0; l < y; ++l) {
205
+ const h = Math.pow(0.99, l), r = Math.max(1 - h, (l + 1) / y);
206
+ O(f, h, r), M(f, h, r);
207
+ }
208
+ }
209
+ function M(e, f, l) {
210
+ for (let h = 1, r = e.length; h < r; ++h) {
211
+ const k = e[h];
212
+ for (const v of k) {
213
+ let F = 0, z = 0;
214
+ for (const { source: U, value: K } of v.targetLinks) {
215
+ let W = K * (v.layer - U.layer);
216
+ F += T(U, v) * W, z += W;
217
+ }
218
+ if (!(z > 0))
219
+ continue;
220
+ let R = (F / z - v.y0) * f;
221
+ v.y0 += R, v.y1 += R, w(v);
222
+ }
223
+ o === void 0 && k.sort(Y), C(k, l);
224
+ }
225
+ }
226
+ function O(e, f, l) {
227
+ for (let h = e.length, r = h - 2; r >= 0; --r) {
228
+ const k = e[r];
229
+ for (const v of k) {
230
+ let F = 0, z = 0;
231
+ for (const { target: U, value: K } of v.sourceLinks) {
232
+ let W = K * (U.layer - v.layer);
233
+ F += V(v, U) * W, z += W;
234
+ }
235
+ if (!(z > 0))
236
+ continue;
237
+ let R = (F / z - v.y0) * f;
238
+ v.y0 += R, v.y1 += R, w(v);
239
+ }
240
+ o === void 0 && k.sort(Y), C(k, l);
241
+ }
242
+ }
243
+ function C(e, f) {
244
+ const l = e.length >> 1, h = e[l];
245
+ d(e, h.y0 - g, l - 1, f), I(e, h.y1 + g, l + 1, f), d(e, a, e.length - 1, f), I(e, n, 0, f);
246
+ }
247
+ function I(e, f, l, h) {
248
+ for (; l < e.length; ++l) {
249
+ const r = e[l], k = (f - r.y0) * h;
250
+ k > 1e-6 && (r.y0 += k, r.y1 += k), f = r.y1 + g;
251
+ }
252
+ }
253
+ function d(e, f, l, h) {
254
+ for (; l >= 0; --l) {
255
+ const r = e[l], k = (r.y1 - f) * h;
256
+ k > 1e-6 && (r.y0 -= k, r.y1 -= k), f = r.y0 - g;
257
+ }
258
+ }
259
+ function w({ sourceLinks: e, targetLinks: f }) {
260
+ if (c === void 0) {
261
+ for (const { source: { sourceLinks: l } } of f)
262
+ l.sort(at);
263
+ for (const { target: { targetLinks: l } } of e)
264
+ l.sort(lt);
265
+ }
266
+ }
267
+ function $(e) {
268
+ if (c === void 0)
269
+ for (const { sourceLinks: f, targetLinks: l } of e)
270
+ f.sort(at), l.sort(lt);
271
+ }
272
+ function T(e, f) {
273
+ let l = e.y0 - (e.sourceLinks.length - 1) * g / 2;
274
+ for (const { target: h, width: r } of e.sourceLinks) {
275
+ if (h === f)
276
+ break;
277
+ l += r + g;
278
+ }
279
+ for (const { source: h, width: r } of f.targetLinks) {
280
+ if (h === e)
281
+ break;
282
+ l -= r;
283
+ }
284
+ return l;
285
+ }
286
+ function V(e, f) {
287
+ let l = f.y0 - (f.targetLinks.length - 1) * g / 2;
288
+ for (const { source: h, width: r } of f.targetLinks) {
289
+ if (h === e)
290
+ break;
291
+ l += r + g;
292
+ }
293
+ for (const { target: h, width: r } of e.sourceLinks) {
294
+ if (h === f)
295
+ break;
296
+ l -= r;
297
+ }
298
+ return l;
299
+ }
300
+ return x;
301
+ }
302
+ var tt = Math.PI, et = 2 * tt, D = 1e-6, zt = et - D;
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, n) {
313
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n);
314
+ },
315
+ closePath: function() {
316
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
317
+ },
318
+ lineTo: function(t, n) {
319
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +n);
320
+ },
321
+ quadraticCurveTo: function(t, n, s, a) {
322
+ this._ += "Q" + +t + "," + +n + "," + (this._x1 = +s) + "," + (this._y1 = +a);
323
+ },
324
+ bezierCurveTo: function(t, n, s, a, u, _) {
325
+ this._ += "C" + +t + "," + +n + "," + +s + "," + +a + "," + (this._x1 = +u) + "," + (this._y1 = +_);
326
+ },
327
+ arcTo: function(t, n, s, a, u) {
328
+ t = +t, n = +n, s = +s, a = +a, u = +u;
329
+ var _ = this._x1, g = this._y1, p = s - t, i = a - n, o = _ - t, c = g - n, m = o * o + c * c;
330
+ if (u < 0)
331
+ throw new Error("negative radius: " + u);
332
+ if (this._x1 === null)
333
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = n);
334
+ else if (m > D)
335
+ if (!(Math.abs(c * p - i * o) > D) || !u)
336
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = n);
337
+ else {
338
+ var b = s - _, y = a - g, x = p * p + i * i, E = b * b + y * y, L = Math.sqrt(x), A = Math.sqrt(m), N = u * Math.tan((tt - Math.acos((x + m - E) / (2 * L * A))) / 2), P = N / A, j = N / L;
339
+ Math.abs(P - 1) > D && (this._ += "L" + (t + P * o) + "," + (n + P * c)), this._ += "A" + u + "," + u + ",0,0," + +(c * b > o * y) + "," + (this._x1 = t + j * p) + "," + (this._y1 = n + j * i);
340
+ }
341
+ },
342
+ arc: function(t, n, s, a, u, _) {
343
+ t = +t, n = +n, s = +s, _ = !!_;
344
+ var g = s * Math.cos(a), p = s * Math.sin(a), i = t + g, o = n + p, c = 1 ^ _, m = _ ? a - u : u - a;
345
+ if (s < 0)
346
+ throw new Error("negative radius: " + s);
347
+ this._x1 === null ? this._ += "M" + i + "," + o : (Math.abs(this._x1 - i) > D || Math.abs(this._y1 - o) > D) && (this._ += "L" + i + "," + o), s && (m < 0 && (m = m % et + et), m > zt ? this._ += "A" + s + "," + s + ",0,1," + c + "," + (t - g) + "," + (n - p) + "A" + s + "," + s + ",0,1," + c + "," + (this._x1 = i) + "," + (this._y1 = o) : m > D && (this._ += "A" + s + "," + s + ",0," + +(m >= tt) + "," + c + "," + (this._x1 = t + s * Math.cos(u)) + "," + (this._y1 = n + s * Math.sin(u))));
348
+ },
349
+ rect: function(t, n, s, a) {
350
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n) + "h" + +s + "v" + +a + "h" + -s + "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 n = Ft, s = Rt, a = Dt, u = Bt, _ = null;
376
+ function g() {
377
+ var p, i = Vt.call(arguments), o = n.apply(this, i), c = s.apply(this, i);
378
+ if (_ || (_ = p = gt()), t(_, +a.apply(this, (i[0] = o, i)), +u.apply(this, i), +a.apply(this, (i[0] = c, i)), +u.apply(this, i)), p)
379
+ return _ = null, p + "" || null;
380
+ }
381
+ return g.source = function(p) {
382
+ return arguments.length ? (n = p, g) : n;
383
+ }, g.target = function(p) {
384
+ return arguments.length ? (s = p, g) : s;
385
+ }, g.x = function(p) {
386
+ return arguments.length ? (a = typeof p == "function" ? p : ht(+p), g) : a;
387
+ }, g.y = function(p) {
388
+ return arguments.length ? (u = typeof p == "function" ? p : ht(+p), g) : u;
389
+ }, g.context = function(p) {
390
+ return arguments.length ? (_ = p ?? null, g) : _;
391
+ }, g;
392
+ }
393
+ function Wt(t, n, s, a, u) {
394
+ t.moveTo(n, s), t.bezierCurveTo(n = (n + a) / 2, s, n, u, a, u);
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(p, i, o, c) {
410
+ for (o = o || {}, c = p.length; c--; o[p[c]] = i)
411
+ ;
412
+ return o;
413
+ }, n = [1, 9], s = [1, 10], a = [1, 5, 10, 12], u = {
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(i, o, c, m, b, y, x) {
421
+ var E = y.length - 1;
422
+ switch (b) {
423
+ case 7:
424
+ const L = m.findOrCreateNode(y[E - 4].trim().replaceAll('""', '"')), A = m.findOrCreateNode(y[E - 2].trim().replaceAll('""', '"')), N = parseFloat(y[E].trim());
425
+ m.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: n, 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: n, 20: s }, { 15: 18, 16: 7, 17: 8, 18: n, 20: s }, { 18: [1, 19] }, t(s, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: n, 20: s }, t([1, 5, 10], [2, 7])],
438
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
439
+ parseError: function(i, o) {
440
+ if (o.recoverable)
441
+ this.trace(i);
442
+ else {
443
+ var c = new Error(i);
444
+ throw c.hash = o, c;
445
+ }
446
+ },
447
+ parse: function(i) {
448
+ var o = this, c = [0], m = [], b = [null], y = [], x = this.table, E = "", L = 0, A = 0, N = 2, P = 1, j = y.slice.call(arguments, 1), S = Object.create(this.lexer), M = { yy: {} };
449
+ for (var O in this.yy)
450
+ Object.prototype.hasOwnProperty.call(this.yy, O) && (M.yy[O] = this.yy[O]);
451
+ S.setInput(i, M.yy), M.yy.lexer = S, M.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
452
+ var C = S.yylloc;
453
+ y.push(C);
454
+ var I = S.options && S.options.ranges;
455
+ typeof M.yy.parseError == "function" ? this.parseError = M.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
456
+ function d() {
457
+ var v;
458
+ return v = m.pop() || S.lex() || P, typeof v != "number" && (v instanceof Array && (m = v, v = m.pop()), v = o.symbols_[v] || v), v;
459
+ }
460
+ for (var w, $, T, V, e = {}, f, l, h, r; ; ) {
461
+ if ($ = c[c.length - 1], this.defaultActions[$] ? T = this.defaultActions[$] : ((w === null || typeof w > "u") && (w = d()), T = x[$] && x[$][w]), typeof T > "u" || !T.length || !T[0]) {
462
+ var k = "";
463
+ r = [];
464
+ for (f in x[$])
465
+ this.terminals_[f] && f > N && r.push("'" + this.terminals_[f] + "'");
466
+ S.showPosition ? k = "Parse error on line " + (L + 1) + `:
467
+ ` + S.showPosition() + `
468
+ Expecting ` + r.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : k = "Parse error on line " + (L + 1) + ": Unexpected " + (w == P ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(k, {
469
+ text: S.match,
470
+ token: this.terminals_[w] || w,
471
+ line: S.yylineno,
472
+ loc: C,
473
+ expected: r
474
+ });
475
+ }
476
+ if (T[0] instanceof Array && T.length > 1)
477
+ throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + w);
478
+ switch (T[0]) {
479
+ case 1:
480
+ c.push(w), b.push(S.yytext), y.push(S.yylloc), c.push(T[1]), w = null, A = S.yyleng, E = S.yytext, L = S.yylineno, C = S.yylloc;
481
+ break;
482
+ case 2:
483
+ if (l = this.productions_[T[1]][1], e.$ = b[b.length - l], e._$ = {
484
+ first_line: y[y.length - (l || 1)].first_line,
485
+ last_line: y[y.length - 1].last_line,
486
+ first_column: y[y.length - (l || 1)].first_column,
487
+ last_column: y[y.length - 1].last_column
488
+ }, I && (e._$.range = [
489
+ y[y.length - (l || 1)].range[0],
490
+ y[y.length - 1].range[1]
491
+ ]), V = this.performAction.apply(e, [
492
+ E,
493
+ A,
494
+ L,
495
+ M.yy,
496
+ T[1],
497
+ b,
498
+ y
499
+ ].concat(j)), typeof V < "u")
500
+ return V;
501
+ l && (c = c.slice(0, -1 * l * 2), b = b.slice(0, -1 * l), y = y.slice(0, -1 * l)), c.push(this.productions_[T[1]][0]), b.push(e.$), y.push(e._$), h = x[c[c.length - 2]][c[c.length - 1]], c.push(h);
502
+ break;
503
+ case 3:
504
+ return !0;
505
+ }
506
+ }
507
+ return !0;
508
+ }
509
+ }, _ = function() {
510
+ var p = {
511
+ EOF: 1,
512
+ parseError: function(o, c) {
513
+ if (this.yy.parser)
514
+ this.yy.parser.parseError(o, c);
515
+ else
516
+ throw new Error(o);
517
+ },
518
+ // resets the lexer, sets new input
519
+ setInput: function(i, o) {
520
+ 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 = {
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 i = this._input[0];
530
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
531
+ var o = i.match(/(?:\r\n?|\n).*/g);
532
+ 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;
533
+ },
534
+ // unshifts one char (or a string) into the input
535
+ unput: function(i) {
536
+ var o = i.length, c = i.split(/(?:\r\n?|\n)/g);
537
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
538
+ var m = 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), c.length - 1 && (this.yylineno -= c.length - 1);
540
+ var b = 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: c ? (c.length === m.length ? this.yylloc.first_column : 0) + m[m.length - c.length].length - c[0].length : this.yylloc.first_column - o
546
+ }, this.options.ranges && (this.yylloc.range = [b[0], b[0] + this.yyleng - o]), 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(i) {
567
+ this.unput(this.match.slice(i));
568
+ },
569
+ // displays already matched input, i.e. for error messages
570
+ pastInput: function() {
571
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
572
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
573
+ },
574
+ // displays upcoming input, i.e. for error messages
575
+ upcomingInput: function() {
576
+ var i = this.match;
577
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.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 i = this.pastInput(), o = new Array(i.length + 1).join("-");
582
+ return i + this.upcomingInput() + `
583
+ ` + o + "^";
584
+ },
585
+ // test the lexed token: return FALSE when not a match, otherwise return token
586
+ test_match: function(i, o) {
587
+ var c, m, b;
588
+ if (this.options.backtrack_lexer && (b = {
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 && (b.yylloc.range = this.yylloc.range.slice(0))), m = i[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.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: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
612
+ }, 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], c = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
613
+ return c;
614
+ if (this._backtrack) {
615
+ for (var y in b)
616
+ this[y] = b[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 i, o, c, m;
627
+ this._more || (this.yytext = "", this.match = "");
628
+ for (var b = this._currentRules(), y = 0; y < b.length; y++)
629
+ if (c = this._input.match(this.rules[b[y]]), c && (!o || c[0].length > o[0].length)) {
630
+ if (o = c, m = y, this.options.backtrack_lexer) {
631
+ if (i = this.test_match(c, b[y]), i !== !1)
632
+ return i;
633
+ if (this._backtrack) {
634
+ o = !1;
635
+ continue;
636
+ } else
637
+ return !1;
638
+ } else if (!this.options.flex)
639
+ break;
640
+ }
641
+ return o ? (i = this.test_match(o, b[m]), i !== !1 ? i : !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 o = this.next();
651
+ return o || this.lex();
652
+ },
653
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
654
+ begin: function(o) {
655
+ this.conditionStack.push(o);
656
+ },
657
+ // pop the previously active lexer condition state off the condition stack
658
+ popState: function() {
659
+ var o = this.conditionStack.length - 1;
660
+ return o > 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(o) {
668
+ return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
669
+ },
670
+ // alias for begin(condition)
671
+ pushState: function(o) {
672
+ this.begin(o);
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(o, c, m, b) {
680
+ switch (m) {
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 p;
703
+ }();
704
+ u.lexer = _;
705
+ function g() {
706
+ this.yy = {};
707
+ }
708
+ return g.prototype = u, u.Parser = g, new g();
709
+ }();
710
+ it.parser = it;
711
+ const X = it;
712
+ let q = [], Q = [], B = {};
713
+ const qt = () => {
714
+ q = [], Q = [], B = {}, wt();
715
+ };
716
+ class Qt {
717
+ constructor(n, s, a = 0) {
718
+ this.source = n, this.target = s, this.value = a;
719
+ }
720
+ }
721
+ const Kt = (t, n, s) => {
722
+ q.push(new Qt(t, n, s));
723
+ };
724
+ class Zt {
725
+ constructor(n) {
726
+ this.ID = n;
727
+ }
728
+ }
729
+ const Jt = (t) => (t = St.sanitizeText(t, rt()), B[t] || (B[t] = new Zt(t), Q.push(B[t])), B[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: B,
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(n) {
753
+ return new st(n + ++st.count);
754
+ }
755
+ constructor(n) {
756
+ this.id = n, this.href = `#${n}`;
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, n, s, a) {
770
+ const { securityLevel: u, sankey: _ } = rt(), g = Lt.sankey;
771
+ let p;
772
+ u === "sandbox" && (p = G("#i" + n));
773
+ const i = u === "sandbox" ? G(p.nodes()[0].contentDocument.body) : G("body"), o = u === "sandbox" ? i.select(`[id="${n}"]`) : G(`[id="${n}"]`), c = _?.width ?? g.width, m = _?.height ?? g.width, b = _?.useMaxWidth ?? g.useMaxWidth, y = _?.nodeAlignment ?? g.nodeAlignment, x = _?.prefix ?? g.prefix, E = _?.suffix ?? g.suffix, L = _?.showValues ?? g.showValues, A = a.db.getGraph(), N = se[y], P = 10;
774
+ jt().nodeId((d) => d.id).nodeWidth(P).nodePadding(10 + (L ? 15 : 0)).nodeAlign(N).extent([
775
+ [0, 0],
776
+ [c, m]
777
+ ])(A);
778
+ const S = At(Tt);
779
+ o.append("g").attr("class", "nodes").selectAll(".node").data(A.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = ft.next("node-")).id).attr("transform", function(d) {
780
+ return "translate(" + d.x0 + "," + d.y0 + ")";
781
+ }).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) => S(d.id));
782
+ const M = ({ id: d, value: w }) => L ? `${d}
783
+ ${x}${Math.round(w * 100) / 100}${E}` : d;
784
+ o.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(A.nodes).join("text").attr("x", (d) => d.x0 < c / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${L ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < c / 2 ? "start" : "end").text(M);
785
+ const O = o.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 = _?.linkColor || "gradient";
786
+ if (C === "gradient") {
787
+ const d = O.append("linearGradient").attr("id", (w) => (w.uid = ft.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (w) => w.source.x1).attr("x2", (w) => w.target.x0);
788
+ d.append("stop").attr("offset", "0%").attr("stop-color", (w) => S(w.source.id)), d.append("stop").attr("offset", "100%").attr("stop-color", (w) => S(w.target.id));
789
+ }
790
+ let I;
791
+ switch (C) {
792
+ case "gradient":
793
+ I = (d) => d.uid;
794
+ break;
795
+ case "source":
796
+ I = (d) => S(d.source.id);
797
+ break;
798
+ case "target":
799
+ I = (d) => S(d.target.id);
800
+ break;
801
+ default:
802
+ I = C;
803
+ }
804
+ O.append("path").attr("d", Xt()).attr("stroke", I).attr("stroke-width", (d) => Math.max(1, d.width)), Et(void 0, o, 0, b);
805
+ }, oe = {
806
+ draw: re
807
+ }, le = (t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
808
+ `).trim(), ae = X.parse.bind(X);
809
+ X.parse = (t) => ae(le(t));
810
+ const ye = {
811
+ parser: X,
812
+ db: ie,
813
+ renderer: oe
814
+ };
815
+ export {
816
+ ye as diagram
817
+ };