@genome-spy/app 0.84.0 → 0.85.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.
- package/dist/{agentApi-DHXYZVvQ.js → agentApi-Cz0hCnVp.js} +5790 -5190
- package/dist/agentApi.es.js +3117 -2793
- package/dist/agentShared.es.js +8 -8
- package/dist/arrayUtils-LJpQOu-U.js +2175 -0
- package/dist/canvas2d-DoAXEiF9.js +309 -0
- package/dist/canvas2d-f5jl4A5D.js +310 -0
- package/dist/canvasSizeHelper-7h_8rOcx.js +56 -0
- package/dist/clipOptions-gqdb3fvW.js +43 -0
- package/dist/{clipOptions-Dqco1p8b.js → color-W5zffv-z.js} +1 -43
- package/dist/{debug-aHQsa6hU.js → debug-BvCZWumf.js} +2 -2
- package/dist/{debug-D6FqxKEj.js → debug-CgDtmspT.js} +2 -2
- package/dist/{esm-CGLz7idZ.js → esm-BA6yMcc-.js} +438 -434
- package/dist/{esm-D8vvQAP3.js → esm-CcDLRSvC.js} +33 -33
- package/dist/{esm-BeV56E_5.js → esm-CfYZhLHN.js} +33 -33
- package/dist/{esm-DQ3lJSQN.js → esm-JAiZmFIS.js} +1 -1
- package/dist/{framebufferReadback-CC0D6Haw.js → framebufferReadback-CCLOjStu.js} +26 -25
- package/dist/{framebufferReadback-Bje9lHb7.js → framebufferReadback-THWwFqs8.js} +14 -13
- package/dist/index.es.js +541 -538
- package/dist/index.js +560 -554
- package/dist/nativeText-DMO8gLt7.js +806 -0
- package/dist/nativeText-m5AUINMq.js +806 -0
- package/dist/paramUtils-BYI4rwyL.js +2195 -0
- package/dist/schema.json +1488 -88
- package/dist/style.css +1 -1
- package/dist/svg-CCu8kYy2.js +1158 -0
- package/dist/svg-yFj875aX.js +1158 -0
- package/dist/{svgNumber-C6aRPc8Z.js → svgNumber-DNxESJQB.js} +1 -1
- package/dist/{twgl-full.module-BNEMlXRV.js → twgl-full.module-DB2UdP1k.js} +1 -1
- package/dist/{viewIdentityRegistry-AEQpJTDm.js → viewIdentityRegistry-BUdkK9zT.js} +1 -1
- package/dist/{viewIdentityRegistry-Dl7rR4Ay.js → viewIdentityRegistry-D3oPbN4O.js} +1 -1
- package/dist/viewSelectors-DGCspRN3.js +4198 -0
- package/dist/viewSelectors-U5oLCLHV.js +4195 -0
- package/dist/{viewUtils-DMNiWslc.js → viewUtils-Dg4RA40Q.js} +2384 -2109
- package/dist/warning-CpIIpk8e.js +7 -0
- package/dist/warning-DRGdb6BF.js +59 -0
- package/dist/{raster-BofBWXbe.js → webgl-Ci6ZhCCf.js} +4 -4
- package/dist/{raster-9uKYMjHZ.js → webgl-Dpz8a3TI.js} +3 -3
- package/package.json +5 -5
- package/dist/svg-CvsT1Y2V.js +0 -1793
- package/dist/svg-DRgWfcsL.js +0 -1793
- package/dist/viewSelectors-BhW4mTR1.js +0 -6386
- package/dist/viewSelectors-Bwzj10Qz.js +0 -6363
|
@@ -0,0 +1,2195 @@
|
|
|
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 g(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 _(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 ee(e) {
|
|
100
|
+
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
|
|
101
|
+
}
|
|
102
|
+
function v(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 te(e) {
|
|
110
|
+
return e = v(Math.abs(e)), e ? e[1] : NaN;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region ../../node_modules/d3-format/src/formatGroup.js
|
|
114
|
+
function ne(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 re(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 ie = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
132
|
+
function y(e) {
|
|
133
|
+
if (!(t = ie.exec(e))) throw Error("invalid format: " + e);
|
|
134
|
+
var t;
|
|
135
|
+
return new b({
|
|
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
|
+
y.prototype = b.prototype;
|
|
149
|
+
function b(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
|
+
b.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 ae(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 oe;
|
|
175
|
+
function x(e, t) {
|
|
176
|
+
var n = v(e, t);
|
|
177
|
+
if (!n) return oe = void 0, e.toPrecision(t);
|
|
178
|
+
var r = n[0], i = n[1], a = i - (oe = 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") + v(e, Math.max(0, t + a - 1))[0];
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region ../../node_modules/d3-format/src/formatRounded.js
|
|
183
|
+
function se(e, t) {
|
|
184
|
+
var n = v(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 ce = {
|
|
192
|
+
"%": (e, t) => (e * 100).toFixed(t),
|
|
193
|
+
b: (e) => Math.round(e).toString(2),
|
|
194
|
+
c: (e) => e + "",
|
|
195
|
+
d: ee,
|
|
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) => se(e * 100, t),
|
|
201
|
+
r: se,
|
|
202
|
+
s: x,
|
|
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 le(e) {
|
|
209
|
+
return e;
|
|
210
|
+
}
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region ../../node_modules/d3-format/src/locale.js
|
|
213
|
+
var ue = Array.prototype.map, de = [
|
|
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 fe(e) {
|
|
233
|
+
var t = e.grouping === void 0 || e.thousands === void 0 ? le : ne(ue.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 ? le : re(ue.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 = y(e);
|
|
236
|
+
var u = e.fill, d = e.align, f = e.sign, p = e.symbol, m = e.zero, h = e.width, g = e.comma, _ = e.precision, ee = e.trim, v = e.type;
|
|
237
|
+
v === "n" ? (g = !0, v = "g") : ce[v] || (_ === void 0 && (_ = 12), ee = !0, v = "g"), (m || u === "0" && d === "=") && (m = !0, u = "0", d = "=");
|
|
238
|
+
var te = (l && l.prefix !== void 0 ? l.prefix : "") + (p === "$" ? n : p === "#" && /[boxX]/.test(v) ? "0" + v.toLowerCase() : ""), ne = (p === "$" ? r : /[%p]/.test(v) ? o : "") + (l && l.suffix !== void 0 ? l.suffix : ""), re = ce[v], ie = /[defgprs%]/.test(v);
|
|
239
|
+
_ = _ === void 0 ? 6 : /[gprs]/.test(v) ? Math.max(1, Math.min(21, _)) : Math.max(0, Math.min(20, _));
|
|
240
|
+
function b(e) {
|
|
241
|
+
var n = te, r = ne, o, l, p;
|
|
242
|
+
if (v === "c") r = re(e) + r, e = "";
|
|
243
|
+
else {
|
|
244
|
+
e = +e;
|
|
245
|
+
var y = e < 0 || 1 / e < 0;
|
|
246
|
+
if (e = isNaN(e) ? c : re(Math.abs(e), _), ee && (e = ae(e)), y && +e == 0 && f !== "+" && (y = !1), n = (y ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (v === "s" && !isNaN(e) && oe !== void 0 ? de[8 + oe / 3] : "") + r + (y && f === "(" ? ")" : ""), ie) {
|
|
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
|
+
g && !m && (e = t(e, Infinity));
|
|
254
|
+
var b = n.length + e.length + r.length, x = b < h ? Array(h - b + 1).join(u) : "";
|
|
255
|
+
switch (g && m && (e = t(x + e, x.length ? h - r.length : Infinity), x = ""), d) {
|
|
256
|
+
case "<":
|
|
257
|
+
e = n + e + r + x;
|
|
258
|
+
break;
|
|
259
|
+
case "=":
|
|
260
|
+
e = n + x + e + r;
|
|
261
|
+
break;
|
|
262
|
+
case "^":
|
|
263
|
+
e = x.slice(0, b = x.length >> 1) + n + e + r + x.slice(b);
|
|
264
|
+
break;
|
|
265
|
+
default:
|
|
266
|
+
e = x + n + e + r;
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
return a(e);
|
|
270
|
+
}
|
|
271
|
+
return b.toString = function() {
|
|
272
|
+
return e + "";
|
|
273
|
+
}, b;
|
|
274
|
+
}
|
|
275
|
+
function u(e, t) {
|
|
276
|
+
var n = Math.max(-8, Math.min(8, Math.floor(te(t) / 3))) * 3, r = 10 ** -n, i = l((e = y(e), e.type = "f", e), { suffix: de[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 pe, me, he;
|
|
289
|
+
ge({
|
|
290
|
+
thousands: ",",
|
|
291
|
+
grouping: [3],
|
|
292
|
+
currency: ["$", ""]
|
|
293
|
+
});
|
|
294
|
+
function ge(e) {
|
|
295
|
+
return pe = fe(e), me = pe.format, he = pe.formatPrefix, pe;
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region ../core/src/utils/arrayUtils.js
|
|
299
|
+
function _e(e, t) {
|
|
300
|
+
return e.length == t.length && e.every((n, r) => e[r] === t[r]);
|
|
301
|
+
}
|
|
302
|
+
function ve(e) {
|
|
303
|
+
return Array.isArray(e) ? e : e === void 0 ? [] : [e];
|
|
304
|
+
}
|
|
305
|
+
function ye(e) {
|
|
306
|
+
return e[e.length - 1];
|
|
307
|
+
}
|
|
308
|
+
function be(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 S(e, t, n) {
|
|
317
|
+
return e.fields = t || [], e.fname = n, e;
|
|
318
|
+
}
|
|
319
|
+
function xe(e) {
|
|
320
|
+
return e == null ? null : e.fname;
|
|
321
|
+
}
|
|
322
|
+
function Se(e) {
|
|
323
|
+
return e == null ? null : e.fields;
|
|
324
|
+
}
|
|
325
|
+
function Ce(e) {
|
|
326
|
+
return e.length === 1 ? we(e[0]) : Te(e);
|
|
327
|
+
}
|
|
328
|
+
var we = (e) => function(t) {
|
|
329
|
+
return t[e];
|
|
330
|
+
}, Te = (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 Ee(e) {
|
|
338
|
+
throw Error(e);
|
|
339
|
+
}
|
|
340
|
+
function De(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 || Ee("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
350
|
+
return i && Ee("Access path missing closing bracket: " + e), r && Ee("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
351
|
+
}
|
|
352
|
+
function Oe(e, t, n) {
|
|
353
|
+
let r = De(e);
|
|
354
|
+
return e = r.length === 1 ? r[0] : e, S((n && n.get || Ce)(r), [e], t || e);
|
|
355
|
+
}
|
|
356
|
+
Oe("id");
|
|
357
|
+
var ke = S((e) => e, [], "identity");
|
|
358
|
+
S(() => 0, [], "zero"), S(() => 1, [], "one"), S(() => !0, [], "true"), S(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
359
|
+
var Ae = Array.isArray;
|
|
360
|
+
function je(e) {
|
|
361
|
+
return e === Object(e);
|
|
362
|
+
}
|
|
363
|
+
function C(e) {
|
|
364
|
+
return e[e.length - 1];
|
|
365
|
+
}
|
|
366
|
+
function Me(e) {
|
|
367
|
+
return e == null || e === "" ? null : +e;
|
|
368
|
+
}
|
|
369
|
+
var Ne = (e) => (t) => e * Math.exp(t), Pe = (e) => (t) => Math.log(e * t), Fe = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), Ie = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, Le = (e) => (t) => t < 0 ? -((-t) ** +e) : t ** +e;
|
|
370
|
+
function Re(e, t, n, r) {
|
|
371
|
+
let i = n(e[0]), a = n(C(e)), o = (a - i) * t;
|
|
372
|
+
return [r(i - o), r(a - o)];
|
|
373
|
+
}
|
|
374
|
+
function ze(e, t) {
|
|
375
|
+
return Re(e, t, Me, ke);
|
|
376
|
+
}
|
|
377
|
+
function Be(e, t) {
|
|
378
|
+
var n = Math.sign(e[0]);
|
|
379
|
+
return Re(e, t, Pe(n), Ne(n));
|
|
380
|
+
}
|
|
381
|
+
function Ve(e, t, n) {
|
|
382
|
+
return Re(e, t, Le(n), Le(1 / n));
|
|
383
|
+
}
|
|
384
|
+
function He(e, t, n, r, i) {
|
|
385
|
+
let a = r(e[0]), o = r(C(e)), s = t == null ? (a + o) / 2 : r(t);
|
|
386
|
+
return [i(s + (a - s) * n), i(s + (o - s) * n)];
|
|
387
|
+
}
|
|
388
|
+
function Ue(e, t, n) {
|
|
389
|
+
return He(e, t, n, Me, ke);
|
|
390
|
+
}
|
|
391
|
+
function We(e, t, n) {
|
|
392
|
+
let r = Math.sign(e[0]);
|
|
393
|
+
return He(e, t, n, Pe(r), Ne(r));
|
|
394
|
+
}
|
|
395
|
+
function Ge(e, t, n, r) {
|
|
396
|
+
return He(e, t, n, Le(r), Le(1 / r));
|
|
397
|
+
}
|
|
398
|
+
function Ke(e, t, n, r) {
|
|
399
|
+
return He(e, t, n, Fe(r), Ie(r));
|
|
400
|
+
}
|
|
401
|
+
function qe(e) {
|
|
402
|
+
return e == null ? [] : Ae(e) ? e : [e];
|
|
403
|
+
}
|
|
404
|
+
function Je(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 Ye(e) {
|
|
409
|
+
return typeof e == "function";
|
|
410
|
+
}
|
|
411
|
+
var Xe = "descending";
|
|
412
|
+
function Ze(e, t, n) {
|
|
413
|
+
n ||= {}, t = qe(t) || [];
|
|
414
|
+
let r = [], i = [], a = {}, o = n.comparator || $e;
|
|
415
|
+
return qe(e).forEach((e, o) => {
|
|
416
|
+
e != null && (r.push(t[o] === Xe ? -1 : 1), i.push(e = Ye(e) ? e : Oe(e, null, n)), (Se(e) || []).forEach((e) => a[e] = 1));
|
|
417
|
+
}), i.length === 0 ? null : S(o(i, r), Object.keys(a));
|
|
418
|
+
}
|
|
419
|
+
var Qe = (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), $e = (e, t) => e.length === 1 ? et(e[0], t[0]) : tt(e, t, e.length), et = (e, t) => function(n, r) {
|
|
420
|
+
return Qe(e(n), e(r)) * t;
|
|
421
|
+
}, tt = (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 = Qe(a(r), a(i));
|
|
424
|
+
return o * t[s];
|
|
425
|
+
});
|
|
426
|
+
function nt(e) {
|
|
427
|
+
return typeof e == "boolean";
|
|
428
|
+
}
|
|
429
|
+
function rt(e) {
|
|
430
|
+
return typeof e == "number";
|
|
431
|
+
}
|
|
432
|
+
function it(e) {
|
|
433
|
+
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
434
|
+
}
|
|
435
|
+
function w(e) {
|
|
436
|
+
return typeof e == "string";
|
|
437
|
+
}
|
|
438
|
+
function at(e, t) {
|
|
439
|
+
let n = e[0], r = C(e), i = +t;
|
|
440
|
+
return i ? i === 1 ? r : n + i * (r - n) : n;
|
|
441
|
+
}
|
|
442
|
+
function ot(e) {
|
|
443
|
+
return e && C(e) - e[0] || 0;
|
|
444
|
+
}
|
|
445
|
+
function st(e) {
|
|
446
|
+
return Ae(e) ? `[${e.map((e) => e === null ? "null" : st(e))}]` : je(e) || w(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
|
|
447
|
+
}
|
|
448
|
+
function ct(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/flowNode.js
|
|
455
|
+
var lt = class {
|
|
456
|
+
stats = {
|
|
457
|
+
count: 0,
|
|
458
|
+
first: null
|
|
459
|
+
};
|
|
460
|
+
#e = !1;
|
|
461
|
+
#t = !1;
|
|
462
|
+
#n = [];
|
|
463
|
+
paramRuntimeProvider = null;
|
|
464
|
+
get behavior() {
|
|
465
|
+
return 0;
|
|
466
|
+
}
|
|
467
|
+
get domainSensitiveScaleChannels() {
|
|
468
|
+
return [];
|
|
469
|
+
}
|
|
470
|
+
get label() {
|
|
471
|
+
return `(${this.constructor.name})`;
|
|
472
|
+
}
|
|
473
|
+
constructor(e) {
|
|
474
|
+
this.paramRuntimeProvider = e, this.children = [], this.parent = void 0, this.completed = !1;
|
|
475
|
+
}
|
|
476
|
+
get disposed() {
|
|
477
|
+
return this.#t;
|
|
478
|
+
}
|
|
479
|
+
getDebugState() {
|
|
480
|
+
let e = this;
|
|
481
|
+
return {
|
|
482
|
+
label: this.label,
|
|
483
|
+
children: this.children.slice(),
|
|
484
|
+
parent: this.parent,
|
|
485
|
+
stats: {
|
|
486
|
+
count: this.stats.count,
|
|
487
|
+
first: this.stats.first
|
|
488
|
+
},
|
|
489
|
+
completed: this.completed,
|
|
490
|
+
initialized: this.#e,
|
|
491
|
+
disposed: this.#t,
|
|
492
|
+
params: "params" in e ? structuredClone(e.params) : void 0,
|
|
493
|
+
view: ut(e, this.paramRuntimeProvider),
|
|
494
|
+
domainSensitiveScaleChannels: this.domainSensitiveScaleChannels
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
reset() {
|
|
498
|
+
this.completed = !1;
|
|
499
|
+
for (let e of this.children) e.reset();
|
|
500
|
+
this.stats.count = 0, this.stats.first = null;
|
|
501
|
+
}
|
|
502
|
+
initialize() {}
|
|
503
|
+
initializeOnce() {
|
|
504
|
+
this.#e ||= (this.initialize(), !0);
|
|
505
|
+
}
|
|
506
|
+
#r() {
|
|
507
|
+
this._propagate = Function("children", "stats", _(this.children.length).map((e) => `const child${e} = children[${e}];`).join("\n") + `return function propagate(datum) {
|
|
508
|
+
if (stats.count === 0) {
|
|
509
|
+
stats.first = structuredClone(datum);
|
|
510
|
+
}
|
|
511
|
+
stats.count++;
|
|
512
|
+
${_(this.children.length).map((e) => `child${e}.handle(datum);`).join("\n")}
|
|
513
|
+
};`)(this.children, this.stats);
|
|
514
|
+
}
|
|
515
|
+
setParent(e) {
|
|
516
|
+
this.parent = e;
|
|
517
|
+
}
|
|
518
|
+
addChild(e) {
|
|
519
|
+
if (e.parent) throw Error("Cannot add the child! It already has a parent.");
|
|
520
|
+
return this.children.push(e), e.setParent(this), this.#r(), this;
|
|
521
|
+
}
|
|
522
|
+
adopt(e) {
|
|
523
|
+
e.parent && e.parent.removeChild(e), this.addChild(e);
|
|
524
|
+
}
|
|
525
|
+
adoptChildrenOf(e) {
|
|
526
|
+
for (let t of e.children.slice()) this.adopt(t);
|
|
527
|
+
}
|
|
528
|
+
insertAsParent(e) {
|
|
529
|
+
if (this.isRoot()) throw Error("Cannot insert a new parent for a root node!");
|
|
530
|
+
e.parent = this.parent, this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#r(), this.parent = void 0, e.addChild(this);
|
|
531
|
+
}
|
|
532
|
+
removeChild(e) {
|
|
533
|
+
let t = this.children.indexOf(e);
|
|
534
|
+
if (t > -1) this.children.splice(t, 1), e.parent = void 0, this.#r();
|
|
535
|
+
else throw Error("Trying to remove an unknown child node!");
|
|
536
|
+
}
|
|
537
|
+
excise() {
|
|
538
|
+
if (this.isRoot()) throw Error("Cannot excise root node!");
|
|
539
|
+
if (this.isTerminal()) this.parent.removeChild(this);
|
|
540
|
+
else if (this.children.length == 1) {
|
|
541
|
+
let e = this.children[0];
|
|
542
|
+
e.setParent(this.parent), this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#r(), this.setParent(void 0), this.children.length = 0;
|
|
543
|
+
} else throw Error("Cannot excise a node that has multiple children!");
|
|
544
|
+
}
|
|
545
|
+
isRoot() {
|
|
546
|
+
return !this.parent;
|
|
547
|
+
}
|
|
548
|
+
isBranching() {
|
|
549
|
+
return this.children.length > 1;
|
|
550
|
+
}
|
|
551
|
+
isTerminal() {
|
|
552
|
+
return this.children.length == 0;
|
|
553
|
+
}
|
|
554
|
+
visit(e) {
|
|
555
|
+
e(this);
|
|
556
|
+
for (let t of this.children) t.visit(e);
|
|
557
|
+
e.afterChildren && e.afterChildren(this);
|
|
558
|
+
}
|
|
559
|
+
subtreeToString(e = 0) {
|
|
560
|
+
let t = this.children.map((t) => t.subtreeToString(e + 1)).join("");
|
|
561
|
+
return `${" ".repeat(e * 2)}* ${this.label}${"identifier" in this && this.identifier ? ": " + this.identifier : ""} \n${t}`;
|
|
562
|
+
}
|
|
563
|
+
handle(e) {
|
|
564
|
+
this._propagate(e);
|
|
565
|
+
}
|
|
566
|
+
complete() {
|
|
567
|
+
this.completed = !0;
|
|
568
|
+
for (let e of this.children) e.complete();
|
|
569
|
+
}
|
|
570
|
+
registerDisposer(e) {
|
|
571
|
+
this.#t ? e() : this.#n.push(e);
|
|
572
|
+
}
|
|
573
|
+
dispose() {
|
|
574
|
+
if (!this.#t) {
|
|
575
|
+
this.#t = !0;
|
|
576
|
+
for (let e of this.#n) e();
|
|
577
|
+
this.#n.length = 0;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
disposeSubtree() {
|
|
581
|
+
let e = () => void 0;
|
|
582
|
+
e.afterChildren = (e) => {
|
|
583
|
+
e.dispose();
|
|
584
|
+
}, this.visit(e);
|
|
585
|
+
}
|
|
586
|
+
beginBatch(e) {
|
|
587
|
+
for (let t of this.children) t.beginBatch(e);
|
|
588
|
+
}
|
|
589
|
+
get paramRuntime() {
|
|
590
|
+
if (this.paramRuntimeProvider && this.paramRuntimeProvider.paramRuntime) return this.paramRuntimeProvider.paramRuntime;
|
|
591
|
+
if (!this.parent) throw Error("Cannot find paramRuntime!");
|
|
592
|
+
return this.parent.paramRuntime;
|
|
593
|
+
}
|
|
594
|
+
repropagate() {
|
|
595
|
+
if (this.parent) this.parent.repropagate();
|
|
596
|
+
else throw Error("Cannot repropagate data, no FlowNode with stored data found!");
|
|
597
|
+
}
|
|
598
|
+
_propagate(e) {}
|
|
599
|
+
};
|
|
600
|
+
function ut(e, t) {
|
|
601
|
+
if ("view" in e) return e.view;
|
|
602
|
+
if (t && "getPathString" in t) return t;
|
|
603
|
+
}
|
|
604
|
+
function dt(e) {
|
|
605
|
+
let t = /* @__PURE__ */ new Set();
|
|
606
|
+
for (; e;) {
|
|
607
|
+
for (let n of e.domainSensitiveScaleChannels) t.add(n);
|
|
608
|
+
e = e.parent;
|
|
609
|
+
}
|
|
610
|
+
return t;
|
|
611
|
+
}
|
|
612
|
+
function ft(e) {
|
|
613
|
+
return e.type == "file";
|
|
614
|
+
}
|
|
615
|
+
function pt(e) {
|
|
616
|
+
return e.type == "facet";
|
|
617
|
+
}
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region ../core/src/data/transforms/transform.js
|
|
620
|
+
var mt = class extends lt {
|
|
621
|
+
#e;
|
|
622
|
+
constructor(e, t) {
|
|
623
|
+
super(t), this.#e = e.type;
|
|
624
|
+
}
|
|
625
|
+
get label() {
|
|
626
|
+
return this.#e;
|
|
627
|
+
}
|
|
628
|
+
watchExprRef(e, t) {
|
|
629
|
+
if ($(e)) {
|
|
630
|
+
let n = e;
|
|
631
|
+
return this.paramRuntime.watchExpression(n.expr, t, {
|
|
632
|
+
scopeOwned: !1,
|
|
633
|
+
registerDisposer: (e) => this.registerDisposer(e)
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
return (() => e);
|
|
637
|
+
}
|
|
638
|
+
}, T = "__uniqueId", ht = 1e4, gt = [null], _t = class extends mt {
|
|
639
|
+
get behavior() {
|
|
640
|
+
return 2;
|
|
641
|
+
}
|
|
642
|
+
constructor(e) {
|
|
643
|
+
super(e), this.params = e, this._blocks = [], this._usedBlocks = 0, this._id = -1;
|
|
644
|
+
}
|
|
645
|
+
initialize() {}
|
|
646
|
+
reset() {
|
|
647
|
+
super.reset(), this._usedBlocks = 0, this._id = -1;
|
|
648
|
+
}
|
|
649
|
+
handle(e) {
|
|
650
|
+
e[T] = this.#e(), this._propagate(e);
|
|
651
|
+
}
|
|
652
|
+
#e() {
|
|
653
|
+
return ++this._id % 1e4 == 0 && (this._id = this.#t() * ht), this._id;
|
|
654
|
+
}
|
|
655
|
+
#t() {
|
|
656
|
+
return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
|
|
657
|
+
}
|
|
658
|
+
#n() {
|
|
659
|
+
let e = gt.length;
|
|
660
|
+
return gt[e] = this, this._blocks.push(e), this._usedBlocks++, e;
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region ../core/src/utils/field.js
|
|
665
|
+
function vt(e, t = e) {
|
|
666
|
+
return /^[A-Za-z0-9_]+$/.test(e) ? S(Function("validator", `
|
|
667
|
+
let validated = !validator;
|
|
668
|
+
return function accessField(datum) {
|
|
669
|
+
if (!validated) {
|
|
670
|
+
validator(datum);
|
|
671
|
+
validated = true;
|
|
672
|
+
}
|
|
673
|
+
return datum[${JSON.stringify(e)}];
|
|
674
|
+
}`)(function(t) {
|
|
675
|
+
e in t || yt(t, e);
|
|
676
|
+
}), [e], t) : Oe(e);
|
|
677
|
+
}
|
|
678
|
+
function yt(e, t) {
|
|
679
|
+
throw Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`);
|
|
680
|
+
}
|
|
681
|
+
//#endregion
|
|
682
|
+
//#region ../core/src/encoder/accessor.js
|
|
683
|
+
function bt(e, t, n) {
|
|
684
|
+
if (!e) throw Error("Cannot create an accessor without a channel.");
|
|
685
|
+
function r(n) {
|
|
686
|
+
let r = n;
|
|
687
|
+
return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = Ct(t), r.scaleChannel = ((Lt(t) && t.resolutionChannel) ?? (cn(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = wt({
|
|
688
|
+
scaleChannel: r.scaleChannel,
|
|
689
|
+
source: St(t)
|
|
690
|
+
}).domainKeyBase), r.equals = (e) => e ? r === e || r.sourceKey !== void 0 && r.sourceKey === e.sourceKey : !1, r.asNumberAccessor = () => r, r;
|
|
691
|
+
}
|
|
692
|
+
function i(e) {
|
|
693
|
+
if ($(e)) {
|
|
694
|
+
let t = r(n.createExpression(e.expr));
|
|
695
|
+
if (t.fields.length > 0) throw Error("Expression in DatumDef/ValueDef cannot access data fields: " + e.expr);
|
|
696
|
+
return t;
|
|
697
|
+
} else {
|
|
698
|
+
let t = e;
|
|
699
|
+
return r(() => t);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
if (E(t)) try {
|
|
703
|
+
return r(vt(t.field));
|
|
704
|
+
} catch (e) {
|
|
705
|
+
throw Error(`Invalid field definition: ${e.message}`, { cause: e });
|
|
706
|
+
}
|
|
707
|
+
else if (Ht(t)) return r(n.createExpression(t.expr));
|
|
708
|
+
else if (D(t)) return i(t.datum);
|
|
709
|
+
else if (It(t)) return i(t.value);
|
|
710
|
+
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".`);
|
|
711
|
+
}
|
|
712
|
+
function xt(e) {
|
|
713
|
+
return e.scaleChannel !== void 0;
|
|
714
|
+
}
|
|
715
|
+
function St(e) {
|
|
716
|
+
if (E(e)) return {
|
|
717
|
+
kind: "field",
|
|
718
|
+
value: e.field
|
|
719
|
+
};
|
|
720
|
+
if (Ht(e)) return {
|
|
721
|
+
kind: "expr",
|
|
722
|
+
value: e.expr
|
|
723
|
+
};
|
|
724
|
+
if (D(e)) return {
|
|
725
|
+
kind: "datum",
|
|
726
|
+
value: e.datum
|
|
727
|
+
};
|
|
728
|
+
if (It(e)) return {
|
|
729
|
+
kind: "value",
|
|
730
|
+
value: e.value
|
|
731
|
+
};
|
|
732
|
+
throw Error("Cannot derive a domain key from channel definition: " + JSON.stringify(e));
|
|
733
|
+
}
|
|
734
|
+
function Ct(e) {
|
|
735
|
+
let t = St(e);
|
|
736
|
+
return t.kind === "datum" || t.kind === "value" ? "constant|" + Dt(t.value) : t.kind + "|" + Et(t);
|
|
737
|
+
}
|
|
738
|
+
function wt({ scaleChannel: e, source: t, type: n }) {
|
|
739
|
+
if (!e) throw Error("Cannot build a domain key without a scale channel.");
|
|
740
|
+
let r = e + "|" + t.kind + "|" + Et(t);
|
|
741
|
+
return {
|
|
742
|
+
domainKeyBase: r,
|
|
743
|
+
domainKey: n ? n + "|" + r : void 0
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
function Tt(e, t) {
|
|
747
|
+
let { domainKey: n, domainKeyBase: r } = wt({
|
|
748
|
+
scaleChannel: e.scaleChannel,
|
|
749
|
+
source: St(e.channelDef),
|
|
750
|
+
type: t
|
|
751
|
+
});
|
|
752
|
+
if (!n) throw Error("Cannot finalize a domain key without a resolved type.");
|
|
753
|
+
return e.domainKeyBase = r, e.domainKey = n, n;
|
|
754
|
+
}
|
|
755
|
+
function Et(e) {
|
|
756
|
+
switch (e.kind) {
|
|
757
|
+
case "field":
|
|
758
|
+
case "expr": return e.value;
|
|
759
|
+
case "datum":
|
|
760
|
+
case "value": return Dt(e.value);
|
|
761
|
+
default: throw Error("Unknown domain key source.");
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function Dt(e) {
|
|
765
|
+
return $(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
|
|
766
|
+
}
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region ../core/src/encoder/encoder.js
|
|
769
|
+
function Ot(e, t, n, r) {
|
|
770
|
+
let i, a = Vi(!1), o = () => {
|
|
771
|
+
if (i) return i;
|
|
772
|
+
let o = n.findValue(e);
|
|
773
|
+
if (!o) return a;
|
|
774
|
+
let s = {};
|
|
775
|
+
if (wi(o)) {
|
|
776
|
+
let n = Object.keys(o.intervals);
|
|
777
|
+
for (let r of n) {
|
|
778
|
+
let n = t[r];
|
|
779
|
+
if (E(n)) {
|
|
780
|
+
s[r] = n.field;
|
|
781
|
+
continue;
|
|
782
|
+
} else if (n && "condition" in n) {
|
|
783
|
+
let e = n.condition;
|
|
784
|
+
if (E(e)) {
|
|
785
|
+
s[r] = e.field;
|
|
786
|
+
continue;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
throw Error(`Selection "${e}" has an interval for "${r}" channel, but could not find a fieldDef: ${JSON.stringify(t[r])}`);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
let c = Ci({
|
|
793
|
+
type: "filter",
|
|
794
|
+
param: e,
|
|
795
|
+
fields: s,
|
|
796
|
+
empty: r
|
|
797
|
+
}, o);
|
|
798
|
+
return i = n.createExpression(c), i;
|
|
799
|
+
};
|
|
800
|
+
return Object.assign((e) => o()(e), {
|
|
801
|
+
param: e,
|
|
802
|
+
empty: r ?? !0
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
function kt(e, t, n, r) {
|
|
806
|
+
let i = Ut(t) || Wt(t) ? Array.isArray(t.condition) ? t.condition : [t.condition] : [], a = [...i, t], o = a.map((t, o) => {
|
|
807
|
+
let s = i[o];
|
|
808
|
+
return {
|
|
809
|
+
accessor: bt(e, t, r),
|
|
810
|
+
predicate: s?.param ? Ot(s.param, n, r, s.empty) : Object.assign(Vi(o === a.length - 1), { empty: !1 })
|
|
811
|
+
};
|
|
812
|
+
});
|
|
813
|
+
if (o.filter((e) => !e.accessor.constant).length > 1) throw Error("Only one accessor can be non-constant. Channel: " + e);
|
|
814
|
+
return o;
|
|
815
|
+
}
|
|
816
|
+
function At(e, t) {
|
|
817
|
+
let n = {}, r = (t) => e.getScaleResolution(t)?.getScale();
|
|
818
|
+
for (let [i, a] of Object.entries(t)) {
|
|
819
|
+
if (!a) continue;
|
|
820
|
+
let o = i;
|
|
821
|
+
jt(o) || (n[o] = Pt(kt(o, a, t, e.paramRuntime), r));
|
|
822
|
+
}
|
|
823
|
+
return n;
|
|
824
|
+
}
|
|
825
|
+
function jt(e) {
|
|
826
|
+
return e === "key" || e === "search" || e === "tooltip";
|
|
827
|
+
}
|
|
828
|
+
function Mt(e) {
|
|
829
|
+
return e.branches.map((e) => e.accessor);
|
|
830
|
+
}
|
|
831
|
+
function Nt(e) {
|
|
832
|
+
return e.branches.find((e) => !e.accessor.constant)?.accessor;
|
|
833
|
+
}
|
|
834
|
+
function Pt(e, t) {
|
|
835
|
+
if (e.length === 1) {
|
|
836
|
+
let n = Ft(e[0].accessor, t);
|
|
837
|
+
return Object.assign(n, { branches: e });
|
|
838
|
+
}
|
|
839
|
+
let n = e.map((e) => e.predicate), r = e.map((e) => Ft(e.accessor, t));
|
|
840
|
+
return Object.assign((e) => {
|
|
841
|
+
for (let t = 0; t < r.length; t++) if (n[t](e)) return r[t](e);
|
|
842
|
+
}, {
|
|
843
|
+
constant: !1,
|
|
844
|
+
branches: e,
|
|
845
|
+
scale: r.map((e) => e.scale).find((e) => e),
|
|
846
|
+
channelDef: e.at(-1).accessor.channelDef
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
function Ft(e, t) {
|
|
850
|
+
let { channel: n, scaleChannel: r, channelDef: i } = e, a = e.scaleChannel ? t(r) : void 0;
|
|
851
|
+
if (r && !a) throw Error(`Missing scale! "${n}": ${JSON.stringify(i)}`);
|
|
852
|
+
return Object.assign(a ? (t) => a(e(t)) : (t) => e(t), {
|
|
853
|
+
scale: a,
|
|
854
|
+
constant: e.constant,
|
|
855
|
+
branches: [{
|
|
856
|
+
accessor: e,
|
|
857
|
+
predicate: Vi(!0)
|
|
858
|
+
}],
|
|
859
|
+
channelDef: i
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
function It(e) {
|
|
863
|
+
return e && "value" in e;
|
|
864
|
+
}
|
|
865
|
+
function E(e) {
|
|
866
|
+
return e && "field" in e;
|
|
867
|
+
}
|
|
868
|
+
function D(e) {
|
|
869
|
+
return e && "datum" in e;
|
|
870
|
+
}
|
|
871
|
+
function Lt(e) {
|
|
872
|
+
return E(e) || D(e) || Ht(e) || Vt(e);
|
|
873
|
+
}
|
|
874
|
+
function Rt(e) {
|
|
875
|
+
if (Wt(e)) {
|
|
876
|
+
let t = e.condition;
|
|
877
|
+
return (Array.isArray(t) ? t : [t]).find((e) => Lt(e));
|
|
878
|
+
} else if (Lt(e)) return e;
|
|
879
|
+
}
|
|
880
|
+
function zt(e) {
|
|
881
|
+
let t = e && Rt(e);
|
|
882
|
+
return t != null && t.type != "quantitative" && t.scale !== null;
|
|
883
|
+
}
|
|
884
|
+
function Bt(e, t) {
|
|
885
|
+
let n = e.mark.encoding[t];
|
|
886
|
+
if (Array.isArray(n)) throw Error("Not a channel def with scale!");
|
|
887
|
+
{
|
|
888
|
+
let e = Rt(n);
|
|
889
|
+
if (e) return e;
|
|
890
|
+
}
|
|
891
|
+
throw Error("Not a channel def with scale!");
|
|
892
|
+
}
|
|
893
|
+
function Vt(e) {
|
|
894
|
+
return e && "chrom" in e;
|
|
895
|
+
}
|
|
896
|
+
function Ht(e) {
|
|
897
|
+
return e && "expr" in e;
|
|
898
|
+
}
|
|
899
|
+
function Ut(e) {
|
|
900
|
+
return (E(e) || D(e)) && "condition" in e;
|
|
901
|
+
}
|
|
902
|
+
function Wt(e) {
|
|
903
|
+
return It(e) && "condition" in e;
|
|
904
|
+
}
|
|
905
|
+
var Gt = ["x", "y"], Kt = ["x2", "y2"], qt = ["xOffset", "yOffset"], Jt = [...Gt, ...Kt];
|
|
906
|
+
function Yt(e) {
|
|
907
|
+
return Gt.includes(e);
|
|
908
|
+
}
|
|
909
|
+
function Xt(e) {
|
|
910
|
+
return Jt.includes(e);
|
|
911
|
+
}
|
|
912
|
+
function Zt(e) {
|
|
913
|
+
return qt.includes(e);
|
|
914
|
+
}
|
|
915
|
+
function Qt(e) {
|
|
916
|
+
return an(e) == "x" ? "xOffset" : "yOffset";
|
|
917
|
+
}
|
|
918
|
+
function $t(e, t, n) {
|
|
919
|
+
return t ?? (n ? 0 : e);
|
|
920
|
+
}
|
|
921
|
+
var en = {
|
|
922
|
+
x: "x2",
|
|
923
|
+
y: "y2"
|
|
924
|
+
}, tn = Object.fromEntries(Object.entries(en).map((e) => [e[1], e[0]]));
|
|
925
|
+
function nn(e) {
|
|
926
|
+
return e in tn;
|
|
927
|
+
}
|
|
928
|
+
function rn(e) {
|
|
929
|
+
let t = en[e];
|
|
930
|
+
if (t) return t;
|
|
931
|
+
throw Error(`${e} has no secondary channel!`);
|
|
932
|
+
}
|
|
933
|
+
function an(e) {
|
|
934
|
+
return tn[e] ?? e;
|
|
935
|
+
}
|
|
936
|
+
function on(e) {
|
|
937
|
+
return [
|
|
938
|
+
"color",
|
|
939
|
+
"fill",
|
|
940
|
+
"stroke"
|
|
941
|
+
].includes(an(e));
|
|
942
|
+
}
|
|
943
|
+
function sn(e) {
|
|
944
|
+
return ["shape", "direction"].includes(e);
|
|
945
|
+
}
|
|
946
|
+
function cn(e) {
|
|
947
|
+
return [
|
|
948
|
+
"x",
|
|
949
|
+
"y",
|
|
950
|
+
"x2",
|
|
951
|
+
"y2",
|
|
952
|
+
"xOffset",
|
|
953
|
+
"yOffset",
|
|
954
|
+
"color",
|
|
955
|
+
"fill",
|
|
956
|
+
"stroke",
|
|
957
|
+
"opacity",
|
|
958
|
+
"fillOpacity",
|
|
959
|
+
"strokeOpacity",
|
|
960
|
+
"strokeWidth",
|
|
961
|
+
"size",
|
|
962
|
+
"shape",
|
|
963
|
+
"direction",
|
|
964
|
+
"angle",
|
|
965
|
+
"dx",
|
|
966
|
+
"dy",
|
|
967
|
+
"sample"
|
|
968
|
+
].includes(e);
|
|
969
|
+
}
|
|
970
|
+
function ln(e) {
|
|
971
|
+
switch (e) {
|
|
972
|
+
case "shape": return [
|
|
973
|
+
"circle",
|
|
974
|
+
"square",
|
|
975
|
+
"cross",
|
|
976
|
+
"diamond",
|
|
977
|
+
"triangle-up",
|
|
978
|
+
"triangle-right",
|
|
979
|
+
"triangle-down",
|
|
980
|
+
"triangle-left",
|
|
981
|
+
"tick-up",
|
|
982
|
+
"tick-right",
|
|
983
|
+
"tick-down",
|
|
984
|
+
"tick-left",
|
|
985
|
+
"x",
|
|
986
|
+
"+"
|
|
987
|
+
];
|
|
988
|
+
case "direction": return ["forward", "reverse"];
|
|
989
|
+
default:
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
function un(e) {
|
|
993
|
+
if (!sn(e)) throw Error("Not a discrete channel: " + e);
|
|
994
|
+
let t = new Map(ln(e).map((e, t) => [e, t]));
|
|
995
|
+
return (n) => {
|
|
996
|
+
let r = t.get(n);
|
|
997
|
+
if (r !== void 0) return r;
|
|
998
|
+
throw Error(`Invalid value for "${e}" channel: ${n}`);
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region ../../node_modules/vega-expression/build/vega-expression.js
|
|
1003
|
+
var dn = "RawCode", fn = "Literal", pn = "Property", mn = "Identifier", hn = "ArrayExpression", gn = "BinaryExpression", _n = "CallExpression", vn = "ConditionalExpression", yn = "LogicalExpression", bn = "MemberExpression", xn = "ObjectExpression", Sn = "UnaryExpression";
|
|
1004
|
+
function O(e) {
|
|
1005
|
+
this.type = e;
|
|
1006
|
+
}
|
|
1007
|
+
O.prototype.visit = function(e) {
|
|
1008
|
+
let t, n, r;
|
|
1009
|
+
if (e(this)) return 1;
|
|
1010
|
+
for (t = Cn(this), n = 0, r = t.length; n < r; ++n) if (t[n].visit(e)) return 1;
|
|
1011
|
+
};
|
|
1012
|
+
function Cn(e) {
|
|
1013
|
+
switch (e.type) {
|
|
1014
|
+
case hn: return e.elements;
|
|
1015
|
+
case gn:
|
|
1016
|
+
case yn: return [e.left, e.right];
|
|
1017
|
+
case _n: return [e.callee].concat(e.arguments);
|
|
1018
|
+
case vn: return [
|
|
1019
|
+
e.test,
|
|
1020
|
+
e.consequent,
|
|
1021
|
+
e.alternate
|
|
1022
|
+
];
|
|
1023
|
+
case bn: return [e.object, e.property];
|
|
1024
|
+
case xn: return e.properties;
|
|
1025
|
+
case pn: return [e.key, e.value];
|
|
1026
|
+
case Sn: return [e.argument];
|
|
1027
|
+
case mn:
|
|
1028
|
+
case fn:
|
|
1029
|
+
case dn:
|
|
1030
|
+
default: return [];
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
var k, A, j, M, N, wn = 1, P = 2, F = 3, I = 4, Tn = 5, L = 6, R = 7, z = 8, En = 9;
|
|
1034
|
+
k = {}, k[wn] = "Boolean", k[P] = "<end>", k[F] = "Identifier", k[I] = "Keyword", k[Tn] = "Null", k[L] = "Numeric", k[R] = "Punctuator", k[z] = "String", k[En] = "RegularExpression";
|
|
1035
|
+
var Dn = "ArrayExpression", On = "BinaryExpression", kn = "CallExpression", An = "ConditionalExpression", jn = "Identifier", Mn = "Literal", Nn = "LogicalExpression", Pn = "MemberExpression", Fn = "ObjectExpression", In = "Property", Ln = "UnaryExpression", B = "Unexpected token %0", Rn = "Unexpected number", zn = "Unexpected string", Bn = "Unexpected identifier", Vn = "Unexpected reserved word", Hn = "Unexpected end of input", Un = "Invalid regular expression", Wn = "Invalid regular expression: missing /", Gn = "Octal literals are not allowed in strict mode.", Kn = "Duplicate data property in object literal not allowed in strict mode", V = "ILLEGAL", H = "Disabled.", qn = /* @__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]"), Jn = /* @__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]");
|
|
1036
|
+
function Yn(e, t) {
|
|
1037
|
+
/* istanbul ignore next */
|
|
1038
|
+
if (!e) throw Error("ASSERT: " + t);
|
|
1039
|
+
}
|
|
1040
|
+
function U(e) {
|
|
1041
|
+
return e >= 48 && e <= 57;
|
|
1042
|
+
}
|
|
1043
|
+
function Xn(e) {
|
|
1044
|
+
return "0123456789abcdefABCDEF".includes(e);
|
|
1045
|
+
}
|
|
1046
|
+
function W(e) {
|
|
1047
|
+
return "01234567".includes(e);
|
|
1048
|
+
}
|
|
1049
|
+
function Zn(e) {
|
|
1050
|
+
return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [
|
|
1051
|
+
5760,
|
|
1052
|
+
6158,
|
|
1053
|
+
8192,
|
|
1054
|
+
8193,
|
|
1055
|
+
8194,
|
|
1056
|
+
8195,
|
|
1057
|
+
8196,
|
|
1058
|
+
8197,
|
|
1059
|
+
8198,
|
|
1060
|
+
8199,
|
|
1061
|
+
8200,
|
|
1062
|
+
8201,
|
|
1063
|
+
8202,
|
|
1064
|
+
8239,
|
|
1065
|
+
8287,
|
|
1066
|
+
12288,
|
|
1067
|
+
65279
|
|
1068
|
+
].includes(e);
|
|
1069
|
+
}
|
|
1070
|
+
function G(e) {
|
|
1071
|
+
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
1072
|
+
}
|
|
1073
|
+
function K(e) {
|
|
1074
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && qn.test(String.fromCharCode(e));
|
|
1075
|
+
}
|
|
1076
|
+
function Qn(e) {
|
|
1077
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && Jn.test(String.fromCharCode(e));
|
|
1078
|
+
}
|
|
1079
|
+
var $n = {
|
|
1080
|
+
if: 1,
|
|
1081
|
+
in: 1,
|
|
1082
|
+
do: 1,
|
|
1083
|
+
var: 1,
|
|
1084
|
+
for: 1,
|
|
1085
|
+
new: 1,
|
|
1086
|
+
try: 1,
|
|
1087
|
+
let: 1,
|
|
1088
|
+
this: 1,
|
|
1089
|
+
else: 1,
|
|
1090
|
+
case: 1,
|
|
1091
|
+
void: 1,
|
|
1092
|
+
with: 1,
|
|
1093
|
+
enum: 1,
|
|
1094
|
+
while: 1,
|
|
1095
|
+
break: 1,
|
|
1096
|
+
catch: 1,
|
|
1097
|
+
throw: 1,
|
|
1098
|
+
const: 1,
|
|
1099
|
+
yield: 1,
|
|
1100
|
+
class: 1,
|
|
1101
|
+
super: 1,
|
|
1102
|
+
return: 1,
|
|
1103
|
+
typeof: 1,
|
|
1104
|
+
delete: 1,
|
|
1105
|
+
switch: 1,
|
|
1106
|
+
export: 1,
|
|
1107
|
+
import: 1,
|
|
1108
|
+
public: 1,
|
|
1109
|
+
static: 1,
|
|
1110
|
+
default: 1,
|
|
1111
|
+
finally: 1,
|
|
1112
|
+
extends: 1,
|
|
1113
|
+
package: 1,
|
|
1114
|
+
private: 1,
|
|
1115
|
+
function: 1,
|
|
1116
|
+
continue: 1,
|
|
1117
|
+
debugger: 1,
|
|
1118
|
+
interface: 1,
|
|
1119
|
+
protected: 1,
|
|
1120
|
+
instanceof: 1,
|
|
1121
|
+
implements: 1
|
|
1122
|
+
};
|
|
1123
|
+
function er() {
|
|
1124
|
+
for (; j < M;) {
|
|
1125
|
+
let e = A.charCodeAt(j);
|
|
1126
|
+
if (Zn(e) || G(e)) ++j;
|
|
1127
|
+
else break;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
function tr(e) {
|
|
1131
|
+
var t, n, r, i = 0;
|
|
1132
|
+
for (n = e === "u" ? 4 : 2, t = 0; t < n; ++t) j < M && Xn(A[j]) ? (r = A[j++], i = i * 16 + "0123456789abcdef".indexOf(r.toLowerCase())) : Y({}, B, V);
|
|
1133
|
+
return String.fromCharCode(i);
|
|
1134
|
+
}
|
|
1135
|
+
function nr() {
|
|
1136
|
+
var e = A[j], t = 0, n, r;
|
|
1137
|
+
for (e === "}" && Y({}, B, V); j < M && (e = A[j++], Xn(e));) t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
|
|
1138
|
+
return (t > 1114111 || e !== "}") && Y({}, B, V), t <= 65535 ? String.fromCharCode(t) : (n = (t - 65536 >> 10) + 55296, r = (t - 65536 & 1023) + 56320, String.fromCharCode(n, r));
|
|
1139
|
+
}
|
|
1140
|
+
function rr() {
|
|
1141
|
+
var e = A.charCodeAt(j++), t = String.fromCharCode(e);
|
|
1142
|
+
for (e === 92 && (A.charCodeAt(j) !== 117 && Y({}, B, V), ++j, e = tr("u"), (!e || e === "\\" || !K(e.charCodeAt(0))) && Y({}, B, V), t = e); j < M && (e = A.charCodeAt(j), Qn(e));) ++j, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), A.charCodeAt(j) !== 117 && Y({}, B, V), ++j, e = tr("u"), (!e || e === "\\" || !Qn(e.charCodeAt(0))) && Y({}, B, V), t += e);
|
|
1143
|
+
return t;
|
|
1144
|
+
}
|
|
1145
|
+
function ir() {
|
|
1146
|
+
for (var e = j++, t; j < M;) {
|
|
1147
|
+
if (t = A.charCodeAt(j), t === 92) return j = e, rr();
|
|
1148
|
+
if (Qn(t)) ++j;
|
|
1149
|
+
else break;
|
|
1150
|
+
}
|
|
1151
|
+
return A.slice(e, j);
|
|
1152
|
+
}
|
|
1153
|
+
function ar() {
|
|
1154
|
+
var e = j, t = A.charCodeAt(j) === 92 ? rr() : ir();
|
|
1155
|
+
return {
|
|
1156
|
+
type: t.length === 1 ? F : $n.hasOwnProperty(t) ? I : t === "null" ? Tn : t === "true" || t === "false" ? wn : F,
|
|
1157
|
+
value: t,
|
|
1158
|
+
start: e,
|
|
1159
|
+
end: j
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
function or() {
|
|
1163
|
+
var e = j, t = A.charCodeAt(j), n, r = A[j], i, a, o;
|
|
1164
|
+
switch (t) {
|
|
1165
|
+
case 46:
|
|
1166
|
+
case 40:
|
|
1167
|
+
case 41:
|
|
1168
|
+
case 59:
|
|
1169
|
+
case 44:
|
|
1170
|
+
case 123:
|
|
1171
|
+
case 125:
|
|
1172
|
+
case 91:
|
|
1173
|
+
case 93:
|
|
1174
|
+
case 58:
|
|
1175
|
+
case 63:
|
|
1176
|
+
case 126: return ++j, {
|
|
1177
|
+
type: R,
|
|
1178
|
+
value: String.fromCharCode(t),
|
|
1179
|
+
start: e,
|
|
1180
|
+
end: j
|
|
1181
|
+
};
|
|
1182
|
+
default: if (n = A.charCodeAt(j + 1), n === 61) switch (t) {
|
|
1183
|
+
case 43:
|
|
1184
|
+
case 45:
|
|
1185
|
+
case 47:
|
|
1186
|
+
case 60:
|
|
1187
|
+
case 62:
|
|
1188
|
+
case 94:
|
|
1189
|
+
case 124:
|
|
1190
|
+
case 37:
|
|
1191
|
+
case 38:
|
|
1192
|
+
case 42: return j += 2, {
|
|
1193
|
+
type: R,
|
|
1194
|
+
value: String.fromCharCode(t) + String.fromCharCode(n),
|
|
1195
|
+
start: e,
|
|
1196
|
+
end: j
|
|
1197
|
+
};
|
|
1198
|
+
case 33:
|
|
1199
|
+
case 61: return j += 2, A.charCodeAt(j) === 61 && ++j, {
|
|
1200
|
+
type: R,
|
|
1201
|
+
value: A.slice(e, j),
|
|
1202
|
+
start: e,
|
|
1203
|
+
end: j
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
if (o = A.substr(j, 4), o === ">>>=") return j += 4, {
|
|
1208
|
+
type: R,
|
|
1209
|
+
value: o,
|
|
1210
|
+
start: e,
|
|
1211
|
+
end: j
|
|
1212
|
+
};
|
|
1213
|
+
if (a = o.substr(0, 3), a === ">>>" || a === "<<=" || a === ">>=") return j += 3, {
|
|
1214
|
+
type: R,
|
|
1215
|
+
value: a,
|
|
1216
|
+
start: e,
|
|
1217
|
+
end: j
|
|
1218
|
+
};
|
|
1219
|
+
if (i = a.substr(0, 2), r === i[1] && "+-<>&|".includes(r) || i === "=>") return j += 2, {
|
|
1220
|
+
type: R,
|
|
1221
|
+
value: i,
|
|
1222
|
+
start: e,
|
|
1223
|
+
end: j
|
|
1224
|
+
};
|
|
1225
|
+
if (i === "//" && Y({}, B, V), "<>=!+-*%&|^/".includes(r)) return ++j, {
|
|
1226
|
+
type: R,
|
|
1227
|
+
value: r,
|
|
1228
|
+
start: e,
|
|
1229
|
+
end: j
|
|
1230
|
+
};
|
|
1231
|
+
Y({}, B, V);
|
|
1232
|
+
}
|
|
1233
|
+
function sr(e) {
|
|
1234
|
+
let t = "";
|
|
1235
|
+
for (; j < M && Xn(A[j]);) t += A[j++];
|
|
1236
|
+
return t.length === 0 && Y({}, B, V), K(A.charCodeAt(j)) && Y({}, B, V), {
|
|
1237
|
+
type: L,
|
|
1238
|
+
value: parseInt("0x" + t, 16),
|
|
1239
|
+
start: e,
|
|
1240
|
+
end: j
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
function cr(e) {
|
|
1244
|
+
let t = "0" + A[j++];
|
|
1245
|
+
for (; j < M && W(A[j]);) t += A[j++];
|
|
1246
|
+
return (K(A.charCodeAt(j)) || U(A.charCodeAt(j))) && Y({}, B, V), {
|
|
1247
|
+
type: L,
|
|
1248
|
+
value: parseInt(t, 8),
|
|
1249
|
+
octal: !0,
|
|
1250
|
+
start: e,
|
|
1251
|
+
end: j
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
function lr() {
|
|
1255
|
+
var e, t, n = A[j];
|
|
1256
|
+
if (Yn(U(n.charCodeAt(0)) || n === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = j, e = "", n !== ".") {
|
|
1257
|
+
if (e = A[j++], n = A[j], e === "0") {
|
|
1258
|
+
if (n === "x" || n === "X") return ++j, sr(t);
|
|
1259
|
+
if (W(n)) return cr(t);
|
|
1260
|
+
n && U(n.charCodeAt(0)) && Y({}, B, V);
|
|
1261
|
+
}
|
|
1262
|
+
for (; U(A.charCodeAt(j));) e += A[j++];
|
|
1263
|
+
n = A[j];
|
|
1264
|
+
}
|
|
1265
|
+
if (n === ".") {
|
|
1266
|
+
for (e += A[j++]; U(A.charCodeAt(j));) e += A[j++];
|
|
1267
|
+
n = A[j];
|
|
1268
|
+
}
|
|
1269
|
+
if (n === "e" || n === "E") if (e += A[j++], n = A[j], (n === "+" || n === "-") && (e += A[j++]), U(A.charCodeAt(j))) for (; U(A.charCodeAt(j));) e += A[j++];
|
|
1270
|
+
else Y({}, B, V);
|
|
1271
|
+
return K(A.charCodeAt(j)) && Y({}, B, V), {
|
|
1272
|
+
type: L,
|
|
1273
|
+
value: parseFloat(e),
|
|
1274
|
+
start: t,
|
|
1275
|
+
end: j
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
function ur() {
|
|
1279
|
+
var e = "", t, n, r, i, a = !1;
|
|
1280
|
+
for (t = A[j], Yn(t === "'" || t === "\"", "String literal must starts with a quote"), n = j, ++j; j < M;) if (r = A[j++], r === t) {
|
|
1281
|
+
t = "";
|
|
1282
|
+
break;
|
|
1283
|
+
} else if (r === "\\") if (r = A[j++], !r || !G(r.charCodeAt(0))) switch (r) {
|
|
1284
|
+
case "u":
|
|
1285
|
+
case "x":
|
|
1286
|
+
A[j] === "{" ? (++j, e += nr()) : e += tr(r);
|
|
1287
|
+
break;
|
|
1288
|
+
case "n":
|
|
1289
|
+
e += "\n";
|
|
1290
|
+
break;
|
|
1291
|
+
case "r":
|
|
1292
|
+
e += "\r";
|
|
1293
|
+
break;
|
|
1294
|
+
case "t":
|
|
1295
|
+
e += " ";
|
|
1296
|
+
break;
|
|
1297
|
+
case "b":
|
|
1298
|
+
e += "\b";
|
|
1299
|
+
break;
|
|
1300
|
+
case "f":
|
|
1301
|
+
e += "\f";
|
|
1302
|
+
break;
|
|
1303
|
+
case "v":
|
|
1304
|
+
e += "\v";
|
|
1305
|
+
break;
|
|
1306
|
+
default:
|
|
1307
|
+
W(r) ? (i = "01234567".indexOf(r), i !== 0 && (a = !0), j < M && W(A[j]) && (a = !0, i = i * 8 + "01234567".indexOf(A[j++]), "0123".includes(r) && j < M && W(A[j]) && (i = i * 8 + "01234567".indexOf(A[j++]))), e += String.fromCharCode(i)) : e += r;
|
|
1308
|
+
break;
|
|
1309
|
+
}
|
|
1310
|
+
else r === "\r" && A[j] === "\n" && ++j;
|
|
1311
|
+
else if (G(r.charCodeAt(0))) break;
|
|
1312
|
+
else e += r;
|
|
1313
|
+
return t !== "" && Y({}, B, V), {
|
|
1314
|
+
type: z,
|
|
1315
|
+
value: e,
|
|
1316
|
+
octal: a,
|
|
1317
|
+
start: n,
|
|
1318
|
+
end: j
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
function dr(e, t) {
|
|
1322
|
+
let n = e;
|
|
1323
|
+
t.includes("u") && (n = n.replace(/\\u\{([0-9a-fA-F]+)\}/g, (e, t) => {
|
|
1324
|
+
if (parseInt(t, 16) <= 1114111) return "x";
|
|
1325
|
+
Y({}, Un);
|
|
1326
|
+
}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
|
|
1327
|
+
try {
|
|
1328
|
+
new RegExp(n);
|
|
1329
|
+
} catch {
|
|
1330
|
+
Y({}, Un);
|
|
1331
|
+
}
|
|
1332
|
+
try {
|
|
1333
|
+
return new RegExp(e, t);
|
|
1334
|
+
} catch {
|
|
1335
|
+
return null;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
function fr() {
|
|
1339
|
+
var e = A[j], t, n, r, i;
|
|
1340
|
+
for (Yn(e === "/", "Regular expression literal must start with a slash"), t = A[j++], n = !1, r = !1; j < M;) if (e = A[j++], t += e, e === "\\") e = A[j++], G(e.charCodeAt(0)) && Y({}, Wn), t += e;
|
|
1341
|
+
else if (G(e.charCodeAt(0))) Y({}, Wn);
|
|
1342
|
+
else if (n) e === "]" && (n = !1);
|
|
1343
|
+
else if (e === "/") {
|
|
1344
|
+
r = !0;
|
|
1345
|
+
break;
|
|
1346
|
+
} else e === "[" && (n = !0);
|
|
1347
|
+
return r || Y({}, Wn), i = t.substr(1, t.length - 2), {
|
|
1348
|
+
value: i,
|
|
1349
|
+
literal: t
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
function pr() {
|
|
1353
|
+
for (var e, t = "", n = ""; j < M && (e = A[j], Qn(e.charCodeAt(0)));) ++j, e === "\\" && j < M ? Y({}, B, V) : (n += e, t += e);
|
|
1354
|
+
return n.search(/[^gimuy]/g) >= 0 && Y({}, Un, n), {
|
|
1355
|
+
value: n,
|
|
1356
|
+
literal: t
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
function mr() {
|
|
1360
|
+
var e, t, n, r;
|
|
1361
|
+
return N = null, er(), e = j, t = fr(), n = pr(), r = dr(t.value, n.value), {
|
|
1362
|
+
literal: t.literal + n.literal,
|
|
1363
|
+
value: r,
|
|
1364
|
+
regex: {
|
|
1365
|
+
pattern: t.value,
|
|
1366
|
+
flags: n.value
|
|
1367
|
+
},
|
|
1368
|
+
start: e,
|
|
1369
|
+
end: j
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1372
|
+
function hr(e) {
|
|
1373
|
+
return e.type === F || e.type === I || e.type === wn || e.type === Tn;
|
|
1374
|
+
}
|
|
1375
|
+
function gr() {
|
|
1376
|
+
if (er(), j >= M) return {
|
|
1377
|
+
type: P,
|
|
1378
|
+
start: j,
|
|
1379
|
+
end: j
|
|
1380
|
+
};
|
|
1381
|
+
let e = A.charCodeAt(j);
|
|
1382
|
+
return K(e) ? ar() : e === 40 || e === 41 || e === 59 ? or() : e === 39 || e === 34 ? ur() : e === 46 ? U(A.charCodeAt(j + 1)) ? lr() : or() : U(e) ? lr() : or();
|
|
1383
|
+
}
|
|
1384
|
+
function q() {
|
|
1385
|
+
let e = N;
|
|
1386
|
+
return j = e.end, N = gr(), j = e.end, e;
|
|
1387
|
+
}
|
|
1388
|
+
function _r() {
|
|
1389
|
+
let e = j;
|
|
1390
|
+
N = gr(), j = e;
|
|
1391
|
+
}
|
|
1392
|
+
function vr(e) {
|
|
1393
|
+
let t = new O(Dn);
|
|
1394
|
+
return t.elements = e, t;
|
|
1395
|
+
}
|
|
1396
|
+
function yr(e, t, n) {
|
|
1397
|
+
let r = new O(e === "||" || e === "&&" ? Nn : On);
|
|
1398
|
+
return r.operator = e, r.left = t, r.right = n, r;
|
|
1399
|
+
}
|
|
1400
|
+
function br(e, t) {
|
|
1401
|
+
let n = new O(kn);
|
|
1402
|
+
return n.callee = e, n.arguments = t, n;
|
|
1403
|
+
}
|
|
1404
|
+
function xr(e, t, n) {
|
|
1405
|
+
let r = new O(An);
|
|
1406
|
+
return r.test = e, r.consequent = t, r.alternate = n, r;
|
|
1407
|
+
}
|
|
1408
|
+
function Sr(e) {
|
|
1409
|
+
let t = new O(jn);
|
|
1410
|
+
return t.name = e, t;
|
|
1411
|
+
}
|
|
1412
|
+
function J(e) {
|
|
1413
|
+
let t = new O(Mn);
|
|
1414
|
+
return t.value = e.value, t.raw = A.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
|
|
1415
|
+
}
|
|
1416
|
+
function Cr(e, t, n) {
|
|
1417
|
+
let r = new O(Pn);
|
|
1418
|
+
return r.computed = e === "[", r.object = t, r.property = n, r.computed || (n.member = !0), r;
|
|
1419
|
+
}
|
|
1420
|
+
function wr(e) {
|
|
1421
|
+
let t = new O(Fn);
|
|
1422
|
+
return t.properties = e, t;
|
|
1423
|
+
}
|
|
1424
|
+
function Tr(e, t, n) {
|
|
1425
|
+
let r = new O(In);
|
|
1426
|
+
return r.key = t, r.value = n, r.kind = e, r;
|
|
1427
|
+
}
|
|
1428
|
+
function Er(e, t) {
|
|
1429
|
+
let n = new O(Ln);
|
|
1430
|
+
return n.operator = e, n.argument = t, n.prefix = !0, n;
|
|
1431
|
+
}
|
|
1432
|
+
function Y(e, t) {
|
|
1433
|
+
var n, r = Array.prototype.slice.call(arguments, 2), i = t.replace(/%(\d)/g, (e, t) => (Yn(t < r.length, "Message reference must be in range"), r[t]));
|
|
1434
|
+
throw n = Error(i), n.index = j, n.description = i, n;
|
|
1435
|
+
}
|
|
1436
|
+
function Dr(e) {
|
|
1437
|
+
e.type === P && Y(e, Hn), e.type === L && Y(e, Rn), e.type === z && Y(e, zn), e.type === F && Y(e, Bn), e.type === I && Y(e, Vn), Y(e, B, e.value);
|
|
1438
|
+
}
|
|
1439
|
+
function X(e) {
|
|
1440
|
+
let t = q();
|
|
1441
|
+
(t.type !== R || t.value !== e) && Dr(t);
|
|
1442
|
+
}
|
|
1443
|
+
function Z(e) {
|
|
1444
|
+
return N.type === R && N.value === e;
|
|
1445
|
+
}
|
|
1446
|
+
function Or(e) {
|
|
1447
|
+
return N.type === I && N.value === e;
|
|
1448
|
+
}
|
|
1449
|
+
function kr() {
|
|
1450
|
+
let e = [];
|
|
1451
|
+
for (j = N.start, X("["); !Z("]");) Z(",") ? (q(), e.push(null)) : (e.push(Q()), Z("]") || X(","));
|
|
1452
|
+
return q(), vr(e);
|
|
1453
|
+
}
|
|
1454
|
+
function Ar() {
|
|
1455
|
+
j = N.start;
|
|
1456
|
+
let e = q();
|
|
1457
|
+
return e.type === z || e.type === L ? (e.octal && Y(e, Gn), J(e)) : Sr(e.value);
|
|
1458
|
+
}
|
|
1459
|
+
function jr() {
|
|
1460
|
+
var e, t, n, r;
|
|
1461
|
+
if (j = N.start, e = N, e.type === F) return n = Ar(), X(":"), r = Q(), Tr("init", n, r);
|
|
1462
|
+
if (e.type === P || e.type === R) Dr(e);
|
|
1463
|
+
else return t = Ar(), X(":"), r = Q(), Tr("init", t, r);
|
|
1464
|
+
}
|
|
1465
|
+
function Mr() {
|
|
1466
|
+
var e = [], t, n, r, i = {}, a = String;
|
|
1467
|
+
for (j = N.start, X("{"); !Z("}");) t = jr(), n = t.key.type === jn ? t.key.name : a(t.key.value), r = "$" + n, Object.prototype.hasOwnProperty.call(i, r) ? Y({}, Kn) : i[r] = !0, e.push(t), Z("}") || X(",");
|
|
1468
|
+
return X("}"), wr(e);
|
|
1469
|
+
}
|
|
1470
|
+
function Nr() {
|
|
1471
|
+
X("(");
|
|
1472
|
+
let e = Gr();
|
|
1473
|
+
return X(")"), e;
|
|
1474
|
+
}
|
|
1475
|
+
var Pr = { if: 1 };
|
|
1476
|
+
function Fr() {
|
|
1477
|
+
var e, t, n;
|
|
1478
|
+
if (Z("(")) return Nr();
|
|
1479
|
+
if (Z("[")) return kr();
|
|
1480
|
+
if (Z("{")) return Mr();
|
|
1481
|
+
if (e = N.type, j = N.start, e === F || Pr[N.value]) n = Sr(q().value);
|
|
1482
|
+
else if (e === z || e === L) N.octal && Y(N, Gn), n = J(q());
|
|
1483
|
+
else if (e === I) throw Error(H);
|
|
1484
|
+
else e === wn ? (t = q(), t.value = t.value === "true", n = J(t)) : e === Tn ? (t = q(), t.value = null, n = J(t)) : Z("/") || Z("/=") ? (n = J(mr()), _r()) : Dr(q());
|
|
1485
|
+
return n;
|
|
1486
|
+
}
|
|
1487
|
+
function Ir() {
|
|
1488
|
+
let e = [];
|
|
1489
|
+
if (X("("), !Z(")")) for (; j < M && (e.push(Q()), !Z(")"));) X(",");
|
|
1490
|
+
return X(")"), e;
|
|
1491
|
+
}
|
|
1492
|
+
function Lr() {
|
|
1493
|
+
j = N.start;
|
|
1494
|
+
let e = q();
|
|
1495
|
+
return hr(e) || Dr(e), Sr(e.value);
|
|
1496
|
+
}
|
|
1497
|
+
function Rr() {
|
|
1498
|
+
return X("."), Lr();
|
|
1499
|
+
}
|
|
1500
|
+
function zr() {
|
|
1501
|
+
X("[");
|
|
1502
|
+
let e = Gr();
|
|
1503
|
+
return X("]"), e;
|
|
1504
|
+
}
|
|
1505
|
+
function Br() {
|
|
1506
|
+
for (var e = Fr(), t, n;;) if (Z(".")) n = Rr(), e = Cr(".", e, n);
|
|
1507
|
+
else if (Z("(")) t = Ir(), e = br(e, t);
|
|
1508
|
+
else if (Z("[")) n = zr(), e = Cr("[", e, n);
|
|
1509
|
+
else break;
|
|
1510
|
+
return e;
|
|
1511
|
+
}
|
|
1512
|
+
function Vr() {
|
|
1513
|
+
let e = Br();
|
|
1514
|
+
if (N.type === R && (Z("++") || Z("--"))) throw Error(H);
|
|
1515
|
+
return e;
|
|
1516
|
+
}
|
|
1517
|
+
function Hr() {
|
|
1518
|
+
var e, t;
|
|
1519
|
+
if (N.type !== R && N.type !== I) t = Vr();
|
|
1520
|
+
else if (Z("++") || Z("--")) throw Error(H);
|
|
1521
|
+
else if (Z("+") || Z("-") || Z("~") || Z("!")) e = q(), t = Hr(), t = Er(e.value, t);
|
|
1522
|
+
else if (Or("delete") || Or("void") || Or("typeof")) throw Error(H);
|
|
1523
|
+
else t = Vr();
|
|
1524
|
+
return t;
|
|
1525
|
+
}
|
|
1526
|
+
function Ur(e) {
|
|
1527
|
+
let t = 0;
|
|
1528
|
+
if (e.type !== R && e.type !== I) return 0;
|
|
1529
|
+
switch (e.value) {
|
|
1530
|
+
case "||":
|
|
1531
|
+
t = 1;
|
|
1532
|
+
break;
|
|
1533
|
+
case "&&":
|
|
1534
|
+
t = 2;
|
|
1535
|
+
break;
|
|
1536
|
+
case "|":
|
|
1537
|
+
t = 3;
|
|
1538
|
+
break;
|
|
1539
|
+
case "^":
|
|
1540
|
+
t = 4;
|
|
1541
|
+
break;
|
|
1542
|
+
case "&":
|
|
1543
|
+
t = 5;
|
|
1544
|
+
break;
|
|
1545
|
+
case "==":
|
|
1546
|
+
case "!=":
|
|
1547
|
+
case "===":
|
|
1548
|
+
case "!==":
|
|
1549
|
+
t = 6;
|
|
1550
|
+
break;
|
|
1551
|
+
case "<":
|
|
1552
|
+
case ">":
|
|
1553
|
+
case "<=":
|
|
1554
|
+
case ">=":
|
|
1555
|
+
case "instanceof":
|
|
1556
|
+
case "in":
|
|
1557
|
+
t = 7;
|
|
1558
|
+
break;
|
|
1559
|
+
case "<<":
|
|
1560
|
+
case ">>":
|
|
1561
|
+
case ">>>":
|
|
1562
|
+
t = 8;
|
|
1563
|
+
break;
|
|
1564
|
+
case "+":
|
|
1565
|
+
case "-":
|
|
1566
|
+
t = 9;
|
|
1567
|
+
break;
|
|
1568
|
+
case "*":
|
|
1569
|
+
case "/":
|
|
1570
|
+
case "%":
|
|
1571
|
+
t = 11;
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
return t;
|
|
1575
|
+
}
|
|
1576
|
+
function Wr() {
|
|
1577
|
+
var e = N, t, n, r, i, a, o, s, c = Hr(), l;
|
|
1578
|
+
if (r = N, i = Ur(r), i === 0) return c;
|
|
1579
|
+
for (r.prec = i, q(), t = [e, N], o = Hr(), a = [
|
|
1580
|
+
c,
|
|
1581
|
+
r,
|
|
1582
|
+
o
|
|
1583
|
+
]; (i = Ur(N)) > 0;) {
|
|
1584
|
+
for (; a.length > 2 && i <= a[a.length - 2].prec;) o = a.pop(), s = a.pop().value, c = a.pop(), t.pop(), n = yr(s, c, o), a.push(n);
|
|
1585
|
+
r = q(), r.prec = i, a.push(r), t.push(N), n = Hr(), a.push(n);
|
|
1586
|
+
}
|
|
1587
|
+
for (l = a.length - 1, n = a[l], t.pop(); l > 1;) t.pop(), n = yr(a[l - 1].value, a[l - 2], n), l -= 2;
|
|
1588
|
+
return n;
|
|
1589
|
+
}
|
|
1590
|
+
function Q() {
|
|
1591
|
+
var e = Wr(), t, n;
|
|
1592
|
+
return Z("?") && (q(), t = Q(), X(":"), n = Q(), e = xr(e, t, n)), e;
|
|
1593
|
+
}
|
|
1594
|
+
function Gr() {
|
|
1595
|
+
let e = Q();
|
|
1596
|
+
if (Z(",")) throw Error(H);
|
|
1597
|
+
return e;
|
|
1598
|
+
}
|
|
1599
|
+
function Kr(e) {
|
|
1600
|
+
A = e, j = 0, M = A.length, N = null, _r();
|
|
1601
|
+
let t = Gr();
|
|
1602
|
+
if (N.type !== P) throw Error("Unexpect token after expression.");
|
|
1603
|
+
return t;
|
|
1604
|
+
}
|
|
1605
|
+
var qr = {
|
|
1606
|
+
NaN: "NaN",
|
|
1607
|
+
E: "Math.E",
|
|
1608
|
+
LN2: "Math.LN2",
|
|
1609
|
+
LN10: "Math.LN10",
|
|
1610
|
+
LOG2E: "Math.LOG2E",
|
|
1611
|
+
LOG10E: "Math.LOG10E",
|
|
1612
|
+
PI: "Math.PI",
|
|
1613
|
+
SQRT1_2: "Math.SQRT1_2",
|
|
1614
|
+
SQRT2: "Math.SQRT2",
|
|
1615
|
+
MIN_VALUE: "Number.MIN_VALUE",
|
|
1616
|
+
MAX_VALUE: "Number.MAX_VALUE"
|
|
1617
|
+
};
|
|
1618
|
+
function Jr(e) {
|
|
1619
|
+
function t(t, n, r, i) {
|
|
1620
|
+
let a = e(n[0]);
|
|
1621
|
+
return r && (a = r + "(" + a + ")", r.lastIndexOf("new ", 0) === 0 && (a = "(" + a + ")")), a + "." + t + (i < 0 ? "" : i === 0 ? "()" : "(" + n.slice(1).map(e).join(",") + ")");
|
|
1622
|
+
}
|
|
1623
|
+
function n(e, n, r) {
|
|
1624
|
+
return (i) => t(e, i, n, r);
|
|
1625
|
+
}
|
|
1626
|
+
let r = "new Date", a = "String", o = "RegExp";
|
|
1627
|
+
return {
|
|
1628
|
+
isNaN: "Number.isNaN",
|
|
1629
|
+
isFinite: "Number.isFinite",
|
|
1630
|
+
abs: "Math.abs",
|
|
1631
|
+
acos: "Math.acos",
|
|
1632
|
+
asin: "Math.asin",
|
|
1633
|
+
atan: "Math.atan",
|
|
1634
|
+
atan2: "Math.atan2",
|
|
1635
|
+
ceil: "Math.ceil",
|
|
1636
|
+
cos: "Math.cos",
|
|
1637
|
+
exp: "Math.exp",
|
|
1638
|
+
floor: "Math.floor",
|
|
1639
|
+
hypot: "Math.hypot",
|
|
1640
|
+
log: "Math.log",
|
|
1641
|
+
max: "Math.max",
|
|
1642
|
+
min: "Math.min",
|
|
1643
|
+
pow: "Math.pow",
|
|
1644
|
+
random: "Math.random",
|
|
1645
|
+
round: "Math.round",
|
|
1646
|
+
sin: "Math.sin",
|
|
1647
|
+
sqrt: "Math.sqrt",
|
|
1648
|
+
tan: "Math.tan",
|
|
1649
|
+
clamp: function(t) {
|
|
1650
|
+
t.length < 3 && i("Missing arguments to clamp function."), t.length > 3 && i("Too many arguments to clamp function.");
|
|
1651
|
+
let n = t.map(e);
|
|
1652
|
+
return "Math.max(" + n[1] + ", Math.min(" + n[2] + "," + n[0] + "))";
|
|
1653
|
+
},
|
|
1654
|
+
now: "Date.now",
|
|
1655
|
+
utc: "Date.UTC",
|
|
1656
|
+
datetime: r,
|
|
1657
|
+
date: n("getDate", r, 0),
|
|
1658
|
+
day: n("getDay", r, 0),
|
|
1659
|
+
year: n("getFullYear", r, 0),
|
|
1660
|
+
month: n("getMonth", r, 0),
|
|
1661
|
+
hours: n("getHours", r, 0),
|
|
1662
|
+
minutes: n("getMinutes", r, 0),
|
|
1663
|
+
seconds: n("getSeconds", r, 0),
|
|
1664
|
+
milliseconds: n("getMilliseconds", r, 0),
|
|
1665
|
+
time: n("getTime", r, 0),
|
|
1666
|
+
timezoneoffset: n("getTimezoneOffset", r, 0),
|
|
1667
|
+
utcdate: n("getUTCDate", r, 0),
|
|
1668
|
+
utcday: n("getUTCDay", r, 0),
|
|
1669
|
+
utcyear: n("getUTCFullYear", r, 0),
|
|
1670
|
+
utcmonth: n("getUTCMonth", r, 0),
|
|
1671
|
+
utchours: n("getUTCHours", r, 0),
|
|
1672
|
+
utcminutes: n("getUTCMinutes", r, 0),
|
|
1673
|
+
utcseconds: n("getUTCSeconds", r, 0),
|
|
1674
|
+
utcmilliseconds: n("getUTCMilliseconds", r, 0),
|
|
1675
|
+
length: n("length", null, -1),
|
|
1676
|
+
parseFloat: "parseFloat",
|
|
1677
|
+
parseInt: "parseInt",
|
|
1678
|
+
upper: n("toUpperCase", a, 0),
|
|
1679
|
+
lower: n("toLowerCase", a, 0),
|
|
1680
|
+
substring: n("substring", a),
|
|
1681
|
+
split: n("split", a),
|
|
1682
|
+
trim: n("trim", a, 0),
|
|
1683
|
+
btoa: "btoa",
|
|
1684
|
+
atob: "atob",
|
|
1685
|
+
regexp: o,
|
|
1686
|
+
test: n("test", o),
|
|
1687
|
+
if: function(t) {
|
|
1688
|
+
t.length < 3 && i("Missing arguments to if function."), t.length > 3 && i("Too many arguments to if function.");
|
|
1689
|
+
let n = t.map(e);
|
|
1690
|
+
return "(" + n[0] + "?" + n[1] + ":" + n[2] + ")";
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
function Yr(e) {
|
|
1695
|
+
let t = e && e.length - 1;
|
|
1696
|
+
return t && (e[0] === "\"" && e[t] === "\"" || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
|
|
1697
|
+
}
|
|
1698
|
+
function Xr(e) {
|
|
1699
|
+
e ||= {};
|
|
1700
|
+
let t = e.allowed ? g(e.allowed) : {}, n = e.forbidden ? g(e.forbidden) : {}, r = e.constants || qr, a = (e.functions || Jr)(_), o = e.globalvar, s = e.fieldvar, l = f(o) ? o : (e) => `${o}["${e}"]`;
|
|
1701
|
+
[...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
1702
|
+
let u = {}, d = {}, h = 0;
|
|
1703
|
+
function _(e) {
|
|
1704
|
+
if (m(e)) return e;
|
|
1705
|
+
let t = ee[e.type];
|
|
1706
|
+
return t ?? i("Unsupported type: " + e.type), t(e);
|
|
1707
|
+
}
|
|
1708
|
+
let ee = {
|
|
1709
|
+
Literal: (e) => e.raw,
|
|
1710
|
+
Identifier: (e) => {
|
|
1711
|
+
let a = e.name;
|
|
1712
|
+
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));
|
|
1713
|
+
},
|
|
1714
|
+
MemberExpression: (e) => {
|
|
1715
|
+
let t = !e.computed, n = _(e.object);
|
|
1716
|
+
t && (h += 1);
|
|
1717
|
+
let r = _(e.property);
|
|
1718
|
+
return n === s && (d[Yr(r)] = 1), t && --h, n + (t ? "." + r : "[" + r + "]");
|
|
1719
|
+
},
|
|
1720
|
+
CallExpression: (e) => {
|
|
1721
|
+
e.callee.type !== "Identifier" && i("Illegal callee type: " + e.callee.type);
|
|
1722
|
+
let t = e.callee.name, n = e.arguments, r = p(a, t) && a[t];
|
|
1723
|
+
return r || i("Unrecognized function: " + t), f(r) ? r(n) : r + "(" + n.map(_).join(",") + ")";
|
|
1724
|
+
},
|
|
1725
|
+
ArrayExpression: (e) => "[" + e.elements.map(_).join(",") + "]",
|
|
1726
|
+
BinaryExpression: (e) => "(" + _(e.left) + " " + e.operator + " " + _(e.right) + ")",
|
|
1727
|
+
UnaryExpression: (e) => "(" + e.operator + _(e.argument) + ")",
|
|
1728
|
+
ConditionalExpression: (e) => "(" + _(e.test) + "?" + _(e.consequent) + ":" + _(e.alternate) + ")",
|
|
1729
|
+
LogicalExpression: (e) => "(" + _(e.left) + e.operator + _(e.right) + ")",
|
|
1730
|
+
ObjectExpression: (e) => {
|
|
1731
|
+
for (let t of e.properties) {
|
|
1732
|
+
let e = t.key.name;
|
|
1733
|
+
c.has(e) && i("Illegal property: " + e);
|
|
1734
|
+
}
|
|
1735
|
+
return "{" + e.properties.map(_).join(",") + "}";
|
|
1736
|
+
},
|
|
1737
|
+
Property: (e) => {
|
|
1738
|
+
h += 1;
|
|
1739
|
+
let t = _(e.key);
|
|
1740
|
+
return --h, t + ":" + _(e.value);
|
|
1741
|
+
}
|
|
1742
|
+
};
|
|
1743
|
+
function v(e) {
|
|
1744
|
+
let t = {
|
|
1745
|
+
code: _(e),
|
|
1746
|
+
globals: Object.keys(u),
|
|
1747
|
+
fields: Object.keys(d)
|
|
1748
|
+
};
|
|
1749
|
+
return u = {}, d = {}, t;
|
|
1750
|
+
}
|
|
1751
|
+
return v.functions = a, v.constants = r, v;
|
|
1752
|
+
}
|
|
1753
|
+
//#endregion
|
|
1754
|
+
//#region ../core/src/utils/smoothstep.js
|
|
1755
|
+
function Zr(e, t, n) {
|
|
1756
|
+
return n = (n - e) / (t - e), n = Math.max(0, Math.min(1, n)), n * n * (3 - 2 * n);
|
|
1757
|
+
}
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region ../core/src/utils/clamp.js
|
|
1760
|
+
function Qr(e, t = 0, n = 1) {
|
|
1761
|
+
return Math.max(t, Math.min(n, e));
|
|
1762
|
+
}
|
|
1763
|
+
//#endregion
|
|
1764
|
+
//#region ../core/src/utils/linearstep.js
|
|
1765
|
+
function $r(e, t, n) {
|
|
1766
|
+
return Qr((n - e) / (t - e), 0, 1);
|
|
1767
|
+
}
|
|
1768
|
+
//#endregion
|
|
1769
|
+
//#region ../core/src/utils/expression.js
|
|
1770
|
+
function ei(e) {
|
|
1771
|
+
return Ae(e) || ArrayBuffer.isView(e) ? e : null;
|
|
1772
|
+
}
|
|
1773
|
+
function ti(e) {
|
|
1774
|
+
return ei(e) || (w(e) ? e : null);
|
|
1775
|
+
}
|
|
1776
|
+
var ni = {
|
|
1777
|
+
clamp: Qr,
|
|
1778
|
+
format(e, t) {
|
|
1779
|
+
return me(t)(e);
|
|
1780
|
+
},
|
|
1781
|
+
join(e, t) {
|
|
1782
|
+
return ei(e).join(t);
|
|
1783
|
+
},
|
|
1784
|
+
indexof(e, t, n) {
|
|
1785
|
+
return ti(e).indexOf(t, n);
|
|
1786
|
+
},
|
|
1787
|
+
lastindexof(e, t, n) {
|
|
1788
|
+
return ti(e).lastIndexOf(t, n);
|
|
1789
|
+
},
|
|
1790
|
+
reverse(e) {
|
|
1791
|
+
return w(e) ? Array.from(e).reverse().join("") : ei(e).slice().reverse();
|
|
1792
|
+
},
|
|
1793
|
+
slice(e, t, n) {
|
|
1794
|
+
return ti(e).slice(t, n);
|
|
1795
|
+
},
|
|
1796
|
+
mapHasKey(e, t) {
|
|
1797
|
+
return e.has(t);
|
|
1798
|
+
},
|
|
1799
|
+
isArray: Ae,
|
|
1800
|
+
isBoolean: nt,
|
|
1801
|
+
isDefined(e) {
|
|
1802
|
+
return e !== void 0;
|
|
1803
|
+
},
|
|
1804
|
+
isNumber: rt,
|
|
1805
|
+
isObject: je,
|
|
1806
|
+
isRegExp: it,
|
|
1807
|
+
isString: w,
|
|
1808
|
+
isValid(e) {
|
|
1809
|
+
return e != null && e === e;
|
|
1810
|
+
},
|
|
1811
|
+
lerp: at,
|
|
1812
|
+
linearstep: $r,
|
|
1813
|
+
replace(e, t, n) {
|
|
1814
|
+
return String(e).replace(t, n);
|
|
1815
|
+
},
|
|
1816
|
+
sort(e) {
|
|
1817
|
+
return ei(e).slice().sort(Qe);
|
|
1818
|
+
},
|
|
1819
|
+
center(e) {
|
|
1820
|
+
let t = ei(e);
|
|
1821
|
+
return (t[0] + t[t.length - 1]) / 2;
|
|
1822
|
+
},
|
|
1823
|
+
span(e) {
|
|
1824
|
+
return ot(e);
|
|
1825
|
+
},
|
|
1826
|
+
smoothstep: Zr
|
|
1827
|
+
};
|
|
1828
|
+
function ri(e) {
|
|
1829
|
+
let t = !1, n = di(e, {}, { resolveScaleResolution: () => (t = !0, { channel: "analysis" }) });
|
|
1830
|
+
return {
|
|
1831
|
+
usesScaleHelper: t,
|
|
1832
|
+
globals: n.globals
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
function ii(e, t) {
|
|
1836
|
+
let n = Jr(e);
|
|
1837
|
+
for (let e in ni) n[e] = `this.${e}`;
|
|
1838
|
+
for (let r of [
|
|
1839
|
+
"scale",
|
|
1840
|
+
"invert",
|
|
1841
|
+
"domain",
|
|
1842
|
+
"range",
|
|
1843
|
+
"bandwidth",
|
|
1844
|
+
"linearize"
|
|
1845
|
+
]) n[r] = (n) => ai(e, t, r, n);
|
|
1846
|
+
return n;
|
|
1847
|
+
}
|
|
1848
|
+
function ai(e, t, n, r) {
|
|
1849
|
+
if (r.length === 0) throw Error(`Scale helper "${n}" requires a literal channel name.`);
|
|
1850
|
+
if ((n === "scale" || n === "invert" || n === "linearize") && r.length < 2) throw Error(`Scale helper "${n}" requires a channel name and a value.`);
|
|
1851
|
+
let i = oi(r[0]);
|
|
1852
|
+
if (!i) throw Error(`Scale helper "${n}" requires a literal channel name.`);
|
|
1853
|
+
let a = t.resolveScaleResolution?.(i);
|
|
1854
|
+
if (!a) throw Error(`Unknown scale channel "${i}" in expression helper "${n}".`);
|
|
1855
|
+
let o = t.getScaleHelper(n, i, a), s = r.slice(1).map((t) => e(t)).join(",");
|
|
1856
|
+
return `${t.globalvar}["${o.codeName}"](${s})`;
|
|
1857
|
+
}
|
|
1858
|
+
function oi(e) {
|
|
1859
|
+
return e?.type === "Literal" && typeof e.value == "string" ? e.value : void 0;
|
|
1860
|
+
}
|
|
1861
|
+
function si(e, t) {
|
|
1862
|
+
let n = (n) => li(t, e, n);
|
|
1863
|
+
if (e === "domain") return () => n(() => t.getDomain());
|
|
1864
|
+
if (e === "range") return () => n(() => t.getScale().range());
|
|
1865
|
+
if (e === "bandwidth") return () => n(() => {
|
|
1866
|
+
let e = t.getScale();
|
|
1867
|
+
if (typeof e.bandwidth != "function") throw Error(`Scale channel "${t.channel}" does not support bandwidth().`);
|
|
1868
|
+
return e.bandwidth();
|
|
1869
|
+
});
|
|
1870
|
+
if (e === "scale") return (e) => n(() => t.getScale()(e));
|
|
1871
|
+
if (e === "invert") return (e) => n(() => t.getScale().invert(e));
|
|
1872
|
+
if (e === "linearize") return (e) => n(() => e == null ? null : typeof t.fromComplex == "function" ? t.fromComplex(e) : e);
|
|
1873
|
+
throw Error("Unknown scale helper: " + e);
|
|
1874
|
+
}
|
|
1875
|
+
var ci = /* @__PURE__ */ new WeakSet();
|
|
1876
|
+
function li(e, t, n) {
|
|
1877
|
+
if (ci.has(e)) throw Error(`Scale helper cycle detected while evaluating ${t}("${e.channel}").`);
|
|
1878
|
+
ci.add(e);
|
|
1879
|
+
try {
|
|
1880
|
+
return n();
|
|
1881
|
+
} finally {
|
|
1882
|
+
ci.delete(e);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
function ui(e, t, n, r) {
|
|
1886
|
+
let i = /* @__PURE__ */ new Set(), a = () => {
|
|
1887
|
+
for (let e of i) e();
|
|
1888
|
+
}, o = () => {
|
|
1889
|
+
e === "domain" ? n.addEventListener("domain", a) : (e === "range" || n.addEventListener("domain", a), n.addEventListener("range", a));
|
|
1890
|
+
}, s = () => {
|
|
1891
|
+
e === "domain" ? n.removeEventListener("domain", a) : (e === "range" || n.removeEventListener("domain", a), n.removeEventListener("range", a));
|
|
1892
|
+
};
|
|
1893
|
+
return {
|
|
1894
|
+
id: `scale:${t}:${r}`,
|
|
1895
|
+
name: `scale(${t})`,
|
|
1896
|
+
kind: "derived",
|
|
1897
|
+
rank: 0,
|
|
1898
|
+
propagation: "sync",
|
|
1899
|
+
get() {
|
|
1900
|
+
return n.getScale();
|
|
1901
|
+
},
|
|
1902
|
+
subscribe(e) {
|
|
1903
|
+
let t = i.size === 0;
|
|
1904
|
+
return i.add(e), t && o(), () => {
|
|
1905
|
+
i.delete(e) && i.size === 0 && s();
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
function di(e, t = {}, n = {}) {
|
|
1911
|
+
try {
|
|
1912
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = 1, o = {
|
|
1913
|
+
...n,
|
|
1914
|
+
globalvar: "globalObject",
|
|
1915
|
+
globalObject: t,
|
|
1916
|
+
getScaleHelper(e, n, o) {
|
|
1917
|
+
let s = e + ":" + n, c = i.get(s);
|
|
1918
|
+
if (c) return c;
|
|
1919
|
+
let l = r.get(s);
|
|
1920
|
+
l || (l = ui(e, n, o, "__scale_dependency_" + a++), r.set(s, l));
|
|
1921
|
+
let u = "__scale_helper_" + a++, d = {
|
|
1922
|
+
codeName: u,
|
|
1923
|
+
dependency: l
|
|
1924
|
+
};
|
|
1925
|
+
return i.set(s, d), t[u] = si(e, o), d;
|
|
1926
|
+
}
|
|
1927
|
+
}, s = Xr({
|
|
1928
|
+
forbidden: [],
|
|
1929
|
+
allowed: ["datum", "undefined"],
|
|
1930
|
+
globalvar: "globalObject",
|
|
1931
|
+
fieldvar: "datum",
|
|
1932
|
+
functions: (e) => ii(e, o)
|
|
1933
|
+
})(Kr(e)), c = Function("datum", "globalObject", `"use strict";
|
|
1934
|
+
try {
|
|
1935
|
+
return (${s.code});
|
|
1936
|
+
} catch (e) {
|
|
1937
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
1938
|
+
}`).bind(ni), l = (e) => c(e, t);
|
|
1939
|
+
return l.fields = s.fields, l.globals = s.globals, l.code = s.code, l.scaleDependencies = Array.from(r.values()), l;
|
|
1940
|
+
} catch (t) {
|
|
1941
|
+
throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
var fi = Xr({
|
|
1945
|
+
forbidden: [],
|
|
1946
|
+
allowed: ["event"],
|
|
1947
|
+
globalvar: "globalObject"
|
|
1948
|
+
});
|
|
1949
|
+
function pi(e) {
|
|
1950
|
+
try {
|
|
1951
|
+
let t = fi(Kr(e));
|
|
1952
|
+
return Function("event", "globalObject", `"use strict";
|
|
1953
|
+
try {
|
|
1954
|
+
return !!(${t.code});
|
|
1955
|
+
} catch (e) {
|
|
1956
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
1957
|
+
}`);
|
|
1958
|
+
} catch (t) {
|
|
1959
|
+
throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
//#endregion
|
|
1963
|
+
//#region ../core/src/utils/interactionConfig.js
|
|
1964
|
+
function mi(e) {
|
|
1965
|
+
if (typeof e == "string") {
|
|
1966
|
+
let t = e.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);
|
|
1967
|
+
if (!t) throw Error(`Invalid event type string: ${e}`);
|
|
1968
|
+
let [, n, r] = t, i = { type: n };
|
|
1969
|
+
return r && (i.filter = r), i;
|
|
1970
|
+
} else return e;
|
|
1971
|
+
}
|
|
1972
|
+
function hi(e) {
|
|
1973
|
+
return e?.filter ? pi(e.filter) : () => !0;
|
|
1974
|
+
}
|
|
1975
|
+
function gi(e, t, n) {
|
|
1976
|
+
if (!t.includes(e.type)) throw Error(n);
|
|
1977
|
+
return e;
|
|
1978
|
+
}
|
|
1979
|
+
//#endregion
|
|
1980
|
+
//#region ../core/src/selection/selection.js
|
|
1981
|
+
function _i(e) {
|
|
1982
|
+
return {
|
|
1983
|
+
type: "single",
|
|
1984
|
+
datum: e,
|
|
1985
|
+
uniqueId: e?.[T]
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
function vi(e) {
|
|
1989
|
+
return e ??= [], {
|
|
1990
|
+
type: "multi",
|
|
1991
|
+
data: new Map(e.map((e) => [e[T], e]))
|
|
1992
|
+
};
|
|
1993
|
+
}
|
|
1994
|
+
function yi(e, t) {
|
|
1995
|
+
if (!t || t.length === 0) return;
|
|
1996
|
+
let n = t.map((e) => vt(e)), r = (e) => n.map((t) => t(e));
|
|
1997
|
+
if (Ti(e)) return e.datum ? [r(e.datum)] : [];
|
|
1998
|
+
if (Ei(e)) return [...e.data.values()].map(r);
|
|
1999
|
+
throw Error(`Expected a point selection, got: ${JSON.stringify(e)}`);
|
|
2000
|
+
}
|
|
2001
|
+
function bi(e, t, n, r) {
|
|
2002
|
+
if (!t || t.length === 0) return;
|
|
2003
|
+
if (e === "single" && n.length > 1) throw Error("Single point selections expect at most one key tuple.");
|
|
2004
|
+
let i = [], a = [];
|
|
2005
|
+
for (let e of n) {
|
|
2006
|
+
let n = r(t, e);
|
|
2007
|
+
n ? i.push(n) : a.push(e);
|
|
2008
|
+
}
|
|
2009
|
+
return {
|
|
2010
|
+
selection: e === "single" ? _i(i[0] ?? null) : vi(i),
|
|
2011
|
+
unresolved: a
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
function xi(e) {
|
|
2015
|
+
return {
|
|
2016
|
+
type: "interval",
|
|
2017
|
+
intervals: Object.fromEntries(e.map((e) => [e, null]))
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
function Si(e, { add: t, remove: n, toggle: r }) {
|
|
2021
|
+
let i = e.data;
|
|
2022
|
+
for (let e of t ?? []) i.set(e[T], e);
|
|
2023
|
+
for (let e of n ?? []) i.delete(e[T]);
|
|
2024
|
+
for (let e of r ?? []) {
|
|
2025
|
+
let t = e[T];
|
|
2026
|
+
i.has(t) ? i.delete(t) : i.set(t, e);
|
|
2027
|
+
}
|
|
2028
|
+
return {
|
|
2029
|
+
type: "multi",
|
|
2030
|
+
data: i
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
function Ci(e, t) {
|
|
2034
|
+
let n = !!(e.empty ?? !0), r = Li(e.param), i = e.fields ?? {};
|
|
2035
|
+
if (Ti(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(T)}]`;
|
|
2036
|
+
if (Ei(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(T)}])`;
|
|
2037
|
+
if (wi(t)) {
|
|
2038
|
+
let a = Object.keys(t.intervals), o = Object.keys(i).filter(Yt);
|
|
2039
|
+
if (o.length === 0) throw Error("Filtering using interval selections requires at least one primary positional channel in the config! " + JSON.stringify(e));
|
|
2040
|
+
if (o.some((e) => !a.includes(e))) throw Error(`Selection channels (${a.join(", ")}) do not match the fields: ${JSON.stringify(e)}!`);
|
|
2041
|
+
let s = (e) => `datum[${JSON.stringify(e)}]`;
|
|
2042
|
+
return a.map((e) => {
|
|
2043
|
+
let t = rn(e), a = i[e], o = i[t] ?? i[e], c = `${r}.intervals.${e}[0] <= ${s(o)}`, l = `${s(a)} <= ${r}.intervals.${e}[1]`;
|
|
2044
|
+
return `(${r}.intervals.${e} ? (${c} && ${l}) : ${n})`;
|
|
2045
|
+
}).join(" && ");
|
|
2046
|
+
} else throw Error(`Unrecognized selection type : ${JSON.stringify(t)}`);
|
|
2047
|
+
}
|
|
2048
|
+
function wi(e) {
|
|
2049
|
+
return e.type === "interval";
|
|
2050
|
+
}
|
|
2051
|
+
function Ti(e) {
|
|
2052
|
+
return e.type === "single";
|
|
2053
|
+
}
|
|
2054
|
+
function Ei(e) {
|
|
2055
|
+
return e.type === "multi";
|
|
2056
|
+
}
|
|
2057
|
+
function Di(e) {
|
|
2058
|
+
let t = typeof e == "string" ? { type: e } : { ...e };
|
|
2059
|
+
return t.on = t.on ? mi(t.on) : Oi(t) ? { type: "click" } : void 0, t.clear = t.clear === !1 ? void 0 : t.clear === !0 || t.clear == null ? { type: "dblclick" } : mi(t.clear), Oi(t) && t.on.type === "click" && (t.toggle = !0), t;
|
|
2060
|
+
}
|
|
2061
|
+
function Oi(e) {
|
|
2062
|
+
return e && e.type == "point";
|
|
2063
|
+
}
|
|
2064
|
+
function ki(e) {
|
|
2065
|
+
return e && e.type == "interval";
|
|
2066
|
+
}
|
|
2067
|
+
function Ai(e) {
|
|
2068
|
+
return Object.values(e.intervals).some((e) => e && e.length === 2);
|
|
2069
|
+
}
|
|
2070
|
+
function ji(e, t) {
|
|
2071
|
+
return Object.entries(e.intervals).every(([e, n]) => (e == "x" || e == "y") && n && n[0] <= t[e] && n[1] >= t[e]);
|
|
2072
|
+
}
|
|
2073
|
+
//#endregion
|
|
2074
|
+
//#region ../core/src/ruler/rulerValue.js
|
|
2075
|
+
function Mi(e = ["x"], t = {}) {
|
|
2076
|
+
let n = {};
|
|
2077
|
+
for (let r of e) n[r] = t[r] ?? null;
|
|
2078
|
+
return {
|
|
2079
|
+
type: "ruler",
|
|
2080
|
+
values: n
|
|
2081
|
+
};
|
|
2082
|
+
}
|
|
2083
|
+
//#endregion
|
|
2084
|
+
//#region ../core/src/paramRuntime/paramUtils.js
|
|
2085
|
+
function $(e) {
|
|
2086
|
+
return typeof e == "object" && !!e && "expr" in e && w(e.expr);
|
|
2087
|
+
}
|
|
2088
|
+
function Ni(e) {
|
|
2089
|
+
if ($(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
|
|
2090
|
+
return e;
|
|
2091
|
+
}
|
|
2092
|
+
function Pi(e) {
|
|
2093
|
+
return ("expr" in e || "bind" in e) && !("select" in e) && !("ruler" in e);
|
|
2094
|
+
}
|
|
2095
|
+
function Fi(e) {
|
|
2096
|
+
return !("expr" in e || "bind" in e) && "select" in e;
|
|
2097
|
+
}
|
|
2098
|
+
function Ii(e) {
|
|
2099
|
+
return !("expr" in e || "bind" in e || "select" in e) && "ruler" in e;
|
|
2100
|
+
}
|
|
2101
|
+
function Li(e) {
|
|
2102
|
+
if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)) throw Error("Invalid parameter name: " + e + ". Must be a valid JavaScript identifier.");
|
|
2103
|
+
return e;
|
|
2104
|
+
}
|
|
2105
|
+
function Ri(e, t, n) {
|
|
2106
|
+
if ("select" in e) {
|
|
2107
|
+
let t = Di(e.select);
|
|
2108
|
+
if (Oi(t)) return t.toggle ? vi() : _i(null);
|
|
2109
|
+
if (ki(t)) {
|
|
2110
|
+
if (!t.encodings) throw Error("Interval selection \"" + e.name + "\" must have encodings defined!");
|
|
2111
|
+
return xi(t.encodings);
|
|
2112
|
+
}
|
|
2113
|
+
throw Error("Unknown selection config for parameter \"" + e.name + "\".");
|
|
2114
|
+
}
|
|
2115
|
+
if ("ruler" in e) return Mi(e.ruler.encodings, e.value);
|
|
2116
|
+
if ("expr" in e) {
|
|
2117
|
+
let r = n ?? t?.createExpression(e.expr);
|
|
2118
|
+
if (!r) throw Error("Cannot evaluate expression for parameter \"" + e.name + "\".");
|
|
2119
|
+
return r(null);
|
|
2120
|
+
}
|
|
2121
|
+
return "value" in e ? e.value : null;
|
|
2122
|
+
}
|
|
2123
|
+
function zi(e, t, n, r, i = {}) {
|
|
2124
|
+
let a = { ...t }, o = /* @__PURE__ */ new Set(), s = !1, c = !1, l = i.batchMode ?? "microtask";
|
|
2125
|
+
r?.(() => {
|
|
2126
|
+
c = !0, o.clear(), s = !1;
|
|
2127
|
+
});
|
|
2128
|
+
let u = () => {
|
|
2129
|
+
if (c) return;
|
|
2130
|
+
if (!n || o.size === 0) {
|
|
2131
|
+
s = !1;
|
|
2132
|
+
return;
|
|
2133
|
+
}
|
|
2134
|
+
let e = new Set(o);
|
|
2135
|
+
o.clear(), s = !1, n(e);
|
|
2136
|
+
}, d = (t) => {
|
|
2137
|
+
c || (o.add(t), s || (s = !0, queueMicrotask(() => {
|
|
2138
|
+
c || (l == "whenPropagated" && e.whenPropagated ? e.whenPropagated().then(u).catch(() => {
|
|
2139
|
+
u();
|
|
2140
|
+
}) : u());
|
|
2141
|
+
})));
|
|
2142
|
+
};
|
|
2143
|
+
for (let [i, o] of Object.entries(t)) if ($(o)) if (n) {
|
|
2144
|
+
let t = () => d(i), n = e.watchExpression ? e.watchExpression(o.expr, t, {
|
|
2145
|
+
scopeOwned: !r,
|
|
2146
|
+
registerDisposer: r
|
|
2147
|
+
}) : e.createExpression(o.expr);
|
|
2148
|
+
if (!e.watchExpression) {
|
|
2149
|
+
let e = n.subscribe(t);
|
|
2150
|
+
r?.(e);
|
|
2151
|
+
}
|
|
2152
|
+
Object.defineProperty(a, i, {
|
|
2153
|
+
enumerable: !0,
|
|
2154
|
+
get() {
|
|
2155
|
+
return n();
|
|
2156
|
+
}
|
|
2157
|
+
});
|
|
2158
|
+
} else {
|
|
2159
|
+
let t = e.createExpression(o.expr);
|
|
2160
|
+
Object.defineProperty(a, i, {
|
|
2161
|
+
enumerable: !0,
|
|
2162
|
+
get() {
|
|
2163
|
+
return t();
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
else a[i] = o;
|
|
2168
|
+
return a;
|
|
2169
|
+
}
|
|
2170
|
+
function Bi(e, t, n, r) {
|
|
2171
|
+
if (!$(t)) return t;
|
|
2172
|
+
let i = () => {
|
|
2173
|
+
throw Error(n);
|
|
2174
|
+
}, a = e.watchExpression ? e.watchExpression(t.expr, i, {
|
|
2175
|
+
scopeOwned: !1,
|
|
2176
|
+
registerDisposer: r
|
|
2177
|
+
}) : e.createExpression(t.expr);
|
|
2178
|
+
if (!e.watchExpression) {
|
|
2179
|
+
let e = a.subscribe(i);
|
|
2180
|
+
r?.(e);
|
|
2181
|
+
}
|
|
2182
|
+
return a();
|
|
2183
|
+
}
|
|
2184
|
+
function Vi(e) {
|
|
2185
|
+
return Object.assign(() => e, {
|
|
2186
|
+
subscribe: () => () => void 0,
|
|
2187
|
+
invalidate: () => void 0,
|
|
2188
|
+
identifier: () => "constant",
|
|
2189
|
+
fields: [],
|
|
2190
|
+
globals: [],
|
|
2191
|
+
code: JSON.stringify(e)
|
|
2192
|
+
});
|
|
2193
|
+
}
|
|
2194
|
+
//#endregion
|
|
2195
|
+
export { Xt as $, d as $t, di as A, Ve as At, Qt as B, be as Bt, bi as C, Ye as Ct, hi as D, at as Dt, mi as E, w as Et, Rt as F, Ue as Ft, Vt as G, y as Gt, rn as H, _e as Ht, Bt as I, We as It, sn as J, g as Jt, on as K, te as Kt, un as L, Ge as Lt, Qr as M, ot as Mt, Zr as N, De as Nt, gi as O, ze as Ot, At as P, ct as Pt, Zt as Q, f as Qt, Mt as R, Ke as Rt, Ci as S, nt as St, Si as T, je as Tt, Lt as U, me as Ut, an as V, ye as Vt, cn as W, he as Wt, E as X, m as Xt, Ht as Y, h as Yt, zt as Z, p as Zt, wi as _, xe as _t, Fi as a, bt as at, Oi as b, Ee as bt, Li as c, vt as ct, Di as d, mt as dt, u as en, Yt as et, xi as f, lt as ft, Ai as g, st as gt, yi as h, ft as ht, Ii as i, i as in, $t as it, $r as j, C as jt, ri as k, Be as kt, Ni as l, _t as lt, _i as m, pt as mt, Ri as n, s as nn, It as nt, Pi as o, Tt as ot, vi as p, dt as pt, D as q, _ as qt, $ as r, o as rn, Gt as rt, Bi as s, xt as st, zi as t, l as tn, nn as tt, Mi as u, T as ut, ki as v, Je as vt, ji as w, rt as wt, Ti as x, Ae as xt, Ei as y, Ze as yt, Nt as z, ve as zt };
|