@deltares/fews-web-oc-charts
Version:
FEWS Chart Library
1,660 lines (1,659 loc) • 403 kB
JavaScript
//#region node_modules/d3-array/src/ascending.js
function e(e, t) {
return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/descending.js
function t(e, t) {
return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/bisector.js
function n(n) {
let i, a, o;
n.length === 2 ? (i = n === e || n === t ? n : r, a = n, o = n) : (i = e, a = (t, r) => e(n(t), r), o = (e, t) => n(e) - t);
function s(e, t, n = 0, r = e.length) {
if (n < r) {
if (i(t, t) !== 0) return r;
do {
let i = n + r >>> 1;
a(e[i], t) < 0 ? n = i + 1 : r = i;
} while (n < r);
}
return n;
}
function c(e, t, n = 0, r = e.length) {
if (n < r) {
if (i(t, t) !== 0) return r;
do {
let i = n + r >>> 1;
a(e[i], t) <= 0 ? n = i + 1 : r = i;
} while (n < r);
}
return n;
}
function l(e, t, n = 0, r = e.length) {
let i = s(e, t, n, r - 1);
return i > n && o(e[i - 1], t) > -o(e[i], t) ? i - 1 : i;
}
return {
left: s,
center: l,
right: c
};
}
function r() {
return 0;
}
//#endregion
//#region node_modules/d3-array/src/number.js
function i(e) {
return e === null ? NaN : +e;
}
//#endregion
//#region node_modules/d3-array/src/bisect.js
var a = n(e), o = a.right;
a.left, n(i).center;
//#endregion
//#region node_modules/d3-array/src/extent.js
function s(e, t) {
let n, r;
if (t === void 0) for (let t of e) t != null && (n === void 0 ? t >= t && (n = r = t) : (n > t && (n = t), r < t && (r = t)));
else {
let i = -1;
for (let a of e) (a = t(a, ++i, e)) != null && (n === void 0 ? a >= a && (n = r = a) : (n > a && (n = a), r < a && (r = a)));
}
return [n, r];
}
//#endregion
//#region node_modules/internmap/src/index.js
var c = class extends Map {
constructor(e, t = f) {
if (super(), Object.defineProperties(this, {
_intern: { value: /* @__PURE__ */ new Map() },
_key: { value: t }
}), e != null) for (let [t, n] of e) this.set(t, n);
}
get(e) {
return super.get(l(this, e));
}
has(e) {
return super.has(l(this, e));
}
set(e, t) {
return super.set(u(this, e), t);
}
delete(e) {
return super.delete(d(this, e));
}
};
function l({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) ? e.get(r) : n;
}
function u({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) ? e.get(r) : (e.set(r, n), n);
}
function d({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) && (n = e.get(r), e.delete(r)), n;
}
function f(e) {
return typeof e == "object" && e ? e.valueOf() : e;
}
//#endregion
//#region node_modules/d3-array/src/ticks.js
var p = Math.sqrt(50), m = Math.sqrt(10), h = Math.sqrt(2);
function g(e, t, n) {
let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / 10 ** i, o = a >= p ? 10 : a >= m ? 5 : a >= h ? 2 : 1, s, c, l;
return i < 0 ? (l = 10 ** -i / o, s = Math.round(e * l), c = Math.round(t * l), s / l < e && ++s, c / l > t && --c, l = -l) : (l = 10 ** i * o, s = Math.round(e / l), c = Math.round(t / l), s * l < e && ++s, c * l > t && --c), c < s && .5 <= n && n < 2 ? g(e, t, n * 2) : [
s,
c,
l
];
}
function _(e, t, n) {
if (t = +t, e = +e, n = +n, !(n > 0)) return [];
if (e === t) return [e];
let r = t < e, [i, a, o] = r ? g(t, e, n) : g(e, t, n);
if (!(a >= i)) return [];
let s = a - i + 1, c = Array(s);
if (r) if (o < 0) for (let e = 0; e < s; ++e) c[e] = (a - e) / -o;
else for (let e = 0; e < s; ++e) c[e] = (a - e) * o;
else if (o < 0) for (let e = 0; e < s; ++e) c[e] = (i + e) / -o;
else for (let e = 0; e < s; ++e) c[e] = (i + e) * o;
return c;
}
function v(e, t, n) {
return t = +t, e = +e, n = +n, g(e, t, n)[2];
}
function y(e, t, n) {
t = +t, e = +e, n = +n;
let r = t < e, i = r ? v(t, e, n) : v(e, t, n);
return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
}
//#endregion
//#region node_modules/d3-array/src/max.js
function b(e, t) {
let n;
if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
else {
let r = -1;
for (let i of e) (i = t(i, ++r, e)) != null && (n < i || n === void 0 && i >= i) && (n = i);
}
return n;
}
//#endregion
//#region node_modules/d3-array/src/min.js
function x(e, t) {
let n;
if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
else {
let r = -1;
for (let i of e) (i = t(i, ++r, e)) != null && (n > i || n === void 0 && i >= i) && (n = i);
}
return n;
}
//#endregion
//#region node_modules/d3-array/src/mean.js
function S(e, t) {
let n = 0, r = 0;
if (t === void 0) for (let t of e) t != null && (t = +t) >= t && (++n, r += t);
else {
let i = -1;
for (let a of e) (a = t(a, ++i, e)) != null && (a = +a) >= a && (++n, r += a);
}
if (n) return r / n;
}
//#endregion
//#region node_modules/d3-array/src/merge.js
function* C(e) {
for (let t of e) yield* t;
}
function w(e) {
return Array.from(C(e));
}
//#endregion
//#region node_modules/d3-array/src/range.js
function T(e, t, n) {
e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
return a;
}
//#endregion
//#region node_modules/d3-axis/src/identity.js
function E(e) {
return e;
}
//#endregion
//#region node_modules/d3-axis/src/axis.js
var D = 1, O = 2, k = 3, ee = 4, te = 1e-6;
function A(e) {
return "translate(" + e + ",0)";
}
function j(e) {
return "translate(0," + e + ")";
}
function ne(e) {
return (t) => +e(t);
}
function re(e, t) {
return t = Math.max(0, e.bandwidth() - t * 2) / 2, e.round() && (t = Math.round(t)), (n) => +e(n) + t;
}
function ie() {
return !this.__axis;
}
function ae(e, t) {
var n = [], r = null, i = null, a = 6, o = 6, s = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : .5, l = e === D || e === ee ? -1 : 1, u = e === ee || e === O ? "x" : "y", d = e === D || e === k ? A : j;
function f(f) {
var p = r ?? (t.ticks ? t.ticks.apply(t, n) : t.domain()), m = i ?? (t.tickFormat ? t.tickFormat.apply(t, n) : E), h = Math.max(a, 0) + s, g = t.range(), _ = +g[0] + c, v = +g[g.length - 1] + c, y = (t.bandwidth ? re : ne)(t.copy(), c), b = f.selection ? f.selection() : f, x = b.selectAll(".domain").data([null]), S = b.selectAll(".tick").data(p, t).order(), C = S.exit(), w = S.enter().append("g").attr("class", "tick"), T = S.select("line"), A = S.select("text");
x = x.merge(x.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), S = S.merge(w), T = T.merge(w.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), A = A.merge(w.append("text").attr("fill", "currentColor").attr(u, l * h).attr("dy", e === D ? "0em" : e === k ? "0.71em" : "0.32em")), f !== b && (x = x.transition(f), S = S.transition(f), T = T.transition(f), A = A.transition(f), C = C.transition(f).attr("opacity", te).attr("transform", function(e) {
return isFinite(e = y(e)) ? d(e + c) : this.getAttribute("transform");
}), w.attr("opacity", te).attr("transform", function(e) {
var t = this.parentNode.__axis;
return d((t && isFinite(t = t(e)) ? t : y(e)) + c);
})), C.remove(), x.attr("d", e === ee || e === O ? o ? "M" + l * o + "," + _ + "H" + c + "V" + v + "H" + l * o : "M" + c + "," + _ + "V" + v : o ? "M" + _ + "," + l * o + "V" + c + "H" + v + "V" + l * o : "M" + _ + "," + c + "H" + v), S.attr("opacity", 1).attr("transform", function(e) {
return d(y(e) + c);
}), T.attr(u + "2", l * a), A.attr(u, l * h).text(m), b.filter(ie).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === O ? "start" : e === ee ? "end" : "middle"), b.each(function() {
this.__axis = y;
});
}
return f.scale = function(e) {
return arguments.length ? (t = e, f) : t;
}, f.ticks = function() {
return n = Array.from(arguments), f;
}, f.tickArguments = function(e) {
return arguments.length ? (n = e == null ? [] : Array.from(e), f) : n.slice();
}, f.tickValues = function(e) {
return arguments.length ? (r = e == null ? null : Array.from(e), f) : r && r.slice();
}, f.tickFormat = function(e) {
return arguments.length ? (i = e, f) : i;
}, f.tickSize = function(e) {
return arguments.length ? (a = o = +e, f) : a;
}, f.tickSizeInner = function(e) {
return arguments.length ? (a = +e, f) : a;
}, f.tickSizeOuter = function(e) {
return arguments.length ? (o = +e, f) : o;
}, f.tickPadding = function(e) {
return arguments.length ? (s = +e, f) : s;
}, f.offset = function(e) {
return arguments.length ? (c = +e, f) : c;
}, f;
}
function oe(e) {
return ae(D, e);
}
function se(e) {
return ae(O, e);
}
function ce(e) {
return ae(k, e);
}
function le(e) {
return ae(ee, e);
}
//#endregion
//#region node_modules/d3-dispatch/src/dispatch.js
var ue = { value: () => {} };
function de() {
for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) {
if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw Error("illegal type: " + r);
n[r] = [];
}
return new fe(n);
}
function fe(e) {
this._ = e;
}
function pe(e, t) {
return e.trim().split(/^|\s+/).map(function(e) {
var n = "", r = e.indexOf(".");
if (r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), e && !t.hasOwnProperty(e)) throw Error("unknown type: " + e);
return {
type: e,
name: n
};
});
}
fe.prototype = de.prototype = {
constructor: fe,
on: function(e, t) {
var n = this._, r = pe(e + "", n), i, a = -1, o = r.length;
if (arguments.length < 2) {
for (; ++a < o;) if ((i = (e = r[a]).type) && (i = me(n[i], e.name))) return i;
return;
}
if (t != null && typeof t != "function") throw Error("invalid callback: " + t);
for (; ++a < o;) if (i = (e = r[a]).type) n[i] = he(n[i], e.name, t);
else if (t == null) for (i in n) n[i] = he(n[i], e.name, null);
return this;
},
copy: function() {
var e = {}, t = this._;
for (var n in t) e[n] = t[n].slice();
return new fe(e);
},
call: function(e, t) {
if ((i = arguments.length - 2) > 0) for (var n = Array(i), r = 0, i, a; r < i; ++r) n[r] = arguments[r + 2];
if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
for (a = this._[e], r = 0, i = a.length; r < i; ++r) a[r].value.apply(t, n);
},
apply: function(e, t, n) {
if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
for (var r = this._[e], i = 0, a = r.length; i < a; ++i) r[i].value.apply(t, n);
}
};
function me(e, t) {
for (var n = 0, r = e.length, i; n < r; ++n) if ((i = e[n]).name === t) return i.value;
}
function he(e, t, n) {
for (var r = 0, i = e.length; r < i; ++r) if (e[r].name === t) {
e[r] = ue, e = e.slice(0, r).concat(e.slice(r + 1));
break;
}
return n != null && e.push({
name: t,
value: n
}), e;
}
var ge = {
svg: "http://www.w3.org/2000/svg",
xhtml: "http://www.w3.org/1999/xhtml",
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/"
};
//#endregion
//#region node_modules/d3-selection/src/namespace.js
function _e(e) {
var t = e += "", n = t.indexOf(":");
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), ge.hasOwnProperty(t) ? {
space: ge[t],
local: e
} : e;
}
//#endregion
//#region node_modules/d3-selection/src/creator.js
function ve(e) {
return function() {
var t = this.ownerDocument, n = this.namespaceURI;
return n === "http://www.w3.org/1999/xhtml" && t.documentElement.namespaceURI === "http://www.w3.org/1999/xhtml" ? t.createElement(e) : t.createElementNS(n, e);
};
}
function ye(e) {
return function() {
return this.ownerDocument.createElementNS(e.space, e.local);
};
}
function be(e) {
var t = _e(e);
return (t.local ? ye : ve)(t);
}
//#endregion
//#region node_modules/d3-selection/src/selector.js
function xe() {}
function Se(e) {
return e == null ? xe : function() {
return this.querySelector(e);
};
}
//#endregion
//#region node_modules/d3-selection/src/selection/select.js
function Ce(e) {
typeof e != "function" && (e = Se(e));
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = Array(o), c, l, u = 0; u < o; ++u) (c = a[u]) && (l = e.call(c, c.__data__, u, a)) && ("__data__" in c && (l.__data__ = c.__data__), s[u] = l);
return new fn(r, this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/array.js
function we(e) {
return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
}
//#endregion
//#region node_modules/d3-selection/src/selectorAll.js
function Te() {
return [];
}
function Ee(e) {
return e == null ? Te : function() {
return this.querySelectorAll(e);
};
}
//#endregion
//#region node_modules/d3-selection/src/selection/selectAll.js
function De(e) {
return function() {
return we(e.apply(this, arguments));
};
}
function Oe(e) {
e = typeof e == "function" ? De(e) : Ee(e);
for (var t = this._groups, n = t.length, r = [], i = [], a = 0; a < n; ++a) for (var o = t[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && (r.push(e.call(c, c.__data__, l, o)), i.push(c));
return new fn(r, i);
}
//#endregion
//#region node_modules/d3-selection/src/matcher.js
function ke(e) {
return function() {
return this.matches(e);
};
}
function Ae(e) {
return function(t) {
return t.matches(e);
};
}
//#endregion
//#region node_modules/d3-selection/src/selection/selectChild.js
var je = Array.prototype.find;
function Me(e) {
return function() {
return je.call(this.children, e);
};
}
function Ne() {
return this.firstElementChild;
}
function Pe(e) {
return this.select(e == null ? Ne : Me(typeof e == "function" ? e : Ae(e)));
}
//#endregion
//#region node_modules/d3-selection/src/selection/selectChildren.js
var Fe = Array.prototype.filter;
function Ie() {
return Array.from(this.children);
}
function Le(e) {
return function() {
return Fe.call(this.children, e);
};
}
function Re(e) {
return this.selectAll(e == null ? Ie : Le(typeof e == "function" ? e : Ae(e)));
}
//#endregion
//#region node_modules/d3-selection/src/selection/filter.js
function ze(e) {
typeof e != "function" && (e = ke(e));
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
return new fn(r, this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/selection/sparse.js
function Be(e) {
return Array(e.length);
}
//#endregion
//#region node_modules/d3-selection/src/selection/enter.js
function Ve() {
return new fn(this._enter || this._groups.map(Be), this._parents);
}
function He(e, t) {
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
}
He.prototype = {
constructor: He,
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);
}
};
//#endregion
//#region node_modules/d3-selection/src/constant.js
function Ue(e) {
return function() {
return e;
};
}
//#endregion
//#region node_modules/d3-selection/src/selection/data.js
function We(e, t, n, r, i, a) {
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new He(e, a[o]);
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
}
function Ge(e, t, n, r, i, a, o) {
var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
for (s = 0; s < u; ++s) (c = t[s]) && (f[s] = p = o.call(c, c.__data__, s, t) + "", l.has(p) ? i[s] = c : l.set(p, c));
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new He(e, a[s]);
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
}
function Ke(e) {
return e.__data__;
}
function qe(e, t) {
if (!arguments.length) return Array.from(this, Ke);
var n = t ? Ge : We, r = this._parents, i = this._groups;
typeof e != "function" && (e = Ue(e));
for (var a = i.length, o = Array(a), s = Array(a), c = Array(a), l = 0; l < a; ++l) {
var u = r[l], d = i[l], f = d.length, p = Je(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
n(u, d, h, g, c[l] = Array(f), p, t);
for (var _ = 0, v = 0, y, b; _ < m; ++_) if (y = h[_]) {
for (_ >= v && (v = _ + 1); !(b = g[v]) && ++v < m;);
y._next = b || null;
}
}
return o = new fn(o, r), o._enter = s, o._exit = c, o;
}
function Je(e) {
return typeof e == "object" && "length" in e ? e : Array.from(e);
}
//#endregion
//#region node_modules/d3-selection/src/selection/exit.js
function Ye() {
return new fn(this._exit || this._groups.map(Be), this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/selection/join.js
function Xe(e, t, n) {
var r = this.enter(), i = this, a = this.exit();
return typeof e == "function" ? (r = e(r), r &&= r.selection()) : r = r.append(e + ""), t != null && (i = t(i), i &&= i.selection()), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
}
//#endregion
//#region node_modules/d3-selection/src/selection/merge.js
function Ze(e) {
for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, a = r.length, o = Math.min(i, a), s = Array(i), c = 0; c < o; ++c) for (var l = n[c], u = r[c], d = l.length, f = s[c] = Array(d), p, m = 0; m < d; ++m) (p = l[m] || u[m]) && (f[m] = p);
for (; c < i; ++c) s[c] = n[c];
return new fn(s, this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/selection/order.js
function Qe() {
for (var e = this._groups, t = -1, n = e.length; ++t < n;) for (var r = e[t], i = r.length - 1, a = r[i], o; --i >= 0;) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
return this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/sort.js
function $e(e) {
e ||= et;
function t(t, n) {
return t && n ? e(t.__data__, n.__data__) : !t - !n;
}
for (var n = this._groups, r = n.length, i = Array(r), a = 0; a < r; ++a) {
for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
c.sort(t);
}
return new fn(i, this._parents).order();
}
function et(e, t) {
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-selection/src/selection/call.js
function tt() {
var e = arguments[0];
return arguments[0] = this, e.apply(null, arguments), this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/nodes.js
function nt() {
return Array.from(this);
}
//#endregion
//#region node_modules/d3-selection/src/selection/node.js
function rt() {
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length; i < a; ++i) {
var o = r[i];
if (o) return o;
}
return null;
}
//#endregion
//#region node_modules/d3-selection/src/selection/size.js
function it() {
let e = 0;
for (let t of this) ++e;
return e;
}
//#endregion
//#region node_modules/d3-selection/src/selection/empty.js
function at() {
return !this.node();
}
//#endregion
//#region node_modules/d3-selection/src/selection/each.js
function ot(e) {
for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && e.call(s, s.__data__, a, i);
return this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/attr.js
function st(e) {
return function() {
this.removeAttribute(e);
};
}
function ct(e) {
return function() {
this.removeAttributeNS(e.space, e.local);
};
}
function lt(e, t) {
return function() {
this.setAttribute(e, t);
};
}
function ut(e, t) {
return function() {
this.setAttributeNS(e.space, e.local, t);
};
}
function dt(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
};
}
function ft(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
};
}
function pt(e, t) {
var n = _e(e);
if (arguments.length < 2) {
var r = this.node();
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
}
return this.each((t == null ? n.local ? ct : st : typeof t == "function" ? n.local ? ft : dt : n.local ? ut : lt)(n, t));
}
//#endregion
//#region node_modules/d3-selection/src/window.js
function mt(e) {
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
}
//#endregion
//#region node_modules/d3-selection/src/selection/style.js
function ht(e) {
return function() {
this.style.removeProperty(e);
};
}
function gt(e, t, n) {
return function() {
this.style.setProperty(e, t, n);
};
}
function _t(e, t, n) {
return function() {
var r = t.apply(this, arguments);
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
};
}
function vt(e, t, n) {
return arguments.length > 1 ? this.each((t == null ? ht : typeof t == "function" ? _t : gt)(e, t, n ?? "")) : yt(this.node(), e);
}
function yt(e, t) {
return e.style.getPropertyValue(t) || mt(e).getComputedStyle(e, null).getPropertyValue(t);
}
//#endregion
//#region node_modules/d3-selection/src/selection/property.js
function bt(e) {
return function() {
delete this[e];
};
}
function xt(e, t) {
return function() {
this[e] = t;
};
}
function St(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? delete this[e] : this[e] = n;
};
}
function Ct(e, t) {
return arguments.length > 1 ? this.each((t == null ? bt : typeof t == "function" ? St : xt)(e, t)) : this.node()[e];
}
//#endregion
//#region node_modules/d3-selection/src/selection/classed.js
function wt(e) {
return e.trim().split(/^|\s+/);
}
function Tt(e) {
return e.classList || new Et(e);
}
function Et(e) {
this._node = e, this._names = wt(e.getAttribute("class") || "");
}
Et.prototype = {
add: function(e) {
this._names.indexOf(e) < 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 Dt(e, t) {
for (var n = Tt(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
}
function Ot(e, t) {
for (var n = Tt(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
}
function kt(e) {
return function() {
Dt(this, e);
};
}
function At(e) {
return function() {
Ot(this, e);
};
}
function jt(e, t) {
return function() {
(t.apply(this, arguments) ? Dt : Ot)(this, e);
};
}
function Mt(e, t) {
var n = wt(e + "");
if (arguments.length < 2) {
for (var r = Tt(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
return !0;
}
return this.each((typeof t == "function" ? jt : t ? kt : At)(n, t));
}
//#endregion
//#region node_modules/d3-selection/src/selection/text.js
function Nt() {
this.textContent = "";
}
function Pt(e) {
return function() {
this.textContent = e;
};
}
function Ft(e) {
return function() {
var t = e.apply(this, arguments);
this.textContent = t ?? "";
};
}
function It(e) {
return arguments.length ? this.each(e == null ? Nt : (typeof e == "function" ? Ft : Pt)(e)) : this.node().textContent;
}
//#endregion
//#region node_modules/d3-selection/src/selection/html.js
function Lt() {
this.innerHTML = "";
}
function Rt(e) {
return function() {
this.innerHTML = e;
};
}
function zt(e) {
return function() {
var t = e.apply(this, arguments);
this.innerHTML = t ?? "";
};
}
function Bt(e) {
return arguments.length ? this.each(e == null ? Lt : (typeof e == "function" ? zt : Rt)(e)) : this.node().innerHTML;
}
//#endregion
//#region node_modules/d3-selection/src/selection/raise.js
function Vt() {
this.nextSibling && this.parentNode.appendChild(this);
}
function Ht() {
return this.each(Vt);
}
//#endregion
//#region node_modules/d3-selection/src/selection/lower.js
function Ut() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function Wt() {
return this.each(Ut);
}
//#endregion
//#region node_modules/d3-selection/src/selection/append.js
function Gt(e) {
var t = typeof e == "function" ? e : be(e);
return this.select(function() {
return this.appendChild(t.apply(this, arguments));
});
}
//#endregion
//#region node_modules/d3-selection/src/selection/insert.js
function Kt() {
return null;
}
function qt(e, t) {
var n = typeof e == "function" ? e : be(e), r = t == null ? Kt : typeof t == "function" ? t : Se(t);
return this.select(function() {
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
});
}
//#endregion
//#region node_modules/d3-selection/src/selection/remove.js
function Jt() {
var e = this.parentNode;
e && e.removeChild(this);
}
function Yt() {
return this.each(Jt);
}
//#endregion
//#region node_modules/d3-selection/src/selection/clone.js
function Xt() {
var e = this.cloneNode(!1), t = this.parentNode;
return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Zt() {
var e = this.cloneNode(!0), t = this.parentNode;
return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Qt(e) {
return this.select(e ? Zt : Xt);
}
//#endregion
//#region node_modules/d3-selection/src/selection/datum.js
function $t(e) {
return arguments.length ? this.property("__data__", e) : this.node().__data__;
}
//#endregion
//#region node_modules/d3-selection/src/selection/on.js
function en(e) {
return function(t) {
e.call(this, t, this.__data__);
};
}
function tn(e) {
return e.trim().split(/^|\s+/).map(function(e) {
var t = "", n = e.indexOf(".");
return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
type: e,
name: t
};
});
}
function nn(e) {
return function() {
var t = this.__on;
if (t) {
for (var n = 0, r = -1, i = t.length, a; n < i; ++n) a = t[n], (!e.type || a.type === e.type) && a.name === e.name ? this.removeEventListener(a.type, a.listener, a.options) : t[++r] = a;
++r ? t.length = r : delete this.__on;
}
};
}
function rn(e, t, n) {
return function() {
var r = this.__on, i, a = en(t);
if (r) {
for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
return;
}
}
this.addEventListener(e.type, a, n), i = {
type: e.type,
name: e.name,
value: t,
listener: a,
options: n
}, r ? r.push(i) : this.__on = [i];
};
}
function an(e, t, n) {
var r = tn(e + ""), i, a = r.length, o;
if (arguments.length < 2) {
var s = this.node().__on;
if (s) {
for (var c = 0, l = s.length, u; c < l; ++c) for (i = 0, u = s[c]; i < a; ++i) if ((o = r[i]).type === u.type && o.name === u.name) return u.value;
}
return;
}
for (s = t ? rn : nn, i = 0; i < a; ++i) this.each(s(r[i], t, n));
return this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/dispatch.js
function on(e, t, n) {
var r = mt(e), i = r.CustomEvent;
typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
}
function sn(e, t) {
return function() {
return on(this, e, t);
};
}
function cn(e, t) {
return function() {
return on(this, e, t.apply(this, arguments));
};
}
function ln(e, t) {
return this.each((typeof t == "function" ? cn : sn)(e, t));
}
//#endregion
//#region node_modules/d3-selection/src/selection/iterator.js
function* un() {
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o);
}
//#endregion
//#region node_modules/d3-selection/src/selection/index.js
var dn = [null];
function fn(e, t) {
this._groups = e, this._parents = t;
}
function pn() {
return new fn([[document.documentElement]], dn);
}
function mn() {
return this;
}
fn.prototype = pn.prototype = {
constructor: fn,
select: Ce,
selectAll: Oe,
selectChild: Pe,
selectChildren: Re,
filter: ze,
data: qe,
enter: Ve,
exit: Ye,
join: Xe,
merge: Ze,
selection: mn,
order: Qe,
sort: $e,
call: tt,
nodes: nt,
node: rt,
size: it,
empty: at,
each: ot,
attr: pt,
style: vt,
property: Ct,
classed: Mt,
text: It,
html: Bt,
raise: Ht,
lower: Wt,
append: Gt,
insert: qt,
remove: Yt,
clone: Qt,
datum: $t,
on: an,
dispatch: ln,
[Symbol.iterator]: un
};
//#endregion
//#region node_modules/d3-selection/src/select.js
function M(e) {
return typeof e == "string" ? new fn([[document.querySelector(e)]], [document.documentElement]) : new fn([[e]], dn);
}
//#endregion
//#region node_modules/d3-selection/src/create.js
function hn(e) {
return M(be(e).call(document.documentElement));
}
//#endregion
//#region node_modules/d3-selection/src/sourceEvent.js
function gn(e) {
let t;
for (; t = e.sourceEvent;) e = t;
return e;
}
//#endregion
//#region node_modules/d3-selection/src/pointer.js
function N(e, t) {
if (e = gn(e), t === void 0 && (t = e.currentTarget), t) {
var n = t.ownerSVGElement || t;
if (n.createSVGPoint) {
var r = n.createSVGPoint();
return r.x = e.clientX, r.y = e.clientY, r = r.matrixTransform(t.getScreenCTM().inverse()), [r.x, r.y];
}
if (t.getBoundingClientRect) {
var i = t.getBoundingClientRect();
return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];
}
}
return [e.pageX, e.pageY];
}
//#endregion
//#region node_modules/d3-selection/src/selectAll.js
function _n(e) {
return typeof e == "string" ? new fn([document.querySelectorAll(e)], [document.documentElement]) : new fn([we(e)], dn);
}
//#endregion
//#region node_modules/d3-drag/src/noevent.js
var vn = { passive: !1 }, yn = {
capture: !0,
passive: !1
};
function bn(e) {
e.stopImmediatePropagation();
}
function xn(e) {
e.preventDefault(), e.stopImmediatePropagation();
}
//#endregion
//#region node_modules/d3-drag/src/nodrag.js
function Sn(e) {
var t = e.document.documentElement, n = M(e).on("dragstart.drag", xn, yn);
"onselectstart" in t ? n.on("selectstart.drag", xn, yn) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
}
function Cn(e, t) {
var n = e.document.documentElement, r = M(e).on("dragstart.drag", null);
t && (r.on("click.drag", xn, yn), setTimeout(function() {
r.on("click.drag", null);
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
}
//#endregion
//#region node_modules/d3-drag/src/constant.js
var wn = (e) => () => e;
//#endregion
//#region node_modules/d3-drag/src/event.js
function Tn(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
Object.defineProperties(this, {
type: {
value: e,
enumerable: !0,
configurable: !0
},
sourceEvent: {
value: t,
enumerable: !0,
configurable: !0
},
subject: {
value: n,
enumerable: !0,
configurable: !0
},
target: {
value: r,
enumerable: !0,
configurable: !0
},
identifier: {
value: i,
enumerable: !0,
configurable: !0
},
active: {
value: a,
enumerable: !0,
configurable: !0
},
x: {
value: o,
enumerable: !0,
configurable: !0
},
y: {
value: s,
enumerable: !0,
configurable: !0
},
dx: {
value: c,
enumerable: !0,
configurable: !0
},
dy: {
value: l,
enumerable: !0,
configurable: !0
},
_: { value: u }
});
}
Tn.prototype.on = function() {
var e = this._.on.apply(this._, arguments);
return e === this._ ? this : e;
};
//#endregion
//#region node_modules/d3-drag/src/drag.js
function En(e) {
return !e.ctrlKey && !e.button;
}
function Dn() {
return this.parentNode;
}
function On(e, t) {
return t ?? {
x: e.x,
y: e.y
};
}
function kn() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function An() {
var e = En, t = Dn, n = On, r = kn, i = {}, a = de("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
function f(e) {
e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _, vn).on("touchend.drag touchcancel.drag", v).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
function p(n, r) {
if (!(u || !e.call(this, n, r))) {
var i = y(this, t.call(this, n, r), n, r, "mouse");
i && (M(n.view).on("mousemove.drag", m, yn).on("mouseup.drag", h, yn), Sn(n.view), bn(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
}
}
function m(e) {
if (xn(e), !l) {
var t = e.clientX - s, n = e.clientY - c;
l = t * t + n * n > d;
}
i.mouse("drag", e);
}
function h(e) {
M(e.view).on("mousemove.drag mouseup.drag", null), Cn(e.view, l), xn(e), i.mouse("end", e);
}
function g(n, r) {
if (e.call(this, n, r)) {
var i = n.changedTouches, a = t.call(this, n, r), o = i.length, s, c;
for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (bn(n), c("start", n, i[s]));
}
}
function _(e) {
var t = e.changedTouches, n = t.length, r, a;
for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (xn(e), a("drag", e, t[r]));
}
function v(e) {
var t = e.changedTouches, n = t.length, r, a;
for (u && clearTimeout(u), u = setTimeout(function() {
u = null;
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (bn(e), a("end", e, t[r]));
}
function y(e, t, r, s, c, l) {
var u = a.copy(), d = N(l || r, t), p, m, h;
if ((h = n.call(e, new Tn("beforestart", {
sourceEvent: r,
target: f,
identifier: c,
active: o,
x: d[0],
y: d[1],
dx: 0,
dy: 0,
dispatch: u
}), s)) != null) return p = h.x - d[0] || 0, m = h.y - d[1] || 0, function n(r, a, l) {
var g = d, _;
switch (r) {
case "start":
i[c] = n, _ = o++;
break;
case "end": delete i[c], --o;
case "drag":
d = N(l || a, t), _ = o;
break;
}
u.call(r, e, new Tn(r, {
sourceEvent: a,
subject: h,
target: f,
identifier: c,
active: _,
x: d[0] + p,
y: d[1] + m,
dx: d[0] - g[0],
dy: d[1] - g[1],
dispatch: u
}), s);
};
}
return f.filter = function(t) {
return arguments.length ? (e = typeof t == "function" ? t : wn(!!t), f) : e;
}, f.container = function(e) {
return arguments.length ? (t = typeof e == "function" ? e : wn(e), f) : t;
}, f.subject = function(e) {
return arguments.length ? (n = typeof e == "function" ? e : wn(e), f) : n;
}, f.touchable = function(e) {
return arguments.length ? (r = typeof e == "function" ? e : wn(!!e), f) : r;
}, f.on = function() {
var e = a.on.apply(a, arguments);
return e === a ? f : e;
}, f.clickDistance = function(e) {
return arguments.length ? (d = (e = +e) * e, f) : Math.sqrt(d);
}, f;
}
//#endregion
//#region node_modules/d3-color/src/define.js
function jn(e, t, n) {
e.prototype = t.prototype = n, n.constructor = e;
}
function Mn(e, t) {
var n = Object.create(e.prototype);
for (var r in t) n[r] = t[r];
return n;
}
//#endregion
//#region node_modules/d3-color/src/color.js
function Nn() {}
var Pn = .7, Fn = 1 / Pn, In = "\\s*([+-]?\\d+)\\s*", Ln = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Rn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", zn = /^#([0-9a-f]{3,8})$/, Bn = RegExp(`^rgb\\(${In},${In},${In}\\)$`), Vn = RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`), Hn = RegExp(`^rgba\\(${In},${In},${In},${Ln}\\)$`), Un = RegExp(`^rgba\\(${Rn},${Rn},${Rn},${Ln}\\)$`), Wn = RegExp(`^hsl\\(${Ln},${Rn},${Rn}\\)$`), Gn = RegExp(`^hsla\\(${Ln},${Rn},${Rn},${Ln}\\)$`), Kn = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074
};
jn(Nn, Zn, {
copy(e) {
return Object.assign(new this.constructor(), this, e);
},
displayable() {
return this.rgb().displayable();
},
hex: qn,
formatHex: qn,
formatHex8: Jn,
formatHsl: Yn,
formatRgb: Xn,
toString: Xn
});
function qn() {
return this.rgb().formatHex();
}
function Jn() {
return this.rgb().formatHex8();
}
function Yn() {
return ur(this).formatHsl();
}
function Xn() {
return this.rgb().formatRgb();
}
function Zn(e) {
var t, n;
return e = (e + "").trim().toLowerCase(), (t = zn.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Qn(t) : n === 3 ? new nr(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? $n(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? $n(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Bn.exec(e)) ? new nr(t[1], t[2], t[3], 1) : (t = Vn.exec(e)) ? new nr(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Hn.exec(e)) ? $n(t[1], t[2], t[3], t[4]) : (t = Un.exec(e)) ? $n(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Wn.exec(e)) ? lr(t[1], t[2] / 100, t[3] / 100, 1) : (t = Gn.exec(e)) ? lr(t[1], t[2] / 100, t[3] / 100, t[4]) : Kn.hasOwnProperty(e) ? Qn(Kn[e]) : e === "transparent" ? new nr(NaN, NaN, NaN, 0) : null;
}
function Qn(e) {
return new nr(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
}
function $n(e, t, n, r) {
return r <= 0 && (e = t = n = NaN), new nr(e, t, n, r);
}
function er(e) {
return e instanceof Nn || (e = Zn(e)), e ? (e = e.rgb(), new nr(e.r, e.g, e.b, e.opacity)) : new nr();
}
function tr(e, t, n, r) {
return arguments.length === 1 ? er(e) : new nr(e, t, n, r ?? 1);
}
function nr(e, t, n, r) {
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
}
jn(nr, tr, Mn(Nn, {
brighter(e) {
return e = e == null ? Fn : Fn ** +e, new nr(this.r * e, this.g * e, this.b * e, this.opacity);
},
darker(e) {
return e = e == null ? Pn : Pn ** +e, new nr(this.r * e, this.g * e, this.b * e, this.opacity);
},
rgb() {
return this;
},
clamp() {
return new nr(sr(this.r), sr(this.g), sr(this.b), or(this.opacity));
},
displayable() {
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
},
hex: rr,
formatHex: rr,
formatHex8: ir,
formatRgb: ar,
toString: ar
}));
function rr() {
return `#${cr(this.r)}${cr(this.g)}${cr(this.b)}`;
}
function ir() {
return `#${cr(this.r)}${cr(this.g)}${cr(this.b)}${cr((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function ar() {
let e = or(this.opacity);
return `${e === 1 ? "rgb(" : "rgba("}${sr(this.r)}, ${sr(this.g)}, ${sr(this.b)}${e === 1 ? ")" : `, ${e})`}`;
}
function or(e) {
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
}
function sr(e) {
return Math.max(0, Math.min(255, Math.round(e) || 0));
}
function cr(e) {
return e = sr(e), (e < 16 ? "0" : "") + e.toString(16);
}
function lr(e, t, n, r) {
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new fr(e, t, n, r);
}
function ur(e) {
if (e instanceof fr) return new fr(e.h, e.s, e.l, e.opacity);
if (e instanceof Nn || (e = Zn(e)), !e) return new fr();
if (e instanceof fr) return e;
e = e.rgb();
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new fr(o, s, c, e.opacity);
}
function dr(e, t, n, r) {
return arguments.length === 1 ? ur(e) : new fr(e, t, n, r ?? 1);
}
function fr(e, t, n, r) {
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
}
jn(fr, dr, Mn(Nn, {
brighter(e) {
return e = e == null ? Fn : Fn ** +e, new fr(this.h, this.s, this.l * e, this.opacity);
},
darker(e) {
return e = e == null ? Pn : Pn ** +e, new fr(this.h, this.s, this.l * e, this.opacity);
},
rgb() {
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
return new nr(hr(e >= 240 ? e - 240 : e + 120, i, r), hr(e, i, r), hr(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
},
clamp() {
return new fr(pr(this.h), mr(this.s), mr(this.l), or(this.opacity));
},
displayable() {
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
},
formatHsl() {
let e = or(this.opacity);
return `${e === 1 ? "hsl(" : "hsla("}${pr(this.h)}, ${mr(this.s) * 100}%, ${mr(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
}
}));
function pr(e) {
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
}
function mr(e) {
return Math.max(0, Math.min(1, e || 0));
}
function hr(e, t, n) {
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
}
//#endregion
//#region node_modules/d3-color/src/math.js
var gr = Math.PI / 180, _r = 180 / Math.PI, vr = -.14861, yr = 1.78277, br = -.29227, xr = -.90649, Sr = 1.97294, Cr = Sr * xr, wr = Sr * yr, Tr = yr * br - xr * vr;
function Er(e) {
if (e instanceof Or) return new Or(e.h, e.s, e.l, e.opacity);
e instanceof nr || (e = er(e));
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = (Tr * r + Cr * t - wr * n) / (Tr + Cr - wr), a = r - i, o = (Sr * (n - i) - br * a) / xr, s = Math.sqrt(o * o + a * a) / (Sr * i * (1 - i)), c = s ? Math.atan2(o, a) * _r - 120 : NaN;
return new Or(c < 0 ? c + 360 : c, s, i, e.opacity);
}
function Dr(e, t, n, r) {
return arguments.length === 1 ? Er(e) : new Or(e, t, n, r ?? 1);
}
function Or(e, t, n, r) {
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
}
jn(Or, Dr, Mn(Nn, {
brighter(e) {
return e = e == null ? Fn : Fn ** +e, new Or(this.h, this.s, this.l * e, this.opacity);
},
darker(e) {
return e = e == null ? Pn : Pn ** +e, new Or(this.h, this.s, this.l * e, this.opacity);
},
rgb() {
var e = isNaN(this.h) ? 0 : (this.h + 120) * gr, t = +this.l, n = isNaN(this.s) ? 0 : this.s * t * (1 - t), r = Math.cos(e), i = Math.sin(e);
return new nr(255 * (t + n * (vr * r + yr * i)), 255 * (t + n * (br * r + xr * i)), 255 * (t + Sr * r * n), this.opacity);
}
}));
//#endregion
//#region node_modules/d3-interpolate/src/constant.js
var kr = (e) => () => e;
//#endregion
//#region node_modules/d3-interpolate/src/color.js
function Ar(e, t) {
return function(n) {
return e + n * t;
};
}
function jr(e, t, n) {
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
return (e + r * t) ** +n;
};
}
function Mr(e, t) {
var n = t - e;
return n ? Ar(e, n > 180 || n < -180 ? n - 360 * Math.round(n / 360) : n) : kr(isNaN(e) ? t : e);
}
function Nr(e) {
return (e = +e) == 1 ? Pr : function(t, n) {
return n - t ? jr(t, n, e) : kr(isNaN(t) ? n : t);
};
}
function Pr(e, t) {
var n = t - e;
return n ? Ar(e, n) : kr(isNaN(e) ? t : e);
}
//#endregion
//#region node_modules/d3-interpolate/src/rgb.js
var Fr = (function e(t) {
var n = Nr(t);
function r(e, t) {
var r = n((e = tr(e)).r, (t = tr(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = Pr(e.opacity, t.opacity);
return function(t) {
return e.r = r(t), e.g = i(t), e.b = a(t), e.opacity = o(t), e + "";
};
}
return r.gamma = e, r;
})(1);
//#endregion
//#region node_modules/d3-interpolate/src/numberArray.js
function Ir(e, t) {
t ||= [];
var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
return function(a) {
for (i = 0; i < n; ++i) r[i] = e[i] * (1 - a) + t[i] * a;
return r;
};
}
function Lr(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/d3-interpolate/src/array.js
function Rr(e, t) {
return (Lr(t) ? Ir : zr)(e, t);
}
function zr(e, t) {
var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o;
for (o = 0; o < r; ++o) i[o] = Jr(e[o], t[o]);
for (; o < n; ++o) a[o] = t[o];
return function(e) {
for (o = 0; o < r; ++o) a[o] = i[o](e);
return a;
};
}
//#endregion
//#region node_modules/d3-interpolate/src/date.js
function Br(e, t) {
var n = /* @__PURE__ */ new Date();
return e = +e, t = +t, function(r) {
return n.setTime(e * (1 - r) + t * r), n;
};
}
//#endregion
//#region node_modules/d3-interpolate/src/number.js
function Vr(e, t) {
return e = +e, t = +t, function(n) {
return e * (1 - n) + t * n;
};
}
//#endregion
//#region node_modules/d3-interpolate/src/object.js
function Hr(e, t) {
var n = {}, r = {}, i;
for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = Jr(e[i], t[i]) : r[i] = t[i];
return function(e) {
for (i in n) r[i] = n[i](e);
return r;
};
}
//#endregion
//#region node_modules/d3-interpolate/src/string.js
var Ur = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Wr = new RegExp(Ur.source, "g");
function Gr(e) {
return function() {
return e;
};
}
function Kr(e) {
return function(t) {
return e(t) + "";
};
}
function qr(e, t) {
var n = Ur.lastIndex = Wr.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
for (e += "", t += ""; (r = Ur.exec(e)) && (i = Wr.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
i: o,
x: Vr(r, i)
})), n = Wr.lastIndex;
return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? Kr(c[0].x) : Gr(t) : (t = c.length, function(e) {
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
return s.join("");
});
}
//#endregion
//#region node_modules/d3-interpolate/src/value.js
function Jr(e, t) {
var n = typeof t, r;
return t == null || n === "boolean" ? kr(t) : (n === "number" ? Vr : n === "string" ? (r = Zn(t)) ? (t = r, Fr) : qr : t instanceof Zn ? Fr : t instanceof Date ? Br : Lr(t) ? Ir : Array.isArray(t) ? zr : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? Hr : Vr)(e, t);
}
//#endregion
//#region node_modules/d3-interpolate/src/round.js
function Yr(e, t) {
return e = +e, t = +t, function(n) {
return Math.round(e * (1 - n) + t * n);
};
}
//#endregion
//#region node_modules/d3-interpolate/src/transform/decompose.js
var Xr = 180 / Math.PI, Zr = {
translateX: 0,
translateY: 0,
rotate: 0,
skewX: 0,
scaleX: 1,
scaleY: 1
};
function Qr(e, t, n, r, i, a) {
var o, s, c;
return (o = Math.sqrt(e * e + t * t)) && (e /= o, t /= o), (c = e * n + t * r) && (n -= e * c, r -= t * c), (s = Math.sqrt(n * n + r * r)) && (n /= s, r /= s, c /= s), e * r < t * n && (e = -e, t = -t, c = -c, o = -o), {
translateX: i,
translateY: a,