shadcn-react
Version:
A simple wrapper for shadcn/ui
1,642 lines (1,641 loc) • 590 kB
JavaScript
import { c as re, f as K, w as ph, a as we, G as ot, i as He, b as U, d as te, e as By, g as ke, h as vh, _ as Wt, j as yh, k as Wy, l as mo, m as mh, n as Fy, o as Pe, L as gu, p as Ve, q as Y, r as Le, s as yn, t as va, u as gh, v as bh, x as xh, y as Ft, z as Fn, A as Ye, B as Ke, C as Ic, D as ks, E as er, F as ya, H as Ah, I as Et, J as zy, K as Oh, M as go, S as wh, N as oe, O as Ky, P as Mc, Q as Sh, U as Uy, V as qy, W as Gy, X as Ph, Y as Cc, Z as Xy, $ as Hy, a0 as Ht, a1 as zn, a2 as Eh, a3 as Vy, a4 as Is, a5 as ma, a6 as Yy, T as Xe, a7 as Zy, a8 as Jn, a9 as Ms, aa as Jy, ab as Qy, ac as em, ad as Nc, ae as _h, af as tm, ag as rm, ah as Th, ai as nm, aj as im, ak as am, al as om, am as um, an as Dc, ao as jh, ap as $h, aq as cm, ar as sm, as as lm, at as fm, au as dm, av as kh, aw as hm, ax as pm, ay as vm, az as Ih, aA as ym } from "./assets/ResponsiveContainer-Fx4iosBf.js";
import { aB as dN, aC as hN, R as pN } from "./assets/ResponsiveContainer-Fx4iosBf.js";
import w, { useMemo as mm, isValidElement as wt, cloneElement as je, createElement as Lc, Children as sa, PureComponent as tt, useRef as Mh, useState as ga, useEffect as Ch, useContext as zt, createContext as Ar, Component as Nh } from "react";
var gm = ["children", "className"];
function bu() {
return bu = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r)
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
}
return e;
}, bu.apply(this, arguments);
}
function bm(e, t) {
if (e == null)
return {};
var r = xm(e, t), n, i;
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (i = 0; i < a.length; i++)
n = a[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
}
return r;
}
function xm(e, t) {
if (e == null)
return {};
var r = {}, n = Object.keys(e), i, a;
for (a = 0; a < n.length; a++)
i = n[a], !(t.indexOf(i) >= 0) && (r[i] = e[i]);
return r;
}
var H = /* @__PURE__ */ w.forwardRef(function(e, t) {
var r = e.children, n = e.className, i = bm(e, gm), a = re("recharts-layer", n);
return /* @__PURE__ */ w.createElement("g", bu({
className: a
}, K(i, !0), {
ref: t
}), r);
});
function Rc(e) {
return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function Dh(e) {
this._context = e;
}
Dh.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(e, t) {
switch (e = +e, t = +t, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
break;
case 1:
this._point = 2;
default:
this._context.lineTo(e, t);
break;
}
}
};
function bo(e) {
return new Dh(e);
}
function Lh(e) {
return e[0];
}
function Rh(e) {
return e[1];
}
function Bh(e, t) {
var r = we(!0), n = null, i = bo, a = null, o = ph(u);
e = typeof e == "function" ? e : e === void 0 ? Lh : we(e), t = typeof t == "function" ? t : t === void 0 ? Rh : we(t);
function u(c) {
var s, l = (c = Rc(c)).length, f, d = !1, h;
for (n == null && (a = i(h = o())), s = 0; s <= l; ++s)
!(s < l && r(f = c[s], s, c)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()), d && a.point(+e(f, s, c), +t(f, s, c));
if (h)
return a = null, h + "" || null;
}
return u.x = function(c) {
return arguments.length ? (e = typeof c == "function" ? c : we(+c), u) : e;
}, u.y = function(c) {
return arguments.length ? (t = typeof c == "function" ? c : we(+c), u) : t;
}, u.defined = function(c) {
return arguments.length ? (r = typeof c == "function" ? c : we(!!c), u) : r;
}, u.curve = function(c) {
return arguments.length ? (i = c, n != null && (a = i(n)), u) : i;
}, u.context = function(c) {
return arguments.length ? (c == null ? n = a = null : a = i(n = c), u) : n;
}, u;
}
function Ji(e, t, r) {
var n = null, i = we(!0), a = null, o = bo, u = null, c = ph(s);
e = typeof e == "function" ? e : e === void 0 ? Lh : we(+e), t = typeof t == "function" ? t : t === void 0 ? we(0) : we(+t), r = typeof r == "function" ? r : r === void 0 ? Rh : we(+r);
function s(f) {
var d, h, y, p = (f = Rc(f)).length, v, x = !1, g, A = new Array(p), m = new Array(p);
for (a == null && (u = o(g = c())), d = 0; d <= p; ++d) {
if (!(d < p && i(v = f[d], d, f)) === x)
if (x = !x)
h = d, u.areaStart(), u.lineStart();
else {
for (u.lineEnd(), u.lineStart(), y = d - 1; y >= h; --y)
u.point(A[y], m[y]);
u.lineEnd(), u.areaEnd();
}
x && (A[d] = +e(v, d, f), m[d] = +t(v, d, f), u.point(n ? +n(v, d, f) : A[d], r ? +r(v, d, f) : m[d]));
}
if (g)
return u = null, g + "" || null;
}
function l() {
return Bh().defined(i).curve(o).context(a);
}
return s.x = function(f) {
return arguments.length ? (e = typeof f == "function" ? f : we(+f), n = null, s) : e;
}, s.x0 = function(f) {
return arguments.length ? (e = typeof f == "function" ? f : we(+f), s) : e;
}, s.x1 = function(f) {
return arguments.length ? (n = f == null ? null : typeof f == "function" ? f : we(+f), s) : n;
}, s.y = function(f) {
return arguments.length ? (t = typeof f == "function" ? f : we(+f), r = null, s) : t;
}, s.y0 = function(f) {
return arguments.length ? (t = typeof f == "function" ? f : we(+f), s) : t;
}, s.y1 = function(f) {
return arguments.length ? (r = f == null ? null : typeof f == "function" ? f : we(+f), s) : r;
}, s.lineX0 = s.lineY0 = function() {
return l().x(e).y(t);
}, s.lineY1 = function() {
return l().x(e).y(r);
}, s.lineX1 = function() {
return l().x(n).y(t);
}, s.defined = function(f) {
return arguments.length ? (i = typeof f == "function" ? f : we(!!f), s) : i;
}, s.curve = function(f) {
return arguments.length ? (o = f, a != null && (u = o(a)), s) : o;
}, s.context = function(f) {
return arguments.length ? (f == null ? a = u = null : u = o(a = f), s) : a;
}, s;
}
class Wh {
constructor(t, r) {
this._context = t, this._x = r;
}
areaStart() {
this._line = 0;
}
areaEnd() {
this._line = NaN;
}
lineStart() {
this._point = 0;
}
lineEnd() {
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
}
point(t, r) {
switch (t = +t, r = +r, this._point) {
case 0: {
this._point = 1, this._line ? this._context.lineTo(t, r) : this._context.moveTo(t, r);
break;
}
case 1:
this._point = 2;
default: {
this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + t) / 2, this._y0, this._x0, r, t, r) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + r) / 2, t, this._y0, t, r);
break;
}
}
this._x0 = t, this._y0 = r;
}
}
function Am(e) {
return new Wh(e, !0);
}
function Om(e) {
return new Wh(e, !1);
}
function ba() {
}
function xa(e, t, r) {
e._context.bezierCurveTo(
(2 * e._x0 + e._x1) / 3,
(2 * e._y0 + e._y1) / 3,
(e._x0 + 2 * e._x1) / 3,
(e._y0 + 2 * e._y1) / 3,
(e._x0 + 4 * e._x1 + t) / 6,
(e._y0 + 4 * e._y1 + r) / 6
);
}
function Fh(e) {
this._context = e;
}
Fh.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 3:
xa(this, this._x1, this._y1);
case 2:
this._context.lineTo(this._x1, this._y1);
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(e, t) {
switch (e = +e, t = +t, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
default:
xa(this, e, t);
break;
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
function wm(e) {
return new Fh(e);
}
function zh(e) {
this._context = e;
}
zh.prototype = {
areaStart: ba,
areaEnd: ba,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x2, this._y2), this._context.closePath();
break;
}
case 2: {
this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
break;
}
case 3: {
this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
break;
}
}
},
point: function(e, t) {
switch (e = +e, t = +t, this._point) {
case 0:
this._point = 1, this._x2 = e, this._y2 = t;
break;
case 1:
this._point = 2, this._x3 = e, this._y3 = t;
break;
case 2:
this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
break;
default:
xa(this, e, t);
break;
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
function Sm(e) {
return new zh(e);
}
function Kh(e) {
this._context = e;
}
Kh.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
},
lineEnd: function() {
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(e, t) {
switch (e = +e, t = +t, this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
var r = (this._x0 + 4 * this._x1 + e) / 6, n = (this._y0 + 4 * this._y1 + t) / 6;
this._line ? this._context.lineTo(r, n) : this._context.moveTo(r, n);
break;
case 3:
this._point = 4;
default:
xa(this, e, t);
break;
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
function Pm(e) {
return new Kh(e);
}
function Uh(e) {
this._context = e;
}
Uh.prototype = {
areaStart: ba,
areaEnd: ba,
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._point && this._context.closePath();
},
point: function(e, t) {
e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
}
};
function Em(e) {
return new Uh(e);
}
function Cs(e) {
return e < 0 ? -1 : 1;
}
function Ns(e, t, r) {
var n = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (n || i < 0 && -0), o = (r - e._y1) / (i || n < 0 && -0), u = (a * i + o * n) / (n + i);
return (Cs(a) + Cs(o)) * Math.min(Math.abs(a), Math.abs(o), 0.5 * Math.abs(u)) || 0;
}
function Ds(e, t) {
var r = e._x1 - e._x0;
return r ? (3 * (e._y1 - e._y0) / r - t) / 2 : t;
}
function Fo(e, t, r) {
var n = e._x0, i = e._y0, a = e._x1, o = e._y1, u = (a - n) / 3;
e._context.bezierCurveTo(n + u, i + u * t, a - u, o - u * r, a, o);
}
function Aa(e) {
this._context = e;
}
Aa.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x1, this._y1);
break;
case 3:
Fo(this, this._t0, Ds(this, this._t0));
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(e, t) {
var r = NaN;
if (e = +e, t = +t, !(e === this._x1 && t === this._y1)) {
switch (this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, Fo(this, Ds(this, r = Ns(this, e, t)), r);
break;
default:
Fo(this, this._t0, r = Ns(this, e, t));
break;
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = r;
}
}
};
function qh(e) {
this._context = new Gh(e);
}
(qh.prototype = Object.create(Aa.prototype)).point = function(e, t) {
Aa.prototype.point.call(this, t, e);
};
function Gh(e) {
this._context = e;
}
Gh.prototype = {
moveTo: function(e, t) {
this._context.moveTo(t, e);
},
closePath: function() {
this._context.closePath();
},
lineTo: function(e, t) {
this._context.lineTo(t, e);
},
bezierCurveTo: function(e, t, r, n, i, a) {
this._context.bezierCurveTo(t, e, n, r, a, i);
}
};
function _m(e) {
return new Aa(e);
}
function Tm(e) {
return new qh(e);
}
function Xh(e) {
this._context = e;
}
Xh.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = [], this._y = [];
},
lineEnd: function() {
var e = this._x, t = this._y, r = e.length;
if (r)
if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), r === 2)
this._context.lineTo(e[1], t[1]);
else
for (var n = Ls(e), i = Ls(t), a = 0, o = 1; o < r; ++a, ++o)
this._context.bezierCurveTo(n[0][a], i[0][a], n[1][a], i[1][a], e[o], t[o]);
(this._line || this._line !== 0 && r === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
},
point: function(e, t) {
this._x.push(+e), this._y.push(+t);
}
};
function Ls(e) {
var t, r = e.length - 1, n, i = new Array(r), a = new Array(r), o = new Array(r);
for (i[0] = 0, a[0] = 2, o[0] = e[0] + 2 * e[1], t = 1; t < r - 1; ++t)
i[t] = 1, a[t] = 4, o[t] = 4 * e[t] + 2 * e[t + 1];
for (i[r - 1] = 2, a[r - 1] = 7, o[r - 1] = 8 * e[r - 1] + e[r], t = 1; t < r; ++t)
n = i[t] / a[t - 1], a[t] -= n, o[t] -= n * o[t - 1];
for (i[r - 1] = o[r - 1] / a[r - 1], t = r - 2; t >= 0; --t)
i[t] = (o[t] - i[t + 1]) / a[t];
for (a[r - 1] = (e[r] + i[r - 1]) / 2, t = 0; t < r - 1; ++t)
a[t] = 2 * e[t + 1] - i[t + 1];
return [i, a];
}
function jm(e) {
return new Xh(e);
}
function xo(e, t) {
this._context = e, this._t = t;
}
xo.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = this._y = NaN, this._point = 0;
},
lineEnd: function() {
0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
},
point: function(e, t) {
switch (e = +e, t = +t, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
break;
case 1:
this._point = 2;
default: {
if (this._t <= 0)
this._context.lineTo(this._x, t), this._context.lineTo(e, t);
else {
var r = this._x * (1 - this._t) + e * this._t;
this._context.lineTo(r, this._y), this._context.lineTo(r, t);
}
break;
}
}
this._x = e, this._y = t;
}
};
function $m(e) {
return new xo(e, 0.5);
}
function km(e) {
return new xo(e, 0);
}
function Im(e) {
return new xo(e, 1);
}
function Ur(e, t) {
if ((o = e.length) > 1)
for (var r = 1, n, i, a = e[t[0]], o, u = a.length; r < o; ++r)
for (i = a, a = e[t[r]], n = 0; n < u; ++n)
a[n][1] += a[n][0] = isNaN(i[n][1]) ? i[n][0] : i[n][1];
}
function xu(e) {
for (var t = e.length, r = new Array(t); --t >= 0; )
r[t] = t;
return r;
}
function Mm(e, t) {
return e[t];
}
function Cm(e) {
const t = [];
return t.key = e, t;
}
function Nm() {
var e = we([]), t = xu, r = Ur, n = Mm;
function i(a) {
var o = Array.from(e.apply(this, arguments), Cm), u, c = o.length, s = -1, l;
for (const f of a)
for (u = 0, ++s; u < c; ++u)
(o[u][s] = [0, +n(f, o[u].key, s, a)]).data = f;
for (u = 0, l = Rc(t(o)); u < c; ++u)
o[l[u]].index = u;
return r(o, l), o;
}
return i.keys = function(a) {
return arguments.length ? (e = typeof a == "function" ? a : we(Array.from(a)), i) : e;
}, i.value = function(a) {
return arguments.length ? (n = typeof a == "function" ? a : we(+a), i) : n;
}, i.order = function(a) {
return arguments.length ? (t = a == null ? xu : typeof a == "function" ? a : we(Array.from(a)), i) : t;
}, i.offset = function(a) {
return arguments.length ? (r = a ?? Ur, i) : r;
}, i;
}
function Dm(e, t) {
if ((n = e.length) > 0) {
for (var r, n, i = 0, a = e[0].length, o; i < a; ++i) {
for (o = r = 0; r < n; ++r)
o += e[r][i][1] || 0;
if (o)
for (r = 0; r < n; ++r)
e[r][i][1] /= o;
}
Ur(e, t);
}
}
function Lm(e, t) {
if ((i = e.length) > 0) {
for (var r = 0, n = e[t[0]], i, a = n.length; r < a; ++r) {
for (var o = 0, u = 0; o < i; ++o)
u += e[o][r][1] || 0;
n[r][1] += n[r][0] = -u / 2;
}
Ur(e, t);
}
}
function Rm(e, t) {
if (!(!((o = e.length) > 0) || !((a = (i = e[t[0]]).length) > 0))) {
for (var r = 0, n = 1, i, a, o; n < a; ++n) {
for (var u = 0, c = 0, s = 0; u < o; ++u) {
for (var l = e[t[u]], f = l[n][1] || 0, d = l[n - 1][1] || 0, h = (f - d) / 2, y = 0; y < u; ++y) {
var p = e[t[y]], v = p[n][1] || 0, x = p[n - 1][1] || 0;
h += v - x;
}
c += f, s += h * f;
}
i[n - 1][1] += i[n - 1][0] = r, c && (r -= s / c);
}
i[n - 1][1] += i[n - 1][0] = r, Ur(e, t);
}
}
var mn = function(t) {
return null;
};
mn.displayName = "Cell";
function Qn(e) {
"@babel/helpers - typeof";
return Qn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
return typeof t;
} : function(t) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, Qn(e);
}
function Rs(e, t) {
var r = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
t && (n = n.filter(function(i) {
return Object.getOwnPropertyDescriptor(e, i).enumerable;
})), r.push.apply(r, n);
}
return r;
}
function Au(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Rs(Object(r), !0).forEach(function(n) {
Bm(e, n, r[n]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Rs(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
});
}
return e;
}
function Bm(e, t, r) {
return t = Wm(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
}
function Wm(e) {
var t = Fm(e, "string");
return Qn(t) == "symbol" ? t : String(t);
}
function Fm(e, t) {
if (Qn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Qn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
var kr = {
widthCache: {},
cacheCount: 0
}, zm = 2e3, Km = {
position: "absolute",
top: "-20000px",
left: 0,
padding: 0,
margin: 0,
border: "none",
whiteSpace: "pre"
}, Bs = "recharts_measurement_span";
function Um(e) {
var t = Au({}, e);
return Object.keys(t).forEach(function(r) {
t[r] || delete t[r];
}), t;
}
var Fr = function(t) {
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (t == null || ot.isSsr)
return {
width: 0,
height: 0
};
var n = Um(r), i = JSON.stringify({
text: t,
copyStyle: n
});
if (kr.widthCache[i])
return kr.widthCache[i];
try {
var a = document.getElementById(Bs);
a || (a = document.createElement("span"), a.setAttribute("id", Bs), a.setAttribute("aria-hidden", "true"), document.body.appendChild(a));
var o = Au(Au({}, Km), n);
Object.assign(a.style, o), a.textContent = "".concat(t);
var u = a.getBoundingClientRect(), c = {
width: u.width,
height: u.height
};
return kr.widthCache[i] = c, ++kr.cacheCount > zm && (kr.cacheCount = 0, kr.widthCache = {}), c;
} catch {
return {
width: 0,
height: 0
};
}
}, qm = function(t) {
return {
top: t.top + window.scrollY - document.documentElement.clientTop,
left: t.left + window.scrollX - document.documentElement.clientLeft
};
};
function ei(e) {
"@babel/helpers - typeof";
return ei = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
return typeof t;
} : function(t) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, ei(e);
}
function Oa(e, t) {
return Vm(e) || Hm(e, t) || Xm(e, t) || Gm();
}
function Gm() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Xm(e, t) {
if (e) {
if (typeof e == "string")
return Ws(e, t);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
return Ws(e, t);
}
}
function Ws(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = new Array(t); r < t; r++)
n[r] = e[r];
return n;
}
function Hm(e, t) {
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r != null) {
var n, i, a, o, u = [], c = !0, s = !1;
try {
if (a = (r = r.call(e)).next, t === 0) {
if (Object(r) !== r)
return;
c = !1;
} else
for (; !(c = (n = a.call(r)).done) && (u.push(n.value), u.length !== t); c = !0)
;
} catch (l) {
s = !0, i = l;
} finally {
try {
if (!c && r.return != null && (o = r.return(), Object(o) !== o))
return;
} finally {
if (s)
throw i;
}
}
return u;
}
}
function Vm(e) {
if (Array.isArray(e))
return e;
}
function Ym(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function");
}
function Fs(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, Jm(n.key), n);
}
}
function Zm(e, t, r) {
return t && Fs(e.prototype, t), r && Fs(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
}
function Jm(e) {
var t = Qm(e, "string");
return ei(t) == "symbol" ? t : String(t);
}
function Qm(e, t) {
if (ei(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ei(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
var zs = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, Ks = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, eg = /^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/, tg = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/, Hh = {
cm: 96 / 2.54,
mm: 96 / 25.4,
pt: 96 / 72,
pc: 96 / 6,
in: 96,
Q: 96 / (2.54 * 40),
px: 1
}, rg = Object.keys(Hh), Lr = "NaN";
function ng(e, t) {
return e * Hh[t];
}
var Qi = /* @__PURE__ */ function() {
function e(t, r) {
Ym(this, e), this.num = t, this.unit = r, this.num = t, this.unit = r, Number.isNaN(t) && (this.unit = ""), r !== "" && !eg.test(r) && (this.num = NaN, this.unit = ""), rg.includes(r) && (this.num = ng(t, r), this.unit = "px");
}
return Zm(e, [{
key: "add",
value: function(r) {
return this.unit !== r.unit ? new e(NaN, "") : new e(this.num + r.num, this.unit);
}
}, {
key: "subtract",
value: function(r) {
return this.unit !== r.unit ? new e(NaN, "") : new e(this.num - r.num, this.unit);
}
}, {
key: "multiply",
value: function(r) {
return this.unit !== "" && r.unit !== "" && this.unit !== r.unit ? new e(NaN, "") : new e(this.num * r.num, this.unit || r.unit);
}
}, {
key: "divide",
value: function(r) {
return this.unit !== "" && r.unit !== "" && this.unit !== r.unit ? new e(NaN, "") : new e(this.num / r.num, this.unit || r.unit);
}
}, {
key: "toString",
value: function() {
return "".concat(this.num).concat(this.unit);
}
}, {
key: "isNaN",
value: function() {
return Number.isNaN(this.num);
}
}], [{
key: "parse",
value: function(r) {
var n, i = (n = tg.exec(r)) !== null && n !== void 0 ? n : [], a = Oa(i, 3), o = a[1], u = a[2];
return new e(parseFloat(o), u ?? "");
}
}]), e;
}();
function Vh(e) {
if (e.includes(Lr))
return Lr;
for (var t = e; t.includes("*") || t.includes("/"); ) {
var r, n = (r = zs.exec(t)) !== null && r !== void 0 ? r : [], i = Oa(n, 4), a = i[1], o = i[2], u = i[3], c = Qi.parse(a ?? ""), s = Qi.parse(u ?? ""), l = o === "*" ? c.multiply(s) : c.divide(s);
if (l.isNaN())
return Lr;
t = t.replace(zs, l.toString());
}
for (; t.includes("+") || /.-\d+(?:\.\d+)?/.test(t); ) {
var f, d = (f = Ks.exec(t)) !== null && f !== void 0 ? f : [], h = Oa(d, 4), y = h[1], p = h[2], v = h[3], x = Qi.parse(y ?? ""), g = Qi.parse(v ?? ""), A = p === "+" ? x.add(g) : x.subtract(g);
if (A.isNaN())
return Lr;
t = t.replace(Ks, A.toString());
}
return t;
}
var Us = /\(([^()]*)\)/;
function ig(e) {
for (var t = e; t.includes("("); ) {
var r = Us.exec(t), n = Oa(r, 2), i = n[1];
t = t.replace(Us, Vh(i));
}
return t;
}
function ag(e) {
var t = e.replace(/\s+/g, "");
return t = ig(t), t = Vh(t), t;
}
function og(e) {
try {
return ag(e);
} catch {
return Lr;
}
}
function zo(e) {
var t = og(e.slice(5, -1));
return t === Lr ? "" : t;
}
var ug = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"], cg = ["dx", "dy", "angle", "className", "breakAll"];
function Ou() {
return Ou = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r)
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
}
return e;
}, Ou.apply(this, arguments);
}
function qs(e, t) {
if (e == null)
return {};
var r = sg(e, t), n, i;
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (i = 0; i < a.length; i++)
n = a[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
}
return r;
}
function sg(e, t) {
if (e == null)
return {};
var r = {}, n = Object.keys(e), i, a;
for (a = 0; a < n.length; a++)
i = n[a], !(t.indexOf(i) >= 0) && (r[i] = e[i]);
return r;
}
function Gs(e, t) {
return hg(e) || dg(e, t) || fg(e, t) || lg();
}
function lg() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function fg(e, t) {
if (e) {
if (typeof e == "string")
return Xs(e, t);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
return Xs(e, t);
}
}
function Xs(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = new Array(t); r < t; r++)
n[r] = e[r];
return n;
}
function dg(e, t) {
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r != null) {
var n, i, a, o, u = [], c = !0, s = !1;
try {
if (a = (r = r.call(e)).next, t === 0) {
if (Object(r) !== r)
return;
c = !1;
} else
for (; !(c = (n = a.call(r)).done) && (u.push(n.value), u.length !== t); c = !0)
;
} catch (l) {
s = !0, i = l;
} finally {
try {
if (!c && r.return != null && (o = r.return(), Object(o) !== o))
return;
} finally {
if (s)
throw i;
}
}
return u;
}
}
function hg(e) {
if (Array.isArray(e))
return e;
}
var Yh = /[ \f\n\r\t\v\u2028\u2029]+/, Zh = function(t) {
var r = t.children, n = t.breakAll, i = t.style;
try {
var a = [];
te(r) || (n ? a = r.toString().split("") : a = r.toString().split(Yh));
var o = a.map(function(c) {
return {
word: c,
width: Fr(c, i).width
};
}), u = n ? 0 : Fr(" ", i).width;
return {
wordsWithComputedWidth: o,
spaceWidth: u
};
} catch {
return null;
}
}, pg = function(t, r, n, i, a) {
var o = t.maxLines, u = t.children, c = t.style, s = t.breakAll, l = U(o), f = u, d = function() {
var D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
return D.reduce(function(M, R) {
var W = R.word, X = R.width, I = M[M.length - 1];
if (I && (i == null || a || I.width + X + n < Number(i)))
I.words.push(W), I.width += X + n;
else {
var B = {
words: [W],
width: X
};
M.push(B);
}
return M;
}, []);
}, h = d(r), y = function(D) {
return D.reduce(function(M, R) {
return M.width > R.width ? M : R;
});
};
if (!l)
return h;
for (var p = "…", v = function(D) {
var M = f.slice(0, D), R = Zh({
breakAll: s,
style: c,
children: M + p
}).wordsWithComputedWidth, W = d(R), X = W.length > o || y(W).width > Number(i);
return [X, W];
}, x = 0, g = f.length - 1, A = 0, m; x <= g && A <= f.length - 1; ) {
var b = Math.floor((x + g) / 2), O = b - 1, S = v(O), P = Gs(S, 2), j = P[0], _ = P[1], E = v(b), T = Gs(E, 1), $ = T[0];
if (!j && !$ && (x = b + 1), j && $ && (g = b - 1), !j && $) {
m = _;
break;
}
A++;
}
return m || h;
}, Hs = function(t) {
var r = te(t) ? [] : t.toString().split(Yh);
return [{
words: r
}];
}, vg = function(t) {
var r = t.width, n = t.scaleToFit, i = t.children, a = t.style, o = t.breakAll, u = t.maxLines;
if ((r || n) && !ot.isSsr) {
var c, s, l = Zh({
breakAll: o,
children: i,
style: a
});
if (l) {
var f = l.wordsWithComputedWidth, d = l.spaceWidth;
c = f, s = d;
} else
return Hs(i);
return pg({
breakAll: o,
children: i,
maxLines: u,
style: a
}, c, s, r, n);
}
return Hs(i);
}, Vs = "#808080", tr = function(t) {
var r = t.x, n = r === void 0 ? 0 : r, i = t.y, a = i === void 0 ? 0 : i, o = t.lineHeight, u = o === void 0 ? "1em" : o, c = t.capHeight, s = c === void 0 ? "0.71em" : c, l = t.scaleToFit, f = l === void 0 ? !1 : l, d = t.textAnchor, h = d === void 0 ? "start" : d, y = t.verticalAnchor, p = y === void 0 ? "end" : y, v = t.fill, x = v === void 0 ? Vs : v, g = qs(t, ug), A = mm(function() {
return vg({
breakAll: g.breakAll,
children: g.children,
maxLines: g.maxLines,
scaleToFit: f,
style: g.style,
width: g.width
});
}, [g.breakAll, g.children, g.maxLines, f, g.style, g.width]), m = g.dx, b = g.dy, O = g.angle, S = g.className, P = g.breakAll, j = qs(g, cg);
if (!He(n) || !He(a))
return null;
var _ = n + (U(m) ? m : 0), E = a + (U(b) ? b : 0), T;
switch (p) {
case "start":
T = zo("calc(".concat(s, ")"));
break;
case "middle":
T = zo("calc(".concat((A.length - 1) / 2, " * -").concat(u, " + (").concat(s, " / 2))"));
break;
default:
T = zo("calc(".concat(A.length - 1, " * -").concat(u, ")"));
break;
}
var $ = [];
if (f) {
var k = A[0].width, D = g.width;
$.push("scale(".concat((U(D) ? D / k : 1) / k, ")"));
}
return O && $.push("rotate(".concat(O, ", ").concat(_, ", ").concat(E, ")")), $.length && (j.transform = $.join(" ")), /* @__PURE__ */ w.createElement("text", Ou({}, K(j, !0), {
x: _,
y: E,
className: re("recharts-text", S),
textAnchor: h,
fill: x.includes("url") ? Vs : x
}), A.map(function(M, R) {
var W = M.words.join(P ? "" : " ");
return /* @__PURE__ */ w.createElement("tspan", {
x: _,
dy: R === 0 ? T : u,
key: W
}, W);
}));
};
function Jt(e, t) {
return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function yg(e, t) {
return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function Bc(e) {
let t, r, n;
e.length !== 2 ? (t = Jt, r = (u, c) => Jt(e(u), c), n = (u, c) => e(u) - c) : (t = e === Jt || e === yg ? e : mg, r = e, n = e);
function i(u, c, s = 0, l = u.length) {
if (s < l) {
if (t(c, c) !== 0)
return l;
do {
const f = s + l >>> 1;
r(u[f], c) < 0 ? s = f + 1 : l = f;
} while (s < l);
}
return s;
}
function a(u, c, s = 0, l = u.length) {
if (s < l) {
if (t(c, c) !== 0)
return l;
do {
const f = s + l >>> 1;
r(u[f], c) <= 0 ? s = f + 1 : l = f;
} while (s < l);
}
return s;
}
function o(u, c, s = 0, l = u.length) {
const f = i(u, c, s, l - 1);
return f > s && n(u[f - 1], c) > -n(u[f], c) ? f - 1 : f;
}
return { left: i, center: o, right: a };
}
function mg() {
return 0;
}
function Jh(e) {
return e === null ? NaN : +e;
}
function* gg(e, t) {
if (t === void 0)
for (let r of e)
r != null && (r = +r) >= r && (yield r);
else {
let r = -1;
for (let n of e)
(n = t(n, ++r, e)) != null && (n = +n) >= n && (yield n);
}
}
const bg = Bc(Jt), Ri = bg.right;
Bc(Jh).center;
class Ys extends Map {
constructor(t, r = Og) {
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null)
for (const [n, i] of t)
this.set(n, i);
}
get(t) {
return super.get(Zs(this, t));
}
has(t) {
return super.has(Zs(this, t));
}
set(t, r) {
return super.set(xg(this, t), r);
}
delete(t) {
return super.delete(Ag(this, t));
}
}
function Zs({ _intern: e, _key: t }, r) {
const n = t(r);
return e.has(n) ? e.get(n) : r;
}
function xg({ _intern: e, _key: t }, r) {
const n = t(r);
return e.has(n) ? e.get(n) : (e.set(n, r), r);
}
function Ag({ _intern: e, _key: t }, r) {
const n = t(r);
return e.has(n) && (r = e.get(n), e.delete(n)), r;
}
function Og(e) {
return e !== null && typeof e == "object" ? e.valueOf() : e;
}
function wg(e = Jt) {
if (e === Jt)
return Qh;
if (typeof e != "function")
throw new TypeError("compare is not a function");
return (t, r) => {
const n = e(t, r);
return n || n === 0 ? n : (e(r, r) === 0) - (e(t, t) === 0);
};
}
function Qh(e, t) {
return (e == null || !(e >= e)) - (t == null || !(t >= t)) || (e < t ? -1 : e > t ? 1 : 0);
}
const Sg = Math.sqrt(50), Pg = Math.sqrt(10), Eg = Math.sqrt(2);
function wa(e, t, r) {
const n = (t - e) / Math.max(0, r), i = Math.floor(Math.log10(n)), a = n / Math.pow(10, i), o = a >= Sg ? 10 : a >= Pg ? 5 : a >= Eg ? 2 : 1;
let u, c, s;
return i < 0 ? (s = Math.pow(10, -i) / o, u = Math.round(e * s), c = Math.round(t * s), u / s < e && ++u, c / s > t && --c, s = -s) : (s = Math.pow(10, i) * o, u = Math.round(e / s), c = Math.round(t / s), u * s < e && ++u, c * s > t && --c), c < u && 0.5 <= r && r < 2 ? wa(e, t, r * 2) : [u, c, s];
}
function wu(e, t, r) {
if (t = +t, e = +e, r = +r, !(r > 0))
return [];
if (e === t)
return [e];
const n = t < e, [i, a, o] = n ? wa(t, e, r) : wa(e, t, r);
if (!(a >= i))
return [];
const u = a - i + 1, c = new Array(u);
if (n)
if (o < 0)
for (let s = 0; s < u; ++s)
c[s] = (a - s) / -o;
else
for (let s = 0; s < u; ++s)
c[s] = (a - s) * o;
else if (o < 0)
for (let s = 0; s < u; ++s)
c[s] = (i + s) / -o;
else
for (let s = 0; s < u; ++s)
c[s] = (i + s) * o;
return c;
}
function Su(e, t, r) {
return t = +t, e = +e, r = +r, wa(e, t, r)[2];
}
function Pu(e, t, r) {
t = +t, e = +e, r = +r;
const n = t < e, i = n ? Su(t, e, r) : Su(e, t, r);
return (n ? -1 : 1) * (i < 0 ? 1 / -i : i);
}
function Js(e, t) {
let r;
if (t === void 0)
for (const n of e)
n != null && (r < n || r === void 0 && n >= n) && (r = n);
else {
let n = -1;
for (let i of e)
(i = t(i, ++n, e)) != null && (r < i || r === void 0 && i >= i) && (r = i);
}
return r;
}
function Qs(e, t) {
let r;
if (t === void 0)
for (const n of e)
n != null && (r > n || r === void 0 && n >= n) && (r = n);
else {
let n = -1;
for (let i of e)
(i = t(i, ++n, e)) != null && (r > i || r === void 0 && i >= i) && (r = i);
}
return r;
}
function ep(e, t, r = 0, n = 1 / 0, i) {
if (t = Math.floor(t), r = Math.floor(Math.max(0, r)), n = Math.floor(Math.min(e.length - 1, n)), !(r <= t && t <= n))
return e;
for (i = i === void 0 ? Qh : wg(i); n > r; ) {
if (n - r > 600) {
const c = n - r + 1, s = t - r + 1, l = Math.log(c), f = 0.5 * Math.exp(2 * l / 3), d = 0.5 * Math.sqrt(l * f * (c - f) / c) * (s - c / 2 < 0 ? -1 : 1), h = Math.max(r, Math.floor(t - s * f / c + d)), y = Math.min(n, Math.floor(t + (c - s) * f / c + d));
ep(e, t, h, y, i);
}
const a = e[t];
let o = r, u = n;
for (jn(e, r, t), i(e[n], a) > 0 && jn(e, r, n); o < u; ) {
for (jn(e, o, u), ++o, --u; i(e[o], a) < 0; )
++o;
for (; i(e[u], a) > 0; )
--u;
}
i(e[r], a) === 0 ? jn(e, r, u) : (++u, jn(e, u, n)), u <= t && (r = u + 1), t <= u && (n = u - 1);
}
return e;
}
function jn(e, t, r) {
const n = e[t];
e[t] = e[r], e[r] = n;
}
function _g(e, t, r) {
if (e = Float64Array.from(gg(e, r)), !(!(n = e.length) || isNaN(t = +t))) {
if (t <= 0 || n < 2)
return Qs(e);
if (t >= 1)
return Js(e);
var n, i = (n - 1) * t, a = Math.floor(i), o = Js(ep(e, a).subarray(0, a + 1)), u = Qs(e.subarray(a + 1));
return o + (u - o) * (i - a);
}
}
function Tg(e, t, r = Jh) {
if (!(!(n = e.length) || isNaN(t = +t))) {
if (t <= 0 || n < 2)
return +r(e[0], 0, e);
if (t >= 1)
return +r(e[n - 1], n - 1, e);
var n, i = (n - 1) * t, a = Math.floor(i), o = +r(e[a], a, e), u = +r(e[a + 1], a + 1, e);
return o + (u - o) * (i - a);
}
}
function jg(e, t, r) {
e = +e, t = +t, r = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +r;
for (var n = -1, i = Math.max(0, Math.ceil((t - e) / r)) | 0, a = new Array(i); ++n < i; )
a[n] = e + n * r;
return a;
}
function dt(e, t) {
switch (arguments.length) {
case 0:
break;
case 1:
this.range(e);
break;
default:
this.range(t).domain(e);
break;
}
return this;
}
function Kt(e, t) {
switch (arguments.length) {
case 0:
break;
case 1: {
typeof e == "function" ? this.interpolator(e) : this.range(e);
break;
}
default: {
this.domain(e), typeof t == "function" ? this.interpolator(t) : this.range(t);
break;
}
}
return this;
}
const Eu = Symbol("implicit");
function Wc() {
var e = new Ys(), t = [], r = [], n = Eu;
function i(a) {
let o = e.get(a);
if (o === void 0) {
if (n !== Eu)
return n;
e.set(a, o = t.push(a) - 1);
}
return r[o % r.length];
}
return i.domain = function(a) {
if (!arguments.length)
return t.slice();
t = [], e = new Ys();
for (const o of a)
e.has(o) || e.set(o, t.push(o) - 1);
return i;
}, i.range = function(a) {
return arguments.length ? (r = Array.from(a), i) : r.slice();
}, i.unknown = function(a) {
return arguments.length ? (n = a, i) : n;
}, i.copy = function() {
return Wc(t, r).unknown(n);
}, dt.apply(i, arguments), i;
}
function ti() {
var e = Wc().unknown(void 0), t = e.domain, r = e.range, n = 0, i = 1, a, o, u = !1, c = 0, s = 0, l = 0.5;
delete e.unknown;
function f() {
var d = t().length, h = i < n, y = h ? i : n, p = h ? n : i;
a = (p - y) / Math.max(1, d - c + s * 2), u && (a = Math.floor(a)), y += (p - y - a * (d - c)) * l, o = a * (1 - c), u && (y = Math.round(y), o = Math.round(o));
var v = jg(d).map(function(x) {
return y + a * x;
});
return r(h ? v.reverse() : v);
}
return e.domain = function(d) {
return arguments.length ? (t(d), f()) : t();
}, e.range = function(d) {
return arguments.length ? ([n, i] = d, n = +n, i = +i, f()) : [n, i];
}, e.rangeRound = function(d) {
return [n, i] = d, n = +n, i = +i, u = !0, f();
}, e.bandwidth = function() {
return o;
}, e.step = function() {
return a;
}, e.round = function(d) {
return arguments.length ? (u = !!d, f()) : u;
}, e.padding = function(d) {
return arguments.length ? (c = Math.min(1, s = +d), f()) : c;
}, e.paddingInner = function(d) {
return arguments.length ? (c = Math.min(1, d), f()) : c;
}, e.paddingOuter = function(d) {
return arguments.length ? (s = +d, f()) : s;
}, e.align = function(d) {
return arguments.length ? (l = Math.max(0, Math.min(1, d)), f()) : l;
}, e.copy = function() {
return ti(t(), [n, i]).round(u).paddingInner(c).paddingOuter(s).align(l);
}, dt.apply(f(), arguments);
}
function tp(e) {
var t = e.copy;
return e.padding = e.paddingOuter, delete e.paddingInner, delete e.paddingOuter, e.copy = function() {
return tp(t());
}, e;
}
function Kn() {
return tp(ti.apply(null, arguments).paddingInner(1));
}
function Fc(e, t, r) {
e.prototype = t.prototype = r, r.constructor = e;
}
function rp(e, t) {
var r = Object.create(e.prototype);
for (var n in t)
r[n] = t[n];
return r;
}
function Bi() {
}
var ri = 0.7, Sa = 1 / ri, zr = "\\s*([+-]?\\d+)\\s*", ni = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", St = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", $g = /^#([0-9a-f]{3,8})$/, kg = new RegExp(`^rgb\\(${zr},${zr},${zr}\\)$`), Ig = new RegExp(`^rgb\\(${St},${St},${St}\\)$`), Mg = new RegExp(`^rgba\\(${zr},${zr},${zr},${ni}\\)$`), Cg = new RegExp(`^rgba\\(${St},${St},${St},${ni}\\)$`), Ng = new RegExp(`^hsl\\(${ni},${St},${St}\\)$`), Dg = new RegExp(`^hsla\\(${ni},${St},${St},${ni}\\)$`), el = {
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
};
Fc(Bi, ii, {
copy(e) {
return Object.assign(new this.constructor(), this, e);
},
displayable() {
return this.rgb().displayable();
},
hex: tl,
// Deprecated! Use color.formatHex.
formatHex: tl,
formatHex8: Lg,
formatHsl: Rg,
formatRgb: rl,
toString: rl
});
function tl() {
return this.rgb().formatHex();
}
function Lg() {
return this.rgb().formatHex8();
}
function Rg() {
return np(this).formatHsl();
}
function rl() {
return this.rgb().formatRgb();
}
function ii(e) {
var t, r;
return e = (e + "").trim().toLowerCase(), (t = $g.exec(e)) ? (r = t[1].length, t = parseInt(t[1], 16), r === 6 ? nl(t) : r === 3 ? new Je(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : r === 8 ? ea(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? ea(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 = kg.exec(e)) ? new Je(t[1], t[2], t[3], 1) : (t = Ig.exec(e)) ? new Je(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Mg.exec(e)) ? ea(t[1], t[2], t[3], t[4]) : (t = Cg.exec(e)) ? ea(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Ng.exec(e)) ? ol(t[1], t[2] / 100, t[3] / 100, 1) : (t = Dg.exec(e)) ? ol(t[1], t[2] / 100, t[3] / 100, t[4]) : el.hasOwnProperty(e) ? nl(el[e]) : e === "transparent" ? new Je(NaN, NaN, NaN, 0) : null;
}
function nl(e) {
return new Je(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
}
function ea(e, t, r, n) {
return n <= 0 && (e = t = r = NaN), new Je(e, t, r, n);
}
function Bg(e) {
return e instanceof Bi || (e = ii(e)), e ? (e = e.rgb(), new Je(e.r, e.g, e.b, e.opacity)) : new Je();
}
function _u(e, t, r, n) {
return arguments.length === 1 ? Bg(e) : new Je(e, t, r, n ?? 1);
}
function Je(e, t, r, n) {
this.r = +e, this.g = +t, this.b = +r, this.opacity = +n;
}
Fc(Je, _u, rp(Bi, {
brighter(e) {
return e = e == null ? Sa : Math.pow(Sa, e), new Je(this.r * e, this.g * e, this.b * e, this.opacity);
},
darker(e) {
return e = e == null ? ri : Math.pow(ri, e), new Je(this.r * e, this.g * e, this.b * e, this.opacity);
},
rgb() {
return this;
},
clamp() {
return new Je(yr(this.r), yr(this.g), yr(this.b), Pa(this.opacity));
},
displayable() {
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
},