@carbon/charts 1.22.18 → 1.22.20

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.
@@ -1,1712 +0,0 @@
1
- import { P as Zt, Q as De, R as Xt, S as Oe, U as Qt, V as Jt, W as ut, X as Kt, Y as We, Z as en, _ as tn, g as ie, p as $e } from "./color-scale-utils-ycwO-Ibq.mjs";
2
- import { $ as pe, o as B, T as V } from "./axis-scales-CPuwbFQf.mjs";
3
- var nn = /\s/;
4
- function rn(e) {
5
- for (var t = e.length; t-- && nn.test(e.charAt(t)); )
6
- ;
7
- return t;
8
- }
9
- var on = /^\s+/;
10
- function sn(e) {
11
- return e && e.slice(0, rn(e) + 1).replace(on, "");
12
- }
13
- var Ye = NaN, an = /^[-+]0x[0-9a-f]+$/i, un = /^0b[01]+$/i, cn = /^0o[0-7]+$/i, ln = parseInt;
14
- function _e(e) {
15
- if (typeof e == "number")
16
- return e;
17
- if (Zt(e))
18
- return Ye;
19
- if (De(e)) {
20
- var t = typeof e.valueOf == "function" ? e.valueOf() : e;
21
- e = De(t) ? t + "" : t;
22
- }
23
- if (typeof e != "string")
24
- return e === 0 ? e : +e;
25
- e = sn(e);
26
- var n = un.test(e);
27
- return n || cn.test(e) ? ln(e.slice(2), n ? 2 : 8) : an.test(e) ? Ye : +e;
28
- }
29
- var we = function() {
30
- return Xt.Date.now();
31
- }, fn = "Expected a function", hn = Math.max, gn = Math.min;
32
- function mn(e, t, n) {
33
- var r, o, i, s, a, c, h = 0, m = !1, d = !1, g = !0;
34
- if (typeof e != "function")
35
- throw new TypeError(fn);
36
- t = _e(t) || 0, De(n) && (m = !!n.leading, d = "maxWait" in n, i = d ? hn(_e(n.maxWait) || 0, t) : i, g = "trailing" in n ? !!n.trailing : g);
37
- function T(f) {
38
- var C = r, O = o;
39
- return r = o = void 0, h = f, s = e.apply(O, C), s;
40
- }
41
- function M(f) {
42
- return h = f, a = setTimeout(k, t), m ? T(f) : s;
43
- }
44
- function U(f) {
45
- var C = f - c, O = f - h, ce = t - C;
46
- return d ? gn(ce, i - O) : ce;
47
- }
48
- function I(f) {
49
- var C = f - c, O = f - h;
50
- return c === void 0 || C >= t || C < 0 || d && O >= i;
51
- }
52
- function k() {
53
- var f = we();
54
- if (I(f))
55
- return Q(f);
56
- a = setTimeout(k, U(f));
57
- }
58
- function Q(f) {
59
- return a = void 0, g && r ? T(f) : (r = o = void 0, s);
60
- }
61
- function A() {
62
- a !== void 0 && clearTimeout(a), h = 0, r = c = o = a = void 0;
63
- }
64
- function P() {
65
- return a === void 0 ? s : Q(we());
66
- }
67
- function G() {
68
- var f = we(), C = I(f);
69
- if (r = arguments, o = this, c = f, C) {
70
- if (a === void 0)
71
- return M(c);
72
- if (d)
73
- return clearTimeout(a), a = setTimeout(k, t), T(c);
74
- }
75
- return a === void 0 && (a = setTimeout(k, t)), s;
76
- }
77
- return G.cancel = A, G.flush = P, G;
78
- }
79
- function dn(e, t, n) {
80
- e = +e, t = +t, n = (o = arguments.length) < 2 ? (t = e, e = 0, 1) : o < 3 ? 1 : +n;
81
- for (var r = -1, o = Math.max(0, Math.ceil((t - e) / n)) | 0, i = new Array(o); ++r < o; )
82
- i[r] = e + r * n;
83
- return i;
84
- }
85
- function D(e) {
86
- return typeof e == "string" ? new Oe([[document.querySelector(e)]], [document.documentElement]) : new Oe([[e]], Qt);
87
- }
88
- function yn() {
89
- var e = Jt().unknown(void 0), t = e.domain, n = e.range, r = 0, o = 1, i, s, a = !1, c = 0, h = 0, m = 0.5;
90
- delete e.unknown;
91
- function d() {
92
- var g = t().length, T = o < r, M = T ? o : r, U = T ? r : o;
93
- i = (U - M) / Math.max(1, g - c + h * 2), a && (i = Math.floor(i)), M += (U - M - i * (g - c)) * m, s = i * (1 - c), a && (M = Math.round(M), s = Math.round(s));
94
- var I = dn(g).map(function(k) {
95
- return M + i * k;
96
- });
97
- return n(T ? I.reverse() : I);
98
- }
99
- return e.domain = function(g) {
100
- return arguments.length ? (t(g), d()) : t();
101
- }, e.range = function(g) {
102
- return arguments.length ? ([r, o] = g, r = +r, o = +o, d()) : [r, o];
103
- }, e.rangeRound = function(g) {
104
- return [r, o] = g, r = +r, o = +o, a = !0, d();
105
- }, e.bandwidth = function() {
106
- return s;
107
- }, e.step = function() {
108
- return i;
109
- }, e.round = function(g) {
110
- return arguments.length ? (a = !!g, d()) : a;
111
- }, e.padding = function(g) {
112
- return arguments.length ? (c = Math.min(1, h = +g), d()) : c;
113
- }, e.paddingInner = function(g) {
114
- return arguments.length ? (c = Math.min(1, g), d()) : c;
115
- }, e.paddingOuter = function(g) {
116
- return arguments.length ? (h = +g, d()) : h;
117
- }, e.align = function(g) {
118
- return arguments.length ? (m = Math.max(0, Math.min(1, g)), d()) : m;
119
- }, e.copy = function() {
120
- return yn(t(), [r, o]).round(a).paddingInner(c).paddingOuter(h).align(m);
121
- }, ut.apply(d(), arguments);
122
- }
123
- function pn(e, t) {
124
- e = e.slice();
125
- var n = 0, r = e.length - 1, o = e[n], i = e[r], s;
126
- return i < o && (s = n, n = r, r = s, s = o, o = i, i = s), e[n] = t.floor(o), e[r] = t.ceil(i), e;
127
- }
128
- const Te = /* @__PURE__ */ new Date(), Se = /* @__PURE__ */ new Date();
129
- function x(e, t, n, r) {
130
- function o(i) {
131
- return e(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
132
- }
133
- return o.floor = (i) => (e(i = /* @__PURE__ */ new Date(+i)), i), o.ceil = (i) => (e(i = new Date(i - 1)), t(i, 1), e(i), i), o.round = (i) => {
134
- const s = o(i), a = o.ceil(i);
135
- return i - s < a - i ? s : a;
136
- }, o.offset = (i, s) => (t(i = /* @__PURE__ */ new Date(+i), s == null ? 1 : Math.floor(s)), i), o.range = (i, s, a) => {
137
- const c = [];
138
- if (i = o.ceil(i), a = a == null ? 1 : Math.floor(a), !(i < s) || !(a > 0)) return c;
139
- let h;
140
- do
141
- c.push(h = /* @__PURE__ */ new Date(+i)), t(i, a), e(i);
142
- while (h < i && i < s);
143
- return c;
144
- }, o.filter = (i) => x((s) => {
145
- if (s >= s) for (; e(s), !i(s); ) s.setTime(s - 1);
146
- }, (s, a) => {
147
- if (s >= s)
148
- if (a < 0) for (; ++a <= 0; )
149
- for (; t(s, -1), !i(s); )
150
- ;
151
- else for (; --a >= 0; )
152
- for (; t(s, 1), !i(s); )
153
- ;
154
- }), n && (o.count = (i, s) => (Te.setTime(+i), Se.setTime(+s), e(Te), e(Se), Math.floor(n(Te, Se))), o.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? o.filter(r ? (s) => r(s) % i === 0 : (s) => o.count(0, s) % i === 0) : o)), o;
155
- }
156
- const le = x(() => {
157
- }, (e, t) => {
158
- e.setTime(+e + t);
159
- }, (e, t) => t - e);
160
- le.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? x((t) => {
161
- t.setTime(Math.floor(t / e) * e);
162
- }, (t, n) => {
163
- t.setTime(+t + n * e);
164
- }, (t, n) => (n - t) / e) : le);
165
- le.range;
166
- const W = 1e3, H = W * 60, $ = H * 60, Y = $ * 24, Ue = Y * 7, Be = Y * 30, Ce = Y * 365, te = x((e) => {
167
- e.setTime(e - e.getMilliseconds());
168
- }, (e, t) => {
169
- e.setTime(+e + t * W);
170
- }, (e, t) => (t - e) / W, (e) => e.getUTCSeconds());
171
- te.range;
172
- const Fe = x((e) => {
173
- e.setTime(e - e.getMilliseconds() - e.getSeconds() * W);
174
- }, (e, t) => {
175
- e.setTime(+e + t * H);
176
- }, (e, t) => (t - e) / H, (e) => e.getMinutes());
177
- Fe.range;
178
- const wn = x((e) => {
179
- e.setUTCSeconds(0, 0);
180
- }, (e, t) => {
181
- e.setTime(+e + t * H);
182
- }, (e, t) => (t - e) / H, (e) => e.getUTCMinutes());
183
- wn.range;
184
- const Re = x((e) => {
185
- e.setTime(e - e.getMilliseconds() - e.getSeconds() * W - e.getMinutes() * H);
186
- }, (e, t) => {
187
- e.setTime(+e + t * $);
188
- }, (e, t) => (t - e) / $, (e) => e.getHours());
189
- Re.range;
190
- const Tn = x((e) => {
191
- e.setUTCMinutes(0, 0, 0);
192
- }, (e, t) => {
193
- e.setTime(+e + t * $);
194
- }, (e, t) => (t - e) / $, (e) => e.getUTCHours());
195
- Tn.range;
196
- const ue = x(
197
- (e) => e.setHours(0, 0, 0, 0),
198
- (e, t) => e.setDate(e.getDate() + t),
199
- (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * H) / Y,
200
- (e) => e.getDate() - 1
201
- );
202
- ue.range;
203
- const Le = x((e) => {
204
- e.setUTCHours(0, 0, 0, 0);
205
- }, (e, t) => {
206
- e.setUTCDate(e.getUTCDate() + t);
207
- }, (e, t) => (t - e) / Y, (e) => e.getUTCDate() - 1);
208
- Le.range;
209
- const Sn = x((e) => {
210
- e.setUTCHours(0, 0, 0, 0);
211
- }, (e, t) => {
212
- e.setUTCDate(e.getUTCDate() + t);
213
- }, (e, t) => (t - e) / Y, (e) => Math.floor(e / Y));
214
- Sn.range;
215
- function Z(e) {
216
- return x((t) => {
217
- t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
218
- }, (t, n) => {
219
- t.setDate(t.getDate() + n * 7);
220
- }, (t, n) => (n - t - (n.getTimezoneOffset() - t.getTimezoneOffset()) * H) / Ue);
221
- }
222
- const de = Z(0), fe = Z(1), Cn = Z(2), Mn = Z(3), ne = Z(4), xn = Z(5), bn = Z(6);
223
- de.range;
224
- fe.range;
225
- Cn.range;
226
- Mn.range;
227
- ne.range;
228
- xn.range;
229
- bn.range;
230
- function X(e) {
231
- return x((t) => {
232
- t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
233
- }, (t, n) => {
234
- t.setUTCDate(t.getUTCDate() + n * 7);
235
- }, (t, n) => (n - t) / Ue);
236
- }
237
- const ct = X(0), he = X(1), Dn = X(2), En = X(3), re = X(4), vn = X(5), Un = X(6);
238
- ct.range;
239
- he.range;
240
- Dn.range;
241
- En.range;
242
- re.range;
243
- vn.range;
244
- Un.range;
245
- const He = x((e) => {
246
- e.setDate(1), e.setHours(0, 0, 0, 0);
247
- }, (e, t) => {
248
- e.setMonth(e.getMonth() + t);
249
- }, (e, t) => t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12, (e) => e.getMonth());
250
- He.range;
251
- const Fn = x((e) => {
252
- e.setUTCDate(1), e.setUTCHours(0, 0, 0, 0);
253
- }, (e, t) => {
254
- e.setUTCMonth(e.getUTCMonth() + t);
255
- }, (e, t) => t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12, (e) => e.getUTCMonth());
256
- Fn.range;
257
- const _ = x((e) => {
258
- e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
259
- }, (e, t) => {
260
- e.setFullYear(e.getFullYear() + t);
261
- }, (e, t) => t.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
262
- _.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
263
- t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
264
- }, (t, n) => {
265
- t.setFullYear(t.getFullYear() + n * e);
266
- });
267
- _.range;
268
- const j = x((e) => {
269
- e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
270
- }, (e, t) => {
271
- e.setUTCFullYear(e.getUTCFullYear() + t);
272
- }, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
273
- j.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
274
- t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
275
- }, (t, n) => {
276
- t.setUTCFullYear(t.getUTCFullYear() + n * e);
277
- });
278
- j.range;
279
- function Rn(e, t, n, r, o, i) {
280
- const s = [
281
- [te, 1, W],
282
- [te, 5, 5 * W],
283
- [te, 15, 15 * W],
284
- [te, 30, 30 * W],
285
- [i, 1, H],
286
- [i, 5, 5 * H],
287
- [i, 15, 15 * H],
288
- [i, 30, 30 * H],
289
- [o, 1, $],
290
- [o, 3, 3 * $],
291
- [o, 6, 6 * $],
292
- [o, 12, 12 * $],
293
- [r, 1, Y],
294
- [r, 2, 2 * Y],
295
- [n, 1, Ue],
296
- [t, 1, Be],
297
- [t, 3, 3 * Be],
298
- [e, 1, Ce]
299
- ];
300
- function a(h, m, d) {
301
- const g = m < h;
302
- g && ([h, m] = [m, h]);
303
- const T = d && typeof d.range == "function" ? d : c(h, m, d), M = T ? T.range(h, +m + 1) : [];
304
- return g ? M.reverse() : M;
305
- }
306
- function c(h, m, d) {
307
- const g = Math.abs(m - h) / d, T = Kt(([, , I]) => I).right(s, g);
308
- if (T === s.length) return e.every(We(h / Ce, m / Ce, d));
309
- if (T === 0) return le.every(Math.max(We(h, m, d), 1));
310
- const [M, U] = s[g / s[T - 1][2] < s[T][2] / g ? T - 1 : T];
311
- return M.every(U);
312
- }
313
- return [a, c];
314
- }
315
- const [Ln, Hn] = Rn(_, He, de, ue, Re, Fe);
316
- function Me(e) {
317
- if (0 <= e.y && e.y < 100) {
318
- var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
319
- return t.setFullYear(e.y), t;
320
- }
321
- return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
322
- }
323
- function xe(e) {
324
- if (0 <= e.y && e.y < 100) {
325
- var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
326
- return t.setUTCFullYear(e.y), t;
327
- }
328
- return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
329
- }
330
- function oe(e, t, n) {
331
- return { y: e, m: t, d: n, H: 0, M: 0, S: 0, L: 0 };
332
- }
333
- function In(e) {
334
- var t = e.dateTime, n = e.date, r = e.time, o = e.periods, i = e.days, s = e.shortDays, a = e.months, c = e.shortMonths, h = se(o), m = ae(o), d = se(i), g = ae(i), T = se(s), M = ae(s), U = se(a), I = ae(a), k = se(c), Q = ae(c), A = {
335
- a: Ot,
336
- A: Wt,
337
- b: $t,
338
- B: Yt,
339
- c: null,
340
- d: je,
341
- e: je,
342
- f: nr,
343
- g: hr,
344
- G: mr,
345
- H: Kn,
346
- I: er,
347
- j: tr,
348
- L: lt,
349
- m: rr,
350
- M: ir,
351
- p: _t,
352
- q: Bt,
353
- Q: Qe,
354
- s: Je,
355
- S: or,
356
- u: sr,
357
- U: ar,
358
- V: ur,
359
- w: cr,
360
- W: lr,
361
- x: null,
362
- X: null,
363
- y: fr,
364
- Y: gr,
365
- Z: dr,
366
- "%": Xe
367
- }, P = {
368
- a: Vt,
369
- A: zt,
370
- b: qt,
371
- B: Gt,
372
- c: null,
373
- d: Ze,
374
- e: Ze,
375
- f: Tr,
376
- g: Fr,
377
- G: Lr,
378
- H: yr,
379
- I: pr,
380
- j: wr,
381
- L: ht,
382
- m: Sr,
383
- M: Cr,
384
- p: Nt,
385
- q: jt,
386
- Q: Qe,
387
- s: Je,
388
- S: Mr,
389
- u: xr,
390
- U: br,
391
- V: Dr,
392
- w: Er,
393
- W: vr,
394
- x: null,
395
- X: null,
396
- y: Ur,
397
- Y: Rr,
398
- Z: Hr,
399
- "%": Xe
400
- }, G = {
401
- a: Rt,
402
- A: Lt,
403
- b: Ht,
404
- B: It,
405
- c: At,
406
- d: Ge,
407
- e: Ge,
408
- f: Zn,
409
- g: qe,
410
- G: ze,
411
- H: Ne,
412
- I: Ne,
413
- j: qn,
414
- L: jn,
415
- m: zn,
416
- M: Gn,
417
- p: ce,
418
- q: Vn,
419
- Q: Qn,
420
- s: Jn,
421
- S: Nn,
422
- u: Wn,
423
- U: $n,
424
- V: Yn,
425
- w: On,
426
- W: _n,
427
- x: Pt,
428
- X: kt,
429
- y: qe,
430
- Y: ze,
431
- Z: Bn,
432
- "%": Xn
433
- };
434
- A.x = f(n, A), A.X = f(r, A), A.c = f(t, A), P.x = f(n, P), P.X = f(r, P), P.c = f(t, P);
435
- function f(l, y) {
436
- return function(p) {
437
- var u = [], E = -1, S = 0, F = l.length, R, N, ke;
438
- for (p instanceof Date || (p = /* @__PURE__ */ new Date(+p)); ++E < F; )
439
- l.charCodeAt(E) === 37 && (u.push(l.slice(S, E)), (N = Ve[R = l.charAt(++E)]) != null ? R = l.charAt(++E) : N = R === "e" ? " " : "0", (ke = y[R]) && (R = ke(p, N)), u.push(R), S = E + 1);
440
- return u.push(l.slice(S, E)), u.join("");
441
- };
442
- }
443
- function C(l, y) {
444
- return function(p) {
445
- var u = oe(1900, void 0, 1), E = O(u, l, p += "", 0), S, F;
446
- if (E != p.length) return null;
447
- if ("Q" in u) return new Date(u.Q);
448
- if ("s" in u) return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
449
- if (y && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) {
450
- if (u.V < 1 || u.V > 53) return null;
451
- "w" in u || (u.w = 1), "Z" in u ? (S = xe(oe(u.y, 0, 1)), F = S.getUTCDay(), S = F > 4 || F === 0 ? he.ceil(S) : he(S), S = Le.offset(S, (u.V - 1) * 7), u.y = S.getUTCFullYear(), u.m = S.getUTCMonth(), u.d = S.getUTCDate() + (u.w + 6) % 7) : (S = Me(oe(u.y, 0, 1)), F = S.getDay(), S = F > 4 || F === 0 ? fe.ceil(S) : fe(S), S = ue.offset(S, (u.V - 1) * 7), u.y = S.getFullYear(), u.m = S.getMonth(), u.d = S.getDate() + (u.w + 6) % 7);
452
- } else ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), F = "Z" in u ? xe(oe(u.y, 0, 1)).getUTCDay() : Me(oe(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (F + 5) % 7 : u.w + u.U * 7 - (F + 6) % 7);
453
- return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, xe(u)) : Me(u);
454
- };
455
- }
456
- function O(l, y, p, u) {
457
- for (var E = 0, S = y.length, F = p.length, R, N; E < S; ) {
458
- if (u >= F) return -1;
459
- if (R = y.charCodeAt(E++), R === 37) {
460
- if (R = y.charAt(E++), N = G[R in Ve ? y.charAt(E++) : R], !N || (u = N(l, p, u)) < 0) return -1;
461
- } else if (R != p.charCodeAt(u++))
462
- return -1;
463
- }
464
- return u;
465
- }
466
- function ce(l, y, p) {
467
- var u = h.exec(y.slice(p));
468
- return u ? (l.p = m.get(u[0].toLowerCase()), p + u[0].length) : -1;
469
- }
470
- function Rt(l, y, p) {
471
- var u = T.exec(y.slice(p));
472
- return u ? (l.w = M.get(u[0].toLowerCase()), p + u[0].length) : -1;
473
- }
474
- function Lt(l, y, p) {
475
- var u = d.exec(y.slice(p));
476
- return u ? (l.w = g.get(u[0].toLowerCase()), p + u[0].length) : -1;
477
- }
478
- function Ht(l, y, p) {
479
- var u = k.exec(y.slice(p));
480
- return u ? (l.m = Q.get(u[0].toLowerCase()), p + u[0].length) : -1;
481
- }
482
- function It(l, y, p) {
483
- var u = U.exec(y.slice(p));
484
- return u ? (l.m = I.get(u[0].toLowerCase()), p + u[0].length) : -1;
485
- }
486
- function At(l, y, p) {
487
- return O(l, t, y, p);
488
- }
489
- function Pt(l, y, p) {
490
- return O(l, n, y, p);
491
- }
492
- function kt(l, y, p) {
493
- return O(l, r, y, p);
494
- }
495
- function Ot(l) {
496
- return s[l.getDay()];
497
- }
498
- function Wt(l) {
499
- return i[l.getDay()];
500
- }
501
- function $t(l) {
502
- return c[l.getMonth()];
503
- }
504
- function Yt(l) {
505
- return a[l.getMonth()];
506
- }
507
- function _t(l) {
508
- return o[+(l.getHours() >= 12)];
509
- }
510
- function Bt(l) {
511
- return 1 + ~~(l.getMonth() / 3);
512
- }
513
- function Vt(l) {
514
- return s[l.getUTCDay()];
515
- }
516
- function zt(l) {
517
- return i[l.getUTCDay()];
518
- }
519
- function qt(l) {
520
- return c[l.getUTCMonth()];
521
- }
522
- function Gt(l) {
523
- return a[l.getUTCMonth()];
524
- }
525
- function Nt(l) {
526
- return o[+(l.getUTCHours() >= 12)];
527
- }
528
- function jt(l) {
529
- return 1 + ~~(l.getUTCMonth() / 3);
530
- }
531
- return {
532
- format: function(l) {
533
- var y = f(l += "", A);
534
- return y.toString = function() {
535
- return l;
536
- }, y;
537
- },
538
- parse: function(l) {
539
- var y = C(l += "", !1);
540
- return y.toString = function() {
541
- return l;
542
- }, y;
543
- },
544
- utcFormat: function(l) {
545
- var y = f(l += "", P);
546
- return y.toString = function() {
547
- return l;
548
- }, y;
549
- },
550
- utcParse: function(l) {
551
- var y = C(l += "", !0);
552
- return y.toString = function() {
553
- return l;
554
- }, y;
555
- }
556
- };
557
- }
558
- var Ve = { "-": "", _: " ", 0: "0" }, b = /^\s*\d+/, An = /^%/, Pn = /[\\^$*+?|[\]().{}]/g;
559
- function w(e, t, n) {
560
- var r = e < 0 ? "-" : "", o = (r ? -e : e) + "", i = o.length;
561
- return r + (i < n ? new Array(n - i + 1).join(t) + o : o);
562
- }
563
- function kn(e) {
564
- return e.replace(Pn, "\\$&");
565
- }
566
- function se(e) {
567
- return new RegExp("^(?:" + e.map(kn).join("|") + ")", "i");
568
- }
569
- function ae(e) {
570
- return new Map(e.map((t, n) => [t.toLowerCase(), n]));
571
- }
572
- function On(e, t, n) {
573
- var r = b.exec(t.slice(n, n + 1));
574
- return r ? (e.w = +r[0], n + r[0].length) : -1;
575
- }
576
- function Wn(e, t, n) {
577
- var r = b.exec(t.slice(n, n + 1));
578
- return r ? (e.u = +r[0], n + r[0].length) : -1;
579
- }
580
- function $n(e, t, n) {
581
- var r = b.exec(t.slice(n, n + 2));
582
- return r ? (e.U = +r[0], n + r[0].length) : -1;
583
- }
584
- function Yn(e, t, n) {
585
- var r = b.exec(t.slice(n, n + 2));
586
- return r ? (e.V = +r[0], n + r[0].length) : -1;
587
- }
588
- function _n(e, t, n) {
589
- var r = b.exec(t.slice(n, n + 2));
590
- return r ? (e.W = +r[0], n + r[0].length) : -1;
591
- }
592
- function ze(e, t, n) {
593
- var r = b.exec(t.slice(n, n + 4));
594
- return r ? (e.y = +r[0], n + r[0].length) : -1;
595
- }
596
- function qe(e, t, n) {
597
- var r = b.exec(t.slice(n, n + 2));
598
- return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
599
- }
600
- function Bn(e, t, n) {
601
- var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
602
- return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
603
- }
604
- function Vn(e, t, n) {
605
- var r = b.exec(t.slice(n, n + 1));
606
- return r ? (e.q = r[0] * 3 - 3, n + r[0].length) : -1;
607
- }
608
- function zn(e, t, n) {
609
- var r = b.exec(t.slice(n, n + 2));
610
- return r ? (e.m = r[0] - 1, n + r[0].length) : -1;
611
- }
612
- function Ge(e, t, n) {
613
- var r = b.exec(t.slice(n, n + 2));
614
- return r ? (e.d = +r[0], n + r[0].length) : -1;
615
- }
616
- function qn(e, t, n) {
617
- var r = b.exec(t.slice(n, n + 3));
618
- return r ? (e.m = 0, e.d = +r[0], n + r[0].length) : -1;
619
- }
620
- function Ne(e, t, n) {
621
- var r = b.exec(t.slice(n, n + 2));
622
- return r ? (e.H = +r[0], n + r[0].length) : -1;
623
- }
624
- function Gn(e, t, n) {
625
- var r = b.exec(t.slice(n, n + 2));
626
- return r ? (e.M = +r[0], n + r[0].length) : -1;
627
- }
628
- function Nn(e, t, n) {
629
- var r = b.exec(t.slice(n, n + 2));
630
- return r ? (e.S = +r[0], n + r[0].length) : -1;
631
- }
632
- function jn(e, t, n) {
633
- var r = b.exec(t.slice(n, n + 3));
634
- return r ? (e.L = +r[0], n + r[0].length) : -1;
635
- }
636
- function Zn(e, t, n) {
637
- var r = b.exec(t.slice(n, n + 6));
638
- return r ? (e.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
639
- }
640
- function Xn(e, t, n) {
641
- var r = An.exec(t.slice(n, n + 1));
642
- return r ? n + r[0].length : -1;
643
- }
644
- function Qn(e, t, n) {
645
- var r = b.exec(t.slice(n));
646
- return r ? (e.Q = +r[0], n + r[0].length) : -1;
647
- }
648
- function Jn(e, t, n) {
649
- var r = b.exec(t.slice(n));
650
- return r ? (e.s = +r[0], n + r[0].length) : -1;
651
- }
652
- function je(e, t) {
653
- return w(e.getDate(), t, 2);
654
- }
655
- function Kn(e, t) {
656
- return w(e.getHours(), t, 2);
657
- }
658
- function er(e, t) {
659
- return w(e.getHours() % 12 || 12, t, 2);
660
- }
661
- function tr(e, t) {
662
- return w(1 + ue.count(_(e), e), t, 3);
663
- }
664
- function lt(e, t) {
665
- return w(e.getMilliseconds(), t, 3);
666
- }
667
- function nr(e, t) {
668
- return lt(e, t) + "000";
669
- }
670
- function rr(e, t) {
671
- return w(e.getMonth() + 1, t, 2);
672
- }
673
- function ir(e, t) {
674
- return w(e.getMinutes(), t, 2);
675
- }
676
- function or(e, t) {
677
- return w(e.getSeconds(), t, 2);
678
- }
679
- function sr(e) {
680
- var t = e.getDay();
681
- return t === 0 ? 7 : t;
682
- }
683
- function ar(e, t) {
684
- return w(de.count(_(e) - 1, e), t, 2);
685
- }
686
- function ft(e) {
687
- var t = e.getDay();
688
- return t >= 4 || t === 0 ? ne(e) : ne.ceil(e);
689
- }
690
- function ur(e, t) {
691
- return e = ft(e), w(ne.count(_(e), e) + (_(e).getDay() === 4), t, 2);
692
- }
693
- function cr(e) {
694
- return e.getDay();
695
- }
696
- function lr(e, t) {
697
- return w(fe.count(_(e) - 1, e), t, 2);
698
- }
699
- function fr(e, t) {
700
- return w(e.getFullYear() % 100, t, 2);
701
- }
702
- function hr(e, t) {
703
- return e = ft(e), w(e.getFullYear() % 100, t, 2);
704
- }
705
- function gr(e, t) {
706
- return w(e.getFullYear() % 1e4, t, 4);
707
- }
708
- function mr(e, t) {
709
- var n = e.getDay();
710
- return e = n >= 4 || n === 0 ? ne(e) : ne.ceil(e), w(e.getFullYear() % 1e4, t, 4);
711
- }
712
- function dr(e) {
713
- var t = e.getTimezoneOffset();
714
- return (t > 0 ? "-" : (t *= -1, "+")) + w(t / 60 | 0, "0", 2) + w(t % 60, "0", 2);
715
- }
716
- function Ze(e, t) {
717
- return w(e.getUTCDate(), t, 2);
718
- }
719
- function yr(e, t) {
720
- return w(e.getUTCHours(), t, 2);
721
- }
722
- function pr(e, t) {
723
- return w(e.getUTCHours() % 12 || 12, t, 2);
724
- }
725
- function wr(e, t) {
726
- return w(1 + Le.count(j(e), e), t, 3);
727
- }
728
- function ht(e, t) {
729
- return w(e.getUTCMilliseconds(), t, 3);
730
- }
731
- function Tr(e, t) {
732
- return ht(e, t) + "000";
733
- }
734
- function Sr(e, t) {
735
- return w(e.getUTCMonth() + 1, t, 2);
736
- }
737
- function Cr(e, t) {
738
- return w(e.getUTCMinutes(), t, 2);
739
- }
740
- function Mr(e, t) {
741
- return w(e.getUTCSeconds(), t, 2);
742
- }
743
- function xr(e) {
744
- var t = e.getUTCDay();
745
- return t === 0 ? 7 : t;
746
- }
747
- function br(e, t) {
748
- return w(ct.count(j(e) - 1, e), t, 2);
749
- }
750
- function gt(e) {
751
- var t = e.getUTCDay();
752
- return t >= 4 || t === 0 ? re(e) : re.ceil(e);
753
- }
754
- function Dr(e, t) {
755
- return e = gt(e), w(re.count(j(e), e) + (j(e).getUTCDay() === 4), t, 2);
756
- }
757
- function Er(e) {
758
- return e.getUTCDay();
759
- }
760
- function vr(e, t) {
761
- return w(he.count(j(e) - 1, e), t, 2);
762
- }
763
- function Ur(e, t) {
764
- return w(e.getUTCFullYear() % 100, t, 2);
765
- }
766
- function Fr(e, t) {
767
- return e = gt(e), w(e.getUTCFullYear() % 100, t, 2);
768
- }
769
- function Rr(e, t) {
770
- return w(e.getUTCFullYear() % 1e4, t, 4);
771
- }
772
- function Lr(e, t) {
773
- var n = e.getUTCDay();
774
- return e = n >= 4 || n === 0 ? re(e) : re.ceil(e), w(e.getUTCFullYear() % 1e4, t, 4);
775
- }
776
- function Hr() {
777
- return "+0000";
778
- }
779
- function Xe() {
780
- return "%";
781
- }
782
- function Qe(e) {
783
- return +e;
784
- }
785
- function Je(e) {
786
- return Math.floor(+e / 1e3);
787
- }
788
- var J, mt;
789
- Ir({
790
- dateTime: "%x, %X",
791
- date: "%-m/%-d/%Y",
792
- time: "%-I:%M:%S %p",
793
- periods: ["AM", "PM"],
794
- days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
795
- shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
796
- months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
797
- shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
798
- });
799
- function Ir(e) {
800
- return J = In(e), mt = J.format, J.parse, J.utcFormat, J.utcParse, J;
801
- }
802
- function Ar(e) {
803
- return new Date(e);
804
- }
805
- function Pr(e) {
806
- return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
807
- }
808
- function dt(e, t, n, r, o, i, s, a, c, h) {
809
- var m = en(), d = m.invert, g = m.domain, T = h(".%L"), M = h(":%S"), U = h("%I:%M"), I = h("%I %p"), k = h("%a %d"), Q = h("%b %d"), A = h("%B"), P = h("%Y");
810
- function G(f) {
811
- return (c(f) < f ? T : a(f) < f ? M : s(f) < f ? U : i(f) < f ? I : r(f) < f ? o(f) < f ? k : Q : n(f) < f ? A : P)(f);
812
- }
813
- return m.invert = function(f) {
814
- return new Date(d(f));
815
- }, m.domain = function(f) {
816
- return arguments.length ? g(Array.from(f, Pr)) : g().map(Ar);
817
- }, m.ticks = function(f) {
818
- var C = g();
819
- return e(C[0], C[C.length - 1], f ?? 10);
820
- }, m.tickFormat = function(f, C) {
821
- return C == null ? G : h(C);
822
- }, m.nice = function(f) {
823
- var C = g();
824
- return (!f || typeof f.range != "function") && (f = t(C[0], C[C.length - 1], f ?? 10)), f ? g(pn(C, f)) : m;
825
- }, m.copy = function() {
826
- return tn(m, dt(e, t, n, r, o, i, s, a, c, h));
827
- }, m;
828
- }
829
- function Ai() {
830
- return ut.apply(dt(Ln, Hn, _, He, de, ue, Re, Fe, te, mt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
831
- }
832
- const Pi = Math.abs, ki = Math.atan2, Oi = Math.cos, Wi = Math.max, $i = Math.min, Yi = Math.sin, _i = Math.sqrt, Bi = 1e-12, Ie = Math.PI, Ke = Ie / 2, Vi = 2 * Ie;
833
- function zi(e) {
834
- return e > 1 ? 0 : e < -1 ? Ie : Math.acos(e);
835
- }
836
- function qi(e) {
837
- return e >= 1 ? Ke : e <= -1 ? -Ke : Math.asin(e);
838
- }
839
- function yt(e) {
840
- this._context = e;
841
- }
842
- yt.prototype = {
843
- areaStart: function() {
844
- this._line = 0;
845
- },
846
- areaEnd: function() {
847
- this._line = NaN;
848
- },
849
- lineStart: function() {
850
- this._point = 0;
851
- },
852
- lineEnd: function() {
853
- (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
854
- },
855
- point: function(e, t) {
856
- switch (e = +e, t = +t, this._point) {
857
- case 0:
858
- this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
859
- break;
860
- case 1:
861
- this._point = 2;
862
- // falls through
863
- default:
864
- this._context.lineTo(e, t);
865
- break;
866
- }
867
- }
868
- };
869
- function Gi(e) {
870
- return new yt(e);
871
- }
872
- function et() {
873
- }
874
- function pt(e) {
875
- this._context = e;
876
- }
877
- pt.prototype = {
878
- areaStart: et,
879
- areaEnd: et,
880
- lineStart: function() {
881
- this._point = 0;
882
- },
883
- lineEnd: function() {
884
- this._point && this._context.closePath();
885
- },
886
- point: function(e, t) {
887
- e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
888
- }
889
- };
890
- function Ni(e) {
891
- return new pt(e);
892
- }
893
- function kr(e, t) {
894
- if (e.match(/^[a-z]+:\/\//i))
895
- return e;
896
- if (e.match(/^\/\//))
897
- return window.location.protocol + e;
898
- if (e.match(/^[a-z]+:/i))
899
- return e;
900
- const n = document.implementation.createHTMLDocument(), r = n.createElement("base"), o = n.createElement("a");
901
- return n.head.appendChild(r), n.body.appendChild(o), t && (r.href = t), o.href = e, o.href;
902
- }
903
- const Or = /* @__PURE__ */ (() => {
904
- let e = 0;
905
- const t = () => (
906
- // eslint-disable-next-line no-bitwise
907
- `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4)
908
- );
909
- return () => (e += 1, `u${t()}${e}`);
910
- })();
911
- function q(e) {
912
- const t = [];
913
- for (let n = 0, r = e.length; n < r; n++)
914
- t.push(e[n]);
915
- return t;
916
- }
917
- let K = null;
918
- function wt(e = {}) {
919
- return K || (e.includeStyleProperties ? (K = e.includeStyleProperties, K) : (K = q(window.getComputedStyle(document.documentElement)), K));
920
- }
921
- function ge(e, t) {
922
- const r = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
923
- return r ? parseFloat(r.replace("px", "")) : 0;
924
- }
925
- function Wr(e) {
926
- const t = ge(e, "border-left-width"), n = ge(e, "border-right-width");
927
- return e.clientWidth + t + n;
928
- }
929
- function $r(e) {
930
- const t = ge(e, "border-top-width"), n = ge(e, "border-bottom-width");
931
- return e.clientHeight + t + n;
932
- }
933
- function Tt(e, t = {}) {
934
- const n = t.width || Wr(e), r = t.height || $r(e);
935
- return { width: n, height: r };
936
- }
937
- function Yr() {
938
- let e, t;
939
- try {
940
- t = process;
941
- } catch {
942
- }
943
- const n = t && t.env ? t.env.devicePixelRatio : null;
944
- return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
945
- }
946
- const L = 16384;
947
- function _r(e) {
948
- (e.width > L || e.height > L) && (e.width > L && e.height > L ? e.width > e.height ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L) : e.width > L ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L));
949
- }
950
- function me(e) {
951
- return new Promise((t, n) => {
952
- const r = new Image();
953
- r.onload = () => {
954
- r.decode().then(() => {
955
- requestAnimationFrame(() => t(r));
956
- });
957
- }, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
958
- });
959
- }
960
- async function Br(e) {
961
- return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
962
- }
963
- async function Vr(e, t, n) {
964
- const r = "http://www.w3.org/2000/svg", o = document.createElementNS(r, "svg"), i = document.createElementNS(r, "foreignObject");
965
- return o.setAttribute("width", `${t}`), o.setAttribute("height", `${n}`), o.setAttribute("viewBox", `0 0 ${t} ${n}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), o.appendChild(i), i.appendChild(e), Br(o);
966
- }
967
- const v = (e, t) => {
968
- if (e instanceof t)
969
- return !0;
970
- const n = Object.getPrototypeOf(e);
971
- return n === null ? !1 : n.constructor.name === t.name || v(n, t);
972
- };
973
- function zr(e) {
974
- const t = e.getPropertyValue("content");
975
- return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
976
- }
977
- function qr(e, t) {
978
- return wt(t).map((n) => {
979
- const r = e.getPropertyValue(n), o = e.getPropertyPriority(n);
980
- return `${n}: ${r}${o ? " !important" : ""};`;
981
- }).join(" ");
982
- }
983
- function Gr(e, t, n, r) {
984
- const o = `.${e}:${t}`, i = n.cssText ? zr(n) : qr(n, r);
985
- return document.createTextNode(`${o}{${i}}`);
986
- }
987
- function tt(e, t, n, r) {
988
- const o = window.getComputedStyle(e, n), i = o.getPropertyValue("content");
989
- if (i === "" || i === "none")
990
- return;
991
- const s = Or();
992
- try {
993
- t.className = `${t.className} ${s}`;
994
- } catch {
995
- return;
996
- }
997
- const a = document.createElement("style");
998
- a.appendChild(Gr(s, n, o, r)), t.appendChild(a);
999
- }
1000
- function Nr(e, t, n) {
1001
- tt(e, t, ":before", n), tt(e, t, ":after", n);
1002
- }
1003
- const nt = "application/font-woff", rt = "image/jpeg", jr = {
1004
- woff: nt,
1005
- woff2: nt,
1006
- ttf: "application/font-truetype",
1007
- eot: "application/vnd.ms-fontobject",
1008
- png: "image/png",
1009
- jpg: rt,
1010
- jpeg: rt,
1011
- gif: "image/gif",
1012
- tiff: "image/tiff",
1013
- svg: "image/svg+xml",
1014
- webp: "image/webp"
1015
- };
1016
- function Zr(e) {
1017
- const t = /\.([^./]*?)$/g.exec(e);
1018
- return t ? t[1] : "";
1019
- }
1020
- function Ae(e) {
1021
- const t = Zr(e).toLowerCase();
1022
- return jr[t] || "";
1023
- }
1024
- function Xr(e) {
1025
- return e.split(/,/)[1];
1026
- }
1027
- function Ee(e) {
1028
- return e.search(/^(data:)/) !== -1;
1029
- }
1030
- function Qr(e, t) {
1031
- return `data:${t};base64,${e}`;
1032
- }
1033
- async function St(e, t, n) {
1034
- const r = await fetch(e, t);
1035
- if (r.status === 404)
1036
- throw new Error(`Resource "${r.url}" not found`);
1037
- const o = await r.blob();
1038
- return new Promise((i, s) => {
1039
- const a = new FileReader();
1040
- a.onerror = s, a.onloadend = () => {
1041
- try {
1042
- i(n({ res: r, result: a.result }));
1043
- } catch (c) {
1044
- s(c);
1045
- }
1046
- }, a.readAsDataURL(o);
1047
- });
1048
- }
1049
- const be = {};
1050
- function Jr(e, t, n) {
1051
- let r = e.replace(/\?.*/, "");
1052
- return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
1053
- }
1054
- async function Pe(e, t, n) {
1055
- const r = Jr(e, t, n.includeQueryParams);
1056
- if (be[r] != null)
1057
- return be[r];
1058
- n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
1059
- let o;
1060
- try {
1061
- const i = await St(e, n.fetchRequestInit, ({ res: s, result: a }) => (t || (t = s.headers.get("Content-Type") || ""), Xr(a)));
1062
- o = Qr(i, t);
1063
- } catch (i) {
1064
- o = n.imagePlaceholder || "";
1065
- let s = `Failed to fetch resource: ${e}`;
1066
- i && (s = typeof i == "string" ? i : i.message), s && console.warn(s);
1067
- }
1068
- return be[r] = o, o;
1069
- }
1070
- async function Kr(e) {
1071
- const t = e.toDataURL();
1072
- return t === "data:," ? e.cloneNode(!1) : me(t);
1073
- }
1074
- async function ei(e, t) {
1075
- if (e.currentSrc) {
1076
- const i = document.createElement("canvas"), s = i.getContext("2d");
1077
- i.width = e.clientWidth, i.height = e.clientHeight, s == null || s.drawImage(e, 0, 0, i.width, i.height);
1078
- const a = i.toDataURL();
1079
- return me(a);
1080
- }
1081
- const n = e.poster, r = Ae(n), o = await Pe(n, r, t);
1082
- return me(o);
1083
- }
1084
- async function ti(e, t) {
1085
- var n;
1086
- try {
1087
- if (!((n = e == null ? void 0 : e.contentDocument) === null || n === void 0) && n.body)
1088
- return await ye(e.contentDocument.body, t, !0);
1089
- } catch {
1090
- }
1091
- return e.cloneNode(!1);
1092
- }
1093
- async function ni(e, t) {
1094
- return v(e, HTMLCanvasElement) ? Kr(e) : v(e, HTMLVideoElement) ? ei(e, t) : v(e, HTMLIFrameElement) ? ti(e, t) : e.cloneNode(Ct(e));
1095
- }
1096
- const ri = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Ct = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
1097
- async function ii(e, t, n) {
1098
- var r, o;
1099
- if (Ct(t))
1100
- return t;
1101
- let i = [];
1102
- return ri(e) && e.assignedNodes ? i = q(e.assignedNodes()) : v(e, HTMLIFrameElement) && (!((r = e.contentDocument) === null || r === void 0) && r.body) ? i = q(e.contentDocument.body.childNodes) : i = q(((o = e.shadowRoot) !== null && o !== void 0 ? o : e).childNodes), i.length === 0 || v(e, HTMLVideoElement) || await i.reduce((s, a) => s.then(() => ye(a, n)).then((c) => {
1103
- c && t.appendChild(c);
1104
- }), Promise.resolve()), t;
1105
- }
1106
- function oi(e, t, n) {
1107
- const r = t.style;
1108
- if (!r)
1109
- return;
1110
- const o = window.getComputedStyle(e);
1111
- o.cssText ? (r.cssText = o.cssText, r.transformOrigin = o.transformOrigin) : wt(n).forEach((i) => {
1112
- let s = o.getPropertyValue(i);
1113
- i === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), v(e, HTMLIFrameElement) && i === "display" && s === "inline" && (s = "block"), i === "d" && t.getAttribute("d") && (s = `path(${t.getAttribute("d")})`), r.setProperty(i, s, o.getPropertyPriority(i));
1114
- });
1115
- }
1116
- function si(e, t) {
1117
- v(e, HTMLTextAreaElement) && (t.innerHTML = e.value), v(e, HTMLInputElement) && t.setAttribute("value", e.value);
1118
- }
1119
- function ai(e, t) {
1120
- if (v(e, HTMLSelectElement)) {
1121
- const n = t, r = Array.from(n.children).find((o) => e.value === o.getAttribute("value"));
1122
- r && r.setAttribute("selected", "");
1123
- }
1124
- }
1125
- function ui(e, t, n) {
1126
- return v(t, Element) && (oi(e, t, n), Nr(e, t, n), si(e, t), ai(e, t)), t;
1127
- }
1128
- async function ci(e, t) {
1129
- const n = e.querySelectorAll ? e.querySelectorAll("use") : [];
1130
- if (n.length === 0)
1131
- return e;
1132
- const r = {};
1133
- for (let i = 0; i < n.length; i++) {
1134
- const a = n[i].getAttribute("xlink:href");
1135
- if (a) {
1136
- const c = e.querySelector(a), h = document.querySelector(a);
1137
- !c && h && !r[a] && (r[a] = await ye(h, t, !0));
1138
- }
1139
- }
1140
- const o = Object.values(r);
1141
- if (o.length) {
1142
- const i = "http://www.w3.org/1999/xhtml", s = document.createElementNS(i, "svg");
1143
- s.setAttribute("xmlns", i), s.style.position = "absolute", s.style.width = "0", s.style.height = "0", s.style.overflow = "hidden", s.style.display = "none";
1144
- const a = document.createElementNS(i, "defs");
1145
- s.appendChild(a);
1146
- for (let c = 0; c < o.length; c++)
1147
- a.appendChild(o[c]);
1148
- e.appendChild(s);
1149
- }
1150
- return e;
1151
- }
1152
- async function ye(e, t, n) {
1153
- return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((r) => ni(r, t)).then((r) => ii(e, r, t)).then((r) => ui(e, r, t)).then((r) => ci(r, t));
1154
- }
1155
- const Mt = /url\((['"]?)([^'"]+?)\1\)/g, li = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, fi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
1156
- function hi(e) {
1157
- const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
1158
- return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
1159
- }
1160
- function gi(e) {
1161
- const t = [];
1162
- return e.replace(Mt, (n, r, o) => (t.push(o), n)), t.filter((n) => !Ee(n));
1163
- }
1164
- async function mi(e, t, n, r, o) {
1165
- try {
1166
- const i = n ? kr(t, n) : t, s = Ae(t);
1167
- let a;
1168
- return o || (a = await Pe(i, s, r)), e.replace(hi(t), `$1${a}$3`);
1169
- } catch {
1170
- }
1171
- return e;
1172
- }
1173
- function di(e, { preferredFontFormat: t }) {
1174
- return t ? e.replace(fi, (n) => {
1175
- for (; ; ) {
1176
- const [r, , o] = li.exec(n) || [];
1177
- if (!o)
1178
- return "";
1179
- if (o === t)
1180
- return `src: ${r};`;
1181
- }
1182
- }) : e;
1183
- }
1184
- function xt(e) {
1185
- return e.search(Mt) !== -1;
1186
- }
1187
- async function bt(e, t, n) {
1188
- if (!xt(e))
1189
- return e;
1190
- const r = di(e, n);
1191
- return gi(r).reduce((i, s) => i.then((a) => mi(a, s, t, n)), Promise.resolve(r));
1192
- }
1193
- async function ee(e, t, n) {
1194
- var r;
1195
- const o = (r = t.style) === null || r === void 0 ? void 0 : r.getPropertyValue(e);
1196
- if (o) {
1197
- const i = await bt(o, null, n);
1198
- return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
1199
- }
1200
- return !1;
1201
- }
1202
- async function yi(e, t) {
1203
- await ee("background", e, t) || await ee("background-image", e, t), await ee("mask", e, t) || await ee("-webkit-mask", e, t) || await ee("mask-image", e, t) || await ee("-webkit-mask-image", e, t);
1204
- }
1205
- async function pi(e, t) {
1206
- const n = v(e, HTMLImageElement);
1207
- if (!(n && !Ee(e.src)) && !(v(e, SVGImageElement) && !Ee(e.href.baseVal)))
1208
- return;
1209
- const r = n ? e.src : e.href.baseVal, o = await Pe(r, Ae(r), t);
1210
- await new Promise((i, s) => {
1211
- e.onload = i, e.onerror = t.onImageErrorHandler ? (...c) => {
1212
- try {
1213
- i(t.onImageErrorHandler(...c));
1214
- } catch (h) {
1215
- s(h);
1216
- }
1217
- } : s;
1218
- const a = e;
1219
- a.decode && (a.decode = i), a.loading === "lazy" && (a.loading = "eager"), n ? (e.srcset = "", e.src = o) : e.href.baseVal = o;
1220
- });
1221
- }
1222
- async function wi(e, t) {
1223
- const r = q(e.childNodes).map((o) => Dt(o, t));
1224
- await Promise.all(r).then(() => e);
1225
- }
1226
- async function Dt(e, t) {
1227
- v(e, Element) && (await yi(e, t), await pi(e, t), await wi(e, t));
1228
- }
1229
- function Ti(e, t) {
1230
- const { style: n } = e;
1231
- t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
1232
- const r = t.style;
1233
- return r != null && Object.keys(r).forEach((o) => {
1234
- n[o] = r[o];
1235
- }), e;
1236
- }
1237
- const it = {};
1238
- async function ot(e) {
1239
- let t = it[e];
1240
- if (t != null)
1241
- return t;
1242
- const r = await (await fetch(e)).text();
1243
- return t = { url: e, cssText: r }, it[e] = t, t;
1244
- }
1245
- async function st(e, t) {
1246
- let n = e.cssText;
1247
- const r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (s) => {
1248
- let a = s.replace(r, "$1");
1249
- return a.startsWith("https://") || (a = new URL(a, e.url).href), St(a, t.fetchRequestInit, ({ result: c }) => (n = n.replace(s, `url(${c})`), [s, c]));
1250
- });
1251
- return Promise.all(i).then(() => n);
1252
- }
1253
- function at(e) {
1254
- if (e == null)
1255
- return [];
1256
- const t = [], n = /(\/\*[\s\S]*?\*\/)/gi;
1257
- let r = e.replace(n, "");
1258
- const o = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
1259
- for (; ; ) {
1260
- const c = o.exec(r);
1261
- if (c === null)
1262
- break;
1263
- t.push(c[0]);
1264
- }
1265
- r = r.replace(o, "");
1266
- const i = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", a = new RegExp(s, "gi");
1267
- for (; ; ) {
1268
- let c = i.exec(r);
1269
- if (c === null) {
1270
- if (c = a.exec(r), c === null)
1271
- break;
1272
- i.lastIndex = a.lastIndex;
1273
- } else
1274
- a.lastIndex = i.lastIndex;
1275
- t.push(c[0]);
1276
- }
1277
- return t;
1278
- }
1279
- async function Si(e, t) {
1280
- const n = [], r = [];
1281
- return e.forEach((o) => {
1282
- if ("cssRules" in o)
1283
- try {
1284
- q(o.cssRules || []).forEach((i, s) => {
1285
- if (i.type === CSSRule.IMPORT_RULE) {
1286
- let a = s + 1;
1287
- const c = i.href, h = ot(c).then((m) => st(m, t)).then((m) => at(m).forEach((d) => {
1288
- try {
1289
- o.insertRule(d, d.startsWith("@import") ? a += 1 : o.cssRules.length);
1290
- } catch (g) {
1291
- console.error("Error inserting rule from remote css", {
1292
- rule: d,
1293
- error: g
1294
- });
1295
- }
1296
- })).catch((m) => {
1297
- console.error("Error loading remote css", m.toString());
1298
- });
1299
- r.push(h);
1300
- }
1301
- });
1302
- } catch (i) {
1303
- const s = e.find((a) => a.href == null) || document.styleSheets[0];
1304
- o.href != null && r.push(ot(o.href).then((a) => st(a, t)).then((a) => at(a).forEach((c) => {
1305
- s.insertRule(c, s.cssRules.length);
1306
- })).catch((a) => {
1307
- console.error("Error loading remote stylesheet", a);
1308
- })), console.error("Error inlining remote css file", i);
1309
- }
1310
- }), Promise.all(r).then(() => (e.forEach((o) => {
1311
- if ("cssRules" in o)
1312
- try {
1313
- q(o.cssRules || []).forEach((i) => {
1314
- n.push(i);
1315
- });
1316
- } catch (i) {
1317
- console.error(`Error while reading CSS rules from ${o.href}`, i);
1318
- }
1319
- }), n));
1320
- }
1321
- function Ci(e) {
1322
- return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => xt(t.style.getPropertyValue("src")));
1323
- }
1324
- async function Mi(e, t) {
1325
- if (e.ownerDocument == null)
1326
- throw new Error("Provided element is not within a Document");
1327
- const n = q(e.ownerDocument.styleSheets), r = await Si(n, t);
1328
- return Ci(r);
1329
- }
1330
- function Et(e) {
1331
- return e.trim().replace(/["']/g, "");
1332
- }
1333
- function xi(e) {
1334
- const t = /* @__PURE__ */ new Set();
1335
- function n(r) {
1336
- (r.style.fontFamily || getComputedStyle(r).fontFamily).split(",").forEach((i) => {
1337
- t.add(Et(i));
1338
- }), Array.from(r.children).forEach((i) => {
1339
- i instanceof HTMLElement && n(i);
1340
- });
1341
- }
1342
- return n(e), t;
1343
- }
1344
- async function bi(e, t) {
1345
- const n = await Mi(e, t), r = xi(e);
1346
- return (await Promise.all(n.filter((i) => r.has(Et(i.style.fontFamily))).map((i) => {
1347
- const s = i.parentStyleSheet ? i.parentStyleSheet.href : null;
1348
- return bt(i.cssText, s, t);
1349
- }))).join(`
1350
- `);
1351
- }
1352
- async function Di(e, t) {
1353
- const n = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await bi(e, t);
1354
- if (n) {
1355
- const r = document.createElement("style"), o = document.createTextNode(n);
1356
- r.appendChild(o), e.firstChild ? e.insertBefore(r, e.firstChild) : e.appendChild(r);
1357
- }
1358
- }
1359
- async function Ei(e, t = {}) {
1360
- const { width: n, height: r } = Tt(e, t), o = await ye(e, t, !0);
1361
- return await Di(o, t), await Dt(o, t), Ti(o, t), await Vr(o, n, r);
1362
- }
1363
- async function vt(e, t = {}) {
1364
- const { width: n, height: r } = Tt(e, t), o = await Ei(e, t), i = await me(o), s = document.createElement("canvas"), a = s.getContext("2d"), c = t.pixelRatio || Yr(), h = t.canvasWidth || n, m = t.canvasHeight || r;
1365
- return s.width = h * c, s.height = m * c, t.skipAutoScale || _r(s), s.style.width = `${h}`, s.style.height = `${m}`, t.backgroundColor && (a.fillStyle = t.backgroundColor, a.fillRect(0, 0, s.width, s.height)), a.drawImage(i, 0, 0, s.width, s.height), s;
1366
- }
1367
- async function vi(e, t = {}) {
1368
- return (await vt(e, t)).toDataURL();
1369
- }
1370
- async function Ui(e, t = {}) {
1371
- return (await vt(e, t)).toDataURL("image/jpeg", t.quality || 1);
1372
- }
1373
- class Ut {
1374
- constructor(t, n) {
1375
- this.model = t, this.services = n, this.init();
1376
- }
1377
- init() {
1378
- }
1379
- update() {
1380
- }
1381
- // Used to pass down information to the components
1382
- setModel(t) {
1383
- this.model = t;
1384
- }
1385
- // Used to pass down services to the components
1386
- setServices(t) {
1387
- this.services = t;
1388
- }
1389
- }
1390
- const Fi = "DONT_STYLE_ME_css_styles_verifier";
1391
- class ve extends Ut {
1392
- // initialized in initializeID() called by init()
1393
- constructor(t, n) {
1394
- super(t, n);
1395
- }
1396
- static getHTMLElementSize(t) {
1397
- return {
1398
- width: t.clientWidth,
1399
- height: t.clientHeight
1400
- };
1401
- }
1402
- static getSVGElementSize(t, n = {
1403
- useAttrs: !1,
1404
- useClientDimensions: !1,
1405
- useBBox: !1,
1406
- useBoundingRect: !1
1407
- }) {
1408
- t.attr || (t = D(t));
1409
- const r = {
1410
- width: 0,
1411
- height: 0
1412
- }, o = (g) => {
1413
- g && Object.keys(r).forEach((T) => {
1414
- if (g[T]) {
1415
- const M = g[T], U = parseFloat(M);
1416
- M && U > r[T] && ("" + M).indexOf("%") === -1 && (r[T] = U);
1417
- }
1418
- });
1419
- }, i = {
1420
- width: t.attr("width"),
1421
- height: t.attr("height")
1422
- }, s = t.node();
1423
- let a, c, h, m;
1424
- try {
1425
- typeof s.getBBox == "function" && (a = s.getBBox(), c = {
1426
- width: a.width,
1427
- height: a.height
1428
- });
1429
- } catch (g) {
1430
- console.error(g);
1431
- }
1432
- try {
1433
- typeof (s == null ? void 0 : s.getBoundingClientRect) == "function" && (h = s.getBoundingClientRect(), m = {
1434
- width: h.width,
1435
- height: h.height
1436
- });
1437
- } catch (g) {
1438
- console.error(g);
1439
- }
1440
- let d;
1441
- if (s instanceof SVGSVGElement && (d = {
1442
- width: s.clientWidth,
1443
- height: s.clientHeight
1444
- }), n) {
1445
- if (n.useAttrs && (o(i), r.width > 0 && r.height > 0))
1446
- return r;
1447
- if (n.useClientDimensions && (o(d), r.width > 0 && r.height > 0))
1448
- return d;
1449
- if (n.useBBox && (o(c), r.width > 0 && r.height > 0))
1450
- return c;
1451
- if (n.useBoundingRect && (o(m), r.width > 0 && r.height > 0))
1452
- return m;
1453
- }
1454
- try {
1455
- const g = {
1456
- width: ie(t.node(), "width", "baseVal", "value"),
1457
- height: ie(t.node(), "height", "baseVal", "value")
1458
- };
1459
- o(g);
1460
- } catch {
1461
- o(d), o(c), o(i);
1462
- }
1463
- return r;
1464
- }
1465
- static appendOrSelect(t, n) {
1466
- const r = t.select(`${n}`);
1467
- if (r.empty()) {
1468
- let o = n.split("#"), i, s;
1469
- return o.length === 2 ? (i = o[0], o = o[1].split("."), s = o[0]) : (o = n.split("."), i = o[0]), t.append(i).attr("id", s).attr("class", o.slice(1).join(" "));
1470
- }
1471
- return r;
1472
- }
1473
- init() {
1474
- this.initializeID(), this.styleHolderElement(), this.addMainContainer(), this.model.getOptions().resizable && this.addResizeListener(), this.addHolderListeners(), this.handleFullscreenChange();
1475
- }
1476
- getChartID() {
1477
- return this.chartID;
1478
- }
1479
- getElementOffset(t, n = !1) {
1480
- const r = { left: 0, top: 0 }, o = t.getBoundingClientRect(), i = n ? { left: 0, top: 0 } : this.getHolder().getBoundingClientRect();
1481
- try {
1482
- r.left = o.left - i.left, r.top = o.top - i.top;
1483
- } catch (s) {
1484
- console.error(s);
1485
- }
1486
- return r;
1487
- }
1488
- generateElementIDString(t) {
1489
- return `chart-${this.chartID}-${t}`;
1490
- }
1491
- initializeID() {
1492
- this.chartID = Math.floor((1 + Math.random()) * 281474976710656).toString(16);
1493
- }
1494
- addMainContainer() {
1495
- const t = this.model.getOptions(), n = ie(t, "style", "prefix"), r = D(this.getHolder()).append("div").classed(`${$e}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
1496
- r.append("g").attr("class", Fi), this.mainContainer = r.node();
1497
- }
1498
- update() {
1499
- this.styleHolderElement();
1500
- }
1501
- styleHolderElement() {
1502
- const t = this.getHolder(), { width: n, height: r, theme: o } = this.model.getOptions();
1503
- n !== this.width && (t.style.width = n, this.width = n), r !== this.height && (t.style.height = r, this.height = r), D(this.getHolder()).classed(`${$e}--chart-holder`, !0).attr("data-carbon-theme", o);
1504
- }
1505
- getHolder() {
1506
- return this.model.get("holder");
1507
- }
1508
- exportToJPG() {
1509
- const t = this, n = this.model.getOptions(), r = this.getHolder(), o = D(r);
1510
- o.classed("filled", !0), Ui(this.getMainContainer(), {
1511
- quality: 1,
1512
- // Remove toolbar
1513
- filter: (i) => !(i.classList && i.classList.contains("cds--cc--toolbar"))
1514
- }).then(function(i) {
1515
- var c;
1516
- let s = "myChart";
1517
- const a = ie(n, "fileDownload", "fileName");
1518
- typeof a == "function" ? s = a("jpg") : typeof a == "string" && (s = a), (c = t.services.files) == null || c.downloadImage(i, `${s}.jpg`), o.classed("filled", !1);
1519
- });
1520
- }
1521
- exportToPNG() {
1522
- const t = this, n = this.model.getOptions(), r = this.getHolder(), o = D(r);
1523
- o.classed("filled", !0), vi(this.getMainContainer(), {
1524
- quality: 1,
1525
- // Remove toolbar
1526
- filter: (i) => !(i.classList && i.classList.contains("cds--cc--toolbar"))
1527
- }).then(function(i) {
1528
- var c;
1529
- let s = "myChart";
1530
- const a = ie(n, "fileDownload", "fileName");
1531
- typeof a == "function" ? s = a("png") : typeof a == "string" && (s = a), (c = t.services.files) == null || c.downloadImage(i, `${s}.png`), o.classed("filled", !1);
1532
- }).catch(function(i) {
1533
- console.error("oops, something went wrong!", i);
1534
- });
1535
- }
1536
- isFullScreenMode() {
1537
- return D(this.getHolder()).classed("fullscreen");
1538
- }
1539
- toggleFullscreen() {
1540
- const t = this.getHolder();
1541
- D(t).classed("fullscreen") && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) ? document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen() : t.requestFullscreen ? t.requestFullscreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.msRequestFullscreen && t.msRequestFullscreen();
1542
- }
1543
- handleFullscreenChange() {
1544
- document.addEventListener("fullscreenchange", () => {
1545
- const t = D(this.getHolder()), n = t.classed("fullscreen");
1546
- t.classed("fullscreen", !n);
1547
- });
1548
- }
1549
- setSVGMaxHeight() {
1550
- if (!this.model.getOptions().height) {
1551
- const { height: t } = ve.getSVGElementSize(
1552
- D(this.mainContainer),
1553
- {
1554
- useBBox: !0
1555
- }
1556
- ), n = D(this.mainContainer).attr("class"), r = D(this.mainContainer).selectAll(`.${n} > svg`);
1557
- let o = 0;
1558
- r.nodes().forEach(function(i) {
1559
- o += Number(
1560
- ve.getSVGElementSize(D(i), {
1561
- useBBox: !0
1562
- }).height
1563
- );
1564
- }), o <= t ? D(this.mainContainer).attr("height", o) : D(this.mainContainer).attr("height", "100%");
1565
- }
1566
- }
1567
- getMainContainer() {
1568
- return this.mainContainer;
1569
- }
1570
- addHolderListeners() {
1571
- const t = this.getHolder();
1572
- t && D(t).on("mouseover", () => {
1573
- var n;
1574
- (n = this.services.events) == null || n.dispatchEvent(pe.Chart.MOUSEOVER);
1575
- }).on("mouseout", () => {
1576
- var n;
1577
- (n = this.services.events) == null || n.dispatchEvent(pe.Chart.MOUSEOUT);
1578
- });
1579
- }
1580
- addResizeListener() {
1581
- const t = this.getHolder();
1582
- if (!t)
1583
- return;
1584
- let n = t.clientWidth, r = t.clientHeight;
1585
- const o = mn(() => {
1586
- var s;
1587
- t && (Math.abs(n - t.clientWidth) > 1 || Math.abs(r - t.clientHeight) > 1) && (n = t.clientWidth, r = t.clientHeight, (s = this.services.events) == null || s.dispatchEvent(pe.Chart.RESIZE));
1588
- }, 12.5);
1589
- new ResizeObserver(o).observe(t);
1590
- }
1591
- }
1592
- class Ft extends Ut {
1593
- static appendOrUpdateLinearGradient(t) {
1594
- let n = t.svg.select(`defs linearGradient#${t.id}`);
1595
- n.empty() && (n = t.svg.append("defs").append("linearGradient").attr("id", t.id).attr("x1", t.x1).attr("x2", t.x2).attr("y1", t.y1).attr("y2", t.y2)), n.selectAll("stop").remove(), n.selectAll("stop").data(t.stops).enter().append("stop").attr("offset", (r) => r.offset).style("stop-color", (r) => r.color).style("stop-opacity", (r) => r.opacity);
1596
- }
1597
- static getOffsetRatio(t) {
1598
- return (Math.abs(t[1]) * 100 / Math.abs(t[0] - t[1])).toFixed(2) + "%";
1599
- }
1600
- static getStops(t, n) {
1601
- const r = t[0] < 0 && t[1] > 0;
1602
- let o = [
1603
- {
1604
- offset: "0%",
1605
- color: n,
1606
- opacity: "0.6"
1607
- },
1608
- {
1609
- offset: "80%",
1610
- color: n,
1611
- opacity: "0"
1612
- }
1613
- ];
1614
- return r && (o = [
1615
- {
1616
- offset: "0%",
1617
- color: n,
1618
- opacity: "0.6"
1619
- },
1620
- {
1621
- offset: Ft.getOffsetRatio(t),
1622
- color: n,
1623
- opacity: "0"
1624
- },
1625
- {
1626
- offset: "100%",
1627
- color: n,
1628
- opacity: "0.6"
1629
- }
1630
- ]), o;
1631
- }
1632
- }
1633
- function ji(e) {
1634
- const t = Ri(Li(e), 360);
1635
- return z(t, [0, 10]) || z(t, [350, 0]) ? {
1636
- textAnchor: V.START,
1637
- dominantBaseline: B.MIDDLE
1638
- } : z(t, [10, 80]) ? {
1639
- textAnchor: V.START,
1640
- dominantBaseline: B.HANGING
1641
- } : z(t, [80, 100]) ? {
1642
- textAnchor: V.MIDDLE,
1643
- dominantBaseline: B.HANGING
1644
- } : z(t, [100, 170]) ? {
1645
- textAnchor: V.END,
1646
- dominantBaseline: B.HANGING
1647
- } : z(t, [170, 190]) ? {
1648
- textAnchor: V.END,
1649
- dominantBaseline: B.MIDDLE
1650
- } : z(t, [190, 260]) ? {
1651
- textAnchor: V.END,
1652
- dominantBaseline: B.BASELINE
1653
- } : z(t, [260, 280]) ? {
1654
- textAnchor: V.MIDDLE,
1655
- dominantBaseline: B.BASELINE
1656
- } : {
1657
- textAnchor: V.START,
1658
- dominantBaseline: B.BASELINE
1659
- };
1660
- }
1661
- function Ri(e, t) {
1662
- return (e % t + t) % t;
1663
- }
1664
- function z(e, [t, n]) {
1665
- return e >= t && e <= n;
1666
- }
1667
- function Li(e) {
1668
- return e * (180 / Math.PI);
1669
- }
1670
- function Zi(e) {
1671
- return e * (Math.PI / 180);
1672
- }
1673
- function Xi(e, t, n = { x: 0, y: 0 }) {
1674
- const r = t * Math.cos(e) + n.x, o = t * Math.sin(e) + n.y;
1675
- return { x: isNaN(r) ? 0 : r, y: isNaN(o) ? 0 : o };
1676
- }
1677
- function Qi(e, t) {
1678
- return t * Math.sin(e - Math.PI / 2);
1679
- }
1680
- export {
1681
- et as A,
1682
- ve as D,
1683
- Ft as G,
1684
- Ut as S,
1685
- Qi as a,
1686
- Li as b,
1687
- Vi as c,
1688
- Zi as d,
1689
- Bi as e,
1690
- Oi as f,
1691
- Yi as g,
1692
- Ke as h,
1693
- Pi as i,
1694
- Ie as j,
1695
- _i as k,
1696
- ki as l,
1697
- $i as m,
1698
- qi as n,
1699
- zi as o,
1700
- Xi as p,
1701
- Wi as q,
1702
- ji as r,
1703
- D as s,
1704
- _e as t,
1705
- Gi as u,
1706
- Ai as v,
1707
- mn as w,
1708
- yn as x,
1709
- Ni as y,
1710
- pn as z
1711
- };
1712
- //# sourceMappingURL=angle-utils-CQDEbkP4.mjs.map