@stlite/browser
Version:
Browser Stlite
1,805 lines • 858 kB
JavaScript
import { Ct as e, En as t, Gi as n, Ka as r, Mt as i, Ua as a, Wi as o, da as s, oi as c, ti as l, va as u } from "./index-Dl4ETd_L-D2oMd1k2.js";
import { n as d, t as f } from "./withFullScreenWrapper-tGGSjEWy-DoekoEMQ.js";
import { C as p, S as m, a as h, l as g, m as _, o as v } from "./value-YcFXbvJe-DIeu1yzI.js";
import { a as y, c as b, i as x, l as S, n as C, o as w, r as T, s as E } from "./timer-ChR2a-4D-CgvgGXZ7.js";
//#region ../react/build/GraphVizChart-DvlJXY81.js
var D = /* @__PURE__ */ r(a(), 1);
function O(e, t, n) {
var r = new C();
return t = t == null ? 0 : +t, r.restart((n) => {
r.stop(), e(n + t);
}, t, n), r;
}
var k = "http://www.w3.org/1999/xhtml", A = {
svg: "http://www.w3.org/2000/svg",
xhtml: k,
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/"
};
function j(e) {
var t = e += "", n = t.indexOf(":");
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), A.hasOwnProperty(t) ? {
space: A[t],
local: e
} : e;
}
function M(e) {
return function() {
var t = this.ownerDocument, n = this.namespaceURI;
return n === k && t.documentElement.namespaceURI === k ? t.createElement(e) : t.createElementNS(n, e);
};
}
function N(e) {
return function() {
return this.ownerDocument.createElementNS(e.space, e.local);
};
}
function P(e) {
var t = j(e);
return (t.local ? N : M)(t);
}
function ee() {}
function te(e) {
return e == null ? ee : function() {
return this.querySelector(e);
};
}
function ne(e) {
typeof e != "function" && (e = te(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 H(r, this._parents);
}
function F(e) {
return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function re() {
return [];
}
function I(e) {
return e == null ? re : function() {
return this.querySelectorAll(e);
};
}
function ie(e) {
return function() {
var t = e.apply(this, arguments);
return t == null ? [] : F(t);
};
}
function ae(e) {
e = typeof e == "function" ? ie(e) : I(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 H(r, i);
}
function L(e) {
return function() {
return this.matches(e);
};
}
function oe(e) {
return function(t) {
return t.matches(e);
};
}
var se = Array.prototype.find;
function ce(e) {
return function() {
return se.call(this.children, e);
};
}
function le() {
return this.firstElementChild;
}
function ue(e) {
return this.select(e == null ? le : ce(typeof e == "function" ? e : oe(e)));
}
var de = Array.prototype.filter;
function fe() {
return this.children;
}
function pe(e) {
return function() {
return de.call(this.children, e);
};
}
function me(e) {
return this.selectAll(e == null ? fe : pe(typeof e == "function" ? e : oe(e)));
}
function he(e) {
typeof e != "function" && (e = L(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 H(r, this._parents);
}
function ge(e) {
return Array(e.length);
}
function _e() {
return new H(this._enter || this._groups.map(ge), this._parents);
}
function R(e, t) {
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
}
R.prototype = {
constructor: R,
appendChild: function(e) {
return this._parent.insertBefore(e, this._next);
},
insertBefore: function(e, t) {
return this._parent.insertBefore(e, t);
},
querySelector: function(e) {
return this._parent.querySelector(e);
},
querySelectorAll: function(e) {
return this._parent.querySelectorAll(e);
}
};
function ve(e) {
return function() {
return e;
};
}
function ye(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 R(e, a[o]);
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
}
function be(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 R(e, a[s]);
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
}
function xe(e) {
return e.__data__;
}
function Se(e, t) {
if (!arguments.length) return Array.from(this, xe);
var n = t ? be : ye, r = this._parents, i = this._groups;
typeof e != "function" && (e = ve(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 = F(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 H(o, r), o._enter = s, o._exit = c, o;
}
function Ce() {
return new H(this._exit || this._groups.map(ge), this._parents);
}
function we(e, t, n) {
var r = this.enter(), i = this, a = this.exit();
return r = typeof e == "function" ? e(r) : r.append(e + ""), t != null && (i = t(i)), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
}
function Te(e) {
if (!(e instanceof H)) throw Error("invalid merge");
for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
for (; s < r; ++s) o[s] = t[s];
return new H(o, this._parents);
}
function Ee() {
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;
}
function De(e) {
e ||= Oe;
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 H(i, this._parents).order();
}
function Oe(e, t) {
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function ke() {
var e = arguments[0];
return arguments[0] = this, e.apply(null, arguments), this;
}
function z() {
return Array.from(this);
}
function B() {
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;
}
function V() {
let e = 0;
for (let t of this) ++e;
return e;
}
function Ae() {
return !this.node();
}
function je(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;
}
function Me(e) {
return function() {
this.removeAttribute(e);
};
}
function Ne(e) {
return function() {
this.removeAttributeNS(e.space, e.local);
};
}
function Pe(e, t) {
return function() {
this.setAttribute(e, t);
};
}
function Fe(e, t) {
return function() {
this.setAttributeNS(e.space, e.local, t);
};
}
function Ie(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
};
}
function Le(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 Re(e, t) {
var n = j(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 ? Ne : Me : typeof t == "function" ? n.local ? Le : Ie : n.local ? Fe : Pe)(n, t));
}
function ze(e) {
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
}
function Be(e) {
return function() {
this.style.removeProperty(e);
};
}
function Ve(e, t, n) {
return function() {
this.style.setProperty(e, t, n);
};
}
function He(e, t, n) {
return function() {
var r = t.apply(this, arguments);
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
};
}
function Ue(e, t, n) {
return arguments.length > 1 ? this.each((t == null ? Be : typeof t == "function" ? He : Ve)(e, t, n ?? "")) : We(this.node(), e);
}
function We(e, t) {
return e.style.getPropertyValue(t) || ze(e).getComputedStyle(e, null).getPropertyValue(t);
}
function Ge(e) {
return function() {
delete this[e];
};
}
function Ke(e, t) {
return function() {
this[e] = t;
};
}
function qe(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? delete this[e] : this[e] = n;
};
}
function Je(e, t) {
return arguments.length > 1 ? this.each((t == null ? Ge : typeof t == "function" ? qe : Ke)(e, t)) : this.node()[e];
}
function Ye(e) {
return e.trim().split(/^|\s+/);
}
function Xe(e) {
return e.classList || new Ze(e);
}
function Ze(e) {
this._node = e, this._names = Ye(e.getAttribute("class") || "");
}
Ze.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 Qe(e, t) {
for (var n = Xe(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
}
function $e(e, t) {
for (var n = Xe(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
}
function et(e) {
return function() {
Qe(this, e);
};
}
function tt(e) {
return function() {
$e(this, e);
};
}
function nt(e, t) {
return function() {
(t.apply(this, arguments) ? Qe : $e)(this, e);
};
}
function rt(e, t) {
var n = Ye(e + "");
if (arguments.length < 2) {
for (var r = Xe(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
return !0;
}
return this.each((typeof t == "function" ? nt : t ? et : tt)(n, t));
}
function it() {
this.textContent = "";
}
function at(e) {
return function() {
this.textContent = e;
};
}
function ot(e) {
return function() {
var t = e.apply(this, arguments);
this.textContent = t ?? "";
};
}
function st(e) {
return arguments.length ? this.each(e == null ? it : (typeof e == "function" ? ot : at)(e)) : this.node().textContent;
}
function ct() {
this.innerHTML = "";
}
function lt(e) {
return function() {
this.innerHTML = e;
};
}
function ut(e) {
return function() {
var t = e.apply(this, arguments);
this.innerHTML = t ?? "";
};
}
function dt(e) {
return arguments.length ? this.each(e == null ? ct : (typeof e == "function" ? ut : lt)(e)) : this.node().innerHTML;
}
function ft() {
this.nextSibling && this.parentNode.appendChild(this);
}
function pt() {
return this.each(ft);
}
function mt() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function ht() {
return this.each(mt);
}
function gt(e) {
var t = typeof e == "function" ? e : P(e);
return this.select(function() {
return this.appendChild(t.apply(this, arguments));
});
}
function _t() {
return null;
}
function vt(e, t) {
var n = typeof e == "function" ? e : P(e), r = t == null ? _t : typeof t == "function" ? t : te(t);
return this.select(function() {
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
});
}
function yt() {
var e = this.parentNode;
e && e.removeChild(this);
}
function bt() {
return this.each(yt);
}
function xt() {
var e = this.cloneNode(!1), t = this.parentNode;
return t ? t.insertBefore(e, this.nextSibling) : e;
}
function St() {
var e = this.cloneNode(!0), t = this.parentNode;
return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Ct(e) {
return this.select(e ? St : xt);
}
function wt(e) {
return arguments.length ? this.property("__data__", e) : this.node().__data__;
}
function Tt(e) {
return function(t) {
e.call(this, t, this.__data__);
};
}
function Et(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 Dt(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 Ot(e, t, n) {
return function() {
var r = this.__on, i, a = Tt(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 kt(e, t, n) {
var r = Et(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 ? Ot : Dt, i = 0; i < a; ++i) this.each(s(r[i], t, n));
return this;
}
function At(e, t, n) {
var r = ze(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 jt(e, t) {
return function() {
return At(this, e, t);
};
}
function Mt(e, t) {
return function() {
return At(this, e, t.apply(this, arguments));
};
}
function Nt(e, t) {
return this.each((typeof t == "function" ? Mt : jt)(e, t));
}
function* Pt() {
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);
}
var Ft = [null];
function H(e, t) {
this._groups = e, this._parents = t;
}
function It() {
return new H([[document.documentElement]], Ft);
}
function Lt() {
return this;
}
H.prototype = It.prototype = {
constructor: H,
select: ne,
selectAll: ae,
selectChild: ue,
selectChildren: me,
filter: he,
data: Se,
enter: _e,
exit: Ce,
join: we,
merge: Te,
selection: Lt,
order: Ee,
sort: De,
call: ke,
nodes: z,
node: B,
size: V,
empty: Ae,
each: je,
attr: Re,
style: Ue,
property: Je,
classed: rt,
text: st,
html: dt,
raise: pt,
lower: ht,
append: gt,
insert: vt,
remove: bt,
clone: Ct,
datum: wt,
on: kt,
dispatch: Nt,
[Symbol.iterator]: Pt
};
function U(e) {
return typeof e == "string" ? new H([[document.querySelector(e)]], [document.documentElement]) : new H([[e]], Ft);
}
function Rt(e) {
return typeof e == "string" ? new H([document.querySelectorAll(e)], [document.documentElement]) : new H([e == null ? [] : F(e)], Ft);
}
var zt = T("start", "end", "cancel", "interrupt"), Bt = [], Vt = 0, Ht = 1, Ut = 2, Wt = 3, Gt = 4, Kt = 5, qt = 6;
function W(e, t, n, r, i, a) {
var o = e.__transition;
if (!o) e.__transition = {};
else if (n in o) return;
Yt(e, n, {
name: t,
index: r,
group: i,
on: zt,
tween: Bt,
time: a.time,
delay: a.delay,
duration: a.duration,
ease: a.ease,
timer: null,
state: Vt
});
}
function Jt(e, t) {
var n = K(e, t);
if (n.state > Vt) throw Error("too late; already scheduled");
return n;
}
function G(e, t) {
var n = K(e, t);
if (n.state > Wt) throw Error("too late; already running");
return n;
}
function K(e, t) {
var n = e.__transition;
if (!n || !(n = n[t])) throw Error("transition not found");
return n;
}
function Yt(e, t, n) {
var r = e.__transition, i;
r[t] = n, n.timer = b(a, 0, n.time);
function a(e) {
n.state = Ht, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
}
function o(a) {
var l, u, d, f;
if (n.state !== Ht) return c();
for (l in r) if (f = r[l], f.name === n.name) {
if (f.state === Wt) return O(o);
f.state === Gt ? (f.state = qt, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = qt, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
}
if (O(function() {
n.state === Wt && (n.state = Gt, n.timer.restart(s, n.delay, n.time), s(a));
}), n.state = Ut, n.on.call("start", e, e.__data__, n.index, n.group), n.state === Ut) {
for (n.state = Wt, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
i.length = u + 1;
}
}
function s(t) {
for (var r = t < n.duration ? n.ease.call(null, t / n.duration) : (n.timer.restart(c), n.state = Kt, 1), a = -1, o = i.length; ++a < o;) i[a].call(e, r);
n.state === Kt && (n.on.call("end", e, e.__data__, n.index, n.group), c());
}
function c() {
for (var i in n.state = qt, n.timer.stop(), delete r[t], r) return;
delete e.__transition;
}
}
function Xt(e, t) {
var n = e.__transition, r, i, a = !0, o;
if (n) {
for (o in t = t == null ? null : t + "", n) {
if ((r = n[o]).name !== t) {
a = !1;
continue;
}
i = r.state > Ut && r.state < Kt, r.state = qt, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[o];
}
a && delete e.__transition;
}
}
function Zt(e) {
return this.each(function() {
Xt(this, e);
});
}
function Qt(e, t) {
var n, r;
return function() {
var i = G(this, e), a = i.tween;
if (a !== n) {
r = n = a;
for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
r = r.slice(), r.splice(o, 1);
break;
}
}
i.tween = r;
};
}
function q(e, t, n) {
var r, i;
if (typeof n != "function") throw Error();
return function() {
var a = G(this, e), o = a.tween;
if (o !== r) {
i = (r = o).slice();
for (var s = {
name: t,
value: n
}, c = 0, l = i.length; c < l; ++c) if (i[c].name === t) {
i[c] = s;
break;
}
c === l && i.push(s);
}
a.tween = i;
};
}
function J(e, t) {
var n = this._id;
if (e += "", arguments.length < 2) {
for (var r = K(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
return null;
}
return this.each((t == null ? Qt : q)(n, e, t));
}
function Y(e, t, n) {
var r = e._id;
return e.each(function() {
var e = G(this, r);
(e.value ||= {})[t] = n.apply(this, arguments);
}), function(e) {
return K(e, r).value[t];
};
}
function X(e, t) {
var n;
return (typeof t == "number" ? v : t instanceof p ? m : (n = p(t)) ? (t = n, m) : _)(e, t);
}
function $t(e) {
return function() {
this.removeAttribute(e);
};
}
function en(e) {
return function() {
this.removeAttributeNS(e.space, e.local);
};
}
function tn(e, t, n) {
var r, i = n + "", a;
return function() {
var o = this.getAttribute(e);
return o === i ? null : o === r ? a : a = t(r = o, n);
};
}
function nn(e, t, n) {
var r, i = n + "", a;
return function() {
var o = this.getAttributeNS(e.space, e.local);
return o === i ? null : o === r ? a : a = t(r = o, n);
};
}
function rn(e, t, n) {
var r, i, a;
return function() {
var o, s = n(this), c;
return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
};
}
function an(e, t, n) {
var r, i, a;
return function() {
var o, s = n(this), c;
return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
};
}
function on(e, t) {
var n = j(e), r = n === "transform" ? S : X;
return this.attrTween(e, typeof t == "function" ? (n.local ? an : rn)(n, r, Y(this, "attr." + e, t)) : t == null ? (n.local ? en : $t)(n) : (n.local ? nn : tn)(n, r, t));
}
function sn(e, t) {
return function(n) {
this.setAttribute(e, t.call(this, n));
};
}
function cn(e, t) {
return function(n) {
this.setAttributeNS(e.space, e.local, t.call(this, n));
};
}
function ln(e, t) {
var n, r;
function i() {
var i = t.apply(this, arguments);
return i !== r && (n = (r = i) && cn(e, i)), n;
}
return i._value = t, i;
}
function un(e, t) {
var n, r;
function i() {
var i = t.apply(this, arguments);
return i !== r && (n = (r = i) && sn(e, i)), n;
}
return i._value = t, i;
}
function dn(e, t) {
var n = "attr." + e;
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
if (t == null) return this.tween(n, null);
if (typeof t != "function") throw Error();
var r = j(e);
return this.tween(n, (r.local ? ln : un)(r, t));
}
function fn(e, t) {
return function() {
Jt(this, e).delay = +t.apply(this, arguments);
};
}
function pn(e, t) {
return t = +t, function() {
Jt(this, e).delay = t;
};
}
function mn(e) {
var t = this._id;
return arguments.length ? this.each((typeof e == "function" ? fn : pn)(t, e)) : K(this.node(), t).delay;
}
function hn(e, t) {
return function() {
G(this, e).duration = +t.apply(this, arguments);
};
}
function gn(e, t) {
return t = +t, function() {
G(this, e).duration = t;
};
}
function _n(e) {
var t = this._id;
return arguments.length ? this.each((typeof e == "function" ? hn : gn)(t, e)) : K(this.node(), t).duration;
}
function vn(e, t) {
if (typeof t != "function") throw Error();
return function() {
G(this, e).ease = t;
};
}
function yn(e) {
var t = this._id;
return arguments.length ? this.each(vn(t, e)) : K(this.node(), t).ease;
}
function bn(e, t) {
return function() {
var n = t.apply(this, arguments);
if (typeof n != "function") throw Error();
G(this, e).ease = n;
};
}
function xn(e) {
if (typeof e != "function") throw Error();
return this.each(bn(this._id, e));
}
function Sn(e) {
typeof e != "function" && (e = L(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 Zn(r, this._parents, this._name, this._id);
}
function Cn(e) {
if (e._id !== this._id) throw Error();
for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
for (; s < r; ++s) o[s] = t[s];
return new Zn(o, this._parents, this._name, this._id);
}
function wn(e) {
return (e + "").trim().split(/^|\s+/).every(function(e) {
var t = e.indexOf(".");
return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
});
}
function Tn(e, t, n) {
var r, i, a = wn(t) ? Jt : G;
return function() {
var o = a(this, e), s = o.on;
s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
};
}
function En(e, t) {
var n = this._id;
return arguments.length < 2 ? K(this.node(), n).on.on(e) : this.each(Tn(n, e, t));
}
function Dn(e) {
return function() {
var t = this.parentNode;
for (var n in this.__transition) if (+n !== e) return;
t && t.removeChild(this);
};
}
function On() {
return this.on("end.remove", Dn(this._id));
}
function kn(e) {
var t = this._name, n = this._id;
typeof e != "function" && (e = te(e));
for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d, W(l[f], t, n, f, l, K(u, n)));
return new Zn(a, this._parents, t, n);
}
function An(e) {
var t = this._name, n = this._id;
typeof e != "function" && (e = I(e));
for (var r = this._groups, i = r.length, a = [], o = [], s = 0; s < i; ++s) for (var c = r[s], l = c.length, u, d = 0; d < l; ++d) if (u = c[d]) {
for (var f = e.call(u, u.__data__, d, c), p, m = K(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) && W(p, t, n, h, f, m);
a.push(f), o.push(u);
}
return new Zn(a, o, t, n);
}
var jn = It.prototype.constructor;
function Mn() {
return new jn(this._groups, this._parents);
}
function Nn(e, t) {
var n, r, i;
return function() {
var a = We(this, e), o = (this.style.removeProperty(e), We(this, e));
return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
};
}
function Pn(e) {
return function() {
this.style.removeProperty(e);
};
}
function Fn(e, t, n) {
var r, i = n + "", a;
return function() {
var o = We(this, e);
return o === i ? null : o === r ? a : a = t(r = o, n);
};
}
function In(e, t, n) {
var r, i, a;
return function() {
var o = We(this, e), s = n(this), c = s + "";
return s ?? (c = s = (this.style.removeProperty(e), We(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
};
}
function Ln(e, t) {
var n, r, i, a = "style." + t, o = "end." + a, s;
return function() {
var c = G(this, e), l = c.on, u = c.value[a] == null ? s ||= Pn(t) : void 0;
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
};
}
function Rn(e, t, n) {
var r = (e += "") == "transform" ? E : X;
return t == null ? this.styleTween(e, Nn(e, r)).on("end.style." + e, Pn(e)) : typeof t == "function" ? this.styleTween(e, In(e, r, Y(this, "style." + e, t))).each(Ln(this._id, e)) : this.styleTween(e, Fn(e, r, t), n).on("end.style." + e, null);
}
function zn(e, t, n) {
return function(r) {
this.style.setProperty(e, t.call(this, r), n);
};
}
function Bn(e, t, n) {
var r, i;
function a() {
var a = t.apply(this, arguments);
return a !== i && (r = (i = a) && zn(e, a, n)), r;
}
return a._value = t, a;
}
function Vn(e, t, n) {
var r = "style." + (e += "");
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
if (t == null) return this.tween(r, null);
if (typeof t != "function") throw Error();
return this.tween(r, Bn(e, t, n ?? ""));
}
function Hn(e) {
return function() {
this.textContent = e;
};
}
function Un(e) {
return function() {
var t = e(this);
this.textContent = t ?? "";
};
}
function Wn(e) {
return this.tween("text", typeof e == "function" ? Un(Y(this, "text", e)) : Hn(e == null ? "" : e + ""));
}
function Gn(e) {
return function(t) {
this.textContent = e.call(this, t);
};
}
function Kn(e) {
var t, n;
function r() {
var r = e.apply(this, arguments);
return r !== n && (t = (n = r) && Gn(r)), t;
}
return r._value = e, r;
}
function qn(e) {
var t = "text";
if (arguments.length < 1) return (t = this.tween(t)) && t._value;
if (e == null) return this.tween(t, null);
if (typeof e != "function") throw Error();
return this.tween(t, Kn(e));
}
function Jn() {
for (var e = this._name, t = this._id, n = $n(), r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) if (c = o[l]) {
var u = K(c, t);
W(c, e, n, l, o, {
time: u.time + u.delay + u.duration,
delay: 0,
duration: u.duration,
ease: u.ease
});
}
return new Zn(r, this._parents, e, n);
}
function Yn() {
var e, t, n = this, r = n._id, i = n.size();
return new Promise(function(a, o) {
var s = { value: o }, c = { value: function() {
--i === 0 && a();
} };
n.each(function() {
var n = G(this, r), i = n.on;
i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
}), i === 0 && a();
});
}
var Xn = 0;
function Zn(e, t, n, r) {
this._groups = e, this._parents = t, this._name = n, this._id = r;
}
function Qn(e) {
return It().transition(e);
}
function $n() {
return ++Xn;
}
var er = It.prototype;
Zn.prototype = Qn.prototype = {
constructor: Zn,
select: kn,
selectAll: An,
selectChild: er.selectChild,
selectChildren: er.selectChildren,
filter: Sn,
merge: Cn,
selection: Mn,
transition: Jn,
call: er.call,
nodes: er.nodes,
node: er.node,
size: er.size,
empty: er.empty,
each: er.each,
on: En,
attr: on,
attrTween: dn,
style: Rn,
styleTween: Vn,
text: Wn,
textTween: qn,
remove: On,
tween: J,
delay: mn,
duration: _n,
ease: yn,
easeVarying: xn,
end: Yn,
[Symbol.iterator]: er[Symbol.iterator]
};
function tr(e) {
return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;
}
var nr = {
time: null,
delay: 0,
duration: 250,
ease: tr
};
function rr(e, t) {
for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
return n;
}
function ir(e) {
var t, n;
e instanceof Zn ? (t = e._id, e = e._name) : (t = $n(), (n = nr).time = w(), e = e == null ? null : e + "");
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && W(c, e, t, l, o, n || rr(c, t));
return new Zn(r, this._parents, e, t);
}
It.prototype.interrupt = Zt, It.prototype.transition = ir;
var ar = [null];
function or(e, t) {
var n = e.__transition, r, i;
if (n) {
for (i in t = t == null ? null : t + "", n) if ((r = n[i]).state > Ht && r.name === t) return new Zn([[e]], ar, t, +i);
}
return null;
}
var sr = "http://www.w3.org/1999/xhtml", cr = {
svg: "http://www.w3.org/2000/svg",
xhtml: sr,
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/"
};
function lr(e) {
var t = e += "", n = t.indexOf(":");
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), cr.hasOwnProperty(t) ? {
space: cr[t],
local: e
} : e;
}
function ur(e) {
return function() {
var t = this.ownerDocument, n = this.namespaceURI;
return n === sr && t.documentElement.namespaceURI === sr ? t.createElement(e) : t.createElementNS(n, e);
};
}
function dr(e) {
return function() {
return this.ownerDocument.createElementNS(e.space, e.local);
};
}
function fr(e) {
var t = lr(e);
return (t.local ? dr : ur)(t);
}
function pr() {}
function mr(e) {
return e == null ? pr : function() {
return this.querySelector(e);
};
}
function hr(e) {
typeof e != "function" && (e = mr(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 Z(r, this._parents);
}
function gr(e) {
return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
}
function _r() {
return [];
}
function vr(e) {
return e == null ? _r : function() {
return this.querySelectorAll(e);
};
}
function yr(e) {
return function() {
return gr(e.apply(this, arguments));
};
}
function br(e) {
e = typeof e == "function" ? yr(e) : vr(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 Z(r, i);
}
function xr(e) {
return function() {
return this.matches(e);
};
}
function Sr(e) {
return function(t) {
return t.matches(e);
};
}
var Cr = Array.prototype.find;
function wr(e) {
return function() {
return Cr.call(this.children, e);
};
}
function Tr() {
return this.firstElementChild;
}
function Er(e) {
return this.select(e == null ? Tr : wr(typeof e == "function" ? e : Sr(e)));
}
var Dr = Array.prototype.filter;
function Or() {
return Array.from(this.children);
}
function kr(e) {
return function() {
return Dr.call(this.children, e);
};
}
function Ar(e) {
return this.selectAll(e == null ? Or : kr(typeof e == "function" ? e : Sr(e)));
}
function jr(e) {
typeof e != "function" && (e = xr(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 Z(r, this._parents);
}
function Mr(e) {
return Array(e.length);
}
function Nr() {
return new Z(this._enter || this._groups.map(Mr), this._parents);
}
function Pr(e, t) {
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
}
Pr.prototype = {
constructor: Pr,
appendChild: function(e) {
return this._parent.insertBefore(e, this._next);
},
insertBefore: function(e, t) {
return this._parent.insertBefore(e, t);
},
querySelector: function(e) {
return this._parent.querySelector(e);
},
querySelectorAll: function(e) {
return this._parent.querySelectorAll(e);
}
};
function Fr(e) {
return function() {
return e;
};
}
function Ir(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 Pr(e, a[o]);
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
}
function Lr(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 Pr(e, a[s]);
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
}
function Rr(e) {
return e.__data__;
}
function zr(e, t) {
if (!arguments.length) return Array.from(this, Rr);
var n = t ? Lr : Ir, r = this._parents, i = this._groups;
typeof e != "function" && (e = Fr(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 = Br(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 Z(o, r), o._enter = s, o._exit = c, o;
}
function Br(e) {
return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function Vr() {
return new Z(this._exit || this._groups.map(Mr), this._parents);
}
function Hr(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;
}
function Ur(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 Z(s, this._parents);
}
function Wr() {
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;
}
function Gr(e) {
e ||= Kr;
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 Z(i, this._parents).order();
}
function Kr(e, t) {
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function qr() {
var e = arguments[0];
return arguments[0] = this, e.apply(null, arguments), this;
}
function Jr() {
return Array.from(this);
}
function Yr() {
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;
}
function Xr() {
let e = 0;
for (let t of this) ++e;
return e;
}
function Zr() {
return !this.node();
}
function Qr(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;
}
function $r(e) {
return function() {
this.removeAttribute(e);
};
}
function ei(e) {
return function() {
this.removeAttributeNS(e.space, e.local);
};
}
function ti(e, t) {
return function() {
this.setAttribute(e, t);
};
}
function ni(e, t) {
return function() {
this.setAttributeNS(e.space, e.local, t);
};
}
function ri(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
};
}
function ii(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 ai(e, t) {
var n = lr(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 ? ei : $r : typeof t == "function" ? n.local ? ii : ri : n.local ? ni : ti)(n, t));
}
function oi(e) {
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
}
function si(e) {
return function() {
this.style.removeProperty(e);
};
}
function ci(e, t, n) {
return function() {
this.style.setProperty(e, t, n);
};
}
function li(e, t, n) {
return function() {
var r = t.apply(this, arguments);
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
};
}
function ui(e, t, n) {
return arguments.length > 1 ? this.each((t == null ? si : typeof t == "function" ? li : ci)(e, t, n ?? "")) : di(this.node(), e);
}
function di(e, t) {
return e.style.getPropertyValue(t) || oi(e).getComputedStyle(e, null).getPropertyValue(t);
}
function fi(e) {
return function() {
delete this[e];
};
}
function pi(e, t) {
return function() {
this[e] = t;
};
}
function mi(e, t) {
return function() {
var n = t.apply(this, arguments);
n == null ? delete this[e] : this[e] = n;
};
}
function hi(e, t) {
return arguments.length > 1 ? this.each((t == null ? fi : typeof t == "function" ? mi : pi)(e, t)) : this.node()[e];
}
function gi(e) {
return e.trim().split(/^|\s+/);
}
function _i(e) {
return e.classList || new vi(e);
}
function vi(e) {
this._node = e, this._names = gi(e.getAttribute("class") || "");
}
vi.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 yi(e, t) {
for (var n = _i(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
}
function bi(e, t) {
for (var n = _i(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
}
function xi(e) {
return function() {
yi(this, e);
};
}
function Si(e) {
return function() {
bi(this, e);
};
}
function Ci(e, t) {
return function() {
(t.apply(this, arguments) ? yi : bi)(this, e);
};
}
function wi(e, t) {
var n = gi(e + "");
if (arguments.length < 2) {
for (var r = _i(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
return !0;
}
return this.each((typeof t == "function" ? Ci : t ? xi : Si)(n, t));
}
function Ti() {
this.textContent = "";
}
function Ei(e) {
return function() {
this.textContent = e;
};
}
function Di(e) {
return function() {
var t = e.apply(this, arguments);
this.textContent = t ?? "";
};
}
function Oi(e) {
return arguments.length ? this.each(e == null ? Ti : (typeof e == "function" ? Di : Ei)(e)) : this.node().textContent;
}
function ki() {
this.innerHTML = "";
}
function Ai(e) {
return function() {
this.innerHTML = e;
};
}
function ji(e) {
return function() {
var t = e.apply(this, arguments);
this.innerHTML = t ?? "";
};
}
function Mi(e) {
return arguments.length ? this.each(e == null ? ki : (typeof e == "function" ? ji : Ai)(e)) : this.node().innerHTML;
}
function Ni() {
this.nextSibling && this.parentNode.appendChild(this);
}
function Pi() {
return this.each(Ni);
}
function Fi() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function Ii() {
return this.each(Fi);
}
function Li(e) {
var t = typeof e == "function" ? e : fr(e);
return this.select(function() {
return this.appendChild(t.apply(this, arguments));
});
}
function Ri() {
return null;
}
function zi(e, t) {
var n = typeof e == "function" ? e : fr(e), r = t == null ? Ri : typeof t == "function" ? t : mr(t);
return this.select(function() {
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
});
}
function Bi() {
var e = this.parentNode;
e && e.removeChild(this);
}
function Vi() {
return this.each(Bi);
}
function Hi() {
var e = this.cloneNode(!1), t = this.parentNode;
return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Ui() {
var e = this.cloneNode(!0), t = this.parentNode;
return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Wi(e) {
return this.select(e ? Ui : Hi);
}
function Gi(e) {
return arguments.length ? this.property("__data__", e) : this.node().__data__;
}
function Ki(e) {
return function(t) {
e.call(this, t, this.__data__);
};
}
function qi(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 Ji(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 Yi(e, t, n) {
return function() {
var r = this.__on, i, a = Ki(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 Xi(e, t, n) {
var r = qi(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 ? Yi : Ji, i = 0; i < a; ++i) this.each(s(r[i], t, n));
return this;
}
function Zi(e, t, n) {
var r = oi(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 Qi(e, t) {
return function() {
return Zi(this, e, t);
};
}
function $i(e, t) {
return function() {
return Zi(this, e, t.apply(this, arguments));
};
}
function ea(e, t) {
return this.each((typeof t == "function" ? $i : Qi)(e, t));
}
function* ta() {
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);
}
var na = [null];
function Z(e, t) {
this._groups = e, this._parents = t;
}
function ra() {
return new Z([[document.documentElement]], na);
}
function ia() {
return this;
}
Z.prototype = ra.prototype = {
constructor: Z,
select: hr,
selectAll: br,
selectChild: Er,
selectChildren: Ar,
filter: jr,
data: zr,
enter: Nr,
exit: Vr,
join: Hr,
merge: Ur,
selection: ia,
order: Wr,
sort: Gr,
call: qr,
nodes: Jr,
node: Yr,
size: Xr,
empty: Zr,
each: Qr,
attr: ai,
style: ui,
property: hi,
classed: wi,
text: Oi,
html: Mi,
raise: Pi,
lower: Ii,
append: Li,
insert: zi,
remove: Vi,
clone: Wi,
datum: Gi,
on: Xi,
dispatch: ea,
[Symbol.iterator]: ta
};
function aa(e) {
return typeof e == "string" ? new Z([[document.querySelector(e)]], [document.documentElement]) : new Z([[e]], na);
}
function oa(e) {
let t;
for (; t = e.sourceEvent;) e = t;
return e;
}
function sa(e, t) {
if (e = oa(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];
}
var ca = {
capture: !0,
passive: !1
};
function la(e) {
e.preventDefault(), e.stopImmediatePropagation();
}
function ua(e) {
var t = e.document.documentElement, n = aa(e).on("dragstart.drag", la, ca);
"onselectstart" in t ? n.on("selectstart.drag", la, ca) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
}
function da(e, t) {
var n = e.document.documentElement, r = aa(e).on("dragstart.drag", null);
t && (r.on("click.drag", la, ca), setTimeout(function() {
r.on("click.drag", null);
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
}
var fa = T("start", "end", "cancel", "interrupt"), pa = [], ma = 0, ha = 1, ga = 2, _a = 3, va = 4, ya = 5, ba = 6;
function xa(e, t, n, r, i, a) {
var o = e.__transition;
if (!o) e.__transition = {};
else if (n in o) return;
Ta(e, n, {
name: t,
index: r,
group: i,
on: fa,
tween: pa,
time: a.time,
delay: a.delay,
duration: a.duration,
ease: a.ease,
timer: null,
state: ma
});
}
function Sa(e, t) {
var n = wa(e, t);
if (n.state > ma) throw Error("too late; already scheduled");
return n;
}
function Ca(e, t) {
var n = wa(e, t);
if (n.state > _a) throw Error("too late; already running");
return n;
}
function wa(e, t) {
var n = e.__transition;
if (!n || !(n = n[t])) throw Error("transition not found");
return n;
}
function Ta(e, t, n) {
var r = e.__transition, i;
r[t] = n, n.timer = b(a, 0, n.time);
function a(e) {
n.state = ha, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
}
function o(a) {
var l, u, d, f;
if (n.state !== ha) return c();
for (l in r) if (f = r[l], f.name === n.name) {
if (f.state === _a) return O(o);
f.state === va ? (f.state = ba, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = ba, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
}
if (O(function() {
n.state === _a && (n.state = va, n.timer.restart(s, n.delay, n.time), s(a));
}), n.state = ga, n.on.call("start", e, e.__data__, n.index, n.group), n.state === ga) {
for (n.state = _a, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
i.length = u + 1;
}
}
function s(t) {
for (var r = t < n.duration ? n.ease.call(null, t / n.duration) : (n.timer.restart(c), n.state = ya, 1), a = -1, o = i.length; ++a < o;) i[a].call(e, r);
n.state === ya && (n.on.call("end", e, e.__data__, n.index, n.group), c());
}
function c() {
for (var i in n.state = ba, n.timer.stop(), delete r[t], r) return;
delete e.__transition;
}
}
function Ea(e, t) {
var n = e.__transition, r, i, a = !0, o;
if (n) {
for (o in t = t == null ? null : t + "", n) {
if ((r = n[o]).name !== t) {
a = !1;
continue;
}
i = r.state > ga && r.state < ya, r.state = ba, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[o];
}
a && delete e.__transition;
}
}
function Da(e) {
return this.each(function() {
Ea(this, e);
});
}
function Oa(e, t) {
var n, r;
return function() {
var i = Ca(this, e), a = i.tween;
if (a !== n) {
r = n = a;
for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
r = r.slice(), r.splice(o, 1);
break;
}
}
i.tween = r;
};
}
function ka(e, t, n) {
var r, i;
if (typeof n != "function") throw Error();
return function() {
var a = Ca(this, e), o = a.tween;
if (o !== r) {
i = (r = o).slice();
for (var s = {
name: t,
value: n
}, c = 0, l = i.length; c < l; ++c) if (i[c].name === t) {
i[c] = s;
break;
}
c === l && i.push(s);
}
a.tween = i;
};
}
function Aa(e, t) {
var n = this._id;
if (e += "", arguments.length < 2) {
for (var r = wa(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
return null;
}
return this.each((t == null ? Oa : ka)(n, e, t));
}
function ja(e, t, n) {
var r = e._id;
return e.each(function() {
var e = Ca(this, r);
(e.value ||= {})[t] = n.apply(this, arguments);
}), function(e) {
return wa(e, r).value[t];
};
}
function Ma(e, t) {
var n;
return (typeof t == "number" ? v : t instanceof p ? m : (n = p(t)) ? (t = n, m) : _)(e, t);
}
function Na(e) {
return function() {
this.removeAttribute(e);
};
}
function Pa(e) {
r