UNPKG

vue3-datamaps

Version:

It is a Vue 3 port of the [Vue port](https://github.com/Seungwoo321/vue-datamaps) of the javascript-based [DataMaps](https://datamaps.github.io/)

1,668 lines (1,667 loc) 6.52 MB
import { createElementBlock as S1, openBlock as g1, Fragment as F3, renderList as t0, createCommentVNode as y2, createElementVNode as n3, normalizeStyle as V2, toDisplayString as Ca, normalizeClass as D4, resolveComponent as m0, createBlock as h0, renderSlot as P0 } from "vue"; function c1(e, t) { return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN; } function Jt(e, t) { return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN; } function j5(e) { let t, r, n; e.length !== 2 ? (t = c1, r = (s, l) => c1(e(s), l), n = (s, l) => e(s) - l) : (t = e === c1 || e === Jt ? e : Na, r = e, n = e); function o(s, l, p = 0, c = s.length) { if (p < c) { if (t(l, l) !== 0) return c; do { const u = p + c >>> 1; r(s[u], l) < 0 ? p = u + 1 : c = u; } while (p < c); } return p; } function i(s, l, p = 0, c = s.length) { if (p < c) { if (t(l, l) !== 0) return c; do { const u = p + c >>> 1; r(s[u], l) <= 0 ? p = u + 1 : c = u; } while (p < c); } return p; } function a(s, l, p = 0, c = s.length) { const u = o(s, l, p, c - 1); return u > p && n(s[u - 1], l) > -n(s[u], l) ? u - 1 : u; } return { left: o, center: a, right: i }; } function Na() { return 0; } function Q0(e) { return e === null ? NaN : +e; } function* _a(e, t) { if (t === void 0) for (let r of e) r != null && (r = +r) >= r && (yield r); else { let r = -1; for (let n of e) (n = t(n, ++r, e)) != null && (n = +n) >= n && (yield n); } } const qt = j5(c1), j2 = qt.right, Ba = qt.left, wa = j5(Q0).center; function Ga(e, t) { if (!((t = +t) >= 0)) throw new RangeError("invalid r"); let r = e.length; if (!((r = Math.floor(r)) >= 0)) throw new RangeError("invalid length"); if (!r || !t) return e; const n = y8(t), o = e.slice(); return n(e, o, 0, r, 1), n(o, e, 0, r, 1), n(e, o, 0, r, 1), e; } const Xt = Qt(y8), Ra = Qt(ka); function Qt(e) { return function(t, r, n = r) { if (!((r = +r) >= 0)) throw new RangeError("invalid rx"); if (!((n = +n) >= 0)) throw new RangeError("invalid ry"); let { data: o, width: i, height: a } = t; if (!((i = Math.floor(i)) >= 0)) throw new RangeError("invalid width"); if (!((a = Math.floor(a !== void 0 ? a : o.length / i)) >= 0)) throw new RangeError("invalid height"); if (!i || !a || !r && !n) return t; const s = r && e(r), l = n && e(n), p = o.slice(); return s && l ? (N3(s, p, o, i, a), N3(s, o, p, i, a), N3(s, p, o, i, a), _3(l, o, p, i, a), _3(l, p, o, i, a), _3(l, o, p, i, a)) : s ? (N3(s, o, p, i, a), N3(s, p, o, i, a), N3(s, o, p, i, a)) : l && (_3(l, o, p, i, a), _3(l, p, o, i, a), _3(l, o, p, i, a)), t; }; } function N3(e, t, r, n, o) { for (let i = 0, a = n * o; i < a; ) e(t, r, i, i += n, 1); } function _3(e, t, r, n, o) { for (let i = 0, a = n * o; i < n; ++i) e(t, r, i, i + a, n); } function ka(e) { const t = y8(e); return (r, n, o, i, a) => { o <<= 2, i <<= 2, a <<= 2, t(r, n, o + 0, i + 0, a), t(r, n, o + 1, i + 1, a), t(r, n, o + 2, i + 2, a), t(r, n, o + 3, i + 3, a); }; } function y8(e) { const t = Math.floor(e); if (t === e) return Ea(e); const r = e - t, n = 2 * e + 1; return (o, i, a, s, l) => { if (!((s -= l) >= a)) return; let p = t * i[a]; const c = l * t, u = c + l; for (let y = a, d = a + c; y < d; y += l) p += i[Math.min(s, y)]; for (let y = a, d = s; y <= d; y += l) p += i[Math.min(s, y + c)], o[y] = (p + r * (i[Math.max(a, y - u)] + i[Math.min(s, y + u)])) / n, p -= i[Math.max(a, y - c)]; }; } function Ea(e) { const t = 2 * e + 1; return (r, n, o, i, a) => { if (!((i -= a) >= o)) return; let s = e * n[o]; const l = a * e; for (let p = o, c = o + l; p < c; p += a) s += n[Math.min(i, p)]; for (let p = o, c = i; p <= c; p += a) s += n[Math.min(i, p + l)], r[p] = s / t, s -= n[Math.max(o, p - l)]; }; } function F5(e, t) { let r = 0; if (t === void 0) for (let n of e) n != null && (n = +n) >= n && ++r; else { let n = -1; for (let o of e) (o = t(o, ++n, e)) != null && (o = +o) >= o && ++r; } return r; } function La(e) { return e.length | 0; } function Ia(e) { return !(e > 0); } function Ka(e) { return typeof e != "object" || "length" in e ? e : Array.from(e); } function Da(e) { return (t) => e(...t); } function xa(...e) { const t = typeof e[e.length - 1] == "function" && Da(e.pop()); e = e.map(Ka); const r = e.map(La), n = e.length - 1, o = new Array(n + 1).fill(0), i = []; if (n < 0 || r.some(Ia)) return i; for (; ; ) { i.push(o.map((s, l) => e[l][s])); let a = n; for (; ++o[a] === r[a]; ) { if (a === 0) return t ? i.map(t) : i; o[a--] = 0; } } } function Oa(e, t) { var r = 0, n = 0; return Float64Array.from(e, t === void 0 ? (o) => r += +o || 0 : (o) => r += +t(o, n++, e) || 0); } function er(e, t) { let r = 0, n, o = 0, i = 0; if (t === void 0) for (let a of e) a != null && (a = +a) >= a && (n = a - o, o += n / ++r, i += n * (a - o)); else { let a = -1; for (let s of e) (s = t(s, ++a, e)) != null && (s = +s) >= s && (n = s - o, o += n / ++r, i += n * (s - o)); } if (r > 1) return i / (r - 1); } function tr(e, t) { const r = er(e, t); return r && Math.sqrt(r); } function R4(e, t) { let r, n; if (t === void 0) for (const o of e) o != null && (r === void 0 ? o >= o && (r = n = o) : (r > o && (r = o), n < o && (n = o))); else { let o = -1; for (let i of e) (i = t(i, ++o, e)) != null && (r === void 0 ? i >= i && (r = n = i) : (r > i && (r = i), n < i && (n = i))); } return [r, n]; } class b1 { constructor() { this._partials = new Float64Array(32), this._n = 0; } add(t) { const r = this._partials; let n = 0; for (let o = 0; o < this._n && o < 32; o++) { const i = r[o], a = t + i, s = Math.abs(t) < Math.abs(i) ? t - (a - i) : i - (a - t); s && (r[n++] = s), t = a; } return r[n] = t, this._n = n + 1, this; } valueOf() { const t = this._partials; let r = this._n, n, o, i, a = 0; if (r > 0) { for (a = t[--r]; r > 0 && (n = a, o = t[--r], a = n + o, i = o - (a - n), !i); ) ; r > 0 && (i < 0 && t[r - 1] < 0 || i > 0 && t[r - 1] > 0) && (o = i * 2, n = a + o, o == n - a && (a = n)); } return a; } } function Ha(e, t) { const r = new b1(); if (t === void 0) for (let n of e) (n = +n) && r.add(n); else { let n = -1; for (let o of e) (o = +t(o, ++n, e)) && r.add(o); } return +r; } function Ua(e, t) { const r = new b1(); let n = -1; return Float64Array.from( e, t === void 0 ? (o) => r.add(+o || 0) : (o) => r.add(+t(o, ++n, e) || 0) ); } class x4 extends Map { constructor(t, r = or) { if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null) for (const [n, o] of t) this.set(n, o); } get(t) { return super.get(f7(this, t)); } has(t) { return super.has(f7(this, t)); } set(t, r) { return super.set(rr(this, t), r); } delete(t) { return super.delete(nr(this, t)); } } class l3 extends Set { constructor(t, r = or) { if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null) for (const n of t) this.add(n); } has(t) { return super.has(f7(this, t)); } add(t) { return super.add(rr(this, t)); } delete(t) { return super.delete(nr(this, t)); } } function f7({ _intern: e, _key: t }, r) { const n = t(r); return e.has(n) ? e.get(n) : r; } function rr({ _intern: e, _key: t }, r) { const n = t(r); return e.has(n) ? e.get(n) : (e.set(n, r), r); } function nr({ _intern: e, _key: t }, r) { const n = t(r); return e.has(n) && (r = e.get(n), e.delete(n)), r; } function or(e) { return e !== null && typeof e == "object" ? e.valueOf() : e; } function z3(e) { return e; } function ir(e, ...t) { return s4(e, z3, z3, t); } function ar(e, ...t) { return s4(e, Array.from, z3, t); } function sr(e, t) { for (let r = 1, n = t.length; r < n; ++r) e = e.flatMap((o) => o.pop().map(([i, a]) => [...o, i, a])); return e; } function Va(e, ...t) { return sr(ar(e, ...t), t); } function ja(e, t, ...r) { return sr(lr(e, t, ...r), r); } function pr(e, t, ...r) { return s4(e, z3, t, r); } function lr(e, t, ...r) { return s4(e, Array.from, t, r); } function Fa(e, ...t) { return s4(e, z3, cr, t); } function za(e, ...t) { return s4(e, Array.from, cr, t); } function cr(e) { if (e.length !== 1) throw new Error("duplicate key"); return e[0]; } function s4(e, t, r, n) { return function o(i, a) { if (a >= n.length) return r(i); const s = new x4(), l = n[a++]; let p = -1; for (const c of i) { const u = l(c, ++p, i), y = s.get(u); y ? y.push(c) : s.set(u, [c]); } for (const [c, u] of s) s.set(c, o(u, a)); return t(s); }(e, 0); } function yr(e, t) { return Array.from(t, (r) => e[r]); } function m7(e, ...t) { if (typeof e[Symbol.iterator] != "function") throw new TypeError("values is not iterable"); e = Array.from(e); let [r] = t; if (r && r.length !== 2 || t.length > 1) { const n = Uint32Array.from(e, (o, i) => i); return t.length > 1 ? (t = t.map((o) => e.map(o)), n.sort((o, i) => { for (const a of t) { const s = W3(a[o], a[i]); if (s) return s; } })) : (r = e.map(r), n.sort((o, i) => W3(r[o], r[i]))), yr(e, n); } return e.sort(u8(r)); } function u8(e = c1) { if (e === c1) return W3; if (typeof e != "function") throw new TypeError("compare is not a function"); return (t, r) => { const n = e(t, r); return n || n === 0 ? n : (e(r, r) === 0) - (e(t, t) === 0); }; } function W3(e, t) { return (e == null || !(e >= e)) - (t == null || !(t >= t)) || (e < t ? -1 : e > t ? 1 : 0); } function Wa(e, t, r) { return (t.length !== 2 ? m7(pr(e, t, r), ([n, o], [i, a]) => c1(o, a) || c1(n, i)) : m7(ir(e, r), ([n, o], [i, a]) => t(o, a) || c1(n, i))).map(([n]) => n); } var $a = Array.prototype, Za = $a.slice; function R6(e) { return () => e; } const Ya = Math.sqrt(50), Ja = Math.sqrt(10), qa = Math.sqrt(2); function e5(e, t, r) { const n = (t - e) / Math.max(0, r), o = Math.floor(Math.log10(n)), i = n / Math.pow(10, o), a = i >= Ya ? 10 : i >= Ja ? 5 : i >= qa ? 2 : 1; let s, l, p; return o < 0 ? (p = Math.pow(10, -o) / a, s = Math.round(e * p), l = Math.round(t * p), s / p < e && ++s, l / p > t && --l, p = -p) : (p = Math.pow(10, o) * a, s = Math.round(e / p), l = Math.round(t / p), s * p < e && ++s, l * p > t && --l), l < s && 0.5 <= r && r < 2 ? e5(e, t, r * 2) : [s, l, p]; } function c3(e, t, r) { if (t = +t, e = +e, r = +r, !(r > 0)) return []; if (e === t) return [e]; const n = t < e, [o, i, a] = n ? e5(t, e, r) : e5(e, t, r); if (!(i >= o)) return []; const s = i - o + 1, l = new Array(s); if (n) if (a < 0) for (let p = 0; p < s; ++p) l[p] = (i - p) / -a; else for (let p = 0; p < s; ++p) l[p] = (i - p) * a; else if (a < 0) for (let p = 0; p < s; ++p) l[p] = (o + p) / -a; else for (let p = 0; p < s; ++p) l[p] = (o + p) * a; return l; } function y3(e, t, r) { return t = +t, e = +e, r = +r, e5(e, t, r)[2]; } function t5(e, t, r) { t = +t, e = +e, r = +r; const n = t < e, o = n ? y3(t, e, r) : y3(e, t, r); return (n ? -1 : 1) * (o < 0 ? 1 / -o : o); } function d8(e, t, r) { let n; for (; ; ) { const o = y3(e, t, r); if (o === n || o === 0 || !isFinite(o)) return [e, t]; o > 0 ? (e = Math.floor(e / o) * o, t = Math.ceil(t / o) * o) : o < 0 && (e = Math.ceil(e * o) / o, t = Math.floor(t * o) / o), n = o; } } function g8(e) { return Math.max(1, Math.ceil(Math.log(F5(e)) / Math.LN2) + 1); } function R9() { var e = z3, t = R4, r = g8; function n(o) { Array.isArray(o) || (o = Array.from(o)); var i, a = o.length, s, l, p = new Array(a); for (i = 0; i < a; ++i) p[i] = e(o[i], i, o); var c = t(p), u = c[0], y = c[1], d = r(p, u, y); if (!Array.isArray(d)) { const M = y, P = +d; if (t === R4 && ([u, y] = d8(u, y, P)), d = c3(u, y, P), d[0] <= u && (l = y3(u, y, P)), d[d.length - 1] >= y) if (M >= y && t === R4) { const S = y3(u, y, P); isFinite(S) && (S > 0 ? y = (Math.floor(y / S) + 1) * S : S < 0 && (y = (Math.ceil(y * -S) + 1) / -S)); } else d.pop(); } for (var f = d.length, m = 0, g = f; d[m] <= u; ) ++m; for (; d[g - 1] > y; ) --g; (m || g < f) && (d = d.slice(m, g), f = g - m); var h = new Array(f + 1), b; for (i = 0; i <= f; ++i) b = h[i] = [], b.x0 = i > 0 ? d[i - 1] : u, b.x1 = i < f ? d[i] : y; if (isFinite(l)) { if (l > 0) for (i = 0; i < a; ++i) (s = p[i]) != null && u <= s && s <= y && h[Math.min(f, Math.floor((s - u) / l))].push(o[i]); else if (l < 0) { for (i = 0; i < a; ++i) if ((s = p[i]) != null && u <= s && s <= y) { const M = Math.floor((u - s) * l); h[Math.min(f, M + (d[M] <= s))].push(o[i]); } } } else for (i = 0; i < a; ++i) (s = p[i]) != null && u <= s && s <= y && h[j2(d, s, 0, f)].push(o[i]); return h; } return n.value = function(o) { return arguments.length ? (e = typeof o == "function" ? o : R6(o), n) : e; }, n.domain = function(o) { return arguments.length ? (t = typeof o == "function" ? o : R6([o[0], o[1]]), n) : t; }, n.thresholds = function(o) { return arguments.length ? (r = typeof o == "function" ? o : R6(Array.isArray(o) ? Za.call(o) : o), n) : r; }, n; } function O4(e, t) { let r; if (t === void 0) for (const n of e) n != null && (r < n || r === void 0 && n >= n) && (r = n); else { let n = -1; for (let o of e) (o = t(o, ++n, e)) != null && (r < o || r === void 0 && o >= o) && (r = o); } return r; } function f8(e, t) { let r, n = -1, o = -1; if (t === void 0) for (const i of e) ++o, i != null && (r < i || r === void 0 && i >= i) && (r = i, n = o); else for (let i of e) (i = t(i, ++o, e)) != null && (r < i || r === void 0 && i >= i) && (r = i, n = o); return n; } function r5(e, t) { let r; if (t === void 0) for (const n of e) n != null && (r > n || r === void 0 && n >= n) && (r = n); else { let n = -1; for (let o of e) (o = t(o, ++n, e)) != null && (r > o || r === void 0 && o >= o) && (r = o); } return r; } function m8(e, t) { let r, n = -1, o = -1; if (t === void 0) for (const i of e) ++o, i != null && (r > i || r === void 0 && i >= i) && (r = i, n = o); else for (let i of e) (i = t(i, ++o, e)) != null && (r > i || r === void 0 && i >= i) && (r = i, n = o); return n; } function z5(e, t, r = 0, n = 1 / 0, o) { if (t = Math.floor(t), r = Math.floor(Math.max(0, r)), n = Math.floor(Math.min(e.length - 1, n)), !(r <= t && t <= n)) return e; for (o = o === void 0 ? W3 : u8(o); n > r; ) { if (n - r > 600) { const l = n - r + 1, p = t - r + 1, c = Math.log(l), u = 0.5 * Math.exp(2 * c / 3), y = 0.5 * Math.sqrt(c * u * (l - u) / l) * (p - l / 2 < 0 ? -1 : 1), d = Math.max(r, Math.floor(t - p * u / l + y)), f = Math.min(n, Math.floor(t + (l - p) * u / l + y)); z5(e, t, d, f, o); } const i = e[t]; let a = r, s = n; for (u4(e, r, t), o(e[n], i) > 0 && u4(e, r, n); a < s; ) { for (u4(e, a, s), ++a, --s; o(e[a], i) < 0; ) ++a; for (; o(e[s], i) > 0; ) --s; } o(e[r], i) === 0 ? u4(e, r, s) : (++s, u4(e, s, n)), s <= t && (r = s + 1), t <= s && (n = s - 1); } return e; } function u4(e, t, r) { const n = e[t]; e[t] = e[r], e[r] = n; } function ur(e, t = c1) { let r, n = !1; if (t.length === 1) { let o; for (const i of e) { const a = t(i); (n ? c1(a, o) > 0 : c1(a, a) === 0) && (r = i, o = a, n = !0); } } else for (const o of e) (n ? t(o, r) > 0 : t(o, o) === 0) && (r = o, n = !0); return r; } function H4(e, t, r) { if (e = Float64Array.from(_a(e, r)), !(!(n = e.length) || isNaN(t = +t))) { if (t <= 0 || n < 2) return r5(e); if (t >= 1) return O4(e); var n, o = (n - 1) * t, i = Math.floor(o), a = O4(z5(e, i).subarray(0, i + 1)), s = r5(e.subarray(i + 1)); return a + (s - a) * (o - i); } } function dr(e, t, r = Q0) { if (!(!(n = e.length) || isNaN(t = +t))) { if (t <= 0 || n < 2) return +r(e[0], 0, e); if (t >= 1) return +r(e[n - 1], n - 1, e); var n, o = (n - 1) * t, i = Math.floor(o), a = +r(e[i], i, e), s = +r(e[i + 1], i + 1, e); return a + (s - a) * (o - i); } } function gr(e, t, r = Q0) { if (!isNaN(t = +t)) { if (n = Float64Array.from(e, (s, l) => Q0(r(e[l], l, e))), t <= 0) return m8(n); if (t >= 1) return f8(n); var n, o = Uint32Array.from(e, (s, l) => l), i = n.length - 1, a = Math.floor(i * t); return z5(o, a, 0, i, (s, l) => W3(n[s], n[l])), a = ur(o.subarray(0, a + 1), (s) => n[s]), a >= 0 ? a : -1; } } function Xa(e, t, r) { const n = F5(e), o = H4(e, 0.75) - H4(e, 0.25); return n && o ? Math.ceil((r - t) / (2 * o * Math.pow(n, -1 / 3))) : 1; } function Qa(e, t, r) { const n = F5(e), o = tr(e); return n && o ? Math.ceil((r - t) * Math.cbrt(n) / (3.49 * o)) : 1; } function es(e, t) { let r = 0, n = 0; if (t === void 0) for (let o of e) o != null && (o = +o) >= o && (++r, n += o); else { let o = -1; for (let i of e) (i = t(i, ++o, e)) != null && (i = +i) >= i && (++r, n += i); } if (r) return n / r; } function ts(e, t) { return H4(e, 0.5, t); } function rs(e, t) { return gr(e, 0.5, t); } function* ns(e) { for (const t of e) yield* t; } function h8(e) { return Array.from(ns(e)); } function os(e, t) { const r = new x4(); if (t === void 0) for (let i of e) i != null && i >= i && r.set(i, (r.get(i) || 0) + 1); else { let i = -1; for (let a of e) (a = t(a, ++i, e)) != null && a >= a && r.set(a, (r.get(a) || 0) + 1); } let n, o = 0; for (const [i, a] of r) a > o && (o = a, n = i); return n; } function is(e, t = as) { const r = []; let n, o = !1; for (const i of e) o && r.push(t(n, i)), n = i, o = !0; return r; } function as(e, t) { return [e, t]; } function O2(e, t, r) { e = +e, t = +t, r = (o = arguments.length) < 2 ? (t = e, e = 0, 1) : o < 3 ? 1 : +r; for (var n = -1, o = Math.max(0, Math.ceil((t - e) / r)) | 0, i = new Array(o); ++n < o; ) i[n] = e + n * r; return i; } function ss(e, t = c1) { if (typeof e[Symbol.iterator] != "function") throw new TypeError("values is not iterable"); let r = Array.from(e); const n = new Float64Array(r.length); t.length !== 2 && (r = r.map(t), t = c1); const o = (s, l) => t(r[s], r[l]); let i, a; return e = Uint32Array.from(r, (s, l) => l), e.sort(t === c1 ? (s, l) => W3(r[s], r[l]) : u8(o)), e.forEach((s, l) => { const p = o(s, i === void 0 ? s : i); p >= 0 ? ((i === void 0 || p > 0) && (i = s, a = l), n[s] = a) : n[s] = NaN; }), n; } function ps(e, t = c1) { let r, n = !1; if (t.length === 1) { let o; for (const i of e) { const a = t(i); (n ? c1(a, o) < 0 : c1(a, a) === 0) && (r = i, o = a, n = !0); } } else for (const o of e) (n ? t(o, r) < 0 : t(o, o) === 0) && (r = o, n = !0); return r; } function fr(e, t = c1) { if (t.length === 1) return m8(e, t); let r, n = -1, o = -1; for (const i of e) ++o, (n < 0 ? t(i, i) === 0 : t(i, r) < 0) && (r = i, n = o); return n; } function ls(e, t = c1) { if (t.length === 1) return f8(e, t); let r, n = -1, o = -1; for (const i of e) ++o, (n < 0 ? t(i, i) === 0 : t(i, r) > 0) && (r = i, n = o); return n; } function cs(e, t) { const r = fr(e, t); return r < 0 ? void 0 : r; } const ys = mr(Math.random); function mr(e) { return function(r, n = 0, o = r.length) { let i = o - (n = +n); for (; i; ) { const a = e() * i-- | 0, s = r[i + n]; r[i + n] = r[a + n], r[a + n] = s; } return r; }; } function us(e, t) { let r = 0; if (t === void 0) for (let n of e) (n = +n) && (r += n); else { let n = -1; for (let o of e) (o = +t(o, ++n, e)) && (r += o); } return r; } function hr(e) { if (!(i = e.length)) return []; for (var t = -1, r = r5(e, ds), n = new Array(r); ++t < r; ) for (var o = -1, i, a = n[t] = new Array(i); ++o < i; ) a[o] = e[o][t]; return n; } function ds(e) { return e.length; } function gs() { return hr(arguments); } function fs(e, t) { if (typeof t != "function") throw new TypeError("test is not a function"); let r = -1; for (const n of e) if (!t(n, ++r, e)) return !1; return !0; } function ms(e, t) { if (typeof t != "function") throw new TypeError("test is not a function"); let r = -1; for (const n of e) if (t(n, ++r, e)) return !0; return !1; } function hs(e, t) { if (typeof t != "function") throw new TypeError("test is not a function"); const r = []; let n = -1; for (const o of e) t(o, ++n, e) && r.push(o); return r; } function Ps(e, t) { if (typeof e[Symbol.iterator] != "function") throw new TypeError("values is not iterable"); if (typeof t != "function") throw new TypeError("mapper is not a function"); return Array.from(e, (r, n) => t(r, n, e)); } function Ms(e, t, r) { if (typeof t != "function") throw new TypeError("reducer is not a function"); const n = e[Symbol.iterator](); let o, i, a = -1; if (arguments.length < 3) { if ({ done: o, value: r } = n.next(), o) return; ++a; } for (; { done: o, value: i } = n.next(), !o; ) r = t(r, i, ++a, e); return r; } function bs(e) { if (typeof e[Symbol.iterator] != "function") throw new TypeError("values is not iterable"); return Array.from(e).reverse(); } function Ss(e, ...t) { e = new l3(e); for (const r of t) for (const n of r) e.delete(n); return e; } function Ts(e, t) { const r = t[Symbol.iterator](), n = new l3(); for (const o of e) { if (n.has(o)) return !1; let i, a; for (; ({ value: i, done: a } = r.next()) && !a; ) { if (Object.is(o, i)) return !1; n.add(i); } } return !0; } function vs(e, ...t) { e = new l3(e), t = t.map(As); e: for (const r of e) for (const n of t) if (!n.has(r)) { e.delete(r); continue e; } return e; } function As(e) { return e instanceof l3 ? e : new l3(e); } function Pr(e, t) { const r = e[Symbol.iterator](), n = /* @__PURE__ */ new Set(); for (const o of t) { const i = k9(o); if (n.has(i)) continue; let a, s; for (; { value: a, done: s } = r.next(); ) { if (s) return !1; const l = k9(a); if (n.add(l), Object.is(i, l)) break; } } return !0; } function k9(e) { return e !== null && typeof e == "object" ? e.valueOf() : e; } function Cs(e, t) { return Pr(t, e); } function Ns(...e) { const t = new l3(); for (const r of e) for (const n of r) t.add(n); return t; } function _s(e) { return e; } var U0 = 1, V0 = 2, h7 = 3, b4 = 4, E9 = 1e-6; function Bs(e) { return "translate(" + e + ",0)"; } function ws(e) { return "translate(0," + e + ")"; } function Gs(e) { return (t) => +e(t); } function Rs(e, t) { return t = Math.max(0, e.bandwidth() - t * 2) / 2, e.round() && (t = Math.round(t)), (r) => +e(r) + t; } function ks() { return !this.__axis; } function W5(e, t) { var r = [], n = null, o = null, i = 6, a = 6, s = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, p = e === U0 || e === b4 ? -1 : 1, c = e === b4 || e === V0 ? "x" : "y", u = e === U0 || e === h7 ? Bs : ws; function y(d) { var f = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), m = o ?? (t.tickFormat ? t.tickFormat.apply(t, r) : _s), g = Math.max(i, 0) + s, h = t.range(), b = +h[0] + l, M = +h[h.length - 1] + l, P = (t.bandwidth ? Rs : Gs)(t.copy(), l), S = d.selection ? d.selection() : d, T = S.selectAll(".domain").data([null]), _ = S.selectAll(".tick").data(f, t).order(), G = _.exit(), w = _.enter().append("g").attr("class", "tick"), B = _.select("line"), A = _.select("text"); T = T.merge(T.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), _ = _.merge(w), B = B.merge(w.append("line").attr("stroke", "currentColor").attr(c + "2", p * i)), A = A.merge(w.append("text").attr("fill", "currentColor").attr(c, p * g).attr("dy", e === U0 ? "0em" : e === h7 ? "0.71em" : "0.32em")), d !== S && (T = T.transition(d), _ = _.transition(d), B = B.transition(d), A = A.transition(d), G = G.transition(d).attr("opacity", E9).attr("transform", function(E) { return isFinite(E = P(E)) ? u(E + l) : this.getAttribute("transform"); }), w.attr("opacity", E9).attr("transform", function(E) { var R = this.parentNode.__axis; return u((R && isFinite(R = R(E)) ? R : P(E)) + l); })), G.remove(), T.attr("d", e === b4 || e === V0 ? a ? "M" + p * a + "," + b + "H" + l + "V" + M + "H" + p * a : "M" + l + "," + b + "V" + M : a ? "M" + b + "," + p * a + "V" + l + "H" + M + "V" + p * a : "M" + b + "," + l + "H" + M), _.attr("opacity", 1).attr("transform", function(E) { return u(P(E) + l); }), B.attr(c + "2", p * i), A.attr(c, p * g).text(m), S.filter(ks).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === V0 ? "start" : e === b4 ? "end" : "middle"), S.each(function() { this.__axis = P; }); } return y.scale = function(d) { return arguments.length ? (t = d, y) : t; }, y.ticks = function() { return r = Array.from(arguments), y; }, y.tickArguments = function(d) { return arguments.length ? (r = d == null ? [] : Array.from(d), y) : r.slice(); }, y.tickValues = function(d) { return arguments.length ? (n = d == null ? null : Array.from(d), y) : n && n.slice(); }, y.tickFormat = function(d) { return arguments.length ? (o = d, y) : o; }, y.tickSize = function(d) { return arguments.length ? (i = a = +d, y) : i; }, y.tickSizeInner = function(d) { return arguments.length ? (i = +d, y) : i; }, y.tickSizeOuter = function(d) { return arguments.length ? (a = +d, y) : a; }, y.tickPadding = function(d) { return arguments.length ? (s = +d, y) : s; }, y.offset = function(d) { return arguments.length ? (l = +d, y) : l; }, y; } function Es(e) { return W5(U0, e); } function Ls(e) { return W5(V0, e); } function Is(e) { return W5(h7, e); } function Ks(e) { return W5(b4, e); } var Ds = { value: () => { } }; function b3() { for (var e = 0, t = arguments.length, r = {}, n; e < t; ++e) { if (!(n = arguments[e] + "") || n in r || /[\s.]/.test(n)) throw new Error("illegal type: " + n); r[n] = []; } return new j0(r); } function j0(e) { this._ = e; } function xs(e, t) { return e.trim().split(/^|\s+/).map(function(r) { var n = "", o = r.indexOf("."); if (o >= 0 && (n = r.slice(o + 1), r = r.slice(0, o)), r && !t.hasOwnProperty(r)) throw new Error("unknown type: " + r); return { type: r, name: n }; }); } j0.prototype = b3.prototype = { constructor: j0, on: function(e, t) { var r = this._, n = xs(e + "", r), o, i = -1, a = n.length; if (arguments.length < 2) { for (; ++i < a; ) if ((o = (e = n[i]).type) && (o = Os(r[o], e.name))) return o; return; } if (t != null && typeof t != "function") throw new Error("invalid callback: " + t); for (; ++i < a; ) if (o = (e = n[i]).type) r[o] = L9(r[o], e.name, t); else if (t == null) for (o in r) r[o] = L9(r[o], e.name, null); return this; }, copy: function() { var e = {}, t = this._; for (var r in t) e[r] = t[r].slice(); return new j0(e); }, call: function(e, t) { if ((o = arguments.length - 2) > 0) for (var r = new Array(o), n = 0, o, i; n < o; ++n) r[n] = arguments[n + 2]; if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e); for (i = this._[e], n = 0, o = i.length; n < o; ++n) i[n].value.apply(t, r); }, apply: function(e, t, r) { if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e); for (var n = this._[e], o = 0, i = n.length; o < i; ++o) n[o].value.apply(t, r); } }; function Os(e, t) { for (var r = 0, n = e.length, o; r < n; ++r) if ((o = e[r]).name === t) return o.value; } function L9(e, t, r) { for (var n = 0, o = e.length; n < o; ++n) if (e[n].name === t) { e[n] = Ds, e = e.slice(0, n).concat(e.slice(n + 1)); break; } return r != null && e.push({ name: t, value: r }), e; } var P7 = "http://www.w3.org/1999/xhtml"; const M7 = { svg: "http://www.w3.org/2000/svg", xhtml: P7, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }; function r0(e) { var t = e += "", r = t.indexOf(":"); return r >= 0 && (t = e.slice(0, r)) !== "xmlns" && (e = e.slice(r + 1)), M7.hasOwnProperty(t) ? { space: M7[t], local: e } : e; } function Hs(e) { return function() { var t = this.ownerDocument, r = this.namespaceURI; return r === P7 && t.documentElement.namespaceURI === P7 ? t.createElement(e) : t.createElementNS(r, e); }; } function Us(e) { return function() { return this.ownerDocument.createElementNS(e.space, e.local); }; } function $5(e) { var t = r0(e); return (t.local ? Us : Hs)(t); } function Vs() { } function Z5(e) { return e == null ? Vs : function() { return this.querySelector(e); }; } function js(e) { typeof e != "function" && (e = Z5(e)); for (var t = this._groups, r = t.length, n = new Array(r), o = 0; o < r; ++o) for (var i = t[o], a = i.length, s = n[o] = new Array(a), l, p, c = 0; c < a; ++c) (l = i[c]) && (p = e.call(l, l.__data__, c, i)) && ("__data__" in l && (p.__data__ = l.__data__), s[c] = p); return new U1(n, this._parents); } function Mr(e) { return e == null ? [] : Array.isArray(e) ? e : Array.from(e); } function Fs() { return []; } function P8(e) { return e == null ? Fs : function() { return this.querySelectorAll(e); }; } function zs(e) { return function() { return Mr(e.apply(this, arguments)); }; } function Ws(e) { typeof e == "function" ? e = zs(e) : e = P8(e); for (var t = this._groups, r = t.length, n = [], o = [], i = 0; i < r; ++i) for (var a = t[i], s = a.length, l, p = 0; p < s; ++p) (l = a[p]) && (n.push(e.call(l, l.__data__, p, a)), o.push(l)); return new U1(n, o); } function M8(e) { return function() { return this.matches(e); }; } function br(e) { return function(t) { return t.matches(e); }; } var $s = Array.prototype.find; function Zs(e) { return function() { return $s.call(this.children, e); }; } function Ys() { return this.firstElementChild; } function Js(e) { return this.select(e == null ? Ys : Zs(typeof e == "function" ? e : br(e))); } var qs = Array.prototype.filter; function Xs() { return Array.from(this.children); } function Qs(e) { return function() { return qs.call(this.children, e); }; } function ep(e) { return this.selectAll(e == null ? Xs : Qs(typeof e == "function" ? e : br(e))); } function tp(e) { typeof e != "function" && (e = M8(e)); for (var t = this._groups, r = t.length, n = new Array(r), o = 0; o < r; ++o) for (var i = t[o], a = i.length, s = n[o] = [], l, p = 0; p < a; ++p) (l = i[p]) && e.call(l, l.__data__, p, i) && s.push(l); return new U1(n, this._parents); } function Sr(e) { return new Array(e.length); } function rp() { return new U1(this._enter || this._groups.map(Sr), this._parents); } function n5(e, t) { this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t; } n5.prototype = { constructor: n5, appendChild: function(e) { return this._parent.insertBefore(e, this._next); }, insertBefore: function(e, t) { return this._parent.insertBefore(e, t); }, querySelector: function(e) { return this._parent.querySelector(e); }, querySelectorAll: function(e) { return this._parent.querySelectorAll(e); } }; function np(e) { return function() { return e; }; } function op(e, t, r, n, o, i) { for (var a = 0, s, l = t.length, p = i.length; a < p; ++a) (s = t[a]) ? (s.__data__ = i[a], n[a] = s) : r[a] = new n5(e, i[a]); for (; a < l; ++a) (s = t[a]) && (o[a] = s); } function ip(e, t, r, n, o, i, a) { var s, l, p = /* @__PURE__ */ new Map(), c = t.length, u = i.length, y = new Array(c), d; for (s = 0; s < c; ++s) (l = t[s]) && (y[s] = d = a.call(l, l.__data__, s, t) + "", p.has(d) ? o[s] = l : p.set(d, l)); for (s = 0; s < u; ++s) d = a.call(e, i[s], s, i) + "", (l = p.get(d)) ? (n[s] = l, l.__data__ = i[s], p.delete(d)) : r[s] = new n5(e, i[s]); for (s = 0; s < c; ++s) (l = t[s]) && p.get(y[s]) === l && (o[s] = l); } function ap(e) { return e.__data__; } function sp(e, t) { if (!arguments.length) return Array.from(this, ap); var r = t ? ip : op, n = this._parents, o = this._groups; typeof e != "function" && (e = np(e)); for (var i = o.length, a = new Array(i), s = new Array(i), l = new Array(i), p = 0; p < i; ++p) { var c = n[p], u = o[p], y = u.length, d = pp(e.call(c, c && c.__data__, p, n)), f = d.length, m = s[p] = new Array(f), g = a[p] = new Array(f), h = l[p] = new Array(y); r(c, u, m, g, h, d, t); for (var b = 0, M = 0, P, S; b < f; ++b) if (P = m[b]) { for (b >= M && (M = b + 1); !(S = g[M]) && ++M < f; ) ; P._next = S || null; } } return a = new U1(a, n), a._enter = s, a._exit = l, a; } function pp(e) { return typeof e == "object" && "length" in e ? e : Array.from(e); } function lp() { return new U1(this._exit || this._groups.map(Sr), this._parents); } function cp(e, t, r) { var n = this.enter(), o = this, i = this.exit(); return typeof e == "function" ? (n = e(n), n && (n = n.selection())) : n = n.append(e + ""), t != null && (o = t(o), o && (o = o.selection())), r == null ? i.remove() : r(i), n && o ? n.merge(o).order() : o; } function yp(e) { for (var t = e.selection ? e.selection() : e, r = this._groups, n = t._groups, o = r.length, i = n.length, a = Math.min(o, i), s = new Array(o), l = 0; l < a; ++l) for (var p = r[l], c = n[l], u = p.length, y = s[l] = new Array(u), d, f = 0; f < u; ++f) (d = p[f] || c[f]) && (y[f] = d); for (; l < o; ++l) s[l] = r[l]; return new U1(s, this._parents); } function up() { for (var e = this._groups, t = -1, r = e.length; ++t < r; ) for (var n = e[t], o = n.length - 1, i = n[o], a; --o >= 0; ) (a = n[o]) && (i && a.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(a, i), i = a); return this; } function dp(e) { e || (e = gp); function t(u, y) { return u && y ? e(u.__data__, y.__data__) : !u - !y; } for (var r = this._groups, n = r.length, o = new Array(n), i = 0; i < n; ++i) { for (var a = r[i], s = a.length, l = o[i] = new Array(s), p, c = 0; c < s; ++c) (p = a[c]) && (l[c] = p); l.sort(t); } return new U1(o, this._parents).order(); } function gp(e, t) { return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN; } function fp() { var e = arguments[0]; return arguments[0] = this, e.apply(null, arguments), this; } function mp() { return Array.from(this); } function hp() { for (var e = this._groups, t = 0, r = e.length; t < r; ++t) for (var n = e[t], o = 0, i = n.length; o < i; ++o) { var a = n[o]; if (a) return a; } return null; } function Pp() { let e = 0; for (const t of this) ++e; return e; } function Mp() { return !this.node(); } function bp(e) { for (var t = this._groups, r = 0, n = t.length; r < n; ++r) for (var o = t[r], i = 0, a = o.length, s; i < a; ++i) (s = o[i]) && e.call(s, s.__data__, i, o); return this; } function Sp(e) { return function() { this.removeAttribute(e); }; } function Tp(e) { return function() { this.removeAttributeNS(e.space, e.local); }; } function vp(e, t) { return function() { this.setAttribute(e, t); }; } function Ap(e, t) { return function() { this.setAttributeNS(e.space, e.local, t); }; } function Cp(e, t) { return function() { var r = t.apply(this, arguments); r == null ? this.removeAttribute(e) : this.setAttribute(e, r); }; } function Np(e, t) { return function() { var r = t.apply(this, arguments); r == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, r); }; } function _p(e, t) { var r = r0(e); if (arguments.length < 2) { var n = this.node(); return r.local ? n.getAttributeNS(r.space, r.local) : n.getAttribute(r); } return this.each((t == null ? r.local ? Tp : Sp : typeof t == "function" ? r.local ? Np : Cp : r.local ? Ap : vp)(r, t)); } function b8(e) { return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView; } function Bp(e) { return function() { this.style.removeProperty(e); }; } function wp(e, t, r) { return function() { this.style.setProperty(e, t, r); }; } function Gp(e, t, r) { return function() { var n = t.apply(this, arguments); n == null ? this.style.removeProperty(e) : this.style.setProperty(e, n, r); }; } function Rp(e, t, r) { return arguments.length > 1 ? this.each((t == null ? Bp : typeof t == "function" ? Gp : wp)(e, t, r ?? "")) : u3(this.node(), e); } function u3(e, t) { return e.style.getPropertyValue(t) || b8(e).getComputedStyle(e, null).getPropertyValue(t); } function kp(e) { return function() { delete this[e]; }; } function Ep(e, t) { return function() { this[e] = t; }; } function Lp(e, t) { return function() { var r = t.apply(this, arguments); r == null ? delete this[e] : this[e] = r; }; } function Ip(e, t) { return arguments.length > 1 ? this.each((t == null ? kp : typeof t == "function" ? Lp : Ep)(e, t)) : this.node()[e]; } function Tr(e) { return e.trim().split(/^|\s+/); } function S8(e) { return e.classList || new vr(e); } function vr(e) { this._node = e, this._names = Tr(e.getAttribute("class") || ""); } vr.prototype = { add: function(e) { var t = this._names.indexOf(e); t < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" "))); }, remove: function(e) { var t = this._names.indexOf(e); t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" "))); }, contains: function(e) { return this._names.indexOf(e) >= 0; } }; function Ar(e, t) { for (var r = S8(e), n = -1, o = t.length; ++n < o; ) r.add(t[n]); } function Cr(e, t) { for (var r = S8(e), n = -1, o = t.length; ++n < o; ) r.remove(t[n]); } function Kp(e) { return function() { Ar(this, e); }; } function Dp(e) { return function() { Cr(this, e); }; } function xp(e, t) { return function() { (t.apply(this, arguments) ? Ar : Cr)(this, e); }; } function Op(e, t) { var r = Tr(e + ""); if (arguments.length < 2) { for (var n = S8(this.node()), o = -1, i = r.length; ++o < i; ) if (!n.contains(r[o])) return !1; return !0; } return this.each((typeof t == "function" ? xp : t ? Kp : Dp)(r, t)); } function Hp() { this.textContent = ""; } function Up(e) { return function() { this.textContent = e; }; } function Vp(e) { return function() { var t = e.apply(this, arguments); this.textContent = t ?? ""; }; } function jp(e) { return arguments.length ? this.each(e == null ? Hp : (typeof e == "function" ? Vp : Up)(e)) : this.node().textContent; } function Fp() { this.innerHTML = ""; } function zp(e) { return function() { this.innerHTML = e; }; } function Wp(e) { return function() { var t = e.apply(this, arguments); this.innerHTML = t ?? ""; }; } function $p(e) { return arguments.length ? this.each(e == null ? Fp : (typeof e == "function" ? Wp : zp)(e)) : this.node().innerHTML; } function Zp() { this.nextSibling && this.parentNode.appendChild(this); } function Yp() { return this.each(Zp); } function Jp() { this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild); } function qp() { return this.each(Jp); } function Xp(e) { var t = typeof e == "function" ? e : $5(e); return this.select(function() { return this.appendChild(t.apply(this, arguments)); }); } function Qp() { return null; } function el(e, t) { var r = typeof e == "function" ? e : $5(e), n = t == null ? Qp : typeof t == "function" ? t : Z5(t); return this.select(function() { return this.insertBefore(r.apply(this, arguments), n.apply(this, arguments) || null); }); } function tl() { var e = this.parentNode; e && e.removeChild(this); } function rl() { return this.each(tl); } function nl() { var e = this.cloneNode(!1), t = this.parentNode; return t ? t.insertBefore(e, this.nextSibling) : e; } function ol() { var e = this.cloneNode(!0), t = this.parentNode; return t ? t.insertBefore(e, this.nextSibling) : e; } function il(e) { return this.select(e ? ol : nl); } function al(e) { return arguments.length ? this.property("__data__", e) : this.node().__data__; } function sl(e) { return function(t) { e.call(this, t, this.__data__); }; } function pl(e) { return e.trim().split(/^|\s+/).map(function(t) { var r = "", n = t.indexOf("."); return n >= 0 && (r = t.slice(n + 1), t = t.slice(0, n)), { type: t, name: r }; }); } function ll(e) { return function() { var t = this.__on; if (t) { for (var r = 0, n = -1, o = t.length, i; r < o; ++r) i = t[r], (!e.type || i.type === e.type) && i.name === e.name ? this.removeEventListener(i.type, i.listener, i.options) : t[++n] = i; ++n ? t.length = n : delete this.__on; } }; } function cl(e, t, r) { return function() { var n = this.__on, o, i = sl(t); if (n) { for (var a = 0, s = n.length; a < s; ++a) if ((o = n[a]).type === e.type && o.name === e.name) { this.removeEventListener(o.type, o.listener, o.options), this.addEventListener(o.type, o.listener = i, o.options = r), o.value = t; return; } } this.addEventListener(e.type, i, r), o = { type: e.type, name: e.name, value: t, listener: i, options: r }, n ? n.push(o) : this.__on = [o]; }; } function yl(e, t, r) { var n = pl(e + ""), o, i = n.length, a; if (arguments.length < 2) { var s = this.node().__on; if (s) { for (var l = 0, p = s.length, c; l < p; ++l) for (o = 0, c = s[l]; o < i; ++o) if ((a = n[o]).type === c.type && a.name === c.name) return c.value; } return; } for (s = t ? cl : ll, o = 0; o < i; ++o) this.each(s(n[o], t, r)); return this; } function Nr(e, t, r) { var n = b8(e), o = n.CustomEvent; typeof o == "function" ? o = new o(t, r) : (o = n.document.createEvent("Event"), r ? (o.initEvent(t, r.bubbles, r.cancelable), o.detail = r.detail) : o.initEvent(t, !1, !1)), e.dispatchEvent(o); } function ul(e, t) { return function() { return Nr(this, e, t); }; } function dl(e, t) { return function() { return Nr(this, e, t.apply(this, arguments)); }; } function gl(e, t) { return this.each((typeof t == "function" ? dl : ul)(e, t)); } function* fl() { for (var e = this._groups, t = 0, r = e.length; t < r; ++t) for (var n = e[t], o = 0, i = n.length, a; o < i; ++o) (a = n[o]) && (yield a); } var T8 = [null]; function U1(e, t) { this._groups = e, this._parents = t; } function S3() { return new U1([[document.documentElement]], T8); } function ml() { return this; } U1.prototype = S3.prototype = { constructor: U1, select: js, selectAll: Ws, selectChild: Js, selectChildren: ep, filter: tp, data: sp, enter: rp, exit: lp, join: cp, merge: yp, selection: ml, order: up, sort: dp, call: fp, nodes: mp, node: hp, size: Pp, empty: Mp, each: bp, attr: _p, style: Rp, property: Ip, classed: Op, text: jp, html: $p, raise: Yp, lower: qp, append: Xp, insert: el, remove: rl, clone: il, datum: al, on: yl, dispatch: gl, [Symbol.iterator]: fl }; function k1(e) { return typeof e == "string" ? new U1([[document.querySelector(e)]], [document.documentElement]) : new U1([[e]], T8); } function hl(e) { return k1($5(e).call(document.documentElement)); } var Pl = 0; function _r() { return new b7(); } function b7() { this._ = "@" + (++Pl).toString(36); } b7.prototype = _r.prototype = { constructor: b7, get: function(e) { for (var t = this._; !(t in e); ) if (!(e = e.parentNode)) return; return e[t]; }, set: function(e, t) { return e[this._] = t; }, remove: function(e) { return this._ in e && delete e[this._]; }, toString: function() { return this._; } }; function Br(e) { let t; for (; t = e.sourceEvent; ) e = t; return e; } function J1(e, t) { if (e = Br(e), t === void 0 && (t = e.currentTarget), t) { var r = t.ownerSVGElement || t; if (r.createSVGPoint) { var n = r.createSVGPoint(); return n.x = e.clientX, n.y = e.clientY, n = n.matrixTransform(t.getScreenCTM().inverse()), [n.x, n.y]; } if (t.getBoundingClientRect) { var o = t.getBoundingClientRect(); return [e.clientX - o.left - t.clientLeft, e.clientY - o.top - t.clientTop]; } } return [e.pageX, e.pageY]; } function Ml(e, t) { return e.target && (e = Br(e), t === void 0 && (t = e.currentTarget), e = e.touches || [e]), Array.from(e, (r) => J1(r, t)); } function bl(e) { return typeof e == "string" ? new U1([document.querySelectorAll(e)], [document.documentElement]) : new U1([Mr(e)], T8); } const Sl = { passive: !1 }, U4 = { capture: !0, passive: !1 }; function k6(e) { e.stopImmediatePropagation(); } function O3(e) { e.preventDefault(), e.stopImmediatePropagation(); } function Y5(e) { var t = e.document.documentElement, r = k1(e).on("dragstart.drag", O3, U4); "onselectstart" in t ? r.on("selectstart.drag", O3, U4) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none"); } function J5(e, t) { var r = e.document.documentElement, n = k1(e).on("dragstart.drag", null); t && (n.on("click.drag", O3, U4), setTimeout(function() { n.on("click.drag", null); }, 0)), "onselectstart" in r ? n.on("selectstart.drag", null) : (r.style.MozUserSelect = r.__noselect, delete r.__noselect); } const M0 = (e) => () => e; function S7(e, { sourceEvent: t, subject: r, target: n, identifier: o, active: i, x: a, y: s, dx: l, dy: p, dispatch: c }) { Object.defineProperties(this, { type: { value: e, enumerable: !0, configurable: !0 }, sourceEvent: { value: t, enumerable: !0, configurable: !0 }, subject: { value: r, enumerable: !0, configurable: !0 }, target: { value: n, enumerable: !0, configurable: !0 }, identifier: { value: o, enumerable: !0, configurable: !0 }, active: { value: i, enumerable: !0, configurable: !0 }, x: { value: a, enumerable: !0, configurable: !0 }, y: { value: s, enumerable: !0, configurable: !0 }, dx: { value: l, enumerable: !0, configurable: !0 }, dy: { value: p, enumerable: !0, configurable: !0 }, _: { value: c } }); } S7.prototype.on = function() { var e = this._.on.apply(this._, arguments); return e === this._ ? this : e; }; function Tl(e) { return !e.ctrlKey && !e.button; } function vl() { return this.parentNode; } function Al(e, t) { return t ?? { x: e.x, y: e.y }; } function Cl() { return navigator.maxTouchPoints || "ontouchstart" in this; } function Nl() { var e = Tl, t = vl, r = Al, n = Cl, o = {}, i = b3("start", "drag", "end"), a = 0, s, l, p, c, u = 0; function y(P) { P.on("mousedown.drag", d).filter(n).on("touchstart.drag", g).on("touchmove.drag", h, Sl).on("touchend.drag touchcancel.drag", b).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } function d(P, S) { if (!(c || !e.call(this, P, S))) { var T = M(this, t.call(this, P, S), P, S, "mouse"); T && (k1(P.view).on("mousemove.drag", f, U4).on("mouseup.drag", m, U4), Y5(P.view), k6(P), p = !1, s = P.clientX, l = P.clientY, T("start", P)); } } function f(P) { if (O3(P), !p) { var S = P.clientX - s, T = P.clientY - l; p = S * S + T * T > u; } o.mouse("drag", P); } function m(P) { k1(P.view).on("mousemove.drag mouseup.drag", null), J5(P.view, p), O3(P), o.mouse("end", P); } function g(P, S) { if (e.call(this, P, S)) { var T = P.changedTouches, _ = t.call(this, P, S), G = T.length, w, B; for (w = 0; w < G; ++w) (B = M(this, _, P, S, T[w].identifier, T[w])) && (k6(P), B("start", P, T[w])); } } function h(P) { var S = P.changedTouches, T = S.length, _, G; for (_ = 0; _ < T; ++_) (G = o[S[_].identifier]) && (O3(P), G("drag", P, S[_])); } function b(P) { var S = P.changedTouches, T = S.length, _, G; for (c && clearTimeout(c), c = setTimeout(function() { c = null; }, 500), _ = 0; _ < T; ++_) (G = o[S[_].identifier]) && (k6(P), G("end", P, S[_])); } function M(P, S, T, _, G, w) { var B = i.copy(), A = J1(w || T, S), E, R, v; if ((v = r.call(P, new S7("beforestart", { sourceEvent: T, target: y, identifier: G, active: a, x: A[0], y: A[1], dx: 0, dy: 0, dispatch: B }), _)) != null) return E = v.x - A[0] || 0, R = v.y - A[1] || 0, function N(C, k, I) { var L = A, D; switch (C) { case "start": o[G] = N, D = a++;