lowcoder-comps 0.0.20 → 0.0.22

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