UNPKG

vue-datamaps

Version:

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END -->

1,661 lines 6.43 MB
var Lr = "4.2.2"; function L2(e, t) { return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN; } function m6(e) { return e.length === 1 && (e = Er(e)), { left: function(t, r, o, n) { for (o == null && (o = 0), n == null && (n = t.length); o < n; ) { var a = o + n >>> 1; e(t[a], r) < 0 ? o = a + 1 : n = a; } return o; }, right: function(t, r, o, n) { for (o == null && (o = 0), n == null && (n = t.length); o < n; ) { var a = o + n >>> 1; e(t[a], r) > 0 ? n = a : o = a + 1; } return o; } }; } function Er(e) { return function(t, r) { return L2(e(t), r); }; } var S9 = m6(L2), C2 = S9.right, kr = S9.left; function Kr(e, t) { return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN; } function p2(e) { return e === null ? NaN : +e; } function v9(e, t) { var r = e.length, o = 0, n, a, i = 0, s = -1, p = 0; if (t == null) for (; ++s < r; ) isNaN(n = p2(e[s])) || (a = n - o, o += a / ++p, i += a * (n - o)); else for (; ++s < r; ) isNaN(n = p2(t(e[s], s, e))) || (a = n - o, o += a / ++p, i += a * (n - o)); if (p > 1) return i / (p - 1); } function T9(e, t) { var r = v9(e, t); return r && Math.sqrt(r); } function b9(e, t) { var r = -1, o = e.length, n, a, i; if (t == null) { for (; ++r < o; ) if ((a = e[r]) != null && a >= a) { n = i = a; break; } for (; ++r < o; ) (a = e[r]) != null && (n > a && (n = a), i < a && (i = a)); } else { for (; ++r < o; ) if ((a = t(e[r], r, e)) != null && a >= a) { n = i = a; break; } for (; ++r < o; ) (a = t(e[r], r, e)) != null && (n > a && (n = a), i < a && (i = a)); } return [n, i]; } var C9 = Array.prototype, Ir = C9.slice, Dr = C9.map; function l4(e) { return function() { return e; }; } function xr(e) { return e; } function I1(e, t, r) { e = +e, t = +t, r = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +r; for (var o = -1, n = Math.max(0, Math.ceil((t - e) / r)) | 0, a = new Array(n); ++o < n; ) a[o] = e + o * r; return a; } var Or = Math.sqrt(50), Hr = Math.sqrt(10), Ur = Math.sqrt(2); function C0(e, t, r) { var o = A2(e, t, r); return I1( Math.ceil(e / o) * o, Math.floor(t / o) * o + o / 2, o ); } function A2(e, t, r) { var o = Math.abs(t - e) / Math.max(0, r), n = Math.pow(10, Math.floor(Math.log(o) / Math.LN10)), a = o / n; return a >= Or ? n *= 10 : a >= Hr ? n *= 5 : a >= Ur && (n *= 2), t < e ? -n : n; } function A9(e) { return Math.ceil(Math.log(e.length) / Math.LN2) + 1; } function Vr() { var e = xr, t = b9, r = A9; function o(n) { var a, i = n.length, s, p = new Array(i); for (a = 0; a < i; ++a) p[a] = e(n[a], a, n); var l = t(p), y = l[0], u = l[1], c = r(p, y, u); Array.isArray(c) || (c = C0(y, u, c)); for (var g = c.length; c[0] <= y; ) c.shift(), --g; for (; c[g - 1] >= u; ) c.pop(), --g; var d = new Array(g + 1), m; for (a = 0; a <= g; ++a) m = d[a] = [], m.x0 = a > 0 ? c[a - 1] : y, m.x1 = a < g ? c[a] : u; for (a = 0; a < i; ++a) s = p[a], y <= s && s <= u && d[C2(c, s, 0, g)].push(n[a]); return d; } return o.value = function(n) { return arguments.length ? (e = typeof n == "function" ? n : l4(n), o) : e; }, o.domain = function(n) { return arguments.length ? (t = typeof n == "function" ? n : l4([n[0], n[1]]), o) : t; }, o.thresholds = function(n) { return arguments.length ? (r = typeof n == "function" ? n : Array.isArray(n) ? l4(Ir.call(n)) : l4(n), o) : r; }, o; } function O3(e, t, r) { if (r == null && (r = p2), !!(o = e.length)) { if ((t = +t) <= 0 || o < 2) return +r(e[0], 0, e); if (t >= 1) return +r(e[o - 1], o - 1, e); var o, n = (o - 1) * t, a = Math.floor(n), i = +r(e[a], a, e), s = +r(e[a + 1], a + 1, e); return i + (s - i) * (n - a); } } function zr(e, t, r) { return e = Dr.call(e, p2).sort(L2), Math.ceil((r - t) / (2 * (O3(e, 0.75) - O3(e, 0.25)) * Math.pow(e.length, -1 / 3))); } function Fr(e, t, r) { return Math.ceil((r - t) / (3.5 * T9(e) * Math.pow(e.length, -1 / 3))); } function Wr(e, t) { var r = -1, o = e.length, n, a; if (t == null) { for (; ++r < o; ) if ((a = e[r]) != null && a >= a) { n = a; break; } for (; ++r < o; ) (a = e[r]) != null && a > n && (n = a); } else { for (; ++r < o; ) if ((a = t(e[r], r, e)) != null && a >= a) { n = a; break; } for (; ++r < o; ) (a = t(e[r], r, e)) != null && a > n && (n = a); } return n; } function jr(e, t) { var r = 0, o = e.length, n, a = -1, i = o; if (t == null) for (; ++a < o; ) isNaN(n = p2(e[a])) ? --i : r += n; else for (; ++a < o; ) isNaN(n = p2(t(e[a], a, e))) ? --i : r += n; if (i) return r / i; } function Zr(e, t) { var r = [], o = e.length, n, a = -1; if (t == null) for (; ++a < o; ) isNaN(n = p2(e[a])) || r.push(n); else for (; ++a < o; ) isNaN(n = p2(t(e[a], a, e))) || r.push(n); return O3(r.sort(L2), 0.5); } function f6(e) { for (var t = e.length, r, o = -1, n = 0, a, i; ++o < t; ) n += e[o].length; for (a = new Array(n); --t >= 0; ) for (i = e[t], r = i.length; --r >= 0; ) a[--n] = i[r]; return a; } function B9(e, t) { var r = -1, o = e.length, n, a; if (t == null) { for (; ++r < o; ) if ((a = e[r]) != null && a >= a) { n = a; break; } for (; ++r < o; ) (a = e[r]) != null && n > a && (n = a); } else { for (; ++r < o; ) if ((a = t(e[r], r, e)) != null && a >= a) { n = a; break; } for (; ++r < o; ) (a = t(e[r], r, e)) != null && n > a && (n = a); } return n; } function Jr(e) { for (var t = 0, r = e.length - 1, o = e[0], n = new Array(r < 0 ? 0 : r); t < r; ) n[t] = [o, o = e[++t]]; return n; } function Yr(e, t) { for (var r = t.length, o = new Array(r); r--; ) o[r] = e[t[r]]; return o; } function $r(e, t) { if (!!(o = e.length)) { var r = 0, o, n = 0, a, i = e[n]; for (t || (t = L2); ++r < o; ) (t(a = e[r], i) < 0 || t(i, i) !== 0) && (i = a, n = r); if (t(i, i) === 0) return n; } } function Xr(e, t, r) { for (var o = (r == null ? e.length : r) - (t = t == null ? 0 : +t), n, a; o; ) a = Math.random() * o-- | 0, n = e[o + t], e[o + t] = e[a + t], e[a + t] = n; return e; } function qr(e, t) { var r = 0, o = e.length, n, a = -1; if (t == null) for (; ++a < o; ) (n = +e[a]) && (r += n); else for (; ++a < o; ) (n = +t(e[a], a, e)) && (r += n); return r; } function N9(e) { if (!(a = e.length)) return []; for (var t = -1, r = B9(e, Qr), o = new Array(r); ++t < r; ) for (var n = -1, a, i = o[t] = new Array(a); ++n < a; ) i[n] = e[n][t]; return o; } function Qr(e) { return e.length; } function eo() { return N9(arguments); } var E1 = "$"; function D4() { } D4.prototype = Z1.prototype = { constructor: D4, has: function(e) { return E1 + e in this; }, get: function(e) { return this[E1 + e]; }, set: function(e, t) { return this[E1 + e] = t, this; }, remove: function(e) { var t = E1 + e; return t in this && delete this[t]; }, clear: function() { for (var e in this) e[0] === E1 && delete this[e]; }, keys: function() { var e = []; for (var t in this) t[0] === E1 && e.push(t.slice(1)); return e; }, values: function() { var e = []; for (var t in this) t[0] === E1 && e.push(this[t]); return e; }, entries: function() { var e = []; for (var t in this) t[0] === E1 && e.push({ key: t.slice(1), value: this[t] }); return e; }, size: function() { var e = 0; for (var t in this) t[0] === E1 && ++e; return e; }, empty: function() { for (var e in this) if (e[0] === E1) return !1; return !0; }, each: function(e) { for (var t in this) t[0] === E1 && e(this[t], t.slice(1), this); } }; function Z1(e, t) { var r = new D4(); if (e instanceof D4) e.each(function(s, p) { r.set(p, s); }); else if (Array.isArray(e)) { var o = -1, n = e.length, a; if (t == null) for (; ++o < n; ) r.set(o, e[o]); else for (; ++o < n; ) r.set(t(a = e[o], o, e), a); } else if (e) for (var i in e) r.set(i, e[i]); return r; } function to() { var e = [], t = [], r, o, n; function a(s, p, l, y) { if (p >= e.length) return o != null ? o(s) : r != null ? s.sort(r) : s; for (var u = -1, c = s.length, g = e[p++], d, m, f = Z1(), h, M = l(); ++u < c; ) (h = f.get(d = g(m = s[u]) + "")) ? h.push(m) : f.set(d, [m]); return f.each(function(P, b) { y(M, b, a(P, p, l, y)); }), M; } function i(s, p) { if (++p > e.length) return s; var l, y = t[p - 1]; return o != null && p >= e.length ? l = s.entries() : (l = [], s.each(function(u, c) { l.push({ key: c, values: i(u, p) }); })), y != null ? l.sort(function(u, c) { return y(u.key, c.key); }) : l; } return n = { object: function(s) { return a(s, 0, ro, oo); }, map: function(s) { return a(s, 0, R7, L7); }, entries: function(s) { return i(a(s, 0, R7, L7), 0); }, key: function(s) { return e.push(s), n; }, sortKeys: function(s) { return t[e.length - 1] = s, n; }, sortValues: function(s) { return r = s, n; }, rollup: function(s) { return o = s, n; } }; } function ro() { return {}; } function oo(e, t, r) { e[t] = r; } function R7() { return Z1(); } function L7(e, t, r) { e.set(t, r); } function x4() { } var P2 = Z1.prototype; x4.prototype = G9.prototype = { constructor: x4, has: P2.has, add: function(e) { return e += "", this[E1 + e] = e, this; }, remove: P2.remove, clear: P2.clear, values: P2.keys, size: P2.size, empty: P2.empty, each: P2.each }; function G9(e, t) { var r = new x4(); if (e instanceof x4) e.each(function(a) { r.add(a); }); else if (e) { var o = -1, n = e.length; if (t == null) for (; ++o < n; ) r.add(e[o]); else for (; ++o < n; ) r.add(t(e[o], o, e)); } return r; } function no(e) { var t = []; for (var r in e) t.push(r); return t; } function ao(e) { var t = []; for (var r in e) t.push(e[r]); return t; } function io(e) { var t = []; for (var r in e) t.push({ key: r, value: e[r] }); return t; } function so(e, t) { return e = e == null ? 0 : +e, t = t == null ? 1 : +t, arguments.length === 1 ? (t = e, e = 0) : t -= e, function() { return Math.random() * t + e; }; } function _9(e, t) { var r, o; return e = e == null ? 0 : +e, t = t == null ? 1 : +t, function() { var n; if (r != null) n = r, r = null; else do r = Math.random() * 2 - 1, n = Math.random() * 2 - 1, o = r * r + n * n; while (!o || o > 1); return e + t * n * Math.sqrt(-2 * Math.log(o) / o); }; } function po() { var e = _9.apply(this, arguments); return function() { return Math.exp(e()); }; } function w9(e) { return function() { for (var t = 0, r = 0; r < e; ++r) t += Math.random(); return t; }; } function lo(e) { var t = w9(e); return function() { return t() / e; }; } function yo(e) { return function() { return -Math.log(1 - Math.random()) / e; }; } function co(e) { return +e; } function uo(e) { return e * e; } function go(e) { return e * (2 - e); } function E7(e) { return ((e *= 2) <= 1 ? e * e : --e * (2 - e) + 1) / 2; } function mo(e) { return e * e * e; } function fo(e) { return --e * e * e + 1; } function _5(e) { return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2; } var h6 = 3, ho = function e(t) { t = +t; function r(o) { return Math.pow(o, t); } return r.exponent = e, r; }(h6), Po = function e(t) { t = +t; function r(o) { return 1 - Math.pow(1 - o, t); } return r.exponent = e, r; }(h6), k7 = function e(t) { t = +t; function r(o) { return ((o *= 2) <= 1 ? Math.pow(o, t) : 2 - Math.pow(2 - o, t)) / 2; } return r.exponent = e, r; }(h6), R9 = Math.PI, L9 = R9 / 2; function Mo(e) { return 1 - Math.cos(e * L9); } function So(e) { return Math.sin(e * L9); } function K7(e) { return (1 - Math.cos(R9 * e)) / 2; } function vo(e) { return Math.pow(2, 10 * e - 10); } function To(e) { return 1 - Math.pow(2, -10 * e); } function I7(e) { return ((e *= 2) <= 1 ? Math.pow(2, 10 * e - 10) : 2 - Math.pow(2, 10 - 10 * e)) / 2; } function bo(e) { return 1 - Math.sqrt(1 - e * e); } function Co(e) { return Math.sqrt(1 - --e * e); } function D7(e) { return ((e *= 2) <= 1 ? 1 - Math.sqrt(1 - e * e) : Math.sqrt(1 - (e -= 2) * e) + 1) / 2; } var w5 = 4 / 11, Ao = 6 / 11, Bo = 8 / 11, No = 3 / 4, Go = 9 / 11, _o = 10 / 11, wo = 15 / 16, Ro = 21 / 22, Lo = 63 / 64, y4 = 1 / w5 / w5; function Eo(e) { return 1 - H3(1 - e); } function H3(e) { return (e = +e) < w5 ? y4 * e * e : e < Bo ? y4 * (e -= Ao) * e + No : e < _o ? y4 * (e -= Go) * e + wo : y4 * (e -= Ro) * e + Lo; } function ko(e) { return ((e *= 2) <= 1 ? 1 - H3(1 - e) : H3(e - 1) + 1) / 2; } var P6 = 1.70158, Ko = function e(t) { t = +t; function r(o) { return o * o * ((t + 1) * o - t); } return r.overshoot = e, r; }(P6), Io = function e(t) { t = +t; function r(o) { return --o * o * ((t + 1) * o + t) + 1; } return r.overshoot = e, r; }(P6), x7 = function e(t) { t = +t; function r(o) { return ((o *= 2) < 1 ? o * o * ((t + 1) * o - t) : (o -= 2) * o * ((t + 1) * o + t) + 2) / 2; } return r.overshoot = e, r; }(P6), r3 = 2 * Math.PI, M6 = 1, S6 = 0.3, Do = function e(t, r) { var o = Math.asin(1 / (t = Math.max(1, t))) * (r /= r3); function n(a) { return t * Math.pow(2, 10 * --a) * Math.sin((o - a) / r); } return n.amplitude = function(a) { return e(a, r * r3); }, n.period = function(a) { return e(t, a); }, n; }(M6, S6), O7 = function e(t, r) { var o = Math.asin(1 / (t = Math.max(1, t))) * (r /= r3); function n(a) { return 1 - t * Math.pow(2, -10 * (a = +a)) * Math.sin((a + o) / r); } return n.amplitude = function(a) { return e(a, r * r3); }, n.period = function(a) { return e(t, a); }, n; }(M6, S6), xo = function e(t, r) { var o = Math.asin(1 / (t = Math.max(1, t))) * (r /= r3); function n(a) { return ((a = a * 2 - 1) < 0 ? t * Math.pow(2, 10 * a) * Math.sin((o - a) / r) : 2 - t * Math.pow(2, -10 * a) * Math.sin((o + a) / r)) / 2; } return n.amplitude = function(a) { return e(a, r * r3); }, n.period = function(a) { return e(t, a); }, n; }(M6, S6); function Oo(e) { for (var t = -1, r = e.length, o, n = e[r - 1], a = 0; ++t < r; ) o = n, n = e[t], a += o[1] * n[0] - o[0] * n[1]; return a / 2; } function Ho(e) { for (var t = -1, r = e.length, o = 0, n = 0, a, i = e[r - 1], s, p = 0; ++t < r; ) a = i, i = e[t], p += s = a[0] * i[1] - i[0] * a[1], o += (a[0] + i[0]) * s, n += (a[1] + i[1]) * s; return p *= 3, [o / p, n / p]; } function Uo(e, t, r) { return (t[0] - e[0]) * (r[1] - e[1]) - (t[1] - e[1]) * (r[0] - e[0]); } function Vo(e, t) { return e[0] - t[0] || e[1] - t[1]; } function H7(e) { for (var t = e.length, r = [0, 1], o = 2, n = 2; n < t; ++n) { for (; o > 1 && Uo(e[r[o - 2]], e[r[o - 1]], e[n]) <= 0; ) --o; r[o++] = n; } return r.slice(0, o); } function zo(e) { if ((r = e.length) < 3) return null; var t, r, o = new Array(r), n = new Array(r); for (t = 0; t < r; ++t) o[t] = [+e[t][0], +e[t][1], t]; for (o.sort(Vo), t = 0; t < r; ++t) n[t] = [o[t][0], -o[t][1]]; var a = H7(o), i = H7(n), s = i[0] === a[0], p = i[i.length - 1] === a[a.length - 1], l = []; for (t = a.length - 1; t >= 0; --t) l.push(e[o[a[t]][2]]); for (t = +s; t < i.length - p; ++t) l.push(e[o[i[t]][2]]); return l; } function Fo(e, t) { for (var r = e.length, o = e[r - 1], n = t[0], a = t[1], i = o[0], s = o[1], p, l, y = !1, u = 0; u < r; ++u) o = e[u], p = o[0], l = o[1], l > a != s > a && n < (i - p) * (a - l) / (s - l) + p && (y = !y), i = p, s = l; return y; } function Wo(e) { for (var t = -1, r = e.length, o = e[r - 1], n, a, i = o[0], s = o[1], p = 0; ++t < r; ) n = i, a = s, o = e[t], i = o[0], s = o[1], n -= i, a -= s, p += Math.sqrt(n * n + a * a); return p; } var R5 = Math.PI, L5 = 2 * R5, Z2 = 1e-6, jo = L5 - Z2; function E5() { this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = []; } function E2() { return new E5(); } E5.prototype = E2.prototype = { constructor: E5, moveTo: function(e, t) { this._.push("M", this._x0 = this._x1 = +e, ",", this._y0 = this._y1 = +t); }, closePath: function() { this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._.push("Z")); }, lineTo: function(e, t) { this._.push("L", this._x1 = +e, ",", this._y1 = +t); }, quadraticCurveTo: function(e, t, r, o) { this._.push("Q", +e, ",", +t, ",", this._x1 = +r, ",", this._y1 = +o); }, bezierCurveTo: function(e, t, r, o, n, a) { this._.push("C", +e, ",", +t, ",", +r, ",", +o, ",", this._x1 = +n, ",", this._y1 = +a); }, arcTo: function(e, t, r, o, n) { e = +e, t = +t, r = +r, o = +o, n = +n; var a = this._x1, i = this._y1, s = r - e, p = o - t, l = a - e, y = i - t, u = l * l + y * y; if (n < 0) throw new Error("negative radius: " + n); if (this._x1 === null) this._.push( "M", this._x1 = e, ",", this._y1 = t ); else if (u > Z2) if (!(Math.abs(y * s - p * l) > Z2) || !n) this._.push( "L", this._x1 = e, ",", this._y1 = t ); else { var c = r - a, g = o - i, d = s * s + p * p, m = c * c + g * g, f = Math.sqrt(d), h = Math.sqrt(u), M = n * Math.tan((R5 - Math.acos((d + u - m) / (2 * f * h))) / 2), P = M / h, b = M / f; Math.abs(P - 1) > Z2 && this._.push( "L", e + P * l, ",", t + P * y ), this._.push( "A", n, ",", n, ",0,0,", +(y * c > l * g), ",", this._x1 = e + b * s, ",", this._y1 = t + b * p ); } }, arc: function(e, t, r, o, n, a) { e = +e, t = +t, r = +r; var i = r * Math.cos(o), s = r * Math.sin(o), p = e + i, l = t + s, y = 1 ^ a, u = a ? o - n : n - o; if (r < 0) throw new Error("negative radius: " + r); this._x1 === null ? this._.push( "M", p, ",", l ) : (Math.abs(this._x1 - p) > Z2 || Math.abs(this._y1 - l) > Z2) && this._.push( "L", p, ",", l ), r && (u > jo ? this._.push( "A", r, ",", r, ",0,1,", y, ",", e - i, ",", t - s, "A", r, ",", r, ",0,1,", y, ",", this._x1 = p, ",", this._y1 = l ) : (u < 0 && (u = u % L5 + L5), this._.push( "A", r, ",", r, ",0,", +(u >= R5), ",", y, ",", this._x1 = e + r * Math.cos(n), ",", this._y1 = t + r * Math.sin(n) ))); }, rect: function(e, t, r, o) { this._.push("M", this._x0 = this._x1 = +e, ",", this._y0 = this._y1 = +t, "h", +r, "v", +o, "h", -r, "Z"); }, toString: function() { return this._.join(""); } }; function Zo(e) { var t = +this._x.call(null, e), r = +this._y.call(null, e); return E9(this.cover(t, r), t, r, e); } function E9(e, t, r, o) { if (isNaN(t) || isNaN(r)) return e; var n, a = e._root, i = { data: o }, s = e._x0, p = e._y0, l = e._x1, y = e._y1, u, c, g, d, m, f, h, M; if (!a) return e._root = i, e; for (; a.length; ) if ((m = t >= (u = (s + l) / 2)) ? s = u : l = u, (f = r >= (c = (p + y) / 2)) ? p = c : y = c, n = a, !(a = a[h = f << 1 | m])) return n[h] = i, e; if (g = +e._x.call(null, a.data), d = +e._y.call(null, a.data), t === g && r === d) return i.next = a, n ? n[h] = i : e._root = i, e; do n = n ? n[h] = new Array(4) : e._root = new Array(4), (m = t >= (u = (s + l) / 2)) ? s = u : l = u, (f = r >= (c = (p + y) / 2)) ? p = c : y = c; while ((h = f << 1 | m) === (M = (d >= c) << 1 | g >= u)); return n[M] = a, n[h] = i, e; } function Jo(e) { var t, r, o = e.length, n, a, i = new Array(o), s = new Array(o), p = 1 / 0, l = 1 / 0, y = -1 / 0, u = -1 / 0; for (r = 0; r < o; ++r) isNaN(n = +this._x.call(null, t = e[r])) || isNaN(a = +this._y.call(null, t)) || (i[r] = n, s[r] = a, n < p && (p = n), n > y && (y = n), a < l && (l = a), a > u && (u = a)); for (y < p && (p = this._x0, y = this._x1), u < l && (l = this._y0, u = this._y1), this.cover(p, l).cover(y, u), r = 0; r < o; ++r) E9(this, i[r], s[r], e[r]); return this; } function Yo(e, t) { if (isNaN(e = +e) || isNaN(t = +t)) return this; var r = this._x0, o = this._y0, n = this._x1, a = this._y1; if (isNaN(r)) n = (r = Math.floor(e)) + 1, a = (o = Math.floor(t)) + 1; else if (r > e || e > n || o > t || t > a) { var i = n - r, s = this._root, p, l; switch (l = (t < (o + a) / 2) << 1 | e < (r + n) / 2) { case 0: { do p = new Array(4), p[l] = s, s = p; while (i *= 2, n = r + i, a = o + i, e > n || t > a); break; } case 1: { do p = new Array(4), p[l] = s, s = p; while (i *= 2, r = n - i, a = o + i, r > e || t > a); break; } case 2: { do p = new Array(4), p[l] = s, s = p; while (i *= 2, n = r + i, o = a - i, e > n || o > t); break; } case 3: { do p = new Array(4), p[l] = s, s = p; while (i *= 2, r = n - i, o = a - i, r > e || o > t); break; } } this._root && this._root.length && (this._root = s); } else return this; return this._x0 = r, this._y0 = o, this._x1 = n, this._y1 = a, this; } function $o() { var e = []; return this.visit(function(t) { if (!t.length) do e.push(t.data); while (t = t.next); }), e; } function Xo(e) { return arguments.length ? this.cover(+e[0][0], +e[0][1]).cover(+e[1][0], +e[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]]; } function v1(e, t, r, o, n) { this.node = e, this.x0 = t, this.y0 = r, this.x1 = o, this.y1 = n; } function qo(e, t, r) { var o, n = this._x0, a = this._y0, i, s, p, l, y = this._x1, u = this._y1, c = [], g = this._root, d, m; for (g && c.push(new v1(g, n, a, y, u)), r == null ? r = 1 / 0 : (n = e - r, a = t - r, y = e + r, u = t + r, r *= r); d = c.pop(); ) if (!(!(g = d.node) || (i = d.x0) > y || (s = d.y0) > u || (p = d.x1) < n || (l = d.y1) < a)) if (g.length) { var f = (i + p) / 2, h = (s + l) / 2; c.push( new v1(g[3], f, h, p, l), new v1(g[2], i, h, f, l), new v1(g[1], f, s, p, h), new v1(g[0], i, s, f, h) ), (m = (t >= h) << 1 | e >= f) && (d = c[c.length - 1], c[c.length - 1] = c[c.length - 1 - m], c[c.length - 1 - m] = d); } else { var M = e - +this._x.call(null, g.data), P = t - +this._y.call(null, g.data), b = M * M + P * P; if (b < r) { var v = Math.sqrt(r = b); n = e - v, a = t - v, y = e + v, u = t + v, o = g.data; } } return o; } function Qo(e) { if (isNaN(y = +this._x.call(null, e)) || isNaN(u = +this._y.call(null, e))) return this; var t, r = this._root, o, n, a, i = this._x0, s = this._y0, p = this._x1, l = this._y1, y, u, c, g, d, m, f, h; if (!r) return this; if (r.length) for (; ; ) { if ((d = y >= (c = (i + p) / 2)) ? i = c : p = c, (m = u >= (g = (s + l) / 2)) ? s = g : l = g, t = r, !(r = r[f = m << 1 | d])) return this; if (!r.length) break; (t[f + 1 & 3] || t[f + 2 & 3] || t[f + 3 & 3]) && (o = t, h = f); } for (; r.data !== e; ) if (n = r, !(r = r.next)) return this; return (a = r.next) && delete r.next, n ? (a ? n.next = a : delete n.next, this) : t ? (a ? t[f] = a : delete t[f], (r = t[0] || t[1] || t[2] || t[3]) && r === (t[3] || t[2] || t[1] || t[0]) && !r.length && (o ? o[h] = r : this._root = r), this) : (this._root = a, this); } function en(e) { for (var t = 0, r = e.length; t < r; ++t) this.remove(e[t]); return this; } function tn() { return this._root; } function rn() { var e = 0; return this.visit(function(t) { if (!t.length) do ++e; while (t = t.next); }), e; } function on(e) { var t = [], r, o = this._root, n, a, i, s, p; for (o && t.push(new v1(o, this._x0, this._y0, this._x1, this._y1)); r = t.pop(); ) if (!e(o = r.node, a = r.x0, i = r.y0, s = r.x1, p = r.y1) && o.length) { var l = (a + s) / 2, y = (i + p) / 2; (n = o[3]) && t.push(new v1(n, l, y, s, p)), (n = o[2]) && t.push(new v1(n, a, y, l, p)), (n = o[1]) && t.push(new v1(n, l, i, s, y)), (n = o[0]) && t.push(new v1(n, a, i, l, y)); } return this; } function nn(e) { var t = [], r = [], o; for (this._root && t.push(new v1(this._root, this._x0, this._y0, this._x1, this._y1)); o = t.pop(); ) { var n = o.node; if (n.length) { var a, i = o.x0, s = o.y0, p = o.x1, l = o.y1, y = (i + p) / 2, u = (s + l) / 2; (a = n[0]) && t.push(new v1(a, i, s, y, u)), (a = n[1]) && t.push(new v1(a, y, s, p, u)), (a = n[2]) && t.push(new v1(a, i, u, y, l)), (a = n[3]) && t.push(new v1(a, y, u, p, l)); } r.push(o); } for (; o = r.pop(); ) e(o.node, o.x0, o.y0, o.x1, o.y1); return this; } function an(e) { return e[0]; } function sn(e) { return arguments.length ? (this._x = e, this) : this._x; } function pn(e) { return e[1]; } function ln(e) { return arguments.length ? (this._y = e, this) : this._y; } function A0(e, t, r) { var o = new v6(t == null ? an : t, r == null ? pn : r, NaN, NaN, NaN, NaN); return e == null ? o : o.addAll(e); } function v6(e, t, r, o, n, a) { this._x = e, this._y = t, this._x0 = r, this._y0 = o, this._x1 = n, this._y1 = a, this._root = void 0; } function U7(e) { for (var t = { data: e.data }, r = t; e = e.next; ) r = r.next = { data: e.data }; return t; } var C1 = A0.prototype = v6.prototype; C1.copy = function() { var e = new v6(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, r, o; if (!t) return e; if (!t.length) return e._root = U7(t), e; for (r = [{ source: t, target: e._root = new Array(4) }]; t = r.pop(); ) for (var n = 0; n < 4; ++n) (o = t.source[n]) && (o.length ? r.push({ source: o, target: t.target[n] = new Array(4) }) : t.target[n] = U7(o)); return e; }; C1.add = Zo; C1.addAll = Jo; C1.cover = Yo; C1.data = $o; C1.extent = Xo; C1.find = qo; C1.remove = Qo; C1.removeAll = en; C1.root = tn; C1.size = rn; C1.visit = on; C1.visitAfter = nn; C1.x = sn; C1.y = ln; var yn = [].slice, cn = {}; function k5(e) { if (!(e >= 1)) throw new Error(); this._size = e, this._call = this._error = null, this._tasks = [], this._data = [], this._waiting = this._active = this._ended = this._start = 0; } k5.prototype = K9.prototype = { constructor: k5, defer: function(e) { if (typeof e != "function" || this._call) throw new Error(); if (this._error != null) return this; var t = yn.call(arguments, 1); return t.push(e), ++this._waiting, this._tasks.push(t), k9(this), this; }, abort: function() { return this._error == null && T6(this, new Error("abort")), this; }, await: function(e) { if (typeof e != "function" || this._call) throw new Error(); return this._call = function(t, r) { e.apply(null, [t].concat(r)); }, O4(this), this; }, awaitAll: function(e) { if (typeof e != "function" || this._call) throw new Error(); return this._call = e, O4(this), this; } }; function k9(e) { if (!e._start) try { un(e); } catch (t) { e._tasks[e._ended + e._active - 1] && T6(e, t); } } function un(e) { for (; e._start = e._waiting && e._active < e._size; ) { var t = e._ended + e._active, r = e._tasks[t], o = r.length - 1, n = r[o]; r[o] = gn(e, t), --e._waiting, ++e._active, r = n.apply(null, r), e._tasks[t] && (e._tasks[t] = r || cn); } } function gn(e, t) { return function(r, o) { !e._tasks[t] || (--e._active, ++e._ended, e._tasks[t] = null, e._error == null && (r != null ? T6(e, r) : (e._data[t] = o, e._waiting ? k9(e) : O4(e)))); }; } function T6(e, t) { var r = e._tasks.length, o; for (e._error = t, e._data = void 0, e._waiting = NaN; --r >= 0; ) if ((o = e._tasks[r]) && (e._tasks[r] = null, o.abort)) try { o.abort(); } catch { } e._active = NaN, O4(e); } function O4(e) { !e._active && e._call && e._call(e._error, e._data); } function K9(e) { return new k5(arguments.length ? +e : 1 / 0); } function W(e) { return function() { return e; }; } var d1 = 1e-12, B2 = Math.PI, H4 = B2 / 2, i2 = 2 * B2; function dn(e) { return e.innerRadius; } function mn(e) { return e.outerRadius; } function fn(e) { return e.startAngle; } function hn(e) { return e.endAngle; } function Pn(e) { return e && e.padAngle; } function V7(e) { return e >= 1 ? H4 : e <= -1 ? -H4 : Math.asin(e); } function Mn(e, t, r, o, n, a, i, s) { var p = r - e, l = o - t, y = i - n, u = s - a, c = (y * (t - a) - u * (e - n)) / (u * p - y * l); return [e + c * p, t + c * l]; } function c4(e, t, r, o, n, a, i) { var s = e - r, p = t - o, l = (i ? a : -a) / Math.sqrt(s * s + p * p), y = l * p, u = -l * s, c = e + y, g = t + u, d = r + y, m = o + u, f = (c + d) / 2, h = (g + m) / 2, M = d - c, P = m - g, b = M * M + P * P, v = n - a, T = c * m - d * g, C = (P < 0 ? -1 : 1) * Math.sqrt(Math.max(0, v * v * b - T * T)), B = (T * P - M * C) / b, N = (-T * M - P * C) / b, R = (T * P + M * C) / b, _ = (-T * M + P * C) / b, G = B - f, S = N - h, A = R - f, w = _ - h; return G * G + S * S > A * A + w * w && (B = R, N = _), { cx: B, cy: N, x01: -y, y01: -u, x11: B * (n / v - 1), y11: N * (n / v - 1) }; } function Sn() { var e = dn, t = mn, r = W(0), o = null, n = fn, a = hn, i = Pn, s = null; function p() { var l, y, u = +e.apply(this, arguments), c = +t.apply(this, arguments), g = n.apply(this, arguments) - H4, d = a.apply(this, arguments) - H4, m = Math.abs(d - g), f = d > g; if (s || (s = l = E2()), c < u && (y = c, c = u, u = y), !(c > d1)) s.moveTo(0, 0); else if (m > i2 - d1) s.moveTo(c * Math.cos(g), c * Math.sin(g)), s.arc(0, 0, c, g, d, !f), u > d1 && (s.moveTo(u * Math.cos(d), u * Math.sin(d)), s.arc(0, 0, u, d, g, f)); else { var h = g, M = d, P = g, b = d, v = m, T = m, C = i.apply(this, arguments) / 2, B = C > d1 && (o ? +o.apply(this, arguments) : Math.sqrt(u * u + c * c)), N = Math.min(Math.abs(c - u) / 2, +r.apply(this, arguments)), R = N, _ = N, G, S; if (B > d1) { var A = V7(B / u * Math.sin(C)), w = V7(B / c * Math.sin(C)); (v -= A * 2) > d1 ? (A *= f ? 1 : -1, P += A, b -= A) : (v = 0, P = b = (g + d) / 2), (T -= w * 2) > d1 ? (w *= f ? 1 : -1, h += w, M -= w) : (T = 0, h = M = (g + d) / 2); } var L = c * Math.cos(h), E = c * Math.sin(h), V = u * Math.cos(b), F = u * Math.sin(b); if (N > d1) { var q = c * Math.cos(M), J = c * Math.sin(M), Q = u * Math.cos(P), Y = u * Math.sin(P); if (m < B2) { var e1 = v > d1 ? Mn(L, E, Q, Y, q, J, V, F) : [V, F], $ = L - e1[0], S1 = E - e1[1], k = q - e1[0], U = J - e1[1], z = 1 / Math.sin(Math.acos(($ * k + S1 * U) / (Math.sqrt($ * $ + S1 * S1) * Math.sqrt(k * k + U * U))) / 2), K = Math.sqrt(e1[0] * e1[0] + e1[1] * e1[1]); R = Math.min(N, (u - K) / (z - 1)), _ = Math.min(N, (c - K) / (z + 1)); } } T > d1 ? _ > d1 ? (G = c4(Q, Y, L, E, c, _, f), S = c4(q, J, V, F, c, _, f), s.moveTo(G.cx + G.x01, G.cy + G.y01), _ < N ? s.arc(G.cx, G.cy, _, Math.atan2(G.y01, G.x01), Math.atan2(S.y01, S.x01), !f) : (s.arc(G.cx, G.cy, _, Math.atan2(G.y01, G.x01), Math.atan2(G.y11, G.x11), !f), s.arc(0, 0, c, Math.atan2(G.cy + G.y11, G.cx + G.x11), Math.atan2(S.cy + S.y11, S.cx + S.x11), !f), s.arc(S.cx, S.cy, _, Math.atan2(S.y11, S.x11), Math.atan2(S.y01, S.x01), !f))) : (s.moveTo(L, E), s.arc(0, 0, c, h, M, !f)) : s.moveTo(L, E), !(u > d1) || !(v > d1) ? s.lineTo(V, F) : R > d1 ? (G = c4(V, F, q, J, u, -R, f), S = c4(L, E, Q, Y, u, -R, f), s.lineTo(G.cx + G.x01, G.cy + G.y01), R < N ? s.arc(G.cx, G.cy, R, Math.atan2(G.y01, G.x01), Math.atan2(S.y01, S.x01), !f) : (s.arc(G.cx, G.cy, R, Math.atan2(G.y01, G.x01), Math.atan2(G.y11, G.x11), !f), s.arc(0, 0, u, Math.atan2(G.cy + G.y11, G.cx + G.x11), Math.atan2(S.cy + S.y11, S.cx + S.x11), f), s.arc(S.cx, S.cy, R, Math.atan2(S.y11, S.x11), Math.atan2(S.y01, S.x01), !f))) : s.arc(0, 0, u, b, P, f); } if (s.closePath(), l) return s = null, l + "" || null; } return p.centroid = function() { var l = (+e.apply(this, arguments) + +t.apply(this, arguments)) / 2, y = (+n.apply(this, arguments) + +a.apply(this, arguments)) / 2 - B2 / 2; return [Math.cos(y) * l, Math.sin(y) * l]; }, p.innerRadius = function(l) { return arguments.length ? (e = typeof l == "function" ? l : W(+l), p) : e; }, p.outerRadius = function(l) { return arguments.length ? (t = typeof l == "function" ? l : W(+l), p) : t; }, p.cornerRadius = function(l) { return arguments.length ? (r = typeof l == "function" ? l : W(+l), p) : r; }, p.padRadius = function(l) { return arguments.length ? (o = l == null ? null : typeof l == "function" ? l : W(+l), p) : o; }, p.startAngle = function(l) { return arguments.length ? (n = typeof l == "function" ? l : W(+l), p) : n; }, p.endAngle = function(l) { return arguments.length ? (a = typeof l == "function" ? l : W(+l), p) : a; }, p.padAngle = function(l) { return arguments.length ? (i = typeof l == "function" ? l : W(+l), p) : i; }, p.context = function(l) { return arguments.length ? (s = l == null ? null : l, p) : s; }, p; } function I9(e) { this._context = e; } I9.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(e, t) { switch (e = +e, t = +t, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t); break; case 1: this._point = 2; default: this._context.lineTo(e, t); break; } } }; function B0(e) { return new I9(e); } function D9(e) { return e[0]; } function x9(e) { return e[1]; } function b6() { var e = D9, t = x9, r = W(!0), o = null, n = B0, a = null; function i(s) { var p, l = s.length, y, u = !1, c; for (o == null && (a = n(c = E2())), p = 0; p <= l; ++p) !(p < l && r(y = s[p], p, s)) === u && ((u = !u) ? a.lineStart() : a.lineEnd()), u && a.point(+e(y, p, s), +t(y, p, s)); if (c) return a = null, c + "" || null; } return i.x = function(s) { return arguments.length ? (e = typeof s == "function" ? s : W(+s), i) : e; }, i.y = function(s) { return arguments.length ? (t = typeof s == "function" ? s : W(+s), i) : t; }, i.defined = function(s) { return arguments.length ? (r = typeof s == "function" ? s : W(!!s), i) : r; }, i.curve = function(s) { return arguments.length ? (n = s, o != null && (a = n(o)), i) : n; }, i.context = function(s) { return arguments.length ? (s == null ? o = a = null : a = n(o = s), i) : o; }, i; } function O9() { var e = D9, t = null, r = W(0), o = x9, n = W(!0), a = null, i = B0, s = null; function p(y) { var u, c, g, d = y.length, m, f = !1, h, M = new Array(d), P = new Array(d); for (a == null && (s = i(h = E2())), u = 0; u <= d; ++u) { if (!(u < d && n(m = y[u], u, y)) === f) if (f = !f) c = u, s.areaStart(), s.lineStart(); else { for (s.lineEnd(), s.lineStart(), g = u - 1; g >= c; --g) s.point(M[g], P[g]); s.lineEnd(), s.areaEnd(); } f && (M[u] = +e(m, u, y), P[u] = +r(m, u, y), s.point(t ? +t(m, u, y) : M[u], o ? +o(m, u, y) : P[u])); } if (h) return s = null, h + "" || null; } function l() { return b6().defined(n).curve(i).context(a); } return p.x = function(y) { return arguments.length ? (e = typeof y == "function" ? y : W(+y), t = null, p) : e; }, p.x0 = function(y) { return arguments.length ? (e = typeof y == "function" ? y : W(+y), p) : e; }, p.x1 = function(y) { return arguments.length ? (t = y == null ? null : typeof y == "function" ? y : W(+y), p) : t; }, p.y = function(y) { return arguments.length ? (r = typeof y == "function" ? y : W(+y), o = null, p) : r; }, p.y0 = function(y) { return arguments.length ? (r = typeof y == "function" ? y : W(+y), p) : r; }, p.y1 = function(y) { return arguments.length ? (o = y == null ? null : typeof y == "function" ? y : W(+y), p) : o; }, p.lineX0 = p.lineY0 = function() { return l().x(e).y(r); }, p.lineY1 = function() { return l().x(e).y(o); }, p.lineX1 = function() { return l().x(t).y(r); }, p.defined = function(y) { return arguments.length ? (n = typeof y == "function" ? y : W(!!y), p) : n; }, p.curve = function(y) { return arguments.length ? (i = y, a != null && (s = i(a)), p) : i; }, p.context = function(y) { return arguments.length ? (y == null ? a = s = null : s = i(a = y), p) : a; }, p; } function vn(e, t) { return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN; } function Tn(e) { return e; } function bn() { var e = Tn, t = vn, r = null, o = W(0), n = W(i2), a = W(0); function i(s) { var p, l = s.length, y, u, c = 0, g = new Array(l), d = new Array(l), m = +o.apply(this, arguments), f = Math.min(i2, Math.max(-i2, n.apply(this, arguments) - m)), h, M = Math.min(Math.abs(f) / l, a.apply(this, arguments)), P = M * (f < 0 ? -1 : 1), b; for (p = 0; p < l; ++p) (b = d[g[p] = p] = +e(s[p], p, s)) > 0 && (c += b); for (t != null ? g.sort(function(v, T) { return t(d[v], d[T]); }) : r != null && g.sort(function(v, T) { return r(s[v], s[T]); }), p = 0, u = c ? (f - l * P) / c : 0; p < l; ++p, m = h) y = g[p], b = d[y], h = m + (b > 0 ? b * u : 0) + P, d[y] = { data: s[y], index: p, value: b, startAngle: m, endAngle: h, padAngle: M }; return d; } return i.value = function(s) { return arguments.length ? (e = typeof s == "function" ? s : W(+s), i) : e; }, i.sortValues = function(s) { return arguments.length ? (t = s, r = null, i) : t; }, i.sort = function(s) { return arguments.length ? (r = s, t = null, i) : r; }, i.startAngle = function(s) { return arguments.length ? (o = typeof s == "function" ? s : W(+s), i) : o; }, i.endAngle = function(s) { return arguments.length ? (n = typeof s == "function" ? s : W(+s), i) : n; }, i.padAngle = function(s) { return arguments.length ? (a = typeof s == "function" ? s : W(+s), i) : a; }, i; } var H9 = C6(B0); function U9(e) { this._curve = e; } U9.prototype = { areaStart: function() { this._curve.areaStart(); }, areaEnd: function() { this._curve.areaEnd(); }, lineStart: function() { this._curve.lineStart(); }, lineEnd: function() { this._curve.lineEnd(); }, point: function(e, t) { this._curve.point(t * Math.sin(e), t * -Math.cos(e)); } }; function C6(e) { function t(r) { return new U9(e(r)); } return t._curve = e, t; } function B3(e) { var t = e.curve; return e.angle = e.x, delete e.x, e.radius = e.y, delete e.y, e.curve = function(r) { return arguments.length ? t(C6(r)) : t()._curve; }, e; } function Cn() { return B3(b6().curve(H9)); } function An() { var e = O9().curve(H9), t = e.curve, r = e.lineX0, o = e.lineX1, n = e.lineY0, a = e.lineY1; return e.angle = e.x, delete e.x, e.startAngle = e.x0, delete e.x0, e.endAngle = e.x1, delete e.x1, e.radius = e.y, delete e.y, e.innerRadius = e.y0, delete e.y0, e.outerRadius = e.y1, delete e.y1, e.lineStartAngle = function() { return B3(r()); }, delete e.lineX0, e.lineEndAngle = function() { return B3(o()); }, delete e.lineX1, e.lineInnerRadius = function() { return B3(n()); }, delete e.lineY0, e.lineOuterRadius = function() { return B3(a()); }, delete e.lineY1, e.curve = function(i) { return arguments.length ? t(C6(i)) : t()._curve; }, e; } const A6 = { draw: function(e, t) { var r = Math.sqrt(t / B2); e.moveTo(r, 0), e.arc(0, 0, r, 0, i2); } }, V9 = { draw: function(e, t) { var r = Math.sqrt(t / 5) / 2; e.moveTo(-3 * r, -r), e.lineTo(-r, -r), e.lineTo(-r, -3 * r), e.lineTo(r, -3 * r), e.lineTo(r, -r), e.lineTo(3 * r, -r), e.lineTo(3 * r, r), e.lineTo(r, r), e.lineTo(r, 3 * r), e.lineTo(-r, 3 * r), e.lineTo(-r, r), e.lineTo(-3 * r, r), e.closePath(); } }; var z9 = Math.sqrt(1 / 3), Bn = z9 * 2; const F9 = { draw: function(e, t) { var r = Math.sqrt(t / Bn), o = r * z9; e.moveTo(0, -r), e.lineTo(o, 0), e.lineTo(0, r), e.lineTo(-o, 0), e.closePath(); } }; var Nn = 0.8908130915292852, W9 = Math.sin(B2 / 10) / Math.sin(7 * B2 / 10), Gn = Math.sin(i2 / 10) * W9, _n = -Math.cos(i2 / 10) * W9; const j9 = { draw: function(e, t) { var r = Math.sqrt(t * Nn), o = Gn * r, n = _n * r; e.moveTo(0, -r), e.lineTo(o, n); for (var a = 1; a < 5; ++a) { var i = i2 * a / 5, s = Math.cos(i), p = Math.sin(i); e.lineTo(p * r, -s * r), e.lineTo(s * o - p * n, p * o + s * n); } e.closePath(); } }, Z9 = { draw: function(e, t) { var r = Math.sqrt(t), o = -r / 2; e.rect(o, o, r, r); } }; var X0 = Math.sqrt(3); const J9 = { draw: function(e, t) { var r = -Math.sqrt(t / (X0 * 3)); e.moveTo(0, r * 2), e.lineTo(-X0 * r, -r), e.lineTo(X0 * r, -r), e.closePath(); } }; var R1 = -0.5, L1 = Math.sqrt(3) / 2, K5 = 1 / Math.sqrt(12), wn = (K5 / 2 + 1) * 3; const Y9 = { draw: function(e, t) { var r = Math.sqrt(t / wn), o = r / 2, n = r * K5, a = o, i = r * K5 + r, s = -a, p = i; e.moveTo(o, n), e.lineTo(a, i), e.lineTo(s, p), e.lineTo(R1 * o - L1 * n, L1 * o + R1 * n), e.lineTo(R1 * a - L1 * i, L1 * a + R1 * i), e.lineTo(R1 * s - L1 * p, L1 * s + R1 * p), e.lineTo(R1 * o + L1 * n, R1 * n - L1 * o), e.lineTo(R1 * a + L1 * i, R1 * i - L1 * a), e.lineTo(R1 * s + L1 * p, R1 * p - L1 * s), e.closePath(); } }; var Rn = [ A6, V9, F9, Z9, j9, J9, Y9 ]; function Ln() { var e = W(A6), t = W(64), r = null; function o() { var n; if (r || (r = n = E2()), e.apply(this, arguments).draw(r, +t.apply(this, arguments)), n) return r = null, n + "" || null; } return o.type = function(n) { return arguments.length ? (e = typeof n == "function" ? n : W(n), o) : e; }, o.size = function(n) { return arguments.length ? (t = typeof n == "function" ? n : W(+n), o) : t; }, o.context = function(n) { return arguments.length ? (r = n == null ? null : n, o) : r; }, o; } function l2() { } function U4(e, t, r) { e._context.bezierCurveTo( (2 * e._x0 + e._x1) / 3, (2 * e._y0 + e._y1) / 3, (e._x0 + 2 * e._x1) / 3, (e._y0 + 2 * e._y1) / 3, (e._x0 + 4 * e._x1 + t) / 6, (e._y0 + 4 * e._y1 + r) / 6 ); } function N0(e) { this._context = e; } N0.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 3: U4(this, this._x1, this._y1); case 2: this._context.lineTo(this._x1, this._y1); break; } (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(e, t) { switch (e = +e, t = +t, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t); break; case 1: this._point = 2; break; case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); default: U4(this, e, t); break; } this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t; } }; function En(e) { return new N0(e); } function $9(e) { this._context = e; } $9.prototype = { areaStart: l2, areaEnd: l2, lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x2, this._y2), this._context.closePath(); break; } case 2: { this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath(); break; } case 3: { this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4); break; } } }, point: function(e, t) { switch (e = +e, t = +t, this._point) { case 0: this._point = 1, this._x2 = e, this._y2 = t; break; case 1: this._point = 2, this._x3 = e, this._y3 = t; break; case 2: this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6); break; default: U4(this, e, t); break; } this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t; } }; function kn(e) { return new $9(e); } function X9(e) { this._context = e; } X9.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0; }, lineEnd: function() { (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; }, point: function(e, t) { switch (e = +e, t = +t, this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; var r = (this._x0 + 4 * this._x1 + e) / 6, o = (this._y0 + 4 * this._y1 + t) / 6; this._line ? this._context.lineTo(r, o) : this._context.moveTo(r, o); break; case 3: this._point = 4; default: U4(this, e, t); break; } this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t; } }; function Kn(e) { return new X9(e); } function q9(e, t) { this._basis = new N0(e), this._beta = t; } q9.prototype = { lineStart: function() { this._x = [], this._y = [], this._basis.lineStart(); }, lineEnd: function() { var e = this._x, t = this._y, r = e.length - 1; if (r > 0) for (var o = e[0], n = t[0], a = e[r] - o, i = t[r] - n, s = -1, p; ++s <= r; ) p = s / r, this._basis.point( this._beta * e[s] + (1 - this._beta) * (o + p * a), this._beta * t[s] + (1 - this._beta) * (n + p * i) ); this._x = this._y = null, this._basis.lineEnd(); }, point: function(e, t) { this._x.push(+e), this._y.push(+t); } }; const In = function e(t) { function r(o) { return t === 1 ? new N0(o) : new q9(o, t); } return r.beta = function(o) { return e(+o); }, r; }(0.85); function V4(e, t, r) { e._context.bezierCurveTo( e._x1 + e._k * (e._x2 - e._x0), e._y1 + e._k * (e._y2 - e._y0), e._x2 + e._k * (e._x1 - t), e._y2 + e._k * (e._y1 - r), e._x2, e._y2 ); } function B6(e, t) { this._context = e, this._k = (1 - t) / 6; } B6.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: V4(this, this._x1, this._y1); break; } (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; }, point: function(e, t) { switch (e = +e, t = +t, this._point) { case 0: this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t); break; case 1: this._point = 2, this._x1 = e, this._y1 = t; break; case 2: this._point = 3; default: V4(this, e, t); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t; } }; const Dn = function e(t) { function r(o) { return new B6(o, t); } return r.tension = function(o) { return e(+o); }, r; }(0); function N6(e, t) { this._context = e, this._k = (1 - t) / 6; } N6.prototype = { areaStart: l2, areaEnd: l2, lineStart: function() { this._x0 = this._x1