@genome-spy/app 0.86.0 → 0.88.0

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 (36) hide show
  1. package/dist/{agentApi-DgopQbMV.js → agentApi-BYFBKiRQ.js} +8170 -7390
  2. package/dist/agentApi.es.js +3945 -3862
  3. package/dist/agentShared.es.js +7 -7
  4. package/dist/{canvas2d-BtQC7Xr8.js → canvas2d-BVQ7-2eJ.js} +141 -140
  5. package/dist/{canvas2d-8uxuN_vx.js → canvas2d-D7SZK3xv.js} +117 -116
  6. package/dist/clipOptions-BWHr3aTa.js +2675 -0
  7. package/dist/{clipOptions-BQfNhxgP.js → clipOptions-DTMcB_9z.js} +1147 -731
  8. package/dist/{debug-D_VtWQ6l.js → debug-CVpoEOWx.js} +2 -2
  9. package/dist/{debug-Bzc3SoRg.js → debug-DYAMZZKl.js} +2 -2
  10. package/dist/index.es.js +3398 -3428
  11. package/dist/index.js +441 -411
  12. package/dist/{indexer-qy_dq5l5.js → indexer-CXjZDo2Q.js} +1 -1
  13. package/dist/{indexer-qiFctgR3.js → indexer-DAH_ruVn.js} +1 -1
  14. package/dist/{nativeText-vT3AWE14.js → order-C5CzA37O.js} +144 -86
  15. package/dist/{nativeText-DFV5XIx8.js → order-DvY7KNcu.js} +133 -75
  16. package/dist/{rasterExport-B8pVoOsj.js → rasterExport-BgZ98e6U.js} +1 -1
  17. package/dist/{rasterExport-C4r4xjQT.js → rasterExport-DEr8fOLm.js} +1 -1
  18. package/dist/{renderCanvas2D-CHVNfIUz.js → renderCanvas2D-DtcJjqpB.js} +109 -96
  19. package/dist/{renderCanvas2D-BQrRWp2Z.js → renderCanvas2D-DxturTEW.js} +108 -95
  20. package/dist/schema.json +10839 -2862
  21. package/dist/{svg-C-Sw6E6G.js → svg-CyrLfa9e.js} +389 -428
  22. package/dist/{svg-CKHwwKRt.js → svg-SDJMzL--.js} +389 -428
  23. package/dist/{svgRasterizer-BgD72AmG.js → svgRasterizer-f7DJ3UO0.js} +1 -1
  24. package/dist/{svgRasterizer-BgSNqI3L.js → svgRasterizer-mWK7HTkx.js} +1 -1
  25. package/dist/{vega-scale-D46-iCaL.js → vega-scale-CypF85iS.js} +894 -1191
  26. package/dist/{vega-scale-CK0_al6O.js → vega-scale-DLKCwWRs.js} +893 -1190
  27. package/dist/{viewIdentityRegistry-B-VGlez1.js → viewIdentityRegistry-DIDo44XQ.js} +1 -1
  28. package/dist/{viewIdentityRegistry-CDtVktJD.js → viewIdentityRegistry-Dl-vMN9I.js} +1 -1
  29. package/dist/{viewSelectors-CKfxF_LM.js → viewSelectors-CymbZyE6.js} +692 -459
  30. package/dist/{viewSelectors-D_imtq5Z.js → viewSelectors-DNiDip5e.js} +667 -434
  31. package/dist/{viewUtils-nCJ7AoaI.js → viewUtils-BrJLIj2o.js} +3032 -2332
  32. package/dist/{webgl-BaA3jSa2.js → webgl-CqTDifWM.js} +1087 -1056
  33. package/dist/{webgl-FP-4EsBL.js → webgl-jaC2m0Zr.js} +1113 -1082
  34. package/package.json +5 -5
  35. package/src/embedTypes.d.ts +1 -1
  36. package/dist/clipOptions-taFzEljc.js +0 -2259
