@genome-spy/app 1.2.0 → 1.3.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/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
- package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
- package/dist/{agentApi-8hMSlqAQ.js → agentApi-BclFF9zB.js} +7130 -7509
- package/dist/agentApi.es.js +4344 -4015
- package/dist/agentShared.es.js +431 -458
- package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
- package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
- package/dist/{canvas2d-Bd8H8MMo.js → canvas2d-8MSf70d4.js} +78 -86
- package/dist/{canvas2d-D6VYooRf.js → canvas2d-BwGNI_Rx.js} +83 -91
- package/dist/clipOptions-SrrxeAEU.js +4316 -0
- package/dist/clipOptions-clBEbkjv.js +4326 -0
- package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
- package/dist/color-uTRRsy8i.js +116 -0
- package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
- package/dist/{containerView-aEVmYmkA.js → containerView-BItRtKqu.js} +5 -1
- package/dist/{containerView-CRJSc4bM.js → containerView-CWa6ZIJW.js} +5 -1
- package/dist/{debug-CQ0agCrd.js → debug-23s-jja_.js} +3 -2
- package/dist/{debug-DkIMiGdW.js → debug-CWRxvAss.js} +2 -3
- package/dist/dialog.es.js +1 -1
- package/dist/dist-CmY6iewb.js +1501 -0
- package/dist/dist-D6xbz5Ks.js +1501 -0
- package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
- package/dist/esm-BUkWqSr2.js +299 -0
- package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
- package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
- package/dist/esm-C6erfjPM.js +252 -0
- package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
- package/dist/esm-CqY5ezGz.js +1249 -0
- package/dist/esm-DfMIJ_N2.js +1522 -0
- package/dist/esm-Dls41IbZ.js +787 -0
- package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
- package/dist/esm-aGLCvYRP.js +238 -0
- package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
- package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
- package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
- package/dist/flowNode-BSjy0Wz3.js +1306 -0
- package/dist/flowOutput-D5qpxWe0.js +183 -0
- package/dist/index.es.js +4756 -5528
- package/dist/index.js +707 -547
- package/dist/inflate-BdC5KvHn.js +886 -0
- package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
- package/dist/{markUtils-CvLDz744.js → markUtils-RaatLEa-.js} +9 -6
- package/dist/metadataUtils-DxEPe0vj.js +879 -0
- package/dist/{order-BVvkjDRT.js → order-BnKzKjt4.js} +383 -347
- package/dist/{order-DmMoZsi1.js → order-BpJnq_nV.js} +375 -339
- package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
- package/dist/{rasterExport-jeRVq6kY.js → rasterExport-B-WrX1pa.js} +5 -5
- package/dist/{rasterExport-DxvowWjH.js → rasterExport-C_vx4Jwd.js} +3 -3
- package/dist/{rasterization-DFj3Cvx4.js → rasterization-QktH8Sn2.js} +1 -1
- package/dist/{rectangle-Dl4Dy0hS.js → rectangle-BAdoDPXu.js} +34 -31
- package/dist/{renderCanvas2D-Bfm1NHFu.js → renderCanvas2D-CsRO78Pq.js} +88 -87
- package/dist/{renderCanvas2D-DVjhp834.js → renderCanvas2D-Y7pkRzbC.js} +93 -92
- package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
- package/dist/{indexer-DOYMJ-Md.js → scaleNull-CVzag4z8.js} +2 -12
- package/dist/{indexer-DDC0YRGn.js → scaleNull-Pbz7QGnl.js} +2 -12
- package/dist/{scalePosition-0aeqp_kz.js → scalePosition-CRXa0rCC.js} +1 -1
- package/dist/schema.json +3801 -816
- package/dist/{svg-Bm2zxBPu.js → svg-BBMtLgtM.js} +369 -285
- package/dist/{svg-CkfuhONt.js → svg-JjWL6U-T.js} +371 -287
- package/dist/{svgRasterizer-DoRQEqFA.js → svgRasterizer-6OcftuoI.js} +2 -2
- package/dist/{svgRasterizer-raDDhBF-.js → svgRasterizer-DkNRaCPs.js} +4 -4
- package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
- package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
- package/dist/url-DeOdSRrv.js +183 -0
- package/dist/{viewError-BkJeVYXA.js → viewError-B0TMfOpB.js} +1 -1
- package/dist/{viewError-IYqyluc7.js → viewError-D9aO90cI.js} +1 -1
- package/dist/{viewSelectors-7LyasQN-.js → viewSelectors-DkFvo33d.js} +832 -734
- package/dist/{viewSelectors-CbmkSQRT.js → viewSelectors-lM93fHAq.js} +900 -802
- package/dist/{viewUtils-DuddMNNw.js → viewUtils-0SJOewM6.js} +1861 -2459
- package/dist/webgl-CXIO3OQz.js +5782 -0
- package/dist/webgl-Pdvfhio5.js +5783 -0
- package/package.json +7 -5
- package/src/agentApi/index.d.ts +3 -2
- package/src/agentShared/index.d.ts +2 -0
- package/src/appTypes.d.ts +1 -6
- package/src/embedTypes.d.ts +36 -1
- package/src/index.d.ts +6 -0
- package/src/spec/sampleView.d.ts +68 -13
- package/src/state/paramProvenanceTypes.d.ts +25 -2
- package/src/state.d.ts +14 -52
- package/dist/clipOptions-DElJ8dTZ.js +0 -3097
- package/dist/clipOptions-D_wBNhzs.js +0 -3087
- package/dist/esm-Dndm-NaA.js +0 -1193
- package/dist/vega-scale-BoGHANI7.js +0 -2446
- package/dist/vega-scale-o9TRyzYH.js +0 -2443
- package/dist/webgl-CQfvgnxo.js +0 -5633
- package/dist/webgl-DVYkXtiZ.js +0 -5632
|
@@ -0,0 +1,4316 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-DeIk2rA4.js";
|
|
2
|
+
import { $ as t, A as n, B as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as ee, Q as te, R as g, S as ne, T as re, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, b as ue, et as de, g as fe, j as pe, k as me, nt as he, q as ge, t as _e, tt as ve, z as ye } from "./arrayUtils-Bm7QnzhN.js";
|
|
3
|
+
//#region ../../node_modules/vega-util/build/vega-util.js
|
|
4
|
+
function _(e, t, n) {
|
|
5
|
+
return e.fields = t || [], e.fname = n, e;
|
|
6
|
+
}
|
|
7
|
+
function be(e) {
|
|
8
|
+
return e == null ? null : e.fname;
|
|
9
|
+
}
|
|
10
|
+
function xe(e) {
|
|
11
|
+
return e == null ? null : e.fields;
|
|
12
|
+
}
|
|
13
|
+
function Se(e) {
|
|
14
|
+
return e.length === 1 ? Ce(e[0]) : we(e);
|
|
15
|
+
}
|
|
16
|
+
var Ce = (e) => function(t) {
|
|
17
|
+
return t[e];
|
|
18
|
+
}, we = (e) => {
|
|
19
|
+
let t = e.length;
|
|
20
|
+
return function(n) {
|
|
21
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
22
|
+
return n;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
function Te(e) {
|
|
26
|
+
throw Error(e);
|
|
27
|
+
}
|
|
28
|
+
function Ee(e) {
|
|
29
|
+
let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
|
|
30
|
+
e += "";
|
|
31
|
+
function l() {
|
|
32
|
+
t.push(a + e.substring(o, s)), a = "", o = s + 1;
|
|
33
|
+
}
|
|
34
|
+
for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
|
|
35
|
+
else if (c === r) l(), r = null, i = -1;
|
|
36
|
+
else if (r) continue;
|
|
37
|
+
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 || Te("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
38
|
+
return i && Te("Access path missing closing bracket: " + e), r && Te("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
39
|
+
}
|
|
40
|
+
function De(e, t, n) {
|
|
41
|
+
let r = Ee(e);
|
|
42
|
+
return e = r.length === 1 ? r[0] : e, _((n && n.get || Se)(r), [e], t || e);
|
|
43
|
+
}
|
|
44
|
+
De("id");
|
|
45
|
+
var Oe = _((e) => e, [], "identity");
|
|
46
|
+
_(() => 0, [], "zero"), _(() => 1, [], "one"), _(() => !0, [], "true"), _(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
47
|
+
var ke = Array.isArray;
|
|
48
|
+
function Ae(e) {
|
|
49
|
+
return e === Object(e);
|
|
50
|
+
}
|
|
51
|
+
function je(e) {
|
|
52
|
+
return e[e.length - 1];
|
|
53
|
+
}
|
|
54
|
+
function Me(e) {
|
|
55
|
+
return e == null || e === "" ? null : +e;
|
|
56
|
+
}
|
|
57
|
+
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;
|
|
58
|
+
function Re(e, t, n, r) {
|
|
59
|
+
let i = n(e[0]), a = n(je(e)), o = (a - i) * t;
|
|
60
|
+
return [r(i - o), r(a - o)];
|
|
61
|
+
}
|
|
62
|
+
function ze(e, t) {
|
|
63
|
+
return Re(e, t, Me, Oe);
|
|
64
|
+
}
|
|
65
|
+
function Be(e, t) {
|
|
66
|
+
var n = Math.sign(e[0]);
|
|
67
|
+
return Re(e, t, Pe(n), Ne(n));
|
|
68
|
+
}
|
|
69
|
+
function Ve(e, t, n) {
|
|
70
|
+
return Re(e, t, Le(n), Le(1 / n));
|
|
71
|
+
}
|
|
72
|
+
function He(e, t, n, r, i) {
|
|
73
|
+
let a = r(e[0]), o = r(je(e)), s = t == null ? (a + o) / 2 : r(t);
|
|
74
|
+
return [i(s + (a - s) * n), i(s + (o - s) * n)];
|
|
75
|
+
}
|
|
76
|
+
function Ue(e, t, n) {
|
|
77
|
+
return He(e, t, n, Me, Oe);
|
|
78
|
+
}
|
|
79
|
+
function We(e, t, n) {
|
|
80
|
+
let r = Math.sign(e[0]);
|
|
81
|
+
return He(e, t, n, Pe(r), Ne(r));
|
|
82
|
+
}
|
|
83
|
+
function Ge(e, t, n, r) {
|
|
84
|
+
return He(e, t, n, Le(r), Le(1 / r));
|
|
85
|
+
}
|
|
86
|
+
function Ke(e, t, n, r) {
|
|
87
|
+
return He(e, t, n, Fe(r), Ie(r));
|
|
88
|
+
}
|
|
89
|
+
function qe(e) {
|
|
90
|
+
return e == null ? [] : ke(e) ? e : [e];
|
|
91
|
+
}
|
|
92
|
+
function Je(e, t, n) {
|
|
93
|
+
let r = e[0], i = e[1], a;
|
|
94
|
+
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];
|
|
95
|
+
}
|
|
96
|
+
function Ye(e) {
|
|
97
|
+
return typeof e == "function";
|
|
98
|
+
}
|
|
99
|
+
var Xe = "descending";
|
|
100
|
+
function Ze(e, t, n) {
|
|
101
|
+
n ||= {}, t = qe(t) || [];
|
|
102
|
+
let r = [], i = [], a = {}, o = n.comparator || $e;
|
|
103
|
+
return qe(e).forEach((e, o) => {
|
|
104
|
+
e != null && (r.push(t[o] === Xe ? -1 : 1), i.push(e = Ye(e) ? e : De(e, null, n)), (xe(e) || []).forEach((e) => a[e] = 1));
|
|
105
|
+
}), i.length === 0 ? null : _(o(i, r), Object.keys(a));
|
|
106
|
+
}
|
|
107
|
+
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) {
|
|
108
|
+
return Qe(e(n), e(r)) * t;
|
|
109
|
+
}, tt = (e, t, n) => (t.push(0), function(r, i) {
|
|
110
|
+
let a, o = 0, s = -1;
|
|
111
|
+
for (; o === 0 && ++s < n;) a = e[s], o = Qe(a(r), a(i));
|
|
112
|
+
return o * t[s];
|
|
113
|
+
});
|
|
114
|
+
function nt(e, t, n, r) {
|
|
115
|
+
let i = t[0], a = t[t.length - 1], o;
|
|
116
|
+
return i > a && (o = i, i = a, a = o), n = n === void 0 || n, r = r === void 0 || r, (n ? i <= e : i < e) && (r ? e <= a : e < a);
|
|
117
|
+
}
|
|
118
|
+
function rt(e) {
|
|
119
|
+
return typeof e == "boolean";
|
|
120
|
+
}
|
|
121
|
+
function it(e) {
|
|
122
|
+
return typeof e == "number";
|
|
123
|
+
}
|
|
124
|
+
function at(e) {
|
|
125
|
+
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
126
|
+
}
|
|
127
|
+
function ot(e) {
|
|
128
|
+
return typeof e == "string";
|
|
129
|
+
}
|
|
130
|
+
function st(e, t) {
|
|
131
|
+
let n = e[0], r = je(e), i = +t;
|
|
132
|
+
return i ? i === 1 ? r : n + i * (r - n) : n;
|
|
133
|
+
}
|
|
134
|
+
function ct(e) {
|
|
135
|
+
return e && je(e) - e[0] || 0;
|
|
136
|
+
}
|
|
137
|
+
function lt(e) {
|
|
138
|
+
return ke(e) ? `[${e.map((e) => e === null ? "null" : lt(e))}]` : Ae(e) || ot(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
|
|
139
|
+
}
|
|
140
|
+
function ut(e) {
|
|
141
|
+
let t = {}, n = e.length;
|
|
142
|
+
for (let r = 0; r < n; ++r) t[e[r]] = !0;
|
|
143
|
+
return t;
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region ../../node_modules/d3-array/src/ascending.js
|
|
147
|
+
function dt(e, t) {
|
|
148
|
+
return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region ../../node_modules/d3-array/src/descending.js
|
|
152
|
+
function ft(e, t) {
|
|
153
|
+
return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region ../../node_modules/d3-array/src/bisector.js
|
|
157
|
+
function pt(e) {
|
|
158
|
+
let t, n, r;
|
|
159
|
+
e.length === 2 ? (t = e === dt || e === ft ? e : mt, n = e, r = e) : (t = dt, n = (t, n) => dt(e(t), n), r = (t, n) => e(t) - n);
|
|
160
|
+
function i(e, r, i = 0, a = e.length) {
|
|
161
|
+
if (i < a) {
|
|
162
|
+
if (t(r, r) !== 0) return a;
|
|
163
|
+
do {
|
|
164
|
+
let t = i + a >>> 1;
|
|
165
|
+
n(e[t], r) < 0 ? i = t + 1 : a = t;
|
|
166
|
+
} while (i < a);
|
|
167
|
+
}
|
|
168
|
+
return i;
|
|
169
|
+
}
|
|
170
|
+
function a(e, r, i = 0, a = e.length) {
|
|
171
|
+
if (i < a) {
|
|
172
|
+
if (t(r, r) !== 0) return a;
|
|
173
|
+
do {
|
|
174
|
+
let t = i + a >>> 1;
|
|
175
|
+
n(e[t], r) <= 0 ? i = t + 1 : a = t;
|
|
176
|
+
} while (i < a);
|
|
177
|
+
}
|
|
178
|
+
return i;
|
|
179
|
+
}
|
|
180
|
+
function o(e, t, n = 0, a = e.length) {
|
|
181
|
+
let o = i(e, t, n, a - 1);
|
|
182
|
+
return o > n && r(e[o - 1], t) > -r(e[o], t) ? o - 1 : o;
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
left: i,
|
|
186
|
+
center: o,
|
|
187
|
+
right: a
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function mt() {
|
|
191
|
+
return 0;
|
|
192
|
+
}
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region ../../node_modules/d3-array/src/number.js
|
|
195
|
+
function ht(e) {
|
|
196
|
+
return e === null ? NaN : +e;
|
|
197
|
+
}
|
|
198
|
+
function* gt(e, t) {
|
|
199
|
+
if (t === void 0) for (let t of e) t != null && (t = +t) >= t && (yield t);
|
|
200
|
+
else {
|
|
201
|
+
let n = -1;
|
|
202
|
+
for (let r of e) (r = t(r, ++n, e)) != null && (r = +r) >= r && (yield r);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region ../../node_modules/d3-array/src/bisect.js
|
|
207
|
+
var _t = pt(dt), v = _t.right, vt = _t.left;
|
|
208
|
+
pt(ht).center;
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region ../../node_modules/internmap/src/index.js
|
|
211
|
+
var yt = class extends Map {
|
|
212
|
+
constructor(e, t = Ct) {
|
|
213
|
+
if (super(), Object.defineProperties(this, {
|
|
214
|
+
_intern: { value: /* @__PURE__ */ new Map() },
|
|
215
|
+
_key: { value: t }
|
|
216
|
+
}), e != null) for (let [t, n] of e) this.set(t, n);
|
|
217
|
+
}
|
|
218
|
+
get(e) {
|
|
219
|
+
return super.get(bt(this, e));
|
|
220
|
+
}
|
|
221
|
+
has(e) {
|
|
222
|
+
return super.has(bt(this, e));
|
|
223
|
+
}
|
|
224
|
+
set(e, t) {
|
|
225
|
+
return super.set(xt(this, e), t);
|
|
226
|
+
}
|
|
227
|
+
delete(e) {
|
|
228
|
+
return super.delete(St(this, e));
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
function bt({ _intern: e, _key: t }, n) {
|
|
232
|
+
let r = t(n);
|
|
233
|
+
return e.has(r) ? e.get(r) : n;
|
|
234
|
+
}
|
|
235
|
+
function xt({ _intern: e, _key: t }, n) {
|
|
236
|
+
let r = t(n);
|
|
237
|
+
return e.has(r) ? e.get(r) : (e.set(r, n), n);
|
|
238
|
+
}
|
|
239
|
+
function St({ _intern: e, _key: t }, n) {
|
|
240
|
+
let r = t(n);
|
|
241
|
+
return e.has(r) && (n = e.get(r), e.delete(r)), n;
|
|
242
|
+
}
|
|
243
|
+
function Ct(e) {
|
|
244
|
+
return typeof e == "object" && e ? e.valueOf() : e;
|
|
245
|
+
}
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region ../../node_modules/d3-array/src/permute.js
|
|
248
|
+
function wt(e, t) {
|
|
249
|
+
return Array.from(t, (t) => e[t]);
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region ../../node_modules/d3-array/src/sort.js
|
|
253
|
+
function Tt(e, ...t) {
|
|
254
|
+
if (typeof e[Symbol.iterator] != "function") throw TypeError("values is not iterable");
|
|
255
|
+
e = Array.from(e);
|
|
256
|
+
let [n] = t;
|
|
257
|
+
if (n && n.length !== 2 || t.length > 1) {
|
|
258
|
+
let r = Uint32Array.from(e, (e, t) => t);
|
|
259
|
+
return t.length > 1 ? (t = t.map((t) => e.map(t)), r.sort((e, n) => {
|
|
260
|
+
for (let r of t) {
|
|
261
|
+
let t = Dt(r[e], r[n]);
|
|
262
|
+
if (t) return t;
|
|
263
|
+
}
|
|
264
|
+
})) : (n = e.map(n), r.sort((e, t) => Dt(n[e], n[t]))), wt(e, r);
|
|
265
|
+
}
|
|
266
|
+
return e.sort(Et(n));
|
|
267
|
+
}
|
|
268
|
+
function Et(e = dt) {
|
|
269
|
+
if (e === dt) return Dt;
|
|
270
|
+
if (typeof e != "function") throw TypeError("compare is not a function");
|
|
271
|
+
return (t, n) => {
|
|
272
|
+
let r = e(t, n);
|
|
273
|
+
return r || r === 0 ? r : (e(n, n) === 0) - (e(t, t) === 0);
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function Dt(e, t) {
|
|
277
|
+
return (e == null || !(e >= e)) - (t == null || !(t >= t)) || (e < t ? -1 : +(e > t));
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region ../../node_modules/d3-array/src/max.js
|
|
281
|
+
function Ot(e, t) {
|
|
282
|
+
let n;
|
|
283
|
+
if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
|
|
284
|
+
else {
|
|
285
|
+
let r = -1;
|
|
286
|
+
for (let i of e) (i = t(i, ++r, e)) != null && (n < i || n === void 0 && i >= i) && (n = i);
|
|
287
|
+
}
|
|
288
|
+
return n;
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region ../../node_modules/d3-array/src/min.js
|
|
292
|
+
function kt(e, t) {
|
|
293
|
+
let n;
|
|
294
|
+
if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
|
|
295
|
+
else {
|
|
296
|
+
let r = -1;
|
|
297
|
+
for (let i of e) (i = t(i, ++r, e)) != null && (n > i || n === void 0 && i >= i) && (n = i);
|
|
298
|
+
}
|
|
299
|
+
return n;
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region ../../node_modules/d3-array/src/quickselect.js
|
|
303
|
+
function At(e, t, n = 0, r = Infinity, i) {
|
|
304
|
+
if (t = Math.floor(t), n = Math.floor(Math.max(0, n)), r = Math.floor(Math.min(e.length - 1, r)), !(n <= t && t <= r)) return e;
|
|
305
|
+
for (i = i === void 0 ? Dt : Et(i); r > n;) {
|
|
306
|
+
if (r - n > 600) {
|
|
307
|
+
let a = r - n + 1, o = t - n + 1, s = Math.log(a), c = .5 * Math.exp(2 * s / 3), l = .5 * Math.sqrt(s * c * (a - c) / a) * (o - a / 2 < 0 ? -1 : 1), u = Math.max(n, Math.floor(t - o * c / a + l)), d = Math.min(r, Math.floor(t + (a - o) * c / a + l));
|
|
308
|
+
At(e, t, u, d, i);
|
|
309
|
+
}
|
|
310
|
+
let a = e[t], o = n, s = r;
|
|
311
|
+
for (jt(e, n, t), i(e[r], a) > 0 && jt(e, n, r); o < s;) {
|
|
312
|
+
for (jt(e, o, s), ++o, --s; i(e[o], a) < 0;) ++o;
|
|
313
|
+
for (; i(e[s], a) > 0;) --s;
|
|
314
|
+
}
|
|
315
|
+
i(e[n], a) === 0 ? jt(e, n, s) : (++s, jt(e, s, r)), s <= t && (n = s + 1), t <= s && (r = s - 1);
|
|
316
|
+
}
|
|
317
|
+
return e;
|
|
318
|
+
}
|
|
319
|
+
function jt(e, t, n) {
|
|
320
|
+
let r = e[t];
|
|
321
|
+
e[t] = e[n], e[n] = r;
|
|
322
|
+
}
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region ../../node_modules/d3-array/src/quantile.js
|
|
325
|
+
function Mt(e, t, n) {
|
|
326
|
+
if (e = Float64Array.from(gt(e, n)), (r = e.length) && !isNaN(t = +t)) {
|
|
327
|
+
if (t <= 0 || r < 2) return kt(e);
|
|
328
|
+
if (t >= 1) return Ot(e);
|
|
329
|
+
var r, i = (r - 1) * t, a = Math.floor(i), o = Ot(At(e, a).subarray(0, a + 1));
|
|
330
|
+
return o + (kt(e.subarray(a + 1)) - o) * (i - a);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function Nt(e, t, n = ht) {
|
|
334
|
+
if ((r = e.length) && !isNaN(t = +t)) {
|
|
335
|
+
if (t <= 0 || r < 2) return +n(e[0], 0, e);
|
|
336
|
+
if (t >= 1) return +n(e[r - 1], r - 1, e);
|
|
337
|
+
var r, i = (r - 1) * t, a = Math.floor(i), o = +n(e[a], a, e);
|
|
338
|
+
return o + (+n(e[a + 1], a + 1, e) - o) * (i - a);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region ../../node_modules/d3-scale/src/init.js
|
|
343
|
+
function y(e, t) {
|
|
344
|
+
switch (arguments.length) {
|
|
345
|
+
case 0: break;
|
|
346
|
+
case 1:
|
|
347
|
+
this.range(e);
|
|
348
|
+
break;
|
|
349
|
+
default: this.range(t).domain(e);
|
|
350
|
+
}
|
|
351
|
+
return this;
|
|
352
|
+
}
|
|
353
|
+
function b(e, t) {
|
|
354
|
+
switch (arguments.length) {
|
|
355
|
+
case 0: break;
|
|
356
|
+
case 1:
|
|
357
|
+
typeof e == "function" ? this.interpolator(e) : this.range(e);
|
|
358
|
+
break;
|
|
359
|
+
default: this.domain(e), typeof t == "function" ? this.interpolator(t) : this.range(t);
|
|
360
|
+
}
|
|
361
|
+
return this;
|
|
362
|
+
}
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region ../../node_modules/d3-scale/src/ordinal.js
|
|
365
|
+
var Pt = Symbol("implicit");
|
|
366
|
+
function Ft() {
|
|
367
|
+
var e = new yt(), t = [], n = [], r = Pt;
|
|
368
|
+
function i(i) {
|
|
369
|
+
let a = e.get(i);
|
|
370
|
+
if (a === void 0) {
|
|
371
|
+
if (r !== Pt) return r;
|
|
372
|
+
e.set(i, a = t.push(i) - 1);
|
|
373
|
+
}
|
|
374
|
+
return n[a % n.length];
|
|
375
|
+
}
|
|
376
|
+
return i.domain = function(n) {
|
|
377
|
+
if (!arguments.length) return t.slice();
|
|
378
|
+
t = [], e = new yt();
|
|
379
|
+
for (let r of n) e.has(r) || e.set(r, t.push(r) - 1);
|
|
380
|
+
return i;
|
|
381
|
+
}, i.range = function(e) {
|
|
382
|
+
return arguments.length ? (n = Array.from(e), i) : n.slice();
|
|
383
|
+
}, i.unknown = function(e) {
|
|
384
|
+
return arguments.length ? (r = e, i) : r;
|
|
385
|
+
}, i.copy = function() {
|
|
386
|
+
return Ft(t, n).unknown(r);
|
|
387
|
+
}, y.apply(i, arguments), i;
|
|
388
|
+
}
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region ../../node_modules/d3-color/src/define.js
|
|
391
|
+
function It(e, t, n) {
|
|
392
|
+
e.prototype = t.prototype = n, n.constructor = e;
|
|
393
|
+
}
|
|
394
|
+
function Lt(e, t) {
|
|
395
|
+
var n = Object.create(e.prototype);
|
|
396
|
+
for (var r in t) n[r] = t[r];
|
|
397
|
+
return n;
|
|
398
|
+
}
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region ../../node_modules/d3-color/src/color.js
|
|
401
|
+
function Rt() {}
|
|
402
|
+
var zt = .7, Bt = 1 / zt, Vt = "\\s*([+-]?\\d+)\\s*", Ht = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", x = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ut = /^#([0-9a-f]{3,8})$/, Wt = RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`), Gt = RegExp(`^rgb\\(${x},${x},${x}\\)$`), Kt = RegExp(`^rgba\\(${Vt},${Vt},${Vt},${Ht}\\)$`), qt = RegExp(`^rgba\\(${x},${x},${x},${Ht}\\)$`), Jt = RegExp(`^hsl\\(${Ht},${x},${x}\\)$`), Yt = RegExp(`^hsla\\(${Ht},${x},${x},${Ht}\\)$`), Xt = {
|
|
403
|
+
aliceblue: 15792383,
|
|
404
|
+
antiquewhite: 16444375,
|
|
405
|
+
aqua: 65535,
|
|
406
|
+
aquamarine: 8388564,
|
|
407
|
+
azure: 15794175,
|
|
408
|
+
beige: 16119260,
|
|
409
|
+
bisque: 16770244,
|
|
410
|
+
black: 0,
|
|
411
|
+
blanchedalmond: 16772045,
|
|
412
|
+
blue: 255,
|
|
413
|
+
blueviolet: 9055202,
|
|
414
|
+
brown: 10824234,
|
|
415
|
+
burlywood: 14596231,
|
|
416
|
+
cadetblue: 6266528,
|
|
417
|
+
chartreuse: 8388352,
|
|
418
|
+
chocolate: 13789470,
|
|
419
|
+
coral: 16744272,
|
|
420
|
+
cornflowerblue: 6591981,
|
|
421
|
+
cornsilk: 16775388,
|
|
422
|
+
crimson: 14423100,
|
|
423
|
+
cyan: 65535,
|
|
424
|
+
darkblue: 139,
|
|
425
|
+
darkcyan: 35723,
|
|
426
|
+
darkgoldenrod: 12092939,
|
|
427
|
+
darkgray: 11119017,
|
|
428
|
+
darkgreen: 25600,
|
|
429
|
+
darkgrey: 11119017,
|
|
430
|
+
darkkhaki: 12433259,
|
|
431
|
+
darkmagenta: 9109643,
|
|
432
|
+
darkolivegreen: 5597999,
|
|
433
|
+
darkorange: 16747520,
|
|
434
|
+
darkorchid: 10040012,
|
|
435
|
+
darkred: 9109504,
|
|
436
|
+
darksalmon: 15308410,
|
|
437
|
+
darkseagreen: 9419919,
|
|
438
|
+
darkslateblue: 4734347,
|
|
439
|
+
darkslategray: 3100495,
|
|
440
|
+
darkslategrey: 3100495,
|
|
441
|
+
darkturquoise: 52945,
|
|
442
|
+
darkviolet: 9699539,
|
|
443
|
+
deeppink: 16716947,
|
|
444
|
+
deepskyblue: 49151,
|
|
445
|
+
dimgray: 6908265,
|
|
446
|
+
dimgrey: 6908265,
|
|
447
|
+
dodgerblue: 2003199,
|
|
448
|
+
firebrick: 11674146,
|
|
449
|
+
floralwhite: 16775920,
|
|
450
|
+
forestgreen: 2263842,
|
|
451
|
+
fuchsia: 16711935,
|
|
452
|
+
gainsboro: 14474460,
|
|
453
|
+
ghostwhite: 16316671,
|
|
454
|
+
gold: 16766720,
|
|
455
|
+
goldenrod: 14329120,
|
|
456
|
+
gray: 8421504,
|
|
457
|
+
green: 32768,
|
|
458
|
+
greenyellow: 11403055,
|
|
459
|
+
grey: 8421504,
|
|
460
|
+
honeydew: 15794160,
|
|
461
|
+
hotpink: 16738740,
|
|
462
|
+
indianred: 13458524,
|
|
463
|
+
indigo: 4915330,
|
|
464
|
+
ivory: 16777200,
|
|
465
|
+
khaki: 15787660,
|
|
466
|
+
lavender: 15132410,
|
|
467
|
+
lavenderblush: 16773365,
|
|
468
|
+
lawngreen: 8190976,
|
|
469
|
+
lemonchiffon: 16775885,
|
|
470
|
+
lightblue: 11393254,
|
|
471
|
+
lightcoral: 15761536,
|
|
472
|
+
lightcyan: 14745599,
|
|
473
|
+
lightgoldenrodyellow: 16448210,
|
|
474
|
+
lightgray: 13882323,
|
|
475
|
+
lightgreen: 9498256,
|
|
476
|
+
lightgrey: 13882323,
|
|
477
|
+
lightpink: 16758465,
|
|
478
|
+
lightsalmon: 16752762,
|
|
479
|
+
lightseagreen: 2142890,
|
|
480
|
+
lightskyblue: 8900346,
|
|
481
|
+
lightslategray: 7833753,
|
|
482
|
+
lightslategrey: 7833753,
|
|
483
|
+
lightsteelblue: 11584734,
|
|
484
|
+
lightyellow: 16777184,
|
|
485
|
+
lime: 65280,
|
|
486
|
+
limegreen: 3329330,
|
|
487
|
+
linen: 16445670,
|
|
488
|
+
magenta: 16711935,
|
|
489
|
+
maroon: 8388608,
|
|
490
|
+
mediumaquamarine: 6737322,
|
|
491
|
+
mediumblue: 205,
|
|
492
|
+
mediumorchid: 12211667,
|
|
493
|
+
mediumpurple: 9662683,
|
|
494
|
+
mediumseagreen: 3978097,
|
|
495
|
+
mediumslateblue: 8087790,
|
|
496
|
+
mediumspringgreen: 64154,
|
|
497
|
+
mediumturquoise: 4772300,
|
|
498
|
+
mediumvioletred: 13047173,
|
|
499
|
+
midnightblue: 1644912,
|
|
500
|
+
mintcream: 16121850,
|
|
501
|
+
mistyrose: 16770273,
|
|
502
|
+
moccasin: 16770229,
|
|
503
|
+
navajowhite: 16768685,
|
|
504
|
+
navy: 128,
|
|
505
|
+
oldlace: 16643558,
|
|
506
|
+
olive: 8421376,
|
|
507
|
+
olivedrab: 7048739,
|
|
508
|
+
orange: 16753920,
|
|
509
|
+
orangered: 16729344,
|
|
510
|
+
orchid: 14315734,
|
|
511
|
+
palegoldenrod: 15657130,
|
|
512
|
+
palegreen: 10025880,
|
|
513
|
+
paleturquoise: 11529966,
|
|
514
|
+
palevioletred: 14381203,
|
|
515
|
+
papayawhip: 16773077,
|
|
516
|
+
peachpuff: 16767673,
|
|
517
|
+
peru: 13468991,
|
|
518
|
+
pink: 16761035,
|
|
519
|
+
plum: 14524637,
|
|
520
|
+
powderblue: 11591910,
|
|
521
|
+
purple: 8388736,
|
|
522
|
+
rebeccapurple: 6697881,
|
|
523
|
+
red: 16711680,
|
|
524
|
+
rosybrown: 12357519,
|
|
525
|
+
royalblue: 4286945,
|
|
526
|
+
saddlebrown: 9127187,
|
|
527
|
+
salmon: 16416882,
|
|
528
|
+
sandybrown: 16032864,
|
|
529
|
+
seagreen: 3050327,
|
|
530
|
+
seashell: 16774638,
|
|
531
|
+
sienna: 10506797,
|
|
532
|
+
silver: 12632256,
|
|
533
|
+
skyblue: 8900331,
|
|
534
|
+
slateblue: 6970061,
|
|
535
|
+
slategray: 7372944,
|
|
536
|
+
slategrey: 7372944,
|
|
537
|
+
snow: 16775930,
|
|
538
|
+
springgreen: 65407,
|
|
539
|
+
steelblue: 4620980,
|
|
540
|
+
tan: 13808780,
|
|
541
|
+
teal: 32896,
|
|
542
|
+
thistle: 14204888,
|
|
543
|
+
tomato: 16737095,
|
|
544
|
+
turquoise: 4251856,
|
|
545
|
+
violet: 15631086,
|
|
546
|
+
wheat: 16113331,
|
|
547
|
+
white: 16777215,
|
|
548
|
+
whitesmoke: 16119285,
|
|
549
|
+
yellow: 16776960,
|
|
550
|
+
yellowgreen: 10145074
|
|
551
|
+
};
|
|
552
|
+
It(Rt, tn, {
|
|
553
|
+
copy(e) {
|
|
554
|
+
return Object.assign(new this.constructor(), this, e);
|
|
555
|
+
},
|
|
556
|
+
displayable() {
|
|
557
|
+
return this.rgb().displayable();
|
|
558
|
+
},
|
|
559
|
+
hex: Zt,
|
|
560
|
+
formatHex: Zt,
|
|
561
|
+
formatHex8: Qt,
|
|
562
|
+
formatHsl: $t,
|
|
563
|
+
formatRgb: en,
|
|
564
|
+
toString: en
|
|
565
|
+
});
|
|
566
|
+
function Zt() {
|
|
567
|
+
return this.rgb().formatHex();
|
|
568
|
+
}
|
|
569
|
+
function Qt() {
|
|
570
|
+
return this.rgb().formatHex8();
|
|
571
|
+
}
|
|
572
|
+
function $t() {
|
|
573
|
+
return mn(this).formatHsl();
|
|
574
|
+
}
|
|
575
|
+
function en() {
|
|
576
|
+
return this.rgb().formatRgb();
|
|
577
|
+
}
|
|
578
|
+
function tn(e) {
|
|
579
|
+
var t, n;
|
|
580
|
+
return e = (e + "").trim().toLowerCase(), (t = Ut.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? nn(t) : n === 3 ? new S(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? rn(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? rn(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Wt.exec(e)) ? new S(t[1], t[2], t[3], 1) : (t = Gt.exec(e)) ? new S(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Kt.exec(e)) ? rn(t[1], t[2], t[3], t[4]) : (t = qt.exec(e)) ? rn(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Jt.exec(e)) ? pn(t[1], t[2] / 100, t[3] / 100, 1) : (t = Yt.exec(e)) ? pn(t[1], t[2] / 100, t[3] / 100, t[4]) : Xt.hasOwnProperty(e) ? nn(Xt[e]) : e === "transparent" ? new S(NaN, NaN, NaN, 0) : null;
|
|
581
|
+
}
|
|
582
|
+
function nn(e) {
|
|
583
|
+
return new S(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
584
|
+
}
|
|
585
|
+
function rn(e, t, n, r) {
|
|
586
|
+
return r <= 0 && (e = t = n = NaN), new S(e, t, n, r);
|
|
587
|
+
}
|
|
588
|
+
function an(e) {
|
|
589
|
+
return e instanceof Rt || (e = tn(e)), e ? (e = e.rgb(), new S(e.r, e.g, e.b, e.opacity)) : new S();
|
|
590
|
+
}
|
|
591
|
+
function on(e, t, n, r) {
|
|
592
|
+
return arguments.length === 1 ? an(e) : new S(e, t, n, r ?? 1);
|
|
593
|
+
}
|
|
594
|
+
function S(e, t, n, r) {
|
|
595
|
+
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
596
|
+
}
|
|
597
|
+
It(S, on, Lt(Rt, {
|
|
598
|
+
brighter(e) {
|
|
599
|
+
return e = e == null ? Bt : Bt ** +e, new S(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
600
|
+
},
|
|
601
|
+
darker(e) {
|
|
602
|
+
return e = e == null ? zt : zt ** +e, new S(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
603
|
+
},
|
|
604
|
+
rgb() {
|
|
605
|
+
return this;
|
|
606
|
+
},
|
|
607
|
+
clamp() {
|
|
608
|
+
return new S(dn(this.r), dn(this.g), dn(this.b), un(this.opacity));
|
|
609
|
+
},
|
|
610
|
+
displayable() {
|
|
611
|
+
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
612
|
+
},
|
|
613
|
+
hex: sn,
|
|
614
|
+
formatHex: sn,
|
|
615
|
+
formatHex8: cn,
|
|
616
|
+
formatRgb: ln,
|
|
617
|
+
toString: ln
|
|
618
|
+
}));
|
|
619
|
+
function sn() {
|
|
620
|
+
return `#${fn(this.r)}${fn(this.g)}${fn(this.b)}`;
|
|
621
|
+
}
|
|
622
|
+
function cn() {
|
|
623
|
+
return `#${fn(this.r)}${fn(this.g)}${fn(this.b)}${fn((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
624
|
+
}
|
|
625
|
+
function ln() {
|
|
626
|
+
let e = un(this.opacity);
|
|
627
|
+
return `${e === 1 ? "rgb(" : "rgba("}${dn(this.r)}, ${dn(this.g)}, ${dn(this.b)}${e === 1 ? ")" : `, ${e})`}`;
|
|
628
|
+
}
|
|
629
|
+
function un(e) {
|
|
630
|
+
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
631
|
+
}
|
|
632
|
+
function dn(e) {
|
|
633
|
+
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
634
|
+
}
|
|
635
|
+
function fn(e) {
|
|
636
|
+
return e = dn(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
637
|
+
}
|
|
638
|
+
function pn(e, t, n, r) {
|
|
639
|
+
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new C(e, t, n, r);
|
|
640
|
+
}
|
|
641
|
+
function mn(e) {
|
|
642
|
+
if (e instanceof C) return new C(e.h, e.s, e.l, e.opacity);
|
|
643
|
+
if (e instanceof Rt || (e = tn(e)), !e) return new C();
|
|
644
|
+
if (e instanceof C) return e;
|
|
645
|
+
e = e.rgb();
|
|
646
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
|
|
647
|
+
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new C(o, s, c, e.opacity);
|
|
648
|
+
}
|
|
649
|
+
function hn(e, t, n, r) {
|
|
650
|
+
return arguments.length === 1 ? mn(e) : new C(e, t, n, r ?? 1);
|
|
651
|
+
}
|
|
652
|
+
function C(e, t, n, r) {
|
|
653
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
654
|
+
}
|
|
655
|
+
It(C, hn, Lt(Rt, {
|
|
656
|
+
brighter(e) {
|
|
657
|
+
return e = e == null ? Bt : Bt ** +e, new C(this.h, this.s, this.l * e, this.opacity);
|
|
658
|
+
},
|
|
659
|
+
darker(e) {
|
|
660
|
+
return e = e == null ? zt : zt ** +e, new C(this.h, this.s, this.l * e, this.opacity);
|
|
661
|
+
},
|
|
662
|
+
rgb() {
|
|
663
|
+
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
|
|
664
|
+
return new S(vn(e >= 240 ? e - 240 : e + 120, i, r), vn(e, i, r), vn(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
|
|
665
|
+
},
|
|
666
|
+
clamp() {
|
|
667
|
+
return new C(gn(this.h), _n(this.s), _n(this.l), un(this.opacity));
|
|
668
|
+
},
|
|
669
|
+
displayable() {
|
|
670
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
671
|
+
},
|
|
672
|
+
formatHsl() {
|
|
673
|
+
let e = un(this.opacity);
|
|
674
|
+
return `${e === 1 ? "hsl(" : "hsla("}${gn(this.h)}, ${_n(this.s) * 100}%, ${_n(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
|
|
675
|
+
}
|
|
676
|
+
}));
|
|
677
|
+
function gn(e) {
|
|
678
|
+
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
|
|
679
|
+
}
|
|
680
|
+
function _n(e) {
|
|
681
|
+
return Math.max(0, Math.min(1, e || 0));
|
|
682
|
+
}
|
|
683
|
+
function vn(e, t, n) {
|
|
684
|
+
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
685
|
+
}
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region ../../node_modules/d3-color/src/math.js
|
|
688
|
+
var yn = Math.PI / 180, bn = 180 / Math.PI, xn = 18, Sn = .96422, Cn = 1, wn = .82521, Tn = 4 / 29, En = 6 / 29, Dn = 3 * En * En, On = En * En * En;
|
|
689
|
+
function kn(e) {
|
|
690
|
+
if (e instanceof w) return new w(e.l, e.a, e.b, e.opacity);
|
|
691
|
+
if (e instanceof T) return Ln(e);
|
|
692
|
+
e instanceof S || (e = an(e));
|
|
693
|
+
var t = Pn(e.r), n = Pn(e.g), r = Pn(e.b), i = jn((.2225045 * t + .7168786 * n + .0606169 * r) / Cn), a, o;
|
|
694
|
+
return t === n && n === r ? a = o = i : (a = jn((.4360747 * t + .3850649 * n + .1430804 * r) / Sn), o = jn((.0139322 * t + .0971045 * n + .7141733 * r) / wn)), new w(116 * i - 16, 500 * (a - i), 200 * (i - o), e.opacity);
|
|
695
|
+
}
|
|
696
|
+
function An(e, t, n, r) {
|
|
697
|
+
return arguments.length === 1 ? kn(e) : new w(e, t, n, r ?? 1);
|
|
698
|
+
}
|
|
699
|
+
function w(e, t, n, r) {
|
|
700
|
+
this.l = +e, this.a = +t, this.b = +n, this.opacity = +r;
|
|
701
|
+
}
|
|
702
|
+
It(w, An, Lt(Rt, {
|
|
703
|
+
brighter(e) {
|
|
704
|
+
return new w(this.l + xn * (e ?? 1), this.a, this.b, this.opacity);
|
|
705
|
+
},
|
|
706
|
+
darker(e) {
|
|
707
|
+
return new w(this.l - xn * (e ?? 1), this.a, this.b, this.opacity);
|
|
708
|
+
},
|
|
709
|
+
rgb() {
|
|
710
|
+
var e = (this.l + 16) / 116, t = isNaN(this.a) ? e : e + this.a / 500, n = isNaN(this.b) ? e : e - this.b / 200;
|
|
711
|
+
return t = Sn * Mn(t), e = Cn * Mn(e), n = wn * Mn(n), new S(Nn(3.1338561 * t - 1.6168667 * e - .4906146 * n), Nn(-.9787684 * t + 1.9161415 * e + .033454 * n), Nn(.0719453 * t - .2289914 * e + 1.4052427 * n), this.opacity);
|
|
712
|
+
}
|
|
713
|
+
}));
|
|
714
|
+
function jn(e) {
|
|
715
|
+
return e > On ? e ** (1 / 3) : e / Dn + Tn;
|
|
716
|
+
}
|
|
717
|
+
function Mn(e) {
|
|
718
|
+
return e > En ? e * e * e : Dn * (e - Tn);
|
|
719
|
+
}
|
|
720
|
+
function Nn(e) {
|
|
721
|
+
return 255 * (e <= .0031308 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - .055);
|
|
722
|
+
}
|
|
723
|
+
function Pn(e) {
|
|
724
|
+
return (e /= 255) <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
725
|
+
}
|
|
726
|
+
function Fn(e) {
|
|
727
|
+
if (e instanceof T) return new T(e.h, e.c, e.l, e.opacity);
|
|
728
|
+
if (e instanceof w || (e = kn(e)), e.a === 0 && e.b === 0) return new T(NaN, 0 < e.l && e.l < 100 ? 0 : NaN, e.l, e.opacity);
|
|
729
|
+
var t = Math.atan2(e.b, e.a) * bn;
|
|
730
|
+
return new T(t < 0 ? t + 360 : t, Math.sqrt(e.a * e.a + e.b * e.b), e.l, e.opacity);
|
|
731
|
+
}
|
|
732
|
+
function In(e, t, n, r) {
|
|
733
|
+
return arguments.length === 1 ? Fn(e) : new T(e, t, n, r ?? 1);
|
|
734
|
+
}
|
|
735
|
+
function T(e, t, n, r) {
|
|
736
|
+
this.h = +e, this.c = +t, this.l = +n, this.opacity = +r;
|
|
737
|
+
}
|
|
738
|
+
function Ln(e) {
|
|
739
|
+
if (isNaN(e.h)) return new w(e.l, 0, 0, e.opacity);
|
|
740
|
+
var t = e.h * yn;
|
|
741
|
+
return new w(e.l, Math.cos(t) * e.c, Math.sin(t) * e.c, e.opacity);
|
|
742
|
+
}
|
|
743
|
+
It(T, In, Lt(Rt, {
|
|
744
|
+
brighter(e) {
|
|
745
|
+
return new T(this.h, this.c, this.l + xn * (e ?? 1), this.opacity);
|
|
746
|
+
},
|
|
747
|
+
darker(e) {
|
|
748
|
+
return new T(this.h, this.c, this.l - xn * (e ?? 1), this.opacity);
|
|
749
|
+
},
|
|
750
|
+
rgb() {
|
|
751
|
+
return Ln(this).rgb();
|
|
752
|
+
}
|
|
753
|
+
}));
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region ../../node_modules/d3-color/src/cubehelix.js
|
|
756
|
+
var Rn = -.14861, zn = 1.78277, Bn = -.29227, Vn = -.90649, Hn = 1.97294, Un = Hn * Vn, Wn = Hn * zn, Gn = zn * Bn - Vn * Rn;
|
|
757
|
+
function Kn(e) {
|
|
758
|
+
if (e instanceof Jn) return new Jn(e.h, e.s, e.l, e.opacity);
|
|
759
|
+
e instanceof S || (e = an(e));
|
|
760
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = (Gn * r + Un * t - Wn * n) / (Gn + Un - Wn), a = r - i, o = (Hn * (n - i) - Bn * a) / Vn, s = Math.sqrt(o * o + a * a) / (Hn * i * (1 - i)), c = s ? Math.atan2(o, a) * bn - 120 : NaN;
|
|
761
|
+
return new Jn(c < 0 ? c + 360 : c, s, i, e.opacity);
|
|
762
|
+
}
|
|
763
|
+
function qn(e, t, n, r) {
|
|
764
|
+
return arguments.length === 1 ? Kn(e) : new Jn(e, t, n, r ?? 1);
|
|
765
|
+
}
|
|
766
|
+
function Jn(e, t, n, r) {
|
|
767
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
768
|
+
}
|
|
769
|
+
It(Jn, qn, Lt(Rt, {
|
|
770
|
+
brighter(e) {
|
|
771
|
+
return e = e == null ? Bt : Bt ** +e, new Jn(this.h, this.s, this.l * e, this.opacity);
|
|
772
|
+
},
|
|
773
|
+
darker(e) {
|
|
774
|
+
return e = e == null ? zt : zt ** +e, new Jn(this.h, this.s, this.l * e, this.opacity);
|
|
775
|
+
},
|
|
776
|
+
rgb() {
|
|
777
|
+
var e = isNaN(this.h) ? 0 : (this.h + 120) * yn, t = +this.l, n = isNaN(this.s) ? 0 : this.s * t * (1 - t), r = Math.cos(e), i = Math.sin(e);
|
|
778
|
+
return new S(255 * (t + n * (Rn * r + zn * i)), 255 * (t + n * (Bn * r + Vn * i)), 255 * (t + Hn * r * n), this.opacity);
|
|
779
|
+
}
|
|
780
|
+
}));
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region ../../node_modules/d3-interpolate/src/basis.js
|
|
783
|
+
function Yn(e, t, n, r, i) {
|
|
784
|
+
var a = e * e, o = a * e;
|
|
785
|
+
return ((1 - 3 * e + 3 * a - o) * t + (4 - 6 * a + 3 * o) * n + (1 + 3 * e + 3 * a - 3 * o) * r + o * i) / 6;
|
|
786
|
+
}
|
|
787
|
+
function Xn(e) {
|
|
788
|
+
var t = e.length - 1;
|
|
789
|
+
return function(n) {
|
|
790
|
+
var r = n <= 0 ? n = 0 : n >= 1 ? (n = 1, t - 1) : Math.floor(n * t), i = e[r], a = e[r + 1], o = r > 0 ? e[r - 1] : 2 * i - a, s = r < t - 1 ? e[r + 2] : 2 * a - i;
|
|
791
|
+
return Yn((n - r / t) * t, o, i, a, s);
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region ../../node_modules/d3-interpolate/src/basisClosed.js
|
|
796
|
+
function Zn(e) {
|
|
797
|
+
var t = e.length;
|
|
798
|
+
return function(n) {
|
|
799
|
+
var r = Math.floor(((n %= 1) < 0 ? ++n : n) * t), i = e[(r + t - 1) % t], a = e[r % t], o = e[(r + 1) % t], s = e[(r + 2) % t];
|
|
800
|
+
return Yn((n - r / t) * t, i, a, o, s);
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
//#endregion
|
|
804
|
+
//#region ../../node_modules/d3-interpolate/src/constant.js
|
|
805
|
+
var Qn = (e) => () => e;
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region ../../node_modules/d3-interpolate/src/color.js
|
|
808
|
+
function $n(e, t) {
|
|
809
|
+
return function(n) {
|
|
810
|
+
return e + n * t;
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
function er(e, t, n) {
|
|
814
|
+
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
|
|
815
|
+
return (e + r * t) ** +n;
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function tr(e, t) {
|
|
819
|
+
var n = t - e;
|
|
820
|
+
return n ? $n(e, n > 180 || n < -180 ? n - 360 * Math.round(n / 360) : n) : Qn(isNaN(e) ? t : e);
|
|
821
|
+
}
|
|
822
|
+
function nr(e) {
|
|
823
|
+
return (e = +e) == 1 ? E : function(t, n) {
|
|
824
|
+
return n - t ? er(t, n, e) : Qn(isNaN(t) ? n : t);
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
function E(e, t) {
|
|
828
|
+
var n = t - e;
|
|
829
|
+
return n ? $n(e, n) : Qn(isNaN(e) ? t : e);
|
|
830
|
+
}
|
|
831
|
+
//#endregion
|
|
832
|
+
//#region ../../node_modules/d3-interpolate/src/rgb.js
|
|
833
|
+
var rr = (function e(t) {
|
|
834
|
+
var n = nr(t);
|
|
835
|
+
function r(e, t) {
|
|
836
|
+
var r = n((e = on(e)).r, (t = on(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = E(e.opacity, t.opacity);
|
|
837
|
+
return function(t) {
|
|
838
|
+
return e.r = r(t), e.g = i(t), e.b = a(t), e.opacity = o(t), e + "";
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
return r.gamma = e, r;
|
|
842
|
+
})(1);
|
|
843
|
+
function ir(e) {
|
|
844
|
+
return function(t) {
|
|
845
|
+
for (var n = t.length, r = Array(n), i = Array(n), a = Array(n), o = 0, s; o < n; ++o) s = on(t[o]), r[o] = s.r || 0, i[o] = s.g || 0, a[o] = s.b || 0;
|
|
846
|
+
return r = e(r), i = e(i), a = e(a), s.opacity = 1, function(e) {
|
|
847
|
+
return s.r = r(e), s.g = i(e), s.b = a(e), s + "";
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
var ar = ir(Xn), or = ir(Zn);
|
|
852
|
+
//#endregion
|
|
853
|
+
//#region ../../node_modules/d3-interpolate/src/numberArray.js
|
|
854
|
+
function sr(e, t) {
|
|
855
|
+
t ||= [];
|
|
856
|
+
var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
|
|
857
|
+
return function(a) {
|
|
858
|
+
for (i = 0; i < n; ++i) r[i] = e[i] * (1 - a) + t[i] * a;
|
|
859
|
+
return r;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
function cr(e) {
|
|
863
|
+
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
864
|
+
}
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region ../../node_modules/d3-interpolate/src/array.js
|
|
867
|
+
function lr(e, t) {
|
|
868
|
+
return (cr(t) ? sr : ur)(e, t);
|
|
869
|
+
}
|
|
870
|
+
function ur(e, t) {
|
|
871
|
+
for (var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o = 0; o < r; ++o) i[o] = O(e[o], t[o]);
|
|
872
|
+
for (; o < n; ++o) a[o] = t[o];
|
|
873
|
+
return function(e) {
|
|
874
|
+
for (o = 0; o < r; ++o) a[o] = i[o](e);
|
|
875
|
+
return a;
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region ../../node_modules/d3-interpolate/src/date.js
|
|
880
|
+
function dr(e, t) {
|
|
881
|
+
var n = /* @__PURE__ */ new Date();
|
|
882
|
+
return e = +e, t = +t, function(r) {
|
|
883
|
+
return n.setTime(e * (1 - r) + t * r), n;
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region ../../node_modules/d3-interpolate/src/number.js
|
|
888
|
+
function D(e, t) {
|
|
889
|
+
return e = +e, t = +t, function(n) {
|
|
890
|
+
return e * (1 - n) + t * n;
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region ../../node_modules/d3-interpolate/src/object.js
|
|
895
|
+
function fr(e, t) {
|
|
896
|
+
var n = {}, r = {}, i;
|
|
897
|
+
for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = O(e[i], t[i]) : r[i] = t[i];
|
|
898
|
+
return function(e) {
|
|
899
|
+
for (i in n) r[i] = n[i](e);
|
|
900
|
+
return r;
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
//#endregion
|
|
904
|
+
//#region ../../node_modules/d3-interpolate/src/string.js
|
|
905
|
+
var pr = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, mr = new RegExp(pr.source, "g");
|
|
906
|
+
function hr(e) {
|
|
907
|
+
return function() {
|
|
908
|
+
return e;
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
function gr(e) {
|
|
912
|
+
return function(t) {
|
|
913
|
+
return e(t) + "";
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
function _r(e, t) {
|
|
917
|
+
var n = pr.lastIndex = mr.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
|
|
918
|
+
for (e += "", t += ""; (r = pr.exec(e)) && (i = mr.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
|
|
919
|
+
i: o,
|
|
920
|
+
x: D(r, i)
|
|
921
|
+
})), n = mr.lastIndex;
|
|
922
|
+
return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? gr(c[0].x) : hr(t) : (t = c.length, function(e) {
|
|
923
|
+
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
|
|
924
|
+
return s.join("");
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
//#endregion
|
|
928
|
+
//#region ../../node_modules/d3-interpolate/src/value.js
|
|
929
|
+
function O(e, t) {
|
|
930
|
+
var n = typeof t, r;
|
|
931
|
+
return t == null || n === "boolean" ? Qn(t) : (n === "number" ? D : n === "string" ? (r = tn(t)) ? (t = r, rr) : _r : t instanceof tn ? rr : t instanceof Date ? dr : cr(t) ? sr : Array.isArray(t) ? ur : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? fr : D)(e, t);
|
|
932
|
+
}
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region ../../node_modules/d3-interpolate/src/discrete.js
|
|
935
|
+
function vr(e) {
|
|
936
|
+
var t = e.length;
|
|
937
|
+
return function(n) {
|
|
938
|
+
return e[Math.max(0, Math.min(t - 1, Math.floor(n * t)))];
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
//#endregion
|
|
942
|
+
//#region ../../node_modules/d3-interpolate/src/hue.js
|
|
943
|
+
function yr(e, t) {
|
|
944
|
+
var n = tr(+e, +t);
|
|
945
|
+
return function(e) {
|
|
946
|
+
var t = n(e);
|
|
947
|
+
return t - 360 * Math.floor(t / 360);
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
//#endregion
|
|
951
|
+
//#region ../../node_modules/d3-interpolate/src/round.js
|
|
952
|
+
function br(e, t) {
|
|
953
|
+
return e = +e, t = +t, function(n) {
|
|
954
|
+
return Math.round(e * (1 - n) + t * n);
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
//#endregion
|
|
958
|
+
//#region ../../node_modules/d3-interpolate/src/transform/decompose.js
|
|
959
|
+
var xr = 180 / Math.PI, Sr = {
|
|
960
|
+
translateX: 0,
|
|
961
|
+
translateY: 0,
|
|
962
|
+
rotate: 0,
|
|
963
|
+
skewX: 0,
|
|
964
|
+
scaleX: 1,
|
|
965
|
+
scaleY: 1
|
|
966
|
+
};
|
|
967
|
+
function Cr(e, t, n, r, i, a) {
|
|
968
|
+
var o, s, c;
|
|
969
|
+
return (o = Math.sqrt(e * e + t * t)) && (e /= o, t /= o), (c = e * n + t * r) && (n -= e * c, r -= t * c), (s = Math.sqrt(n * n + r * r)) && (n /= s, r /= s, c /= s), e * r < t * n && (e = -e, t = -t, c = -c, o = -o), {
|
|
970
|
+
translateX: i,
|
|
971
|
+
translateY: a,
|
|
972
|
+
rotate: Math.atan2(t, e) * xr,
|
|
973
|
+
skewX: Math.atan(c) * xr,
|
|
974
|
+
scaleX: o,
|
|
975
|
+
scaleY: s
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region ../../node_modules/d3-interpolate/src/transform/parse.js
|
|
980
|
+
var wr;
|
|
981
|
+
function Tr(e) {
|
|
982
|
+
let t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
|
|
983
|
+
return t.isIdentity ? Sr : Cr(t.a, t.b, t.c, t.d, t.e, t.f);
|
|
984
|
+
}
|
|
985
|
+
function Er(e) {
|
|
986
|
+
return e == null || (wr ||= document.createElementNS("http://www.w3.org/2000/svg", "g"), wr.setAttribute("transform", e), !(e = wr.transform.baseVal.consolidate())) ? Sr : (e = e.matrix, Cr(e.a, e.b, e.c, e.d, e.e, e.f));
|
|
987
|
+
}
|
|
988
|
+
//#endregion
|
|
989
|
+
//#region ../../node_modules/d3-interpolate/src/transform/index.js
|
|
990
|
+
function Dr(e, t, n, r) {
|
|
991
|
+
function i(e) {
|
|
992
|
+
return e.length ? e.pop() + " " : "";
|
|
993
|
+
}
|
|
994
|
+
function a(e, r, i, a, o, s) {
|
|
995
|
+
if (e !== i || r !== a) {
|
|
996
|
+
var c = o.push("translate(", null, t, null, n);
|
|
997
|
+
s.push({
|
|
998
|
+
i: c - 4,
|
|
999
|
+
x: D(e, i)
|
|
1000
|
+
}, {
|
|
1001
|
+
i: c - 2,
|
|
1002
|
+
x: D(r, a)
|
|
1003
|
+
});
|
|
1004
|
+
} else (i || a) && o.push("translate(" + i + t + a + n);
|
|
1005
|
+
}
|
|
1006
|
+
function o(e, t, n, a) {
|
|
1007
|
+
e === t ? t && n.push(i(n) + "rotate(" + t + r) : (e - t > 180 ? t += 360 : t - e > 180 && (e += 360), a.push({
|
|
1008
|
+
i: n.push(i(n) + "rotate(", null, r) - 2,
|
|
1009
|
+
x: D(e, t)
|
|
1010
|
+
}));
|
|
1011
|
+
}
|
|
1012
|
+
function s(e, t, n, a) {
|
|
1013
|
+
e === t ? t && n.push(i(n) + "skewX(" + t + r) : a.push({
|
|
1014
|
+
i: n.push(i(n) + "skewX(", null, r) - 2,
|
|
1015
|
+
x: D(e, t)
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
function c(e, t, n, r, a, o) {
|
|
1019
|
+
if (e !== n || t !== r) {
|
|
1020
|
+
var s = a.push(i(a) + "scale(", null, ",", null, ")");
|
|
1021
|
+
o.push({
|
|
1022
|
+
i: s - 4,
|
|
1023
|
+
x: D(e, n)
|
|
1024
|
+
}, {
|
|
1025
|
+
i: s - 2,
|
|
1026
|
+
x: D(t, r)
|
|
1027
|
+
});
|
|
1028
|
+
} else (n !== 1 || r !== 1) && a.push(i(a) + "scale(" + n + "," + r + ")");
|
|
1029
|
+
}
|
|
1030
|
+
return function(t, n) {
|
|
1031
|
+
var r = [], i = [];
|
|
1032
|
+
return t = e(t), n = e(n), a(t.translateX, t.translateY, n.translateX, n.translateY, r, i), o(t.rotate, n.rotate, r, i), s(t.skewX, n.skewX, r, i), c(t.scaleX, t.scaleY, n.scaleX, n.scaleY, r, i), t = n = null, function(e) {
|
|
1033
|
+
for (var t = -1, n = i.length, a; ++t < n;) r[(a = i[t]).i] = a.x(e);
|
|
1034
|
+
return r.join("");
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
var Or = Dr(Tr, "px, ", "px)", "deg)"), kr = Dr(Er, ", ", ")", ")"), Ar = 1e-12;
|
|
1039
|
+
function jr(e) {
|
|
1040
|
+
return ((e = Math.exp(e)) + 1 / e) / 2;
|
|
1041
|
+
}
|
|
1042
|
+
function Mr(e) {
|
|
1043
|
+
return ((e = Math.exp(e)) - 1 / e) / 2;
|
|
1044
|
+
}
|
|
1045
|
+
function Nr(e) {
|
|
1046
|
+
return ((e = Math.exp(2 * e)) - 1) / (e + 1);
|
|
1047
|
+
}
|
|
1048
|
+
var Pr = (function e(t, n, r) {
|
|
1049
|
+
function i(e, i) {
|
|
1050
|
+
var a = e[0], o = e[1], s = e[2], c = i[0], l = i[1], u = i[2], d = c - a, f = l - o, p = d * d + f * f, m, h;
|
|
1051
|
+
if (p < Ar) h = Math.log(u / s) / t, m = function(e) {
|
|
1052
|
+
return [
|
|
1053
|
+
a + e * d,
|
|
1054
|
+
o + e * f,
|
|
1055
|
+
s * Math.exp(t * e * h)
|
|
1056
|
+
];
|
|
1057
|
+
};
|
|
1058
|
+
else {
|
|
1059
|
+
var ee = Math.sqrt(p), te = (u * u - s * s + r * p) / (2 * s * n * ee), g = (u * u - s * s - r * p) / (2 * u * n * ee), ne = Math.log(Math.sqrt(te * te + 1) - te);
|
|
1060
|
+
h = (Math.log(Math.sqrt(g * g + 1) - g) - ne) / t, m = function(e) {
|
|
1061
|
+
var r = e * h, i = jr(ne), c = s / (n * ee) * (i * Nr(t * r + ne) - Mr(ne));
|
|
1062
|
+
return [
|
|
1063
|
+
a + c * d,
|
|
1064
|
+
o + c * f,
|
|
1065
|
+
s * i / jr(t * r + ne)
|
|
1066
|
+
];
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
return m.duration = h * 1e3 * t / Math.SQRT2, m;
|
|
1070
|
+
}
|
|
1071
|
+
return i.rho = function(t) {
|
|
1072
|
+
var n = Math.max(.001, +t), r = n * n;
|
|
1073
|
+
return e(n, r, r * r);
|
|
1074
|
+
}, i;
|
|
1075
|
+
})(Math.SQRT2, 2, 4);
|
|
1076
|
+
//#endregion
|
|
1077
|
+
//#region ../../node_modules/d3-interpolate/src/hsl.js
|
|
1078
|
+
function Fr(e) {
|
|
1079
|
+
return function(t, n) {
|
|
1080
|
+
var r = e((t = hn(t)).h, (n = hn(n)).h), i = E(t.s, n.s), a = E(t.l, n.l), o = E(t.opacity, n.opacity);
|
|
1081
|
+
return function(e) {
|
|
1082
|
+
return t.h = r(e), t.s = i(e), t.l = a(e), t.opacity = o(e), t + "";
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
var Ir = Fr(tr), Lr = Fr(E);
|
|
1087
|
+
//#endregion
|
|
1088
|
+
//#region ../../node_modules/d3-interpolate/src/lab.js
|
|
1089
|
+
function Rr(e, t) {
|
|
1090
|
+
var n = E((e = An(e)).l, (t = An(t)).l), r = E(e.a, t.a), i = E(e.b, t.b), a = E(e.opacity, t.opacity);
|
|
1091
|
+
return function(t) {
|
|
1092
|
+
return e.l = n(t), e.a = r(t), e.b = i(t), e.opacity = a(t), e + "";
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region ../../node_modules/d3-interpolate/src/hcl.js
|
|
1097
|
+
function zr(e) {
|
|
1098
|
+
return function(t, n) {
|
|
1099
|
+
var r = e((t = In(t)).h, (n = In(n)).h), i = E(t.c, n.c), a = E(t.l, n.l), o = E(t.opacity, n.opacity);
|
|
1100
|
+
return function(e) {
|
|
1101
|
+
return t.h = r(e), t.c = i(e), t.l = a(e), t.opacity = o(e), t + "";
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
var Br = zr(tr), Vr = zr(E);
|
|
1106
|
+
//#endregion
|
|
1107
|
+
//#region ../../node_modules/d3-interpolate/src/cubehelix.js
|
|
1108
|
+
function Hr(e) {
|
|
1109
|
+
return (function t(n) {
|
|
1110
|
+
n = +n;
|
|
1111
|
+
function r(t, r) {
|
|
1112
|
+
var i = e((t = qn(t)).h, (r = qn(r)).h), a = E(t.s, r.s), o = E(t.l, r.l), s = E(t.opacity, r.opacity);
|
|
1113
|
+
return function(e) {
|
|
1114
|
+
return t.h = i(e), t.s = a(e), t.l = o(e ** +n), t.opacity = s(e), t + "";
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
return r.gamma = t, r;
|
|
1118
|
+
})(1);
|
|
1119
|
+
}
|
|
1120
|
+
var Ur = Hr(tr), Wr = Hr(E);
|
|
1121
|
+
//#endregion
|
|
1122
|
+
//#region ../../node_modules/d3-interpolate/src/piecewise.js
|
|
1123
|
+
function Gr(e, t) {
|
|
1124
|
+
t === void 0 && (t = e, e = O);
|
|
1125
|
+
for (var n = 0, r = t.length - 1, i = t[0], a = Array(r < 0 ? 0 : r); n < r;) a[n] = e(i, i = t[++n]);
|
|
1126
|
+
return function(e) {
|
|
1127
|
+
var t = Math.max(0, Math.min(r - 1, Math.floor(e *= r)));
|
|
1128
|
+
return a[t](e - t);
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
//#endregion
|
|
1132
|
+
//#region ../../node_modules/d3-interpolate/src/quantize.js
|
|
1133
|
+
function Kr(e, t) {
|
|
1134
|
+
for (var n = Array(t), r = 0; r < t; ++r) n[r] = e(r / (t - 1));
|
|
1135
|
+
return n;
|
|
1136
|
+
}
|
|
1137
|
+
//#endregion
|
|
1138
|
+
//#region ../../node_modules/d3-interpolate/src/index.js
|
|
1139
|
+
var qr = /* @__PURE__ */ e({
|
|
1140
|
+
interpolate: () => O,
|
|
1141
|
+
interpolateArray: () => lr,
|
|
1142
|
+
interpolateBasis: () => Xn,
|
|
1143
|
+
interpolateBasisClosed: () => Zn,
|
|
1144
|
+
interpolateCubehelix: () => Ur,
|
|
1145
|
+
interpolateCubehelixLong: () => Wr,
|
|
1146
|
+
interpolateDate: () => dr,
|
|
1147
|
+
interpolateDiscrete: () => vr,
|
|
1148
|
+
interpolateHcl: () => Br,
|
|
1149
|
+
interpolateHclLong: () => Vr,
|
|
1150
|
+
interpolateHsl: () => Ir,
|
|
1151
|
+
interpolateHslLong: () => Lr,
|
|
1152
|
+
interpolateHue: () => yr,
|
|
1153
|
+
interpolateLab: () => Rr,
|
|
1154
|
+
interpolateNumber: () => D,
|
|
1155
|
+
interpolateNumberArray: () => sr,
|
|
1156
|
+
interpolateObject: () => fr,
|
|
1157
|
+
interpolateRgb: () => rr,
|
|
1158
|
+
interpolateRgbBasis: () => ar,
|
|
1159
|
+
interpolateRgbBasisClosed: () => or,
|
|
1160
|
+
interpolateRound: () => br,
|
|
1161
|
+
interpolateString: () => _r,
|
|
1162
|
+
interpolateTransformCss: () => Or,
|
|
1163
|
+
interpolateTransformSvg: () => kr,
|
|
1164
|
+
interpolateZoom: () => Pr,
|
|
1165
|
+
piecewise: () => Gr,
|
|
1166
|
+
quantize: () => Kr
|
|
1167
|
+
});
|
|
1168
|
+
//#endregion
|
|
1169
|
+
//#region ../../node_modules/d3-scale/src/constant.js
|
|
1170
|
+
function Jr(e) {
|
|
1171
|
+
return function() {
|
|
1172
|
+
return e;
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
//#endregion
|
|
1176
|
+
//#region ../../node_modules/d3-scale/src/number.js
|
|
1177
|
+
function Yr(e) {
|
|
1178
|
+
return +e;
|
|
1179
|
+
}
|
|
1180
|
+
//#endregion
|
|
1181
|
+
//#region ../../node_modules/d3-scale/src/continuous.js
|
|
1182
|
+
var Xr = [0, 1];
|
|
1183
|
+
function k(e) {
|
|
1184
|
+
return e;
|
|
1185
|
+
}
|
|
1186
|
+
function Zr(e, t) {
|
|
1187
|
+
return (t -= e = +e) ? function(n) {
|
|
1188
|
+
return (n - e) / t;
|
|
1189
|
+
} : Jr(isNaN(t) ? NaN : .5);
|
|
1190
|
+
}
|
|
1191
|
+
function Qr(e, t) {
|
|
1192
|
+
var n;
|
|
1193
|
+
return e > t && (n = e, e = t, t = n), function(n) {
|
|
1194
|
+
return Math.max(e, Math.min(t, n));
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
function $r(e, t, n) {
|
|
1198
|
+
var r = e[0], i = e[1], a = t[0], o = t[1];
|
|
1199
|
+
return i < r ? (r = Zr(i, r), a = n(o, a)) : (r = Zr(r, i), a = n(a, o)), function(e) {
|
|
1200
|
+
return a(r(e));
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
function ei(e, t, n) {
|
|
1204
|
+
var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
|
|
1205
|
+
for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = Zr(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
|
|
1206
|
+
return function(t) {
|
|
1207
|
+
var n = v(e, t, 1, r) - 1;
|
|
1208
|
+
return a[n](i[n](t));
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
function ti(e, t) {
|
|
1212
|
+
return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
|
|
1213
|
+
}
|
|
1214
|
+
function ni() {
|
|
1215
|
+
var e = Xr, t = Xr, n = O, r, i, a, o = k, s, c, l;
|
|
1216
|
+
function u() {
|
|
1217
|
+
var n = Math.min(e.length, t.length);
|
|
1218
|
+
return o !== k && (o = Qr(e[0], e[n - 1])), s = n > 2 ? ei : $r, c = l = null, d;
|
|
1219
|
+
}
|
|
1220
|
+
function d(i) {
|
|
1221
|
+
return i == null || isNaN(i = +i) ? a : (c ||= s(e.map(r), t, n))(r(o(i)));
|
|
1222
|
+
}
|
|
1223
|
+
return d.invert = function(n) {
|
|
1224
|
+
return o(i((l ||= s(t, e.map(r), D))(n)));
|
|
1225
|
+
}, d.domain = function(t) {
|
|
1226
|
+
return arguments.length ? (e = Array.from(t, Yr), u()) : e.slice();
|
|
1227
|
+
}, d.range = function(e) {
|
|
1228
|
+
return arguments.length ? (t = Array.from(e), u()) : t.slice();
|
|
1229
|
+
}, d.rangeRound = function(e) {
|
|
1230
|
+
return t = Array.from(e), n = br, u();
|
|
1231
|
+
}, d.clamp = function(e) {
|
|
1232
|
+
return arguments.length ? (o = e ? !0 : k, u()) : o !== k;
|
|
1233
|
+
}, d.interpolate = function(e) {
|
|
1234
|
+
return arguments.length ? (n = e, u()) : n;
|
|
1235
|
+
}, d.unknown = function(e) {
|
|
1236
|
+
return arguments.length ? (a = e, d) : a;
|
|
1237
|
+
}, function(e, t) {
|
|
1238
|
+
return r = e, i = t, u();
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
function ri() {
|
|
1242
|
+
return ni()(k, k);
|
|
1243
|
+
}
|
|
1244
|
+
//#endregion
|
|
1245
|
+
//#region ../../node_modules/d3-scale/src/tickFormat.js
|
|
1246
|
+
function ii(e, t, n, r) {
|
|
1247
|
+
var i = ve(e, t, n), a;
|
|
1248
|
+
switch (r = te(r ?? ",f"), r.type) {
|
|
1249
|
+
case "s":
|
|
1250
|
+
var o = Math.max(Math.abs(e), Math.abs(t));
|
|
1251
|
+
return r.precision == null && !isNaN(a = u(i, o)) && (r.precision = a), le(r, o);
|
|
1252
|
+
case "":
|
|
1253
|
+
case "e":
|
|
1254
|
+
case "g":
|
|
1255
|
+
case "p":
|
|
1256
|
+
case "r":
|
|
1257
|
+
r.precision == null && !isNaN(a = ge(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
|
|
1258
|
+
break;
|
|
1259
|
+
case "f":
|
|
1260
|
+
case "%": r.precision == null && !isNaN(a = ce(i)) && (r.precision = a - (r.type === "%") * 2);
|
|
1261
|
+
}
|
|
1262
|
+
return se(r);
|
|
1263
|
+
}
|
|
1264
|
+
//#endregion
|
|
1265
|
+
//#region ../../node_modules/d3-scale/src/linear.js
|
|
1266
|
+
function ai(e) {
|
|
1267
|
+
var t = e.domain;
|
|
1268
|
+
return e.ticks = function(e) {
|
|
1269
|
+
var n = t();
|
|
1270
|
+
return he(n[0], n[n.length - 1], e ?? 10);
|
|
1271
|
+
}, e.tickFormat = function(e, n) {
|
|
1272
|
+
var r = t();
|
|
1273
|
+
return ii(r[0], r[r.length - 1], e ?? 10, n);
|
|
1274
|
+
}, e.nice = function(n) {
|
|
1275
|
+
n ??= 10;
|
|
1276
|
+
var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
|
|
1277
|
+
for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
|
|
1278
|
+
if (l = de(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
|
|
1279
|
+
if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
|
|
1280
|
+
else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
|
|
1281
|
+
else break;
|
|
1282
|
+
c = l;
|
|
1283
|
+
}
|
|
1284
|
+
return e;
|
|
1285
|
+
}, e;
|
|
1286
|
+
}
|
|
1287
|
+
function oi() {
|
|
1288
|
+
var e = ri();
|
|
1289
|
+
return e.copy = function() {
|
|
1290
|
+
return ti(e, oi());
|
|
1291
|
+
}, y.apply(e, arguments), ai(e);
|
|
1292
|
+
}
|
|
1293
|
+
//#endregion
|
|
1294
|
+
//#region ../../node_modules/d3-scale/src/identity.js
|
|
1295
|
+
function si(e) {
|
|
1296
|
+
var t;
|
|
1297
|
+
function n(e) {
|
|
1298
|
+
return e == null || isNaN(e = +e) ? t : e;
|
|
1299
|
+
}
|
|
1300
|
+
return n.invert = n, n.domain = n.range = function(t) {
|
|
1301
|
+
return arguments.length ? (e = Array.from(t, Yr), n) : e.slice();
|
|
1302
|
+
}, n.unknown = function(e) {
|
|
1303
|
+
return arguments.length ? (t = e, n) : t;
|
|
1304
|
+
}, n.copy = function() {
|
|
1305
|
+
return si(e).unknown(t);
|
|
1306
|
+
}, e = arguments.length ? Array.from(e, Yr) : [0, 1], ai(n);
|
|
1307
|
+
}
|
|
1308
|
+
//#endregion
|
|
1309
|
+
//#region ../../node_modules/d3-scale/src/nice.js
|
|
1310
|
+
function ci(e, t) {
|
|
1311
|
+
e = e.slice();
|
|
1312
|
+
var n = 0, r = e.length - 1, i = e[n], a = e[r], o;
|
|
1313
|
+
return a < i && (o = n, n = r, r = o, o = i, i = a, a = o), e[n] = t.floor(i), e[r] = t.ceil(a), e;
|
|
1314
|
+
}
|
|
1315
|
+
//#endregion
|
|
1316
|
+
//#region ../../node_modules/d3-scale/src/log.js
|
|
1317
|
+
function li(e) {
|
|
1318
|
+
return Math.log(e);
|
|
1319
|
+
}
|
|
1320
|
+
function ui(e) {
|
|
1321
|
+
return Math.exp(e);
|
|
1322
|
+
}
|
|
1323
|
+
function di(e) {
|
|
1324
|
+
return -Math.log(-e);
|
|
1325
|
+
}
|
|
1326
|
+
function fi(e) {
|
|
1327
|
+
return -Math.exp(-e);
|
|
1328
|
+
}
|
|
1329
|
+
function pi(e) {
|
|
1330
|
+
return isFinite(e) ? +("1e" + e) : e < 0 ? 0 : e;
|
|
1331
|
+
}
|
|
1332
|
+
function mi(e) {
|
|
1333
|
+
return e === 10 ? pi : e === Math.E ? Math.exp : (t) => e ** +t;
|
|
1334
|
+
}
|
|
1335
|
+
function hi(e) {
|
|
1336
|
+
return e === Math.E ? Math.log : e === 10 && Math.log10 || e === 2 && Math.log2 || (e = Math.log(e), (t) => Math.log(t) / e);
|
|
1337
|
+
}
|
|
1338
|
+
function gi(e) {
|
|
1339
|
+
return (t, n) => -e(-t, n);
|
|
1340
|
+
}
|
|
1341
|
+
function _i(e) {
|
|
1342
|
+
let t = e(li, ui), n = t.domain, r = 10, i, a;
|
|
1343
|
+
function o() {
|
|
1344
|
+
return i = hi(r), a = mi(r), n()[0] < 0 ? (i = gi(i), a = gi(a), e(di, fi)) : e(li, ui), t;
|
|
1345
|
+
}
|
|
1346
|
+
return t.base = function(e) {
|
|
1347
|
+
return arguments.length ? (r = +e, o()) : r;
|
|
1348
|
+
}, t.domain = function(e) {
|
|
1349
|
+
return arguments.length ? (n(e), o()) : n();
|
|
1350
|
+
}, t.ticks = (e) => {
|
|
1351
|
+
let t = n(), o = t[0], s = t[t.length - 1], c = s < o;
|
|
1352
|
+
c && ([o, s] = [s, o]);
|
|
1353
|
+
let l = i(o), u = i(s), d, f, p = e == null ? 10 : +e, m = [];
|
|
1354
|
+
if (!(r % 1) && u - l < p) {
|
|
1355
|
+
if (l = Math.floor(l), u = Math.ceil(u), o > 0) {
|
|
1356
|
+
for (; l <= u; ++l) for (d = 1; d < r; ++d) if (f = l < 0 ? d / a(-l) : d * a(l), !(f < o)) {
|
|
1357
|
+
if (f > s) break;
|
|
1358
|
+
m.push(f);
|
|
1359
|
+
}
|
|
1360
|
+
} else for (; l <= u; ++l) for (d = r - 1; d >= 1; --d) if (f = l > 0 ? d / a(-l) : d * a(l), !(f < o)) {
|
|
1361
|
+
if (f > s) break;
|
|
1362
|
+
m.push(f);
|
|
1363
|
+
}
|
|
1364
|
+
m.length * 2 < p && (m = he(o, s, p));
|
|
1365
|
+
} else m = he(l, u, Math.min(u - l, p)).map(a);
|
|
1366
|
+
return c ? m.reverse() : m;
|
|
1367
|
+
}, t.tickFormat = (e, n) => {
|
|
1368
|
+
if (e ??= 10, n ??= r === 10 ? "s" : ",", typeof n != "function" && (!(r % 1) && (n = te(n)).precision == null && (n.trim = !0), n = se(n)), e === Infinity) return n;
|
|
1369
|
+
let o = Math.max(1, r * e / t.ticks().length);
|
|
1370
|
+
return (e) => {
|
|
1371
|
+
let t = e / a(Math.round(i(e)));
|
|
1372
|
+
return t * r < r - .5 && (t *= r), t <= o ? n(e) : "";
|
|
1373
|
+
};
|
|
1374
|
+
}, t.nice = () => n(ci(n(), {
|
|
1375
|
+
floor: (e) => a(Math.floor(i(e))),
|
|
1376
|
+
ceil: (e) => a(Math.ceil(i(e)))
|
|
1377
|
+
})), t;
|
|
1378
|
+
}
|
|
1379
|
+
function vi() {
|
|
1380
|
+
let e = _i(ni()).domain([1, 10]);
|
|
1381
|
+
return e.copy = () => ti(e, vi()).base(e.base()), y.apply(e, arguments), e;
|
|
1382
|
+
}
|
|
1383
|
+
//#endregion
|
|
1384
|
+
//#region ../../node_modules/d3-scale/src/symlog.js
|
|
1385
|
+
function yi(e) {
|
|
1386
|
+
return function(t) {
|
|
1387
|
+
return Math.sign(t) * Math.log1p(Math.abs(t / e));
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
function bi(e) {
|
|
1391
|
+
return function(t) {
|
|
1392
|
+
return Math.sign(t) * Math.expm1(Math.abs(t)) * e;
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
function xi(e) {
|
|
1396
|
+
var t = 1, n = e(yi(t), bi(t));
|
|
1397
|
+
return n.constant = function(n) {
|
|
1398
|
+
return arguments.length ? e(yi(t = +n), bi(t)) : t;
|
|
1399
|
+
}, ai(n);
|
|
1400
|
+
}
|
|
1401
|
+
function Si() {
|
|
1402
|
+
var e = xi(ni());
|
|
1403
|
+
return e.copy = function() {
|
|
1404
|
+
return ti(e, Si()).constant(e.constant());
|
|
1405
|
+
}, y.apply(e, arguments);
|
|
1406
|
+
}
|
|
1407
|
+
//#endregion
|
|
1408
|
+
//#region ../../node_modules/d3-scale/src/pow.js
|
|
1409
|
+
function Ci(e) {
|
|
1410
|
+
return function(t) {
|
|
1411
|
+
return t < 0 ? -((-t) ** +e) : t ** +e;
|
|
1412
|
+
};
|
|
1413
|
+
}
|
|
1414
|
+
function wi(e) {
|
|
1415
|
+
return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e);
|
|
1416
|
+
}
|
|
1417
|
+
function Ti(e) {
|
|
1418
|
+
return e < 0 ? -e * e : e * e;
|
|
1419
|
+
}
|
|
1420
|
+
function Ei(e) {
|
|
1421
|
+
var t = e(k, k), n = 1;
|
|
1422
|
+
function r() {
|
|
1423
|
+
return n === 1 ? e(k, k) : n === .5 ? e(wi, Ti) : e(Ci(n), Ci(1 / n));
|
|
1424
|
+
}
|
|
1425
|
+
return t.exponent = function(e) {
|
|
1426
|
+
return arguments.length ? (n = +e, r()) : n;
|
|
1427
|
+
}, ai(t);
|
|
1428
|
+
}
|
|
1429
|
+
function Di() {
|
|
1430
|
+
var e = Ei(ni());
|
|
1431
|
+
return e.copy = function() {
|
|
1432
|
+
return ti(e, Di()).exponent(e.exponent());
|
|
1433
|
+
}, y.apply(e, arguments), e;
|
|
1434
|
+
}
|
|
1435
|
+
function Oi() {
|
|
1436
|
+
return Di.apply(null, arguments).exponent(.5);
|
|
1437
|
+
}
|
|
1438
|
+
//#endregion
|
|
1439
|
+
//#region ../../node_modules/d3-scale/src/quantile.js
|
|
1440
|
+
function ki() {
|
|
1441
|
+
var e = [], t = [], n = [], r;
|
|
1442
|
+
function i() {
|
|
1443
|
+
var r = 0, i = Math.max(1, t.length);
|
|
1444
|
+
for (n = Array(i - 1); ++r < i;) n[r - 1] = Nt(e, r / i);
|
|
1445
|
+
return a;
|
|
1446
|
+
}
|
|
1447
|
+
function a(e) {
|
|
1448
|
+
return e == null || isNaN(e = +e) ? r : t[v(n, e)];
|
|
1449
|
+
}
|
|
1450
|
+
return a.invertExtent = function(r) {
|
|
1451
|
+
var i = t.indexOf(r);
|
|
1452
|
+
return i < 0 ? [NaN, NaN] : [i > 0 ? n[i - 1] : e[0], i < n.length ? n[i] : e[e.length - 1]];
|
|
1453
|
+
}, a.domain = function(t) {
|
|
1454
|
+
if (!arguments.length) return e.slice();
|
|
1455
|
+
e = [];
|
|
1456
|
+
for (let n of t) n != null && !isNaN(n = +n) && e.push(n);
|
|
1457
|
+
return e.sort(dt), i();
|
|
1458
|
+
}, a.range = function(e) {
|
|
1459
|
+
return arguments.length ? (t = Array.from(e), i()) : t.slice();
|
|
1460
|
+
}, a.unknown = function(e) {
|
|
1461
|
+
return arguments.length ? (r = e, a) : r;
|
|
1462
|
+
}, a.quantiles = function() {
|
|
1463
|
+
return n.slice();
|
|
1464
|
+
}, a.copy = function() {
|
|
1465
|
+
return ki().domain(e).range(t).unknown(r);
|
|
1466
|
+
}, y.apply(a, arguments);
|
|
1467
|
+
}
|
|
1468
|
+
//#endregion
|
|
1469
|
+
//#region ../../node_modules/d3-scale/src/quantize.js
|
|
1470
|
+
function Ai() {
|
|
1471
|
+
var e = 0, t = 1, n = 1, r = [.5], i = [0, 1], a;
|
|
1472
|
+
function o(e) {
|
|
1473
|
+
return e != null && e <= e ? i[v(r, e, 0, n)] : a;
|
|
1474
|
+
}
|
|
1475
|
+
function s() {
|
|
1476
|
+
var i = -1;
|
|
1477
|
+
for (r = Array(n); ++i < n;) r[i] = ((i + 1) * t - (i - n) * e) / (n + 1);
|
|
1478
|
+
return o;
|
|
1479
|
+
}
|
|
1480
|
+
return o.domain = function(n) {
|
|
1481
|
+
return arguments.length ? ([e, t] = n, e = +e, t = +t, s()) : [e, t];
|
|
1482
|
+
}, o.range = function(e) {
|
|
1483
|
+
return arguments.length ? (n = (i = Array.from(e)).length - 1, s()) : i.slice();
|
|
1484
|
+
}, o.invertExtent = function(a) {
|
|
1485
|
+
var o = i.indexOf(a);
|
|
1486
|
+
return o < 0 ? [NaN, NaN] : o < 1 ? [e, r[0]] : o >= n ? [r[n - 1], t] : [r[o - 1], r[o]];
|
|
1487
|
+
}, o.unknown = function(e) {
|
|
1488
|
+
return arguments.length && (a = e), o;
|
|
1489
|
+
}, o.thresholds = function() {
|
|
1490
|
+
return r.slice();
|
|
1491
|
+
}, o.copy = function() {
|
|
1492
|
+
return Ai().domain([e, t]).range(i).unknown(a);
|
|
1493
|
+
}, y.apply(ai(o), arguments);
|
|
1494
|
+
}
|
|
1495
|
+
//#endregion
|
|
1496
|
+
//#region ../../node_modules/d3-scale/src/threshold.js
|
|
1497
|
+
function ji() {
|
|
1498
|
+
var e = [.5], t = [0, 1], n, r = 1;
|
|
1499
|
+
function i(i) {
|
|
1500
|
+
return i != null && i <= i ? t[v(e, i, 0, r)] : n;
|
|
1501
|
+
}
|
|
1502
|
+
return i.domain = function(n) {
|
|
1503
|
+
return arguments.length ? (e = Array.from(n), r = Math.min(e.length, t.length - 1), i) : e.slice();
|
|
1504
|
+
}, i.range = function(n) {
|
|
1505
|
+
return arguments.length ? (t = Array.from(n), r = Math.min(e.length, t.length - 1), i) : t.slice();
|
|
1506
|
+
}, i.invertExtent = function(n) {
|
|
1507
|
+
var r = t.indexOf(n);
|
|
1508
|
+
return [e[r - 1], e[r]];
|
|
1509
|
+
}, i.unknown = function(e) {
|
|
1510
|
+
return arguments.length ? (n = e, i) : n;
|
|
1511
|
+
}, i.copy = function() {
|
|
1512
|
+
return ji().domain(e).range(t).unknown(n);
|
|
1513
|
+
}, y.apply(i, arguments);
|
|
1514
|
+
}
|
|
1515
|
+
//#endregion
|
|
1516
|
+
//#region ../../node_modules/d3-time/src/ticks.js
|
|
1517
|
+
function Mi(e, t, n, i, a, o) {
|
|
1518
|
+
let l = [
|
|
1519
|
+
[
|
|
1520
|
+
g,
|
|
1521
|
+
1,
|
|
1522
|
+
ie
|
|
1523
|
+
],
|
|
1524
|
+
[
|
|
1525
|
+
g,
|
|
1526
|
+
5,
|
|
1527
|
+
5 * ie
|
|
1528
|
+
],
|
|
1529
|
+
[
|
|
1530
|
+
g,
|
|
1531
|
+
15,
|
|
1532
|
+
15 * ie
|
|
1533
|
+
],
|
|
1534
|
+
[
|
|
1535
|
+
g,
|
|
1536
|
+
30,
|
|
1537
|
+
30 * ie
|
|
1538
|
+
],
|
|
1539
|
+
[
|
|
1540
|
+
o,
|
|
1541
|
+
1,
|
|
1542
|
+
ae
|
|
1543
|
+
],
|
|
1544
|
+
[
|
|
1545
|
+
o,
|
|
1546
|
+
5,
|
|
1547
|
+
5 * ae
|
|
1548
|
+
],
|
|
1549
|
+
[
|
|
1550
|
+
o,
|
|
1551
|
+
15,
|
|
1552
|
+
15 * ae
|
|
1553
|
+
],
|
|
1554
|
+
[
|
|
1555
|
+
o,
|
|
1556
|
+
30,
|
|
1557
|
+
30 * ae
|
|
1558
|
+
],
|
|
1559
|
+
[
|
|
1560
|
+
a,
|
|
1561
|
+
1,
|
|
1562
|
+
r
|
|
1563
|
+
],
|
|
1564
|
+
[
|
|
1565
|
+
a,
|
|
1566
|
+
3,
|
|
1567
|
+
3 * r
|
|
1568
|
+
],
|
|
1569
|
+
[
|
|
1570
|
+
a,
|
|
1571
|
+
6,
|
|
1572
|
+
6 * r
|
|
1573
|
+
],
|
|
1574
|
+
[
|
|
1575
|
+
a,
|
|
1576
|
+
12,
|
|
1577
|
+
12 * r
|
|
1578
|
+
],
|
|
1579
|
+
[
|
|
1580
|
+
i,
|
|
1581
|
+
1,
|
|
1582
|
+
ye
|
|
1583
|
+
],
|
|
1584
|
+
[
|
|
1585
|
+
i,
|
|
1586
|
+
2,
|
|
1587
|
+
2 * ye
|
|
1588
|
+
],
|
|
1589
|
+
[
|
|
1590
|
+
n,
|
|
1591
|
+
1,
|
|
1592
|
+
oe
|
|
1593
|
+
],
|
|
1594
|
+
[
|
|
1595
|
+
t,
|
|
1596
|
+
1,
|
|
1597
|
+
c
|
|
1598
|
+
],
|
|
1599
|
+
[
|
|
1600
|
+
t,
|
|
1601
|
+
3,
|
|
1602
|
+
3 * c
|
|
1603
|
+
],
|
|
1604
|
+
[
|
|
1605
|
+
e,
|
|
1606
|
+
1,
|
|
1607
|
+
s
|
|
1608
|
+
]
|
|
1609
|
+
];
|
|
1610
|
+
function u(e, t, n) {
|
|
1611
|
+
let r = t < e;
|
|
1612
|
+
r && ([e, t] = [t, e]);
|
|
1613
|
+
let i = n && typeof n.range == "function" ? n : f(e, t, n), a = i ? i.range(e, +t + 1) : [];
|
|
1614
|
+
return r ? a.reverse() : a;
|
|
1615
|
+
}
|
|
1616
|
+
function f(t, n, r) {
|
|
1617
|
+
let i = Math.abs(n - t) / r, a = pt(([, , e]) => e).right(l, i);
|
|
1618
|
+
if (a === l.length) return e.every(ve(t / s, n / s, r));
|
|
1619
|
+
if (a === 0) return d.every(Math.max(ve(t, n, r), 1));
|
|
1620
|
+
let [o, c] = l[i / l[a - 1][2] < l[a][2] / i ? a - 1 : a];
|
|
1621
|
+
return o.every(c);
|
|
1622
|
+
}
|
|
1623
|
+
return [u, f];
|
|
1624
|
+
}
|
|
1625
|
+
var [Ni, Pi] = Mi(a, h, n, p, o, f), [Fi, Ii] = Mi(re, i, me, pe, ee, l);
|
|
1626
|
+
//#endregion
|
|
1627
|
+
//#region ../../node_modules/d3-scale/src/time.js
|
|
1628
|
+
function Li(e) {
|
|
1629
|
+
return new Date(e);
|
|
1630
|
+
}
|
|
1631
|
+
function Ri(e) {
|
|
1632
|
+
return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
|
|
1633
|
+
}
|
|
1634
|
+
function zi(e, t, n, r, i, a, o, s, c, l) {
|
|
1635
|
+
var u = ri(), d = u.invert, f = u.domain, p = l(".%L"), m = l(":%S"), h = l("%I:%M"), ee = l("%I %p"), te = l("%a %d"), g = l("%b %d"), ne = l("%B"), re = l("%Y");
|
|
1636
|
+
function ie(e) {
|
|
1637
|
+
return (c(e) < e ? p : s(e) < e ? m : o(e) < e ? h : a(e) < e ? ee : r(e) < e ? i(e) < e ? te : g : n(e) < e ? ne : re)(e);
|
|
1638
|
+
}
|
|
1639
|
+
return u.invert = function(e) {
|
|
1640
|
+
return new Date(d(e));
|
|
1641
|
+
}, u.domain = function(e) {
|
|
1642
|
+
return arguments.length ? f(Array.from(e, Ri)) : f().map(Li);
|
|
1643
|
+
}, u.ticks = function(t) {
|
|
1644
|
+
var n = f();
|
|
1645
|
+
return e(n[0], n[n.length - 1], t ?? 10);
|
|
1646
|
+
}, u.tickFormat = function(e, t) {
|
|
1647
|
+
return t == null ? ie : l(t);
|
|
1648
|
+
}, u.nice = function(e) {
|
|
1649
|
+
var n = f();
|
|
1650
|
+
return (!e || typeof e.range != "function") && (e = t(n[0], n[n.length - 1], e ?? 10)), e ? f(ci(n, e)) : u;
|
|
1651
|
+
}, u.copy = function() {
|
|
1652
|
+
return ti(u, zi(e, t, n, r, i, a, o, s, c, l));
|
|
1653
|
+
}, u;
|
|
1654
|
+
}
|
|
1655
|
+
function Bi() {
|
|
1656
|
+
return y.apply(zi(Fi, Ii, re, i, me, pe, ee, l, g, ue).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
|
|
1657
|
+
}
|
|
1658
|
+
//#endregion
|
|
1659
|
+
//#region ../../node_modules/d3-scale/src/utcTime.js
|
|
1660
|
+
function Vi() {
|
|
1661
|
+
return y.apply(zi(Ni, Pi, a, h, n, m, o, f, g, ne).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
|
|
1662
|
+
}
|
|
1663
|
+
//#endregion
|
|
1664
|
+
//#region ../../node_modules/d3-scale/src/sequential.js
|
|
1665
|
+
function Hi() {
|
|
1666
|
+
var e = 0, t = 1, n, r, i, a, o = k, s = !1, c;
|
|
1667
|
+
function l(e) {
|
|
1668
|
+
return e == null || isNaN(e = +e) ? c : o(i === 0 ? .5 : (e = (a(e) - n) * i, s ? Math.max(0, Math.min(1, e)) : e));
|
|
1669
|
+
}
|
|
1670
|
+
l.domain = function(o) {
|
|
1671
|
+
return arguments.length ? ([e, t] = o, n = a(e = +e), r = a(t = +t), i = n === r ? 0 : 1 / (r - n), l) : [e, t];
|
|
1672
|
+
}, l.clamp = function(e) {
|
|
1673
|
+
return arguments.length ? (s = !!e, l) : s;
|
|
1674
|
+
}, l.interpolator = function(e) {
|
|
1675
|
+
return arguments.length ? (o = e, l) : o;
|
|
1676
|
+
};
|
|
1677
|
+
function u(e) {
|
|
1678
|
+
return function(t) {
|
|
1679
|
+
var n, r;
|
|
1680
|
+
return arguments.length ? ([n, r] = t, o = e(n, r), l) : [o(0), o(1)];
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
return l.range = u(O), l.rangeRound = u(br), l.unknown = function(e) {
|
|
1684
|
+
return arguments.length ? (c = e, l) : c;
|
|
1685
|
+
}, function(o) {
|
|
1686
|
+
return a = o, n = o(e), r = o(t), i = n === r ? 0 : 1 / (r - n), l;
|
|
1687
|
+
};
|
|
1688
|
+
}
|
|
1689
|
+
function A(e, t) {
|
|
1690
|
+
return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown());
|
|
1691
|
+
}
|
|
1692
|
+
function Ui() {
|
|
1693
|
+
var e = ai(Hi()(k));
|
|
1694
|
+
return e.copy = function() {
|
|
1695
|
+
return A(e, Ui());
|
|
1696
|
+
}, b.apply(e, arguments);
|
|
1697
|
+
}
|
|
1698
|
+
function Wi() {
|
|
1699
|
+
var e = _i(Hi()).domain([1, 10]);
|
|
1700
|
+
return e.copy = function() {
|
|
1701
|
+
return A(e, Wi()).base(e.base());
|
|
1702
|
+
}, b.apply(e, arguments);
|
|
1703
|
+
}
|
|
1704
|
+
function Gi() {
|
|
1705
|
+
var e = xi(Hi());
|
|
1706
|
+
return e.copy = function() {
|
|
1707
|
+
return A(e, Gi()).constant(e.constant());
|
|
1708
|
+
}, b.apply(e, arguments);
|
|
1709
|
+
}
|
|
1710
|
+
function Ki() {
|
|
1711
|
+
var e = Ei(Hi());
|
|
1712
|
+
return e.copy = function() {
|
|
1713
|
+
return A(e, Ki()).exponent(e.exponent());
|
|
1714
|
+
}, b.apply(e, arguments);
|
|
1715
|
+
}
|
|
1716
|
+
function qi() {
|
|
1717
|
+
return Ki.apply(null, arguments).exponent(.5);
|
|
1718
|
+
}
|
|
1719
|
+
//#endregion
|
|
1720
|
+
//#region ../../node_modules/d3-scale/src/diverging.js
|
|
1721
|
+
function Ji() {
|
|
1722
|
+
var e = 0, t = .5, n = 1, r = 1, i, a, o, s, c, l = k, u, d = !1, f;
|
|
1723
|
+
function p(e) {
|
|
1724
|
+
return isNaN(e = +e) ? f : (e = .5 + ((e = +u(e)) - a) * (r * e < r * a ? s : c), l(d ? Math.max(0, Math.min(1, e)) : e));
|
|
1725
|
+
}
|
|
1726
|
+
p.domain = function(l) {
|
|
1727
|
+
return arguments.length ? ([e, t, n] = l, i = u(e = +e), a = u(t = +t), o = u(n = +n), s = i === a ? 0 : .5 / (a - i), c = a === o ? 0 : .5 / (o - a), r = a < i ? -1 : 1, p) : [
|
|
1728
|
+
e,
|
|
1729
|
+
t,
|
|
1730
|
+
n
|
|
1731
|
+
];
|
|
1732
|
+
}, p.clamp = function(e) {
|
|
1733
|
+
return arguments.length ? (d = !!e, p) : d;
|
|
1734
|
+
}, p.interpolator = function(e) {
|
|
1735
|
+
return arguments.length ? (l = e, p) : l;
|
|
1736
|
+
};
|
|
1737
|
+
function m(e) {
|
|
1738
|
+
return function(t) {
|
|
1739
|
+
var n, r, i;
|
|
1740
|
+
return arguments.length ? ([n, r, i] = t, l = Gr(e, [
|
|
1741
|
+
n,
|
|
1742
|
+
r,
|
|
1743
|
+
i
|
|
1744
|
+
]), p) : [
|
|
1745
|
+
l(0),
|
|
1746
|
+
l(.5),
|
|
1747
|
+
l(1)
|
|
1748
|
+
];
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
return p.range = m(O), p.rangeRound = m(br), p.unknown = function(e) {
|
|
1752
|
+
return arguments.length ? (f = e, p) : f;
|
|
1753
|
+
}, function(l) {
|
|
1754
|
+
return u = l, i = l(e), a = l(t), o = l(n), s = i === a ? 0 : .5 / (a - i), c = a === o ? 0 : .5 / (o - a), r = a < i ? -1 : 1, p;
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
function Yi() {
|
|
1758
|
+
var e = ai(Ji()(k));
|
|
1759
|
+
return e.copy = function() {
|
|
1760
|
+
return A(e, Yi());
|
|
1761
|
+
}, b.apply(e, arguments);
|
|
1762
|
+
}
|
|
1763
|
+
function Xi() {
|
|
1764
|
+
var e = _i(Ji()).domain([
|
|
1765
|
+
.1,
|
|
1766
|
+
1,
|
|
1767
|
+
10
|
|
1768
|
+
]);
|
|
1769
|
+
return e.copy = function() {
|
|
1770
|
+
return A(e, Xi()).base(e.base());
|
|
1771
|
+
}, b.apply(e, arguments);
|
|
1772
|
+
}
|
|
1773
|
+
function Zi() {
|
|
1774
|
+
var e = xi(Ji());
|
|
1775
|
+
return e.copy = function() {
|
|
1776
|
+
return A(e, Zi()).constant(e.constant());
|
|
1777
|
+
}, b.apply(e, arguments);
|
|
1778
|
+
}
|
|
1779
|
+
function Qi() {
|
|
1780
|
+
var e = Ei(Ji());
|
|
1781
|
+
return e.copy = function() {
|
|
1782
|
+
return A(e, Qi()).exponent(e.exponent());
|
|
1783
|
+
}, b.apply(e, arguments);
|
|
1784
|
+
}
|
|
1785
|
+
function $i() {
|
|
1786
|
+
return Qi.apply(null, arguments).exponent(.5);
|
|
1787
|
+
}
|
|
1788
|
+
//#endregion
|
|
1789
|
+
//#region ../core/src/ruler/rulerValue.js
|
|
1790
|
+
function ea(e = ["x"], t = {}) {
|
|
1791
|
+
let n = {};
|
|
1792
|
+
for (let r of e) n[r] = t[r] ?? null;
|
|
1793
|
+
return {
|
|
1794
|
+
type: "ruler",
|
|
1795
|
+
values: n
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
//#endregion
|
|
1799
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/accessor.js
|
|
1800
|
+
function ta(e, t, n) {
|
|
1801
|
+
return Object.assign(e, {
|
|
1802
|
+
fields: t || [],
|
|
1803
|
+
fname: n
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
//#endregion
|
|
1807
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/getter.js
|
|
1808
|
+
function na(e) {
|
|
1809
|
+
return e.length === 1 ? ra(e[0]) : ia(e);
|
|
1810
|
+
}
|
|
1811
|
+
var ra = (e) => function(t) {
|
|
1812
|
+
return t[e];
|
|
1813
|
+
}, ia = (e) => {
|
|
1814
|
+
let t = e.length;
|
|
1815
|
+
return function(n) {
|
|
1816
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
1817
|
+
return n;
|
|
1818
|
+
};
|
|
1819
|
+
};
|
|
1820
|
+
//#endregion
|
|
1821
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/error.js
|
|
1822
|
+
function aa(e) {
|
|
1823
|
+
throw Error(e);
|
|
1824
|
+
}
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/splitAccessPath.js
|
|
1827
|
+
function oa(e) {
|
|
1828
|
+
let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
|
|
1829
|
+
e += "";
|
|
1830
|
+
function l() {
|
|
1831
|
+
t.push(a + e.substring(o, s)), a = "", o = s + 1;
|
|
1832
|
+
}
|
|
1833
|
+
for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
|
|
1834
|
+
else if (c === r) l(), r = null, i = -1;
|
|
1835
|
+
else if (r) continue;
|
|
1836
|
+
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 || aa("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
1837
|
+
return i && aa("Access path missing closing bracket: " + e), r && aa("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
1838
|
+
}
|
|
1839
|
+
//#endregion
|
|
1840
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/field.js
|
|
1841
|
+
function sa(e, t, n) {
|
|
1842
|
+
let r = oa(e), i = r.length === 1 ? r[0] : e;
|
|
1843
|
+
return ta((n && n.get || na)(r), [i], t || i);
|
|
1844
|
+
}
|
|
1845
|
+
sa("id"), ta((e) => e, [], "identity"), ta(() => 0, [], "zero"), ta(() => 1, [], "one"), ta(() => !0, [], "true"), ta(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
1846
|
+
//#endregion
|
|
1847
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/isArray.js
|
|
1848
|
+
var ca = Array.isArray;
|
|
1849
|
+
//#endregion
|
|
1850
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/peek.js
|
|
1851
|
+
function la(e) {
|
|
1852
|
+
return e[e.length - 1];
|
|
1853
|
+
}
|
|
1854
|
+
//#endregion
|
|
1855
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/toNumber.js
|
|
1856
|
+
function ua(e) {
|
|
1857
|
+
return e == null || e === "" ? null : +e;
|
|
1858
|
+
}
|
|
1859
|
+
//#endregion
|
|
1860
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/array.js
|
|
1861
|
+
function da(e) {
|
|
1862
|
+
return e == null ? [] : ca(e) ? e : [e];
|
|
1863
|
+
}
|
|
1864
|
+
//#endregion
|
|
1865
|
+
//#region ../../node_modules/vega-scale/node_modules/vega-util/build/toSet.js
|
|
1866
|
+
function fa(e) {
|
|
1867
|
+
let t = {}, n = e.length;
|
|
1868
|
+
for (let r = 0; r < n; ++r) t[e[r] + ""] = !0;
|
|
1869
|
+
return t;
|
|
1870
|
+
}
|
|
1871
|
+
//#endregion
|
|
1872
|
+
//#region ../../node_modules/d3-scale-chromatic/src/colors.js
|
|
1873
|
+
function j(e) {
|
|
1874
|
+
for (var t = e.length / 6 | 0, n = Array(t), r = 0; r < t;) n[r] = "#" + e.slice(r * 6, ++r * 6);
|
|
1875
|
+
return n;
|
|
1876
|
+
}
|
|
1877
|
+
//#endregion
|
|
1878
|
+
//#region ../../node_modules/d3-scale-chromatic/src/categorical/category10.js
|
|
1879
|
+
var pa = j("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), ma = j("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"), ha = j("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"), ga = j("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"), _a = j("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"), va = j("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"), ya = j("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"), ba = j("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), xa = j("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), Sa = j("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
|
|
1880
|
+
//#endregion
|
|
1881
|
+
//#region ../../node_modules/vega-scale/build/vega-scale.js
|
|
1882
|
+
function Ca(e, t, n) {
|
|
1883
|
+
let r = e - t + n * 2;
|
|
1884
|
+
return e ? r > 0 ? r : 1 : 0;
|
|
1885
|
+
}
|
|
1886
|
+
var wa = "identity", Ta = "linear", Ea = "sqrt", Da = "symlog", Oa = "time", ka = "sequential", Aa = "diverging", ja = "quantile", Ma = "quantize", Na = "threshold", Pa = "ordinal", Fa = "point", Ia = "band", La = "bin-ordinal", M = "continuous", Ra = "discrete", za = "discretizing", N = "interpolating", Ba = "temporal";
|
|
1887
|
+
function Va(e) {
|
|
1888
|
+
return function(t) {
|
|
1889
|
+
let n = t[0], r = t[1], i;
|
|
1890
|
+
return r < n && (i = n, n = r, r = i), [e.invert(n), e.invert(r)];
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
function Ha(e) {
|
|
1894
|
+
return function(t) {
|
|
1895
|
+
let n = e.range(), r = t[0], i = t[1], a = -1, o, s, c, l;
|
|
1896
|
+
for (i < r && (s = r, r = i, i = s), c = 0, l = n.length; c < l; ++c) n[c] >= r && n[c] <= i && (a < 0 && (a = c), o = c);
|
|
1897
|
+
if (!(a < 0)) return r = e.invertExtent(n[a]), i = e.invertExtent(n[o]), [r[0] === void 0 ? r[1] : r[0], i[1] === void 0 ? i[0] : i[1]];
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
function Ua() {
|
|
1901
|
+
let e = Ft().unknown(void 0), n = e.domain, r = e.range, i = [0, 1], a, o, s = !1, c = 0, l = 0, u = .5;
|
|
1902
|
+
delete e.unknown;
|
|
1903
|
+
function d() {
|
|
1904
|
+
let e = n().length, d = i[1] < i[0], f = i[1 - d], p = Ca(e, c, l), m = i[d - 0];
|
|
1905
|
+
a = (f - m) / (p || 1), s && (a = Math.floor(a)), m += (f - m - a * (e - c)) * u, o = a * (1 - c), s && (m = Math.round(m), o = Math.round(o));
|
|
1906
|
+
let h = t(e).map((e) => m + a * e);
|
|
1907
|
+
return r(d ? h.reverse() : h);
|
|
1908
|
+
}
|
|
1909
|
+
return e.domain = function(e) {
|
|
1910
|
+
return arguments.length ? (n(e), d()) : n();
|
|
1911
|
+
}, e.range = function(e) {
|
|
1912
|
+
return arguments.length ? (i = [+e[0], +e[1]], d()) : i.slice();
|
|
1913
|
+
}, e.rangeRound = function(e) {
|
|
1914
|
+
return i = [+e[0], +e[1]], s = !0, d();
|
|
1915
|
+
}, e.bandwidth = function() {
|
|
1916
|
+
return o;
|
|
1917
|
+
}, e.step = function() {
|
|
1918
|
+
return a;
|
|
1919
|
+
}, e.round = function(e) {
|
|
1920
|
+
return arguments.length ? (s = !!e, d()) : s;
|
|
1921
|
+
}, e.padding = function(e) {
|
|
1922
|
+
return arguments.length ? (l = Math.max(0, Math.min(1, e)), c = l, d()) : c;
|
|
1923
|
+
}, e.paddingInner = function(e) {
|
|
1924
|
+
return arguments.length ? (c = Math.max(0, Math.min(1, e)), d()) : c;
|
|
1925
|
+
}, e.paddingOuter = function(e) {
|
|
1926
|
+
return arguments.length ? (l = Math.max(0, Math.min(1, e)), d()) : l;
|
|
1927
|
+
}, e.align = function(e) {
|
|
1928
|
+
return arguments.length ? (u = Math.max(0, Math.min(1, e)), d()) : u;
|
|
1929
|
+
}, e.invertRange = function(e) {
|
|
1930
|
+
if (e[0] == null || e[1] == null) return;
|
|
1931
|
+
let t = i[1] < i[0], a = t ? r().reverse() : r(), s = a.length - 1, c = +e[0], l = +e[1], u, d, f;
|
|
1932
|
+
if (c === c && l === l && (l < c && (f = c, c = l, l = f), !(l < a[0] || c > i[1 - t]))) return u = Math.max(0, v(a, c) - 1), d = c === l ? u : v(a, l) - 1, c - a[u] > o + 1e-10 && ++u, t && (f = u, u = s - d, d = s - f), u > d ? void 0 : n().slice(u, d + 1);
|
|
1933
|
+
}, e.invert = function(t) {
|
|
1934
|
+
let n = e.invertRange([t, t]);
|
|
1935
|
+
return n && n[0];
|
|
1936
|
+
}, e.copy = function() {
|
|
1937
|
+
return Ua().domain(n()).range(i).round(s).paddingInner(c).paddingOuter(l).align(u);
|
|
1938
|
+
}, d();
|
|
1939
|
+
}
|
|
1940
|
+
function Wa(e) {
|
|
1941
|
+
let t = e.copy;
|
|
1942
|
+
return e.padding = e.paddingOuter, delete e.paddingInner, e.copy = function() {
|
|
1943
|
+
return Wa(t());
|
|
1944
|
+
}, e;
|
|
1945
|
+
}
|
|
1946
|
+
function Ga() {
|
|
1947
|
+
return Wa(Ua().paddingInner(1));
|
|
1948
|
+
}
|
|
1949
|
+
var Ka = Array.prototype.map;
|
|
1950
|
+
function qa(e) {
|
|
1951
|
+
return Ka.call(e, ua);
|
|
1952
|
+
}
|
|
1953
|
+
var Ja = Array.prototype.slice;
|
|
1954
|
+
function Ya() {
|
|
1955
|
+
let e = [], t = [];
|
|
1956
|
+
function n(n) {
|
|
1957
|
+
return n == null || n !== n ? void 0 : t[(v(e, n) - 1) % t.length];
|
|
1958
|
+
}
|
|
1959
|
+
return n.domain = function(t) {
|
|
1960
|
+
return arguments.length ? (e = qa(t), n) : e.slice();
|
|
1961
|
+
}, n.range = function(e) {
|
|
1962
|
+
return arguments.length ? (t = Ja.call(e), n) : t.slice();
|
|
1963
|
+
}, n.tickFormat = function(t, n) {
|
|
1964
|
+
return ii(e[0], la(e), t ?? 10, n);
|
|
1965
|
+
}, n.copy = function() {
|
|
1966
|
+
return Ya().domain(n.domain()).range(n.range());
|
|
1967
|
+
}, n;
|
|
1968
|
+
}
|
|
1969
|
+
var Xa = /* @__PURE__ */ new Map(), Za = Symbol("vega_scale");
|
|
1970
|
+
function Qa(e) {
|
|
1971
|
+
return e[Za] = !0, e;
|
|
1972
|
+
}
|
|
1973
|
+
function $a(e, t, n) {
|
|
1974
|
+
let r = function() {
|
|
1975
|
+
let n = t();
|
|
1976
|
+
return n.invertRange ||= n.invert ? Va(n) : n.invertExtent ? Ha(n) : void 0, n.type = e, Qa(n);
|
|
1977
|
+
};
|
|
1978
|
+
return r.metadata = fa(da(n)), r;
|
|
1979
|
+
}
|
|
1980
|
+
function P(e, t, n) {
|
|
1981
|
+
return arguments.length > 1 ? (Xa.set(e, $a(e, t, n)), this) : eo(e) ? Xa.get(e) : void 0;
|
|
1982
|
+
}
|
|
1983
|
+
P(wa, si), P(Ta, oi, M), P("log", vi, [M, "log"]), P("pow", Di, M), P(Ea, Oi, M), P(Da, Si, M), P(Oa, Bi, [M, Ba]), P("utc", Vi, [M, Ba]), P(ka, Ui, [M, N]), P(`${ka}-${Ta}`, Ui, [M, N]), P(`${ka}-log`, Wi, [
|
|
1984
|
+
M,
|
|
1985
|
+
N,
|
|
1986
|
+
"log"
|
|
1987
|
+
]), P(`${ka}-pow`, Ki, [M, N]), P(`${ka}-${Ea}`, qi, [M, N]), P(`${ka}-${Da}`, Gi, [M, N]), P(`${Aa}-${Ta}`, Yi, [M, N]), P(`${Aa}-log`, Xi, [
|
|
1988
|
+
M,
|
|
1989
|
+
N,
|
|
1990
|
+
"log"
|
|
1991
|
+
]), P(`${Aa}-pow`, Qi, [M, N]), P(`${Aa}-${Ea}`, $i, [M, N]), P(`${Aa}-${Da}`, Zi, [M, N]), P(ja, ki, [za, ja]), P(Ma, Ai, za), P(Na, ji, za), P(La, Ya, [Ra, za]), P(Pa, Ft, Ra), P(Ia, Ua, Ra), P(Fa, Ga, Ra);
|
|
1992
|
+
function eo(e) {
|
|
1993
|
+
return Xa.has(e);
|
|
1994
|
+
}
|
|
1995
|
+
function to(e, t) {
|
|
1996
|
+
let n = Xa.get(e);
|
|
1997
|
+
return n && n.metadata[t];
|
|
1998
|
+
}
|
|
1999
|
+
function no(e) {
|
|
2000
|
+
return to(e, M);
|
|
2001
|
+
}
|
|
2002
|
+
function ro(e) {
|
|
2003
|
+
return to(e, Ra);
|
|
2004
|
+
}
|
|
2005
|
+
function io(e) {
|
|
2006
|
+
return to(e, za);
|
|
2007
|
+
}
|
|
2008
|
+
function ao(e) {
|
|
2009
|
+
return to(e, "log");
|
|
2010
|
+
}
|
|
2011
|
+
function oo(e) {
|
|
2012
|
+
return to(e, N);
|
|
2013
|
+
}
|
|
2014
|
+
function so(e, t) {
|
|
2015
|
+
let n = t[0], r = la(t) - n;
|
|
2016
|
+
return function(t) {
|
|
2017
|
+
return e(n + t * r);
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
function co(e, t, n) {
|
|
2021
|
+
return Gr(uo(t || "rgb", n), e);
|
|
2022
|
+
}
|
|
2023
|
+
function lo(e, t) {
|
|
2024
|
+
let n = Array(t), r = t + 1;
|
|
2025
|
+
for (let i = 0; i < t;) n[i] = e(++i / r);
|
|
2026
|
+
return n;
|
|
2027
|
+
}
|
|
2028
|
+
function uo(e, t) {
|
|
2029
|
+
let n = qr[fo(e)];
|
|
2030
|
+
return t != null && n && n.gamma ? n.gamma(t) : n;
|
|
2031
|
+
}
|
|
2032
|
+
function fo(e) {
|
|
2033
|
+
return "interpolate" + e.toLowerCase().split("-").map((e) => e[0].toUpperCase() + e.slice(1)).join("");
|
|
2034
|
+
}
|
|
2035
|
+
var po = {
|
|
2036
|
+
blues: "cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",
|
|
2037
|
+
greens: "d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",
|
|
2038
|
+
greys: "e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",
|
|
2039
|
+
oranges: "fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",
|
|
2040
|
+
purples: "e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",
|
|
2041
|
+
reds: "fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",
|
|
2042
|
+
blueGreen: "d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",
|
|
2043
|
+
bluePurple: "ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",
|
|
2044
|
+
greenBlue: "d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",
|
|
2045
|
+
orangeRed: "fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",
|
|
2046
|
+
purpleBlue: "dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",
|
|
2047
|
+
purpleBlueGreen: "dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",
|
|
2048
|
+
purpleRed: "dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",
|
|
2049
|
+
redPurple: "fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",
|
|
2050
|
+
yellowGreen: "e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",
|
|
2051
|
+
yellowOrangeBrown: "feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",
|
|
2052
|
+
yellowOrangeRed: "fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",
|
|
2053
|
+
blueOrange: "134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",
|
|
2054
|
+
brownBlueGreen: "704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",
|
|
2055
|
+
purpleGreen: "5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",
|
|
2056
|
+
purpleOrange: "4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",
|
|
2057
|
+
redBlue: "8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",
|
|
2058
|
+
redGrey: "8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",
|
|
2059
|
+
yellowGreenBlue: "eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",
|
|
2060
|
+
redYellowBlue: "a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",
|
|
2061
|
+
redYellowGreen: "a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",
|
|
2062
|
+
pinkYellowGreen: "8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",
|
|
2063
|
+
spectral: "9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",
|
|
2064
|
+
viridis: "440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",
|
|
2065
|
+
magma: "0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",
|
|
2066
|
+
inferno: "0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",
|
|
2067
|
+
plasma: "0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",
|
|
2068
|
+
cividis: "00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",
|
|
2069
|
+
rainbow: "6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",
|
|
2070
|
+
sinebow: "ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",
|
|
2071
|
+
turbo: "23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",
|
|
2072
|
+
browns: "eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",
|
|
2073
|
+
tealBlues: "bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",
|
|
2074
|
+
teals: "bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",
|
|
2075
|
+
warmGreys: "dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",
|
|
2076
|
+
goldGreen: "f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",
|
|
2077
|
+
goldOrange: "f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",
|
|
2078
|
+
goldRed: "f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",
|
|
2079
|
+
lightGreyRed: "efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",
|
|
2080
|
+
lightGreyTeal: "e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",
|
|
2081
|
+
lightMulti: "e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",
|
|
2082
|
+
lightOrange: "f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",
|
|
2083
|
+
lightTealBlue: "e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",
|
|
2084
|
+
darkBlue: "3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",
|
|
2085
|
+
darkGold: "3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",
|
|
2086
|
+
darkGreen: "3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",
|
|
2087
|
+
darkMulti: "3737371f5287197d8c29a86995ce3fffe800ffffff",
|
|
2088
|
+
darkRed: "3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"
|
|
2089
|
+
}, mo = {
|
|
2090
|
+
accent: ma,
|
|
2091
|
+
category10: pa,
|
|
2092
|
+
category20: "1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",
|
|
2093
|
+
category20b: "393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",
|
|
2094
|
+
category20c: "3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",
|
|
2095
|
+
dark2: ha,
|
|
2096
|
+
observable10: ga,
|
|
2097
|
+
paired: _a,
|
|
2098
|
+
pastel1: va,
|
|
2099
|
+
pastel2: ya,
|
|
2100
|
+
set1: ba,
|
|
2101
|
+
set2: xa,
|
|
2102
|
+
set3: Sa,
|
|
2103
|
+
tableau10: "4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",
|
|
2104
|
+
tableau20: "4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"
|
|
2105
|
+
};
|
|
2106
|
+
function ho(e) {
|
|
2107
|
+
if (ca(e)) return e;
|
|
2108
|
+
let t = e.length / 6 | 0, n = Array(t);
|
|
2109
|
+
for (let r = 0; r < t;) n[r] = "#" + e.slice(r * 6, ++r * 6);
|
|
2110
|
+
return n;
|
|
2111
|
+
}
|
|
2112
|
+
function go(e, t) {
|
|
2113
|
+
for (let n in e) vo(n, t(e[n]));
|
|
2114
|
+
}
|
|
2115
|
+
var _o = {};
|
|
2116
|
+
go(mo, ho), go(po, (e) => co(ho(e)));
|
|
2117
|
+
function vo(e, t) {
|
|
2118
|
+
return e &&= e.toLowerCase(), arguments.length > 1 ? (_o[e] = t, this) : _o[e];
|
|
2119
|
+
}
|
|
2120
|
+
//#endregion
|
|
2121
|
+
//#region ../core/src/selection/categorySelection.js
|
|
2122
|
+
function yo(e) {
|
|
2123
|
+
return typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e);
|
|
2124
|
+
}
|
|
2125
|
+
function bo(e, t = [], n = !0) {
|
|
2126
|
+
let r = new Set(t);
|
|
2127
|
+
if (!Array.from(r).every(yo)) throw Error("Category selections require finite scalar values.");
|
|
2128
|
+
if (!n && r.size > 1) throw Error("Single category selections accept at most one distinct value.");
|
|
2129
|
+
return {
|
|
2130
|
+
type: "categories",
|
|
2131
|
+
component: e,
|
|
2132
|
+
values: r
|
|
2133
|
+
};
|
|
2134
|
+
}
|
|
2135
|
+
function xo(e, t) {
|
|
2136
|
+
if (!Array.isArray(t) || t.some((e) => !Array.isArray(e) || e.length !== 1)) throw Error("Category tuples must contain exactly one finite scalar value.");
|
|
2137
|
+
return bo(e.encodings[0], t.map((e) => e[0]), !!e.toggle);
|
|
2138
|
+
}
|
|
2139
|
+
function So(e, t, n) {
|
|
2140
|
+
if (!yo(t)) return n ? void 0 : bo(e.component);
|
|
2141
|
+
let r = n ? new Set(e.values) : /* @__PURE__ */ new Set();
|
|
2142
|
+
return n && r.has(t) ? r.delete(t) : r.add(t), {
|
|
2143
|
+
...e,
|
|
2144
|
+
values: r
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
function Co(e, t, n) {
|
|
2148
|
+
return e.values.size === 0 ? n : yo(t) && e.values.has(t);
|
|
2149
|
+
}
|
|
2150
|
+
function wo(e, t, n) {
|
|
2151
|
+
let r = Object.entries(e), [i, a] = r.find(([e]) => e === t) ?? r.find(([, e]) => e?.resolutionChannel === t) ?? [];
|
|
2152
|
+
if (!a || !("field" in a) || "condition" in a) throw Error(`Category selection input "${t}" must be an unconditional field encoding.`);
|
|
2153
|
+
let o = n(a.resolutionChannel ?? t);
|
|
2154
|
+
if (!["nominal", "ordinal"].includes(a.type) || !o || !ro(o.type)) throw Error(`Category selection input "${t}" requires a nominal or ordinal field with a discrete scale.`);
|
|
2155
|
+
return {
|
|
2156
|
+
input: i,
|
|
2157
|
+
field: a.field
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
//#endregion
|
|
2161
|
+
//#region ../core/src/paramRuntime/paramUtils.js
|
|
2162
|
+
function F(e) {
|
|
2163
|
+
return typeof e == "object" && !!e && "expr" in e && ot(e.expr);
|
|
2164
|
+
}
|
|
2165
|
+
function To(e) {
|
|
2166
|
+
if (F(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
|
|
2167
|
+
return e;
|
|
2168
|
+
}
|
|
2169
|
+
function Eo(e) {
|
|
2170
|
+
return ("expr" in e || "bind" in e) && !("select" in e) && !("ruler" in e);
|
|
2171
|
+
}
|
|
2172
|
+
function Do(e) {
|
|
2173
|
+
return !("expr" in e) && "select" in e;
|
|
2174
|
+
}
|
|
2175
|
+
function Oo(e) {
|
|
2176
|
+
return !("bind" in e && e.bind === "legend") || "select" in e && typeof e.select == "object" && e.select.on !== void 0;
|
|
2177
|
+
}
|
|
2178
|
+
function ko(e) {
|
|
2179
|
+
return !("expr" in e || "bind" in e || "select" in e) && "ruler" in e;
|
|
2180
|
+
}
|
|
2181
|
+
function Ao(e) {
|
|
2182
|
+
if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)) throw Error("Invalid parameter name: " + e + ". Must be a valid JavaScript identifier.");
|
|
2183
|
+
return e;
|
|
2184
|
+
}
|
|
2185
|
+
function jo(e, t, n) {
|
|
2186
|
+
if ("select" in e) {
|
|
2187
|
+
let t = Zl(e.select);
|
|
2188
|
+
if (Ql(t)) {
|
|
2189
|
+
if (t.encodings && e.value !== void 0) {
|
|
2190
|
+
let n = t.encodings[0], r = e.value;
|
|
2191
|
+
return bo(n, r.map((e) => e[n]), !!t.toggle);
|
|
2192
|
+
}
|
|
2193
|
+
return ql(t);
|
|
2194
|
+
}
|
|
2195
|
+
if ($l(t)) {
|
|
2196
|
+
if (t.encodings?.some($) && (!("bind" in e) || e.bind !== "legend" || t.encodings.length !== 1 || t.extent !== void 0)) throw Error(`Numeric interval "${e.name}" requires one legend-bound color, fill, or stroke component without an extent.`);
|
|
2197
|
+
if (!t.encodings) throw Error("Interval selection \"" + e.name + "\" must have encodings defined!");
|
|
2198
|
+
return e.value ? {
|
|
2199
|
+
type: "interval",
|
|
2200
|
+
intervals: {
|
|
2201
|
+
...Ll(t.encodings).intervals,
|
|
2202
|
+
...nu(e.value)
|
|
2203
|
+
}
|
|
2204
|
+
} : Ll(t.encodings);
|
|
2205
|
+
}
|
|
2206
|
+
throw Error("Unknown selection config for parameter \"" + e.name + "\".");
|
|
2207
|
+
}
|
|
2208
|
+
if ("ruler" in e) return ea(e.ruler.encodings, e.value);
|
|
2209
|
+
if ("expr" in e) {
|
|
2210
|
+
let r = n ?? t?.createExpression(e);
|
|
2211
|
+
if (!r) throw Error("Cannot evaluate expression for parameter \"" + e.name + "\".");
|
|
2212
|
+
return r(null);
|
|
2213
|
+
}
|
|
2214
|
+
return "value" in e ? e.value : null;
|
|
2215
|
+
}
|
|
2216
|
+
function Mo(e, t, n, r, i = []) {
|
|
2217
|
+
let a = { ...t }, o = [];
|
|
2218
|
+
for (let [r, i] of Object.entries(t)) if (F(i)) {
|
|
2219
|
+
let t = e.createExpression(i), s = o.push({
|
|
2220
|
+
key: r,
|
|
2221
|
+
fn: t
|
|
2222
|
+
}) - 1;
|
|
2223
|
+
Object.defineProperty(a, r, {
|
|
2224
|
+
enumerable: !0,
|
|
2225
|
+
get: n ? () => c.get()[s] : () => t(null)
|
|
2226
|
+
});
|
|
2227
|
+
} else a[r] = i;
|
|
2228
|
+
if (!n) return a;
|
|
2229
|
+
for (let { key: t, expr: n } of i) o.push({
|
|
2230
|
+
key: t,
|
|
2231
|
+
fn: e.createExpression(n)
|
|
2232
|
+
});
|
|
2233
|
+
if (!o.length) return a;
|
|
2234
|
+
let s = Array.from(new Set(o.flatMap(({ fn: e }) => e.dependencies))), c = e.computed("expression properties", s, () => o.map(({ fn: e }) => e(null)), { equals: No }), l = c.get(), u = e.effect([c], () => {
|
|
2235
|
+
let e = c.get(), t = new Set(o.filter((t, n) => l[n] !== e[n]).map(({ key: e }) => e));
|
|
2236
|
+
l = e, n(t);
|
|
2237
|
+
});
|
|
2238
|
+
return r?.(c.dispose), r?.(u), a;
|
|
2239
|
+
}
|
|
2240
|
+
function No(e, t) {
|
|
2241
|
+
return e.every((e, n) => e === t[n]);
|
|
2242
|
+
}
|
|
2243
|
+
function Po(e, t, n, r) {
|
|
2244
|
+
if (!F(t)) return t;
|
|
2245
|
+
let i = () => {
|
|
2246
|
+
throw Error(n);
|
|
2247
|
+
}, a = e.watchExpression ? e.watchExpression(t, i, {
|
|
2248
|
+
scopeOwned: !1,
|
|
2249
|
+
registerDisposer: r
|
|
2250
|
+
}) : e.createExpression(t);
|
|
2251
|
+
if (!e.watchExpression) {
|
|
2252
|
+
let e = a.subscribe(i);
|
|
2253
|
+
r?.(e);
|
|
2254
|
+
}
|
|
2255
|
+
return a();
|
|
2256
|
+
}
|
|
2257
|
+
function Fo(e) {
|
|
2258
|
+
return Object.assign(() => e, {
|
|
2259
|
+
dependencies: [],
|
|
2260
|
+
subscribe: () => () => void 0,
|
|
2261
|
+
invalidate: () => void 0,
|
|
2262
|
+
identifier: () => "constant",
|
|
2263
|
+
fields: [],
|
|
2264
|
+
globals: [],
|
|
2265
|
+
code: JSON.stringify(e)
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
//#endregion
|
|
2269
|
+
//#region ../core/src/utils/specError.js
|
|
2270
|
+
function Io(e) {
|
|
2271
|
+
let t = /* @__PURE__ */ new Set();
|
|
2272
|
+
for (; e instanceof Error && !t.has(e);) {
|
|
2273
|
+
t.add(e);
|
|
2274
|
+
let n = e.specLocation;
|
|
2275
|
+
if (n) return n;
|
|
2276
|
+
e = e.cause;
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
function Lo(e, t) {
|
|
2280
|
+
return e instanceof Error && t && !Io(e) && Object.assign(e, { specLocation: t }), e;
|
|
2281
|
+
}
|
|
2282
|
+
//#endregion
|
|
2283
|
+
//#region ../core/src/utils/compileDatumAccessor.js
|
|
2284
|
+
var Ro = 0;
|
|
2285
|
+
function zo(e, t, n, r) {
|
|
2286
|
+
let i = Array.from(t, (e) => {
|
|
2287
|
+
let t = JSON.stringify(e);
|
|
2288
|
+
return `if (!(${t} in datum)) missingField(datum, ${t});`;
|
|
2289
|
+
}).join("\n");
|
|
2290
|
+
return Function("missingField", "context", `"use strict";
|
|
2291
|
+
return function createAccessor(globalObject) {
|
|
2292
|
+
// accessor ${Ro++}
|
|
2293
|
+
return function accessDatum(datum) {
|
|
2294
|
+
${i}
|
|
2295
|
+
${e}
|
|
2296
|
+
}${r ? ".bind(context)" : ""};
|
|
2297
|
+
};`)((e, t) => {
|
|
2298
|
+
throw Lo(/* @__PURE__ */ Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`), n);
|
|
2299
|
+
}, r);
|
|
2300
|
+
}
|
|
2301
|
+
//#endregion
|
|
2302
|
+
//#region ../core/src/utils/field.js
|
|
2303
|
+
function Bo(e, t, n) {
|
|
2304
|
+
let r = Ee(e), i = r.length === 1 ? r[0] : e;
|
|
2305
|
+
return _(zo(`return datum${r.map((e) => `[${JSON.stringify(e)}]`).join("")};`, r.length === 1 ? r : [], n)(), [i], t ?? i);
|
|
2306
|
+
}
|
|
2307
|
+
//#endregion
|
|
2308
|
+
//#region ../core/src/data/transforms/transform.js
|
|
2309
|
+
var Vo = class extends fe {
|
|
2310
|
+
inFacet = !1;
|
|
2311
|
+
#e;
|
|
2312
|
+
#t;
|
|
2313
|
+
#n = 0;
|
|
2314
|
+
#r = 0;
|
|
2315
|
+
#i;
|
|
2316
|
+
#a = [];
|
|
2317
|
+
constructor(e, t) {
|
|
2318
|
+
super(t), this.#e = e.type;
|
|
2319
|
+
let n = e.debounce;
|
|
2320
|
+
if (n !== void 0) {
|
|
2321
|
+
if (!Number.isFinite(n) || n < 0) throw Error(`The debounce for the ${e.type} transform must be a non-negative finite number.`);
|
|
2322
|
+
this.#t = n, this.registerDisposer(() => clearTimeout(this.#i));
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
complete() {
|
|
2326
|
+
let e = this.#n;
|
|
2327
|
+
super.complete(), this.#r = e, e == this.#n && (clearTimeout(this.#i), this.#i = void 0);
|
|
2328
|
+
}
|
|
2329
|
+
reset() {
|
|
2330
|
+
this.#s(), this.inFacet = !1, super.reset();
|
|
2331
|
+
}
|
|
2332
|
+
beginBatch(e) {
|
|
2333
|
+
e.type == "facet" && (this.inFacet = !0), this.#s(), super.beginBatch(e);
|
|
2334
|
+
}
|
|
2335
|
+
requestReactiveRepropagate() {
|
|
2336
|
+
this.#n++, this.#t === void 0 ? this.requestRepropagate() : (clearTimeout(this.#i), this.#i = void 0, this.completed && (this.#i = setTimeout(this.#o, this.#t)));
|
|
2337
|
+
}
|
|
2338
|
+
#o = () => {
|
|
2339
|
+
this.#i = void 0, !this.disposed && this.completed && this.#r != this.#n && (this.requestRepropagate(), this.paramRuntime.flushNow());
|
|
2340
|
+
};
|
|
2341
|
+
get label() {
|
|
2342
|
+
return this.#e;
|
|
2343
|
+
}
|
|
2344
|
+
createFieldAccessor(e, t, { index: n, defaultValue: r } = {}) {
|
|
2345
|
+
let i = e[t], a = Array.isArray(i), o = this.paramRuntimeProvider?.paramRuntime;
|
|
2346
|
+
return Bo(a ? i[n] : i ?? r, void 0, o?.getSpecLocation(e, i == null ? [] : a ? [t, n] : [t]));
|
|
2347
|
+
}
|
|
2348
|
+
createFieldAccessors(e, t) {
|
|
2349
|
+
return _e(e[t]).map((n, r) => this.createFieldAccessor(e, t, { index: r }));
|
|
2350
|
+
}
|
|
2351
|
+
watchExprRef(e, t) {
|
|
2352
|
+
if (F(e)) {
|
|
2353
|
+
let n = e;
|
|
2354
|
+
return this.paramRuntime.watchExpression(n, t, {
|
|
2355
|
+
scopeOwned: !1,
|
|
2356
|
+
registerDisposer: (e) => this.registerDisposer(e)
|
|
2357
|
+
});
|
|
2358
|
+
}
|
|
2359
|
+
return (() => e);
|
|
2360
|
+
}
|
|
2361
|
+
watchSnapshottedExpression(e) {
|
|
2362
|
+
let t, n;
|
|
2363
|
+
return t = this.paramRuntime.watchExpression(e, () => {
|
|
2364
|
+
n.refresh(), this.requestReactiveRepropagate();
|
|
2365
|
+
}, {
|
|
2366
|
+
scopeOwned: !1,
|
|
2367
|
+
registerDisposer: (e) => this.registerDisposer(e)
|
|
2368
|
+
}), n = t.createSnapshotEvaluator(), this.#a.push(n.refresh), n;
|
|
2369
|
+
}
|
|
2370
|
+
#s() {
|
|
2371
|
+
for (let e of this.#a) e();
|
|
2372
|
+
}
|
|
2373
|
+
}, I = "__uniqueId", Ho = 1e4, Uo = [null], Wo = class extends Vo {
|
|
2374
|
+
get behavior() {
|
|
2375
|
+
return 2;
|
|
2376
|
+
}
|
|
2377
|
+
constructor(e) {
|
|
2378
|
+
super(e), this.params = e, this._blocks = [], this._usedBlocks = 0, this._id = -1;
|
|
2379
|
+
}
|
|
2380
|
+
initialize() {}
|
|
2381
|
+
reset() {
|
|
2382
|
+
super.reset(), this._usedBlocks = 0, this._id = -1;
|
|
2383
|
+
}
|
|
2384
|
+
handle(e) {
|
|
2385
|
+
e[I] = this.#e(), this._propagate(e);
|
|
2386
|
+
}
|
|
2387
|
+
#e() {
|
|
2388
|
+
return ++this._id % 1e4 == 0 && (this._id = this.#t() * Ho), this._id;
|
|
2389
|
+
}
|
|
2390
|
+
#t() {
|
|
2391
|
+
return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
|
|
2392
|
+
}
|
|
2393
|
+
#n() {
|
|
2394
|
+
let e = Uo.length;
|
|
2395
|
+
return Uo[e] = this, this._blocks.push(e), this._usedBlocks++, e;
|
|
2396
|
+
}
|
|
2397
|
+
};
|
|
2398
|
+
//#endregion
|
|
2399
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/accessor.js
|
|
2400
|
+
function Go(e, t, n) {
|
|
2401
|
+
return Object.assign(e, {
|
|
2402
|
+
fields: t || [],
|
|
2403
|
+
fname: n
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
//#endregion
|
|
2407
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/getter.js
|
|
2408
|
+
function Ko(e) {
|
|
2409
|
+
return e.length === 1 ? qo(e[0]) : Jo(e);
|
|
2410
|
+
}
|
|
2411
|
+
var qo = (e) => function(t) {
|
|
2412
|
+
return t[e];
|
|
2413
|
+
}, Jo = (e) => {
|
|
2414
|
+
let t = e.length;
|
|
2415
|
+
return function(n) {
|
|
2416
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
2417
|
+
return n;
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
//#endregion
|
|
2421
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/error.js
|
|
2422
|
+
function L(e) {
|
|
2423
|
+
throw Error(e);
|
|
2424
|
+
}
|
|
2425
|
+
//#endregion
|
|
2426
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/splitAccessPath.js
|
|
2427
|
+
function Yo(e) {
|
|
2428
|
+
let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
|
|
2429
|
+
e += "";
|
|
2430
|
+
function l() {
|
|
2431
|
+
t.push(a + e.substring(o, s)), a = "", o = s + 1;
|
|
2432
|
+
}
|
|
2433
|
+
for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
|
|
2434
|
+
else if (c === r) l(), r = null, i = -1;
|
|
2435
|
+
else if (r) continue;
|
|
2436
|
+
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 || L("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
2437
|
+
return i && L("Access path missing closing bracket: " + e), r && L("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
2438
|
+
}
|
|
2439
|
+
//#endregion
|
|
2440
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/field.js
|
|
2441
|
+
function Xo(e, t, n) {
|
|
2442
|
+
let r = Yo(e), i = r.length === 1 ? r[0] : e;
|
|
2443
|
+
return Go((n && n.get || Ko)(r), [i], t || i);
|
|
2444
|
+
}
|
|
2445
|
+
Xo("id"), Go((e) => e, [], "identity"), Go(() => 0, [], "zero"), Go(() => 1, [], "one"), Go(() => !0, [], "true"), Go(() => !1, [], "false");
|
|
2446
|
+
//#endregion
|
|
2447
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/interpreter.js
|
|
2448
|
+
var Zo = /* @__PURE__ */ new Set([
|
|
2449
|
+
...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function"),
|
|
2450
|
+
"__proto__",
|
|
2451
|
+
"then"
|
|
2452
|
+
]);
|
|
2453
|
+
Array.isArray;
|
|
2454
|
+
//#endregion
|
|
2455
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/isFunction.js
|
|
2456
|
+
function Qo(e) {
|
|
2457
|
+
return typeof e == "function";
|
|
2458
|
+
}
|
|
2459
|
+
//#endregion
|
|
2460
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/hasOwnProperty.js
|
|
2461
|
+
function $o(e, t) {
|
|
2462
|
+
return Object.hasOwn(e, t);
|
|
2463
|
+
}
|
|
2464
|
+
//#endregion
|
|
2465
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/isString.js
|
|
2466
|
+
function es(e) {
|
|
2467
|
+
return typeof e == "string";
|
|
2468
|
+
}
|
|
2469
|
+
//#endregion
|
|
2470
|
+
//#region ../../node_modules/vega-expression/node_modules/vega-util/build/toSet.js
|
|
2471
|
+
function ts(e) {
|
|
2472
|
+
let t = {}, n = e.length;
|
|
2473
|
+
for (let r = 0; r < n; ++r) t[e[r] + ""] = !0;
|
|
2474
|
+
return t;
|
|
2475
|
+
}
|
|
2476
|
+
//#endregion
|
|
2477
|
+
//#region ../../node_modules/vega-expression/build/vega-expression.js
|
|
2478
|
+
var ns = "RawCode", rs = "Literal", is = "Property", as = "Identifier", os = "ArrayExpression", ss = "BinaryExpression", cs = "CallExpression", ls = "ConditionalExpression", us = "LogicalExpression", ds = "MemberExpression", fs = "ObjectExpression", ps = "UnaryExpression";
|
|
2479
|
+
function R(e) {
|
|
2480
|
+
this.type = e;
|
|
2481
|
+
}
|
|
2482
|
+
R.prototype.visit = function(e) {
|
|
2483
|
+
let t, n, r;
|
|
2484
|
+
if (e(this)) return 1;
|
|
2485
|
+
for (t = ms(this), n = 0, r = t.length; n < r; ++n) if (t[n].visit(e)) return 1;
|
|
2486
|
+
};
|
|
2487
|
+
function ms(e) {
|
|
2488
|
+
switch (e.type) {
|
|
2489
|
+
case os: return e.elements;
|
|
2490
|
+
case ss:
|
|
2491
|
+
case us: return [e.left, e.right];
|
|
2492
|
+
case cs: return [e.callee].concat(e.arguments);
|
|
2493
|
+
case ls: return [
|
|
2494
|
+
e.test,
|
|
2495
|
+
e.consequent,
|
|
2496
|
+
e.alternate
|
|
2497
|
+
];
|
|
2498
|
+
case ds: return [e.object, e.property];
|
|
2499
|
+
case fs: return e.properties;
|
|
2500
|
+
case is: return [e.key, e.value];
|
|
2501
|
+
case ps: return [e.argument];
|
|
2502
|
+
case as:
|
|
2503
|
+
case rs:
|
|
2504
|
+
case ns:
|
|
2505
|
+
default: return [];
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
var z, B, V, H, U, hs = 1, gs = 2, _s = 3, W = 4, vs = 5, ys = 6, G = 7, bs = 8, xs = 9;
|
|
2509
|
+
z = {}, z[hs] = "Boolean", z[gs] = "<end>", z[_s] = "Identifier", z[W] = "Keyword", z[vs] = "Null", z[ys] = "Numeric", z[G] = "Punctuator", z[bs] = "String", z[xs] = "RegularExpression";
|
|
2510
|
+
var Ss = "ArrayExpression", Cs = "BinaryExpression", ws = "CallExpression", Ts = "ConditionalExpression", Es = "Identifier", Ds = "Literal", Os = "LogicalExpression", ks = "MemberExpression", As = "ObjectExpression", js = "Property", Ms = "UnaryExpression", K = "Unexpected token %0", Ns = "Unexpected number", Ps = "Unexpected string", Fs = "Unexpected identifier", Is = "Unexpected reserved word", Ls = "Unexpected end of input", Rs = "Invalid regular expression", zs = "Invalid regular expression: missing /", Bs = "Octal literals are not allowed in strict mode.", Vs = "Duplicate data property in object literal not allowed in strict mode", q = "ILLEGAL", Hs = "Disabled.", Us = /* @__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]"), Ws = /* @__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]");
|
|
2511
|
+
function Gs(e, t) {
|
|
2512
|
+
/* istanbul ignore next */
|
|
2513
|
+
if (!e) throw Error("ASSERT: " + t);
|
|
2514
|
+
}
|
|
2515
|
+
function J(e) {
|
|
2516
|
+
return e >= 48 && e <= 57;
|
|
2517
|
+
}
|
|
2518
|
+
function Ks(e) {
|
|
2519
|
+
return "0123456789abcdefABCDEF".includes(e);
|
|
2520
|
+
}
|
|
2521
|
+
function qs(e) {
|
|
2522
|
+
return "01234567".includes(e);
|
|
2523
|
+
}
|
|
2524
|
+
function Js(e) {
|
|
2525
|
+
return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [
|
|
2526
|
+
5760,
|
|
2527
|
+
6158,
|
|
2528
|
+
8192,
|
|
2529
|
+
8193,
|
|
2530
|
+
8194,
|
|
2531
|
+
8195,
|
|
2532
|
+
8196,
|
|
2533
|
+
8197,
|
|
2534
|
+
8198,
|
|
2535
|
+
8199,
|
|
2536
|
+
8200,
|
|
2537
|
+
8201,
|
|
2538
|
+
8202,
|
|
2539
|
+
8239,
|
|
2540
|
+
8287,
|
|
2541
|
+
12288,
|
|
2542
|
+
65279
|
|
2543
|
+
].includes(e);
|
|
2544
|
+
}
|
|
2545
|
+
function Ys(e) {
|
|
2546
|
+
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
2547
|
+
}
|
|
2548
|
+
function Xs(e) {
|
|
2549
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && Us.test(String.fromCharCode(e));
|
|
2550
|
+
}
|
|
2551
|
+
function Zs(e) {
|
|
2552
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && Ws.test(String.fromCharCode(e));
|
|
2553
|
+
}
|
|
2554
|
+
var Qs = {
|
|
2555
|
+
if: 1,
|
|
2556
|
+
in: 1,
|
|
2557
|
+
do: 1,
|
|
2558
|
+
var: 1,
|
|
2559
|
+
for: 1,
|
|
2560
|
+
new: 1,
|
|
2561
|
+
try: 1,
|
|
2562
|
+
let: 1,
|
|
2563
|
+
this: 1,
|
|
2564
|
+
else: 1,
|
|
2565
|
+
case: 1,
|
|
2566
|
+
void: 1,
|
|
2567
|
+
with: 1,
|
|
2568
|
+
enum: 1,
|
|
2569
|
+
while: 1,
|
|
2570
|
+
break: 1,
|
|
2571
|
+
catch: 1,
|
|
2572
|
+
throw: 1,
|
|
2573
|
+
const: 1,
|
|
2574
|
+
yield: 1,
|
|
2575
|
+
class: 1,
|
|
2576
|
+
super: 1,
|
|
2577
|
+
return: 1,
|
|
2578
|
+
typeof: 1,
|
|
2579
|
+
delete: 1,
|
|
2580
|
+
switch: 1,
|
|
2581
|
+
export: 1,
|
|
2582
|
+
import: 1,
|
|
2583
|
+
public: 1,
|
|
2584
|
+
static: 1,
|
|
2585
|
+
default: 1,
|
|
2586
|
+
finally: 1,
|
|
2587
|
+
extends: 1,
|
|
2588
|
+
package: 1,
|
|
2589
|
+
private: 1,
|
|
2590
|
+
function: 1,
|
|
2591
|
+
continue: 1,
|
|
2592
|
+
debugger: 1,
|
|
2593
|
+
interface: 1,
|
|
2594
|
+
protected: 1,
|
|
2595
|
+
instanceof: 1,
|
|
2596
|
+
implements: 1
|
|
2597
|
+
};
|
|
2598
|
+
function $s() {
|
|
2599
|
+
for (; V < H;) {
|
|
2600
|
+
let e = B.charCodeAt(V);
|
|
2601
|
+
if (Js(e) || Ys(e)) ++V;
|
|
2602
|
+
else break;
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
function ec(e) {
|
|
2606
|
+
var t, n, r, i = 0;
|
|
2607
|
+
for (n = e === "u" ? 4 : 2, t = 0; t < n; ++t) V < H && Ks(B[V]) ? (r = B[V++], i = i * 16 + "0123456789abcdef".indexOf(r.toLowerCase())) : X({}, K, q);
|
|
2608
|
+
return String.fromCharCode(i);
|
|
2609
|
+
}
|
|
2610
|
+
function tc() {
|
|
2611
|
+
var e = B[V], t = 0, n, r;
|
|
2612
|
+
for (e === "}" && X({}, K, q); V < H && (e = B[V++], Ks(e));) t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
|
|
2613
|
+
return (t > 1114111 || e !== "}") && X({}, K, q), t <= 65535 ? String.fromCharCode(t) : (n = (t - 65536 >> 10) + 55296, r = (t - 65536 & 1023) + 56320, String.fromCharCode(n, r));
|
|
2614
|
+
}
|
|
2615
|
+
function nc() {
|
|
2616
|
+
var e = B.charCodeAt(V++), t = String.fromCharCode(e);
|
|
2617
|
+
for (e === 92 && (B.charCodeAt(V) !== 117 && X({}, K, q), ++V, e = ec("u"), (!e || e === "\\" || !Xs(e.charCodeAt(0))) && X({}, K, q), t = e); V < H && (e = B.charCodeAt(V), Zs(e));) ++V, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), B.charCodeAt(V) !== 117 && X({}, K, q), ++V, e = ec("u"), (!e || e === "\\" || !Zs(e.charCodeAt(0))) && X({}, K, q), t += e);
|
|
2618
|
+
return t;
|
|
2619
|
+
}
|
|
2620
|
+
function rc() {
|
|
2621
|
+
for (var e = V++, t; V < H;) {
|
|
2622
|
+
if (t = B.charCodeAt(V), t === 92) return V = e, nc();
|
|
2623
|
+
if (Zs(t)) ++V;
|
|
2624
|
+
else break;
|
|
2625
|
+
}
|
|
2626
|
+
return B.slice(e, V);
|
|
2627
|
+
}
|
|
2628
|
+
function ic() {
|
|
2629
|
+
var e = V, t = B.charCodeAt(V) === 92 ? nc() : rc();
|
|
2630
|
+
return {
|
|
2631
|
+
type: t.length === 1 ? _s : Qs.hasOwnProperty(t) ? W : t === "null" ? vs : t === "true" || t === "false" ? hs : _s,
|
|
2632
|
+
value: t,
|
|
2633
|
+
start: e,
|
|
2634
|
+
end: V
|
|
2635
|
+
};
|
|
2636
|
+
}
|
|
2637
|
+
function ac() {
|
|
2638
|
+
var e = V, t = B.charCodeAt(V), n, r = B[V], i, a, o;
|
|
2639
|
+
switch (t) {
|
|
2640
|
+
case 46:
|
|
2641
|
+
case 40:
|
|
2642
|
+
case 41:
|
|
2643
|
+
case 59:
|
|
2644
|
+
case 44:
|
|
2645
|
+
case 123:
|
|
2646
|
+
case 125:
|
|
2647
|
+
case 91:
|
|
2648
|
+
case 93:
|
|
2649
|
+
case 58:
|
|
2650
|
+
case 63:
|
|
2651
|
+
case 126: return ++V, {
|
|
2652
|
+
type: G,
|
|
2653
|
+
value: String.fromCharCode(t),
|
|
2654
|
+
start: e,
|
|
2655
|
+
end: V
|
|
2656
|
+
};
|
|
2657
|
+
default: if (n = B.charCodeAt(V + 1), n === 61) switch (t) {
|
|
2658
|
+
case 43:
|
|
2659
|
+
case 45:
|
|
2660
|
+
case 47:
|
|
2661
|
+
case 60:
|
|
2662
|
+
case 62:
|
|
2663
|
+
case 94:
|
|
2664
|
+
case 124:
|
|
2665
|
+
case 37:
|
|
2666
|
+
case 38:
|
|
2667
|
+
case 42: return V += 2, {
|
|
2668
|
+
type: G,
|
|
2669
|
+
value: String.fromCharCode(t) + String.fromCharCode(n),
|
|
2670
|
+
start: e,
|
|
2671
|
+
end: V
|
|
2672
|
+
};
|
|
2673
|
+
case 33:
|
|
2674
|
+
case 61: return V += 2, B.charCodeAt(V) === 61 && ++V, {
|
|
2675
|
+
type: G,
|
|
2676
|
+
value: B.slice(e, V),
|
|
2677
|
+
start: e,
|
|
2678
|
+
end: V
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
if (o = B.substr(V, 4), o === ">>>=") return V += 4, {
|
|
2683
|
+
type: G,
|
|
2684
|
+
value: o,
|
|
2685
|
+
start: e,
|
|
2686
|
+
end: V
|
|
2687
|
+
};
|
|
2688
|
+
if (a = o.substr(0, 3), a === ">>>" || a === "<<=" || a === ">>=") return V += 3, {
|
|
2689
|
+
type: G,
|
|
2690
|
+
value: a,
|
|
2691
|
+
start: e,
|
|
2692
|
+
end: V
|
|
2693
|
+
};
|
|
2694
|
+
if (i = a.substr(0, 2), r === i[1] && "+-<>&|".includes(r) || i === "=>") return V += 2, {
|
|
2695
|
+
type: G,
|
|
2696
|
+
value: i,
|
|
2697
|
+
start: e,
|
|
2698
|
+
end: V
|
|
2699
|
+
};
|
|
2700
|
+
if (i === "//" && X({}, K, q), "<>=!+-*%&|^/".includes(r)) return ++V, {
|
|
2701
|
+
type: G,
|
|
2702
|
+
value: r,
|
|
2703
|
+
start: e,
|
|
2704
|
+
end: V
|
|
2705
|
+
};
|
|
2706
|
+
X({}, K, q);
|
|
2707
|
+
}
|
|
2708
|
+
function oc(e) {
|
|
2709
|
+
let t = "";
|
|
2710
|
+
for (; V < H && Ks(B[V]);) t += B[V++];
|
|
2711
|
+
return t.length === 0 && X({}, K, q), Xs(B.charCodeAt(V)) && X({}, K, q), {
|
|
2712
|
+
type: ys,
|
|
2713
|
+
value: parseInt("0x" + t, 16),
|
|
2714
|
+
start: e,
|
|
2715
|
+
end: V
|
|
2716
|
+
};
|
|
2717
|
+
}
|
|
2718
|
+
function sc(e) {
|
|
2719
|
+
let t = "0" + B[V++];
|
|
2720
|
+
for (; V < H && qs(B[V]);) t += B[V++];
|
|
2721
|
+
return (Xs(B.charCodeAt(V)) || J(B.charCodeAt(V))) && X({}, K, q), {
|
|
2722
|
+
type: ys,
|
|
2723
|
+
value: parseInt(t, 8),
|
|
2724
|
+
octal: !0,
|
|
2725
|
+
start: e,
|
|
2726
|
+
end: V
|
|
2727
|
+
};
|
|
2728
|
+
}
|
|
2729
|
+
function cc() {
|
|
2730
|
+
var e, t, n = B[V];
|
|
2731
|
+
if (Gs(J(n.charCodeAt(0)) || n === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = V, e = "", n !== ".") {
|
|
2732
|
+
if (e = B[V++], n = B[V], e === "0") {
|
|
2733
|
+
if (n === "x" || n === "X") return ++V, oc(t);
|
|
2734
|
+
if (qs(n)) return sc(t);
|
|
2735
|
+
n && J(n.charCodeAt(0)) && X({}, K, q);
|
|
2736
|
+
}
|
|
2737
|
+
for (; J(B.charCodeAt(V));) e += B[V++];
|
|
2738
|
+
n = B[V];
|
|
2739
|
+
}
|
|
2740
|
+
if (n === ".") {
|
|
2741
|
+
for (e += B[V++]; J(B.charCodeAt(V));) e += B[V++];
|
|
2742
|
+
n = B[V];
|
|
2743
|
+
}
|
|
2744
|
+
if (n === "e" || n === "E") {
|
|
2745
|
+
if (e += B[V++], n = B[V], (n === "+" || n === "-") && (e += B[V++]), J(B.charCodeAt(V))) for (; J(B.charCodeAt(V));) e += B[V++];
|
|
2746
|
+
else X({}, K, q);
|
|
2747
|
+
}
|
|
2748
|
+
return Xs(B.charCodeAt(V)) && X({}, K, q), {
|
|
2749
|
+
type: ys,
|
|
2750
|
+
value: parseFloat(e),
|
|
2751
|
+
start: t,
|
|
2752
|
+
end: V
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2755
|
+
function lc() {
|
|
2756
|
+
var e = "", t, n, r, i, a = !1;
|
|
2757
|
+
for (t = B[V], Gs(t === "'" || t === "\"", "String literal must starts with a quote"), n = V, ++V; V < H;) {
|
|
2758
|
+
if (r = B[V++], r === t) {
|
|
2759
|
+
t = "";
|
|
2760
|
+
break;
|
|
2761
|
+
}
|
|
2762
|
+
if (r === "\\") {
|
|
2763
|
+
if (r = B[V++], !r || !Ys(r.charCodeAt(0))) switch (r) {
|
|
2764
|
+
case "u":
|
|
2765
|
+
case "x":
|
|
2766
|
+
B[V] === "{" ? (++V, e += tc()) : e += ec(r);
|
|
2767
|
+
break;
|
|
2768
|
+
case "n":
|
|
2769
|
+
e += "\n";
|
|
2770
|
+
break;
|
|
2771
|
+
case "r":
|
|
2772
|
+
e += "\r";
|
|
2773
|
+
break;
|
|
2774
|
+
case "t":
|
|
2775
|
+
e += " ";
|
|
2776
|
+
break;
|
|
2777
|
+
case "b":
|
|
2778
|
+
e += "\b";
|
|
2779
|
+
break;
|
|
2780
|
+
case "f":
|
|
2781
|
+
e += "\f";
|
|
2782
|
+
break;
|
|
2783
|
+
case "v":
|
|
2784
|
+
e += "\v";
|
|
2785
|
+
break;
|
|
2786
|
+
default: qs(r) ? (i = "01234567".indexOf(r), i !== 0 && (a = !0), V < H && qs(B[V]) && (a = !0, i = i * 8 + "01234567".indexOf(B[V++]), "0123".includes(r) && V < H && qs(B[V]) && (i = i * 8 + "01234567".indexOf(B[V++]))), e += String.fromCharCode(i)) : e += r;
|
|
2787
|
+
}
|
|
2788
|
+
else r === "\r" && B[V] === "\n" && ++V;
|
|
2789
|
+
} else if (Ys(r.charCodeAt(0))) break;
|
|
2790
|
+
else e += r;
|
|
2791
|
+
}
|
|
2792
|
+
return t !== "" && X({}, K, q), {
|
|
2793
|
+
type: bs,
|
|
2794
|
+
value: e,
|
|
2795
|
+
octal: a,
|
|
2796
|
+
start: n,
|
|
2797
|
+
end: V
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
function uc(e, t) {
|
|
2801
|
+
let n = e;
|
|
2802
|
+
t.includes("u") && (n = n.replace(/\\u\{([0-9a-fA-F]+)\}/g, (e, t) => {
|
|
2803
|
+
if (parseInt(t, 16) <= 1114111) return "x";
|
|
2804
|
+
X({}, Rs);
|
|
2805
|
+
}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
|
|
2806
|
+
try {
|
|
2807
|
+
new RegExp(n);
|
|
2808
|
+
} catch {
|
|
2809
|
+
X({}, Rs);
|
|
2810
|
+
}
|
|
2811
|
+
try {
|
|
2812
|
+
return new RegExp(e, t);
|
|
2813
|
+
} catch {
|
|
2814
|
+
return null;
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
function dc() {
|
|
2818
|
+
var e = B[V], t, n, r, i;
|
|
2819
|
+
for (Gs(e === "/", "Regular expression literal must start with a slash"), t = B[V++], n = !1, r = !1; V < H;) if (e = B[V++], t += e, e === "\\") e = B[V++], Ys(e.charCodeAt(0)) && X({}, zs), t += e;
|
|
2820
|
+
else if (Ys(e.charCodeAt(0))) X({}, zs);
|
|
2821
|
+
else if (n) e === "]" && (n = !1);
|
|
2822
|
+
else if (e === "/") {
|
|
2823
|
+
r = !0;
|
|
2824
|
+
break;
|
|
2825
|
+
} else e === "[" && (n = !0);
|
|
2826
|
+
return r || X({}, zs), i = t.substr(1, t.length - 2), {
|
|
2827
|
+
value: i,
|
|
2828
|
+
literal: t
|
|
2829
|
+
};
|
|
2830
|
+
}
|
|
2831
|
+
function fc() {
|
|
2832
|
+
for (var e, t = "", n = ""; V < H && (e = B[V], Zs(e.charCodeAt(0)));) ++V, e === "\\" && V < H ? X({}, K, q) : (n += e, t += e);
|
|
2833
|
+
return n.search(/[^gimuy]/g) >= 0 && X({}, Rs, n), {
|
|
2834
|
+
value: n,
|
|
2835
|
+
literal: t
|
|
2836
|
+
};
|
|
2837
|
+
}
|
|
2838
|
+
function pc() {
|
|
2839
|
+
var e, t, n, r;
|
|
2840
|
+
return U = null, $s(), e = V, t = dc(), n = fc(), r = uc(t.value, n.value), {
|
|
2841
|
+
literal: t.literal + n.literal,
|
|
2842
|
+
value: r,
|
|
2843
|
+
regex: {
|
|
2844
|
+
pattern: t.value,
|
|
2845
|
+
flags: n.value
|
|
2846
|
+
},
|
|
2847
|
+
start: e,
|
|
2848
|
+
end: V
|
|
2849
|
+
};
|
|
2850
|
+
}
|
|
2851
|
+
function mc(e) {
|
|
2852
|
+
return e.type === _s || e.type === W || e.type === hs || e.type === vs;
|
|
2853
|
+
}
|
|
2854
|
+
function hc() {
|
|
2855
|
+
if ($s(), V >= H) return {
|
|
2856
|
+
type: gs,
|
|
2857
|
+
start: V,
|
|
2858
|
+
end: V
|
|
2859
|
+
};
|
|
2860
|
+
let e = B.charCodeAt(V);
|
|
2861
|
+
return Xs(e) ? ic() : e === 40 || e === 41 || e === 59 ? ac() : e === 39 || e === 34 ? lc() : e === 46 ? J(B.charCodeAt(V + 1)) ? cc() : ac() : J(e) ? cc() : ac();
|
|
2862
|
+
}
|
|
2863
|
+
function Y() {
|
|
2864
|
+
let e = U;
|
|
2865
|
+
return V = e.end, U = hc(), V = e.end, e;
|
|
2866
|
+
}
|
|
2867
|
+
function gc() {
|
|
2868
|
+
let e = V;
|
|
2869
|
+
U = hc(), V = e;
|
|
2870
|
+
}
|
|
2871
|
+
function _c(e) {
|
|
2872
|
+
let t = new R(Ss);
|
|
2873
|
+
return t.elements = e, t;
|
|
2874
|
+
}
|
|
2875
|
+
function vc(e, t, n) {
|
|
2876
|
+
let r = new R(e === "||" || e === "&&" ? Os : Cs);
|
|
2877
|
+
return r.operator = e, r.left = t, r.right = n, r;
|
|
2878
|
+
}
|
|
2879
|
+
function yc(e, t) {
|
|
2880
|
+
let n = new R(ws);
|
|
2881
|
+
return n.callee = e, n.arguments = t, n;
|
|
2882
|
+
}
|
|
2883
|
+
function bc(e, t, n) {
|
|
2884
|
+
let r = new R(Ts);
|
|
2885
|
+
return r.test = e, r.consequent = t, r.alternate = n, r;
|
|
2886
|
+
}
|
|
2887
|
+
function xc(e) {
|
|
2888
|
+
let t = new R(Es);
|
|
2889
|
+
return t.name = e, t;
|
|
2890
|
+
}
|
|
2891
|
+
function Sc(e) {
|
|
2892
|
+
let t = new R(Ds);
|
|
2893
|
+
return t.value = e.value, t.raw = B.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
|
|
2894
|
+
}
|
|
2895
|
+
function Cc(e, t, n) {
|
|
2896
|
+
let r = new R(ks);
|
|
2897
|
+
return r.computed = e === "[", r.object = t, r.property = n, r.computed || (n.member = !0), r;
|
|
2898
|
+
}
|
|
2899
|
+
function wc(e) {
|
|
2900
|
+
let t = new R(As);
|
|
2901
|
+
return t.properties = e, t;
|
|
2902
|
+
}
|
|
2903
|
+
function Tc(e, t, n) {
|
|
2904
|
+
let r = new R(js);
|
|
2905
|
+
return r.key = t, r.value = n, r.kind = e, r;
|
|
2906
|
+
}
|
|
2907
|
+
function Ec(e, t) {
|
|
2908
|
+
let n = new R(Ms);
|
|
2909
|
+
return n.operator = e, n.argument = t, n.prefix = !0, n;
|
|
2910
|
+
}
|
|
2911
|
+
function X(e, t) {
|
|
2912
|
+
var n, r = Array.prototype.slice.call(arguments, 2), i = t.replace(/%(\d)/g, (e, t) => (Gs(t < r.length, "Message reference must be in range"), r[t]));
|
|
2913
|
+
throw n = Error(i), n.index = V, n.description = i, n;
|
|
2914
|
+
}
|
|
2915
|
+
function Dc(e) {
|
|
2916
|
+
e.type === gs && X(e, Ls), e.type === ys && X(e, Ns), e.type === bs && X(e, Ps), e.type === _s && X(e, Fs), e.type === W && X(e, Is), X(e, K, e.value);
|
|
2917
|
+
}
|
|
2918
|
+
function Z(e) {
|
|
2919
|
+
let t = Y();
|
|
2920
|
+
(t.type !== G || t.value !== e) && Dc(t);
|
|
2921
|
+
}
|
|
2922
|
+
function Q(e) {
|
|
2923
|
+
return U.type === G && U.value === e;
|
|
2924
|
+
}
|
|
2925
|
+
function Oc(e) {
|
|
2926
|
+
return U.type === W && U.value === e;
|
|
2927
|
+
}
|
|
2928
|
+
function kc() {
|
|
2929
|
+
let e = [];
|
|
2930
|
+
for (V = U.start, Z("["); !Q("]");) Q(",") ? (Y(), e.push(null)) : (e.push(Gc()), Q("]") || Z(","));
|
|
2931
|
+
return Y(), _c(e);
|
|
2932
|
+
}
|
|
2933
|
+
function Ac() {
|
|
2934
|
+
V = U.start;
|
|
2935
|
+
let e = Y();
|
|
2936
|
+
return e.type === bs || e.type === ys ? (e.octal && X(e, Bs), Sc(e)) : xc(e.value);
|
|
2937
|
+
}
|
|
2938
|
+
function jc() {
|
|
2939
|
+
var e, t, n, r;
|
|
2940
|
+
if (V = U.start, e = U, e.type === _s) return n = Ac(), Z(":"), r = Gc(), Tc("init", n, r);
|
|
2941
|
+
if (e.type === gs || e.type === G) Dc(e);
|
|
2942
|
+
else return t = Ac(), Z(":"), r = Gc(), Tc("init", t, r);
|
|
2943
|
+
}
|
|
2944
|
+
function Mc() {
|
|
2945
|
+
var e = [], t, n, r, i = {}, a = String;
|
|
2946
|
+
for (V = U.start, Z("{"); !Q("}");) t = jc(), n = t.key.type === Es ? t.key.name : a(t.key.value), r = "$" + n, Object.prototype.hasOwnProperty.call(i, r) ? X({}, Vs) : i[r] = !0, e.push(t), Q("}") || Z(",");
|
|
2947
|
+
return Z("}"), wc(e);
|
|
2948
|
+
}
|
|
2949
|
+
function Nc() {
|
|
2950
|
+
Z("(");
|
|
2951
|
+
let e = Kc();
|
|
2952
|
+
return Z(")"), e;
|
|
2953
|
+
}
|
|
2954
|
+
var Pc = { if: 1 };
|
|
2955
|
+
function Fc() {
|
|
2956
|
+
var e, t, n;
|
|
2957
|
+
if (Q("(")) return Nc();
|
|
2958
|
+
if (Q("[")) return kc();
|
|
2959
|
+
if (Q("{")) return Mc();
|
|
2960
|
+
if (e = U.type, V = U.start, e === _s || Pc[U.value]) n = xc(Y().value);
|
|
2961
|
+
else if (e === bs || e === ys) U.octal && X(U, Bs), n = Sc(Y());
|
|
2962
|
+
else if (e === W) throw Error(Hs);
|
|
2963
|
+
else e === hs ? (t = Y(), t.value = t.value === "true", n = Sc(t)) : e === vs ? (t = Y(), t.value = null, n = Sc(t)) : Q("/") || Q("/=") ? (n = Sc(pc()), gc()) : Dc(Y());
|
|
2964
|
+
return n;
|
|
2965
|
+
}
|
|
2966
|
+
function Ic() {
|
|
2967
|
+
let e = [];
|
|
2968
|
+
if (Z("("), !Q(")")) for (; V < H && (e.push(Gc()), !Q(")"));) Z(",");
|
|
2969
|
+
return Z(")"), e;
|
|
2970
|
+
}
|
|
2971
|
+
function Lc() {
|
|
2972
|
+
V = U.start;
|
|
2973
|
+
let e = Y();
|
|
2974
|
+
return mc(e) || Dc(e), xc(e.value);
|
|
2975
|
+
}
|
|
2976
|
+
function Rc() {
|
|
2977
|
+
return Z("."), Lc();
|
|
2978
|
+
}
|
|
2979
|
+
function zc() {
|
|
2980
|
+
Z("[");
|
|
2981
|
+
let e = Kc();
|
|
2982
|
+
return Z("]"), e;
|
|
2983
|
+
}
|
|
2984
|
+
function Bc() {
|
|
2985
|
+
for (var e = Fc(), t, n;;) if (Q(".")) n = Rc(), e = Cc(".", e, n);
|
|
2986
|
+
else if (Q("(")) t = Ic(), e = yc(e, t);
|
|
2987
|
+
else if (Q("[")) n = zc(), e = Cc("[", e, n);
|
|
2988
|
+
else break;
|
|
2989
|
+
return e;
|
|
2990
|
+
}
|
|
2991
|
+
function Vc() {
|
|
2992
|
+
let e = Bc();
|
|
2993
|
+
if (U.type === G && (Q("++") || Q("--"))) throw Error(Hs);
|
|
2994
|
+
return e;
|
|
2995
|
+
}
|
|
2996
|
+
function Hc() {
|
|
2997
|
+
var e, t;
|
|
2998
|
+
if (U.type !== G && U.type !== W) t = Vc();
|
|
2999
|
+
else if (Q("++") || Q("--")) throw Error(Hs);
|
|
3000
|
+
else if (Q("+") || Q("-") || Q("~") || Q("!")) e = Y(), t = Hc(), t = Ec(e.value, t);
|
|
3001
|
+
else if (Oc("delete") || Oc("void") || Oc("typeof")) throw Error(Hs);
|
|
3002
|
+
else t = Vc();
|
|
3003
|
+
return t;
|
|
3004
|
+
}
|
|
3005
|
+
function Uc(e) {
|
|
3006
|
+
let t = 0;
|
|
3007
|
+
if (e.type !== G && e.type !== W) return 0;
|
|
3008
|
+
switch (e.value) {
|
|
3009
|
+
case "||":
|
|
3010
|
+
t = 1;
|
|
3011
|
+
break;
|
|
3012
|
+
case "&&":
|
|
3013
|
+
t = 2;
|
|
3014
|
+
break;
|
|
3015
|
+
case "|":
|
|
3016
|
+
t = 3;
|
|
3017
|
+
break;
|
|
3018
|
+
case "^":
|
|
3019
|
+
t = 4;
|
|
3020
|
+
break;
|
|
3021
|
+
case "&":
|
|
3022
|
+
t = 5;
|
|
3023
|
+
break;
|
|
3024
|
+
case "==":
|
|
3025
|
+
case "!=":
|
|
3026
|
+
case "===":
|
|
3027
|
+
case "!==":
|
|
3028
|
+
t = 6;
|
|
3029
|
+
break;
|
|
3030
|
+
case "<":
|
|
3031
|
+
case ">":
|
|
3032
|
+
case "<=":
|
|
3033
|
+
case ">=":
|
|
3034
|
+
case "instanceof":
|
|
3035
|
+
case "in":
|
|
3036
|
+
t = 7;
|
|
3037
|
+
break;
|
|
3038
|
+
case "<<":
|
|
3039
|
+
case ">>":
|
|
3040
|
+
case ">>>":
|
|
3041
|
+
t = 8;
|
|
3042
|
+
break;
|
|
3043
|
+
case "+":
|
|
3044
|
+
case "-":
|
|
3045
|
+
t = 9;
|
|
3046
|
+
break;
|
|
3047
|
+
case "*":
|
|
3048
|
+
case "/":
|
|
3049
|
+
case "%": t = 11;
|
|
3050
|
+
}
|
|
3051
|
+
return t;
|
|
3052
|
+
}
|
|
3053
|
+
function Wc() {
|
|
3054
|
+
var e = U, t, n, r, i, a, o, s, c = Hc(), l;
|
|
3055
|
+
if (r = U, i = Uc(r), i === 0) return c;
|
|
3056
|
+
for (r.prec = i, Y(), t = [e, U], o = Hc(), a = [
|
|
3057
|
+
c,
|
|
3058
|
+
r,
|
|
3059
|
+
o
|
|
3060
|
+
]; (i = Uc(U)) > 0;) {
|
|
3061
|
+
for (; a.length > 2 && i <= a[a.length - 2].prec;) o = a.pop(), s = a.pop().value, c = a.pop(), t.pop(), n = vc(s, c, o), a.push(n);
|
|
3062
|
+
r = Y(), r.prec = i, a.push(r), t.push(U), n = Hc(), a.push(n);
|
|
3063
|
+
}
|
|
3064
|
+
for (l = a.length - 1, n = a[l], t.pop(); l > 1;) t.pop(), n = vc(a[l - 1].value, a[l - 2], n), l -= 2;
|
|
3065
|
+
return n;
|
|
3066
|
+
}
|
|
3067
|
+
function Gc() {
|
|
3068
|
+
var e = Wc(), t, n;
|
|
3069
|
+
return Q("?") && (Y(), t = Gc(), Z(":"), n = Gc(), e = bc(e, t, n)), e;
|
|
3070
|
+
}
|
|
3071
|
+
function Kc() {
|
|
3072
|
+
let e = Gc();
|
|
3073
|
+
if (Q(",")) throw Error(Hs);
|
|
3074
|
+
return e;
|
|
3075
|
+
}
|
|
3076
|
+
function qc(e) {
|
|
3077
|
+
B = e, V = 0, H = B.length, U = null, gc();
|
|
3078
|
+
let t = Kc();
|
|
3079
|
+
if (U.type !== gs) throw Error("Unexpect token after expression.");
|
|
3080
|
+
return t;
|
|
3081
|
+
}
|
|
3082
|
+
var Jc = {
|
|
3083
|
+
NaN: "NaN",
|
|
3084
|
+
E: "Math.E",
|
|
3085
|
+
LN2: "Math.LN2",
|
|
3086
|
+
LN10: "Math.LN10",
|
|
3087
|
+
LOG2E: "Math.LOG2E",
|
|
3088
|
+
LOG10E: "Math.LOG10E",
|
|
3089
|
+
PI: "Math.PI",
|
|
3090
|
+
SQRT1_2: "Math.SQRT1_2",
|
|
3091
|
+
SQRT2: "Math.SQRT2",
|
|
3092
|
+
MIN_VALUE: "Number.MIN_VALUE",
|
|
3093
|
+
MAX_VALUE: "Number.MAX_VALUE"
|
|
3094
|
+
};
|
|
3095
|
+
function Yc(e) {
|
|
3096
|
+
function t(t, n, r, i) {
|
|
3097
|
+
let a = e(n[0]);
|
|
3098
|
+
return r && (a = r + "(" + a + ")", r.lastIndexOf("new ", 0) === 0 && (a = "(" + a + ")")), a + "." + t + (i < 0 ? "" : i === 0 ? "()" : "(" + n.slice(1).map(e).join(",") + ")");
|
|
3099
|
+
}
|
|
3100
|
+
function n(e, n, r) {
|
|
3101
|
+
return (i) => t(e, i, n, r);
|
|
3102
|
+
}
|
|
3103
|
+
let r = "new Date", i = "String", a = "RegExp";
|
|
3104
|
+
return {
|
|
3105
|
+
isNaN: "Number.isNaN",
|
|
3106
|
+
isFinite: "Number.isFinite",
|
|
3107
|
+
abs: "Math.abs",
|
|
3108
|
+
acos: "Math.acos",
|
|
3109
|
+
asin: "Math.asin",
|
|
3110
|
+
atan: "Math.atan",
|
|
3111
|
+
atan2: "Math.atan2",
|
|
3112
|
+
ceil: "Math.ceil",
|
|
3113
|
+
cos: "Math.cos",
|
|
3114
|
+
exp: "Math.exp",
|
|
3115
|
+
floor: "Math.floor",
|
|
3116
|
+
hypot: "Math.hypot",
|
|
3117
|
+
log: "Math.log",
|
|
3118
|
+
max: "Math.max",
|
|
3119
|
+
min: "Math.min",
|
|
3120
|
+
pow: "Math.pow",
|
|
3121
|
+
random: "Math.random",
|
|
3122
|
+
round: "Math.round",
|
|
3123
|
+
sin: "Math.sin",
|
|
3124
|
+
sqrt: "Math.sqrt",
|
|
3125
|
+
tan: "Math.tan",
|
|
3126
|
+
clamp: function(t) {
|
|
3127
|
+
t.length < 3 && L("Missing arguments to clamp function."), t.length > 3 && L("Too many arguments to clamp function.");
|
|
3128
|
+
let n = t.map(e);
|
|
3129
|
+
return "Math.max(" + n[1] + ", Math.min(" + n[2] + "," + n[0] + "))";
|
|
3130
|
+
},
|
|
3131
|
+
now: "Date.now",
|
|
3132
|
+
utc: "Date.UTC",
|
|
3133
|
+
datetime: r,
|
|
3134
|
+
date: n("getDate", r, 0),
|
|
3135
|
+
day: n("getDay", r, 0),
|
|
3136
|
+
year: n("getFullYear", r, 0),
|
|
3137
|
+
month: n("getMonth", r, 0),
|
|
3138
|
+
hours: n("getHours", r, 0),
|
|
3139
|
+
minutes: n("getMinutes", r, 0),
|
|
3140
|
+
seconds: n("getSeconds", r, 0),
|
|
3141
|
+
milliseconds: n("getMilliseconds", r, 0),
|
|
3142
|
+
time: n("getTime", r, 0),
|
|
3143
|
+
timezoneoffset: n("getTimezoneOffset", r, 0),
|
|
3144
|
+
utcdate: n("getUTCDate", r, 0),
|
|
3145
|
+
utcday: n("getUTCDay", r, 0),
|
|
3146
|
+
utcyear: n("getUTCFullYear", r, 0),
|
|
3147
|
+
utcmonth: n("getUTCMonth", r, 0),
|
|
3148
|
+
utchours: n("getUTCHours", r, 0),
|
|
3149
|
+
utcminutes: n("getUTCMinutes", r, 0),
|
|
3150
|
+
utcseconds: n("getUTCSeconds", r, 0),
|
|
3151
|
+
utcmilliseconds: n("getUTCMilliseconds", r, 0),
|
|
3152
|
+
length: n("length", null, -1),
|
|
3153
|
+
parseFloat: "parseFloat",
|
|
3154
|
+
parseInt: "parseInt",
|
|
3155
|
+
upper: n("toUpperCase", i, 0),
|
|
3156
|
+
lower: n("toLowerCase", i, 0),
|
|
3157
|
+
substring: n("substring", i),
|
|
3158
|
+
split: n("split", i),
|
|
3159
|
+
trim: n("trim", i, 0),
|
|
3160
|
+
btoa: "btoa",
|
|
3161
|
+
atob: "atob",
|
|
3162
|
+
encodeURIComponent: "encodeURIComponent",
|
|
3163
|
+
regexp: a,
|
|
3164
|
+
test: n("test", a),
|
|
3165
|
+
if: function(t) {
|
|
3166
|
+
t.length < 3 && L("Missing arguments to if function."), t.length > 3 && L("Too many arguments to if function.");
|
|
3167
|
+
let n = t.map(e);
|
|
3168
|
+
return "(" + n[0] + "?" + n[1] + ":" + n[2] + ")";
|
|
3169
|
+
}
|
|
3170
|
+
};
|
|
3171
|
+
}
|
|
3172
|
+
function Xc(e) {
|
|
3173
|
+
let t = e && e.length - 1;
|
|
3174
|
+
return t && (e[0] === "\"" && e[t] === "\"" || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
|
|
3175
|
+
}
|
|
3176
|
+
function Zc(e) {
|
|
3177
|
+
e ||= {};
|
|
3178
|
+
let t = e.allowed ? ts(e.allowed) : {}, n = e.forbidden ? ts(e.forbidden) : {}, r = e.constants || Jc, i = (e.functions || Yc)(d), a = e.globalvar, o = e.fieldvar, s = Qo(a) ? a : (e) => `${a}["${e}"]`, c = {}, l = {}, u = 0;
|
|
3179
|
+
function d(e) {
|
|
3180
|
+
if (es(e)) return e;
|
|
3181
|
+
let t = f[e.type];
|
|
3182
|
+
return t ?? L("Unsupported type: " + e.type), t(e);
|
|
3183
|
+
}
|
|
3184
|
+
let f = {
|
|
3185
|
+
Literal: (e) => e.raw,
|
|
3186
|
+
Identifier: (e) => {
|
|
3187
|
+
let i = e.name;
|
|
3188
|
+
return u > 0 ? i : $o(n, i) ? L("Illegal identifier: " + i) : $o(r, i) ? r[i] : $o(t, i) ? i : (c[i] = 1, s(i));
|
|
3189
|
+
},
|
|
3190
|
+
MemberExpression: (e) => {
|
|
3191
|
+
let t = !e.computed, n = d(e.object);
|
|
3192
|
+
t && (u += 1);
|
|
3193
|
+
let r = d(e.property);
|
|
3194
|
+
return n === o && (l[Xc(r)] = 1), t && --u, n + (t ? "." + r : "[" + r + "]");
|
|
3195
|
+
},
|
|
3196
|
+
CallExpression: (e) => {
|
|
3197
|
+
e.callee.type !== "Identifier" && L("Illegal callee type: " + e.callee.type);
|
|
3198
|
+
let t = e.callee.name, n = e.arguments, r = $o(i, t) && i[t];
|
|
3199
|
+
return r || L("Unrecognized function: " + t), Qo(r) ? r(n) : r + "(" + n.map(d).join(",") + ")";
|
|
3200
|
+
},
|
|
3201
|
+
ArrayExpression: (e) => "[" + e.elements.map(d).join(",") + "]",
|
|
3202
|
+
BinaryExpression: (e) => "(" + d(e.left) + " " + e.operator + " " + d(e.right) + ")",
|
|
3203
|
+
UnaryExpression: (e) => "(" + e.operator + d(e.argument) + ")",
|
|
3204
|
+
ConditionalExpression: (e) => "(" + d(e.test) + "?" + d(e.consequent) + ":" + d(e.alternate) + ")",
|
|
3205
|
+
LogicalExpression: (e) => "(" + d(e.left) + e.operator + d(e.right) + ")",
|
|
3206
|
+
ObjectExpression: (e) => {
|
|
3207
|
+
for (let t of e.properties) {
|
|
3208
|
+
let e = t.key.type === "Literal" ? String(t.key.value) : t.key.name;
|
|
3209
|
+
Zo.has(e) && L("Illegal property: " + e);
|
|
3210
|
+
}
|
|
3211
|
+
return "{" + e.properties.map(d).join(",") + "}";
|
|
3212
|
+
},
|
|
3213
|
+
Property: (e) => {
|
|
3214
|
+
u += 1;
|
|
3215
|
+
let t = d(e.key);
|
|
3216
|
+
return --u, t + ":" + d(e.value);
|
|
3217
|
+
}
|
|
3218
|
+
};
|
|
3219
|
+
function p(e) {
|
|
3220
|
+
let t = {
|
|
3221
|
+
code: d(e),
|
|
3222
|
+
globals: Object.keys(c),
|
|
3223
|
+
fields: Object.keys(l)
|
|
3224
|
+
};
|
|
3225
|
+
return c = {}, l = {}, t;
|
|
3226
|
+
}
|
|
3227
|
+
return p.functions = i, p.constants = r, p;
|
|
3228
|
+
}
|
|
3229
|
+
//#endregion
|
|
3230
|
+
//#region ../core/src/utils/smoothstep.js
|
|
3231
|
+
function Qc(e, t, n) {
|
|
3232
|
+
return n = (n - e) / (t - e), n = Math.max(0, Math.min(1, n)), n * n * (3 - 2 * n);
|
|
3233
|
+
}
|
|
3234
|
+
//#endregion
|
|
3235
|
+
//#region ../core/src/utils/clamp.js
|
|
3236
|
+
function $c(e, t = 0, n = 1) {
|
|
3237
|
+
return Math.max(t, Math.min(n, e));
|
|
3238
|
+
}
|
|
3239
|
+
//#endregion
|
|
3240
|
+
//#region ../core/src/utils/linearstep.js
|
|
3241
|
+
function el(e, t, n) {
|
|
3242
|
+
return $c((n - e) / (t - e), 0, 1);
|
|
3243
|
+
}
|
|
3244
|
+
//#endregion
|
|
3245
|
+
//#region ../core/src/genome/indexGapMapping.js
|
|
3246
|
+
function tl(e, t, n = !1) {
|
|
3247
|
+
let r = 0, i = e.length;
|
|
3248
|
+
for (; r < i;) {
|
|
3249
|
+
let a = r + i >>> 1;
|
|
3250
|
+
e[a] < t || !n && e[a] === t ? r = a + 1 : i = a;
|
|
3251
|
+
}
|
|
3252
|
+
return r;
|
|
3253
|
+
}
|
|
3254
|
+
var nl = /* @__PURE__ */ new WeakSet();
|
|
3255
|
+
function rl(e) {
|
|
3256
|
+
if (e && nl.has(e)) return e;
|
|
3257
|
+
let t = Array.from(new Set(e ?? [])).sort((e, t) => e - t);
|
|
3258
|
+
if (t.some((e) => !Number.isSafeInteger(e) || e < 0 || e >= 2 ** 44)) throw Error("Gap positions must be integers in [0, 2^44).");
|
|
3259
|
+
return nl.add(t), Object.freeze(t);
|
|
3260
|
+
}
|
|
3261
|
+
function il(e = {}) {
|
|
3262
|
+
return e.gapWidth !== 0 && e.gapWidth !== null && e.gapPositions != null && !(Array.isArray(e.gapPositions) && e.gapPositions.length === 0);
|
|
3263
|
+
}
|
|
3264
|
+
function al(e, t) {
|
|
3265
|
+
let n = {
|
|
3266
|
+
positions: [],
|
|
3267
|
+
width: 0,
|
|
3268
|
+
axisLength: () => 1
|
|
3269
|
+
};
|
|
3270
|
+
return Object.assign(e, {
|
|
3271
|
+
gapPositions(r) {
|
|
3272
|
+
return arguments.length ? (n.positions = rl(r), t(), e) : n.positions;
|
|
3273
|
+
},
|
|
3274
|
+
gapWidth(r) {
|
|
3275
|
+
if (!arguments.length) return n.width;
|
|
3276
|
+
if (r != null && (!Number.isFinite(r) || r < 0)) throw Error("Gap width must be a finite nonnegative number.");
|
|
3277
|
+
return n.width = r ?? 0, t(), e;
|
|
3278
|
+
},
|
|
3279
|
+
axisLength(r) {
|
|
3280
|
+
return arguments.length ? (n.axisLength = typeof r == "function" ? r : () => r, t(), e) : n.axisLength();
|
|
3281
|
+
}
|
|
3282
|
+
}), Object.assign(n, { enabled: () => e.props ? il(e.props) : n.width > 0 && n.positions.length > 0 });
|
|
3283
|
+
}
|
|
3284
|
+
function ol(e) {
|
|
3285
|
+
return e.gapWidth > 0 && e.gapPositions.length > 0;
|
|
3286
|
+
}
|
|
3287
|
+
function sl(e) {
|
|
3288
|
+
let t = (t) => {
|
|
3289
|
+
let n = e[t]?.scale;
|
|
3290
|
+
return !!n && il(n.props);
|
|
3291
|
+
};
|
|
3292
|
+
return Number(t("x")) | Number(t("y")) << 1;
|
|
3293
|
+
}
|
|
3294
|
+
//#endregion
|
|
3295
|
+
//#region ../core/src/utils/expression.js
|
|
3296
|
+
function cl(e) {
|
|
3297
|
+
return ke(e) || ArrayBuffer.isView(e) ? e : null;
|
|
3298
|
+
}
|
|
3299
|
+
function ll(e) {
|
|
3300
|
+
return cl(e) || (ot(e) ? e : null);
|
|
3301
|
+
}
|
|
3302
|
+
var ul = {
|
|
3303
|
+
selectionActive: eu,
|
|
3304
|
+
selectionValues: Jl,
|
|
3305
|
+
selectionContains: Yl,
|
|
3306
|
+
selectionBounds: Xl,
|
|
3307
|
+
clamp: $c,
|
|
3308
|
+
tickStep: ve,
|
|
3309
|
+
format(e, t) {
|
|
3310
|
+
return se(t)(e);
|
|
3311
|
+
},
|
|
3312
|
+
join(e, t) {
|
|
3313
|
+
return cl(e).join(t);
|
|
3314
|
+
},
|
|
3315
|
+
indexof(e, t, n) {
|
|
3316
|
+
return ll(e).indexOf(t, n);
|
|
3317
|
+
},
|
|
3318
|
+
inrange: nt,
|
|
3319
|
+
lastindexof(e, t, n) {
|
|
3320
|
+
return ll(e).lastIndexOf(t, n);
|
|
3321
|
+
},
|
|
3322
|
+
reverse(e) {
|
|
3323
|
+
return ot(e) ? Array.from(e).reverse().join("") : cl(e).slice().reverse();
|
|
3324
|
+
},
|
|
3325
|
+
slice(e, t, n) {
|
|
3326
|
+
return ll(e).slice(t, n);
|
|
3327
|
+
},
|
|
3328
|
+
mapHasKey(e, t) {
|
|
3329
|
+
return e.has(t);
|
|
3330
|
+
},
|
|
3331
|
+
isArray: ke,
|
|
3332
|
+
isBoolean: rt,
|
|
3333
|
+
isDefined(e) {
|
|
3334
|
+
return e !== void 0;
|
|
3335
|
+
},
|
|
3336
|
+
isNumber: it,
|
|
3337
|
+
isObject: Ae,
|
|
3338
|
+
isRegExp: at,
|
|
3339
|
+
isString: ot,
|
|
3340
|
+
isValid(e) {
|
|
3341
|
+
return e != null && e === e;
|
|
3342
|
+
},
|
|
3343
|
+
lerp: st,
|
|
3344
|
+
linearstep: el,
|
|
3345
|
+
replace(e, t, n) {
|
|
3346
|
+
return String(e).replace(t, n);
|
|
3347
|
+
},
|
|
3348
|
+
sort(e) {
|
|
3349
|
+
return cl(e).slice().sort(Qe);
|
|
3350
|
+
},
|
|
3351
|
+
center(e) {
|
|
3352
|
+
let t = cl(e);
|
|
3353
|
+
return (t[0] + t[t.length - 1]) / 2;
|
|
3354
|
+
},
|
|
3355
|
+
span(e) {
|
|
3356
|
+
return ct(e);
|
|
3357
|
+
},
|
|
3358
|
+
smoothstep: Qc
|
|
3359
|
+
};
|
|
3360
|
+
function dl(e, t) {
|
|
3361
|
+
let n = !1, r = yl(e, {}, {
|
|
3362
|
+
specLocation: t,
|
|
3363
|
+
resolveScaleResolution: () => (n = !0, {
|
|
3364
|
+
channel: "analysis",
|
|
3365
|
+
getDomainRef: () => void 0,
|
|
3366
|
+
getMappingRef: () => void 0,
|
|
3367
|
+
getConfigurationRef: () => void 0,
|
|
3368
|
+
getZoomLevelRef: () => void 0
|
|
3369
|
+
})
|
|
3370
|
+
});
|
|
3371
|
+
return {
|
|
3372
|
+
usesScaleHelper: n,
|
|
3373
|
+
globals: r.globals
|
|
3374
|
+
};
|
|
3375
|
+
}
|
|
3376
|
+
function fl(e, t) {
|
|
3377
|
+
let n = Yc(e);
|
|
3378
|
+
for (let e in ul) n[e] = `this.${e}`;
|
|
3379
|
+
for (let r of [
|
|
3380
|
+
"scale",
|
|
3381
|
+
"invert",
|
|
3382
|
+
"domain",
|
|
3383
|
+
"range",
|
|
3384
|
+
"bandwidth",
|
|
3385
|
+
"bandstep",
|
|
3386
|
+
"linearize",
|
|
3387
|
+
"zoomLevel"
|
|
3388
|
+
]) n[r] = (n) => pl(e, t, r, n);
|
|
3389
|
+
return n;
|
|
3390
|
+
}
|
|
3391
|
+
function pl(e, t, n, r) {
|
|
3392
|
+
if (n === "zoomLevel" && r.length === 0) {
|
|
3393
|
+
let e = [];
|
|
3394
|
+
for (let r of ["x", "y"]) {
|
|
3395
|
+
let i = t.resolveScaleResolution?.(r);
|
|
3396
|
+
if (i) {
|
|
3397
|
+
let a = t.getScaleHelper(n, r, i);
|
|
3398
|
+
e.push(`${t.globalvar}["${a.codeName}"]()`);
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
return `Math.sqrt(${e.join("*") || "1"})`;
|
|
3402
|
+
}
|
|
3403
|
+
if (r.length === 0) throw Error(`Scale helper "${n}" requires a literal channel name.`);
|
|
3404
|
+
if ((n === "scale" || n === "invert" || n === "linearize") && r.length < 2) throw Error(`Scale helper "${n}" requires a channel name and a value.`);
|
|
3405
|
+
if (n === "zoomLevel" && r.length > 1) throw Error("Scale helper \"zoomLevel\" accepts zero arguments or one literal channel name.");
|
|
3406
|
+
if (n === "bandstep" && r.length > 2) throw Error("Scale helper \"bandstep\" accepts a channel and an optional pixel extent.");
|
|
3407
|
+
let i = ml(r[0]);
|
|
3408
|
+
if (!i) throw Error(`Scale helper "${n}" requires a literal channel name.`);
|
|
3409
|
+
let a = t.resolveScaleResolution?.(i);
|
|
3410
|
+
if (!a) throw Error(`Unknown scale channel "${i}" in expression helper "${n}".`);
|
|
3411
|
+
let o = t.getScaleHelper(n, i, a), s = r.slice(1).map((t) => e(t)).join(",");
|
|
3412
|
+
return `${t.globalvar}["${o.codeName}"](${s})`;
|
|
3413
|
+
}
|
|
3414
|
+
function ml(e) {
|
|
3415
|
+
return e?.type === "Literal" && typeof e.value == "string" ? e.value : void 0;
|
|
3416
|
+
}
|
|
3417
|
+
function hl(e, t) {
|
|
3418
|
+
let n = (n) => _l(t, e, n);
|
|
3419
|
+
if (e === "domain") return () => n(() => t.getDomain());
|
|
3420
|
+
if (e === "range") return () => n(() => t.getScale().range());
|
|
3421
|
+
if (e === "bandwidth") return () => n(() => {
|
|
3422
|
+
let e = t.getScale();
|
|
3423
|
+
if (typeof e.bandwidth != "function") throw Error(`Scale channel "${t.channel}" does not support bandwidth().`);
|
|
3424
|
+
return e.bandwidth();
|
|
3425
|
+
});
|
|
3426
|
+
if (e === "bandstep") return (e) => n(() => {
|
|
3427
|
+
let n = t.getScale();
|
|
3428
|
+
if (typeof n.step != "function") throw Error(`Scale channel "${t.channel}" does not support bandstep().`);
|
|
3429
|
+
if (e !== void 0 && (!Number.isFinite(e) || e < 0)) throw Error("bandstep() extent must be finite and nonnegative.");
|
|
3430
|
+
if (il(n.props) && e === void 0) throw Error("bandstep() requires a pixel extent for a scale with grouping gaps.");
|
|
3431
|
+
if (e === 0) return 0;
|
|
3432
|
+
let r = n.gapMapping?.(e)?.step ?? n.step(), i = n.range();
|
|
3433
|
+
return Math.sign(i[i.length - 1] - i[0]) * Math.abs(r);
|
|
3434
|
+
});
|
|
3435
|
+
if (e === "scale") return (e) => n(() => t.getScale()(e));
|
|
3436
|
+
if (e === "invert") return (e) => n(() => t.getScale().invert(e));
|
|
3437
|
+
if (e === "linearize") return (e) => n(() => e == null ? null : typeof t.fromComplex == "function" ? t.fromComplex(e) : e);
|
|
3438
|
+
if (e === "zoomLevel") return () => n(() => t.getZoomLevel());
|
|
3439
|
+
throw Error("Unknown scale helper: " + e);
|
|
3440
|
+
}
|
|
3441
|
+
var gl = /* @__PURE__ */ new WeakSet();
|
|
3442
|
+
function _l(e, t, n) {
|
|
3443
|
+
if (gl.has(e)) throw Error(`Scale helper cycle detected while evaluating ${t}("${e.channel}").`);
|
|
3444
|
+
gl.add(e);
|
|
3445
|
+
try {
|
|
3446
|
+
return n();
|
|
3447
|
+
} finally {
|
|
3448
|
+
gl.delete(e);
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
function vl(e, t) {
|
|
3452
|
+
return e === "domain" ? t.getDomainRef() : e === "linearize" ? t.getConfigurationRef() : e === "zoomLevel" ? t.getZoomLevelRef() : t.getMappingRef();
|
|
3453
|
+
}
|
|
3454
|
+
function yl(e, t = {}, n = {}) {
|
|
3455
|
+
try {
|
|
3456
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), o = 1, s = {
|
|
3457
|
+
...n,
|
|
3458
|
+
globalvar: "globalObject",
|
|
3459
|
+
globalObject: t,
|
|
3460
|
+
getScaleHelper(e, n, s) {
|
|
3461
|
+
let c = e + ":" + n, l = i.get(c);
|
|
3462
|
+
if (l) return l;
|
|
3463
|
+
let u = r.get(c);
|
|
3464
|
+
u || (u = vl(e, s), r.set(c, u));
|
|
3465
|
+
let d = "__scale_helper_" + o++, f = {
|
|
3466
|
+
codeName: d,
|
|
3467
|
+
dependency: u
|
|
3468
|
+
};
|
|
3469
|
+
return i.set(c, f), e === "zoomLevel" && a.add(s), t[d] = hl(e, s), f;
|
|
3470
|
+
}
|
|
3471
|
+
}, c = Zc({
|
|
3472
|
+
forbidden: [],
|
|
3473
|
+
allowed: ["datum", "undefined"],
|
|
3474
|
+
globalvar: "globalObject",
|
|
3475
|
+
fieldvar: "datum",
|
|
3476
|
+
functions: (e) => fl(e, s)
|
|
3477
|
+
}), l = qc(e), u = /* @__PURE__ */ new Set();
|
|
3478
|
+
l.visit((e) => {
|
|
3479
|
+
e.type === "MemberExpression" && e.object.type === "Identifier" && e.object.name === "datum" && (!e.computed && e.property.type === "Identifier" ? u.add(e.property.name) : e.computed && e.property.type === "Literal" && (typeof e.property.value == "string" || typeof e.property.value == "number") && u.add(String(e.property.value)));
|
|
3480
|
+
});
|
|
3481
|
+
let d = c(l), f = zo(`try {
|
|
3482
|
+
return (${d.code});
|
|
3483
|
+
} catch (e) {
|
|
3484
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
3485
|
+
}`, u, n.specLocation, ul), p = f(t);
|
|
3486
|
+
return p.createEvaluator = f, p.fields = d.fields, p.globals = d.globals, p.code = d.code, p.scaleDependencies = Array.from(new Set(r.values())), p.zoomLevelResolutions = Array.from(a), p;
|
|
3487
|
+
} catch (t) {
|
|
3488
|
+
throw Lo(Error(`Invalid expression: ${e}, ${t.message}`, { cause: t }), n.specLocation);
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
var bl = Zc({
|
|
3492
|
+
forbidden: [],
|
|
3493
|
+
allowed: ["event"],
|
|
3494
|
+
globalvar: "globalObject"
|
|
3495
|
+
});
|
|
3496
|
+
function xl(e, t) {
|
|
3497
|
+
try {
|
|
3498
|
+
let t = bl(qc(e));
|
|
3499
|
+
return Function("event", "globalObject", `"use strict";
|
|
3500
|
+
try {
|
|
3501
|
+
return !!(${t.code});
|
|
3502
|
+
} catch (e) {
|
|
3503
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
3504
|
+
}`);
|
|
3505
|
+
} catch (n) {
|
|
3506
|
+
throw Lo(Error(`Invalid expression: ${e}, ${n.message}`, { cause: n }), t);
|
|
3507
|
+
}
|
|
3508
|
+
}
|
|
3509
|
+
//#endregion
|
|
3510
|
+
//#region ../core/src/utils/interactionConfig.js
|
|
3511
|
+
function Sl(e) {
|
|
3512
|
+
if (typeof e == "string") {
|
|
3513
|
+
let t = e.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);
|
|
3514
|
+
if (!t) throw Error(`Invalid event type string: ${e}`);
|
|
3515
|
+
let [, n, r] = t, i = { type: n };
|
|
3516
|
+
return r && (i.filter = r), i;
|
|
3517
|
+
}
|
|
3518
|
+
return e;
|
|
3519
|
+
}
|
|
3520
|
+
function Cl(e, t) {
|
|
3521
|
+
return e?.filter ? xl(e.filter, t) : () => !0;
|
|
3522
|
+
}
|
|
3523
|
+
function wl(e, t, n) {
|
|
3524
|
+
return e.getSpecLocation(t, [n, ...typeof t?.[n] == "object" ? ["filter"] : []]);
|
|
3525
|
+
}
|
|
3526
|
+
function Tl(e, t, n) {
|
|
3527
|
+
if (!t.includes(e.type)) throw Error(n);
|
|
3528
|
+
return e;
|
|
3529
|
+
}
|
|
3530
|
+
//#endregion
|
|
3531
|
+
//#region ../core/src/selection/selectionPredicateTree.js
|
|
3532
|
+
function El(e, t) {
|
|
3533
|
+
if (!("test" in e) || !("ref" in e.test)) return e;
|
|
3534
|
+
let n = e.test.ref;
|
|
3535
|
+
if (!Object.hasOwn(t, n)) throw Error(`Unknown predicate "${n}" in unit view.`);
|
|
3536
|
+
return {
|
|
3537
|
+
...e,
|
|
3538
|
+
test: t[n]
|
|
3539
|
+
};
|
|
3540
|
+
}
|
|
3541
|
+
function Dl(e) {
|
|
3542
|
+
let t = "test" in e ? e.test : {
|
|
3543
|
+
param: e.param,
|
|
3544
|
+
...e.empty === void 0 ? {} : { empty: e.empty },
|
|
3545
|
+
...e.project === void 0 ? {} : { project: e.project }
|
|
3546
|
+
}, n = (e) => {
|
|
3547
|
+
if (!e || typeof e != "object" || Array.isArray(e)) throw Error("Selection predicate must be an object.");
|
|
3548
|
+
let t = e, r = [
|
|
3549
|
+
"param",
|
|
3550
|
+
"and",
|
|
3551
|
+
"or",
|
|
3552
|
+
"not"
|
|
3553
|
+
].filter((e) => e in t);
|
|
3554
|
+
if (r.length !== 1) throw Error("Selection predicate must have exactly one operator.");
|
|
3555
|
+
let i = r[0];
|
|
3556
|
+
if (i === "param") {
|
|
3557
|
+
if (typeof t.param == "string") {
|
|
3558
|
+
if (Object.keys(t).some((e) => ![
|
|
3559
|
+
"param",
|
|
3560
|
+
"empty",
|
|
3561
|
+
"project"
|
|
3562
|
+
].includes(e)) || typeof (t.empty ?? !0) != "boolean") throw Error("Invalid selection parameter predicate.");
|
|
3563
|
+
return {
|
|
3564
|
+
param: Ao(t.param),
|
|
3565
|
+
empty: t.empty ?? !0,
|
|
3566
|
+
...t.project ? { project: { ...t.project } } : {}
|
|
3567
|
+
};
|
|
3568
|
+
}
|
|
3569
|
+
if (!t.param || typeof t.param != "object" || Object.keys(t.param).length !== 1 || !Array.isArray(t.param.or) || Object.keys(t).some((e) => !["param", "empty"].includes(e)) || typeof (t.empty ?? !0) != "boolean") throw Error("Invalid flat selection union.");
|
|
3570
|
+
if (t.param.or.length === 0) throw Error("Selection test \"or\" must be a nonempty array.");
|
|
3571
|
+
let e = Array.from(new Set(t.param.or.map(Ao))), n = e.map((e) => ({ selectionActive: e })), r = e.map((e, t) => ({ all: [{
|
|
3572
|
+
param: e,
|
|
3573
|
+
empty: !0
|
|
3574
|
+
}, n[t]] }));
|
|
3575
|
+
return { any: t.empty === !1 ? r : [...r, { not: { any: n } }] };
|
|
3576
|
+
}
|
|
3577
|
+
if (Object.keys(t).length !== 1) throw Error("Selection predicate operators cannot be mixed.");
|
|
3578
|
+
if (i === "not") return { not: n(t.not) };
|
|
3579
|
+
let a = t[i];
|
|
3580
|
+
if (!Array.isArray(a) || a.length === 0) throw Error(`Selection test "${i}" must be a nonempty array.`);
|
|
3581
|
+
let o = a.map(n);
|
|
3582
|
+
return i === "and" ? { all: o } : { any: o };
|
|
3583
|
+
};
|
|
3584
|
+
return n(t);
|
|
3585
|
+
}
|
|
3586
|
+
function Ol(e) {
|
|
3587
|
+
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
3588
|
+
if ("param" in e) t.add(e.param);
|
|
3589
|
+
else if ("selectionActive" in e) t.add(typeof e.selectionActive == "string" ? e.selectionActive : e.selectionActive.param);
|
|
3590
|
+
else if ("not" in e) n(e.not);
|
|
3591
|
+
else for (let t of "all" in e ? e.all : e.any) n(t);
|
|
3592
|
+
};
|
|
3593
|
+
return n(e), Array.from(t);
|
|
3594
|
+
}
|
|
3595
|
+
function kl(e) {
|
|
3596
|
+
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
3597
|
+
if ("param" in e) {
|
|
3598
|
+
if (e.type !== "categories" && !(e.type === "interval" && e.projections.some((e) => $(e.component)))) {
|
|
3599
|
+
let n = {
|
|
3600
|
+
...e,
|
|
3601
|
+
empty: !1
|
|
3602
|
+
};
|
|
3603
|
+
t.set(JSON.stringify(n), n);
|
|
3604
|
+
}
|
|
3605
|
+
} else if ("not" in e) n(e.not);
|
|
3606
|
+
else if ("all" in e || "any" in e) for (let t of "all" in e ? e.all : e.any) n(t);
|
|
3607
|
+
};
|
|
3608
|
+
for (let t of e) n(t);
|
|
3609
|
+
return Array.from(t.values());
|
|
3610
|
+
}
|
|
3611
|
+
function Al(e) {
|
|
3612
|
+
if ("param" in e) return e.empty;
|
|
3613
|
+
if ("selectionActive" in e) return !1;
|
|
3614
|
+
if ("not" in e) return !Al(e.not);
|
|
3615
|
+
let t = "all" in e ? e.all : e.any;
|
|
3616
|
+
return "all" in e ? t.every(Al) : t.some(Al);
|
|
3617
|
+
}
|
|
3618
|
+
function jl(e, t, n, r, i, a) {
|
|
3619
|
+
let o = (e) => {
|
|
3620
|
+
let t = n.findSelectionCapability?.(e);
|
|
3621
|
+
if (t) return t;
|
|
3622
|
+
let r = n.findValue(e);
|
|
3623
|
+
if (!r || ![
|
|
3624
|
+
"single",
|
|
3625
|
+
"multi",
|
|
3626
|
+
"interval",
|
|
3627
|
+
"categories"
|
|
3628
|
+
].includes(r.type)) throw Error(`Selection parameter "${e}" was not found.`);
|
|
3629
|
+
return {
|
|
3630
|
+
type: r.type,
|
|
3631
|
+
components: r.type === "categories" ? [{ component: r.component }] : r.type === "interval" ? Object.keys(r.intervals).map((e) => ({ component: e })) : []
|
|
3632
|
+
};
|
|
3633
|
+
}, s = t, c = (e) => {
|
|
3634
|
+
let t = s[e];
|
|
3635
|
+
if (t && "field" in t) return t.field;
|
|
3636
|
+
if (t && "condition" in t) return (Array.isArray(t.condition) ? t.condition : [t.condition]).find((e) => "field" in e)?.field;
|
|
3637
|
+
}, l = (e) => {
|
|
3638
|
+
if ("all" in e) return { all: e.all.map(l) };
|
|
3639
|
+
if ("any" in e) return { any: e.any.map(l) };
|
|
3640
|
+
if ("not" in e) return { not: l(e.not) };
|
|
3641
|
+
let n = "param" in e ? e.param : e.selectionActive, u = o(n);
|
|
3642
|
+
if ("selectionActive" in e) return { selectionActive: {
|
|
3643
|
+
param: n,
|
|
3644
|
+
type: u.type,
|
|
3645
|
+
components: u.components.map(({ component: e }) => e)
|
|
3646
|
+
} };
|
|
3647
|
+
if (u.type === "categories") {
|
|
3648
|
+
let r = u.components[0].component;
|
|
3649
|
+
if (e.project && (Object.keys(e.project).length !== 1 || !(r in e.project))) throw Error(`Selection "${n}" project must cover its declared component: ${r}.`);
|
|
3650
|
+
let i = wo(t, e.project ? e.project[r] : r, a);
|
|
3651
|
+
return {
|
|
3652
|
+
param: n,
|
|
3653
|
+
type: "categories",
|
|
3654
|
+
empty: e.empty,
|
|
3655
|
+
projections: [{
|
|
3656
|
+
component: r,
|
|
3657
|
+
input: i.input,
|
|
3658
|
+
field: i.field
|
|
3659
|
+
}]
|
|
3660
|
+
};
|
|
3661
|
+
}
|
|
3662
|
+
if (e.project && u.type !== "interval") throw Error(`Selection "${n}" is not an interval selection; project is invalid.`);
|
|
3663
|
+
if (u.type !== "interval") return {
|
|
3664
|
+
param: n,
|
|
3665
|
+
type: u.type,
|
|
3666
|
+
empty: e.empty
|
|
3667
|
+
};
|
|
3668
|
+
let d = u.components.map(({ component: e }) => e);
|
|
3669
|
+
if (e.project && (Object.keys(e.project).length !== d.length || d.some((t) => !(t in e.project)))) throw Error(`Selection "${n}" project must cover its declared components: ${d.join(", ")}.`);
|
|
3670
|
+
let f = u.components.map(({ component: t, type: a }) => {
|
|
3671
|
+
if ($(t)) {
|
|
3672
|
+
let r = e.project?.[t] ?? t, i = (r === "color" ? [
|
|
3673
|
+
"color",
|
|
3674
|
+
"fill",
|
|
3675
|
+
"stroke"
|
|
3676
|
+
] : [r]).find((e) => s[e] && "field" in s[e] && !("condition" in s[e])), a = s[i];
|
|
3677
|
+
if (!i || !$(r) || a.type !== "quantitative") throw Error(`Selection "${n}" requires an unconditional quantitative input for "${r}".`);
|
|
3678
|
+
return {
|
|
3679
|
+
component: t,
|
|
3680
|
+
input: i,
|
|
3681
|
+
field: a.field
|
|
3682
|
+
};
|
|
3683
|
+
}
|
|
3684
|
+
let o = e.project?.[t] ?? t;
|
|
3685
|
+
if (![t, t + "2"].includes(o)) throw Error(`Selection "${n}" has unsupported component "${t}".`);
|
|
3686
|
+
let l = s[o];
|
|
3687
|
+
if (e.project && (!l || !("field" in l))) throw Error(`Selection "${n}" project target "${o}" must be an unconditional field encoding.`);
|
|
3688
|
+
let u = c(o);
|
|
3689
|
+
if (!u) throw Error(`Selection "${n}" has no field for "${o}".`);
|
|
3690
|
+
if (e.project) {
|
|
3691
|
+
let e = i?.(o) ?? ("type" in l ? l.type : void 0) ?? ("type" in s[t] ? s[t].type : void 0);
|
|
3692
|
+
if (![
|
|
3693
|
+
"quantitative",
|
|
3694
|
+
"index",
|
|
3695
|
+
"locus"
|
|
3696
|
+
].includes(a) || e !== a) throw Error(`Selection "${n}" project target "${o}" must have matching quantitative, index, or locus type (${a} vs ${e}).`);
|
|
3697
|
+
}
|
|
3698
|
+
let d = t + "2", f = e.project ? void 0 : c(d);
|
|
3699
|
+
return {
|
|
3700
|
+
component: t,
|
|
3701
|
+
input: o,
|
|
3702
|
+
field: u,
|
|
3703
|
+
...f && f !== u ? {
|
|
3704
|
+
secondaryInput: d,
|
|
3705
|
+
secondaryField: f,
|
|
3706
|
+
hitTest: r
|
|
3707
|
+
} : {}
|
|
3708
|
+
};
|
|
3709
|
+
});
|
|
3710
|
+
return {
|
|
3711
|
+
param: n,
|
|
3712
|
+
type: "interval",
|
|
3713
|
+
empty: e.empty,
|
|
3714
|
+
projections: f
|
|
3715
|
+
};
|
|
3716
|
+
};
|
|
3717
|
+
return l(e);
|
|
3718
|
+
}
|
|
3719
|
+
function Ml(e, t) {
|
|
3720
|
+
if ("all" in e || "any" in e) {
|
|
3721
|
+
let n = ("all" in e ? e.all : e.any).map((e) => Ml(e, t));
|
|
3722
|
+
return "all" in e ? (e) => n.every((t) => t(e)) : (e) => n.some((t) => t(e));
|
|
3723
|
+
}
|
|
3724
|
+
if ("not" in e) {
|
|
3725
|
+
let n = Ml(e.not, t);
|
|
3726
|
+
return (e) => !n(e);
|
|
3727
|
+
}
|
|
3728
|
+
if ("selectionActive" in e) {
|
|
3729
|
+
let { param: n } = e.selectionActive;
|
|
3730
|
+
return () => Nl(t(n));
|
|
3731
|
+
}
|
|
3732
|
+
let { param: n, type: r, empty: i } = e;
|
|
3733
|
+
if (r === "categories") {
|
|
3734
|
+
let r = Bo(e.projections[0].field);
|
|
3735
|
+
return (e) => Co(t(n), r(e), i);
|
|
3736
|
+
}
|
|
3737
|
+
if (r === "single") return (e) => {
|
|
3738
|
+
let r = t(n);
|
|
3739
|
+
return r.uniqueId == null ? i : r.uniqueId === e[I];
|
|
3740
|
+
};
|
|
3741
|
+
if (r === "multi") return (e) => {
|
|
3742
|
+
let r = t(n);
|
|
3743
|
+
return r.data.size === 0 ? i : r.data.has(e[I]);
|
|
3744
|
+
};
|
|
3745
|
+
let a = e.projections.map((e) => ({
|
|
3746
|
+
...e,
|
|
3747
|
+
read: Bo(e.field),
|
|
3748
|
+
readSecondary: e.secondaryField ? Bo(e.secondaryField) : void 0
|
|
3749
|
+
}));
|
|
3750
|
+
return (e) => {
|
|
3751
|
+
let r = t(n);
|
|
3752
|
+
if (!Nl(r)) return i;
|
|
3753
|
+
for (let t of a) {
|
|
3754
|
+
let n = r.intervals[t.component], i = t.read(e), a = t.readSecondary?.(e);
|
|
3755
|
+
if ($(t.component) && !Number.isFinite(i)) return !1;
|
|
3756
|
+
let [o, s] = n;
|
|
3757
|
+
if (o === s || !(a === void 0 ? o <= i && i < s : t.hitTest === "endpoints" ? o <= i && i < s || o <= a && a < s : t.hitTest === "encloses" ? o <= Math.min(i, a) && Math.max(i, a) <= s : o < Math.max(i, a) && Math.min(i, a) < s)) return !1;
|
|
3758
|
+
}
|
|
3759
|
+
return !0;
|
|
3760
|
+
};
|
|
3761
|
+
}
|
|
3762
|
+
function Nl(e) {
|
|
3763
|
+
return e.type === "interval" ? Object.values(e.intervals).every((e) => !!e) : eu(e);
|
|
3764
|
+
}
|
|
3765
|
+
//#endregion
|
|
3766
|
+
//#region ../core/src/selection/selection.js
|
|
3767
|
+
function Pl(e) {
|
|
3768
|
+
return {
|
|
3769
|
+
type: "single",
|
|
3770
|
+
datum: e,
|
|
3771
|
+
uniqueId: e?.[I]
|
|
3772
|
+
};
|
|
3773
|
+
}
|
|
3774
|
+
function Fl(e) {
|
|
3775
|
+
return e ??= [], {
|
|
3776
|
+
type: "multi",
|
|
3777
|
+
data: new Map(e.map((e) => [e[I], e]))
|
|
3778
|
+
};
|
|
3779
|
+
}
|
|
3780
|
+
function Il(e, t, n, r) {
|
|
3781
|
+
if (!t || t.length === 0) return;
|
|
3782
|
+
if (e === "single" && n.length > 1) throw Error("Single point selections expect at most one key tuple.");
|
|
3783
|
+
let i = [], a = [];
|
|
3784
|
+
for (let e of n) {
|
|
3785
|
+
let n = r(t, e);
|
|
3786
|
+
n ? i.push(n) : a.push(e);
|
|
3787
|
+
}
|
|
3788
|
+
return {
|
|
3789
|
+
selection: e === "single" ? Pl(i[0] ?? null) : Fl(i),
|
|
3790
|
+
unresolved: a
|
|
3791
|
+
};
|
|
3792
|
+
}
|
|
3793
|
+
function Ll(e) {
|
|
3794
|
+
return {
|
|
3795
|
+
type: "interval",
|
|
3796
|
+
intervals: Object.fromEntries(e.map((e) => [e, null]))
|
|
3797
|
+
};
|
|
3798
|
+
}
|
|
3799
|
+
function Rl(e, { add: t, remove: n, toggle: r }) {
|
|
3800
|
+
let i = e.data;
|
|
3801
|
+
for (let e of t ?? []) i.set(e[I], e);
|
|
3802
|
+
for (let e of n ?? []) i.delete(e[I]);
|
|
3803
|
+
for (let e of r ?? []) {
|
|
3804
|
+
let t = e[I];
|
|
3805
|
+
i.has(t) ? i.delete(t) : i.set(t, e);
|
|
3806
|
+
}
|
|
3807
|
+
return {
|
|
3808
|
+
type: "multi",
|
|
3809
|
+
data: i
|
|
3810
|
+
};
|
|
3811
|
+
}
|
|
3812
|
+
function zl(e, t) {
|
|
3813
|
+
let n = !!(e.empty ?? !0), r = Ao(e.param), i = e.fields ?? {};
|
|
3814
|
+
if (Kl(t)) {
|
|
3815
|
+
if (Object.keys(i).length !== 1 || !i[t.component]) throw Error(`Category filter fields must map the declared component "${t.component}".`);
|
|
3816
|
+
return `${r}.values.size == 0 ? ${n} : mapHasKey(${r}.values, datum${Ee(i[t.component]).map((e) => `[${JSON.stringify(e)}]`).join("")})`;
|
|
3817
|
+
}
|
|
3818
|
+
if (Wl(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(I)}]`;
|
|
3819
|
+
if (Gl(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(I)}])`;
|
|
3820
|
+
if (Ul(t)) {
|
|
3821
|
+
let a = Object.keys(t.intervals);
|
|
3822
|
+
if (a.some($)) {
|
|
3823
|
+
let e = a[0];
|
|
3824
|
+
if (Object.keys(i).length !== 1 || !i[e]) throw Error(`Numeric filter fields must map "${e}".`);
|
|
3825
|
+
let t = "datum" + Ee(i[e]).map((e) => `[${JSON.stringify(e)}]`).join(""), o = `${r}.intervals.${e}`;
|
|
3826
|
+
return `${o} ? (isNumber(${t}) && isFinite(${t}) && ${o}[0] < ${o}[1] && ${o}[0] <= ${t} && ${t} < ${o}[1]) : ${n}`;
|
|
3827
|
+
}
|
|
3828
|
+
let o = Object.keys(i).filter(Fu);
|
|
3829
|
+
if (o.length === 0) throw Error("Filtering using interval selections requires at least one primary positional channel in the config! " + JSON.stringify(e));
|
|
3830
|
+
if (o.some((e) => !a.includes(e))) throw Error(`Selection channels (${a.join(", ")}) do not match the fields: ${JSON.stringify(e)}!`);
|
|
3831
|
+
let s = (e) => `datum[${JSON.stringify(e)}]`;
|
|
3832
|
+
return a.map((e) => {
|
|
3833
|
+
let t = Uu(e), a = i[e], o = i[t] ?? i[e], c = `${r}.intervals.${e}[0] <= ${s(o)}`, l = `${s(a)} <= ${r}.intervals.${e}[1]`, u = `${r}.intervals.${e}[0] < ${r}.intervals.${e}[1]`;
|
|
3834
|
+
return `(${r}.intervals.${e} ? (${u} && ${c} && ${l}) : ${n})`;
|
|
3835
|
+
}).join(" && ");
|
|
3836
|
+
}
|
|
3837
|
+
throw Error(`Unrecognized selection type : ${JSON.stringify(t)}`);
|
|
3838
|
+
}
|
|
3839
|
+
function Bl(e) {
|
|
3840
|
+
if ("param" in e || "test" in e) return Dl(e);
|
|
3841
|
+
}
|
|
3842
|
+
function Vl(e) {
|
|
3843
|
+
return e?.selection ? Ol(e.selection) : [];
|
|
3844
|
+
}
|
|
3845
|
+
function Hl(e) {
|
|
3846
|
+
let t = Object.values(e).flatMap((e) => e.branches.flatMap(({ predicate: e }) => e.selection ? [e.selection] : [])), n = /* @__PURE__ */ new Set();
|
|
3847
|
+
return t.filter((e) => {
|
|
3848
|
+
let t = JSON.stringify(e);
|
|
3849
|
+
return !n.has(t) && (n.add(t), !0);
|
|
3850
|
+
});
|
|
3851
|
+
}
|
|
3852
|
+
function Ul(e) {
|
|
3853
|
+
return e.type === "interval";
|
|
3854
|
+
}
|
|
3855
|
+
function Wl(e) {
|
|
3856
|
+
return e.type === "single";
|
|
3857
|
+
}
|
|
3858
|
+
function Gl(e) {
|
|
3859
|
+
return e.type === "multi";
|
|
3860
|
+
}
|
|
3861
|
+
function Kl(e) {
|
|
3862
|
+
return e.type === "categories";
|
|
3863
|
+
}
|
|
3864
|
+
function ql(e) {
|
|
3865
|
+
return e.encodings ? bo(e.encodings[0]) : e.toggle ? Fl() : Pl(null);
|
|
3866
|
+
}
|
|
3867
|
+
function Jl(e, t) {
|
|
3868
|
+
if (!Kl(e)) throw Error("selectionValues requires a category point selection.");
|
|
3869
|
+
if (e.component !== t) throw Error(`Undeclared selection component "${t}".`);
|
|
3870
|
+
return Array.from(e.values);
|
|
3871
|
+
}
|
|
3872
|
+
function Yl(e, t, n) {
|
|
3873
|
+
if (!Kl(e)) throw Error("selectionContains requires a category point selection.");
|
|
3874
|
+
if (e.component !== t) throw Error(`Undeclared selection component "${t}".`);
|
|
3875
|
+
return Co(e, n, !1);
|
|
3876
|
+
}
|
|
3877
|
+
function Xl(e, t) {
|
|
3878
|
+
if (!Ul(e)) throw Error("selectionBounds requires an interval selection.");
|
|
3879
|
+
if (!Object.hasOwn(e.intervals, t)) throw Error(`Undeclared selection component "${t}".`);
|
|
3880
|
+
let n = e.intervals[t];
|
|
3881
|
+
return n ? n.slice() : null;
|
|
3882
|
+
}
|
|
3883
|
+
function Zl(e, t) {
|
|
3884
|
+
let n = typeof e == "string" ? { type: e } : { ...e };
|
|
3885
|
+
return n.on = n.on ? Sl(n.on) : Ql(n) ? { type: "click" } : void 0, n.clear = n.clear === !1 || t === "legend" && n.type === "point" && n.clear == null ? void 0 : n.clear === !0 || n.clear == null ? { type: "dblclick" } : Sl(n.clear), Ql(n) && n.on.type === "click" && n.toggle === void 0 && (n.toggle = !0), n;
|
|
3886
|
+
}
|
|
3887
|
+
function Ql(e) {
|
|
3888
|
+
return e && e.type == "point";
|
|
3889
|
+
}
|
|
3890
|
+
function $l(e) {
|
|
3891
|
+
return e && e.type == "interval";
|
|
3892
|
+
}
|
|
3893
|
+
function eu(e) {
|
|
3894
|
+
if (Wl(e)) return e.uniqueId != null;
|
|
3895
|
+
if (Gl(e)) return e.data.size > 0;
|
|
3896
|
+
if (Kl(e)) return e.values.size > 0;
|
|
3897
|
+
if (Ul(e)) return tu(e);
|
|
3898
|
+
throw Error("Unsupported selection value.");
|
|
3899
|
+
}
|
|
3900
|
+
function tu(e) {
|
|
3901
|
+
return Object.values(e.intervals).some((e) => e && e.length === 2);
|
|
3902
|
+
}
|
|
3903
|
+
function $(e) {
|
|
3904
|
+
return e === "color" || e === "fill" || e === "stroke";
|
|
3905
|
+
}
|
|
3906
|
+
function nu(e) {
|
|
3907
|
+
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t && $(e) && t[1] === "Infinity" ? [t[0], Infinity] : t]));
|
|
3908
|
+
}
|
|
3909
|
+
function ru(e, t) {
|
|
3910
|
+
let n = e?.[t];
|
|
3911
|
+
if (!e || Object.keys(e).length !== 1 || n === void 0 || n !== null && (!Array.isArray(n) || n.length !== 2 || !Number.isFinite(n[0]) || !(Number.isFinite(n[1]) || n[1] === Infinity) || n[0] > n[1])) throw Error(`Interval requires a finite lower and finite or unbounded upper endpoint for "${t}".`);
|
|
3912
|
+
}
|
|
3913
|
+
//#endregion
|
|
3914
|
+
//#region ../core/src/encoder/accessor.js
|
|
3915
|
+
function iu(e, t, n, r) {
|
|
3916
|
+
if (!e) throw Error("Cannot create an accessor without a channel.");
|
|
3917
|
+
function i(n) {
|
|
3918
|
+
let r = n;
|
|
3919
|
+
return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = su(t), r.scaleChannel = ((Cu(t) && t.resolutionChannel) ?? (qu(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = cu({
|
|
3920
|
+
scaleChannel: r.scaleChannel,
|
|
3921
|
+
source: ou(t)
|
|
3922
|
+
}).domainKeyBase), r.equals = (e) => e ? r === e || r.sourceKey !== void 0 && r.sourceKey === e.sourceKey : !1, r.asNumberAccessor = () => r, r;
|
|
3923
|
+
}
|
|
3924
|
+
function a(e) {
|
|
3925
|
+
if (F(e)) {
|
|
3926
|
+
let t = i(n.createExpression(e));
|
|
3927
|
+
if (t.fields.length > 0) throw Error("Expression in DatumDef/ValueDef cannot access data fields: " + e.expr);
|
|
3928
|
+
return t;
|
|
3929
|
+
}
|
|
3930
|
+
{
|
|
3931
|
+
let t = e;
|
|
3932
|
+
return i(() => t);
|
|
3933
|
+
}
|
|
3934
|
+
}
|
|
3935
|
+
if (xu(t)) try {
|
|
3936
|
+
let e = Bo(t.field, void 0, n?.getSpecLocation?.(t, ["field"]));
|
|
3937
|
+
return ("type" in t ? t.type : r) === "quantitative" ? i(Object.assign((t) => {
|
|
3938
|
+
let n = e(t);
|
|
3939
|
+
return Number.isFinite(n) ? n : NaN;
|
|
3940
|
+
}, { fields: e.fields })) : i(e);
|
|
3941
|
+
} catch (e) {
|
|
3942
|
+
throw Error(`Invalid field definition: ${e.message}`, { cause: e });
|
|
3943
|
+
}
|
|
3944
|
+
if (Ou(t)) return i(n.createExpression(t));
|
|
3945
|
+
if (Su(t)) return a(t.datum);
|
|
3946
|
+
if (bu(t)) return a(t.value);
|
|
3947
|
+
throw Error(`Invalid channel definition: "${e}": ${JSON.stringify(t)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`);
|
|
3948
|
+
}
|
|
3949
|
+
function au(e) {
|
|
3950
|
+
return e.scaleChannel !== void 0;
|
|
3951
|
+
}
|
|
3952
|
+
function ou(e) {
|
|
3953
|
+
if (xu(e)) return {
|
|
3954
|
+
kind: "field",
|
|
3955
|
+
value: e.field
|
|
3956
|
+
};
|
|
3957
|
+
if (Ou(e)) return {
|
|
3958
|
+
kind: "expr",
|
|
3959
|
+
value: e.expr
|
|
3960
|
+
};
|
|
3961
|
+
if (Su(e)) return {
|
|
3962
|
+
kind: "datum",
|
|
3963
|
+
value: e.datum
|
|
3964
|
+
};
|
|
3965
|
+
if (bu(e)) return {
|
|
3966
|
+
kind: "value",
|
|
3967
|
+
value: e.value
|
|
3968
|
+
};
|
|
3969
|
+
throw Error("Cannot derive a domain key from channel definition: " + JSON.stringify(e));
|
|
3970
|
+
}
|
|
3971
|
+
function su(e) {
|
|
3972
|
+
let t = ou(e);
|
|
3973
|
+
return t.kind === "datum" || t.kind === "value" ? "constant|" + du(t.value) : t.kind + "|" + uu(t);
|
|
3974
|
+
}
|
|
3975
|
+
function cu({ scaleChannel: e, source: t, type: n }) {
|
|
3976
|
+
if (!e) throw Error("Cannot build a domain key without a scale channel.");
|
|
3977
|
+
let r = e + "|" + t.kind + "|" + uu(t);
|
|
3978
|
+
return {
|
|
3979
|
+
domainKeyBase: r,
|
|
3980
|
+
domainKey: n ? n + "|" + r : void 0
|
|
3981
|
+
};
|
|
3982
|
+
}
|
|
3983
|
+
function lu(e, t) {
|
|
3984
|
+
let { domainKey: n, domainKeyBase: r } = cu({
|
|
3985
|
+
scaleChannel: e.scaleChannel,
|
|
3986
|
+
source: ou(e.channelDef),
|
|
3987
|
+
type: t
|
|
3988
|
+
});
|
|
3989
|
+
if (!n) throw Error("Cannot finalize a domain key without a resolved type.");
|
|
3990
|
+
return e.domainKeyBase = r, e.domainKey = n, n;
|
|
3991
|
+
}
|
|
3992
|
+
function uu(e) {
|
|
3993
|
+
switch (e.kind) {
|
|
3994
|
+
case "field":
|
|
3995
|
+
case "expr": return e.value;
|
|
3996
|
+
case "datum":
|
|
3997
|
+
case "value": return du(e.value);
|
|
3998
|
+
default: throw Error("Unknown domain key source.");
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
function du(e) {
|
|
4002
|
+
return F(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
|
|
4003
|
+
}
|
|
4004
|
+
//#endregion
|
|
4005
|
+
//#region ../core/src/encoder/encoder.js
|
|
4006
|
+
function fu(e, t, n, r = "intersects", i, a) {
|
|
4007
|
+
let o, s, c = Ol(e), l = () => (o ??= jl(e, t, n, r, i, a), o);
|
|
4008
|
+
return c.every((e) => n.findValue(e)) && l(), Object.defineProperty((e) => !c.some((e) => !n.findValue(e)) && (s ??= Ml(l(), (e) => n.findValue(e)), s(e)), "selection", { get: l });
|
|
4009
|
+
}
|
|
4010
|
+
function pu(e, t, n, r, i = "intersects", a, o) {
|
|
4011
|
+
let s = ku(t) || Au(t) ? Array.isArray(t.condition) ? t.condition : [t.condition] : [], c = [...s, t], l = c.map((t, l) => {
|
|
4012
|
+
let u = s[l], d = iu(e, t, r, Iu(e) ? a?.(e) : void 0);
|
|
4013
|
+
if (Gu(e) && bu(t)) {
|
|
4014
|
+
let e = t.value;
|
|
4015
|
+
if (e !== null && !F(e) && (typeof e != "string" || !tn(e))) throw Lo(/* @__PURE__ */ Error("Invalid color: " + JSON.stringify(e)), r.getSpecLocation?.(t, ["value"]));
|
|
4016
|
+
}
|
|
4017
|
+
let f = u ? Bl(u) : void 0;
|
|
4018
|
+
return {
|
|
4019
|
+
accessor: d,
|
|
4020
|
+
predicate: f ? fu(f, n, r, i, a, o) : Fo(l === c.length - 1)
|
|
4021
|
+
};
|
|
4022
|
+
});
|
|
4023
|
+
if (l.filter((e) => !e.accessor.constant).length > 1) throw Error("Only one accessor can be non-constant. Channel: " + e);
|
|
4024
|
+
return l;
|
|
4025
|
+
}
|
|
4026
|
+
function mu(e, t) {
|
|
4027
|
+
let n = {}, r = (t) => e.getScaleResolution(t)?.getScale(), i = (t, n) => {
|
|
4028
|
+
let r = e.getScaleResolution(t);
|
|
4029
|
+
e.paramRuntime.operation("encoder scale", [r.getMappingRef()], () => r.getScale(), n);
|
|
4030
|
+
};
|
|
4031
|
+
for (let [a, o] of Object.entries(t)) {
|
|
4032
|
+
if (!o) continue;
|
|
4033
|
+
let s = a;
|
|
4034
|
+
hu(s) || (n[s] = vu(pu(s, o, t, e.paramRuntime, e.mark.defaultHitTestMode, (t) => e.getScaleResolution(t)?.type, r), r, i));
|
|
4035
|
+
}
|
|
4036
|
+
return n;
|
|
4037
|
+
}
|
|
4038
|
+
function hu(e) {
|
|
4039
|
+
return e === "key" || e === "search" || e === "tooltip" || e === "order";
|
|
4040
|
+
}
|
|
4041
|
+
function gu(e) {
|
|
4042
|
+
return e.branches.map((e) => e.accessor);
|
|
4043
|
+
}
|
|
4044
|
+
function _u(e) {
|
|
4045
|
+
return e.branches.find((e) => !e.accessor.constant)?.accessor;
|
|
4046
|
+
}
|
|
4047
|
+
function vu(e, t, n) {
|
|
4048
|
+
if (e.length === 1) {
|
|
4049
|
+
let r = yu(e[0].accessor, t, n);
|
|
4050
|
+
return Object.assign(r, { branches: e });
|
|
4051
|
+
}
|
|
4052
|
+
let r = e.map((e) => e.predicate), i = e.map((e) => yu(e.accessor, t, n)), a = Object.assign((e) => {
|
|
4053
|
+
for (let t = 0; t < i.length; t++) if (r[t](e)) return i[t](e);
|
|
4054
|
+
}, {
|
|
4055
|
+
constant: !1,
|
|
4056
|
+
branches: e,
|
|
4057
|
+
channelDef: e.at(-1).accessor.channelDef
|
|
4058
|
+
});
|
|
4059
|
+
return Object.defineProperty(a, "scale", {
|
|
4060
|
+
enumerable: !0,
|
|
4061
|
+
get: () => i.find((e) => e.scale)?.scale
|
|
4062
|
+
});
|
|
4063
|
+
}
|
|
4064
|
+
function yu(e, t, n) {
|
|
4065
|
+
let { channel: r, scaleChannel: i, channelDef: a } = e, o = e.scaleChannel ? t(i) : void 0;
|
|
4066
|
+
if (i && !o) throw Error(`Missing scale! "${r}": ${JSON.stringify(a)}`);
|
|
4067
|
+
let s = Object.assign(o ? (t) => o(e(t)) : (t) => e(t), {
|
|
4068
|
+
scale: o,
|
|
4069
|
+
constant: e.constant,
|
|
4070
|
+
branches: [{
|
|
4071
|
+
accessor: e,
|
|
4072
|
+
predicate: Fo(!0)
|
|
4073
|
+
}],
|
|
4074
|
+
channelDef: a
|
|
4075
|
+
});
|
|
4076
|
+
return o && n?.(i, (e) => {
|
|
4077
|
+
o = e, s.scale = e;
|
|
4078
|
+
}), s;
|
|
4079
|
+
}
|
|
4080
|
+
function bu(e) {
|
|
4081
|
+
return e && "value" in e;
|
|
4082
|
+
}
|
|
4083
|
+
function xu(e) {
|
|
4084
|
+
return e && "field" in e;
|
|
4085
|
+
}
|
|
4086
|
+
function Su(e) {
|
|
4087
|
+
return e && "datum" in e;
|
|
4088
|
+
}
|
|
4089
|
+
function Cu(e) {
|
|
4090
|
+
return xu(e) || Su(e) || Ou(e) || Du(e);
|
|
4091
|
+
}
|
|
4092
|
+
function wu(e) {
|
|
4093
|
+
if (Au(e)) {
|
|
4094
|
+
let t = e.condition;
|
|
4095
|
+
return (Array.isArray(t) ? t : [t]).find((e) => Cu(e));
|
|
4096
|
+
}
|
|
4097
|
+
if (Cu(e)) return e;
|
|
4098
|
+
}
|
|
4099
|
+
function Tu(e) {
|
|
4100
|
+
let t = e && wu(e);
|
|
4101
|
+
return t != null && t.type != "quantitative" && t.scale !== null;
|
|
4102
|
+
}
|
|
4103
|
+
function Eu(e, t) {
|
|
4104
|
+
let n = e.mark.encoding[t];
|
|
4105
|
+
if (Array.isArray(n)) throw Error("Not a channel def with scale!");
|
|
4106
|
+
{
|
|
4107
|
+
let e = wu(n);
|
|
4108
|
+
if (e) return e;
|
|
4109
|
+
}
|
|
4110
|
+
throw Error("Not a channel def with scale!");
|
|
4111
|
+
}
|
|
4112
|
+
function Du(e) {
|
|
4113
|
+
return e && "chrom" in e;
|
|
4114
|
+
}
|
|
4115
|
+
function Ou(e) {
|
|
4116
|
+
return e && "expr" in e;
|
|
4117
|
+
}
|
|
4118
|
+
function ku(e) {
|
|
4119
|
+
return (xu(e) || Su(e)) && "condition" in e;
|
|
4120
|
+
}
|
|
4121
|
+
function Au(e) {
|
|
4122
|
+
return bu(e) && "condition" in e;
|
|
4123
|
+
}
|
|
4124
|
+
var ju = ["x", "y"], Mu = ["x2", "y2"], Nu = ["xOffset", "yOffset"], Pu = [...ju, ...Mu];
|
|
4125
|
+
function Fu(e) {
|
|
4126
|
+
return ju.includes(e);
|
|
4127
|
+
}
|
|
4128
|
+
function Iu(e) {
|
|
4129
|
+
return Pu.includes(e);
|
|
4130
|
+
}
|
|
4131
|
+
function Lu(e) {
|
|
4132
|
+
return Nu.includes(e);
|
|
4133
|
+
}
|
|
4134
|
+
function Ru(e) {
|
|
4135
|
+
return Wu(e) == "x" ? "xOffset" : "yOffset";
|
|
4136
|
+
}
|
|
4137
|
+
function zu(e, t, n) {
|
|
4138
|
+
return t ?? (n ? 0 : e);
|
|
4139
|
+
}
|
|
4140
|
+
var Bu = {
|
|
4141
|
+
x: "x2",
|
|
4142
|
+
y: "y2"
|
|
4143
|
+
}, Vu = Object.fromEntries([
|
|
4144
|
+
...Object.entries(Bu),
|
|
4145
|
+
["xOffset", "x2Offset"],
|
|
4146
|
+
["yOffset", "y2Offset"]
|
|
4147
|
+
].map((e) => [e[1], e[0]]));
|
|
4148
|
+
function Hu(e) {
|
|
4149
|
+
return e in Vu;
|
|
4150
|
+
}
|
|
4151
|
+
function Uu(e) {
|
|
4152
|
+
let t = Bu[e];
|
|
4153
|
+
if (t) return t;
|
|
4154
|
+
throw Error(`${e} has no secondary channel!`);
|
|
4155
|
+
}
|
|
4156
|
+
function Wu(e) {
|
|
4157
|
+
return Vu[e] ?? e;
|
|
4158
|
+
}
|
|
4159
|
+
function Gu(e) {
|
|
4160
|
+
return [
|
|
4161
|
+
"color",
|
|
4162
|
+
"fill",
|
|
4163
|
+
"stroke"
|
|
4164
|
+
].includes(Wu(e));
|
|
4165
|
+
}
|
|
4166
|
+
function Ku(e) {
|
|
4167
|
+
return ["shape", "direction"].includes(e);
|
|
4168
|
+
}
|
|
4169
|
+
function qu(e) {
|
|
4170
|
+
return [
|
|
4171
|
+
"x",
|
|
4172
|
+
"y",
|
|
4173
|
+
"x2",
|
|
4174
|
+
"y2",
|
|
4175
|
+
"xOffset",
|
|
4176
|
+
"yOffset",
|
|
4177
|
+
"x2Offset",
|
|
4178
|
+
"y2Offset",
|
|
4179
|
+
"color",
|
|
4180
|
+
"fill",
|
|
4181
|
+
"stroke",
|
|
4182
|
+
"opacity",
|
|
4183
|
+
"fillOpacity",
|
|
4184
|
+
"strokeOpacity",
|
|
4185
|
+
"strokeWidth",
|
|
4186
|
+
"size",
|
|
4187
|
+
"shape",
|
|
4188
|
+
"direction",
|
|
4189
|
+
"angle",
|
|
4190
|
+
"dx",
|
|
4191
|
+
"dy",
|
|
4192
|
+
"sample"
|
|
4193
|
+
].includes(e);
|
|
4194
|
+
}
|
|
4195
|
+
function Ju(e) {
|
|
4196
|
+
switch (e) {
|
|
4197
|
+
case "shape": return [
|
|
4198
|
+
"circle",
|
|
4199
|
+
"square",
|
|
4200
|
+
"cross",
|
|
4201
|
+
"diamond",
|
|
4202
|
+
"triangle-up",
|
|
4203
|
+
"triangle-right",
|
|
4204
|
+
"triangle-down",
|
|
4205
|
+
"triangle-left",
|
|
4206
|
+
"tick-up",
|
|
4207
|
+
"tick-right",
|
|
4208
|
+
"tick-down",
|
|
4209
|
+
"tick-left",
|
|
4210
|
+
"x",
|
|
4211
|
+
"+"
|
|
4212
|
+
];
|
|
4213
|
+
case "direction": return [
|
|
4214
|
+
"forward",
|
|
4215
|
+
"reverse",
|
|
4216
|
+
"both"
|
|
4217
|
+
];
|
|
4218
|
+
}
|
|
4219
|
+
}
|
|
4220
|
+
function Yu(e) {
|
|
4221
|
+
if (!Ku(e)) throw Error("Not a discrete channel: " + e);
|
|
4222
|
+
let t = new Map(Ju(e).map((e, t) => [e, t]));
|
|
4223
|
+
return (n) => {
|
|
4224
|
+
let r = t.get(n);
|
|
4225
|
+
if (r !== void 0) return r;
|
|
4226
|
+
throw Error(`Invalid value for "${e}" channel: ${n}`);
|
|
4227
|
+
};
|
|
4228
|
+
}
|
|
4229
|
+
//#endregion
|
|
4230
|
+
//#region ../core/src/utils/specOrigin.js
|
|
4231
|
+
var Xu = /* @__PURE__ */ new WeakMap();
|
|
4232
|
+
function Zu(e, t, n) {
|
|
4233
|
+
let r = Xu.get(e);
|
|
4234
|
+
return Xu.set(t, {
|
|
4235
|
+
source: r?.source ?? e,
|
|
4236
|
+
path: n ?? r?.path
|
|
4237
|
+
}), t;
|
|
4238
|
+
}
|
|
4239
|
+
function Qu(e) {
|
|
4240
|
+
let t = structuredClone(e);
|
|
4241
|
+
function n(e, t) {
|
|
4242
|
+
if (e && typeof e == "object" && !Xu.has(t)) {
|
|
4243
|
+
Zu(e, t);
|
|
4244
|
+
for (let r of Object.keys(e)) n(e[r], t[r]);
|
|
4245
|
+
}
|
|
4246
|
+
}
|
|
4247
|
+
return n(e, t), t;
|
|
4248
|
+
}
|
|
4249
|
+
function $u(e, t, n) {
|
|
4250
|
+
if (!e || !t) return;
|
|
4251
|
+
let r = Xu.get(e), i = t(r?.source ?? e);
|
|
4252
|
+
return i === void 0 ? void 0 : {
|
|
4253
|
+
origin: i,
|
|
4254
|
+
path: r?.path ?? n
|
|
4255
|
+
};
|
|
4256
|
+
}
|
|
4257
|
+
//#endregion
|
|
4258
|
+
//#region ../core/src/view/renderingContext/clipOptions.js
|
|
4259
|
+
function ed(e) {
|
|
4260
|
+
if (e.clip) return e.clip;
|
|
4261
|
+
if (e.clipRect) return {
|
|
4262
|
+
rect: e.clipRect,
|
|
4263
|
+
clipX: !0,
|
|
4264
|
+
clipY: !0
|
|
4265
|
+
};
|
|
4266
|
+
}
|
|
4267
|
+
function td(e, t) {
|
|
4268
|
+
return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
|
|
4269
|
+
}
|
|
4270
|
+
function nd(e, t, n) {
|
|
4271
|
+
return t || n ? {
|
|
4272
|
+
rect: e,
|
|
4273
|
+
clipX: t,
|
|
4274
|
+
clipY: n
|
|
4275
|
+
} : void 0;
|
|
4276
|
+
}
|
|
4277
|
+
function rd(e, t) {
|
|
4278
|
+
return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
|
|
4279
|
+
}
|
|
4280
|
+
function id(e, t) {
|
|
4281
|
+
if (!e) return t;
|
|
4282
|
+
if (!t) return e;
|
|
4283
|
+
let n = e.clipX || t.clipX, r = e.clipY || t.clipY, i = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, a = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
|
|
4284
|
+
return nd(e.rect.modify({
|
|
4285
|
+
x: () => i.x,
|
|
4286
|
+
y: () => a.y,
|
|
4287
|
+
width: () => i.width,
|
|
4288
|
+
height: () => a.height
|
|
4289
|
+
}), n, r);
|
|
4290
|
+
}
|
|
4291
|
+
function ad(e, t) {
|
|
4292
|
+
if (e === !0) return nd(t, !0, !0);
|
|
4293
|
+
if (e === "x") return nd(t, !0, !1);
|
|
4294
|
+
if (e === "y") return nd(t, !1, !0);
|
|
4295
|
+
}
|
|
4296
|
+
function od(e) {
|
|
4297
|
+
let t = !1, n = !0, r = !0, i = !1;
|
|
4298
|
+
return e.visit((e) => {
|
|
4299
|
+
let a = e.mark;
|
|
4300
|
+
if (a) {
|
|
4301
|
+
t = !0;
|
|
4302
|
+
let e = a.properties.clip;
|
|
4303
|
+
n &&= e === !0 || e === "x", r &&= e === !0 || e === "y", i ||= e === !0 || e === "x" || e === "y";
|
|
4304
|
+
}
|
|
4305
|
+
}), {
|
|
4306
|
+
clipX: t && n,
|
|
4307
|
+
clipY: t && r,
|
|
4308
|
+
all: n && r,
|
|
4309
|
+
any: i
|
|
4310
|
+
};
|
|
4311
|
+
}
|
|
4312
|
+
function sd(e, t, n) {
|
|
4313
|
+
if (t !== "never") return id(e, ad(t, n));
|
|
4314
|
+
}
|
|
4315
|
+
//#endregion
|
|
4316
|
+
export { Ql as $, Ue as $n, ja as $t, Lu as A, yt as An, Bo as At, Zl as B, rt as Bn, Fo as Bt, Du as C, on as Cn, al as Ct, Ou as D, kt as Dn, Wo as Dt, Ku as E, Nt as En, $c as Et, ju as F, be as Fn, Oo as Ft, Pl as G, st as Gn, wo as Gt, Hl as H, it as Hn, Ao as Ht, zu as I, Je as In, F as It, Kl as J, Ve as Jn, La as Jt, Vl as K, ze as Kn, So as Kt, iu as L, Ze as Ln, ko as Lt, Fu as M, v as Mn, Io as Mt, Hu as N, pt as Nn, Mo as Nt, xu as O, Ot as On, I as Ot, bu as P, lt as Pn, jo as Pt, Gl as Q, ut as Qn, Fa as Qt, lu as R, Te as Rn, Do as Rt, qu as S, tn as Sn, il as St, Su as T, Mt as Tn, el as Tt, Ll as U, Ae as Un, To as Ut, ql as V, Ye as Vn, Po as Vt, Fl as W, ot as Wn, xo as Wt, Ul as X, ct as Xn, Ta as Xt, $ as Y, je as Yn, Aa as Yt, $l as Z, Ee as Zn, Pa as Zt, _u as _, vo as _n, dl as _t, od as a, Oa as an, Rl as at, Uu as b, br as bn, sl as bt, Qu as c, co as cn, Ml as ct, mu as d, ro as dn, Dl as dt, Ma as en, We as er, eu as et, fu as f, io as fn, Al as ft, gu as g, P as gn, Tl as gt, Yu as h, lo as hn, wl as ht, nd as i, Na as in, Il as it, Iu as j, vt as jn, Lo as jt, Tu as k, Tt as kn, Vo as kt, $u as l, so as ln, El as lt, Eu as m, ao as mn, Cl as mt, td as n, Ea as nn, Ke as nr, zl as nt, ed as o, Ca as on, ru as ot, wu as p, oo as pn, Sl as pt, tu as q, Be as qn, Ia as qt, id as r, Da as rn, Bl as rt, sd as s, uo as sn, kl as st, rd as t, ka as tn, Ge as tr, Wl as tt, Zu as u, no as un, Ol as ut, Ru as v, ea as vn, yl as vt, Gu as w, Pt as wn, rl as wt, Cu as x, O as xn, ol as xt, Wu as y, vi as yn, tl as yt, au as z, ke as zn, Eo as zt };
|