Files
CRM-OLD-FRONT/assets/statistics.lazy-C8ZDxiXo.js
2025-07-24 20:14:43 +03:00

22834 lines
637 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {p as Mg, a as Tn, b as Na, j as I, B as Ba, d as Fh, g as Cg, e as Ig, f as Ul, O as Hl, h as Ac, i as _c, k as Ft, l as wi, m as de, r as L, n as re, R as A, o as cr, P as Z, q as kg, s as $c, G as zh, C as Oi, t as Qt, D as Pr, S as Dg, v as Ng, w as ql, x as Wh, y as Uh, z as Hh, A as Bg, M as Lg, E as Rg, F as Fg, H as zg, I as Wg, J as Ug, K as Hg, L as qg, N as Kg, Q as Gg, U as Yg, V as Vg, W as Xg, X as Zg, Y as Jg, Z as Qg, _ as em, $ as tm, a0 as rm, c as nm} from "./index-CdMy-Rhi.js";
var qh = {
root: "m_de3d2490",
colorOverlay: "m_862f3d1b",
shadowOverlay: "m_98ae7f22",
alphaOverlay: "m_95709ac0",
childrenOverlay: "m_93e74e3"
};
const Kl = {
withShadow: !0
}
, im = Fh( (e, {radius: t, size: r}) => ({
root: {
"--cs-radius": t === void 0 ? void 0 : Cg(t),
"--cs-size": Ig(r)
}
}))
, Tc = Mg( (e, t) => {
const r = Tn("ColorSwatch", Kl, e)
, {classNames: n, className: i, style: a, styles: o, unstyled: u, vars: c, color: l, size: f, radius: s, withShadow: d, children: h, variant: v, ...y} = Tn("ColorSwatch", Kl, r)
, p = Na({
name: "ColorSwatch",
props: r,
classes: qh,
className: i,
style: a,
classNames: n,
styles: o,
unstyled: u,
vars: c,
varsResolver: im
});
return I.jsxs(Ba, {
ref: t,
variant: v,
size: f,
...p("root", {
focusable: !0
}),
...y,
children: [I.jsx("span", {
...p("alphaOverlay")
}), d && I.jsx("span", {
...p("shadowOverlay")
}), I.jsx("span", {
...p("colorOverlay", {
style: {
backgroundColor: l
}
})
}), I.jsx("span", {
...p("childrenOverlay"),
children: h
})]
})
}
);
Tc.classes = qh;
Tc.displayName = "@mantine/core/ColorSwatch";
class Gl {
static getProfitChartData({requestBody: t}) {
return Ul(Hl, {
method: "POST",
url: "/statistics/get-profit-chart-data",
body: t,
mediaType: "application/json",
errors: {
422: "Validation Error"
}
})
}
static getProfitTableData({requestBody: t}) {
return Ul(Hl, {
method: "POST",
url: "/statistics/get-profit-table-data",
body: t,
mediaType: "application/json",
errors: {
422: "Validation Error"
}
})
}
}
var tu = (e => (e[e.PROFIT = 0] = "PROFIT",
e[e.SALARIES = 1] = "SALARIES",
e))(tu || {});
const am = "_container_1kmgc_1"
, jc = {
container: am,
"page-container": "_page-container_1kmgc_8",
"profit-chart-container": "_profit-chart-container_1kmgc_16",
"top-panel": "_top-panel_1kmgc_26"
};
function Kh(e) {
return e ? e.reduce( (t, r) => {
const n = r.name.search(/\./);
if (n >= 0) {
const i = r.name.substring(n + 1);
return t[i] = r.label,
t
}
return t[r.name] = r.label,
t
}
, {}) : {}
}
var om = {
tooltip: "m_e4d36c9b",
tooltipLabel: "m_7f4bcb19",
tooltipBody: "m_3de554dd",
tooltipItemColor: "m_b30369b5",
tooltipItem: "m_3de8964e",
tooltipItemBody: "m_50186d10",
tooltipItemName: "m_501dadf9",
tooltipItemData: "m_50192318"
};
function um(e) {
return e.map(t => {
if (!t.payload || t.payload[t.name])
return t;
const r = t.name.search(/\./);
if (r >= 0) {
const n = t.name.substring(0, r)
, i = {
...t.payload[n]
}
, a = Object.entries(t.payload).reduce( (o, u) => {
const [c,l] = u;
return c === n ? o : {
...o,
[c]: l
}
}
, {});
return {
...t,
name: t.name.substring(r + 1),
payload: {
...a,
...i
}
}
}
return t
}
)
}
function cm(e, t) {
const r = um(e.filter(n => n.fill !== "none" || !n.color));
return t ? r.filter(n => n.name === t) : r
}
function Yl(e, t) {
return t === "radial" || t === "scatter" ? Array.isArray(e.value) ? e.value[1] - e.value[0] : e.value : Array.isArray(e.payload[e.dataKey]) ? e.payload[e.dataKey][1] - e.payload[e.dataKey][0] : e.payload[e.name]
}
const lm = {
type: "area",
showColor: !0
}
, Gh = Ac( (e, t) => {
var j, $;
const r = Tn("ChartTooltip", lm, e)
, {classNames: n, className: i, style: a, styles: o, unstyled: u, vars: c, payload: l, label: f, unit: s, type: d, segmentId: h, mod: v, series: y, valueFormatter: p, showColor: b, ...w} = r
, x = _c()
, O = Na({
name: "ChartTooltip",
classes: om,
props: r,
className: i,
style: a,
classNames: n,
styles: o,
unstyled: u
});
if (!l)
return null;
const g = cm(l, h)
, m = d === "scatter" ? ($ = (j = l[0]) == null ? void 0 : j.payload) == null ? void 0 : $.name : null
, S = Kh(y)
, P = f || m
, _ = g.map(T => I.jsxs("div", {
"data-type": d,
...O("tooltipItem"),
children: [I.jsxs("div", {
...O("tooltipItemBody"),
children: [b && I.jsx("svg", {
...O("tooltipItemColor"),
children: I.jsx("circle", {
r: 6,
fill: Ft(T.color, x),
width: 12,
height: 12,
cx: 6,
cy: 6
})
}), I.jsx("div", {
...O("tooltipItemName"),
children: S[T.name] || T.name
})]
}), I.jsxs("div", {
...O("tooltipItemData"),
children: [typeof p == "function" ? p(Yl(T, d)) : Yl(T, d), s || T.unit]
})]
}, (T == null ? void 0 : T.key) ?? T.name));
return I.jsxs(Ba, {
...O("tooltip"),
mod: [{
type: d
}, v],
ref: t,
...w,
children: [P && I.jsx("div", {
...O("tooltipLabel"),
children: P
}), I.jsx("div", {
...O("tooltipBody"),
children: _
})]
})
}
);
Gh.displayName = "@mantine/charts/ChartTooltip";
var sm = {
legend: "m_847eaf",
legendItem: "m_17da7e62",
legendItemColor: "m_6e236e21",
legendItemName: "m_8ff56c0d"
};
function fm(e) {
return e.map(t => {
var n;
const r = (n = t.dataKey) == null ? void 0 : n.split(".").pop();
return {
...t,
dataKey: r,
payload: {
...t.payload,
name: r,
dataKey: r
}
}
}
)
}
function dm(e) {
return fm(e.filter(t => t.color !== "none"))
}
const hm = {}
, Yh = Ac( (e, t) => {
const r = Tn("ChartLegend", hm, e)
, {classNames: n, className: i, style: a, styles: o, unstyled: u, vars: c, payload: l, onHighlight: f, legendPosition: s, mod: d, series: h, showColor: v, centered: y, ...p} = r
, b = Na({
name: "ChartLegend",
classes: sm,
props: r,
className: i,
style: a,
classNames: n,
styles: o,
unstyled: u
});
if (!l)
return null;
const w = dm(l)
, x = Kh(h)
, O = w.map( (g, m) => I.jsxs("div", {
...b("legendItem"),
onMouseEnter: () => f(g.dataKey),
onMouseLeave: () => f(null),
"data-without-color": v === !1 || void 0,
children: [I.jsx(Tc, {
color: g.color,
size: 12,
...b("legendItemColor"),
withShadow: !1
}), I.jsx("p", {
...b("legendItemName"),
children: x[g.dataKey] || g.dataKey
})]
}, m));
return I.jsx(Ba, {
ref: t,
mod: [{
position: s,
centered: y
}, d],
...b("legend"),
...p,
children: O
})
}
);
Yh.displayName = "@mantine/charts/ChartLegend";
var pm = Array.isArray
, Re = pm
, vm = typeof wi == "object" && wi && wi.Object === Object && wi
, Vh = vm
, ym = Vh
, gm = typeof self == "object" && self && self.Object === Object && self
, mm = ym || gm || Function("return this")()
, ht = mm
, bm = ht
, xm = bm.Symbol
, di = xm
, Vl = di
, Xh = Object.prototype
, wm = Xh.hasOwnProperty
, Om = Xh.toString
, dn = Vl ? Vl.toStringTag : void 0;
function Sm(e) {
var t = wm.call(e, dn)
, r = e[dn];
try {
e[dn] = void 0;
var n = !0
} catch {}
var i = Om.call(e);
return n && (t ? e[dn] = r : delete e[dn]),
i
}
var Pm = Sm
, Am = Object.prototype
, _m = Am.toString;
function $m(e) {
return _m.call(e)
}
var Tm = $m
, Xl = di
, jm = Pm
, Em = Tm
, Mm = "[object Null]"
, Cm = "[object Undefined]"
, Zl = Xl ? Xl.toStringTag : void 0;
function Im(e) {
return e == null ? e === void 0 ? Cm : Mm : Zl && Zl in Object(e) ? jm(e) : Em(e)
}
var Mt = Im;
function km(e) {
return e != null && typeof e == "object"
}
var Ct = km
, Dm = Mt
, Nm = Ct
, Bm = "[object Symbol]";
function Lm(e) {
return typeof e == "symbol" || Nm(e) && Dm(e) == Bm
}
var Xr = Lm
, Rm = Re
, Fm = Xr
, zm = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/
, Wm = /^\w*$/;
function Um(e, t) {
if (Rm(e))
return !1;
var r = typeof e;
return r == "number" || r == "symbol" || r == "boolean" || e == null || Fm(e) ? !0 : Wm.test(e) || !zm.test(e) || t != null && e in Object(t)
}
var Ec = Um;
function Hm(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function")
}
var Ut = Hm;
const Zr = de(Ut);
var qm = Mt
, Km = Ut
, Gm = "[object AsyncFunction]"
, Ym = "[object Function]"
, Vm = "[object GeneratorFunction]"
, Xm = "[object Proxy]";
function Zm(e) {
if (!Km(e))
return !1;
var t = qm(e);
return t == Ym || t == Vm || t == Gm || t == Xm
}
var Mc = Zm;
const J = de(Mc);
var Jm = ht
, Qm = Jm["__core-js_shared__"]
, eb = Qm
, $o = eb
, Jl = function() {
var e = /[^.]+$/.exec($o && $o.keys && $o.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : ""
}();
function tb(e) {
return !!Jl && Jl in e
}
var rb = tb
, nb = Function.prototype
, ib = nb.toString;
function ab(e) {
if (e != null) {
try {
return ib.call(e)
} catch {}
try {
return e + ""
} catch {}
}
return ""
}
var Zh = ab
, ob = Mc
, ub = rb
, cb = Ut
, lb = Zh
, sb = /[\\^$.*+?()[\]{}|]/g
, fb = /^\[object .+?Constructor\]$/
, db = Function.prototype
, hb = Object.prototype
, pb = db.toString
, vb = hb.hasOwnProperty
, yb = RegExp("^" + pb.call(vb).replace(sb, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
function gb(e) {
if (!cb(e) || ub(e))
return !1;
var t = ob(e) ? yb : fb;
return t.test(lb(e))
}
var mb = gb;
function bb(e, t) {
return e == null ? void 0 : e[t]
}
var xb = bb
, wb = mb
, Ob = xb;
function Sb(e, t) {
var r = Ob(e, t);
return wb(r) ? r : void 0
}
var dr = Sb
, Pb = dr
, Ab = Pb(Object, "create")
, La = Ab
, Ql = La;
function _b() {
this.__data__ = Ql ? Ql(null) : {},
this.size = 0
}
var $b = _b;
function Tb(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0,
t
}
var jb = Tb
, Eb = La
, Mb = "__lodash_hash_undefined__"
, Cb = Object.prototype
, Ib = Cb.hasOwnProperty;
function kb(e) {
var t = this.__data__;
if (Eb) {
var r = t[e];
return r === Mb ? void 0 : r
}
return Ib.call(t, e) ? t[e] : void 0
}
var Db = kb
, Nb = La
, Bb = Object.prototype
, Lb = Bb.hasOwnProperty;
function Rb(e) {
var t = this.__data__;
return Nb ? t[e] !== void 0 : Lb.call(t, e)
}
var Fb = Rb
, zb = La
, Wb = "__lodash_hash_undefined__";
function Ub(e, t) {
var r = this.__data__;
return this.size += this.has(e) ? 0 : 1,
r[e] = zb && t === void 0 ? Wb : t,
this
}
var Hb = Ub
, qb = $b
, Kb = jb
, Gb = Db
, Yb = Fb
, Vb = Hb;
function Jr(e) {
var t = -1
, r = e == null ? 0 : e.length;
for (this.clear(); ++t < r; ) {
var n = e[t];
this.set(n[0], n[1])
}
}
Jr.prototype.clear = qb;
Jr.prototype.delete = Kb;
Jr.prototype.get = Gb;
Jr.prototype.has = Yb;
Jr.prototype.set = Vb;
var Xb = Jr;
function Zb() {
this.__data__ = [],
this.size = 0
}
var Jb = Zb;
function Qb(e, t) {
return e === t || e !== e && t !== t
}
var Cc = Qb
, e0 = Cc;
function t0(e, t) {
for (var r = e.length; r--; )
if (e0(e[r][0], t))
return r;
return -1
}
var Ra = t0
, r0 = Ra
, n0 = Array.prototype
, i0 = n0.splice;
function a0(e) {
var t = this.__data__
, r = r0(t, e);
if (r < 0)
return !1;
var n = t.length - 1;
return r == n ? t.pop() : i0.call(t, r, 1),
--this.size,
!0
}
var o0 = a0
, u0 = Ra;
function c0(e) {
var t = this.__data__
, r = u0(t, e);
return r < 0 ? void 0 : t[r][1]
}
var l0 = c0
, s0 = Ra;
function f0(e) {
return s0(this.__data__, e) > -1
}
var d0 = f0
, h0 = Ra;
function p0(e, t) {
var r = this.__data__
, n = h0(r, e);
return n < 0 ? (++this.size,
r.push([e, t])) : r[n][1] = t,
this
}
var v0 = p0
, y0 = Jb
, g0 = o0
, m0 = l0
, b0 = d0
, x0 = v0;
function Qr(e) {
var t = -1
, r = e == null ? 0 : e.length;
for (this.clear(); ++t < r; ) {
var n = e[t];
this.set(n[0], n[1])
}
}
Qr.prototype.clear = y0;
Qr.prototype.delete = g0;
Qr.prototype.get = m0;
Qr.prototype.has = b0;
Qr.prototype.set = x0;
var Fa = Qr
, w0 = dr
, O0 = ht
, S0 = w0(O0, "Map")
, Ic = S0
, es = Xb
, P0 = Fa
, A0 = Ic;
function _0() {
this.size = 0,
this.__data__ = {
hash: new es,
map: new (A0 || P0),
string: new es
}
}
var $0 = _0;
function T0(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null
}
var j0 = T0
, E0 = j0;
function M0(e, t) {
var r = e.__data__;
return E0(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map
}
var za = M0
, C0 = za;
function I0(e) {
var t = C0(this, e).delete(e);
return this.size -= t ? 1 : 0,
t
}
var k0 = I0
, D0 = za;
function N0(e) {
return D0(this, e).get(e)
}
var B0 = N0
, L0 = za;
function R0(e) {
return L0(this, e).has(e)
}
var F0 = R0
, z0 = za;
function W0(e, t) {
var r = z0(this, e)
, n = r.size;
return r.set(e, t),
this.size += r.size == n ? 0 : 1,
this
}
var U0 = W0
, H0 = $0
, q0 = k0
, K0 = B0
, G0 = F0
, Y0 = U0;
function en(e) {
var t = -1
, r = e == null ? 0 : e.length;
for (this.clear(); ++t < r; ) {
var n = e[t];
this.set(n[0], n[1])
}
}
en.prototype.clear = H0;
en.prototype.delete = q0;
en.prototype.get = K0;
en.prototype.has = G0;
en.prototype.set = Y0;
var kc = en
, Jh = kc
, V0 = "Expected a function";
function Dc(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(V0);
var r = function() {
var n = arguments
, i = t ? t.apply(this, n) : n[0]
, a = r.cache;
if (a.has(i))
return a.get(i);
var o = e.apply(this, n);
return r.cache = a.set(i, o) || a,
o
};
return r.cache = new (Dc.Cache || Jh),
r
}
Dc.Cache = Jh;
var Qh = Dc;
const X0 = de(Qh);
var Z0 = Qh
, J0 = 500;
function Q0(e) {
var t = Z0(e, function(n) {
return r.size === J0 && r.clear(),
n
})
, r = t.cache;
return t
}
var ex = Q0
, tx = ex
, rx = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g
, nx = /\\(\\)?/g
, ix = tx(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""),
e.replace(rx, function(r, n, i, a) {
t.push(i ? a.replace(nx, "$1") : n || r)
}),
t
})
, ax = ix;
function ox(e, t) {
for (var r = -1, n = e == null ? 0 : e.length, i = Array(n); ++r < n; )
i[r] = t(e[r], r, e);
return i
}
var Nc = ox
, ts = di
, ux = Nc
, cx = Re
, lx = Xr
, sx = 1 / 0
, rs = ts ? ts.prototype : void 0
, ns = rs ? rs.toString : void 0;
function ep(e) {
if (typeof e == "string")
return e;
if (cx(e))
return ux(e, ep) + "";
if (lx(e))
return ns ? ns.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -sx ? "-0" : t
}
var fx = ep
, dx = fx;
function hx(e) {
return e == null ? "" : dx(e)
}
var tp = hx
, px = Re
, vx = Ec
, yx = ax
, gx = tp;
function mx(e, t) {
return px(e) ? e : vx(e, t) ? [e] : yx(gx(e))
}
var rp = mx
, bx = Xr
, xx = 1 / 0;
function wx(e) {
if (typeof e == "string" || bx(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -xx ? "-0" : t
}
var Wa = wx
, Ox = rp
, Sx = Wa;
function Px(e, t) {
t = Ox(t, e);
for (var r = 0, n = t.length; e != null && r < n; )
e = e[Sx(t[r++])];
return r && r == n ? e : void 0
}
var Bc = Px
, Ax = Bc;
function _x(e, t, r) {
var n = e == null ? void 0 : Ax(e, t);
return n === void 0 ? r : n
}
var np = _x;
const Ve = de(np);
function $x(e) {
return e == null
}
var Tx = $x;
const te = de(Tx);
var jx = Mt
, Ex = Re
, Mx = Ct
, Cx = "[object String]";
function Ix(e) {
return typeof e == "string" || !Ex(e) && Mx(e) && jx(e) == Cx
}
var kx = Ix;
const hi = de(kx);
var ip = {
exports: {}
}
, oe = {};
/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Lc = Symbol.for("react.element"), Rc = Symbol.for("react.portal"), Ua = Symbol.for("react.fragment"), Ha = Symbol.for("react.strict_mode"), qa = Symbol.for("react.profiler"), Ka = Symbol.for("react.provider"), Ga = Symbol.for("react.context"), Dx = Symbol.for("react.server_context"), Ya = Symbol.for("react.forward_ref"), Va = Symbol.for("react.suspense"), Xa = Symbol.for("react.suspense_list"), Za = Symbol.for("react.memo"), Ja = Symbol.for("react.lazy"), Nx = Symbol.for("react.offscreen"), ap;
ap = Symbol.for("react.module.reference");
function Ze(e) {
if (typeof e == "object" && e !== null) {
var t = e.$$typeof;
switch (t) {
case Lc:
switch (e = e.type,
e) {
case Ua:
case qa:
case Ha:
case Va:
case Xa:
return e;
default:
switch (e = e && e.$$typeof,
e) {
case Dx:
case Ga:
case Ya:
case Ja:
case Za:
case Ka:
return e;
default:
return t
}
}
case Rc:
return t
}
}
}
oe.ContextConsumer = Ga;
oe.ContextProvider = Ka;
oe.Element = Lc;
oe.ForwardRef = Ya;
oe.Fragment = Ua;
oe.Lazy = Ja;
oe.Memo = Za;
oe.Portal = Rc;
oe.Profiler = qa;
oe.StrictMode = Ha;
oe.Suspense = Va;
oe.SuspenseList = Xa;
oe.isAsyncMode = function() {
return !1
}
;
oe.isConcurrentMode = function() {
return !1
}
;
oe.isContextConsumer = function(e) {
return Ze(e) === Ga
}
;
oe.isContextProvider = function(e) {
return Ze(e) === Ka
}
;
oe.isElement = function(e) {
return typeof e == "object" && e !== null && e.$$typeof === Lc
}
;
oe.isForwardRef = function(e) {
return Ze(e) === Ya
}
;
oe.isFragment = function(e) {
return Ze(e) === Ua
}
;
oe.isLazy = function(e) {
return Ze(e) === Ja
}
;
oe.isMemo = function(e) {
return Ze(e) === Za
}
;
oe.isPortal = function(e) {
return Ze(e) === Rc
}
;
oe.isProfiler = function(e) {
return Ze(e) === qa
}
;
oe.isStrictMode = function(e) {
return Ze(e) === Ha
}
;
oe.isSuspense = function(e) {
return Ze(e) === Va
}
;
oe.isSuspenseList = function(e) {
return Ze(e) === Xa
}
;
oe.isValidElementType = function(e) {
return typeof e == "string" || typeof e == "function" || e === Ua || e === qa || e === Ha || e === Va || e === Xa || e === Nx || typeof e == "object" && e !== null && (e.$$typeof === Ja || e.$$typeof === Za || e.$$typeof === Ka || e.$$typeof === Ga || e.$$typeof === Ya || e.$$typeof === ap || e.getModuleId !== void 0)
}
;
oe.typeOf = Ze;
ip.exports = oe;
var Bx = ip.exports
, Lx = Mt
, Rx = Ct
, Fx = "[object Number]";
function zx(e) {
return typeof e == "number" || Rx(e) && Lx(e) == Fx
}
var op = zx;
const Wx = de(op);
var Ux = op;
function Hx(e) {
return Ux(e) && e != +e
}
var qx = Hx;
const tn = de(qx);
var it = function(t) {
return t === 0 ? 0 : t > 0 ? 1 : -1
}
, er = function(t) {
return hi(t) && t.indexOf("%") === t.length - 1
}
, R = function(t) {
return Wx(t) && !tn(t)
}
, Ae = function(t) {
return R(t) || hi(t)
}
, Kx = 0
, pi = function(t) {
var r = ++Kx;
return "".concat(t || "").concat(r)
}
, lr = function(t, r) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0
, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
if (!R(t) && !hi(t))
return n;
var a;
if (er(t)) {
var o = t.indexOf("%");
a = r * parseFloat(t.slice(0, o)) / 100
} else
a = +t;
return tn(a) && (a = n),
i && a > r && (a = r),
a
}
, Bt = function(t) {
if (!t)
return null;
var r = Object.keys(t);
return r && r.length ? t[r[0]] : null
}
, Gx = function(t) {
if (!Array.isArray(t))
return !1;
for (var r = t.length, n = {}, i = 0; i < r; i++)
if (!n[t[i]])
n[t[i]] = !0;
else
return !0;
return !1
}
, Ge = function(t, r) {
return R(t) && R(r) ? function(n) {
return t + n * (r - t)
}
: function() {
return r
}
};
function Bi(e, t, r) {
return !e || !e.length ? null : e.find(function(n) {
return n && (typeof t == "function" ? t(n) : Ve(n, t)) === r
})
}
function Ar(e, t) {
for (var r in e)
if ({}.hasOwnProperty.call(e, r) && (!{}.hasOwnProperty.call(t, r) || e[r] !== t[r]))
return !1;
for (var n in t)
if ({}.hasOwnProperty.call(t, n) && !{}.hasOwnProperty.call(e, n))
return !1;
return !0
}
function ru(e) {
"@babel/helpers - typeof";
return ru = 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
}
,
ru(e)
}
var Yx = ["viewBox", "children"]
, Vx = ["aria-activedescendant", "aria-atomic", "aria-autocomplete", "aria-busy", "aria-checked", "aria-colcount", "aria-colindex", "aria-colspan", "aria-controls", "aria-current", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-flowto", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-level", "aria-live", "aria-modal", "aria-multiline", "aria-multiselectable", "aria-orientation", "aria-owns", "aria-placeholder", "aria-posinset", "aria-pressed", "aria-readonly", "aria-relevant", "aria-required", "aria-roledescription", "aria-rowcount", "aria-rowindex", "aria-rowspan", "aria-selected", "aria-setsize", "aria-sort", "aria-valuemax", "aria-valuemin", "aria-valuenow", "aria-valuetext", "className", "color", "height", "id", "lang", "max", "media", "method", "min", "name", "style", "target", "width", "role", "tabIndex", "accentHeight", "accumulate", "additive", "alignmentBaseline", "allowReorder", "alphabetic", "amplitude", "arabicForm", "ascent", "attributeName", "attributeType", "autoReverse", "azimuth", "baseFrequency", "baselineShift", "baseProfile", "bbox", "begin", "bias", "by", "calcMode", "capHeight", "clip", "clipPath", "clipPathUnits", "clipRule", "colorInterpolation", "colorInterpolationFilters", "colorProfile", "colorRendering", "contentScriptType", "contentStyleType", "cursor", "cx", "cy", "d", "decelerate", "descent", "diffuseConstant", "direction", "display", "divisor", "dominantBaseline", "dur", "dx", "dy", "edgeMode", "elevation", "enableBackground", "end", "exponent", "externalResourcesRequired", "fill", "fillOpacity", "fillRule", "filter", "filterRes", "filterUnits", "floodColor", "floodOpacity", "focusable", "fontFamily", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontVariant", "fontWeight", "format", "from", "fx", "fy", "g1", "g2", "glyphName", "glyphOrientationHorizontal", "glyphOrientationVertical", "glyphRef", "gradientTransform", "gradientUnits", "hanging", "horizAdvX", "horizOriginX", "href", "ideographic", "imageRendering", "in2", "in", "intercept", "k1", "k2", "k3", "k4", "k", "kernelMatrix", "kernelUnitLength", "kerning", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "letterSpacing", "lightingColor", "limitingConeAngle", "local", "markerEnd", "markerHeight", "markerMid", "markerStart", "markerUnits", "markerWidth", "mask", "maskContentUnits", "maskUnits", "mathematical", "mode", "numOctaves", "offset", "opacity", "operator", "order", "orient", "orientation", "origin", "overflow", "overlinePosition", "overlineThickness", "paintOrder", "panose1", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointerEvents", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "r", "radius", "refX", "refY", "renderingIntent", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "restart", "result", "rotate", "rx", "ry", "seed", "shapeRendering", "slope", "spacing", "specularConstant", "specularExponent", "speed", "spreadMethod", "startOffset", "stdDeviation", "stemh", "stemv", "stitchTiles", "stopColor", "stopOpacity", "strikethroughPosition", "strikethroughThickness", "string", "stroke", "strokeDasharray", "strokeDashoffset", "strokeLinecap", "strokeLinejoin", "strokeMiterlimit", "strokeOpacity", "strokeWidth", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textAnchor", "textDecoration", "textLength", "textRendering", "to", "transform", "u1", "u2", "underlinePosition", "underlineThickness", "unicode", "unicodeBidi", "unicodeRange", "unitsPerEm", "vAlphabetic", "values", "vectorEffect", "version", "vertAdvY", "vertOriginX", "vertOriginY", "vHanging", "vIdeographic", "viewTarget", "visibility", "vMathematical", "widths", "wordSpacing", "writingMode", "x1", "x2", "x", "xChannelSelector", "xHeight", "xlinkActuate", "xlinkArcrole", "xlinkHref", "xlinkRole", "xlinkShow", "xlinkTitle", "xlinkType", "xmlBase", "xmlLang", "xmlns", "xmlnsXlink", "xmlSpace", "y1", "y2", "y", "yChannelSelector", "z", "zoomAndPan", "ref", "key", "angle"]
, is = ["points", "pathLength"]
, To = {
svg: Yx,
polygon: is,
polyline: is
}
, Fc = ["dangerouslySetInnerHTML", "onCopy", "onCopyCapture", "onCut", "onCutCapture", "onPaste", "onPasteCapture", "onCompositionEnd", "onCompositionEndCapture", "onCompositionStart", "onCompositionStartCapture", "onCompositionUpdate", "onCompositionUpdateCapture", "onFocus", "onFocusCapture", "onBlur", "onBlurCapture", "onChange", "onChangeCapture", "onBeforeInput", "onBeforeInputCapture", "onInput", "onInputCapture", "onReset", "onResetCapture", "onSubmit", "onSubmitCapture", "onInvalid", "onInvalidCapture", "onLoad", "onLoadCapture", "onError", "onErrorCapture", "onKeyDown", "onKeyDownCapture", "onKeyPress", "onKeyPressCapture", "onKeyUp", "onKeyUpCapture", "onAbort", "onAbortCapture", "onCanPlay", "onCanPlayCapture", "onCanPlayThrough", "onCanPlayThroughCapture", "onDurationChange", "onDurationChangeCapture", "onEmptied", "onEmptiedCapture", "onEncrypted", "onEncryptedCapture", "onEnded", "onEndedCapture", "onLoadedData", "onLoadedDataCapture", "onLoadedMetadata", "onLoadedMetadataCapture", "onLoadStart", "onLoadStartCapture", "onPause", "onPauseCapture", "onPlay", "onPlayCapture", "onPlaying", "onPlayingCapture", "onProgress", "onProgressCapture", "onRateChange", "onRateChangeCapture", "onSeeked", "onSeekedCapture", "onSeeking", "onSeekingCapture", "onStalled", "onStalledCapture", "onSuspend", "onSuspendCapture", "onTimeUpdate", "onTimeUpdateCapture", "onVolumeChange", "onVolumeChangeCapture", "onWaiting", "onWaitingCapture", "onAuxClick", "onAuxClickCapture", "onClick", "onClickCapture", "onContextMenu", "onContextMenuCapture", "onDoubleClick", "onDoubleClickCapture", "onDrag", "onDragCapture", "onDragEnd", "onDragEndCapture", "onDragEnter", "onDragEnterCapture", "onDragExit", "onDragExitCapture", "onDragLeave", "onDragLeaveCapture", "onDragOver", "onDragOverCapture", "onDragStart", "onDragStartCapture", "onDrop", "onDropCapture", "onMouseDown", "onMouseDownCapture", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseMoveCapture", "onMouseOut", "onMouseOutCapture", "onMouseOver", "onMouseOverCapture", "onMouseUp", "onMouseUpCapture", "onSelect", "onSelectCapture", "onTouchCancel", "onTouchCancelCapture", "onTouchEnd", "onTouchEndCapture", "onTouchMove", "onTouchMoveCapture", "onTouchStart", "onTouchStartCapture", "onPointerDown", "onPointerDownCapture", "onPointerMove", "onPointerMoveCapture", "onPointerUp", "onPointerUpCapture", "onPointerCancel", "onPointerCancelCapture", "onPointerEnter", "onPointerEnterCapture", "onPointerLeave", "onPointerLeaveCapture", "onPointerOver", "onPointerOverCapture", "onPointerOut", "onPointerOutCapture", "onGotPointerCapture", "onGotPointerCaptureCapture", "onLostPointerCapture", "onLostPointerCaptureCapture", "onScroll", "onScrollCapture", "onWheel", "onWheelCapture", "onAnimationStart", "onAnimationStartCapture", "onAnimationEnd", "onAnimationEndCapture", "onAnimationIteration", "onAnimationIterationCapture", "onTransitionEnd", "onTransitionEndCapture"]
, Li = function(t, r) {
if (!t || typeof t == "function" || typeof t == "boolean")
return null;
var n = t;
if (L.isValidElement(t) && (n = t.props),
!Zr(n))
return null;
var i = {};
return Object.keys(n).forEach(function(a) {
Fc.includes(a) && (i[a] = r || function(o) {
return n[a](n, o)
}
)
}),
i
}
, Xx = function(t, r, n) {
return function(i) {
return t(r, n, i),
null
}
}
, Ri = function(t, r, n) {
if (!Zr(t) || ru(t) !== "object")
return null;
var i = null;
return Object.keys(t).forEach(function(a) {
var o = t[a];
Fc.includes(a) && typeof o == "function" && (i || (i = {}),
i[a] = Xx(o, r, n))
}),
i
}
, Zx = ["children"]
, Jx = ["children"];
function as(e, t) {
if (e == null)
return {};
var r = Qx(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 Qx(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function nu(e) {
"@babel/helpers - typeof";
return nu = 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
}
,
nu(e)
}
var os = {
click: "onClick",
mousedown: "onMouseDown",
mouseup: "onMouseUp",
mouseover: "onMouseOver",
mousemove: "onMouseMove",
mouseout: "onMouseOut",
mouseenter: "onMouseEnter",
mouseleave: "onMouseLeave",
touchcancel: "onTouchCancel",
touchend: "onTouchEnd",
touchmove: "onTouchMove",
touchstart: "onTouchStart"
}
, Ot = function(t) {
return typeof t == "string" ? t : t ? t.displayName || t.name || "Component" : ""
}
, us = null
, jo = null
, zc = function e(t) {
if (t === us && Array.isArray(jo))
return jo;
var r = [];
return L.Children.forEach(t, function(n) {
te(n) || (Bx.isFragment(n) ? r = r.concat(e(n.props.children)) : r.push(n))
}),
jo = r,
us = t,
r
};
function at(e, t) {
var r = []
, n = [];
return Array.isArray(t) ? n = t.map(function(i) {
return Ot(i)
}) : n = [Ot(t)],
zc(e).forEach(function(i) {
var a = Ve(i, "type.displayName") || Ve(i, "type.name");
n.indexOf(a) !== -1 && r.push(i)
}),
r
}
function ze(e, t) {
var r = at(e, t);
return r && r[0]
}
var cs = function(t) {
if (!t || !t.props)
return !1;
var r = t.props
, n = r.width
, i = r.height;
return !(!R(n) || n <= 0 || !R(i) || i <= 0)
}
, ew = ["a", "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColormatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-url", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "lineGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "script", "set", "stop", "style", "svg", "switch", "symbol", "text", "textPath", "title", "tref", "tspan", "use", "view", "vkern"]
, tw = function(t) {
return t && t.type && hi(t.type) && ew.indexOf(t.type) >= 0
}
, rw = function(t) {
return t && nu(t) === "object" && "clipDot"in t
}
, nw = function(t, r, n, i) {
var a, o = (a = To == null ? void 0 : To[i]) !== null && a !== void 0 ? a : [];
return !J(t) && (i && o.includes(r) || Vx.includes(r)) || n && Fc.includes(r)
}
, Q = function(t, r, n) {
if (!t || typeof t == "function" || typeof t == "boolean")
return null;
var i = t;
if (L.isValidElement(t) && (i = t.props),
!Zr(i))
return null;
var a = {};
return Object.keys(i).forEach(function(o) {
var u;
nw((u = i) === null || u === void 0 ? void 0 : u[o], o, r, n) && (a[o] = i[o])
}),
a
}
, iu = function e(t, r) {
if (t === r)
return !0;
var n = L.Children.count(t);
if (n !== L.Children.count(r))
return !1;
if (n === 0)
return !0;
if (n === 1)
return ls(Array.isArray(t) ? t[0] : t, Array.isArray(r) ? r[0] : r);
for (var i = 0; i < n; i++) {
var a = t[i]
, o = r[i];
if (Array.isArray(a) || Array.isArray(o)) {
if (!e(a, o))
return !1
} else if (!ls(a, o))
return !1
}
return !0
}
, ls = function(t, r) {
if (te(t) && te(r))
return !0;
if (!te(t) && !te(r)) {
var n = t.props || {}
, i = n.children
, a = as(n, Zx)
, o = r.props || {}
, u = o.children
, c = as(o, Jx);
return i && u ? Ar(a, c) && iu(i, u) : !i && !u ? Ar(a, c) : !1
}
return !1
}
, ss = function(t, r) {
var n = []
, i = {};
return zc(t).forEach(function(a, o) {
if (tw(a))
n.push(a);
else if (a) {
var u = Ot(a.type)
, c = r[u] || {}
, l = c.handler
, f = c.once;
if (l && (!f || !i[u])) {
var s = l(a, u, o);
n.push(s),
i[u] = !0
}
}
}),
n
}
, iw = function(t) {
var r = t && t.type;
return r && os[r] ? os[r] : null
}
, aw = function(t, r) {
return zc(r).indexOf(t)
}
, ow = ["children", "width", "height", "viewBox", "className", "style", "title", "desc"];
function au() {
return au = 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
}
,
au.apply(this, arguments)
}
function uw(e, t) {
if (e == null)
return {};
var r = cw(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 cw(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function ou(e) {
var t = e.children
, r = e.width
, n = e.height
, i = e.viewBox
, a = e.className
, o = e.style
, u = e.title
, c = e.desc
, l = uw(e, ow)
, f = i || {
width: r,
height: n,
x: 0,
y: 0
}
, s = re("recharts-surface", a);
return A.createElement("svg", au({}, Q(l, !0, "svg"), {
className: s,
width: r,
height: n,
style: o,
viewBox: "".concat(f.x, " ").concat(f.y, " ").concat(f.width, " ").concat(f.height)
}), A.createElement("title", null, u), A.createElement("desc", null, c), t)
}
var lw = ["children", "className"];
function uu() {
return uu = 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
}
,
uu.apply(this, arguments)
}
function sw(e, t) {
if (e == null)
return {};
var r = fw(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 fw(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
var ye = A.forwardRef(function(e, t) {
var r = e.children
, n = e.className
, i = sw(e, lw)
, a = re("recharts-layer", n);
return A.createElement("g", uu({
className: a
}, Q(i, !0), {
ref: t
}), r)
})
, St = function(t, r) {
for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), a = 2; a < n; a++)
i[a - 2] = arguments[a]
};
function dw(e, t, r) {
var n = -1
, i = e.length;
t < 0 && (t = -t > i ? 0 : i + t),
r = r > i ? i : r,
r < 0 && (r += i),
i = t > r ? 0 : r - t >>> 0,
t >>>= 0;
for (var a = Array(i); ++n < i; )
a[n] = e[n + t];
return a
}
var hw = dw
, pw = hw;
function vw(e, t, r) {
var n = e.length;
return r = r === void 0 ? n : r,
!t && r >= n ? e : pw(e, t, r)
}
var yw = vw
, gw = "\\ud800-\\udfff"
, mw = "\\u0300-\\u036f"
, bw = "\\ufe20-\\ufe2f"
, xw = "\\u20d0-\\u20ff"
, ww = mw + bw + xw
, Ow = "\\ufe0e\\ufe0f"
, Sw = "\\u200d"
, Pw = RegExp("[" + Sw + gw + ww + Ow + "]");
function Aw(e) {
return Pw.test(e)
}
var up = Aw;
function _w(e) {
return e.split("")
}
var $w = _w
, cp = "\\ud800-\\udfff"
, Tw = "\\u0300-\\u036f"
, jw = "\\ufe20-\\ufe2f"
, Ew = "\\u20d0-\\u20ff"
, Mw = Tw + jw + Ew
, Cw = "\\ufe0e\\ufe0f"
, Iw = "[" + cp + "]"
, cu = "[" + Mw + "]"
, lu = "\\ud83c[\\udffb-\\udfff]"
, kw = "(?:" + cu + "|" + lu + ")"
, lp = "[^" + cp + "]"
, sp = "(?:\\ud83c[\\udde6-\\uddff]){2}"
, fp = "[\\ud800-\\udbff][\\udc00-\\udfff]"
, Dw = "\\u200d"
, dp = kw + "?"
, hp = "[" + Cw + "]?"
, Nw = "(?:" + Dw + "(?:" + [lp, sp, fp].join("|") + ")" + hp + dp + ")*"
, Bw = hp + dp + Nw
, Lw = "(?:" + [lp + cu + "?", cu, sp, fp, Iw].join("|") + ")"
, Rw = RegExp(lu + "(?=" + lu + ")|" + Lw + Bw, "g");
function Fw(e) {
return e.match(Rw) || []
}
var zw = Fw
, Ww = $w
, Uw = up
, Hw = zw;
function qw(e) {
return Uw(e) ? Hw(e) : Ww(e)
}
var Kw = qw
, Gw = yw
, Yw = up
, Vw = Kw
, Xw = tp;
function Zw(e) {
return function(t) {
t = Xw(t);
var r = Yw(t) ? Vw(t) : void 0
, n = r ? r[0] : t.charAt(0)
, i = r ? Gw(r, 1).join("") : t.slice(1);
return n[e]() + i
}
}
var Jw = Zw
, Qw = Jw
, e1 = Qw("toUpperCase")
, t1 = e1;
const Qa = de(t1);
function le(e) {
return function() {
return e
}
}
const pp = Math.cos
, Fi = Math.sin
, ot = Math.sqrt
, zi = Math.PI
, eo = 2 * zi
, su = Math.PI
, fu = 2 * su
, Xt = 1e-6
, r1 = fu - Xt;
function vp(e) {
this._ += e[0];
for (let t = 1, r = e.length; t < r; ++t)
this._ += arguments[t] + e[t]
}
function n1(e) {
let t = Math.floor(e);
if (!(t >= 0))
throw new Error(`invalid digits: ${e}`);
if (t > 15)
return vp;
const r = 10 ** t;
return function(n) {
this._ += n[0];
for (let i = 1, a = n.length; i < a; ++i)
this._ += Math.round(arguments[i] * r) / r + n[i]
}
}
class i1 {
constructor(t) {
this._x0 = this._y0 = this._x1 = this._y1 = null,
this._ = "",
this._append = t == null ? vp : n1(t)
}
moveTo(t, r) {
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}`
}
closePath() {
this._x1 !== null && (this._x1 = this._x0,
this._y1 = this._y0,
this._append`Z`)
}
lineTo(t, r) {
this._append`L${this._x1 = +t},${this._y1 = +r}`
}
quadraticCurveTo(t, r, n, i) {
this._append`Q${+t},${+r},${this._x1 = +n},${this._y1 = +i}`
}
bezierCurveTo(t, r, n, i, a, o) {
this._append`C${+t},${+r},${+n},${+i},${this._x1 = +a},${this._y1 = +o}`
}
arcTo(t, r, n, i, a) {
if (t = +t,
r = +r,
n = +n,
i = +i,
a = +a,
a < 0)
throw new Error(`negative radius: ${a}`);
let o = this._x1
, u = this._y1
, c = n - t
, l = i - r
, f = o - t
, s = u - r
, d = f * f + s * s;
if (this._x1 === null)
this._append`M${this._x1 = t},${this._y1 = r}`;
else if (d > Xt)
if (!(Math.abs(s * c - l * f) > Xt) || !a)
this._append`L${this._x1 = t},${this._y1 = r}`;
else {
let h = n - o
, v = i - u
, y = c * c + l * l
, p = h * h + v * v
, b = Math.sqrt(y)
, w = Math.sqrt(d)
, x = a * Math.tan((su - Math.acos((y + d - p) / (2 * b * w))) / 2)
, O = x / w
, g = x / b;
Math.abs(O - 1) > Xt && this._append`L${t + O * f},${r + O * s}`,
this._append`A${a},${a},0,0,${+(s * h > f * v)},${this._x1 = t + g * c},${this._y1 = r + g * l}`
}
}
arc(t, r, n, i, a, o) {
if (t = +t,
r = +r,
n = +n,
o = !!o,
n < 0)
throw new Error(`negative radius: ${n}`);
let u = n * Math.cos(i)
, c = n * Math.sin(i)
, l = t + u
, f = r + c
, s = 1 ^ o
, d = o ? i - a : a - i;
this._x1 === null ? this._append`M${l},${f}` : (Math.abs(this._x1 - l) > Xt || Math.abs(this._y1 - f) > Xt) && this._append`L${l},${f}`,
n && (d < 0 && (d = d % fu + fu),
d > r1 ? this._append`A${n},${n},0,1,${s},${t - u},${r - c}A${n},${n},0,1,${s},${this._x1 = l},${this._y1 = f}` : d > Xt && this._append`A${n},${n},0,${+(d >= su)},${s},${this._x1 = t + n * Math.cos(a)},${this._y1 = r + n * Math.sin(a)}`)
}
rect(t, r, n, i) {
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}h${n = +n}v${+i}h${-n}Z`
}
toString() {
return this._
}
}
function Wc(e) {
let t = 3;
return e.digits = function(r) {
if (!arguments.length)
return t;
if (r == null)
t = null;
else {
const n = Math.floor(r);
if (!(n >= 0))
throw new RangeError(`invalid digits: ${r}`);
t = n
}
return e
}
,
() => new i1(t)
}
function Uc(e) {
return typeof e == "object" && "length"in e ? e : Array.from(e)
}
function yp(e) {
this._context = e
}
yp.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 to(e) {
return new yp(e)
}
function gp(e) {
return e[0]
}
function mp(e) {
return e[1]
}
function bp(e, t) {
var r = le(!0)
, n = null
, i = to
, a = null
, o = Wc(u);
e = typeof e == "function" ? e : e === void 0 ? gp : le(e),
t = typeof t == "function" ? t : t === void 0 ? mp : le(t);
function u(c) {
var l, f = (c = Uc(c)).length, s, d = !1, h;
for (n == null && (a = i(h = o())),
l = 0; l <= f; ++l)
!(l < f && r(s = c[l], l, c)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()),
d && a.point(+e(s, l, c), +t(s, l, c));
if (h)
return a = null,
h + "" || null
}
return u.x = function(c) {
return arguments.length ? (e = typeof c == "function" ? c : le(+c),
u) : e
}
,
u.y = function(c) {
return arguments.length ? (t = typeof c == "function" ? c : le(+c),
u) : t
}
,
u.defined = function(c) {
return arguments.length ? (r = typeof c == "function" ? c : le(!!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 Si(e, t, r) {
var n = null
, i = le(!0)
, a = null
, o = to
, u = null
, c = Wc(l);
e = typeof e == "function" ? e : e === void 0 ? gp : le(+e),
t = typeof t == "function" ? t : le(t === void 0 ? 0 : +t),
r = typeof r == "function" ? r : r === void 0 ? mp : le(+r);
function l(s) {
var d, h, v, y = (s = Uc(s)).length, p, b = !1, w, x = new Array(y), O = new Array(y);
for (a == null && (u = o(w = c())),
d = 0; d <= y; ++d) {
if (!(d < y && i(p = s[d], d, s)) === b)
if (b = !b)
h = d,
u.areaStart(),
u.lineStart();
else {
for (u.lineEnd(),
u.lineStart(),
v = d - 1; v >= h; --v)
u.point(x[v], O[v]);
u.lineEnd(),
u.areaEnd()
}
b && (x[d] = +e(p, d, s),
O[d] = +t(p, d, s),
u.point(n ? +n(p, d, s) : x[d], r ? +r(p, d, s) : O[d]))
}
if (w)
return u = null,
w + "" || null
}
function f() {
return bp().defined(i).curve(o).context(a)
}
return l.x = function(s) {
return arguments.length ? (e = typeof s == "function" ? s : le(+s),
n = null,
l) : e
}
,
l.x0 = function(s) {
return arguments.length ? (e = typeof s == "function" ? s : le(+s),
l) : e
}
,
l.x1 = function(s) {
return arguments.length ? (n = s == null ? null : typeof s == "function" ? s : le(+s),
l) : n
}
,
l.y = function(s) {
return arguments.length ? (t = typeof s == "function" ? s : le(+s),
r = null,
l) : t
}
,
l.y0 = function(s) {
return arguments.length ? (t = typeof s == "function" ? s : le(+s),
l) : t
}
,
l.y1 = function(s) {
return arguments.length ? (r = s == null ? null : typeof s == "function" ? s : le(+s),
l) : r
}
,
l.lineX0 = l.lineY0 = function() {
return f().x(e).y(t)
}
,
l.lineY1 = function() {
return f().x(e).y(r)
}
,
l.lineX1 = function() {
return f().x(n).y(t)
}
,
l.defined = function(s) {
return arguments.length ? (i = typeof s == "function" ? s : le(!!s),
l) : i
}
,
l.curve = function(s) {
return arguments.length ? (o = s,
a != null && (u = o(a)),
l) : o
}
,
l.context = function(s) {
return arguments.length ? (s == null ? a = u = null : u = o(a = s),
l) : a
}
,
l
}
class xp {
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 a1(e) {
return new xp(e,!0)
}
function o1(e) {
return new xp(e,!1)
}
const Hc = {
draw(e, t) {
const r = ot(t / zi);
e.moveTo(r, 0),
e.arc(0, 0, r, 0, eo)
}
}
, u1 = {
draw(e, t) {
const r = ot(t / 5) / 2;
e.moveTo(-3 * r, -r),
e.lineTo(-r, -r),
e.lineTo(-r, -3 * r),
e.lineTo(r, -3 * r),
e.lineTo(r, -r),
e.lineTo(3 * r, -r),
e.lineTo(3 * r, r),
e.lineTo(r, r),
e.lineTo(r, 3 * r),
e.lineTo(-r, 3 * r),
e.lineTo(-r, r),
e.lineTo(-3 * r, r),
e.closePath()
}
}
, wp = ot(1 / 3)
, c1 = wp * 2
, l1 = {
draw(e, t) {
const r = ot(t / c1)
, n = r * wp;
e.moveTo(0, -r),
e.lineTo(n, 0),
e.lineTo(0, r),
e.lineTo(-n, 0),
e.closePath()
}
}
, s1 = {
draw(e, t) {
const r = ot(t)
, n = -r / 2;
e.rect(n, n, r, r)
}
}
, f1 = .8908130915292852
, Op = Fi(zi / 10) / Fi(7 * zi / 10)
, d1 = Fi(eo / 10) * Op
, h1 = -pp(eo / 10) * Op
, p1 = {
draw(e, t) {
const r = ot(t * f1)
, n = d1 * r
, i = h1 * r;
e.moveTo(0, -r),
e.lineTo(n, i);
for (let a = 1; a < 5; ++a) {
const o = eo * a / 5
, u = pp(o)
, c = Fi(o);
e.lineTo(c * r, -u * r),
e.lineTo(u * n - c * i, c * n + u * i)
}
e.closePath()
}
}
, Eo = ot(3)
, v1 = {
draw(e, t) {
const r = -ot(t / (Eo * 3));
e.moveTo(0, r * 2),
e.lineTo(-Eo * r, -r),
e.lineTo(Eo * r, -r),
e.closePath()
}
}
, He = -.5
, qe = ot(3) / 2
, du = 1 / ot(12)
, y1 = (du / 2 + 1) * 3
, g1 = {
draw(e, t) {
const r = ot(t / y1)
, n = r / 2
, i = r * du
, a = n
, o = r * du + r
, u = -a
, c = o;
e.moveTo(n, i),
e.lineTo(a, o),
e.lineTo(u, c),
e.lineTo(He * n - qe * i, qe * n + He * i),
e.lineTo(He * a - qe * o, qe * a + He * o),
e.lineTo(He * u - qe * c, qe * u + He * c),
e.lineTo(He * n + qe * i, He * i - qe * n),
e.lineTo(He * a + qe * o, He * o - qe * a),
e.lineTo(He * u + qe * c, He * c - qe * u),
e.closePath()
}
};
function m1(e, t) {
let r = null
, n = Wc(i);
e = typeof e == "function" ? e : le(e || Hc),
t = typeof t == "function" ? t : le(t === void 0 ? 64 : +t);
function i() {
let a;
if (r || (r = a = n()),
e.apply(this, arguments).draw(r, +t.apply(this, arguments)),
a)
return r = null,
a + "" || null
}
return i.type = function(a) {
return arguments.length ? (e = typeof a == "function" ? a : le(a),
i) : e
}
,
i.size = function(a) {
return arguments.length ? (t = typeof a == "function" ? a : le(+a),
i) : t
}
,
i.context = function(a) {
return arguments.length ? (r = a ?? null,
i) : r
}
,
i
}
function Wi() {}
function Ui(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 Sp(e) {
this._context = e
}
Sp.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:
Ui(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:
Ui(this, e, t);
break
}
this._x0 = this._x1,
this._x1 = e,
this._y0 = this._y1,
this._y1 = t
}
};
function b1(e) {
return new Sp(e)
}
function Pp(e) {
this._context = e
}
Pp.prototype = {
areaStart: Wi,
areaEnd: Wi,
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:
Ui(this, e, t);
break
}
this._x0 = this._x1,
this._x1 = e,
this._y0 = this._y1,
this._y1 = t
}
};
function x1(e) {
return new Pp(e)
}
function Ap(e) {
this._context = e
}
Ap.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:
Ui(this, e, t);
break
}
this._x0 = this._x1,
this._x1 = e,
this._y0 = this._y1,
this._y1 = t
}
};
function w1(e) {
return new Ap(e)
}
function _p(e) {
this._context = e
}
_p.prototype = {
areaStart: Wi,
areaEnd: Wi,
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 O1(e) {
return new _p(e)
}
function fs(e) {
return e < 0 ? -1 : 1
}
function ds(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 (fs(a) + fs(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(u)) || 0
}
function hs(e, t) {
var r = e._x1 - e._x0;
return r ? (3 * (e._y1 - e._y0) / r - t) / 2 : t
}
function Mo(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 Hi(e) {
this._context = e
}
Hi.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:
Mo(this, this._t0, hs(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,
Mo(this, hs(this, r = ds(this, e, t)), r);
break;
default:
Mo(this, this._t0, r = ds(this, e, t));
break
}
this._x0 = this._x1,
this._x1 = e,
this._y0 = this._y1,
this._y1 = t,
this._t0 = r
}
}
};
function $p(e) {
this._context = new Tp(e)
}
($p.prototype = Object.create(Hi.prototype)).point = function(e, t) {
Hi.prototype.point.call(this, t, e)
}
;
function Tp(e) {
this._context = e
}
Tp.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 S1(e) {
return new Hi(e)
}
function P1(e) {
return new $p(e)
}
function jp(e) {
this._context = e
}
jp.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 = ps(e), i = ps(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 ps(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 A1(e) {
return new jp(e)
}
function ro(e, t) {
this._context = e,
this._t = t
}
ro.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 _1(e) {
return new ro(e,.5)
}
function $1(e) {
return new ro(e,0)
}
function T1(e) {
return new ro(e,1)
}
function Tr(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 hu(e) {
for (var t = e.length, r = new Array(t); --t >= 0; )
r[t] = t;
return r
}
function j1(e, t) {
return e[t]
}
function E1(e) {
const t = [];
return t.key = e,
t
}
function M1() {
var e = le([])
, t = hu
, r = Tr
, n = j1;
function i(a) {
var o = Array.from(e.apply(this, arguments), E1), u, c = o.length, l = -1, f;
for (const s of a)
for (u = 0,
++l; u < c; ++u)
(o[u][l] = [0, +n(s, o[u].key, l, a)]).data = s;
for (u = 0,
f = Uc(t(o)); u < c; ++u)
o[f[u]].index = u;
return r(o, f),
o
}
return i.keys = function(a) {
return arguments.length ? (e = typeof a == "function" ? a : le(Array.from(a)),
i) : e
}
,
i.value = function(a) {
return arguments.length ? (n = typeof a == "function" ? a : le(+a),
i) : n
}
,
i.order = function(a) {
return arguments.length ? (t = a == null ? hu : typeof a == "function" ? a : le(Array.from(a)),
i) : t
}
,
i.offset = function(a) {
return arguments.length ? (r = a ?? Tr,
i) : r
}
,
i
}
function C1(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
}
Tr(e, t)
}
}
function I1(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
}
Tr(e, t)
}
}
function k1(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, l = 0; u < o; ++u) {
for (var f = e[t[u]], s = f[n][1] || 0, d = f[n - 1][1] || 0, h = (s - d) / 2, v = 0; v < u; ++v) {
var y = e[t[v]]
, p = y[n][1] || 0
, b = y[n - 1][1] || 0;
h += p - b
}
c += s,
l += h * s
}
i[n - 1][1] += i[n - 1][0] = r,
c && (r -= l / c)
}
i[n - 1][1] += i[n - 1][0] = r,
Tr(e, t)
}
}
function jn(e) {
"@babel/helpers - typeof";
return jn = 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
}
,
jn(e)
}
var D1 = ["type", "size", "sizeType"];
function pu() {
return pu = 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
}
,
pu.apply(this, arguments)
}
function vs(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 ys(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? vs(Object(r), !0).forEach(function(n) {
N1(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : vs(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function N1(e, t, r) {
return t = B1(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function B1(e) {
var t = L1(e, "string");
return jn(t) == "symbol" ? t : t + ""
}
function L1(e, t) {
if (jn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (jn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function R1(e, t) {
if (e == null)
return {};
var r = F1(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 F1(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
var Ep = {
symbolCircle: Hc,
symbolCross: u1,
symbolDiamond: l1,
symbolSquare: s1,
symbolStar: p1,
symbolTriangle: v1,
symbolWye: g1
}
, z1 = Math.PI / 180
, W1 = function(t) {
var r = "symbol".concat(Qa(t));
return Ep[r] || Hc
}
, U1 = function(t, r, n) {
if (r === "area")
return t;
switch (n) {
case "cross":
return 5 * t * t / 9;
case "diamond":
return .5 * t * t / Math.sqrt(3);
case "square":
return t * t;
case "star":
{
var i = 18 * z1;
return 1.25 * t * t * (Math.tan(i) - Math.tan(i * 2) * Math.pow(Math.tan(i), 2))
}
case "triangle":
return Math.sqrt(3) * t * t / 4;
case "wye":
return (21 - 10 * Math.sqrt(3)) * t * t / 8;
default:
return Math.PI * t * t / 4
}
}
, H1 = function(t, r) {
Ep["symbol".concat(Qa(t))] = r
}
, qc = function(t) {
var r = t.type
, n = r === void 0 ? "circle" : r
, i = t.size
, a = i === void 0 ? 64 : i
, o = t.sizeType
, u = o === void 0 ? "area" : o
, c = R1(t, D1)
, l = ys(ys({}, c), {}, {
type: n,
size: a,
sizeType: u
})
, f = function() {
var p = W1(n)
, b = m1().type(p).size(U1(a, u, n));
return b()
}
, s = l.className
, d = l.cx
, h = l.cy
, v = Q(l, !0);
return d === +d && h === +h && a === +a ? A.createElement("path", pu({}, v, {
className: re("recharts-symbols", s),
transform: "translate(".concat(d, ", ").concat(h, ")"),
d: f()
})) : null
};
qc.registerSymbol = H1;
function jr(e) {
"@babel/helpers - typeof";
return jr = 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
}
,
jr(e)
}
function vu() {
return vu = 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
}
,
vu.apply(this, arguments)
}
function gs(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 q1(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? gs(Object(r), !0).forEach(function(n) {
En(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : gs(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function K1(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function G1(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, Cp(n.key), n)
}
}
function Y1(e, t, r) {
return t && G1(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function V1(e, t, r) {
return t = qi(t),
X1(e, Mp() ? Reflect.construct(t, r || [], qi(e).constructor) : t.apply(e, r))
}
function X1(e, t) {
if (t && (jr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return Z1(e)
}
function Z1(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function Mp() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (Mp = function() {
return !!e
}
)()
}
function qi(e) {
return qi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
qi(e)
}
function J1(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && yu(e, t)
}
function yu(e, t) {
return yu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
yu(e, t)
}
function En(e, t, r) {
return t = Cp(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Cp(e) {
var t = Q1(e, "string");
return jr(t) == "symbol" ? t : t + ""
}
function Q1(e, t) {
if (jr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (jr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var Ke = 32
, Kc = function(e) {
function t() {
return K1(this, t),
V1(this, t, arguments)
}
return J1(t, e),
Y1(t, [{
key: "renderIcon",
value: function(n) {
var i = this.props.inactiveColor
, a = Ke / 2
, o = Ke / 6
, u = Ke / 3
, c = n.inactive ? i : n.color;
if (n.type === "plainline")
return A.createElement("line", {
strokeWidth: 4,
fill: "none",
stroke: c,
strokeDasharray: n.payload.strokeDasharray,
x1: 0,
y1: a,
x2: Ke,
y2: a,
className: "recharts-legend-icon"
});
if (n.type === "line")
return A.createElement("path", {
strokeWidth: 4,
fill: "none",
stroke: c,
d: "M0,".concat(a, "h").concat(u, `
A`).concat(o, ",").concat(o, ",0,1,1,").concat(2 * u, ",").concat(a, `
H`).concat(Ke, "M").concat(2 * u, ",").concat(a, `
A`).concat(o, ",").concat(o, ",0,1,1,").concat(u, ",").concat(a),
className: "recharts-legend-icon"
});
if (n.type === "rect")
return A.createElement("path", {
stroke: "none",
fill: c,
d: "M0,".concat(Ke / 8, "h").concat(Ke, "v").concat(Ke * 3 / 4, "h").concat(-Ke, "z"),
className: "recharts-legend-icon"
});
if (A.isValidElement(n.legendIcon)) {
var l = q1({}, n);
return delete l.legendIcon,
A.cloneElement(n.legendIcon, l)
}
return A.createElement(qc, {
fill: c,
cx: a,
cy: a,
size: Ke,
sizeType: "diameter",
type: n.type
})
}
}, {
key: "renderItems",
value: function() {
var n = this
, i = this.props
, a = i.payload
, o = i.iconSize
, u = i.layout
, c = i.formatter
, l = i.inactiveColor
, f = {
x: 0,
y: 0,
width: Ke,
height: Ke
}
, s = {
display: u === "horizontal" ? "inline-block" : "block",
marginRight: 10
}
, d = {
display: "inline-block",
verticalAlign: "middle",
marginRight: 4
};
return a.map(function(h, v) {
var y = h.formatter || c
, p = re(En(En({
"recharts-legend-item": !0
}, "legend-item-".concat(v), !0), "inactive", h.inactive));
if (h.type === "none")
return null;
var b = J(h.value) ? null : h.value;
St(!J(h.value), `The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);
var w = h.inactive ? l : h.color;
return A.createElement("li", vu({
className: p,
style: s,
key: "legend-item-".concat(v)
}, Ri(n.props, h, v)), A.createElement(ou, {
width: o,
height: o,
viewBox: f,
style: d
}, n.renderIcon(h)), A.createElement("span", {
className: "recharts-legend-item-text",
style: {
color: w
}
}, y ? y(b, h, v) : b))
})
}
}, {
key: "render",
value: function() {
var n = this.props
, i = n.payload
, a = n.layout
, o = n.align;
if (!i || !i.length)
return null;
var u = {
padding: 0,
margin: 0,
textAlign: a === "horizontal" ? o : "left"
};
return A.createElement("ul", {
className: "recharts-default-legend",
style: u
}, this.renderItems())
}
}])
}(L.PureComponent);
En(Kc, "displayName", "Legend");
En(Kc, "defaultProps", {
iconSize: 14,
layout: "horizontal",
align: "center",
verticalAlign: "middle",
inactiveColor: "#ccc"
});
var eO = Fa;
function tO() {
this.__data__ = new eO,
this.size = 0
}
var rO = tO;
function nO(e) {
var t = this.__data__
, r = t.delete(e);
return this.size = t.size,
r
}
var iO = nO;
function aO(e) {
return this.__data__.get(e)
}
var oO = aO;
function uO(e) {
return this.__data__.has(e)
}
var cO = uO
, lO = Fa
, sO = Ic
, fO = kc
, dO = 200;
function hO(e, t) {
var r = this.__data__;
if (r instanceof lO) {
var n = r.__data__;
if (!sO || n.length < dO - 1)
return n.push([e, t]),
this.size = ++r.size,
this;
r = this.__data__ = new fO(n)
}
return r.set(e, t),
this.size = r.size,
this
}
var pO = hO
, vO = Fa
, yO = rO
, gO = iO
, mO = oO
, bO = cO
, xO = pO;
function rn(e) {
var t = this.__data__ = new vO(e);
this.size = t.size
}
rn.prototype.clear = yO;
rn.prototype.delete = gO;
rn.prototype.get = mO;
rn.prototype.has = bO;
rn.prototype.set = xO;
var Ip = rn
, wO = "__lodash_hash_undefined__";
function OO(e) {
return this.__data__.set(e, wO),
this
}
var SO = OO;
function PO(e) {
return this.__data__.has(e)
}
var AO = PO
, _O = kc
, $O = SO
, TO = AO;
function Ki(e) {
var t = -1
, r = e == null ? 0 : e.length;
for (this.__data__ = new _O; ++t < r; )
this.add(e[t])
}
Ki.prototype.add = Ki.prototype.push = $O;
Ki.prototype.has = TO;
var kp = Ki;
function jO(e, t) {
for (var r = -1, n = e == null ? 0 : e.length; ++r < n; )
if (t(e[r], r, e))
return !0;
return !1
}
var Dp = jO;
function EO(e, t) {
return e.has(t)
}
var Np = EO
, MO = kp
, CO = Dp
, IO = Np
, kO = 1
, DO = 2;
function NO(e, t, r, n, i, a) {
var o = r & kO
, u = e.length
, c = t.length;
if (u != c && !(o && c > u))
return !1;
var l = a.get(e)
, f = a.get(t);
if (l && f)
return l == t && f == e;
var s = -1
, d = !0
, h = r & DO ? new MO : void 0;
for (a.set(e, t),
a.set(t, e); ++s < u; ) {
var v = e[s]
, y = t[s];
if (n)
var p = o ? n(y, v, s, t, e, a) : n(v, y, s, e, t, a);
if (p !== void 0) {
if (p)
continue;
d = !1;
break
}
if (h) {
if (!CO(t, function(b, w) {
if (!IO(h, w) && (v === b || i(v, b, r, n, a)))
return h.push(w)
})) {
d = !1;
break
}
} else if (!(v === y || i(v, y, r, n, a))) {
d = !1;
break
}
}
return a.delete(e),
a.delete(t),
d
}
var Bp = NO
, BO = ht
, LO = BO.Uint8Array
, RO = LO;
function FO(e) {
var t = -1
, r = Array(e.size);
return e.forEach(function(n, i) {
r[++t] = [i, n]
}),
r
}
var zO = FO;
function WO(e) {
var t = -1
, r = Array(e.size);
return e.forEach(function(n) {
r[++t] = n
}),
r
}
var Gc = WO
, ms = di
, bs = RO
, UO = Cc
, HO = Bp
, qO = zO
, KO = Gc
, GO = 1
, YO = 2
, VO = "[object Boolean]"
, XO = "[object Date]"
, ZO = "[object Error]"
, JO = "[object Map]"
, QO = "[object Number]"
, eS = "[object RegExp]"
, tS = "[object Set]"
, rS = "[object String]"
, nS = "[object Symbol]"
, iS = "[object ArrayBuffer]"
, aS = "[object DataView]"
, xs = ms ? ms.prototype : void 0
, Co = xs ? xs.valueOf : void 0;
function oS(e, t, r, n, i, a, o) {
switch (r) {
case aS:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return !1;
e = e.buffer,
t = t.buffer;
case iS:
return !(e.byteLength != t.byteLength || !a(new bs(e), new bs(t)));
case VO:
case XO:
case QO:
return UO(+e, +t);
case ZO:
return e.name == t.name && e.message == t.message;
case eS:
case rS:
return e == t + "";
case JO:
var u = qO;
case tS:
var c = n & GO;
if (u || (u = KO),
e.size != t.size && !c)
return !1;
var l = o.get(e);
if (l)
return l == t;
n |= YO,
o.set(e, t);
var f = HO(u(e), u(t), n, i, a, o);
return o.delete(e),
f;
case nS:
if (Co)
return Co.call(e) == Co.call(t)
}
return !1
}
var uS = oS;
function cS(e, t) {
for (var r = -1, n = t.length, i = e.length; ++r < n; )
e[i + r] = t[r];
return e
}
var Lp = cS
, lS = Lp
, sS = Re;
function fS(e, t, r) {
var n = t(e);
return sS(e) ? n : lS(n, r(e))
}
var dS = fS;
function hS(e, t) {
for (var r = -1, n = e == null ? 0 : e.length, i = 0, a = []; ++r < n; ) {
var o = e[r];
t(o, r, e) && (a[i++] = o)
}
return a
}
var pS = hS;
function vS() {
return []
}
var yS = vS
, gS = pS
, mS = yS
, bS = Object.prototype
, xS = bS.propertyIsEnumerable
, ws = Object.getOwnPropertySymbols
, wS = ws ? function(e) {
return e == null ? [] : (e = Object(e),
gS(ws(e), function(t) {
return xS.call(e, t)
}))
}
: mS
, OS = wS;
function SS(e, t) {
for (var r = -1, n = Array(e); ++r < e; )
n[r] = t(r);
return n
}
var PS = SS
, AS = Mt
, _S = Ct
, $S = "[object Arguments]";
function TS(e) {
return _S(e) && AS(e) == $S
}
var jS = TS
, Os = jS
, ES = Ct
, Rp = Object.prototype
, MS = Rp.hasOwnProperty
, CS = Rp.propertyIsEnumerable
, IS = Os(function() {
return arguments
}()) ? Os : function(e) {
return ES(e) && MS.call(e, "callee") && !CS.call(e, "callee")
}
, Yc = IS
, Gi = {
exports: {}
};
function kS() {
return !1
}
var DS = kS;
Gi.exports;
(function(e, t) {
var r = ht
, n = DS
, i = t && !t.nodeType && t
, a = i && !0 && e && !e.nodeType && e
, o = a && a.exports === i
, u = o ? r.Buffer : void 0
, c = u ? u.isBuffer : void 0
, l = c || n;
e.exports = l
}
)(Gi, Gi.exports);
var Fp = Gi.exports
, NS = 9007199254740991
, BS = /^(?:0|[1-9]\d*)$/;
function LS(e, t) {
var r = typeof e;
return t = t ?? NS,
!!t && (r == "number" || r != "symbol" && BS.test(e)) && e > -1 && e % 1 == 0 && e < t
}
var Vc = LS
, RS = 9007199254740991;
function FS(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= RS
}
var Xc = FS
, zS = Mt
, WS = Xc
, US = Ct
, HS = "[object Arguments]"
, qS = "[object Array]"
, KS = "[object Boolean]"
, GS = "[object Date]"
, YS = "[object Error]"
, VS = "[object Function]"
, XS = "[object Map]"
, ZS = "[object Number]"
, JS = "[object Object]"
, QS = "[object RegExp]"
, eP = "[object Set]"
, tP = "[object String]"
, rP = "[object WeakMap]"
, nP = "[object ArrayBuffer]"
, iP = "[object DataView]"
, aP = "[object Float32Array]"
, oP = "[object Float64Array]"
, uP = "[object Int8Array]"
, cP = "[object Int16Array]"
, lP = "[object Int32Array]"
, sP = "[object Uint8Array]"
, fP = "[object Uint8ClampedArray]"
, dP = "[object Uint16Array]"
, hP = "[object Uint32Array]"
, se = {};
se[aP] = se[oP] = se[uP] = se[cP] = se[lP] = se[sP] = se[fP] = se[dP] = se[hP] = !0;
se[HS] = se[qS] = se[nP] = se[KS] = se[iP] = se[GS] = se[YS] = se[VS] = se[XS] = se[ZS] = se[JS] = se[QS] = se[eP] = se[tP] = se[rP] = !1;
function pP(e) {
return US(e) && WS(e.length) && !!se[zS(e)]
}
var vP = pP;
function yP(e) {
return function(t) {
return e(t)
}
}
var zp = yP
, Yi = {
exports: {}
};
Yi.exports;
(function(e, t) {
var r = Vh
, n = t && !t.nodeType && t
, i = n && !0 && e && !e.nodeType && e
, a = i && i.exports === n
, o = a && r.process
, u = function() {
try {
var c = i && i.require && i.require("util").types;
return c || o && o.binding && o.binding("util")
} catch {}
}();
e.exports = u
}
)(Yi, Yi.exports);
var gP = Yi.exports
, mP = vP
, bP = zp
, Ss = gP
, Ps = Ss && Ss.isTypedArray
, xP = Ps ? bP(Ps) : mP
, Wp = xP
, wP = PS
, OP = Yc
, SP = Re
, PP = Fp
, AP = Vc
, _P = Wp
, $P = Object.prototype
, TP = $P.hasOwnProperty;
function jP(e, t) {
var r = SP(e)
, n = !r && OP(e)
, i = !r && !n && PP(e)
, a = !r && !n && !i && _P(e)
, o = r || n || i || a
, u = o ? wP(e.length, String) : []
, c = u.length;
for (var l in e)
(t || TP.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || AP(l, c))) && u.push(l);
return u
}
var EP = jP
, MP = Object.prototype;
function CP(e) {
var t = e && e.constructor
, r = typeof t == "function" && t.prototype || MP;
return e === r
}
var IP = CP;
function kP(e, t) {
return function(r) {
return e(t(r))
}
}
var Up = kP
, DP = Up
, NP = DP(Object.keys, Object)
, BP = NP
, LP = IP
, RP = BP
, FP = Object.prototype
, zP = FP.hasOwnProperty;
function WP(e) {
if (!LP(e))
return RP(e);
var t = [];
for (var r in Object(e))
zP.call(e, r) && r != "constructor" && t.push(r);
return t
}
var UP = WP
, HP = Mc
, qP = Xc;
function KP(e) {
return e != null && qP(e.length) && !HP(e)
}
var vi = KP
, GP = EP
, YP = UP
, VP = vi;
function XP(e) {
return VP(e) ? GP(e) : YP(e)
}
var no = XP
, ZP = dS
, JP = OS
, QP = no;
function eA(e) {
return ZP(e, QP, JP)
}
var tA = eA
, As = tA
, rA = 1
, nA = Object.prototype
, iA = nA.hasOwnProperty;
function aA(e, t, r, n, i, a) {
var o = r & rA
, u = As(e)
, c = u.length
, l = As(t)
, f = l.length;
if (c != f && !o)
return !1;
for (var s = c; s--; ) {
var d = u[s];
if (!(o ? d in t : iA.call(t, d)))
return !1
}
var h = a.get(e)
, v = a.get(t);
if (h && v)
return h == t && v == e;
var y = !0;
a.set(e, t),
a.set(t, e);
for (var p = o; ++s < c; ) {
d = u[s];
var b = e[d]
, w = t[d];
if (n)
var x = o ? n(w, b, d, t, e, a) : n(b, w, d, e, t, a);
if (!(x === void 0 ? b === w || i(b, w, r, n, a) : x)) {
y = !1;
break
}
p || (p = d == "constructor")
}
if (y && !p) {
var O = e.constructor
, g = t.constructor;
O != g && "constructor"in e && "constructor"in t && !(typeof O == "function" && O instanceof O && typeof g == "function" && g instanceof g) && (y = !1)
}
return a.delete(e),
a.delete(t),
y
}
var oA = aA
, uA = dr
, cA = ht
, lA = uA(cA, "DataView")
, sA = lA
, fA = dr
, dA = ht
, hA = fA(dA, "Promise")
, pA = hA
, vA = dr
, yA = ht
, gA = vA(yA, "Set")
, Hp = gA
, mA = dr
, bA = ht
, xA = mA(bA, "WeakMap")
, wA = xA
, gu = sA
, mu = Ic
, bu = pA
, xu = Hp
, wu = wA
, qp = Mt
, nn = Zh
, _s = "[object Map]"
, OA = "[object Object]"
, $s = "[object Promise]"
, Ts = "[object Set]"
, js = "[object WeakMap]"
, Es = "[object DataView]"
, SA = nn(gu)
, PA = nn(mu)
, AA = nn(bu)
, _A = nn(xu)
, $A = nn(wu)
, Zt = qp;
(gu && Zt(new gu(new ArrayBuffer(1))) != Es || mu && Zt(new mu) != _s || bu && Zt(bu.resolve()) != $s || xu && Zt(new xu) != Ts || wu && Zt(new wu) != js) && (Zt = function(e) {
var t = qp(e)
, r = t == OA ? e.constructor : void 0
, n = r ? nn(r) : "";
if (n)
switch (n) {
case SA:
return Es;
case PA:
return _s;
case AA:
return $s;
case _A:
return Ts;
case $A:
return js
}
return t
}
);
var TA = Zt
, Io = Ip
, jA = Bp
, EA = uS
, MA = oA
, Ms = TA
, Cs = Re
, Is = Fp
, CA = Wp
, IA = 1
, ks = "[object Arguments]"
, Ds = "[object Array]"
, Pi = "[object Object]"
, kA = Object.prototype
, Ns = kA.hasOwnProperty;
function DA(e, t, r, n, i, a) {
var o = Cs(e)
, u = Cs(t)
, c = o ? Ds : Ms(e)
, l = u ? Ds : Ms(t);
c = c == ks ? Pi : c,
l = l == ks ? Pi : l;
var f = c == Pi
, s = l == Pi
, d = c == l;
if (d && Is(e)) {
if (!Is(t))
return !1;
o = !0,
f = !1
}
if (d && !f)
return a || (a = new Io),
o || CA(e) ? jA(e, t, r, n, i, a) : EA(e, t, c, r, n, i, a);
if (!(r & IA)) {
var h = f && Ns.call(e, "__wrapped__")
, v = s && Ns.call(t, "__wrapped__");
if (h || v) {
var y = h ? e.value() : e
, p = v ? t.value() : t;
return a || (a = new Io),
i(y, p, r, n, a)
}
}
return d ? (a || (a = new Io),
MA(e, t, r, n, i, a)) : !1
}
var NA = DA
, BA = NA
, Bs = Ct;
function Kp(e, t, r, n, i) {
return e === t ? !0 : e == null || t == null || !Bs(e) && !Bs(t) ? e !== e && t !== t : BA(e, t, r, n, Kp, i)
}
var Zc = Kp
, LA = Ip
, RA = Zc
, FA = 1
, zA = 2;
function WA(e, t, r, n) {
var i = r.length
, a = i
, o = !n;
if (e == null)
return !a;
for (e = Object(e); i--; ) {
var u = r[i];
if (o && u[2] ? u[1] !== e[u[0]] : !(u[0]in e))
return !1
}
for (; ++i < a; ) {
u = r[i];
var c = u[0]
, l = e[c]
, f = u[1];
if (o && u[2]) {
if (l === void 0 && !(c in e))
return !1
} else {
var s = new LA;
if (n)
var d = n(l, f, c, e, t, s);
if (!(d === void 0 ? RA(f, l, FA | zA, n, s) : d))
return !1
}
}
return !0
}
var UA = WA
, HA = Ut;
function qA(e) {
return e === e && !HA(e)
}
var Gp = qA
, KA = Gp
, GA = no;
function YA(e) {
for (var t = GA(e), r = t.length; r--; ) {
var n = t[r]
, i = e[n];
t[r] = [n, i, KA(i)]
}
return t
}
var VA = YA;
function XA(e, t) {
return function(r) {
return r == null ? !1 : r[e] === t && (t !== void 0 || e in Object(r))
}
}
var Yp = XA
, ZA = UA
, JA = VA
, QA = Yp;
function e_(e) {
var t = JA(e);
return t.length == 1 && t[0][2] ? QA(t[0][0], t[0][1]) : function(r) {
return r === e || ZA(r, e, t)
}
}
var t_ = e_;
function r_(e, t) {
return e != null && t in Object(e)
}
var n_ = r_
, i_ = rp
, a_ = Yc
, o_ = Re
, u_ = Vc
, c_ = Xc
, l_ = Wa;
function s_(e, t, r) {
t = i_(t, e);
for (var n = -1, i = t.length, a = !1; ++n < i; ) {
var o = l_(t[n]);
if (!(a = e != null && r(e, o)))
break;
e = e[o]
}
return a || ++n != i ? a : (i = e == null ? 0 : e.length,
!!i && c_(i) && u_(o, i) && (o_(e) || a_(e)))
}
var f_ = s_
, d_ = n_
, h_ = f_;
function p_(e, t) {
return e != null && h_(e, t, d_)
}
var v_ = p_
, y_ = Zc
, g_ = np
, m_ = v_
, b_ = Ec
, x_ = Gp
, w_ = Yp
, O_ = Wa
, S_ = 1
, P_ = 2;
function A_(e, t) {
return b_(e) && x_(t) ? w_(O_(e), t) : function(r) {
var n = g_(r, e);
return n === void 0 && n === t ? m_(r, e) : y_(t, n, S_ | P_)
}
}
var __ = A_;
function $_(e) {
return e
}
var an = $_;
function T_(e) {
return function(t) {
return t == null ? void 0 : t[e]
}
}
var j_ = T_
, E_ = Bc;
function M_(e) {
return function(t) {
return E_(t, e)
}
}
var C_ = M_
, I_ = j_
, k_ = C_
, D_ = Ec
, N_ = Wa;
function B_(e) {
return D_(e) ? I_(N_(e)) : k_(e)
}
var L_ = B_
, R_ = t_
, F_ = __
, z_ = an
, W_ = Re
, U_ = L_;
function H_(e) {
return typeof e == "function" ? e : e == null ? z_ : typeof e == "object" ? W_(e) ? F_(e[0], e[1]) : R_(e) : U_(e)
}
var Ht = H_;
function q_(e, t, r, n) {
for (var i = e.length, a = r + (n ? 1 : -1); n ? a-- : ++a < i; )
if (t(e[a], a, e))
return a;
return -1
}
var Vp = q_;
function K_(e) {
return e !== e
}
var G_ = K_;
function Y_(e, t, r) {
for (var n = r - 1, i = e.length; ++n < i; )
if (e[n] === t)
return n;
return -1
}
var V_ = Y_
, X_ = Vp
, Z_ = G_
, J_ = V_;
function Q_(e, t, r) {
return t === t ? J_(e, t, r) : X_(e, Z_, r)
}
var e$ = Q_
, t$ = e$;
function r$(e, t) {
var r = e == null ? 0 : e.length;
return !!r && t$(e, t, 0) > -1
}
var n$ = r$;
function i$(e, t, r) {
for (var n = -1, i = e == null ? 0 : e.length; ++n < i; )
if (r(t, e[n]))
return !0;
return !1
}
var a$ = i$;
function o$() {}
var u$ = o$
, ko = Hp
, c$ = u$
, l$ = Gc
, s$ = 1 / 0
, f$ = ko && 1 / l$(new ko([, -0]))[1] == s$ ? function(e) {
return new ko(e)
}
: c$
, d$ = f$
, h$ = kp
, p$ = n$
, v$ = a$
, y$ = Np
, g$ = d$
, m$ = Gc
, b$ = 200;
function x$(e, t, r) {
var n = -1
, i = p$
, a = e.length
, o = !0
, u = []
, c = u;
if (r)
o = !1,
i = v$;
else if (a >= b$) {
var l = t ? null : g$(e);
if (l)
return m$(l);
o = !1,
i = y$,
c = new h$
} else
c = t ? [] : u;
e: for (; ++n < a; ) {
var f = e[n]
, s = t ? t(f) : f;
if (f = r || f !== 0 ? f : 0,
o && s === s) {
for (var d = c.length; d--; )
if (c[d] === s)
continue e;
t && c.push(s),
u.push(f)
} else
i(c, s, r) || (c !== u && c.push(s),
u.push(f))
}
return u
}
var w$ = x$
, O$ = Ht
, S$ = w$;
function P$(e, t) {
return e && e.length ? S$(e, O$(t)) : []
}
var A$ = P$;
const Ls = de(A$);
function Xp(e, t, r) {
return t === !0 ? Ls(e, r) : J(t) ? Ls(e, t) : e
}
function Er(e) {
"@babel/helpers - typeof";
return Er = 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
}
,
Er(e)
}
var _$ = ["ref"];
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 mt(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) {
io(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 $$(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, Jp(n.key), n)
}
}
function T$(e, t, r) {
return t && Fs(e.prototype, t),
r && Fs(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function j$(e, t, r) {
return t = Vi(t),
E$(e, Zp() ? Reflect.construct(t, r || [], Vi(e).constructor) : t.apply(e, r))
}
function E$(e, t) {
if (t && (Er(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return M$(e)
}
function M$(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function Zp() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (Zp = function() {
return !!e
}
)()
}
function Vi(e) {
return Vi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Vi(e)
}
function C$(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && Ou(e, t)
}
function Ou(e, t) {
return Ou = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
Ou(e, t)
}
function io(e, t, r) {
return t = Jp(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Jp(e) {
var t = I$(e, "string");
return Er(t) == "symbol" ? t : t + ""
}
function I$(e, t) {
if (Er(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Er(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function k$(e, t) {
if (e == null)
return {};
var r = D$(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 D$(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function N$(e) {
return e.value
}
function B$(e, t) {
if (A.isValidElement(e))
return A.cloneElement(e, t);
if (typeof e == "function")
return A.createElement(e, t);
t.ref;
var r = k$(t, _$);
return A.createElement(Kc, r)
}
var zs = 1
, ar = function(e) {
function t() {
var r;
$$(this, t);
for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++)
i[a] = arguments[a];
return r = j$(this, t, [].concat(i)),
io(r, "lastBoundingBox", {
width: -1,
height: -1
}),
r
}
return C$(t, e),
T$(t, [{
key: "componentDidMount",
value: function() {
this.updateBBox()
}
}, {
key: "componentDidUpdate",
value: function() {
this.updateBBox()
}
}, {
key: "getBBox",
value: function() {
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
var n = this.wrapperNode.getBoundingClientRect();
return n.height = this.wrapperNode.offsetHeight,
n.width = this.wrapperNode.offsetWidth,
n
}
return null
}
}, {
key: "updateBBox",
value: function() {
var n = this.props.onBBoxUpdate
, i = this.getBBox();
i ? (Math.abs(i.width - this.lastBoundingBox.width) > zs || Math.abs(i.height - this.lastBoundingBox.height) > zs) && (this.lastBoundingBox.width = i.width,
this.lastBoundingBox.height = i.height,
n && n(i)) : (this.lastBoundingBox.width !== -1 || this.lastBoundingBox.height !== -1) && (this.lastBoundingBox.width = -1,
this.lastBoundingBox.height = -1,
n && n(null))
}
}, {
key: "getBBoxSnapshot",
value: function() {
return this.lastBoundingBox.width >= 0 && this.lastBoundingBox.height >= 0 ? mt({}, this.lastBoundingBox) : {
width: 0,
height: 0
}
}
}, {
key: "getDefaultPosition",
value: function(n) {
var i = this.props, a = i.layout, o = i.align, u = i.verticalAlign, c = i.margin, l = i.chartWidth, f = i.chartHeight, s, d;
if (!n || (n.left === void 0 || n.left === null) && (n.right === void 0 || n.right === null))
if (o === "center" && a === "vertical") {
var h = this.getBBoxSnapshot();
s = {
left: ((l || 0) - h.width) / 2
}
} else
s = o === "right" ? {
right: c && c.right || 0
} : {
left: c && c.left || 0
};
if (!n || (n.top === void 0 || n.top === null) && (n.bottom === void 0 || n.bottom === null))
if (u === "middle") {
var v = this.getBBoxSnapshot();
d = {
top: ((f || 0) - v.height) / 2
}
} else
d = u === "bottom" ? {
bottom: c && c.bottom || 0
} : {
top: c && c.top || 0
};
return mt(mt({}, s), d)
}
}, {
key: "render",
value: function() {
var n = this
, i = this.props
, a = i.content
, o = i.width
, u = i.height
, c = i.wrapperStyle
, l = i.payloadUniqBy
, f = i.payload
, s = mt(mt({
position: "absolute",
width: o || "auto",
height: u || "auto"
}, this.getDefaultPosition(c)), c);
return A.createElement("div", {
className: "recharts-legend-wrapper",
style: s,
ref: function(h) {
n.wrapperNode = h
}
}, B$(a, mt(mt({}, this.props), {}, {
payload: Xp(f, l, N$)
})))
}
}], [{
key: "getWithHeight",
value: function(n, i) {
var a = mt(mt({}, this.defaultProps), n.props)
, o = a.layout;
return o === "vertical" && R(n.props.height) ? {
height: n.props.height
} : o === "horizontal" ? {
width: n.props.width || i
} : null
}
}])
}(L.PureComponent);
io(ar, "displayName", "Legend");
io(ar, "defaultProps", {
iconSize: 14,
layout: "horizontal",
align: "center",
verticalAlign: "bottom"
});
var Ws = di
, L$ = Yc
, R$ = Re
, Us = Ws ? Ws.isConcatSpreadable : void 0;
function F$(e) {
return R$(e) || L$(e) || !!(Us && e && e[Us])
}
var z$ = F$
, W$ = Lp
, U$ = z$;
function Qp(e, t, r, n, i) {
var a = -1
, o = e.length;
for (r || (r = U$),
i || (i = []); ++a < o; ) {
var u = e[a];
t > 0 && r(u) ? t > 1 ? Qp(u, t - 1, r, n, i) : W$(i, u) : n || (i[i.length] = u)
}
return i
}
var ev = Qp;
function H$(e) {
return function(t, r, n) {
for (var i = -1, a = Object(t), o = n(t), u = o.length; u--; ) {
var c = o[e ? u : ++i];
if (r(a[c], c, a) === !1)
break
}
return t
}
}
var q$ = H$
, K$ = q$
, G$ = K$()
, Y$ = G$
, V$ = Y$
, X$ = no;
function Z$(e, t) {
return e && V$(e, t, X$)
}
var tv = Z$
, J$ = vi;
function Q$(e, t) {
return function(r, n) {
if (r == null)
return r;
if (!J$(r))
return e(r, n);
for (var i = r.length, a = t ? i : -1, o = Object(r); (t ? a-- : ++a < i) && n(o[a], a, o) !== !1; )
;
return r
}
}
var eT = Q$
, tT = tv
, rT = eT
, nT = rT(tT)
, Jc = nT
, iT = Jc
, aT = vi;
function oT(e, t) {
var r = -1
, n = aT(e) ? Array(e.length) : [];
return iT(e, function(i, a, o) {
n[++r] = t(i, a, o)
}),
n
}
var rv = oT;
function uT(e, t) {
var r = e.length;
for (e.sort(t); r--; )
e[r] = e[r].value;
return e
}
var cT = uT
, Hs = Xr;
function lT(e, t) {
if (e !== t) {
var r = e !== void 0
, n = e === null
, i = e === e
, a = Hs(e)
, o = t !== void 0
, u = t === null
, c = t === t
, l = Hs(t);
if (!u && !l && !a && e > t || a && o && c && !u && !l || n && o && c || !r && c || !i)
return 1;
if (!n && !a && !l && e < t || l && r && i && !n && !a || u && r && i || !o && i || !c)
return -1
}
return 0
}
var sT = lT
, fT = sT;
function dT(e, t, r) {
for (var n = -1, i = e.criteria, a = t.criteria, o = i.length, u = r.length; ++n < o; ) {
var c = fT(i[n], a[n]);
if (c) {
if (n >= u)
return c;
var l = r[n];
return c * (l == "desc" ? -1 : 1)
}
}
return e.index - t.index
}
var hT = dT
, Do = Nc
, pT = Bc
, vT = Ht
, yT = rv
, gT = cT
, mT = zp
, bT = hT
, xT = an
, wT = Re;
function OT(e, t, r) {
t.length ? t = Do(t, function(a) {
return wT(a) ? function(o) {
return pT(o, a.length === 1 ? a[0] : a)
}
: a
}) : t = [xT];
var n = -1;
t = Do(t, mT(vT));
var i = yT(e, function(a, o, u) {
var c = Do(t, function(l) {
return l(a)
});
return {
criteria: c,
index: ++n,
value: a
}
});
return gT(i, function(a, o) {
return bT(a, o, r)
})
}
var ST = OT;
function PT(e, t, r) {
switch (r.length) {
case 0:
return e.call(t);
case 1:
return e.call(t, r[0]);
case 2:
return e.call(t, r[0], r[1]);
case 3:
return e.call(t, r[0], r[1], r[2])
}
return e.apply(t, r)
}
var AT = PT
, _T = AT
, qs = Math.max;
function $T(e, t, r) {
return t = qs(t === void 0 ? e.length - 1 : t, 0),
function() {
for (var n = arguments, i = -1, a = qs(n.length - t, 0), o = Array(a); ++i < a; )
o[i] = n[t + i];
i = -1;
for (var u = Array(t + 1); ++i < t; )
u[i] = n[i];
return u[t] = r(o),
_T(e, this, u)
}
}
var TT = $T;
function jT(e) {
return function() {
return e
}
}
var ET = jT
, MT = dr
, CT = function() {
try {
var e = MT(Object, "defineProperty");
return e({}, "", {}),
e
} catch {}
}()
, nv = CT
, IT = ET
, Ks = nv
, kT = an
, DT = Ks ? function(e, t) {
return Ks(e, "toString", {
configurable: !0,
enumerable: !1,
value: IT(t),
writable: !0
})
}
: kT
, NT = DT
, BT = 800
, LT = 16
, RT = Date.now;
function FT(e) {
var t = 0
, r = 0;
return function() {
var n = RT()
, i = LT - (n - r);
if (r = n,
i > 0) {
if (++t >= BT)
return arguments[0]
} else
t = 0;
return e.apply(void 0, arguments)
}
}
var zT = FT
, WT = NT
, UT = zT
, HT = UT(WT)
, qT = HT
, KT = an
, GT = TT
, YT = qT;
function VT(e, t) {
return YT(GT(e, t, KT), e + "")
}
var XT = VT
, ZT = Cc
, JT = vi
, QT = Vc
, ej = Ut;
function tj(e, t, r) {
if (!ej(r))
return !1;
var n = typeof t;
return (n == "number" ? JT(r) && QT(t, r.length) : n == "string" && t in r) ? ZT(r[t], e) : !1
}
var ao = tj
, rj = ev
, nj = ST
, ij = XT
, Gs = ao
, aj = ij(function(e, t) {
if (e == null)
return [];
var r = t.length;
return r > 1 && Gs(e, t[0], t[1]) ? t = [] : r > 2 && Gs(t[0], t[1], t[2]) && (t = [t[0]]),
nj(e, rj(t, 1), [])
})
, oj = aj;
const Qc = de(oj);
function Mn(e) {
"@babel/helpers - typeof";
return Mn = 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
}
,
Mn(e)
}
function Su() {
return Su = 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
}
,
Su.apply(this, arguments)
}
function uj(e, t) {
return fj(e) || sj(e, t) || lj(e, t) || cj()
}
function cj() {
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 lj(e, t) {
if (e) {
if (typeof e == "string")
return Ys(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 Ys(e, t)
}
}
function Ys(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 sj(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function fj(e) {
if (Array.isArray(e))
return e
}
function Vs(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 No(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Vs(Object(r), !0).forEach(function(n) {
dj(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Vs(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function dj(e, t, r) {
return t = hj(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function hj(e) {
var t = pj(e, "string");
return Mn(t) == "symbol" ? t : t + ""
}
function pj(e, t) {
if (Mn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Mn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function vj(e) {
return Array.isArray(e) && Ae(e[0]) && Ae(e[1]) ? e.join(" ~ ") : e
}
var yj = function(t) {
var r = t.separator
, n = r === void 0 ? " : " : r
, i = t.contentStyle
, a = i === void 0 ? {} : i
, o = t.itemStyle
, u = o === void 0 ? {} : o
, c = t.labelStyle
, l = c === void 0 ? {} : c
, f = t.payload
, s = t.formatter
, d = t.itemSorter
, h = t.wrapperClassName
, v = t.labelClassName
, y = t.label
, p = t.labelFormatter
, b = t.accessibilityLayer
, w = b === void 0 ? !1 : b
, x = function() {
if (f && f.length) {
var T = {
padding: 0,
margin: 0
}
, C = (d ? Qc(f, d) : f).map(function(k, M) {
if (k.type === "none")
return null;
var D = No({
display: "block",
paddingTop: 4,
paddingBottom: 4,
color: k.color || "#000"
}, u)
, B = k.formatter || s || vj
, F = k.value
, z = k.name
, q = F
, G = z;
if (B && q != null && G != null) {
var U = B(F, z, k, M, f);
if (Array.isArray(U)) {
var K = uj(U, 2);
q = K[0],
G = K[1]
} else
q = U
}
return A.createElement("li", {
className: "recharts-tooltip-item",
key: "tooltip-item-".concat(M),
style: D
}, Ae(G) ? A.createElement("span", {
className: "recharts-tooltip-item-name"
}, G) : null, Ae(G) ? A.createElement("span", {
className: "recharts-tooltip-item-separator"
}, n) : null, A.createElement("span", {
className: "recharts-tooltip-item-value"
}, q), A.createElement("span", {
className: "recharts-tooltip-item-unit"
}, k.unit || ""))
});
return A.createElement("ul", {
className: "recharts-tooltip-item-list",
style: T
}, C)
}
return null
}
, O = No({
margin: 0,
padding: 10,
backgroundColor: "#fff",
border: "1px solid #ccc",
whiteSpace: "nowrap"
}, a)
, g = No({
margin: 0
}, l)
, m = !te(y)
, S = m ? y : ""
, P = re("recharts-default-tooltip", h)
, _ = re("recharts-tooltip-label", v);
m && p && f !== void 0 && f !== null && (S = p(y, f));
var j = w ? {
role: "status",
"aria-live": "assertive"
} : {};
return A.createElement("div", Su({
className: P,
style: O
}, j), A.createElement("p", {
className: _,
style: g
}, A.isValidElement(S) ? S : "".concat(S)), x())
};
function Cn(e) {
"@babel/helpers - typeof";
return Cn = 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
}
,
Cn(e)
}
function Ai(e, t, r) {
return t = gj(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function gj(e) {
var t = mj(e, "string");
return Cn(t) == "symbol" ? t : t + ""
}
function mj(e, t) {
if (Cn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Cn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var hn = "recharts-tooltip-wrapper"
, bj = {
visibility: "hidden"
};
function xj(e) {
var t = e.coordinate
, r = e.translateX
, n = e.translateY;
return re(hn, Ai(Ai(Ai(Ai({}, "".concat(hn, "-right"), R(r) && t && R(t.x) && r >= t.x), "".concat(hn, "-left"), R(r) && t && R(t.x) && r < t.x), "".concat(hn, "-bottom"), R(n) && t && R(t.y) && n >= t.y), "".concat(hn, "-top"), R(n) && t && R(t.y) && n < t.y))
}
function Xs(e) {
var t = e.allowEscapeViewBox
, r = e.coordinate
, n = e.key
, i = e.offsetTopLeft
, a = e.position
, o = e.reverseDirection
, u = e.tooltipDimension
, c = e.viewBox
, l = e.viewBoxDimension;
if (a && R(a[n]))
return a[n];
var f = r[n] - u - i
, s = r[n] + i;
if (t[n])
return o[n] ? f : s;
if (o[n]) {
var d = f
, h = c[n];
return d < h ? Math.max(s, c[n]) : Math.max(f, c[n])
}
var v = s + u
, y = c[n] + l;
return v > y ? Math.max(f, c[n]) : Math.max(s, c[n])
}
function wj(e) {
var t = e.translateX
, r = e.translateY
, n = e.useTranslate3d;
return {
transform: n ? "translate3d(".concat(t, "px, ").concat(r, "px, 0)") : "translate(".concat(t, "px, ").concat(r, "px)")
}
}
function Oj(e) {
var t = e.allowEscapeViewBox, r = e.coordinate, n = e.offsetTopLeft, i = e.position, a = e.reverseDirection, o = e.tooltipBox, u = e.useTranslate3d, c = e.viewBox, l, f, s;
return o.height > 0 && o.width > 0 && r ? (f = Xs({
allowEscapeViewBox: t,
coordinate: r,
key: "x",
offsetTopLeft: n,
position: i,
reverseDirection: a,
tooltipDimension: o.width,
viewBox: c,
viewBoxDimension: c.width
}),
s = Xs({
allowEscapeViewBox: t,
coordinate: r,
key: "y",
offsetTopLeft: n,
position: i,
reverseDirection: a,
tooltipDimension: o.height,
viewBox: c,
viewBoxDimension: c.height
}),
l = wj({
translateX: f,
translateY: s,
useTranslate3d: u
})) : l = bj,
{
cssProperties: l,
cssClasses: xj({
translateX: f,
translateY: s,
coordinate: r
})
}
}
function Mr(e) {
"@babel/helpers - typeof";
return Mr = 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
}
,
Mr(e)
}
function Zs(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 Js(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Zs(Object(r), !0).forEach(function(n) {
Au(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Zs(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Sj(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function Pj(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, av(n.key), n)
}
}
function Aj(e, t, r) {
return t && Pj(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function _j(e, t, r) {
return t = Xi(t),
$j(e, iv() ? Reflect.construct(t, r || [], Xi(e).constructor) : t.apply(e, r))
}
function $j(e, t) {
if (t && (Mr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return Tj(e)
}
function Tj(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function iv() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (iv = function() {
return !!e
}
)()
}
function Xi(e) {
return Xi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Xi(e)
}
function jj(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && Pu(e, t)
}
function Pu(e, t) {
return Pu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
Pu(e, t)
}
function Au(e, t, r) {
return t = av(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function av(e) {
var t = Ej(e, "string");
return Mr(t) == "symbol" ? t : t + ""
}
function Ej(e, t) {
if (Mr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Mr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var Qs = 1
, Mj = function(e) {
function t() {
var r;
Sj(this, t);
for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++)
i[a] = arguments[a];
return r = _j(this, t, [].concat(i)),
Au(r, "state", {
dismissed: !1,
dismissedAtCoordinate: {
x: 0,
y: 0
},
lastBoundingBox: {
width: -1,
height: -1
}
}),
Au(r, "handleKeyDown", function(o) {
if (o.key === "Escape") {
var u, c, l, f;
r.setState({
dismissed: !0,
dismissedAtCoordinate: {
x: (u = (c = r.props.coordinate) === null || c === void 0 ? void 0 : c.x) !== null && u !== void 0 ? u : 0,
y: (l = (f = r.props.coordinate) === null || f === void 0 ? void 0 : f.y) !== null && l !== void 0 ? l : 0
}
})
}
}),
r
}
return jj(t, e),
Aj(t, [{
key: "updateBBox",
value: function() {
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
var n = this.wrapperNode.getBoundingClientRect();
(Math.abs(n.width - this.state.lastBoundingBox.width) > Qs || Math.abs(n.height - this.state.lastBoundingBox.height) > Qs) && this.setState({
lastBoundingBox: {
width: n.width,
height: n.height
}
})
} else
(this.state.lastBoundingBox.width !== -1 || this.state.lastBoundingBox.height !== -1) && this.setState({
lastBoundingBox: {
width: -1,
height: -1
}
})
}
}, {
key: "componentDidMount",
value: function() {
document.addEventListener("keydown", this.handleKeyDown),
this.updateBBox()
}
}, {
key: "componentWillUnmount",
value: function() {
document.removeEventListener("keydown", this.handleKeyDown)
}
}, {
key: "componentDidUpdate",
value: function() {
var n, i;
this.props.active && this.updateBBox(),
this.state.dismissed && (((n = this.props.coordinate) === null || n === void 0 ? void 0 : n.x) !== this.state.dismissedAtCoordinate.x || ((i = this.props.coordinate) === null || i === void 0 ? void 0 : i.y) !== this.state.dismissedAtCoordinate.y) && (this.state.dismissed = !1)
}
}, {
key: "render",
value: function() {
var n = this
, i = this.props
, a = i.active
, o = i.allowEscapeViewBox
, u = i.animationDuration
, c = i.animationEasing
, l = i.children
, f = i.coordinate
, s = i.hasPayload
, d = i.isAnimationActive
, h = i.offset
, v = i.position
, y = i.reverseDirection
, p = i.useTranslate3d
, b = i.viewBox
, w = i.wrapperStyle
, x = Oj({
allowEscapeViewBox: o,
coordinate: f,
offsetTopLeft: h,
position: v,
reverseDirection: y,
tooltipBox: this.state.lastBoundingBox,
useTranslate3d: p,
viewBox: b
})
, O = x.cssClasses
, g = x.cssProperties
, m = Js(Js({
transition: d && a ? "transform ".concat(u, "ms ").concat(c) : void 0
}, g), {}, {
pointerEvents: "none",
visibility: !this.state.dismissed && a && s ? "visible" : "hidden",
position: "absolute",
top: 0,
left: 0
}, w);
return A.createElement("div", {
tabIndex: -1,
className: O,
style: m,
ref: function(P) {
n.wrapperNode = P
}
}, l)
}
}])
}(L.PureComponent)
, Cj = function() {
return !(typeof window < "u" && window.document && window.document.createElement && window.setTimeout)
}
, Pt = {
isSsr: Cj(),
get: function(t) {
return Pt[t]
},
set: function(t, r) {
if (typeof t == "string")
Pt[t] = r;
else {
var n = Object.keys(t);
n && n.length && n.forEach(function(i) {
Pt[i] = t[i]
})
}
}
};
function Cr(e) {
"@babel/helpers - typeof";
return Cr = 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
}
,
Cr(e)
}
function ef(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 tf(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? ef(Object(r), !0).forEach(function(n) {
el(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ef(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Ij(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function kj(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, uv(n.key), n)
}
}
function Dj(e, t, r) {
return t && kj(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function Nj(e, t, r) {
return t = Zi(t),
Bj(e, ov() ? Reflect.construct(t, r || [], Zi(e).constructor) : t.apply(e, r))
}
function Bj(e, t) {
if (t && (Cr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return Lj(e)
}
function Lj(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function ov() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (ov = function() {
return !!e
}
)()
}
function Zi(e) {
return Zi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Zi(e)
}
function Rj(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && _u(e, t)
}
function _u(e, t) {
return _u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
_u(e, t)
}
function el(e, t, r) {
return t = uv(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function uv(e) {
var t = Fj(e, "string");
return Cr(t) == "symbol" ? t : t + ""
}
function Fj(e, t) {
if (Cr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Cr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function zj(e) {
return e.dataKey
}
function Wj(e, t) {
return A.isValidElement(e) ? A.cloneElement(e, t) : typeof e == "function" ? A.createElement(e, t) : A.createElement(yj, t)
}
var ut = function(e) {
function t() {
return Ij(this, t),
Nj(this, t, arguments)
}
return Rj(t, e),
Dj(t, [{
key: "render",
value: function() {
var n = this
, i = this.props
, a = i.active
, o = i.allowEscapeViewBox
, u = i.animationDuration
, c = i.animationEasing
, l = i.content
, f = i.coordinate
, s = i.filterNull
, d = i.isAnimationActive
, h = i.offset
, v = i.payload
, y = i.payloadUniqBy
, p = i.position
, b = i.reverseDirection
, w = i.useTranslate3d
, x = i.viewBox
, O = i.wrapperStyle
, g = v ?? [];
s && g.length && (g = Xp(v.filter(function(S) {
return S.value != null && (S.hide !== !0 || n.props.includeHidden)
}), y, zj));
var m = g.length > 0;
return A.createElement(Mj, {
allowEscapeViewBox: o,
animationDuration: u,
animationEasing: c,
isAnimationActive: d,
active: a,
coordinate: f,
hasPayload: m,
offset: h,
position: p,
reverseDirection: b,
useTranslate3d: w,
viewBox: x,
wrapperStyle: O
}, Wj(l, tf(tf({}, this.props), {}, {
payload: g
})))
}
}])
}(L.PureComponent);
el(ut, "displayName", "Tooltip");
el(ut, "defaultProps", {
accessibilityLayer: !1,
allowEscapeViewBox: {
x: !1,
y: !1
},
animationDuration: 400,
animationEasing: "ease",
contentStyle: {},
coordinate: {
x: 0,
y: 0
},
cursor: !0,
cursorStyle: {},
filterNull: !0,
isAnimationActive: !Pt.isSsr,
itemStyle: {},
labelStyle: {},
offset: 10,
reverseDirection: {
x: !1,
y: !1
},
separator: " : ",
trigger: "hover",
useTranslate3d: !1,
viewBox: {
x: 0,
y: 0,
height: 0,
width: 0
},
wrapperStyle: {}
});
var Uj = ht
, Hj = function() {
return Uj.Date.now()
}
, qj = Hj
, Kj = /\s/;
function Gj(e) {
for (var t = e.length; t-- && Kj.test(e.charAt(t)); )
;
return t
}
var Yj = Gj
, Vj = Yj
, Xj = /^\s+/;
function Zj(e) {
return e && e.slice(0, Vj(e) + 1).replace(Xj, "")
}
var Jj = Zj
, Qj = Jj
, rf = Ut
, eE = Xr
, nf = NaN
, tE = /^[-+]0x[0-9a-f]+$/i
, rE = /^0b[01]+$/i
, nE = /^0o[0-7]+$/i
, iE = parseInt;
function aE(e) {
if (typeof e == "number")
return e;
if (eE(e))
return nf;
if (rf(e)) {
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
e = rf(t) ? t + "" : t
}
if (typeof e != "string")
return e === 0 ? e : +e;
e = Qj(e);
var r = rE.test(e);
return r || nE.test(e) ? iE(e.slice(2), r ? 2 : 8) : tE.test(e) ? nf : +e
}
var cv = aE
, oE = Ut
, Bo = qj
, af = cv
, uE = "Expected a function"
, cE = Math.max
, lE = Math.min;
function sE(e, t, r) {
var n, i, a, o, u, c, l = 0, f = !1, s = !1, d = !0;
if (typeof e != "function")
throw new TypeError(uE);
t = af(t) || 0,
oE(r) && (f = !!r.leading,
s = "maxWait"in r,
a = s ? cE(af(r.maxWait) || 0, t) : a,
d = "trailing"in r ? !!r.trailing : d);
function h(m) {
var S = n
, P = i;
return n = i = void 0,
l = m,
o = e.apply(P, S),
o
}
function v(m) {
return l = m,
u = setTimeout(b, t),
f ? h(m) : o
}
function y(m) {
var S = m - c
, P = m - l
, _ = t - S;
return s ? lE(_, a - P) : _
}
function p(m) {
var S = m - c
, P = m - l;
return c === void 0 || S >= t || S < 0 || s && P >= a
}
function b() {
var m = Bo();
if (p(m))
return w(m);
u = setTimeout(b, y(m))
}
function w(m) {
return u = void 0,
d && n ? h(m) : (n = i = void 0,
o)
}
function x() {
u !== void 0 && clearTimeout(u),
l = 0,
n = c = i = u = void 0
}
function O() {
return u === void 0 ? o : w(Bo())
}
function g() {
var m = Bo()
, S = p(m);
if (n = arguments,
i = this,
c = m,
S) {
if (u === void 0)
return v(c);
if (s)
return clearTimeout(u),
u = setTimeout(b, t),
h(c)
}
return u === void 0 && (u = setTimeout(b, t)),
o
}
return g.cancel = x,
g.flush = O,
g
}
var fE = sE
, dE = fE
, hE = Ut
, pE = "Expected a function";
function vE(e, t, r) {
var n = !0
, i = !0;
if (typeof e != "function")
throw new TypeError(pE);
return hE(r) && (n = "leading"in r ? !!r.leading : n,
i = "trailing"in r ? !!r.trailing : i),
dE(e, t, {
leading: n,
maxWait: t,
trailing: i
})
}
var yE = vE;
const lv = de(yE);
function In(e) {
"@babel/helpers - typeof";
return In = 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
}
,
In(e)
}
function of(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 _i(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? of(Object(r), !0).forEach(function(n) {
gE(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : of(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function gE(e, t, r) {
return t = mE(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function mE(e) {
var t = bE(e, "string");
return In(t) == "symbol" ? t : t + ""
}
function bE(e, t) {
if (In(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (In(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function xE(e, t) {
return PE(e) || SE(e, t) || OE(e, t) || wE()
}
function wE() {
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 OE(e, t) {
if (e) {
if (typeof e == "string")
return uf(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 uf(e, t)
}
}
function uf(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 SE(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function PE(e) {
if (Array.isArray(e))
return e
}
var AE = L.forwardRef(function(e, t) {
var r = e.aspect
, n = e.initialDimension
, i = n === void 0 ? {
width: -1,
height: -1
} : n
, a = e.width
, o = a === void 0 ? "100%" : a
, u = e.height
, c = u === void 0 ? "100%" : u
, l = e.minWidth
, f = l === void 0 ? 0 : l
, s = e.minHeight
, d = e.maxHeight
, h = e.children
, v = e.debounce
, y = v === void 0 ? 0 : v
, p = e.id
, b = e.className
, w = e.onResize
, x = e.style
, O = x === void 0 ? {} : x
, g = L.useRef(null)
, m = L.useRef();
m.current = w,
L.useImperativeHandle(t, function() {
return Object.defineProperty(g.current, "current", {
get: function() {
return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),
g.current
},
configurable: !0
})
});
var S = L.useState({
containerWidth: i.width,
containerHeight: i.height
})
, P = xE(S, 2)
, _ = P[0]
, j = P[1]
, $ = L.useCallback(function(C, k) {
j(function(M) {
var D = Math.round(C)
, B = Math.round(k);
return M.containerWidth === D && M.containerHeight === B ? M : {
containerWidth: D,
containerHeight: B
}
})
}, []);
L.useEffect(function() {
var C = function(z) {
var q, G = z[0].contentRect, U = G.width, K = G.height;
$(U, K),
(q = m.current) === null || q === void 0 || q.call(m, U, K)
};
y > 0 && (C = lv(C, y, {
trailing: !0,
leading: !1
}));
var k = new ResizeObserver(C)
, M = g.current.getBoundingClientRect()
, D = M.width
, B = M.height;
return $(D, B),
k.observe(g.current),
function() {
k.disconnect()
}
}, [$, y]);
var T = L.useMemo(function() {
var C = _.containerWidth
, k = _.containerHeight;
if (C < 0 || k < 0)
return null;
St(er(o) || er(c), `The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`, o, c),
St(!r || r > 0, "The aspect(%s) must be greater than zero.", r);
var M = er(o) ? C : o
, D = er(c) ? k : c;
r && r > 0 && (M ? D = M / r : D && (M = D * r),
d && D > d && (D = d)),
St(M > 0 || D > 0, `The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`, M, D, o, c, f, s, r);
var B = !Array.isArray(h) && Ot(h.type).endsWith("Chart");
return A.Children.map(h, function(F) {
return A.isValidElement(F) ? L.cloneElement(F, _i({
width: M,
height: D
}, B ? {
style: _i({
height: "100%",
width: "100%",
maxHeight: D,
maxWidth: M
}, F.props.style)
} : {})) : F
})
}, [r, h, c, d, s, f, _, o]);
return A.createElement("div", {
id: p ? "".concat(p) : void 0,
className: re("recharts-responsive-container", b),
style: _i(_i({}, O), {}, {
width: o,
height: c,
minWidth: f,
minHeight: s,
maxHeight: d
}),
ref: g
}, T)
})
, sv = function(t) {
return null
};
sv.displayName = "Cell";
function kn(e) {
"@babel/helpers - typeof";
return kn = 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
}
,
kn(e)
}
function cf(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 $u(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? cf(Object(r), !0).forEach(function(n) {
_E(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : cf(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function _E(e, t, r) {
return t = $E(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function $E(e) {
var t = TE(e, "string");
return kn(t) == "symbol" ? t : t + ""
}
function TE(e, t) {
if (kn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (kn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var mr = {
widthCache: {},
cacheCount: 0
}
, jE = 2e3
, EE = {
position: "absolute",
top: "-20000px",
left: 0,
padding: 0,
margin: 0,
border: "none",
whiteSpace: "pre"
}
, lf = "recharts_measurement_span";
function ME(e) {
var t = $u({}, e);
return Object.keys(t).forEach(function(r) {
t[r] || delete t[r]
}),
t
}
var Sn = function(t) {
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (t == null || Pt.isSsr)
return {
width: 0,
height: 0
};
var n = ME(r)
, i = JSON.stringify({
text: t,
copyStyle: n
});
if (mr.widthCache[i])
return mr.widthCache[i];
try {
var a = document.getElementById(lf);
a || (a = document.createElement("span"),
a.setAttribute("id", lf),
a.setAttribute("aria-hidden", "true"),
document.body.appendChild(a));
var o = $u($u({}, EE), n);
Object.assign(a.style, o),
a.textContent = "".concat(t);
var u = a.getBoundingClientRect()
, c = {
width: u.width,
height: u.height
};
return mr.widthCache[i] = c,
++mr.cacheCount > jE && (mr.cacheCount = 0,
mr.widthCache = {}),
c
} catch {
return {
width: 0,
height: 0
}
}
}
, CE = function(t) {
return {
top: t.top + window.scrollY - document.documentElement.clientTop,
left: t.left + window.scrollX - document.documentElement.clientLeft
}
};
function Dn(e) {
"@babel/helpers - typeof";
return Dn = 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
}
,
Dn(e)
}
function Ji(e, t) {
return NE(e) || DE(e, t) || kE(e, t) || IE()
}
function IE() {
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 kE(e, t) {
if (e) {
if (typeof e == "string")
return sf(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 sf(e, t)
}
}
function sf(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 DE(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, l = !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 (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function NE(e) {
if (Array.isArray(e))
return e
}
function BE(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function ff(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, RE(n.key), n)
}
}
function LE(e, t, r) {
return t && ff(e.prototype, t),
r && ff(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function RE(e) {
var t = FE(e, "string");
return Dn(t) == "symbol" ? t : t + ""
}
function FE(e, t) {
if (Dn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t);
if (Dn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return String(e)
}
var df = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/
, hf = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/
, zE = /^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/
, WE = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/
, fv = {
cm: 96 / 2.54,
mm: 96 / 25.4,
pt: 96 / 72,
pc: 96 / 6,
in: 96,
Q: 96 / (2.54 * 40),
px: 1
}
, UE = Object.keys(fv)
, wr = "NaN";
function HE(e, t) {
return e * fv[t]
}
var $i = function() {
function e(t, r) {
BE(this, e),
this.num = t,
this.unit = r,
this.num = t,
this.unit = r,
Number.isNaN(t) && (this.unit = ""),
r !== "" && !zE.test(r) && (this.num = NaN,
this.unit = ""),
UE.includes(r) && (this.num = HE(t, r),
this.unit = "px")
}
return LE(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 = WE.exec(r)) !== null && n !== void 0 ? n : [], a = Ji(i, 3), o = a[1], u = a[2];
return new e(parseFloat(o),u ?? "")
}
}])
}();
function dv(e) {
if (e.includes(wr))
return wr;
for (var t = e; t.includes("*") || t.includes("/"); ) {
var r, n = (r = df.exec(t)) !== null && r !== void 0 ? r : [], i = Ji(n, 4), a = i[1], o = i[2], u = i[3], c = $i.parse(a ?? ""), l = $i.parse(u ?? ""), f = o === "*" ? c.multiply(l) : c.divide(l);
if (f.isNaN())
return wr;
t = t.replace(df, f.toString())
}
for (; t.includes("+") || /.-\d+(?:\.\d+)?/.test(t); ) {
var s, d = (s = hf.exec(t)) !== null && s !== void 0 ? s : [], h = Ji(d, 4), v = h[1], y = h[2], p = h[3], b = $i.parse(v ?? ""), w = $i.parse(p ?? ""), x = y === "+" ? b.add(w) : b.subtract(w);
if (x.isNaN())
return wr;
t = t.replace(hf, x.toString())
}
return t
}
var pf = /\(([^()]*)\)/;
function qE(e) {
for (var t = e; t.includes("("); ) {
var r = pf.exec(t)
, n = Ji(r, 2)
, i = n[1];
t = t.replace(pf, dv(i))
}
return t
}
function KE(e) {
var t = e.replace(/\s+/g, "");
return t = qE(t),
t = dv(t),
t
}
function GE(e) {
try {
return KE(e)
} catch {
return wr
}
}
function Lo(e) {
var t = GE(e.slice(5, -1));
return t === wr ? "" : t
}
var YE = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"]
, VE = ["dx", "dy", "angle", "className", "breakAll"];
function Tu() {
return Tu = 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
}
,
Tu.apply(this, arguments)
}
function vf(e, t) {
if (e == null)
return {};
var r = XE(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 XE(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function yf(e, t) {
return eM(e) || QE(e, t) || JE(e, t) || ZE()
}
function ZE() {
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 JE(e, t) {
if (e) {
if (typeof e == "string")
return gf(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 gf(e, t)
}
}
function gf(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 QE(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, l = !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 (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function eM(e) {
if (Array.isArray(e))
return e
}
var hv = /[ \f\n\r\t\v\u2028\u2029]+/
, pv = 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(hv));
var o = a.map(function(c) {
return {
word: c,
width: Sn(c, i).width
}
})
, u = n ? 0 : Sn(" ", i).width;
return {
wordsWithComputedWidth: o,
spaceWidth: u
}
} catch {
return null
}
}
, tM = function(t, r, n, i, a) {
var o = t.maxLines
, u = t.children
, c = t.style
, l = t.breakAll
, f = R(o)
, s = u
, d = function() {
var M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
return M.reduce(function(D, B) {
var F = B.word
, z = B.width
, q = D[D.length - 1];
if (q && (i == null || a || q.width + z + n < Number(i)))
q.words.push(F),
q.width += z + n;
else {
var G = {
words: [F],
width: z
};
D.push(G)
}
return D
}, [])
}
, h = d(r)
, v = function(M) {
return M.reduce(function(D, B) {
return D.width > B.width ? D : B
})
};
if (!f)
return h;
for (var y = "…", p = function(M) {
var D = s.slice(0, M)
, B = pv({
breakAll: l,
style: c,
children: D + y
}).wordsWithComputedWidth
, F = d(B)
, z = F.length > o || v(F).width > Number(i);
return [z, F]
}, b = 0, w = s.length - 1, x = 0, O; b <= w && x <= s.length - 1; ) {
var g = Math.floor((b + w) / 2)
, m = g - 1
, S = p(m)
, P = yf(S, 2)
, _ = P[0]
, j = P[1]
, $ = p(g)
, T = yf($, 1)
, C = T[0];
if (!_ && !C && (b = g + 1),
_ && C && (w = g - 1),
!_ && C) {
O = j;
break
}
x++
}
return O || h
}
, mf = function(t) {
var r = te(t) ? [] : t.toString().split(hv);
return [{
words: r
}]
}
, rM = function(t) {
var r = t.width
, n = t.scaleToFit
, i = t.children
, a = t.style
, o = t.breakAll
, u = t.maxLines;
if ((r || n) && !Pt.isSsr) {
var c, l, f = pv({
breakAll: o,
children: i,
style: a
});
if (f) {
var s = f.wordsWithComputedWidth
, d = f.spaceWidth;
c = s,
l = d
} else
return mf(i);
return tM({
breakAll: o,
children: i,
maxLines: u,
style: a
}, c, l, r, n)
}
return mf(i)
}
, bf = "#808080"
, Qi = 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
, l = c === void 0 ? "0.71em" : c
, f = t.scaleToFit
, s = f === void 0 ? !1 : f
, d = t.textAnchor
, h = d === void 0 ? "start" : d
, v = t.verticalAnchor
, y = v === void 0 ? "end" : v
, p = t.fill
, b = p === void 0 ? bf : p
, w = vf(t, YE)
, x = L.useMemo(function() {
return rM({
breakAll: w.breakAll,
children: w.children,
maxLines: w.maxLines,
scaleToFit: s,
style: w.style,
width: w.width
})
}, [w.breakAll, w.children, w.maxLines, s, w.style, w.width])
, O = w.dx
, g = w.dy
, m = w.angle
, S = w.className
, P = w.breakAll
, _ = vf(w, VE);
if (!Ae(n) || !Ae(a))
return null;
var j = n + (R(O) ? O : 0), $ = a + (R(g) ? g : 0), T;
switch (y) {
case "start":
T = Lo("calc(".concat(l, ")"));
break;
case "middle":
T = Lo("calc(".concat((x.length - 1) / 2, " * -").concat(u, " + (").concat(l, " / 2))"));
break;
default:
T = Lo("calc(".concat(x.length - 1, " * -").concat(u, ")"));
break
}
var C = [];
if (s) {
var k = x[0].width
, M = w.width;
C.push("scale(".concat((R(M) ? M / k : 1) / k, ")"))
}
return m && C.push("rotate(".concat(m, ", ").concat(j, ", ").concat($, ")")),
C.length && (_.transform = C.join(" ")),
A.createElement("text", Tu({}, Q(_, !0), {
x: j,
y: $,
className: re("recharts-text", S),
textAnchor: h,
fill: b.includes("url") ? bf : b
}), x.map(function(D, B) {
var F = D.words.join(P ? "" : " ");
return A.createElement("tspan", {
x: j,
dy: B === 0 ? T : u,
key: "".concat(F, "-").concat(B)
}, F)
}))
};
function zt(e, t) {
return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN
}
function nM(e, t) {
return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN
}
function tl(e) {
let t, r, n;
e.length !== 2 ? (t = zt,
r = (u, c) => zt(e(u), c),
n = (u, c) => e(u) - c) : (t = e === zt || e === nM ? e : iM,
r = e,
n = e);
function i(u, c, l=0, f=u.length) {
if (l < f) {
if (t(c, c) !== 0)
return f;
do {
const s = l + f >>> 1;
r(u[s], c) < 0 ? l = s + 1 : f = s
} while (l < f)
}
return l
}
function a(u, c, l=0, f=u.length) {
if (l < f) {
if (t(c, c) !== 0)
return f;
do {
const s = l + f >>> 1;
r(u[s], c) <= 0 ? l = s + 1 : f = s
} while (l < f)
}
return l
}
function o(u, c, l=0, f=u.length) {
const s = i(u, c, l, f - 1);
return s > l && n(u[s - 1], c) > -n(u[s], c) ? s - 1 : s
}
return {
left: i,
center: o,
right: a
}
}
function iM() {
return 0
}
function vv(e) {
return e === null ? NaN : +e
}
function *aM(e, t) {
for (let r of e)
r != null && (r = +r) >= r && (yield r)
}
const oM = tl(zt)
, yi = oM.right;
tl(vv).center;
class xf extends Map {
constructor(t, r=lM) {
if (super(),
Object.defineProperties(this, {
_intern: {
value: new Map
},
_key: {
value: r
}
}),
t != null)
for (const [n,i] of t)
this.set(n, i)
}
get(t) {
return super.get(wf(this, t))
}
has(t) {
return super.has(wf(this, t))
}
set(t, r) {
return super.set(uM(this, t), r)
}
delete(t) {
return super.delete(cM(this, t))
}
}
function wf({_intern: e, _key: t}, r) {
const n = t(r);
return e.has(n) ? e.get(n) : r
}
function uM({_intern: e, _key: t}, r) {
const n = t(r);
return e.has(n) ? e.get(n) : (e.set(n, r),
r)
}
function cM({_intern: e, _key: t}, r) {
const n = t(r);
return e.has(n) && (r = e.get(n),
e.delete(n)),
r
}
function lM(e) {
return e !== null && typeof e == "object" ? e.valueOf() : e
}
function sM(e=zt) {
if (e === zt)
return yv;
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 yv(e, t) {
return (e == null || !(e >= e)) - (t == null || !(t >= t)) || (e < t ? -1 : e > t ? 1 : 0)
}
const fM = Math.sqrt(50)
, dM = Math.sqrt(10)
, hM = Math.sqrt(2);
function ea(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 >= fM ? 10 : a >= dM ? 5 : a >= hM ? 2 : 1;
let u, c, l;
return i < 0 ? (l = Math.pow(10, -i) / o,
u = Math.round(e * l),
c = Math.round(t * l),
u / l < e && ++u,
c / l > t && --c,
l = -l) : (l = Math.pow(10, i) * o,
u = Math.round(e / l),
c = Math.round(t / l),
u * l < e && ++u,
c * l > t && --c),
c < u && .5 <= r && r < 2 ? ea(e, t, r * 2) : [u, c, l]
}
function ju(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 ? ea(t, e, r) : ea(e, t, r);
if (!(a >= i))
return [];
const u = a - i + 1
, c = new Array(u);
if (n)
if (o < 0)
for (let l = 0; l < u; ++l)
c[l] = (a - l) / -o;
else
for (let l = 0; l < u; ++l)
c[l] = (a - l) * o;
else if (o < 0)
for (let l = 0; l < u; ++l)
c[l] = (i + l) / -o;
else
for (let l = 0; l < u; ++l)
c[l] = (i + l) * o;
return c
}
function Eu(e, t, r) {
return t = +t,
e = +e,
r = +r,
ea(e, t, r)[2]
}
function Mu(e, t, r) {
t = +t,
e = +e,
r = +r;
const n = t < e
, i = n ? Eu(t, e, r) : Eu(e, t, r);
return (n ? -1 : 1) * (i < 0 ? 1 / -i : i)
}
function Of(e, t) {
let r;
for (const n of e)
n != null && (r < n || r === void 0 && n >= n) && (r = n);
return r
}
function Sf(e, t) {
let r;
for (const n of e)
n != null && (r > n || r === void 0 && n >= n) && (r = n);
return r
}
function gv(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 ? yv : sM(i); n > r; ) {
if (n - r > 600) {
const c = n - r + 1
, l = t - r + 1
, f = Math.log(c)
, s = .5 * Math.exp(2 * f / 3)
, d = .5 * Math.sqrt(f * s * (c - s) / c) * (l - c / 2 < 0 ? -1 : 1)
, h = Math.max(r, Math.floor(t - l * s / c + d))
, v = Math.min(n, Math.floor(t + (c - l) * s / c + d));
gv(e, t, h, v, i)
}
const a = e[t];
let o = r
, u = n;
for (pn(e, r, t),
i(e[n], a) > 0 && pn(e, r, n); o < u; ) {
for (pn(e, o, u),
++o,
--u; i(e[o], a) < 0; )
++o;
for (; i(e[u], a) > 0; )
--u
}
i(e[r], a) === 0 ? pn(e, r, u) : (++u,
pn(e, u, n)),
u <= t && (r = u + 1),
t <= u && (n = u - 1)
}
return e
}
function pn(e, t, r) {
const n = e[t];
e[t] = e[r],
e[r] = n
}
function pM(e, t, r) {
if (e = Float64Array.from(aM(e)),
!(!(n = e.length) || isNaN(t = +t))) {
if (t <= 0 || n < 2)
return Sf(e);
if (t >= 1)
return Of(e);
var n, i = (n - 1) * t, a = Math.floor(i), o = Of(gv(e, a).subarray(0, a + 1)), u = Sf(e.subarray(a + 1));
return o + (u - o) * (i - a)
}
}
function vM(e, t, r=vv) {
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 yM(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 Je(e, t) {
switch (arguments.length) {
case 0:
break;
case 1:
this.range(e);
break;
default:
this.range(t).domain(e);
break
}
return this
}
function It(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 Cu = Symbol("implicit");
function rl() {
var e = new xf
, t = []
, r = []
, n = Cu;
function i(a) {
let o = e.get(a);
if (o === void 0) {
if (n !== Cu)
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 xf;
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 rl(t, r).unknown(n)
}
,
Je.apply(i, arguments),
i
}
function Nn() {
var e = rl().unknown(void 0), t = e.domain, r = e.range, n = 0, i = 1, a, o, u = !1, c = 0, l = 0, f = .5;
delete e.unknown;
function s() {
var d = t().length
, h = i < n
, v = h ? i : n
, y = h ? n : i;
a = (y - v) / Math.max(1, d - c + l * 2),
u && (a = Math.floor(a)),
v += (y - v - a * (d - c)) * f,
o = a * (1 - c),
u && (v = Math.round(v),
o = Math.round(o));
var p = yM(d).map(function(b) {
return v + a * b
});
return r(h ? p.reverse() : p)
}
return e.domain = function(d) {
return arguments.length ? (t(d),
s()) : t()
}
,
e.range = function(d) {
return arguments.length ? ([n,i] = d,
n = +n,
i = +i,
s()) : [n, i]
}
,
e.rangeRound = function(d) {
return [n,i] = d,
n = +n,
i = +i,
u = !0,
s()
}
,
e.bandwidth = function() {
return o
}
,
e.step = function() {
return a
}
,
e.round = function(d) {
return arguments.length ? (u = !!d,
s()) : u
}
,
e.padding = function(d) {
return arguments.length ? (c = Math.min(1, l = +d),
s()) : c
}
,
e.paddingInner = function(d) {
return arguments.length ? (c = Math.min(1, d),
s()) : c
}
,
e.paddingOuter = function(d) {
return arguments.length ? (l = +d,
s()) : l
}
,
e.align = function(d) {
return arguments.length ? (f = Math.max(0, Math.min(1, d)),
s()) : f
}
,
e.copy = function() {
return Nn(t(), [n, i]).round(u).paddingInner(c).paddingOuter(l).align(f)
}
,
Je.apply(s(), arguments)
}
function mv(e) {
var t = e.copy;
return e.padding = e.paddingOuter,
delete e.paddingInner,
delete e.paddingOuter,
e.copy = function() {
return mv(t())
}
,
e
}
function Pn() {
return mv(Nn.apply(null, arguments).paddingInner(1))
}
function nl(e, t, r) {
e.prototype = t.prototype = r,
r.constructor = e
}
function bv(e, t) {
var r = Object.create(e.prototype);
for (var n in t)
r[n] = t[n];
return r
}
function gi() {}
var Bn = .7
, ta = 1 / Bn
, _r = "\\s*([+-]?\\d+)\\s*"
, Ln = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*"
, st = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*"
, gM = /^#([0-9a-f]{3,8})$/
, mM = new RegExp(`^rgb\\(${_r},${_r},${_r}\\)$`)
, bM = new RegExp(`^rgb\\(${st},${st},${st}\\)$`)
, xM = new RegExp(`^rgba\\(${_r},${_r},${_r},${Ln}\\)$`)
, wM = new RegExp(`^rgba\\(${st},${st},${st},${Ln}\\)$`)
, OM = new RegExp(`^hsl\\(${Ln},${st},${st}\\)$`)
, SM = new RegExp(`^hsla\\(${Ln},${st},${st},${Ln}\\)$`)
, Pf = {
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
};
nl(gi, Rn, {
copy(e) {
return Object.assign(new this.constructor, this, e)
},
displayable() {
return this.rgb().displayable()
},
hex: Af,
formatHex: Af,
formatHex8: PM,
formatHsl: AM,
formatRgb: _f,
toString: _f
});
function Af() {
return this.rgb().formatHex()
}
function PM() {
return this.rgb().formatHex8()
}
function AM() {
return xv(this).formatHsl()
}
function _f() {
return this.rgb().formatRgb()
}
function Rn(e) {
var t, r;
return e = (e + "").trim().toLowerCase(),
(t = gM.exec(e)) ? (r = t[1].length,
t = parseInt(t[1], 16),
r === 6 ? $f(t) : r === 3 ? new Le(t >> 8 & 15 | t >> 4 & 240,t >> 4 & 15 | t & 240,(t & 15) << 4 | t & 15,1) : r === 8 ? Ti(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? Ti(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 = mM.exec(e)) ? new Le(t[1],t[2],t[3],1) : (t = bM.exec(e)) ? new Le(t[1] * 255 / 100,t[2] * 255 / 100,t[3] * 255 / 100,1) : (t = xM.exec(e)) ? Ti(t[1], t[2], t[3], t[4]) : (t = wM.exec(e)) ? Ti(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = OM.exec(e)) ? Ef(t[1], t[2] / 100, t[3] / 100, 1) : (t = SM.exec(e)) ? Ef(t[1], t[2] / 100, t[3] / 100, t[4]) : Pf.hasOwnProperty(e) ? $f(Pf[e]) : e === "transparent" ? new Le(NaN,NaN,NaN,0) : null
}
function $f(e) {
return new Le(e >> 16 & 255,e >> 8 & 255,e & 255,1)
}
function Ti(e, t, r, n) {
return n <= 0 && (e = t = r = NaN),
new Le(e,t,r,n)
}
function _M(e) {
return e instanceof gi || (e = Rn(e)),
e ? (e = e.rgb(),
new Le(e.r,e.g,e.b,e.opacity)) : new Le
}
function Iu(e, t, r, n) {
return arguments.length === 1 ? _M(e) : new Le(e,t,r,n ?? 1)
}
function Le(e, t, r, n) {
this.r = +e,
this.g = +t,
this.b = +r,
this.opacity = +n
}
nl(Le, Iu, bv(gi, {
brighter(e) {
return e = e == null ? ta : Math.pow(ta, e),
new Le(this.r * e,this.g * e,this.b * e,this.opacity)
},
darker(e) {
return e = e == null ? Bn : Math.pow(Bn, e),
new Le(this.r * e,this.g * e,this.b * e,this.opacity)
},
rgb() {
return this
},
clamp() {
return new Le(or(this.r),or(this.g),or(this.b),ra(this.opacity))
},
displayable() {
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1
},
hex: Tf,
formatHex: Tf,
formatHex8: $M,
formatRgb: jf,
toString: jf
}));
function Tf() {
return `#${tr(this.r)}${tr(this.g)}${tr(this.b)}`
}
function $M() {
return `#${tr(this.r)}${tr(this.g)}${tr(this.b)}${tr((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`
}
function jf() {
const e = ra(this.opacity);
return `${e === 1 ? "rgb(" : "rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${e === 1 ? ")" : `, ${e})`}`
}
function ra(e) {
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e))
}
function or(e) {
return Math.max(0, Math.min(255, Math.round(e) || 0))
}
function tr(e) {
return e = or(e),
(e < 16 ? "0" : "") + e.toString(16)
}
function Ef(e, t, r, n) {
return n <= 0 ? e = t = r = NaN : r <= 0 || r >= 1 ? e = t = NaN : t <= 0 && (e = NaN),
new nt(e,t,r,n)
}
function xv(e) {
if (e instanceof nt)
return new nt(e.h,e.s,e.l,e.opacity);
if (e instanceof gi || (e = Rn(e)),
!e)
return new nt;
if (e instanceof nt)
return e;
e = e.rgb();
var t = e.r / 255
, r = e.g / 255
, n = e.b / 255
, i = Math.min(t, r, n)
, a = Math.max(t, r, n)
, o = NaN
, u = a - i
, c = (a + i) / 2;
return u ? (t === a ? o = (r - n) / u + (r < n) * 6 : r === a ? o = (n - t) / u + 2 : o = (t - r) / u + 4,
u /= c < .5 ? a + i : 2 - a - i,
o *= 60) : u = c > 0 && c < 1 ? 0 : o,
new nt(o,u,c,e.opacity)
}
function TM(e, t, r, n) {
return arguments.length === 1 ? xv(e) : new nt(e,t,r,n ?? 1)
}
function nt(e, t, r, n) {
this.h = +e,
this.s = +t,
this.l = +r,
this.opacity = +n
}
nl(nt, TM, bv(gi, {
brighter(e) {
return e = e == null ? ta : Math.pow(ta, e),
new nt(this.h,this.s,this.l * e,this.opacity)
},
darker(e) {
return e = e == null ? Bn : Math.pow(Bn, e),
new nt(this.h,this.s,this.l * e,this.opacity)
},
rgb() {
var e = this.h % 360 + (this.h < 0) * 360
, t = isNaN(e) || isNaN(this.s) ? 0 : this.s
, r = this.l
, n = r + (r < .5 ? r : 1 - r) * t
, i = 2 * r - n;
return new Le(Ro(e >= 240 ? e - 240 : e + 120, i, n),Ro(e, i, n),Ro(e < 120 ? e + 240 : e - 120, i, n),this.opacity)
},
clamp() {
return new nt(Mf(this.h),ji(this.s),ji(this.l),ra(this.opacity))
},
displayable() {
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1
},
formatHsl() {
const e = ra(this.opacity);
return `${e === 1 ? "hsl(" : "hsla("}${Mf(this.h)}, ${ji(this.s) * 100}%, ${ji(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`
}
}));
function Mf(e) {
return e = (e || 0) % 360,
e < 0 ? e + 360 : e
}
function ji(e) {
return Math.max(0, Math.min(1, e || 0))
}
function Ro(e, t, r) {
return (e < 60 ? t + (r - t) * e / 60 : e < 180 ? r : e < 240 ? t + (r - t) * (240 - e) / 60 : t) * 255
}
const il = e => () => e;
function jM(e, t) {
return function(r) {
return e + r * t
}
}
function EM(e, t, r) {
return e = Math.pow(e, r),
t = Math.pow(t, r) - e,
r = 1 / r,
function(n) {
return Math.pow(e + n * t, r)
}
}
function MM(e) {
return (e = +e) == 1 ? wv : function(t, r) {
return r - t ? EM(t, r, e) : il(isNaN(t) ? r : t)
}
}
function wv(e, t) {
var r = t - e;
return r ? jM(e, r) : il(isNaN(e) ? t : e)
}
const Cf = function e(t) {
var r = MM(t);
function n(i, a) {
var o = r((i = Iu(i)).r, (a = Iu(a)).r)
, u = r(i.g, a.g)
, c = r(i.b, a.b)
, l = wv(i.opacity, a.opacity);
return function(f) {
return i.r = o(f),
i.g = u(f),
i.b = c(f),
i.opacity = l(f),
i + ""
}
}
return n.gamma = e,
n
}(1);
function CM(e, t) {
t || (t = []);
var r = e ? Math.min(t.length, e.length) : 0, n = t.slice(), i;
return function(a) {
for (i = 0; i < r; ++i)
n[i] = e[i] * (1 - a) + t[i] * a;
return n
}
}
function IM(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView)
}
function kM(e, t) {
var r = t ? t.length : 0, n = e ? Math.min(r, e.length) : 0, i = new Array(n), a = new Array(r), o;
for (o = 0; o < n; ++o)
i[o] = on(e[o], t[o]);
for (; o < r; ++o)
a[o] = t[o];
return function(u) {
for (o = 0; o < n; ++o)
a[o] = i[o](u);
return a
}
}
function DM(e, t) {
var r = new Date;
return e = +e,
t = +t,
function(n) {
return r.setTime(e * (1 - n) + t * n),
r
}
}
function na(e, t) {
return e = +e,
t = +t,
function(r) {
return e * (1 - r) + t * r
}
}
function NM(e, t) {
var r = {}, n = {}, i;
(e === null || typeof e != "object") && (e = {}),
(t === null || typeof t != "object") && (t = {});
for (i in t)
i in e ? r[i] = on(e[i], t[i]) : n[i] = t[i];
return function(a) {
for (i in r)
n[i] = r[i](a);
return n
}
}
var ku = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g
, Fo = new RegExp(ku.source,"g");
function BM(e) {
return function() {
return e
}
}
function LM(e) {
return function(t) {
return e(t) + ""
}
}
function RM(e, t) {
var r = ku.lastIndex = Fo.lastIndex = 0, n, i, a, o = -1, u = [], c = [];
for (e = e + "",
t = t + ""; (n = ku.exec(e)) && (i = Fo.exec(t)); )
(a = i.index) > r && (a = t.slice(r, a),
u[o] ? u[o] += a : u[++o] = a),
(n = n[0]) === (i = i[0]) ? u[o] ? u[o] += i : u[++o] = i : (u[++o] = null,
c.push({
i: o,
x: na(n, i)
})),
r = Fo.lastIndex;
return r < t.length && (a = t.slice(r),
u[o] ? u[o] += a : u[++o] = a),
u.length < 2 ? c[0] ? LM(c[0].x) : BM(t) : (t = c.length,
function(l) {
for (var f = 0, s; f < t; ++f)
u[(s = c[f]).i] = s.x(l);
return u.join("")
}
)
}
function on(e, t) {
var r = typeof t, n;
return t == null || r === "boolean" ? il(t) : (r === "number" ? na : r === "string" ? (n = Rn(t)) ? (t = n,
Cf) : RM : t instanceof Rn ? Cf : t instanceof Date ? DM : IM(t) ? CM : Array.isArray(t) ? kM : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? NM : na)(e, t)
}
function al(e, t) {
return e = +e,
t = +t,
function(r) {
return Math.round(e * (1 - r) + t * r)
}
}
function FM(e, t) {
t === void 0 && (t = e,
e = on);
for (var r = 0, n = t.length - 1, i = t[0], a = new Array(n < 0 ? 0 : n); r < n; )
a[r] = e(i, i = t[++r]);
return function(o) {
var u = Math.max(0, Math.min(n - 1, Math.floor(o *= n)));
return a[u](o - u)
}
}
function zM(e) {
return function() {
return e
}
}
function ia(e) {
return +e
}
var If = [0, 1];
function Be(e) {
return e
}
function Du(e, t) {
return (t -= e = +e) ? function(r) {
return (r - e) / t
}
: zM(isNaN(t) ? NaN : .5)
}
function WM(e, t) {
var r;
return e > t && (r = e,
e = t,
t = r),
function(n) {
return Math.max(e, Math.min(t, n))
}
}
function UM(e, t, r) {
var n = e[0]
, i = e[1]
, a = t[0]
, o = t[1];
return i < n ? (n = Du(i, n),
a = r(o, a)) : (n = Du(n, i),
a = r(a, o)),
function(u) {
return a(n(u))
}
}
function HM(e, t, r) {
var n = Math.min(e.length, t.length) - 1
, i = new Array(n)
, a = new Array(n)
, o = -1;
for (e[n] < e[0] && (e = e.slice().reverse(),
t = t.slice().reverse()); ++o < n; )
i[o] = Du(e[o], e[o + 1]),
a[o] = r(t[o], t[o + 1]);
return function(u) {
var c = yi(e, u, 1, n) - 1;
return a[c](i[c](u))
}
}
function mi(e, t) {
return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
}
function oo() {
var e = If, t = If, r = on, n, i, a, o = Be, u, c, l;
function f() {
var d = Math.min(e.length, t.length);
return o !== Be && (o = WM(e[0], e[d - 1])),
u = d > 2 ? HM : UM,
c = l = null,
s
}
function s(d) {
return d == null || isNaN(d = +d) ? a : (c || (c = u(e.map(n), t, r)))(n(o(d)))
}
return s.invert = function(d) {
return o(i((l || (l = u(t, e.map(n), na)))(d)))
}
,
s.domain = function(d) {
return arguments.length ? (e = Array.from(d, ia),
f()) : e.slice()
}
,
s.range = function(d) {
return arguments.length ? (t = Array.from(d),
f()) : t.slice()
}
,
s.rangeRound = function(d) {
return t = Array.from(d),
r = al,
f()
}
,
s.clamp = function(d) {
return arguments.length ? (o = d ? !0 : Be,
f()) : o !== Be
}
,
s.interpolate = function(d) {
return arguments.length ? (r = d,
f()) : r
}
,
s.unknown = function(d) {
return arguments.length ? (a = d,
s) : a
}
,
function(d, h) {
return n = d,
i = h,
f()
}
}
function ol() {
return oo()(Be, Be)
}
function qM(e) {
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10)
}
function aa(e, t) {
if ((r = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0)
return null;
var r, n = e.slice(0, r);
return [n.length > 1 ? n[0] + n.slice(2) : n, +e.slice(r + 1)]
}
function Ir(e) {
return e = aa(Math.abs(e)),
e ? e[1] : NaN
}
function KM(e, t) {
return function(r, n) {
for (var i = r.length, a = [], o = 0, u = e[0], c = 0; i > 0 && u > 0 && (c + u + 1 > n && (u = Math.max(1, n - c)),
a.push(r.substring(i -= u, i + u)),
!((c += u + 1) > n)); )
u = e[o = (o + 1) % e.length];
return a.reverse().join(t)
}
}
function GM(e) {
return function(t) {
return t.replace(/[0-9]/g, function(r) {
return e[+r]
})
}
}
var YM = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function Fn(e) {
if (!(t = YM.exec(e)))
throw new Error("invalid format: " + e);
var t;
return new ul({
fill: t[1],
align: t[2],
sign: t[3],
symbol: t[4],
zero: t[5],
width: t[6],
comma: t[7],
precision: t[8] && t[8].slice(1),
trim: t[9],
type: t[10]
})
}
Fn.prototype = ul.prototype;
function ul(e) {
this.fill = e.fill === void 0 ? " " : e.fill + "",
this.align = e.align === void 0 ? ">" : e.align + "",
this.sign = e.sign === void 0 ? "-" : e.sign + "",
this.symbol = e.symbol === void 0 ? "" : e.symbol + "",
this.zero = !!e.zero,
this.width = e.width === void 0 ? void 0 : +e.width,
this.comma = !!e.comma,
this.precision = e.precision === void 0 ? void 0 : +e.precision,
this.trim = !!e.trim,
this.type = e.type === void 0 ? "" : e.type + ""
}
ul.prototype.toString = function() {
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type
}
;
function VM(e) {
e: for (var t = e.length, r = 1, n = -1, i; r < t; ++r)
switch (e[r]) {
case ".":
n = i = r;
break;
case "0":
n === 0 && (n = r),
i = r;
break;
default:
if (!+e[r])
break e;
n > 0 && (n = 0);
break
}
return n > 0 ? e.slice(0, n) + e.slice(i + 1) : e
}
var Ov;
function XM(e, t) {
var r = aa(e, t);
if (!r)
return e + "";
var n = r[0]
, i = r[1]
, a = i - (Ov = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1
, o = n.length;
return a === o ? n : a > o ? n + new Array(a - o + 1).join("0") : a > 0 ? n.slice(0, a) + "." + n.slice(a) : "0." + new Array(1 - a).join("0") + aa(e, Math.max(0, t + a - 1))[0]
}
function kf(e, t) {
var r = aa(e, t);
if (!r)
return e + "";
var n = r[0]
, i = r[1];
return i < 0 ? "0." + new Array(-i).join("0") + n : n.length > i + 1 ? n.slice(0, i + 1) + "." + n.slice(i + 1) : n + new Array(i - n.length + 2).join("0")
}
const Df = {
"%": (e, t) => (e * 100).toFixed(t),
b: e => Math.round(e).toString(2),
c: e => e + "",
d: qM,
e: (e, t) => e.toExponential(t),
f: (e, t) => e.toFixed(t),
g: (e, t) => e.toPrecision(t),
o: e => Math.round(e).toString(8),
p: (e, t) => kf(e * 100, t),
r: kf,
s: XM,
X: e => Math.round(e).toString(16).toUpperCase(),
x: e => Math.round(e).toString(16)
};
function Nf(e) {
return e
}
var Bf = Array.prototype.map
, Lf = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function ZM(e) {
var t = e.grouping === void 0 || e.thousands === void 0 ? Nf : KM(Bf.call(e.grouping, Number), e.thousands + "")
, r = e.currency === void 0 ? "" : e.currency[0] + ""
, n = e.currency === void 0 ? "" : e.currency[1] + ""
, i = e.decimal === void 0 ? "." : e.decimal + ""
, a = e.numerals === void 0 ? Nf : GM(Bf.call(e.numerals, String))
, o = e.percent === void 0 ? "%" : e.percent + ""
, u = e.minus === void 0 ? "" : e.minus + ""
, c = e.nan === void 0 ? "NaN" : e.nan + "";
function l(s) {
s = Fn(s);
var d = s.fill
, h = s.align
, v = s.sign
, y = s.symbol
, p = s.zero
, b = s.width
, w = s.comma
, x = s.precision
, O = s.trim
, g = s.type;
g === "n" ? (w = !0,
g = "g") : Df[g] || (x === void 0 && (x = 12),
O = !0,
g = "g"),
(p || d === "0" && h === "=") && (p = !0,
d = "0",
h = "=");
var m = y === "$" ? r : y === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : ""
, S = y === "$" ? n : /[%p]/.test(g) ? o : ""
, P = Df[g]
, _ = /[defgprs%]/.test(g);
x = x === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, x)) : Math.max(0, Math.min(20, x));
function j($) {
var T = m, C = S, k, M, D;
if (g === "c")
C = P($) + C,
$ = "";
else {
$ = +$;
var B = $ < 0 || 1 / $ < 0;
if ($ = isNaN($) ? c : P(Math.abs($), x),
O && ($ = VM($)),
B && +$ == 0 && v !== "+" && (B = !1),
T = (B ? v === "(" ? v : u : v === "-" || v === "(" ? "" : v) + T,
C = (g === "s" ? Lf[8 + Ov / 3] : "") + C + (B && v === "(" ? ")" : ""),
_) {
for (k = -1,
M = $.length; ++k < M; )
if (D = $.charCodeAt(k),
48 > D || D > 57) {
C = (D === 46 ? i + $.slice(k + 1) : $.slice(k)) + C,
$ = $.slice(0, k);
break
}
}
}
w && !p && ($ = t($, 1 / 0));
var F = T.length + $.length + C.length
, z = F < b ? new Array(b - F + 1).join(d) : "";
switch (w && p && ($ = t(z + $, z.length ? b - C.length : 1 / 0),
z = ""),
h) {
case "<":
$ = T + $ + C + z;
break;
case "=":
$ = T + z + $ + C;
break;
case "^":
$ = z.slice(0, F = z.length >> 1) + T + $ + C + z.slice(F);
break;
default:
$ = z + T + $ + C;
break
}
return a($)
}
return j.toString = function() {
return s + ""
}
,
j
}
function f(s, d) {
var h = l((s = Fn(s),
s.type = "f",
s))
, v = Math.max(-8, Math.min(8, Math.floor(Ir(d) / 3))) * 3
, y = Math.pow(10, -v)
, p = Lf[8 + v / 3];
return function(b) {
return h(y * b) + p
}
}
return {
format: l,
formatPrefix: f
}
}
var Ei, cl, Sv;
JM({
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
function JM(e) {
return Ei = ZM(e),
cl = Ei.format,
Sv = Ei.formatPrefix,
Ei
}
function QM(e) {
return Math.max(0, -Ir(Math.abs(e)))
}
function eC(e, t) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Ir(t) / 3))) * 3 - Ir(Math.abs(e)))
}
function tC(e, t) {
return e = Math.abs(e),
t = Math.abs(t) - e,
Math.max(0, Ir(t) - Ir(e)) + 1
}
function Pv(e, t, r, n) {
var i = Mu(e, t, r), a;
switch (n = Fn(n ?? ",f"),
n.type) {
case "s":
{
var o = Math.max(Math.abs(e), Math.abs(t));
return n.precision == null && !isNaN(a = eC(i, o)) && (n.precision = a),
Sv(n, o)
}
case "":
case "e":
case "g":
case "p":
case "r":
{
n.precision == null && !isNaN(a = tC(i, Math.max(Math.abs(e), Math.abs(t)))) && (n.precision = a - (n.type === "e"));
break
}
case "f":
case "%":
{
n.precision == null && !isNaN(a = QM(i)) && (n.precision = a - (n.type === "%") * 2);
break
}
}
return cl(n)
}
function qt(e) {
var t = e.domain;
return e.ticks = function(r) {
var n = t();
return ju(n[0], n[n.length - 1], r ?? 10)
}
,
e.tickFormat = function(r, n) {
var i = t();
return Pv(i[0], i[i.length - 1], r ?? 10, n)
}
,
e.nice = function(r) {
r == null && (r = 10);
var n = t(), i = 0, a = n.length - 1, o = n[i], u = n[a], c, l, f = 10;
for (u < o && (l = o,
o = u,
u = l,
l = i,
i = a,
a = l); f-- > 0; ) {
if (l = Eu(o, u, r),
l === c)
return n[i] = o,
n[a] = u,
t(n);
if (l > 0)
o = Math.floor(o / l) * l,
u = Math.ceil(u / l) * l;
else if (l < 0)
o = Math.ceil(o * l) / l,
u = Math.floor(u * l) / l;
else
break;
c = l
}
return e
}
,
e
}
function oa() {
var e = ol();
return e.copy = function() {
return mi(e, oa())
}
,
Je.apply(e, arguments),
qt(e)
}
function Av(e) {
var t;
function r(n) {
return n == null || isNaN(n = +n) ? t : n
}
return r.invert = r,
r.domain = r.range = function(n) {
return arguments.length ? (e = Array.from(n, ia),
r) : e.slice()
}
,
r.unknown = function(n) {
return arguments.length ? (t = n,
r) : t
}
,
r.copy = function() {
return Av(e).unknown(t)
}
,
e = arguments.length ? Array.from(e, ia) : [0, 1],
qt(r)
}
function _v(e, t) {
e = e.slice();
var r = 0, n = e.length - 1, i = e[r], a = e[n], o;
return a < i && (o = r,
r = n,
n = o,
o = i,
i = a,
a = o),
e[r] = t.floor(i),
e[n] = t.ceil(a),
e
}
function Rf(e) {
return Math.log(e)
}
function Ff(e) {
return Math.exp(e)
}
function rC(e) {
return -Math.log(-e)
}
function nC(e) {
return -Math.exp(-e)
}
function iC(e) {
return isFinite(e) ? +("1e" + e) : e < 0 ? 0 : e
}
function aC(e) {
return e === 10 ? iC : e === Math.E ? Math.exp : t => Math.pow(e, t)
}
function oC(e) {
return e === Math.E ? Math.log : e === 10 && Math.log10 || e === 2 && Math.log2 || (e = Math.log(e),
t => Math.log(t) / e)
}
function zf(e) {
return (t, r) => -e(-t, r)
}
function ll(e) {
const t = e(Rf, Ff)
, r = t.domain;
let n = 10, i, a;
function o() {
return i = oC(n),
a = aC(n),
r()[0] < 0 ? (i = zf(i),
a = zf(a),
e(rC, nC)) : e(Rf, Ff),
t
}
return t.base = function(u) {
return arguments.length ? (n = +u,
o()) : n
}
,
t.domain = function(u) {
return arguments.length ? (r(u),
o()) : r()
}
,
t.ticks = u => {
const c = r();
let l = c[0]
, f = c[c.length - 1];
const s = f < l;
s && ([l,f] = [f, l]);
let d = i(l), h = i(f), v, y;
const p = u == null ? 10 : +u;
let b = [];
if (!(n % 1) && h - d < p) {
if (d = Math.floor(d),
h = Math.ceil(h),
l > 0) {
for (; d <= h; ++d)
for (v = 1; v < n; ++v)
if (y = d < 0 ? v / a(-d) : v * a(d),
!(y < l)) {
if (y > f)
break;
b.push(y)
}
} else
for (; d <= h; ++d)
for (v = n - 1; v >= 1; --v)
if (y = d > 0 ? v / a(-d) : v * a(d),
!(y < l)) {
if (y > f)
break;
b.push(y)
}
b.length * 2 < p && (b = ju(l, f, p))
} else
b = ju(d, h, Math.min(h - d, p)).map(a);
return s ? b.reverse() : b
}
,
t.tickFormat = (u, c) => {
if (u == null && (u = 10),
c == null && (c = n === 10 ? "s" : ","),
typeof c != "function" && (!(n % 1) && (c = Fn(c)).precision == null && (c.trim = !0),
c = cl(c)),
u === 1 / 0)
return c;
const l = Math.max(1, n * u / t.ticks().length);
return f => {
let s = f / a(Math.round(i(f)));
return s * n < n - .5 && (s *= n),
s <= l ? c(f) : ""
}
}
,
t.nice = () => r(_v(r(), {
floor: u => a(Math.floor(i(u))),
ceil: u => a(Math.ceil(i(u)))
})),
t
}
function $v() {
const e = ll(oo()).domain([1, 10]);
return e.copy = () => mi(e, $v()).base(e.base()),
Je.apply(e, arguments),
e
}
function Wf(e) {
return function(t) {
return Math.sign(t) * Math.log1p(Math.abs(t / e))
}
}
function Uf(e) {
return function(t) {
return Math.sign(t) * Math.expm1(Math.abs(t)) * e
}
}
function sl(e) {
var t = 1
, r = e(Wf(t), Uf(t));
return r.constant = function(n) {
return arguments.length ? e(Wf(t = +n), Uf(t)) : t
}
,
qt(r)
}
function Tv() {
var e = sl(oo());
return e.copy = function() {
return mi(e, Tv()).constant(e.constant())
}
,
Je.apply(e, arguments)
}
function Hf(e) {
return function(t) {
return t < 0 ? -Math.pow(-t, e) : Math.pow(t, e)
}
}
function uC(e) {
return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e)
}
function cC(e) {
return e < 0 ? -e * e : e * e
}
function fl(e) {
var t = e(Be, Be)
, r = 1;
function n() {
return r === 1 ? e(Be, Be) : r === .5 ? e(uC, cC) : e(Hf(r), Hf(1 / r))
}
return t.exponent = function(i) {
return arguments.length ? (r = +i,
n()) : r
}
,
qt(t)
}
function dl() {
var e = fl(oo());
return e.copy = function() {
return mi(e, dl()).exponent(e.exponent())
}
,
Je.apply(e, arguments),
e
}
function lC() {
return dl.apply(null, arguments).exponent(.5)
}
function qf(e) {
return Math.sign(e) * e * e
}
function sC(e) {
return Math.sign(e) * Math.sqrt(Math.abs(e))
}
function jv() {
var e = ol(), t = [0, 1], r = !1, n;
function i(a) {
var o = sC(e(a));
return isNaN(o) ? n : r ? Math.round(o) : o
}
return i.invert = function(a) {
return e.invert(qf(a))
}
,
i.domain = function(a) {
return arguments.length ? (e.domain(a),
i) : e.domain()
}
,
i.range = function(a) {
return arguments.length ? (e.range((t = Array.from(a, ia)).map(qf)),
i) : t.slice()
}
,
i.rangeRound = function(a) {
return i.range(a).round(!0)
}
,
i.round = function(a) {
return arguments.length ? (r = !!a,
i) : r
}
,
i.clamp = function(a) {
return arguments.length ? (e.clamp(a),
i) : e.clamp()
}
,
i.unknown = function(a) {
return arguments.length ? (n = a,
i) : n
}
,
i.copy = function() {
return jv(e.domain(), t).round(r).clamp(e.clamp()).unknown(n)
}
,
Je.apply(i, arguments),
qt(i)
}
function Ev() {
var e = [], t = [], r = [], n;
function i() {
var o = 0
, u = Math.max(1, t.length);
for (r = new Array(u - 1); ++o < u; )
r[o - 1] = vM(e, o / u);
return a
}
function a(o) {
return o == null || isNaN(o = +o) ? n : t[yi(r, o)]
}
return a.invertExtent = function(o) {
var u = t.indexOf(o);
return u < 0 ? [NaN, NaN] : [u > 0 ? r[u - 1] : e[0], u < r.length ? r[u] : e[e.length - 1]]
}
,
a.domain = function(o) {
if (!arguments.length)
return e.slice();
e = [];
for (let u of o)
u != null && !isNaN(u = +u) && e.push(u);
return e.sort(zt),
i()
}
,
a.range = function(o) {
return arguments.length ? (t = Array.from(o),
i()) : t.slice()
}
,
a.unknown = function(o) {
return arguments.length ? (n = o,
a) : n
}
,
a.quantiles = function() {
return r.slice()
}
,
a.copy = function() {
return Ev().domain(e).range(t).unknown(n)
}
,
Je.apply(a, arguments)
}
function Mv() {
var e = 0, t = 1, r = 1, n = [.5], i = [0, 1], a;
function o(c) {
return c != null && c <= c ? i[yi(n, c, 0, r)] : a
}
function u() {
var c = -1;
for (n = new Array(r); ++c < r; )
n[c] = ((c + 1) * t - (c - r) * e) / (r + 1);
return o
}
return o.domain = function(c) {
return arguments.length ? ([e,t] = c,
e = +e,
t = +t,
u()) : [e, t]
}
,
o.range = function(c) {
return arguments.length ? (r = (i = Array.from(c)).length - 1,
u()) : i.slice()
}
,
o.invertExtent = function(c) {
var l = i.indexOf(c);
return l < 0 ? [NaN, NaN] : l < 1 ? [e, n[0]] : l >= r ? [n[r - 1], t] : [n[l - 1], n[l]]
}
,
o.unknown = function(c) {
return arguments.length && (a = c),
o
}
,
o.thresholds = function() {
return n.slice()
}
,
o.copy = function() {
return Mv().domain([e, t]).range(i).unknown(a)
}
,
Je.apply(qt(o), arguments)
}
function Cv() {
var e = [.5], t = [0, 1], r, n = 1;
function i(a) {
return a != null && a <= a ? t[yi(e, a, 0, n)] : r
}
return i.domain = function(a) {
return arguments.length ? (e = Array.from(a),
n = Math.min(e.length, t.length - 1),
i) : e.slice()
}
,
i.range = function(a) {
return arguments.length ? (t = Array.from(a),
n = Math.min(e.length, t.length - 1),
i) : t.slice()
}
,
i.invertExtent = function(a) {
var o = t.indexOf(a);
return [e[o - 1], e[o]]
}
,
i.unknown = function(a) {
return arguments.length ? (r = a,
i) : r
}
,
i.copy = function() {
return Cv().domain(e).range(t).unknown(r)
}
,
Je.apply(i, arguments)
}
const zo = new Date
, Wo = new Date;
function _e(e, t, r, n) {
function i(a) {
return e(a = arguments.length === 0 ? new Date : new Date(+a)),
a
}
return i.floor = a => (e(a = new Date(+a)),
a),
i.ceil = a => (e(a = new Date(a - 1)),
t(a, 1),
e(a),
a),
i.round = a => {
const o = i(a)
, u = i.ceil(a);
return a - o < u - a ? o : u
}
,
i.offset = (a, o) => (t(a = new Date(+a), o == null ? 1 : Math.floor(o)),
a),
i.range = (a, o, u) => {
const c = [];
if (a = i.ceil(a),
u = u == null ? 1 : Math.floor(u),
!(a < o) || !(u > 0))
return c;
let l;
do
c.push(l = new Date(+a)),
t(a, u),
e(a);
while (l < a && a < o);
return c
}
,
i.filter = a => _e(o => {
if (o >= o)
for (; e(o),
!a(o); )
o.setTime(o - 1)
}
, (o, u) => {
if (o >= o)
if (u < 0)
for (; ++u <= 0; )
for (; t(o, -1),
!a(o); )
;
else
for (; --u >= 0; )
for (; t(o, 1),
!a(o); )
;
}
),
r && (i.count = (a, o) => (zo.setTime(+a),
Wo.setTime(+o),
e(zo),
e(Wo),
Math.floor(r(zo, Wo))),
i.every = a => (a = Math.floor(a),
!isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(n ? o => n(o) % a === 0 : o => i.count(0, o) % a === 0) : i)),
i
}
const ua = _e( () => {}
, (e, t) => {
e.setTime(+e + t)
}
, (e, t) => t - e);
ua.every = e => (e = Math.floor(e),
!isFinite(e) || !(e > 0) ? null : e > 1 ? _e(t => {
t.setTime(Math.floor(t / e) * e)
}
, (t, r) => {
t.setTime(+t + r * e)
}
, (t, r) => (r - t) / e) : ua);
ua.range;
const bt = 1e3
, Ye = bt * 60
, xt = Ye * 60
, _t = xt * 24
, hl = _t * 7
, Kf = _t * 30
, Uo = _t * 365
, rr = _e(e => {
e.setTime(e - e.getMilliseconds())
}
, (e, t) => {
e.setTime(+e + t * bt)
}
, (e, t) => (t - e) / bt, e => e.getUTCSeconds());
rr.range;
const pl = _e(e => {
e.setTime(e - e.getMilliseconds() - e.getSeconds() * bt)
}
, (e, t) => {
e.setTime(+e + t * Ye)
}
, (e, t) => (t - e) / Ye, e => e.getMinutes());
pl.range;
const vl = _e(e => {
e.setUTCSeconds(0, 0)
}
, (e, t) => {
e.setTime(+e + t * Ye)
}
, (e, t) => (t - e) / Ye, e => e.getUTCMinutes());
vl.range;
const yl = _e(e => {
e.setTime(e - e.getMilliseconds() - e.getSeconds() * bt - e.getMinutes() * Ye)
}
, (e, t) => {
e.setTime(+e + t * xt)
}
, (e, t) => (t - e) / xt, e => e.getHours());
yl.range;
const gl = _e(e => {
e.setUTCMinutes(0, 0, 0)
}
, (e, t) => {
e.setTime(+e + t * xt)
}
, (e, t) => (t - e) / xt, e => e.getUTCHours());
gl.range;
const bi = _e(e => e.setHours(0, 0, 0, 0), (e, t) => e.setDate(e.getDate() + t), (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * Ye) / _t, e => e.getDate() - 1);
bi.range;
const uo = _e(e => {
e.setUTCHours(0, 0, 0, 0)
}
, (e, t) => {
e.setUTCDate(e.getUTCDate() + t)
}
, (e, t) => (t - e) / _t, e => e.getUTCDate() - 1);
uo.range;
const Iv = _e(e => {
e.setUTCHours(0, 0, 0, 0)
}
, (e, t) => {
e.setUTCDate(e.getUTCDate() + t)
}
, (e, t) => (t - e) / _t, e => Math.floor(e / _t));
Iv.range;
function hr(e) {
return _e(t => {
t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7),
t.setHours(0, 0, 0, 0)
}
, (t, r) => {
t.setDate(t.getDate() + r * 7)
}
, (t, r) => (r - t - (r.getTimezoneOffset() - t.getTimezoneOffset()) * Ye) / hl)
}
const co = hr(0)
, ca = hr(1)
, fC = hr(2)
, dC = hr(3)
, kr = hr(4)
, hC = hr(5)
, pC = hr(6);
co.range;
ca.range;
fC.range;
dC.range;
kr.range;
hC.range;
pC.range;
function pr(e) {
return _e(t => {
t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7),
t.setUTCHours(0, 0, 0, 0)
}
, (t, r) => {
t.setUTCDate(t.getUTCDate() + r * 7)
}
, (t, r) => (r - t) / hl)
}
const lo = pr(0)
, la = pr(1)
, vC = pr(2)
, yC = pr(3)
, Dr = pr(4)
, gC = pr(5)
, mC = pr(6);
lo.range;
la.range;
vC.range;
yC.range;
Dr.range;
gC.range;
mC.range;
const ml = _e(e => {
e.setDate(1),
e.setHours(0, 0, 0, 0)
}
, (e, t) => {
e.setMonth(e.getMonth() + t)
}
, (e, t) => t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12, e => e.getMonth());
ml.range;
const bl = _e(e => {
e.setUTCDate(1),
e.setUTCHours(0, 0, 0, 0)
}
, (e, t) => {
e.setUTCMonth(e.getUTCMonth() + t)
}
, (e, t) => t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12, e => e.getUTCMonth());
bl.range;
const $t = _e(e => {
e.setMonth(0, 1),
e.setHours(0, 0, 0, 0)
}
, (e, t) => {
e.setFullYear(e.getFullYear() + t)
}
, (e, t) => t.getFullYear() - e.getFullYear(), e => e.getFullYear());
$t.every = e => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : _e(t => {
t.setFullYear(Math.floor(t.getFullYear() / e) * e),
t.setMonth(0, 1),
t.setHours(0, 0, 0, 0)
}
, (t, r) => {
t.setFullYear(t.getFullYear() + r * e)
}
);
$t.range;
const Tt = _e(e => {
e.setUTCMonth(0, 1),
e.setUTCHours(0, 0, 0, 0)
}
, (e, t) => {
e.setUTCFullYear(e.getUTCFullYear() + t)
}
, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), e => e.getUTCFullYear());
Tt.every = e => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : _e(t => {
t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e),
t.setUTCMonth(0, 1),
t.setUTCHours(0, 0, 0, 0)
}
, (t, r) => {
t.setUTCFullYear(t.getUTCFullYear() + r * e)
}
);
Tt.range;
function kv(e, t, r, n, i, a) {
const o = [[rr, 1, bt], [rr, 5, 5 * bt], [rr, 15, 15 * bt], [rr, 30, 30 * bt], [a, 1, Ye], [a, 5, 5 * Ye], [a, 15, 15 * Ye], [a, 30, 30 * Ye], [i, 1, xt], [i, 3, 3 * xt], [i, 6, 6 * xt], [i, 12, 12 * xt], [n, 1, _t], [n, 2, 2 * _t], [r, 1, hl], [t, 1, Kf], [t, 3, 3 * Kf], [e, 1, Uo]];
function u(l, f, s) {
const d = f < l;
d && ([l,f] = [f, l]);
const h = s && typeof s.range == "function" ? s : c(l, f, s)
, v = h ? h.range(l, +f + 1) : [];
return d ? v.reverse() : v
}
function c(l, f, s) {
const d = Math.abs(f - l) / s
, h = tl( ([,,p]) => p).right(o, d);
if (h === o.length)
return e.every(Mu(l / Uo, f / Uo, s));
if (h === 0)
return ua.every(Math.max(Mu(l, f, s), 1));
const [v,y] = o[d / o[h - 1][2] < o[h][2] / d ? h - 1 : h];
return v.every(y)
}
return [u, c]
}
const [bC,xC] = kv(Tt, bl, lo, Iv, gl, vl)
, [wC,OC] = kv($t, ml, co, bi, yl, pl);
function Ho(e) {
if (0 <= e.y && e.y < 100) {
var t = new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);
return t.setFullYear(e.y),
t
}
return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)
}
function qo(e) {
if (0 <= e.y && e.y < 100) {
var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
return t.setUTCFullYear(e.y),
t
}
return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L))
}
function vn(e, t, r) {
return {
y: e,
m: t,
d: r,
H: 0,
M: 0,
S: 0,
L: 0
}
}
function SC(e) {
var t = e.dateTime
, r = e.date
, n = e.time
, i = e.periods
, a = e.days
, o = e.shortDays
, u = e.months
, c = e.shortMonths
, l = yn(i)
, f = gn(i)
, s = yn(a)
, d = gn(a)
, h = yn(o)
, v = gn(o)
, y = yn(u)
, p = gn(u)
, b = yn(c)
, w = gn(c)
, x = {
a: B,
A: F,
b: z,
B: q,
c: null,
d: Jf,
e: Jf,
f: KC,
g: rI,
G: iI,
H: UC,
I: HC,
j: qC,
L: Dv,
m: GC,
M: YC,
p: G,
q: U,
Q: td,
s: rd,
S: VC,
u: XC,
U: ZC,
V: JC,
w: QC,
W: eI,
x: null,
X: null,
y: tI,
Y: nI,
Z: aI,
"%": ed
}
, O = {
a: K,
A: ae,
b: ge,
B: je,
c: null,
d: Qf,
e: Qf,
f: lI,
g: bI,
G: wI,
H: oI,
I: uI,
j: cI,
L: Bv,
m: sI,
M: fI,
p: pt,
q: be,
Q: td,
s: rd,
S: dI,
u: hI,
U: pI,
V: vI,
w: yI,
W: gI,
x: null,
X: null,
y: mI,
Y: xI,
Z: OI,
"%": ed
}
, g = {
a: j,
A: $,
b: T,
B: C,
c: k,
d: Xf,
e: Xf,
f: RC,
g: Vf,
G: Yf,
H: Zf,
I: Zf,
j: DC,
L: LC,
m: kC,
M: NC,
p: _,
q: IC,
Q: zC,
s: WC,
S: BC,
u: TC,
U: jC,
V: EC,
w: $C,
W: MC,
x: M,
X: D,
y: Vf,
Y: Yf,
Z: CC,
"%": FC
};
x.x = m(r, x),
x.X = m(n, x),
x.c = m(t, x),
O.x = m(r, O),
O.X = m(n, O),
O.c = m(t, O);
function m(W, V) {
return function(X) {
var N = [], he = -1, ee = 0, xe = W.length, pe, Ee, Qe;
for (X instanceof Date || (X = new Date(+X)); ++he < xe; )
W.charCodeAt(he) === 37 && (N.push(W.slice(ee, he)),
(Ee = Gf[pe = W.charAt(++he)]) != null ? pe = W.charAt(++he) : Ee = pe === "e" ? " " : "0",
(Qe = V[pe]) && (pe = Qe(X, Ee)),
N.push(pe),
ee = he + 1);
return N.push(W.slice(ee, he)),
N.join("")
}
}
function S(W, V) {
return function(X) {
var N = vn(1900, void 0, 1), he = P(N, W, X += "", 0), ee, xe;
if (he != X.length)
return null;
if ("Q"in N)
return new Date(N.Q);
if ("s"in N)
return new Date(N.s * 1e3 + ("L"in N ? N.L : 0));
if (V && !("Z"in N) && (N.Z = 0),
"p"in N && (N.H = N.H % 12 + N.p * 12),
N.m === void 0 && (N.m = "q"in N ? N.q : 0),
"V"in N) {
if (N.V < 1 || N.V > 53)
return null;
"w"in N || (N.w = 1),
"Z"in N ? (ee = qo(vn(N.y, 0, 1)),
xe = ee.getUTCDay(),
ee = xe > 4 || xe === 0 ? la.ceil(ee) : la(ee),
ee = uo.offset(ee, (N.V - 1) * 7),
N.y = ee.getUTCFullYear(),
N.m = ee.getUTCMonth(),
N.d = ee.getUTCDate() + (N.w + 6) % 7) : (ee = Ho(vn(N.y, 0, 1)),
xe = ee.getDay(),
ee = xe > 4 || xe === 0 ? ca.ceil(ee) : ca(ee),
ee = bi.offset(ee, (N.V - 1) * 7),
N.y = ee.getFullYear(),
N.m = ee.getMonth(),
N.d = ee.getDate() + (N.w + 6) % 7)
} else
("W"in N || "U"in N) && ("w"in N || (N.w = "u"in N ? N.u % 7 : "W"in N ? 1 : 0),
xe = "Z"in N ? qo(vn(N.y, 0, 1)).getUTCDay() : Ho(vn(N.y, 0, 1)).getDay(),
N.m = 0,
N.d = "W"in N ? (N.w + 6) % 7 + N.W * 7 - (xe + 5) % 7 : N.w + N.U * 7 - (xe + 6) % 7);
return "Z"in N ? (N.H += N.Z / 100 | 0,
N.M += N.Z % 100,
qo(N)) : Ho(N)
}
}
function P(W, V, X, N) {
for (var he = 0, ee = V.length, xe = X.length, pe, Ee; he < ee; ) {
if (N >= xe)
return -1;
if (pe = V.charCodeAt(he++),
pe === 37) {
if (pe = V.charAt(he++),
Ee = g[pe in Gf ? V.charAt(he++) : pe],
!Ee || (N = Ee(W, X, N)) < 0)
return -1
} else if (pe != X.charCodeAt(N++))
return -1
}
return N
}
function _(W, V, X) {
var N = l.exec(V.slice(X));
return N ? (W.p = f.get(N[0].toLowerCase()),
X + N[0].length) : -1
}
function j(W, V, X) {
var N = h.exec(V.slice(X));
return N ? (W.w = v.get(N[0].toLowerCase()),
X + N[0].length) : -1
}
function $(W, V, X) {
var N = s.exec(V.slice(X));
return N ? (W.w = d.get(N[0].toLowerCase()),
X + N[0].length) : -1
}
function T(W, V, X) {
var N = b.exec(V.slice(X));
return N ? (W.m = w.get(N[0].toLowerCase()),
X + N[0].length) : -1
}
function C(W, V, X) {
var N = y.exec(V.slice(X));
return N ? (W.m = p.get(N[0].toLowerCase()),
X + N[0].length) : -1
}
function k(W, V, X) {
return P(W, t, V, X)
}
function M(W, V, X) {
return P(W, r, V, X)
}
function D(W, V, X) {
return P(W, n, V, X)
}
function B(W) {
return o[W.getDay()]
}
function F(W) {
return a[W.getDay()]
}
function z(W) {
return c[W.getMonth()]
}
function q(W) {
return u[W.getMonth()]
}
function G(W) {
return i[+(W.getHours() >= 12)]
}
function U(W) {
return 1 + ~~(W.getMonth() / 3)
}
function K(W) {
return o[W.getUTCDay()]
}
function ae(W) {
return a[W.getUTCDay()]
}
function ge(W) {
return c[W.getUTCMonth()]
}
function je(W) {
return u[W.getUTCMonth()]
}
function pt(W) {
return i[+(W.getUTCHours() >= 12)]
}
function be(W) {
return 1 + ~~(W.getUTCMonth() / 3)
}
return {
format: function(W) {
var V = m(W += "", x);
return V.toString = function() {
return W
}
,
V
},
parse: function(W) {
var V = S(W += "", !1);
return V.toString = function() {
return W
}
,
V
},
utcFormat: function(W) {
var V = m(W += "", O);
return V.toString = function() {
return W
}
,
V
},
utcParse: function(W) {
var V = S(W += "", !0);
return V.toString = function() {
return W
}
,
V
}
}
}
var Gf = {
"-": "",
_: " ",
0: "0"
}
, Te = /^\s*\d+/
, PC = /^%/
, AC = /[\\^$*+?|[\]().{}]/g;
function ne(e, t, r) {
var n = e < 0 ? "-" : ""
, i = (n ? -e : e) + ""
, a = i.length;
return n + (a < r ? new Array(r - a + 1).join(t) + i : i)
}
function _C(e) {
return e.replace(AC, "\\$&")
}
function yn(e) {
return new RegExp("^(?:" + e.map(_C).join("|") + ")","i")
}
function gn(e) {
return new Map(e.map( (t, r) => [t.toLowerCase(), r]))
}
function $C(e, t, r) {
var n = Te.exec(t.slice(r, r + 1));
return n ? (e.w = +n[0],
r + n[0].length) : -1
}
function TC(e, t, r) {
var n = Te.exec(t.slice(r, r + 1));
return n ? (e.u = +n[0],
r + n[0].length) : -1
}
function jC(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.U = +n[0],
r + n[0].length) : -1
}
function EC(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.V = +n[0],
r + n[0].length) : -1
}
function MC(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.W = +n[0],
r + n[0].length) : -1
}
function Yf(e, t, r) {
var n = Te.exec(t.slice(r, r + 4));
return n ? (e.y = +n[0],
r + n[0].length) : -1
}
function Vf(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3),
r + n[0].length) : -1
}
function CC(e, t, r) {
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r, r + 6));
return n ? (e.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")),
r + n[0].length) : -1
}
function IC(e, t, r) {
var n = Te.exec(t.slice(r, r + 1));
return n ? (e.q = n[0] * 3 - 3,
r + n[0].length) : -1
}
function kC(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.m = n[0] - 1,
r + n[0].length) : -1
}
function Xf(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.d = +n[0],
r + n[0].length) : -1
}
function DC(e, t, r) {
var n = Te.exec(t.slice(r, r + 3));
return n ? (e.m = 0,
e.d = +n[0],
r + n[0].length) : -1
}
function Zf(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.H = +n[0],
r + n[0].length) : -1
}
function NC(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.M = +n[0],
r + n[0].length) : -1
}
function BC(e, t, r) {
var n = Te.exec(t.slice(r, r + 2));
return n ? (e.S = +n[0],
r + n[0].length) : -1
}
function LC(e, t, r) {
var n = Te.exec(t.slice(r, r + 3));
return n ? (e.L = +n[0],
r + n[0].length) : -1
}
function RC(e, t, r) {
var n = Te.exec(t.slice(r, r + 6));
return n ? (e.L = Math.floor(n[0] / 1e3),
r + n[0].length) : -1
}
function FC(e, t, r) {
var n = PC.exec(t.slice(r, r + 1));
return n ? r + n[0].length : -1
}
function zC(e, t, r) {
var n = Te.exec(t.slice(r));
return n ? (e.Q = +n[0],
r + n[0].length) : -1
}
function WC(e, t, r) {
var n = Te.exec(t.slice(r));
return n ? (e.s = +n[0],
r + n[0].length) : -1
}
function Jf(e, t) {
return ne(e.getDate(), t, 2)
}
function UC(e, t) {
return ne(e.getHours(), t, 2)
}
function HC(e, t) {
return ne(e.getHours() % 12 || 12, t, 2)
}
function qC(e, t) {
return ne(1 + bi.count($t(e), e), t, 3)
}
function Dv(e, t) {
return ne(e.getMilliseconds(), t, 3)
}
function KC(e, t) {
return Dv(e, t) + "000"
}
function GC(e, t) {
return ne(e.getMonth() + 1, t, 2)
}
function YC(e, t) {
return ne(e.getMinutes(), t, 2)
}
function VC(e, t) {
return ne(e.getSeconds(), t, 2)
}
function XC(e) {
var t = e.getDay();
return t === 0 ? 7 : t
}
function ZC(e, t) {
return ne(co.count($t(e) - 1, e), t, 2)
}
function Nv(e) {
var t = e.getDay();
return t >= 4 || t === 0 ? kr(e) : kr.ceil(e)
}
function JC(e, t) {
return e = Nv(e),
ne(kr.count($t(e), e) + ($t(e).getDay() === 4), t, 2)
}
function QC(e) {
return e.getDay()
}
function eI(e, t) {
return ne(ca.count($t(e) - 1, e), t, 2)
}
function tI(e, t) {
return ne(e.getFullYear() % 100, t, 2)
}
function rI(e, t) {
return e = Nv(e),
ne(e.getFullYear() % 100, t, 2)
}
function nI(e, t) {
return ne(e.getFullYear() % 1e4, t, 4)
}
function iI(e, t) {
var r = e.getDay();
return e = r >= 4 || r === 0 ? kr(e) : kr.ceil(e),
ne(e.getFullYear() % 1e4, t, 4)
}
function aI(e) {
var t = e.getTimezoneOffset();
return (t > 0 ? "-" : (t *= -1,
"+")) + ne(t / 60 | 0, "0", 2) + ne(t % 60, "0", 2)
}
function Qf(e, t) {
return ne(e.getUTCDate(), t, 2)
}
function oI(e, t) {
return ne(e.getUTCHours(), t, 2)
}
function uI(e, t) {
return ne(e.getUTCHours() % 12 || 12, t, 2)
}
function cI(e, t) {
return ne(1 + uo.count(Tt(e), e), t, 3)
}
function Bv(e, t) {
return ne(e.getUTCMilliseconds(), t, 3)
}
function lI(e, t) {
return Bv(e, t) + "000"
}
function sI(e, t) {
return ne(e.getUTCMonth() + 1, t, 2)
}
function fI(e, t) {
return ne(e.getUTCMinutes(), t, 2)
}
function dI(e, t) {
return ne(e.getUTCSeconds(), t, 2)
}
function hI(e) {
var t = e.getUTCDay();
return t === 0 ? 7 : t
}
function pI(e, t) {
return ne(lo.count(Tt(e) - 1, e), t, 2)
}
function Lv(e) {
var t = e.getUTCDay();
return t >= 4 || t === 0 ? Dr(e) : Dr.ceil(e)
}
function vI(e, t) {
return e = Lv(e),
ne(Dr.count(Tt(e), e) + (Tt(e).getUTCDay() === 4), t, 2)
}
function yI(e) {
return e.getUTCDay()
}
function gI(e, t) {
return ne(la.count(Tt(e) - 1, e), t, 2)
}
function mI(e, t) {
return ne(e.getUTCFullYear() % 100, t, 2)
}
function bI(e, t) {
return e = Lv(e),
ne(e.getUTCFullYear() % 100, t, 2)
}
function xI(e, t) {
return ne(e.getUTCFullYear() % 1e4, t, 4)
}
function wI(e, t) {
var r = e.getUTCDay();
return e = r >= 4 || r === 0 ? Dr(e) : Dr.ceil(e),
ne(e.getUTCFullYear() % 1e4, t, 4)
}
function OI() {
return "+0000"
}
function ed() {
return "%"
}
function td(e) {
return +e
}
function rd(e) {
return Math.floor(+e / 1e3)
}
var br, Rv, Fv;
SI({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function SI(e) {
return br = SC(e),
Rv = br.format,
br.parse,
Fv = br.utcFormat,
br.utcParse,
br
}
function PI(e) {
return new Date(e)
}
function AI(e) {
return e instanceof Date ? +e : +new Date(+e)
}
function xl(e, t, r, n, i, a, o, u, c, l) {
var f = ol()
, s = f.invert
, d = f.domain
, h = l(".%L")
, v = l(":%S")
, y = l("%I:%M")
, p = l("%I %p")
, b = l("%a %d")
, w = l("%b %d")
, x = l("%B")
, O = l("%Y");
function g(m) {
return (c(m) < m ? h : u(m) < m ? v : o(m) < m ? y : a(m) < m ? p : n(m) < m ? i(m) < m ? b : w : r(m) < m ? x : O)(m)
}
return f.invert = function(m) {
return new Date(s(m))
}
,
f.domain = function(m) {
return arguments.length ? d(Array.from(m, AI)) : d().map(PI)
}
,
f.ticks = function(m) {
var S = d();
return e(S[0], S[S.length - 1], m ?? 10)
}
,
f.tickFormat = function(m, S) {
return S == null ? g : l(S)
}
,
f.nice = function(m) {
var S = d();
return (!m || typeof m.range != "function") && (m = t(S[0], S[S.length - 1], m ?? 10)),
m ? d(_v(S, m)) : f
}
,
f.copy = function() {
return mi(f, xl(e, t, r, n, i, a, o, u, c, l))
}
,
f
}
function _I() {
return Je.apply(xl(wC, OC, $t, ml, co, bi, yl, pl, rr, Rv).domain([new Date(2e3,0,1), new Date(2e3,0,2)]), arguments)
}
function $I() {
return Je.apply(xl(bC, xC, Tt, bl, lo, uo, gl, vl, rr, Fv).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments)
}
function so() {
var e = 0, t = 1, r, n, i, a, o = Be, u = !1, c;
function l(s) {
return s == null || isNaN(s = +s) ? c : o(i === 0 ? .5 : (s = (a(s) - r) * i,
u ? Math.max(0, Math.min(1, s)) : s))
}
l.domain = function(s) {
return arguments.length ? ([e,t] = s,
r = a(e = +e),
n = a(t = +t),
i = r === n ? 0 : 1 / (n - r),
l) : [e, t]
}
,
l.clamp = function(s) {
return arguments.length ? (u = !!s,
l) : u
}
,
l.interpolator = function(s) {
return arguments.length ? (o = s,
l) : o
}
;
function f(s) {
return function(d) {
var h, v;
return arguments.length ? ([h,v] = d,
o = s(h, v),
l) : [o(0), o(1)]
}
}
return l.range = f(on),
l.rangeRound = f(al),
l.unknown = function(s) {
return arguments.length ? (c = s,
l) : c
}
,
function(s) {
return a = s,
r = s(e),
n = s(t),
i = r === n ? 0 : 1 / (n - r),
l
}
}
function Kt(e, t) {
return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())
}
function zv() {
var e = qt(so()(Be));
return e.copy = function() {
return Kt(e, zv())
}
,
It.apply(e, arguments)
}
function Wv() {
var e = ll(so()).domain([1, 10]);
return e.copy = function() {
return Kt(e, Wv()).base(e.base())
}
,
It.apply(e, arguments)
}
function Uv() {
var e = sl(so());
return e.copy = function() {
return Kt(e, Uv()).constant(e.constant())
}
,
It.apply(e, arguments)
}
function wl() {
var e = fl(so());
return e.copy = function() {
return Kt(e, wl()).exponent(e.exponent())
}
,
It.apply(e, arguments)
}
function TI() {
return wl.apply(null, arguments).exponent(.5)
}
function Hv() {
var e = []
, t = Be;
function r(n) {
if (n != null && !isNaN(n = +n))
return t((yi(e, n, 1) - 1) / (e.length - 1))
}
return r.domain = function(n) {
if (!arguments.length)
return e.slice();
e = [];
for (let i of n)
i != null && !isNaN(i = +i) && e.push(i);
return e.sort(zt),
r
}
,
r.interpolator = function(n) {
return arguments.length ? (t = n,
r) : t
}
,
r.range = function() {
return e.map( (n, i) => t(i / (e.length - 1)))
}
,
r.quantiles = function(n) {
return Array.from({
length: n + 1
}, (i, a) => pM(e, a / n))
}
,
r.copy = function() {
return Hv(t).domain(e)
}
,
It.apply(r, arguments)
}
function fo() {
var e = 0, t = .5, r = 1, n = 1, i, a, o, u, c, l = Be, f, s = !1, d;
function h(y) {
return isNaN(y = +y) ? d : (y = .5 + ((y = +f(y)) - a) * (n * y < n * a ? u : c),
l(s ? Math.max(0, Math.min(1, y)) : y))
}
h.domain = function(y) {
return arguments.length ? ([e,t,r] = y,
i = f(e = +e),
a = f(t = +t),
o = f(r = +r),
u = i === a ? 0 : .5 / (a - i),
c = a === o ? 0 : .5 / (o - a),
n = a < i ? -1 : 1,
h) : [e, t, r]
}
,
h.clamp = function(y) {
return arguments.length ? (s = !!y,
h) : s
}
,
h.interpolator = function(y) {
return arguments.length ? (l = y,
h) : l
}
;
function v(y) {
return function(p) {
var b, w, x;
return arguments.length ? ([b,w,x] = p,
l = FM(y, [b, w, x]),
h) : [l(0), l(.5), l(1)]
}
}
return h.range = v(on),
h.rangeRound = v(al),
h.unknown = function(y) {
return arguments.length ? (d = y,
h) : d
}
,
function(y) {
return f = y,
i = y(e),
a = y(t),
o = y(r),
u = i === a ? 0 : .5 / (a - i),
c = a === o ? 0 : .5 / (o - a),
n = a < i ? -1 : 1,
h
}
}
function qv() {
var e = qt(fo()(Be));
return e.copy = function() {
return Kt(e, qv())
}
,
It.apply(e, arguments)
}
function Kv() {
var e = ll(fo()).domain([.1, 1, 10]);
return e.copy = function() {
return Kt(e, Kv()).base(e.base())
}
,
It.apply(e, arguments)
}
function Gv() {
var e = sl(fo());
return e.copy = function() {
return Kt(e, Gv()).constant(e.constant())
}
,
It.apply(e, arguments)
}
function Ol() {
var e = fl(fo());
return e.copy = function() {
return Kt(e, Ol()).exponent(e.exponent())
}
,
It.apply(e, arguments)
}
function jI() {
return Ol.apply(null, arguments).exponent(.5)
}
const nd = Object.freeze(Object.defineProperty({
__proto__: null,
scaleBand: Nn,
scaleDiverging: qv,
scaleDivergingLog: Kv,
scaleDivergingPow: Ol,
scaleDivergingSqrt: jI,
scaleDivergingSymlog: Gv,
scaleIdentity: Av,
scaleImplicit: Cu,
scaleLinear: oa,
scaleLog: $v,
scaleOrdinal: rl,
scalePoint: Pn,
scalePow: dl,
scaleQuantile: Ev,
scaleQuantize: Mv,
scaleRadial: jv,
scaleSequential: zv,
scaleSequentialLog: Wv,
scaleSequentialPow: wl,
scaleSequentialQuantile: Hv,
scaleSequentialSqrt: TI,
scaleSequentialSymlog: Uv,
scaleSqrt: lC,
scaleSymlog: Tv,
scaleThreshold: Cv,
scaleTime: _I,
scaleUtc: $I,
tickFormat: Pv
}, Symbol.toStringTag, {
value: "Module"
}));
var EI = Xr;
function MI(e, t, r) {
for (var n = -1, i = e.length; ++n < i; ) {
var a = e[n]
, o = t(a);
if (o != null && (u === void 0 ? o === o && !EI(o) : r(o, u)))
var u = o
, c = a
}
return c
}
var Yv = MI;
function CI(e, t) {
return e > t
}
var II = CI
, kI = Yv
, DI = II
, NI = an;
function BI(e) {
return e && e.length ? kI(e, NI, DI) : void 0
}
var LI = BI;
const Lt = de(LI);
function RI(e, t) {
return e < t
}
var FI = RI
, zI = Yv
, WI = FI
, UI = an;
function HI(e) {
return e && e.length ? zI(e, UI, WI) : void 0
}
var qI = HI;
const ho = de(qI);
var KI = Nc
, GI = Ht
, YI = rv
, VI = Re;
function XI(e, t) {
var r = VI(e) ? KI : YI;
return r(e, GI(t))
}
var ZI = XI
, JI = ev
, QI = ZI;
function e2(e, t) {
return JI(QI(e, t), 1)
}
var t2 = e2;
const r2 = de(t2);
var n2 = Zc;
function i2(e, t) {
return n2(e, t)
}
var a2 = i2;
const zn = de(a2);
var un = 1e9, o2 = {
precision: 20,
rounding: 4,
toExpNeg: -7,
toExpPos: 21,
LN10: "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"
}, Pl, ve = !0, Xe = "[DecimalError] ", ur = Xe + "Invalid argument: ", Sl = Xe + "Exponent out of range: ", cn = Math.floor, Jt = Math.pow, u2 = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, We, $e = 1e7, fe = 7, Vv = 9007199254740991, sa = cn(Vv / fe), H = {};
H.absoluteValue = H.abs = function() {
var e = new this.constructor(this);
return e.s && (e.s = 1),
e
}
;
H.comparedTo = H.cmp = function(e) {
var t, r, n, i, a = this;
if (e = new a.constructor(e),
a.s !== e.s)
return a.s || -e.s;
if (a.e !== e.e)
return a.e > e.e ^ a.s < 0 ? 1 : -1;
for (n = a.d.length,
i = e.d.length,
t = 0,
r = n < i ? n : i; t < r; ++t)
if (a.d[t] !== e.d[t])
return a.d[t] > e.d[t] ^ a.s < 0 ? 1 : -1;
return n === i ? 0 : n > i ^ a.s < 0 ? 1 : -1
}
;
H.decimalPlaces = H.dp = function() {
var e = this
, t = e.d.length - 1
, r = (t - e.e) * fe;
if (t = e.d[t],
t)
for (; t % 10 == 0; t /= 10)
r--;
return r < 0 ? 0 : r
}
;
H.dividedBy = H.div = function(e) {
return At(this, new this.constructor(e))
}
;
H.dividedToIntegerBy = H.idiv = function(e) {
var t = this
, r = t.constructor;
return ce(At(t, new r(e), 0, 1), r.precision)
}
;
H.equals = H.eq = function(e) {
return !this.cmp(e)
}
;
H.exponent = function() {
return Oe(this)
}
;
H.greaterThan = H.gt = function(e) {
return this.cmp(e) > 0
}
;
H.greaterThanOrEqualTo = H.gte = function(e) {
return this.cmp(e) >= 0
}
;
H.isInteger = H.isint = function() {
return this.e > this.d.length - 2
}
;
H.isNegative = H.isneg = function() {
return this.s < 0
}
;
H.isPositive = H.ispos = function() {
return this.s > 0
}
;
H.isZero = function() {
return this.s === 0
}
;
H.lessThan = H.lt = function(e) {
return this.cmp(e) < 0
}
;
H.lessThanOrEqualTo = H.lte = function(e) {
return this.cmp(e) < 1
}
;
H.logarithm = H.log = function(e) {
var t, r = this, n = r.constructor, i = n.precision, a = i + 5;
if (e === void 0)
e = new n(10);
else if (e = new n(e),
e.s < 1 || e.eq(We))
throw Error(Xe + "NaN");
if (r.s < 1)
throw Error(Xe + (r.s ? "NaN" : "-Infinity"));
return r.eq(We) ? new n(0) : (ve = !1,
t = At(Wn(r, a), Wn(e, a), a),
ve = !0,
ce(t, i))
}
;
H.minus = H.sub = function(e) {
var t = this;
return e = new t.constructor(e),
t.s == e.s ? Jv(t, e) : Xv(t, (e.s = -e.s,
e))
}
;
H.modulo = H.mod = function(e) {
var t, r = this, n = r.constructor, i = n.precision;
if (e = new n(e),
!e.s)
throw Error(Xe + "NaN");
return r.s ? (ve = !1,
t = At(r, e, 0, 1).times(e),
ve = !0,
r.minus(t)) : ce(new n(r), i)
}
;
H.naturalExponential = H.exp = function() {
return Zv(this)
}
;
H.naturalLogarithm = H.ln = function() {
return Wn(this)
}
;
H.negated = H.neg = function() {
var e = new this.constructor(this);
return e.s = -e.s || 0,
e
}
;
H.plus = H.add = function(e) {
var t = this;
return e = new t.constructor(e),
t.s == e.s ? Xv(t, e) : Jv(t, (e.s = -e.s,
e))
}
;
H.precision = H.sd = function(e) {
var t, r, n, i = this;
if (e !== void 0 && e !== !!e && e !== 1 && e !== 0)
throw Error(ur + e);
if (t = Oe(i) + 1,
n = i.d.length - 1,
r = n * fe + 1,
n = i.d[n],
n) {
for (; n % 10 == 0; n /= 10)
r--;
for (n = i.d[0]; n >= 10; n /= 10)
r++
}
return e && t > r ? t : r
}
;
H.squareRoot = H.sqrt = function() {
var e, t, r, n, i, a, o, u = this, c = u.constructor;
if (u.s < 1) {
if (!u.s)
return new c(0);
throw Error(Xe + "NaN")
}
for (e = Oe(u),
ve = !1,
i = Math.sqrt(+u),
i == 0 || i == 1 / 0 ? (t = ct(u.d),
(t.length + e) % 2 == 0 && (t += "0"),
i = Math.sqrt(t),
e = cn((e + 1) / 2) - (e < 0 || e % 2),
i == 1 / 0 ? t = "5e" + e : (t = i.toExponential(),
t = t.slice(0, t.indexOf("e") + 1) + e),
n = new c(t)) : n = new c(i.toString()),
r = c.precision,
i = o = r + 3; ; )
if (a = n,
n = a.plus(At(u, a, o + 2)).times(.5),
ct(a.d).slice(0, o) === (t = ct(n.d)).slice(0, o)) {
if (t = t.slice(o - 3, o + 1),
i == o && t == "4999") {
if (ce(a, r + 1, 0),
a.times(a).eq(u)) {
n = a;
break
}
} else if (t != "9999")
break;
o += 4
}
return ve = !0,
ce(n, r)
}
;
H.times = H.mul = function(e) {
var t, r, n, i, a, o, u, c, l, f = this, s = f.constructor, d = f.d, h = (e = new s(e)).d;
if (!f.s || !e.s)
return new s(0);
for (e.s *= f.s,
r = f.e + e.e,
c = d.length,
l = h.length,
c < l && (a = d,
d = h,
h = a,
o = c,
c = l,
l = o),
a = [],
o = c + l,
n = o; n--; )
a.push(0);
for (n = l; --n >= 0; ) {
for (t = 0,
i = c + n; i > n; )
u = a[i] + h[n] * d[i - n - 1] + t,
a[i--] = u % $e | 0,
t = u / $e | 0;
a[i] = (a[i] + t) % $e | 0
}
for (; !a[--o]; )
a.pop();
return t ? ++r : a.shift(),
e.d = a,
e.e = r,
ve ? ce(e, s.precision) : e
}
;
H.toDecimalPlaces = H.todp = function(e, t) {
var r = this
, n = r.constructor;
return r = new n(r),
e === void 0 ? r : (dt(e, 0, un),
t === void 0 ? t = n.rounding : dt(t, 0, 8),
ce(r, e + Oe(r) + 1, t))
}
;
H.toExponential = function(e, t) {
var r, n = this, i = n.constructor;
return e === void 0 ? r = sr(n, !0) : (dt(e, 0, un),
t === void 0 ? t = i.rounding : dt(t, 0, 8),
n = ce(new i(n), e + 1, t),
r = sr(n, !0, e + 1)),
r
}
;
H.toFixed = function(e, t) {
var r, n, i = this, a = i.constructor;
return e === void 0 ? sr(i) : (dt(e, 0, un),
t === void 0 ? t = a.rounding : dt(t, 0, 8),
n = ce(new a(i), e + Oe(i) + 1, t),
r = sr(n.abs(), !1, e + Oe(n) + 1),
i.isneg() && !i.isZero() ? "-" + r : r)
}
;
H.toInteger = H.toint = function() {
var e = this
, t = e.constructor;
return ce(new t(e), Oe(e) + 1, t.rounding)
}
;
H.toNumber = function() {
return +this
}
;
H.toPower = H.pow = function(e) {
var t, r, n, i, a, o, u = this, c = u.constructor, l = 12, f = +(e = new c(e));
if (!e.s)
return new c(We);
if (u = new c(u),
!u.s) {
if (e.s < 1)
throw Error(Xe + "Infinity");
return u
}
if (u.eq(We))
return u;
if (n = c.precision,
e.eq(We))
return ce(u, n);
if (t = e.e,
r = e.d.length - 1,
o = t >= r,
a = u.s,
o) {
if ((r = f < 0 ? -f : f) <= Vv) {
for (i = new c(We),
t = Math.ceil(n / fe + 4),
ve = !1; r % 2 && (i = i.times(u),
ad(i.d, t)),
r = cn(r / 2),
r !== 0; )
u = u.times(u),
ad(u.d, t);
return ve = !0,
e.s < 0 ? new c(We).div(i) : ce(i, n)
}
} else if (a < 0)
throw Error(Xe + "NaN");
return a = a < 0 && e.d[Math.max(t, r)] & 1 ? -1 : 1,
u.s = 1,
ve = !1,
i = e.times(Wn(u, n + l)),
ve = !0,
i = Zv(i),
i.s = a,
i
}
;
H.toPrecision = function(e, t) {
var r, n, i = this, a = i.constructor;
return e === void 0 ? (r = Oe(i),
n = sr(i, r <= a.toExpNeg || r >= a.toExpPos)) : (dt(e, 1, un),
t === void 0 ? t = a.rounding : dt(t, 0, 8),
i = ce(new a(i), e, t),
r = Oe(i),
n = sr(i, e <= r || r <= a.toExpNeg, e)),
n
}
;
H.toSignificantDigits = H.tosd = function(e, t) {
var r = this
, n = r.constructor;
return e === void 0 ? (e = n.precision,
t = n.rounding) : (dt(e, 1, un),
t === void 0 ? t = n.rounding : dt(t, 0, 8)),
ce(new n(r), e, t)
}
;
H.toString = H.valueOf = H.val = H.toJSON = H[Symbol.for("nodejs.util.inspect.custom")] = function() {
var e = this
, t = Oe(e)
, r = e.constructor;
return sr(e, t <= r.toExpNeg || t >= r.toExpPos)
}
;
function Xv(e, t) {
var r, n, i, a, o, u, c, l, f = e.constructor, s = f.precision;
if (!e.s || !t.s)
return t.s || (t = new f(e)),
ve ? ce(t, s) : t;
if (c = e.d,
l = t.d,
o = e.e,
i = t.e,
c = c.slice(),
a = o - i,
a) {
for (a < 0 ? (n = c,
a = -a,
u = l.length) : (n = l,
i = o,
u = c.length),
o = Math.ceil(s / fe),
u = o > u ? o + 1 : u + 1,
a > u && (a = u,
n.length = 1),
n.reverse(); a--; )
n.push(0);
n.reverse()
}
for (u = c.length,
a = l.length,
u - a < 0 && (a = u,
n = l,
l = c,
c = n),
r = 0; a; )
r = (c[--a] = c[a] + l[a] + r) / $e | 0,
c[a] %= $e;
for (r && (c.unshift(r),
++i),
u = c.length; c[--u] == 0; )
c.pop();
return t.d = c,
t.e = i,
ve ? ce(t, s) : t
}
function dt(e, t, r) {
if (e !== ~~e || e < t || e > r)
throw Error(ur + e)
}
function ct(e) {
var t, r, n, i = e.length - 1, a = "", o = e[0];
if (i > 0) {
for (a += o,
t = 1; t < i; t++)
n = e[t] + "",
r = fe - n.length,
r && (a += Nt(r)),
a += n;
o = e[t],
n = o + "",
r = fe - n.length,
r && (a += Nt(r))
} else if (o === 0)
return "0";
for (; o % 10 === 0; )
o /= 10;
return a + o
}
var At = function() {
function e(n, i) {
var a, o = 0, u = n.length;
for (n = n.slice(); u--; )
a = n[u] * i + o,
n[u] = a % $e | 0,
o = a / $e | 0;
return o && n.unshift(o),
n
}
function t(n, i, a, o) {
var u, c;
if (a != o)
c = a > o ? 1 : -1;
else
for (u = c = 0; u < a; u++)
if (n[u] != i[u]) {
c = n[u] > i[u] ? 1 : -1;
break
}
return c
}
function r(n, i, a) {
for (var o = 0; a--; )
n[a] -= o,
o = n[a] < i[a] ? 1 : 0,
n[a] = o * $e + n[a] - i[a];
for (; !n[0] && n.length > 1; )
n.shift()
}
return function(n, i, a, o) {
var u, c, l, f, s, d, h, v, y, p, b, w, x, O, g, m, S, P, _ = n.constructor, j = n.s == i.s ? 1 : -1, $ = n.d, T = i.d;
if (!n.s)
return new _(n);
if (!i.s)
throw Error(Xe + "Division by zero");
for (c = n.e - i.e,
S = T.length,
g = $.length,
h = new _(j),
v = h.d = [],
l = 0; T[l] == ($[l] || 0); )
++l;
if (T[l] > ($[l] || 0) && --c,
a == null ? w = a = _.precision : o ? w = a + (Oe(n) - Oe(i)) + 1 : w = a,
w < 0)
return new _(0);
if (w = w / fe + 2 | 0,
l = 0,
S == 1)
for (f = 0,
T = T[0],
w++; (l < g || f) && w--; l++)
x = f * $e + ($[l] || 0),
v[l] = x / T | 0,
f = x % T | 0;
else {
for (f = $e / (T[0] + 1) | 0,
f > 1 && (T = e(T, f),
$ = e($, f),
S = T.length,
g = $.length),
O = S,
y = $.slice(0, S),
p = y.length; p < S; )
y[p++] = 0;
P = T.slice(),
P.unshift(0),
m = T[0],
T[1] >= $e / 2 && ++m;
do
f = 0,
u = t(T, y, S, p),
u < 0 ? (b = y[0],
S != p && (b = b * $e + (y[1] || 0)),
f = b / m | 0,
f > 1 ? (f >= $e && (f = $e - 1),
s = e(T, f),
d = s.length,
p = y.length,
u = t(s, y, d, p),
u == 1 && (f--,
r(s, S < d ? P : T, d))) : (f == 0 && (u = f = 1),
s = T.slice()),
d = s.length,
d < p && s.unshift(0),
r(y, s, p),
u == -1 && (p = y.length,
u = t(T, y, S, p),
u < 1 && (f++,
r(y, S < p ? P : T, p))),
p = y.length) : u === 0 && (f++,
y = [0]),
v[l++] = f,
u && y[0] ? y[p++] = $[O] || 0 : (y = [$[O]],
p = 1);
while ((O++ < g || y[0] !== void 0) && w--)
}
return v[0] || v.shift(),
h.e = c,
ce(h, o ? a + Oe(h) + 1 : a)
}
}();
function Zv(e, t) {
var r, n, i, a, o, u, c = 0, l = 0, f = e.constructor, s = f.precision;
if (Oe(e) > 16)
throw Error(Sl + Oe(e));
if (!e.s)
return new f(We);
for (t == null ? (ve = !1,
u = s) : u = t,
o = new f(.03125); e.abs().gte(.1); )
e = e.times(o),
l += 5;
for (n = Math.log(Jt(2, l)) / Math.LN10 * 2 + 5 | 0,
u += n,
r = i = a = new f(We),
f.precision = u; ; ) {
if (i = ce(i.times(e), u),
r = r.times(++c),
o = a.plus(At(i, r, u)),
ct(o.d).slice(0, u) === ct(a.d).slice(0, u)) {
for (; l--; )
a = ce(a.times(a), u);
return f.precision = s,
t == null ? (ve = !0,
ce(a, s)) : a
}
a = o
}
}
function Oe(e) {
for (var t = e.e * fe, r = e.d[0]; r >= 10; r /= 10)
t++;
return t
}
function Ko(e, t, r) {
if (t > e.LN10.sd())
throw ve = !0,
r && (e.precision = r),
Error(Xe + "LN10 precision limit exceeded");
return ce(new e(e.LN10), t)
}
function Nt(e) {
for (var t = ""; e--; )
t += "0";
return t
}
function Wn(e, t) {
var r, n, i, a, o, u, c, l, f, s = 1, d = 10, h = e, v = h.d, y = h.constructor, p = y.precision;
if (h.s < 1)
throw Error(Xe + (h.s ? "NaN" : "-Infinity"));
if (h.eq(We))
return new y(0);
if (t == null ? (ve = !1,
l = p) : l = t,
h.eq(10))
return t == null && (ve = !0),
Ko(y, l);
if (l += d,
y.precision = l,
r = ct(v),
n = r.charAt(0),
a = Oe(h),
Math.abs(a) < 15e14) {
for (; n < 7 && n != 1 || n == 1 && r.charAt(1) > 3; )
h = h.times(e),
r = ct(h.d),
n = r.charAt(0),
s++;
a = Oe(h),
n > 1 ? (h = new y("0." + r),
a++) : h = new y(n + "." + r.slice(1))
} else
return c = Ko(y, l + 2, p).times(a + ""),
h = Wn(new y(n + "." + r.slice(1)), l - d).plus(c),
y.precision = p,
t == null ? (ve = !0,
ce(h, p)) : h;
for (u = o = h = At(h.minus(We), h.plus(We), l),
f = ce(h.times(h), l),
i = 3; ; ) {
if (o = ce(o.times(f), l),
c = u.plus(At(o, new y(i), l)),
ct(c.d).slice(0, l) === ct(u.d).slice(0, l))
return u = u.times(2),
a !== 0 && (u = u.plus(Ko(y, l + 2, p).times(a + ""))),
u = At(u, new y(s), l),
y.precision = p,
t == null ? (ve = !0,
ce(u, p)) : u;
u = c,
i += 2
}
}
function id(e, t) {
var r, n, i;
for ((r = t.indexOf(".")) > -1 && (t = t.replace(".", "")),
(n = t.search(/e/i)) > 0 ? (r < 0 && (r = n),
r += +t.slice(n + 1),
t = t.substring(0, n)) : r < 0 && (r = t.length),
n = 0; t.charCodeAt(n) === 48; )
++n;
for (i = t.length; t.charCodeAt(i - 1) === 48; )
--i;
if (t = t.slice(n, i),
t) {
if (i -= n,
r = r - n - 1,
e.e = cn(r / fe),
e.d = [],
n = (r + 1) % fe,
r < 0 && (n += fe),
n < i) {
for (n && e.d.push(+t.slice(0, n)),
i -= fe; n < i; )
e.d.push(+t.slice(n, n += fe));
t = t.slice(n),
n = fe - t.length
} else
n -= i;
for (; n--; )
t += "0";
if (e.d.push(+t),
ve && (e.e > sa || e.e < -sa))
throw Error(Sl + r)
} else
e.s = 0,
e.e = 0,
e.d = [0];
return e
}
function ce(e, t, r) {
var n, i, a, o, u, c, l, f, s = e.d;
for (o = 1,
a = s[0]; a >= 10; a /= 10)
o++;
if (n = t - o,
n < 0)
n += fe,
i = t,
l = s[f = 0];
else {
if (f = Math.ceil((n + 1) / fe),
a = s.length,
f >= a)
return e;
for (l = a = s[f],
o = 1; a >= 10; a /= 10)
o++;
n %= fe,
i = n - fe + o
}
if (r !== void 0 && (a = Jt(10, o - i - 1),
u = l / a % 10 | 0,
c = t < 0 || s[f + 1] !== void 0 || l % a,
c = r < 4 ? (u || c) && (r == 0 || r == (e.s < 0 ? 3 : 2)) : u > 5 || u == 5 && (r == 4 || c || r == 6 && (n > 0 ? i > 0 ? l / Jt(10, o - i) : 0 : s[f - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7))),
t < 1 || !s[0])
return c ? (a = Oe(e),
s.length = 1,
t = t - a - 1,
s[0] = Jt(10, (fe - t % fe) % fe),
e.e = cn(-t / fe) || 0) : (s.length = 1,
s[0] = e.e = e.s = 0),
e;
if (n == 0 ? (s.length = f,
a = 1,
f--) : (s.length = f + 1,
a = Jt(10, fe - n),
s[f] = i > 0 ? (l / Jt(10, o - i) % Jt(10, i) | 0) * a : 0),
c)
for (; ; )
if (f == 0) {
(s[0] += a) == $e && (s[0] = 1,
++e.e);
break
} else {
if (s[f] += a,
s[f] != $e)
break;
s[f--] = 0,
a = 1
}
for (n = s.length; s[--n] === 0; )
s.pop();
if (ve && (e.e > sa || e.e < -sa))
throw Error(Sl + Oe(e));
return e
}
function Jv(e, t) {
var r, n, i, a, o, u, c, l, f, s, d = e.constructor, h = d.precision;
if (!e.s || !t.s)
return t.s ? t.s = -t.s : t = new d(e),
ve ? ce(t, h) : t;
if (c = e.d,
s = t.d,
n = t.e,
l = e.e,
c = c.slice(),
o = l - n,
o) {
for (f = o < 0,
f ? (r = c,
o = -o,
u = s.length) : (r = s,
n = l,
u = c.length),
i = Math.max(Math.ceil(h / fe), u) + 2,
o > i && (o = i,
r.length = 1),
r.reverse(),
i = o; i--; )
r.push(0);
r.reverse()
} else {
for (i = c.length,
u = s.length,
f = i < u,
f && (u = i),
i = 0; i < u; i++)
if (c[i] != s[i]) {
f = c[i] < s[i];
break
}
o = 0
}
for (f && (r = c,
c = s,
s = r,
t.s = -t.s),
u = c.length,
i = s.length - u; i > 0; --i)
c[u++] = 0;
for (i = s.length; i > o; ) {
if (c[--i] < s[i]) {
for (a = i; a && c[--a] === 0; )
c[a] = $e - 1;
--c[a],
c[i] += $e
}
c[i] -= s[i]
}
for (; c[--u] === 0; )
c.pop();
for (; c[0] === 0; c.shift())
--n;
return c[0] ? (t.d = c,
t.e = n,
ve ? ce(t, h) : t) : new d(0)
}
function sr(e, t, r) {
var n, i = Oe(e), a = ct(e.d), o = a.length;
return t ? (r && (n = r - o) > 0 ? a = a.charAt(0) + "." + a.slice(1) + Nt(n) : o > 1 && (a = a.charAt(0) + "." + a.slice(1)),
a = a + (i < 0 ? "e" : "e+") + i) : i < 0 ? (a = "0." + Nt(-i - 1) + a,
r && (n = r - o) > 0 && (a += Nt(n))) : i >= o ? (a += Nt(i + 1 - o),
r && (n = r - i - 1) > 0 && (a = a + "." + Nt(n))) : ((n = i + 1) < o && (a = a.slice(0, n) + "." + a.slice(n)),
r && (n = r - o) > 0 && (i + 1 === o && (a += "."),
a += Nt(n))),
e.s < 0 ? "-" + a : a
}
function ad(e, t) {
if (e.length > t)
return e.length = t,
!0
}
function Qv(e) {
var t, r, n;
function i(a) {
var o = this;
if (!(o instanceof i))
return new i(a);
if (o.constructor = i,
a instanceof i) {
o.s = a.s,
o.e = a.e,
o.d = (a = a.d) ? a.slice() : a;
return
}
if (typeof a == "number") {
if (a * 0 !== 0)
throw Error(ur + a);
if (a > 0)
o.s = 1;
else if (a < 0)
a = -a,
o.s = -1;
else {
o.s = 0,
o.e = 0,
o.d = [0];
return
}
if (a === ~~a && a < 1e7) {
o.e = 0,
o.d = [a];
return
}
return id(o, a.toString())
} else if (typeof a != "string")
throw Error(ur + a);
if (a.charCodeAt(0) === 45 ? (a = a.slice(1),
o.s = -1) : o.s = 1,
u2.test(a))
id(o, a);
else
throw Error(ur + a)
}
if (i.prototype = H,
i.ROUND_UP = 0,
i.ROUND_DOWN = 1,
i.ROUND_CEIL = 2,
i.ROUND_FLOOR = 3,
i.ROUND_HALF_UP = 4,
i.ROUND_HALF_DOWN = 5,
i.ROUND_HALF_EVEN = 6,
i.ROUND_HALF_CEIL = 7,
i.ROUND_HALF_FLOOR = 8,
i.clone = Qv,
i.config = i.set = c2,
e === void 0 && (e = {}),
e)
for (n = ["precision", "rounding", "toExpNeg", "toExpPos", "LN10"],
t = 0; t < n.length; )
e.hasOwnProperty(r = n[t++]) || (e[r] = this[r]);
return i.config(e),
i
}
function c2(e) {
if (!e || typeof e != "object")
throw Error(Xe + "Object expected");
var t, r, n, i = ["precision", 1, un, "rounding", 0, 8, "toExpNeg", -1 / 0, 0, "toExpPos", 0, 1 / 0];
for (t = 0; t < i.length; t += 3)
if ((n = e[r = i[t]]) !== void 0)
if (cn(n) === n && n >= i[t + 1] && n <= i[t + 2])
this[r] = n;
else
throw Error(ur + r + ": " + n);
if ((n = e[r = "LN10"]) !== void 0)
if (n == Math.LN10)
this[r] = new this(n);
else
throw Error(ur + r + ": " + n);
return this
}
var Pl = Qv(o2);
We = new Pl(1);
const ue = Pl;
function l2(e) {
return h2(e) || d2(e) || f2(e) || s2()
}
function s2() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function f2(e, t) {
if (e) {
if (typeof e == "string")
return Nu(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 Nu(e, t)
}
}
function d2(e) {
if (typeof Symbol < "u" && Symbol.iterator in Object(e))
return Array.from(e)
}
function h2(e) {
if (Array.isArray(e))
return Nu(e)
}
function Nu(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
}
var p2 = function(t) {
return t
}
, ey = {
"@@functional/placeholder": !0
}
, ty = function(t) {
return t === ey
}
, od = function(t) {
return function r() {
return arguments.length === 0 || arguments.length === 1 && ty(arguments.length <= 0 ? void 0 : arguments[0]) ? r : t.apply(void 0, arguments)
}
}
, v2 = function e(t, r) {
return t === 1 ? r : od(function() {
for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++)
i[a] = arguments[a];
var o = i.filter(function(u) {
return u !== ey
}).length;
return o >= t ? r.apply(void 0, i) : e(t - o, od(function() {
for (var u = arguments.length, c = new Array(u), l = 0; l < u; l++)
c[l] = arguments[l];
var f = i.map(function(s) {
return ty(s) ? c.shift() : s
});
return r.apply(void 0, l2(f).concat(c))
}))
})
}
, po = function(t) {
return v2(t.length, t)
}
, Bu = function(t, r) {
for (var n = [], i = t; i < r; ++i)
n[i - t] = i;
return n
}
, y2 = po(function(e, t) {
return Array.isArray(t) ? t.map(e) : Object.keys(t).map(function(r) {
return t[r]
}).map(e)
})
, g2 = function() {
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
r[n] = arguments[n];
if (!r.length)
return p2;
var i = r.reverse()
, a = i[0]
, o = i.slice(1);
return function() {
return o.reduce(function(u, c) {
return c(u)
}, a.apply(void 0, arguments))
}
}
, Lu = function(t) {
return Array.isArray(t) ? t.reverse() : t.split("").reverse.join("")
}
, ry = function(t) {
var r = null
, n = null;
return function() {
for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
a[o] = arguments[o];
return r && a.every(function(u, c) {
return u === r[c]
}) || (r = a,
n = t.apply(void 0, a)),
n
}
};
function m2(e) {
var t;
return e === 0 ? t = 1 : t = Math.floor(new ue(e).abs().log(10).toNumber()) + 1,
t
}
function b2(e, t, r) {
for (var n = new ue(e), i = 0, a = []; n.lt(t) && i < 1e5; )
a.push(n.toNumber()),
n = n.add(r),
i++;
return a
}
var x2 = po(function(e, t, r) {
var n = +e
, i = +t;
return n + r * (i - n)
})
, w2 = po(function(e, t, r) {
var n = t - +e;
return n = n || 1 / 0,
(r - e) / n
})
, O2 = po(function(e, t, r) {
var n = t - +e;
return n = n || 1 / 0,
Math.max(0, Math.min(1, (r - e) / n))
});
const vo = {
rangeStep: b2,
getDigitCount: m2,
interpolateNumber: x2,
uninterpolateNumber: w2,
uninterpolateTruncation: O2
};
function Ru(e) {
return A2(e) || P2(e) || ny(e) || S2()
}
function S2() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function P2(e) {
if (typeof Symbol < "u" && Symbol.iterator in Object(e))
return Array.from(e)
}
function A2(e) {
if (Array.isArray(e))
return Fu(e)
}
function Un(e, t) {
return T2(e) || $2(e, t) || ny(e, t) || _2()
}
function _2() {
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 ny(e, t) {
if (e) {
if (typeof e == "string")
return Fu(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 Fu(e, t)
}
}
function Fu(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 $2(e, t) {
if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
var r = []
, n = !0
, i = !1
, a = void 0;
try {
for (var o = e[Symbol.iterator](), u; !(n = (u = o.next()).done) && (r.push(u.value),
!(t && r.length === t)); n = !0)
;
} catch (c) {
i = !0,
a = c
} finally {
try {
!n && o.return != null && o.return()
} finally {
if (i)
throw a
}
}
return r
}
}
function T2(e) {
if (Array.isArray(e))
return e
}
function iy(e) {
var t = Un(e, 2)
, r = t[0]
, n = t[1]
, i = r
, a = n;
return r > n && (i = n,
a = r),
[i, a]
}
function ay(e, t, r) {
if (e.lte(0))
return new ue(0);
var n = vo.getDigitCount(e.toNumber())
, i = new ue(10).pow(n)
, a = e.div(i)
, o = n !== 1 ? .05 : .1
, u = new ue(Math.ceil(a.div(o).toNumber())).add(r).mul(o)
, c = u.mul(i);
return t ? c : new ue(Math.ceil(c))
}
function j2(e, t, r) {
var n = 1
, i = new ue(e);
if (!i.isint() && r) {
var a = Math.abs(e);
a < 1 ? (n = new ue(10).pow(vo.getDigitCount(e) - 1),
i = new ue(Math.floor(i.div(n).toNumber())).mul(n)) : a > 1 && (i = new ue(Math.floor(e)))
} else
e === 0 ? i = new ue(Math.floor((t - 1) / 2)) : r || (i = new ue(Math.floor(e)));
var o = Math.floor((t - 1) / 2)
, u = g2(y2(function(c) {
return i.add(new ue(c - o).mul(n)).toNumber()
}), Bu);
return u(0, t)
}
function oy(e, t, r, n) {
var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0;
if (!Number.isFinite((t - e) / (r - 1)))
return {
step: new ue(0),
tickMin: new ue(0),
tickMax: new ue(0)
};
var a = ay(new ue(t).sub(e).div(r - 1), n, i), o;
e <= 0 && t >= 0 ? o = new ue(0) : (o = new ue(e).add(t).div(2),
o = o.sub(new ue(o).mod(a)));
var u = Math.ceil(o.sub(e).div(a).toNumber())
, c = Math.ceil(new ue(t).sub(o).div(a).toNumber())
, l = u + c + 1;
return l > r ? oy(e, t, r, n, i + 1) : (l < r && (c = t > 0 ? c + (r - l) : c,
u = t > 0 ? u : u + (r - l)),
{
step: a,
tickMin: o.sub(new ue(u).mul(a)),
tickMax: o.add(new ue(c).mul(a))
})
}
function E2(e) {
var t = Un(e, 2)
, r = t[0]
, n = t[1]
, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 6
, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0
, o = Math.max(i, 2)
, u = iy([r, n])
, c = Un(u, 2)
, l = c[0]
, f = c[1];
if (l === -1 / 0 || f === 1 / 0) {
var s = f === 1 / 0 ? [l].concat(Ru(Bu(0, i - 1).map(function() {
return 1 / 0
}))) : [].concat(Ru(Bu(0, i - 1).map(function() {
return -1 / 0
})), [f]);
return r > n ? Lu(s) : s
}
if (l === f)
return j2(l, i, a);
var d = oy(l, f, o, a)
, h = d.step
, v = d.tickMin
, y = d.tickMax
, p = vo.rangeStep(v, y.add(new ue(.1).mul(h)), h);
return r > n ? Lu(p) : p
}
function M2(e, t) {
var r = Un(e, 2)
, n = r[0]
, i = r[1]
, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0
, o = iy([n, i])
, u = Un(o, 2)
, c = u[0]
, l = u[1];
if (c === -1 / 0 || l === 1 / 0)
return [n, i];
if (c === l)
return [c];
var f = Math.max(t, 2)
, s = ay(new ue(l).sub(c).div(f - 1), a, 0)
, d = [].concat(Ru(vo.rangeStep(new ue(c), new ue(l).sub(new ue(.99).mul(s)), s)), [l]);
return n > i ? Lu(d) : d
}
var C2 = ry(E2)
, I2 = ry(M2)
, k2 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
function Nr(e) {
"@babel/helpers - typeof";
return Nr = 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
}
,
Nr(e)
}
function fa() {
return fa = 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
}
,
fa.apply(this, arguments)
}
function D2(e, t) {
return R2(e) || L2(e, t) || B2(e, t) || N2()
}
function N2() {
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 B2(e, t) {
if (e) {
if (typeof e == "string")
return ud(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 ud(e, t)
}
}
function ud(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 L2(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function R2(e) {
if (Array.isArray(e))
return e
}
function F2(e, t) {
if (e == null)
return {};
var r = z2(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 z2(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function W2(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function U2(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, ly(n.key), n)
}
}
function H2(e, t, r) {
return t && U2(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function q2(e, t, r) {
return t = da(t),
K2(e, uy() ? Reflect.construct(t, r || [], da(e).constructor) : t.apply(e, r))
}
function K2(e, t) {
if (t && (Nr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return G2(e)
}
function G2(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function uy() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (uy = function() {
return !!e
}
)()
}
function da(e) {
return da = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
da(e)
}
function Y2(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && zu(e, t)
}
function zu(e, t) {
return zu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
zu(e, t)
}
function cy(e, t, r) {
return t = ly(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function ly(e) {
var t = V2(e, "string");
return Nr(t) == "symbol" ? t : t + ""
}
function V2(e, t) {
if (Nr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Nr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var yo = function(e) {
function t() {
return W2(this, t),
q2(this, t, arguments)
}
return Y2(t, e),
H2(t, [{
key: "render",
value: function() {
var n = this.props
, i = n.offset
, a = n.layout
, o = n.width
, u = n.dataKey
, c = n.data
, l = n.dataPointFormatter
, f = n.xAxis
, s = n.yAxis
, d = F2(n, k2)
, h = Q(d, !1);
this.props.direction === "x" && f.type !== "number" && cr(!1);
var v = c.map(function(y) {
var p = l(y, u)
, b = p.x
, w = p.y
, x = p.value
, O = p.errorVal;
if (!O)
return null;
var g = [], m, S;
if (Array.isArray(O)) {
var P = D2(O, 2);
m = P[0],
S = P[1]
} else
m = S = O;
if (a === "vertical") {
var _ = f.scale
, j = w + i
, $ = j + o
, T = j - o
, C = _(x - m)
, k = _(x + S);
g.push({
x1: k,
y1: $,
x2: k,
y2: T
}),
g.push({
x1: C,
y1: j,
x2: k,
y2: j
}),
g.push({
x1: C,
y1: $,
x2: C,
y2: T
})
} else if (a === "horizontal") {
var M = s.scale
, D = b + i
, B = D - o
, F = D + o
, z = M(x - m)
, q = M(x + S);
g.push({
x1: B,
y1: q,
x2: F,
y2: q
}),
g.push({
x1: D,
y1: z,
x2: D,
y2: q
}),
g.push({
x1: B,
y1: z,
x2: F,
y2: z
})
}
return A.createElement(ye, fa({
className: "recharts-errorBar",
key: "bar-".concat(g.map(function(G) {
return "".concat(G.x1, "-").concat(G.x2, "-").concat(G.y1, "-").concat(G.y2)
}))
}, h), g.map(function(G) {
return A.createElement("line", fa({}, G, {
key: "line-".concat(G.x1, "-").concat(G.x2, "-").concat(G.y1, "-").concat(G.y2)
}))
}))
});
return A.createElement(ye, {
className: "recharts-errorBars"
}, v)
}
}])
}(A.Component);
cy(yo, "defaultProps", {
stroke: "black",
strokeWidth: 1.5,
width: 5,
offset: 0,
layout: "horizontal"
});
cy(yo, "displayName", "ErrorBar");
function Hn(e) {
"@babel/helpers - typeof";
return Hn = 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
}
,
Hn(e)
}
function cd(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 Vt(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? cd(Object(r), !0).forEach(function(n) {
X2(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : cd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function X2(e, t, r) {
return t = Z2(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Z2(e) {
var t = J2(e, "string");
return Hn(t) == "symbol" ? t : t + ""
}
function J2(e, t) {
if (Hn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Hn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var sy = function(t) {
var r = t.children
, n = t.formattedGraphicalItems
, i = t.legendWidth
, a = t.legendContent
, o = ze(r, ar);
if (!o)
return null;
var u = ar.defaultProps, c = u !== void 0 ? Vt(Vt({}, u), o.props) : {}, l;
return o.props && o.props.payload ? l = o.props && o.props.payload : a === "children" ? l = (n || []).reduce(function(f, s) {
var d = s.item
, h = s.props
, v = h.sectors || h.data || [];
return f.concat(v.map(function(y) {
return {
type: o.props.iconType || d.props.legendType,
value: y.name,
color: y.fill,
payload: y
}
}))
}, []) : l = (n || []).map(function(f) {
var s = f.item
, d = s.type.defaultProps
, h = d !== void 0 ? Vt(Vt({}, d), s.props) : {}
, v = h.dataKey
, y = h.name
, p = h.legendType
, b = h.hide;
return {
inactive: b,
dataKey: v,
type: c.iconType || p || "square",
color: Al(s),
value: y || v,
payload: h
}
}),
Vt(Vt(Vt({}, c), ar.getWithHeight(o, i)), {}, {
payload: l,
item: o
})
};
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 ld(e) {
return rk(e) || tk(e) || ek(e) || Q2()
}
function Q2() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function ek(e, t) {
if (e) {
if (typeof e == "string")
return Wu(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 Wu(e, t)
}
}
function tk(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function rk(e) {
if (Array.isArray(e))
return Wu(e)
}
function Wu(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 sd(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 me(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? sd(Object(r), !0).forEach(function(n) {
$r(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : sd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function $r(e, t, r) {
return t = nk(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function nk(e) {
var t = ik(e, "string");
return qn(t) == "symbol" ? t : t + ""
}
function ik(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)
}
function Ue(e, t, r) {
return te(e) || te(t) ? r : Ae(t) ? Ve(e, t, r) : J(t) ? t(e) : r
}
function An(e, t, r, n) {
var i = r2(e, function(u) {
return Ue(u, t)
});
if (r === "number") {
var a = i.filter(function(u) {
return R(u) || parseFloat(u)
});
return a.length ? [ho(a), Lt(a)] : [1 / 0, -1 / 0]
}
var o = n ? i.filter(function(u) {
return !te(u)
}) : i;
return o.map(function(u) {
return Ae(u) || u instanceof Date ? u : ""
})
}
var ak = function(t) {
var r, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 ? arguments[2] : void 0, a = arguments.length > 3 ? arguments[3] : void 0, o = -1, u = (r = n == null ? void 0 : n.length) !== null && r !== void 0 ? r : 0;
if (u <= 1)
return 0;
if (a && a.axisType === "angleAxis" && Math.abs(Math.abs(a.range[1] - a.range[0]) - 360) <= 1e-6)
for (var c = a.range, l = 0; l < u; l++) {
var f = l > 0 ? i[l - 1].coordinate : i[u - 1].coordinate
, s = i[l].coordinate
, d = l >= u - 1 ? i[0].coordinate : i[l + 1].coordinate
, h = void 0;
if (it(s - f) !== it(d - s)) {
var v = [];
if (it(d - s) === it(c[1] - c[0])) {
h = d;
var y = s + c[1] - c[0];
v[0] = Math.min(y, (y + f) / 2),
v[1] = Math.max(y, (y + f) / 2)
} else {
h = f;
var p = d + c[1] - c[0];
v[0] = Math.min(s, (p + s) / 2),
v[1] = Math.max(s, (p + s) / 2)
}
var b = [Math.min(s, (h + s) / 2), Math.max(s, (h + s) / 2)];
if (t > b[0] && t <= b[1] || t >= v[0] && t <= v[1]) {
o = i[l].index;
break
}
} else {
var w = Math.min(f, d)
, x = Math.max(f, d);
if (t > (w + s) / 2 && t <= (x + s) / 2) {
o = i[l].index;
break
}
}
}
else
for (var O = 0; O < u; O++)
if (O === 0 && t <= (n[O].coordinate + n[O + 1].coordinate) / 2 || O > 0 && O < u - 1 && t > (n[O].coordinate + n[O - 1].coordinate) / 2 && t <= (n[O].coordinate + n[O + 1].coordinate) / 2 || O === u - 1 && t > (n[O].coordinate + n[O - 1].coordinate) / 2) {
o = n[O].index;
break
}
return o
}
, Al = function(t) {
var r, n = t, i = n.type.displayName, a = (r = t.type) !== null && r !== void 0 && r.defaultProps ? me(me({}, t.type.defaultProps), t.props) : t.props, o = a.stroke, u = a.fill, c;
switch (i) {
case "Line":
c = o;
break;
case "Area":
case "Radar":
c = o && o !== "none" ? o : u;
break;
default:
c = u;
break
}
return c
}
, ok = function(t) {
var r = t.barSize
, n = t.totalSize
, i = t.stackGroups
, a = i === void 0 ? {} : i;
if (!a)
return {};
for (var o = {}, u = Object.keys(a), c = 0, l = u.length; c < l; c++)
for (var f = a[u[c]].stackGroups, s = Object.keys(f), d = 0, h = s.length; d < h; d++) {
var v = f[s[d]]
, y = v.items
, p = v.cateAxisId
, b = y.filter(function(S) {
return Ot(S.type).indexOf("Bar") >= 0
});
if (b && b.length) {
var w = b[0].type.defaultProps
, x = w !== void 0 ? me(me({}, w), b[0].props) : b[0].props
, O = x.barSize
, g = x[p];
o[g] || (o[g] = []);
var m = te(O) ? r : O;
o[g].push({
item: b[0],
stackList: b.slice(1),
barSize: te(m) ? void 0 : lr(m, n, 0)
})
}
}
return o
}
, uk = function(t) {
var r = t.barGap
, n = t.barCategoryGap
, i = t.bandSize
, a = t.sizeList
, o = a === void 0 ? [] : a
, u = t.maxBarSize
, c = o.length;
if (c < 1)
return null;
var l = lr(r, i, 0, !0), f, s = [];
if (o[0].barSize === +o[0].barSize) {
var d = !1
, h = i / c
, v = o.reduce(function(O, g) {
return O + g.barSize || 0
}, 0);
v += (c - 1) * l,
v >= i && (v -= (c - 1) * l,
l = 0),
v >= i && h > 0 && (d = !0,
h *= .9,
v = c * h);
var y = (i - v) / 2 >> 0
, p = {
offset: y - l,
size: 0
};
f = o.reduce(function(O, g) {
var m = {
item: g.item,
position: {
offset: p.offset + p.size + l,
size: d ? h : g.barSize
}
}
, S = [].concat(ld(O), [m]);
return p = S[S.length - 1].position,
g.stackList && g.stackList.length && g.stackList.forEach(function(P) {
S.push({
item: P,
position: p
})
}),
S
}, s)
} else {
var b = lr(n, i, 0, !0);
i - 2 * b - (c - 1) * l <= 0 && (l = 0);
var w = (i - 2 * b - (c - 1) * l) / c;
w > 1 && (w >>= 0);
var x = u === +u ? Math.min(w, u) : w;
f = o.reduce(function(O, g, m) {
var S = [].concat(ld(O), [{
item: g.item,
position: {
offset: b + (w + l) * m + (w - x) / 2,
size: x
}
}]);
return g.stackList && g.stackList.length && g.stackList.forEach(function(P) {
S.push({
item: P,
position: S[S.length - 1].position
})
}),
S
}, s)
}
return f
}
, ck = function(t, r, n, i) {
var a = n.children
, o = n.width
, u = n.margin
, c = o - (u.left || 0) - (u.right || 0)
, l = sy({
children: a,
legendWidth: c
});
if (l) {
var f = i || {}
, s = f.width
, d = f.height
, h = l.align
, v = l.verticalAlign
, y = l.layout;
if ((y === "vertical" || y === "horizontal" && v === "middle") && h !== "center" && R(t[h]))
return me(me({}, t), {}, $r({}, h, t[h] + (s || 0)));
if ((y === "horizontal" || y === "vertical" && h === "center") && v !== "middle" && R(t[v]))
return me(me({}, t), {}, $r({}, v, t[v] + (d || 0)))
}
return t
}
, lk = function(t, r, n) {
return te(r) ? !0 : t === "horizontal" ? r === "yAxis" : t === "vertical" || n === "x" ? r === "xAxis" : n === "y" ? r === "yAxis" : !0
}
, fy = function(t, r, n, i, a) {
var o = r.props.children
, u = at(o, yo).filter(function(l) {
return lk(i, a, l.props.direction)
});
if (u && u.length) {
var c = u.map(function(l) {
return l.props.dataKey
});
return t.reduce(function(l, f) {
var s = Ue(f, n);
if (te(s))
return l;
var d = Array.isArray(s) ? [ho(s), Lt(s)] : [s, s]
, h = c.reduce(function(v, y) {
var p = Ue(f, y, 0)
, b = d[0] - Math.abs(Array.isArray(p) ? p[0] : p)
, w = d[1] + Math.abs(Array.isArray(p) ? p[1] : p);
return [Math.min(b, v[0]), Math.max(w, v[1])]
}, [1 / 0, -1 / 0]);
return [Math.min(h[0], l[0]), Math.max(h[1], l[1])]
}, [1 / 0, -1 / 0])
}
return null
}
, sk = function(t, r, n, i, a) {
var o = r.map(function(u) {
return fy(t, u, n, a, i)
}).filter(function(u) {
return !te(u)
});
return o && o.length ? o.reduce(function(u, c) {
return [Math.min(u[0], c[0]), Math.max(u[1], c[1])]
}, [1 / 0, -1 / 0]) : null
}
, dy = function(t, r, n, i, a) {
var o = r.map(function(c) {
var l = c.props.dataKey;
return n === "number" && l && fy(t, c, l, i) || An(t, l, n, a)
});
if (n === "number")
return o.reduce(function(c, l) {
return [Math.min(c[0], l[0]), Math.max(c[1], l[1])]
}, [1 / 0, -1 / 0]);
var u = {};
return o.reduce(function(c, l) {
for (var f = 0, s = l.length; f < s; f++)
u[l[f]] || (u[l[f]] = !0,
c.push(l[f]));
return c
}, [])
}
, hy = function(t, r) {
return t === "horizontal" && r === "xAxis" || t === "vertical" && r === "yAxis" || t === "centric" && r === "angleAxis" || t === "radial" && r === "radiusAxis"
}
, py = function(t, r, n, i) {
if (i)
return t.map(function(c) {
return c.coordinate
});
var a, o, u = t.map(function(c) {
return c.coordinate === r && (a = !0),
c.coordinate === n && (o = !0),
c.coordinate
});
return a || u.push(r),
o || u.push(n),
u
}
, wt = function(t, r, n) {
if (!t)
return null;
var i = t.scale
, a = t.duplicateDomain
, o = t.type
, u = t.range
, c = t.realScaleType === "scaleBand" ? i.bandwidth() / 2 : 2
, l = (r || n) && o === "category" && i.bandwidth ? i.bandwidth() / c : 0;
if (l = t.axisType === "angleAxis" && (u == null ? void 0 : u.length) >= 2 ? it(u[0] - u[1]) * 2 * l : l,
r && (t.ticks || t.niceTicks)) {
var f = (t.ticks || t.niceTicks).map(function(s) {
var d = a ? a.indexOf(s) : s;
return {
coordinate: i(d) + l,
value: s,
offset: l
}
});
return f.filter(function(s) {
return !tn(s.coordinate)
})
}
return t.isCategorical && t.categoricalDomain ? t.categoricalDomain.map(function(s, d) {
return {
coordinate: i(s) + l,
value: s,
index: d,
offset: l
}
}) : i.ticks && !n ? i.ticks(t.tickCount).map(function(s) {
return {
coordinate: i(s) + l,
value: s,
offset: l
}
}) : i.domain().map(function(s, d) {
return {
coordinate: i(s) + l,
value: a ? a[s] : s,
index: d,
offset: l
}
})
}
, Go = new WeakMap
, Mi = function(t, r) {
if (typeof r != "function")
return t;
Go.has(t) || Go.set(t, new WeakMap);
var n = Go.get(t);
if (n.has(r))
return n.get(r);
var i = function() {
t.apply(void 0, arguments),
r.apply(void 0, arguments)
};
return n.set(r, i),
i
}
, fk = function(t, r, n) {
var i = t.scale
, a = t.type
, o = t.layout
, u = t.axisType;
if (i === "auto")
return o === "radial" && u === "radiusAxis" ? {
scale: Nn(),
realScaleType: "band"
} : o === "radial" && u === "angleAxis" ? {
scale: oa(),
realScaleType: "linear"
} : a === "category" && r && (r.indexOf("LineChart") >= 0 || r.indexOf("AreaChart") >= 0 || r.indexOf("ComposedChart") >= 0 && !n) ? {
scale: Pn(),
realScaleType: "point"
} : a === "category" ? {
scale: Nn(),
realScaleType: "band"
} : {
scale: oa(),
realScaleType: "linear"
};
if (hi(i)) {
var c = "scale".concat(Qa(i));
return {
scale: (nd[c] || Pn)(),
realScaleType: nd[c] ? c : "point"
}
}
return J(i) ? {
scale: i
} : {
scale: Pn(),
realScaleType: "point"
}
}
, fd = 1e-4
, dk = function(t) {
var r = t.domain();
if (!(!r || r.length <= 2)) {
var n = r.length
, i = t.range()
, a = Math.min(i[0], i[1]) - fd
, o = Math.max(i[0], i[1]) + fd
, u = t(r[0])
, c = t(r[n - 1]);
(u < a || u > o || c < a || c > o) && t.domain([r[0], r[n - 1]])
}
}
, hk = function(t, r) {
if (!t)
return null;
for (var n = 0, i = t.length; n < i; n++)
if (t[n].item === r)
return t[n].position;
return null
}
, pk = function(t, r) {
if (!r || r.length !== 2 || !R(r[0]) || !R(r[1]))
return t;
var n = Math.min(r[0], r[1])
, i = Math.max(r[0], r[1])
, a = [t[0], t[1]];
return (!R(t[0]) || t[0] < n) && (a[0] = n),
(!R(t[1]) || t[1] > i) && (a[1] = i),
a[0] > i && (a[0] = i),
a[1] < n && (a[1] = n),
a
}
, vk = function(t) {
var r = t.length;
if (!(r <= 0))
for (var n = 0, i = t[0].length; n < i; ++n)
for (var a = 0, o = 0, u = 0; u < r; ++u) {
var c = tn(t[u][n][1]) ? t[u][n][0] : t[u][n][1];
c >= 0 ? (t[u][n][0] = a,
t[u][n][1] = a + c,
a = t[u][n][1]) : (t[u][n][0] = o,
t[u][n][1] = o + c,
o = t[u][n][1])
}
}
, yk = function(t) {
var r = t.length;
if (!(r <= 0))
for (var n = 0, i = t[0].length; n < i; ++n)
for (var a = 0, o = 0; o < r; ++o) {
var u = tn(t[o][n][1]) ? t[o][n][0] : t[o][n][1];
u >= 0 ? (t[o][n][0] = a,
t[o][n][1] = a + u,
a = t[o][n][1]) : (t[o][n][0] = 0,
t[o][n][1] = 0)
}
}
, gk = {
sign: vk,
expand: C1,
none: Tr,
silhouette: I1,
wiggle: k1,
positive: yk
}
, mk = function(t, r, n) {
var i = r.map(function(u) {
return u.props.dataKey
})
, a = gk[n]
, o = M1().keys(i).value(function(u, c) {
return +Ue(u, c, 0)
}).order(hu).offset(a);
return o(t)
}
, bk = function(t, r, n, i, a, o) {
if (!t)
return null;
var u = o ? r.reverse() : r
, c = {}
, l = u.reduce(function(s, d) {
var h, v = (h = d.type) !== null && h !== void 0 && h.defaultProps ? me(me({}, d.type.defaultProps), d.props) : d.props, y = v.stackId, p = v.hide;
if (p)
return s;
var b = v[n]
, w = s[b] || {
hasStack: !1,
stackGroups: {}
};
if (Ae(y)) {
var x = w.stackGroups[y] || {
numericAxisId: n,
cateAxisId: i,
items: []
};
x.items.push(d),
w.hasStack = !0,
w.stackGroups[y] = x
} else
w.stackGroups[pi("_stackId_")] = {
numericAxisId: n,
cateAxisId: i,
items: [d]
};
return me(me({}, s), {}, $r({}, b, w))
}, c)
, f = {};
return Object.keys(l).reduce(function(s, d) {
var h = l[d];
if (h.hasStack) {
var v = {};
h.stackGroups = Object.keys(h.stackGroups).reduce(function(y, p) {
var b = h.stackGroups[p];
return me(me({}, y), {}, $r({}, p, {
numericAxisId: n,
cateAxisId: i,
items: b.items,
stackedData: mk(t, b.items, a)
}))
}, v)
}
return me(me({}, s), {}, $r({}, d, h))
}, f)
}
, xk = function(t, r) {
var n = r.realScaleType
, i = r.type
, a = r.tickCount
, o = r.originalDomain
, u = r.allowDecimals
, c = n || r.scale;
if (c !== "auto" && c !== "linear")
return null;
if (a && i === "number" && o && (o[0] === "auto" || o[1] === "auto")) {
var l = t.domain();
if (!l.length)
return null;
var f = C2(l, a, u);
return t.domain([ho(f), Lt(f)]),
{
niceTicks: f
}
}
if (a && i === "number") {
var s = t.domain()
, d = I2(s, a, u);
return {
niceTicks: d
}
}
return null
};
function dd(e) {
var t = e.axis
, r = e.ticks
, n = e.bandSize
, i = e.entry
, a = e.index
, o = e.dataKey;
if (t.type === "category") {
if (!t.allowDuplicatedCategory && t.dataKey && !te(i[t.dataKey])) {
var u = Bi(r, "value", i[t.dataKey]);
if (u)
return u.coordinate + n / 2
}
return r[a] ? r[a].coordinate + n / 2 : null
}
var c = Ue(i, te(o) ? t.dataKey : o);
return te(c) ? null : t.scale(c)
}
var hd = function(t) {
var r = t.axis
, n = t.ticks
, i = t.offset
, a = t.bandSize
, o = t.entry
, u = t.index;
if (r.type === "category")
return n[u] ? n[u].coordinate + i : null;
var c = Ue(o, r.dataKey, r.domain[u]);
return te(c) ? null : r.scale(c) - a / 2 + i
}
, wk = function(t) {
var r = t.numericAxis
, n = r.scale.domain();
if (r.type === "number") {
var i = Math.min(n[0], n[1])
, a = Math.max(n[0], n[1]);
return i <= 0 && a >= 0 ? 0 : a < 0 ? a : i
}
return n[0]
}
, Ok = function(t, r) {
var n, i = (n = t.type) !== null && n !== void 0 && n.defaultProps ? me(me({}, t.type.defaultProps), t.props) : t.props, a = i.stackId;
if (Ae(a)) {
var o = r[a];
if (o) {
var u = o.items.indexOf(t);
return u >= 0 ? o.stackedData[u] : null
}
}
return null
}
, Sk = function(t) {
return t.reduce(function(r, n) {
return [ho(n.concat([r[0]]).filter(R)), Lt(n.concat([r[1]]).filter(R))]
}, [1 / 0, -1 / 0])
}
, vy = function(t, r, n) {
return Object.keys(t).reduce(function(i, a) {
var o = t[a]
, u = o.stackedData
, c = u.reduce(function(l, f) {
var s = Sk(f.slice(r, n + 1));
return [Math.min(l[0], s[0]), Math.max(l[1], s[1])]
}, [1 / 0, -1 / 0]);
return [Math.min(c[0], i[0]), Math.max(c[1], i[1])]
}, [1 / 0, -1 / 0]).map(function(i) {
return i === 1 / 0 || i === -1 / 0 ? 0 : i
})
}
, pd = /^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/
, vd = /^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/
, Uu = function(t, r, n) {
if (J(t))
return t(r, n);
if (!Array.isArray(t))
return r;
var i = [];
if (R(t[0]))
i[0] = n ? t[0] : Math.min(t[0], r[0]);
else if (pd.test(t[0])) {
var a = +pd.exec(t[0])[1];
i[0] = r[0] - a
} else
J(t[0]) ? i[0] = t[0](r[0]) : i[0] = r[0];
if (R(t[1]))
i[1] = n ? t[1] : Math.max(t[1], r[1]);
else if (vd.test(t[1])) {
var o = +vd.exec(t[1])[1];
i[1] = r[1] + o
} else
J(t[1]) ? i[1] = t[1](r[1]) : i[1] = r[1];
return i
}
, ha = function(t, r, n) {
if (t && t.scale && t.scale.bandwidth) {
var i = t.scale.bandwidth();
if (!n || i > 0)
return i
}
if (t && r && r.length >= 2) {
for (var a = Qc(r, function(s) {
return s.coordinate
}), o = 1 / 0, u = 1, c = a.length; u < c; u++) {
var l = a[u]
, f = a[u - 1];
o = Math.min((l.coordinate || 0) - (f.coordinate || 0), o)
}
return o === 1 / 0 ? 0 : o
}
return n ? void 0 : 0
}
, yd = function(t, r, n) {
return !t || !t.length || zn(t, Ve(n, "type.defaultProps.domain")) ? r : t
}
, yy = function(t, r) {
var n = t.type.defaultProps ? me(me({}, t.type.defaultProps), t.props) : t.props
, i = n.dataKey
, a = n.name
, o = n.unit
, u = n.formatter
, c = n.tooltipType
, l = n.chartType
, f = n.hide;
return me(me({}, Q(t, !1)), {}, {
dataKey: i,
unit: o,
formatter: u,
name: a || i,
color: Al(t),
value: Ue(r, i),
type: c,
payload: r,
chartType: l,
hide: f
})
};
function Kn(e) {
"@babel/helpers - typeof";
return Kn = 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
}
,
Kn(e)
}
function gd(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 md(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? gd(Object(r), !0).forEach(function(n) {
Pk(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : gd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Pk(e, t, r) {
return t = Ak(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Ak(e) {
var t = _k(e, "string");
return Kn(t) == "symbol" ? t : t + ""
}
function _k(e, t) {
if (Kn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Kn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var pa = Math.PI / 180
, $k = function(t) {
return t * 180 / Math.PI
}
, Ce = function(t, r, n, i) {
return {
x: t + Math.cos(-pa * i) * n,
y: r + Math.sin(-pa * i) * n
}
}
, Tk = function(t, r) {
var n = t.x
, i = t.y
, a = r.x
, o = r.y;
return Math.sqrt(Math.pow(n - a, 2) + Math.pow(i - o, 2))
}
, jk = function(t, r) {
var n = t.x
, i = t.y
, a = r.cx
, o = r.cy
, u = Tk({
x: n,
y: i
}, {
x: a,
y: o
});
if (u <= 0)
return {
radius: u
};
var c = (n - a) / u
, l = Math.acos(c);
return i > o && (l = 2 * Math.PI - l),
{
radius: u,
angle: $k(l),
angleInRadian: l
}
}
, Ek = function(t) {
var r = t.startAngle
, n = t.endAngle
, i = Math.floor(r / 360)
, a = Math.floor(n / 360)
, o = Math.min(i, a);
return {
startAngle: r - o * 360,
endAngle: n - o * 360
}
}
, Mk = function(t, r) {
var n = r.startAngle
, i = r.endAngle
, a = Math.floor(n / 360)
, o = Math.floor(i / 360)
, u = Math.min(a, o);
return t + u * 360
}
, bd = function(t, r) {
var n = t.x
, i = t.y
, a = jk({
x: n,
y: i
}, r)
, o = a.radius
, u = a.angle
, c = r.innerRadius
, l = r.outerRadius;
if (o < c || o > l)
return !1;
if (o === 0)
return !0;
var f = Ek(r), s = f.startAngle, d = f.endAngle, h = u, v;
if (s <= d) {
for (; h > d; )
h -= 360;
for (; h < s; )
h += 360;
v = h >= s && h <= d
} else {
for (; h > s; )
h -= 360;
for (; h < d; )
h += 360;
v = h >= d && h <= s
}
return v ? md(md({}, r), {}, {
radius: o,
angle: Mk(h, r)
}) : null
};
function Gn(e) {
"@babel/helpers - typeof";
return Gn = 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
}
,
Gn(e)
}
var Ck = ["offset"];
function Ik(e) {
return Bk(e) || Nk(e) || Dk(e) || kk()
}
function kk() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function Dk(e, t) {
if (e) {
if (typeof e == "string")
return Hu(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 Hu(e, t)
}
}
function Nk(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function Bk(e) {
if (Array.isArray(e))
return Hu(e)
}
function Hu(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 Lk(e, t) {
if (e == null)
return {};
var r = Rk(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 Rk(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function xd(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 Se(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? xd(Object(r), !0).forEach(function(n) {
Fk(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : xd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Fk(e, t, r) {
return t = zk(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function zk(e) {
var t = Wk(e, "string");
return Gn(t) == "symbol" ? t : t + ""
}
function Wk(e, t) {
if (Gn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Gn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function Yn() {
return Yn = 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
}
,
Yn.apply(this, arguments)
}
var Uk = function(t) {
var r = t.value
, n = t.formatter
, i = te(t.children) ? r : t.children;
return J(n) ? n(i) : i
}
, Hk = function(t, r) {
var n = it(r - t)
, i = Math.min(Math.abs(r - t), 360);
return n * i
}
, qk = function(t, r, n) {
var i = t.position, a = t.viewBox, o = t.offset, u = t.className, c = a, l = c.cx, f = c.cy, s = c.innerRadius, d = c.outerRadius, h = c.startAngle, v = c.endAngle, y = c.clockWise, p = (s + d) / 2, b = Hk(h, v), w = b >= 0 ? 1 : -1, x, O;
i === "insideStart" ? (x = h + w * o,
O = y) : i === "insideEnd" ? (x = v - w * o,
O = !y) : i === "end" && (x = v + w * o,
O = y),
O = b <= 0 ? O : !O;
var g = Ce(l, f, p, x)
, m = Ce(l, f, p, x + (O ? 1 : -1) * 359)
, S = "M".concat(g.x, ",").concat(g.y, `
A`).concat(p, ",").concat(p, ",0,1,").concat(O ? 0 : 1, `,
`).concat(m.x, ",").concat(m.y)
, P = te(t.id) ? pi("recharts-radial-line-") : t.id;
return A.createElement("text", Yn({}, n, {
dominantBaseline: "central",
className: re("recharts-radial-bar-label", u)
}), A.createElement("defs", null, A.createElement("path", {
id: P,
d: S
})), A.createElement("textPath", {
xlinkHref: "#".concat(P)
}, r))
}
, Kk = function(t) {
var r = t.viewBox
, n = t.offset
, i = t.position
, a = r
, o = a.cx
, u = a.cy
, c = a.innerRadius
, l = a.outerRadius
, f = a.startAngle
, s = a.endAngle
, d = (f + s) / 2;
if (i === "outside") {
var h = Ce(o, u, l + n, d)
, v = h.x
, y = h.y;
return {
x: v,
y,
textAnchor: v >= o ? "start" : "end",
verticalAnchor: "middle"
}
}
if (i === "center")
return {
x: o,
y: u,
textAnchor: "middle",
verticalAnchor: "middle"
};
if (i === "centerTop")
return {
x: o,
y: u,
textAnchor: "middle",
verticalAnchor: "start"
};
if (i === "centerBottom")
return {
x: o,
y: u,
textAnchor: "middle",
verticalAnchor: "end"
};
var p = (c + l) / 2
, b = Ce(o, u, p, d)
, w = b.x
, x = b.y;
return {
x: w,
y: x,
textAnchor: "middle",
verticalAnchor: "middle"
}
}
, Gk = function(t) {
var r = t.viewBox
, n = t.parentViewBox
, i = t.offset
, a = t.position
, o = r
, u = o.x
, c = o.y
, l = o.width
, f = o.height
, s = f >= 0 ? 1 : -1
, d = s * i
, h = s > 0 ? "end" : "start"
, v = s > 0 ? "start" : "end"
, y = l >= 0 ? 1 : -1
, p = y * i
, b = y > 0 ? "end" : "start"
, w = y > 0 ? "start" : "end";
if (a === "top") {
var x = {
x: u + l / 2,
y: c - s * i,
textAnchor: "middle",
verticalAnchor: h
};
return Se(Se({}, x), n ? {
height: Math.max(c - n.y, 0),
width: l
} : {})
}
if (a === "bottom") {
var O = {
x: u + l / 2,
y: c + f + d,
textAnchor: "middle",
verticalAnchor: v
};
return Se(Se({}, O), n ? {
height: Math.max(n.y + n.height - (c + f), 0),
width: l
} : {})
}
if (a === "left") {
var g = {
x: u - p,
y: c + f / 2,
textAnchor: b,
verticalAnchor: "middle"
};
return Se(Se({}, g), n ? {
width: Math.max(g.x - n.x, 0),
height: f
} : {})
}
if (a === "right") {
var m = {
x: u + l + p,
y: c + f / 2,
textAnchor: w,
verticalAnchor: "middle"
};
return Se(Se({}, m), n ? {
width: Math.max(n.x + n.width - m.x, 0),
height: f
} : {})
}
var S = n ? {
width: l,
height: f
} : {};
return a === "insideLeft" ? Se({
x: u + p,
y: c + f / 2,
textAnchor: w,
verticalAnchor: "middle"
}, S) : a === "insideRight" ? Se({
x: u + l - p,
y: c + f / 2,
textAnchor: b,
verticalAnchor: "middle"
}, S) : a === "insideTop" ? Se({
x: u + l / 2,
y: c + d,
textAnchor: "middle",
verticalAnchor: v
}, S) : a === "insideBottom" ? Se({
x: u + l / 2,
y: c + f - d,
textAnchor: "middle",
verticalAnchor: h
}, S) : a === "insideTopLeft" ? Se({
x: u + p,
y: c + d,
textAnchor: w,
verticalAnchor: v
}, S) : a === "insideTopRight" ? Se({
x: u + l - p,
y: c + d,
textAnchor: b,
verticalAnchor: v
}, S) : a === "insideBottomLeft" ? Se({
x: u + p,
y: c + f - d,
textAnchor: w,
verticalAnchor: h
}, S) : a === "insideBottomRight" ? Se({
x: u + l - p,
y: c + f - d,
textAnchor: b,
verticalAnchor: h
}, S) : Zr(a) && (R(a.x) || er(a.x)) && (R(a.y) || er(a.y)) ? Se({
x: u + lr(a.x, l),
y: c + lr(a.y, f),
textAnchor: "end",
verticalAnchor: "end"
}, S) : Se({
x: u + l / 2,
y: c + f / 2,
textAnchor: "middle",
verticalAnchor: "middle"
}, S)
}
, Yk = function(t) {
return "cx"in t && R(t.cx)
};
function Pe(e) {
var t = e.offset
, r = t === void 0 ? 5 : t
, n = Lk(e, Ck)
, i = Se({
offset: r
}, n)
, a = i.viewBox
, o = i.position
, u = i.value
, c = i.children
, l = i.content
, f = i.className
, s = f === void 0 ? "" : f
, d = i.textBreakAll;
if (!a || te(u) && te(c) && !L.isValidElement(l) && !J(l))
return null;
if (L.isValidElement(l))
return L.cloneElement(l, i);
var h;
if (J(l)) {
if (h = L.createElement(l, i),
L.isValidElement(h))
return h
} else
h = Uk(i);
var v = Yk(a)
, y = Q(i, !0);
if (v && (o === "insideStart" || o === "insideEnd" || o === "end"))
return qk(i, h, y);
var p = v ? Kk(i) : Gk(i);
return A.createElement(Qi, Yn({
className: re("recharts-label", s)
}, y, p, {
breakAll: d
}), h)
}
Pe.displayName = "Label";
var gy = function(t) {
var r = t.cx
, n = t.cy
, i = t.angle
, a = t.startAngle
, o = t.endAngle
, u = t.r
, c = t.radius
, l = t.innerRadius
, f = t.outerRadius
, s = t.x
, d = t.y
, h = t.top
, v = t.left
, y = t.width
, p = t.height
, b = t.clockWise
, w = t.labelViewBox;
if (w)
return w;
if (R(y) && R(p)) {
if (R(s) && R(d))
return {
x: s,
y: d,
width: y,
height: p
};
if (R(h) && R(v))
return {
x: h,
y: v,
width: y,
height: p
}
}
return R(s) && R(d) ? {
x: s,
y: d,
width: 0,
height: 0
} : R(r) && R(n) ? {
cx: r,
cy: n,
startAngle: a || i || 0,
endAngle: o || i || 0,
innerRadius: l || 0,
outerRadius: f || c || u || 0,
clockWise: b
} : t.viewBox ? t.viewBox : {}
}
, Vk = function(t, r) {
return t ? t === !0 ? A.createElement(Pe, {
key: "label-implicit",
viewBox: r
}) : Ae(t) ? A.createElement(Pe, {
key: "label-implicit",
viewBox: r,
value: t
}) : L.isValidElement(t) ? t.type === Pe ? L.cloneElement(t, {
key: "label-implicit",
viewBox: r
}) : A.createElement(Pe, {
key: "label-implicit",
content: t,
viewBox: r
}) : J(t) ? A.createElement(Pe, {
key: "label-implicit",
content: t,
viewBox: r
}) : Zr(t) ? A.createElement(Pe, Yn({
viewBox: r
}, t, {
key: "label-implicit"
})) : null : null
}
, Xk = function(t, r) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
if (!t || !t.children && n && !t.label)
return null;
var i = t.children
, a = gy(t)
, o = at(i, Pe).map(function(c, l) {
return L.cloneElement(c, {
viewBox: r || a,
key: "label-".concat(l)
})
});
if (!n)
return o;
var u = Vk(t.label, r || a);
return [u].concat(Ik(o))
};
Pe.parseViewBox = gy;
Pe.renderCallByParent = Xk;
function Zk(e) {
var t = e == null ? 0 : e.length;
return t ? e[t - 1] : void 0
}
var Jk = Zk;
const Qk = de(Jk);
function Vn(e) {
"@babel/helpers - typeof";
return Vn = 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
}
,
Vn(e)
}
var eD = ["valueAccessor"]
, tD = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
function rD(e) {
return oD(e) || aD(e) || iD(e) || nD()
}
function nD() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function iD(e, t) {
if (e) {
if (typeof e == "string")
return qu(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 qu(e, t)
}
}
function aD(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function oD(e) {
if (Array.isArray(e))
return qu(e)
}
function qu(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 va() {
return va = 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
}
,
va.apply(this, arguments)
}
function wd(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 Od(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? wd(Object(r), !0).forEach(function(n) {
uD(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : wd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function uD(e, t, r) {
return t = cD(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function cD(e) {
var t = lD(e, "string");
return Vn(t) == "symbol" ? t : t + ""
}
function lD(e, t) {
if (Vn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Vn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function Sd(e, t) {
if (e == null)
return {};
var r = sD(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 sD(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
var fD = function(t) {
return Array.isArray(t.value) ? Qk(t.value) : t.value
};
function Wt(e) {
var t = e.valueAccessor
, r = t === void 0 ? fD : t
, n = Sd(e, eD)
, i = n.data
, a = n.dataKey
, o = n.clockWise
, u = n.id
, c = n.textBreakAll
, l = Sd(n, tD);
return !i || !i.length ? null : A.createElement(ye, {
className: "recharts-label-list"
}, i.map(function(f, s) {
var d = te(a) ? r(f, s) : Ue(f && f.payload, a)
, h = te(u) ? {} : {
id: "".concat(u, "-").concat(s)
};
return A.createElement(Pe, va({}, Q(f, !0), l, h, {
parentViewBox: f.parentViewBox,
value: d,
textBreakAll: c,
viewBox: Pe.parseViewBox(te(o) ? f : Od(Od({}, f), {}, {
clockWise: o
})),
key: "label-".concat(s),
index: s
}))
}))
}
Wt.displayName = "LabelList";
function dD(e, t) {
return e ? e === !0 ? A.createElement(Wt, {
key: "labelList-implicit",
data: t
}) : A.isValidElement(e) || J(e) ? A.createElement(Wt, {
key: "labelList-implicit",
data: t,
content: e
}) : Zr(e) ? A.createElement(Wt, va({
data: t
}, e, {
key: "labelList-implicit"
})) : null : null
}
function hD(e, t) {
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
if (!e || !e.children && r && !e.label)
return null;
var n = e.children
, i = at(n, Wt).map(function(o, u) {
return L.cloneElement(o, {
data: t,
key: "labelList-".concat(u)
})
});
if (!r)
return i;
var a = dD(e.label, t);
return [a].concat(rD(i))
}
Wt.renderCallByParent = hD;
function Xn(e) {
"@babel/helpers - typeof";
return Xn = 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
}
,
Xn(e)
}
function Ku() {
return Ku = 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
}
,
Ku.apply(this, arguments)
}
function Pd(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 Ad(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Pd(Object(r), !0).forEach(function(n) {
pD(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Pd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function pD(e, t, r) {
return t = vD(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function vD(e) {
var t = yD(e, "string");
return Xn(t) == "symbol" ? t : t + ""
}
function yD(e, t) {
if (Xn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Xn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var gD = function(t, r) {
var n = it(r - t)
, i = Math.min(Math.abs(r - t), 359.999);
return n * i
}
, Ci = function(t) {
var r = t.cx
, n = t.cy
, i = t.radius
, a = t.angle
, o = t.sign
, u = t.isExternal
, c = t.cornerRadius
, l = t.cornerIsExternal
, f = c * (u ? 1 : -1) + i
, s = Math.asin(c / f) / pa
, d = l ? a : a + o * s
, h = Ce(r, n, f, d)
, v = Ce(r, n, i, d)
, y = l ? a - o * s : a
, p = Ce(r, n, f * Math.cos(s * pa), y);
return {
center: h,
circleTangency: v,
lineTangency: p,
theta: s
}
}
, my = function(t) {
var r = t.cx
, n = t.cy
, i = t.innerRadius
, a = t.outerRadius
, o = t.startAngle
, u = t.endAngle
, c = gD(o, u)
, l = o + c
, f = Ce(r, n, a, o)
, s = Ce(r, n, a, l)
, d = "M ".concat(f.x, ",").concat(f.y, `
A `).concat(a, ",").concat(a, `,0,
`).concat(+(Math.abs(c) > 180), ",").concat(+(o > l), `,
`).concat(s.x, ",").concat(s.y, `
`);
if (i > 0) {
var h = Ce(r, n, i, o)
, v = Ce(r, n, i, l);
d += "L ".concat(v.x, ",").concat(v.y, `
A `).concat(i, ",").concat(i, `,0,
`).concat(+(Math.abs(c) > 180), ",").concat(+(o <= l), `,
`).concat(h.x, ",").concat(h.y, " Z")
} else
d += "L ".concat(r, ",").concat(n, " Z");
return d
}
, mD = function(t) {
var r = t.cx
, n = t.cy
, i = t.innerRadius
, a = t.outerRadius
, o = t.cornerRadius
, u = t.forceCornerRadius
, c = t.cornerIsExternal
, l = t.startAngle
, f = t.endAngle
, s = it(f - l)
, d = Ci({
cx: r,
cy: n,
radius: a,
angle: l,
sign: s,
cornerRadius: o,
cornerIsExternal: c
})
, h = d.circleTangency
, v = d.lineTangency
, y = d.theta
, p = Ci({
cx: r,
cy: n,
radius: a,
angle: f,
sign: -s,
cornerRadius: o,
cornerIsExternal: c
})
, b = p.circleTangency
, w = p.lineTangency
, x = p.theta
, O = c ? Math.abs(l - f) : Math.abs(l - f) - y - x;
if (O < 0)
return u ? "M ".concat(v.x, ",").concat(v.y, `
a`).concat(o, ",").concat(o, ",0,0,1,").concat(o * 2, `,0
a`).concat(o, ",").concat(o, ",0,0,1,").concat(-o * 2, `,0
`) : my({
cx: r,
cy: n,
innerRadius: i,
outerRadius: a,
startAngle: l,
endAngle: f
});
var g = "M ".concat(v.x, ",").concat(v.y, `
A`).concat(o, ",").concat(o, ",0,0,").concat(+(s < 0), ",").concat(h.x, ",").concat(h.y, `
A`).concat(a, ",").concat(a, ",0,").concat(+(O > 180), ",").concat(+(s < 0), ",").concat(b.x, ",").concat(b.y, `
A`).concat(o, ",").concat(o, ",0,0,").concat(+(s < 0), ",").concat(w.x, ",").concat(w.y, `
`);
if (i > 0) {
var m = Ci({
cx: r,
cy: n,
radius: i,
angle: l,
sign: s,
isExternal: !0,
cornerRadius: o,
cornerIsExternal: c
})
, S = m.circleTangency
, P = m.lineTangency
, _ = m.theta
, j = Ci({
cx: r,
cy: n,
radius: i,
angle: f,
sign: -s,
isExternal: !0,
cornerRadius: o,
cornerIsExternal: c
})
, $ = j.circleTangency
, T = j.lineTangency
, C = j.theta
, k = c ? Math.abs(l - f) : Math.abs(l - f) - _ - C;
if (k < 0 && o === 0)
return "".concat(g, "L").concat(r, ",").concat(n, "Z");
g += "L".concat(T.x, ",").concat(T.y, `
A`).concat(o, ",").concat(o, ",0,0,").concat(+(s < 0), ",").concat($.x, ",").concat($.y, `
A`).concat(i, ",").concat(i, ",0,").concat(+(k > 180), ",").concat(+(s > 0), ",").concat(S.x, ",").concat(S.y, `
A`).concat(o, ",").concat(o, ",0,0,").concat(+(s < 0), ",").concat(P.x, ",").concat(P.y, "Z")
} else
g += "L".concat(r, ",").concat(n, "Z");
return g
}
, bD = {
cx: 0,
cy: 0,
innerRadius: 0,
outerRadius: 0,
startAngle: 0,
endAngle: 0,
cornerRadius: 0,
forceCornerRadius: !1,
cornerIsExternal: !1
}
, by = function(t) {
var r = Ad(Ad({}, bD), t)
, n = r.cx
, i = r.cy
, a = r.innerRadius
, o = r.outerRadius
, u = r.cornerRadius
, c = r.forceCornerRadius
, l = r.cornerIsExternal
, f = r.startAngle
, s = r.endAngle
, d = r.className;
if (o < a || f === s)
return null;
var h = re("recharts-sector", d), v = o - a, y = lr(u, v, 0, !0), p;
return y > 0 && Math.abs(f - s) < 360 ? p = mD({
cx: n,
cy: i,
innerRadius: a,
outerRadius: o,
cornerRadius: Math.min(y, v / 2),
forceCornerRadius: c,
cornerIsExternal: l,
startAngle: f,
endAngle: s
}) : p = my({
cx: n,
cy: i,
innerRadius: a,
outerRadius: o,
startAngle: f,
endAngle: s
}),
A.createElement("path", Ku({}, Q(r, !0), {
className: h,
d: p,
role: "img"
}))
};
function Zn(e) {
"@babel/helpers - typeof";
return Zn = 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
}
,
Zn(e)
}
function Gu() {
return Gu = 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
}
,
Gu.apply(this, arguments)
}
function _d(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 $d(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? _d(Object(r), !0).forEach(function(n) {
xD(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : _d(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function xD(e, t, r) {
return t = wD(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function wD(e) {
var t = OD(e, "string");
return Zn(t) == "symbol" ? t : t + ""
}
function OD(e, t) {
if (Zn(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Zn(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var Td = {
curveBasisClosed: x1,
curveBasisOpen: w1,
curveBasis: b1,
curveBumpX: a1,
curveBumpY: o1,
curveLinearClosed: O1,
curveLinear: to,
curveMonotoneX: S1,
curveMonotoneY: P1,
curveNatural: A1,
curveStep: _1,
curveStepAfter: T1,
curveStepBefore: $1
}
, Ii = function(t) {
return t.x === +t.x && t.y === +t.y
}
, mn = function(t) {
return t.x
}
, bn = function(t) {
return t.y
}
, SD = function(t, r) {
if (J(t))
return t;
var n = "curve".concat(Qa(t));
return (n === "curveMonotone" || n === "curveBump") && r ? Td["".concat(n).concat(r === "vertical" ? "Y" : "X")] : Td[n] || to
}
, PD = function(t) {
var r = t.type, n = r === void 0 ? "linear" : r, i = t.points, a = i === void 0 ? [] : i, o = t.baseLine, u = t.layout, c = t.connectNulls, l = c === void 0 ? !1 : c, f = SD(n, u), s = l ? a.filter(function(y) {
return Ii(y)
}) : a, d;
if (Array.isArray(o)) {
var h = l ? o.filter(function(y) {
return Ii(y)
}) : o
, v = s.map(function(y, p) {
return $d($d({}, y), {}, {
base: h[p]
})
});
return u === "vertical" ? d = Si().y(bn).x1(mn).x0(function(y) {
return y.base.x
}) : d = Si().x(mn).y1(bn).y0(function(y) {
return y.base.y
}),
d.defined(Ii).curve(f),
d(v)
}
return u === "vertical" && R(o) ? d = Si().y(bn).x1(mn).x0(o) : R(o) ? d = Si().x(mn).y1(bn).y0(o) : d = bp().x(mn).y(bn),
d.defined(Ii).curve(f),
d(s)
}
, _n = function(t) {
var r = t.className
, n = t.points
, i = t.path
, a = t.pathRef;
if ((!n || !n.length) && !i)
return null;
var o = n && n.length ? PD(t) : i;
return A.createElement("path", Gu({}, Q(t, !1), Li(t), {
className: re("recharts-curve", r),
d: o,
ref: a
}))
}
, AD = Object.getOwnPropertyNames
, _D = Object.getOwnPropertySymbols
, $D = Object.prototype.hasOwnProperty;
function jd(e, t) {
return function(n, i, a) {
return e(n, i, a) && t(n, i, a)
}
}
function ki(e) {
return function(r, n, i) {
if (!r || !n || typeof r != "object" || typeof n != "object")
return e(r, n, i);
var a = i.cache
, o = a.get(r)
, u = a.get(n);
if (o && u)
return o === n && u === r;
a.set(r, n),
a.set(n, r);
var c = e(r, n, i);
return a.delete(r),
a.delete(n),
c
}
}
function Ed(e) {
return AD(e).concat(_D(e))
}
var xy = Object.hasOwn || function(e, t) {
return $D.call(e, t)
}
;
function ln(e, t) {
return e || t ? e === t : e === t || e !== e && t !== t
}
var wy = "_owner"
, Md = Object.getOwnPropertyDescriptor
, Cd = Object.keys;
function TD(e, t, r) {
var n = e.length;
if (t.length !== n)
return !1;
for (; n-- > 0; )
if (!r.equals(e[n], t[n], n, n, e, t, r))
return !1;
return !0
}
function jD(e, t) {
return ln(e.getTime(), t.getTime())
}
function Id(e, t, r) {
if (e.size !== t.size)
return !1;
for (var n = {}, i = e.entries(), a = 0, o, u; (o = i.next()) && !o.done; ) {
for (var c = t.entries(), l = !1, f = 0; (u = c.next()) && !u.done; ) {
var s = o.value
, d = s[0]
, h = s[1]
, v = u.value
, y = v[0]
, p = v[1];
!l && !n[f] && (l = r.equals(d, y, a, f, e, t, r) && r.equals(h, p, d, y, e, t, r)) && (n[f] = !0),
f++
}
if (!l)
return !1;
a++
}
return !0
}
function ED(e, t, r) {
var n = Cd(e)
, i = n.length;
if (Cd(t).length !== i)
return !1;
for (var a; i-- > 0; )
if (a = n[i],
a === wy && (e.$$typeof || t.$$typeof) && e.$$typeof !== t.$$typeof || !xy(t, a) || !r.equals(e[a], t[a], a, a, e, t, r))
return !1;
return !0
}
function xn(e, t, r) {
var n = Ed(e)
, i = n.length;
if (Ed(t).length !== i)
return !1;
for (var a, o, u; i-- > 0; )
if (a = n[i],
a === wy && (e.$$typeof || t.$$typeof) && e.$$typeof !== t.$$typeof || !xy(t, a) || !r.equals(e[a], t[a], a, a, e, t, r) || (o = Md(e, a),
u = Md(t, a),
(o || u) && (!o || !u || o.configurable !== u.configurable || o.enumerable !== u.enumerable || o.writable !== u.writable)))
return !1;
return !0
}
function MD(e, t) {
return ln(e.valueOf(), t.valueOf())
}
function CD(e, t) {
return e.source === t.source && e.flags === t.flags
}
function kd(e, t, r) {
if (e.size !== t.size)
return !1;
for (var n = {}, i = e.values(), a, o; (a = i.next()) && !a.done; ) {
for (var u = t.values(), c = !1, l = 0; (o = u.next()) && !o.done; )
!c && !n[l] && (c = r.equals(a.value, o.value, a.value, o.value, e, t, r)) && (n[l] = !0),
l++;
if (!c)
return !1
}
return !0
}
function ID(e, t) {
var r = e.length;
if (t.length !== r)
return !1;
for (; r-- > 0; )
if (e[r] !== t[r])
return !1;
return !0
}
var kD = "[object Arguments]"
, DD = "[object Boolean]"
, ND = "[object Date]"
, BD = "[object Map]"
, LD = "[object Number]"
, RD = "[object Object]"
, FD = "[object RegExp]"
, zD = "[object Set]"
, WD = "[object String]"
, UD = Array.isArray
, Dd = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null
, Nd = Object.assign
, HD = Object.prototype.toString.call.bind(Object.prototype.toString);
function qD(e) {
var t = e.areArraysEqual
, r = e.areDatesEqual
, n = e.areMapsEqual
, i = e.areObjectsEqual
, a = e.arePrimitiveWrappersEqual
, o = e.areRegExpsEqual
, u = e.areSetsEqual
, c = e.areTypedArraysEqual;
return function(f, s, d) {
if (f === s)
return !0;
if (f == null || s == null || typeof f != "object" || typeof s != "object")
return f !== f && s !== s;
var h = f.constructor;
if (h !== s.constructor)
return !1;
if (h === Object)
return i(f, s, d);
if (UD(f))
return t(f, s, d);
if (Dd != null && Dd(f))
return c(f, s, d);
if (h === Date)
return r(f, s, d);
if (h === RegExp)
return o(f, s, d);
if (h === Map)
return n(f, s, d);
if (h === Set)
return u(f, s, d);
var v = HD(f);
return v === ND ? r(f, s, d) : v === FD ? o(f, s, d) : v === BD ? n(f, s, d) : v === zD ? u(f, s, d) : v === RD ? typeof f.then != "function" && typeof s.then != "function" && i(f, s, d) : v === kD ? i(f, s, d) : v === DD || v === LD || v === WD ? a(f, s, d) : !1
}
}
function KD(e) {
var t = e.circular
, r = e.createCustomConfig
, n = e.strict
, i = {
areArraysEqual: n ? xn : TD,
areDatesEqual: jD,
areMapsEqual: n ? jd(Id, xn) : Id,
areObjectsEqual: n ? xn : ED,
arePrimitiveWrappersEqual: MD,
areRegExpsEqual: CD,
areSetsEqual: n ? jd(kd, xn) : kd,
areTypedArraysEqual: n ? xn : ID
};
if (r && (i = Nd({}, i, r(i))),
t) {
var a = ki(i.areArraysEqual)
, o = ki(i.areMapsEqual)
, u = ki(i.areObjectsEqual)
, c = ki(i.areSetsEqual);
i = Nd({}, i, {
areArraysEqual: a,
areMapsEqual: o,
areObjectsEqual: u,
areSetsEqual: c
})
}
return i
}
function GD(e) {
return function(t, r, n, i, a, o, u) {
return e(t, r, u)
}
}
function YD(e) {
var t = e.circular
, r = e.comparator
, n = e.createState
, i = e.equals
, a = e.strict;
if (n)
return function(c, l) {
var f = n()
, s = f.cache
, d = s === void 0 ? t ? new WeakMap : void 0 : s
, h = f.meta;
return r(c, l, {
cache: d,
equals: i,
meta: h,
strict: a
})
}
;
if (t)
return function(c, l) {
return r(c, l, {
cache: new WeakMap,
equals: i,
meta: void 0,
strict: a
})
}
;
var o = {
cache: void 0,
equals: i,
meta: void 0,
strict: a
};
return function(c, l) {
return r(c, l, o)
}
}
var VD = Gt();
Gt({
strict: !0
});
Gt({
circular: !0
});
Gt({
circular: !0,
strict: !0
});
Gt({
createInternalComparator: function() {
return ln
}
});
Gt({
strict: !0,
createInternalComparator: function() {
return ln
}
});
Gt({
circular: !0,
createInternalComparator: function() {
return ln
}
});
Gt({
circular: !0,
createInternalComparator: function() {
return ln
},
strict: !0
});
function Gt(e) {
e === void 0 && (e = {});
var t = e.circular
, r = t === void 0 ? !1 : t
, n = e.createInternalComparator
, i = e.createState
, a = e.strict
, o = a === void 0 ? !1 : a
, u = KD(e)
, c = qD(u)
, l = n ? n(c) : GD(c);
return YD({
circular: r,
comparator: c,
createState: i,
equals: l,
strict: o
})
}
function XD(e) {
typeof requestAnimationFrame < "u" && requestAnimationFrame(e)
}
function Bd(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0
, r = -1
, n = function i(a) {
r < 0 && (r = a),
a - r > t ? (e(a),
r = -1) : XD(i)
};
requestAnimationFrame(n)
}
function Yu(e) {
"@babel/helpers - typeof";
return Yu = 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
}
,
Yu(e)
}
function ZD(e) {
return tN(e) || eN(e) || QD(e) || JD()
}
function JD() {
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 QD(e, t) {
if (e) {
if (typeof e == "string")
return Ld(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 Ld(e, t)
}
}
function Ld(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 eN(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function tN(e) {
if (Array.isArray(e))
return e
}
function rN() {
var e = {}
, t = function() {
return null
}
, r = !1
, n = function i(a) {
if (!r) {
if (Array.isArray(a)) {
if (!a.length)
return;
var o = a
, u = ZD(o)
, c = u[0]
, l = u.slice(1);
if (typeof c == "number") {
Bd(i.bind(null, l), c);
return
}
i(c),
Bd(i.bind(null, l));
return
}
Yu(a) === "object" && (e = a,
t(e)),
typeof a == "function" && a()
}
};
return {
stop: function() {
r = !0
},
start: function(a) {
r = !1,
n(a)
},
subscribe: function(a) {
return t = a,
function() {
t = function() {
return null
}
}
}
}
}
function Jn(e) {
"@babel/helpers - typeof";
return Jn = 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
}
,
Jn(e)
}
function Rd(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 Fd(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Rd(Object(r), !0).forEach(function(n) {
Oy(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Rd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Oy(e, t, r) {
return t = nN(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function nN(e) {
var t = iN(e, "string");
return Jn(t) === "symbol" ? t : String(t)
}
function iN(e, t) {
if (Jn(e) !== "object" || e === null)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Jn(n) !== "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var aN = function(t, r) {
return [Object.keys(t), Object.keys(r)].reduce(function(n, i) {
return n.filter(function(a) {
return i.includes(a)
})
})
}
, oN = function(t) {
return t
}
, uN = function(t) {
return t.replace(/([A-Z])/g, function(r) {
return "-".concat(r.toLowerCase())
})
}
, $n = function(t, r) {
return Object.keys(r).reduce(function(n, i) {
return Fd(Fd({}, n), {}, Oy({}, i, t(i, r[i])))
}, {})
}
, zd = function(t, r, n) {
return t.map(function(i) {
return "".concat(uN(i), " ").concat(r, "ms ").concat(n)
}).join(",")
};
function cN(e, t) {
return fN(e) || sN(e, t) || Sy(e, t) || lN()
}
function lN() {
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 sN(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function fN(e) {
if (Array.isArray(e))
return e
}
function dN(e) {
return vN(e) || pN(e) || Sy(e) || hN()
}
function hN() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function Sy(e, t) {
if (e) {
if (typeof e == "string")
return Vu(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 Vu(e, t)
}
}
function pN(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function vN(e) {
if (Array.isArray(e))
return Vu(e)
}
function Vu(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
}
var ya = 1e-4
, Py = function(t, r) {
return [0, 3 * t, 3 * r - 6 * t, 3 * t - 3 * r + 1]
}
, Ay = function(t, r) {
return t.map(function(n, i) {
return n * Math.pow(r, i)
}).reduce(function(n, i) {
return n + i
})
}
, Wd = function(t, r) {
return function(n) {
var i = Py(t, r);
return Ay(i, n)
}
}
, yN = function(t, r) {
return function(n) {
var i = Py(t, r)
, a = [].concat(dN(i.map(function(o, u) {
return o * u
}).slice(1)), [0]);
return Ay(a, n)
}
}
, Ud = function() {
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
r[n] = arguments[n];
var i = r[0]
, a = r[1]
, o = r[2]
, u = r[3];
if (r.length === 1)
switch (r[0]) {
case "linear":
i = 0,
a = 0,
o = 1,
u = 1;
break;
case "ease":
i = .25,
a = .1,
o = .25,
u = 1;
break;
case "ease-in":
i = .42,
a = 0,
o = 1,
u = 1;
break;
case "ease-out":
i = .42,
a = 0,
o = .58,
u = 1;
break;
case "ease-in-out":
i = 0,
a = 0,
o = .58,
u = 1;
break;
default:
{
var c = r[0].split("(");
if (c[0] === "cubic-bezier" && c[1].split(")")[0].split(",").length === 4) {
var l = c[1].split(")")[0].split(",").map(function(p) {
return parseFloat(p)
})
, f = cN(l, 4);
i = f[0],
a = f[1],
o = f[2],
u = f[3]
}
}
}
var s = Wd(i, o)
, d = Wd(a, u)
, h = yN(i, o)
, v = function(b) {
return b > 1 ? 1 : b < 0 ? 0 : b
}
, y = function(b) {
for (var w = b > 1 ? 1 : b, x = w, O = 0; O < 8; ++O) {
var g = s(x) - w
, m = h(x);
if (Math.abs(g - w) < ya || m < ya)
return d(x);
x = v(x - g / m)
}
return d(x)
};
return y.isStepper = !1,
y
}
, gN = function() {
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}
, r = t.stiff
, n = r === void 0 ? 100 : r
, i = t.damping
, a = i === void 0 ? 8 : i
, o = t.dt
, u = o === void 0 ? 17 : o
, c = function(f, s, d) {
var h = -(f - s) * n
, v = d * a
, y = d + (h - v) * u / 1e3
, p = d * u / 1e3 + f;
return Math.abs(p - s) < ya && Math.abs(y) < ya ? [s, 0] : [p, y]
};
return c.isStepper = !0,
c.dt = u,
c
}
, mN = function() {
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
r[n] = arguments[n];
var i = r[0];
if (typeof i == "string")
switch (i) {
case "ease":
case "ease-in-out":
case "ease-out":
case "ease-in":
case "linear":
return Ud(i);
case "spring":
return gN();
default:
if (i.split("(")[0] === "cubic-bezier")
return Ud(i)
}
return typeof i == "function" ? i : null
};
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 Hd(e) {
return wN(e) || xN(e) || _y(e) || bN()
}
function bN() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function xN(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function wN(e) {
if (Array.isArray(e))
return Zu(e)
}
function qd(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 Me(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? qd(Object(r), !0).forEach(function(n) {
Xu(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : qd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Xu(e, t, r) {
return t = ON(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function ON(e) {
var t = SN(e, "string");
return Qn(t) === "symbol" ? t : String(t)
}
function SN(e, t) {
if (Qn(e) !== "object" || e === null)
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)
}
function PN(e, t) {
return $N(e) || _N(e, t) || _y(e, t) || AN()
}
function AN() {
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 _y(e, t) {
if (e) {
if (typeof e == "string")
return Zu(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 Zu(e, t)
}
}
function Zu(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 _N(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function $N(e) {
if (Array.isArray(e))
return e
}
var ga = function(t, r, n) {
return t + (r - t) * n
}
, Ju = function(t) {
var r = t.from
, n = t.to;
return r !== n
}
, TN = function e(t, r, n) {
var i = $n(function(a, o) {
if (Ju(o)) {
var u = t(o.from, o.to, o.velocity)
, c = PN(u, 2)
, l = c[0]
, f = c[1];
return Me(Me({}, o), {}, {
from: l,
velocity: f
})
}
return o
}, r);
return n < 1 ? $n(function(a, o) {
return Ju(o) ? Me(Me({}, o), {}, {
velocity: ga(o.velocity, i[a].velocity, n),
from: ga(o.from, i[a].from, n)
}) : o
}, r) : e(t, i, n - 1)
};
const jN = function(e, t, r, n, i) {
var a = aN(e, t), o = a.reduce(function(p, b) {
return Me(Me({}, p), {}, Xu({}, b, [e[b], t[b]]))
}, {}), u = a.reduce(function(p, b) {
return Me(Me({}, p), {}, Xu({}, b, {
from: e[b],
velocity: 0,
to: t[b]
}))
}, {}), c = -1, l, f, s = function() {
return null
}, d = function() {
return $n(function(b, w) {
return w.from
}, u)
}, h = function() {
return !Object.values(u).filter(Ju).length
}, v = function(b) {
l || (l = b);
var w = b - l
, x = w / r.dt;
u = TN(r, u, x),
i(Me(Me(Me({}, e), t), d())),
l = b,
h() || (c = requestAnimationFrame(s))
}, y = function(b) {
f || (f = b);
var w = (b - f) / n
, x = $n(function(g, m) {
return ga.apply(void 0, Hd(m).concat([r(w)]))
}, o);
if (i(Me(Me(Me({}, e), t), x)),
w < 1)
c = requestAnimationFrame(s);
else {
var O = $n(function(g, m) {
return ga.apply(void 0, Hd(m).concat([r(1)]))
}, o);
i(Me(Me(Me({}, e), t), O))
}
};
return s = r.isStepper ? v : y,
function() {
return requestAnimationFrame(s),
function() {
cancelAnimationFrame(c)
}
}
};
function Br(e) {
"@babel/helpers - typeof";
return Br = 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
}
,
Br(e)
}
var EN = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
function MN(e, t) {
if (e == null)
return {};
var r = CN(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 CN(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 Yo(e) {
return NN(e) || DN(e) || kN(e) || IN()
}
function IN() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function kN(e, t) {
if (e) {
if (typeof e == "string")
return Qu(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 Qu(e, t)
}
}
function DN(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function NN(e) {
if (Array.isArray(e))
return Qu(e)
}
function Qu(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 Kd(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 tt(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Kd(Object(r), !0).forEach(function(n) {
On(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Kd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function On(e, t, r) {
return t = $y(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function BN(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function LN(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, $y(n.key), n)
}
}
function RN(e, t, r) {
return t && LN(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function $y(e) {
var t = FN(e, "string");
return Br(t) === "symbol" ? t : String(t)
}
function FN(e, t) {
if (Br(e) !== "object" || e === null)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Br(n) !== "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function zN(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && ec(e, t)
}
function ec(e, t) {
return ec = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
ec(e, t)
}
function WN(e) {
var t = UN();
return function() {
var n = ma(e), i;
if (t) {
var a = ma(this).constructor;
i = Reflect.construct(n, arguments, a)
} else
i = n.apply(this, arguments);
return tc(this, i)
}
}
function tc(e, t) {
if (t && (Br(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return rc(e)
}
function rc(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function UN() {
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
return !1;
if (typeof Proxy == "function")
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})),
!0
} catch {
return !1
}
}
function ma(e) {
return ma = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
ma(e)
}
var jt = function(e) {
zN(r, e);
var t = WN(r);
function r(n, i) {
var a;
BN(this, r),
a = t.call(this, n, i);
var o = a.props
, u = o.isActive
, c = o.attributeName
, l = o.from
, f = o.to
, s = o.steps
, d = o.children
, h = o.duration;
if (a.handleStyleChange = a.handleStyleChange.bind(rc(a)),
a.changeStyle = a.changeStyle.bind(rc(a)),
!u || h <= 0)
return a.state = {
style: {}
},
typeof d == "function" && (a.state = {
style: f
}),
tc(a);
if (s && s.length)
a.state = {
style: s[0].style
};
else if (l) {
if (typeof d == "function")
return a.state = {
style: l
},
tc(a);
a.state = {
style: c ? On({}, c, l) : l
}
} else
a.state = {
style: {}
};
return a
}
return RN(r, [{
key: "componentDidMount",
value: function() {
var i = this.props
, a = i.isActive
, o = i.canBegin;
this.mounted = !0,
!(!a || !o) && this.runAnimation(this.props)
}
}, {
key: "componentDidUpdate",
value: function(i) {
var a = this.props
, o = a.isActive
, u = a.canBegin
, c = a.attributeName
, l = a.shouldReAnimate
, f = a.to
, s = a.from
, d = this.state.style;
if (u) {
if (!o) {
var h = {
style: c ? On({}, c, f) : f
};
this.state && d && (c && d[c] !== f || !c && d !== f) && this.setState(h);
return
}
if (!(VD(i.to, f) && i.canBegin && i.isActive)) {
var v = !i.canBegin || !i.isActive;
this.manager && this.manager.stop(),
this.stopJSAnimation && this.stopJSAnimation();
var y = v || l ? s : i.to;
if (this.state && d) {
var p = {
style: c ? On({}, c, y) : y
};
(c && d[c] !== y || !c && d !== y) && this.setState(p)
}
this.runAnimation(tt(tt({}, this.props), {}, {
from: y,
begin: 0
}))
}
}
}
}, {
key: "componentWillUnmount",
value: function() {
this.mounted = !1;
var i = this.props.onAnimationEnd;
this.unSubscribe && this.unSubscribe(),
this.manager && (this.manager.stop(),
this.manager = null),
this.stopJSAnimation && this.stopJSAnimation(),
i && i()
}
}, {
key: "handleStyleChange",
value: function(i) {
this.changeStyle(i)
}
}, {
key: "changeStyle",
value: function(i) {
this.mounted && this.setState({
style: i
})
}
}, {
key: "runJSAnimation",
value: function(i) {
var a = this
, o = i.from
, u = i.to
, c = i.duration
, l = i.easing
, f = i.begin
, s = i.onAnimationEnd
, d = i.onAnimationStart
, h = jN(o, u, mN(l), c, this.changeStyle)
, v = function() {
a.stopJSAnimation = h()
};
this.manager.start([d, f, v, c, s])
}
}, {
key: "runStepAnimation",
value: function(i) {
var a = this
, o = i.steps
, u = i.begin
, c = i.onAnimationStart
, l = o[0]
, f = l.style
, s = l.duration
, d = s === void 0 ? 0 : s
, h = function(y, p, b) {
if (b === 0)
return y;
var w = p.duration
, x = p.easing
, O = x === void 0 ? "ease" : x
, g = p.style
, m = p.properties
, S = p.onAnimationEnd
, P = b > 0 ? o[b - 1] : p
, _ = m || Object.keys(g);
if (typeof O == "function" || O === "spring")
return [].concat(Yo(y), [a.runJSAnimation.bind(a, {
from: P.style,
to: g,
duration: w,
easing: O
}), w]);
var j = zd(_, w, O)
, $ = tt(tt(tt({}, P.style), g), {}, {
transition: j
});
return [].concat(Yo(y), [$, w, S]).filter(oN)
};
return this.manager.start([c].concat(Yo(o.reduce(h, [f, Math.max(d, u)])), [i.onAnimationEnd]))
}
}, {
key: "runAnimation",
value: function(i) {
this.manager || (this.manager = rN());
var a = i.begin
, o = i.duration
, u = i.attributeName
, c = i.to
, l = i.easing
, f = i.onAnimationStart
, s = i.onAnimationEnd
, d = i.steps
, h = i.children
, v = this.manager;
if (this.unSubscribe = v.subscribe(this.handleStyleChange),
typeof l == "function" || typeof h == "function" || l === "spring") {
this.runJSAnimation(i);
return
}
if (d.length > 1) {
this.runStepAnimation(i);
return
}
var y = u ? On({}, u, c) : c
, p = zd(Object.keys(y), o, l);
v.start([f, a, tt(tt({}, y), {}, {
transition: p
}), o, s])
}
}, {
key: "render",
value: function() {
var i = this.props
, a = i.children;
i.begin;
var o = i.duration;
i.attributeName,
i.easing;
var u = i.isActive;
i.steps,
i.from,
i.to,
i.canBegin,
i.onAnimationEnd,
i.shouldReAnimate,
i.onAnimationReStart;
var c = MN(i, EN)
, l = L.Children.count(a)
, f = this.state.style;
if (typeof a == "function")
return a(f);
if (!u || l === 0 || o <= 0)
return a;
var s = function(h) {
var v = h.props
, y = v.style
, p = y === void 0 ? {} : y
, b = v.className
, w = L.cloneElement(h, tt(tt({}, c), {}, {
style: tt(tt({}, p), f),
className: b
}));
return w
};
return l === 1 ? s(L.Children.only(a)) : A.createElement("div", null, L.Children.map(a, function(d) {
return s(d)
}))
}
}]),
r
}(L.PureComponent);
jt.displayName = "Animate";
jt.defaultProps = {
begin: 0,
duration: 1e3,
from: "",
to: "",
attributeName: "",
easing: "ease",
isActive: !0,
canBegin: !0,
steps: [],
onAnimationEnd: function() {},
onAnimationStart: function() {}
};
jt.propTypes = {
from: Z.oneOfType([Z.object, Z.string]),
to: Z.oneOfType([Z.object, Z.string]),
attributeName: Z.string,
duration: Z.number,
begin: Z.number,
easing: Z.oneOfType([Z.string, Z.func]),
steps: Z.arrayOf(Z.shape({
duration: Z.number.isRequired,
style: Z.object.isRequired,
easing: Z.oneOfType([Z.oneOf(["ease", "ease-in", "ease-out", "ease-in-out", "linear"]), Z.func]),
properties: Z.arrayOf("string"),
onAnimationEnd: Z.func
})),
children: Z.oneOfType([Z.node, Z.func]),
isActive: Z.bool,
canBegin: Z.bool,
onAnimationEnd: Z.func,
shouldReAnimate: Z.bool,
onAnimationStart: Z.func,
onAnimationReStart: Z.func
};
Z.object,
Z.object,
Z.object,
Z.element;
Z.object,
Z.object,
Z.object,
Z.oneOfType([Z.array, Z.element]),
Z.any;
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 ba() {
return ba = 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
}
,
ba.apply(this, arguments)
}
function HN(e, t) {
return YN(e) || GN(e, t) || KN(e, t) || qN()
}
function qN() {
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 KN(e, t) {
if (e) {
if (typeof e == "string")
return Gd(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 Gd(e, t)
}
}
function Gd(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 GN(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function YN(e) {
if (Array.isArray(e))
return e
}
function Yd(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 Vd(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Yd(Object(r), !0).forEach(function(n) {
VN(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Yd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function VN(e, t, r) {
return t = XN(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function XN(e) {
var t = ZN(e, "string");
return ei(t) == "symbol" ? t : t + ""
}
function ZN(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 Xd = function(t, r, n, i, a) {
var o = Math.min(Math.abs(n) / 2, Math.abs(i) / 2), u = i >= 0 ? 1 : -1, c = n >= 0 ? 1 : -1, l = i >= 0 && n >= 0 || i < 0 && n < 0 ? 1 : 0, f;
if (o > 0 && a instanceof Array) {
for (var s = [0, 0, 0, 0], d = 0, h = 4; d < h; d++)
s[d] = a[d] > o ? o : a[d];
f = "M".concat(t, ",").concat(r + u * s[0]),
s[0] > 0 && (f += "A ".concat(s[0], ",").concat(s[0], ",0,0,").concat(l, ",").concat(t + c * s[0], ",").concat(r)),
f += "L ".concat(t + n - c * s[1], ",").concat(r),
s[1] > 0 && (f += "A ".concat(s[1], ",").concat(s[1], ",0,0,").concat(l, `,
`).concat(t + n, ",").concat(r + u * s[1])),
f += "L ".concat(t + n, ",").concat(r + i - u * s[2]),
s[2] > 0 && (f += "A ".concat(s[2], ",").concat(s[2], ",0,0,").concat(l, `,
`).concat(t + n - c * s[2], ",").concat(r + i)),
f += "L ".concat(t + c * s[3], ",").concat(r + i),
s[3] > 0 && (f += "A ".concat(s[3], ",").concat(s[3], ",0,0,").concat(l, `,
`).concat(t, ",").concat(r + i - u * s[3])),
f += "Z"
} else if (o > 0 && a === +a && a > 0) {
var v = Math.min(o, a);
f = "M ".concat(t, ",").concat(r + u * v, `
A `).concat(v, ",").concat(v, ",0,0,").concat(l, ",").concat(t + c * v, ",").concat(r, `
L `).concat(t + n - c * v, ",").concat(r, `
A `).concat(v, ",").concat(v, ",0,0,").concat(l, ",").concat(t + n, ",").concat(r + u * v, `
L `).concat(t + n, ",").concat(r + i - u * v, `
A `).concat(v, ",").concat(v, ",0,0,").concat(l, ",").concat(t + n - c * v, ",").concat(r + i, `
L `).concat(t + c * v, ",").concat(r + i, `
A `).concat(v, ",").concat(v, ",0,0,").concat(l, ",").concat(t, ",").concat(r + i - u * v, " Z")
} else
f = "M ".concat(t, ",").concat(r, " h ").concat(n, " v ").concat(i, " h ").concat(-n, " Z");
return f
}
, JN = function(t, r) {
if (!t || !r)
return !1;
var n = t.x
, i = t.y
, a = r.x
, o = r.y
, u = r.width
, c = r.height;
if (Math.abs(u) > 0 && Math.abs(c) > 0) {
var l = Math.min(a, a + u)
, f = Math.max(a, a + u)
, s = Math.min(o, o + c)
, d = Math.max(o, o + c);
return n >= l && n <= f && i >= s && i <= d
}
return !1
}
, QN = {
x: 0,
y: 0,
width: 0,
height: 0,
radius: 0,
isAnimationActive: !1,
isUpdateAnimationActive: !1,
animationBegin: 0,
animationDuration: 1500,
animationEasing: "ease"
}
, _l = function(t) {
var r = Vd(Vd({}, QN), t)
, n = L.useRef()
, i = L.useState(-1)
, a = HN(i, 2)
, o = a[0]
, u = a[1];
L.useEffect(function() {
if (n.current && n.current.getTotalLength)
try {
var O = n.current.getTotalLength();
O && u(O)
} catch {}
}, []);
var c = r.x
, l = r.y
, f = r.width
, s = r.height
, d = r.radius
, h = r.className
, v = r.animationEasing
, y = r.animationDuration
, p = r.animationBegin
, b = r.isAnimationActive
, w = r.isUpdateAnimationActive;
if (c !== +c || l !== +l || f !== +f || s !== +s || f === 0 || s === 0)
return null;
var x = re("recharts-rectangle", h);
return w ? A.createElement(jt, {
canBegin: o > 0,
from: {
width: f,
height: s,
x: c,
y: l
},
to: {
width: f,
height: s,
x: c,
y: l
},
duration: y,
animationEasing: v,
isActive: w
}, function(O) {
var g = O.width
, m = O.height
, S = O.x
, P = O.y;
return A.createElement(jt, {
canBegin: o > 0,
from: "0px ".concat(o === -1 ? 1 : o, "px"),
to: "".concat(o, "px 0px"),
attributeName: "strokeDasharray",
begin: p,
duration: y,
isActive: b,
easing: v
}, A.createElement("path", ba({}, Q(r, !0), {
className: x,
d: Xd(S, P, g, m, d),
ref: n
})))
}) : A.createElement("path", ba({}, Q(r, !0), {
className: x,
d: Xd(c, l, f, s, d)
}))
};
function nc() {
return nc = 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
}
,
nc.apply(this, arguments)
}
var $l = function(t) {
var r = t.cx
, n = t.cy
, i = t.r
, a = t.className
, o = re("recharts-dot", a);
return r === +r && n === +n && i === +i ? A.createElement("circle", nc({}, Q(t, !1), Li(t), {
className: o,
cx: r,
cy: n,
r: i
})) : null
};
function ti(e) {
"@babel/helpers - typeof";
return ti = 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
}
,
ti(e)
}
var eB = ["x", "y", "top", "left", "width", "height", "className"];
function ic() {
return ic = 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
}
,
ic.apply(this, arguments)
}
function Zd(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 tB(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Zd(Object(r), !0).forEach(function(n) {
rB(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Zd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function rB(e, t, r) {
return t = nB(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function nB(e) {
var t = iB(e, "string");
return ti(t) == "symbol" ? t : t + ""
}
function iB(e, t) {
if (ti(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ti(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function aB(e, t) {
if (e == null)
return {};
var r = oB(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 oB(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
var uB = function(t, r, n, i, a, o) {
return "M".concat(t, ",").concat(a, "v").concat(i, "M").concat(o, ",").concat(r, "h").concat(n)
}
, cB = function(t) {
var r = t.x
, n = r === void 0 ? 0 : r
, i = t.y
, a = i === void 0 ? 0 : i
, o = t.top
, u = o === void 0 ? 0 : o
, c = t.left
, l = c === void 0 ? 0 : c
, f = t.width
, s = f === void 0 ? 0 : f
, d = t.height
, h = d === void 0 ? 0 : d
, v = t.className
, y = aB(t, eB)
, p = tB({
x: n,
y: a,
top: u,
left: l,
width: s,
height: h
}, y);
return !R(n) || !R(a) || !R(s) || !R(h) || !R(u) || !R(l) ? null : A.createElement("path", ic({}, Q(p, !0), {
className: re("recharts-cross", v),
d: uB(n, a, s, h, u, l)
}))
}
, lB = Up
, sB = lB(Object.getPrototypeOf, Object)
, fB = sB
, dB = Mt
, hB = fB
, pB = Ct
, vB = "[object Object]"
, yB = Function.prototype
, gB = Object.prototype
, Ty = yB.toString
, mB = gB.hasOwnProperty
, bB = Ty.call(Object);
function xB(e) {
if (!pB(e) || dB(e) != vB)
return !1;
var t = hB(e);
if (t === null)
return !0;
var r = mB.call(t, "constructor") && t.constructor;
return typeof r == "function" && r instanceof r && Ty.call(r) == bB
}
var wB = xB;
const OB = de(wB);
var SB = Mt
, PB = Ct
, AB = "[object Boolean]";
function _B(e) {
return e === !0 || e === !1 || PB(e) && SB(e) == AB
}
var $B = _B;
const TB = de($B);
function ri(e) {
"@babel/helpers - typeof";
return ri = 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
}
,
ri(e)
}
function xa() {
return xa = 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
}
,
xa.apply(this, arguments)
}
function jB(e, t) {
return IB(e) || CB(e, t) || MB(e, t) || EB()
}
function EB() {
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 MB(e, t) {
if (e) {
if (typeof e == "string")
return Jd(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 Jd(e, t)
}
}
function Jd(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 CB(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function IB(e) {
if (Array.isArray(e))
return e
}
function Qd(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 eh(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Qd(Object(r), !0).forEach(function(n) {
kB(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Qd(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function kB(e, t, r) {
return t = DB(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function DB(e) {
var t = NB(e, "string");
return ri(t) == "symbol" ? t : t + ""
}
function NB(e, t) {
if (ri(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ri(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var th = function(t, r, n, i, a) {
var o = n - i, u;
return u = "M ".concat(t, ",").concat(r),
u += "L ".concat(t + n, ",").concat(r),
u += "L ".concat(t + n - o / 2, ",").concat(r + a),
u += "L ".concat(t + n - o / 2 - i, ",").concat(r + a),
u += "L ".concat(t, ",").concat(r, " Z"),
u
}
, BB = {
x: 0,
y: 0,
upperWidth: 0,
lowerWidth: 0,
height: 0,
isUpdateAnimationActive: !1,
animationBegin: 0,
animationDuration: 1500,
animationEasing: "ease"
}
, LB = function(t) {
var r = eh(eh({}, BB), t)
, n = L.useRef()
, i = L.useState(-1)
, a = jB(i, 2)
, o = a[0]
, u = a[1];
L.useEffect(function() {
if (n.current && n.current.getTotalLength)
try {
var x = n.current.getTotalLength();
x && u(x)
} catch {}
}, []);
var c = r.x
, l = r.y
, f = r.upperWidth
, s = r.lowerWidth
, d = r.height
, h = r.className
, v = r.animationEasing
, y = r.animationDuration
, p = r.animationBegin
, b = r.isUpdateAnimationActive;
if (c !== +c || l !== +l || f !== +f || s !== +s || d !== +d || f === 0 && s === 0 || d === 0)
return null;
var w = re("recharts-trapezoid", h);
return b ? A.createElement(jt, {
canBegin: o > 0,
from: {
upperWidth: 0,
lowerWidth: 0,
height: d,
x: c,
y: l
},
to: {
upperWidth: f,
lowerWidth: s,
height: d,
x: c,
y: l
},
duration: y,
animationEasing: v,
isActive: b
}, function(x) {
var O = x.upperWidth
, g = x.lowerWidth
, m = x.height
, S = x.x
, P = x.y;
return A.createElement(jt, {
canBegin: o > 0,
from: "0px ".concat(o === -1 ? 1 : o, "px"),
to: "".concat(o, "px 0px"),
attributeName: "strokeDasharray",
begin: p,
duration: y,
easing: v
}, A.createElement("path", xa({}, Q(r, !0), {
className: w,
d: th(S, P, O, g, m),
ref: n
})))
}) : A.createElement("g", null, A.createElement("path", xa({}, Q(r, !0), {
className: w,
d: th(c, l, f, s, d)
})))
}
, RB = ["option", "shapeType", "propTransformer", "activeClassName", "isActive"];
function ni(e) {
"@babel/helpers - typeof";
return ni = 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
}
,
ni(e)
}
function FB(e, t) {
if (e == null)
return {};
var r = zB(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 zB(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function rh(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 wa(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? rh(Object(r), !0).forEach(function(n) {
WB(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : rh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function WB(e, t, r) {
return t = UB(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function UB(e) {
var t = HB(e, "string");
return ni(t) == "symbol" ? t : t + ""
}
function HB(e, t) {
if (ni(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ni(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function qB(e, t) {
return wa(wa({}, t), e)
}
function KB(e, t) {
return e === "symbols"
}
function nh(e) {
var t = e.shapeType
, r = e.elementProps;
switch (t) {
case "rectangle":
return A.createElement(_l, r);
case "trapezoid":
return A.createElement(LB, r);
case "sector":
return A.createElement(by, r);
case "symbols":
if (KB(t))
return A.createElement(qc, r);
break;
default:
return null
}
}
function GB(e) {
return L.isValidElement(e) ? e.props : e
}
function YB(e) {
var t = e.option, r = e.shapeType, n = e.propTransformer, i = n === void 0 ? qB : n, a = e.activeClassName, o = a === void 0 ? "recharts-active-shape" : a, u = e.isActive, c = FB(e, RB), l;
if (L.isValidElement(t))
l = L.cloneElement(t, wa(wa({}, c), GB(t)));
else if (J(t))
l = t(c);
else if (OB(t) && !TB(t)) {
var f = i(t, c);
l = A.createElement(nh, {
shapeType: r,
elementProps: f
})
} else {
var s = c;
l = A.createElement(nh, {
shapeType: r,
elementProps: s
})
}
return u ? A.createElement(ye, {
className: o
}, l) : l
}
function go(e, t) {
return t != null && "trapezoids"in e.props
}
function mo(e, t) {
return t != null && "sectors"in e.props
}
function ii(e, t) {
return t != null && "points"in e.props
}
function VB(e, t) {
var r, n, i = e.x === (t == null || (r = t.labelViewBox) === null || r === void 0 ? void 0 : r.x) || e.x === t.x, a = e.y === (t == null || (n = t.labelViewBox) === null || n === void 0 ? void 0 : n.y) || e.y === t.y;
return i && a
}
function XB(e, t) {
var r = e.endAngle === t.endAngle
, n = e.startAngle === t.startAngle;
return r && n
}
function ZB(e, t) {
var r = e.x === t.x
, n = e.y === t.y
, i = e.z === t.z;
return r && n && i
}
function JB(e, t) {
var r;
return go(e, t) ? r = VB : mo(e, t) ? r = XB : ii(e, t) && (r = ZB),
r
}
function QB(e, t) {
var r;
return go(e, t) ? r = "trapezoids" : mo(e, t) ? r = "sectors" : ii(e, t) && (r = "points"),
r
}
function eL(e, t) {
if (go(e, t)) {
var r;
return (r = t.tooltipPayload) === null || r === void 0 || (r = r[0]) === null || r === void 0 || (r = r.payload) === null || r === void 0 ? void 0 : r.payload
}
if (mo(e, t)) {
var n;
return (n = t.tooltipPayload) === null || n === void 0 || (n = n[0]) === null || n === void 0 || (n = n.payload) === null || n === void 0 ? void 0 : n.payload
}
return ii(e, t) ? t.payload : {}
}
function tL(e) {
var t = e.activeTooltipItem
, r = e.graphicalItem
, n = e.itemData
, i = QB(r, t)
, a = eL(r, t)
, o = n.filter(function(c, l) {
var f = zn(a, c)
, s = r.props[i].filter(function(v) {
var y = JB(r, t);
return y(v, t)
})
, d = r.props[i].indexOf(s[s.length - 1])
, h = l === d;
return f && h
})
, u = n.indexOf(o[o.length - 1]);
return u
}
var rL = Math.ceil
, nL = Math.max;
function iL(e, t, r, n) {
for (var i = -1, a = nL(rL((t - e) / (r || 1)), 0), o = Array(a); a--; )
o[n ? a : ++i] = e,
e += r;
return o
}
var aL = iL
, oL = cv
, ih = 1 / 0
, uL = 17976931348623157e292;
function cL(e) {
if (!e)
return e === 0 ? e : 0;
if (e = oL(e),
e === ih || e === -ih) {
var t = e < 0 ? -1 : 1;
return t * uL
}
return e === e ? e : 0
}
var jy = cL
, lL = aL
, sL = ao
, Vo = jy;
function fL(e) {
return function(t, r, n) {
return n && typeof n != "number" && sL(t, r, n) && (r = n = void 0),
t = Vo(t),
r === void 0 ? (r = t,
t = 0) : r = Vo(r),
n = n === void 0 ? t < r ? 1 : -1 : Vo(n),
lL(t, r, n, e)
}
}
var dL = fL
, hL = dL
, pL = hL()
, vL = pL;
const Oa = de(vL);
function ai(e) {
"@babel/helpers - typeof";
return ai = 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
}
,
ai(e)
}
function ah(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 oh(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? ah(Object(r), !0).forEach(function(n) {
Ey(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ah(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Ey(e, t, r) {
return t = yL(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function yL(e) {
var t = gL(e, "string");
return ai(t) == "symbol" ? t : t + ""
}
function gL(e, t) {
if (ai(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ai(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var mL = ["Webkit", "Moz", "O", "ms"]
, bL = function(t, r) {
var n = t.replace(/(\w)/, function(a) {
return a.toUpperCase()
})
, i = mL.reduce(function(a, o) {
return oh(oh({}, a), {}, Ey({}, o + n, r))
}, {});
return i[t] = r,
i
};
function Lr(e) {
"@babel/helpers - typeof";
return Lr = 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
}
,
Lr(e)
}
function Sa() {
return Sa = 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
}
,
Sa.apply(this, arguments)
}
function uh(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 Xo(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? uh(Object(r), !0).forEach(function(n) {
Fe(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : uh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function xL(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function ch(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, Cy(n.key), n)
}
}
function wL(e, t, r) {
return t && ch(e.prototype, t),
r && ch(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function OL(e, t, r) {
return t = Pa(t),
SL(e, My() ? Reflect.construct(t, r || [], Pa(e).constructor) : t.apply(e, r))
}
function SL(e, t) {
if (t && (Lr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return PL(e)
}
function PL(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function My() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (My = function() {
return !!e
}
)()
}
function Pa(e) {
return Pa = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Pa(e)
}
function AL(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && ac(e, t)
}
function ac(e, t) {
return ac = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
ac(e, t)
}
function Fe(e, t, r) {
return t = Cy(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Cy(e) {
var t = _L(e, "string");
return Lr(t) == "symbol" ? t : t + ""
}
function _L(e, t) {
if (Lr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Lr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var $L = function(t) {
var r = t.data
, n = t.startIndex
, i = t.endIndex
, a = t.x
, o = t.width
, u = t.travellerWidth;
if (!r || !r.length)
return {};
var c = r.length
, l = Pn().domain(Oa(0, c)).range([a, a + o - u])
, f = l.domain().map(function(s) {
return l(s)
});
return {
isTextActive: !1,
isSlideMoving: !1,
isTravellerMoving: !1,
isTravellerFocused: !1,
startX: l(n),
endX: l(i),
scale: l,
scaleValues: f
}
}
, lh = function(t) {
return t.changedTouches && !!t.changedTouches.length
}
, Rr = function(e) {
function t(r) {
var n;
return xL(this, t),
n = OL(this, t, [r]),
Fe(n, "handleDrag", function(i) {
n.leaveTimer && (clearTimeout(n.leaveTimer),
n.leaveTimer = null),
n.state.isTravellerMoving ? n.handleTravellerMove(i) : n.state.isSlideMoving && n.handleSlideDrag(i)
}),
Fe(n, "handleTouchMove", function(i) {
i.changedTouches != null && i.changedTouches.length > 0 && n.handleDrag(i.changedTouches[0])
}),
Fe(n, "handleDragEnd", function() {
n.setState({
isTravellerMoving: !1,
isSlideMoving: !1
}, function() {
var i = n.props
, a = i.endIndex
, o = i.onDragEnd
, u = i.startIndex;
o == null || o({
endIndex: a,
startIndex: u
})
}),
n.detachDragEndListener()
}),
Fe(n, "handleLeaveWrapper", function() {
(n.state.isTravellerMoving || n.state.isSlideMoving) && (n.leaveTimer = window.setTimeout(n.handleDragEnd, n.props.leaveTimeOut))
}),
Fe(n, "handleEnterSlideOrTraveller", function() {
n.setState({
isTextActive: !0
})
}),
Fe(n, "handleLeaveSlideOrTraveller", function() {
n.setState({
isTextActive: !1
})
}),
Fe(n, "handleSlideDragStart", function(i) {
var a = lh(i) ? i.changedTouches[0] : i;
n.setState({
isTravellerMoving: !1,
isSlideMoving: !0,
slideMoveStartX: a.pageX
}),
n.attachDragEndListener()
}),
n.travellerDragStartHandlers = {
startX: n.handleTravellerDragStart.bind(n, "startX"),
endX: n.handleTravellerDragStart.bind(n, "endX")
},
n.state = {},
n
}
return AL(t, e),
wL(t, [{
key: "componentWillUnmount",
value: function() {
this.leaveTimer && (clearTimeout(this.leaveTimer),
this.leaveTimer = null),
this.detachDragEndListener()
}
}, {
key: "getIndex",
value: function(n) {
var i = n.startX
, a = n.endX
, o = this.state.scaleValues
, u = this.props
, c = u.gap
, l = u.data
, f = l.length - 1
, s = Math.min(i, a)
, d = Math.max(i, a)
, h = t.getIndexInRange(o, s)
, v = t.getIndexInRange(o, d);
return {
startIndex: h - h % c,
endIndex: v === f ? f : v - v % c
}
}
}, {
key: "getTextOfTick",
value: function(n) {
var i = this.props
, a = i.data
, o = i.tickFormatter
, u = i.dataKey
, c = Ue(a[n], u, n);
return J(o) ? o(c, n) : c
}
}, {
key: "attachDragEndListener",
value: function() {
window.addEventListener("mouseup", this.handleDragEnd, !0),
window.addEventListener("touchend", this.handleDragEnd, !0),
window.addEventListener("mousemove", this.handleDrag, !0)
}
}, {
key: "detachDragEndListener",
value: function() {
window.removeEventListener("mouseup", this.handleDragEnd, !0),
window.removeEventListener("touchend", this.handleDragEnd, !0),
window.removeEventListener("mousemove", this.handleDrag, !0)
}
}, {
key: "handleSlideDrag",
value: function(n) {
var i = this.state
, a = i.slideMoveStartX
, o = i.startX
, u = i.endX
, c = this.props
, l = c.x
, f = c.width
, s = c.travellerWidth
, d = c.startIndex
, h = c.endIndex
, v = c.onChange
, y = n.pageX - a;
y > 0 ? y = Math.min(y, l + f - s - u, l + f - s - o) : y < 0 && (y = Math.max(y, l - o, l - u));
var p = this.getIndex({
startX: o + y,
endX: u + y
});
(p.startIndex !== d || p.endIndex !== h) && v && v(p),
this.setState({
startX: o + y,
endX: u + y,
slideMoveStartX: n.pageX
})
}
}, {
key: "handleTravellerDragStart",
value: function(n, i) {
var a = lh(i) ? i.changedTouches[0] : i;
this.setState({
isSlideMoving: !1,
isTravellerMoving: !0,
movingTravellerId: n,
brushMoveStartX: a.pageX
}),
this.attachDragEndListener()
}
}, {
key: "handleTravellerMove",
value: function(n) {
var i = this.state
, a = i.brushMoveStartX
, o = i.movingTravellerId
, u = i.endX
, c = i.startX
, l = this.state[o]
, f = this.props
, s = f.x
, d = f.width
, h = f.travellerWidth
, v = f.onChange
, y = f.gap
, p = f.data
, b = {
startX: this.state.startX,
endX: this.state.endX
}
, w = n.pageX - a;
w > 0 ? w = Math.min(w, s + d - h - l) : w < 0 && (w = Math.max(w, s - l)),
b[o] = l + w;
var x = this.getIndex(b)
, O = x.startIndex
, g = x.endIndex
, m = function() {
var P = p.length - 1;
return o === "startX" && (u > c ? O % y === 0 : g % y === 0) || u < c && g === P || o === "endX" && (u > c ? g % y === 0 : O % y === 0) || u > c && g === P
};
this.setState(Fe(Fe({}, o, l + w), "brushMoveStartX", n.pageX), function() {
v && m() && v(x)
})
}
}, {
key: "handleTravellerMoveKeyboard",
value: function(n, i) {
var a = this
, o = this.state
, u = o.scaleValues
, c = o.startX
, l = o.endX
, f = this.state[i]
, s = u.indexOf(f);
if (s !== -1) {
var d = s + n;
if (!(d === -1 || d >= u.length)) {
var h = u[d];
i === "startX" && h >= l || i === "endX" && h <= c || this.setState(Fe({}, i, h), function() {
a.props.onChange(a.getIndex({
startX: a.state.startX,
endX: a.state.endX
}))
})
}
}
}
}, {
key: "renderBackground",
value: function() {
var n = this.props
, i = n.x
, a = n.y
, o = n.width
, u = n.height
, c = n.fill
, l = n.stroke;
return A.createElement("rect", {
stroke: l,
fill: c,
x: i,
y: a,
width: o,
height: u
})
}
}, {
key: "renderPanorama",
value: function() {
var n = this.props
, i = n.x
, a = n.y
, o = n.width
, u = n.height
, c = n.data
, l = n.children
, f = n.padding
, s = L.Children.only(l);
return s ? A.cloneElement(s, {
x: i,
y: a,
width: o,
height: u,
margin: f,
compact: !0,
data: c
}) : null
}
}, {
key: "renderTravellerLayer",
value: function(n, i) {
var a, o, u = this, c = this.props, l = c.y, f = c.travellerWidth, s = c.height, d = c.traveller, h = c.ariaLabel, v = c.data, y = c.startIndex, p = c.endIndex, b = Math.max(n, this.props.x), w = Xo(Xo({}, Q(this.props, !1)), {}, {
x: b,
y: l,
width: f,
height: s
}), x = h || "Min value: ".concat((a = v[y]) === null || a === void 0 ? void 0 : a.name, ", Max value: ").concat((o = v[p]) === null || o === void 0 ? void 0 : o.name);
return A.createElement(ye, {
tabIndex: 0,
role: "slider",
"aria-label": x,
"aria-valuenow": n,
className: "recharts-brush-traveller",
onMouseEnter: this.handleEnterSlideOrTraveller,
onMouseLeave: this.handleLeaveSlideOrTraveller,
onMouseDown: this.travellerDragStartHandlers[i],
onTouchStart: this.travellerDragStartHandlers[i],
onKeyDown: function(g) {
["ArrowLeft", "ArrowRight"].includes(g.key) && (g.preventDefault(),
g.stopPropagation(),
u.handleTravellerMoveKeyboard(g.key === "ArrowRight" ? 1 : -1, i))
},
onFocus: function() {
u.setState({
isTravellerFocused: !0
})
},
onBlur: function() {
u.setState({
isTravellerFocused: !1
})
},
style: {
cursor: "col-resize"
}
}, t.renderTraveller(d, w))
}
}, {
key: "renderSlide",
value: function(n, i) {
var a = this.props
, o = a.y
, u = a.height
, c = a.stroke
, l = a.travellerWidth
, f = Math.min(n, i) + l
, s = Math.max(Math.abs(i - n) - l, 0);
return A.createElement("rect", {
className: "recharts-brush-slide",
onMouseEnter: this.handleEnterSlideOrTraveller,
onMouseLeave: this.handleLeaveSlideOrTraveller,
onMouseDown: this.handleSlideDragStart,
onTouchStart: this.handleSlideDragStart,
style: {
cursor: "move"
},
stroke: "none",
fill: c,
fillOpacity: .2,
x: f,
y: o,
width: s,
height: u
})
}
}, {
key: "renderText",
value: function() {
var n = this.props
, i = n.startIndex
, a = n.endIndex
, o = n.y
, u = n.height
, c = n.travellerWidth
, l = n.stroke
, f = this.state
, s = f.startX
, d = f.endX
, h = 5
, v = {
pointerEvents: "none",
fill: l
};
return A.createElement(ye, {
className: "recharts-brush-texts"
}, A.createElement(Qi, Sa({
textAnchor: "end",
verticalAnchor: "middle",
x: Math.min(s, d) - h,
y: o + u / 2
}, v), this.getTextOfTick(i)), A.createElement(Qi, Sa({
textAnchor: "start",
verticalAnchor: "middle",
x: Math.max(s, d) + c + h,
y: o + u / 2
}, v), this.getTextOfTick(a)))
}
}, {
key: "render",
value: function() {
var n = this.props
, i = n.data
, a = n.className
, o = n.children
, u = n.x
, c = n.y
, l = n.width
, f = n.height
, s = n.alwaysShowText
, d = this.state
, h = d.startX
, v = d.endX
, y = d.isTextActive
, p = d.isSlideMoving
, b = d.isTravellerMoving
, w = d.isTravellerFocused;
if (!i || !i.length || !R(u) || !R(c) || !R(l) || !R(f) || l <= 0 || f <= 0)
return null;
var x = re("recharts-brush", a)
, O = A.Children.count(o) === 1
, g = bL("userSelect", "none");
return A.createElement(ye, {
className: x,
onMouseLeave: this.handleLeaveWrapper,
onTouchMove: this.handleTouchMove,
style: g
}, this.renderBackground(), O && this.renderPanorama(), this.renderSlide(h, v), this.renderTravellerLayer(h, "startX"), this.renderTravellerLayer(v, "endX"), (y || p || b || w || s) && this.renderText())
}
}], [{
key: "renderDefaultTraveller",
value: function(n) {
var i = n.x
, a = n.y
, o = n.width
, u = n.height
, c = n.stroke
, l = Math.floor(a + u / 2) - 1;
return A.createElement(A.Fragment, null, A.createElement("rect", {
x: i,
y: a,
width: o,
height: u,
fill: c,
stroke: "none"
}), A.createElement("line", {
x1: i + 1,
y1: l,
x2: i + o - 1,
y2: l,
fill: "none",
stroke: "#fff"
}), A.createElement("line", {
x1: i + 1,
y1: l + 2,
x2: i + o - 1,
y2: l + 2,
fill: "none",
stroke: "#fff"
}))
}
}, {
key: "renderTraveller",
value: function(n, i) {
var a;
return A.isValidElement(n) ? a = A.cloneElement(n, i) : J(n) ? a = n(i) : a = t.renderDefaultTraveller(i),
a
}
}, {
key: "getDerivedStateFromProps",
value: function(n, i) {
var a = n.data
, o = n.width
, u = n.x
, c = n.travellerWidth
, l = n.updateId
, f = n.startIndex
, s = n.endIndex;
if (a !== i.prevData || l !== i.prevUpdateId)
return Xo({
prevData: a,
prevTravellerWidth: c,
prevUpdateId: l,
prevX: u,
prevWidth: o
}, a && a.length ? $L({
data: a,
width: o,
x: u,
travellerWidth: c,
startIndex: f,
endIndex: s
}) : {
scale: null,
scaleValues: null
});
if (i.scale && (o !== i.prevWidth || u !== i.prevX || c !== i.prevTravellerWidth)) {
i.scale.range([u, u + o - c]);
var d = i.scale.domain().map(function(h) {
return i.scale(h)
});
return {
prevData: a,
prevTravellerWidth: c,
prevUpdateId: l,
prevX: u,
prevWidth: o,
startX: i.scale(n.startIndex),
endX: i.scale(n.endIndex),
scaleValues: d
}
}
return null
}
}, {
key: "getIndexInRange",
value: function(n, i) {
for (var a = n.length, o = 0, u = a - 1; u - o > 1; ) {
var c = Math.floor((o + u) / 2);
n[c] > i ? u = c : o = c
}
return i >= n[u] ? u : o
}
}])
}(L.PureComponent);
Fe(Rr, "displayName", "Brush");
Fe(Rr, "defaultProps", {
height: 40,
travellerWidth: 5,
gap: 1,
fill: "#fff",
stroke: "#666",
padding: {
top: 1,
right: 1,
bottom: 1,
left: 1
},
leaveTimeOut: 1e3,
alwaysShowText: !1
});
var TL = Jc;
function jL(e, t) {
var r;
return TL(e, function(n, i, a) {
return r = t(n, i, a),
!r
}),
!!r
}
var EL = jL
, ML = Dp
, CL = Ht
, IL = EL
, kL = Re
, DL = ao;
function NL(e, t, r) {
var n = kL(e) ? ML : IL;
return r && DL(e, t, r) && (t = void 0),
n(e, CL(t))
}
var BL = NL;
const LL = de(BL);
var ft = function(t, r) {
var n = t.alwaysShow
, i = t.ifOverflow;
return n && (i = "extendDomain"),
i === r
}
, sh = nv;
function RL(e, t, r) {
t == "__proto__" && sh ? sh(e, t, {
configurable: !0,
enumerable: !0,
value: r,
writable: !0
}) : e[t] = r
}
var FL = RL
, zL = FL
, WL = tv
, UL = Ht;
function HL(e, t) {
var r = {};
return t = UL(t),
WL(e, function(n, i, a) {
zL(r, i, t(n, i, a))
}),
r
}
var qL = HL;
const KL = de(qL);
function GL(e, t) {
for (var r = -1, n = e == null ? 0 : e.length; ++r < n; )
if (!t(e[r], r, e))
return !1;
return !0
}
var YL = GL
, VL = Jc;
function XL(e, t) {
var r = !0;
return VL(e, function(n, i, a) {
return r = !!t(n, i, a),
r
}),
r
}
var ZL = XL
, JL = YL
, QL = ZL
, eR = Ht
, tR = Re
, rR = ao;
function nR(e, t, r) {
var n = tR(e) ? JL : QL;
return r && rR(e, t, r) && (t = void 0),
n(e, eR(t))
}
var iR = nR;
const Iy = de(iR);
var aR = ["x", "y"];
function oi(e) {
"@babel/helpers - typeof";
return oi = 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
}
,
oi(e)
}
function oc() {
return oc = 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
}
,
oc.apply(this, arguments)
}
function fh(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 wn(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? fh(Object(r), !0).forEach(function(n) {
oR(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : fh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function oR(e, t, r) {
return t = uR(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function uR(e) {
var t = cR(e, "string");
return oi(t) == "symbol" ? t : t + ""
}
function cR(e, t) {
if (oi(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (oi(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function lR(e, t) {
if (e == null)
return {};
var r = sR(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 sR(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function fR(e, t) {
var r = e.x
, n = e.y
, i = lR(e, aR)
, a = "".concat(r)
, o = parseInt(a, 10)
, u = "".concat(n)
, c = parseInt(u, 10)
, l = "".concat(t.height || i.height)
, f = parseInt(l, 10)
, s = "".concat(t.width || i.width)
, d = parseInt(s, 10);
return wn(wn(wn(wn(wn({}, t), i), o ? {
x: o
} : {}), c ? {
y: c
} : {}), {}, {
height: f,
width: d,
name: t.name,
radius: t.radius
})
}
function dh(e) {
return A.createElement(YB, oc({
shapeType: "rectangle",
propTransformer: fR,
activeClassName: "recharts-active-bar"
}, e))
}
var dR = function(t) {
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
return function(n, i) {
if (typeof t == "number")
return t;
var a = typeof n == "number";
return a ? t(n, i) : (a || cr(!1),
r)
}
}, hR = ["value", "background"], ky;
function Fr(e) {
"@babel/helpers - typeof";
return Fr = 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
}
,
Fr(e)
}
function pR(e, t) {
if (e == null)
return {};
var r = vR(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 vR(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function Aa() {
return Aa = 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
}
,
Aa.apply(this, arguments)
}
function hh(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 we(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? hh(Object(r), !0).forEach(function(n) {
Rt(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : hh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function yR(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function ph(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, Ny(n.key), n)
}
}
function gR(e, t, r) {
return t && ph(e.prototype, t),
r && ph(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function mR(e, t, r) {
return t = _a(t),
bR(e, Dy() ? Reflect.construct(t, r || [], _a(e).constructor) : t.apply(e, r))
}
function bR(e, t) {
if (t && (Fr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return xR(e)
}
function xR(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function Dy() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (Dy = function() {
return !!e
}
)()
}
function _a(e) {
return _a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
_a(e)
}
function wR(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && uc(e, t)
}
function uc(e, t) {
return uc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
uc(e, t)
}
function Rt(e, t, r) {
return t = Ny(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Ny(e) {
var t = OR(e, "string");
return Fr(t) == "symbol" ? t : t + ""
}
function OR(e, t) {
if (Fr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Fr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var xi = function(e) {
function t() {
var r;
yR(this, t);
for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++)
i[a] = arguments[a];
return r = mR(this, t, [].concat(i)),
Rt(r, "state", {
isAnimationFinished: !1
}),
Rt(r, "id", pi("recharts-bar-")),
Rt(r, "handleAnimationEnd", function() {
var o = r.props.onAnimationEnd;
r.setState({
isAnimationFinished: !0
}),
o && o()
}),
Rt(r, "handleAnimationStart", function() {
var o = r.props.onAnimationStart;
r.setState({
isAnimationFinished: !1
}),
o && o()
}),
r
}
return wR(t, e),
gR(t, [{
key: "renderRectanglesStatically",
value: function(n) {
var i = this
, a = this.props
, o = a.shape
, u = a.dataKey
, c = a.activeIndex
, l = a.activeBar
, f = Q(this.props, !1);
return n && n.map(function(s, d) {
var h = d === c
, v = h ? l : o
, y = we(we(we({}, f), s), {}, {
isActive: h,
option: v,
index: d,
dataKey: u,
onAnimationStart: i.handleAnimationStart,
onAnimationEnd: i.handleAnimationEnd
});
return A.createElement(ye, Aa({
className: "recharts-bar-rectangle"
}, Ri(i.props, s, d), {
key: "rectangle-".concat(s == null ? void 0 : s.x, "-").concat(s == null ? void 0 : s.y, "-").concat(s == null ? void 0 : s.value)
}), A.createElement(dh, y))
})
}
}, {
key: "renderRectanglesWithAnimation",
value: function() {
var n = this
, i = this.props
, a = i.data
, o = i.layout
, u = i.isAnimationActive
, c = i.animationBegin
, l = i.animationDuration
, f = i.animationEasing
, s = i.animationId
, d = this.state.prevData;
return A.createElement(jt, {
begin: c,
duration: l,
isActive: u,
easing: f,
from: {
t: 0
},
to: {
t: 1
},
key: "bar-".concat(s),
onAnimationEnd: this.handleAnimationEnd,
onAnimationStart: this.handleAnimationStart
}, function(h) {
var v = h.t
, y = a.map(function(p, b) {
var w = d && d[b];
if (w) {
var x = Ge(w.x, p.x)
, O = Ge(w.y, p.y)
, g = Ge(w.width, p.width)
, m = Ge(w.height, p.height);
return we(we({}, p), {}, {
x: x(v),
y: O(v),
width: g(v),
height: m(v)
})
}
if (o === "horizontal") {
var S = Ge(0, p.height)
, P = S(v);
return we(we({}, p), {}, {
y: p.y + p.height - P,
height: P
})
}
var _ = Ge(0, p.width)
, j = _(v);
return we(we({}, p), {}, {
width: j
})
});
return A.createElement(ye, null, n.renderRectanglesStatically(y))
})
}
}, {
key: "renderRectangles",
value: function() {
var n = this.props
, i = n.data
, a = n.isAnimationActive
, o = this.state.prevData;
return a && i && i.length && (!o || !zn(o, i)) ? this.renderRectanglesWithAnimation() : this.renderRectanglesStatically(i)
}
}, {
key: "renderBackground",
value: function() {
var n = this
, i = this.props
, a = i.data
, o = i.dataKey
, u = i.activeIndex
, c = Q(this.props.background, !1);
return a.map(function(l, f) {
l.value;
var s = l.background
, d = pR(l, hR);
if (!s)
return null;
var h = we(we(we(we(we({}, d), {}, {
fill: "#eee"
}, s), c), Ri(n.props, l, f)), {}, {
onAnimationStart: n.handleAnimationStart,
onAnimationEnd: n.handleAnimationEnd,
dataKey: o,
index: f,
className: "recharts-bar-background-rectangle"
});
return A.createElement(dh, Aa({
key: "background-bar-".concat(f),
option: n.props.background,
isActive: f === u
}, h))
})
}
}, {
key: "renderErrorBar",
value: function(n, i) {
if (this.props.isAnimationActive && !this.state.isAnimationFinished)
return null;
var a = this.props
, o = a.data
, u = a.xAxis
, c = a.yAxis
, l = a.layout
, f = a.children
, s = at(f, yo);
if (!s)
return null;
var d = l === "vertical" ? o[0].height / 2 : o[0].width / 2
, h = function(p, b) {
var w = Array.isArray(p.value) ? p.value[1] : p.value;
return {
x: p.x,
y: p.y,
value: w,
errorVal: Ue(p, b)
}
}
, v = {
clipPath: n ? "url(#clipPath-".concat(i, ")") : null
};
return A.createElement(ye, v, s.map(function(y) {
return A.cloneElement(y, {
key: "error-bar-".concat(i, "-").concat(y.props.dataKey),
data: o,
xAxis: u,
yAxis: c,
layout: l,
offset: d,
dataPointFormatter: h
})
}))
}
}, {
key: "render",
value: function() {
var n = this.props
, i = n.hide
, a = n.data
, o = n.className
, u = n.xAxis
, c = n.yAxis
, l = n.left
, f = n.top
, s = n.width
, d = n.height
, h = n.isAnimationActive
, v = n.background
, y = n.id;
if (i || !a || !a.length)
return null;
var p = this.state.isAnimationFinished
, b = re("recharts-bar", o)
, w = u && u.allowDataOverflow
, x = c && c.allowDataOverflow
, O = w || x
, g = te(y) ? this.id : y;
return A.createElement(ye, {
className: b
}, w || x ? A.createElement("defs", null, A.createElement("clipPath", {
id: "clipPath-".concat(g)
}, A.createElement("rect", {
x: w ? l : l - s / 2,
y: x ? f : f - d / 2,
width: w ? s : s * 2,
height: x ? d : d * 2
}))) : null, A.createElement(ye, {
className: "recharts-bar-rectangles",
clipPath: O ? "url(#clipPath-".concat(g, ")") : null
}, v ? this.renderBackground() : null, this.renderRectangles()), this.renderErrorBar(O, g), (!h || p) && Wt.renderCallByParent(this.props, a))
}
}], [{
key: "getDerivedStateFromProps",
value: function(n, i) {
return n.animationId !== i.prevAnimationId ? {
prevAnimationId: n.animationId,
curData: n.data,
prevData: i.curData
} : n.data !== i.curData ? {
curData: n.data
} : null
}
}])
}(L.PureComponent);
ky = xi;
Rt(xi, "displayName", "Bar");
Rt(xi, "defaultProps", {
xAxisId: 0,
yAxisId: 0,
legendType: "rect",
minPointSize: 0,
hide: !1,
data: [],
layout: "vertical",
activeBar: !1,
isAnimationActive: !Pt.isSsr,
animationBegin: 0,
animationDuration: 400,
animationEasing: "ease"
});
Rt(xi, "getComposedData", function(e) {
var t = e.props
, r = e.item
, n = e.barPosition
, i = e.bandSize
, a = e.xAxis
, o = e.yAxis
, u = e.xAxisTicks
, c = e.yAxisTicks
, l = e.stackedData
, f = e.dataStartIndex
, s = e.displayedData
, d = e.offset
, h = hk(n, r);
if (!h)
return null;
var v = t.layout
, y = r.type.defaultProps
, p = y !== void 0 ? we(we({}, y), r.props) : r.props
, b = p.dataKey
, w = p.children
, x = p.minPointSize
, O = v === "horizontal" ? o : a
, g = l ? O.scale.domain() : null
, m = wk({
numericAxis: O
})
, S = at(w, sv)
, P = s.map(function(_, j) {
var $, T, C, k, M, D;
l ? $ = pk(l[f + j], g) : ($ = Ue(_, b),
Array.isArray($) || ($ = [m, $]));
var B = dR(x, ky.defaultProps.minPointSize)($[1], j);
if (v === "horizontal") {
var F, z = [o.scale($[0]), o.scale($[1])], q = z[0], G = z[1];
T = hd({
axis: a,
ticks: u,
bandSize: i,
offset: h.offset,
entry: _,
index: j
}),
C = (F = G ?? q) !== null && F !== void 0 ? F : void 0,
k = h.size;
var U = q - G;
if (M = Number.isNaN(U) ? 0 : U,
D = {
x: T,
y: o.y,
width: k,
height: o.height
},
Math.abs(B) > 0 && Math.abs(M) < Math.abs(B)) {
var K = it(M || B) * (Math.abs(B) - Math.abs(M));
C -= K,
M += K
}
} else {
var ae = [a.scale($[0]), a.scale($[1])]
, ge = ae[0]
, je = ae[1];
if (T = ge,
C = hd({
axis: o,
ticks: c,
bandSize: i,
offset: h.offset,
entry: _,
index: j
}),
k = je - ge,
M = h.size,
D = {
x: a.x,
y: C,
width: a.width,
height: M
},
Math.abs(B) > 0 && Math.abs(k) < Math.abs(B)) {
var pt = it(k || B) * (Math.abs(B) - Math.abs(k));
k += pt
}
}
return we(we(we({}, _), {}, {
x: T,
y: C,
width: k,
height: M,
value: l ? $ : $[1],
payload: _,
background: D
}, S && S[j] && S[j].props), {}, {
tooltipPayload: [yy(r, _)],
tooltipPosition: {
x: T + k / 2,
y: C + M / 2
}
})
});
return we({
data: P,
layout: v
}, d)
});
function ui(e) {
"@babel/helpers - typeof";
return ui = 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
}
,
ui(e)
}
function SR(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function vh(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, By(n.key), n)
}
}
function PR(e, t, r) {
return t && vh(e.prototype, t),
r && vh(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function yh(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 rt(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? yh(Object(r), !0).forEach(function(n) {
bo(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : yh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function bo(e, t, r) {
return t = By(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function By(e) {
var t = AR(e, "string");
return ui(t) == "symbol" ? t : t + ""
}
function AR(e, t) {
if (ui(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ui(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var _R = function(t, r, n, i, a) {
var o = t.width
, u = t.height
, c = t.layout
, l = t.children
, f = Object.keys(r)
, s = {
left: n.left,
leftMirror: n.left,
right: o - n.right,
rightMirror: o - n.right,
top: n.top,
topMirror: n.top,
bottom: u - n.bottom,
bottomMirror: u - n.bottom
}
, d = !!ze(l, xi);
return f.reduce(function(h, v) {
var y = r[v], p = y.orientation, b = y.domain, w = y.padding, x = w === void 0 ? {} : w, O = y.mirror, g = y.reversed, m = "".concat(p).concat(O ? "Mirror" : ""), S, P, _, j, $;
if (y.type === "number" && (y.padding === "gap" || y.padding === "no-gap")) {
var T = b[1] - b[0]
, C = 1 / 0
, k = y.categoricalDomain.sort();
if (k.forEach(function(ae, ge) {
ge > 0 && (C = Math.min((ae || 0) - (k[ge - 1] || 0), C))
}),
Number.isFinite(C)) {
var M = C / T
, D = y.layout === "vertical" ? n.height : n.width;
if (y.padding === "gap" && (S = M * D / 2),
y.padding === "no-gap") {
var B = lr(t.barCategoryGap, M * D)
, F = M * D / 2;
S = F - B - (F - B) / D * B
}
}
}
i === "xAxis" ? P = [n.left + (x.left || 0) + (S || 0), n.left + n.width - (x.right || 0) - (S || 0)] : i === "yAxis" ? P = c === "horizontal" ? [n.top + n.height - (x.bottom || 0), n.top + (x.top || 0)] : [n.top + (x.top || 0) + (S || 0), n.top + n.height - (x.bottom || 0) - (S || 0)] : P = y.range,
g && (P = [P[1], P[0]]);
var z = fk(y, a, d)
, q = z.scale
, G = z.realScaleType;
q.domain(b).range(P),
dk(q);
var U = xk(q, rt(rt({}, y), {}, {
realScaleType: G
}));
i === "xAxis" ? ($ = p === "top" && !O || p === "bottom" && O,
_ = n.left,
j = s[m] - $ * y.height) : i === "yAxis" && ($ = p === "left" && !O || p === "right" && O,
_ = s[m] - $ * y.width,
j = n.top);
var K = rt(rt(rt({}, y), U), {}, {
realScaleType: G,
x: _,
y: j,
scale: q,
width: i === "xAxis" ? n.width : y.width,
height: i === "yAxis" ? n.height : y.height
});
return K.bandSize = ha(K, U),
!y.hide && i === "xAxis" ? s[m] += ($ ? -1 : 1) * K.height : y.hide || (s[m] += ($ ? -1 : 1) * K.width),
rt(rt({}, h), {}, bo({}, v, K))
}, {})
}
, Ly = function(t, r) {
var n = t.x
, i = t.y
, a = r.x
, o = r.y;
return {
x: Math.min(n, a),
y: Math.min(i, o),
width: Math.abs(a - n),
height: Math.abs(o - i)
}
}
, $R = function(t) {
var r = t.x1
, n = t.y1
, i = t.x2
, a = t.y2;
return Ly({
x: r,
y: n
}, {
x: i,
y: a
})
}
, Ry = function() {
function e(t) {
SR(this, e),
this.scale = t
}
return PR(e, [{
key: "domain",
get: function() {
return this.scale.domain
}
}, {
key: "range",
get: function() {
return this.scale.range
}
}, {
key: "rangeMin",
get: function() {
return this.range()[0]
}
}, {
key: "rangeMax",
get: function() {
return this.range()[1]
}
}, {
key: "bandwidth",
get: function() {
return this.scale.bandwidth
}
}, {
key: "apply",
value: function(r) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}
, i = n.bandAware
, a = n.position;
if (r !== void 0) {
if (a)
switch (a) {
case "start":
return this.scale(r);
case "middle":
{
var o = this.bandwidth ? this.bandwidth() / 2 : 0;
return this.scale(r) + o
}
case "end":
{
var u = this.bandwidth ? this.bandwidth() : 0;
return this.scale(r) + u
}
default:
return this.scale(r)
}
if (i) {
var c = this.bandwidth ? this.bandwidth() / 2 : 0;
return this.scale(r) + c
}
return this.scale(r)
}
}
}, {
key: "isInRange",
value: function(r) {
var n = this.range()
, i = n[0]
, a = n[n.length - 1];
return i <= a ? r >= i && r <= a : r >= a && r <= i
}
}], [{
key: "create",
value: function(r) {
return new e(r)
}
}])
}();
bo(Ry, "EPS", 1e-4);
var Tl = function(t) {
var r = Object.keys(t).reduce(function(n, i) {
return rt(rt({}, n), {}, bo({}, i, Ry.create(t[i])))
}, {});
return rt(rt({}, r), {}, {
apply: function(i) {
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}
, o = a.bandAware
, u = a.position;
return KL(i, function(c, l) {
return r[l].apply(c, {
bandAware: o,
position: u
})
})
},
isInRange: function(i) {
return Iy(i, function(a, o) {
return r[o].isInRange(a)
})
}
})
};
function TR(e) {
return (e % 180 + 180) % 180
}
var jR = function(t) {
var r = t.width
, n = t.height
, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0
, a = TR(i)
, o = a * Math.PI / 180
, u = Math.atan(n / r)
, c = o > u && o < Math.PI - u ? n / Math.sin(o) : r / Math.cos(o);
return Math.abs(c)
}
, ER = Ht
, MR = vi
, CR = no;
function IR(e) {
return function(t, r, n) {
var i = Object(t);
if (!MR(t)) {
var a = ER(r);
t = CR(t),
r = function(u) {
return a(i[u], u, i)
}
}
var o = e(t, r, n);
return o > -1 ? i[a ? t[o] : o] : void 0
}
}
var kR = IR
, DR = jy;
function NR(e) {
var t = DR(e)
, r = t % 1;
return t === t ? r ? t - r : t : 0
}
var BR = NR
, LR = Vp
, RR = Ht
, FR = BR
, zR = Math.max;
function WR(e, t, r) {
var n = e == null ? 0 : e.length;
if (!n)
return -1;
var i = r == null ? 0 : FR(r);
return i < 0 && (i = zR(n + i, 0)),
LR(e, RR(t), i)
}
var UR = WR
, HR = kR
, qR = UR
, KR = HR(qR)
, GR = KR;
const YR = de(GR);
var VR = X0(function(e) {
return {
x: e.left,
y: e.top,
width: e.width,
height: e.height
}
}, function(e) {
return ["l", e.left, "t", e.top, "w", e.width, "h", e.height].join("")
})
, jl = L.createContext(void 0)
, El = L.createContext(void 0)
, Fy = L.createContext(void 0)
, zy = L.createContext({})
, Wy = L.createContext(void 0)
, Uy = L.createContext(0)
, Hy = L.createContext(0)
, gh = function(t) {
var r = t.state
, n = r.xAxisMap
, i = r.yAxisMap
, a = r.offset
, o = t.clipPathId
, u = t.children
, c = t.width
, l = t.height
, f = VR(a);
return A.createElement(jl.Provider, {
value: n
}, A.createElement(El.Provider, {
value: i
}, A.createElement(zy.Provider, {
value: a
}, A.createElement(Fy.Provider, {
value: f
}, A.createElement(Wy.Provider, {
value: o
}, A.createElement(Uy.Provider, {
value: l
}, A.createElement(Hy.Provider, {
value: c
}, u)))))))
}
, XR = function() {
return L.useContext(Wy)
}
, qy = function(t) {
var r = L.useContext(jl);
r == null && cr(!1);
var n = r[t];
return n == null && cr(!1),
n
}
, ZR = function() {
var t = L.useContext(jl);
return Bt(t)
}
, JR = function() {
var t = L.useContext(El)
, r = YR(t, function(n) {
return Iy(n.domain, Number.isFinite)
});
return r || Bt(t)
}
, Ky = function(t) {
var r = L.useContext(El);
r == null && cr(!1);
var n = r[t];
return n == null && cr(!1),
n
}
, QR = function() {
var t = L.useContext(Fy);
return t
}
, eF = function() {
return L.useContext(zy)
}
, Ml = function() {
return L.useContext(Hy)
}
, Cl = function() {
return L.useContext(Uy)
};
function zr(e) {
"@babel/helpers - typeof";
return zr = 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
}
,
zr(e)
}
function tF(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function rF(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, Yy(n.key), n)
}
}
function nF(e, t, r) {
return t && rF(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function iF(e, t, r) {
return t = $a(t),
aF(e, Gy() ? Reflect.construct(t, r || [], $a(e).constructor) : t.apply(e, r))
}
function aF(e, t) {
if (t && (zr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return oF(e)
}
function oF(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function Gy() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (Gy = function() {
return !!e
}
)()
}
function $a(e) {
return $a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
$a(e)
}
function uF(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && cc(e, t)
}
function cc(e, t) {
return cc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
cc(e, t)
}
function mh(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 bh(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? mh(Object(r), !0).forEach(function(n) {
Il(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : mh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Il(e, t, r) {
return t = Yy(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Yy(e) {
var t = cF(e, "string");
return zr(t) == "symbol" ? t : t + ""
}
function cF(e, t) {
if (zr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (zr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function lF(e, t) {
return hF(e) || dF(e, t) || fF(e, t) || sF()
}
function sF() {
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 fF(e, t) {
if (e) {
if (typeof e == "string")
return xh(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 xh(e, t)
}
}
function xh(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 dF(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function hF(e) {
if (Array.isArray(e))
return e
}
function lc() {
return lc = 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
}
,
lc.apply(this, arguments)
}
var pF = function(t, r) {
var n;
return A.isValidElement(t) ? n = A.cloneElement(t, r) : J(t) ? n = t(r) : n = A.createElement("line", lc({}, r, {
className: "recharts-reference-line-line"
})),
n
}
, vF = function(t, r, n, i, a, o, u, c, l) {
var f = a.x
, s = a.y
, d = a.width
, h = a.height;
if (n) {
var v = l.y
, y = t.y.apply(v, {
position: o
});
if (ft(l, "discard") && !t.y.isInRange(y))
return null;
var p = [{
x: f + d,
y
}, {
x: f,
y
}];
return c === "left" ? p.reverse() : p
}
if (r) {
var b = l.x
, w = t.x.apply(b, {
position: o
});
if (ft(l, "discard") && !t.x.isInRange(w))
return null;
var x = [{
x: w,
y: s + h
}, {
x: w,
y: s
}];
return u === "top" ? x.reverse() : x
}
if (i) {
var O = l.segment
, g = O.map(function(m) {
return t.apply(m, {
position: o
})
});
return ft(l, "discard") && LL(g, function(m) {
return !t.isInRange(m)
}) ? null : g
}
return null
};
function yF(e) {
var t = e.x
, r = e.y
, n = e.segment
, i = e.xAxisId
, a = e.yAxisId
, o = e.shape
, u = e.className
, c = e.alwaysShow
, l = XR()
, f = qy(i)
, s = Ky(a)
, d = QR();
if (!l || !d)
return null;
St(c === void 0, 'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');
var h = Tl({
x: f.scale,
y: s.scale
})
, v = Ae(t)
, y = Ae(r)
, p = n && n.length === 2
, b = vF(h, v, y, p, d, e.position, f.orientation, s.orientation, e);
if (!b)
return null;
var w = lF(b, 2)
, x = w[0]
, O = x.x
, g = x.y
, m = w[1]
, S = m.x
, P = m.y
, _ = ft(e, "hidden") ? "url(#".concat(l, ")") : void 0
, j = bh(bh({
clipPath: _
}, Q(e, !0)), {}, {
x1: O,
y1: g,
x2: S,
y2: P
});
return A.createElement(ye, {
className: re("recharts-reference-line", u)
}, pF(o, j), Pe.renderCallByParent(e, $R({
x1: O,
y1: g,
x2: S,
y2: P
})))
}
var xo = function(e) {
function t() {
return tF(this, t),
iF(this, t, arguments)
}
return uF(t, e),
nF(t, [{
key: "render",
value: function() {
return A.createElement(yF, this.props)
}
}])
}(A.Component);
Il(xo, "displayName", "ReferenceLine");
Il(xo, "defaultProps", {
isFront: !1,
ifOverflow: "discard",
xAxisId: 0,
yAxisId: 0,
fill: "none",
stroke: "#ccc",
fillOpacity: 1,
strokeWidth: 1,
position: "middle"
});
function sc() {
return sc = 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
}
,
sc.apply(this, arguments)
}
function Wr(e) {
"@babel/helpers - typeof";
return Wr = 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
}
,
Wr(e)
}
function wh(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 Oh(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? wh(Object(r), !0).forEach(function(n) {
wo(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : wh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function gF(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function mF(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, Xy(n.key), n)
}
}
function bF(e, t, r) {
return t && mF(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function xF(e, t, r) {
return t = Ta(t),
wF(e, Vy() ? Reflect.construct(t, r || [], Ta(e).constructor) : t.apply(e, r))
}
function wF(e, t) {
if (t && (Wr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return OF(e)
}
function OF(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function Vy() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (Vy = function() {
return !!e
}
)()
}
function Ta(e) {
return Ta = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Ta(e)
}
function SF(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && fc(e, t)
}
function fc(e, t) {
return fc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
fc(e, t)
}
function wo(e, t, r) {
return t = Xy(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Xy(e) {
var t = PF(e, "string");
return Wr(t) == "symbol" ? t : t + ""
}
function PF(e, t) {
if (Wr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Wr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var AF = function(t) {
var r = t.x
, n = t.y
, i = t.xAxis
, a = t.yAxis
, o = Tl({
x: i.scale,
y: a.scale
})
, u = o.apply({
x: r,
y: n
}, {
bandAware: !0
});
return ft(t, "discard") && !o.isInRange(u) ? null : u
}
, Oo = function(e) {
function t() {
return gF(this, t),
xF(this, t, arguments)
}
return SF(t, e),
bF(t, [{
key: "render",
value: function() {
var n = this.props
, i = n.x
, a = n.y
, o = n.r
, u = n.alwaysShow
, c = n.clipPathId
, l = Ae(i)
, f = Ae(a);
if (St(u === void 0, 'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),
!l || !f)
return null;
var s = AF(this.props);
if (!s)
return null;
var d = s.x
, h = s.y
, v = this.props
, y = v.shape
, p = v.className
, b = ft(this.props, "hidden") ? "url(#".concat(c, ")") : void 0
, w = Oh(Oh({
clipPath: b
}, Q(this.props, !0)), {}, {
cx: d,
cy: h
});
return A.createElement(ye, {
className: re("recharts-reference-dot", p)
}, t.renderDot(y, w), Pe.renderCallByParent(this.props, {
x: d - o,
y: h - o,
width: 2 * o,
height: 2 * o
}))
}
}])
}(A.Component);
wo(Oo, "displayName", "ReferenceDot");
wo(Oo, "defaultProps", {
isFront: !1,
ifOverflow: "discard",
xAxisId: 0,
yAxisId: 0,
r: 10,
fill: "#fff",
stroke: "#ccc",
fillOpacity: 1,
strokeWidth: 1
});
wo(Oo, "renderDot", function(e, t) {
var r;
return A.isValidElement(e) ? r = A.cloneElement(e, t) : J(e) ? r = e(t) : r = A.createElement($l, sc({}, t, {
cx: t.cx,
cy: t.cy,
className: "recharts-reference-dot-dot"
})),
r
});
function dc() {
return dc = 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
}
,
dc.apply(this, arguments)
}
function Ur(e) {
"@babel/helpers - typeof";
return Ur = 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
}
,
Ur(e)
}
function Sh(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 Ph(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Sh(Object(r), !0).forEach(function(n) {
So(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Sh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function _F(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function $F(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, Jy(n.key), n)
}
}
function TF(e, t, r) {
return t && $F(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function jF(e, t, r) {
return t = ja(t),
EF(e, Zy() ? Reflect.construct(t, r || [], ja(e).constructor) : t.apply(e, r))
}
function EF(e, t) {
if (t && (Ur(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return MF(e)
}
function MF(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function Zy() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (Zy = function() {
return !!e
}
)()
}
function ja(e) {
return ja = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
ja(e)
}
function CF(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && hc(e, t)
}
function hc(e, t) {
return hc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
hc(e, t)
}
function So(e, t, r) {
return t = Jy(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function Jy(e) {
var t = IF(e, "string");
return Ur(t) == "symbol" ? t : t + ""
}
function IF(e, t) {
if (Ur(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Ur(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var kF = function(t, r, n, i, a) {
var o = a.x1
, u = a.x2
, c = a.y1
, l = a.y2
, f = a.xAxis
, s = a.yAxis;
if (!f || !s)
return null;
var d = Tl({
x: f.scale,
y: s.scale
})
, h = {
x: t ? d.x.apply(o, {
position: "start"
}) : d.x.rangeMin,
y: n ? d.y.apply(c, {
position: "start"
}) : d.y.rangeMin
}
, v = {
x: r ? d.x.apply(u, {
position: "end"
}) : d.x.rangeMax,
y: i ? d.y.apply(l, {
position: "end"
}) : d.y.rangeMax
};
return ft(a, "discard") && (!d.isInRange(h) || !d.isInRange(v)) ? null : Ly(h, v)
}
, Po = function(e) {
function t() {
return _F(this, t),
jF(this, t, arguments)
}
return CF(t, e),
TF(t, [{
key: "render",
value: function() {
var n = this.props
, i = n.x1
, a = n.x2
, o = n.y1
, u = n.y2
, c = n.className
, l = n.alwaysShow
, f = n.clipPathId;
St(l === void 0, 'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');
var s = Ae(i)
, d = Ae(a)
, h = Ae(o)
, v = Ae(u)
, y = this.props.shape;
if (!s && !d && !h && !v && !y)
return null;
var p = kF(s, d, h, v, this.props);
if (!p && !y)
return null;
var b = ft(this.props, "hidden") ? "url(#".concat(f, ")") : void 0;
return A.createElement(ye, {
className: re("recharts-reference-area", c)
}, t.renderRect(y, Ph(Ph({
clipPath: b
}, Q(this.props, !0)), p)), Pe.renderCallByParent(this.props, p))
}
}])
}(A.Component);
So(Po, "displayName", "ReferenceArea");
So(Po, "defaultProps", {
isFront: !1,
ifOverflow: "discard",
xAxisId: 0,
yAxisId: 0,
r: 10,
fill: "#ccc",
fillOpacity: .5,
stroke: "none",
strokeWidth: 1
});
So(Po, "renderRect", function(e, t) {
var r;
return A.isValidElement(e) ? r = A.cloneElement(e, t) : J(e) ? r = e(t) : r = A.createElement(_l, dc({}, t, {
className: "recharts-reference-area-rect"
})),
r
});
function Qy(e, t, r) {
if (t < 1)
return [];
if (t === 1 && r === void 0)
return e;
for (var n = [], i = 0; i < e.length; i += t)
n.push(e[i]);
return n
}
function DF(e, t, r) {
var n = {
width: e.width + t.width,
height: e.height + t.height
};
return jR(n, r)
}
function NF(e, t, r) {
var n = r === "width"
, i = e.x
, a = e.y
, o = e.width
, u = e.height;
return t === 1 ? {
start: n ? i : a,
end: n ? i + o : a + u
} : {
start: n ? i + o : a + u,
end: n ? i : a
}
}
function Ea(e, t, r, n, i) {
if (e * t < e * n || e * t > e * i)
return !1;
var a = r();
return e * (t - e * a / 2 - n) >= 0 && e * (t + e * a / 2 - i) <= 0
}
function BF(e, t) {
return Qy(e, t + 1)
}
function LF(e, t, r, n, i) {
for (var a = (n || []).slice(), o = t.start, u = t.end, c = 0, l = 1, f = o, s = function() {
var v = n == null ? void 0 : n[c];
if (v === void 0)
return {
v: Qy(n, l)
};
var y = c, p, b = function() {
return p === void 0 && (p = r(v, y)),
p
}, w = v.coordinate, x = c === 0 || Ea(e, w, b, f, u);
x || (c = 0,
f = o,
l += 1),
x && (f = w + e * (b() / 2 + i),
c += l)
}, d; l <= a.length; )
if (d = s(),
d)
return d.v;
return []
}
function ci(e) {
"@babel/helpers - typeof";
return ci = 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
}
,
ci(e)
}
function Ah(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 Ie(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Ah(Object(r), !0).forEach(function(n) {
RF(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ah(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function RF(e, t, r) {
return t = FF(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function FF(e) {
var t = zF(e, "string");
return ci(t) == "symbol" ? t : t + ""
}
function zF(e, t) {
if (ci(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (ci(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function WF(e, t, r, n, i) {
for (var a = (n || []).slice(), o = a.length, u = t.start, c = t.end, l = function(d) {
var h = a[d], v, y = function() {
return v === void 0 && (v = r(h, d)),
v
};
if (d === o - 1) {
var p = e * (h.coordinate + e * y() / 2 - c);
a[d] = h = Ie(Ie({}, h), {}, {
tickCoord: p > 0 ? h.coordinate - p * e : h.coordinate
})
} else
a[d] = h = Ie(Ie({}, h), {}, {
tickCoord: h.coordinate
});
var b = Ea(e, h.tickCoord, y, u, c);
b && (c = h.tickCoord - e * (y() / 2 + i),
a[d] = Ie(Ie({}, h), {}, {
isShow: !0
}))
}, f = o - 1; f >= 0; f--)
l(f);
return a
}
function UF(e, t, r, n, i, a) {
var o = (n || []).slice()
, u = o.length
, c = t.start
, l = t.end;
if (a) {
var f = n[u - 1]
, s = r(f, u - 1)
, d = e * (f.coordinate + e * s / 2 - l);
o[u - 1] = f = Ie(Ie({}, f), {}, {
tickCoord: d > 0 ? f.coordinate - d * e : f.coordinate
});
var h = Ea(e, f.tickCoord, function() {
return s
}, c, l);
h && (l = f.tickCoord - e * (s / 2 + i),
o[u - 1] = Ie(Ie({}, f), {}, {
isShow: !0
}))
}
for (var v = a ? u - 1 : u, y = function(w) {
var x = o[w], O, g = function() {
return O === void 0 && (O = r(x, w)),
O
};
if (w === 0) {
var m = e * (x.coordinate - e * g() / 2 - c);
o[w] = x = Ie(Ie({}, x), {}, {
tickCoord: m < 0 ? x.coordinate - m * e : x.coordinate
})
} else
o[w] = x = Ie(Ie({}, x), {}, {
tickCoord: x.coordinate
});
var S = Ea(e, x.tickCoord, g, c, l);
S && (c = x.tickCoord + e * (g() / 2 + i),
o[w] = Ie(Ie({}, x), {}, {
isShow: !0
}))
}, p = 0; p < v; p++)
y(p);
return o
}
function kl(e, t, r) {
var n = e.tick
, i = e.ticks
, a = e.viewBox
, o = e.minTickGap
, u = e.orientation
, c = e.interval
, l = e.tickFormatter
, f = e.unit
, s = e.angle;
if (!i || !i.length || !n)
return [];
if (R(c) || Pt.isSsr)
return BF(i, typeof c == "number" && R(c) ? c : 0);
var d = []
, h = u === "top" || u === "bottom" ? "width" : "height"
, v = f && h === "width" ? Sn(f, {
fontSize: t,
letterSpacing: r
}) : {
width: 0,
height: 0
}
, y = function(x, O) {
var g = J(l) ? l(x.value, O) : x.value;
return h === "width" ? DF(Sn(g, {
fontSize: t,
letterSpacing: r
}), v, s) : Sn(g, {
fontSize: t,
letterSpacing: r
})[h]
}
, p = i.length >= 2 ? it(i[1].coordinate - i[0].coordinate) : 1
, b = NF(a, p, h);
return c === "equidistantPreserveStart" ? LF(p, b, y, i, o) : (c === "preserveStart" || c === "preserveStartEnd" ? d = UF(p, b, y, i, o, c === "preserveStartEnd") : d = WF(p, b, y, i, o),
d.filter(function(w) {
return w.isShow
}))
}
var HF = ["viewBox"]
, qF = ["viewBox"]
, KF = ["ticks"];
function Hr(e) {
"@babel/helpers - typeof";
return Hr = 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
}
,
Hr(e)
}
function Or() {
return Or = 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
}
,
Or.apply(this, arguments)
}
function _h(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 De(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? _h(Object(r), !0).forEach(function(n) {
Dl(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : _h(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Zo(e, t) {
if (e == null)
return {};
var r = GF(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 GF(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function YF(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function $h(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, tg(n.key), n)
}
}
function VF(e, t, r) {
return t && $h(e.prototype, t),
r && $h(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function XF(e, t, r) {
return t = Ma(t),
ZF(e, eg() ? Reflect.construct(t, r || [], Ma(e).constructor) : t.apply(e, r))
}
function ZF(e, t) {
if (t && (Hr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return JF(e)
}
function JF(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function eg() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (eg = function() {
return !!e
}
)()
}
function Ma(e) {
return Ma = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Ma(e)
}
function QF(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && pc(e, t)
}
function pc(e, t) {
return pc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
pc(e, t)
}
function Dl(e, t, r) {
return t = tg(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function tg(e) {
var t = ez(e, "string");
return Hr(t) == "symbol" ? t : t + ""
}
function ez(e, t) {
if (Hr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Hr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var sn = function(e) {
function t(r) {
var n;
return YF(this, t),
n = XF(this, t, [r]),
n.state = {
fontSize: "",
letterSpacing: ""
},
n
}
return QF(t, e),
VF(t, [{
key: "shouldComponentUpdate",
value: function(n, i) {
var a = n.viewBox
, o = Zo(n, HF)
, u = this.props
, c = u.viewBox
, l = Zo(u, qF);
return !Ar(a, c) || !Ar(o, l) || !Ar(i, this.state)
}
}, {
key: "componentDidMount",
value: function() {
var n = this.layerReference;
if (n) {
var i = n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];
i && this.setState({
fontSize: window.getComputedStyle(i).fontSize,
letterSpacing: window.getComputedStyle(i).letterSpacing
})
}
}
}, {
key: "getTickLineCoord",
value: function(n) {
var i = this.props, a = i.x, o = i.y, u = i.width, c = i.height, l = i.orientation, f = i.tickSize, s = i.mirror, d = i.tickMargin, h, v, y, p, b, w, x = s ? -1 : 1, O = n.tickSize || f, g = R(n.tickCoord) ? n.tickCoord : n.coordinate;
switch (l) {
case "top":
h = v = n.coordinate,
p = o + +!s * c,
y = p - x * O,
w = y - x * d,
b = g;
break;
case "left":
y = p = n.coordinate,
v = a + +!s * u,
h = v - x * O,
b = h - x * d,
w = g;
break;
case "right":
y = p = n.coordinate,
v = a + +s * u,
h = v + x * O,
b = h + x * d,
w = g;
break;
default:
h = v = n.coordinate,
p = o + +s * c,
y = p + x * O,
w = y + x * d,
b = g;
break
}
return {
line: {
x1: h,
y1: y,
x2: v,
y2: p
},
tick: {
x: b,
y: w
}
}
}
}, {
key: "getTickTextAnchor",
value: function() {
var n = this.props, i = n.orientation, a = n.mirror, o;
switch (i) {
case "left":
o = a ? "start" : "end";
break;
case "right":
o = a ? "end" : "start";
break;
default:
o = "middle";
break
}
return o
}
}, {
key: "getTickVerticalAnchor",
value: function() {
var n = this.props
, i = n.orientation
, a = n.mirror
, o = "end";
switch (i) {
case "left":
case "right":
o = "middle";
break;
case "top":
o = a ? "start" : "end";
break;
default:
o = a ? "end" : "start";
break
}
return o
}
}, {
key: "renderAxisLine",
value: function() {
var n = this.props
, i = n.x
, a = n.y
, o = n.width
, u = n.height
, c = n.orientation
, l = n.mirror
, f = n.axisLine
, s = De(De(De({}, Q(this.props, !1)), Q(f, !1)), {}, {
fill: "none"
});
if (c === "top" || c === "bottom") {
var d = +(c === "top" && !l || c === "bottom" && l);
s = De(De({}, s), {}, {
x1: i,
y1: a + d * u,
x2: i + o,
y2: a + d * u
})
} else {
var h = +(c === "left" && !l || c === "right" && l);
s = De(De({}, s), {}, {
x1: i + h * o,
y1: a,
x2: i + h * o,
y2: a + u
})
}
return A.createElement("line", Or({}, s, {
className: re("recharts-cartesian-axis-line", Ve(f, "className"))
}))
}
}, {
key: "renderTicks",
value: function(n, i, a) {
var o = this
, u = this.props
, c = u.tickLine
, l = u.stroke
, f = u.tick
, s = u.tickFormatter
, d = u.unit
, h = kl(De(De({}, this.props), {}, {
ticks: n
}), i, a)
, v = this.getTickTextAnchor()
, y = this.getTickVerticalAnchor()
, p = Q(this.props, !1)
, b = Q(f, !1)
, w = De(De({}, p), {}, {
fill: "none"
}, Q(c, !1))
, x = h.map(function(O, g) {
var m = o.getTickLineCoord(O)
, S = m.line
, P = m.tick
, _ = De(De(De(De({
textAnchor: v,
verticalAnchor: y
}, p), {}, {
stroke: "none",
fill: l
}, b), P), {}, {
index: g,
payload: O,
visibleTicksCount: h.length,
tickFormatter: s
});
return A.createElement(ye, Or({
className: "recharts-cartesian-axis-tick",
key: "tick-".concat(O.value, "-").concat(O.coordinate, "-").concat(O.tickCoord)
}, Ri(o.props, O, g)), c && A.createElement("line", Or({}, w, S, {
className: re("recharts-cartesian-axis-tick-line", Ve(c, "className"))
})), f && t.renderTickItem(f, _, "".concat(J(s) ? s(O.value, g) : O.value).concat(d || "")))
});
return A.createElement("g", {
className: "recharts-cartesian-axis-ticks"
}, x)
}
}, {
key: "render",
value: function() {
var n = this
, i = this.props
, a = i.axisLine
, o = i.width
, u = i.height
, c = i.ticksGenerator
, l = i.className
, f = i.hide;
if (f)
return null;
var s = this.props
, d = s.ticks
, h = Zo(s, KF)
, v = d;
return J(c) && (v = d && d.length > 0 ? c(this.props) : c(h)),
o <= 0 || u <= 0 || !v || !v.length ? null : A.createElement(ye, {
className: re("recharts-cartesian-axis", l),
ref: function(p) {
n.layerReference = p
}
}, a && this.renderAxisLine(), this.renderTicks(v, this.state.fontSize, this.state.letterSpacing), Pe.renderCallByParent(this.props))
}
}], [{
key: "renderTickItem",
value: function(n, i, a) {
var o;
return A.isValidElement(n) ? o = A.cloneElement(n, i) : J(n) ? o = n(i) : o = A.createElement(Qi, Or({}, i, {
className: "recharts-cartesian-axis-tick-value"
}), a),
o
}
}])
}(L.Component);
Dl(sn, "displayName", "CartesianAxis");
Dl(sn, "defaultProps", {
x: 0,
y: 0,
width: 0,
height: 0,
viewBox: {
x: 0,
y: 0,
width: 0,
height: 0
},
orientation: "bottom",
ticks: [],
stroke: "#666",
tickLine: !0,
axisLine: !0,
tick: !0,
mirror: !1,
minTickGap: 5,
tickSize: 6,
tickMargin: 2,
interval: "preserveEnd"
});
var tz = ["x1", "y1", "x2", "y2", "key"]
, rz = ["offset"];
function fr(e) {
"@babel/helpers - typeof";
return fr = 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
}
,
fr(e)
}
function Th(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 ke(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Th(Object(r), !0).forEach(function(n) {
nz(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Th(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function nz(e, t, r) {
return t = iz(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function iz(e) {
var t = az(e, "string");
return fr(t) == "symbol" ? t : t + ""
}
function az(e, t) {
if (fr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (fr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function nr() {
return nr = 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
}
,
nr.apply(this, arguments)
}
function jh(e, t) {
if (e == null)
return {};
var r = oz(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 oz(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
var uz = function(t) {
var r = t.fill;
if (!r || r === "none")
return null;
var n = t.fillOpacity
, i = t.x
, a = t.y
, o = t.width
, u = t.height
, c = t.ry;
return A.createElement("rect", {
x: i,
y: a,
ry: c,
width: o,
height: u,
stroke: "none",
fill: r,
fillOpacity: n,
className: "recharts-cartesian-grid-bg"
})
};
function rg(e, t) {
var r;
if (A.isValidElement(e))
r = A.cloneElement(e, t);
else if (J(e))
r = e(t);
else {
var n = t.x1
, i = t.y1
, a = t.x2
, o = t.y2
, u = t.key
, c = jh(t, tz)
, l = Q(c, !1);
l.offset;
var f = jh(l, rz);
r = A.createElement("line", nr({}, f, {
x1: n,
y1: i,
x2: a,
y2: o,
fill: "none",
key: u
}))
}
return r
}
function cz(e) {
var t = e.x
, r = e.width
, n = e.horizontal
, i = n === void 0 ? !0 : n
, a = e.horizontalPoints;
if (!i || !a || !a.length)
return null;
var o = a.map(function(u, c) {
var l = ke(ke({}, e), {}, {
x1: t,
y1: u,
x2: t + r,
y2: u,
key: "line-".concat(c),
index: c
});
return rg(i, l)
});
return A.createElement("g", {
className: "recharts-cartesian-grid-horizontal"
}, o)
}
function lz(e) {
var t = e.y
, r = e.height
, n = e.vertical
, i = n === void 0 ? !0 : n
, a = e.verticalPoints;
if (!i || !a || !a.length)
return null;
var o = a.map(function(u, c) {
var l = ke(ke({}, e), {}, {
x1: u,
y1: t,
x2: u,
y2: t + r,
key: "line-".concat(c),
index: c
});
return rg(i, l)
});
return A.createElement("g", {
className: "recharts-cartesian-grid-vertical"
}, o)
}
function sz(e) {
var t = e.horizontalFill
, r = e.fillOpacity
, n = e.x
, i = e.y
, a = e.width
, o = e.height
, u = e.horizontalPoints
, c = e.horizontal
, l = c === void 0 ? !0 : c;
if (!l || !t || !t.length)
return null;
var f = u.map(function(d) {
return Math.round(d + i - i)
}).sort(function(d, h) {
return d - h
});
i !== f[0] && f.unshift(0);
var s = f.map(function(d, h) {
var v = !f[h + 1]
, y = v ? i + o - d : f[h + 1] - d;
if (y <= 0)
return null;
var p = h % t.length;
return A.createElement("rect", {
key: "react-".concat(h),
y: d,
x: n,
height: y,
width: a,
stroke: "none",
fill: t[p],
fillOpacity: r,
className: "recharts-cartesian-grid-bg"
})
});
return A.createElement("g", {
className: "recharts-cartesian-gridstripes-horizontal"
}, s)
}
function fz(e) {
var t = e.vertical
, r = t === void 0 ? !0 : t
, n = e.verticalFill
, i = e.fillOpacity
, a = e.x
, o = e.y
, u = e.width
, c = e.height
, l = e.verticalPoints;
if (!r || !n || !n.length)
return null;
var f = l.map(function(d) {
return Math.round(d + a - a)
}).sort(function(d, h) {
return d - h
});
a !== f[0] && f.unshift(0);
var s = f.map(function(d, h) {
var v = !f[h + 1]
, y = v ? a + u - d : f[h + 1] - d;
if (y <= 0)
return null;
var p = h % n.length;
return A.createElement("rect", {
key: "react-".concat(h),
x: d,
y: o,
width: y,
height: c,
stroke: "none",
fill: n[p],
fillOpacity: i,
className: "recharts-cartesian-grid-bg"
})
});
return A.createElement("g", {
className: "recharts-cartesian-gridstripes-vertical"
}, s)
}
var dz = function(t, r) {
var n = t.xAxis
, i = t.width
, a = t.height
, o = t.offset;
return py(kl(ke(ke(ke({}, sn.defaultProps), n), {}, {
ticks: wt(n, !0),
viewBox: {
x: 0,
y: 0,
width: i,
height: a
}
})), o.left, o.left + o.width, r)
}
, hz = function(t, r) {
var n = t.yAxis
, i = t.width
, a = t.height
, o = t.offset;
return py(kl(ke(ke(ke({}, sn.defaultProps), n), {}, {
ticks: wt(n, !0),
viewBox: {
x: 0,
y: 0,
width: i,
height: a
}
})), o.top, o.top + o.height, r)
}
, xr = {
horizontal: !0,
vertical: !0,
horizontalPoints: [],
verticalPoints: [],
stroke: "#ccc",
fill: "none",
verticalFill: [],
horizontalFill: []
};
function ng(e) {
var t, r, n, i, a, o, u = Ml(), c = Cl(), l = eF(), f = ke(ke({}, e), {}, {
stroke: (t = e.stroke) !== null && t !== void 0 ? t : xr.stroke,
fill: (r = e.fill) !== null && r !== void 0 ? r : xr.fill,
horizontal: (n = e.horizontal) !== null && n !== void 0 ? n : xr.horizontal,
horizontalFill: (i = e.horizontalFill) !== null && i !== void 0 ? i : xr.horizontalFill,
vertical: (a = e.vertical) !== null && a !== void 0 ? a : xr.vertical,
verticalFill: (o = e.verticalFill) !== null && o !== void 0 ? o : xr.verticalFill,
x: R(e.x) ? e.x : l.left,
y: R(e.y) ? e.y : l.top,
width: R(e.width) ? e.width : l.width,
height: R(e.height) ? e.height : l.height
}), s = f.x, d = f.y, h = f.width, v = f.height, y = f.syncWithTicks, p = f.horizontalValues, b = f.verticalValues, w = ZR(), x = JR();
if (!R(h) || h <= 0 || !R(v) || v <= 0 || !R(s) || s !== +s || !R(d) || d !== +d)
return null;
var O = f.verticalCoordinatesGenerator || dz
, g = f.horizontalCoordinatesGenerator || hz
, m = f.horizontalPoints
, S = f.verticalPoints;
if ((!m || !m.length) && J(g)) {
var P = p && p.length
, _ = g({
yAxis: x ? ke(ke({}, x), {}, {
ticks: P ? p : x.ticks
}) : void 0,
width: u,
height: c,
offset: l
}, P ? !0 : y);
St(Array.isArray(_), "horizontalCoordinatesGenerator should return Array but instead it returned [".concat(fr(_), "]")),
Array.isArray(_) && (m = _)
}
if ((!S || !S.length) && J(O)) {
var j = b && b.length
, $ = O({
xAxis: w ? ke(ke({}, w), {}, {
ticks: j ? b : w.ticks
}) : void 0,
width: u,
height: c,
offset: l
}, j ? !0 : y);
St(Array.isArray($), "verticalCoordinatesGenerator should return Array but instead it returned [".concat(fr($), "]")),
Array.isArray($) && (S = $)
}
return A.createElement("g", {
className: "recharts-cartesian-grid"
}, A.createElement(uz, {
fill: f.fill,
fillOpacity: f.fillOpacity,
x: f.x,
y: f.y,
width: f.width,
height: f.height,
ry: f.ry
}), A.createElement(cz, nr({}, f, {
offset: l,
horizontalPoints: m,
xAxis: w,
yAxis: x
})), A.createElement(lz, nr({}, f, {
offset: l,
verticalPoints: S,
xAxis: w,
yAxis: x
})), A.createElement(sz, nr({}, f, {
horizontalPoints: m
})), A.createElement(fz, nr({}, f, {
verticalPoints: S
})))
}
ng.displayName = "CartesianGrid";
var pz = ["layout", "type", "stroke", "connectNulls", "isRange", "ref"], vz = ["key"], ig;
function qr(e) {
"@babel/helpers - typeof";
return qr = 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
}
,
qr(e)
}
function ag(e, t) {
if (e == null)
return {};
var r = yz(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 yz(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function ir() {
return ir = 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
}
,
ir.apply(this, arguments)
}
function Eh(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 Dt(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Eh(Object(r), !0).forEach(function(n) {
lt(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Eh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function gz(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function Mh(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, ug(n.key), n)
}
}
function mz(e, t, r) {
return t && Mh(e.prototype, t),
r && Mh(e, r),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function bz(e, t, r) {
return t = Ca(t),
xz(e, og() ? Reflect.construct(t, r || [], Ca(e).constructor) : t.apply(e, r))
}
function xz(e, t) {
if (t && (qr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return wz(e)
}
function wz(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function og() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (og = function() {
return !!e
}
)()
}
function Ca(e) {
return Ca = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Ca(e)
}
function Oz(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && vc(e, t)
}
function vc(e, t) {
return vc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
vc(e, t)
}
function lt(e, t, r) {
return t = ug(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function ug(e) {
var t = Sz(e, "string");
return qr(t) == "symbol" ? t : t + ""
}
function Sz(e, t) {
if (qr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (qr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var Et = function(e) {
function t() {
var r;
gz(this, t);
for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++)
i[a] = arguments[a];
return r = bz(this, t, [].concat(i)),
lt(r, "state", {
isAnimationFinished: !0
}),
lt(r, "id", pi("recharts-area-")),
lt(r, "handleAnimationEnd", function() {
var o = r.props.onAnimationEnd;
r.setState({
isAnimationFinished: !0
}),
J(o) && o()
}),
lt(r, "handleAnimationStart", function() {
var o = r.props.onAnimationStart;
r.setState({
isAnimationFinished: !1
}),
J(o) && o()
}),
r
}
return Oz(t, e),
mz(t, [{
key: "renderDots",
value: function(n, i, a) {
var o = this.props.isAnimationActive
, u = this.state.isAnimationFinished;
if (o && !u)
return null;
var c = this.props
, l = c.dot
, f = c.points
, s = c.dataKey
, d = Q(this.props, !1)
, h = Q(l, !0)
, v = f.map(function(p, b) {
var w = Dt(Dt(Dt({
key: "dot-".concat(b),
r: 3
}, d), h), {}, {
index: b,
cx: p.x,
cy: p.y,
dataKey: s,
value: p.value,
payload: p.payload,
points: f
});
return t.renderDotItem(l, w)
})
, y = {
clipPath: n ? "url(#clipPath-".concat(i ? "" : "dots-").concat(a, ")") : null
};
return A.createElement(ye, ir({
className: "recharts-area-dots"
}, y), v)
}
}, {
key: "renderHorizontalRect",
value: function(n) {
var i = this.props
, a = i.baseLine
, o = i.points
, u = i.strokeWidth
, c = o[0].x
, l = o[o.length - 1].x
, f = n * Math.abs(c - l)
, s = Lt(o.map(function(d) {
return d.y || 0
}));
return R(a) && typeof a == "number" ? s = Math.max(a, s) : a && Array.isArray(a) && a.length && (s = Math.max(Lt(a.map(function(d) {
return d.y || 0
})), s)),
R(s) ? A.createElement("rect", {
x: c < l ? c : c - f,
y: 0,
width: f,
height: Math.floor(s + (u ? parseInt("".concat(u), 10) : 1))
}) : null
}
}, {
key: "renderVerticalRect",
value: function(n) {
var i = this.props
, a = i.baseLine
, o = i.points
, u = i.strokeWidth
, c = o[0].y
, l = o[o.length - 1].y
, f = n * Math.abs(c - l)
, s = Lt(o.map(function(d) {
return d.x || 0
}));
return R(a) && typeof a == "number" ? s = Math.max(a, s) : a && Array.isArray(a) && a.length && (s = Math.max(Lt(a.map(function(d) {
return d.x || 0
})), s)),
R(s) ? A.createElement("rect", {
x: 0,
y: c < l ? c : c - f,
width: s + (u ? parseInt("".concat(u), 10) : 1),
height: Math.floor(f)
}) : null
}
}, {
key: "renderClipRect",
value: function(n) {
var i = this.props.layout;
return i === "vertical" ? this.renderVerticalRect(n) : this.renderHorizontalRect(n)
}
}, {
key: "renderAreaStatically",
value: function(n, i, a, o) {
var u = this.props
, c = u.layout
, l = u.type
, f = u.stroke
, s = u.connectNulls
, d = u.isRange;
u.ref;
var h = ag(u, pz);
return A.createElement(ye, {
clipPath: a ? "url(#clipPath-".concat(o, ")") : null
}, A.createElement(_n, ir({}, Q(h, !0), {
points: n,
connectNulls: s,
type: l,
baseLine: i,
layout: c,
stroke: "none",
className: "recharts-area-area"
})), f !== "none" && A.createElement(_n, ir({}, Q(this.props, !1), {
className: "recharts-area-curve",
layout: c,
type: l,
connectNulls: s,
fill: "none",
points: n
})), f !== "none" && d && A.createElement(_n, ir({}, Q(this.props, !1), {
className: "recharts-area-curve",
layout: c,
type: l,
connectNulls: s,
fill: "none",
points: i
})))
}
}, {
key: "renderAreaWithAnimation",
value: function(n, i) {
var a = this
, o = this.props
, u = o.points
, c = o.baseLine
, l = o.isAnimationActive
, f = o.animationBegin
, s = o.animationDuration
, d = o.animationEasing
, h = o.animationId
, v = this.state
, y = v.prevPoints
, p = v.prevBaseLine;
return A.createElement(jt, {
begin: f,
duration: s,
isActive: l,
easing: d,
from: {
t: 0
},
to: {
t: 1
},
key: "area-".concat(h),
onAnimationEnd: this.handleAnimationEnd,
onAnimationStart: this.handleAnimationStart
}, function(b) {
var w = b.t;
if (y) {
var x = y.length / u.length, O = u.map(function(P, _) {
var j = Math.floor(_ * x);
if (y[j]) {
var $ = y[j]
, T = Ge($.x, P.x)
, C = Ge($.y, P.y);
return Dt(Dt({}, P), {}, {
x: T(w),
y: C(w)
})
}
return P
}), g;
if (R(c) && typeof c == "number") {
var m = Ge(p, c);
g = m(w)
} else if (te(c) || tn(c)) {
var S = Ge(p, 0);
g = S(w)
} else
g = c.map(function(P, _) {
var j = Math.floor(_ * x);
if (p[j]) {
var $ = p[j]
, T = Ge($.x, P.x)
, C = Ge($.y, P.y);
return Dt(Dt({}, P), {}, {
x: T(w),
y: C(w)
})
}
return P
});
return a.renderAreaStatically(O, g, n, i)
}
return A.createElement(ye, null, A.createElement("defs", null, A.createElement("clipPath", {
id: "animationClipPath-".concat(i)
}, a.renderClipRect(w))), A.createElement(ye, {
clipPath: "url(#animationClipPath-".concat(i, ")")
}, a.renderAreaStatically(u, c, n, i)))
})
}
}, {
key: "renderArea",
value: function(n, i) {
var a = this.props
, o = a.points
, u = a.baseLine
, c = a.isAnimationActive
, l = this.state
, f = l.prevPoints
, s = l.prevBaseLine
, d = l.totalLength;
return c && o && o.length && (!f && d > 0 || !zn(f, o) || !zn(s, u)) ? this.renderAreaWithAnimation(n, i) : this.renderAreaStatically(o, u, n, i)
}
}, {
key: "render",
value: function() {
var n, i = this.props, a = i.hide, o = i.dot, u = i.points, c = i.className, l = i.top, f = i.left, s = i.xAxis, d = i.yAxis, h = i.width, v = i.height, y = i.isAnimationActive, p = i.id;
if (a || !u || !u.length)
return null;
var b = this.state.isAnimationFinished
, w = u.length === 1
, x = re("recharts-area", c)
, O = s && s.allowDataOverflow
, g = d && d.allowDataOverflow
, m = O || g
, S = te(p) ? this.id : p
, P = (n = Q(o, !1)) !== null && n !== void 0 ? n : {
r: 3,
strokeWidth: 2
}
, _ = P.r
, j = _ === void 0 ? 3 : _
, $ = P.strokeWidth
, T = $ === void 0 ? 2 : $
, C = rw(o) ? o : {}
, k = C.clipDot
, M = k === void 0 ? !0 : k
, D = j * 2 + T;
return A.createElement(ye, {
className: x
}, O || g ? A.createElement("defs", null, A.createElement("clipPath", {
id: "clipPath-".concat(S)
}, A.createElement("rect", {
x: O ? f : f - h / 2,
y: g ? l : l - v / 2,
width: O ? h : h * 2,
height: g ? v : v * 2
})), !M && A.createElement("clipPath", {
id: "clipPath-dots-".concat(S)
}, A.createElement("rect", {
x: f - D / 2,
y: l - D / 2,
width: h + D,
height: v + D
}))) : null, w ? null : this.renderArea(m, S), (o || w) && this.renderDots(m, M, S), (!y || b) && Wt.renderCallByParent(this.props, u))
}
}], [{
key: "getDerivedStateFromProps",
value: function(n, i) {
return n.animationId !== i.prevAnimationId ? {
prevAnimationId: n.animationId,
curPoints: n.points,
curBaseLine: n.baseLine,
prevPoints: i.curPoints,
prevBaseLine: i.curBaseLine
} : n.points !== i.curPoints || n.baseLine !== i.curBaseLine ? {
curPoints: n.points,
curBaseLine: n.baseLine
} : null
}
}])
}(L.PureComponent);
ig = Et;
lt(Et, "displayName", "Area");
lt(Et, "defaultProps", {
stroke: "#3182bd",
fill: "#3182bd",
fillOpacity: .6,
xAxisId: 0,
yAxisId: 0,
legendType: "line",
connectNulls: !1,
points: [],
dot: !1,
activeDot: !0,
hide: !1,
isAnimationActive: !Pt.isSsr,
animationBegin: 0,
animationDuration: 1500,
animationEasing: "ease"
});
lt(Et, "getBaseValue", function(e, t, r, n) {
var i = e.layout
, a = e.baseValue
, o = t.props.baseValue
, u = o ?? a;
if (R(u) && typeof u == "number")
return u;
var c = i === "horizontal" ? n : r
, l = c.scale.domain();
if (c.type === "number") {
var f = Math.max(l[0], l[1])
, s = Math.min(l[0], l[1]);
return u === "dataMin" ? s : u === "dataMax" || f < 0 ? f : Math.max(Math.min(l[0], l[1]), 0)
}
return u === "dataMin" ? l[0] : u === "dataMax" ? l[1] : l[0]
});
lt(Et, "getComposedData", function(e) {
var t = e.props, r = e.item, n = e.xAxis, i = e.yAxis, a = e.xAxisTicks, o = e.yAxisTicks, u = e.bandSize, c = e.dataKey, l = e.stackedData, f = e.dataStartIndex, s = e.displayedData, d = e.offset, h = t.layout, v = l && l.length, y = ig.getBaseValue(t, r, n, i), p = h === "horizontal", b = !1, w = s.map(function(O, g) {
var m;
v ? m = l[f + g] : (m = Ue(O, c),
Array.isArray(m) ? b = !0 : m = [y, m]);
var S = m[1] == null || v && Ue(O, c) == null;
return p ? {
x: dd({
axis: n,
ticks: a,
bandSize: u,
entry: O,
index: g
}),
y: S ? null : i.scale(m[1]),
value: m,
payload: O
} : {
x: S ? null : n.scale(m[1]),
y: dd({
axis: i,
ticks: o,
bandSize: u,
entry: O,
index: g
}),
value: m,
payload: O
}
}), x;
return v || b ? x = w.map(function(O) {
var g = Array.isArray(O.value) ? O.value[0] : null;
return p ? {
x: O.x,
y: g != null && O.y != null ? i.scale(g) : null
} : {
x: g != null ? n.scale(g) : null,
y: O.y
}
}) : x = p ? i.scale(y) : n.scale(y),
Dt({
points: w,
baseLine: x,
layout: h,
isRange: b
}, d)
});
lt(Et, "renderDotItem", function(e, t) {
var r;
if (A.isValidElement(e))
r = A.cloneElement(e, t);
else if (J(e))
r = e(t);
else {
var n = re("recharts-area-dot", typeof e != "boolean" ? e.className : "")
, i = t.key
, a = ag(t, vz);
r = A.createElement($l, ir({}, a, {
key: i,
className: n
}))
}
return r
});
function Kr(e) {
"@babel/helpers - typeof";
return Kr = 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
}
,
Kr(e)
}
function Pz(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function Az(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, sg(n.key), n)
}
}
function _z(e, t, r) {
return t && Az(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function $z(e, t, r) {
return t = Ia(t),
Tz(e, cg() ? Reflect.construct(t, r || [], Ia(e).constructor) : t.apply(e, r))
}
function Tz(e, t) {
if (t && (Kr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return jz(e)
}
function jz(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function cg() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (cg = function() {
return !!e
}
)()
}
function Ia(e) {
return Ia = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Ia(e)
}
function Ez(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && yc(e, t)
}
function yc(e, t) {
return yc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
yc(e, t)
}
function lg(e, t, r) {
return t = sg(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function sg(e) {
var t = Mz(e, "string");
return Kr(t) == "symbol" ? t : t + ""
}
function Mz(e, t) {
if (Kr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Kr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function gc() {
return gc = 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
}
,
gc.apply(this, arguments)
}
function Cz(e) {
var t = e.xAxisId
, r = Ml()
, n = Cl()
, i = qy(t);
return i == null ? null : A.createElement(sn, gc({}, i, {
className: re("recharts-".concat(i.axisType, " ").concat(i.axisType), i.className),
viewBox: {
x: 0,
y: 0,
width: r,
height: n
},
ticksGenerator: function(o) {
return wt(o, !0)
}
}))
}
var Ao = function(e) {
function t() {
return Pz(this, t),
$z(this, t, arguments)
}
return Ez(t, e),
_z(t, [{
key: "render",
value: function() {
return A.createElement(Cz, this.props)
}
}])
}(A.Component);
lg(Ao, "displayName", "XAxis");
lg(Ao, "defaultProps", {
allowDecimals: !0,
hide: !1,
orientation: "bottom",
width: 0,
height: 30,
mirror: !1,
xAxisId: 0,
tickCount: 5,
type: "category",
padding: {
left: 0,
right: 0
},
allowDataOverflow: !1,
scale: "auto",
reversed: !1,
allowDuplicatedCategory: !0
});
function Gr(e) {
"@babel/helpers - typeof";
return Gr = 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
}
,
Gr(e)
}
function Iz(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function kz(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, hg(n.key), n)
}
}
function Dz(e, t, r) {
return t && kz(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function Nz(e, t, r) {
return t = ka(t),
Bz(e, fg() ? Reflect.construct(t, r || [], ka(e).constructor) : t.apply(e, r))
}
function Bz(e, t) {
if (t && (Gr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return Lz(e)
}
function Lz(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function fg() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (fg = function() {
return !!e
}
)()
}
function ka(e) {
return ka = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
ka(e)
}
function Rz(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && mc(e, t)
}
function mc(e, t) {
return mc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
mc(e, t)
}
function dg(e, t, r) {
return t = hg(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function hg(e) {
var t = Fz(e, "string");
return Gr(t) == "symbol" ? t : t + ""
}
function Fz(e, t) {
if (Gr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Gr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function bc() {
return bc = 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
}
,
bc.apply(this, arguments)
}
var zz = function(t) {
var r = t.yAxisId
, n = Ml()
, i = Cl()
, a = Ky(r);
return a == null ? null : A.createElement(sn, bc({}, a, {
className: re("recharts-".concat(a.axisType, " ").concat(a.axisType), a.className),
viewBox: {
x: 0,
y: 0,
width: n,
height: i
},
ticksGenerator: function(u) {
return wt(u, !0)
}
}))
}
, li = function(e) {
function t() {
return Iz(this, t),
Nz(this, t, arguments)
}
return Rz(t, e),
Dz(t, [{
key: "render",
value: function() {
return A.createElement(zz, this.props)
}
}])
}(A.Component);
dg(li, "displayName", "YAxis");
dg(li, "defaultProps", {
allowDuplicatedCategory: !0,
allowDecimals: !0,
hide: !1,
orientation: "left",
width: 60,
height: 0,
mirror: !1,
yAxisId: 0,
tickCount: 5,
type: "number",
padding: {
top: 0,
bottom: 0
},
allowDataOverflow: !1,
scale: "auto",
reversed: !1
});
function Ch(e) {
return qz(e) || Hz(e) || Uz(e) || Wz()
}
function Wz() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function Uz(e, t) {
if (e) {
if (typeof e == "string")
return xc(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 xc(e, t)
}
}
function Hz(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function qz(e) {
if (Array.isArray(e))
return xc(e)
}
function xc(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
}
var wc = function(t, r, n, i, a) {
var o = at(t, xo)
, u = at(t, Oo)
, c = [].concat(Ch(o), Ch(u))
, l = at(t, Po)
, f = "".concat(i, "Id")
, s = i[0]
, d = r;
if (c.length && (d = c.reduce(function(y, p) {
if (p.props[f] === n && ft(p.props, "extendDomain") && R(p.props[s])) {
var b = p.props[s];
return [Math.min(y[0], b), Math.max(y[1], b)]
}
return y
}, d)),
l.length) {
var h = "".concat(s, "1")
, v = "".concat(s, "2");
d = l.reduce(function(y, p) {
if (p.props[f] === n && ft(p.props, "extendDomain") && R(p.props[h]) && R(p.props[v])) {
var b = p.props[h]
, w = p.props[v];
return [Math.min(y[0], b, w), Math.max(y[1], b, w)]
}
return y
}, d)
}
return a && a.length && (d = a.reduce(function(y, p) {
return R(p) ? [Math.min(y[0], p), Math.max(y[1], p)] : y
}, d)),
d
}
, pg = {
exports: {}
};
(function(e) {
var t = Object.prototype.hasOwnProperty
, r = "~";
function n() {}
Object.create && (n.prototype = Object.create(null),
new n().__proto__ || (r = !1));
function i(c, l, f) {
this.fn = c,
this.context = l,
this.once = f || !1
}
function a(c, l, f, s, d) {
if (typeof f != "function")
throw new TypeError("The listener must be a function");
var h = new i(f,s || c,d)
, v = r ? r + l : l;
return c._events[v] ? c._events[v].fn ? c._events[v] = [c._events[v], h] : c._events[v].push(h) : (c._events[v] = h,
c._eventsCount++),
c
}
function o(c, l) {
--c._eventsCount === 0 ? c._events = new n : delete c._events[l]
}
function u() {
this._events = new n,
this._eventsCount = 0
}
u.prototype.eventNames = function() {
var l = [], f, s;
if (this._eventsCount === 0)
return l;
for (s in f = this._events)
t.call(f, s) && l.push(r ? s.slice(1) : s);
return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(f)) : l
}
,
u.prototype.listeners = function(l) {
var f = r ? r + l : l
, s = this._events[f];
if (!s)
return [];
if (s.fn)
return [s.fn];
for (var d = 0, h = s.length, v = new Array(h); d < h; d++)
v[d] = s[d].fn;
return v
}
,
u.prototype.listenerCount = function(l) {
var f = r ? r + l : l
, s = this._events[f];
return s ? s.fn ? 1 : s.length : 0
}
,
u.prototype.emit = function(l, f, s, d, h, v) {
var y = r ? r + l : l;
if (!this._events[y])
return !1;
var p = this._events[y], b = arguments.length, w, x;
if (p.fn) {
switch (p.once && this.removeListener(l, p.fn, void 0, !0),
b) {
case 1:
return p.fn.call(p.context),
!0;
case 2:
return p.fn.call(p.context, f),
!0;
case 3:
return p.fn.call(p.context, f, s),
!0;
case 4:
return p.fn.call(p.context, f, s, d),
!0;
case 5:
return p.fn.call(p.context, f, s, d, h),
!0;
case 6:
return p.fn.call(p.context, f, s, d, h, v),
!0
}
for (x = 1,
w = new Array(b - 1); x < b; x++)
w[x - 1] = arguments[x];
p.fn.apply(p.context, w)
} else {
var O = p.length, g;
for (x = 0; x < O; x++)
switch (p[x].once && this.removeListener(l, p[x].fn, void 0, !0),
b) {
case 1:
p[x].fn.call(p[x].context);
break;
case 2:
p[x].fn.call(p[x].context, f);
break;
case 3:
p[x].fn.call(p[x].context, f, s);
break;
case 4:
p[x].fn.call(p[x].context, f, s, d);
break;
default:
if (!w)
for (g = 1,
w = new Array(b - 1); g < b; g++)
w[g - 1] = arguments[g];
p[x].fn.apply(p[x].context, w)
}
}
return !0
}
,
u.prototype.on = function(l, f, s) {
return a(this, l, f, s, !1)
}
,
u.prototype.once = function(l, f, s) {
return a(this, l, f, s, !0)
}
,
u.prototype.removeListener = function(l, f, s, d) {
var h = r ? r + l : l;
if (!this._events[h])
return this;
if (!f)
return o(this, h),
this;
var v = this._events[h];
if (v.fn)
v.fn === f && (!d || v.once) && (!s || v.context === s) && o(this, h);
else {
for (var y = 0, p = [], b = v.length; y < b; y++)
(v[y].fn !== f || d && !v[y].once || s && v[y].context !== s) && p.push(v[y]);
p.length ? this._events[h] = p.length === 1 ? p[0] : p : o(this, h)
}
return this
}
,
u.prototype.removeAllListeners = function(l) {
var f;
return l ? (f = r ? r + l : l,
this._events[f] && o(this, f)) : (this._events = new n,
this._eventsCount = 0),
this
}
,
u.prototype.off = u.prototype.removeListener,
u.prototype.addListener = u.prototype.on,
u.prefixed = r,
u.EventEmitter = u,
e.exports = u
}
)(pg);
var Kz = pg.exports;
const Gz = de(Kz);
var Jo = new Gz
, Qo = "recharts.syncMouseEvents";
function si(e) {
"@babel/helpers - typeof";
return si = 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
}
,
si(e)
}
function Yz(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function Vz(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, vg(n.key), n)
}
}
function Xz(e, t, r) {
return t && Vz(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function eu(e, t, r) {
return t = vg(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function vg(e) {
var t = Zz(e, "string");
return si(t) == "symbol" ? t : t + ""
}
function Zz(e, t) {
if (si(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t);
if (si(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return String(e)
}
var Jz = function() {
function e() {
Yz(this, e),
eu(this, "activeIndex", 0),
eu(this, "coordinateList", []),
eu(this, "layout", "horizontal")
}
return Xz(e, [{
key: "setDetails",
value: function(r) {
var n, i = r.coordinateList, a = i === void 0 ? null : i, o = r.container, u = o === void 0 ? null : o, c = r.layout, l = c === void 0 ? null : c, f = r.offset, s = f === void 0 ? null : f, d = r.mouseHandlerCallback, h = d === void 0 ? null : d;
this.coordinateList = (n = a ?? this.coordinateList) !== null && n !== void 0 ? n : [],
this.container = u ?? this.container,
this.layout = l ?? this.layout,
this.offset = s ?? this.offset,
this.mouseHandlerCallback = h ?? this.mouseHandlerCallback,
this.activeIndex = Math.min(Math.max(this.activeIndex, 0), this.coordinateList.length - 1)
}
}, {
key: "focus",
value: function() {
this.spoofMouse()
}
}, {
key: "keyboardEvent",
value: function(r) {
if (this.coordinateList.length !== 0)
switch (r.key) {
case "ArrowRight":
{
if (this.layout !== "horizontal")
return;
this.activeIndex = Math.min(this.activeIndex + 1, this.coordinateList.length - 1),
this.spoofMouse();
break
}
case "ArrowLeft":
{
if (this.layout !== "horizontal")
return;
this.activeIndex = Math.max(this.activeIndex - 1, 0),
this.spoofMouse();
break
}
}
}
}, {
key: "setIndex",
value: function(r) {
this.activeIndex = r
}
}, {
key: "spoofMouse",
value: function() {
var r, n;
if (this.layout === "horizontal" && this.coordinateList.length !== 0) {
var i = this.container.getBoundingClientRect()
, a = i.x
, o = i.y
, u = i.height
, c = this.coordinateList[this.activeIndex].coordinate
, l = ((r = window) === null || r === void 0 ? void 0 : r.scrollX) || 0
, f = ((n = window) === null || n === void 0 ? void 0 : n.scrollY) || 0
, s = a + c + l
, d = o + this.offset.top + u / 2 + f;
this.mouseHandlerCallback({
pageX: s,
pageY: d
})
}
}
}])
}();
function Qz(e, t, r) {
if (r === "number" && t === !0 && Array.isArray(e)) {
var n = e == null ? void 0 : e[0]
, i = e == null ? void 0 : e[1];
if (n && i && R(n) && R(i))
return !0
}
return !1
}
function e3(e, t, r, n) {
var i = n / 2;
return {
stroke: "none",
fill: "#ccc",
x: e === "horizontal" ? t.x - i : r.left + .5,
y: e === "horizontal" ? r.top + .5 : t.y - i,
width: e === "horizontal" ? n : r.width - 1,
height: e === "horizontal" ? r.height - 1 : n
}
}
function yg(e) {
var t = e.cx
, r = e.cy
, n = e.radius
, i = e.startAngle
, a = e.endAngle
, o = Ce(t, r, n, i)
, u = Ce(t, r, n, a);
return {
points: [o, u],
cx: t,
cy: r,
radius: n,
startAngle: i,
endAngle: a
}
}
function t3(e, t, r) {
var n, i, a, o;
if (e === "horizontal")
n = t.x,
a = n,
i = r.top,
o = r.top + r.height;
else if (e === "vertical")
i = t.y,
o = i,
n = r.left,
a = r.left + r.width;
else if (t.cx != null && t.cy != null)
if (e === "centric") {
var u = t.cx
, c = t.cy
, l = t.innerRadius
, f = t.outerRadius
, s = t.angle
, d = Ce(u, c, l, s)
, h = Ce(u, c, f, s);
n = d.x,
i = d.y,
a = h.x,
o = h.y
} else
return yg(t);
return [{
x: n,
y: i
}, {
x: a,
y: o
}]
}
function fi(e) {
"@babel/helpers - typeof";
return fi = 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
}
,
fi(e)
}
function Ih(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 Di(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Ih(Object(r), !0).forEach(function(n) {
r3(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ih(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function r3(e, t, r) {
return t = n3(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function n3(e) {
var t = i3(e, "string");
return fi(t) == "symbol" ? t : t + ""
}
function i3(e, t) {
if (fi(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (fi(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function a3(e) {
var t, r, n = e.element, i = e.tooltipEventType, a = e.isActive, o = e.activeCoordinate, u = e.activePayload, c = e.offset, l = e.activeTooltipIndex, f = e.tooltipAxisBandSize, s = e.layout, d = e.chartName, h = (t = n.props.cursor) !== null && t !== void 0 ? t : (r = n.type.defaultProps) === null || r === void 0 ? void 0 : r.cursor;
if (!n || !h || !a || !o || d !== "ScatterChart" && i !== "axis")
return null;
var v, y = _n;
if (d === "ScatterChart")
v = o,
y = cB;
else if (d === "BarChart")
v = e3(s, o, c, f),
y = _l;
else if (s === "radial") {
var p = yg(o)
, b = p.cx
, w = p.cy
, x = p.radius
, O = p.startAngle
, g = p.endAngle;
v = {
cx: b,
cy: w,
startAngle: O,
endAngle: g,
innerRadius: x,
outerRadius: x
},
y = by
} else
v = {
points: t3(s, o, c)
},
y = _n;
var m = Di(Di(Di(Di({
stroke: "#ccc",
pointerEvents: "none"
}, c), v), Q(h, !1)), {}, {
payload: u,
payloadIndex: l,
className: re("recharts-tooltip-cursor", h.className)
});
return L.isValidElement(h) ? L.cloneElement(h, m) : L.createElement(y, m)
}
var o3 = ["item"]
, u3 = ["children", "className", "width", "height", "style", "compact", "title", "desc"];
function Yr(e) {
"@babel/helpers - typeof";
return Yr = 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
}
,
Yr(e)
}
function Sr() {
return Sr = 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
}
,
Sr.apply(this, arguments)
}
function kh(e, t) {
return s3(e) || l3(e, t) || mg(e, t) || c3()
}
function c3() {
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 l3(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, l = !1;
try {
if (a = (r = r.call(e)).next,
t !== 0)
for (; !(c = (n = a.call(r)).done) && (u.push(n.value),
u.length !== t); c = !0)
;
} catch (f) {
l = !0,
i = f
} finally {
try {
if (!c && r.return != null && (o = r.return(),
Object(o) !== o))
return
} finally {
if (l)
throw i
}
}
return u
}
}
function s3(e) {
if (Array.isArray(e))
return e
}
function Dh(e, t) {
if (e == null)
return {};
var r = f3(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 f3(e, t) {
if (e == null)
return {};
var r = {};
for (var n in e)
if (Object.prototype.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0)
continue;
r[n] = e[n]
}
return r
}
function d3(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function h3(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, bg(n.key), n)
}
}
function p3(e, t, r) {
return t && h3(e.prototype, t),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function v3(e, t, r) {
return t = Da(t),
y3(e, gg() ? Reflect.construct(t, r || [], Da(e).constructor) : t.apply(e, r))
}
function y3(e, t) {
if (t && (Yr(t) === "object" || typeof t == "function"))
return t;
if (t !== void 0)
throw new TypeError("Derived constructors may only return object or undefined");
return g3(e)
}
function g3(e) {
if (e === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function gg() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}))
} catch {}
return (gg = function() {
return !!e
}
)()
}
function Da(e) {
return Da = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r)
}
,
Da(e)
}
function m3(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}),
Object.defineProperty(e, "prototype", {
writable: !1
}),
t && Oc(e, t)
}
function Oc(e, t) {
return Oc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
return n.__proto__ = i,
n
}
,
Oc(e, t)
}
function Vr(e) {
return w3(e) || x3(e) || mg(e) || b3()
}
function b3() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function mg(e, t) {
if (e) {
if (typeof e == "string")
return Sc(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 Sc(e, t)
}
}
function x3(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
return Array.from(e)
}
function w3(e) {
if (Array.isArray(e))
return Sc(e)
}
function Sc(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 Nh(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 E(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? Nh(Object(r), !0).forEach(function(n) {
Y(e, n, r[n])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Nh(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n))
})
}
return e
}
function Y(e, t, r) {
return t = bg(t),
t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r,
e
}
function bg(e) {
var t = O3(e, "string");
return Yr(t) == "symbol" ? t : t + ""
}
function O3(e, t) {
if (Yr(e) != "object" || !e)
return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Yr(n) != "object")
return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
var S3 = {
xAxis: ["bottom", "top"],
yAxis: ["left", "right"]
}
, P3 = {
width: "100%",
height: "100%"
}
, xg = {
x: 0,
y: 0
};
function Ni(e) {
return e
}
var A3 = function(t, r) {
return r === "horizontal" ? t.x : r === "vertical" ? t.y : r === "centric" ? t.angle : t.radius
}
, _3 = function(t, r, n, i) {
var a = r.find(function(f) {
return f && f.index === n
});
if (a) {
if (t === "horizontal")
return {
x: a.coordinate,
y: i.y
};
if (t === "vertical")
return {
x: i.x,
y: a.coordinate
};
if (t === "centric") {
var o = a.coordinate
, u = i.radius;
return E(E(E({}, i), Ce(i.cx, i.cy, u, o)), {}, {
angle: o,
radius: u
})
}
var c = a.coordinate
, l = i.angle;
return E(E(E({}, i), Ce(i.cx, i.cy, c, l)), {}, {
angle: l,
radius: c
})
}
return xg
}
, _o = function(t, r) {
var n = r.graphicalItems
, i = r.dataStartIndex
, a = r.dataEndIndex
, o = (n ?? []).reduce(function(u, c) {
var l = c.props.data;
return l && l.length ? [].concat(Vr(u), Vr(l)) : u
}, []);
return o.length > 0 ? o : t && t.length && R(i) && R(a) ? t.slice(i, a + 1) : []
};
function wg(e) {
return e === "number" ? [0, "auto"] : void 0
}
var Pc = function(t, r, n, i) {
var a = t.graphicalItems
, o = t.tooltipAxis
, u = _o(r, t);
return n < 0 || !a || !a.length || n >= u.length ? null : a.reduce(function(c, l) {
var f, s = (f = l.props.data) !== null && f !== void 0 ? f : r;
s && t.dataStartIndex + t.dataEndIndex !== 0 && t.dataEndIndex - t.dataStartIndex >= n && (s = s.slice(t.dataStartIndex, t.dataEndIndex + 1));
var d;
if (o.dataKey && !o.allowDuplicatedCategory) {
var h = s === void 0 ? u : s;
d = Bi(h, o.dataKey, i)
} else
d = s && s[n] || u[n];
return d ? [].concat(Vr(c), [yy(l, d)]) : c
}, [])
}
, Bh = function(t, r, n, i) {
var a = i || {
x: t.chartX,
y: t.chartY
}
, o = A3(a, n)
, u = t.orderedTooltipTicks
, c = t.tooltipAxis
, l = t.tooltipTicks
, f = ak(o, u, l, c);
if (f >= 0 && l) {
var s = l[f] && l[f].value
, d = Pc(t, r, f, s)
, h = _3(n, u, f, a);
return {
activeTooltipIndex: f,
activeLabel: s,
activePayload: d,
activeCoordinate: h
}
}
return null
}
, $3 = function(t, r) {
var n = r.axes
, i = r.graphicalItems
, a = r.axisType
, o = r.axisIdKey
, u = r.stackGroups
, c = r.dataStartIndex
, l = r.dataEndIndex
, f = t.layout
, s = t.children
, d = t.stackOffset
, h = hy(f, a);
return n.reduce(function(v, y) {
var p, b = y.type.defaultProps !== void 0 ? E(E({}, y.type.defaultProps), y.props) : y.props, w = b.type, x = b.dataKey, O = b.allowDataOverflow, g = b.allowDuplicatedCategory, m = b.scale, S = b.ticks, P = b.includeHidden, _ = b[o];
if (v[_])
return v;
var j = _o(t.data, {
graphicalItems: i.filter(function(U) {
var K, ae = o in U.props ? U.props[o] : (K = U.type.defaultProps) === null || K === void 0 ? void 0 : K[o];
return ae === _
}),
dataStartIndex: c,
dataEndIndex: l
}), $ = j.length, T, C, k;
Qz(b.domain, O, w) && (T = Uu(b.domain, null, O),
h && (w === "number" || m !== "auto") && (k = An(j, x, "category")));
var M = wg(w);
if (!T || T.length === 0) {
var D, B = (D = b.domain) !== null && D !== void 0 ? D : M;
if (x) {
if (T = An(j, x, w),
w === "category" && h) {
var F = Gx(T);
g && F ? (C = T,
T = Oa(0, $)) : g || (T = yd(B, T, y).reduce(function(U, K) {
return U.indexOf(K) >= 0 ? U : [].concat(Vr(U), [K])
}, []))
} else if (w === "category")
g ? T = T.filter(function(U) {
return U !== "" && !te(U)
}) : T = yd(B, T, y).reduce(function(U, K) {
return U.indexOf(K) >= 0 || K === "" || te(K) ? U : [].concat(Vr(U), [K])
}, []);
else if (w === "number") {
var z = sk(j, i.filter(function(U) {
var K, ae, ge = o in U.props ? U.props[o] : (K = U.type.defaultProps) === null || K === void 0 ? void 0 : K[o], je = "hide"in U.props ? U.props.hide : (ae = U.type.defaultProps) === null || ae === void 0 ? void 0 : ae.hide;
return ge === _ && (P || !je)
}), x, a, f);
z && (T = z)
}
h && (w === "number" || m !== "auto") && (k = An(j, x, "category"))
} else
h ? T = Oa(0, $) : u && u[_] && u[_].hasStack && w === "number" ? T = d === "expand" ? [0, 1] : vy(u[_].stackGroups, c, l) : T = dy(j, i.filter(function(U) {
var K = o in U.props ? U.props[o] : U.type.defaultProps[o]
, ae = "hide"in U.props ? U.props.hide : U.type.defaultProps.hide;
return K === _ && (P || !ae)
}), w, f, !0);
if (w === "number")
T = wc(s, T, _, a, S),
B && (T = Uu(B, T, O));
else if (w === "category" && B) {
var q = B
, G = T.every(function(U) {
return q.indexOf(U) >= 0
});
G && (T = q)
}
}
return E(E({}, v), {}, Y({}, _, E(E({}, b), {}, {
axisType: a,
domain: T,
categoricalDomain: k,
duplicateDomain: C,
originalDomain: (p = b.domain) !== null && p !== void 0 ? p : M,
isCategorical: h,
layout: f
})))
}, {})
}
, T3 = function(t, r) {
var n = r.graphicalItems
, i = r.Axis
, a = r.axisType
, o = r.axisIdKey
, u = r.stackGroups
, c = r.dataStartIndex
, l = r.dataEndIndex
, f = t.layout
, s = t.children
, d = _o(t.data, {
graphicalItems: n,
dataStartIndex: c,
dataEndIndex: l
})
, h = d.length
, v = hy(f, a)
, y = -1;
return n.reduce(function(p, b) {
var w = b.type.defaultProps !== void 0 ? E(E({}, b.type.defaultProps), b.props) : b.props
, x = w[o]
, O = wg("number");
if (!p[x]) {
y++;
var g;
return v ? g = Oa(0, h) : u && u[x] && u[x].hasStack ? (g = vy(u[x].stackGroups, c, l),
g = wc(s, g, x, a)) : (g = Uu(O, dy(d, n.filter(function(m) {
var S, P, _ = o in m.props ? m.props[o] : (S = m.type.defaultProps) === null || S === void 0 ? void 0 : S[o], j = "hide"in m.props ? m.props.hide : (P = m.type.defaultProps) === null || P === void 0 ? void 0 : P.hide;
return _ === x && !j
}), "number", f), i.defaultProps.allowDataOverflow),
g = wc(s, g, x, a)),
E(E({}, p), {}, Y({}, x, E(E({
axisType: a
}, i.defaultProps), {}, {
hide: !0,
orientation: Ve(S3, "".concat(a, ".").concat(y % 2), null),
domain: g,
originalDomain: O,
isCategorical: v,
layout: f
})))
}
return p
}, {})
}
, j3 = function(t, r) {
var n = r.axisType
, i = n === void 0 ? "xAxis" : n
, a = r.AxisComp
, o = r.graphicalItems
, u = r.stackGroups
, c = r.dataStartIndex
, l = r.dataEndIndex
, f = t.children
, s = "".concat(i, "Id")
, d = at(f, a)
, h = {};
return d && d.length ? h = $3(t, {
axes: d,
graphicalItems: o,
axisType: i,
axisIdKey: s,
stackGroups: u,
dataStartIndex: c,
dataEndIndex: l
}) : o && o.length && (h = T3(t, {
Axis: a,
graphicalItems: o,
axisType: i,
axisIdKey: s,
stackGroups: u,
dataStartIndex: c,
dataEndIndex: l
})),
h
}
, E3 = function(t) {
var r = Bt(t)
, n = wt(r, !1, !0);
return {
tooltipTicks: n,
orderedTooltipTicks: Qc(n, function(i) {
return i.coordinate
}),
tooltipAxis: r,
tooltipAxisBandSize: ha(r, n)
}
}
, Lh = function(t) {
var r = t.children
, n = t.defaultShowTooltip
, i = ze(r, Rr)
, a = 0
, o = 0;
return t.data && t.data.length !== 0 && (o = t.data.length - 1),
i && i.props && (i.props.startIndex >= 0 && (a = i.props.startIndex),
i.props.endIndex >= 0 && (o = i.props.endIndex)),
{
chartX: 0,
chartY: 0,
dataStartIndex: a,
dataEndIndex: o,
activeTooltipIndex: -1,
isTooltipActive: !!n
}
}
, M3 = function(t) {
return !t || !t.length ? !1 : t.some(function(r) {
var n = Ot(r && r.type);
return n && n.indexOf("Bar") >= 0
})
}
, Rh = function(t) {
return t === "horizontal" ? {
numericAxisName: "yAxis",
cateAxisName: "xAxis"
} : t === "vertical" ? {
numericAxisName: "xAxis",
cateAxisName: "yAxis"
} : t === "centric" ? {
numericAxisName: "radiusAxis",
cateAxisName: "angleAxis"
} : {
numericAxisName: "angleAxis",
cateAxisName: "radiusAxis"
}
}
, C3 = function(t, r) {
var n = t.props
, i = t.graphicalItems
, a = t.xAxisMap
, o = a === void 0 ? {} : a
, u = t.yAxisMap
, c = u === void 0 ? {} : u
, l = n.width
, f = n.height
, s = n.children
, d = n.margin || {}
, h = ze(s, Rr)
, v = ze(s, ar)
, y = Object.keys(c).reduce(function(g, m) {
var S = c[m]
, P = S.orientation;
return !S.mirror && !S.hide ? E(E({}, g), {}, Y({}, P, g[P] + S.width)) : g
}, {
left: d.left || 0,
right: d.right || 0
})
, p = Object.keys(o).reduce(function(g, m) {
var S = o[m]
, P = S.orientation;
return !S.mirror && !S.hide ? E(E({}, g), {}, Y({}, P, Ve(g, "".concat(P)) + S.height)) : g
}, {
top: d.top || 0,
bottom: d.bottom || 0
})
, b = E(E({}, p), y)
, w = b.bottom;
h && (b.bottom += h.props.height || Rr.defaultProps.height),
v && r && (b = ck(b, i, n, r));
var x = l - b.left - b.right
, O = f - b.top - b.bottom;
return E(E({
brushBottom: w
}, b), {}, {
width: Math.max(x, 0),
height: Math.max(O, 0)
})
}
, I3 = function(t, r) {
if (r === "xAxis")
return t[r].width;
if (r === "yAxis")
return t[r].height
}
, k3 = function(t) {
var r = t.chartName
, n = t.GraphicalChild
, i = t.defaultTooltipEventType
, a = i === void 0 ? "axis" : i
, o = t.validateTooltipEventTypes
, u = o === void 0 ? ["axis"] : o
, c = t.axisComponents
, l = t.legendContent
, f = t.formatAxisMap
, s = t.defaultProps
, d = function(b, w) {
var x = w.graphicalItems
, O = w.stackGroups
, g = w.offset
, m = w.updateId
, S = w.dataStartIndex
, P = w.dataEndIndex
, _ = b.barSize
, j = b.layout
, $ = b.barGap
, T = b.barCategoryGap
, C = b.maxBarSize
, k = Rh(j)
, M = k.numericAxisName
, D = k.cateAxisName
, B = M3(x)
, F = [];
return x.forEach(function(z, q) {
var G = _o(b.data, {
graphicalItems: [z],
dataStartIndex: S,
dataEndIndex: P
})
, U = z.type.defaultProps !== void 0 ? E(E({}, z.type.defaultProps), z.props) : z.props
, K = U.dataKey
, ae = U.maxBarSize
, ge = U["".concat(M, "Id")]
, je = U["".concat(D, "Id")]
, pt = {}
, be = c.reduce(function(vt, yt) {
var yr = w["".concat(yt.axisType, "Map")]
, gr = U["".concat(yt.axisType, "Id")];
yr && yr[gr] || yt.axisType === "zAxis" || cr(!1);
var fn = yr[gr];
return E(E({}, vt), {}, Y(Y({}, yt.axisType, fn), "".concat(yt.axisType, "Ticks"), wt(fn)))
}, pt)
, W = be[D]
, V = be["".concat(D, "Ticks")]
, X = O && O[ge] && O[ge].hasStack && Ok(z, O[ge].stackGroups)
, N = Ot(z.type).indexOf("Bar") >= 0
, he = ha(W, V)
, ee = []
, xe = B && ok({
barSize: _,
stackGroups: O,
totalSize: I3(be, D)
});
if (N) {
var pe, Ee, Qe = te(ae) ? C : ae, kt = (pe = (Ee = ha(W, V, !0)) !== null && Ee !== void 0 ? Ee : Qe) !== null && pe !== void 0 ? pe : 0;
ee = uk({
barGap: $,
barCategoryGap: T,
bandSize: kt !== he ? kt : he,
sizeList: xe[je],
maxBarSize: Qe
}),
kt !== he && (ee = ee.map(function(vt) {
return E(E({}, vt), {}, {
position: E(E({}, vt.position), {}, {
offset: vt.position.offset - kt / 2
})
})
}))
}
var vr = z && z.type && z.type.getComposedData;
vr && F.push({
props: E(E({}, vr(E(E({}, be), {}, {
displayedData: G,
props: b,
dataKey: K,
item: z,
bandSize: he,
barPosition: ee,
offset: g,
stackedData: X,
layout: j,
dataStartIndex: S,
dataEndIndex: P
}))), {}, Y(Y(Y({
key: z.key || "item-".concat(q)
}, M, be[M]), D, be[D]), "animationId", m)),
childIndex: aw(z, b.children),
item: z
})
}),
F
}
, h = function(b, w) {
var x = b.props
, O = b.dataStartIndex
, g = b.dataEndIndex
, m = b.updateId;
if (!cs({
props: x
}))
return null;
var S = x.children
, P = x.layout
, _ = x.stackOffset
, j = x.data
, $ = x.reverseStackOrder
, T = Rh(P)
, C = T.numericAxisName
, k = T.cateAxisName
, M = at(S, n)
, D = bk(j, M, "".concat(C, "Id"), "".concat(k, "Id"), _, $)
, B = c.reduce(function(U, K) {
var ae = "".concat(K.axisType, "Map");
return E(E({}, U), {}, Y({}, ae, j3(x, E(E({}, K), {}, {
graphicalItems: M,
stackGroups: K.axisType === C && D,
dataStartIndex: O,
dataEndIndex: g
}))))
}, {})
, F = C3(E(E({}, B), {}, {
props: x,
graphicalItems: M
}), w == null ? void 0 : w.legendBBox);
Object.keys(B).forEach(function(U) {
B[U] = f(x, B[U], F, U.replace("Map", ""), r)
});
var z = B["".concat(k, "Map")]
, q = E3(z)
, G = d(x, E(E({}, B), {}, {
dataStartIndex: O,
dataEndIndex: g,
updateId: m,
graphicalItems: M,
stackGroups: D,
offset: F
}));
return E(E({
formattedGraphicalItems: G,
graphicalItems: M,
offset: F,
stackGroups: D
}, q), B)
}
, v = function(p) {
function b(w) {
var x, O, g;
return d3(this, b),
g = v3(this, b, [w]),
Y(g, "eventEmitterSymbol", Symbol("rechartsEventEmitter")),
Y(g, "accessibilityManager", new Jz),
Y(g, "handleLegendBBoxUpdate", function(m) {
if (m) {
var S = g.state
, P = S.dataStartIndex
, _ = S.dataEndIndex
, j = S.updateId;
g.setState(E({
legendBBox: m
}, h({
props: g.props,
dataStartIndex: P,
dataEndIndex: _,
updateId: j
}, E(E({}, g.state), {}, {
legendBBox: m
}))))
}
}),
Y(g, "handleReceiveSyncEvent", function(m, S, P) {
if (g.props.syncId === m) {
if (P === g.eventEmitterSymbol && typeof g.props.syncMethod != "function")
return;
g.applySyncEvent(S)
}
}),
Y(g, "handleBrushChange", function(m) {
var S = m.startIndex
, P = m.endIndex;
if (S !== g.state.dataStartIndex || P !== g.state.dataEndIndex) {
var _ = g.state.updateId;
g.setState(function() {
return E({
dataStartIndex: S,
dataEndIndex: P
}, h({
props: g.props,
dataStartIndex: S,
dataEndIndex: P,
updateId: _
}, g.state))
}),
g.triggerSyncEvent({
dataStartIndex: S,
dataEndIndex: P
})
}
}),
Y(g, "handleMouseEnter", function(m) {
var S = g.getMouseInfo(m);
if (S) {
var P = E(E({}, S), {}, {
isTooltipActive: !0
});
g.setState(P),
g.triggerSyncEvent(P);
var _ = g.props.onMouseEnter;
J(_) && _(P, m)
}
}),
Y(g, "triggeredAfterMouseMove", function(m) {
var S = g.getMouseInfo(m)
, P = S ? E(E({}, S), {}, {
isTooltipActive: !0
}) : {
isTooltipActive: !1
};
g.setState(P),
g.triggerSyncEvent(P);
var _ = g.props.onMouseMove;
J(_) && _(P, m)
}),
Y(g, "handleItemMouseEnter", function(m) {
g.setState(function() {
return {
isTooltipActive: !0,
activeItem: m,
activePayload: m.tooltipPayload,
activeCoordinate: m.tooltipPosition || {
x: m.cx,
y: m.cy
}
}
})
}),
Y(g, "handleItemMouseLeave", function() {
g.setState(function() {
return {
isTooltipActive: !1
}
})
}),
Y(g, "handleMouseMove", function(m) {
m.persist(),
g.throttleTriggeredAfterMouseMove(m)
}),
Y(g, "handleMouseLeave", function(m) {
g.throttleTriggeredAfterMouseMove.cancel();
var S = {
isTooltipActive: !1
};
g.setState(S),
g.triggerSyncEvent(S);
var P = g.props.onMouseLeave;
J(P) && P(S, m)
}),
Y(g, "handleOuterEvent", function(m) {
var S = iw(m)
, P = Ve(g.props, "".concat(S));
if (S && J(P)) {
var _, j;
/.*touch.*/i.test(S) ? j = g.getMouseInfo(m.changedTouches[0]) : j = g.getMouseInfo(m),
P((_ = j) !== null && _ !== void 0 ? _ : {}, m)
}
}),
Y(g, "handleClick", function(m) {
var S = g.getMouseInfo(m);
if (S) {
var P = E(E({}, S), {}, {
isTooltipActive: !0
});
g.setState(P),
g.triggerSyncEvent(P);
var _ = g.props.onClick;
J(_) && _(P, m)
}
}),
Y(g, "handleMouseDown", function(m) {
var S = g.props.onMouseDown;
if (J(S)) {
var P = g.getMouseInfo(m);
S(P, m)
}
}),
Y(g, "handleMouseUp", function(m) {
var S = g.props.onMouseUp;
if (J(S)) {
var P = g.getMouseInfo(m);
S(P, m)
}
}),
Y(g, "handleTouchMove", function(m) {
m.changedTouches != null && m.changedTouches.length > 0 && g.throttleTriggeredAfterMouseMove(m.changedTouches[0])
}),
Y(g, "handleTouchStart", function(m) {
m.changedTouches != null && m.changedTouches.length > 0 && g.handleMouseDown(m.changedTouches[0])
}),
Y(g, "handleTouchEnd", function(m) {
m.changedTouches != null && m.changedTouches.length > 0 && g.handleMouseUp(m.changedTouches[0])
}),
Y(g, "triggerSyncEvent", function(m) {
g.props.syncId !== void 0 && Jo.emit(Qo, g.props.syncId, m, g.eventEmitterSymbol)
}),
Y(g, "applySyncEvent", function(m) {
var S = g.props
, P = S.layout
, _ = S.syncMethod
, j = g.state.updateId
, $ = m.dataStartIndex
, T = m.dataEndIndex;
if (m.dataStartIndex !== void 0 || m.dataEndIndex !== void 0)
g.setState(E({
dataStartIndex: $,
dataEndIndex: T
}, h({
props: g.props,
dataStartIndex: $,
dataEndIndex: T,
updateId: j
}, g.state)));
else if (m.activeTooltipIndex !== void 0) {
var C = m.chartX
, k = m.chartY
, M = m.activeTooltipIndex
, D = g.state
, B = D.offset
, F = D.tooltipTicks;
if (!B)
return;
if (typeof _ == "function")
M = _(F, m);
else if (_ === "value") {
M = -1;
for (var z = 0; z < F.length; z++)
if (F[z].value === m.activeLabel) {
M = z;
break
}
}
var q = E(E({}, B), {}, {
x: B.left,
y: B.top
})
, G = Math.min(C, q.x + q.width)
, U = Math.min(k, q.y + q.height)
, K = F[M] && F[M].value
, ae = Pc(g.state, g.props.data, M)
, ge = F[M] ? {
x: P === "horizontal" ? F[M].coordinate : G,
y: P === "horizontal" ? U : F[M].coordinate
} : xg;
g.setState(E(E({}, m), {}, {
activeLabel: K,
activeCoordinate: ge,
activePayload: ae,
activeTooltipIndex: M
}))
} else
g.setState(m)
}),
Y(g, "renderCursor", function(m) {
var S, P = g.state, _ = P.isTooltipActive, j = P.activeCoordinate, $ = P.activePayload, T = P.offset, C = P.activeTooltipIndex, k = P.tooltipAxisBandSize, M = g.getTooltipEventType(), D = (S = m.props.active) !== null && S !== void 0 ? S : _, B = g.props.layout, F = m.key || "_recharts-cursor";
return A.createElement(a3, {
key: F,
activeCoordinate: j,
activePayload: $,
activeTooltipIndex: C,
chartName: r,
element: m,
isActive: D,
layout: B,
offset: T,
tooltipAxisBandSize: k,
tooltipEventType: M
})
}),
Y(g, "renderPolarAxis", function(m, S, P) {
var _ = Ve(m, "type.axisType")
, j = Ve(g.state, "".concat(_, "Map"))
, $ = m.type.defaultProps
, T = $ !== void 0 ? E(E({}, $), m.props) : m.props
, C = j && j[T["".concat(_, "Id")]];
return L.cloneElement(m, E(E({}, C), {}, {
className: re(_, C.className),
key: m.key || "".concat(S, "-").concat(P),
ticks: wt(C, !0)
}))
}),
Y(g, "renderPolarGrid", function(m) {
var S = m.props
, P = S.radialLines
, _ = S.polarAngles
, j = S.polarRadius
, $ = g.state
, T = $.radiusAxisMap
, C = $.angleAxisMap
, k = Bt(T)
, M = Bt(C)
, D = M.cx
, B = M.cy
, F = M.innerRadius
, z = M.outerRadius;
return L.cloneElement(m, {
polarAngles: Array.isArray(_) ? _ : wt(M, !0).map(function(q) {
return q.coordinate
}),
polarRadius: Array.isArray(j) ? j : wt(k, !0).map(function(q) {
return q.coordinate
}),
cx: D,
cy: B,
innerRadius: F,
outerRadius: z,
key: m.key || "polar-grid",
radialLines: P
})
}),
Y(g, "renderLegend", function() {
var m = g.state.formattedGraphicalItems
, S = g.props
, P = S.children
, _ = S.width
, j = S.height
, $ = g.props.margin || {}
, T = _ - ($.left || 0) - ($.right || 0)
, C = sy({
children: P,
formattedGraphicalItems: m,
legendWidth: T,
legendContent: l
});
if (!C)
return null;
var k = C.item
, M = Dh(C, o3);
return L.cloneElement(k, E(E({}, M), {}, {
chartWidth: _,
chartHeight: j,
margin: $,
onBBoxUpdate: g.handleLegendBBoxUpdate
}))
}),
Y(g, "renderTooltip", function() {
var m, S = g.props, P = S.children, _ = S.accessibilityLayer, j = ze(P, ut);
if (!j)
return null;
var $ = g.state
, T = $.isTooltipActive
, C = $.activeCoordinate
, k = $.activePayload
, M = $.activeLabel
, D = $.offset
, B = (m = j.props.active) !== null && m !== void 0 ? m : T;
return L.cloneElement(j, {
viewBox: E(E({}, D), {}, {
x: D.left,
y: D.top
}),
active: B,
label: M,
payload: B ? k : [],
coordinate: C,
accessibilityLayer: _
})
}),
Y(g, "renderBrush", function(m) {
var S = g.props
, P = S.margin
, _ = S.data
, j = g.state
, $ = j.offset
, T = j.dataStartIndex
, C = j.dataEndIndex
, k = j.updateId;
return L.cloneElement(m, {
key: m.key || "_recharts-brush",
onChange: Mi(g.handleBrushChange, m.props.onChange),
data: _,
x: R(m.props.x) ? m.props.x : $.left,
y: R(m.props.y) ? m.props.y : $.top + $.height + $.brushBottom - (P.bottom || 0),
width: R(m.props.width) ? m.props.width : $.width,
startIndex: T,
endIndex: C,
updateId: "brush-".concat(k)
})
}),
Y(g, "renderReferenceElement", function(m, S, P) {
if (!m)
return null;
var _ = g
, j = _.clipPathId
, $ = g.state
, T = $.xAxisMap
, C = $.yAxisMap
, k = $.offset
, M = m.type.defaultProps || {}
, D = m.props
, B = D.xAxisId
, F = B === void 0 ? M.xAxisId : B
, z = D.yAxisId
, q = z === void 0 ? M.yAxisId : z;
return L.cloneElement(m, {
key: m.key || "".concat(S, "-").concat(P),
xAxis: T[F],
yAxis: C[q],
viewBox: {
x: k.left,
y: k.top,
width: k.width,
height: k.height
},
clipPathId: j
})
}),
Y(g, "renderActivePoints", function(m) {
var S = m.item
, P = m.activePoint
, _ = m.basePoint
, j = m.childIndex
, $ = m.isRange
, T = []
, C = S.props.key
, k = S.item.type.defaultProps !== void 0 ? E(E({}, S.item.type.defaultProps), S.item.props) : S.item.props
, M = k.activeDot
, D = k.dataKey
, B = E(E({
index: j,
dataKey: D,
cx: P.x,
cy: P.y,
r: 4,
fill: Al(S.item),
strokeWidth: 2,
stroke: "#fff",
payload: P.payload,
value: P.value
}, Q(M, !1)), Li(M));
return T.push(b.renderActiveDot(M, B, "".concat(C, "-activePoint-").concat(j))),
_ ? T.push(b.renderActiveDot(M, E(E({}, B), {}, {
cx: _.x,
cy: _.y
}), "".concat(C, "-basePoint-").concat(j))) : $ && T.push(null),
T
}),
Y(g, "renderGraphicChild", function(m, S, P) {
var _ = g.filterFormatItem(m, S, P);
if (!_)
return null;
var j = g.getTooltipEventType()
, $ = g.state
, T = $.isTooltipActive
, C = $.tooltipAxis
, k = $.activeTooltipIndex
, M = $.activeLabel
, D = g.props.children
, B = ze(D, ut)
, F = _.props
, z = F.points
, q = F.isRange
, G = F.baseLine
, U = _.item.type.defaultProps !== void 0 ? E(E({}, _.item.type.defaultProps), _.item.props) : _.item.props
, K = U.activeDot
, ae = U.hide
, ge = U.activeBar
, je = U.activeShape
, pt = !!(!ae && T && B && (K || ge || je))
, be = {};
j !== "axis" && B && B.props.trigger === "click" ? be = {
onClick: Mi(g.handleItemMouseEnter, m.props.onClick)
} : j !== "axis" && (be = {
onMouseLeave: Mi(g.handleItemMouseLeave, m.props.onMouseLeave),
onMouseEnter: Mi(g.handleItemMouseEnter, m.props.onMouseEnter)
});
var W = L.cloneElement(m, E(E({}, _.props), be));
function V(yt) {
return typeof C.dataKey == "function" ? C.dataKey(yt.payload) : null
}
if (pt)
if (k >= 0) {
var X, N;
if (C.dataKey && !C.allowDuplicatedCategory) {
var he = typeof C.dataKey == "function" ? V : "payload.".concat(C.dataKey.toString());
X = Bi(z, he, M),
N = q && G && Bi(G, he, M)
} else
X = z == null ? void 0 : z[k],
N = q && G && G[k];
if (je || ge) {
var ee = m.props.activeIndex !== void 0 ? m.props.activeIndex : k;
return [L.cloneElement(m, E(E(E({}, _.props), be), {}, {
activeIndex: ee
})), null, null]
}
if (!te(X))
return [W].concat(Vr(g.renderActivePoints({
item: _,
activePoint: X,
basePoint: N,
childIndex: k,
isRange: q
})))
} else {
var xe, pe = (xe = g.getItemByXY(g.state.activeCoordinate)) !== null && xe !== void 0 ? xe : {
graphicalItem: W
}, Ee = pe.graphicalItem, Qe = Ee.item, kt = Qe === void 0 ? m : Qe, vr = Ee.childIndex, vt = E(E(E({}, _.props), be), {}, {
activeIndex: vr
});
return [L.cloneElement(kt, vt), null, null]
}
return q ? [W, null, null] : [W, null]
}),
Y(g, "renderCustomized", function(m, S, P) {
return L.cloneElement(m, E(E({
key: "recharts-customized-".concat(P)
}, g.props), g.state))
}),
Y(g, "renderMap", {
CartesianGrid: {
handler: Ni,
once: !0
},
ReferenceArea: {
handler: g.renderReferenceElement
},
ReferenceLine: {
handler: Ni
},
ReferenceDot: {
handler: g.renderReferenceElement
},
XAxis: {
handler: Ni
},
YAxis: {
handler: Ni
},
Brush: {
handler: g.renderBrush,
once: !0
},
Bar: {
handler: g.renderGraphicChild
},
Line: {
handler: g.renderGraphicChild
},
Area: {
handler: g.renderGraphicChild
},
Radar: {
handler: g.renderGraphicChild
},
RadialBar: {
handler: g.renderGraphicChild
},
Scatter: {
handler: g.renderGraphicChild
},
Pie: {
handler: g.renderGraphicChild
},
Funnel: {
handler: g.renderGraphicChild
},
Tooltip: {
handler: g.renderCursor,
once: !0
},
PolarGrid: {
handler: g.renderPolarGrid,
once: !0
},
PolarAngleAxis: {
handler: g.renderPolarAxis
},
PolarRadiusAxis: {
handler: g.renderPolarAxis
},
Customized: {
handler: g.renderCustomized
}
}),
g.clipPathId = "".concat((x = w.id) !== null && x !== void 0 ? x : pi("recharts"), "-clip"),
g.throttleTriggeredAfterMouseMove = lv(g.triggeredAfterMouseMove, (O = w.throttleDelay) !== null && O !== void 0 ? O : 1e3 / 60),
g.state = {},
g
}
return m3(b, p),
p3(b, [{
key: "componentDidMount",
value: function() {
var x, O;
this.addListener(),
this.accessibilityManager.setDetails({
container: this.container,
offset: {
left: (x = this.props.margin.left) !== null && x !== void 0 ? x : 0,
top: (O = this.props.margin.top) !== null && O !== void 0 ? O : 0
},
coordinateList: this.state.tooltipTicks,
mouseHandlerCallback: this.triggeredAfterMouseMove,
layout: this.props.layout
}),
this.displayDefaultTooltip()
}
}, {
key: "displayDefaultTooltip",
value: function() {
var x = this.props
, O = x.children
, g = x.data
, m = x.height
, S = x.layout
, P = ze(O, ut);
if (P) {
var _ = P.props.defaultIndex;
if (!(typeof _ != "number" || _ < 0 || _ > this.state.tooltipTicks.length - 1)) {
var j = this.state.tooltipTicks[_] && this.state.tooltipTicks[_].value
, $ = Pc(this.state, g, _, j)
, T = this.state.tooltipTicks[_].coordinate
, C = (this.state.offset.top + m) / 2
, k = S === "horizontal"
, M = k ? {
x: T,
y: C
} : {
y: T,
x: C
}
, D = this.state.formattedGraphicalItems.find(function(F) {
var z = F.item;
return z.type.name === "Scatter"
});
D && (M = E(E({}, M), D.props.points[_].tooltipPosition),
$ = D.props.points[_].tooltipPayload);
var B = {
activeTooltipIndex: _,
isTooltipActive: !0,
activeLabel: j,
activePayload: $,
activeCoordinate: M
};
this.setState(B),
this.renderCursor(P),
this.accessibilityManager.setIndex(_)
}
}
}
}, {
key: "getSnapshotBeforeUpdate",
value: function(x, O) {
if (!this.props.accessibilityLayer)
return null;
if (this.state.tooltipTicks !== O.tooltipTicks && this.accessibilityManager.setDetails({
coordinateList: this.state.tooltipTicks
}),
this.props.layout !== x.layout && this.accessibilityManager.setDetails({
layout: this.props.layout
}),
this.props.margin !== x.margin) {
var g, m;
this.accessibilityManager.setDetails({
offset: {
left: (g = this.props.margin.left) !== null && g !== void 0 ? g : 0,
top: (m = this.props.margin.top) !== null && m !== void 0 ? m : 0
}
})
}
return null
}
}, {
key: "componentDidUpdate",
value: function(x) {
iu([ze(x.children, ut)], [ze(this.props.children, ut)]) || this.displayDefaultTooltip()
}
}, {
key: "componentWillUnmount",
value: function() {
this.removeListener(),
this.throttleTriggeredAfterMouseMove.cancel()
}
}, {
key: "getTooltipEventType",
value: function() {
var x = ze(this.props.children, ut);
if (x && typeof x.props.shared == "boolean") {
var O = x.props.shared ? "axis" : "item";
return u.indexOf(O) >= 0 ? O : a
}
return a
}
}, {
key: "getMouseInfo",
value: function(x) {
if (!this.container)
return null;
var O = this.container
, g = O.getBoundingClientRect()
, m = CE(g)
, S = {
chartX: Math.round(x.pageX - m.left),
chartY: Math.round(x.pageY - m.top)
}
, P = g.width / O.offsetWidth || 1
, _ = this.inRange(S.chartX, S.chartY, P);
if (!_)
return null;
var j = this.state
, $ = j.xAxisMap
, T = j.yAxisMap
, C = this.getTooltipEventType();
if (C !== "axis" && $ && T) {
var k = Bt($).scale
, M = Bt(T).scale
, D = k && k.invert ? k.invert(S.chartX) : null
, B = M && M.invert ? M.invert(S.chartY) : null;
return E(E({}, S), {}, {
xValue: D,
yValue: B
})
}
var F = Bh(this.state, this.props.data, this.props.layout, _);
return F ? E(E({}, S), F) : null
}
}, {
key: "inRange",
value: function(x, O) {
var g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1
, m = this.props.layout
, S = x / g
, P = O / g;
if (m === "horizontal" || m === "vertical") {
var _ = this.state.offset
, j = S >= _.left && S <= _.left + _.width && P >= _.top && P <= _.top + _.height;
return j ? {
x: S,
y: P
} : null
}
var $ = this.state
, T = $.angleAxisMap
, C = $.radiusAxisMap;
if (T && C) {
var k = Bt(T);
return bd({
x: S,
y: P
}, k)
}
return null
}
}, {
key: "parseEventsOfWrapper",
value: function() {
var x = this.props.children
, O = this.getTooltipEventType()
, g = ze(x, ut)
, m = {};
g && O === "axis" && (g.props.trigger === "click" ? m = {
onClick: this.handleClick
} : m = {
onMouseEnter: this.handleMouseEnter,
onMouseMove: this.handleMouseMove,
onMouseLeave: this.handleMouseLeave,
onTouchMove: this.handleTouchMove,
onTouchStart: this.handleTouchStart,
onTouchEnd: this.handleTouchEnd
});
var S = Li(this.props, this.handleOuterEvent);
return E(E({}, S), m)
}
}, {
key: "addListener",
value: function() {
Jo.on(Qo, this.handleReceiveSyncEvent)
}
}, {
key: "removeListener",
value: function() {
Jo.removeListener(Qo, this.handleReceiveSyncEvent)
}
}, {
key: "filterFormatItem",
value: function(x, O, g) {
for (var m = this.state.formattedGraphicalItems, S = 0, P = m.length; S < P; S++) {
var _ = m[S];
if (_.item === x || _.props.key === x.key || O === Ot(_.item.type) && g === _.childIndex)
return _
}
return null
}
}, {
key: "renderClipPath",
value: function() {
var x = this.clipPathId
, O = this.state.offset
, g = O.left
, m = O.top
, S = O.height
, P = O.width;
return A.createElement("defs", null, A.createElement("clipPath", {
id: x
}, A.createElement("rect", {
x: g,
y: m,
height: S,
width: P
})))
}
}, {
key: "getXScales",
value: function() {
var x = this.state.xAxisMap;
return x ? Object.entries(x).reduce(function(O, g) {
var m = kh(g, 2)
, S = m[0]
, P = m[1];
return E(E({}, O), {}, Y({}, S, P.scale))
}, {}) : null
}
}, {
key: "getYScales",
value: function() {
var x = this.state.yAxisMap;
return x ? Object.entries(x).reduce(function(O, g) {
var m = kh(g, 2)
, S = m[0]
, P = m[1];
return E(E({}, O), {}, Y({}, S, P.scale))
}, {}) : null
}
}, {
key: "getXScaleByAxisId",
value: function(x) {
var O;
return (O = this.state.xAxisMap) === null || O === void 0 || (O = O[x]) === null || O === void 0 ? void 0 : O.scale
}
}, {
key: "getYScaleByAxisId",
value: function(x) {
var O;
return (O = this.state.yAxisMap) === null || O === void 0 || (O = O[x]) === null || O === void 0 ? void 0 : O.scale
}
}, {
key: "getItemByXY",
value: function(x) {
var O = this.state
, g = O.formattedGraphicalItems
, m = O.activeItem;
if (g && g.length)
for (var S = 0, P = g.length; S < P; S++) {
var _ = g[S]
, j = _.props
, $ = _.item
, T = $.type.defaultProps !== void 0 ? E(E({}, $.type.defaultProps), $.props) : $.props
, C = Ot($.type);
if (C === "Bar") {
var k = (j.data || []).find(function(F) {
return JN(x, F)
});
if (k)
return {
graphicalItem: _,
payload: k
}
} else if (C === "RadialBar") {
var M = (j.data || []).find(function(F) {
return bd(x, F)
});
if (M)
return {
graphicalItem: _,
payload: M
}
} else if (go(_, m) || mo(_, m) || ii(_, m)) {
var D = tL({
graphicalItem: _,
activeTooltipItem: m,
itemData: T.data
})
, B = T.activeIndex === void 0 ? D : T.activeIndex;
return {
graphicalItem: E(E({}, _), {}, {
childIndex: B
}),
payload: ii(_, m) ? T.data[D] : _.props.data[D]
}
}
}
return null
}
}, {
key: "render",
value: function() {
var x = this;
if (!cs(this))
return null;
var O = this.props
, g = O.children
, m = O.className
, S = O.width
, P = O.height
, _ = O.style
, j = O.compact
, $ = O.title
, T = O.desc
, C = Dh(O, u3)
, k = Q(C, !1);
if (j)
return A.createElement(gh, {
state: this.state,
width: this.props.width,
height: this.props.height,
clipPathId: this.clipPathId
}, A.createElement(ou, Sr({}, k, {
width: S,
height: P,
title: $,
desc: T
}), this.renderClipPath(), ss(g, this.renderMap)));
if (this.props.accessibilityLayer) {
var M, D;
k.tabIndex = (M = this.props.tabIndex) !== null && M !== void 0 ? M : 0,
k.role = (D = this.props.role) !== null && D !== void 0 ? D : "application",
k.onKeyDown = function(F) {
x.accessibilityManager.keyboardEvent(F)
}
,
k.onFocus = function() {
x.accessibilityManager.focus()
}
}
var B = this.parseEventsOfWrapper();
return A.createElement(gh, {
state: this.state,
width: this.props.width,
height: this.props.height,
clipPathId: this.clipPathId
}, A.createElement("div", Sr({
className: re("recharts-wrapper", m),
style: E({
position: "relative",
cursor: "default",
width: S,
height: P
}, _)
}, B, {
ref: function(z) {
x.container = z
}
}), A.createElement(ou, Sr({}, k, {
width: S,
height: P,
title: $,
desc: T,
style: P3
}), this.renderClipPath(), ss(g, this.renderMap)), this.renderLegend(), this.renderTooltip()))
}
}])
}(L.Component);
Y(v, "displayName", r),
Y(v, "defaultProps", E({
layout: "horizontal",
stackOffset: "none",
barCategoryGap: "10%",
barGap: 4,
margin: {
top: 5,
right: 5,
bottom: 5,
left: 5
},
reverseStackOrder: !1,
syncMethod: "index"
}, s)),
Y(v, "getDerivedStateFromProps", function(p, b) {
var w = p.dataKey
, x = p.data
, O = p.children
, g = p.width
, m = p.height
, S = p.layout
, P = p.stackOffset
, _ = p.margin
, j = b.dataStartIndex
, $ = b.dataEndIndex;
if (b.updateId === void 0) {
var T = Lh(p);
return E(E(E({}, T), {}, {
updateId: 0
}, h(E(E({
props: p
}, T), {}, {
updateId: 0
}), b)), {}, {
prevDataKey: w,
prevData: x,
prevWidth: g,
prevHeight: m,
prevLayout: S,
prevStackOffset: P,
prevMargin: _,
prevChildren: O
})
}
if (w !== b.prevDataKey || x !== b.prevData || g !== b.prevWidth || m !== b.prevHeight || S !== b.prevLayout || P !== b.prevStackOffset || !Ar(_, b.prevMargin)) {
var C = Lh(p)
, k = {
chartX: b.chartX,
chartY: b.chartY,
isTooltipActive: b.isTooltipActive
}
, M = E(E({}, Bh(b, x, S)), {}, {
updateId: b.updateId + 1
})
, D = E(E(E({}, C), k), M);
return E(E(E({}, D), h(E({
props: p
}, D), b)), {}, {
prevDataKey: w,
prevData: x,
prevWidth: g,
prevHeight: m,
prevLayout: S,
prevStackOffset: P,
prevMargin: _,
prevChildren: O
})
}
if (!iu(O, b.prevChildren)) {
var B, F, z, q, G = ze(O, Rr), U = G && (B = (F = G.props) === null || F === void 0 ? void 0 : F.startIndex) !== null && B !== void 0 ? B : j, K = G && (z = (q = G.props) === null || q === void 0 ? void 0 : q.endIndex) !== null && z !== void 0 ? z : $, ae = U !== j || K !== $, ge = !te(x), je = ge && !ae ? b.updateId : b.updateId + 1;
return E(E({
updateId: je
}, h(E(E({
props: p
}, b), {}, {
updateId: je,
dataStartIndex: U,
dataEndIndex: K
}), b)), {}, {
prevChildren: O,
dataStartIndex: U,
dataEndIndex: K
})
}
return null
}),
Y(v, "renderActiveDot", function(p, b, w) {
var x;
return L.isValidElement(p) ? x = L.cloneElement(p, b) : J(p) ? x = p(b) : x = A.createElement($l, b),
A.createElement(ye, {
className: "recharts-active-dot",
key: w
}, x)
});
var y = L.forwardRef(function(b, w) {
return A.createElement(v, Sr({}, b, {
ref: w
}))
});
return y.displayName = v.displayName,
y
}
, D3 = k3({
chartName: "AreaChart",
GraphicalChild: Et,
axisComponents: [{
axisType: "xAxis",
AxisComp: Ao
}, {
axisType: "yAxis",
AxisComp: li
}],
formatAxisMap: _R
});
function N3({x: e, y: t, value: r, valueFormatter: n}) {
return I.jsx("g", {
transform: `translate(${e},${t})`,
children: I.jsx("text", {
x: 0,
y: 0,
dy: -8,
dx: -10,
textAnchor: "top",
fill: "var(--chart-text-color, var(--mantine-color-dimmed))",
fontSize: 8,
children: n ? n(r) : r
})
})
}
function Og({color: e, id: t, withGradient: r, fillOpacity: n}) {
return I.jsx(I.Fragment, {
children: r ? I.jsxs("linearGradient", {
id: t,
x1: "0",
y1: "0",
x2: "0",
y2: "1",
children: [I.jsx("stop", {
offset: "0%",
stopColor: e,
stopOpacity: n
}), I.jsx("stop", {
offset: "100%",
stopColor: e,
stopOpacity: .01
})]
}) : I.jsx("linearGradient", {
id: t,
x1: "0",
y1: "0",
x2: "0",
y2: "1",
children: I.jsx("stop", {
stopColor: e,
stopOpacity: n ?? .2
})
})
})
}
Og.displayName = "@mantine/charts/AreaGradient";
function Sg({offset: e, id: t, colors: r, fillOpacity: n}) {
const i = _c();
return I.jsxs("linearGradient", {
id: t,
x1: "0",
y1: "0",
x2: "0",
y2: "1",
children: [I.jsx("stop", {
offset: e,
stopColor: Ft(r[0], i),
stopOpacity: n ?? .2
}), I.jsx("stop", {
offset: e,
stopColor: Ft(r[1], i),
stopOpacity: n ?? .2
})]
})
}
Sg.displayName = "@mantine/charts/AreaSplit";
function B3({data: e, dataKey: t}) {
const r = Math.max(...e.map(i => i[t]))
, n = Math.min(...e.map(i => i[t]));
return r <= 0 ? 0 : n >= 0 ? 1 : r / (r - n)
}
function L3({data: e, series: t}) {
if (t.length === 1) {
const r = t[0].name;
return B3({
data: e,
dataKey: r
})
}
return .5
}
var Pg = {
root: "m_a50f3e58",
container: "m_af9188cb",
grid: "m_a50a48bc",
axis: "m_a507a517",
axisLabel: "m_2293801d",
tooltip: "m_92b296cd"
};
function R3(e) {
return `${(e * 100).toFixed(0)}%`
}
const F3 = {
withXAxis: !0,
withYAxis: !0,
withDots: !0,
withTooltip: !0,
connectNulls: !0,
strokeWidth: 2,
tooltipAnimationDuration: 0,
fillOpacity: .2,
tickLine: "y",
strokeDasharray: "5 5",
curveType: "monotone",
gridAxis: "x",
type: "default",
splitColors: ["green.7", "red.7"],
orientation: "horizontal"
}
, z3 = Fh( (e, {textColor: t, gridColor: r}) => ({
root: {
"--chart-text-color": t ? Ft(t, e) : void 0,
"--chart-grid-color": r ? Ft(r, e) : void 0
}
}))
, Nl = Ac( (e, t) => {
const r = Tn("AreaChart", F3, e)
, {classNames: n, className: i, style: a, styles: o, unstyled: u, vars: c, data: l, series: f, withGradient: s, dataKey: d, withXAxis: h, withYAxis: v, curveType: y, gridProps: p, withDots: b, tickLine: w, strokeDasharray: x, gridAxis: O, unit: g, yAxisProps: m, xAxisProps: S, dotProps: P, activeDotProps: _, strokeWidth: j, tooltipAnimationDuration: $, type: T, legendProps: C, tooltipProps: k, withLegend: M, withTooltip: D, areaChartProps: B, fillOpacity: F, splitColors: z, splitOffset: q, connectNulls: G, onMouseLeave: U, orientation: K, referenceLines: ae, dir: ge, valueFormatter: je, children: pt, areaProps: be, xAxisLabel: W, yAxisLabel: V, withRightYAxis: X, rightYAxisLabel: N, rightYAxisProps: he, withPointLabels: ee, ...xe} = r
, pe = _c()
, Ee = L.useId()
, Qe = `${Ee}-split`
, kt = O !== "none" && (w === "x" || w === "xy")
, vr = O !== "none" && (w === "y" || w === "xy")
, vt = ($ || 0) > 0
, yt = typeof s == "boolean" ? s : T === "default"
, yr = T === "stacked" || T === "percent"
, [gr,fn] = L.useState(null)
, Bl = gr !== null
, $g = ie => {
fn(null),
U == null || U(ie)
}
, {resolvedClassNames: Ll, resolvedStyles: Rl} = kg({
classNames: n,
styles: o,
props: r
})
, et = Na({
name: "AreaChart",
classes: Pg,
props: r,
className: i,
style: a,
classNames: n,
styles: o,
unstyled: u,
vars: c,
varsResolver: z3
})
, Tg = f.map(ie => {
const gt = Ft(ie.color, pe)
, Yt = Bl && gr !== ie.name;
return L.createElement(Et, {
...et("area"),
activeDot: {
fill: pe.white,
stroke: gt,
strokeWidth: 2,
r: 4,
..._
},
dot: {
fill: gt,
fillOpacity: Yt ? 0 : 1,
strokeWidth: 2,
r: 4,
...P
},
key: ie.name,
name: ie.name,
type: y,
dataKey: ie.name,
fill: "none",
strokeWidth: j,
stroke: "none",
isAnimationActive: !1,
connectNulls: G,
stackId: yr ? "stack-dots" : void 0,
yAxisId: ie.yAxisId || "left",
...typeof be == "function" ? be(ie) : be
})
}
)
, jg = f.map(ie => {
const gt = `${Ee}-${ie.color.replace(/[^a-zA-Z0-9]/g, "")}`
, Yt = Ft(ie.color, pe)
, Wl = Bl && gr !== ie.name;
return I.jsxs(L.Fragment, {
children: [I.jsx("defs", {
children: I.jsx(Og, {
color: Yt,
withGradient: yt,
id: gt,
fillOpacity: F
})
}), I.jsx(Et, {
...et("area"),
activeDot: !1,
dot: !1,
name: ie.name,
type: y,
dataKey: ie.name,
fill: T === "split" ? `url(#${Qe})` : `url(#${gt})`,
strokeWidth: j,
stroke: Yt,
isAnimationActive: !1,
connectNulls: G,
stackId: yr ? "stack" : void 0,
fillOpacity: Wl ? 0 : 1,
strokeOpacity: Wl ? .5 : 1,
strokeDasharray: ie.strokeDasharray,
yAxisId: ie.yAxisId || "left",
label: ee ? I.jsx(N3, {
valueFormatter: je
}) : void 0,
...typeof be == "function" ? be(ie) : be
})]
}, ie.name)
}
)
, Eg = ae == null ? void 0 : ae.map( (ie, gt) => {
const Yt = Ft(ie.color, pe);
return I.jsx(xo, {
stroke: ie.color ? Yt : "var(--chart-grid-color)",
strokeWidth: 1,
yAxisId: ie.yAxisId || "left",
...ie,
label: {
value: ie.label,
fill: ie.color ? Yt : "currentColor",
fontSize: 12,
position: ie.labelPosition ?? "insideBottomLeft"
},
...et("referenceLine")
}, gt)
}
)
, Fl = T === "percent" ? R3 : je
, zl = {
axisLine: !1,
...K === "vertical" ? {
dataKey: d,
type: "category"
} : {
type: "number"
},
tickLine: vr ? {
stroke: "currentColor"
} : !1,
allowDecimals: !0,
unit: g,
tickFormatter: K === "vertical" ? void 0 : Fl,
...et("axis")
};
return I.jsx(Ba, {
ref: t,
...et("root"),
onMouseLeave: $g,
dir: ge || "ltr",
...xe,
children: I.jsx(AE, {
...et("container"),
children: I.jsxs(D3, {
data: l,
stackOffset: T === "percent" ? "expand" : void 0,
layout: K,
margin: {
bottom: W ? 30 : void 0,
left: V ? 10 : void 0,
right: V ? 5 : void 0
},
...B,
children: [Eg, M && I.jsx(ar, {
verticalAlign: "top",
content: ie => I.jsx(Yh, {
payload: ie.payload,
onHighlight: fn,
legendPosition: (C == null ? void 0 : C.verticalAlign) || "top",
classNames: Ll,
styles: Rl,
series: f
}),
...C
}), I.jsx(ng, {
strokeDasharray: x,
vertical: O === "y" || O === "xy",
horizontal: O === "x" || O === "xy",
...et("grid"),
...p
}), I.jsxs(Ao, {
hide: !h,
...K === "vertical" ? {
type: "number"
} : {
dataKey: d
},
tick: {
transform: "translate(0, 10)",
fontSize: 12,
fill: "currentColor"
},
stroke: "",
interval: "preserveStartEnd",
tickLine: kt ? {
stroke: "currentColor"
} : !1,
minTickGap: 5,
tickFormatter: K === "vertical" ? Fl : void 0,
...et("axis"),
...S,
children: [W && I.jsx(Pe, {
position: "insideBottom",
offset: -20,
fontSize: 12,
...et("axisLabel"),
children: W
}), S == null ? void 0 : S.children]
}), I.jsxs(li, {
yAxisId: "left",
orientation: "left",
tick: {
transform: "translate(-10, 0)",
fontSize: 12,
fill: "currentColor"
},
hide: !v,
...zl,
...m,
children: [V && I.jsx(Pe, {
position: "insideLeft",
angle: -90,
textAnchor: "middle",
fontSize: 12,
offset: -5,
...et("axisLabel"),
children: V
}), m == null ? void 0 : m.children]
}), I.jsxs(li, {
yAxisId: "right",
orientation: "right",
tick: {
transform: "translate(10, 0)",
fontSize: 12,
fill: "currentColor"
},
hide: !X,
...zl,
...he,
children: [N && I.jsx(Pe, {
position: "insideRight",
angle: 90,
textAnchor: "middle",
fontSize: 12,
offset: -5,
...et("axisLabel"),
children: N
}), m == null ? void 0 : m.children]
}), D && I.jsx(ut, {
animationDuration: $,
isAnimationActive: vt,
position: K === "vertical" ? {} : {
y: 0
},
cursor: {
stroke: "var(--chart-grid-color)",
strokeWidth: 1,
strokeDasharray: x
},
content: ({label: ie, payload: gt}) => I.jsx(Gh, {
label: ie,
payload: gt,
unit: g,
classNames: Ll,
styles: Rl,
series: f,
valueFormatter: je
}),
...k
}), T === "split" && I.jsx("defs", {
children: I.jsx(Sg, {
colors: z,
id: Qe,
offset: q ?? L3({
data: l,
series: f
}),
fillOpacity: F
})
}), jg, b && Tg, pt]
})
})
})
}
);
Nl.classes = Pg;
Nl.displayName = "@mantine/charts/AreaChart";
const W3 = ({profitData: e}) => {
const t = e.reduce( (a, o) => o.revenue + a, 0)
, r = e.reduce( (a, o) => o.expenses + a, 0)
, n = e.reduce( (a, o) => o.profit + a, 0)
, i = e.reduce( (a, o) => o.dealsCount + a, 0);
return I.jsx($c, {
style: {
padding: "25px",
height: "7vh",
flexGrow: 0
},
children: I.jsxs(zh, {
gap: 2,
justify: "space-between",
children: [I.jsx(Oi, {
w: "24%",
children: I.jsxs(Qt, {
children: ["Выручка: ", new Intl.NumberFormat("ru-RU").format(t), " ₽"]
})
}), I.jsx(Pr, {
size: "md",
orientation: "vertical"
}), I.jsx(Oi, {
w: "24%",
children: I.jsxs(Qt, {
children: ["Расходы: ", new Intl.NumberFormat("ru-RU").format(r), " ₽"]
})
}), I.jsx(Pr, {
size: "md",
orientation: "vertical"
}), I.jsx(Oi, {
w: "24%",
children: I.jsxs(Qt, {
children: ["Прибыль: ", new Intl.NumberFormat("ru-RU").format(n), " ₽"]
})
}), I.jsx(Pr, {
size: "md",
orientation: "vertical"
}), I.jsx(Oi, {
w: "24%",
children: I.jsxs(Qt, {
children: ["Сделок: ", new Intl.NumberFormat("ru-RU").format(i), " шт"]
})
})]
})
})
}
, U3 = () => {
const e = new Date
, t = new Date;
return t.setDate(e.getDate() - 28),
[t, e]
}
;
var Ne = (e => (e[e.BY_DATES = 0] = "BY_DATES",
e[e.BY_CLIENTS = 1] = "BY_CLIENTS",
e[e.BY_PROJECTS = 2] = "BY_PROJECTS",
e[e.BY_BOARDS = 3] = "BY_BOARDS",
e[e.BY_STATUSES = 4] = "BY_STATUSES",
e[e.BY_WAREHOUSES = 5] = "BY_WAREHOUSES",
e[e.BY_MARKETPLACES = 6] = "BY_MARKETPLACES",
e[e.BY_MANAGERS = 7] = "BY_MANAGERS",
e))(Ne || {});
const H3 = e => {
const t = [{
label: "По датам",
value: "0"
}, {
label: "По клиентам",
value: "1"
}, {
label: "По проектам",
value: "2"
}, {
label: "По доскам",
value: "3",
disabled: !e.selectedProject
}, {
label: "По статусам",
value: "4",
disabled: !e.selectedBoard
}, {
label: "По складам отгрузки",
value: "5"
}, {
label: "По маркетплейсам",
value: "6"
}, {
label: "По менеджерам",
value: "7"
}]
, r = n => {
e.onChange && e.onChange(n.toString())
}
;
return L.useEffect( () => {
e.value === "4" ? e.selectedProject ? e.selectedBoard || r(3) : r(2) : e.value === "3" && !e.selectedProject && r(2)
}
, [e.selectedBoard, e.selectedProject]),
I.jsx(Dg, {
data: t,
...e
})
}
, Ag = L.createContext(void 0)
, q3 = () => {
const e = Ng({
mode: "controlled",
initialValues: {
dateRange: U3(),
groupTableBy: Ne.BY_DATES,
client: null,
marketplace: null,
project: null,
board: null,
dealStatus: null,
manager: null,
expenseTag: null,
incomeTag: null,
isCompletedOnly: !0
}
})
, [t,r] = L.useState(!1)
, [n,i] = L.useState(!1)
, [a,o] = L.useState([])
, [u,c] = L.useState([])
, l = () => {
var v, y, p, b, w, x, O, g;
const h = e.values.dateRange;
return {
dateRange: [ql(h[0]), ql(h[1])],
clientId: ((v = e.values.client) == null ? void 0 : v.id) ?? -1,
baseMarketplaceKey: ((y = e.values.marketplace) == null ? void 0 : y.key) ?? "all",
projectId: ((p = e.values.project) == null ? void 0 : p.id) ?? -1,
boardId: ((b = e.values.board) == null ? void 0 : b.id) ?? -1,
dealStatusId: ((w = e.values.dealStatus) == null ? void 0 : w.id) ?? -1,
managerId: ((x = e.values.manager) == null ? void 0 : x.id) ?? -1,
expenseTagId: ((O = e.values.expenseTag) == null ? void 0 : O.id) ?? -1,
incomeTagId: ((g = e.values.incomeTag) == null ? void 0 : g.id) ?? -1,
isCompletedOnly: e.values.isCompletedOnly
}
}
, f = () => {
r(!0),
Gl.getProfitChartData({
requestBody: l()
}).then(h => {
o(h.data)
}
).catch(h => console.log(h)).finally( () => r(!1))
}
, s = () => ({
...l(),
groupTableBy: e.values.groupTableBy
})
, d = () => {
i(!0),
Gl.getProfitTableData({
requestBody: s()
}).then(h => {
c(h.data)
}
).catch(h => console.log(h)).finally( () => i(!1))
}
;
return L.useEffect( () => {
e.values.dateRange.length < 2 || e.values.dateRange[1] === null || (f(),
d())
}
, [e.values]),
{
form: e,
isChartLoading: t,
isTableLoading: n,
profitChartData: a,
profitTableData: u
}
}
, K3 = ({children: e}) => {
const t = q3();
return I.jsx(Ag.Provider, {
value: t,
children: e
})
}
, _g = () => {
const e = L.useContext(Ag);
if (!e)
throw new Error("useProfitTabContext must be used within a ProfitTabContextProvider");
return e
}
, G3 = () => {
const {profitChartData: e, isChartLoading: t} = _g()
, r = e.map(o => ({
...o,
date: Wh(o.date)
}))
, n = [[{
name: "profit",
label: "Прибыль",
color: "indigo.6"
}, {
name: "revenue",
label: "Выручка",
color: "teal.6"
}, {
name: "expenses",
label: "Расходы",
color: "red.6"
}], [{
name: "dealsCount",
label: "Количество сделок",
color: "indigo.6"
}]]
, i = ["₽", "шт"]
, a = ["47vh", "28vh"];
return I.jsxs("div", {
className: jc["profit-chart-container"],
children: [I.jsx(W3, {
profitData: e
}), I.jsx($c, {
style: {
padding: "25px"
},
children: I.jsx(Uh, {
visible: t,
children: I.jsx(Hh, {
gap: "4vh",
children: n.map( (o, u) => I.jsx(Nl, {
my: "sm",
w: "98%",
h: a[u],
data: r,
dataKey: "date",
unit: i[u],
tooltipAnimationDuration: 200,
valueFormatter: c => new Intl.NumberFormat("ru-RU").format(c),
series: o,
fillOpacity: .5
}))
})
})
})]
})
}
, Y3 = ({groupTableBy: e, statuses: t}) => {
const r = {
[Ne.BY_DATES]: "Дата",
[Ne.BY_CLIENTS]: "Клиент",
[Ne.BY_PROJECTS]: "Проект",
[Ne.BY_BOARDS]: "Доска",
[Ne.BY_STATUSES]: "Статус",
[Ne.BY_MARKETPLACES]: "Маркетплейс",
[Ne.BY_WAREHOUSES]: "Склад отгрузки",
[Ne.BY_MANAGERS]: "Менеджер"
}
, n = () => e === Ne.BY_DATES ? [{
accessorKey: "revenue",
header: "Выручка",
Cell: ({row: i}) => i.original.revenue.toLocaleString("ru-RU") + "₽",
size: 50
}, {
accessorKey: "expenses",
header: "Расходы",
Cell: ({row: i}) => {
var a;
return ((a = i.original.expenses) == null ? void 0 : a.toLocaleString("ru-RU")) + "₽"
}
,
size: 50
}] : [];
return L.useMemo( () => [{
accessorKey: "groupedValue",
header: r[e],
enableSorting: e === Ne.BY_DATES,
Cell: ({row: i}) => {
if (e === Ne.BY_STATUSES) {
const a = t == null ? void 0 : t.find(o => o.id === i.original.groupedValue);
return a == null ? void 0 : a.name
}
return e == Ne.BY_DATES ? Wh(i.original.groupedValue) : i.original.groupedValue
}
,
size: e === Ne.BY_DATES ? 40 : 80
}, {
accessorKey: "dealsCount",
header: "Кол-во",
size: 40
}, ...n(), {
accessorKey: "profit",
header: "Прибыль",
Cell: ({row: i}) => i.original.profit.toLocaleString("ru-RU") + "₽",
size: 50
}], [e])
}
, V3 = () => {
var o;
const {form: e, isTableLoading: t, profitTableData: r} = _g()
, n = Y3({
groupTableBy: e.values.groupTableBy,
statuses: (o = e.values.board) == null ? void 0 : o.dealStatuses
});
return {
table: Bg({
enablePagination: !1,
data: r,
columns: n,
enableTopToolbar: !1,
enableBottomToolbar: !1,
enableSorting: !0,
initialState: {
sorting: [{
id: "groupedValue",
desc: !0
}]
},
localization: Lg,
enableRowVirtualization: !0,
mantineTableContainerProps: {
style: {
maxHeight: "86vh"
}
}
}),
form: e,
isLoading: t
}
}
, X3 = () => Rg({
queryFn: () => Fg.getAllTransactionTags(),
getObjectsFn: e => e.tags,
queryKey: "getAllTransactionTags"
})
, Z3 = e => {
let {objects: t} = X3();
return t = t.filter(r => r.isIncome === e.isIncome),
I.jsx(zg, {
data: t,
getLabelFn: r => r.name,
getValueFn: r => r.id.toString(),
clearable: !0,
...e,
onClear: () => e.onChange(null)
})
}
, J3 = e => {
var r, n, i, a;
const t = o => {
const u = o ? e.incomeTagSelectProps : e.expenseTagSelectProps;
if (!u)
return;
const c = o ? e.onIncomeTagClear : e.onExpenseTagClear
, l = "Фильтры для " + (o ? "доходов:" : "расходов:");
return I.jsxs(I.Fragment, {
children: [I.jsx(Pr, {}), I.jsx(Qt, {
children: l
}), I.jsx(Z3, {
...u,
onClear: c,
placeholder: "Выберите тег",
isIncome: o
})]
})
}
;
return I.jsxs(Hh, {
mb: "lg",
children: [I.jsx(Pr, {}), I.jsx(Qt, {
children: "Фильтры для выручки и прибыли:"
}), e.datePickerProps && I.jsx(Wg, {
...e.datePickerProps,
type: "range",
placeholder: "Выберите даты",
maxDate: new Date,
valueFormat: "DD.MM.YYYY"
}), e.projectSelectProps && I.jsx(Ug, {
...e.projectSelectProps,
clearable: !0
}), e.boardSelectProps && I.jsx(Hg, {
project: ((r = e.projectSelectProps) == null ? void 0 : r.value) ?? null,
...e.boardSelectProps,
clearable: !0
}), e.dealStatusSelectProps && I.jsx(qg, {
board: ((n = e.boardSelectProps) == null ? void 0 : n.value) ?? null,
...e.dealStatusSelectProps,
clearable: !0
}), e.clientSelectProps && I.jsx(Kg, {
...e.clientSelectProps,
onClear: e.onClientClear,
clearable: !0,
searchable: !0,
placeholder: "Выберите клиента"
}), e.baseMarketplaceSelectProps && I.jsx(Gg, {
...e.baseMarketplaceSelectProps,
onClear: e.onBaseMarketplaceClear,
clearable: !0,
placeholder: "Выберите маркетплейс"
}), e.managerSelectProps && I.jsx(Yg, {
...e.managerSelectProps,
onClear: e.onManagerClear,
placeholder: "Выберите менеджера"
}), I.jsx(Vg, {
...e.isCompletedOnlyCheckboxProps,
label: "Только завершенные сделки"
}), t(!1), t(!0), e.groupTableByProps && I.jsxs(I.Fragment, {
children: [I.jsx(Pr, {}), I.jsx(Qt, {
children: "Группировка таблицы:"
}), I.jsx(H3, {
selectedProject: ((i = e.projectSelectProps) == null ? void 0 : i.value) ?? null,
selectedBoard: ((a = e.boardSelectProps) == null ? void 0 : a.value) ?? null,
...e.groupTableByProps,
orientation: "vertical",
size: "md",
w: "100%"
})]
})]
})
}
, Q3 = ({form: e}) => {
const [t,{open: r, close: n}] = Xg();
return I.jsxs(I.Fragment, {
children: [I.jsx(Zg, {
variant: "default",
onClick: r,
mb: "lg",
children: I.jsxs(zh, {
gap: "xs",
children: [I.jsx(Jg, {}), "Фильтры"]
})
}), I.jsx(Qg, {
opened: t,
onClose: n,
title: "Фильтры",
children: I.jsx(J3, {
datePickerProps: e.getInputProps("dateRange"),
groupTableByProps: {
value: e.values.groupTableBy.toString(),
onChange: i => e.setFieldValue("groupTableBy", parseInt(i))
},
clientSelectProps: e.getInputProps("client"),
onClientClear: () => e.setFieldValue("client", null),
baseMarketplaceSelectProps: e.getInputProps("marketplace"),
onBaseMarketplaceClear: () => e.setFieldValue("marketplace", null),
projectSelectProps: e.getInputProps("project"),
boardSelectProps: e.getInputProps("board"),
dealStatusSelectProps: e.getInputProps("dealStatus"),
managerSelectProps: e.getInputProps("manager"),
onManagerClear: () => e.setFieldValue("manager", null),
isCompletedOnlyCheckboxProps: e.getInputProps("isCompletedOnly", {
type: "checkbox"
}),
expenseTagSelectProps: e.getInputProps("expenseTag"),
onExpenseTagClear: () => e.setFieldValue("expenseTag", null),
incomeTagSelectProps: e.getInputProps("incomeTag"),
onIncomeTagClear: () => e.setFieldValue("incomeTag", null)
})
})]
})
}
, eW = () => {
const {table: e, form: t, isLoading: r} = V3();
return I.jsxs($c, {
style: {
flex: 2,
minWidth: "600px",
padding: "25px"
},
children: [I.jsx(Q3, {
form: t
}), I.jsx(Uh, {
visible: r,
children: I.jsx(em, {
table: e
})
})]
})
}
, tW = () => I.jsx(K3, {
children: I.jsxs("div", {
className: jc["page-container"],
children: [I.jsx(G3, {}), I.jsx(eW, {})]
})
})
, rW = () => {
if (tm(n => n.auth.role) !== "admin")
return I.jsx(rm, {
to: "/leads"
});
const t = tu.PROFIT
, r = () => {
switch (t) {
case tu.PROFIT:
return I.jsx(tW, {})
}
}
;
return I.jsx("div", {
className: jc.container,
children: r()
})
}
, iW = nm("/statistics")({
component: rW
});
export {iW as Route};