@@ -0,0 +1,2675 @@
1
+ //#region ../../node_modules/vega-util/build/accessor.js
2
+ function e(e, t, n) {
3
+ return Object.assign(e, {
4
+ fields: t || [],
5
+ fname: n
6
+ });
7
+ }
8
+ //#endregion
9
+ //#region ../../node_modules/vega-util/build/getter.js
10
+ function t(e) {
11
+ return e.length === 1 ? n(e[0]) : r(e);
12
+ }
13
+ var n = (e) => function(t) {
14
+ return t[e];
15
+ }, r = (e) => {
16
+ let t = e.length;
17
+ return function(n) {
18
+ for (let r = 0; r < t; ++r) n = n[e[r]];
19
+ return n;
20
+ };
21
+ };
22
+ //#endregion
23
+ //#region ../../node_modules/vega-util/build/error.js
24
+ function i(e) {
25
+ throw Error(e);
26
+ }
27
+ //#endregion
28
+ //#region ../../node_modules/vega-util/build/splitAccessPath.js
29
+ function a(e) {
30
+ let t = [], n = e.length, r = null, a = 0, o = "", s, c, l;
31
+ e += "";
32
+ function u() {
33
+ t.push(o + e.substring(s, c)), o = "", s = c + 1;
34
+ }
35
+ for (s = c = 0; c < n; ++c) if (l = e[c], l === "\\") o += e.substring(s, c++), s = c;
36
+ else if (l === r) u(), r = null, a = -1;
37
+ else if (r) continue;
38
+ else s === a && l === "\"" || s === a && l === "'" ? (s = c + 1, r = l) : l === "." && !a ? c > s ? u() : s = c + 1 : l === "[" ? (c > s && u(), a = s = c + 1) : l === "]" && (a || i("Access path missing open bracket: " + e), a > 0 && u(), a = 0, s = c + 1);
39
+ return a && i("Access path missing closing bracket: " + e), r && i("Access path missing closing quote: " + e), c > s && (c++, u()), t;
40
+ }
41
+ //#endregion
42
+ //#region ../../node_modules/vega-util/build/field.js
43
+ function o(n, r, i) {
44
+ let o = a(n), s = o.length === 1 ? o[0] : n;
45
+ return e((i && i.get || t)(o), [s], r || s);
46
+ }
47
+ o("id");
48
+ var s = e((e) => e, [], "identity");
49
+ e(() => 0, [], "zero"), e(() => 1, [], "one"), e(() => !0, [], "true"), e(() => !1, [], "false");
50
+ //#endregion
51
+ //#region ../../node_modules/vega-util/build/interpreter.js
52
+ var c = /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function"), "__proto__"]), l = Array.isArray;
53
+ //#endregion
54
+ //#region ../../node_modules/vega-util/build/isObject.js
55
+ function u(e) {
56
+ return e === Object(e);
57
+ }
58
+ //#endregion
59
+ //#region ../../node_modules/vega-util/build/array.js
60
+ function d(e) {
61
+ return e == null ? [] : l(e) ? e : [e];
62
+ }
63
+ //#endregion
64
+ //#region ../../node_modules/vega-util/build/isFunction.js
65
+ function f(e) {
66
+ return typeof e == "function";
67
+ }
68
+ //#endregion
69
+ //#region ../../node_modules/vega-util/build/hasOwnProperty.js
70
+ function p(e, t) {
71
+ return Object.hasOwn(e, t);
72
+ }
73
+ //#endregion
74
+ //#region ../../node_modules/vega-util/build/isString.js
75
+ function m(e) {
76
+ return typeof e == "string";
77
+ }
78
+ //#endregion
79
+ //#region ../../node_modules/vega-util/build/stringValue.js
80
+ function h(e) {
81
+ return l(e) ? `[${e.map((e) => e === null ? "null" : h(e))}]` : u(e) || m(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
82
+ }
83
+ //#endregion
84
+ //#region ../../node_modules/vega-util/build/toSet.js
85
+ function ee(e) {
86
+ let t = {}, n = e.length;
87
+ for (let r = 0; r < n; ++r) t[e[r] + ""] = !0;
88
+ return t;
89
+ }
90
+ //#endregion
91
+ //#region ../../node_modules/d3-array/src/range.js
92
+ function g(e, t, n) {
93
+ e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
94
+ for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
95
+ return a;
96
+ }
97
+ //#endregion
98
+ //#region ../../node_modules/d3-format/src/formatDecimal.js
99
+ function te(e) {
100
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
101
+ }
102
+ function _(e, t) {
103
+ if (!isFinite(e) || e === 0) return null;
104
+ var n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e"), r = e.slice(0, n);
105
+ return [r.length > 1 ? r[0] + r.slice(2) : r, +e.slice(n + 1)];
106
+ }
107
+ //#endregion
108
+ //#region ../../node_modules/d3-format/src/exponent.js
109
+ function ne(e) {
110
+ return e = _(Math.abs(e)), e ? e[1] : NaN;
111
+ }
112
+ //#endregion
113
+ //#region ../../node_modules/d3-format/src/formatGroup.js
114
+ function re(e, t) {
115
+ return function(n, r) {
116
+ for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
117
+ return a.reverse().join(t);
118
+ };
119
+ }
120
+ //#endregion
121
+ //#region ../../node_modules/d3-format/src/formatNumerals.js
122
+ function ie(e) {
123
+ return function(t) {
124
+ return t.replace(/[0-9]/g, function(t) {
125
+ return e[+t];
126
+ });
127
+ };
128
+ }
129
+ //#endregion
130
+ //#region ../../node_modules/d3-format/src/formatSpecifier.js
131
+ var ae = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
132
+ function v(e) {
133
+ if (!(t = ae.exec(e))) throw Error("invalid format: " + e);
134
+ var t;
135
+ return new y({
136
+ fill: t[1],
137
+ align: t[2],
138
+ sign: t[3],
139
+ symbol: t[4],
140
+ zero: t[5],
141
+ width: t[6],
142
+ comma: t[7],
143
+ precision: t[8] && t[8].slice(1),
144
+ trim: t[9],
145
+ type: t[10]
146
+ });
147
+ }
148
+ v.prototype = y.prototype;
149
+ function y(e) {
150
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
151
+ }
152
+ y.prototype.toString = function() {
153
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
154
+ };
155
+ //#endregion
156
+ //#region ../../node_modules/d3-format/src/formatTrim.js
157
+ function oe(e) {
158
+ out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
159
+ case ".":
160
+ r = i = n;
161
+ break;
162
+ case "0":
163
+ r === 0 && (r = n), i = n;
164
+ break;
165
+ default:
166
+ if (!+e[n]) break out;
167
+ r > 0 && (r = 0);
168
+ break;
169
+ }
170
+ return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
171
+ }
172
+ //#endregion
173
+ //#region ../../node_modules/d3-format/src/formatPrefixAuto.js
174
+ var se;
175
+ function b(e, t) {
176
+ var n = _(e, t);
177
+ if (!n) return se = void 0, e.toPrecision(t);
178
+ var r = n[0], i = n[1], a = i - (se = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
179
+ return a === o ? r : a > o ? r + Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + Array(1 - a).join("0") + _(e, Math.max(0, t + a - 1))[0];
180
+ }
181
+ //#endregion
182
+ //#region ../../node_modules/d3-format/src/formatRounded.js
183
+ function ce(e, t) {
184
+ var n = _(e, t);
185
+ if (!n) return e + "";
186
+ var r = n[0], i = n[1];
187
+ return i < 0 ? "0." + Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + Array(i - r.length + 2).join("0");
188
+ }
189
+ //#endregion
190
+ //#region ../../node_modules/d3-format/src/formatTypes.js
191
+ var le = {
192
+ "%": (e, t) => (e * 100).toFixed(t),
193
+ b: (e) => Math.round(e).toString(2),
194
+ c: (e) => e + "",
195
+ d: te,
196
+ e: (e, t) => e.toExponential(t),
197
+ f: (e, t) => e.toFixed(t),
198
+ g: (e, t) => e.toPrecision(t),
199
+ o: (e) => Math.round(e).toString(8),
200
+ p: (e, t) => ce(e * 100, t),
201
+ r: ce,
202
+ s: b,
203
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
204
+ x: (e) => Math.round(e).toString(16)
205
+ };
206
+ //#endregion
207
+ //#region ../../node_modules/d3-format/src/identity.js
208
+ function ue(e) {
209
+ return e;
210
+ }
211
+ //#endregion
212
+ //#region ../../node_modules/d3-format/src/locale.js
213
+ var de = Array.prototype.map, fe = [
214
+ "y",
215
+ "z",
216
+ "a",
217
+ "f",
218
+ "p",
219
+ "n",
220
+ "µ",
221
+ "m",
222
+ "",
223
+ "k",
224
+ "M",
225
+ "G",
226
+ "T",
227
+ "P",
228
+ "E",
229
+ "Z",
230
+ "Y"
231
+ ];
232
+ function pe(e) {
233
+ var t = e.grouping === void 0 || e.thousands === void 0 ? ue : re(de.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? ue : ie(de.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
234
+ function l(e, l) {
235
+ e = v(e);
236
+ var u = e.fill, d = e.align, f = e.sign, p = e.symbol, m = e.zero, h = e.width, ee = e.comma, g = e.precision, te = e.trim, _ = e.type;
237
+ _ === "n" ? (ee = !0, _ = "g") : le[_] || (g === void 0 && (g = 12), te = !0, _ = "g"), (m || u === "0" && d === "=") && (m = !0, u = "0", d = "=");
238
+ var ne = (l && l.prefix !== void 0 ? l.prefix : "") + (p === "$" ? n : p === "#" && /[boxX]/.test(_) ? "0" + _.toLowerCase() : ""), re = (p === "$" ? r : /[%p]/.test(_) ? o : "") + (l && l.suffix !== void 0 ? l.suffix : ""), ie = le[_], ae = /[defgprs%]/.test(_);
239
+ g = g === void 0 ? 6 : /[gprs]/.test(_) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
240
+ function y(e) {
241
+ var n = ne, r = re, o, l, p;
242
+ if (_ === "c") r = ie(e) + r, e = "";
243
+ else {
244
+ e = +e;
245
+ var v = e < 0 || 1 / e < 0;
246
+ if (e = isNaN(e) ? c : ie(Math.abs(e), g), te && (e = oe(e)), v && +e == 0 && f !== "+" && (v = !1), n = (v ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (_ === "s" && !isNaN(e) && se !== void 0 ? fe[8 + se / 3] : "") + r + (v && f === "(" ? ")" : ""), ae) {
247
+ for (o = -1, l = e.length; ++o < l;) if (p = e.charCodeAt(o), 48 > p || p > 57) {
248
+ r = (p === 46 ? i + e.slice(o + 1) : e.slice(o)) + r, e = e.slice(0, o);
249
+ break;
250
+ }
251
+ }
252
+ }
253
+ ee && !m && (e = t(e, Infinity));
254
+ var y = n.length + e.length + r.length, b = y < h ? Array(h - y + 1).join(u) : "";
255
+ switch (ee && m && (e = t(b + e, b.length ? h - r.length : Infinity), b = ""), d) {
256
+ case "<":
257
+ e = n + e + r + b;
258
+ break;
259
+ case "=":
260
+ e = n + b + e + r;
261
+ break;
262
+ case "^":
263
+ e = b.slice(0, y = b.length >> 1) + n + e + r + b.slice(y);
264
+ break;
265
+ default:
266
+ e = b + n + e + r;
267
+ break;
268
+ }
269
+ return a(e);
270
+ }
271
+ return y.toString = function() {
272
+ return e + "";
273
+ }, y;
274
+ }
275
+ function u(e, t) {
276
+ var n = Math.max(-8, Math.min(8, Math.floor(ne(t) / 3))) * 3, r = 10 ** -n, i = l((e = v(e), e.type = "f", e), { suffix: fe[8 + n / 3] });
277
+ return function(e) {
278
+ return i(r * e);
279
+ };
280
+ }
281
+ return {
282
+ format: l,
283
+ formatPrefix: u
284
+ };
285
+ }
286
+ //#endregion
287
+ //#region ../../node_modules/d3-format/src/defaultLocale.js
288
+ var me, he, ge;
289
+ _e({
290
+ thousands: ",",
291
+ grouping: [3],
292
+ currency: ["$", ""]
293
+ });
294
+ function _e(e) {
295
+ return me = pe(e), he = me.format, ge = me.formatPrefix, me;
296
+ }
297
+ //#endregion
298
+ //#region ../core/src/utils/arrayUtils.js
299
+ function ve(e, t) {
300
+ return e.length == t.length && e.every((n, r) => e[r] === t[r]);
301
+ }
302
+ function ye(e) {
303
+ return Array.isArray(e) ? e : e === void 0 ? [] : [e];
304
+ }
305
+ function be(e) {
306
+ return e[e.length - 1];
307
+ }
308
+ function xe(e, t, n) {
309
+ if (t < 0 || t >= e.length) throw Error("Source index out of range.");
310
+ if (n < 0 || n > e.length - 1) throw Error("Destination index out of range.");
311
+ let [r] = e.splice(t, 1);
312
+ e.splice(n, 0, r);
313
+ }
314
+ //#endregion
315
+ //#region ../core/node_modules/vega-util/build/vega-util.js
316
+ function x(e, t, n) {
317
+ return e.fields = t || [], e.fname = n, e;
318
+ }
319
+ function Se(e) {
320
+ return e == null ? null : e.fname;
321
+ }
322
+ function Ce(e) {
323
+ return e == null ? null : e.fields;
324
+ }
325
+ function we(e) {
326
+ return e.length === 1 ? Te(e[0]) : Ee(e);
327
+ }
328
+ var Te = (e) => function(t) {
329
+ return t[e];
330
+ }, Ee = (e) => {
331
+ let t = e.length;
332
+ return function(n) {
333
+ for (let r = 0; r < t; ++r) n = n[e[r]];
334
+ return n;
335
+ };
336
+ };
337
+ function De(e) {
338
+ throw Error(e);
339
+ }
340
+ function Oe(e) {
341
+ let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
342
+ e += "";
343
+ function l() {
344
+ t.push(a + e.substring(o, s)), a = "", o = s + 1;
345
+ }
346
+ for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
347
+ else if (c === r) l(), r = null, i = -1;
348
+ else if (r) continue;
349
+ else o === i && c === "\"" || o === i && c === "'" ? (o = s + 1, r = c) : c === "." && !i ? s > o ? l() : o = s + 1 : c === "[" ? (s > o && l(), i = o = s + 1) : c === "]" && (i || De("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
350
+ return i && De("Access path missing closing bracket: " + e), r && De("Access path missing closing quote: " + e), s > o && (s++, l()), t;
351
+ }
352
+ function ke(e, t, n) {
353
+ let r = Oe(e);
354
+ return e = r.length === 1 ? r[0] : e, x((n && n.get || we)(r), [e], t || e);
355
+ }
356
+ ke("id");
357
+ var Ae = x((e) => e, [], "identity");
358
+ x(() => 0, [], "zero"), x(() => 1, [], "one"), x(() => !0, [], "true"), x(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
359
+ var je = Array.isArray;
360
+ function Me(e) {
361
+ return e === Object(e);
362
+ }
363
+ function Ne(e) {
364
+ return e[e.length - 1];
365
+ }
366
+ function Pe(e) {
367
+ return e == null || e === "" ? null : +e;
368
+ }
369
+ var Fe = (e) => (t) => e * Math.exp(t), Ie = (e) => (t) => Math.log(e * t), Le = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), Re = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, ze = (e) => (t) => t < 0 ? -((-t) ** +e) : t ** +e;
370
+ function Be(e, t, n, r) {
371
+ let i = n(e[0]), a = n(Ne(e)), o = (a - i) * t;
372
+ return [r(i - o), r(a - o)];
373
+ }
374
+ function Ve(e, t) {
375
+ return Be(e, t, Pe, Ae);
376
+ }
377
+ function He(e, t) {
378
+ var n = Math.sign(e[0]);
379
+ return Be(e, t, Ie(n), Fe(n));
380
+ }
381
+ function Ue(e, t, n) {
382
+ return Be(e, t, ze(n), ze(1 / n));
383
+ }
384
+ function We(e, t, n, r, i) {
385
+ let a = r(e[0]), o = r(Ne(e)), s = t == null ? (a + o) / 2 : r(t);
386
+ return [i(s + (a - s) * n), i(s + (o - s) * n)];
387
+ }
388
+ function Ge(e, t, n) {
389
+ return We(e, t, n, Pe, Ae);
390
+ }
391
+ function Ke(e, t, n) {
392
+ let r = Math.sign(e[0]);
393
+ return We(e, t, n, Ie(r), Fe(r));
394
+ }
395
+ function qe(e, t, n, r) {
396
+ return We(e, t, n, ze(r), ze(1 / r));
397
+ }
398
+ function Je(e, t, n, r) {
399
+ return We(e, t, n, Le(r), Re(r));
400
+ }
401
+ function Ye(e) {
402
+ return e == null ? [] : je(e) ? e : [e];
403
+ }
404
+ function Xe(e, t, n) {
405
+ let r = e[0], i = e[1], a;
406
+ return i < r && (a = i, i = r, r = a), a = i - r, a >= n - t ? [t, n] : [r = Math.min(Math.max(r, t), n - a), r + a];
407
+ }
408
+ function Ze(e) {
409
+ return typeof e == "function";
410
+ }
411
+ var Qe = "descending";
412
+ function $e(e, t, n) {
413
+ n ||= {}, t = Ye(t) || [];
414
+ let r = [], i = [], a = {}, o = n.comparator || tt;
415
+ return Ye(e).forEach((e, o) => {
416
+ e != null && (r.push(t[o] === Qe ? -1 : 1), i.push(e = Ze(e) ? e : ke(e, null, n)), (Ce(e) || []).forEach((e) => a[e] = 1));
417
+ }), i.length === 0 ? null : x(o(i, r), Object.keys(a));
418
+ }
419
+ var et = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, e = e instanceof Date ? +e : e) !== e && t === t ? -1 : +(t !== t && e === e), tt = (e, t) => e.length === 1 ? nt(e[0], t[0]) : rt(e, t, e.length), nt = (e, t) => function(n, r) {
420
+ return et(e(n), e(r)) * t;
421
+ }, rt = (e, t, n) => (t.push(0), function(r, i) {
422
+ let a, o = 0, s = -1;
423
+ for (; o === 0 && ++s < n;) a = e[s], o = et(a(r), a(i));
424
+ return o * t[s];
425
+ });
426
+ function it(e) {
427
+ return typeof e == "boolean";
428
+ }
429
+ function at(e) {
430
+ return typeof e == "number";
431
+ }
432
+ function ot(e) {
433
+ return Object.prototype.toString.call(e) === "[object RegExp]";
434
+ }
435
+ function st(e) {
436
+ return typeof e == "string";
437
+ }
438
+ function ct(e, t) {
439
+ let n = e[0], r = Ne(e), i = +t;
440
+ return i ? i === 1 ? r : n + i * (r - n) : n;
441
+ }
442
+ function lt(e) {
443
+ return e && Ne(e) - e[0] || 0;
444
+ }
445
+ function ut(e) {
446
+ return je(e) ? `[${e.map((e) => e === null ? "null" : ut(e))}]` : Me(e) || st(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
447
+ }
448
+ function dt(e) {
449
+ let t = {}, n = e.length;
450
+ for (let r = 0; r < n; ++r) t[e[r]] = !0;
451
+ return t;
452
+ }
453
+ //#endregion
454
+ //#region ../core/src/data/sideInputBinding.js
455
+ var ft = class {
456
+ #e;
457
+ #t;
458
+ #n = !1;
459
+ #r = !0;
460
+ #i = [];
461
+ constructor(e) {
462
+ this.#e = e, this.#t = Array.from(new Set(e.dataDependencies), (e) => ({
463
+ collector: e,
464
+ consumed: -1
465
+ }));
466
+ for (let t of this.#t) this.#i.push(t.collector.observe(() => {
467
+ e.parent && e.completed && !this.isReady() && e.areDataDependenciesAvailable() && e.requestRepropagate();
468
+ }));
469
+ }
470
+ dispose() {
471
+ for (let e of this.#i) e();
472
+ this.#i.length = 0;
473
+ }
474
+ reset() {
475
+ this.#n = !1, this.#r = !0;
476
+ for (let e of this.#t) e.consumed = -1;
477
+ }
478
+ consume() {
479
+ if (!this.#e.areDataDependenciesAvailable()) this.#r = !1;
480
+ else if (!this.#n) {
481
+ for (let e of this.#t) e.consumed = e.collector.dataRevision;
482
+ this.#n = !0;
483
+ }
484
+ }
485
+ complete() {
486
+ this.#n || this.consume();
487
+ }
488
+ isReady() {
489
+ return this.#r && this.#n && this.#e.areDataDependenciesAvailable() && this.#t.every(({ collector: e, consumed: t }) => e.dataRevision === t);
490
+ }
491
+ }, pt = class {
492
+ stats = {
493
+ count: 0,
494
+ first: null
495
+ };
496
+ #e = !1;
497
+ #t = !1;
498
+ #n = [];
499
+ #r;
500
+ #i;
501
+ paramRuntimeProvider = null;
502
+ get behavior() {
503
+ return 0;
504
+ }
505
+ get domainSensitiveScaleChannels() {
506
+ return [];
507
+ }
508
+ get dataDependencies() {
509
+ return [];
510
+ }
511
+ isDataReady() {
512
+ return this.completed && !this.disposed && (!this.#i || this.#i.isReady());
513
+ }
514
+ areDataDependenciesAvailable() {
515
+ return this.dataDependencies.every((e) => e.completed && !e.disposed);
516
+ }
517
+ consumeDataDependencies() {
518
+ this.#i?.consume();
519
+ }
520
+ get label() {
521
+ return `(${this.constructor.name})`;
522
+ }
523
+ constructor(e) {
524
+ this.paramRuntimeProvider = e, this.children = [], this.parent = void 0, this.completed = !1;
525
+ }
526
+ get disposed() {
527
+ return this.#t;
528
+ }
529
+ getDebugState() {
530
+ let e = this;
531
+ return {
532
+ label: this.label,
533
+ children: this.children.slice(),
534
+ parent: this.parent,
535
+ stats: {
536
+ count: this.stats.count,
537
+ first: this.stats.first
538
+ },
539
+ completed: this.completed,
540
+ initialized: this.#e,
541
+ disposed: this.#t,
542
+ params: "params" in e ? structuredClone(e.params) : void 0,
543
+ view: mt(e, this.paramRuntimeProvider),
544
+ domainSensitiveScaleChannels: this.domainSensitiveScaleChannels
545
+ };
546
+ }
547
+ reset() {
548
+ this.#i?.reset(), this.completed = !1;
549
+ for (let e of this.children) e.reset();
550
+ this.stats.count = 0, this.stats.first = null;
551
+ }
552
+ initialize() {}
553
+ initializeOnce() {
554
+ this.#e ||= (this.dataDependencies.length && (this.#i = new ft(this)), this.initialize(), !0);
555
+ }
556
+ #a() {
557
+ this._propagate = Function("children", "stats", g(this.children.length).map((e) => `const child${e} = children[${e}];`).join("\n") + `return function propagate(datum) {
558
+ if (stats.count === 0) {
559
+ stats.first = structuredClone(datum);
560
+ }
561
+ stats.count++;
562
+ ${g(this.children.length).map((e) => `child${e}.handle(datum);`).join("\n")}
563
+ };`)(this.children, this.stats);
564
+ }
565
+ setParent(e) {
566
+ this.parent = e;
567
+ }
568
+ addChild(e) {
569
+ if (e.parent) throw Error("Cannot add the child! It already has a parent.");
570
+ return this.children.push(e), e.setParent(this), this.#a(), this;
571
+ }
572
+ adopt(e) {
573
+ e.parent && e.parent.removeChild(e), this.addChild(e);
574
+ }
575
+ adoptChildrenOf(e) {
576
+ for (let t of e.children.slice()) this.adopt(t);
577
+ }
578
+ insertAsParent(e) {
579
+ if (this.isRoot()) throw Error("Cannot insert a new parent for a root node!");
580
+ e.parent = this.parent, this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#a(), this.parent = void 0, e.addChild(this);
581
+ }
582
+ removeChild(e) {
583
+ let t = this.children.indexOf(e);
584
+ if (t > -1) this.children.splice(t, 1), e.parent = void 0, this.#a();
585
+ else throw Error("Trying to remove an unknown child node!");
586
+ }
587
+ excise() {
588
+ if (this.isRoot()) throw Error("Cannot excise root node!");
589
+ if (this.isTerminal()) this.parent.removeChild(this);
590
+ else if (this.children.length == 1) {
591
+ let e = this.children[0];
592
+ e.setParent(this.parent), this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#a(), this.setParent(void 0), this.children.length = 0;
593
+ } else throw Error("Cannot excise a node that has multiple children!");
594
+ }
595
+ isRoot() {
596
+ return !this.parent;
597
+ }
598
+ isBranching() {
599
+ return this.children.length > 1;
600
+ }
601
+ isTerminal() {
602
+ return this.children.length == 0;
603
+ }
604
+ visit(e) {
605
+ e(this);
606
+ for (let t of this.children) t.visit(e);
607
+ e.afterChildren && e.afterChildren(this);
608
+ }
609
+ subtreeToString(e = 0) {
610
+ let t = this.children.map((t) => t.subtreeToString(e + 1)).join("");
611
+ return `${" ".repeat(e * 2)}* ${this.label}${"identifier" in this && this.identifier ? ": " + this.identifier : ""} \n${t}`;
612
+ }
613
+ handle(e) {
614
+ this._propagate(e);
615
+ }
616
+ complete() {
617
+ this.#i?.complete(), this.completed = !0;
618
+ for (let e of this.children) e.complete();
619
+ }
620
+ registerDisposer(e) {
621
+ this.#t ? e() : this.#n.push(e);
622
+ }
623
+ dispose() {
624
+ if (!this.#t) {
625
+ this.#t = !0, this.#i?.dispose();
626
+ for (let e of this.#n) e();
627
+ this.#n.length = 0;
628
+ }
629
+ }
630
+ disposeSubtree() {
631
+ let e = () => void 0;
632
+ e.afterChildren = (e) => {
633
+ e.dispose();
634
+ }, this.visit(e);
635
+ }
636
+ beginBatch(e) {
637
+ for (let t of this.children) t.beginBatch(e);
638
+ }
639
+ get paramRuntime() {
640
+ if (this.paramRuntimeProvider && this.paramRuntimeProvider.paramRuntime) return this.paramRuntimeProvider.paramRuntime;
641
+ if (!this.parent) throw Error("Cannot find paramRuntime!");
642
+ return this.parent.paramRuntime;
643
+ }
644
+ get replaySource() {
645
+ if (!this.parent) throw Error("Cannot replay data: no upstream replay source.");
646
+ return this.parent.replaySource;
647
+ }
648
+ get replaysSynchronously() {
649
+ return !1;
650
+ }
651
+ requestRepropagate() {
652
+ let e = this.replaySource, t = this.paramRuntime.updateScheduler;
653
+ e.#r ||= () => {
654
+ e.disposed || (e.replaysSynchronously && e.visit((e) => {
655
+ e.#r && t.cancelUpdate(e.#r);
656
+ }), e.repropagate());
657
+ };
658
+ let n = 0;
659
+ for (let t = e.parent; t; t = t.parent) n++;
660
+ t.requestUpdate(e.#r, n, void 0, () => e.#o());
661
+ }
662
+ #o() {
663
+ let e = /* @__PURE__ */ new Set();
664
+ return this.visit((t) => {
665
+ for (let n of t.dataDependencies) for (let t = n.parent; t; t = t.parent) t !== this && t.#r && e.add(t.#r);
666
+ }), e;
667
+ }
668
+ repropagate() {
669
+ if (this.parent) this.parent.repropagate();
670
+ else throw Error("Cannot repropagate data, no FlowNode with stored data found!");
671
+ }
672
+ _propagate(e) {}
673
+ };
674
+ function mt(e, t) {
675
+ if ("view" in e) return e.view;
676
+ if (t && "getPathString" in t) return t;
677
+ }
678
+ function ht(e) {
679
+ let t = /* @__PURE__ */ new Set();
680
+ for (; e;) {
681
+ for (let n of e.domainSensitiveScaleChannels) t.add(n);
682
+ e = e.parent;
683
+ }
684
+ return t;
685
+ }
686
+ function gt(e) {
687
+ return e.type == "file";
688
+ }
689
+ function _t(e) {
690
+ return e.type == "facet";
691
+ }
692
+ //#endregion
693
+ //#region ../core/src/data/transforms/transform.js
694
+ var vt = class extends pt {
695
+ #e;
696
+ constructor(e, t) {
697
+ super(t), this.#e = e.type;
698
+ }
699
+ get label() {
700
+ return this.#e;
701
+ }
702
+ watchExprRef(e, t) {
703
+ if (G(e)) {
704
+ let n = e;
705
+ return this.paramRuntime.watchExpression(n.expr, t, {
706
+ scopeOwned: !1,
707
+ registerDisposer: (e) => this.registerDisposer(e)
708
+ });
709
+ }
710
+ return (() => e);
711
+ }
712
+ }, S = "__uniqueId", yt = 1e4, bt = [null], xt = class extends vt {
713
+ get behavior() {
714
+ return 2;
715
+ }
716
+ constructor(e) {
717
+ super(e), this.params = e, this._blocks = [], this._usedBlocks = 0, this._id = -1;
718
+ }
719
+ initialize() {}
720
+ reset() {
721
+ super.reset(), this._usedBlocks = 0, this._id = -1;
722
+ }
723
+ handle(e) {
724
+ e[S] = this.#e(), this._propagate(e);
725
+ }
726
+ #e() {
727
+ return ++this._id % 1e4 == 0 && (this._id = this.#t() * yt), this._id;
728
+ }
729
+ #t() {
730
+ return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
731
+ }
732
+ #n() {
733
+ let e = bt.length;
734
+ return bt[e] = this, this._blocks.push(e), this._usedBlocks++, e;
735
+ }
736
+ };
737
+ //#endregion
738
+ //#region ../core/src/utils/field.js
739
+ function St(e, t = e) {
740
+ return /^[A-Za-z0-9_]+$/.test(e) ? x(Function("validator", `
741
+ let validated = !validator;
742
+ return function accessField(datum) {
743
+ if (!validated) {
744
+ validator(datum);
745
+ validated = true;
746
+ }
747
+ return datum[${JSON.stringify(e)}];
748
+ }`)(function(t) {
749
+ e in t || Ct(t, e);
750
+ }), [e], t) : ke(e);
751
+ }
752
+ function Ct(e, t) {
753
+ throw Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`);
754
+ }
755
+ //#endregion
756
+ //#region ../core/src/encoder/accessor.js
757
+ function wt(e, t, n) {
758
+ if (!e) throw Error("Cannot create an accessor without a channel.");
759
+ function r(n) {
760
+ let r = n;
761
+ return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = Dt(t), r.scaleChannel = ((Ht(t) && t.resolutionChannel) ?? (pn(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = Ot({
762
+ scaleChannel: r.scaleChannel,
763
+ source: Et(t)
764
+ }).domainKeyBase), r.equals = (e) => e ? r === e || r.sourceKey !== void 0 && r.sourceKey === e.sourceKey : !1, r.asNumberAccessor = () => r, r;
765
+ }
766
+ function i(e) {
767
+ if (G(e)) {
768
+ let t = r(n.createExpression(e.expr));
769
+ if (t.fields.length > 0) throw Error("Expression in DatumDef/ValueDef cannot access data fields: " + e.expr);
770
+ return t;
771
+ } else {
772
+ let t = e;
773
+ return r(() => t);
774
+ }
775
+ }
776
+ if (C(t)) try {
777
+ return r(St(t.field));
778
+ } catch (e) {
779
+ throw Error(`Invalid field definition: ${e.message}`, { cause: e });
780
+ }
781
+ else if (qt(t)) return r(n.createExpression(t.expr));
782
+ else if (Vt(t)) return i(t.datum);
783
+ else if (Bt(t)) return i(t.value);
784
+ else throw Error(`Invalid channel definition: "${e}": ${JSON.stringify(t)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`);
785
+ }
786
+ function Tt(e) {
787
+ return e.scaleChannel !== void 0;
788
+ }
789
+ function Et(e) {
790
+ if (C(e)) return {
791
+ kind: "field",
792
+ value: e.field
793
+ };
794
+ if (qt(e)) return {
795
+ kind: "expr",
796
+ value: e.expr
797
+ };
798
+ if (Vt(e)) return {
799
+ kind: "datum",
800
+ value: e.datum
801
+ };
802
+ if (Bt(e)) return {
803
+ kind: "value",
804
+ value: e.value
805
+ };
806
+ throw Error("Cannot derive a domain key from channel definition: " + JSON.stringify(e));
807
+ }
808
+ function Dt(e) {
809
+ let t = Et(e);
810
+ return t.kind === "datum" || t.kind === "value" ? "constant|" + jt(t.value) : t.kind + "|" + At(t);
811
+ }
812
+ function Ot({ scaleChannel: e, source: t, type: n }) {
813
+ if (!e) throw Error("Cannot build a domain key without a scale channel.");
814
+ let r = e + "|" + t.kind + "|" + At(t);
815
+ return {
816
+ domainKeyBase: r,
817
+ domainKey: n ? n + "|" + r : void 0
818
+ };
819
+ }
820
+ function kt(e, t) {
821
+ let { domainKey: n, domainKeyBase: r } = Ot({
822
+ scaleChannel: e.scaleChannel,
823
+ source: Et(e.channelDef),
824
+ type: t
825
+ });
826
+ if (!n) throw Error("Cannot finalize a domain key without a resolved type.");
827
+ return e.domainKeyBase = r, e.domainKey = n, n;
828
+ }
829
+ function At(e) {
830
+ switch (e.kind) {
831
+ case "field":
832
+ case "expr": return e.value;
833
+ case "datum":
834
+ case "value": return jt(e.value);
835
+ default: throw Error("Unknown domain key source.");
836
+ }
837
+ }
838
+ function jt(e) {
839
+ return G(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
840
+ }
841
+ //#endregion
842
+ //#region ../core/src/encoder/encoder.js
843
+ function Mt(e, t, n, r = "intersects") {
844
+ let i, a = ia(!1), o = () => {
845
+ if (i) return i;
846
+ if (e.singleParam && !n.findValue(e.params[0])) return a;
847
+ let o = e.params.map((r) => {
848
+ let i = n.findValue(r);
849
+ if (!i) throw Error(`Selection parameter "${r}" was not found.`);
850
+ let a = {};
851
+ if (H(i)) for (let n of Object.keys(i.intervals)) {
852
+ let i = e.singleParam ? [n] : [n, ln(n)];
853
+ for (let e of i) {
854
+ let n = t[e];
855
+ if (C(n)) a[e] = n.field;
856
+ else if (n && "condition" in n) {
857
+ let t = n.condition, r = (Array.isArray(t) ? t : [t]).find(C);
858
+ C(r) && (a[e] = r.field);
859
+ }
860
+ }
861
+ if (!a[n]) throw Error(`Selection "${r}" has an interval for "${n}" channel, but could not find a fieldDef: ${JSON.stringify(t[n])}`);
862
+ }
863
+ return {
864
+ param: r,
865
+ selection: i,
866
+ fields: a
867
+ };
868
+ }), s = e.singleParam ? Fi({
869
+ type: "filter",
870
+ param: e.params[0],
871
+ fields: o[0].fields,
872
+ empty: e.empty
873
+ }, o[0].selection) : Vi(o, e.empty, r);
874
+ return i = n.createExpression(s), i;
875
+ };
876
+ return Object.assign((e) => o()(e), { selection: e });
877
+ }
878
+ function Nt(e, t, n, r, i = "intersects") {
879
+ let a = Jt(t) || Yt(t) ? Array.isArray(t.condition) ? t.condition : [t.condition] : [], o = [...a, t], s = o.map((t, s) => {
880
+ let c = a[s], l = wt(e, t, r), u = c ? Ii(c) : void 0;
881
+ return {
882
+ accessor: l,
883
+ predicate: u ? Mt(u, n, r, i) : ia(s === o.length - 1)
884
+ };
885
+ });
886
+ if (s.filter((e) => !e.accessor.constant).length > 1) throw Error("Only one accessor can be non-constant. Channel: " + e);
887
+ return s;
888
+ }
889
+ function Pt(e, t) {
890
+ let n = {}, r = (t) => e.getScaleResolution(t)?.getScale(), i = (t, n) => {
891
+ let r = e.getScaleResolution(t);
892
+ e.paramRuntime.operation("encoder scale", [r.getMappingRef()], () => r.getScale(), n);
893
+ };
894
+ for (let [a, o] of Object.entries(t)) {
895
+ if (!o) continue;
896
+ let s = a;
897
+ Ft(s) || (n[s] = Rt(Nt(s, o, t, e.paramRuntime, e.mark.defaultHitTestMode), r, i));
898
+ }
899
+ return n;
900
+ }
901
+ function Ft(e) {
902
+ return e === "key" || e === "search" || e === "tooltip" || e === "order";
903
+ }
904
+ function It(e) {
905
+ return e.branches.map((e) => e.accessor);
906
+ }
907
+ function Lt(e) {
908
+ return e.branches.find((e) => !e.accessor.constant)?.accessor;
909
+ }
910
+ function Rt(e, t, n) {
911
+ if (e.length === 1) {
912
+ let r = zt(e[0].accessor, t, n);
913
+ return Object.assign(r, { branches: e });
914
+ }
915
+ let r = e.map((e) => e.predicate), i = e.map((e) => zt(e.accessor, t, n)), a = Object.assign((e) => {
916
+ for (let t = 0; t < i.length; t++) if (r[t](e)) return i[t](e);
917
+ }, {
918
+ constant: !1,
919
+ branches: e,
920
+ channelDef: e.at(-1).accessor.channelDef
921
+ });
922
+ return Object.defineProperty(a, "scale", {
923
+ enumerable: !0,
924
+ get: () => i.find((e) => e.scale)?.scale
925
+ });
926
+ }
927
+ function zt(e, t, n) {
928
+ let { channel: r, scaleChannel: i, channelDef: a } = e, o = e.scaleChannel ? t(i) : void 0;
929
+ if (i && !o) throw Error(`Missing scale! "${r}": ${JSON.stringify(a)}`);
930
+ let s = Object.assign(o ? (t) => o(e(t)) : (t) => e(t), {
931
+ scale: o,
932
+ constant: e.constant,
933
+ branches: [{
934
+ accessor: e,
935
+ predicate: ia(!0)
936
+ }],
937
+ channelDef: a
938
+ });
939
+ return o && n?.(i, (e) => {
940
+ o = e, s.scale = e;
941
+ }), s;
942
+ }
943
+ function Bt(e) {
944
+ return e && "value" in e;
945
+ }
946
+ function C(e) {
947
+ return e && "field" in e;
948
+ }
949
+ function Vt(e) {
950
+ return e && "datum" in e;
951
+ }
952
+ function Ht(e) {
953
+ return C(e) || Vt(e) || qt(e) || Kt(e);
954
+ }
955
+ function Ut(e) {
956
+ if (Yt(e)) {
957
+ let t = e.condition;
958
+ return (Array.isArray(t) ? t : [t]).find((e) => Ht(e));
959
+ } else if (Ht(e)) return e;
960
+ }
961
+ function Wt(e) {
962
+ let t = e && Ut(e);
963
+ return t != null && t.type != "quantitative" && t.scale !== null;
964
+ }
965
+ function Gt(e, t) {
966
+ let n = e.mark.encoding[t];
967
+ if (Array.isArray(n)) throw Error("Not a channel def with scale!");
968
+ {
969
+ let e = Ut(n);
970
+ if (e) return e;
971
+ }
972
+ throw Error("Not a channel def with scale!");
973
+ }
974
+ function Kt(e) {
975
+ return e && "chrom" in e;
976
+ }
977
+ function qt(e) {
978
+ return e && "expr" in e;
979
+ }
980
+ function Jt(e) {
981
+ return (C(e) || Vt(e)) && "condition" in e;
982
+ }
983
+ function Yt(e) {
984
+ return Bt(e) && "condition" in e;
985
+ }
986
+ var Xt = ["x", "y"], Zt = ["x2", "y2"], Qt = ["xOffset", "yOffset"], $t = [...Xt, ...Zt];
987
+ function en(e) {
988
+ return Xt.includes(e);
989
+ }
990
+ function tn(e) {
991
+ return $t.includes(e);
992
+ }
993
+ function nn(e) {
994
+ return Qt.includes(e);
995
+ }
996
+ function rn(e) {
997
+ return un(e) == "x" ? "xOffset" : "yOffset";
998
+ }
999
+ function an(e, t, n) {
1000
+ return t ?? (n ? 0 : e);
1001
+ }
1002
+ var on = {
1003
+ x: "x2",
1004
+ y: "y2"
1005
+ }, sn = Object.fromEntries(Object.entries(on).map((e) => [e[1], e[0]]));
1006
+ function cn(e) {
1007
+ return e in sn;
1008
+ }
1009
+ function ln(e) {
1010
+ let t = on[e];
1011
+ if (t) return t;
1012
+ throw Error(`${e} has no secondary channel!`);
1013
+ }
1014
+ function un(e) {
1015
+ return sn[e] ?? e;
1016
+ }
1017
+ function dn(e) {
1018
+ return [
1019
+ "color",
1020
+ "fill",
1021
+ "stroke"
1022
+ ].includes(un(e));
1023
+ }
1024
+ function fn(e) {
1025
+ return ["shape", "direction"].includes(e);
1026
+ }
1027
+ function pn(e) {
1028
+ return [
1029
+ "x",
1030
+ "y",
1031
+ "x2",
1032
+ "y2",
1033
+ "xOffset",
1034
+ "yOffset",
1035
+ "color",
1036
+ "fill",
1037
+ "stroke",
1038
+ "opacity",
1039
+ "fillOpacity",
1040
+ "strokeOpacity",
1041
+ "strokeWidth",
1042
+ "size",
1043
+ "shape",
1044
+ "direction",
1045
+ "angle",
1046
+ "dx",
1047
+ "dy",
1048
+ "sample"
1049
+ ].includes(e);
1050
+ }
1051
+ function mn(e) {
1052
+ switch (e) {
1053
+ case "shape": return [
1054
+ "circle",
1055
+ "square",
1056
+ "cross",
1057
+ "diamond",
1058
+ "triangle-up",
1059
+ "triangle-right",
1060
+ "triangle-down",
1061
+ "triangle-left",
1062
+ "tick-up",
1063
+ "tick-right",
1064
+ "tick-down",
1065
+ "tick-left",
1066
+ "x",
1067
+ "+"
1068
+ ];
1069
+ case "direction": return ["forward", "reverse"];
1070
+ default:
1071
+ }
1072
+ }
1073
+ function hn(e) {
1074
+ if (!fn(e)) throw Error("Not a discrete channel: " + e);
1075
+ let t = new Map(mn(e).map((e, t) => [e, t]));
1076
+ return (n) => {
1077
+ let r = t.get(n);
1078
+ if (r !== void 0) return r;
1079
+ throw Error(`Invalid value for "${e}" channel: ${n}`);
1080
+ };
1081
+ }
1082
+ //#endregion
1083
+ //#region ../../node_modules/vega-expression/build/vega-expression.js
1084
+ var gn = "RawCode", _n = "Literal", vn = "Property", yn = "Identifier", bn = "ArrayExpression", xn = "BinaryExpression", Sn = "CallExpression", Cn = "ConditionalExpression", wn = "LogicalExpression", Tn = "MemberExpression", En = "ObjectExpression", Dn = "UnaryExpression";
1085
+ function w(e) {
1086
+ this.type = e;
1087
+ }
1088
+ w.prototype.visit = function(e) {
1089
+ let t, n, r;
1090
+ if (e(this)) return 1;
1091
+ for (t = On(this), n = 0, r = t.length; n < r; ++n) if (t[n].visit(e)) return 1;
1092
+ };
1093
+ function On(e) {
1094
+ switch (e.type) {
1095
+ case bn: return e.elements;
1096
+ case xn:
1097
+ case wn: return [e.left, e.right];
1098
+ case Sn: return [e.callee].concat(e.arguments);
1099
+ case Cn: return [
1100
+ e.test,
1101
+ e.consequent,
1102
+ e.alternate
1103
+ ];
1104
+ case Tn: return [e.object, e.property];
1105
+ case En: return e.properties;
1106
+ case vn: return [e.key, e.value];
1107
+ case Dn: return [e.argument];
1108
+ case yn:
1109
+ case _n:
1110
+ case gn:
1111
+ default: return [];
1112
+ }
1113
+ }
1114
+ var T, E, D, O, k, kn = 1, An = 2, A = 3, j = 4, jn = 5, M = 6, N = 7, Mn = 8, Nn = 9;
1115
+ T = {}, T[kn] = "Boolean", T[An] = "<end>", T[A] = "Identifier", T[j] = "Keyword", T[jn] = "Null", T[M] = "Numeric", T[N] = "Punctuator", T[Mn] = "String", T[Nn] = "RegularExpression";
1116
+ var Pn = "ArrayExpression", Fn = "BinaryExpression", In = "CallExpression", Ln = "ConditionalExpression", Rn = "Identifier", zn = "Literal", Bn = "LogicalExpression", Vn = "MemberExpression", Hn = "ObjectExpression", Un = "Property", Wn = "UnaryExpression", P = "Unexpected token %0", Gn = "Unexpected number", Kn = "Unexpected string", qn = "Unexpected identifier", Jn = "Unexpected reserved word", Yn = "Unexpected end of input", Xn = "Invalid regular expression", Zn = "Invalid regular expression: missing /", Qn = "Octal literals are not allowed in strict mode.", $n = "Duplicate data property in object literal not allowed in strict mode", F = "ILLEGAL", er = "Disabled.", tr = /* @__PURE__ */ RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), nr = /* @__PURE__ */ RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
1117
+ function rr(e, t) {
1118
+ /* istanbul ignore next */
1119
+ if (!e) throw Error("ASSERT: " + t);
1120
+ }
1121
+ function I(e) {
1122
+ return e >= 48 && e <= 57;
1123
+ }
1124
+ function ir(e) {
1125
+ return "0123456789abcdefABCDEF".includes(e);
1126
+ }
1127
+ function ar(e) {
1128
+ return "01234567".includes(e);
1129
+ }
1130
+ function or(e) {
1131
+ return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [
1132
+ 5760,
1133
+ 6158,
1134
+ 8192,
1135
+ 8193,
1136
+ 8194,
1137
+ 8195,
1138
+ 8196,
1139
+ 8197,
1140
+ 8198,
1141
+ 8199,
1142
+ 8200,
1143
+ 8201,
1144
+ 8202,
1145
+ 8239,
1146
+ 8287,
1147
+ 12288,
1148
+ 65279
1149
+ ].includes(e);
1150
+ }
1151
+ function sr(e) {
1152
+ return e === 10 || e === 13 || e === 8232 || e === 8233;
1153
+ }
1154
+ function cr(e) {
1155
+ return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && tr.test(String.fromCharCode(e));
1156
+ }
1157
+ function lr(e) {
1158
+ return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && nr.test(String.fromCharCode(e));
1159
+ }
1160
+ var ur = {
1161
+ if: 1,
1162
+ in: 1,
1163
+ do: 1,
1164
+ var: 1,
1165
+ for: 1,
1166
+ new: 1,
1167
+ try: 1,
1168
+ let: 1,
1169
+ this: 1,
1170
+ else: 1,
1171
+ case: 1,
1172
+ void: 1,
1173
+ with: 1,
1174
+ enum: 1,
1175
+ while: 1,
1176
+ break: 1,
1177
+ catch: 1,
1178
+ throw: 1,
1179
+ const: 1,
1180
+ yield: 1,
1181
+ class: 1,
1182
+ super: 1,
1183
+ return: 1,
1184
+ typeof: 1,
1185
+ delete: 1,
1186
+ switch: 1,
1187
+ export: 1,
1188
+ import: 1,
1189
+ public: 1,
1190
+ static: 1,
1191
+ default: 1,
1192
+ finally: 1,
1193
+ extends: 1,
1194
+ package: 1,
1195
+ private: 1,
1196
+ function: 1,
1197
+ continue: 1,
1198
+ debugger: 1,
1199
+ interface: 1,
1200
+ protected: 1,
1201
+ instanceof: 1,
1202
+ implements: 1
1203
+ };
1204
+ function dr() {
1205
+ for (; D < O;) {
1206
+ let e = E.charCodeAt(D);
1207
+ if (or(e) || sr(e)) ++D;
1208
+ else break;
1209
+ }
1210
+ }
1211
+ function fr(e) {
1212
+ var t, n, r, i = 0;
1213
+ for (n = e === "u" ? 4 : 2, t = 0; t < n; ++t) D < O && ir(E[D]) ? (r = E[D++], i = i * 16 + "0123456789abcdef".indexOf(r.toLowerCase())) : R({}, P, F);
1214
+ return String.fromCharCode(i);
1215
+ }
1216
+ function pr() {
1217
+ var e = E[D], t = 0, n, r;
1218
+ for (e === "}" && R({}, P, F); D < O && (e = E[D++], ir(e));) t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
1219
+ return (t > 1114111 || e !== "}") && R({}, P, F), t <= 65535 ? String.fromCharCode(t) : (n = (t - 65536 >> 10) + 55296, r = (t - 65536 & 1023) + 56320, String.fromCharCode(n, r));
1220
+ }
1221
+ function mr() {
1222
+ var e = E.charCodeAt(D++), t = String.fromCharCode(e);
1223
+ for (e === 92 && (E.charCodeAt(D) !== 117 && R({}, P, F), ++D, e = fr("u"), (!e || e === "\\" || !cr(e.charCodeAt(0))) && R({}, P, F), t = e); D < O && (e = E.charCodeAt(D), lr(e));) ++D, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), E.charCodeAt(D) !== 117 && R({}, P, F), ++D, e = fr("u"), (!e || e === "\\" || !lr(e.charCodeAt(0))) && R({}, P, F), t += e);
1224
+ return t;
1225
+ }
1226
+ function hr() {
1227
+ for (var e = D++, t; D < O;) {
1228
+ if (t = E.charCodeAt(D), t === 92) return D = e, mr();
1229
+ if (lr(t)) ++D;
1230
+ else break;
1231
+ }
1232
+ return E.slice(e, D);
1233
+ }
1234
+ function gr() {
1235
+ var e = D, t = E.charCodeAt(D) === 92 ? mr() : hr();
1236
+ return {
1237
+ type: t.length === 1 ? A : ur.hasOwnProperty(t) ? j : t === "null" ? jn : t === "true" || t === "false" ? kn : A,
1238
+ value: t,
1239
+ start: e,
1240
+ end: D
1241
+ };
1242
+ }
1243
+ function _r() {
1244
+ var e = D, t = E.charCodeAt(D), n, r = E[D], i, a, o;
1245
+ switch (t) {
1246
+ case 46:
1247
+ case 40:
1248
+ case 41:
1249
+ case 59:
1250
+ case 44:
1251
+ case 123:
1252
+ case 125:
1253
+ case 91:
1254
+ case 93:
1255
+ case 58:
1256
+ case 63:
1257
+ case 126: return ++D, {
1258
+ type: N,
1259
+ value: String.fromCharCode(t),
1260
+ start: e,
1261
+ end: D
1262
+ };
1263
+ default: if (n = E.charCodeAt(D + 1), n === 61) switch (t) {
1264
+ case 43:
1265
+ case 45:
1266
+ case 47:
1267
+ case 60:
1268
+ case 62:
1269
+ case 94:
1270
+ case 124:
1271
+ case 37:
1272
+ case 38:
1273
+ case 42: return D += 2, {
1274
+ type: N,
1275
+ value: String.fromCharCode(t) + String.fromCharCode(n),
1276
+ start: e,
1277
+ end: D
1278
+ };
1279
+ case 33:
1280
+ case 61: return D += 2, E.charCodeAt(D) === 61 && ++D, {
1281
+ type: N,
1282
+ value: E.slice(e, D),
1283
+ start: e,
1284
+ end: D
1285
+ };
1286
+ }
1287
+ }
1288
+ if (o = E.substr(D, 4), o === ">>>=") return D += 4, {
1289
+ type: N,
1290
+ value: o,
1291
+ start: e,
1292
+ end: D
1293
+ };
1294
+ if (a = o.substr(0, 3), a === ">>>" || a === "<<=" || a === ">>=") return D += 3, {
1295
+ type: N,
1296
+ value: a,
1297
+ start: e,
1298
+ end: D
1299
+ };
1300
+ if (i = a.substr(0, 2), r === i[1] && "+-<>&|".includes(r) || i === "=>") return D += 2, {
1301
+ type: N,
1302
+ value: i,
1303
+ start: e,
1304
+ end: D
1305
+ };
1306
+ if (i === "//" && R({}, P, F), "<>=!+-*%&|^/".includes(r)) return ++D, {
1307
+ type: N,
1308
+ value: r,
1309
+ start: e,
1310
+ end: D
1311
+ };
1312
+ R({}, P, F);
1313
+ }
1314
+ function vr(e) {
1315
+ let t = "";
1316
+ for (; D < O && ir(E[D]);) t += E[D++];
1317
+ return t.length === 0 && R({}, P, F), cr(E.charCodeAt(D)) && R({}, P, F), {
1318
+ type: M,
1319
+ value: parseInt("0x" + t, 16),
1320
+ start: e,
1321
+ end: D
1322
+ };
1323
+ }
1324
+ function yr(e) {
1325
+ let t = "0" + E[D++];
1326
+ for (; D < O && ar(E[D]);) t += E[D++];
1327
+ return (cr(E.charCodeAt(D)) || I(E.charCodeAt(D))) && R({}, P, F), {
1328
+ type: M,
1329
+ value: parseInt(t, 8),
1330
+ octal: !0,
1331
+ start: e,
1332
+ end: D
1333
+ };
1334
+ }
1335
+ function br() {
1336
+ var e, t, n = E[D];
1337
+ if (rr(I(n.charCodeAt(0)) || n === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = D, e = "", n !== ".") {
1338
+ if (e = E[D++], n = E[D], e === "0") {
1339
+ if (n === "x" || n === "X") return ++D, vr(t);
1340
+ if (ar(n)) return yr(t);
1341
+ n && I(n.charCodeAt(0)) && R({}, P, F);
1342
+ }
1343
+ for (; I(E.charCodeAt(D));) e += E[D++];
1344
+ n = E[D];
1345
+ }
1346
+ if (n === ".") {
1347
+ for (e += E[D++]; I(E.charCodeAt(D));) e += E[D++];
1348
+ n = E[D];
1349
+ }
1350
+ if (n === "e" || n === "E") if (e += E[D++], n = E[D], (n === "+" || n === "-") && (e += E[D++]), I(E.charCodeAt(D))) for (; I(E.charCodeAt(D));) e += E[D++];
1351
+ else R({}, P, F);
1352
+ return cr(E.charCodeAt(D)) && R({}, P, F), {
1353
+ type: M,
1354
+ value: parseFloat(e),
1355
+ start: t,
1356
+ end: D
1357
+ };
1358
+ }
1359
+ function xr() {
1360
+ var e = "", t, n, r, i, a = !1;
1361
+ for (t = E[D], rr(t === "'" || t === "\"", "String literal must starts with a quote"), n = D, ++D; D < O;) if (r = E[D++], r === t) {
1362
+ t = "";
1363
+ break;
1364
+ } else if (r === "\\") if (r = E[D++], !r || !sr(r.charCodeAt(0))) switch (r) {
1365
+ case "u":
1366
+ case "x":
1367
+ E[D] === "{" ? (++D, e += pr()) : e += fr(r);
1368
+ break;
1369
+ case "n":
1370
+ e += "\n";
1371
+ break;
1372
+ case "r":
1373
+ e += "\r";
1374
+ break;
1375
+ case "t":
1376
+ e += " ";
1377
+ break;
1378
+ case "b":
1379
+ e += "\b";
1380
+ break;
1381
+ case "f":
1382
+ e += "\f";
1383
+ break;
1384
+ case "v":
1385
+ e += "\v";
1386
+ break;
1387
+ default:
1388
+ ar(r) ? (i = "01234567".indexOf(r), i !== 0 && (a = !0), D < O && ar(E[D]) && (a = !0, i = i * 8 + "01234567".indexOf(E[D++]), "0123".includes(r) && D < O && ar(E[D]) && (i = i * 8 + "01234567".indexOf(E[D++]))), e += String.fromCharCode(i)) : e += r;
1389
+ break;
1390
+ }
1391
+ else r === "\r" && E[D] === "\n" && ++D;
1392
+ else if (sr(r.charCodeAt(0))) break;
1393
+ else e += r;
1394
+ return t !== "" && R({}, P, F), {
1395
+ type: Mn,
1396
+ value: e,
1397
+ octal: a,
1398
+ start: n,
1399
+ end: D
1400
+ };
1401
+ }
1402
+ function Sr(e, t) {
1403
+ let n = e;
1404
+ t.includes("u") && (n = n.replace(/\\u\{([0-9a-fA-F]+)\}/g, (e, t) => {
1405
+ if (parseInt(t, 16) <= 1114111) return "x";
1406
+ R({}, Xn);
1407
+ }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
1408
+ try {
1409
+ new RegExp(n);
1410
+ } catch {
1411
+ R({}, Xn);
1412
+ }
1413
+ try {
1414
+ return new RegExp(e, t);
1415
+ } catch {
1416
+ return null;
1417
+ }
1418
+ }
1419
+ function Cr() {
1420
+ var e = E[D], t, n, r, i;
1421
+ for (rr(e === "/", "Regular expression literal must start with a slash"), t = E[D++], n = !1, r = !1; D < O;) if (e = E[D++], t += e, e === "\\") e = E[D++], sr(e.charCodeAt(0)) && R({}, Zn), t += e;
1422
+ else if (sr(e.charCodeAt(0))) R({}, Zn);
1423
+ else if (n) e === "]" && (n = !1);
1424
+ else if (e === "/") {
1425
+ r = !0;
1426
+ break;
1427
+ } else e === "[" && (n = !0);
1428
+ return r || R({}, Zn), i = t.substr(1, t.length - 2), {
1429
+ value: i,
1430
+ literal: t
1431
+ };
1432
+ }
1433
+ function wr() {
1434
+ for (var e, t = "", n = ""; D < O && (e = E[D], lr(e.charCodeAt(0)));) ++D, e === "\\" && D < O ? R({}, P, F) : (n += e, t += e);
1435
+ return n.search(/[^gimuy]/g) >= 0 && R({}, Xn, n), {
1436
+ value: n,
1437
+ literal: t
1438
+ };
1439
+ }
1440
+ function Tr() {
1441
+ var e, t, n, r;
1442
+ return k = null, dr(), e = D, t = Cr(), n = wr(), r = Sr(t.value, n.value), {
1443
+ literal: t.literal + n.literal,
1444
+ value: r,
1445
+ regex: {
1446
+ pattern: t.value,
1447
+ flags: n.value
1448
+ },
1449
+ start: e,
1450
+ end: D
1451
+ };
1452
+ }
1453
+ function Er(e) {
1454
+ return e.type === A || e.type === j || e.type === kn || e.type === jn;
1455
+ }
1456
+ function Dr() {
1457
+ if (dr(), D >= O) return {
1458
+ type: An,
1459
+ start: D,
1460
+ end: D
1461
+ };
1462
+ let e = E.charCodeAt(D);
1463
+ return cr(e) ? gr() : e === 40 || e === 41 || e === 59 ? _r() : e === 39 || e === 34 ? xr() : e === 46 ? I(E.charCodeAt(D + 1)) ? br() : _r() : I(e) ? br() : _r();
1464
+ }
1465
+ function L() {
1466
+ let e = k;
1467
+ return D = e.end, k = Dr(), D = e.end, e;
1468
+ }
1469
+ function Or() {
1470
+ let e = D;
1471
+ k = Dr(), D = e;
1472
+ }
1473
+ function kr(e) {
1474
+ let t = new w(Pn);
1475
+ return t.elements = e, t;
1476
+ }
1477
+ function Ar(e, t, n) {
1478
+ let r = new w(e === "||" || e === "&&" ? Bn : Fn);
1479
+ return r.operator = e, r.left = t, r.right = n, r;
1480
+ }
1481
+ function jr(e, t) {
1482
+ let n = new w(In);
1483
+ return n.callee = e, n.arguments = t, n;
1484
+ }
1485
+ function Mr(e, t, n) {
1486
+ let r = new w(Ln);
1487
+ return r.test = e, r.consequent = t, r.alternate = n, r;
1488
+ }
1489
+ function Nr(e) {
1490
+ let t = new w(Rn);
1491
+ return t.name = e, t;
1492
+ }
1493
+ function Pr(e) {
1494
+ let t = new w(zn);
1495
+ return t.value = e.value, t.raw = E.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
1496
+ }
1497
+ function Fr(e, t, n) {
1498
+ let r = new w(Vn);
1499
+ return r.computed = e === "[", r.object = t, r.property = n, r.computed || (n.member = !0), r;
1500
+ }
1501
+ function Ir(e) {
1502
+ let t = new w(Hn);
1503
+ return t.properties = e, t;
1504
+ }
1505
+ function Lr(e, t, n) {
1506
+ let r = new w(Un);
1507
+ return r.key = t, r.value = n, r.kind = e, r;
1508
+ }
1509
+ function Rr(e, t) {
1510
+ let n = new w(Wn);
1511
+ return n.operator = e, n.argument = t, n.prefix = !0, n;
1512
+ }
1513
+ function R(e, t) {
1514
+ var n, r = Array.prototype.slice.call(arguments, 2), i = t.replace(/%(\d)/g, (e, t) => (rr(t < r.length, "Message reference must be in range"), r[t]));
1515
+ throw n = Error(i), n.index = D, n.description = i, n;
1516
+ }
1517
+ function zr(e) {
1518
+ e.type === An && R(e, Yn), e.type === M && R(e, Gn), e.type === Mn && R(e, Kn), e.type === A && R(e, qn), e.type === j && R(e, Jn), R(e, P, e.value);
1519
+ }
1520
+ function z(e) {
1521
+ let t = L();
1522
+ (t.type !== N || t.value !== e) && zr(t);
1523
+ }
1524
+ function B(e) {
1525
+ return k.type === N && k.value === e;
1526
+ }
1527
+ function Br(e) {
1528
+ return k.type === j && k.value === e;
1529
+ }
1530
+ function Vr() {
1531
+ let e = [];
1532
+ for (D = k.start, z("["); !B("]");) B(",") ? (L(), e.push(null)) : (e.push(V()), B("]") || z(","));
1533
+ return L(), kr(e);
1534
+ }
1535
+ function Hr() {
1536
+ D = k.start;
1537
+ let e = L();
1538
+ return e.type === Mn || e.type === M ? (e.octal && R(e, Qn), Pr(e)) : Nr(e.value);
1539
+ }
1540
+ function Ur() {
1541
+ var e, t, n, r;
1542
+ if (D = k.start, e = k, e.type === A) return n = Hr(), z(":"), r = V(), Lr("init", n, r);
1543
+ if (e.type === An || e.type === N) zr(e);
1544
+ else return t = Hr(), z(":"), r = V(), Lr("init", t, r);
1545
+ }
1546
+ function Wr() {
1547
+ var e = [], t, n, r, i = {}, a = String;
1548
+ for (D = k.start, z("{"); !B("}");) t = Ur(), n = t.key.type === Rn ? t.key.name : a(t.key.value), r = "$" + n, Object.prototype.hasOwnProperty.call(i, r) ? R({}, $n) : i[r] = !0, e.push(t), B("}") || z(",");
1549
+ return z("}"), Ir(e);
1550
+ }
1551
+ function Gr() {
1552
+ z("(");
1553
+ let e = ri();
1554
+ return z(")"), e;
1555
+ }
1556
+ var Kr = { if: 1 };
1557
+ function qr() {
1558
+ var e, t, n;
1559
+ if (B("(")) return Gr();
1560
+ if (B("[")) return Vr();
1561
+ if (B("{")) return Wr();
1562
+ if (e = k.type, D = k.start, e === A || Kr[k.value]) n = Nr(L().value);
1563
+ else if (e === Mn || e === M) k.octal && R(k, Qn), n = Pr(L());
1564
+ else if (e === j) throw Error(er);
1565
+ else e === kn ? (t = L(), t.value = t.value === "true", n = Pr(t)) : e === jn ? (t = L(), t.value = null, n = Pr(t)) : B("/") || B("/=") ? (n = Pr(Tr()), Or()) : zr(L());
1566
+ return n;
1567
+ }
1568
+ function Jr() {
1569
+ let e = [];
1570
+ if (z("("), !B(")")) for (; D < O && (e.push(V()), !B(")"));) z(",");
1571
+ return z(")"), e;
1572
+ }
1573
+ function Yr() {
1574
+ D = k.start;
1575
+ let e = L();
1576
+ return Er(e) || zr(e), Nr(e.value);
1577
+ }
1578
+ function Xr() {
1579
+ return z("."), Yr();
1580
+ }
1581
+ function Zr() {
1582
+ z("[");
1583
+ let e = ri();
1584
+ return z("]"), e;
1585
+ }
1586
+ function Qr() {
1587
+ for (var e = qr(), t, n;;) if (B(".")) n = Xr(), e = Fr(".", e, n);
1588
+ else if (B("(")) t = Jr(), e = jr(e, t);
1589
+ else if (B("[")) n = Zr(), e = Fr("[", e, n);
1590
+ else break;
1591
+ return e;
1592
+ }
1593
+ function $r() {
1594
+ let e = Qr();
1595
+ if (k.type === N && (B("++") || B("--"))) throw Error(er);
1596
+ return e;
1597
+ }
1598
+ function ei() {
1599
+ var e, t;
1600
+ if (k.type !== N && k.type !== j) t = $r();
1601
+ else if (B("++") || B("--")) throw Error(er);
1602
+ else if (B("+") || B("-") || B("~") || B("!")) e = L(), t = ei(), t = Rr(e.value, t);
1603
+ else if (Br("delete") || Br("void") || Br("typeof")) throw Error(er);
1604
+ else t = $r();
1605
+ return t;
1606
+ }
1607
+ function ti(e) {
1608
+ let t = 0;
1609
+ if (e.type !== N && e.type !== j) return 0;
1610
+ switch (e.value) {
1611
+ case "||":
1612
+ t = 1;
1613
+ break;
1614
+ case "&&":
1615
+ t = 2;
1616
+ break;
1617
+ case "|":
1618
+ t = 3;
1619
+ break;
1620
+ case "^":
1621
+ t = 4;
1622
+ break;
1623
+ case "&":
1624
+ t = 5;
1625
+ break;
1626
+ case "==":
1627
+ case "!=":
1628
+ case "===":
1629
+ case "!==":
1630
+ t = 6;
1631
+ break;
1632
+ case "<":
1633
+ case ">":
1634
+ case "<=":
1635
+ case ">=":
1636
+ case "instanceof":
1637
+ case "in":
1638
+ t = 7;
1639
+ break;
1640
+ case "<<":
1641
+ case ">>":
1642
+ case ">>>":
1643
+ t = 8;
1644
+ break;
1645
+ case "+":
1646
+ case "-":
1647
+ t = 9;
1648
+ break;
1649
+ case "*":
1650
+ case "/":
1651
+ case "%":
1652
+ t = 11;
1653
+ break;
1654
+ }
1655
+ return t;
1656
+ }
1657
+ function ni() {
1658
+ var e = k, t, n, r, i, a, o, s, c = ei(), l;
1659
+ if (r = k, i = ti(r), i === 0) return c;
1660
+ for (r.prec = i, L(), t = [e, k], o = ei(), a = [
1661
+ c,
1662
+ r,
1663
+ o
1664
+ ]; (i = ti(k)) > 0;) {
1665
+ for (; a.length > 2 && i <= a[a.length - 2].prec;) o = a.pop(), s = a.pop().value, c = a.pop(), t.pop(), n = Ar(s, c, o), a.push(n);
1666
+ r = L(), r.prec = i, a.push(r), t.push(k), n = ei(), a.push(n);
1667
+ }
1668
+ for (l = a.length - 1, n = a[l], t.pop(); l > 1;) t.pop(), n = Ar(a[l - 1].value, a[l - 2], n), l -= 2;
1669
+ return n;
1670
+ }
1671
+ function V() {
1672
+ var e = ni(), t, n;
1673
+ return B("?") && (L(), t = V(), z(":"), n = V(), e = Mr(e, t, n)), e;
1674
+ }
1675
+ function ri() {
1676
+ let e = V();
1677
+ if (B(",")) throw Error(er);
1678
+ return e;
1679
+ }
1680
+ function ii(e) {
1681
+ E = e, D = 0, O = E.length, k = null, Or();
1682
+ let t = ri();
1683
+ if (k.type !== An) throw Error("Unexpect token after expression.");
1684
+ return t;
1685
+ }
1686
+ var ai = {
1687
+ NaN: "NaN",
1688
+ E: "Math.E",
1689
+ LN2: "Math.LN2",
1690
+ LN10: "Math.LN10",
1691
+ LOG2E: "Math.LOG2E",
1692
+ LOG10E: "Math.LOG10E",
1693
+ PI: "Math.PI",
1694
+ SQRT1_2: "Math.SQRT1_2",
1695
+ SQRT2: "Math.SQRT2",
1696
+ MIN_VALUE: "Number.MIN_VALUE",
1697
+ MAX_VALUE: "Number.MAX_VALUE"
1698
+ };
1699
+ function oi(e) {
1700
+ function t(t, n, r, i) {
1701
+ let a = e(n[0]);
1702
+ return r && (a = r + "(" + a + ")", r.lastIndexOf("new ", 0) === 0 && (a = "(" + a + ")")), a + "." + t + (i < 0 ? "" : i === 0 ? "()" : "(" + n.slice(1).map(e).join(",") + ")");
1703
+ }
1704
+ function n(e, n, r) {
1705
+ return (i) => t(e, i, n, r);
1706
+ }
1707
+ let r = "new Date", a = "String", o = "RegExp";
1708
+ return {
1709
+ isNaN: "Number.isNaN",
1710
+ isFinite: "Number.isFinite",
1711
+ abs: "Math.abs",
1712
+ acos: "Math.acos",
1713
+ asin: "Math.asin",
1714
+ atan: "Math.atan",
1715
+ atan2: "Math.atan2",
1716
+ ceil: "Math.ceil",
1717
+ cos: "Math.cos",
1718
+ exp: "Math.exp",
1719
+ floor: "Math.floor",
1720
+ hypot: "Math.hypot",
1721
+ log: "Math.log",
1722
+ max: "Math.max",
1723
+ min: "Math.min",
1724
+ pow: "Math.pow",
1725
+ random: "Math.random",
1726
+ round: "Math.round",
1727
+ sin: "Math.sin",
1728
+ sqrt: "Math.sqrt",
1729
+ tan: "Math.tan",
1730
+ clamp: function(t) {
1731
+ t.length < 3 && i("Missing arguments to clamp function."), t.length > 3 && i("Too many arguments to clamp function.");
1732
+ let n = t.map(e);
1733
+ return "Math.max(" + n[1] + ", Math.min(" + n[2] + "," + n[0] + "))";
1734
+ },
1735
+ now: "Date.now",
1736
+ utc: "Date.UTC",
1737
+ datetime: r,
1738
+ date: n("getDate", r, 0),
1739
+ day: n("getDay", r, 0),
1740
+ year: n("getFullYear", r, 0),
1741
+ month: n("getMonth", r, 0),
1742
+ hours: n("getHours", r, 0),
1743
+ minutes: n("getMinutes", r, 0),
1744
+ seconds: n("getSeconds", r, 0),
1745
+ milliseconds: n("getMilliseconds", r, 0),
1746
+ time: n("getTime", r, 0),
1747
+ timezoneoffset: n("getTimezoneOffset", r, 0),
1748
+ utcdate: n("getUTCDate", r, 0),
1749
+ utcday: n("getUTCDay", r, 0),
1750
+ utcyear: n("getUTCFullYear", r, 0),
1751
+ utcmonth: n("getUTCMonth", r, 0),
1752
+ utchours: n("getUTCHours", r, 0),
1753
+ utcminutes: n("getUTCMinutes", r, 0),
1754
+ utcseconds: n("getUTCSeconds", r, 0),
1755
+ utcmilliseconds: n("getUTCMilliseconds", r, 0),
1756
+ length: n("length", null, -1),
1757
+ parseFloat: "parseFloat",
1758
+ parseInt: "parseInt",
1759
+ upper: n("toUpperCase", a, 0),
1760
+ lower: n("toLowerCase", a, 0),
1761
+ substring: n("substring", a),
1762
+ split: n("split", a),
1763
+ trim: n("trim", a, 0),
1764
+ btoa: "btoa",
1765
+ atob: "atob",
1766
+ regexp: o,
1767
+ test: n("test", o),
1768
+ if: function(t) {
1769
+ t.length < 3 && i("Missing arguments to if function."), t.length > 3 && i("Too many arguments to if function.");
1770
+ let n = t.map(e);
1771
+ return "(" + n[0] + "?" + n[1] + ":" + n[2] + ")";
1772
+ }
1773
+ };
1774
+ }
1775
+ function si(e) {
1776
+ let t = e && e.length - 1;
1777
+ return t && (e[0] === "\"" && e[t] === "\"" || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
1778
+ }
1779
+ function ci(e) {
1780
+ e ||= {};
1781
+ let t = e.allowed ? ee(e.allowed) : {}, n = e.forbidden ? ee(e.forbidden) : {}, r = e.constants || ai, a = (e.functions || oi)(g), o = e.globalvar, s = e.fieldvar, l = f(o) ? o : (e) => `${o}["${e}"]`;
1782
+ [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
1783
+ let u = {}, d = {}, h = 0;
1784
+ function g(e) {
1785
+ if (m(e)) return e;
1786
+ let t = te[e.type];
1787
+ return t ?? i("Unsupported type: " + e.type), t(e);
1788
+ }
1789
+ let te = {
1790
+ Literal: (e) => e.raw,
1791
+ Identifier: (e) => {
1792
+ let a = e.name;
1793
+ return h > 0 ? a : p(n, a) ? i("Illegal identifier: " + a) : p(r, a) ? r[a] : p(t, a) ? a : (u[a] = 1, l(a));
1794
+ },
1795
+ MemberExpression: (e) => {
1796
+ let t = !e.computed, n = g(e.object);
1797
+ t && (h += 1);
1798
+ let r = g(e.property);
1799
+ return n === s && (d[si(r)] = 1), t && --h, n + (t ? "." + r : "[" + r + "]");
1800
+ },
1801
+ CallExpression: (e) => {
1802
+ e.callee.type !== "Identifier" && i("Illegal callee type: " + e.callee.type);
1803
+ let t = e.callee.name, n = e.arguments, r = p(a, t) && a[t];
1804
+ return r || i("Unrecognized function: " + t), f(r) ? r(n) : r + "(" + n.map(g).join(",") + ")";
1805
+ },
1806
+ ArrayExpression: (e) => "[" + e.elements.map(g).join(",") + "]",
1807
+ BinaryExpression: (e) => "(" + g(e.left) + " " + e.operator + " " + g(e.right) + ")",
1808
+ UnaryExpression: (e) => "(" + e.operator + g(e.argument) + ")",
1809
+ ConditionalExpression: (e) => "(" + g(e.test) + "?" + g(e.consequent) + ":" + g(e.alternate) + ")",
1810
+ LogicalExpression: (e) => "(" + g(e.left) + e.operator + g(e.right) + ")",
1811
+ ObjectExpression: (e) => {
1812
+ for (let t of e.properties) {
1813
+ let e = t.key.name;
1814
+ c.has(e) && i("Illegal property: " + e);
1815
+ }
1816
+ return "{" + e.properties.map(g).join(",") + "}";
1817
+ },
1818
+ Property: (e) => {
1819
+ h += 1;
1820
+ let t = g(e.key);
1821
+ return --h, t + ":" + g(e.value);
1822
+ }
1823
+ };
1824
+ function _(e) {
1825
+ let t = {
1826
+ code: g(e),
1827
+ globals: Object.keys(u),
1828
+ fields: Object.keys(d)
1829
+ };
1830
+ return u = {}, d = {}, t;
1831
+ }
1832
+ return _.functions = a, _.constants = r, _;
1833
+ }
1834
+ //#endregion
1835
+ //#region ../core/src/utils/smoothstep.js
1836
+ function li(e, t, n) {
1837
+ return n = (n - e) / (t - e), n = Math.max(0, Math.min(1, n)), n * n * (3 - 2 * n);
1838
+ }
1839
+ //#endregion
1840
+ //#region ../core/src/utils/clamp.js
1841
+ function ui(e, t = 0, n = 1) {
1842
+ return Math.max(t, Math.min(n, e));
1843
+ }
1844
+ //#endregion
1845
+ //#region ../core/src/utils/linearstep.js
1846
+ function di(e, t, n) {
1847
+ return ui((n - e) / (t - e), 0, 1);
1848
+ }
1849
+ //#endregion
1850
+ //#region ../core/src/utils/expression.js
1851
+ function fi(e) {
1852
+ return je(e) || ArrayBuffer.isView(e) ? e : null;
1853
+ }
1854
+ function pi(e) {
1855
+ return fi(e) || (st(e) ? e : null);
1856
+ }
1857
+ var mi = {
1858
+ clamp: ui,
1859
+ format(e, t) {
1860
+ return he(t)(e);
1861
+ },
1862
+ join(e, t) {
1863
+ return fi(e).join(t);
1864
+ },
1865
+ indexof(e, t, n) {
1866
+ return pi(e).indexOf(t, n);
1867
+ },
1868
+ lastindexof(e, t, n) {
1869
+ return pi(e).lastIndexOf(t, n);
1870
+ },
1871
+ reverse(e) {
1872
+ return st(e) ? Array.from(e).reverse().join("") : fi(e).slice().reverse();
1873
+ },
1874
+ slice(e, t, n) {
1875
+ return pi(e).slice(t, n);
1876
+ },
1877
+ mapHasKey(e, t) {
1878
+ return e.has(t);
1879
+ },
1880
+ isArray: je,
1881
+ isBoolean: it,
1882
+ isDefined(e) {
1883
+ return e !== void 0;
1884
+ },
1885
+ isNumber: at,
1886
+ isObject: Me,
1887
+ isRegExp: ot,
1888
+ isString: st,
1889
+ isValid(e) {
1890
+ return e != null && e === e;
1891
+ },
1892
+ lerp: ct,
1893
+ linearstep: di,
1894
+ replace(e, t, n) {
1895
+ return String(e).replace(t, n);
1896
+ },
1897
+ sort(e) {
1898
+ return fi(e).slice().sort(et);
1899
+ },
1900
+ center(e) {
1901
+ let t = fi(e);
1902
+ return (t[0] + t[t.length - 1]) / 2;
1903
+ },
1904
+ span(e) {
1905
+ return lt(e);
1906
+ },
1907
+ smoothstep: li
1908
+ };
1909
+ function hi(e) {
1910
+ let t = !1, n = Ci(e, {}, { resolveScaleResolution: () => (t = !0, {
1911
+ channel: "analysis",
1912
+ getDomainRef: () => void 0,
1913
+ getMappingRef: () => void 0,
1914
+ getConfigurationRef: () => void 0,
1915
+ getZoomLevelRef: () => void 0
1916
+ }) });
1917
+ return {
1918
+ usesScaleHelper: t,
1919
+ globals: n.globals
1920
+ };
1921
+ }
1922
+ function gi(e, t) {
1923
+ let n = oi(e);
1924
+ for (let e in mi) n[e] = `this.${e}`;
1925
+ for (let r of [
1926
+ "scale",
1927
+ "invert",
1928
+ "domain",
1929
+ "range",
1930
+ "bandwidth",
1931
+ "linearize",
1932
+ "zoomLevel"
1933
+ ]) n[r] = (n) => _i(e, t, r, n);
1934
+ return n;
1935
+ }
1936
+ function _i(e, t, n, r) {
1937
+ if (n === "zoomLevel" && r.length === 0) {
1938
+ let e = [];
1939
+ for (let r of ["x", "y"]) {
1940
+ let i = t.resolveScaleResolution?.(r);
1941
+ if (i) {
1942
+ let a = t.getScaleHelper(n, r, i);
1943
+ e.push(`${t.globalvar}["${a.codeName}"]()`);
1944
+ }
1945
+ }
1946
+ return `Math.sqrt(${e.join("*") || "1"})`;
1947
+ }
1948
+ if (r.length === 0) throw Error(`Scale helper "${n}" requires a literal channel name.`);
1949
+ if ((n === "scale" || n === "invert" || n === "linearize") && r.length < 2) throw Error(`Scale helper "${n}" requires a channel name and a value.`);
1950
+ if (n === "zoomLevel" && r.length > 1) throw Error("Scale helper \"zoomLevel\" accepts zero arguments or one literal channel name.");
1951
+ let i = vi(r[0]);
1952
+ if (!i) throw Error(`Scale helper "${n}" requires a literal channel name.`);
1953
+ let a = t.resolveScaleResolution?.(i);
1954
+ if (!a) throw Error(`Unknown scale channel "${i}" in expression helper "${n}".`);
1955
+ let o = t.getScaleHelper(n, i, a), s = r.slice(1).map((t) => e(t)).join(",");
1956
+ return `${t.globalvar}["${o.codeName}"](${s})`;
1957
+ }
1958
+ function vi(e) {
1959
+ return e?.type === "Literal" && typeof e.value == "string" ? e.value : void 0;
1960
+ }
1961
+ function yi(e, t) {
1962
+ let n = (n) => xi(t, e, n);
1963
+ if (e === "domain") return () => n(() => t.getDomain());
1964
+ if (e === "range") return () => n(() => t.getScale().range());
1965
+ if (e === "bandwidth") return () => n(() => {
1966
+ let e = t.getScale();
1967
+ if (typeof e.bandwidth != "function") throw Error(`Scale channel "${t.channel}" does not support bandwidth().`);
1968
+ return e.bandwidth();
1969
+ });
1970
+ if (e === "scale") return (e) => n(() => t.getScale()(e));
1971
+ if (e === "invert") return (e) => n(() => t.getScale().invert(e));
1972
+ if (e === "linearize") return (e) => n(() => e == null ? null : typeof t.fromComplex == "function" ? t.fromComplex(e) : e);
1973
+ if (e === "zoomLevel") return () => n(() => t.getZoomLevel());
1974
+ throw Error("Unknown scale helper: " + e);
1975
+ }
1976
+ var bi = /* @__PURE__ */ new WeakSet();
1977
+ function xi(e, t, n) {
1978
+ if (bi.has(e)) throw Error(`Scale helper cycle detected while evaluating ${t}("${e.channel}").`);
1979
+ bi.add(e);
1980
+ try {
1981
+ return n();
1982
+ } finally {
1983
+ bi.delete(e);
1984
+ }
1985
+ }
1986
+ function Si(e, t) {
1987
+ return e === "domain" ? t.getDomainRef() : e === "linearize" ? t.getConfigurationRef() : e === "zoomLevel" ? t.getZoomLevelRef() : t.getMappingRef();
1988
+ }
1989
+ function Ci(e, t = {}, n = {}) {
1990
+ try {
1991
+ let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), o = 1, s = {
1992
+ ...n,
1993
+ globalvar: "globalObject",
1994
+ globalObject: t,
1995
+ getScaleHelper(e, n, s) {
1996
+ let c = e + ":" + n, l = i.get(c);
1997
+ if (l) return l;
1998
+ let u = r.get(c);
1999
+ u || (u = Si(e, s), r.set(c, u));
2000
+ let d = "__scale_helper_" + o++, f = {
2001
+ codeName: d,
2002
+ dependency: u
2003
+ };
2004
+ return i.set(c, f), e === "zoomLevel" && a.add(s), t[d] = yi(e, s), f;
2005
+ }
2006
+ }, c = ci({
2007
+ forbidden: [],
2008
+ allowed: ["datum", "undefined"],
2009
+ globalvar: "globalObject",
2010
+ fieldvar: "datum",
2011
+ functions: (e) => gi(e, s)
2012
+ })(ii(e)), l = Function("datum", "globalObject", `"use strict";
2013
+ try {
2014
+ return (${c.code});
2015
+ } catch (e) {
2016
+ throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
2017
+ }`).bind(mi), u = (e) => l(e, t);
2018
+ return u.fields = c.fields, u.globals = c.globals, u.code = c.code, u.scaleDependencies = Array.from(new Set(r.values())), u.zoomLevelResolutions = Array.from(a), u;
2019
+ } catch (t) {
2020
+ throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
2021
+ }
2022
+ }
2023
+ var wi = ci({
2024
+ forbidden: [],
2025
+ allowed: ["event"],
2026
+ globalvar: "globalObject"
2027
+ });
2028
+ function Ti(e) {
2029
+ try {
2030
+ let t = wi(ii(e));
2031
+ return Function("event", "globalObject", `"use strict";
2032
+ try {
2033
+ return !!(${t.code});
2034
+ } catch (e) {
2035
+ throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
2036
+ }`);
2037
+ } catch (t) {
2038
+ throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
2039
+ }
2040
+ }
2041
+ //#endregion
2042
+ //#region ../core/src/utils/interactionConfig.js
2043
+ function Ei(e) {
2044
+ if (typeof e == "string") {
2045
+ let t = e.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);
2046
+ if (!t) throw Error(`Invalid event type string: ${e}`);
2047
+ let [, n, r] = t, i = { type: n };
2048
+ return r && (i.filter = r), i;
2049
+ } else return e;
2050
+ }
2051
+ function Di(e) {
2052
+ return e?.filter ? Ti(e.filter) : () => !0;
2053
+ }
2054
+ function Oi(e, t, n) {
2055
+ if (!t.includes(e.type)) throw Error(n);
2056
+ return e;
2057
+ }
2058
+ //#endregion
2059
+ //#region ../core/src/selection/selection.js
2060
+ function ki(e) {
2061
+ return {
2062
+ type: "single",
2063
+ datum: e,
2064
+ uniqueId: e?.[S]
2065
+ };
2066
+ }
2067
+ function Ai(e) {
2068
+ return e ??= [], {
2069
+ type: "multi",
2070
+ data: new Map(e.map((e) => [e[S], e]))
2071
+ };
2072
+ }
2073
+ function ji(e, t) {
2074
+ if (!t || t.length === 0) return;
2075
+ let n = t.map((e) => St(e)), r = (e) => n.map((t) => t(e));
2076
+ if (U(e)) return e.datum ? [r(e.datum)] : [];
2077
+ if (W(e)) return [...e.data.values()].map(r);
2078
+ throw Error(`Expected a point selection, got: ${JSON.stringify(e)}`);
2079
+ }
2080
+ function Mi(e, t, n, r) {
2081
+ if (!t || t.length === 0) return;
2082
+ if (e === "single" && n.length > 1) throw Error("Single point selections expect at most one key tuple.");
2083
+ let i = [], a = [];
2084
+ for (let e of n) {
2085
+ let n = r(t, e);
2086
+ n ? i.push(n) : a.push(e);
2087
+ }
2088
+ return {
2089
+ selection: e === "single" ? ki(i[0] ?? null) : Ai(i),
2090
+ unresolved: a
2091
+ };
2092
+ }
2093
+ function Ni(e) {
2094
+ return {
2095
+ type: "interval",
2096
+ intervals: Object.fromEntries(e.map((e) => [e, null]))
2097
+ };
2098
+ }
2099
+ function Pi(e, { add: t, remove: n, toggle: r }) {
2100
+ let i = e.data;
2101
+ for (let e of t ?? []) i.set(e[S], e);
2102
+ for (let e of n ?? []) i.delete(e[S]);
2103
+ for (let e of r ?? []) {
2104
+ let t = e[S];
2105
+ i.has(t) ? i.delete(t) : i.set(t, e);
2106
+ }
2107
+ return {
2108
+ type: "multi",
2109
+ data: i
2110
+ };
2111
+ }
2112
+ function Fi(e, t) {
2113
+ let n = !!(e.empty ?? !0), r = $i(e.param), i = e.fields ?? {};
2114
+ if (U(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(S)}]`;
2115
+ if (W(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(S)}])`;
2116
+ if (H(t)) {
2117
+ let a = Object.keys(t.intervals), o = Object.keys(i).filter(en);
2118
+ if (o.length === 0) throw Error("Filtering using interval selections requires at least one primary positional channel in the config! " + JSON.stringify(e));
2119
+ if (o.some((e) => !a.includes(e))) throw Error(`Selection channels (${a.join(", ")}) do not match the fields: ${JSON.stringify(e)}!`);
2120
+ let s = (e) => `datum[${JSON.stringify(e)}]`;
2121
+ return a.map((e) => {
2122
+ let t = ln(e), a = i[e], o = i[t] ?? i[e], c = `${r}.intervals.${e}[0] <= ${s(o)}`, l = `${s(a)} <= ${r}.intervals.${e}[1]`;
2123
+ return `(${r}.intervals.${e} ? (${c} && ${l}) : ${n})`;
2124
+ }).join(" && ");
2125
+ } else throw Error(`Unrecognized selection type : ${JSON.stringify(t)}`);
2126
+ }
2127
+ function Ii(e) {
2128
+ if (!("param" in e) && !("test" in e)) return;
2129
+ let { param: t, empty: n = !0 } = "test" in e ? e.test : e;
2130
+ if (typeof t == "string") return {
2131
+ params: [$i(t)],
2132
+ empty: n,
2133
+ singleParam: !0
2134
+ };
2135
+ if (t.or.length === 0) throw Error("Selection test \"or\" must be a nonempty array.");
2136
+ return {
2137
+ params: Array.from(new Set(t.or.map($i))),
2138
+ empty: n,
2139
+ singleParam: !1
2140
+ };
2141
+ }
2142
+ function Li(e) {
2143
+ return e?.selection?.params ?? [];
2144
+ }
2145
+ function Ri(e) {
2146
+ let t = /* @__PURE__ */ new Map();
2147
+ for (let n of Object.values(e)) for (let { predicate: e } of n.branches) {
2148
+ let n = e.selection;
2149
+ if (n) for (let e of n.params) t.set(e, t.get(e) || !n.singleParam);
2150
+ }
2151
+ return t;
2152
+ }
2153
+ function zi(e, t) {
2154
+ if (U(t)) return `${e}.uniqueId == null`;
2155
+ if (W(t)) return `${e}.data.size == 0`;
2156
+ if (H(t)) {
2157
+ let n = Object.keys(t.intervals);
2158
+ return n.length == 0 ? "true" : `!(${n.map((t) => `${e}.intervals.${t}`).join(" || ")})`;
2159
+ }
2160
+ throw Error(`Unsupported selection type: ${t.type}`);
2161
+ }
2162
+ function Bi(e, t, n, r) {
2163
+ if (U(t)) return `${e}.uniqueId != null && ${e}.uniqueId === datum[${JSON.stringify(S)}]`;
2164
+ if (W(t)) return `${e}.data.size != 0 && mapHasKey(${e}.data, datum[${JSON.stringify(S)}])`;
2165
+ if (H(t)) {
2166
+ let i = Object.keys(t.intervals);
2167
+ if (i.length == 0) return "false";
2168
+ let a = (e) => `datum[${JSON.stringify(e)}]`, o = i.map((t) => {
2169
+ let i = ln(t), o = n[t], s = n[i] ?? n[t], c = `${e}.intervals.${t}`;
2170
+ return `(!${c} || ${r == "endpoints" ? `((${c}[0] <= ${a(o)} && ${a(o)} <= ${c}[1]) || (${c}[0] <= ${a(s)} && ${a(s)} <= ${c}[1]))` : r == "encloses" ? `(${c}[0] <= ${a(o)} && ${a(s)} <= ${c}[1])` : `(${c}[0] <= ${a(s)} && ${a(o)} <= ${c}[1])`})`;
2171
+ });
2172
+ return `!!(${i.map((t) => `${e}.intervals.${t}`).join(" || ")}) && (${o.join(" && ")})`;
2173
+ }
2174
+ throw Error(`Unsupported selection type: ${t.type}`);
2175
+ }
2176
+ function Vi(e, t, n = "intersects") {
2177
+ let r = `(${e.map(({ param: e, selection: t, fields: r }) => Bi(e, t, r, n)).join(" || ")})`;
2178
+ return t ? `((${e.map(({ param: e, selection: t }) => zi(e, t)).join(" && ")}) || ${r})` : r;
2179
+ }
2180
+ function H(e) {
2181
+ return e.type === "interval";
2182
+ }
2183
+ function U(e) {
2184
+ return e.type === "single";
2185
+ }
2186
+ function W(e) {
2187
+ return e.type === "multi";
2188
+ }
2189
+ function Hi(e) {
2190
+ let t = typeof e == "string" ? { type: e } : { ...e };
2191
+ return t.on = t.on ? Ei(t.on) : Ui(t) ? { type: "click" } : void 0, t.clear = t.clear === !1 ? void 0 : t.clear === !0 || t.clear == null ? { type: "dblclick" } : Ei(t.clear), Ui(t) && t.on.type === "click" && (t.toggle = !0), t;
2192
+ }
2193
+ function Ui(e) {
2194
+ return e && e.type == "point";
2195
+ }
2196
+ function Wi(e) {
2197
+ return e && e.type == "interval";
2198
+ }
2199
+ function Gi(e) {
2200
+ if (U(e)) return e.uniqueId != null;
2201
+ if (W(e)) return e.data.size > 0;
2202
+ if (H(e)) return Ki(e);
2203
+ throw Error(`Unsupported selection type: ${e.type}`);
2204
+ }
2205
+ function Ki(e) {
2206
+ return Object.values(e.intervals).some((e) => e && e.length === 2);
2207
+ }
2208
+ function qi(e, t) {
2209
+ return Object.entries(e.intervals).every(([e, n]) => (e == "x" || e == "y") && n && n[0] <= t[e] && n[1] >= t[e]);
2210
+ }
2211
+ //#endregion
2212
+ //#region ../core/src/ruler/rulerValue.js
2213
+ function Ji(e = ["x"], t = {}) {
2214
+ let n = {};
2215
+ for (let r of e) n[r] = t[r] ?? null;
2216
+ return {
2217
+ type: "ruler",
2218
+ values: n
2219
+ };
2220
+ }
2221
+ //#endregion
2222
+ //#region ../core/src/paramRuntime/paramUtils.js
2223
+ function G(e) {
2224
+ return typeof e == "object" && !!e && "expr" in e && st(e.expr);
2225
+ }
2226
+ function Yi(e) {
2227
+ if (G(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
2228
+ return e;
2229
+ }
2230
+ function Xi(e) {
2231
+ return ("expr" in e || "bind" in e) && !("select" in e) && !("ruler" in e);
2232
+ }
2233
+ function Zi(e) {
2234
+ return !("expr" in e || "bind" in e) && "select" in e;
2235
+ }
2236
+ function Qi(e) {
2237
+ return !("expr" in e || "bind" in e || "select" in e) && "ruler" in e;
2238
+ }
2239
+ function $i(e) {
2240
+ if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)) throw Error("Invalid parameter name: " + e + ". Must be a valid JavaScript identifier.");
2241
+ return e;
2242
+ }
2243
+ function ea(e, t, n) {
2244
+ if ("select" in e) {
2245
+ let t = Hi(e.select);
2246
+ if (Ui(t)) return t.toggle ? Ai() : ki(null);
2247
+ if (Wi(t)) {
2248
+ if (!t.encodings) throw Error("Interval selection \"" + e.name + "\" must have encodings defined!");
2249
+ return Ni(t.encodings);
2250
+ }
2251
+ throw Error("Unknown selection config for parameter \"" + e.name + "\".");
2252
+ }
2253
+ if ("ruler" in e) return Ji(e.ruler.encodings, e.value);
2254
+ if ("expr" in e) {
2255
+ let r = n ?? t?.createExpression(e.expr);
2256
+ if (!r) throw Error("Cannot evaluate expression for parameter \"" + e.name + "\".");
2257
+ return r(null);
2258
+ }
2259
+ return "value" in e ? e.value : null;
2260
+ }
2261
+ function ta(e, t, n, r, i = []) {
2262
+ let a = { ...t }, o = [];
2263
+ for (let [r, i] of Object.entries(t)) if (G(i)) {
2264
+ let t = e.createExpression(i.expr), s = o.push({
2265
+ key: r,
2266
+ fn: t
2267
+ }) - 1;
2268
+ Object.defineProperty(a, r, {
2269
+ enumerable: !0,
2270
+ get: n ? () => c.get()[s] : () => t(null)
2271
+ });
2272
+ } else a[r] = i;
2273
+ if (!n) return a;
2274
+ for (let { key: t, expr: n } of i) o.push({
2275
+ key: t,
2276
+ fn: e.createExpression(n.expr)
2277
+ });
2278
+ if (!o.length) return a;
2279
+ let s = Array.from(new Set(o.flatMap(({ fn: e }) => e.dependencies))), c = e.computed("expression properties", s, () => o.map(({ fn: e }) => e(null)), { equals: na }), l = c.get(), u = e.effect([c], () => {
2280
+ let e = c.get(), t = new Set(o.filter((t, n) => l[n] !== e[n]).map(({ key: e }) => e));
2281
+ l = e, n(t);
2282
+ });
2283
+ return r?.(c.dispose), r?.(u), a;
2284
+ }
2285
+ function na(e, t) {
2286
+ return e.every((e, n) => e === t[n]);
2287
+ }
2288
+ function ra(e, t, n, r) {
2289
+ if (!G(t)) return t;
2290
+ let i = () => {
2291
+ throw Error(n);
2292
+ }, a = e.watchExpression ? e.watchExpression(t.expr, i, {
2293
+ scopeOwned: !1,
2294
+ registerDisposer: r
2295
+ }) : e.createExpression(t.expr);
2296
+ if (!e.watchExpression) {
2297
+ let e = a.subscribe(i);
2298
+ r?.(e);
2299
+ }
2300
+ return a();
2301
+ }
2302
+ function ia(e) {
2303
+ return Object.assign(() => e, {
2304
+ dependencies: [],
2305
+ subscribe: () => () => void 0,
2306
+ invalidate: () => void 0,
2307
+ identifier: () => "constant",
2308
+ fields: [],
2309
+ globals: [],
2310
+ code: JSON.stringify(e)
2311
+ });
2312
+ }
2313
+ //#endregion
2314
+ //#region ../../node_modules/d3-color/src/define.js
2315
+ function aa(e, t, n) {
2316
+ e.prototype = t.prototype = n, n.constructor = e;
2317
+ }
2318
+ function oa(e, t) {
2319
+ var n = Object.create(e.prototype);
2320
+ for (var r in t) n[r] = t[r];
2321
+ return n;
2322
+ }
2323
+ //#endregion
2324
+ //#region ../../node_modules/d3-color/src/color.js
2325
+ function K() {}
2326
+ var q = .7, sa = 1 / q, J = "\\s*([+-]?\\d+)\\s*", ca = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Y = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", la = /^#([0-9a-f]{3,8})$/, ua = RegExp(`^rgb\\(${J},${J},${J}\\)$`), da = RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`), fa = RegExp(`^rgba\\(${J},${J},${J},${ca}\\)$`), pa = RegExp(`^rgba\\(${Y},${Y},${Y},${ca}\\)$`), ma = RegExp(`^hsl\\(${ca},${Y},${Y}\\)$`), ha = RegExp(`^hsla\\(${ca},${Y},${Y},${ca}\\)$`), ga = {
2327
+ aliceblue: 15792383,
2328
+ antiquewhite: 16444375,
2329
+ aqua: 65535,
2330
+ aquamarine: 8388564,
2331
+ azure: 15794175,
2332
+ beige: 16119260,
2333
+ bisque: 16770244,
2334
+ black: 0,
2335
+ blanchedalmond: 16772045,
2336
+ blue: 255,
2337
+ blueviolet: 9055202,
2338
+ brown: 10824234,
2339
+ burlywood: 14596231,
2340
+ cadetblue: 6266528,
2341
+ chartreuse: 8388352,
2342
+ chocolate: 13789470,
2343
+ coral: 16744272,
2344
+ cornflowerblue: 6591981,
2345
+ cornsilk: 16775388,
2346
+ crimson: 14423100,
2347
+ cyan: 65535,
2348
+ darkblue: 139,
2349
+ darkcyan: 35723,
2350
+ darkgoldenrod: 12092939,
2351
+ darkgray: 11119017,
2352
+ darkgreen: 25600,
2353
+ darkgrey: 11119017,
2354
+ darkkhaki: 12433259,
2355
+ darkmagenta: 9109643,
2356
+ darkolivegreen: 5597999,
2357
+ darkorange: 16747520,
2358
+ darkorchid: 10040012,
2359
+ darkred: 9109504,
2360
+ darksalmon: 15308410,
2361
+ darkseagreen: 9419919,
2362
+ darkslateblue: 4734347,
2363
+ darkslategray: 3100495,
2364
+ darkslategrey: 3100495,
2365
+ darkturquoise: 52945,
2366
+ darkviolet: 9699539,
2367
+ deeppink: 16716947,
2368
+ deepskyblue: 49151,
2369
+ dimgray: 6908265,
2370
+ dimgrey: 6908265,
2371
+ dodgerblue: 2003199,
2372
+ firebrick: 11674146,
2373
+ floralwhite: 16775920,
2374
+ forestgreen: 2263842,
2375
+ fuchsia: 16711935,
2376
+ gainsboro: 14474460,
2377
+ ghostwhite: 16316671,
2378
+ gold: 16766720,
2379
+ goldenrod: 14329120,
2380
+ gray: 8421504,
2381
+ green: 32768,
2382
+ greenyellow: 11403055,
2383
+ grey: 8421504,
2384
+ honeydew: 15794160,
2385
+ hotpink: 16738740,
2386
+ indianred: 13458524,
2387
+ indigo: 4915330,
2388
+ ivory: 16777200,
2389
+ khaki: 15787660,
2390
+ lavender: 15132410,
2391
+ lavenderblush: 16773365,
2392
+ lawngreen: 8190976,
2393
+ lemonchiffon: 16775885,
2394
+ lightblue: 11393254,
2395
+ lightcoral: 15761536,
2396
+ lightcyan: 14745599,
2397
+ lightgoldenrodyellow: 16448210,
2398
+ lightgray: 13882323,
2399
+ lightgreen: 9498256,
2400
+ lightgrey: 13882323,
2401
+ lightpink: 16758465,
2402
+ lightsalmon: 16752762,
2403
+ lightseagreen: 2142890,
2404
+ lightskyblue: 8900346,
2405
+ lightslategray: 7833753,
2406
+ lightslategrey: 7833753,
2407
+ lightsteelblue: 11584734,
2408
+ lightyellow: 16777184,
2409
+ lime: 65280,
2410
+ limegreen: 3329330,
2411
+ linen: 16445670,
2412
+ magenta: 16711935,
2413
+ maroon: 8388608,
2414
+ mediumaquamarine: 6737322,
2415
+ mediumblue: 205,
2416
+ mediumorchid: 12211667,
2417
+ mediumpurple: 9662683,
2418
+ mediumseagreen: 3978097,
2419
+ mediumslateblue: 8087790,
2420
+ mediumspringgreen: 64154,
2421
+ mediumturquoise: 4772300,
2422
+ mediumvioletred: 13047173,
2423
+ midnightblue: 1644912,
2424
+ mintcream: 16121850,
2425
+ mistyrose: 16770273,
2426
+ moccasin: 16770229,
2427
+ navajowhite: 16768685,
2428
+ navy: 128,
2429
+ oldlace: 16643558,
2430
+ olive: 8421376,
2431
+ olivedrab: 7048739,
2432
+ orange: 16753920,
2433
+ orangered: 16729344,
2434
+ orchid: 14315734,
2435
+ palegoldenrod: 15657130,
2436
+ palegreen: 10025880,
2437
+ paleturquoise: 11529966,
2438
+ palevioletred: 14381203,
2439
+ papayawhip: 16773077,
2440
+ peachpuff: 16767673,
2441
+ peru: 13468991,
2442
+ pink: 16761035,
2443
+ plum: 14524637,
2444
+ powderblue: 11591910,
2445
+ purple: 8388736,
2446
+ rebeccapurple: 6697881,
2447
+ red: 16711680,
2448
+ rosybrown: 12357519,
2449
+ royalblue: 4286945,
2450
+ saddlebrown: 9127187,
2451
+ salmon: 16416882,
2452
+ sandybrown: 16032864,
2453
+ seagreen: 3050327,
2454
+ seashell: 16774638,
2455
+ sienna: 10506797,
2456
+ silver: 12632256,
2457
+ skyblue: 8900331,
2458
+ slateblue: 6970061,
2459
+ slategray: 7372944,
2460
+ slategrey: 7372944,
2461
+ snow: 16775930,
2462
+ springgreen: 65407,
2463
+ steelblue: 4620980,
2464
+ tan: 13808780,
2465
+ teal: 32896,
2466
+ thistle: 14204888,
2467
+ tomato: 16737095,
2468
+ turquoise: 4251856,
2469
+ violet: 15631086,
2470
+ wheat: 16113331,
2471
+ white: 16777215,
2472
+ whitesmoke: 16119285,
2473
+ yellow: 16776960,
2474
+ yellowgreen: 10145074
2475
+ };
2476
+ aa(K, xa, {
2477
+ copy(e) {
2478
+ return Object.assign(new this.constructor(), this, e);
2479
+ },
2480
+ displayable() {
2481
+ return this.rgb().displayable();
2482
+ },
2483
+ hex: _a,
2484
+ formatHex: _a,
2485
+ formatHex8: va,
2486
+ formatHsl: ya,
2487
+ formatRgb: ba,
2488
+ toString: ba
2489
+ });
2490
+ function _a() {
2491
+ return this.rgb().formatHex();
2492
+ }
2493
+ function va() {
2494
+ return this.rgb().formatHex8();
2495
+ }
2496
+ function ya() {
2497
+ return ja(this).formatHsl();
2498
+ }
2499
+ function ba() {
2500
+ return this.rgb().formatRgb();
2501
+ }
2502
+ function xa(e) {
2503
+ var t, n;
2504
+ return e = (e + "").trim().toLowerCase(), (t = la.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Sa(t) : n === 3 ? new X(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Ca(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Ca(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = ua.exec(e)) ? new X(t[1], t[2], t[3], 1) : (t = da.exec(e)) ? new X(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = fa.exec(e)) ? Ca(t[1], t[2], t[3], t[4]) : (t = pa.exec(e)) ? Ca(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = ma.exec(e)) ? Aa(t[1], t[2] / 100, t[3] / 100, 1) : (t = ha.exec(e)) ? Aa(t[1], t[2] / 100, t[3] / 100, t[4]) : ga.hasOwnProperty(e) ? Sa(ga[e]) : e === "transparent" ? new X(NaN, NaN, NaN, 0) : null;
2505
+ }
2506
+ function Sa(e) {
2507
+ return new X(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
2508
+ }
2509
+ function Ca(e, t, n, r) {
2510
+ return r <= 0 && (e = t = n = NaN), new X(e, t, n, r);
2511
+ }
2512
+ function wa(e) {
2513
+ return e instanceof K || (e = xa(e)), e ? (e = e.rgb(), new X(e.r, e.g, e.b, e.opacity)) : new X();
2514
+ }
2515
+ function Ta(e, t, n, r) {
2516
+ return arguments.length === 1 ? wa(e) : new X(e, t, n, r ?? 1);
2517
+ }
2518
+ function X(e, t, n, r) {
2519
+ this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
2520
+ }
2521
+ aa(X, Ta, oa(K, {
2522
+ brighter(e) {
2523
+ return e = e == null ? sa : sa ** +e, new X(this.r * e, this.g * e, this.b * e, this.opacity);
2524
+ },
2525
+ darker(e) {
2526
+ return e = e == null ? q : q ** +e, new X(this.r * e, this.g * e, this.b * e, this.opacity);
2527
+ },
2528
+ rgb() {
2529
+ return this;
2530
+ },
2531
+ clamp() {
2532
+ return new X(Z(this.r), Z(this.g), Z(this.b), ka(this.opacity));
2533
+ },
2534
+ displayable() {
2535
+ return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
2536
+ },
2537
+ hex: Ea,
2538
+ formatHex: Ea,
2539
+ formatHex8: Da,
2540
+ formatRgb: Oa,
2541
+ toString: Oa
2542
+ }));
2543
+ function Ea() {
2544
+ return `#${Q(this.r)}${Q(this.g)}${Q(this.b)}`;
2545
+ }
2546
+ function Da() {
2547
+ return `#${Q(this.r)}${Q(this.g)}${Q(this.b)}${Q((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2548
+ }
2549
+ function Oa() {
2550
+ let e = ka(this.opacity);
2551
+ return `${e === 1 ? "rgb(" : "rgba("}${Z(this.r)}, ${Z(this.g)}, ${Z(this.b)}${e === 1 ? ")" : `, ${e})`}`;
2552
+ }
2553
+ function ka(e) {
2554
+ return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
2555
+ }
2556
+ function Z(e) {
2557
+ return Math.max(0, Math.min(255, Math.round(e) || 0));
2558
+ }
2559
+ function Q(e) {
2560
+ return e = Z(e), (e < 16 ? "0" : "") + e.toString(16);
2561
+ }
2562
+ function Aa(e, t, n, r) {
2563
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new $(e, t, n, r);
2564
+ }
2565
+ function ja(e) {
2566
+ if (e instanceof $) return new $(e.h, e.s, e.l, e.opacity);
2567
+ if (e instanceof K || (e = xa(e)), !e) return new $();
2568
+ if (e instanceof $) return e;
2569
+ e = e.rgb();
2570
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
2571
+ return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new $(o, s, c, e.opacity);
2572
+ }
2573
+ function Ma(e, t, n, r) {
2574
+ return arguments.length === 1 ? ja(e) : new $(e, t, n, r ?? 1);
2575
+ }
2576
+ function $(e, t, n, r) {
2577
+ this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
2578
+ }
2579
+ aa($, Ma, oa(K, {
2580
+ brighter(e) {
2581
+ return e = e == null ? sa : sa ** +e, new $(this.h, this.s, this.l * e, this.opacity);
2582
+ },
2583
+ darker(e) {
2584
+ return e = e == null ? q : q ** +e, new $(this.h, this.s, this.l * e, this.opacity);
2585
+ },
2586
+ rgb() {
2587
+ var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
2588
+ return new X(Fa(e >= 240 ? e - 240 : e + 120, i, r), Fa(e, i, r), Fa(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
2589
+ },
2590
+ clamp() {
2591
+ return new $(Na(this.h), Pa(this.s), Pa(this.l), ka(this.opacity));
2592
+ },
2593
+ displayable() {
2594
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
2595
+ },
2596
+ formatHsl() {
2597
+ let e = ka(this.opacity);
2598
+ return `${e === 1 ? "hsl(" : "hsla("}${Na(this.h)}, ${Pa(this.s) * 100}%, ${Pa(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
2599
+ }
2600
+ }));
2601
+ function Na(e) {
2602
+ return e = (e || 0) % 360, e < 0 ? e + 360 : e;
2603
+ }
2604
+ function Pa(e) {
2605
+ return Math.max(0, Math.min(1, e || 0));
2606
+ }
2607
+ function Fa(e, t, n) {
2608
+ return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
2609
+ }
2610
+ //#endregion
2611
+ //#region ../core/src/view/renderingContext/clipOptions.js
2612
+ function Ia(e) {
2613
+ if (e.clip) return e.clip;
2614
+ if (e.clipRect) return {
2615
+ rect: e.clipRect,
2616
+ clipX: !0,
2617
+ clipY: !0
2618
+ };
2619
+ }
2620
+ function La(e, t) {
2621
+ return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
2622
+ }
2623
+ function Ra(e, t, n) {
2624
+ return t || n ? {
2625
+ rect: e,
2626
+ clipX: t,
2627
+ clipY: n
2628
+ } : void 0;
2629
+ }
2630
+ function za(e, t) {
2631
+ return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
2632
+ }
2633
+ function Ba(e, t) {
2634
+ if (!e) return t;
2635
+ if (!t) return e;
2636
+ let n = e.clipX || t.clipX, r = e.clipY || t.clipY, i = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, a = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
2637
+ return Ra(e.rect.modify({
2638
+ x: () => i.x,
2639
+ y: () => a.y,
2640
+ width: () => i.width,
2641
+ height: () => a.height
2642
+ }), n, r);
2643
+ }
2644
+ function Va(e, t) {
2645
+ if (e === !0) return Ra(t, !0, !0);
2646
+ if (e === "x") return Ra(t, !0, !1);
2647
+ if (e === "y") return Ra(t, !1, !0);
2648
+ }
2649
+ function Ha(e) {
2650
+ let t = e.mark;
2651
+ if (t) {
2652
+ let e = t.properties.clip;
2653
+ return {
2654
+ clipX: e === !0 || e === "x",
2655
+ clipY: e === !0 || e === "y"
2656
+ };
2657
+ }
2658
+ let n = !1, r = !0, i = !0;
2659
+ return e.visit((e) => {
2660
+ let t = e.mark;
2661
+ if (t) {
2662
+ n = !0;
2663
+ let e = t.properties.clip;
2664
+ r &&= e === !0 || e === "x", i &&= e === !0 || e === "y";
2665
+ }
2666
+ }), {
2667
+ clipX: n && r,
2668
+ clipY: n && i
2669
+ };
2670
+ }
2671
+ function Ua(e, t, n) {
2672
+ if (t !== "never") return Ba(e, Va(t, n));
2673
+ }
2674
+ //#endregion
2675
+ export { di as $, Ue as $t, Ri as A, Tt as At, Ui as B, Se as Bt, Xi as C, u as Cn, en as Ct, Yi as D, i as Dn, an as Dt, $i as E, o as En, Xt as Et, Li as F, pt as Ft, Mi as G, it as Gt, U as H, $e as Ht, Ki as I, ht as It, Ei as J, Me as Jt, qi as K, Ze as Kt, H as L, _t as Lt, Ai as M, xt as Mt, ki as N, S as Nt, Ji as O, wt as Ot, ji as P, vt as Pt, Ci as Q, He as Qt, Wi as R, gt as Rt, Zi as S, d as Sn, tn as St, ra as T, s as Tn, Bt as Tt, Fi as U, De as Ut, Gi as V, Xe as Vt, Ii as W, je as Wt, Oi as X, ct as Xt, Di as Y, st as Yt, hi as Z, Ve as Zt, oa as _, ee as _n, fn as _t, Ha as a, Ke as an, Gt as at, G as b, p as bn, Wt as bt, K as c, ye as cn, Lt as ct, xa as d, ve as dn, ln as dt, Ne as en, ui as et, q as f, he as fn, Ht as ft, aa as g, g as gn, Vt as gt, wa as h, ne as hn, dn as ht, Ra as i, Ge as in, Ut as it, Ni as j, St as jt, Hi as k, kt, X as l, xe as ln, rn as lt, Ta as m, v as mn, Kt as mt, La as n, Oe as nn, Pt as nt, Ia as o, qe as on, hn as ot, Ma as p, ge as pn, pn as pt, Pi as q, at as qt, Ba as r, dt as rn, Mt as rt, Ua as s, Je as sn, It as st, za as t, lt as tn, li as tt, sa as u, be as un, un as ut, ta as v, h as vn, qt as vt, ia as w, l as wn, cn as wt, Qi as x, f as xn, nn as xt, ea as y, m as yn, C as yt, W as z, ut as zt };