@swestash/agent-lens 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-lens.js +309 -69
- package/dist/agent-lens.js.map +1 -1
- package/package.json +2 -2
- package/web/404.html +2 -2
- package/web/assets/{AboutView-D0_Xm4fa.js → AboutView-BD9cfwC2.js} +1 -1
- package/web/assets/Dashboard-fakmS_H4.js +69 -0
- package/web/assets/{FileView-CnV33MsU.js → FileView-1MkgxkzO.js} +1 -1
- package/web/assets/{FilesView-DrgUr_wc.js → FilesView-B6_w8jKK.js} +1 -1
- package/web/assets/{SecurityView-1SY1h-hB.js → SecurityView-BX-IzE--.js} +1 -1
- package/web/assets/SessionView-DY5Xm26K.js +15 -0
- package/web/assets/{SkillView-CIPe79vU.js → SkillView-CnOhNPN4.js} +1 -1
- package/web/assets/SkillsView-C76l9UYR.js +1 -0
- package/web/assets/{WorkflowView-BXLb1lp4.js → WorkflowView-Dq9JYCHd.js} +1 -1
- package/web/assets/index-B6dWnwqZ.css +1 -0
- package/web/assets/{index-Xe7pj757.js → index-CcEbkJx7.js} +1 -1
- package/web/assets/index-CvMppG1z.js +69 -0
- package/web/assets/{jsonish-CLYQ4tku.js → jsonish-DMAKObPI.js} +1 -1
- package/web/assets/theme-ByPiBqSS.js +1 -0
- package/web/assets/{useResetOn-CpMZQynn.js → useResetOn-BZWxJ_cM.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/Dashboard-ttxHcQ4v.js +0 -69
- package/web/assets/SessionView-DxxaR5_n.js +0 -15
- package/web/assets/SkillsView-YuBaj_4P.js +0 -1
- package/web/assets/index-BNr_gy9h.css +0 -1
- package/web/assets/index-CNg3TICd.js +0 -69
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import{r as R,j as v,u as l0,f as yt,s as fr,a as Nn,b as Ti,L as C_,c as Ei,g as le,R as P,l as kl,d as M_,e as lh,h as $_,i as I_,k as So,m as Ao,M as N_,S as fh,E as jo,n as D_,o as yn}from"./index-CvMppG1z.js";import{u as ge,K as et,C as Pe}from"./theme-ByPiBqSS.js";const Po=8,R_=26;function q_(){const[e,t]=R.useState(new Set),r=o=>t(s=>{const u=new Set(s);return u.has(o)?u.delete(o):u.add(o),u});return{topN:(o,s)=>e.has(s)?o:o.slice(0,Po),expandHeight:(o,s,u=R_)=>e.has(o)?Math.max(240,s*u):void 0,expandBtn:(o,s)=>{if(!(s<=Po))return v.jsx("button",{type:"button",className:"link-btn",onClick:()=>r(o),children:e.has(o)?`show top ${Po}`:`show all (${s})`})}}}function f0(e,t){var n;const r=((n=e==null?void 0:e.payload)==null?void 0:n[t])??(e==null?void 0:e[t]);return typeof r=="string"&&r!==""?r:null}function L_({active:e,payload:t,versionsByName:r}){var u,c,f,l;const{C:n,tooltipStyle:i}=ge();if(!e||!(t!=null&&t.length))return null;const a=String(((c=(u=t[0])==null?void 0:u.payload)==null?void 0:c.name)??""),o=Number(((l=(f=t[0])==null?void 0:f.payload)==null?void 0:l.n)??0),s=r.get(a)??[];return v.jsxs("div",{style:{...i.contentStyle,padding:"8px 10px",maxWidth:280},children:[v.jsx("div",{style:{color:n.text,fontWeight:600,marginBottom:4},children:a}),v.jsxs("div",{style:{color:n.muted,marginBottom:s.length?6:0},children:[o," firing",o===1?"":"s"," total"]}),s.map(d=>v.jsxs("div",{style:{color:n.text,display:"flex",justifyContent:"space-between",gap:12},children:[v.jsx("span",{style:{color:n.muted},children:d.version_id.slice(0,8)}),v.jsx("span",{children:d.n})]},d.version_id)),s.length>0&&v.jsx("div",{style:{color:n.muted,marginTop:6,fontSize:11},children:"click to open skill →"})]})}function Qf({x:e,y:t,payload:r,onSelect:n,title:i}){return v.jsxs("text",{x:e,y:t,dy:4,textAnchor:"end",className:"axis-link",fontSize:11,onClick:()=>(r==null?void 0:r.value)&&n(r.value),children:[i&&v.jsx("title",{children:i}),r==null?void 0:r.value]})}function B_(){const e=l0(),t=(n,i)=>{i!=null&&i!==""&&e(`/?${n}=${encodeURIComponent(i)}`)};return{drillFilter:t,drillTo:(n,i)=>a=>t(n,f0(a,i))}}const Ir="custom",Ka="all",d0=[{id:Ka,label:"All"},{id:"cost",label:"Cost",kpis:["cost","cost-per-session","total-tokens","token-breakdown","cache-read-ratio","sessions"],charts:["cost-over-time","tokens-over-time","tokens-by-model"]},{id:"reliability",label:"Reliability",kpis:["tool-error-rate","rejection-rate","workflow-runs","turns","turn-duration","session-duration","security"],charts:["tool-errors","error-types","activity"]},{id:"time",label:"Time",kpis:["sessions","total-tokens","cost","turn-duration","session-duration"],charts:["burn-heatmap","weekly-burn","model-latency","review-latency"]},{id:"activity",label:"Activity",kpis:["sessions","projects","turns","session-duration"],charts:["activity","category","complexity","tool-frequency","skill-activation","subagent-fanout"]}];function h0(e){return d0.find(t=>t.id===e)}const To="dashboard.layout",dh="dashboard.charts";function Ui(){return{hidden:[],order:[]}}function p0(){return{kpis:Ui(),charts:Ui()}}function F_(){return{v:1,active:Ka,custom:null,kpisCollapsed:!1}}function Cl(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function hh(e){if(typeof e!="object"||e===null)return Ui();const t=e;return{hidden:Cl(t.hidden),order:Cl(t.order)}}function W_(e){if(typeof e!="object"||e===null)return null;const t=e;return{kpis:hh(t.kpis),charts:hh(t.charts)}}function ph(e,t){if(typeof e!="object"||e===null){const n=Cl(t);if(n.length===0)return F_();const i=p0();return i.charts.hidden=n,{v:1,active:Ir,custom:i,kpisCollapsed:!1}}const r=e;return{v:1,active:typeof r.active=="string"?r.active:Ka,custom:W_(r.custom),kpisCollapsed:r.kpisCollapsed===!0}}function v0(e,t){const r=new Set(e),n=new Set,i=[];for(const a of t)r.has(a)&&!n.has(a)&&(i.push(a),n.add(a));for(const a of e)n.has(a)||i.push(a);return i}function zi(e,t){const r=new Map(e.map(n=>[n.id,n]));return v0(e.map(n=>n.id),t).map(n=>r.get(n))}function vh(e,t){if(!e)return Ui();const r=new Set(e);return{order:[...e],hidden:t.filter(n=>!r.has(n))}}function z_(e,t,r){return{kpis:vh(e.kpis,t),charts:vh(e.charts,r)}}function y0(e){return e.active!==Ir&&h0(e.active)?e.active:e.custom?Ir:Ka}function yh(e,t,r){const n=y0(e);return n!==Ir?z_(h0(n),t,r):e.custom??p0()}function U_(e,t){return{...e,active:Ir,custom:t}}function K_(e,t,r,n){const i=v0(e,t),a=i.indexOf(r),o=a+n;return a<0||o<0||o>=i.length?t:([i[a],i[o]]=[i[o],i[a]],i)}function H_(e,t,r){const n=e.filter(i=>i!==t);return r||n.push(t),n}function G_({s:e}){const t=new Map(e.by_severity.map(a=>[a.severity,a.n])),r=t.get("critical")??0,n=t.get("high")??0,i=e.total===0?"—":`${r} / ${n}`;return v.jsxs(C_,{className:"kpi kpi-btn"+(r>0?" sev-critical":n>0?" sev-high":""),to:"/security",title:"Security findings — critical / high. Opens the Security page.",children:[v.jsx("div",{className:"kpi-label",children:"Security findings"}),v.jsx("div",{className:"kpi-value",children:i}),v.jsx("div",{className:"kpi-sub",children:e.total===0?"no open findings":`critical / high · ${e.total} open in ${e.sessions_flagged} sessions`})]})}function V_({t:e}){const{TOKEN_COLORS:t}=ge(),r=e.input+e.output+e.cache_creation+e.cache_read,n=[{name:"Input",v:e.input,c:t.input},{name:"Output",v:e.output,c:t.output},{name:"Cache write",v:e.cache_creation,c:t.cache_creation},{name:"Cache read",v:e.cache_read,c:t.cache_read}];return v.jsxs("div",{className:"kpi",title:"Token totals by type: input · output · cache-write · cache-read",children:[v.jsx("div",{className:"kpi-label",children:"Token breakdown"}),v.jsx("ul",{className:"kpi-bd",children:n.map(i=>v.jsxs("li",{children:[v.jsx("span",{className:"kpi-bd-dot",style:{background:i.c},"aria-hidden":"true"}),v.jsx("span",{className:"kpi-bd-name",children:i.name}),v.jsx("span",{className:"kpi-bd-val",children:yt(i.v)}),v.jsxs("span",{className:"kpi-bd-pct",children:[r?Math.round(i.v/r*100):0,"%"]})]},i.name))})]})}function mh({overview:e,bd:t}){var a,o;const r=((a=t==null?void 0:t.error_types)==null?void 0:a.failures)??0,n=((o=t==null?void 0:t.error_types)==null?void 0:o.rejections)??0,i=e.tool_calls??0;return{failures:r,rejections:n,toolCalls:i,errRate:i?r/i*100:0,rejRate:i?n/i*100:0}}const ed=[{id:"sessions",label:"Sessions",render:({overview:e})=>v.jsx(et,{label:"Sessions",value:e.sessions_main,sub:`+${e.sessions_subagent.toLocaleString()} subagent runs`})},{id:"projects",label:"Projects",render:({overview:e})=>v.jsx(et,{label:"Projects",value:e.projects,sub:"distinct project paths"})},{id:"turns",label:"Turns",render:({overview:e})=>v.jsx(et,{label:"Turns",value:e.turns,sub:`${e.tool_calls.toLocaleString()} tool calls`})},{id:"tool-error-rate",label:"Tool error rate",render:e=>{const{failures:t,toolCalls:r,errRate:n}=mh(e);return v.jsx(et,{label:"Tool error rate",value:r?n.toFixed(1)+"%":"—",title:"Genuine tool failures as a share of all tool calls (rejections/blocks excluded — see the rejection rate).",sub:`${t.toLocaleString()} failed of ${r.toLocaleString()} calls`})}},{id:"rejection-rate",label:"Rejection rate",render:e=>{const{rejections:t,toolCalls:r,rejRate:n}=mh(e);return v.jsx(et,{label:"Rejection rate",value:r?n.toFixed(1)+"%":"—",title:"User-rejected + guardrail-blocked tool calls as a share of all tool calls. Not agent failures.",sub:`${t.toLocaleString()} rejected/blocked`})}},{id:"workflow-runs",label:"Workflow runs",render:({overview:e})=>v.jsx(et,{label:"Workflow runs",value:e.workflows.total||"—",title:"Async workflow runs in range. Success rate is over decided runs (completed vs failed); in-flight runs are excluded from the rate.",sub:e.workflows.total?`${Math.round(e.workflows.success_rate*100)}% success · ${yt(e.workflows.total_tokens)}`:"no workflow runs"})},{id:"cost",label:"Est. cost",render:({overview:e})=>v.jsx(et,{label:"Est. cost (API-equiv.)",value:Nn(e.cost),title:"Estimated at API list prices for this usage (cache reads/writes included at their discounted cache rates).",sub:e.unpriced_models.length?`⚠ unpriced: ${e.unpriced_models.map(fr).join(", ")}`:"API list price estimate"})},{id:"cost-per-session",label:"Cost / session",render:({overview:e})=>v.jsx(et,{label:"Cost / session",value:e.sessions_main?Nn(e.cost/e.sessions_main):"—",title:"Estimated API-equivalent cost divided by main sessions in range.",sub:"API-equiv. per main session"})},{id:"cache-read-ratio",label:"Cache-read ratio",render:({overview:e})=>v.jsx(et,{label:"Cache-read ratio",value:(e.cache_read_ratio*100).toFixed(1)+"%",sub:"of all tokens are cached replays — excluded from “work”"})},{id:"turn-duration",label:"Turn duration",render:({overview:e})=>v.jsx(et,{label:"Turn duration p50 / p95",value:`${Ti(e.turn_duration_ms.p50)} / ${Ti(e.turn_duration_ms.p95)}`,sub:`${e.turn_duration_ms.count} turns`})},{id:"session-duration",label:"Session duration",render:({overview:e})=>v.jsx(et,{label:"Session duration p50 / p95",value:`${Ti(e.session_duration_ms.p50)} / ${Ti(e.session_duration_ms.p95)}`,title:"End-to-end wall-clock length of main sessions (subagents excluded).",sub:`${e.session_duration_ms.count} sessions`})},{id:"total-tokens",label:"Total tokens",render:({overview:e})=>v.jsx(et,{label:"Total tokens",value:yt(e.total_tokens),sub:`${yt(e.tokens.input+e.tokens.output)} non-cache`})},{id:"token-breakdown",label:"Token breakdown",render:({overview:e})=>v.jsx(V_,{t:e.tokens})},{id:"security",label:"Security findings",render:({security:e})=>e?v.jsx(G_,{s:e}):null}];function X_({ctx:e,layout:t}){const r=new Set(t.hidden);return v.jsx("div",{className:"kpis",children:zi(ed,t.order).filter(n=>!r.has(n.id)).map(n=>v.jsx(R.Fragment,{children:n.render(e)},n.id))})}function m0(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=m0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ee(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=m0(e))&&(n&&(n+=" "),n+=t);return n}var Eo,gh;function He(){if(gh)return Eo;gh=1;var e=Array.isArray;return Eo=e,Eo}var ko,bh;function g0(){if(bh)return ko;bh=1;var e=typeof Ei=="object"&&Ei&&Ei.Object===Object&&Ei;return ko=e,ko}var Co,xh;function St(){if(xh)return Co;xh=1;var e=g0(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Co=r,Co}var Mo,wh;function mi(){if(wh)return Mo;wh=1;var e=St(),t=e.Symbol;return Mo=t,Mo}var $o,_h;function Y_(){if(_h)return $o;_h=1;var e=mi(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=r.call(o,i),u=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(s?o[i]=u:delete o[i]),f}return $o=a,$o}var Io,Oh;function Z_(){if(Oh)return Io;Oh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Io=r,Io}var No,Sh;function Dt(){if(Sh)return No;Sh=1;var e=mi(),t=Y_(),r=Z_(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?t(s):r(s)}return No=o,No}var Do,Ah;function Rt(){if(Ah)return Do;Ah=1;function e(t){return t!=null&&typeof t=="object"}return Do=e,Do}var Ro,jh;function on(){if(jh)return Ro;jh=1;var e=Dt(),t=Rt(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Ro=n,Ro}var qo,Ph;function td(){if(Ph)return qo;Ph=1;var e=He(),t=on(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return qo=i,qo}var Lo,Th;function Ht(){if(Th)return Lo;Th=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Lo=e,Lo}var Bo,Eh;function rd(){if(Eh)return Bo;Eh=1;var e=Dt(),t=Ht(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var u=e(s);return u==n||u==i||u==r||u==a}return Bo=o,Bo}var Fo,kh;function J_(){if(kh)return Fo;kh=1;var e=St(),t=e["__core-js_shared__"];return Fo=t,Fo}var Wo,Ch;function Q_(){if(Ch)return Wo;Ch=1;var e=J_(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Wo=r,Wo}var zo,Mh;function b0(){if(Mh)return zo;Mh=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return zo=r,zo}var Uo,$h;function eO(){if($h)return Uo;$h=1;var e=rd(),t=Q_(),r=Ht(),n=b0(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,f=RegExp("^"+u.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(d){if(!r(d)||t(d))return!1;var h=e(d)?f:a;return h.test(n(d))}return Uo=l,Uo}var Ko,Ih;function tO(){if(Ih)return Ko;Ih=1;function e(t,r){return t==null?void 0:t[r]}return Ko=e,Ko}var Ho,Nh;function mr(){if(Nh)return Ho;Nh=1;var e=eO(),t=tO();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return Ho=r,Ho}var Go,Dh;function Ha(){if(Dh)return Go;Dh=1;var e=mr(),t=e(Object,"create");return Go=t,Go}var Vo,Rh;function rO(){if(Rh)return Vo;Rh=1;var e=Ha();function t(){this.__data__=e?e(null):{},this.size=0}return Vo=t,Vo}var Xo,qh;function nO(){if(qh)return Xo;qh=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Xo=e,Xo}var Yo,Lh;function iO(){if(Lh)return Yo;Lh=1;var e=Ha(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return n.call(o,a)?o[a]:void 0}return Yo=i,Yo}var Zo,Bh;function aO(){if(Bh)return Zo;Bh=1;var e=Ha(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return Zo=n,Zo}var Jo,Fh;function oO(){if(Fh)return Jo;Fh=1;var e=Ha(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return Jo=r,Jo}var Qo,Wh;function sO(){if(Wh)return Qo;Wh=1;var e=rO(),t=nO(),r=iO(),n=aO(),i=oO();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Qo=a,Qo}var es,zh;function uO(){if(zh)return es;zh=1;function e(){this.__data__=[],this.size=0}return es=e,es}var ts,Uh;function nd(){if(Uh)return ts;Uh=1;function e(t,r){return t===r||t!==t&&r!==r}return ts=e,ts}var rs,Kh;function Ga(){if(Kh)return rs;Kh=1;var e=nd();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return rs=t,rs}var ns,Hh;function cO(){if(Hh)return ns;Hh=1;var e=Ga(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return ns=n,ns}var is,Gh;function lO(){if(Gh)return is;Gh=1;var e=Ga();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return is=t,is}var as,Vh;function fO(){if(Vh)return as;Vh=1;var e=Ga();function t(r){return e(this.__data__,r)>-1}return as=t,as}var os,Xh;function dO(){if(Xh)return os;Xh=1;var e=Ga();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return os=t,os}var ss,Yh;function Va(){if(Yh)return ss;Yh=1;var e=uO(),t=cO(),r=lO(),n=fO(),i=dO();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ss=a,ss}var us,Zh;function id(){if(Zh)return us;Zh=1;var e=mr(),t=St(),r=e(t,"Map");return us=r,us}var cs,Jh;function hO(){if(Jh)return cs;Jh=1;var e=sO(),t=Va(),r=id();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return cs=n,cs}var ls,Qh;function pO(){if(Qh)return ls;Qh=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return ls=e,ls}var fs,ep;function Xa(){if(ep)return fs;ep=1;var e=pO();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return fs=t,fs}var ds,tp;function vO(){if(tp)return ds;tp=1;var e=Xa();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return ds=t,ds}var hs,rp;function yO(){if(rp)return hs;rp=1;var e=Xa();function t(r){return e(this,r).get(r)}return hs=t,hs}var ps,np;function mO(){if(np)return ps;np=1;var e=Xa();function t(r){return e(this,r).has(r)}return ps=t,ps}var vs,ip;function gO(){if(ip)return vs;ip=1;var e=Xa();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return vs=t,vs}var ys,ap;function ad(){if(ap)return ys;ap=1;var e=hO(),t=vO(),r=yO(),n=mO(),i=gO();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ys=a,ys}var ms,op;function x0(){if(op)return ms;op=1;var e=ad(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],u=a.cache;if(u.has(s))return u.get(s);var c=n.apply(this,o);return a.cache=u.set(s,c)||u,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,ms=r,ms}var gs,sp;function bO(){if(sp)return gs;sp=1;var e=x0(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return gs=r,gs}var bs,up;function xO(){if(up)return bs;up=1;var e=bO(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,s,u,c){a.push(u?c.replace(r,"$1"):s||o)}),a});return bs=n,bs}var xs,cp;function od(){if(cp)return xs;cp=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return xs=e,xs}var ws,lp;function wO(){if(lp)return ws;lp=1;var e=mi(),t=od(),r=He(),n=on(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return t(s,o)+"";if(n(s))return a?a.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return ws=o,ws}var _s,fp;function w0(){if(fp)return _s;fp=1;var e=wO();function t(r){return r==null?"":e(r)}return _s=t,_s}var Os,dp;function _0(){if(dp)return Os;dp=1;var e=He(),t=td(),r=xO(),n=w0();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return Os=i,Os}var Ss,hp;function Ya(){if(hp)return Ss;hp=1;var e=on();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Ss=t,Ss}var As,pp;function sd(){if(pp)return As;pp=1;var e=_0(),t=Ya();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return As=r,As}var js,vp;function O0(){if(vp)return js;vp=1;var e=sd();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return js=t,js}var _O=O0();const at=le(_O);var Ps,yp;function OO(){if(yp)return Ps;yp=1;function e(t){return t==null}return Ps=e,Ps}var SO=OO();const Q=le(SO);var Ts,mp;function AO(){if(mp)return Ts;mp=1;var e=Dt(),t=He(),r=Rt(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return Ts=i,Ts}var jO=AO();const dr=le(jO);var PO=rd();const X=le(PO);var TO=Ht();const sn=le(TO);var Es={exports:{}},ne={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-is.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var gp;function EO(){if(gp)return ne;gp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function y(p){if(typeof p=="object"&&p!==null){var x=p.$$typeof;switch(x){case e:switch(p=p.type,p){case r:case i:case n:case c:case f:return p;default:switch(p=p&&p.$$typeof,p){case s:case o:case u:case d:case l:case a:return p;default:return x}}case t:return x}}}return ne.ContextConsumer=o,ne.ContextProvider=a,ne.Element=e,ne.ForwardRef=u,ne.Fragment=r,ne.Lazy=d,ne.Memo=l,ne.Portal=t,ne.Profiler=i,ne.StrictMode=n,ne.Suspense=c,ne.SuspenseList=f,ne.isAsyncMode=function(){return!1},ne.isConcurrentMode=function(){return!1},ne.isContextConsumer=function(p){return y(p)===o},ne.isContextProvider=function(p){return y(p)===a},ne.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ne.isForwardRef=function(p){return y(p)===u},ne.isFragment=function(p){return y(p)===r},ne.isLazy=function(p){return y(p)===d},ne.isMemo=function(p){return y(p)===l},ne.isPortal=function(p){return y(p)===t},ne.isProfiler=function(p){return y(p)===i},ne.isStrictMode=function(p){return y(p)===n},ne.isSuspense=function(p){return y(p)===c},ne.isSuspenseList=function(p){return y(p)===f},ne.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===i||p===n||p===c||p===f||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===l||p.$$typeof===a||p.$$typeof===o||p.$$typeof===u||p.$$typeof===m||p.getModuleId!==void 0)},ne.typeOf=y,ne}var bp;function kO(){return bp||(bp=1,Es.exports=EO()),Es.exports}var CO=kO(),ks,xp;function S0(){if(xp)return ks;xp=1;var e=Dt(),t=Rt(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return ks=n,ks}var Cs,wp;function MO(){if(wp)return Cs;wp=1;var e=S0();function t(r){return e(r)&&r!=+r}return Cs=t,Cs}var $O=MO();const un=le($O);var IO=S0();const NO=le(IO);var vt=function(t){return t===0?0:t>0?1:-1},ir=function(t){return dr(t)&&t.indexOf("%")===t.length-1},B=function(t){return NO(t)&&!un(t)},DO=function(t){return Q(t)},je=function(t){return B(t)||dr(t)},RO=0,cn=function(t){var r=++RO;return"".concat(t||"").concat(r)},hr=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(!B(t)&&!dr(t))return n;var a;if(ir(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return un(a)&&(a=n),i&&a>r&&(a=r),a},Wt=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},qO=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},$e=function(t,r){return B(t)&&B(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ki(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):at(n,t))===r})}var LO=function(t,r){return B(t)&&B(r)?t-r:dr(t)&&dr(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function kr(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 Ml(e){"@babel/helpers - typeof";return Ml=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},Ml(e)}var BO=["viewBox","children"],FO=["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"],_p=["points","pathLength"],Ms={svg:BO,polygon:_p,polyline:_p},ud=["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"],Hi=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(R.isValidElement(t)&&(n=t.props),!sn(n))return null;var i={};return Object.keys(n).forEach(function(a){ud.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},WO=function(t,r,n){return function(i){return t(r,n,i),null}},Gi=function(t,r,n){if(!sn(t)||Ml(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];ud.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=WO(o,r,n))}),i},zO=["children"],UO=["children"];function Op(e,t){if(e==null)return{};var r=KO(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 KO(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 $l(e){"@babel/helpers - typeof";return $l=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},$l(e)}var Sp={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Et=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Ap=null,$s=null,cd=function e(t){if(t===Ap&&Array.isArray($s))return $s;var r=[];return R.Children.forEach(t,function(n){Q(n)||(CO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),$s=r,Ap=t,r};function ot(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Et(i)}):n=[Et(t)],cd(e).forEach(function(i){var a=at(i,"type.displayName")||at(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Ze(e,t){var r=ot(e,t);return r&&r[0]}var jp=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!B(n)||n<=0||!B(i)||i<=0)},HO=["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"],GO=function(t){return t&&t.type&&dr(t.type)&&HO.indexOf(t.type)>=0},A0=function(t){return t&&$l(t)==="object"&&"clipDot"in t},VO=function(t,r,n,i){var a,o=(a=Ms==null?void 0:Ms[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!X(t)&&(i&&o.includes(r)||FO.includes(r))||n&&ud.includes(r)},Z=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(R.isValidElement(t)&&(i=t.props),!sn(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;VO((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},Il=function e(t,r){if(t===r)return!0;var n=R.Children.count(t);if(n!==R.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Pp(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(!Pp(a,o))return!1}return!0},Pp=function(t,r){if(Q(t)&&Q(r))return!0;if(!Q(t)&&!Q(r)){var n=t.props||{},i=n.children,a=Op(n,zO),o=r.props||{},s=o.children,u=Op(o,UO);return i&&s?kr(a,u)&&Il(i,s):!i&&!s?kr(a,u):!1}return!1},Tp=function(t,r){var n=[],i={};return cd(t).forEach(function(a,o){if(GO(a))n.push(a);else if(a){var s=Et(a.type),u=r[s]||{},c=u.handler,f=u.once;if(c&&(!f||!i[s])){var l=c(a,s,o);n.push(l),i[s]=!0}}}),n},XO=function(t){var r=t&&t.type;return r&&Sp[r]?Sp[r]:null},YO=function(t,r){return cd(r).indexOf(t)},ZO=["children","width","height","viewBox","className","style","title","desc"];function Nl(){return Nl=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},Nl.apply(this,arguments)}function JO(e,t){if(e==null)return{};var r=QO(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 QO(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 Dl(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,u=e.desc,c=JO(e,ZO),f=i||{width:r,height:n,x:0,y:0},l=ee("recharts-surface",a);return P.createElement("svg",Nl({},Z(c,!0,"svg"),{className:l,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),P.createElement("title",null,s),P.createElement("desc",null,u),t)}var e1=["children","className"];function Rl(){return Rl=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},Rl.apply(this,arguments)}function t1(e,t){if(e==null)return{};var r=r1(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 r1(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 ce=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=t1(e,e1),a=ee("recharts-layer",n);return P.createElement("g",Rl({className:a},Z(i,!0),{ref:t}),r)}),kt=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]},Is,Ep;function n1(){if(Ep)return Is;Ep=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return Is=e,Is}var Ns,kp;function i1(){if(kp)return Ns;kp=1;var e=n1();function t(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:e(r,n,i)}return Ns=t,Ns}var Ds,Cp;function j0(){if(Cp)return Ds;Cp=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function u(c){return s.test(c)}return Ds=u,Ds}var Rs,Mp;function a1(){if(Mp)return Rs;Mp=1;function e(t){return t.split("")}return Rs=e,Rs}var qs,$p;function o1(){if($p)return qs;$p=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+u+")",f="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",m=c+"?",y="["+a+"]?",p="(?:"+h+"(?:"+[f,l,d].join("|")+")"+y+m+")*",x=y+m+p,w="(?:"+[f+s+"?",s,l,d,o].join("|")+")",O=RegExp(u+"(?="+u+")|"+w+x,"g");function _(g){return g.match(O)||[]}return qs=_,qs}var Ls,Ip;function s1(){if(Ip)return Ls;Ip=1;var e=a1(),t=j0(),r=o1();function n(i){return t(i)?r(i):e(i)}return Ls=n,Ls}var Bs,Np;function u1(){if(Np)return Bs;Np=1;var e=i1(),t=j0(),r=s1(),n=w0();function i(a){return function(o){o=n(o);var s=t(o)?r(o):void 0,u=s?s[0]:o.charAt(0),c=s?e(s,1).join(""):o.slice(1);return u[a]()+c}}return Bs=i,Bs}var Fs,Dp;function c1(){if(Dp)return Fs;Dp=1;var e=u1(),t=e("toUpperCase");return Fs=t,Fs}var l1=c1();const Za=le(l1);function ue(e){return function(){return e}}const P0=Math.cos,Vi=Math.sin,mt=Math.sqrt,Xi=Math.PI,Ja=2*Xi,ql=Math.PI,Ll=2*ql,rr=1e-6,f1=Ll-rr;function T0(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function d1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return T0;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 h1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?T0:d1(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,s=this._y1,u=n-t,c=i-r,f=o-t,l=s-r,d=f*f+l*l;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>rr)if(!(Math.abs(l*u-c*f)>rr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=i-s,y=u*u+c*c,p=h*h+m*m,x=Math.sqrt(y),w=Math.sqrt(d),O=a*Math.tan((ql-Math.acos((y+d-p)/(2*x*w)))/2),_=O/w,g=O/x;Math.abs(_-1)>rr&&this._append`L${t+_*f},${r+_*l}`,this._append`A${a},${a},0,0,${+(l*h>f*m)},${this._x1=t+g*u},${this._y1=r+g*c}`}}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 s=n*Math.cos(i),u=n*Math.sin(i),c=t+s,f=r+u,l=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>rr||Math.abs(this._y1-f)>rr)&&this._append`L${c},${f}`,n&&(d<0&&(d=d%Ll+Ll),d>f1?this._append`A${n},${n},0,1,${l},${t-s},${r-u}A${n},${n},0,1,${l},${this._x1=c},${this._y1=f}`:d>rr&&this._append`A${n},${n},0,${+(d>=ql)},${l},${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 ld(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 h1(t)}function fd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E0(e){this._context=e}E0.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 Qa(e){return new E0(e)}function k0(e){return e[0]}function C0(e){return e[1]}function M0(e,t){var r=ue(!0),n=null,i=Qa,a=null,o=ld(s);e=typeof e=="function"?e:e===void 0?k0:ue(e),t=typeof t=="function"?t:t===void 0?C0:ue(t);function s(u){var c,f=(u=fd(u)).length,l,d=!1,h;for(n==null&&(a=i(h=o())),c=0;c<=f;++c)!(c<f&&r(l=u[c],c,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(l,c,u),+t(l,c,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:ue(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:ue(+u),s):t},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:ue(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function ki(e,t,r){var n=null,i=ue(!0),a=null,o=Qa,s=null,u=ld(c);e=typeof e=="function"?e:e===void 0?k0:ue(+e),t=typeof t=="function"?t:ue(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?C0:ue(+r);function c(l){var d,h,m,y=(l=fd(l)).length,p,x=!1,w,O=new Array(y),_=new Array(y);for(a==null&&(s=o(w=u())),d=0;d<=y;++d){if(!(d<y&&i(p=l[d],d,l))===x)if(x=!x)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(O[m],_[m]);s.lineEnd(),s.areaEnd()}x&&(O[d]=+e(p,d,l),_[d]=+t(p,d,l),s.point(n?+n(p,d,l):O[d],r?+r(p,d,l):_[d]))}if(w)return s=null,w+""||null}function f(){return M0().defined(i).curve(o).context(a)}return c.x=function(l){return arguments.length?(e=typeof l=="function"?l:ue(+l),n=null,c):e},c.x0=function(l){return arguments.length?(e=typeof l=="function"?l:ue(+l),c):e},c.x1=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:ue(+l),c):n},c.y=function(l){return arguments.length?(t=typeof l=="function"?l:ue(+l),r=null,c):t},c.y0=function(l){return arguments.length?(t=typeof l=="function"?l:ue(+l),c):t},c.y1=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ue(+l),c):r},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(r)},c.lineX1=function(){return f().x(n).y(t)},c.defined=function(l){return arguments.length?(i=typeof l=="function"?l:ue(!!l),c):i},c.curve=function(l){return arguments.length?(o=l,a!=null&&(s=o(a)),c):o},c.context=function(l){return arguments.length?(l==null?a=s=null:s=o(a=l),c):a},c}class $0{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 p1(e){return new $0(e,!0)}function v1(e){return new $0(e,!1)}const dd={draw(e,t){const r=mt(t/Xi);e.moveTo(r,0),e.arc(0,0,r,0,Ja)}},y1={draw(e,t){const r=mt(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()}},I0=mt(1/3),m1=I0*2,g1={draw(e,t){const r=mt(t/m1),n=r*I0;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},b1={draw(e,t){const r=mt(t),n=-r/2;e.rect(n,n,r,r)}},x1=.8908130915292852,N0=Vi(Xi/10)/Vi(7*Xi/10),w1=Vi(Ja/10)*N0,_1=-P0(Ja/10)*N0,O1={draw(e,t){const r=mt(t*x1),n=w1*r,i=_1*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ja*a/5,s=P0(o),u=Vi(o);e.lineTo(u*r,-s*r),e.lineTo(s*n-u*i,u*n+s*i)}e.closePath()}},Ws=mt(3),S1={draw(e,t){const r=-mt(t/(Ws*3));e.moveTo(0,r*2),e.lineTo(-Ws*r,-r),e.lineTo(Ws*r,-r),e.closePath()}},tt=-.5,rt=mt(3)/2,Bl=1/mt(12),A1=(Bl/2+1)*3,j1={draw(e,t){const r=mt(t/A1),n=r/2,i=r*Bl,a=n,o=r*Bl+r,s=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,u),e.lineTo(tt*n-rt*i,rt*n+tt*i),e.lineTo(tt*a-rt*o,rt*a+tt*o),e.lineTo(tt*s-rt*u,rt*s+tt*u),e.lineTo(tt*n+rt*i,tt*i-rt*n),e.lineTo(tt*a+rt*o,tt*o-rt*a),e.lineTo(tt*s+rt*u,tt*u-rt*s),e.closePath()}};function P1(e,t){let r=null,n=ld(i);e=typeof e=="function"?e:ue(e||dd),t=typeof t=="function"?t:ue(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:ue(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:ue(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Yi(){}function Zi(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 D0(e){this._context=e}D0.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:Zi(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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function T1(e){return new D0(e)}function R0(e){this._context=e}R0.prototype={areaStart:Yi,areaEnd:Yi,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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function E1(e){return new R0(e)}function q0(e){this._context=e}q0.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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function k1(e){return new q0(e)}function L0(e){this._context=e}L0.prototype={areaStart:Yi,areaEnd:Yi,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 C1(e){return new L0(e)}function Rp(e){return e<0?-1:1}function qp(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),s=(a*i+o*n)/(n+i);return(Rp(a)+Rp(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Lp(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zs(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Ji(e){this._context=e}Ji.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:zs(this,this._t0,Lp(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,zs(this,Lp(this,r=qp(this,e,t)),r);break;default:zs(this,this._t0,r=qp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function B0(e){this._context=new F0(e)}(B0.prototype=Object.create(Ji.prototype)).point=function(e,t){Ji.prototype.point.call(this,t,e)};function F0(e){this._context=e}F0.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 M1(e){return new Ji(e)}function $1(e){return new B0(e)}function W0(e){this._context=e}W0.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=Bp(e),i=Bp(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 Bp(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 I1(e){return new W0(e)}function eo(e,t){this._context=e,this._t=t}eo.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 N1(e){return new eo(e,.5)}function D1(e){return new eo(e,0)}function R1(e){return new eo(e,1)}function Nr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Fl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function q1(e,t){return e[t]}function L1(e){const t=[];return t.key=e,t}function B1(){var e=ue([]),t=Fl,r=Nr,n=q1;function i(a){var o=Array.from(e.apply(this,arguments),L1),s,u=o.length,c=-1,f;for(const l of a)for(s=0,++c;s<u;++s)(o[s][c]=[0,+n(l,o[s].key,c,a)]).data=l;for(s=0,f=fd(t(o));s<u;++s)o[f[s]].index=s;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ue(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ue(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Fl:typeof a=="function"?a:ue(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Nr,i):r},i}function F1(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}Nr(e,t)}}function W1(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,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}Nr(e,t)}}function z1(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 s=0,u=0,c=0;s<o;++s){for(var f=e[t[s]],l=f[n][1]||0,d=f[n-1][1]||0,h=(l-d)/2,m=0;m<s;++m){var y=e[t[m]],p=y[n][1]||0,x=y[n-1][1]||0;h+=p-x}u+=l,c+=h*l}i[n-1][1]+=i[n-1][0]=r,u&&(r-=c/u)}i[n-1][1]+=i[n-1][0]=r,Nr(e,t)}}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)}var U1=["type","size","sizeType"];function Wl(){return Wl=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},Wl.apply(this,arguments)}function Fp(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 Wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(r),!0).forEach(function(n){K1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K1(e,t,r){return t=H1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H1(e){var t=G1(e,"string");return Dn(t)=="symbol"?t:t+""}function G1(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(t==="string"?String:Number)(e)}function V1(e,t){if(e==null)return{};var r=X1(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 X1(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 z0={symbolCircle:dd,symbolCross:y1,symbolDiamond:g1,symbolSquare:b1,symbolStar:O1,symbolTriangle:S1,symbolWye:j1},Y1=Math.PI/180,Z1=function(t){var r="symbol".concat(Za(t));return z0[r]||dd},J1=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*Y1;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}},Q1=function(t,r){z0["symbol".concat(Za(t))]=r},hd=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,u=V1(t,U1),c=Wp(Wp({},u),{},{type:n,size:a,sizeType:s}),f=function(){var p=Z1(n),x=P1().type(p).size(J1(a,s,n));return x()},l=c.className,d=c.cx,h=c.cy,m=Z(c,!0);return d===+d&&h===+h&&a===+a?P.createElement("path",Wl({},m,{className:ee("recharts-symbols",l),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};hd.registerSymbol=Q1;function Dr(e){"@babel/helpers - typeof";return Dr=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},Dr(e)}function zl(){return zl=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},zl.apply(this,arguments)}function zp(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 eS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zp(Object(r),!0).forEach(function(n){Rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rS(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,K0(n.key),n)}}function nS(e,t,r){return t&&rS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iS(e,t,r){return t=Qi(t),aS(e,U0()?Reflect.construct(t,r||[],Qi(e).constructor):t.apply(e,r))}function aS(e,t){if(t&&(Dr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oS(e)}function oS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U0=function(){return!!e})()}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qi(e)}function sS(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&&Ul(e,t)}function Ul(e,t){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ul(e,t)}function Rn(e,t,r){return t=K0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K0(e){var t=uS(e,"string");return Dr(t)=="symbol"?t:t+""}function uS(e,t){if(Dr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nt=32,pd=(function(e){function t(){return tS(this,t),iS(this,t,arguments)}return sS(t,e),nS(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=nt/2,o=nt/6,s=nt/3,u=n.inactive?i:n.color;if(n.type==="plainline")return P.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:nt,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return P.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(s,`
|
|
10
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
|
|
11
|
+
H`).concat(nt,"M").concat(2*s,",").concat(a,`
|
|
12
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return P.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(nt/8,"h").concat(nt,"v").concat(nt*3/4,"h").concat(-nt,"z"),className:"recharts-legend-icon"});if(P.isValidElement(n.legendIcon)){var c=eS({},n);return delete c.legendIcon,P.cloneElement(n.legendIcon,c)}return P.createElement(hd,{fill:u,cx:a,cy:a,size:nt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,u=i.formatter,c=i.inactiveColor,f={x:0,y:0,width:nt,height:nt},l={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,m){var y=h.formatter||u,p=ee(Rn(Rn({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",h.inactive));if(h.type==="none")return null;var x=X(h.value)?null:h.value;kt(!X(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?c:h.color;return P.createElement("li",zl({className:p,style:l,key:"legend-item-".concat(m)},Gi(n.props,h,m)),P.createElement(Dl,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},y?y(x,h,m):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return P.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])})(R.PureComponent);Rn(pd,"displayName","Legend");Rn(pd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Us,Up;function cS(){if(Up)return Us;Up=1;var e=Va();function t(){this.__data__=new e,this.size=0}return Us=t,Us}var Ks,Kp;function lS(){if(Kp)return Ks;Kp=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Ks=e,Ks}var Hs,Hp;function fS(){if(Hp)return Hs;Hp=1;function e(t){return this.__data__.get(t)}return Hs=e,Hs}var Gs,Gp;function dS(){if(Gp)return Gs;Gp=1;function e(t){return this.__data__.has(t)}return Gs=e,Gs}var Vs,Vp;function hS(){if(Vp)return Vs;Vp=1;var e=Va(),t=id(),r=ad(),n=200;function i(a,o){var s=this.__data__;if(s instanceof e){var u=s.__data__;if(!t||u.length<n-1)return u.push([a,o]),this.size=++s.size,this;s=this.__data__=new r(u)}return s.set(a,o),this.size=s.size,this}return Vs=i,Vs}var Xs,Xp;function H0(){if(Xp)return Xs;Xp=1;var e=Va(),t=cS(),r=lS(),n=fS(),i=dS(),a=hS();function o(s){var u=this.__data__=new e(s);this.size=u.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,Xs=o,Xs}var Ys,Yp;function pS(){if(Yp)return Ys;Yp=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Ys=t,Ys}var Zs,Zp;function vS(){if(Zp)return Zs;Zp=1;function e(t){return this.__data__.has(t)}return Zs=e,Zs}var Js,Jp;function G0(){if(Jp)return Js;Jp=1;var e=ad(),t=pS(),r=vS();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Js=n,Js}var Qs,Qp;function V0(){if(Qp)return Qs;Qp=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return Qs=e,Qs}var eu,ev;function X0(){if(ev)return eu;ev=1;function e(t,r){return t.has(r)}return eu=e,eu}var tu,tv;function Y0(){if(tv)return tu;tv=1;var e=G0(),t=V0(),r=X0(),n=1,i=2;function a(o,s,u,c,f,l){var d=u&n,h=o.length,m=s.length;if(h!=m&&!(d&&m>h))return!1;var y=l.get(o),p=l.get(s);if(y&&p)return y==s&&p==o;var x=-1,w=!0,O=u&i?new e:void 0;for(l.set(o,s),l.set(s,o);++x<h;){var _=o[x],g=s[x];if(c)var b=d?c(g,_,x,s,o,l):c(_,g,x,o,s,l);if(b!==void 0){if(b)continue;w=!1;break}if(O){if(!t(s,function(S,A){if(!r(O,A)&&(_===S||f(_,S,u,c,l)))return O.push(A)})){w=!1;break}}else if(!(_===g||f(_,g,u,c,l))){w=!1;break}}return l.delete(o),l.delete(s),w}return tu=a,tu}var ru,rv;function yS(){if(rv)return ru;rv=1;var e=St(),t=e.Uint8Array;return ru=t,ru}var nu,nv;function mS(){if(nv)return nu;nv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return nu=e,nu}var iu,iv;function vd(){if(iv)return iu;iv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return iu=e,iu}var au,av;function gS(){if(av)return au;av=1;var e=mi(),t=yS(),r=nd(),n=Y0(),i=mS(),a=vd(),o=1,s=2,u="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Map]",d="[object Number]",h="[object RegExp]",m="[object Set]",y="[object String]",p="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",O=e?e.prototype:void 0,_=O?O.valueOf:void 0;function g(b,S,A,j,k,E,T){switch(A){case w:if(b.byteLength!=S.byteLength||b.byteOffset!=S.byteOffset)return!1;b=b.buffer,S=S.buffer;case x:return!(b.byteLength!=S.byteLength||!E(new t(b),new t(S)));case u:case c:case d:return r(+b,+S);case f:return b.name==S.name&&b.message==S.message;case h:case y:return b==S+"";case l:var C=i;case m:var $=j&o;if(C||(C=a),b.size!=S.size&&!$)return!1;var M=T.get(b);if(M)return M==S;j|=s,T.set(b,S);var N=n(C(b),C(S),j,k,E,T);return T.delete(b),N;case p:if(_)return _.call(b)==_.call(S)}return!1}return au=g,au}var ou,ov;function Z0(){if(ov)return ou;ov=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return ou=e,ou}var su,sv;function bS(){if(sv)return su;sv=1;var e=Z0(),t=He();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return su=r,su}var uu,uv;function xS(){if(uv)return uu;uv=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var s=t[n];r(s,n,t)&&(o[a++]=s)}return o}return uu=e,uu}var cu,cv;function wS(){if(cv)return cu;cv=1;function e(){return[]}return cu=e,cu}var lu,lv;function _S(){if(lv)return lu;lv=1;var e=xS(),t=wS(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return n.call(o,s)}))}:t;return lu=a,lu}var fu,fv;function OS(){if(fv)return fu;fv=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return fu=e,fu}var du,dv;function SS(){if(dv)return du;dv=1;var e=Dt(),t=Rt(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return du=n,du}var hu,hv;function yd(){if(hv)return hu;hv=1;var e=SS(),t=Rt(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return hu=a,hu}var jn={exports:{}},pu,pv;function AS(){if(pv)return pu;pv=1;function e(){return!1}return pu=e,pu}jn.exports;var vv;function J0(){return vv||(vv=1,(function(e,t){var r=St(),n=AS(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||n;e.exports=c})(jn,jn.exports)),jn.exports}var vu,yv;function md(){if(yv)return vu;yv=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return vu=r,vu}var yu,mv;function gd(){if(mv)return yu;mv=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return yu=t,yu}var mu,gv;function jS(){if(gv)return mu;gv=1;var e=Dt(),t=gd(),r=Rt(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",c="[object Map]",f="[object Number]",l="[object Object]",d="[object RegExp]",h="[object Set]",m="[object String]",y="[object WeakMap]",p="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",_="[object Int8Array]",g="[object Int16Array]",b="[object Int32Array]",S="[object Uint8Array]",A="[object Uint8ClampedArray]",j="[object Uint16Array]",k="[object Uint32Array]",E={};E[w]=E[O]=E[_]=E[g]=E[b]=E[S]=E[A]=E[j]=E[k]=!0,E[n]=E[i]=E[p]=E[a]=E[x]=E[o]=E[s]=E[u]=E[c]=E[f]=E[l]=E[d]=E[h]=E[m]=E[y]=!1;function T(C){return r(C)&&t(C.length)&&!!E[e(C)]}return mu=T,mu}var gu,bv;function Q0(){if(bv)return gu;bv=1;function e(t){return function(r){return t(r)}}return gu=e,gu}var Pn={exports:{}};Pn.exports;var xv;function PS(){return xv||(xv=1,(function(e,t){var r=g0(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})(Pn,Pn.exports)),Pn.exports}var bu,wv;function ex(){if(wv)return bu;wv=1;var e=jS(),t=Q0(),r=PS(),n=r&&r.isTypedArray,i=n?t(n):e;return bu=i,bu}var xu,_v;function TS(){if(_v)return xu;_v=1;var e=OS(),t=yd(),r=He(),n=J0(),i=md(),a=ex(),o=Object.prototype,s=o.hasOwnProperty;function u(c,f){var l=r(c),d=!l&&t(c),h=!l&&!d&&n(c),m=!l&&!d&&!h&&a(c),y=l||d||h||m,p=y?e(c.length,String):[],x=p.length;for(var w in c)(f||s.call(c,w))&&!(y&&(w=="length"||h&&(w=="offset"||w=="parent")||m&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,x)))&&p.push(w);return p}return xu=u,xu}var wu,Ov;function ES(){if(Ov)return wu;Ov=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return wu=t,wu}var _u,Sv;function tx(){if(Sv)return _u;Sv=1;function e(t,r){return function(n){return t(r(n))}}return _u=e,_u}var Ou,Av;function kS(){if(Av)return Ou;Av=1;var e=tx(),t=e(Object.keys,Object);return Ou=t,Ou}var Su,jv;function CS(){if(jv)return Su;jv=1;var e=ES(),t=kS(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return Su=i,Su}var Au,Pv;function gi(){if(Pv)return Au;Pv=1;var e=rd(),t=gd();function r(n){return n!=null&&t(n.length)&&!e(n)}return Au=r,Au}var ju,Tv;function to(){if(Tv)return ju;Tv=1;var e=TS(),t=CS(),r=gi();function n(i){return r(i)?e(i):t(i)}return ju=n,ju}var Pu,Ev;function MS(){if(Ev)return Pu;Ev=1;var e=bS(),t=_S(),r=to();function n(i){return e(i,r,t)}return Pu=n,Pu}var Tu,kv;function $S(){if(kv)return Tu;kv=1;var e=MS(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s,u,c,f){var l=s&t,d=e(a),h=d.length,m=e(o),y=m.length;if(h!=y&&!l)return!1;for(var p=h;p--;){var x=d[p];if(!(l?x in o:n.call(o,x)))return!1}var w=f.get(a),O=f.get(o);if(w&&O)return w==o&&O==a;var _=!0;f.set(a,o),f.set(o,a);for(var g=l;++p<h;){x=d[p];var b=a[x],S=o[x];if(u)var A=l?u(S,b,x,o,a,f):u(b,S,x,a,o,f);if(!(A===void 0?b===S||c(b,S,s,u,f):A)){_=!1;break}g||(g=x=="constructor")}if(_&&!g){var j=a.constructor,k=o.constructor;j!=k&&"constructor"in a&&"constructor"in o&&!(typeof j=="function"&&j instanceof j&&typeof k=="function"&&k instanceof k)&&(_=!1)}return f.delete(a),f.delete(o),_}return Tu=i,Tu}var Eu,Cv;function IS(){if(Cv)return Eu;Cv=1;var e=mr(),t=St(),r=e(t,"DataView");return Eu=r,Eu}var ku,Mv;function NS(){if(Mv)return ku;Mv=1;var e=mr(),t=St(),r=e(t,"Promise");return ku=r,ku}var Cu,$v;function rx(){if($v)return Cu;$v=1;var e=mr(),t=St(),r=e(t,"Set");return Cu=r,Cu}var Mu,Iv;function DS(){if(Iv)return Mu;Iv=1;var e=mr(),t=St(),r=e(t,"WeakMap");return Mu=r,Mu}var $u,Nv;function RS(){if(Nv)return $u;Nv=1;var e=IS(),t=id(),r=NS(),n=rx(),i=DS(),a=Dt(),o=b0(),s="[object Map]",u="[object Object]",c="[object Promise]",f="[object Set]",l="[object WeakMap]",d="[object DataView]",h=o(e),m=o(t),y=o(r),p=o(n),x=o(i),w=a;return(e&&w(new e(new ArrayBuffer(1)))!=d||t&&w(new t)!=s||r&&w(r.resolve())!=c||n&&w(new n)!=f||i&&w(new i)!=l)&&(w=function(O){var _=a(O),g=_==u?O.constructor:void 0,b=g?o(g):"";if(b)switch(b){case h:return d;case m:return s;case y:return c;case p:return f;case x:return l}return _}),$u=w,$u}var Iu,Dv;function qS(){if(Dv)return Iu;Dv=1;var e=H0(),t=Y0(),r=gS(),n=$S(),i=RS(),a=He(),o=J0(),s=ex(),u=1,c="[object Arguments]",f="[object Array]",l="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function m(y,p,x,w,O,_){var g=a(y),b=a(p),S=g?f:i(y),A=b?f:i(p);S=S==c?l:S,A=A==c?l:A;var j=S==l,k=A==l,E=S==A;if(E&&o(y)){if(!o(p))return!1;g=!0,j=!1}if(E&&!j)return _||(_=new e),g||s(y)?t(y,p,x,w,O,_):r(y,p,S,x,w,O,_);if(!(x&u)){var T=j&&h.call(y,"__wrapped__"),C=k&&h.call(p,"__wrapped__");if(T||C){var $=T?y.value():y,M=C?p.value():p;return _||(_=new e),O($,M,x,w,_)}}return E?(_||(_=new e),n(y,p,x,w,O,_)):!1}return Iu=m,Iu}var Nu,Rv;function bd(){if(Rv)return Nu;Rv=1;var e=qS(),t=Rt();function r(n,i,a,o,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,s)}return Nu=r,Nu}var Du,qv;function LS(){if(qv)return Du;qv=1;var e=H0(),t=bd(),r=1,n=2;function i(a,o,s,u){var c=s.length,f=c,l=!u;if(a==null)return!f;for(a=Object(a);c--;){var d=s[c];if(l&&d[2]?d[1]!==a[d[0]]:!(d[0]in a))return!1}for(;++c<f;){d=s[c];var h=d[0],m=a[h],y=d[1];if(l&&d[2]){if(m===void 0&&!(h in a))return!1}else{var p=new e;if(u)var x=u(m,y,h,a,o,p);if(!(x===void 0?t(y,m,r|n,u,p):x))return!1}}return!0}return Du=i,Du}var Ru,Lv;function nx(){if(Lv)return Ru;Lv=1;var e=Ht();function t(r){return r===r&&!e(r)}return Ru=t,Ru}var qu,Bv;function BS(){if(Bv)return qu;Bv=1;var e=nx(),t=to();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],s=n[o];i[a]=[o,s,e(s)]}return i}return qu=r,qu}var Lu,Fv;function ix(){if(Fv)return Lu;Fv=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Lu=e,Lu}var Bu,Wv;function FS(){if(Wv)return Bu;Wv=1;var e=LS(),t=BS(),r=ix();function n(i){var a=t(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return Bu=n,Bu}var Fu,zv;function WS(){if(zv)return Fu;zv=1;function e(t,r){return t!=null&&r in Object(t)}return Fu=e,Fu}var Wu,Uv;function zS(){if(Uv)return Wu;Uv=1;var e=_0(),t=yd(),r=He(),n=md(),i=gd(),a=Ya();function o(s,u,c){u=e(u,s);for(var f=-1,l=u.length,d=!1;++f<l;){var h=a(u[f]);if(!(d=s!=null&&c(s,h)))break;s=s[h]}return d||++f!=l?d:(l=s==null?0:s.length,!!l&&i(l)&&n(h,l)&&(r(s)||t(s)))}return Wu=o,Wu}var zu,Kv;function US(){if(Kv)return zu;Kv=1;var e=WS(),t=zS();function r(n,i){return n!=null&&t(n,i,e)}return zu=r,zu}var Uu,Hv;function KS(){if(Hv)return Uu;Hv=1;var e=bd(),t=O0(),r=US(),n=td(),i=nx(),a=ix(),o=Ya(),s=1,u=2;function c(f,l){return n(f)&&i(l)?a(o(f),l):function(d){var h=t(d,f);return h===void 0&&h===l?r(d,f):e(l,h,s|u)}}return Uu=c,Uu}var Ku,Gv;function ln(){if(Gv)return Ku;Gv=1;function e(t){return t}return Ku=e,Ku}var Hu,Vv;function HS(){if(Vv)return Hu;Vv=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Hu=e,Hu}var Gu,Xv;function GS(){if(Xv)return Gu;Xv=1;var e=sd();function t(r){return function(n){return e(n,r)}}return Gu=t,Gu}var Vu,Yv;function VS(){if(Yv)return Vu;Yv=1;var e=HS(),t=GS(),r=td(),n=Ya();function i(a){return r(a)?e(n(a)):t(a)}return Vu=i,Vu}var Xu,Zv;function Gt(){if(Zv)return Xu;Zv=1;var e=FS(),t=KS(),r=ln(),n=He(),i=VS();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return Xu=a,Xu}var Yu,Jv;function ax(){if(Jv)return Yu;Jv=1;function e(t,r,n,i){for(var a=t.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(t[o],o,t))return o;return-1}return Yu=e,Yu}var Zu,Qv;function XS(){if(Qv)return Zu;Qv=1;function e(t){return t!==t}return Zu=e,Zu}var Ju,ey;function YS(){if(ey)return Ju;ey=1;function e(t,r,n){for(var i=n-1,a=t.length;++i<a;)if(t[i]===r)return i;return-1}return Ju=e,Ju}var Qu,ty;function ZS(){if(ty)return Qu;ty=1;var e=ax(),t=XS(),r=YS();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return Qu=n,Qu}var ec,ry;function JS(){if(ry)return ec;ry=1;var e=ZS();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return ec=t,ec}var tc,ny;function QS(){if(ny)return tc;ny=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;)if(n(r,t[i]))return!0;return!1}return tc=e,tc}var rc,iy;function eA(){if(iy)return rc;iy=1;function e(){}return rc=e,rc}var nc,ay;function tA(){if(ay)return nc;ay=1;var e=rx(),t=eA(),r=vd(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return nc=i,nc}var ic,oy;function rA(){if(oy)return ic;oy=1;var e=G0(),t=JS(),r=QS(),n=X0(),i=tA(),a=vd(),o=200;function s(u,c,f){var l=-1,d=t,h=u.length,m=!0,y=[],p=y;if(f)m=!1,d=r;else if(h>=o){var x=c?null:i(u);if(x)return a(x);m=!1,d=n,p=new e}else p=c?[]:y;e:for(;++l<h;){var w=u[l],O=c?c(w):w;if(w=f||w!==0?w:0,m&&O===O){for(var _=p.length;_--;)if(p[_]===O)continue e;c&&p.push(O),y.push(w)}else d(p,O,f)||(p!==y&&p.push(O),y.push(w))}return y}return ic=s,ic}var ac,sy;function nA(){if(sy)return ac;sy=1;var e=Gt(),t=rA();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return ac=r,ac}var iA=nA();const uy=le(iA);function ox(e,t,r){return t===!0?uy(e,r):X(t)?uy(e,t):e}function Rr(e){"@babel/helpers - typeof";return Rr=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},Rr(e)}var aA=["ref"];function cy(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 At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cy(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ly(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,ux(n.key),n)}}function sA(e,t,r){return t&&ly(e.prototype,t),r&&ly(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uA(e,t,r){return t=ea(t),cA(e,sx()?Reflect.construct(t,r||[],ea(e).constructor):t.apply(e,r))}function cA(e,t){if(t&&(Rr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lA(e)}function lA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sx=function(){return!!e})()}function ea(e){return ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ea(e)}function fA(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&&Kl(e,t)}function Kl(e,t){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Kl(e,t)}function ro(e,t,r){return t=ux(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ux(e){var t=dA(e,"string");return Rr(t)=="symbol"?t:t+""}function dA(e,t){if(Rr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hA(e,t){if(e==null)return{};var r=pA(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 pA(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 vA(e){return e.value}function yA(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var r=hA(t,aA);return P.createElement(pd,r)}var fy=1,Le=(function(e){function t(){var r;oA(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=uA(this,t,[].concat(i)),ro(r,"lastBoundingBox",{width:-1,height:-1}),r}return fA(t,e),sA(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)>fy||Math.abs(i.height-this.lastBoundingBox.height)>fy)&&(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?At({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,u=i.margin,c=i.chartWidth,f=i.chartHeight,l,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();l={left:((c||0)-h.width)/2}}else l=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();d={top:((f||0)-m.height)/2}}else d=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return At(At({},l),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,u=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,l=At(At({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return P.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(h){n.wrapperNode=h}},yA(a,At(At({},this.props),{},{payload:ox(f,c,vA)})))}}],[{key:"getWithHeight",value:function(n,i){var a=At(At({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&B(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])})(R.PureComponent);ro(Le,"displayName","Legend");ro(Le,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var oc,dy;function mA(){if(dy)return oc;dy=1;var e=mi(),t=yd(),r=He(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return oc=i,oc}var sc,hy;function cx(){if(hy)return sc;hy=1;var e=Z0(),t=mA();function r(n,i,a,o,s){var u=-1,c=n.length;for(a||(a=t),s||(s=[]);++u<c;){var f=n[u];i>0&&a(f)?i>1?r(f,i-1,a,o,s):e(s,f):o||(s[s.length]=f)}return s}return sc=r,sc}var uc,py;function gA(){if(py)return uc;py=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),s=i(r),u=s.length;u--;){var c=s[t?u:++a];if(n(o[c],c,o)===!1)break}return r}}return uc=e,uc}var cc,vy;function bA(){if(vy)return cc;vy=1;var e=gA(),t=e();return cc=t,cc}var lc,yy;function lx(){if(yy)return lc;yy=1;var e=bA(),t=to();function r(n,i){return n&&e(n,i,t)}return lc=r,lc}var fc,my;function xA(){if(my)return fc;my=1;var e=gi();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,s=n?o:-1,u=Object(i);(n?s--:++s<o)&&a(u[s],s,u)!==!1;);return i}}return fc=t,fc}var dc,gy;function xd(){if(gy)return dc;gy=1;var e=lx(),t=xA(),r=t(e);return dc=r,dc}var hc,by;function fx(){if(by)return hc;by=1;var e=xd(),t=gi();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(s,u,c){o[++a]=i(s,u,c)}),o}return hc=r,hc}var pc,xy;function wA(){if(xy)return pc;xy=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return pc=e,pc}var vc,wy;function _A(){if(wy)return vc;wy=1;var e=on();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,s=e(r),u=n!==void 0,c=n===null,f=n===n,l=e(n);if(!c&&!l&&!s&&r>n||s&&u&&f&&!c&&!l||a&&u&&f||!i&&f||!o)return 1;if(!a&&!s&&!l&&r<n||l&&i&&o&&!a&&!s||c&&i&&o||!u&&o||!f)return-1}return 0}return vc=t,vc}var yc,_y;function OA(){if(_y)return yc;_y=1;var e=_A();function t(r,n,i){for(var a=-1,o=r.criteria,s=n.criteria,u=o.length,c=i.length;++a<u;){var f=e(o[a],s[a]);if(f){if(a>=c)return f;var l=i[a];return f*(l=="desc"?-1:1)}}return r.index-n.index}return yc=t,yc}var mc,Oy;function SA(){if(Oy)return mc;Oy=1;var e=od(),t=sd(),r=Gt(),n=fx(),i=wA(),a=Q0(),o=OA(),s=ln(),u=He();function c(f,l,d){l.length?l=e(l,function(y){return u(y)?function(p){return t(p,y.length===1?y[0]:y)}:y}):l=[s];var h=-1;l=e(l,a(r));var m=n(f,function(y,p,x){var w=e(l,function(O){return O(y)});return{criteria:w,index:++h,value:y}});return i(m,function(y,p){return o(y,p,d)})}return mc=c,mc}var gc,Sy;function AA(){if(Sy)return gc;Sy=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return gc=e,gc}var bc,Ay;function jA(){if(Ay)return bc;Ay=1;var e=AA(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,s=-1,u=t(o.length-i,0),c=Array(u);++s<u;)c[s]=o[i+s];s=-1;for(var f=Array(i+1);++s<i;)f[s]=o[s];return f[i]=a(c),e(n,this,f)}}return bc=r,bc}var xc,jy;function PA(){if(jy)return xc;jy=1;function e(t){return function(){return t}}return xc=e,xc}var wc,Py;function dx(){if(Py)return wc;Py=1;var e=mr(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return wc=t,wc}var _c,Ty;function TA(){if(Ty)return _c;Ty=1;var e=PA(),t=dx(),r=ln(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return _c=n,_c}var Oc,Ey;function EA(){if(Ey)return Oc;Ey=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var s=r(),u=t-(s-o);if(o=s,u>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Oc=n,Oc}var Sc,ky;function kA(){if(ky)return Sc;ky=1;var e=TA(),t=EA(),r=t(e);return Sc=r,Sc}var Ac,Cy;function CA(){if(Cy)return Ac;Cy=1;var e=ln(),t=jA(),r=kA();function n(i,a){return r(t(i,a,e),i+"")}return Ac=n,Ac}var jc,My;function no(){if(My)return jc;My=1;var e=nd(),t=gi(),r=md(),n=Ht();function i(a,o,s){if(!n(s))return!1;var u=typeof o;return(u=="number"?t(s)&&r(o,s.length):u=="string"&&o in s)?e(s[o],a):!1}return jc=i,jc}var Pc,$y;function MA(){if($y)return Pc;$y=1;var e=cx(),t=SA(),r=CA(),n=no(),i=r(function(a,o){if(a==null)return[];var s=o.length;return s>1&&n(a,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Pc=i,Pc}var $A=MA();const wd=le($A);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 Hl(){return Hl=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},Hl.apply(this,arguments)}function IA(e,t){return qA(e)||RA(e,t)||DA(e,t)||NA()}function NA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DA(e,t){if(e){if(typeof e=="string")return Iy(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 Iy(e,t)}}function Iy(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 RA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function qA(e){if(Array.isArray(e))return e}function Ny(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 Tc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ny(Object(r),!0).forEach(function(n){LA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ny(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LA(e,t,r){return t=BA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BA(e){var t=FA(e,"string");return qn(t)=="symbol"?t:t+""}function FA(e,t){if(qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WA(e){return Array.isArray(e)&&je(e[0])&&je(e[1])?e.join(" ~ "):e}var zA=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,u=t.labelStyle,c=u===void 0?{}:u,f=t.payload,l=t.formatter,d=t.itemSorter,h=t.wrapperClassName,m=t.labelClassName,y=t.label,p=t.labelFormatter,x=t.accessibilityLayer,w=x===void 0?!1:x,O=function(){if(f&&f.length){var T={padding:0,margin:0},C=(d?wd(f,d):f).map(function($,M){if($.type==="none")return null;var N=Tc({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},s),q=$.formatter||l||WA,D=$.value,F=$.name,K=D,G=F;if(q&&K!=null&&G!=null){var z=q(D,F,$,M,f);if(Array.isArray(z)){var V=IA(z,2);K=V[0],G=V[1]}else K=z}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:N},je(G)?P.createElement("span",{className:"recharts-tooltip-item-name"},G):null,je(G)?P.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,P.createElement("span",{className:"recharts-tooltip-item-value"},K),P.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:T},C)}return null},_=Tc({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),g=Tc({margin:0},c),b=!Q(y),S=b?y:"",A=ee("recharts-default-tooltip",h),j=ee("recharts-tooltip-label",m);b&&p&&f!==void 0&&f!==null&&(S=p(y,f));var k=w?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",Hl({className:A,style:_},k),P.createElement("p",{className:j,style:g},P.isValidElement(S)?S:"".concat(S)),O())};function Ln(e){"@babel/helpers - typeof";return Ln=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},Ln(e)}function Ci(e,t,r){return t=UA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UA(e){var t=KA(e,"string");return Ln(t)=="symbol"?t:t+""}function KA(e,t){if(Ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mn="recharts-tooltip-wrapper",HA={visibility:"hidden"};function GA(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ee(mn,Ci(Ci(Ci(Ci({},"".concat(mn,"-right"),B(r)&&t&&B(t.x)&&r>=t.x),"".concat(mn,"-left"),B(r)&&t&&B(t.x)&&r<t.x),"".concat(mn,"-bottom"),B(n)&&t&&B(t.y)&&n>=t.y),"".concat(mn,"-top"),B(n)&&t&&B(t.y)&&n<t.y))}function Dy(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,u=e.viewBox,c=e.viewBoxDimension;if(a&&B(a[n]))return a[n];var f=r[n]-s-i,l=r[n]+i;if(t[n])return o[n]?f:l;if(o[n]){var d=f,h=u[n];return d<h?Math.max(l,u[n]):Math.max(f,u[n])}var m=l+s,y=u[n]+c;return m>y?Math.max(f,u[n]):Math.max(l,u[n])}function VA(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 XA(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,u=e.viewBox,c,f,l;return o.height>0&&o.width>0&&r?(f=Dy({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),l=Dy({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),c=VA({translateX:f,translateY:l,useTranslate3d:s})):c=HA,{cssProperties:c,cssClasses:GA({translateX:f,translateY:l,coordinate:r})}}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 Ry(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 qy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ry(Object(r),!0).forEach(function(n){Vl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZA(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,px(n.key),n)}}function JA(e,t,r){return t&&ZA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QA(e,t,r){return t=ta(t),ej(e,hx()?Reflect.construct(t,r||[],ta(e).constructor):t.apply(e,r))}function ej(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 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 hx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hx=function(){return!!e})()}function ta(e){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ta(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&&Gl(e,t)}function Gl(e,t){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gl(e,t)}function Vl(e,t,r){return t=px(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function px(e){var t=nj(e,"string");return qr(t)=="symbol"?t:t+""}function nj(e,t){if(qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ly=1,ij=(function(e){function t(){var r;YA(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=QA(this,t,[].concat(i)),Vl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Vl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,u,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(u=r.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&s!==void 0?s:0,y:(c=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),r}return rj(t,e),JA(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Ly||Math.abs(n.height-this.state.lastBoundingBox.height)>Ly)&&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,s=i.animationDuration,u=i.animationEasing,c=i.children,f=i.coordinate,l=i.hasPayload,d=i.isAnimationActive,h=i.offset,m=i.position,y=i.reverseDirection,p=i.useTranslate3d,x=i.viewBox,w=i.wrapperStyle,O=XA({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:m,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:x}),_=O.cssClasses,g=O.cssProperties,b=qy(qy({transition:d&&a?"transform ".concat(s,"ms ").concat(u):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&l?"visible":"hidden",position:"absolute",top:0,left:0},w);return P.createElement("div",{tabIndex:-1,className:_,style:b,ref:function(A){n.wrapperNode=A}},c)}}])})(R.PureComponent),aj=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gr={isSsr:aj()};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 By(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 Fy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?By(Object(r),!0).forEach(function(n){_d(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):By(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sj(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,yx(n.key),n)}}function uj(e,t,r){return t&&sj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cj(e,t,r){return t=ra(t),lj(e,vx()?Reflect.construct(t,r||[],ra(e).constructor):t.apply(e,r))}function lj(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 fj(e)}function fj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vx=function(){return!!e})()}function ra(e){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ra(e)}function dj(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&&Xl(e,t)}function Xl(e,t){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xl(e,t)}function _d(e,t,r){return t=yx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yx(e){var t=hj(e,"string");return Lr(t)=="symbol"?t:t+""}function hj(e,t){if(Lr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function pj(e){return e.dataKey}function vj(e,t){return P.isValidElement(e)?P.cloneElement(e,t):typeof e=="function"?P.createElement(e,t):P.createElement(zA,t)}var oe=(function(e){function t(){return oj(this,t),cj(this,t,arguments)}return dj(t,e),uj(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,c=i.content,f=i.coordinate,l=i.filterNull,d=i.isAnimationActive,h=i.offset,m=i.payload,y=i.payloadUniqBy,p=i.position,x=i.reverseDirection,w=i.useTranslate3d,O=i.viewBox,_=i.wrapperStyle,g=m??[];l&&g.length&&(g=ox(m.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),y,pj));var b=g.length>0;return P.createElement(ij,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:d,active:a,coordinate:f,hasPayload:b,offset:h,position:p,reverseDirection:x,useTranslate3d:w,viewBox:O,wrapperStyle:_},vj(c,Fy(Fy({},this.props),{},{payload:g})))}}])})(R.PureComponent);_d(oe,"displayName","Tooltip");_d(oe,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gr.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 Ec,Wy;function yj(){if(Wy)return Ec;Wy=1;var e=St(),t=function(){return e.Date.now()};return Ec=t,Ec}var kc,zy;function mj(){if(zy)return kc;zy=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return kc=t,kc}var Cc,Uy;function gj(){if(Uy)return Cc;Uy=1;var e=mj(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Cc=r,Cc}var Mc,Ky;function mx(){if(Ky)return Mc;Ky=1;var e=gj(),t=Ht(),r=on(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=t(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var l=a.test(c);return l||o.test(c)?s(c.slice(2),l?2:8):i.test(c)?n:+c}return Mc=u,Mc}var $c,Hy;function bj(){if(Hy)return $c;Hy=1;var e=Ht(),t=yj(),r=mx(),n="Expected a function",i=Math.max,a=Math.min;function o(s,u,c){var f,l,d,h,m,y,p=0,x=!1,w=!1,O=!0;if(typeof s!="function")throw new TypeError(n);u=r(u)||0,e(c)&&(x=!!c.leading,w="maxWait"in c,d=w?i(r(c.maxWait)||0,u):d,O="trailing"in c?!!c.trailing:O);function _(C){var $=f,M=l;return f=l=void 0,p=C,h=s.apply(M,$),h}function g(C){return p=C,m=setTimeout(A,u),x?_(C):h}function b(C){var $=C-y,M=C-p,N=u-$;return w?a(N,d-M):N}function S(C){var $=C-y,M=C-p;return y===void 0||$>=u||$<0||w&&M>=d}function A(){var C=t();if(S(C))return j(C);m=setTimeout(A,b(C))}function j(C){return m=void 0,O&&f?_(C):(f=l=void 0,h)}function k(){m!==void 0&&clearTimeout(m),p=0,f=y=l=m=void 0}function E(){return m===void 0?h:j(t())}function T(){var C=t(),$=S(C);if(f=arguments,l=this,y=C,$){if(m===void 0)return g(y);if(w)return clearTimeout(m),m=setTimeout(A,u),_(y)}return m===void 0&&(m=setTimeout(A,u)),h}return T.cancel=k,T.flush=E,T}return $c=o,$c}var Ic,Gy;function xj(){if(Gy)return Ic;Gy=1;var e=bj(),t=Ht(),r="Expected a function";function n(i,a,o){var s=!0,u=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(s="leading"in o?!!o.leading:s,u="trailing"in o?!!o.trailing:u),e(i,a,{leading:s,maxWait:a,trailing:u})}return Ic=n,Ic}var wj=xj();const gx=le(wj);function Bn(e){"@babel/helpers - typeof";return Bn=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},Bn(e)}function Vy(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 Mi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vy(Object(r),!0).forEach(function(n){_j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _j(e,t,r){return t=Oj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oj(e){var t=Sj(e,"string");return Bn(t)=="symbol"?t:t+""}function Sj(e,t){if(Bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aj(e,t){return Ej(e)||Tj(e,t)||Pj(e,t)||jj()}function jj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pj(e,t){if(e){if(typeof e=="string")return Xy(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 Xy(e,t)}}function Xy(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 Tj(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Ej(e){if(Array.isArray(e))return e}var Qe=R.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,s=e.height,u=s===void 0?"100%":s,c=e.minWidth,f=c===void 0?0:c,l=e.minHeight,d=e.maxHeight,h=e.children,m=e.debounce,y=m===void 0?0:m,p=e.id,x=e.className,w=e.onResize,O=e.style,_=O===void 0?{}:O,g=R.useRef(null),b=R.useRef();b.current=w,R.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=R.useState({containerWidth:i.width,containerHeight:i.height}),A=Aj(S,2),j=A[0],k=A[1],E=R.useCallback(function(C,$){k(function(M){var N=Math.round(C),q=Math.round($);return M.containerWidth===N&&M.containerHeight===q?M:{containerWidth:N,containerHeight:q}})},[]);R.useEffect(function(){var C=function(F){var K,G=F[0].contentRect,z=G.width,V=G.height;E(z,V),(K=b.current)===null||K===void 0||K.call(b,z,V)};y>0&&(C=gx(C,y,{trailing:!0,leading:!1}));var $=new ResizeObserver(C),M=g.current.getBoundingClientRect(),N=M.width,q=M.height;return E(N,q),$.observe(g.current),function(){$.disconnect()}},[E,y]);var T=R.useMemo(function(){var C=j.containerWidth,$=j.containerHeight;if(C<0||$<0)return null;kt(ir(o)||ir(u),`The width(%s) and height(%s) are both fixed numbers,
|
|
15
|
+
maybe you don't need to use a ResponsiveContainer.`,o,u),kt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=ir(o)?C:o,N=ir(u)?$:u;r&&r>0&&(M?N=M/r:N&&(M=N*r),d&&N>d&&(N=d)),kt(M>0||N>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
16
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
17
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
18
|
+
height and width.`,M,N,o,u,f,l,r);var q=!Array.isArray(h)&&Et(h.type).endsWith("Chart");return P.Children.map(h,function(D){return P.isValidElement(D)?R.cloneElement(D,Mi({width:M,height:N},q?{style:Mi({height:"100%",width:"100%",maxHeight:N,maxWidth:M},D.props.style)}:{})):D})},[r,h,u,d,l,f,j,o]);return P.createElement("div",{id:p?"".concat(p):void 0,className:ee("recharts-responsive-container",x),style:Mi(Mi({},_),{},{width:o,height:u,minWidth:f,minHeight:l,maxHeight:d}),ref:g},T)}),bi=function(t){return null};bi.displayName="Cell";function Fn(e){"@babel/helpers - typeof";return Fn=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},Fn(e)}function Yy(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 Yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yy(Object(r),!0).forEach(function(n){kj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kj(e,t,r){return t=Cj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cj(e){var t=Mj(e,"string");return Fn(t)=="symbol"?t:t+""}function Mj(e,t){if(Fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Or={widthCache:{},cacheCount:0},$j=2e3,Ij={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Zy="recharts_measurement_span";function Nj(e){var t=Yl({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var En=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||gr.isSsr)return{width:0,height:0};var n=Nj(r),i=JSON.stringify({text:t,copyStyle:n});if(Or.widthCache[i])return Or.widthCache[i];try{var a=document.getElementById(Zy);a||(a=document.createElement("span"),a.setAttribute("id",Zy),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Yl(Yl({},Ij),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),u={width:s.width,height:s.height};return Or.widthCache[i]=u,++Or.cacheCount>$j&&(Or.cacheCount=0,Or.widthCache={}),u}catch{return{width:0,height:0}}},Dj=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wn(e){"@babel/helpers - typeof";return Wn=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},Wn(e)}function na(e,t){return Bj(e)||Lj(e,t)||qj(e,t)||Rj()}function Rj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qj(e,t){if(e){if(typeof e=="string")return Jy(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 Jy(e,t)}}function Jy(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 Lj(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Bj(e){if(Array.isArray(e))return e}function Fj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qy(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,zj(n.key),n)}}function Wj(e,t,r){return t&&Qy(e.prototype,t),r&&Qy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zj(e){var t=Uj(e,"string");return Wn(t)=="symbol"?t:t+""}function Uj(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var em=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tm=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Kj=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Hj=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bx={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Gj=Object.keys(bx),Pr="NaN";function Vj(e,t){return e*bx[t]}var $i=(function(){function e(t,r){Fj(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Kj.test(r)&&(this.num=NaN,this.unit=""),Gj.includes(r)&&(this.num=Vj(t,r),this.unit="px")}return Wj(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=Hj.exec(r))!==null&&n!==void 0?n:[],a=na(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])})();function xx(e){if(e.includes(Pr))return Pr;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=em.exec(t))!==null&&r!==void 0?r:[],i=na(n,4),a=i[1],o=i[2],s=i[3],u=$i.parse(a??""),c=$i.parse(s??""),f=o==="*"?u.multiply(c):u.divide(c);if(f.isNaN())return Pr;t=t.replace(em,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,d=(l=tm.exec(t))!==null&&l!==void 0?l:[],h=na(d,4),m=h[1],y=h[2],p=h[3],x=$i.parse(m??""),w=$i.parse(p??""),O=y==="+"?x.add(w):x.subtract(w);if(O.isNaN())return Pr;t=t.replace(tm,O.toString())}return t}var rm=/\(([^()]*)\)/;function Xj(e){for(var t=e;t.includes("(");){var r=rm.exec(t),n=na(r,2),i=n[1];t=t.replace(rm,xx(i))}return t}function Yj(e){var t=e.replace(/\s+/g,"");return t=Xj(t),t=xx(t),t}function Zj(e){try{return Yj(e)}catch{return Pr}}function Nc(e){var t=Zj(e.slice(5,-1));return t===Pr?"":t}var Jj=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Qj=["dx","dy","angle","className","breakAll"];function Zl(){return Zl=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},Zl.apply(this,arguments)}function nm(e,t){if(e==null)return{};var r=eP(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 eP(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 im(e,t){return iP(e)||nP(e,t)||rP(e,t)||tP()}function tP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
20
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rP(e,t){if(e){if(typeof e=="string")return am(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 am(e,t)}}function am(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 nP(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function iP(e){if(Array.isArray(e))return e}var wx=/[ \f\n\r\t\v\u2028\u2029]+/,_x=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Q(r)||(n?a=r.toString().split(""):a=r.toString().split(wx));var o=a.map(function(u){return{word:u,width:En(u,i).width}}),s=n?0:En(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},aP=function(t,r,n,i,a){var o=t.maxLines,s=t.children,u=t.style,c=t.breakAll,f=B(o),l=s,d=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function(N,q){var D=q.word,F=q.width,K=N[N.length-1];if(K&&(i==null||a||K.width+F+n<Number(i)))K.words.push(D),K.width+=F+n;else{var G={words:[D],width:F};N.push(G)}return N},[])},h=d(r),m=function(M){return M.reduce(function(N,q){return N.width>q.width?N:q})};if(!f)return h;for(var y="…",p=function(M){var N=l.slice(0,M),q=_x({breakAll:c,style:u,children:N+y}).wordsWithComputedWidth,D=d(q),F=D.length>o||m(D).width>Number(i);return[F,D]},x=0,w=l.length-1,O=0,_;x<=w&&O<=l.length-1;){var g=Math.floor((x+w)/2),b=g-1,S=p(b),A=im(S,2),j=A[0],k=A[1],E=p(g),T=im(E,1),C=T[0];if(!j&&!C&&(x=g+1),j&&C&&(w=g-1),!j&&C){_=k;break}O++}return _||h},om=function(t){var r=Q(t)?[]:t.toString().split(wx);return[{words:r}]},oP=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!gr.isSsr){var u,c,f=_x({breakAll:o,children:i,style:a});if(f){var l=f.wordsWithComputedWidth,d=f.spaceWidth;u=l,c=d}else return om(i);return aP({breakAll:o,children:i,maxLines:s,style:a},u,c,r,n)}return om(i)},sm="#808080",ia=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,u=t.capHeight,c=u===void 0?"0.71em":u,f=t.scaleToFit,l=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,m=t.verticalAnchor,y=m===void 0?"end":m,p=t.fill,x=p===void 0?sm:p,w=nm(t,Jj),O=R.useMemo(function(){return oP({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:l,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,l,w.style,w.width]),_=w.dx,g=w.dy,b=w.angle,S=w.className,A=w.breakAll,j=nm(w,Qj);if(!je(n)||!je(a))return null;var k=n+(B(_)?_:0),E=a+(B(g)?g:0),T;switch(y){case"start":T=Nc("calc(".concat(c,")"));break;case"middle":T=Nc("calc(".concat((O.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:T=Nc("calc(".concat(O.length-1," * -").concat(s,")"));break}var C=[];if(l){var $=O[0].width,M=w.width;C.push("scale(".concat((B(M)?M/$:1)/$,")"))}return b&&C.push("rotate(".concat(b,", ").concat(k,", ").concat(E,")")),C.length&&(j.transform=C.join(" ")),P.createElement("text",Zl({},Z(j,!0),{x:k,y:E,className:ee("recharts-text",S),textAnchor:h,fill:x.includes("url")?sm:x}),O.map(function(N,q){var D=N.words.join(A?"":" ");return P.createElement("tspan",{x:k,dy:q===0?T:s,key:"".concat(D,"-").concat(q)},D)}))};function Kt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sP(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Od(e){let t,r,n;e.length!==2?(t=Kt,r=(s,u)=>Kt(e(s),u),n=(s,u)=>e(s)-u):(t=e===Kt||e===sP?e:uP,r=e,n=e);function i(s,u,c=0,f=s.length){if(c<f){if(t(u,u)!==0)return f;do{const l=c+f>>>1;r(s[l],u)<0?c=l+1:f=l}while(c<f)}return c}function a(s,u,c=0,f=s.length){if(c<f){if(t(u,u)!==0)return f;do{const l=c+f>>>1;r(s[l],u)<=0?c=l+1:f=l}while(c<f)}return c}function o(s,u,c=0,f=s.length){const l=i(s,u,c,f-1);return l>c&&n(s[l-1],u)>-n(s[l],u)?l-1:l}return{left:i,center:o,right:a}}function uP(){return 0}function Ox(e){return e===null?NaN:+e}function*cP(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const lP=Od(Kt),xi=lP.right;Od(Ox).center;class um extends Map{constructor(t,r=hP){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(cm(this,t))}has(t){return super.has(cm(this,t))}set(t,r){return super.set(fP(this,t),r)}delete(t){return super.delete(dP(this,t))}}function cm({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function fP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function dP({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function hP(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pP(e=Kt){if(e===Kt)return Sx;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 Sx(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const vP=Math.sqrt(50),yP=Math.sqrt(10),mP=Math.sqrt(2);function aa(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>=vP?10:a>=yP?5:a>=mP?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),u=Math.round(t*c),s/c<e&&++s,u/c>t&&--u,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),u=Math.round(t/c),s*c<e&&++s,u*c>t&&--u),u<s&&.5<=r&&r<2?aa(e,t,r*2):[s,u,c]}function Jl(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?aa(t,e,r):aa(e,t,r);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)u[c]=(a-c)/-o;else for(let c=0;c<s;++c)u[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)u[c]=(i+c)/-o;else for(let c=0;c<s;++c)u[c]=(i+c)*o;return u}function Ql(e,t,r){return t=+t,e=+e,r=+r,aa(e,t,r)[2]}function ef(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Ql(t,e,r):Ql(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function lm(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function fm(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Ax(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?Sx:pP(i);n>r;){if(n-r>600){const u=n-r+1,c=t-r+1,f=Math.log(u),l=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*l*(u-l)/u)*(c-u/2<0?-1:1),h=Math.max(r,Math.floor(t-c*l/u+d)),m=Math.min(n,Math.floor(t+(u-c)*l/u+d));Ax(e,t,h,m,i)}const a=e[t];let o=r,s=n;for(gn(e,r,t),i(e[n],a)>0&&gn(e,r,n);o<s;){for(gn(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?gn(e,r,s):(++s,gn(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function gn(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function gP(e,t,r){if(e=Float64Array.from(cP(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return fm(e);if(t>=1)return lm(e);var n,i=(n-1)*t,a=Math.floor(i),o=lm(Ax(e,a).subarray(0,a+1)),s=fm(e.subarray(a+1));return o+(s-o)*(i-a)}}function bP(e,t,r=Ox){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),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function xP(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 ct(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qt(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 tf=Symbol("implicit");function Sd(){var e=new um,t=[],r=[],n=tf;function i(a){let o=e.get(a);if(o===void 0){if(n!==tf)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 um;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 Sd(t,r).unknown(n)},ct.apply(i,arguments),i}function zn(){var e=Sd().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,u=0,c=0,f=.5;delete e.unknown;function l(){var d=t().length,h=i<n,m=h?i:n,y=h?n:i;a=(y-m)/Math.max(1,d-u+c*2),s&&(a=Math.floor(a)),m+=(y-m-a*(d-u))*f,o=a*(1-u),s&&(m=Math.round(m),o=Math.round(o));var p=xP(d).map(function(x){return m+a*x});return r(h?p.reverse():p)}return e.domain=function(d){return arguments.length?(t(d),l()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,l()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,l()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(s=!!d,l()):s},e.padding=function(d){return arguments.length?(u=Math.min(1,c=+d),l()):u},e.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),l()):u},e.paddingOuter=function(d){return arguments.length?(c=+d,l()):c},e.align=function(d){return arguments.length?(f=Math.max(0,Math.min(1,d)),l()):f},e.copy=function(){return zn(t(),[n,i]).round(s).paddingInner(u).paddingOuter(c).align(f)},ct.apply(l(),arguments)}function jx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return jx(t())},e}function kn(){return jx(zn.apply(null,arguments).paddingInner(1))}function Ad(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Px(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function wi(){}var Un=.7,oa=1/Un,Cr="\\s*([+-]?\\d+)\\s*",Kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wP=/^#([0-9a-f]{3,8})$/,_P=new RegExp(`^rgb\\(${Cr},${Cr},${Cr}\\)$`),OP=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),SP=new RegExp(`^rgba\\(${Cr},${Cr},${Cr},${Kn}\\)$`),AP=new RegExp(`^rgba\\(${xt},${xt},${xt},${Kn}\\)$`),jP=new RegExp(`^hsl\\(${Kn},${xt},${xt}\\)$`),PP=new RegExp(`^hsla\\(${Kn},${xt},${xt},${Kn}\\)$`),dm={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};Ad(wi,Hn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hm,formatHex:hm,formatHex8:TP,formatHsl:EP,formatRgb:pm,toString:pm});function hm(){return this.rgb().formatHex()}function TP(){return this.rgb().formatHex8()}function EP(){return Tx(this).formatHsl()}function pm(){return this.rgb().formatRgb()}function Hn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=wP.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?vm(t):r===3?new Ue(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ii(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ii(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=_P.exec(e))?new Ue(t[1],t[2],t[3],1):(t=OP.exec(e))?new Ue(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=SP.exec(e))?Ii(t[1],t[2],t[3],t[4]):(t=AP.exec(e))?Ii(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jP.exec(e))?gm(t[1],t[2]/100,t[3]/100,1):(t=PP.exec(e))?gm(t[1],t[2]/100,t[3]/100,t[4]):dm.hasOwnProperty(e)?vm(dm[e]):e==="transparent"?new Ue(NaN,NaN,NaN,0):null}function vm(e){return new Ue(e>>16&255,e>>8&255,e&255,1)}function Ii(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ue(e,t,r,n)}function kP(e){return e instanceof wi||(e=Hn(e)),e?(e=e.rgb(),new Ue(e.r,e.g,e.b,e.opacity)):new Ue}function rf(e,t,r,n){return arguments.length===1?kP(e):new Ue(e,t,r,n??1)}function Ue(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ad(Ue,rf,Px(wi,{brighter(e){return e=e==null?oa:Math.pow(oa,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Un:Math.pow(Un,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ue(cr(this.r),cr(this.g),cr(this.b),sa(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:ym,formatHex:ym,formatHex8:CP,formatRgb:mm,toString:mm}));function ym(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}`}function CP(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}${ar((isNaN(this.opacity)?1:this.opacity)*255)}`}function mm(){const e=sa(this.opacity);return`${e===1?"rgb(":"rgba("}${cr(this.r)}, ${cr(this.g)}, ${cr(this.b)}${e===1?")":`, ${e})`}`}function sa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ar(e){return e=cr(e),(e<16?"0":"")+e.toString(16)}function gm(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new pt(e,t,r,n)}function Tx(e){if(e instanceof pt)return new pt(e.h,e.s,e.l,e.opacity);if(e instanceof wi||(e=Hn(e)),!e)return new pt;if(e instanceof pt)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,s=a-i,u=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new pt(o,s,u,e.opacity)}function MP(e,t,r,n){return arguments.length===1?Tx(e):new pt(e,t,r,n??1)}function pt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ad(pt,MP,Px(wi,{brighter(e){return e=e==null?oa:Math.pow(oa,e),new pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Un:Math.pow(Un,e),new pt(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 Ue(Dc(e>=240?e-240:e+120,i,n),Dc(e,i,n),Dc(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new pt(bm(this.h),Ni(this.s),Ni(this.l),sa(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=sa(this.opacity);return`${e===1?"hsl(":"hsla("}${bm(this.h)}, ${Ni(this.s)*100}%, ${Ni(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bm(e){return e=(e||0)%360,e<0?e+360:e}function Ni(e){return Math.max(0,Math.min(1,e||0))}function Dc(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 jd=e=>()=>e;function $P(e,t){return function(r){return e+r*t}}function IP(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 NP(e){return(e=+e)==1?Ex:function(t,r){return r-t?IP(t,r,e):jd(isNaN(t)?r:t)}}function Ex(e,t){var r=t-e;return r?$P(e,r):jd(isNaN(e)?t:e)}const xm=(function e(t){var r=NP(t);function n(i,a){var o=r((i=rf(i)).r,(a=rf(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),c=Ex(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=u(f),i.opacity=c(f),i+""}}return n.gamma=e,n})(1);function DP(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 RP(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qP(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]=fn(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function LP(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function ua(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function BP(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]=fn(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var nf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rc=new RegExp(nf.source,"g");function FP(e){return function(){return e}}function WP(e){return function(t){return e(t)+""}}function zP(e,t){var r=nf.lastIndex=Rc.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(n=nf.exec(e))&&(i=Rc.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:ua(n,i)})),r=Rc.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?WP(u[0].x):FP(t):(t=u.length,function(c){for(var f=0,l;f<t;++f)s[(l=u[f]).i]=l.x(c);return s.join("")})}function fn(e,t){var r=typeof t,n;return t==null||r==="boolean"?jd(t):(r==="number"?ua:r==="string"?(n=Hn(t))?(t=n,xm):zP:t instanceof Hn?xm:t instanceof Date?LP:RP(t)?DP:Array.isArray(t)?qP:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?BP:ua)(e,t)}function Pd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function UP(e,t){t===void 0&&(t=e,e=fn);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 s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function KP(e){return function(){return e}}function ca(e){return+e}var wm=[0,1];function qe(e){return e}function af(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:KP(isNaN(t)?NaN:.5)}function HP(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function GP(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=af(i,n),a=r(o,a)):(n=af(n,i),a=r(a,o)),function(s){return a(n(s))}}function VP(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]=af(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var u=xi(e,s,1,n)-1;return a[u](i[u](s))}}function _i(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function io(){var e=wm,t=wm,r=fn,n,i,a,o=qe,s,u,c;function f(){var d=Math.min(e.length,t.length);return o!==qe&&(o=HP(e[0],e[d-1])),s=d>2?VP:GP,u=c=null,l}function l(d){return d==null||isNaN(d=+d)?a:(u||(u=s(e.map(n),t,r)))(n(o(d)))}return l.invert=function(d){return o(i((c||(c=s(t,e.map(n),ua)))(d)))},l.domain=function(d){return arguments.length?(e=Array.from(d,ca),f()):e.slice()},l.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},l.rangeRound=function(d){return t=Array.from(d),r=Pd,f()},l.clamp=function(d){return arguments.length?(o=d?!0:qe,f()):o!==qe},l.interpolate=function(d){return arguments.length?(r=d,f()):r},l.unknown=function(d){return arguments.length?(a=d,l):a},function(d,h){return n=d,i=h,f()}}function Td(){return io()(qe,qe)}function XP(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function la(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Br(e){return e=la(Math.abs(e)),e?e[1]:NaN}function YP(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),a.push(r.substring(i-=s,i+s)),!((u+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function ZP(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gn(e){if(!(t=JP.exec(e)))throw new Error("invalid format: "+e);var t;return new Ed({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]})}Gn.prototype=Ed.prototype;function Ed(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+""}Ed.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 QP(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 fa;function eT(e,t){var r=la(e,t);if(!r)return fa=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(fa=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")+la(e,Math.max(0,t+a-1))[0]}function _m(e,t){var r=la(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 Om={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XP,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)=>_m(e*100,t),r:_m,s:eT,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Sm(e){return e}var Am=Array.prototype.map,jm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tT(e){var t=e.grouping===void 0||e.thousands===void 0?Sm:YP(Am.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?Sm:ZP(Am.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function c(l,d){l=Gn(l);var h=l.fill,m=l.align,y=l.sign,p=l.symbol,x=l.zero,w=l.width,O=l.comma,_=l.precision,g=l.trim,b=l.type;b==="n"?(O=!0,b="g"):Om[b]||(_===void 0&&(_=12),g=!0,b="g"),(x||h==="0"&&m==="=")&&(x=!0,h="0",m="=");var S=(d&&d.prefix!==void 0?d.prefix:"")+(p==="$"?r:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),A=(p==="$"?n:/[%p]/.test(b)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),j=Om[b],k=/[defgprs%]/.test(b);_=_===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function E(T){var C=S,$=A,M,N,q;if(b==="c")$=j(T)+$,T="";else{T=+T;var D=T<0||1/T<0;if(T=isNaN(T)?u:j(Math.abs(T),_),g&&(T=QP(T)),D&&+T==0&&y!=="+"&&(D=!1),C=(D?y==="("?y:s:y==="-"||y==="("?"":y)+C,$=(b==="s"&&!isNaN(T)&&fa!==void 0?jm[8+fa/3]:"")+$+(D&&y==="("?")":""),k){for(M=-1,N=T.length;++M<N;)if(q=T.charCodeAt(M),48>q||q>57){$=(q===46?i+T.slice(M+1):T.slice(M))+$,T=T.slice(0,M);break}}}O&&!x&&(T=t(T,1/0));var F=C.length+T.length+$.length,K=F<w?new Array(w-F+1).join(h):"";switch(O&&x&&(T=t(K+T,K.length?w-$.length:1/0),K=""),m){case"<":T=C+T+$+K;break;case"=":T=C+K+T+$;break;case"^":T=K.slice(0,F=K.length>>1)+C+T+$+K.slice(F);break;default:T=K+C+T+$;break}return a(T)}return E.toString=function(){return l+""},E}function f(l,d){var h=Math.max(-8,Math.min(8,Math.floor(Br(d)/3)))*3,m=Math.pow(10,-h),y=c((l=Gn(l),l.type="f",l),{suffix:jm[8+h/3]});return function(p){return y(m*p)}}return{format:c,formatPrefix:f}}var Di,kd,kx;rT({thousands:",",grouping:[3],currency:["$",""]});function rT(e){return Di=tT(e),kd=Di.format,kx=Di.formatPrefix,Di}function nT(e){return Math.max(0,-Br(Math.abs(e)))}function iT(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Br(t)/3)))*3-Br(Math.abs(e)))}function aT(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Br(t)-Br(e))+1}function Cx(e,t,r,n){var i=ef(e,t,r),a;switch(n=Gn(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=iT(i,o))&&(n.precision=a),kx(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=aT(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=nT(i))&&(n.precision=a-(n.type==="%")*2);break}}return kd(n)}function Vt(e){var t=e.domain;return e.ticks=function(r){var n=t();return Jl(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return Cx(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],s=n[a],u,c,f=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);f-- >0;){if(c=Ql(o,s,r),c===u)return n[i]=o,n[a]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;u=c}return e},e}function da(){var e=Td();return e.copy=function(){return _i(e,da())},ct.apply(e,arguments),Vt(e)}function Mx(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,ca),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return Mx(e).unknown(t)},e=arguments.length?Array.from(e,ca):[0,1],Vt(r)}function $x(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 Pm(e){return Math.log(e)}function Tm(e){return Math.exp(e)}function oT(e){return-Math.log(-e)}function sT(e){return-Math.exp(-e)}function uT(e){return isFinite(e)?+("1e"+e):e<0?0:e}function cT(e){return e===10?uT:e===Math.E?Math.exp:t=>Math.pow(e,t)}function lT(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 Em(e){return(t,r)=>-e(-t,r)}function Cd(e){const t=e(Pm,Tm),r=t.domain;let n=10,i,a;function o(){return i=lT(n),a=cT(n),r()[0]<0?(i=Em(i),a=Em(a),e(oT,sT)):e(Pm,Tm),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const u=r();let c=u[0],f=u[u.length-1];const l=f<c;l&&([c,f]=[f,c]);let d=i(c),h=i(f),m,y;const p=s==null?10:+s;let x=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(m=1;m<n;++m)if(y=d<0?m/a(-d):m*a(d),!(y<c)){if(y>f)break;x.push(y)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(y=d>0?m/a(-d):m*a(d),!(y<c)){if(y>f)break;x.push(y)}x.length*2<p&&(x=Jl(c,f,p))}else x=Jl(d,h,Math.min(h-d,p)).map(a);return l?x.reverse():x},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Gn(u)).precision==null&&(u.trim=!0),u=kd(u)),s===1/0)return u;const c=Math.max(1,n*s/t.ticks().length);return f=>{let l=f/a(Math.round(i(f)));return l*n<n-.5&&(l*=n),l<=c?u(f):""}},t.nice=()=>r($x(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Ix(){const e=Cd(io()).domain([1,10]);return e.copy=()=>_i(e,Ix()).base(e.base()),ct.apply(e,arguments),e}function km(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Cm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Md(e){var t=1,r=e(km(t),Cm(t));return r.constant=function(n){return arguments.length?e(km(t=+n),Cm(t)):t},Vt(r)}function Nx(){var e=Md(io());return e.copy=function(){return _i(e,Nx()).constant(e.constant())},ct.apply(e,arguments)}function Mm(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function fT(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function dT(e){return e<0?-e*e:e*e}function $d(e){var t=e(qe,qe),r=1;function n(){return r===1?e(qe,qe):r===.5?e(fT,dT):e(Mm(r),Mm(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Vt(t)}function Id(){var e=$d(io());return e.copy=function(){return _i(e,Id()).exponent(e.exponent())},ct.apply(e,arguments),e}function hT(){return Id.apply(null,arguments).exponent(.5)}function $m(e){return Math.sign(e)*e*e}function pT(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Dx(){var e=Td(),t=[0,1],r=!1,n;function i(a){var o=pT(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert($m(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,ca)).map($m)),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 Dx(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ct.apply(i,arguments),Vt(i)}function Rx(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=bP(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[xi(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Kt),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 Rx().domain(e).range(t).unknown(n)},ct.apply(a,arguments)}function qx(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[xi(n,u,0,r)]:a}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*t-(u-r)*e)/(r+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},o.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return qx().domain([e,t]).range(i).unknown(a)},ct.apply(Vt(o),arguments)}function Lx(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[xi(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 Lx().domain(e).range(t).unknown(r)},ct.apply(i,arguments)}const qc=new Date,Lc=new Date;function Te(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),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let c;do u.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return u},i.filter=a=>Te(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(qc.setTime(+a),Lc.setTime(+o),e(qc),e(Lc),Math.floor(r(qc,Lc))),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 ha=Te(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ha.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Te(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ha);ha.range;const jt=1e3,it=jt*60,Pt=it*60,$t=Pt*24,Nd=$t*7,Im=$t*30,Bc=$t*365,or=Te(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getUTCSeconds());or.range;const Dd=Te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jt)},(e,t)=>{e.setTime(+e+t*it)},(e,t)=>(t-e)/it,e=>e.getMinutes());Dd.range;const Rd=Te(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*it)},(e,t)=>(t-e)/it,e=>e.getUTCMinutes());Rd.range;const qd=Te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jt-e.getMinutes()*it)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getHours());qd.range;const Ld=Te(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCHours());Ld.range;const Oi=Te(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*it)/$t,e=>e.getDate()-1);Oi.range;const ao=Te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$t,e=>e.getUTCDate()-1);ao.range;const Bx=Te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$t,e=>Math.floor(e/$t));Bx.range;function br(e){return Te(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())*it)/Nd)}const oo=br(0),pa=br(1),vT=br(2),yT=br(3),Fr=br(4),mT=br(5),gT=br(6);oo.range;pa.range;vT.range;yT.range;Fr.range;mT.range;gT.range;function xr(e){return Te(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)/Nd)}const so=xr(0),va=xr(1),bT=xr(2),xT=xr(3),Wr=xr(4),wT=xr(5),_T=xr(6);so.range;va.range;bT.range;xT.range;Wr.range;wT.range;_T.range;const Bd=Te(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());Bd.range;const Fd=Te(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());Fd.range;const It=Te(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());It.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Te(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)});It.range;const Nt=Te(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());Nt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Te(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)});Nt.range;function Fx(e,t,r,n,i,a){const o=[[or,1,jt],[or,5,5*jt],[or,15,15*jt],[or,30,30*jt],[a,1,it],[a,5,5*it],[a,15,15*it],[a,30,30*it],[i,1,Pt],[i,3,3*Pt],[i,6,6*Pt],[i,12,12*Pt],[n,1,$t],[n,2,2*$t],[r,1,Nd],[t,1,Im],[t,3,3*Im],[e,1,Bc]];function s(c,f,l){const d=f<c;d&&([c,f]=[f,c]);const h=l&&typeof l.range=="function"?l:u(c,f,l),m=h?h.range(c,+f+1):[];return d?m.reverse():m}function u(c,f,l){const d=Math.abs(f-c)/l,h=Od(([,,p])=>p).right(o,d);if(h===o.length)return e.every(ef(c/Bc,f/Bc,l));if(h===0)return ha.every(Math.max(ef(c,f,l),1));const[m,y]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return m.every(y)}return[s,u]}const[OT,ST]=Fx(Nt,Fd,so,Bx,Ld,Rd),[AT,jT]=Fx(It,Bd,oo,Oi,qd,Dd);function Fc(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 Wc(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 bn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function PT(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,c=xn(i),f=wn(i),l=xn(a),d=wn(a),h=xn(o),m=wn(o),y=xn(s),p=wn(s),x=xn(u),w=wn(u),O={a:q,A:D,b:F,B:K,c:null,d:Bm,e:Bm,f:YT,g:oE,G:uE,H:GT,I:VT,j:XT,L:Wx,m:ZT,M:JT,p:G,q:z,Q:zm,s:Um,S:QT,u:eE,U:tE,V:rE,w:nE,W:iE,x:null,X:null,y:aE,Y:sE,Z:cE,"%":Wm},_={a:V,A:fe,b:be,B:Ve,c:null,d:Fm,e:Fm,f:hE,g:OE,G:AE,H:lE,I:fE,j:dE,L:Ux,m:pE,M:vE,p:Jt,q:We,Q:zm,s:Um,S:yE,u:mE,U:gE,V:bE,w:xE,W:wE,x:null,X:null,y:_E,Y:SE,Z:jE,"%":Wm},g={a:k,A:E,b:T,B:C,c:$,d:qm,e:qm,f:zT,g:Rm,G:Dm,H:Lm,I:Lm,j:LT,L:WT,m:qT,M:BT,p:j,q:RT,Q:KT,s:HT,S:FT,u:MT,U:$T,V:IT,w:CT,W:NT,x:M,X:N,y:Rm,Y:Dm,Z:DT,"%":UT};O.x=b(r,O),O.X=b(n,O),O.c=b(t,O),_.x=b(r,_),_.X=b(n,_),_.c=b(t,_);function b(W,Y){return function(J){var L=[],ye=-1,te=0,_e=W.length,Oe,ze,Lt;for(J instanceof Date||(J=new Date(+J));++ye<_e;)W.charCodeAt(ye)===37&&(L.push(W.slice(te,ye)),(ze=Nm[Oe=W.charAt(++ye)])!=null?Oe=W.charAt(++ye):ze=Oe==="e"?" ":"0",(Lt=Y[Oe])&&(Oe=Lt(J,ze)),L.push(Oe),te=ye+1);return L.push(W.slice(te,ye)),L.join("")}}function S(W,Y){return function(J){var L=bn(1900,void 0,1),ye=A(L,W,J+="",0),te,_e;if(ye!=J.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(Y&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(te=Wc(bn(L.y,0,1)),_e=te.getUTCDay(),te=_e>4||_e===0?va.ceil(te):va(te),te=ao.offset(te,(L.V-1)*7),L.y=te.getUTCFullYear(),L.m=te.getUTCMonth(),L.d=te.getUTCDate()+(L.w+6)%7):(te=Fc(bn(L.y,0,1)),_e=te.getDay(),te=_e>4||_e===0?pa.ceil(te):pa(te),te=Oi.offset(te,(L.V-1)*7),L.y=te.getFullYear(),L.m=te.getMonth(),L.d=te.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),_e="Z"in L?Wc(bn(L.y,0,1)).getUTCDay():Fc(bn(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(_e+5)%7:L.w+L.U*7-(_e+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Wc(L)):Fc(L)}}function A(W,Y,J,L){for(var ye=0,te=Y.length,_e=J.length,Oe,ze;ye<te;){if(L>=_e)return-1;if(Oe=Y.charCodeAt(ye++),Oe===37){if(Oe=Y.charAt(ye++),ze=g[Oe in Nm?Y.charAt(ye++):Oe],!ze||(L=ze(W,J,L))<0)return-1}else if(Oe!=J.charCodeAt(L++))return-1}return L}function j(W,Y,J){var L=c.exec(Y.slice(J));return L?(W.p=f.get(L[0].toLowerCase()),J+L[0].length):-1}function k(W,Y,J){var L=h.exec(Y.slice(J));return L?(W.w=m.get(L[0].toLowerCase()),J+L[0].length):-1}function E(W,Y,J){var L=l.exec(Y.slice(J));return L?(W.w=d.get(L[0].toLowerCase()),J+L[0].length):-1}function T(W,Y,J){var L=x.exec(Y.slice(J));return L?(W.m=w.get(L[0].toLowerCase()),J+L[0].length):-1}function C(W,Y,J){var L=y.exec(Y.slice(J));return L?(W.m=p.get(L[0].toLowerCase()),J+L[0].length):-1}function $(W,Y,J){return A(W,t,Y,J)}function M(W,Y,J){return A(W,r,Y,J)}function N(W,Y,J){return A(W,n,Y,J)}function q(W){return o[W.getDay()]}function D(W){return a[W.getDay()]}function F(W){return u[W.getMonth()]}function K(W){return s[W.getMonth()]}function G(W){return i[+(W.getHours()>=12)]}function z(W){return 1+~~(W.getMonth()/3)}function V(W){return o[W.getUTCDay()]}function fe(W){return a[W.getUTCDay()]}function be(W){return u[W.getUTCMonth()]}function Ve(W){return s[W.getUTCMonth()]}function Jt(W){return i[+(W.getUTCHours()>=12)]}function We(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Y=b(W+="",O);return Y.toString=function(){return W},Y},parse:function(W){var Y=S(W+="",!1);return Y.toString=function(){return W},Y},utcFormat:function(W){var Y=b(W+="",_);return Y.toString=function(){return W},Y},utcParse:function(W){var Y=S(W+="",!0);return Y.toString=function(){return W},Y}}}var Nm={"-":"",_:" ",0:"0"},ke=/^\s*\d+/,TT=/^%/,ET=/[\\^$*+?|[\]().{}]/g;function re(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 kT(e){return e.replace(ET,"\\$&")}function xn(e){return new RegExp("^(?:"+e.map(kT).join("|")+")","i")}function wn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function CT(e,t,r){var n=ke.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function MT(e,t,r){var n=ke.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function $T(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function IT(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function NT(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Dm(e,t,r){var n=ke.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Rm(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function DT(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 RT(e,t,r){var n=ke.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function qT(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function qm(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function LT(e,t,r){var n=ke.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Lm(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function BT(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function FT(e,t,r){var n=ke.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function WT(e,t,r){var n=ke.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function zT(e,t,r){var n=ke.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function UT(e,t,r){var n=TT.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function KT(e,t,r){var n=ke.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function HT(e,t,r){var n=ke.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Bm(e,t){return re(e.getDate(),t,2)}function GT(e,t){return re(e.getHours(),t,2)}function VT(e,t){return re(e.getHours()%12||12,t,2)}function XT(e,t){return re(1+Oi.count(It(e),e),t,3)}function Wx(e,t){return re(e.getMilliseconds(),t,3)}function YT(e,t){return Wx(e,t)+"000"}function ZT(e,t){return re(e.getMonth()+1,t,2)}function JT(e,t){return re(e.getMinutes(),t,2)}function QT(e,t){return re(e.getSeconds(),t,2)}function eE(e){var t=e.getDay();return t===0?7:t}function tE(e,t){return re(oo.count(It(e)-1,e),t,2)}function zx(e){var t=e.getDay();return t>=4||t===0?Fr(e):Fr.ceil(e)}function rE(e,t){return e=zx(e),re(Fr.count(It(e),e)+(It(e).getDay()===4),t,2)}function nE(e){return e.getDay()}function iE(e,t){return re(pa.count(It(e)-1,e),t,2)}function aE(e,t){return re(e.getFullYear()%100,t,2)}function oE(e,t){return e=zx(e),re(e.getFullYear()%100,t,2)}function sE(e,t){return re(e.getFullYear()%1e4,t,4)}function uE(e,t){var r=e.getDay();return e=r>=4||r===0?Fr(e):Fr.ceil(e),re(e.getFullYear()%1e4,t,4)}function cE(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+re(t/60|0,"0",2)+re(t%60,"0",2)}function Fm(e,t){return re(e.getUTCDate(),t,2)}function lE(e,t){return re(e.getUTCHours(),t,2)}function fE(e,t){return re(e.getUTCHours()%12||12,t,2)}function dE(e,t){return re(1+ao.count(Nt(e),e),t,3)}function Ux(e,t){return re(e.getUTCMilliseconds(),t,3)}function hE(e,t){return Ux(e,t)+"000"}function pE(e,t){return re(e.getUTCMonth()+1,t,2)}function vE(e,t){return re(e.getUTCMinutes(),t,2)}function yE(e,t){return re(e.getUTCSeconds(),t,2)}function mE(e){var t=e.getUTCDay();return t===0?7:t}function gE(e,t){return re(so.count(Nt(e)-1,e),t,2)}function Kx(e){var t=e.getUTCDay();return t>=4||t===0?Wr(e):Wr.ceil(e)}function bE(e,t){return e=Kx(e),re(Wr.count(Nt(e),e)+(Nt(e).getUTCDay()===4),t,2)}function xE(e){return e.getUTCDay()}function wE(e,t){return re(va.count(Nt(e)-1,e),t,2)}function _E(e,t){return re(e.getUTCFullYear()%100,t,2)}function OE(e,t){return e=Kx(e),re(e.getUTCFullYear()%100,t,2)}function SE(e,t){return re(e.getUTCFullYear()%1e4,t,4)}function AE(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Wr(e):Wr.ceil(e),re(e.getUTCFullYear()%1e4,t,4)}function jE(){return"+0000"}function Wm(){return"%"}function zm(e){return+e}function Um(e){return Math.floor(+e/1e3)}var Sr,Hx,Gx;PE({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 PE(e){return Sr=PT(e),Hx=Sr.format,Sr.parse,Gx=Sr.utcFormat,Sr.utcParse,Sr}function TE(e){return new Date(e)}function EE(e){return e instanceof Date?+e:+new Date(+e)}function Wd(e,t,r,n,i,a,o,s,u,c){var f=Td(),l=f.invert,d=f.domain,h=c(".%L"),m=c(":%S"),y=c("%I:%M"),p=c("%I %p"),x=c("%a %d"),w=c("%b %d"),O=c("%B"),_=c("%Y");function g(b){return(u(b)<b?h:s(b)<b?m:o(b)<b?y:a(b)<b?p:n(b)<b?i(b)<b?x:w:r(b)<b?O:_)(b)}return f.invert=function(b){return new Date(l(b))},f.domain=function(b){return arguments.length?d(Array.from(b,EE)):d().map(TE)},f.ticks=function(b){var S=d();return e(S[0],S[S.length-1],b??10)},f.tickFormat=function(b,S){return S==null?g:c(S)},f.nice=function(b){var S=d();return(!b||typeof b.range!="function")&&(b=t(S[0],S[S.length-1],b??10)),b?d($x(S,b)):f},f.copy=function(){return _i(f,Wd(e,t,r,n,i,a,o,s,u,c))},f}function kE(){return ct.apply(Wd(AT,jT,It,Bd,oo,Oi,qd,Dd,or,Hx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function CE(){return ct.apply(Wd(OT,ST,Nt,Fd,so,ao,Ld,Rd,or,Gx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uo(){var e=0,t=1,r,n,i,a,o=qe,s=!1,u;function c(l){return l==null||isNaN(l=+l)?u:o(i===0?.5:(l=(a(l)-r)*i,s?Math.max(0,Math.min(1,l)):l))}c.domain=function(l){return arguments.length?([e,t]=l,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(l){return arguments.length?(s=!!l,c):s},c.interpolator=function(l){return arguments.length?(o=l,c):o};function f(l){return function(d){var h,m;return arguments.length?([h,m]=d,o=l(h,m),c):[o(0),o(1)]}}return c.range=f(fn),c.rangeRound=f(Pd),c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return a=l,r=l(e),n=l(t),i=r===n?0:1/(n-r),c}}function Xt(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Vx(){var e=Vt(uo()(qe));return e.copy=function(){return Xt(e,Vx())},qt.apply(e,arguments)}function Xx(){var e=Cd(uo()).domain([1,10]);return e.copy=function(){return Xt(e,Xx()).base(e.base())},qt.apply(e,arguments)}function Yx(){var e=Md(uo());return e.copy=function(){return Xt(e,Yx()).constant(e.constant())},qt.apply(e,arguments)}function zd(){var e=$d(uo());return e.copy=function(){return Xt(e,zd()).exponent(e.exponent())},qt.apply(e,arguments)}function ME(){return zd.apply(null,arguments).exponent(.5)}function Zx(){var e=[],t=qe;function r(n){if(n!=null&&!isNaN(n=+n))return t((xi(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(Kt),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)=>gP(e,a/n))},r.copy=function(){return Zx(t).domain(e)},qt.apply(r,arguments)}function co(){var e=0,t=.5,r=1,n=1,i,a,o,s,u,c=qe,f,l=!1,d;function h(y){return isNaN(y=+y)?d:(y=.5+((y=+f(y))-a)*(n*y<n*a?s:u),c(l?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),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(y){return arguments.length?(l=!!y,h):l},h.interpolator=function(y){return arguments.length?(c=y,h):c};function m(y){return function(p){var x,w,O;return arguments.length?([x,w,O]=p,c=UP(y,[x,w,O]),h):[c(0),c(.5),c(1)]}}return h.range=m(fn),h.rangeRound=m(Pd),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),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function Jx(){var e=Vt(co()(qe));return e.copy=function(){return Xt(e,Jx())},qt.apply(e,arguments)}function Qx(){var e=Cd(co()).domain([.1,1,10]);return e.copy=function(){return Xt(e,Qx()).base(e.base())},qt.apply(e,arguments)}function ew(){var e=Md(co());return e.copy=function(){return Xt(e,ew()).constant(e.constant())},qt.apply(e,arguments)}function Ud(){var e=$d(co());return e.copy=function(){return Xt(e,Ud()).exponent(e.exponent())},qt.apply(e,arguments)}function $E(){return Ud.apply(null,arguments).exponent(.5)}const Km=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:zn,scaleDiverging:Jx,scaleDivergingLog:Qx,scaleDivergingPow:Ud,scaleDivergingSqrt:$E,scaleDivergingSymlog:ew,scaleIdentity:Mx,scaleImplicit:tf,scaleLinear:da,scaleLog:Ix,scaleOrdinal:Sd,scalePoint:kn,scalePow:Id,scaleQuantile:Rx,scaleQuantize:qx,scaleRadial:Dx,scaleSequential:Vx,scaleSequentialLog:Xx,scaleSequentialPow:zd,scaleSequentialQuantile:Zx,scaleSequentialSqrt:ME,scaleSequentialSymlog:Yx,scaleSqrt:hT,scaleSymlog:Nx,scaleThreshold:Lx,scaleTime:kE,scaleUtc:CE,tickFormat:Cx},Symbol.toStringTag,{value:"Module"}));var zc,Hm;function tw(){if(Hm)return zc;Hm=1;var e=on();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var s=r[a],u=n(s);if(u!=null&&(c===void 0?u===u&&!e(u):i(u,c)))var c=u,f=s}return f}return zc=t,zc}var Uc,Gm;function IE(){if(Gm)return Uc;Gm=1;function e(t,r){return t>r}return Uc=e,Uc}var Kc,Vm;function NE(){if(Vm)return Kc;Vm=1;var e=tw(),t=IE(),r=ln();function n(i){return i&&i.length?e(i,r,t):void 0}return Kc=n,Kc}var DE=NE();const zt=le(DE);var Hc,Xm;function RE(){if(Xm)return Hc;Xm=1;function e(t,r){return t<r}return Hc=e,Hc}var Gc,Ym;function qE(){if(Ym)return Gc;Ym=1;var e=tw(),t=RE(),r=ln();function n(i){return i&&i.length?e(i,r,t):void 0}return Gc=n,Gc}var LE=qE();const lo=le(LE);var Vc,Zm;function BE(){if(Zm)return Vc;Zm=1;var e=od(),t=Gt(),r=fx(),n=He();function i(a,o){var s=n(a)?e:r;return s(a,t(o,3))}return Vc=i,Vc}var Xc,Jm;function FE(){if(Jm)return Xc;Jm=1;var e=cx(),t=BE();function r(n,i){return e(t(n,i),1)}return Xc=r,Xc}var WE=FE();const zE=le(WE);var Yc,Qm;function UE(){if(Qm)return Yc;Qm=1;var e=bd();function t(r,n){return e(r,n)}return Yc=t,Yc}var KE=UE();const zr=le(KE);var dn=1e9,HE={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Hd,he=!0,st="[DecimalError] ",lr=st+"Invalid argument: ",Kd=st+"Exponent out of range: ",hn=Math.floor,nr=Math.pow,GE=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Je,Ee=1e7,de=7,rw=9007199254740991,ya=hn(rw/de),U={};U.absoluteValue=U.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};U.comparedTo=U.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};U.decimalPlaces=U.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*de;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};U.dividedBy=U.div=function(e){return Ct(this,new this.constructor(e))};U.dividedToIntegerBy=U.idiv=function(e){var t=this,r=t.constructor;return se(Ct(t,new r(e),0,1),r.precision)};U.equals=U.eq=function(e){return!this.cmp(e)};U.exponent=function(){return we(this)};U.greaterThan=U.gt=function(e){return this.cmp(e)>0};U.greaterThanOrEqualTo=U.gte=function(e){return this.cmp(e)>=0};U.isInteger=U.isint=function(){return this.e>this.d.length-2};U.isNegative=U.isneg=function(){return this.s<0};U.isPositive=U.ispos=function(){return this.s>0};U.isZero=function(){return this.s===0};U.lessThan=U.lt=function(e){return this.cmp(e)<0};U.lessThanOrEqualTo=U.lte=function(e){return this.cmp(e)<1};U.logarithm=U.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(Je))throw Error(st+"NaN");if(r.s<1)throw Error(st+(r.s?"NaN":"-Infinity"));return r.eq(Je)?new n(0):(he=!1,t=Ct(Vn(r,a),Vn(e,a),a),he=!0,se(t,i))};U.minus=U.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?aw(t,e):nw(t,(e.s=-e.s,e))};U.modulo=U.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(st+"NaN");return r.s?(he=!1,t=Ct(r,e,0,1).times(e),he=!0,r.minus(t)):se(new n(r),i)};U.naturalExponential=U.exp=function(){return iw(this)};U.naturalLogarithm=U.ln=function(){return Vn(this)};U.negated=U.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};U.plus=U.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?nw(t,e):aw(t,(e.s=-e.s,e))};U.precision=U.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(lr+e);if(t=we(i)+1,n=i.d.length-1,r=n*de+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};U.squareRoot=U.sqrt=function(){var e,t,r,n,i,a,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(st+"NaN")}for(e=we(s),he=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=gt(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=hn((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 u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(Ct(s,a,o+2)).times(.5),gt(a.d).slice(0,o)===(t=gt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(se(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return he=!0,se(n,r)};U.times=U.mul=function(e){var t,r,n,i,a,o,s,u,c,f=this,l=f.constructor,d=f.d,h=(e=new l(e)).d;if(!f.s||!e.s)return new l(0);for(e.s*=f.s,r=f.e+e.e,u=d.length,c=h.length,u<c&&(a=d,d=h,h=a,o=u,u=c,c=o),a=[],o=u+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%Ee|0,t=s/Ee|0;a[i]=(a[i]+t)%Ee|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,he?se(e,l.precision):e};U.toDecimalPlaces=U.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(_t(e,0,dn),t===void 0?t=n.rounding:_t(t,0,8),se(r,e+we(r)+1,t))};U.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=pr(n,!0):(_t(e,0,dn),t===void 0?t=i.rounding:_t(t,0,8),n=se(new i(n),e+1,t),r=pr(n,!0,e+1)),r};U.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?pr(i):(_t(e,0,dn),t===void 0?t=a.rounding:_t(t,0,8),n=se(new a(i),e+we(i)+1,t),r=pr(n.abs(),!1,e+we(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};U.toInteger=U.toint=function(){var e=this,t=e.constructor;return se(new t(e),we(e)+1,t.rounding)};U.toNumber=function(){return+this};U.toPower=U.pow=function(e){var t,r,n,i,a,o,s=this,u=s.constructor,c=12,f=+(e=new u(e));if(!e.s)return new u(Je);if(s=new u(s),!s.s){if(e.s<1)throw Error(st+"Infinity");return s}if(s.eq(Je))return s;if(n=u.precision,e.eq(Je))return se(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=rw){for(i=new u(Je),t=Math.ceil(n/de+4),he=!1;r%2&&(i=i.times(s),tg(i.d,t)),r=hn(r/2),r!==0;)s=s.times(s),tg(s.d,t);return he=!0,e.s<0?new u(Je).div(i):se(i,n)}}else if(a<0)throw Error(st+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,he=!1,i=e.times(Vn(s,n+c)),he=!0,i=iw(i),i.s=a,i};U.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=we(i),n=pr(i,r<=a.toExpNeg||r>=a.toExpPos)):(_t(e,1,dn),t===void 0?t=a.rounding:_t(t,0,8),i=se(new a(i),e,t),r=we(i),n=pr(i,e<=r||r<=a.toExpNeg,e)),n};U.toSignificantDigits=U.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(_t(e,1,dn),t===void 0?t=n.rounding:_t(t,0,8)),se(new n(r),e,t)};U.toString=U.valueOf=U.val=U.toJSON=U[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=we(e),r=e.constructor;return pr(e,t<=r.toExpNeg||t>=r.toExpPos)};function nw(e,t){var r,n,i,a,o,s,u,c,f=e.constructor,l=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),he?se(t,l):t;if(u=e.d,c=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,s=c.length):(n=c,i=o,s=u.length),o=Math.ceil(l/de),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=u.length,a=c.length,s-a<0&&(a=s,n=c,c=u,u=n),r=0;a;)r=(u[--a]=u[a]+c[a]+r)/Ee|0,u[a]%=Ee;for(r&&(u.unshift(r),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,he?se(t,l):t}function _t(e,t,r){if(e!==~~e||e<t||e>r)throw Error(lr+e)}function gt(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=de-n.length,r&&(a+=Ft(r)),a+=n;o=e[t],n=o+"",r=de-n.length,r&&(a+=Ft(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Ct=(function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%Ee|0,o=a/Ee|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,u;if(a!=o)u=a>o?1:-1;else for(s=u=0;s<a;s++)if(n[s]!=i[s]){u=n[s]>i[s]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Ee+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,u,c,f,l,d,h,m,y,p,x,w,O,_,g,b,S,A,j=n.constructor,k=n.s==i.s?1:-1,E=n.d,T=i.d;if(!n.s)return new j(n);if(!i.s)throw Error(st+"Division by zero");for(u=n.e-i.e,S=T.length,g=E.length,h=new j(k),m=h.d=[],c=0;T[c]==(E[c]||0);)++c;if(T[c]>(E[c]||0)&&--u,a==null?w=a=j.precision:o?w=a+(we(n)-we(i))+1:w=a,w<0)return new j(0);if(w=w/de+2|0,c=0,S==1)for(f=0,T=T[0],w++;(c<g||f)&&w--;c++)O=f*Ee+(E[c]||0),m[c]=O/T|0,f=O%T|0;else{for(f=Ee/(T[0]+1)|0,f>1&&(T=e(T,f),E=e(E,f),S=T.length,g=E.length),_=S,y=E.slice(0,S),p=y.length;p<S;)y[p++]=0;A=T.slice(),A.unshift(0),b=T[0],T[1]>=Ee/2&&++b;do f=0,s=t(T,y,S,p),s<0?(x=y[0],S!=p&&(x=x*Ee+(y[1]||0)),f=x/b|0,f>1?(f>=Ee&&(f=Ee-1),l=e(T,f),d=l.length,p=y.length,s=t(l,y,d,p),s==1&&(f--,r(l,S<d?A:T,d))):(f==0&&(s=f=1),l=T.slice()),d=l.length,d<p&&l.unshift(0),r(y,l,p),s==-1&&(p=y.length,s=t(T,y,S,p),s<1&&(f++,r(y,S<p?A:T,p))),p=y.length):s===0&&(f++,y=[0]),m[c++]=f,s&&y[0]?y[p++]=E[_]||0:(y=[E[_]],p=1);while((_++<g||y[0]!==void 0)&&w--)}return m[0]||m.shift(),h.e=u,se(h,o?a+we(h)+1:a)}})();function iw(e,t){var r,n,i,a,o,s,u=0,c=0,f=e.constructor,l=f.precision;if(we(e)>16)throw Error(Kd+we(e));if(!e.s)return new f(Je);for(he=!1,s=l,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(nr(2,c))/Math.LN10*2+5|0,s+=n,r=i=a=new f(Je),f.precision=s;;){if(i=se(i.times(e),s),r=r.times(++u),o=a.plus(Ct(i,r,s)),gt(o.d).slice(0,s)===gt(a.d).slice(0,s)){for(;c--;)a=se(a.times(a),s);return f.precision=l,t==null?(he=!0,se(a,l)):a}a=o}}function we(e){for(var t=e.e*de,r=e.d[0];r>=10;r/=10)t++;return t}function Zc(e,t,r){if(t>e.LN10.sd())throw he=!0,r&&(e.precision=r),Error(st+"LN10 precision limit exceeded");return se(new e(e.LN10),t)}function Ft(e){for(var t="";e--;)t+="0";return t}function Vn(e,t){var r,n,i,a,o,s,u,c,f,l=1,d=10,h=e,m=h.d,y=h.constructor,p=y.precision;if(h.s<1)throw Error(st+(h.s?"NaN":"-Infinity"));if(h.eq(Je))return new y(0);if(t==null?(he=!1,c=p):c=t,h.eq(10))return t==null&&(he=!0),Zc(y,c);if(c+=d,y.precision=c,r=gt(m),n=r.charAt(0),a=we(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=gt(h.d),n=r.charAt(0),l++;a=we(h),n>1?(h=new y("0."+r),a++):h=new y(n+"."+r.slice(1))}else return u=Zc(y,c+2,p).times(a+""),h=Vn(new y(n+"."+r.slice(1)),c-d).plus(u),y.precision=p,t==null?(he=!0,se(h,p)):h;for(s=o=h=Ct(h.minus(Je),h.plus(Je),c),f=se(h.times(h),c),i=3;;){if(o=se(o.times(f),c),u=s.plus(Ct(o,new y(i),c)),gt(u.d).slice(0,c)===gt(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(Zc(y,c+2,p).times(a+""))),s=Ct(s,new y(l),c),y.precision=p,t==null?(he=!0,se(s,p)):s;s=u,i+=2}}function eg(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=hn(r/de),e.d=[],n=(r+1)%de,r<0&&(n+=de),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=de;n<i;)e.d.push(+t.slice(n,n+=de));t=t.slice(n),n=de-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),he&&(e.e>ya||e.e<-ya))throw Error(Kd+r)}else e.s=0,e.e=0,e.d=[0];return e}function se(e,t,r){var n,i,a,o,s,u,c,f,l=e.d;for(o=1,a=l[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=de,i=t,c=l[f=0];else{if(f=Math.ceil((n+1)/de),a=l.length,f>=a)return e;for(c=a=l[f],o=1;a>=10;a/=10)o++;n%=de,i=n-de+o}if(r!==void 0&&(a=nr(10,o-i-1),s=c/a%10|0,u=t<0||l[f+1]!==void 0||c%a,u=r<4?(s||u)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?i>0?c/nr(10,o-i):0:l[f-1])%10&1||r==(e.s<0?8:7))),t<1||!l[0])return u?(a=we(e),l.length=1,t=t-a-1,l[0]=nr(10,(de-t%de)%de),e.e=hn(-t/de)||0):(l.length=1,l[0]=e.e=e.s=0),e;if(n==0?(l.length=f,a=1,f--):(l.length=f+1,a=nr(10,de-n),l[f]=i>0?(c/nr(10,o-i)%nr(10,i)|0)*a:0),u)for(;;)if(f==0){(l[0]+=a)==Ee&&(l[0]=1,++e.e);break}else{if(l[f]+=a,l[f]!=Ee)break;l[f--]=0,a=1}for(n=l.length;l[--n]===0;)l.pop();if(he&&(e.e>ya||e.e<-ya))throw Error(Kd+we(e));return e}function aw(e,t){var r,n,i,a,o,s,u,c,f,l,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),he?se(t,h):t;if(u=e.d,l=t.d,n=t.e,c=e.e,u=u.slice(),o=c-n,o){for(f=o<0,f?(r=u,o=-o,s=l.length):(r=l,n=c,s=u.length),i=Math.max(Math.ceil(h/de),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,s=l.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(u[i]!=l[i]){f=u[i]<l[i];break}o=0}for(f&&(r=u,u=l,l=r,t.s=-t.s),s=u.length,i=l.length-s;i>0;--i)u[s++]=0;for(i=l.length;i>o;){if(u[--i]<l[i]){for(a=i;a&&u[--a]===0;)u[a]=Ee-1;--u[a],u[i]+=Ee}u[i]-=l[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=n,he?se(t,h):t):new d(0)}function pr(e,t,r){var n,i=we(e),a=gt(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Ft(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ft(-i-1)+a,r&&(n=r-o)>0&&(a+=Ft(n))):i>=o?(a+=Ft(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Ft(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Ft(n))),e.s<0?"-"+a:a}function tg(e,t){if(e.length>t)return e.length=t,!0}function ow(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(lr+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 eg(o,a.toString())}else if(typeof a!="string")throw Error(lr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,GE.test(a))eg(o,a);else throw Error(lr+a)}if(i.prototype=U,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=ow,i.config=i.set=VE,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 VE(e){if(!e||typeof e!="object")throw Error(st+"Object expected");var t,r,n,i=["precision",1,dn,"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(hn(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(lr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(lr+r+": "+n);return this}var Hd=ow(HE);Je=new Hd(1);const ae=Hd;function XE(e){return QE(e)||JE(e)||ZE(e)||YE()}function YE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZE(e,t){if(e){if(typeof e=="string")return of(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 of(e,t)}}function JE(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QE(e){if(Array.isArray(e))return of(e)}function of(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 ek=function(t){return t},sw={},uw=function(t){return t===sw},rg=function(t){return function r(){return arguments.length===0||arguments.length===1&&uw(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},tk=function e(t,r){return t===1?r:rg(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==sw}).length;return o>=t?r.apply(void 0,i):e(t-o,rg(function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var f=i.map(function(l){return uw(l)?u.shift():l});return r.apply(void 0,XE(f).concat(u))}))})},fo=function(t){return tk(t.length,t)},sf=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},rk=fo(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),nk=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return ek;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,u){return u(s)},a.apply(void 0,arguments))}},uf=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},cw=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(s,u){return s===r[u]})||(r=a,n=t.apply(void 0,a)),n}};function ik(e){var t;return e===0?t=1:t=Math.floor(new ae(e).abs().log(10).toNumber())+1,t}function ak(e,t,r){for(var n=new ae(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var ok=fo(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),sk=fo(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),uk=fo(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const ho={rangeStep:ak,getDigitCount:ik,interpolateNumber:ok,uninterpolateNumber:sk,uninterpolateTruncation:uk};function cf(e){return fk(e)||lk(e)||lw(e)||ck()}function ck(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
22
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lk(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function fk(e){if(Array.isArray(e))return lf(e)}function Xn(e,t){return pk(e)||hk(e,t)||lw(e,t)||dk()}function dk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lw(e,t){if(e){if(typeof e=="string")return lf(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 lf(e,t)}}function lf(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 hk(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](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function pk(e){if(Array.isArray(e))return e}function fw(e){var t=Xn(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function dw(e,t,r){if(e.lte(0))return new ae(0);var n=ho.getDigitCount(e.toNumber()),i=new ae(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new ae(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=s.mul(i);return t?u:new ae(Math.ceil(u))}function vk(e,t,r){var n=1,i=new ae(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ae(10).pow(ho.getDigitCount(e)-1),i=new ae(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ae(Math.floor(e)))}else e===0?i=new ae(Math.floor((t-1)/2)):r||(i=new ae(Math.floor(e)));var o=Math.floor((t-1)/2),s=nk(rk(function(u){return i.add(new ae(u-o).mul(n)).toNumber()}),sf);return s(0,t)}function hw(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 ae(0),tickMin:new ae(0),tickMax:new ae(0)};var a=dw(new ae(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ae(0):(o=new ae(e).add(t).div(2),o=o.sub(new ae(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new ae(t).sub(o).div(a).toNumber()),c=s+u+1;return c>r?hw(e,t,r,n,i+1):(c<r&&(u=t>0?u+(r-c):u,s=t>0?s:s+(r-c)),{step:a,tickMin:o.sub(new ae(s).mul(a)),tickMax:o.add(new ae(u).mul(a))})}function yk(e){var t=Xn(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),s=fw([r,n]),u=Xn(s,2),c=u[0],f=u[1];if(c===-1/0||f===1/0){var l=f===1/0?[c].concat(cf(sf(0,i-1).map(function(){return 1/0}))):[].concat(cf(sf(0,i-1).map(function(){return-1/0})),[f]);return r>n?uf(l):l}if(c===f)return vk(c,i,a);var d=hw(c,f,o,a),h=d.step,m=d.tickMin,y=d.tickMax,p=ho.rangeStep(m,y.add(new ae(.1).mul(h)),h);return r>n?uf(p):p}function mk(e,t){var r=Xn(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=fw([n,i]),s=Xn(o,2),u=s[0],c=s[1];if(u===-1/0||c===1/0)return[n,i];if(u===c)return[u];var f=Math.max(t,2),l=dw(new ae(c).sub(u).div(f-1),a,0),d=[].concat(cf(ho.rangeStep(new ae(u),new ae(c).sub(new ae(.99).mul(l)),l)),[c]);return n>i?uf(d):d}var gk=cw(yk),bk=cw(mk),xk="Invariant failed";function vr(e,t){throw new Error(xk)}var wk=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 ma(){return ma=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},ma.apply(this,arguments)}function _k(e,t){return jk(e)||Ak(e,t)||Sk(e,t)||Ok()}function Ok(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sk(e,t){if(e){if(typeof e=="string")return ng(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 ng(e,t)}}function ng(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 Ak(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function jk(e){if(Array.isArray(e))return e}function Pk(e,t){if(e==null)return{};var r=Tk(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 Tk(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 Ek(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kk(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,yw(n.key),n)}}function Ck(e,t,r){return t&&kk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mk(e,t,r){return t=ga(t),$k(e,pw()?Reflect.construct(t,r||[],ga(e).constructor):t.apply(e,r))}function $k(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 Ik(e)}function Ik(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pw=function(){return!!e})()}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(e)}function Nk(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&&ff(e,t)}function ff(e,t){return ff=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ff(e,t)}function vw(e,t,r){return t=yw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yw(e){var t=Dk(e,"string");return Ur(t)=="symbol"?t:t+""}function Dk(e,t){if(Ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ur(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Si=(function(e){function t(){return Ek(this,t),Mk(this,t,arguments)}return Nk(t,e),Ck(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,u=n.data,c=n.dataPointFormatter,f=n.xAxis,l=n.yAxis,d=Pk(n,wk),h=Z(d,!1);this.props.direction==="x"&&f.type!=="number"&&vr();var m=u.map(function(y){var p=c(y,s),x=p.x,w=p.y,O=p.value,_=p.errorVal;if(!_)return null;var g=[],b,S;if(Array.isArray(_)){var A=_k(_,2);b=A[0],S=A[1]}else b=S=_;if(a==="vertical"){var j=f.scale,k=w+i,E=k+o,T=k-o,C=j(O-b),$=j(O+S);g.push({x1:$,y1:E,x2:$,y2:T}),g.push({x1:C,y1:k,x2:$,y2:k}),g.push({x1:C,y1:E,x2:C,y2:T})}else if(a==="horizontal"){var M=l.scale,N=x+i,q=N-o,D=N+o,F=M(O-b),K=M(O+S);g.push({x1:q,y1:K,x2:D,y2:K}),g.push({x1:N,y1:F,x2:N,y2:K}),g.push({x1:q,y1:F,x2:D,y2:F})}return P.createElement(ce,ma({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 P.createElement("line",ma({},G,{key:"line-".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))}))});return P.createElement(ce,{className:"recharts-errorBars"},m)}}])})(P.Component);vw(Si,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});vw(Si,"displayName","ErrorBar");function Yn(e){"@babel/helpers - typeof";return Yn=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},Yn(e)}function ig(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 tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ig(Object(r),!0).forEach(function(n){Rk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rk(e,t,r){return t=qk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qk(e){var t=Lk(e,"string");return Yn(t)=="symbol"?t:t+""}function Lk(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mw=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Ze(r,Le);if(!o)return null;var s=Le.defaultProps,u=s!==void 0?tr(tr({},s),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:a==="children"?c=(n||[]).reduce(function(f,l){var d=l.item,h=l.props,m=h.sectors||h.data||[];return f.concat(m.map(function(y){return{type:o.props.iconType||d.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):c=(n||[]).map(function(f){var l=f.item,d=l.type.defaultProps,h=d!==void 0?tr(tr({},d),l.props):{},m=h.dataKey,y=h.name,p=h.legendType,x=h.hide;return{inactive:x,dataKey:m,type:u.iconType||p||"square",color:Gd(l),value:y||m,payload:h}}),tr(tr(tr({},u),Le.getWithHeight(o,i)),{},{payload:c,item:o})};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 ag(e){return zk(e)||Wk(e)||Fk(e)||Bk()}function Bk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fk(e,t){if(e){if(typeof e=="string")return df(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 df(e,t)}}function Wk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zk(e){if(Array.isArray(e))return df(e)}function df(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 og(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?og(Object(r),!0).forEach(function(n){Mr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mr(e,t,r){return t=Uk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uk(e){var t=Kk(e,"string");return Zn(t)=="symbol"?t:t+""}function Kk(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Be(e,t,r){return Q(e)||Q(t)?r:je(t)?at(e,t,r):X(t)?t(e):r}function Cn(e,t,r,n){var i=zE(e,function(s){return Be(s,t)});if(r==="number"){var a=i.filter(function(s){return B(s)||parseFloat(s)});return a.length?[lo(a),zt(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!Q(s)}):i;return o.map(function(s){return je(s)||s instanceof Date?s:""})}var Hk=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,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,c=0;c<s;c++){var f=c>0?i[c-1].coordinate:i[s-1].coordinate,l=i[c].coordinate,d=c>=s-1?i[0].coordinate:i[c+1].coordinate,h=void 0;if(vt(l-f)!==vt(d-l)){var m=[];if(vt(d-l)===vt(u[1]-u[0])){h=d;var y=l+u[1]-u[0];m[0]=Math.min(y,(y+f)/2),m[1]=Math.max(y,(y+f)/2)}else{h=f;var p=d+u[1]-u[0];m[0]=Math.min(l,(p+l)/2),m[1]=Math.max(l,(p+l)/2)}var x=[Math.min(l,(h+l)/2),Math.max(l,(h+l)/2)];if(t>x[0]&&t<=x[1]||t>=m[0]&&t<=m[1]){o=i[c].index;break}}else{var w=Math.min(f,d),O=Math.max(f,d);if(t>(w+l)/2&&t<=(O+l)/2){o=i[c].index;break}}}else for(var _=0;_<s;_++)if(_===0&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_>0&&_<s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_===s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2){o=n[_].index;break}return o},Gd=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,s=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:s;break;default:u=s;break}return u},Gk=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),u=0,c=s.length;u<c;u++)for(var f=a[s[u]].stackGroups,l=Object.keys(f),d=0,h=l.length;d<h;d++){var m=f[l[d]],y=m.items,p=m.cateAxisId,x=y.filter(function(S){return Et(S.type).indexOf("Bar")>=0});if(x&&x.length){var w=x[0].type.defaultProps,O=w!==void 0?me(me({},w),x[0].props):x[0].props,_=O.barSize,g=O[p];o[g]||(o[g]=[]);var b=Q(_)?r:_;o[g].push({item:x[0],stackList:x.slice(1),barSize:Q(b)?void 0:hr(b,n,0)})}}return o},Vk=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,u=o.length;if(u<1)return null;var c=hr(r,i,0,!0),f,l=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/u,m=o.reduce(function(_,g){return _+g.barSize||0},0);m+=(u-1)*c,m>=i&&(m-=(u-1)*c,c=0),m>=i&&h>0&&(d=!0,h*=.9,m=u*h);var y=(i-m)/2>>0,p={offset:y-c,size:0};f=o.reduce(function(_,g){var b={item:g.item,position:{offset:p.offset+p.size+c,size:d?h:g.barSize}},S=[].concat(ag(_),[b]);return p=S[S.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(A){S.push({item:A,position:p})}),S},l)}else{var x=hr(n,i,0,!0);i-2*x-(u-1)*c<=0&&(c=0);var w=(i-2*x-(u-1)*c)/u;w>1&&(w>>=0);var O=s===+s?Math.min(w,s):w;f=o.reduce(function(_,g,b){var S=[].concat(ag(_),[{item:g.item,position:{offset:x+(w+c)*b+(w-O)/2,size:O}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(A){S.push({item:A,position:S[S.length-1].position})}),S},l)}return f},Xk=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,u=o-(s.left||0)-(s.right||0),c=mw({children:a,legendWidth:u});if(c){var f=i||{},l=f.width,d=f.height,h=c.align,m=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&m==="middle")&&h!=="center"&&B(t[h]))return me(me({},t),{},Mr({},h,t[h]+(l||0)));if((y==="horizontal"||y==="vertical"&&h==="center")&&m!=="middle"&&B(t[m]))return me(me({},t),{},Mr({},m,t[m]+(d||0)))}return t},Yk=function(t,r,n){return Q(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},gw=function(t,r,n,i,a){var o=r.props.children,s=ot(o,Si).filter(function(c){return Yk(i,a,c.props.direction)});if(s&&s.length){var u=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var l=Be(f,n);if(Q(l))return c;var d=Array.isArray(l)?[lo(l),zt(l)]:[l,l],h=u.reduce(function(m,y){var p=Be(f,y,0),x=d[0]-Math.abs(Array.isArray(p)?p[0]:p),w=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(x,m[0]),Math.max(w,m[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},Zk=function(t,r,n,i,a){var o=r.map(function(s){return gw(t,s,n,a,i)}).filter(function(s){return!Q(s)});return o&&o.length?o.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},bw=function(t,r,n,i,a){var o=r.map(function(u){var c=u.props.dataKey;return n==="number"&&c&&gw(t,u,c,i)||Cn(t,c,n,a)});if(n==="number")return o.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(u,c){for(var f=0,l=c.length;f<l;f++)s[c[f]]||(s[c[f]]=!0,u.push(c[f]));return u},[])},xw=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},ww=function(t,r,n,i){if(i)return t.map(function(u){return u.coordinate});var a,o,s=t.map(function(u){return u.coordinate===r&&(a=!0),u.coordinate===n&&(o=!0),u.coordinate});return a||s.push(r),o||s.push(n),s},Tt=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,u=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?vt(s[0]-s[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(l){var d=a?a.indexOf(l):l;return{coordinate:i(d)+c,value:l,offset:c}});return f.filter(function(l){return!un(l.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(l,d){return{coordinate:i(l)+c,value:l,index:d,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(l){return{coordinate:i(l)+c,value:l,offset:c}}):i.domain().map(function(l,d){return{coordinate:i(l)+c,value:a?a[l]:l,index:d,offset:c}})},Jc=new WeakMap,Ri=function(t,r){if(typeof r!="function")return t;Jc.has(t)||Jc.set(t,new WeakMap);var n=Jc.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},Jk=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:zn(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:da(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:kn(),realScaleType:"point"}:a==="category"?{scale:zn(),realScaleType:"band"}:{scale:da(),realScaleType:"linear"};if(dr(i)){var u="scale".concat(Za(i));return{scale:(Km[u]||kn)(),realScaleType:Km[u]?u:"point"}}return X(i)?{scale:i}:{scale:kn(),realScaleType:"point"}},sg=1e-4,Qk=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])-sg,o=Math.max(i[0],i[1])+sg,s=t(r[0]),u=t(r[n-1]);(s<a||s>o||u<a||u>o)&&t.domain([r[0],r[n-1]])}},eC=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},tC=function(t,r){if(!r||r.length!==2||!B(r[0])||!B(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(!B(t[0])||t[0]<n)&&(a[0]=n),(!B(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},rC=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,s=0;s<r;++s){var u=un(t[s][n][1])?t[s][n][0]:t[s][n][1];u>=0?(t[s][n][0]=a,t[s][n][1]=a+u,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+u,o=t[s][n][1])}},nC=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 s=un(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},iC={sign:rC,expand:F1,none:Nr,silhouette:W1,wiggle:z1,positive:nC},aC=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=iC[n],o=B1().keys(i).value(function(s,u){return+Be(s,u,0)}).order(Fl).offset(a);return o(t)},oC=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,u={},c=s.reduce(function(l,d){var h,m=(h=d.type)!==null&&h!==void 0&&h.defaultProps?me(me({},d.type.defaultProps),d.props):d.props,y=m.stackId,p=m.hide;if(p)return l;var x=m[n],w=l[x]||{hasStack:!1,stackGroups:{}};if(je(y)){var O=w.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};O.items.push(d),w.hasStack=!0,w.stackGroups[y]=O}else w.stackGroups[cn("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return me(me({},l),{},Mr({},x,w))},u),f={};return Object.keys(c).reduce(function(l,d){var h=c[d];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(y,p){var x=h.stackGroups[p];return me(me({},y),{},Mr({},p,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:aC(t,x.items,a)}))},m)}return me(me({},l),{},Mr({},d,h))},f)},sC=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var f=gk(c,a,s);return t.domain([lo(f),zt(f)]),{niceTicks:f}}if(a&&i==="number"){var l=t.domain(),d=bk(l,a,s);return{niceTicks:d}}return null};function ba(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&&!Q(i[t.dataKey])){var s=Ki(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var u=Be(i,Q(o)?t.dataKey:o);return Q(u)?null:t.scale(u)}var ug=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var u=Be(o,r.dataKey,r.domain[s]);return Q(u)?null:r.scale(u)-a/2+i},uC=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]},cC=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(je(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},lC=function(t){return t.reduce(function(r,n){return[lo(n.concat([r[0]]).filter(B)),zt(n.concat([r[1]]).filter(B))]},[1/0,-1/0])},_w=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,u=s.reduce(function(c,f){var l=lC(f.slice(r,n+1));return[Math.min(c[0],l[0]),Math.max(c[1],l[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},cg=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,lg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hf=function(t,r,n){if(X(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(B(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(cg.test(t[0])){var a=+cg.exec(t[0])[1];i[0]=r[0]-a}else X(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(B(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(lg.test(t[1])){var o=+lg.exec(t[1])[1];i[1]=r[1]+o}else X(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},xa=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=wd(r,function(l){return l.coordinate}),o=1/0,s=1,u=a.length;s<u;s++){var c=a[s],f=a[s-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},fg=function(t,r,n){return!t||!t.length||zr(t,at(n,"type.defaultProps.domain"))?r:t},Ow=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,s=n.formatter,u=n.tooltipType,c=n.chartType,f=n.hide;return me(me({},Z(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:Gd(t),value:Be(r,i),type:u,payload:r,chartType:c,hide:f})};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 dg(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 hg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){fC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fC(e,t,r){return t=dC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dC(e){var t=hC(e,"string");return Jn(t)=="symbol"?t:t+""}function hC(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wa=Math.PI/180,pC=function(t){return t*180/Math.PI},Ie=function(t,r,n,i){return{x:t+Math.cos(-wa*i)*n,y:r+Math.sin(-wa*i)*n}},vC=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))},yC=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=vC({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var u=(n-a)/s,c=Math.acos(u);return i>o&&(c=2*Math.PI-c),{radius:s,angle:pC(c),angleInRadian:c}},mC=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}},gC=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},pg=function(t,r){var n=t.x,i=t.y,a=yC({x:n,y:i},r),o=a.radius,s=a.angle,u=r.innerRadius,c=r.outerRadius;if(o<u||o>c)return!1;if(o===0)return!0;var f=mC(r),l=f.startAngle,d=f.endAngle,h=s,m;if(l<=d){for(;h>d;)h-=360;for(;h<l;)h+=360;m=h>=l&&h<=d}else{for(;h>l;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=l}return m?hg(hg({},r),{},{radius:o,angle:gC(h,r)}):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)}var bC=["offset"];function xC(e){return SC(e)||OC(e)||_C(e)||wC()}function wC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _C(e,t){if(e){if(typeof e=="string")return pf(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 pf(e,t)}}function OC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SC(e){if(Array.isArray(e))return pf(e)}function pf(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 AC(e,t){if(e==null)return{};var r=jC(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 jC(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 vg(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 Ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vg(Object(r),!0).forEach(function(n){PC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PC(e,t,r){return t=TC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TC(e){var t=EC(e,"string");return Qn(t)=="symbol"?t:t+""}function EC(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ei(){return ei=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},ei.apply(this,arguments)}var kC=function(t){var r=t.value,n=t.formatter,i=Q(t.children)?r:t.children;return X(n)?n(i):i},CC=function(t,r){var n=vt(r-t),i=Math.min(Math.abs(r-t),360);return n*i},MC=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,u=a,c=u.cx,f=u.cy,l=u.innerRadius,d=u.outerRadius,h=u.startAngle,m=u.endAngle,y=u.clockWise,p=(l+d)/2,x=CC(h,m),w=x>=0?1:-1,O,_;i==="insideStart"?(O=h+w*o,_=y):i==="insideEnd"?(O=m-w*o,_=!y):i==="end"&&(O=m+w*o,_=y),_=x<=0?_:!_;var g=Ie(c,f,p,O),b=Ie(c,f,p,O+(_?1:-1)*359),S="M".concat(g.x,",").concat(g.y,`
|
|
27
|
+
A`).concat(p,",").concat(p,",0,1,").concat(_?0:1,`,
|
|
28
|
+
`).concat(b.x,",").concat(b.y),A=Q(t.id)?cn("recharts-radial-line-"):t.id;return P.createElement("text",ei({},n,{dominantBaseline:"central",className:ee("recharts-radial-bar-label",s)}),P.createElement("defs",null,P.createElement("path",{id:A,d:S})),P.createElement("textPath",{xlinkHref:"#".concat(A)},r))},$C=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,u=a.innerRadius,c=a.outerRadius,f=a.startAngle,l=a.endAngle,d=(f+l)/2;if(i==="outside"){var h=Ie(o,s,c+n,d),m=h.x,y=h.y;return{x:m,y,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var p=(u+c)/2,x=Ie(o,s,p,d),w=x.x,O=x.y;return{x:w,y:O,textAnchor:"middle",verticalAnchor:"middle"}},IC=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,u=o.y,c=o.width,f=o.height,l=f>=0?1:-1,d=l*i,h=l>0?"end":"start",m=l>0?"start":"end",y=c>=0?1:-1,p=y*i,x=y>0?"end":"start",w=y>0?"start":"end";if(a==="top"){var O={x:s+c/2,y:u-l*i,textAnchor:"middle",verticalAnchor:h};return Ae(Ae({},O),n?{height:Math.max(u-n.y,0),width:c}:{})}if(a==="bottom"){var _={x:s+c/2,y:u+f+d,textAnchor:"middle",verticalAnchor:m};return Ae(Ae({},_),n?{height:Math.max(n.y+n.height-(u+f),0),width:c}:{})}if(a==="left"){var g={x:s-p,y:u+f/2,textAnchor:x,verticalAnchor:"middle"};return Ae(Ae({},g),n?{width:Math.max(g.x-n.x,0),height:f}:{})}if(a==="right"){var b={x:s+c+p,y:u+f/2,textAnchor:w,verticalAnchor:"middle"};return Ae(Ae({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:f}:{})}var S=n?{width:c,height:f}:{};return a==="insideLeft"?Ae({x:s+p,y:u+f/2,textAnchor:w,verticalAnchor:"middle"},S):a==="insideRight"?Ae({x:s+c-p,y:u+f/2,textAnchor:x,verticalAnchor:"middle"},S):a==="insideTop"?Ae({x:s+c/2,y:u+d,textAnchor:"middle",verticalAnchor:m},S):a==="insideBottom"?Ae({x:s+c/2,y:u+f-d,textAnchor:"middle",verticalAnchor:h},S):a==="insideTopLeft"?Ae({x:s+p,y:u+d,textAnchor:w,verticalAnchor:m},S):a==="insideTopRight"?Ae({x:s+c-p,y:u+d,textAnchor:x,verticalAnchor:m},S):a==="insideBottomLeft"?Ae({x:s+p,y:u+f-d,textAnchor:w,verticalAnchor:h},S):a==="insideBottomRight"?Ae({x:s+c-p,y:u+f-d,textAnchor:x,verticalAnchor:h},S):sn(a)&&(B(a.x)||ir(a.x))&&(B(a.y)||ir(a.y))?Ae({x:s+hr(a.x,c),y:u+hr(a.y,f),textAnchor:"end",verticalAnchor:"end"},S):Ae({x:s+c/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},S)},NC=function(t){return"cx"in t&&B(t.cx)};function De(e){var t=e.offset,r=t===void 0?5:t,n=AC(e,bC),i=Ae({offset:r},n),a=i.viewBox,o=i.position,s=i.value,u=i.children,c=i.content,f=i.className,l=f===void 0?"":f,d=i.textBreakAll;if(!a||Q(s)&&Q(u)&&!R.isValidElement(c)&&!X(c))return null;if(R.isValidElement(c))return R.cloneElement(c,i);var h;if(X(c)){if(h=R.createElement(c,i),R.isValidElement(h))return h}else h=kC(i);var m=NC(a),y=Z(i,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return MC(i,h,y);var p=m?$C(i):IC(i);return P.createElement(ia,ei({className:ee("recharts-label",l)},y,p,{breakAll:d}),h)}De.displayName="Label";var Sw=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,u=t.radius,c=t.innerRadius,f=t.outerRadius,l=t.x,d=t.y,h=t.top,m=t.left,y=t.width,p=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(B(y)&&B(p)){if(B(l)&&B(d))return{x:l,y:d,width:y,height:p};if(B(h)&&B(m))return{x:h,y:m,width:y,height:p}}return B(l)&&B(d)?{x:l,y:d,width:0,height:0}:B(r)&&B(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:f||u||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},DC=function(t,r){return t?t===!0?P.createElement(De,{key:"label-implicit",viewBox:r}):je(t)?P.createElement(De,{key:"label-implicit",viewBox:r,value:t}):R.isValidElement(t)?t.type===De?R.cloneElement(t,{key:"label-implicit",viewBox:r}):P.createElement(De,{key:"label-implicit",content:t,viewBox:r}):X(t)?P.createElement(De,{key:"label-implicit",content:t,viewBox:r}):sn(t)?P.createElement(De,ei({viewBox:r},t,{key:"label-implicit"})):null:null},RC=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=Sw(t),o=ot(i,De).map(function(u,c){return R.cloneElement(u,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return o;var s=DC(t.label,r||a);return[s].concat(xC(o))};De.parseViewBox=Sw;De.renderCallByParent=RC;var Qc,yg;function qC(){if(yg)return Qc;yg=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Qc=e,Qc}var LC=qC();const BC=le(LC);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 FC=["valueAccessor"],WC=["data","dataKey","clockWise","id","textBreakAll"];function zC(e){return GC(e)||HC(e)||KC(e)||UC()}function UC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KC(e,t){if(e){if(typeof e=="string")return vf(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 vf(e,t)}}function HC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GC(e){if(Array.isArray(e))return vf(e)}function vf(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 _a(){return _a=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},_a.apply(this,arguments)}function mg(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 gg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mg(Object(r),!0).forEach(function(n){VC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VC(e,t,r){return t=XC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XC(e){var t=YC(e,"string");return ti(t)=="symbol"?t:t+""}function YC(e,t){if(ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bg(e,t){if(e==null)return{};var r=ZC(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 ZC(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 JC=function(t){return Array.isArray(t.value)?BC(t.value):t.value};function Mt(e){var t=e.valueAccessor,r=t===void 0?JC:t,n=bg(e,FC),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,u=n.textBreakAll,c=bg(n,WC);return!i||!i.length?null:P.createElement(ce,{className:"recharts-label-list"},i.map(function(f,l){var d=Q(a)?r(f,l):Be(f&&f.payload,a),h=Q(s)?{}:{id:"".concat(s,"-").concat(l)};return P.createElement(De,_a({},Z(f,!0),c,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:De.parseViewBox(Q(o)?f:gg(gg({},f),{},{clockWise:o})),key:"label-".concat(l),index:l}))}))}Mt.displayName="LabelList";function QC(e,t){return e?e===!0?P.createElement(Mt,{key:"labelList-implicit",data:t}):P.isValidElement(e)||X(e)?P.createElement(Mt,{key:"labelList-implicit",data:t,content:e}):sn(e)?P.createElement(Mt,_a({data:t},e,{key:"labelList-implicit"})):null:null}function eM(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=ot(n,Mt).map(function(o,s){return R.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=QC(e.label,t);return[a].concat(zC(i))}Mt.renderCallByParent=eM;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 yf(){return yf=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},yf.apply(this,arguments)}function xg(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 wg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(n){tM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tM(e,t,r){return t=rM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rM(e){var t=nM(e,"string");return ri(t)=="symbol"?t:t+""}function nM(e,t){if(ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iM=function(t,r){var n=vt(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},qi=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,u=t.cornerRadius,c=t.cornerIsExternal,f=u*(s?1:-1)+i,l=Math.asin(u/f)/wa,d=c?a:a+o*l,h=Ie(r,n,f,d),m=Ie(r,n,i,d),y=c?a-o*l:a,p=Ie(r,n,f*Math.cos(l*wa),y);return{center:h,circleTangency:m,lineTangency:p,theta:l}},Aw=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,u=iM(o,s),c=o+u,f=Ie(r,n,a,o),l=Ie(r,n,a,c),d="M ".concat(f.x,",").concat(f.y,`
|
|
30
|
+
A `).concat(a,",").concat(a,`,0,
|
|
31
|
+
`).concat(+(Math.abs(u)>180),",").concat(+(o>c),`,
|
|
32
|
+
`).concat(l.x,",").concat(l.y,`
|
|
33
|
+
`);if(i>0){var h=Ie(r,n,i,o),m=Ie(r,n,i,c);d+="L ".concat(m.x,",").concat(m.y,`
|
|
34
|
+
A `).concat(i,",").concat(i,`,0,
|
|
35
|
+
`).concat(+(Math.abs(u)>180),",").concat(+(o<=c),`,
|
|
36
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},aM=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,u=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,l=vt(f-c),d=qi({cx:r,cy:n,radius:a,angle:c,sign:l,cornerRadius:o,cornerIsExternal:u}),h=d.circleTangency,m=d.lineTangency,y=d.theta,p=qi({cx:r,cy:n,radius:a,angle:f,sign:-l,cornerRadius:o,cornerIsExternal:u}),x=p.circleTangency,w=p.lineTangency,O=p.theta,_=u?Math.abs(c-f):Math.abs(c-f)-y-O;if(_<0)return s?"M ".concat(m.x,",").concat(m.y,`
|
|
37
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
38
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
39
|
+
`):Aw({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:f});var g="M ".concat(m.x,",").concat(m.y,`
|
|
40
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(h.x,",").concat(h.y,`
|
|
41
|
+
A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(l<0),",").concat(x.x,",").concat(x.y,`
|
|
42
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(w.x,",").concat(w.y,`
|
|
43
|
+
`);if(i>0){var b=qi({cx:r,cy:n,radius:i,angle:c,sign:l,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),S=b.circleTangency,A=b.lineTangency,j=b.theta,k=qi({cx:r,cy:n,radius:i,angle:f,sign:-l,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),E=k.circleTangency,T=k.lineTangency,C=k.theta,$=u?Math.abs(c-f):Math.abs(c-f)-j-C;if($<0&&o===0)return"".concat(g,"L").concat(r,",").concat(n,"Z");g+="L".concat(T.x,",").concat(T.y,`
|
|
44
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(E.x,",").concat(E.y,`
|
|
45
|
+
A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(l>0),",").concat(S.x,",").concat(S.y,`
|
|
46
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(A.x,",").concat(A.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},oM={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},jw=function(t){var r=wg(wg({},oM),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,u=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,l=r.endAngle,d=r.className;if(o<a||f===l)return null;var h=ee("recharts-sector",d),m=o-a,y=hr(s,m,0,!0),p;return y>0&&Math.abs(f-l)<360?p=aM({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(y,m/2),forceCornerRadius:u,cornerIsExternal:c,startAngle:f,endAngle:l}):p=Aw({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:l}),P.createElement("path",yf({},Z(r,!0),{className:h,d:p,role:"img"}))};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 mf(){return mf=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},mf.apply(this,arguments)}function _g(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 Og(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_g(Object(r),!0).forEach(function(n){sM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sM(e,t,r){return t=uM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uM(e){var t=cM(e,"string");return ni(t)=="symbol"?t:t+""}function cM(e,t){if(ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sg={curveBasisClosed:E1,curveBasisOpen:k1,curveBasis:T1,curveBumpX:p1,curveBumpY:v1,curveLinearClosed:C1,curveLinear:Qa,curveMonotoneX:M1,curveMonotoneY:$1,curveNatural:I1,curveStep:N1,curveStepAfter:R1,curveStepBefore:D1},Li=function(t){return t.x===+t.x&&t.y===+t.y},_n=function(t){return t.x},On=function(t){return t.y},lM=function(t,r){if(X(t))return t;var n="curve".concat(Za(t));return(n==="curveMonotone"||n==="curveBump")&&r?Sg["".concat(n).concat(r==="vertical"?"Y":"X")]:Sg[n]||Qa},fM=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,u=t.connectNulls,c=u===void 0?!1:u,f=lM(n,s),l=c?a.filter(function(y){return Li(y)}):a,d;if(Array.isArray(o)){var h=c?o.filter(function(y){return Li(y)}):o,m=l.map(function(y,p){return Og(Og({},y),{},{base:h[p]})});return s==="vertical"?d=ki().y(On).x1(_n).x0(function(y){return y.base.x}):d=ki().x(_n).y1(On).y0(function(y){return y.base.y}),d.defined(Li).curve(f),d(m)}return s==="vertical"&&B(o)?d=ki().y(On).x1(_n).x0(o):B(o)?d=ki().x(_n).y1(On).y0(o):d=M0().x(_n).y(On),d.defined(Li).curve(f),d(l)},$r=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?fM(t):i;return R.createElement("path",mf({},Z(t,!1),Hi(t),{className:ee("recharts-curve",r),d:o,ref:a}))},el={exports:{}},tl,Ag;function dM(){if(Ag)return tl;Ag=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return tl=e,tl}var rl,jg;function hM(){if(jg)return rl;jg=1;var e=dM();function t(){}function r(){}return r.resetWarningCache=t,rl=function(){function n(o,s,u,c,f,l){if(l!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},rl}var Pg;function pM(){return Pg||(Pg=1,el.exports=hM()()),el.exports}var vM=pM();const ie=le(vM),{getOwnPropertyNames:yM,getOwnPropertySymbols:mM}=Object,{hasOwnProperty:gM}=Object.prototype;function nl(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Bi(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);const{cache:a}=i,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);const u=e(r,n,i);return a.delete(r),a.delete(n),u}}function bM(e){return e!=null?e[Symbol.toStringTag]:void 0}function Tg(e){return yM(e).concat(mM(e))}const xM=Object.hasOwn||((e,t)=>gM.call(e,t));function wr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const wM="__v",_M="__o",OM="_owner",{getOwnPropertyDescriptor:Eg,keys:kg}=Object;function SM(e,t){return e.byteLength===t.byteLength&&Oa(new Uint8Array(e),new Uint8Array(t))}function AM(e,t,r){let 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 jM(e,t){return e.byteLength===t.byteLength&&Oa(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function PM(e,t){return wr(e.getTime(),t.getTime())}function TM(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function EM(e,t){return e===t}function Cg(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,u=0;for(;(o=a.next())&&!o.done;){const c=t.entries();let f=!1,l=0;for(;(s=c.next())&&!s.done;){if(i[l]){l++;continue}const d=o.value,h=s.value;if(r.equals(d[0],h[0],u,l,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){f=i[l]=!0;break}l++}if(!f)return!1;u++}return!0}const kM=wr;function CM(e,t,r){const n=kg(e);let i=n.length;if(kg(t).length!==i)return!1;for(;i-- >0;)if(!Pw(e,t,r,n[i]))return!1;return!0}function Sn(e,t,r){const n=Tg(e);let i=n.length;if(Tg(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!Pw(e,t,r,a)||(o=Eg(e,a),s=Eg(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function MM(e,t){return wr(e.valueOf(),t.valueOf())}function $M(e,t){return e.source===t.source&&e.flags===t.flags}function Mg(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const u=t.values();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(!i[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1}return!0}function Oa(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function IM(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Pw(e,t,r,n){return(n===OM||n===_M||n===wM)&&(e.$$typeof||t.$$typeof)?!0:xM(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const NM="[object ArrayBuffer]",DM="[object Arguments]",RM="[object Boolean]",qM="[object DataView]",LM="[object Date]",BM="[object Error]",FM="[object Map]",WM="[object Number]",zM="[object Object]",UM="[object RegExp]",KM="[object Set]",HM="[object String]",GM={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},VM="[object URL]",XM=Object.prototype.toString;function YM({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:u,arePrimitiveWrappersEqual:c,areRegExpsEqual:f,areSetsEqual:l,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:m}){return function(p,x,w){if(p===x)return!0;if(p==null||x==null)return!1;const O=typeof p;if(O!==typeof x)return!1;if(O!=="object")return O==="number"?s(p,x,w):O==="function"?a(p,x,w):!1;const _=p.constructor;if(_!==x.constructor)return!1;if(_===Object)return u(p,x,w);if(Array.isArray(p))return t(p,x,w);if(_===Date)return n(p,x,w);if(_===RegExp)return f(p,x,w);if(_===Map)return o(p,x,w);if(_===Set)return l(p,x,w);const g=XM.call(p);if(g===LM)return n(p,x,w);if(g===UM)return f(p,x,w);if(g===FM)return o(p,x,w);if(g===KM)return l(p,x,w);if(g===zM)return typeof p.then!="function"&&typeof x.then!="function"&&u(p,x,w);if(g===VM)return h(p,x,w);if(g===BM)return i(p,x,w);if(g===DM)return u(p,x,w);if(GM[g])return d(p,x,w);if(g===NM)return e(p,x,w);if(g===qM)return r(p,x,w);if(g===RM||g===WM||g===HM)return c(p,x,w);if(m){let b=m[g];if(!b){const S=bM(p);S&&(b=m[S])}if(b)return b(p,x,w)}return!1}}function ZM({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:SM,areArraysEqual:r?Sn:AM,areDataViewsEqual:jM,areDatesEqual:PM,areErrorsEqual:TM,areFunctionsEqual:EM,areMapsEqual:r?nl(Cg,Sn):Cg,areNumbersEqual:kM,areObjectsEqual:r?Sn:CM,arePrimitiveWrappersEqual:MM,areRegExpsEqual:$M,areSetsEqual:r?nl(Mg,Sn):Mg,areTypedArraysEqual:r?nl(Oa,Sn):Oa,areUrlsEqual:IM,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Bi(n.areArraysEqual),a=Bi(n.areMapsEqual),o=Bi(n.areObjectsEqual),s=Bi(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function JM(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function QM({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,u){const{cache:c=e?new WeakMap:void 0,meta:f}=r();return t(s,u,{cache:c,equals:n,meta:f,strict:i})};if(e)return function(s,u){return t(s,u,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,u){return t(s,u,a)}}const e$=Yt();Yt({strict:!0});Yt({circular:!0});Yt({circular:!0,strict:!0});Yt({createInternalComparator:()=>wr});Yt({strict:!0,createInternalComparator:()=>wr});Yt({circular:!0,createInternalComparator:()=>wr});Yt({circular:!0,createInternalComparator:()=>wr,strict:!0});function Yt(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=ZM(e),o=YM(a),s=r?r(o):JM(o);return QM({circular:t,comparator:o,createState:n,equals:s,strict:i})}function t$(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function $g(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):t$(i)};requestAnimationFrame(n)}function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function r$(e){return o$(e)||a$(e)||i$(e)||n$()}function n$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
47
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i$(e,t){if(e){if(typeof e=="string")return Ig(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 Ig(e,t)}}function Ig(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 a$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o$(e){if(Array.isArray(e))return e}function s$(){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,s=r$(o),u=s[0],c=s.slice(1);if(typeof u=="number"){$g(i.bind(null,c),u);return}i(u),$g(i.bind(null,c));return}gf(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 ii(e){"@babel/helpers - typeof";return ii=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},ii(e)}function Ng(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 Dg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ng(Object(r),!0).forEach(function(n){Tw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ng(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tw(e,t,r){return t=u$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u$(e){var t=c$(e,"string");return ii(t)==="symbol"?t:String(t)}function c$(e,t){if(ii(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l$=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},f$=function(t){return t},d$=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Mn=function(t,r){return Object.keys(r).reduce(function(n,i){return Dg(Dg({},n),{},Tw({},i,t(i,r[i])))},{})},Rg=function(t,r,n){return t.map(function(i){return"".concat(d$(i)," ").concat(r,"ms ").concat(n)}).join(",")};function h$(e,t){return y$(e)||v$(e,t)||Ew(e,t)||p$()}function p$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function y$(e){if(Array.isArray(e))return e}function m$(e){return x$(e)||b$(e)||Ew(e)||g$()}function g$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ew(e,t){if(e){if(typeof e=="string")return bf(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 bf(e,t)}}function b$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x$(e){if(Array.isArray(e))return bf(e)}function bf(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 Sa=1e-4,kw=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},Cw=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},qg=function(t,r){return function(n){var i=kw(t,r);return Cw(i,n)}},w$=function(t,r){return function(n){var i=kw(t,r),a=[].concat(m$(i.map(function(o,s){return o*s}).slice(1)),[0]);return Cw(a,n)}},Lg=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],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var u=r[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var c=u[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=h$(c,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var l=qg(i,o),d=qg(a,s),h=w$(i,o),m=function(x){return x>1?1:x<0?0:x},y=function(x){for(var w=x>1?1:x,O=w,_=0;_<8;++_){var g=l(O)-w,b=h(O);if(Math.abs(g-w)<Sa||b<Sa)return d(O);O=m(O-g/b)}return d(O)};return y.isStepper=!1,y},_$=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,s=o===void 0?17:o,u=function(f,l,d){var h=-(f-l)*n,m=d*a,y=d+(h-m)*s/1e3,p=d*s/1e3+f;return Math.abs(p-l)<Sa&&Math.abs(y)<Sa?[l,0]:[p,y]};return u.isStepper=!0,u.dt=s,u},O$=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 Lg(i);case"spring":return _$();default:if(i.split("(")[0]==="cubic-bezier")return Lg(i)}return typeof i=="function"?i:null};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 Bg(e){return j$(e)||A$(e)||Mw(e)||S$()}function S$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j$(e){if(Array.isArray(e))return wf(e)}function Fg(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?Fg(Object(r),!0).forEach(function(n){xf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xf(e,t,r){return t=P$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P$(e){var t=T$(e,"string");return ai(t)==="symbol"?t:String(t)}function T$(e,t){if(ai(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ai(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E$(e,t){return M$(e)||C$(e,t)||Mw(e,t)||k$()}function k$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mw(e,t){if(e){if(typeof e=="string")return wf(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 wf(e,t)}}function wf(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 C$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function M$(e){if(Array.isArray(e))return e}var Aa=function(t,r,n){return t+(r-t)*n},_f=function(t){var r=t.from,n=t.to;return r!==n},$$=function e(t,r,n){var i=Mn(function(a,o){if(_f(o)){var s=t(o.from,o.to,o.velocity),u=E$(s,2),c=u[0],f=u[1];return Me(Me({},o),{},{from:c,velocity:f})}return o},r);return n<1?Mn(function(a,o){return _f(o)?Me(Me({},o),{},{velocity:Aa(o.velocity,i[a].velocity,n),from:Aa(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const I$=(function(e,t,r,n,i){var a=l$(e,t),o=a.reduce(function(p,x){return Me(Me({},p),{},xf({},x,[e[x],t[x]]))},{}),s=a.reduce(function(p,x){return Me(Me({},p),{},xf({},x,{from:e[x],velocity:0,to:t[x]}))},{}),u=-1,c,f,l=function(){return null},d=function(){return Mn(function(x,w){return w.from},s)},h=function(){return!Object.values(s).filter(_f).length},m=function(x){c||(c=x);var w=x-c,O=w/r.dt;s=$$(r,s,O),i(Me(Me(Me({},e),t),d())),c=x,h()||(u=requestAnimationFrame(l))},y=function(x){f||(f=x);var w=(x-f)/n,O=Mn(function(g,b){return Aa.apply(void 0,Bg(b).concat([r(w)]))},o);if(i(Me(Me(Me({},e),t),O)),w<1)u=requestAnimationFrame(l);else{var _=Mn(function(g,b){return Aa.apply(void 0,Bg(b).concat([r(1)]))},o);i(Me(Me(Me({},e),t),_))}};return l=r.isStepper?m:y,function(){return requestAnimationFrame(l),function(){cancelAnimationFrame(u)}}});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)}var N$=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function D$(e,t){if(e==null)return{};var r=R$(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 R$(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 il(e){return F$(e)||B$(e)||L$(e)||q$()}function q$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
52
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L$(e,t){if(e){if(typeof e=="string")return Of(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 Of(e,t)}}function B$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F$(e){if(Array.isArray(e))return Of(e)}function Of(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 Wg(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 ft(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wg(Object(r),!0).forEach(function(n){Tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tn(e,t,r){return t=$w(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z$(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,$w(n.key),n)}}function U$(e,t,r){return t&&z$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $w(e){var t=K$(e,"string");return Kr(t)==="symbol"?t:String(t)}function K$(e,t){if(Kr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H$(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&&Sf(e,t)}function Sf(e,t){return Sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Sf(e,t)}function G$(e){var t=V$();return function(){var n=ja(e),i;if(t){var a=ja(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Af(this,i)}}function Af(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 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 V$(){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 ja(e){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ja(e)}var Ot=(function(e){H$(r,e);var t=G$(r);function r(n,i){var a;W$(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,u=o.attributeName,c=o.from,f=o.to,l=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(jf(a)),a.changeStyle=a.changeStyle.bind(jf(a)),!s||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),Af(a);if(l&&l.length)a.state={style:l[0].style};else if(c){if(typeof d=="function")return a.state={style:c},Af(a);a.state={style:u?Tn({},u,c):c}}else a.state={style:{}};return a}return U$(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,s=a.canBegin,u=a.attributeName,c=a.shouldReAnimate,f=a.to,l=a.from,d=this.state.style;if(s){if(!o){var h={style:u?Tn({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(h);return}if(!(e$(i.to,f)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=m||c?l:i.to;if(this.state&&d){var p={style:u?Tn({},u,y):y};(u&&d[u]!==y||!u&&d!==y)&&this.setState(p)}this.runAnimation(ft(ft({},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,s=i.to,u=i.duration,c=i.easing,f=i.begin,l=i.onAnimationEnd,d=i.onAnimationStart,h=I$(o,s,O$(c),u,this.changeStyle),m=function(){a.stopJSAnimation=h()};this.manager.start([d,f,m,u,l])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,u=i.onAnimationStart,c=o[0],f=c.style,l=c.duration,d=l===void 0?0:l,h=function(y,p,x){if(x===0)return y;var w=p.duration,O=p.easing,_=O===void 0?"ease":O,g=p.style,b=p.properties,S=p.onAnimationEnd,A=x>0?o[x-1]:p,j=b||Object.keys(g);if(typeof _=="function"||_==="spring")return[].concat(il(y),[a.runJSAnimation.bind(a,{from:A.style,to:g,duration:w,easing:_}),w]);var k=Rg(j,w,_),E=ft(ft(ft({},A.style),g),{},{transition:k});return[].concat(il(y),[E,w,S]).filter(f$)};return this.manager.start([u].concat(il(o.reduce(h,[f,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=s$());var a=i.begin,o=i.duration,s=i.attributeName,u=i.to,c=i.easing,f=i.onAnimationStart,l=i.onAnimationEnd,d=i.steps,h=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var y=s?Tn({},s,u):u,p=Rg(Object.keys(y),o,c);m.start([f,a,ft(ft({},y),{},{transition:p}),o,l])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=D$(i,N$),c=R.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||c===0||o<=0)return a;var l=function(h){var m=h.props,y=m.style,p=y===void 0?{}:y,x=m.className,w=R.cloneElement(h,ft(ft({},u),{},{style:ft(ft({},p),f),className:x}));return w};return c===1?l(R.Children.only(a)):P.createElement("div",null,R.Children.map(a,function(d){return l(d)}))}}]),r})(R.PureComponent);Ot.displayName="Animate";Ot.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ot.propTypes={from:ie.oneOfType([ie.object,ie.string]),to:ie.oneOfType([ie.object,ie.string]),attributeName:ie.string,duration:ie.number,begin:ie.number,easing:ie.oneOfType([ie.string,ie.func]),steps:ie.arrayOf(ie.shape({duration:ie.number.isRequired,style:ie.object.isRequired,easing:ie.oneOfType([ie.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ie.func]),properties:ie.arrayOf("string"),onAnimationEnd:ie.func})),children:ie.oneOfType([ie.node,ie.func]),isActive:ie.bool,canBegin:ie.bool,onAnimationEnd:ie.func,shouldReAnimate:ie.bool,onAnimationStart:ie.func,onAnimationReStart:ie.func};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 Pa(){return Pa=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},Pa.apply(this,arguments)}function X$(e,t){return Q$(e)||J$(e,t)||Z$(e,t)||Y$()}function Y$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
53
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z$(e,t){if(e){if(typeof e=="string")return zg(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 zg(e,t)}}function zg(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 J$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Q$(e){if(Array.isArray(e))return e}function Ug(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 Kg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ug(Object(r),!0).forEach(function(n){eI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eI(e,t,r){return t=tI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tI(e){var t=rI(e,"string");return oi(t)=="symbol"?t:t+""}function rI(e,t){if(oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hg=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,u=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var l=[0,0,0,0],d=0,h=4;d<h;d++)l[d]=a[d]>o?o:a[d];f="M".concat(t,",").concat(r+s*l[0]),l[0]>0&&(f+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(c,",").concat(t+u*l[0],",").concat(r)),f+="L ".concat(t+n-u*l[1],",").concat(r),l[1]>0&&(f+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(c,`,
|
|
54
|
+
`).concat(t+n,",").concat(r+s*l[1])),f+="L ".concat(t+n,",").concat(r+i-s*l[2]),l[2]>0&&(f+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(c,`,
|
|
55
|
+
`).concat(t+n-u*l[2],",").concat(r+i)),f+="L ".concat(t+u*l[3],",").concat(r+i),l[3]>0&&(f+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(c,`,
|
|
56
|
+
`).concat(t,",").concat(r+i-s*l[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var m=Math.min(o,a);f="M ".concat(t,",").concat(r+s*m,`
|
|
57
|
+
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+u*m,",").concat(r,`
|
|
58
|
+
L `).concat(t+n-u*m,",").concat(r,`
|
|
59
|
+
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*m,`
|
|
60
|
+
L `).concat(t+n,",").concat(r+i-s*m,`
|
|
61
|
+
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+n-u*m,",").concat(r+i,`
|
|
62
|
+
L `).concat(t+u*m,",").concat(r+i,`
|
|
63
|
+
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t,",").concat(r+i-s*m," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},nI=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,u=r.height;if(Math.abs(s)>0&&Math.abs(u)>0){var c=Math.min(a,a+s),f=Math.max(a,a+s),l=Math.min(o,o+u),d=Math.max(o,o+u);return n>=c&&n<=f&&i>=l&&i<=d}return!1},iI={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Vd=function(t){var r=Kg(Kg({},iI),t),n=R.useRef(),i=R.useState(-1),a=X$(i,2),o=a[0],s=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&s(_)}catch{}},[]);var u=r.x,c=r.y,f=r.width,l=r.height,d=r.radius,h=r.className,m=r.animationEasing,y=r.animationDuration,p=r.animationBegin,x=r.isAnimationActive,w=r.isUpdateAnimationActive;if(u!==+u||c!==+c||f!==+f||l!==+l||f===0||l===0)return null;var O=ee("recharts-rectangle",h);return w?P.createElement(Ot,{canBegin:o>0,from:{width:f,height:l,x:u,y:c},to:{width:f,height:l,x:u,y:c},duration:y,animationEasing:m,isActive:w},function(_){var g=_.width,b=_.height,S=_.x,A=_.y;return P.createElement(Ot,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:y,isActive:x,easing:m},P.createElement("path",Pa({},Z(r,!0),{className:O,d:Hg(S,A,g,b,d),ref:n})))}):P.createElement("path",Pa({},Z(r,!0),{className:O,d:Hg(u,c,f,l,d)}))};function Pf(){return Pf=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},Pf.apply(this,arguments)}var po=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=ee("recharts-dot",a);return r===+r&&n===+n&&i===+i?R.createElement("circle",Pf({},Z(t,!1),Hi(t),{className:o,cx:r,cy:n,r:i})):null};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)}var aI=["x","y","top","left","width","height","className"];function Tf(){return Tf=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},Tf.apply(this,arguments)}function Gg(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 oI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gg(Object(r),!0).forEach(function(n){sI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sI(e,t,r){return t=uI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uI(e){var t=cI(e,"string");return si(t)=="symbol"?t:t+""}function cI(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(t==="string"?String:Number)(e)}function lI(e,t){if(e==null)return{};var r=fI(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 fI(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 dI=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},hI=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,u=t.left,c=u===void 0?0:u,f=t.width,l=f===void 0?0:f,d=t.height,h=d===void 0?0:d,m=t.className,y=lI(t,aI),p=oI({x:n,y:a,top:s,left:c,width:l,height:h},y);return!B(n)||!B(a)||!B(l)||!B(h)||!B(s)||!B(c)?null:P.createElement("path",Tf({},Z(p,!0),{className:ee("recharts-cross",m),d:dI(n,a,l,h,s,c)}))},al,Vg;function pI(){if(Vg)return al;Vg=1;var e=tx(),t=e(Object.getPrototypeOf,Object);return al=t,al}var ol,Xg;function vI(){if(Xg)return ol;Xg=1;var e=Dt(),t=pI(),r=Rt(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,u=o.call(Object);function c(f){if(!r(f)||e(f)!=n)return!1;var l=t(f);if(l===null)return!0;var d=s.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&o.call(d)==u}return ol=c,ol}var yI=vI();const mI=le(yI);var sl,Yg;function gI(){if(Yg)return sl;Yg=1;var e=Dt(),t=Rt(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return sl=n,sl}var bI=gI();const xI=le(bI);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 Ta(){return Ta=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},Ta.apply(this,arguments)}function wI(e,t){return AI(e)||SI(e,t)||OI(e,t)||_I()}function _I(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
64
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OI(e,t){if(e){if(typeof e=="string")return Zg(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 Zg(e,t)}}function Zg(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 SI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function AI(e){if(Array.isArray(e))return e}function Jg(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 Qg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jg(Object(r),!0).forEach(function(n){jI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jI(e,t,r){return t=PI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PI(e){var t=TI(e,"string");return ui(t)=="symbol"?t:t+""}function TI(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eb=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},EI={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},kI=function(t){var r=Qg(Qg({},EI),t),n=R.useRef(),i=R.useState(-1),a=wI(i,2),o=a[0],s=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var u=r.x,c=r.y,f=r.upperWidth,l=r.lowerWidth,d=r.height,h=r.className,m=r.animationEasing,y=r.animationDuration,p=r.animationBegin,x=r.isUpdateAnimationActive;if(u!==+u||c!==+c||f!==+f||l!==+l||d!==+d||f===0&&l===0||d===0)return null;var w=ee("recharts-trapezoid",h);return x?P.createElement(Ot,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:c},to:{upperWidth:f,lowerWidth:l,height:d,x:u,y:c},duration:y,animationEasing:m,isActive:x},function(O){var _=O.upperWidth,g=O.lowerWidth,b=O.height,S=O.x,A=O.y;return P.createElement(Ot,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:y,easing:m},P.createElement("path",Ta({},Z(r,!0),{className:w,d:eb(S,A,_,g,b),ref:n})))}):P.createElement("g",null,P.createElement("path",Ta({},Z(r,!0),{className:w,d:eb(u,c,f,l,d)})))},CI=["option","shapeType","propTransformer","activeClassName","isActive"];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 MI(e,t){if(e==null)return{};var r=$I(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 $I(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 tb(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 Ea(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tb(Object(r),!0).forEach(function(n){II(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function II(e,t,r){return t=NI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NI(e){var t=DI(e,"string");return ci(t)=="symbol"?t:t+""}function DI(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RI(e,t){return Ea(Ea({},t),e)}function qI(e,t){return e==="symbols"}function rb(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return P.createElement(Vd,r);case"trapezoid":return P.createElement(kI,r);case"sector":return P.createElement(jw,r);case"symbols":if(qI(t))return P.createElement(hd,r);break;default:return null}}function LI(e){return R.isValidElement(e)?e.props:e}function BI(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?RI:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,u=MI(e,CI),c;if(R.isValidElement(t))c=R.cloneElement(t,Ea(Ea({},u),LI(t)));else if(X(t))c=t(u);else if(mI(t)&&!xI(t)){var f=i(t,u);c=P.createElement(rb,{shapeType:r,elementProps:f})}else{var l=u;c=P.createElement(rb,{shapeType:r,elementProps:l})}return s?P.createElement(ce,{className:o},c):c}function vo(e,t){return t!=null&&"trapezoids"in e.props}function yo(e,t){return t!=null&&"sectors"in e.props}function li(e,t){return t!=null&&"points"in e.props}function FI(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 WI(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function zI(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function UI(e,t){var r;return vo(e,t)?r=FI:yo(e,t)?r=WI:li(e,t)&&(r=zI),r}function KI(e,t){var r;return vo(e,t)?r="trapezoids":yo(e,t)?r="sectors":li(e,t)&&(r="points"),r}function HI(e,t){if(vo(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(yo(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 li(e,t)?t.payload:{}}function GI(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=KI(r,t),a=HI(r,t),o=n.filter(function(u,c){var f=zr(a,u),l=r.props[i].filter(function(m){var y=UI(r,t);return y(m,t)}),d=r.props[i].indexOf(l[l.length-1]),h=c===d;return f&&h}),s=n.indexOf(o[o.length-1]);return s}var ul,nb;function VI(){if(nb)return ul;nb=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var s=-1,u=t(e((i-n)/(a||1)),0),c=Array(u);u--;)c[o?u:++s]=n,n+=a;return c}return ul=r,ul}var cl,ib;function Iw(){if(ib)return cl;ib=1;var e=mx(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*r}return i===i?i:0}return cl=n,cl}var ll,ab;function XI(){if(ab)return ll;ab=1;var e=VI(),t=no(),r=Iw();function n(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),s=s===void 0?a<o?1:-1:r(s),e(a,o,s,i)}}return ll=n,ll}var fl,ob;function YI(){if(ob)return fl;ob=1;var e=XI(),t=e();return fl=t,fl}var ZI=YI();const ka=le(ZI);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 sb(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 ub(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sb(Object(r),!0).forEach(function(n){Nw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nw(e,t,r){return t=JI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JI(e){var t=QI(e,"string");return fi(t)=="symbol"?t:t+""}function QI(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eN=["Webkit","Moz","O","ms"],tN=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=eN.reduce(function(a,o){return ub(ub({},a),{},Nw({},o+n,r))},{});return i[t]=r,i};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 Ca(){return Ca=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},Ca.apply(this,arguments)}function cb(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 dl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cb(Object(r),!0).forEach(function(n){Ye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lb(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,Rw(n.key),n)}}function nN(e,t,r){return t&&lb(e.prototype,t),r&&lb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function iN(e,t,r){return t=Ma(t),aN(e,Dw()?Reflect.construct(t,r||[],Ma(e).constructor):t.apply(e,r))}function aN(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 oN(e)}function oN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dw=function(){return!!e})()}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ma(e)}function sN(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&&Ef(e,t)}function Ef(e,t){return Ef=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ef(e,t)}function Ye(e,t,r){return t=Rw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rw(e){var t=uN(e,"string");return Hr(t)=="symbol"?t:t+""}function uN(e,t){if(Hr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cN=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var u=r.length,c=kn().domain(ka(0,u)).range([a,a+o-s]),f=c.domain().map(function(l){return c(l)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(i),scale:c,scaleValues:f}},fb=function(t){return t.changedTouches&&!!t.changedTouches.length},Gr=(function(e){function t(r){var n;return rN(this,t),n=iN(this,t,[r]),Ye(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Ye(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Ye(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),Ye(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Ye(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Ye(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Ye(n,"handleSlideDragStart",function(i){var a=fb(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 sN(t,e),nN(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,s=this.props,u=s.gap,c=s.data,f=c.length-1,l=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,l),m=t.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:m===f?f:m-m%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,u=Be(a[n],s,n);return X(o)?o(u,n):u}},{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,s=i.endX,u=this.props,c=u.x,f=u.width,l=u.travellerWidth,d=u.startIndex,h=u.endIndex,m=u.onChange,y=n.pageX-a;y>0?y=Math.min(y,c+f-l-s,c+f-l-o):y<0&&(y=Math.max(y,c-o,c-s));var p=this.getIndex({startX:o+y,endX:s+y});(p.startIndex!==d||p.endIndex!==h)&&m&&m(p),this.setState({startX:o+y,endX:s+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=fb(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,s=i.endX,u=i.startX,c=this.state[o],f=this.props,l=f.x,d=f.width,h=f.travellerWidth,m=f.onChange,y=f.gap,p=f.data,x={startX:this.state.startX,endX:this.state.endX},w=n.pageX-a;w>0?w=Math.min(w,l+d-h-c):w<0&&(w=Math.max(w,l-c)),x[o]=c+w;var O=this.getIndex(x),_=O.startIndex,g=O.endIndex,b=function(){var A=p.length-1;return o==="startX"&&(s>u?_%y===0:g%y===0)||s<u&&g===A||o==="endX"&&(s>u?g%y===0:_%y===0)||s>u&&g===A};this.setState(Ye(Ye({},o,c+w),"brushMoveStartX",n.pageX),function(){m&&b()&&m(O)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,u=o.startX,c=o.endX,f=this.state[i],l=s.indexOf(f);if(l!==-1){var d=l+n;if(!(d===-1||d>=s.length)){var h=s[d];i==="startX"&&h>=c||i==="endX"&&h<=u||this.setState(Ye({},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,s=n.height,u=n.fill,c=n.stroke;return P.createElement("rect",{stroke:c,fill:u,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.data,c=n.children,f=n.padding,l=R.Children.only(c);return l?P.cloneElement(l,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,u=this.props,c=u.y,f=u.travellerWidth,l=u.height,d=u.traveller,h=u.ariaLabel,m=u.data,y=u.startIndex,p=u.endIndex,x=Math.max(n,this.props.x),w=dl(dl({},Z(this.props,!1)),{},{x,y:c,width:f,height:l}),O=h||"Min value: ".concat((a=m[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=m[p])===null||o===void 0?void 0:o.name);return P.createElement(ce,{tabIndex:0,role:"slider","aria-label":O,"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(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,w))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,u=a.stroke,c=a.travellerWidth,f=Math.min(n,i)+c,l=Math.max(Math.abs(i-n)-c,0);return P.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:l,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,u=n.travellerWidth,c=n.stroke,f=this.state,l=f.startX,d=f.endX,h=5,m={pointerEvents:"none",fill:c};return P.createElement(ce,{className:"recharts-brush-texts"},P.createElement(ia,Ca({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,d)-h,y:o+s/2},m),this.getTextOfTick(i)),P.createElement(ia,Ca({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,d)+u+h,y:o+s/2},m),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,u=n.y,c=n.width,f=n.height,l=n.alwaysShowText,d=this.state,h=d.startX,m=d.endX,y=d.isTextActive,p=d.isSlideMoving,x=d.isTravellerMoving,w=d.isTravellerFocused;if(!i||!i.length||!B(s)||!B(u)||!B(c)||!B(f)||c<=0||f<=0)return null;var O=ee("recharts-brush",a),_=P.Children.count(o)===1,g=tN("userSelect","none");return P.createElement(ce,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(y||p||x||w||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,u=n.stroke,c=Math.floor(a+s/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:i,y:a,width:o,height:s,fill:u,stroke:"none"}),P.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),P.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return P.isValidElement(n)?a=P.cloneElement(n,i):X(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,u=n.travellerWidth,c=n.updateId,f=n.startIndex,l=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return dl({prevData:a,prevTravellerWidth:u,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?cN({data:a,width:o,x:s,travellerWidth:u,startIndex:f,endIndex:l}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+o-u]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:c,prevX:s,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,s=a-1;s-o>1;){var u=Math.floor((o+s)/2);n[u]>i?s=u:o=u}return i>=n[s]?s:o}}])})(R.PureComponent);Ye(Gr,"displayName","Brush");Ye(Gr,"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 hl,db;function lN(){if(db)return hl;db=1;var e=xd();function t(r,n){var i;return e(r,function(a,o,s){return i=n(a,o,s),!i}),!!i}return hl=t,hl}var pl,hb;function fN(){if(hb)return pl;hb=1;var e=V0(),t=Gt(),r=lN(),n=He(),i=no();function a(o,s,u){var c=n(o)?e:r;return u&&i(o,s,u)&&(s=void 0),c(o,t(s,3))}return pl=a,pl}var dN=fN();const hN=le(dN);var wt=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},vl,pb;function pN(){if(pb)return vl;pb=1;var e=dx();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return vl=t,vl}var yl,vb;function vN(){if(vb)return yl;vb=1;var e=pN(),t=lx(),r=Gt();function n(i,a){var o={};return a=r(a,3),t(i,function(s,u,c){e(o,u,a(s,u,c))}),o}return yl=n,yl}var yN=vN();const mN=le(yN);var ml,yb;function gN(){if(yb)return ml;yb=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(!r(t[n],n,t))return!1;return!0}return ml=e,ml}var gl,mb;function bN(){if(mb)return gl;mb=1;var e=xd();function t(r,n){var i=!0;return e(r,function(a,o,s){return i=!!n(a,o,s),i}),i}return gl=t,gl}var bl,gb;function xN(){if(gb)return bl;gb=1;var e=gN(),t=bN(),r=Gt(),n=He(),i=no();function a(o,s,u){var c=n(o)?e:t;return u&&i(o,s,u)&&(s=void 0),c(o,r(s,3))}return bl=a,bl}var wN=xN();const qw=le(wN);var _N=["x","y"];function di(e){"@babel/helpers - typeof";return di=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},di(e)}function kf(){return kf=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},kf.apply(this,arguments)}function bb(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 An(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bb(Object(r),!0).forEach(function(n){ON(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ON(e,t,r){return t=SN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SN(e){var t=AN(e,"string");return di(t)=="symbol"?t:t+""}function AN(e,t){if(di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jN(e,t){if(e==null)return{};var r=PN(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 PN(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 TN(e,t){var r=e.x,n=e.y,i=jN(e,_N),a="".concat(r),o=parseInt(a,10),s="".concat(n),u=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),l="".concat(t.width||i.width),d=parseInt(l,10);return An(An(An(An(An({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function xb(e){return P.createElement(BI,kf({shapeType:"rectangle",propTransformer:TN,activeClassName:"recharts-active-bar"},e))}var EN=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=B(n)||DO(n);return a?t(n,i):(a||vr(),r)}},kN=["value","background"],Lw;function Vr(e){"@babel/helpers - typeof";return Vr=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},Vr(e)}function CN(e,t){if(e==null)return{};var r=MN(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 MN(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 $a(){return $a=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},$a.apply(this,arguments)}function wb(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 xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wb(Object(r),!0).forEach(function(n){Ut(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _b(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,Fw(n.key),n)}}function IN(e,t,r){return t&&_b(e.prototype,t),r&&_b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function NN(e,t,r){return t=Ia(t),DN(e,Bw()?Reflect.construct(t,r||[],Ia(e).constructor):t.apply(e,r))}function DN(e,t){if(t&&(Vr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RN(e)}function RN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bw=function(){return!!e})()}function Ia(e){return Ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ia(e)}function qN(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&&Cf(e,t)}function Cf(e,t){return Cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cf(e,t)}function Ut(e,t,r){return t=Fw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fw(e){var t=LN(e,"string");return Vr(t)=="symbol"?t:t+""}function LN(e,t){if(Vr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pe=(function(e){function t(){var r;$N(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=NN(this,t,[].concat(i)),Ut(r,"state",{isAnimationFinished:!1}),Ut(r,"id",cn("recharts-bar-")),Ut(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ut(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return qN(t,e),IN(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,u=a.activeIndex,c=a.activeBar,f=Z(this.props,!1);return n&&n.map(function(l,d){var h=d===u,m=h?c:o,y=xe(xe(xe({},f),l),{},{isActive:h,option:m,index:d,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return P.createElement(ce,$a({className:"recharts-bar-rectangle"},Gi(i.props,l,d),{key:"rectangle-".concat(l==null?void 0:l.x,"-").concat(l==null?void 0:l.y,"-").concat(l==null?void 0:l.value,"-").concat(d)}),P.createElement(xb,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,u=i.animationBegin,c=i.animationDuration,f=i.animationEasing,l=i.animationId,d=this.state.prevData;return P.createElement(Ot,{begin:u,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,y=a.map(function(p,x){var w=d&&d[x];if(w){var O=$e(w.x,p.x),_=$e(w.y,p.y),g=$e(w.width,p.width),b=$e(w.height,p.height);return xe(xe({},p),{},{x:O(m),y:_(m),width:g(m),height:b(m)})}if(o==="horizontal"){var S=$e(0,p.height),A=S(m);return xe(xe({},p),{},{y:p.y+p.height-A,height:A})}var j=$e(0,p.width),k=j(m);return xe(xe({},p),{},{width:k})});return P.createElement(ce,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||!zr(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,u=Z(this.props.background,!1);return a.map(function(c,f){c.value;var l=c.background,d=CN(c,kN);if(!l)return null;var h=xe(xe(xe(xe(xe({},d),{},{fill:"#eee"},l),u),Gi(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return P.createElement(xb,$a({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,u=a.yAxis,c=a.layout,f=a.children,l=ot(f,Si);if(!l)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(p,x){var w=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:w,errorVal:Be(p,x)}},m={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(ce,m,l.map(function(y){return P.cloneElement(y,{key:"error-bar-".concat(i,"-").concat(y.props.dataKey),data:o,xAxis:s,yAxis:u,layout:c,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,u=n.yAxis,c=n.left,f=n.top,l=n.width,d=n.height,h=n.isAnimationActive,m=n.background,y=n.id;if(i||!a||!a.length)return null;var p=this.state.isAnimationFinished,x=ee("recharts-bar",o),w=s&&s.allowDataOverflow,O=u&&u.allowDataOverflow,_=w||O,g=Q(y)?this.id:y;return P.createElement(ce,{className:x},w||O?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(g)},P.createElement("rect",{x:w?c:c-l/2,y:O?f:f-d/2,width:w?l:l*2,height:O?d:d*2}))):null,P.createElement(ce,{className:"recharts-bar-rectangles",clipPath:_?"url(#clipPath-".concat(g,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,g),(!h||p)&&Mt.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}}])})(R.PureComponent);Lw=pe;Ut(pe,"displayName","Bar");Ut(pe,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!gr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ut(pe,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,u=e.yAxisTicks,c=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,h=eC(n,r);if(!h)return null;var m=t.layout,y=r.type.defaultProps,p=y!==void 0?xe(xe({},y),r.props):r.props,x=p.dataKey,w=p.children,O=p.minPointSize,_=m==="horizontal"?o:a,g=c?_.scale.domain():null,b=uC({numericAxis:_}),S=ot(w,bi),A=l.map(function(j,k){var E,T,C,$,M,N;c?E=tC(c[f+k],g):(E=Be(j,x),Array.isArray(E)||(E=[b,E]));var q=EN(O,Lw.defaultProps.minPointSize)(E[1],k);if(m==="horizontal"){var D,F=[o.scale(E[0]),o.scale(E[1])],K=F[0],G=F[1];T=ug({axis:a,ticks:s,bandSize:i,offset:h.offset,entry:j,index:k}),C=(D=G??K)!==null&&D!==void 0?D:void 0,$=h.size;var z=K-G;if(M=Number.isNaN(z)?0:z,N={x:T,y:o.y,width:$,height:o.height},Math.abs(q)>0&&Math.abs(M)<Math.abs(q)){var V=vt(M||q)*(Math.abs(q)-Math.abs(M));C-=V,M+=V}}else{var fe=[a.scale(E[0]),a.scale(E[1])],be=fe[0],Ve=fe[1];if(T=be,C=ug({axis:o,ticks:u,bandSize:i,offset:h.offset,entry:j,index:k}),$=Ve-be,M=h.size,N={x:a.x,y:C,width:a.width,height:M},Math.abs(q)>0&&Math.abs($)<Math.abs(q)){var Jt=vt($||q)*(Math.abs(q)-Math.abs($));$+=Jt}}return xe(xe(xe({},j),{},{x:T,y:C,width:$,height:M,value:c?E:E[1],payload:j,background:N},S&&S[k]&&S[k].props),{},{tooltipPayload:[Ow(r,j)],tooltipPosition:{x:T+$/2,y:C+M/2}})});return xe({data:A,layout:m},d)});function hi(e){"@babel/helpers - typeof";return hi=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},hi(e)}function BN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ob(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,Ww(n.key),n)}}function FN(e,t,r){return t&&Ob(e.prototype,t),r&&Ob(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sb(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?Sb(Object(r),!0).forEach(function(n){mo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mo(e,t,r){return t=Ww(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ww(e){var t=WN(e,"string");return hi(t)=="symbol"?t:t+""}function WN(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hi(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=t.width,s=t.height,u=t.layout,c=t.children,f=Object.keys(r),l={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!Ze(c,pe);return f.reduce(function(h,m){var y=r[m],p=y.orientation,x=y.domain,w=y.padding,O=w===void 0?{}:w,_=y.mirror,g=y.reversed,b="".concat(p).concat(_?"Mirror":""),S,A,j,k,E;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var T=x[1]-x[0],C=1/0,$=y.categoricalDomain.sort(LO);if($.forEach(function(fe,be){be>0&&(C=Math.min((fe||0)-($[be-1]||0),C))}),Number.isFinite(C)){var M=C/T,N=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(S=M*N/2),y.padding==="no-gap"){var q=hr(t.barCategoryGap,M*N),D=M*N/2;S=D-q-(D-q)/N*q}}}i==="xAxis"?A=[n.left+(O.left||0)+(S||0),n.left+n.width-(O.right||0)-(S||0)]:i==="yAxis"?A=u==="horizontal"?[n.top+n.height-(O.bottom||0),n.top+(O.top||0)]:[n.top+(O.top||0)+(S||0),n.top+n.height-(O.bottom||0)-(S||0)]:A=y.range,g&&(A=[A[1],A[0]]);var F=Jk(y,a,d),K=F.scale,G=F.realScaleType;K.domain(x).range(A),Qk(K);var z=sC(K,dt(dt({},y),{},{realScaleType:G}));i==="xAxis"?(E=p==="top"&&!_||p==="bottom"&&_,j=n.left,k=l[b]-E*y.height):i==="yAxis"&&(E=p==="left"&&!_||p==="right"&&_,j=l[b]-E*y.width,k=n.top);var V=dt(dt(dt({},y),z),{},{realScaleType:G,x:j,y:k,scale:K,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return V.bandSize=xa(V,z),!y.hide&&i==="xAxis"?l[b]+=(E?-1:1)*V.height:y.hide||(l[b]+=(E?-1:1)*V.width),dt(dt({},h),{},mo({},m,V))},{})},zw=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)}},zN=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return zw({x:r,y:n},{x:i,y:a})},Uw=(function(){function e(t){BN(this,e),this.scale=t}return FN(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 s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}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)}}])})();mo(Uw,"EPS",1e-4);var Yd=function(t){var r=Object.keys(t).reduce(function(n,i){return dt(dt({},n),{},mo({},i,Uw.create(t[i])))},{});return dt(dt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return mN(i,function(u,c){return r[c].apply(u,{bandAware:o,position:s})})},isInRange:function(i){return qw(i,function(a,o){return r[o].isInRange(a)})}})};function UN(e){return(e%180+180)%180}var KN=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=UN(i),o=a*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},xl,Ab;function HN(){if(Ab)return xl;Ab=1;var e=Gt(),t=gi(),r=to();function n(i){return function(a,o,s){var u=Object(a);if(!t(a)){var c=e(o,3);a=r(a),o=function(l){return c(u[l],l,u)}}var f=i(a,o,s);return f>-1?u[c?a[f]:f]:void 0}}return xl=n,xl}var wl,jb;function GN(){if(jb)return wl;jb=1;var e=Iw();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return wl=t,wl}var _l,Pb;function VN(){if(Pb)return _l;Pb=1;var e=ax(),t=Gt(),r=GN(),n=Math.max;function i(a,o,s){var u=a==null?0:a.length;if(!u)return-1;var c=s==null?0:r(s);return c<0&&(c=n(u+c,0)),e(a,t(o,3),c)}return _l=i,_l}var Ol,Tb;function XN(){if(Tb)return Ol;Tb=1;var e=HN(),t=VN(),r=e(t);return Ol=r,Ol}var YN=XN();const ZN=le(YN);var JN=x0();const QN=le(JN);var eD=QN(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("")}),Zd=R.createContext(void 0),Jd=R.createContext(void 0),Kw=R.createContext(void 0),Hw=R.createContext({}),Gw=R.createContext(void 0),Vw=R.createContext(0),Xw=R.createContext(0),Eb=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,u=t.width,c=t.height,f=eD(a);return P.createElement(Zd.Provider,{value:n},P.createElement(Jd.Provider,{value:i},P.createElement(Hw.Provider,{value:a},P.createElement(Kw.Provider,{value:f},P.createElement(Gw.Provider,{value:o},P.createElement(Vw.Provider,{value:c},P.createElement(Xw.Provider,{value:u},s)))))))},tD=function(){return R.useContext(Gw)},Yw=function(t){var r=R.useContext(Zd);r==null&&vr();var n=r[t];return n==null&&vr(),n},rD=function(){var t=R.useContext(Zd);return Wt(t)},nD=function(){var t=R.useContext(Jd),r=ZN(t,function(n){return qw(n.domain,Number.isFinite)});return r||Wt(t)},Zw=function(t){var r=R.useContext(Jd);r==null&&vr();var n=r[t];return n==null&&vr(),n},iD=function(){var t=R.useContext(Kw);return t},aD=function(){return R.useContext(Hw)},Qd=function(){return R.useContext(Xw)},eh=function(){return R.useContext(Vw)};function Xr(e){"@babel/helpers - typeof";return Xr=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},Xr(e)}function oD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sD(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,Qw(n.key),n)}}function uD(e,t,r){return t&&sD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cD(e,t,r){return t=Na(t),lD(e,Jw()?Reflect.construct(t,r||[],Na(e).constructor):t.apply(e,r))}function lD(e,t){if(t&&(Xr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fD(e)}function fD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jw=function(){return!!e})()}function Na(e){return Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Na(e)}function dD(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&&Mf(e,t)}function Mf(e,t){return Mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Mf(e,t)}function kb(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 Cb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kb(Object(r),!0).forEach(function(n){th(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function th(e,t,r){return t=Qw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qw(e){var t=hD(e,"string");return Xr(t)=="symbol"?t:t+""}function hD(e,t){if(Xr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function pD(e,t){return gD(e)||mD(e,t)||yD(e,t)||vD()}function vD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yD(e,t){if(e){if(typeof e=="string")return Mb(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 Mb(e,t)}}function Mb(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 mD(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function gD(e){if(Array.isArray(e))return e}function $f(){return $f=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},$f.apply(this,arguments)}var bD=function(t,r){var n;return P.isValidElement(t)?n=P.cloneElement(t,r):X(t)?n=t(r):n=P.createElement("line",$f({},r,{className:"recharts-reference-line-line"})),n},xD=function(t,r,n,i,a,o,s,u,c){var f=a.x,l=a.y,d=a.width,h=a.height;if(n){var m=c.y,y=t.y.apply(m,{position:o});if(wt(c,"discard")&&!t.y.isInRange(y))return null;var p=[{x:f+d,y},{x:f,y}];return u==="left"?p.reverse():p}if(r){var x=c.x,w=t.x.apply(x,{position:o});if(wt(c,"discard")&&!t.x.isInRange(w))return null;var O=[{x:w,y:l+h},{x:w,y:l}];return s==="top"?O.reverse():O}if(i){var _=c.segment,g=_.map(function(b){return t.apply(b,{position:o})});return wt(c,"discard")&&hN(g,function(b){return!t.isInRange(b)})?null:g}return null};function wD(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,u=e.alwaysShow,c=tD(),f=Yw(i),l=Zw(a),d=iD();if(!c||!d)return null;kt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Yd({x:f.scale,y:l.scale}),m=je(t),y=je(r),p=n&&n.length===2,x=xD(h,m,y,p,d,e.position,f.orientation,l.orientation,e);if(!x)return null;var w=pD(x,2),O=w[0],_=O.x,g=O.y,b=w[1],S=b.x,A=b.y,j=wt(e,"hidden")?"url(#".concat(c,")"):void 0,k=Cb(Cb({clipPath:j},Z(e,!0)),{},{x1:_,y1:g,x2:S,y2:A});return P.createElement(ce,{className:ee("recharts-reference-line",s)},bD(o,k),De.renderCallByParent(e,zN({x1:_,y1:g,x2:S,y2:A})))}var rh=(function(e){function t(){return oD(this,t),cD(this,t,arguments)}return dD(t,e),uD(t,[{key:"render",value:function(){return P.createElement(wD,this.props)}}])})(P.Component);th(rh,"displayName","ReferenceLine");th(rh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function If(){return If=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},If.apply(this,arguments)}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 $b(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 Ib(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){go(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OD(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,t_(n.key),n)}}function SD(e,t,r){return t&&OD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AD(e,t,r){return t=Da(t),jD(e,e_()?Reflect.construct(t,r||[],Da(e).constructor):t.apply(e,r))}function jD(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 PD(e)}function PD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e_=function(){return!!e})()}function Da(e){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Da(e)}function TD(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&&Nf(e,t)}function Nf(e,t){return Nf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nf(e,t)}function go(e,t,r){return t=t_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t_(e){var t=ED(e,"string");return Yr(t)=="symbol"?t:t+""}function ED(e,t){if(Yr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kD=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=Yd({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return wt(t,"discard")&&!o.isInRange(s)?null:s},bo=(function(e){function t(){return _D(this,t),AD(this,t,arguments)}return TD(t,e),SD(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,u=n.clipPathId,c=je(i),f=je(a);if(kt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var l=kD(this.props);if(!l)return null;var d=l.x,h=l.y,m=this.props,y=m.shape,p=m.className,x=wt(this.props,"hidden")?"url(#".concat(u,")"):void 0,w=Ib(Ib({clipPath:x},Z(this.props,!0)),{},{cx:d,cy:h});return P.createElement(ce,{className:ee("recharts-reference-dot",p)},t.renderDot(y,w),De.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])})(P.Component);go(bo,"displayName","ReferenceDot");go(bo,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});go(bo,"renderDot",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):X(e)?r=e(t):r=P.createElement(po,If({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Df(){return Df=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},Df.apply(this,arguments)}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 Nb(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 Db(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nb(Object(r),!0).forEach(function(n){xo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MD(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,n_(n.key),n)}}function $D(e,t,r){return t&&MD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ID(e,t,r){return t=Ra(t),ND(e,r_()?Reflect.construct(t,r||[],Ra(e).constructor):t.apply(e,r))}function ND(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 DD(e)}function DD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r_=function(){return!!e})()}function Ra(e){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ra(e)}function RD(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&&Rf(e,t)}function Rf(e,t){return Rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rf(e,t)}function xo(e,t,r){return t=n_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n_(e){var t=qD(e,"string");return Zr(t)=="symbol"?t:t+""}function qD(e,t){if(Zr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var LD=function(t,r,n,i,a){var o=a.x1,s=a.x2,u=a.y1,c=a.y2,f=a.xAxis,l=a.yAxis;if(!f||!l)return null;var d=Yd({x:f.scale,y:l.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(u,{position:"start"}):d.y.rangeMin},m={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(c,{position:"end"}):d.y.rangeMax};return wt(a,"discard")&&(!d.isInRange(h)||!d.isInRange(m))?null:zw(h,m)},wo=(function(e){function t(){return CD(this,t),ID(this,t,arguments)}return RD(t,e),$D(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,u=n.className,c=n.alwaysShow,f=n.clipPathId;kt(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=je(i),d=je(a),h=je(o),m=je(s),y=this.props.shape;if(!l&&!d&&!h&&!m&&!y)return null;var p=LD(l,d,h,m,this.props);if(!p&&!y)return null;var x=wt(this.props,"hidden")?"url(#".concat(f,")"):void 0;return P.createElement(ce,{className:ee("recharts-reference-area",u)},t.renderRect(y,Db(Db({clipPath:x},Z(this.props,!0)),p)),De.renderCallByParent(this.props,p))}}])})(P.Component);xo(wo,"displayName","ReferenceArea");xo(wo,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});xo(wo,"renderRect",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):X(e)?r=e(t):r=P.createElement(Vd,Df({},t,{className:"recharts-reference-area-rect"})),r});function i_(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 BD(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return KN(n,r)}function FD(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function qa(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 WD(e,t){return i_(e,t+1)}function zD(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,u=0,c=1,f=o,l=function(){var m=n==null?void 0:n[u];if(m===void 0)return{v:i_(n,c)};var y=u,p,x=function(){return p===void 0&&(p=r(m,y)),p},w=m.coordinate,O=u===0||qa(e,w,x,f,s);O||(u=0,f=o,c+=1),O&&(f=w+e*(x()/2+i),u+=c)},d;c<=a.length;)if(d=l(),d)return d.v;return[]}function pi(e){"@babel/helpers - typeof";return pi=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},pi(e)}function Rb(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 Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(r),!0).forEach(function(n){UD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UD(e,t,r){return t=KD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KD(e){var t=HD(e,"string");return pi(t)=="symbol"?t:t+""}function HD(e,t){if(pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GD(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,u=t.end,c=function(d){var h=a[d],m,y=function(){return m===void 0&&(m=r(h,d)),m};if(d===o-1){var p=e*(h.coordinate+e*y()/2-u);a[d]=h=Ne(Ne({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate})}else a[d]=h=Ne(Ne({},h),{},{tickCoord:h.coordinate});var x=qa(e,h.tickCoord,y,s,u);x&&(u=h.tickCoord-e*(y()/2+i),a[d]=Ne(Ne({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return a}function VD(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,u=t.start,c=t.end;if(a){var f=n[s-1],l=r(f,s-1),d=e*(f.coordinate+e*l/2-c);o[s-1]=f=Ne(Ne({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=qa(e,f.tickCoord,function(){return l},u,c);h&&(c=f.tickCoord-e*(l/2+i),o[s-1]=Ne(Ne({},f),{},{isShow:!0}))}for(var m=a?s-1:s,y=function(w){var O=o[w],_,g=function(){return _===void 0&&(_=r(O,w)),_};if(w===0){var b=e*(O.coordinate-e*g()/2-u);o[w]=O=Ne(Ne({},O),{},{tickCoord:b<0?O.coordinate-b*e:O.coordinate})}else o[w]=O=Ne(Ne({},O),{},{tickCoord:O.coordinate});var S=qa(e,O.tickCoord,g,u,c);S&&(u=O.tickCoord+e*(g()/2+i),o[w]=Ne(Ne({},O),{},{isShow:!0}))},p=0;p<m;p++)y(p);return o}function nh(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,u=e.interval,c=e.tickFormatter,f=e.unit,l=e.angle;if(!i||!i.length||!n)return[];if(B(u)||gr.isSsr)return WD(i,typeof u=="number"&&B(u)?u:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",m=f&&h==="width"?En(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(O,_){var g=X(c)?c(O.value,_):O.value;return h==="width"?BD(En(g,{fontSize:t,letterSpacing:r}),m,l):En(g,{fontSize:t,letterSpacing:r})[h]},p=i.length>=2?vt(i[1].coordinate-i[0].coordinate):1,x=FD(a,p,h);return u==="equidistantPreserveStart"?zD(p,x,y,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=VD(p,x,y,i,o,u==="preserveStartEnd"):d=GD(p,x,y,i,o),d.filter(function(w){return w.isShow}))}var XD=["viewBox"],YD=["viewBox"],ZD=["ticks"];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 Tr(){return Tr=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},Tr.apply(this,arguments)}function qb(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?qb(Object(r),!0).forEach(function(n){ih(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sl(e,t){if(e==null)return{};var r=JD(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 JD(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 QD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lb(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,o_(n.key),n)}}function eR(e,t,r){return t&&Lb(e.prototype,t),r&&Lb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tR(e,t,r){return t=La(t),rR(e,a_()?Reflect.construct(t,r||[],La(e).constructor):t.apply(e,r))}function rR(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 nR(e)}function nR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a_=function(){return!!e})()}function La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},La(e)}function iR(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&&qf(e,t)}function qf(e,t){return qf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qf(e,t)}function ih(e,t,r){return t=o_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o_(e){var t=aR(e,"string");return Jr(t)=="symbol"?t:t+""}function aR(e,t){if(Jr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pn=(function(e){function t(r){var n;return QD(this,t),n=tR(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return iR(t,e),eR(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=Sl(n,XD),s=this.props,u=s.viewBox,c=Sl(s,YD);return!kr(a,u)||!kr(o,c)||!kr(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,s=i.width,u=i.height,c=i.orientation,f=i.tickSize,l=i.mirror,d=i.tickMargin,h,m,y,p,x,w,O=l?-1:1,_=n.tickSize||f,g=B(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=m=n.coordinate,p=o+ +!l*u,y=p-O*_,w=y-O*d,x=g;break;case"left":y=p=n.coordinate,m=a+ +!l*s,h=m-O*_,x=h-O*d,w=g;break;case"right":y=p=n.coordinate,m=a+ +l*s,h=m+O*_,x=h+O*d,w=g;break;default:h=m=n.coordinate,p=o+ +l*u,y=p+O*_,w=y+O*d,x=g;break}return{line:{x1:h,y1:y,x2:m,y2:p},tick:{x,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,s=n.height,u=n.orientation,c=n.mirror,f=n.axisLine,l=Se(Se(Se({},Z(this.props,!1)),Z(f,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!c||u==="bottom"&&c);l=Se(Se({},l),{},{x1:i,y1:a+d*s,x2:i+o,y2:a+d*s})}else{var h=+(u==="left"&&!c||u==="right"&&c);l=Se(Se({},l),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+s})}return P.createElement("line",Tr({},l,{className:ee("recharts-cartesian-axis-line",at(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,u=s.tickLine,c=s.stroke,f=s.tick,l=s.tickFormatter,d=s.unit,h=nh(Se(Se({},this.props),{},{ticks:n}),i,a),m=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),p=Z(this.props,!1),x=Z(f,!1),w=Se(Se({},p),{},{fill:"none"},Z(u,!1)),O=h.map(function(_,g){var b=o.getTickLineCoord(_),S=b.line,A=b.tick,j=Se(Se(Se(Se({textAnchor:m,verticalAnchor:y},p),{},{stroke:"none",fill:c},x),A),{},{index:g,payload:_,visibleTicksCount:h.length,tickFormatter:l});return P.createElement(ce,Tr({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},Gi(o.props,_,g)),u&&P.createElement("line",Tr({},w,S,{className:ee("recharts-cartesian-axis-tick-line",at(u,"className"))})),f&&t.renderTickItem(f,j,"".concat(X(l)?l(_.value,g):_.value).concat(d||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},O)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,u=i.ticksGenerator,c=i.className,f=i.hide;if(f)return null;var l=this.props,d=l.ticks,h=Sl(l,ZD),m=d;return X(u)&&(m=d&&d.length>0?u(this.props):u(h)),o<=0||s<=0||!m||!m.length?null:P.createElement(ce,{className:ee("recharts-cartesian-axis",c),ref:function(p){n.layerReference=p}},a&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),De.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ee(i.className,"recharts-cartesian-axis-tick-value");return P.isValidElement(n)?o=P.cloneElement(n,Se(Se({},i),{},{className:s})):X(n)?o=n(Se(Se({},i),{},{className:s})):o=P.createElement(ia,Tr({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(R.Component);ih(pn,"displayName","CartesianAxis");ih(pn,"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 oR=["x1","y1","x2","y2","key"],sR=["offset"];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 Bb(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 Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(r),!0).forEach(function(n){uR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uR(e,t,r){return t=cR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cR(e){var t=lR(e,"string");return yr(t)=="symbol"?t:t+""}function lR(e,t){if(yr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(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 Fb(e,t){if(e==null)return{};var r=fR(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 fR(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 dR=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,s=t.height,u=t.ry;return P.createElement("rect",{x:i,y:a,ry:u,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function s_(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(X(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,u=Fb(t,oR),c=Z(u,!1);c.offset;var f=Fb(c,sR);r=P.createElement("line",sr({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function hR(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(s,u){var c=Re(Re({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(u),index:u});return s_(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function pR(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(s,u){var c=Re(Re({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(u),index:u});return s_(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function vR(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,u=e.horizontal,c=u===void 0?!0:u;if(!c||!t||!t.length)return null;var f=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var m=!f[h+1],y=m?i+o-d:f[h+1]-d;if(y<=0)return null;var p=h%t.length;return P.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 P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}function yR(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,u=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var f=c.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var m=!f[h+1],y=m?a+s-d:f[h+1]-d;if(y<=0)return null;var p=h%n.length;return P.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:y,height:u,stroke:"none",fill:n[p],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}var mR=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return ww(nh(Re(Re(Re({},pn.defaultProps),n),{},{ticks:Tt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},gR=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return ww(nh(Re(Re(Re({},pn.defaultProps),n),{},{ticks:Tt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Ar={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ge(e){var t,r,n,i,a,o,s=Qd(),u=eh(),c=aD(),f=Re(Re({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ar.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Ar.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Ar.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ar.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ar.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Ar.verticalFill,x:B(e.x)?e.x:c.left,y:B(e.y)?e.y:c.top,width:B(e.width)?e.width:c.width,height:B(e.height)?e.height:c.height}),l=f.x,d=f.y,h=f.width,m=f.height,y=f.syncWithTicks,p=f.horizontalValues,x=f.verticalValues,w=rD(),O=nD();if(!B(h)||h<=0||!B(m)||m<=0||!B(l)||l!==+l||!B(d)||d!==+d)return null;var _=f.verticalCoordinatesGenerator||mR,g=f.horizontalCoordinatesGenerator||gR,b=f.horizontalPoints,S=f.verticalPoints;if((!b||!b.length)&&X(g)){var A=p&&p.length,j=g({yAxis:O?Re(Re({},O),{},{ticks:A?p:O.ticks}):void 0,width:s,height:u,offset:c},A?!0:y);kt(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(yr(j),"]")),Array.isArray(j)&&(b=j)}if((!S||!S.length)&&X(_)){var k=x&&x.length,E=_({xAxis:w?Re(Re({},w),{},{ticks:k?x:w.ticks}):void 0,width:s,height:u,offset:c},k?!0:y);kt(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(yr(E),"]")),Array.isArray(E)&&(S=E)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(dR,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),P.createElement(hR,sr({},f,{offset:c,horizontalPoints:b,xAxis:w,yAxis:O})),P.createElement(pR,sr({},f,{offset:c,verticalPoints:S,xAxis:w,yAxis:O})),P.createElement(vR,sr({},f,{horizontalPoints:b})),P.createElement(yR,sr({},f,{verticalPoints:S})))}Ge.displayName="CartesianGrid";var bR=["type","layout","connectNulls","ref"],xR=["key"];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 Wb(e,t){if(e==null)return{};var r=wR(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 wR(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(){return $n=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},$n.apply(this,arguments)}function zb(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 Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zb(Object(r),!0).forEach(function(n){ht(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jr(e){return AR(e)||SR(e)||OR(e)||_R()}function _R(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OR(e,t){if(e){if(typeof e=="string")return Lf(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 Lf(e,t)}}function SR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AR(e){if(Array.isArray(e))return Lf(e)}function Lf(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 jR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ub(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,c_(n.key),n)}}function PR(e,t,r){return t&&Ub(e.prototype,t),r&&Ub(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function TR(e,t,r){return t=Ba(t),ER(e,u_()?Reflect.construct(t,r||[],Ba(e).constructor):t.apply(e,r))}function ER(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 kR(e)}function kR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u_=function(){return!!e})()}function Ba(e){return Ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ba(e)}function CR(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&&Bf(e,t)}function Bf(e,t){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bf(e,t)}function ht(e,t,r){return t=c_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c_(e){var t=MR(e,"string");return Qr(t)=="symbol"?t:t+""}function MR(e,t){if(Qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ut=(function(e){function t(){var r;jR(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=TR(this,t,[].concat(i)),ht(r,"state",{isAnimationFinished:!0,totalLength:0}),ht(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),ht(r,"getStrokeDasharray",function(o,s,u){var c=u.reduce(function(x,w){return x+w});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/c),l=o%c,d=s-o,h=[],m=0,y=0;m<u.length;y+=u[m],++m)if(y+u[m]>l){h=[].concat(jr(u.slice(0,m)),[l-y]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(jr(t.repeat(u,f)),jr(h),p).map(function(x){return"".concat(x,"px")}).join(", ")}),ht(r,"id",cn("recharts-line-")),ht(r,"pathRef",function(o){r.mainCurve=o}),ht(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),ht(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return CR(t,e),PR(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,u=a.yAxis,c=a.layout,f=a.children,l=ot(f,Si);if(!l)return null;var d=function(y,p){return{x:y.x,y:y.y,value:y.value,errorVal:Be(y.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(ce,h,l.map(function(m){return P.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:u,layout:c,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,c=s.points,f=s.dataKey,l=Z(this.props,!1),d=Z(u,!0),h=c.map(function(y,p){var x=Xe(Xe(Xe({key:"dot-".concat(p),r:3},l),d),{},{index:p,cx:y.x,cy:y.y,value:y.value,dataKey:f,payload:y.payload,points:c});return t.renderDotItem(u,x)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return P.createElement(ce,$n({className:"recharts-line-dots",key:"dots"},m),h)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,u=s.type,c=s.layout,f=s.connectNulls;s.ref;var l=Wb(s,bR),d=Xe(Xe(Xe({},Z(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:u,layout:c,connectNulls:f});return P.createElement($r,$n({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,u=o.strokeDasharray,c=o.isAnimationActive,f=o.animationBegin,l=o.animationDuration,d=o.animationEasing,h=o.animationId,m=o.animateNewValues,y=o.width,p=o.height,x=this.state,w=x.prevPoints,O=x.totalLength;return P.createElement(Ot,{begin:f,duration:l,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(_){var g=_.t;if(w){var b=w.length/s.length,S=s.map(function(T,C){var $=Math.floor(C*b);if(w[$]){var M=w[$],N=$e(M.x,T.x),q=$e(M.y,T.y);return Xe(Xe({},T),{},{x:N(g),y:q(g)})}if(m){var D=$e(y*2,T.x),F=$e(p/2,T.y);return Xe(Xe({},T),{},{x:D(g),y:F(g)})}return Xe(Xe({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(S,n,i)}var A=$e(0,O),j=A(g),k;if(u){var E="".concat(u).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});k=a.getStrokeDasharray(j,O,E)}else k=a.generateSimpleStrokeDasharray(O,j);return a.renderCurveStatically(s,n,i,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,u=this.state,c=u.prevPoints,f=u.totalLength;return s&&o&&o.length&&(!c&&f>0||!zr(c,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,u=i.className,c=i.xAxis,f=i.yAxis,l=i.top,d=i.left,h=i.width,m=i.height,y=i.isAnimationActive,p=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,O=ee("recharts-line",u),_=c&&c.allowDataOverflow,g=f&&f.allowDataOverflow,b=_||g,S=Q(p)?this.id:p,A=(n=Z(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=A.r,k=j===void 0?3:j,E=A.strokeWidth,T=E===void 0?2:E,C=A0(o)?o:{},$=C.clipDot,M=$===void 0?!0:$,N=k*2+T;return P.createElement(ce,{className:O},_||g?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(S)},P.createElement("rect",{x:_?d:d-h/2,y:g?l:l-m/2,width:_?h:h*2,height:g?m:m*2})),!M&&P.createElement("clipPath",{id:"clipPath-dots-".concat(S)},P.createElement("rect",{x:d-N/2,y:l-N/2,width:h+N,height:m+N}))):null,!w&&this.renderCurve(b,S),this.renderErrorBar(b,S),(w||o)&&this.renderDots(b,M,S),(!y||x)&&Mt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(jr(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(jr(o),jr(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(P.isValidElement(n))a=P.cloneElement(n,i);else if(X(n))a=n(i);else{var o=i.key,s=Wb(i,xR),u=ee("recharts-line-dot",typeof n!="boolean"?n.className:"");a=P.createElement(po,$n({key:o},s,{className:u}))}return a}}])})(R.PureComponent);ht(ut,"displayName","Line");ht(ut,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!gr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});ht(ut,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,u=e.displayedData,c=e.offset,f=t.layout,l=u.map(function(d,h){var m=Be(d,o);return f==="horizontal"?{x:ba({axis:r,ticks:i,bandSize:s,entry:d,index:h}),y:Q(m)?null:n.scale(m),value:m,payload:d}:{x:Q(m)?null:r.scale(m),y:ba({axis:n,ticks:a,bandSize:s,entry:d,index:h}),value:m,payload:d}});return Xe({points:l,layout:f},c)});var $R=["layout","type","stroke","connectNulls","isRange","ref"],IR=["key"],l_;function en(e){"@babel/helpers - typeof";return en=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},en(e)}function f_(e,t){if(e==null)return{};var r=NR(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 NR(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 ur(){return ur=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},ur.apply(this,arguments)}function Kb(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 Bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kb(Object(r),!0).forEach(function(n){bt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hb(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,h_(n.key),n)}}function RR(e,t,r){return t&&Hb(e.prototype,t),r&&Hb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qR(e,t,r){return t=Fa(t),LR(e,d_()?Reflect.construct(t,r||[],Fa(e).constructor):t.apply(e,r))}function LR(e,t){if(t&&(en(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BR(e)}function BR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d_=function(){return!!e})()}function Fa(e){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fa(e)}function FR(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&&Ff(e,t)}function Ff(e,t){return Ff=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ff(e,t)}function bt(e,t,r){return t=h_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h_(e){var t=WR(e,"string");return en(t)=="symbol"?t:t+""}function WR(e,t){if(en(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(en(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ke=(function(e){function t(){var r;DR(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=qR(this,t,[].concat(i)),bt(r,"state",{isAnimationFinished:!0}),bt(r,"id",cn("recharts-area-")),bt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),X(o)&&o()}),bt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),X(o)&&o()}),r}return FR(t,e),RR(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,c=u.dot,f=u.points,l=u.dataKey,d=Z(this.props,!1),h=Z(c,!0),m=f.map(function(p,x){var w=Bt(Bt(Bt({key:"dot-".concat(x),r:3},d),h),{},{index:x,cx:p.x,cy:p.y,dataKey:l,value:p.value,payload:p.payload,points:f});return t.renderDotItem(c,w)}),y={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return P.createElement(ce,ur({className:"recharts-area-dots"},y),m)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,u=o[0].x,c=o[o.length-1].x,f=n*Math.abs(u-c),l=zt(o.map(function(d){return d.y||0}));return B(a)&&typeof a=="number"?l=Math.max(a,l):a&&Array.isArray(a)&&a.length&&(l=Math.max(zt(a.map(function(d){return d.y||0})),l)),B(l)?P.createElement("rect",{x:u<c?u:u-f,y:0,width:f,height:Math.floor(l+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,u=o[0].y,c=o[o.length-1].y,f=n*Math.abs(u-c),l=zt(o.map(function(d){return d.x||0}));return B(a)&&typeof a=="number"?l=Math.max(a,l):a&&Array.isArray(a)&&a.length&&(l=Math.max(zt(a.map(function(d){return d.x||0})),l)),B(l)?P.createElement("rect",{x:0,y:u<c?u:u-f,width:l+(s?parseInt("".concat(s),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 s=this.props,u=s.layout,c=s.type,f=s.stroke,l=s.connectNulls,d=s.isRange;s.ref;var h=f_(s,$R);return P.createElement(ce,{clipPath:a?"url(#clipPath-".concat(o,")"):null},P.createElement($r,ur({},Z(h,!0),{points:n,connectNulls:l,type:c,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),f!=="none"&&P.createElement($r,ur({},Z(this.props,!1),{className:"recharts-area-curve",layout:u,type:c,connectNulls:l,fill:"none",points:n})),f!=="none"&&d&&P.createElement($r,ur({},Z(this.props,!1),{className:"recharts-area-curve",layout:u,type:c,connectNulls:l,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,u=o.baseLine,c=o.isAnimationActive,f=o.animationBegin,l=o.animationDuration,d=o.animationEasing,h=o.animationId,m=this.state,y=m.prevPoints,p=m.prevBaseLine;return P.createElement(Ot,{begin:f,duration:l,isActive:c,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var w=x.t;if(y){var O=y.length/s.length,_=s.map(function(A,j){var k=Math.floor(j*O);if(y[k]){var E=y[k],T=$e(E.x,A.x),C=$e(E.y,A.y);return Bt(Bt({},A),{},{x:T(w),y:C(w)})}return A}),g;if(B(u)&&typeof u=="number"){var b=$e(p,u);g=b(w)}else if(Q(u)||un(u)){var S=$e(p,0);g=S(w)}else g=u.map(function(A,j){var k=Math.floor(j*O);if(p[k]){var E=p[k],T=$e(E.x,A.x),C=$e(E.y,A.y);return Bt(Bt({},A),{},{x:T(w),y:C(w)})}return A});return a.renderAreaStatically(_,g,n,i)}return P.createElement(ce,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(w))),P.createElement(ce,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,u,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,s=a.baseLine,u=a.isAnimationActive,c=this.state,f=c.prevPoints,l=c.prevBaseLine,d=c.totalLength;return u&&o&&o.length&&(!f&&d>0||!zr(f,o)||!zr(l,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,u=i.className,c=i.top,f=i.left,l=i.xAxis,d=i.yAxis,h=i.width,m=i.height,y=i.isAnimationActive,p=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,O=ee("recharts-area",u),_=l&&l.allowDataOverflow,g=d&&d.allowDataOverflow,b=_||g,S=Q(p)?this.id:p,A=(n=Z(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=A.r,k=j===void 0?3:j,E=A.strokeWidth,T=E===void 0?2:E,C=A0(o)?o:{},$=C.clipDot,M=$===void 0?!0:$,N=k*2+T;return P.createElement(ce,{className:O},_||g?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(S)},P.createElement("rect",{x:_?f:f-h/2,y:g?c:c-m/2,width:_?h:h*2,height:g?m:m*2})),!M&&P.createElement("clipPath",{id:"clipPath-dots-".concat(S)},P.createElement("rect",{x:f-N/2,y:c-N/2,width:h+N,height:m+N}))):null,w?null:this.renderArea(b,S),(o||w)&&this.renderDots(b,M,S),(!y||x)&&Mt.renderCallByParent(this.props,s))}}],[{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}}])})(R.PureComponent);l_=Ke;bt(Ke,"displayName","Area");bt(Ke,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!gr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bt(Ke,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(B(s)&&typeof s=="number")return s;var u=i==="horizontal"?n:r,c=u.scale.domain();if(u.type==="number"){var f=Math.max(c[0],c[1]),l=Math.min(c[0],c[1]);return s==="dataMin"?l:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});bt(Ke,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,u=e.dataKey,c=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,h=t.layout,m=c&&c.length,y=l_.getBaseValue(t,r,n,i),p=h==="horizontal",x=!1,w=l.map(function(_,g){var b;m?b=c[f+g]:(b=Be(_,u),Array.isArray(b)?x=!0:b=[y,b]);var S=b[1]==null||m&&Be(_,u)==null;return p?{x:ba({axis:n,ticks:a,bandSize:s,entry:_,index:g}),y:S?null:i.scale(b[1]),value:b,payload:_}:{x:S?null:n.scale(b[1]),y:ba({axis:i,ticks:o,bandSize:s,entry:_,index:g}),value:b,payload:_}}),O;return m||x?O=w.map(function(_){var g=Array.isArray(_.value)?_.value[0]:null;return p?{x:_.x,y:g!=null&&_.y!=null?i.scale(g):null}:{x:g!=null?n.scale(g):null,y:_.y}}):O=p?i.scale(y):n.scale(y),Bt({points:w,baseLine:O,layout:h,isRange:x},d)});bt(Ke,"renderDotItem",function(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(X(e))r=e(t);else{var n=ee("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=f_(t,IR);r=P.createElement(po,ur({},a,{key:i,className:n}))}return r});function tn(e){"@babel/helpers - typeof";return tn=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},tn(e)}function zR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UR(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 KR(e,t,r){return t&&UR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HR(e,t,r){return t=Wa(t),GR(e,p_()?Reflect.construct(t,r||[],Wa(e).constructor):t.apply(e,r))}function GR(e,t){if(t&&(tn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VR(e)}function VR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p_=function(){return!!e})()}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wa(e)}function XR(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&&Wf(e,t)}function Wf(e,t){return Wf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wf(e,t)}function v_(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 y_(e){var t=YR(e,"string");return tn(t)=="symbol"?t:t+""}function YR(e,t){if(tn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function zf(){return zf=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},zf.apply(this,arguments)}function ZR(e){var t=e.xAxisId,r=Qd(),n=eh(),i=Yw(t);return i==null?null:R.createElement(pn,zf({},i,{className:ee("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Tt(o,!0)}}))}var Ce=(function(e){function t(){return zR(this,t),HR(this,t,arguments)}return XR(t,e),KR(t,[{key:"render",value:function(){return R.createElement(ZR,this.props)}}])})(R.Component);v_(Ce,"displayName","XAxis");v_(Ce,"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 rn(e){"@babel/helpers - typeof";return rn=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},rn(e)}function JR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QR(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,b_(n.key),n)}}function e2(e,t,r){return t&&QR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function t2(e,t,r){return t=za(t),r2(e,m_()?Reflect.construct(t,r||[],za(e).constructor):t.apply(e,r))}function r2(e,t){if(t&&(rn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n2(e)}function n2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m_=function(){return!!e})()}function za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},za(e)}function i2(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&&Uf(e,t)}function Uf(e,t){return Uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Uf(e,t)}function g_(e,t,r){return t=b_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b_(e){var t=a2(e,"string");return rn(t)=="symbol"?t:t+""}function a2(e,t){if(rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kf(){return Kf=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},Kf.apply(this,arguments)}var o2=function(t){var r=t.yAxisId,n=Qd(),i=eh(),a=Zw(r);return a==null?null:R.createElement(pn,Kf({},a,{className:ee("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return Tt(s,!0)}}))},ve=(function(e){function t(){return JR(this,t),t2(this,t,arguments)}return i2(t,e),e2(t,[{key:"render",value:function(){return R.createElement(o2,this.props)}}])})(R.Component);g_(ve,"displayName","YAxis");g_(ve,"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 Gb(e){return l2(e)||c2(e)||u2(e)||s2()}function s2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
67
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u2(e,t){if(e){if(typeof e=="string")return Hf(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 Hf(e,t)}}function c2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l2(e){if(Array.isArray(e))return Hf(e)}function Hf(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 Gf=function(t,r,n,i,a){var o=ot(t,rh),s=ot(t,bo),u=[].concat(Gb(o),Gb(s)),c=ot(t,wo),f="".concat(i,"Id"),l=i[0],d=r;if(u.length&&(d=u.reduce(function(y,p){if(p.props[f]===n&&wt(p.props,"extendDomain")&&B(p.props[l])){var x=p.props[l];return[Math.min(y[0],x),Math.max(y[1],x)]}return y},d)),c.length){var h="".concat(l,"1"),m="".concat(l,"2");d=c.reduce(function(y,p){if(p.props[f]===n&&wt(p.props,"extendDomain")&&B(p.props[h])&&B(p.props[m])){var x=p.props[h],w=p.props[m];return[Math.min(y[0],x,w),Math.max(y[1],x,w)]}return y},d)}return a&&a.length&&(d=a.reduce(function(y,p){return B(p)?[Math.min(y[0],p),Math.max(y[1],p)]:y},d)),d},Al={exports:{}},Vb;function f2(){return Vb||(Vb=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,c,f){this.fn=u,this.context=c,this.once=f||!1}function a(u,c,f,l,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,l||u,d),m=r?r+c:c;return u._events[m]?u._events[m].fn?u._events[m]=[u._events[m],h]:u._events[m].push(h):(u._events[m]=h,u._eventsCount++),u}function o(u,c){--u._eventsCount===0?u._events=new n:delete u._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,l;if(this._eventsCount===0)return c;for(l in f=this._events)t.call(f,l)&&c.push(r?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=r?r+c:c,l=this._events[f];if(!l)return[];if(l.fn)return[l.fn];for(var d=0,h=l.length,m=new Array(h);d<h;d++)m[d]=l[d].fn;return m},s.prototype.listenerCount=function(c){var f=r?r+c:c,l=this._events[f];return l?l.fn?1:l.length:0},s.prototype.emit=function(c,f,l,d,h,m){var y=r?r+c:c;if(!this._events[y])return!1;var p=this._events[y],x=arguments.length,w,O;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),x){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,l),!0;case 4:return p.fn.call(p.context,f,l,d),!0;case 5:return p.fn.call(p.context,f,l,d,h),!0;case 6:return p.fn.call(p.context,f,l,d,h,m),!0}for(O=1,w=new Array(x-1);O<x;O++)w[O-1]=arguments[O];p.fn.apply(p.context,w)}else{var _=p.length,g;for(O=0;O<_;O++)switch(p[O].once&&this.removeListener(c,p[O].fn,void 0,!0),x){case 1:p[O].fn.call(p[O].context);break;case 2:p[O].fn.call(p[O].context,f);break;case 3:p[O].fn.call(p[O].context,f,l);break;case 4:p[O].fn.call(p[O].context,f,l,d);break;default:if(!w)for(g=1,w=new Array(x-1);g<x;g++)w[g-1]=arguments[g];p[O].fn.apply(p[O].context,w)}}return!0},s.prototype.on=function(c,f,l){return a(this,c,f,l,!1)},s.prototype.once=function(c,f,l){return a(this,c,f,l,!0)},s.prototype.removeListener=function(c,f,l,d){var h=r?r+c:c;if(!this._events[h])return this;if(!f)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===f&&(!d||m.once)&&(!l||m.context===l)&&o(this,h);else{for(var y=0,p=[],x=m.length;y<x;y++)(m[y].fn!==f||d&&!m[y].once||l&&m[y].context!==l)&&p.push(m[y]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Al)),Al.exports}var d2=f2();const h2=le(d2);var jl=new h2,Pl="recharts.syncMouseEvents";function vi(e){"@babel/helpers - typeof";return vi=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},vi(e)}function p2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v2(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,x_(n.key),n)}}function y2(e,t,r){return t&&v2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tl(e,t,r){return t=x_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x_(e){var t=m2(e,"string");return vi(t)=="symbol"?t:t+""}function m2(e,t){if(vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var g2=(function(){function e(){p2(this,e),Tl(this,"activeIndex",0),Tl(this,"coordinateList",[]),Tl(this,"layout","horizontal")}return y2(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,u=r.layout,c=u===void 0?null:u,f=r.offset,l=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=s??this.container,this.layout=c??this.layout,this.offset=l??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,s=i.height,u=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,l=a+u+c,d=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:l,pageY:d})}}}])})();function b2(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&&B(n)&&B(i))return!0}return!1}function x2(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 w_(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=Ie(t,r,n,i),s=Ie(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function w2(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 s=t.cx,u=t.cy,c=t.innerRadius,f=t.outerRadius,l=t.angle,d=Ie(s,u,c,l),h=Ie(s,u,f,l);n=d.x,i=d.y,a=h.x,o=h.y}else return w_(t);return[{x:n,y:i},{x:a,y:o}]}function yi(e){"@babel/helpers - typeof";return yi=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},yi(e)}function Xb(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 Fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xb(Object(r),!0).forEach(function(n){_2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _2(e,t,r){return t=O2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O2(e){var t=S2(e,"string");return yi(t)=="symbol"?t:t+""}function S2(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A2(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,u=e.offset,c=e.activeTooltipIndex,f=e.tooltipAxisBandSize,l=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 m,y=$r;if(d==="ScatterChart")m=o,y=hI;else if(d==="BarChart")m=x2(l,o,u,f),y=Vd;else if(l==="radial"){var p=w_(o),x=p.cx,w=p.cy,O=p.radius,_=p.startAngle,g=p.endAngle;m={cx:x,cy:w,startAngle:_,endAngle:g,innerRadius:O,outerRadius:O},y=jw}else m={points:w2(l,o,u)},y=$r;var b=Fi(Fi(Fi(Fi({stroke:"#ccc",pointerEvents:"none"},u),m),Z(h,!1)),{},{payload:s,payloadIndex:c,className:ee("recharts-tooltip-cursor",h.className)});return R.isValidElement(h)?R.cloneElement(h,b):R.createElement(y,b)}var j2=["item"],P2=["children","className","width","height","style","compact","title","desc"];function nn(e){"@babel/helpers - typeof";return nn=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},nn(e)}function Er(){return Er=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},Er.apply(this,arguments)}function Yb(e,t){return k2(e)||E2(e,t)||O_(e,t)||T2()}function T2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function k2(e){if(Array.isArray(e))return e}function Zb(e,t){if(e==null)return{};var r=C2(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 C2(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 M2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $2(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,S_(n.key),n)}}function I2(e,t,r){return t&&$2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N2(e,t,r){return t=Ua(t),D2(e,__()?Reflect.construct(t,r||[],Ua(e).constructor):t.apply(e,r))}function D2(e,t){if(t&&(nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R2(e)}function R2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function __(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(__=function(){return!!e})()}function Ua(e){return Ua=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ua(e)}function q2(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&&Vf(e,t)}function Vf(e,t){return Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vf(e,t)}function an(e){return F2(e)||B2(e)||O_(e)||L2()}function L2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O_(e,t){if(e){if(typeof e=="string")return Xf(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 Xf(e,t)}}function B2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F2(e){if(Array.isArray(e))return Xf(e)}function Xf(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 Jb(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?Jb(Object(r),!0).forEach(function(n){H(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H(e,t,r){return t=S_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S_(e){var t=W2(e,"string");return nn(t)=="symbol"?t:t+""}function W2(e,t){if(nn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var z2={xAxis:["bottom","top"],yAxis:["left","right"]},U2={width:"100%",height:"100%"},A_={x:0,y:0};function Wi(e){return e}var K2=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},H2=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,s=i.radius;return I(I(I({},i),Ie(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var u=a.coordinate,c=i.angle;return I(I(I({},i),Ie(i.cx,i.cy,u,c)),{},{angle:c,radius:u})}return A_},_o=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,u){var c=u.props.data;return c&&c.length?[].concat(an(s),an(c)):s},[]);return o.length>0?o:t&&t.length&&B(i)&&B(a)?t.slice(i,a+1):[]};function j_(e){return e==="number"?[0,"auto"]:void 0}var Yf=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=_o(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(u,c){var f,l=(f=c.props.data)!==null&&f!==void 0?f:r;l&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(l=l.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=l===void 0?s:l;d=Ki(h,o.dataKey,i)}else d=l&&l[n]||s[n];return d?[].concat(an(u),[Ow(c,d)]):u},[])},Qb=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=K2(a,n),s=t.orderedTooltipTicks,u=t.tooltipAxis,c=t.tooltipTicks,f=Hk(o,s,c,u);if(f>=0&&c){var l=c[f]&&c[f].value,d=Yf(t,r,f,l),h=H2(n,s,f,a);return{activeTooltipIndex:f,activeLabel:l,activePayload:d,activeCoordinate:h}}return null},G2=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,l=t.children,d=t.stackOffset,h=xw(f,a);return n.reduce(function(m,y){var p,x=y.type.defaultProps!==void 0?I(I({},y.type.defaultProps),y.props):y.props,w=x.type,O=x.dataKey,_=x.allowDataOverflow,g=x.allowDuplicatedCategory,b=x.scale,S=x.ticks,A=x.includeHidden,j=x[o];if(m[j])return m;var k=_o(t.data,{graphicalItems:i.filter(function(z){var V,fe=o in z.props?z.props[o]:(V=z.type.defaultProps)===null||V===void 0?void 0:V[o];return fe===j}),dataStartIndex:u,dataEndIndex:c}),E=k.length,T,C,$;b2(x.domain,_,w)&&(T=hf(x.domain,null,_),h&&(w==="number"||b!=="auto")&&($=Cn(k,O,"category")));var M=j_(w);if(!T||T.length===0){var N,q=(N=x.domain)!==null&&N!==void 0?N:M;if(O){if(T=Cn(k,O,w),w==="category"&&h){var D=qO(T);g&&D?(C=T,T=ka(0,E)):g||(T=fg(q,T,y).reduce(function(z,V){return z.indexOf(V)>=0?z:[].concat(an(z),[V])},[]))}else if(w==="category")g?T=T.filter(function(z){return z!==""&&!Q(z)}):T=fg(q,T,y).reduce(function(z,V){return z.indexOf(V)>=0||V===""||Q(V)?z:[].concat(an(z),[V])},[]);else if(w==="number"){var F=Zk(k,i.filter(function(z){var V,fe,be=o in z.props?z.props[o]:(V=z.type.defaultProps)===null||V===void 0?void 0:V[o],Ve="hide"in z.props?z.props.hide:(fe=z.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return be===j&&(A||!Ve)}),O,a,f);F&&(T=F)}h&&(w==="number"||b!=="auto")&&($=Cn(k,O,"category"))}else h?T=ka(0,E):s&&s[j]&&s[j].hasStack&&w==="number"?T=d==="expand"?[0,1]:_w(s[j].stackGroups,u,c):T=bw(k,i.filter(function(z){var V=o in z.props?z.props[o]:z.type.defaultProps[o],fe="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return V===j&&(A||!fe)}),w,f,!0);if(w==="number")T=Gf(l,T,j,a,S),q&&(T=hf(q,T,_));else if(w==="category"&&q){var K=q,G=T.every(function(z){return K.indexOf(z)>=0});G&&(T=K)}}return I(I({},m),{},H({},j,I(I({},x),{},{axisType:a,domain:T,categoricalDomain:$,duplicateDomain:C,originalDomain:(p=x.domain)!==null&&p!==void 0?p:M,isCategorical:h,layout:f})))},{})},V2=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,l=t.children,d=_o(t.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:c}),h=d.length,m=xw(f,a),y=-1;return n.reduce(function(p,x){var w=x.type.defaultProps!==void 0?I(I({},x.type.defaultProps),x.props):x.props,O=w[o],_=j_("number");if(!p[O]){y++;var g;return m?g=ka(0,h):s&&s[O]&&s[O].hasStack?(g=_w(s[O].stackGroups,u,c),g=Gf(l,g,O,a)):(g=hf(_,bw(d,n.filter(function(b){var S,A,j=o in b.props?b.props[o]:(S=b.type.defaultProps)===null||S===void 0?void 0:S[o],k="hide"in b.props?b.props.hide:(A=b.type.defaultProps)===null||A===void 0?void 0:A.hide;return j===O&&!k}),"number",f),i.defaultProps.allowDataOverflow),g=Gf(l,g,O,a)),I(I({},p),{},H({},O,I(I({axisType:a},i.defaultProps),{},{hide:!0,orientation:at(z2,"".concat(a,".").concat(y%2),null),domain:g,originalDomain:_,isCategorical:m,layout:f})))}return p},{})},X2=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=t.children,l="".concat(i,"Id"),d=ot(f,a),h={};return d&&d.length?h=G2(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:l,stackGroups:s,dataStartIndex:u,dataEndIndex:c}):o&&o.length&&(h=V2(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:l,stackGroups:s,dataStartIndex:u,dataEndIndex:c})),h},Y2=function(t){var r=Wt(t),n=Tt(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:wd(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:xa(r,n)}},e0=function(t){var r=t.children,n=t.defaultShowTooltip,i=Ze(r,Gr),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}},Z2=function(t){return!t||!t.length?!1:t.some(function(r){var n=Et(r&&r.type);return n&&n.indexOf("Bar")>=0})},t0=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"}},J2=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,u=s===void 0?{}:s,c=n.width,f=n.height,l=n.children,d=n.margin||{},h=Ze(l,Gr),m=Ze(l,Le),y=Object.keys(u).reduce(function(g,b){var S=u[b],A=S.orientation;return!S.mirror&&!S.hide?I(I({},g),{},H({},A,g[A]+S.width)):g},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(g,b){var S=o[b],A=S.orientation;return!S.mirror&&!S.hide?I(I({},g),{},H({},A,at(g,"".concat(A))+S.height)):g},{top:d.top||0,bottom:d.bottom||0}),x=I(I({},p),y),w=x.bottom;h&&(x.bottom+=h.props.height||Gr.defaultProps.height),m&&r&&(x=Xk(x,i,n,r));var O=c-x.left-x.right,_=f-x.top-x.bottom;return I(I({brushBottom:w},x),{},{width:Math.max(O,0),height:Math.max(_,0)})},Q2=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},ah=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,u=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,l=t.defaultProps,d=function(x,w){var O=w.graphicalItems,_=w.stackGroups,g=w.offset,b=w.updateId,S=w.dataStartIndex,A=w.dataEndIndex,j=x.barSize,k=x.layout,E=x.barGap,T=x.barCategoryGap,C=x.maxBarSize,$=t0(k),M=$.numericAxisName,N=$.cateAxisName,q=Z2(O),D=[];return O.forEach(function(F,K){var G=_o(x.data,{graphicalItems:[F],dataStartIndex:S,dataEndIndex:A}),z=F.type.defaultProps!==void 0?I(I({},F.type.defaultProps),F.props):F.props,V=z.dataKey,fe=z.maxBarSize,be=z["".concat(M,"Id")],Ve=z["".concat(N,"Id")],Jt={},We=u.reduce(function(Qt,er){var Oo=w["".concat(er.axisType,"Map")],uh=z["".concat(er.axisType,"Id")];Oo&&Oo[uh]||er.axisType==="zAxis"||vr();var ch=Oo[uh];return I(I({},Qt),{},H(H({},er.axisType,ch),"".concat(er.axisType,"Ticks"),Tt(ch)))},Jt),W=We[N],Y=We["".concat(N,"Ticks")],J=_&&_[be]&&_[be].hasStack&&cC(F,_[be].stackGroups),L=Et(F.type).indexOf("Bar")>=0,ye=xa(W,Y),te=[],_e=q&&Gk({barSize:j,stackGroups:_,totalSize:Q2(We,N)});if(L){var Oe,ze,Lt=Q(fe)?C:fe,_r=(Oe=(ze=xa(W,Y,!0))!==null&&ze!==void 0?ze:Lt)!==null&&Oe!==void 0?Oe:0;te=Vk({barGap:E,barCategoryGap:T,bandSize:_r!==ye?_r:ye,sizeList:_e[Ve],maxBarSize:Lt}),_r!==ye&&(te=te.map(function(Qt){return I(I({},Qt),{},{position:I(I({},Qt.position),{},{offset:Qt.position.offset-_r/2})})}))}var Pi=F&&F.type&&F.type.getComposedData;Pi&&D.push({props:I(I({},Pi(I(I({},We),{},{displayedData:G,props:x,dataKey:V,item:F,bandSize:ye,barPosition:te,offset:g,stackedData:J,layout:k,dataStartIndex:S,dataEndIndex:A}))),{},H(H(H({key:F.key||"item-".concat(K)},M,We[M]),N,We[N]),"animationId",b)),childIndex:YO(F,x.children),item:F})}),D},h=function(x,w){var O=x.props,_=x.dataStartIndex,g=x.dataEndIndex,b=x.updateId;if(!jp({props:O}))return null;var S=O.children,A=O.layout,j=O.stackOffset,k=O.data,E=O.reverseStackOrder,T=t0(A),C=T.numericAxisName,$=T.cateAxisName,M=ot(S,n),N=oC(k,M,"".concat(C,"Id"),"".concat($,"Id"),j,E),q=u.reduce(function(z,V){var fe="".concat(V.axisType,"Map");return I(I({},z),{},H({},fe,X2(O,I(I({},V),{},{graphicalItems:M,stackGroups:V.axisType===C&&N,dataStartIndex:_,dataEndIndex:g}))))},{}),D=J2(I(I({},q),{},{props:O,graphicalItems:M}),w==null?void 0:w.legendBBox);Object.keys(q).forEach(function(z){q[z]=f(O,q[z],D,z.replace("Map",""),r)});var F=q["".concat($,"Map")],K=Y2(F),G=d(O,I(I({},q),{},{dataStartIndex:_,dataEndIndex:g,updateId:b,graphicalItems:M,stackGroups:N,offset:D}));return I(I({formattedGraphicalItems:G,graphicalItems:M,offset:D,stackGroups:N},K),q)},m=(function(p){function x(w){var O,_,g;return M2(this,x),g=N2(this,x,[w]),H(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),H(g,"accessibilityManager",new g2),H(g,"handleLegendBBoxUpdate",function(b){if(b){var S=g.state,A=S.dataStartIndex,j=S.dataEndIndex,k=S.updateId;g.setState(I({legendBBox:b},h({props:g.props,dataStartIndex:A,dataEndIndex:j,updateId:k},I(I({},g.state),{},{legendBBox:b}))))}}),H(g,"handleReceiveSyncEvent",function(b,S,A){if(g.props.syncId===b){if(A===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(S)}}),H(g,"handleBrushChange",function(b){var S=b.startIndex,A=b.endIndex;if(S!==g.state.dataStartIndex||A!==g.state.dataEndIndex){var j=g.state.updateId;g.setState(function(){return I({dataStartIndex:S,dataEndIndex:A},h({props:g.props,dataStartIndex:S,dataEndIndex:A,updateId:j},g.state))}),g.triggerSyncEvent({dataStartIndex:S,dataEndIndex:A})}}),H(g,"handleMouseEnter",function(b){var S=g.getMouseInfo(b);if(S){var A=I(I({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var j=g.props.onMouseEnter;X(j)&&j(A,b)}}),H(g,"triggeredAfterMouseMove",function(b){var S=g.getMouseInfo(b),A=S?I(I({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(A),g.triggerSyncEvent(A);var j=g.props.onMouseMove;X(j)&&j(A,b)}),H(g,"handleItemMouseEnter",function(b){g.setState(function(){return{isTooltipActive:!0,activeItem:b,activePayload:b.tooltipPayload,activeCoordinate:b.tooltipPosition||{x:b.cx,y:b.cy}}})}),H(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),H(g,"handleMouseMove",function(b){b.persist(),g.throttleTriggeredAfterMouseMove(b)}),H(g,"handleMouseLeave",function(b){g.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};g.setState(S),g.triggerSyncEvent(S);var A=g.props.onMouseLeave;X(A)&&A(S,b)}),H(g,"handleOuterEvent",function(b){var S=XO(b),A=at(g.props,"".concat(S));if(S&&X(A)){var j,k;/.*touch.*/i.test(S)?k=g.getMouseInfo(b.changedTouches[0]):k=g.getMouseInfo(b),A((j=k)!==null&&j!==void 0?j:{},b)}}),H(g,"handleClick",function(b){var S=g.getMouseInfo(b);if(S){var A=I(I({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var j=g.props.onClick;X(j)&&j(A,b)}}),H(g,"handleMouseDown",function(b){var S=g.props.onMouseDown;if(X(S)){var A=g.getMouseInfo(b);S(A,b)}}),H(g,"handleMouseUp",function(b){var S=g.props.onMouseUp;if(X(S)){var A=g.getMouseInfo(b);S(A,b)}}),H(g,"handleTouchMove",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(b.changedTouches[0])}),H(g,"handleTouchStart",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&g.handleMouseDown(b.changedTouches[0])}),H(g,"handleTouchEnd",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&g.handleMouseUp(b.changedTouches[0])}),H(g,"handleDoubleClick",function(b){var S=g.props.onDoubleClick;if(X(S)){var A=g.getMouseInfo(b);S(A,b)}}),H(g,"handleContextMenu",function(b){var S=g.props.onContextMenu;if(X(S)){var A=g.getMouseInfo(b);S(A,b)}}),H(g,"triggerSyncEvent",function(b){g.props.syncId!==void 0&&jl.emit(Pl,g.props.syncId,b,g.eventEmitterSymbol)}),H(g,"applySyncEvent",function(b){var S=g.props,A=S.layout,j=S.syncMethod,k=g.state.updateId,E=b.dataStartIndex,T=b.dataEndIndex;if(b.dataStartIndex!==void 0||b.dataEndIndex!==void 0)g.setState(I({dataStartIndex:E,dataEndIndex:T},h({props:g.props,dataStartIndex:E,dataEndIndex:T,updateId:k},g.state)));else if(b.activeTooltipIndex!==void 0){var C=b.chartX,$=b.chartY,M=b.activeTooltipIndex,N=g.state,q=N.offset,D=N.tooltipTicks;if(!q)return;if(typeof j=="function")M=j(D,b);else if(j==="value"){M=-1;for(var F=0;F<D.length;F++)if(D[F].value===b.activeLabel){M=F;break}}var K=I(I({},q),{},{x:q.left,y:q.top}),G=Math.min(C,K.x+K.width),z=Math.min($,K.y+K.height),V=D[M]&&D[M].value,fe=Yf(g.state,g.props.data,M),be=D[M]?{x:A==="horizontal"?D[M].coordinate:G,y:A==="horizontal"?z:D[M].coordinate}:A_;g.setState(I(I({},b),{},{activeLabel:V,activeCoordinate:be,activePayload:fe,activeTooltipIndex:M}))}else g.setState(b)}),H(g,"renderCursor",function(b){var S,A=g.state,j=A.isTooltipActive,k=A.activeCoordinate,E=A.activePayload,T=A.offset,C=A.activeTooltipIndex,$=A.tooltipAxisBandSize,M=g.getTooltipEventType(),N=(S=b.props.active)!==null&&S!==void 0?S:j,q=g.props.layout,D=b.key||"_recharts-cursor";return P.createElement(A2,{key:D,activeCoordinate:k,activePayload:E,activeTooltipIndex:C,chartName:r,element:b,isActive:N,layout:q,offset:T,tooltipAxisBandSize:$,tooltipEventType:M})}),H(g,"renderPolarAxis",function(b,S,A){var j=at(b,"type.axisType"),k=at(g.state,"".concat(j,"Map")),E=b.type.defaultProps,T=E!==void 0?I(I({},E),b.props):b.props,C=k&&k[T["".concat(j,"Id")]];return R.cloneElement(b,I(I({},C),{},{className:ee(j,C.className),key:b.key||"".concat(S,"-").concat(A),ticks:Tt(C,!0)}))}),H(g,"renderPolarGrid",function(b){var S=b.props,A=S.radialLines,j=S.polarAngles,k=S.polarRadius,E=g.state,T=E.radiusAxisMap,C=E.angleAxisMap,$=Wt(T),M=Wt(C),N=M.cx,q=M.cy,D=M.innerRadius,F=M.outerRadius;return R.cloneElement(b,{polarAngles:Array.isArray(j)?j:Tt(M,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(k)?k:Tt($,!0).map(function(K){return K.coordinate}),cx:N,cy:q,innerRadius:D,outerRadius:F,key:b.key||"polar-grid",radialLines:A})}),H(g,"renderLegend",function(){var b=g.state.formattedGraphicalItems,S=g.props,A=S.children,j=S.width,k=S.height,E=g.props.margin||{},T=j-(E.left||0)-(E.right||0),C=mw({children:A,formattedGraphicalItems:b,legendWidth:T,legendContent:c});if(!C)return null;var $=C.item,M=Zb(C,j2);return R.cloneElement($,I(I({},M),{},{chartWidth:j,chartHeight:k,margin:E,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),H(g,"renderTooltip",function(){var b,S=g.props,A=S.children,j=S.accessibilityLayer,k=Ze(A,oe);if(!k)return null;var E=g.state,T=E.isTooltipActive,C=E.activeCoordinate,$=E.activePayload,M=E.activeLabel,N=E.offset,q=(b=k.props.active)!==null&&b!==void 0?b:T;return R.cloneElement(k,{viewBox:I(I({},N),{},{x:N.left,y:N.top}),active:q,label:M,payload:q?$:[],coordinate:C,accessibilityLayer:j})}),H(g,"renderBrush",function(b){var S=g.props,A=S.margin,j=S.data,k=g.state,E=k.offset,T=k.dataStartIndex,C=k.dataEndIndex,$=k.updateId;return R.cloneElement(b,{key:b.key||"_recharts-brush",onChange:Ri(g.handleBrushChange,b.props.onChange),data:j,x:B(b.props.x)?b.props.x:E.left,y:B(b.props.y)?b.props.y:E.top+E.height+E.brushBottom-(A.bottom||0),width:B(b.props.width)?b.props.width:E.width,startIndex:T,endIndex:C,updateId:"brush-".concat($)})}),H(g,"renderReferenceElement",function(b,S,A){if(!b)return null;var j=g,k=j.clipPathId,E=g.state,T=E.xAxisMap,C=E.yAxisMap,$=E.offset,M=b.type.defaultProps||{},N=b.props,q=N.xAxisId,D=q===void 0?M.xAxisId:q,F=N.yAxisId,K=F===void 0?M.yAxisId:F;return R.cloneElement(b,{key:b.key||"".concat(S,"-").concat(A),xAxis:T[D],yAxis:C[K],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:k})}),H(g,"renderActivePoints",function(b){var S=b.item,A=b.activePoint,j=b.basePoint,k=b.childIndex,E=b.isRange,T=[],C=S.props.key,$=S.item.type.defaultProps!==void 0?I(I({},S.item.type.defaultProps),S.item.props):S.item.props,M=$.activeDot,N=$.dataKey,q=I(I({index:k,dataKey:N,cx:A.x,cy:A.y,r:4,fill:Gd(S.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},Z(M,!1)),Hi(M));return T.push(x.renderActiveDot(M,q,"".concat(C,"-activePoint-").concat(k))),j?T.push(x.renderActiveDot(M,I(I({},q),{},{cx:j.x,cy:j.y}),"".concat(C,"-basePoint-").concat(k))):E&&T.push(null),T}),H(g,"renderGraphicChild",function(b,S,A){var j=g.filterFormatItem(b,S,A);if(!j)return null;var k=g.getTooltipEventType(),E=g.state,T=E.isTooltipActive,C=E.tooltipAxis,$=E.activeTooltipIndex,M=E.activeLabel,N=g.props.children,q=Ze(N,oe),D=j.props,F=D.points,K=D.isRange,G=D.baseLine,z=j.item.type.defaultProps!==void 0?I(I({},j.item.type.defaultProps),j.item.props):j.item.props,V=z.activeDot,fe=z.hide,be=z.activeBar,Ve=z.activeShape,Jt=!!(!fe&&T&&q&&(V||be||Ve)),We={};k!=="axis"&&q&&q.props.trigger==="click"?We={onClick:Ri(g.handleItemMouseEnter,b.props.onClick)}:k!=="axis"&&(We={onMouseLeave:Ri(g.handleItemMouseLeave,b.props.onMouseLeave),onMouseEnter:Ri(g.handleItemMouseEnter,b.props.onMouseEnter)});var W=R.cloneElement(b,I(I({},j.props),We));function Y(er){return typeof C.dataKey=="function"?C.dataKey(er.payload):null}if(Jt)if($>=0){var J,L;if(C.dataKey&&!C.allowDuplicatedCategory){var ye=typeof C.dataKey=="function"?Y:"payload.".concat(C.dataKey.toString());J=Ki(F,ye,M),L=K&&G&&Ki(G,ye,M)}else J=F==null?void 0:F[$],L=K&&G&&G[$];if(Ve||be){var te=b.props.activeIndex!==void 0?b.props.activeIndex:$;return[R.cloneElement(b,I(I(I({},j.props),We),{},{activeIndex:te})),null,null]}if(!Q(J))return[W].concat(an(g.renderActivePoints({item:j,activePoint:J,basePoint:L,childIndex:$,isRange:K})))}else{var _e,Oe=(_e=g.getItemByXY(g.state.activeCoordinate))!==null&&_e!==void 0?_e:{graphicalItem:W},ze=Oe.graphicalItem,Lt=ze.item,_r=Lt===void 0?b:Lt,Pi=ze.childIndex,Qt=I(I(I({},j.props),We),{},{activeIndex:Pi});return[R.cloneElement(_r,Qt),null,null]}return K?[W,null,null]:[W,null]}),H(g,"renderCustomized",function(b,S,A){return R.cloneElement(b,I(I({key:"recharts-customized-".concat(A)},g.props),g.state))}),H(g,"renderMap",{CartesianGrid:{handler:Wi,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:Wi},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:Wi},YAxis:{handler:Wi},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((O=w.id)!==null&&O!==void 0?O:cn("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=gx(g.triggeredAfterMouseMove,(_=w.throttleDelay)!==null&&_!==void 0?_:1e3/60),g.state={},g}return q2(x,p),I2(x,[{key:"componentDidMount",value:function(){var O,_;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var O=this.props,_=O.children,g=O.data,b=O.height,S=O.layout,A=Ze(_,oe);if(A){var j=A.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,E=Yf(this.state,g,j,k),T=this.state.tooltipTicks[j].coordinate,C=(this.state.offset.top+b)/2,$=S==="horizontal",M=$?{x:T,y:C}:{y:T,x:C},N=this.state.formattedGraphicalItems.find(function(D){var F=D.item;return F.type.name==="Scatter"});N&&(M=I(I({},M),N.props.points[j].tooltipPosition),E=N.props.points[j].tooltipPayload);var q={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:k,activePayload:E,activeCoordinate:M};this.setState(q),this.renderCursor(A),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(O,_){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==_.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==O.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==O.margin){var g,b;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0}})}return null}},{key:"componentDidUpdate",value:function(O){Il([Ze(O.children,oe)],[Ze(this.props.children,oe)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var O=Ze(this.props.children,oe);if(O&&typeof O.props.shared=="boolean"){var _=O.props.shared?"axis":"item";return s.indexOf(_)>=0?_:a}return a}},{key:"getMouseInfo",value:function(O){if(!this.container)return null;var _=this.container,g=_.getBoundingClientRect(),b=Dj(g),S={chartX:Math.round(O.pageX-b.left),chartY:Math.round(O.pageY-b.top)},A=g.width/_.offsetWidth||1,j=this.inRange(S.chartX,S.chartY,A);if(!j)return null;var k=this.state,E=k.xAxisMap,T=k.yAxisMap,C=this.getTooltipEventType(),$=Qb(this.state,this.props.data,this.props.layout,j);if(C!=="axis"&&E&&T){var M=Wt(E).scale,N=Wt(T).scale,q=M&&M.invert?M.invert(S.chartX):null,D=N&&N.invert?N.invert(S.chartY):null;return I(I({},S),{},{xValue:q,yValue:D},$)}return $?I(I({},S),$):null}},{key:"inRange",value:function(O,_){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,b=this.props.layout,S=O/g,A=_/g;if(b==="horizontal"||b==="vertical"){var j=this.state.offset,k=S>=j.left&&S<=j.left+j.width&&A>=j.top&&A<=j.top+j.height;return k?{x:S,y:A}:null}var E=this.state,T=E.angleAxisMap,C=E.radiusAxisMap;if(T&&C){var $=Wt(T);return pg({x:S,y:A},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var O=this.props.children,_=this.getTooltipEventType(),g=Ze(O,oe),b={};g&&_==="axis"&&(g.props.trigger==="click"?b={onClick:this.handleClick}:b={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Hi(this.props,this.handleOuterEvent);return I(I({},S),b)}},{key:"addListener",value:function(){jl.on(Pl,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){jl.removeListener(Pl,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(O,_,g){for(var b=this.state.formattedGraphicalItems,S=0,A=b.length;S<A;S++){var j=b[S];if(j.item===O||j.props.key===O.key||_===Et(j.item.type)&&g===j.childIndex)return j}return null}},{key:"renderClipPath",value:function(){var O=this.clipPathId,_=this.state.offset,g=_.left,b=_.top,S=_.height,A=_.width;return P.createElement("defs",null,P.createElement("clipPath",{id:O},P.createElement("rect",{x:g,y:b,height:S,width:A})))}},{key:"getXScales",value:function(){var O=this.state.xAxisMap;return O?Object.entries(O).reduce(function(_,g){var b=Yb(g,2),S=b[0],A=b[1];return I(I({},_),{},H({},S,A.scale))},{}):null}},{key:"getYScales",value:function(){var O=this.state.yAxisMap;return O?Object.entries(O).reduce(function(_,g){var b=Yb(g,2),S=b[0],A=b[1];return I(I({},_),{},H({},S,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(O){var _;return(_=this.state.xAxisMap)===null||_===void 0||(_=_[O])===null||_===void 0?void 0:_.scale}},{key:"getYScaleByAxisId",value:function(O){var _;return(_=this.state.yAxisMap)===null||_===void 0||(_=_[O])===null||_===void 0?void 0:_.scale}},{key:"getItemByXY",value:function(O){var _=this.state,g=_.formattedGraphicalItems,b=_.activeItem;if(g&&g.length)for(var S=0,A=g.length;S<A;S++){var j=g[S],k=j.props,E=j.item,T=E.type.defaultProps!==void 0?I(I({},E.type.defaultProps),E.props):E.props,C=Et(E.type);if(C==="Bar"){var $=(k.data||[]).find(function(D){return nI(O,D)});if($)return{graphicalItem:j,payload:$}}else if(C==="RadialBar"){var M=(k.data||[]).find(function(D){return pg(O,D)});if(M)return{graphicalItem:j,payload:M}}else if(vo(j,b)||yo(j,b)||li(j,b)){var N=GI({graphicalItem:j,activeTooltipItem:b,itemData:T.data}),q=T.activeIndex===void 0?N:T.activeIndex;return{graphicalItem:I(I({},j),{},{childIndex:q}),payload:li(j,b)?T.data[N]:j.props.data[N]}}}return null}},{key:"render",value:function(){var O=this;if(!jp(this))return null;var _=this.props,g=_.children,b=_.className,S=_.width,A=_.height,j=_.style,k=_.compact,E=_.title,T=_.desc,C=Zb(_,P2),$=Z(C,!1);if(k)return P.createElement(Eb,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(Dl,Er({},$,{width:S,height:A,title:E,desc:T}),this.renderClipPath(),Tp(g,this.renderMap)));if(this.props.accessibilityLayer){var M,N;$.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,$.role=(N=this.props.role)!==null&&N!==void 0?N:"application",$.onKeyDown=function(D){O.accessibilityManager.keyboardEvent(D)},$.onFocus=function(){O.accessibilityManager.focus()}}var q=this.parseEventsOfWrapper();return P.createElement(Eb,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",Er({className:ee("recharts-wrapper",b),style:I({position:"relative",cursor:"default",width:S,height:A},j)},q,{ref:function(F){O.container=F}}),P.createElement(Dl,Er({},$,{width:S,height:A,title:E,desc:T,style:U2}),this.renderClipPath(),Tp(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(R.Component);H(m,"displayName",r),H(m,"defaultProps",I({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},l)),H(m,"getDerivedStateFromProps",function(p,x){var w=p.dataKey,O=p.data,_=p.children,g=p.width,b=p.height,S=p.layout,A=p.stackOffset,j=p.margin,k=x.dataStartIndex,E=x.dataEndIndex;if(x.updateId===void 0){var T=e0(p);return I(I(I({},T),{},{updateId:0},h(I(I({props:p},T),{},{updateId:0}),x)),{},{prevDataKey:w,prevData:O,prevWidth:g,prevHeight:b,prevLayout:S,prevStackOffset:A,prevMargin:j,prevChildren:_})}if(w!==x.prevDataKey||O!==x.prevData||g!==x.prevWidth||b!==x.prevHeight||S!==x.prevLayout||A!==x.prevStackOffset||!kr(j,x.prevMargin)){var C=e0(p),$={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},M=I(I({},Qb(x,O,S)),{},{updateId:x.updateId+1}),N=I(I(I({},C),$),M);return I(I(I({},N),h(I({props:p},N),x)),{},{prevDataKey:w,prevData:O,prevWidth:g,prevHeight:b,prevLayout:S,prevStackOffset:A,prevMargin:j,prevChildren:_})}if(!Il(_,x.prevChildren)){var q,D,F,K,G=Ze(_,Gr),z=G&&(q=(D=G.props)===null||D===void 0?void 0:D.startIndex)!==null&&q!==void 0?q:k,V=G&&(F=(K=G.props)===null||K===void 0?void 0:K.endIndex)!==null&&F!==void 0?F:E,fe=z!==k||V!==E,be=!Q(O),Ve=be&&!fe?x.updateId:x.updateId+1;return I(I({updateId:Ve},h(I(I({props:p},x),{},{updateId:Ve,dataStartIndex:z,dataEndIndex:V}),x)),{},{prevChildren:_,dataStartIndex:z,dataEndIndex:V})}return null}),H(m,"renderActiveDot",function(p,x,w){var O;return R.isValidElement(p)?O=R.cloneElement(p,x):X(p)?O=p(x):O=P.createElement(po,x),P.createElement(ce,{className:"recharts-active-dot",key:w},O)});var y=R.forwardRef(function(x,w){return P.createElement(m,Er({},x,{ref:w}))});return y.displayName=m.displayName,y},Ai=ah({chartName:"LineChart",GraphicalChild:ut,axisComponents:[{axisType:"xAxis",AxisComp:Ce},{axisType:"yAxis",AxisComp:ve}],formatAxisMap:Xd}),Zt=ah({chartName:"BarChart",GraphicalChild:pe,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ce},{axisType:"yAxis",AxisComp:ve}],formatAxisMap:Xd}),oh=ah({chartName:"AreaChart",GraphicalChild:Ke,axisComponents:[{axisType:"xAxis",AxisComp:Ce},{axisType:"yAxis",AxisComp:ve}],formatAxisMap:Xd});function lt(e,t){if(e!=="count")return{value:e.toUpperCase(),position:"insideTopLeft",offset:0,dy:-19,dx:2,fill:t,fontSize:9.5,letterSpacing:.7,fillOpacity:.75}}const Fe={top:30,right:8,left:0,bottom:0},eq=6,ji=36;function sh(e){const t=R.useRef(null),[r,n]=R.useState(0);return R.useEffect(()=>{if(!t.current||typeof ResizeObserver>"u")return;const i=new ResizeObserver(([a])=>n(a.contentRect.width));return i.observe(t.current),()=>i.disconnect()},[]),[t,r===0||e*eq<=r-ji]}function vn({data:e,left:t=24,top:r=4,xAxisProps:n,yAxis:i,children:a}){const{axisProps:o,gridProps:s}=ge();return v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Zt,{data:e,layout:"vertical",margin:{top:r,right:8,left:t,bottom:0},children:[v.jsx(Ge,{...s,horizontal:!1}),v.jsx(Ce,{type:"number",...o,...n}),i,a]})})}function tq(e,t=[1e3,1e5]){const r=e.filter(s=>Number.isFinite(s)&&s>0),[n,i]=r.length?[10**Math.floor(Math.log10(Math.min(...r))),10**Math.ceil(Math.log10(Math.max(...r)))]:t,a=Math.max(i,n*10),o=[];for(let s=n;s<=a;s*=10)o.push(s);return{domain:[n,a],ticks:o}}function rq({hidden:e,ts:t}){const{C:r,TOKEN_COLORS:n,axisProps:i,gridProps:a,tooltipStyle:o}=ge(),[s,u]=R.useState(new Set),c=f=>u(l=>{const d=new Set(l);return d.has(f)?d.delete(f):d.add(f),d});return v.jsx(Pe,{title:"Tokens over time",hint:"input · output · cache-write · cache-read (kept separate)",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Total tokens per bucket, stacked by kind. Click a legend entry to hide that series and let the others use the full scale."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"time bucket — day, week or month, chosen from the range (the picker above overrides it)."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"tokens."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Cache reads usually dominate."})," They are an order of magnitude larger than everything else and cost a fraction as much, so hide that series to read the rest."]}),v.jsx("p",{children:"Buckets by the session's start, so a long session's tokens all land in the bucket it began."})]}),hidden:e,children:v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(oh,{data:(t==null?void 0:t.series)??[],margin:Fe,children:[v.jsx(Ge,{...a}),v.jsx(Ce,{dataKey:"bucket",...i,minTickGap:24}),v.jsx(ve,{...i,tickFormatter:f=>yt(f),width:48,label:lt("tokens",r.muted)}),v.jsx(oe,{...o,formatter:(f,l)=>[`${yt(Number(f))} tokens`,l]}),v.jsx(Le,{wrapperStyle:{fontSize:12,cursor:"pointer"},onClick:f=>(f==null?void 0:f.dataKey)&&c(String(f.dataKey)),formatter:(f,l)=>v.jsx("span",{style:{opacity:s.has(String(l==null?void 0:l.dataKey))?.4:1},children:f})}),v.jsx(Ke,{type:"monotone",dataKey:"input",hide:s.has("input"),stackId:"1",stroke:n.input,fill:n.input,fillOpacity:.5}),v.jsx(Ke,{type:"monotone",dataKey:"output",hide:s.has("output"),stackId:"1",stroke:n.output,fill:n.output,fillOpacity:.5}),v.jsx(Ke,{type:"monotone",dataKey:"cache_creation",hide:s.has("cache_creation"),stackId:"1",stroke:n.cache_creation,fill:n.cache_creation,fillOpacity:.5}),v.jsx(Ke,{type:"monotone",dataKey:"cache_read",hide:s.has("cache_read"),stackId:"1",stroke:n.cache_read,fill:n.cache_read,fillOpacity:.35})]})})})}function nq({hidden:e,ts:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge();return v.jsx(Pe,{title:"Cost over time",hint:"API list price estimate, model × tokens (cache-aware)",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"What the tokens in each bucket would have cost at API list prices."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"time bucket — day, week or month."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"US dollars, estimated."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"An estimate, and a lower bound."}),` It prices each model's tokens at public list rates with cache reads charged at their reduced rate — it is not your bill, and it knows nothing about subscription plans. Models with no known price contribute zero and are named in the "unpriced models" metric rather than being silently counted as free.`]})]}),hidden:e,children:v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Ai,{data:(t==null?void 0:t.series)??[],margin:Fe,children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"bucket",...n,minTickGap:24}),v.jsx(ve,{...n,tickFormatter:o=>"$"+o,width:48,label:lt("USD (est.)",r.muted)}),v.jsx(oe,{...a,formatter:o=>Nn(Number(o))}),v.jsx(ut,{type:"monotone",dataKey:"cost",stroke:r.red,strokeWidth:2,dot:!1})]})})})}function iq({hidden:e,ts:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=(t==null?void 0:t.series)??[],[s,u]=sh(o.length),c=v.jsxs(v.Fragment,{children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"bucket",...n,minTickGap:24}),v.jsx(ve,{...n,width:ji,label:lt("count",r.muted)}),v.jsx(oe,{...a}),v.jsx(Le,{wrapperStyle:{fontSize:12}})]});return v.jsx(Pe,{title:"Activity over time",hint:"sessions & turns per bucket",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"How much work happened in each bucket, by count rather than by size."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"time bucket — day, week or month."}),v.jsx("dt",{children:"y-axis"}),v.jsxs("dd",{children:["count. ",v.jsx("strong",{children:"sessions"})," = sessions that started in the bucket, subagent runs included; ",v.jsx("strong",{children:"turns"})," = prompt-and-response exchanges within them."]})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Under a model filter this counts whole sessions, not model-attributable rows."})," ","A session has no single model, so it is counted here whenever it used any model you ticked — including the work it did with the others. That is why a session count and a token total move by different amounts when you untick a model."]}),v.jsx("p",{children:"Bars become lines once the range holds more buckets than can be drawn as readable bars."})]}),hidden:e,children:v.jsx("div",{ref:s,style:{width:"100%",height:"100%"},children:v.jsx(Qe,{width:"100%",height:"100%",children:u?v.jsxs(Zt,{data:o,margin:Fe,children:[c,v.jsx(pe,{dataKey:"sessions",fill:r.accent}),v.jsx(pe,{dataKey:"turns",fill:r.green})]}):v.jsxs(Ai,{data:o,margin:Fe,children:[c,v.jsx(ut,{dataKey:"sessions",stroke:r.accent,strokeWidth:2,dot:!1}),v.jsx(ut,{dataKey:"turns",stroke:r.green,strokeWidth:2,dot:!1})]})})})})}function aq({hidden:e,ts:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=(t==null?void 0:t.series)??[],[s,u]=sh(o.length),c=v.jsxs(v.Fragment,{children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"bucket",...n,minTickGap:24}),v.jsx(ve,{...n,width:ji,allowDecimals:!1,label:lt("errored calls",r.muted)}),v.jsx(oe,{...a}),v.jsx(Le,{wrapperStyle:{fontSize:12}})]});return v.jsx(Pe,{title:"Tool errors over time",hint:"failed tool calls per bucket · rejections/blocks kept separate (not agent failures)",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Tool calls that came back as errors, stacked by kind."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"time bucket — day, week or month."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"count of errored tool calls."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"failures"})," are the agent's — a bad edit, a command that did not run.",v.jsx("strong",{children:" rejected/blocked"})," are yours or a guardrail's: you declined a permission prompt, or a rule stopped it. They are kept apart because a rejection is the system working."]}),v.jsx("p",{children:"The split is a heuristic over the tool's result text, so treat the two totals as indicative and the combined count as exact."})]}),hidden:e,children:v.jsx("div",{ref:s,style:{width:"100%",height:"100%"},children:v.jsx(Qe,{width:"100%",height:"100%",children:u?v.jsxs(Zt,{data:o,margin:Fe,children:[c,v.jsx(pe,{dataKey:"failures",name:"failures",stackId:"e",fill:r.red}),v.jsx(pe,{dataKey:"rejections",name:"rejected/blocked",stackId:"e",fill:r.muted})]}):v.jsxs(oh,{data:o,margin:Fe,children:[c,v.jsx(Ke,{dataKey:"failures",name:"failures",stackId:"e",stroke:"none",fill:r.red,fillOpacity:1}),v.jsx(Ke,{dataKey:"rejections",name:"rejected/blocked",stackId:"e",stroke:"none",fill:r.muted,fillOpacity:1})]})})})})}const oq=["trivial","small","medium","large","xl"];function sq({hidden:e,bd:t,expand:r,drill:n}){var c;const{C:i,tooltipStyle:a,axisProps:o}=ge(),s=(((c=t==null?void 0:t.error_types)==null?void 0:c.by_type)??[]).map(f=>({name:f.type,n:f.n,kind:f.kind})),u=r.topN(s,"errors");return v.jsx(Pe,{title:"Error types",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Which kinds of tool error occurred, ranked by count. Click a bar to open the sessions behind it."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"bar length"}),v.jsx("dd",{children:"number of errored tool calls of that type."})]}),v.jsxs("p",{children:["The type buckets are a ",v.jsx("strong",{children:"heuristic over the tool's result text"}),": the totals are exact, the labels best-effort. Rejections and guardrail blocks are counted separately because they are not agent failures."]})]}),hint:"heuristic buckets from the tool result text · rejections/blocks are not agent failures · click a bar for those sessions",actions:r.expandBtn("errors",s.length),bodyHeight:r.expandHeight("errors",s.length,28),hidden:e,children:t&&s.length===0?v.jsx("div",{className:"empty",children:"No errored tool calls in range."}):v.jsxs(vn,{data:u,xAxisProps:{allowDecimals:!1},yAxis:v.jsx(ve,{type:"category",dataKey:"name",...o,width:130,tick:f=>v.jsx(Qf,{...f,title:"click to filter sessions",onSelect:l=>n.drillFilter("error_type",l)})}),children:[v.jsx(oe,{...a,formatter:(f,l,d)=>{var h;return[`${f} (${(h=d.payload)==null?void 0:h.kind})`,"count"]}}),v.jsx(pe,{dataKey:"n",cursor:"pointer",onClick:n.drillTo("error_type","name"),children:u.map((f,l)=>v.jsx(bi,{fill:f.kind==="rejection"?i.muted:i.red},l))})]})})}function uq({hidden:e,bd:t,drill:r}){const{PALETTE:n,tooltipStyle:i,axisProps:a}=ge(),[o,s]=R.useState("tokens"),u=((t==null?void 0:t.by_model)??[]).map(c=>({name:fr(c.model),model:c.model,tokens:c.total_tokens,cost:c.cost}));return v.jsx(Pe,{title:"Tokens by model",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Which models the tokens went to. Switch between tokens and estimated cost — the ranking often differs, because models are priced very differently."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"bar length"}),v.jsx("dd",{children:"tokens, or estimated US dollars at API list prices, depending on the toggle."})]}),v.jsx("p",{children:"Counts both main and subagent sessions: a subagent's tokens come off the same quota. Click a bar to open that model's sessions."})]}),hint:"click a bar for those sessions",hidden:e,actions:v.jsxs("span",{className:"seg",role:"group","aria-label":"Metric",children:[v.jsx("button",{type:"button",className:o==="tokens"?"on":"",onClick:()=>s("tokens"),children:"tokens"}),v.jsx("button",{type:"button",className:o==="cost"?"on":"",onClick:()=>s("cost"),children:"cost"})]}),children:v.jsxs(vn,{data:u,top:8,xAxisProps:{tickFormatter:c=>o==="cost"?Nn(Number(c)):yt(c)},yAxis:v.jsx(ve,{type:"category",dataKey:"name",...a,width:120,tick:c=>v.jsx(Qf,{...c,title:"click to filter sessions",onSelect:f=>{var l;return r.drillFilter("model",(l=u.find(d=>d.name===f))==null?void 0:l.model)}})}),children:[v.jsx(oe,{...i,formatter:(c,f,l)=>{var d,h;return[`${yt(Number((d=l.payload)==null?void 0:d.tokens))} · ${Nn(Number((h=l.payload)==null?void 0:h.cost))}`,o]}}),v.jsx(pe,{dataKey:o,cursor:"pointer",onClick:r.drillTo("model","model"),children:u.map((c,f)=>v.jsx(bi,{fill:n[f%n.length]},f))})]})})}function cq({hidden:e,bd:t}){const{PALETTE:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=((t==null?void 0:t.by_category)??[]).map(s=>({name:s.category,value:s.n}));return v.jsx(Pe,{title:"Category distribution",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"What kind of work the sessions were, as judged by the classifier."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"category — feature, bugfix, refactor, docs, ops, chore, review."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"number of sessions."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Under a model filter this counts whole sessions, not model-attributable rows."})," ","A session has no single model, so it is counted here whenever it used any model you ticked — including the work it did with the others. That is why a session count and a token total move by different amounts when you untick a model."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Main sessions only"}),": subagents inherit their parent's task and would multiply-count it. The label is inferred from the transcript rather than declared by you, so read it as a rough shape, not a ledger."]})]}),hint:"main sessions only",hidden:e,children:v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Zt,{data:o,margin:Fe,children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"name",...n}),v.jsx(ve,{...n,width:36,allowDecimals:!1,label:lt("sessions",n.stroke)}),v.jsx(oe,{...a}),v.jsx(pe,{dataKey:"value",children:o.map((s,u)=>v.jsx(bi,{fill:r[u%r.length]},u))})]})})})}function lq({hidden:e,bd:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=oq.map(s=>{var u;return{name:s,value:((u=t==null?void 0:t.by_complexity.find(c=>c.band===s))==null?void 0:u.n)??0}}).filter(s=>s.value>0);return v.jsx(Pe,{title:"Complexity bands",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"How involved each session was, banded by a score over signals like turn count, tools used and files touched."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"band — trivial, small, medium, large, xl."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"number of sessions."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Under a model filter this counts whole sessions, not model-attributable rows."})," ","A session has no single model, so it is counted here whenever it used any model you ticked — including the work it did with the others. That is why a session count and a token total move by different amounts when you untick a model."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Main sessions only."})," Most sessions landing in the lower bands is the real shape of the corpus, not a bug. Complexity measures effort spent — not difficulty, and not quality."]})]}),hint:"main sessions only",hidden:e,children:v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Zt,{data:o,margin:Fe,children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"name",...n}),v.jsx(ve,{...n,width:36,allowDecimals:!1,label:lt("sessions",n.stroke)}),v.jsx(oe,{...a}),v.jsx(pe,{dataKey:"value",fill:r.violet})]})})})}function fq({hidden:e,bd:t,expand:r}){const{C:n,tooltipStyle:i,axisProps:a}=ge(),o=(t==null?void 0:t.tools.length)??0;return v.jsx(Pe,{title:"Tool frequency",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Which tools the agent reached for most."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"bar length"}),v.jsx("dd",{children:"number of calls to that tool."})]}),v.jsx("p",{children:'Every call counts, successful or not, across both main and subagent sessions. "show all" opens the full list beyond the top few.'})]}),hint:"top tools by call count",actions:r.expandBtn("tools",o),bodyHeight:r.expandHeight("tools",o,22),hidden:e,children:v.jsxs(vn,{data:r.topN((t==null?void 0:t.tools)??[],"tools"),yAxis:v.jsx(ve,{type:"category",dataKey:"name",...a,width:110}),children:[v.jsx(oe,{...i}),v.jsx(pe,{dataKey:"n",fill:n.teal})]})})}function dq({hidden:e,bd:t,expand:r}){const{C:n,axisProps:i}=ge(),a=l0(),o=(t==null?void 0:t.skills.length)??0,s=new Map;for(const u of(t==null?void 0:t.skill_versions)??[]){const c=s.get(u.name)??[];c.push(u),s.set(u.name,c)}return v.jsx(Pe,{title:"Skill activation",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Which skills actually fired, ranked by how often."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"bar length"}),v.jsx("dd",{children:"number of activations, with every version of a skill grouped together."})]}),v.jsx("p",{children:"Hover a bar for the per-version split, click one to open that skill. A skill that is installed but never invoked does not appear at all."})]}),hint:"firings per skill (all versions grouped) · hover for versions · click to open",actions:r.expandBtn("skills",o),bodyHeight:r.expandHeight("skills",o,22),hidden:e,children:t&&t.skills.length===0?v.jsxs("div",{className:"empty",children:["No ",v.jsx("code",{children:"Skill"})," tool calls in range. Skill usage is captured from ",v.jsx("code",{children:"input.skill"}),"; this fills in once skills are actually invoked in collected sessions."]}):v.jsxs(vn,{data:r.topN((t==null?void 0:t.skills)??[],"skills"),yAxis:v.jsx(ve,{type:"category",dataKey:"name",...i,width:140,tick:u=>v.jsx(Qf,{...u,title:"click to open skill",onSelect:c=>c&&a(`/skill/${encodeURIComponent(c)}`)})}),children:[v.jsx(oe,{cursor:{fill:n.border,fillOpacity:.25},content:v.jsx(L_,{versionsByName:s})}),v.jsx(pe,{dataKey:"n",fill:n.gold,cursor:"pointer",onClick:u=>{const c=f0(u,"name");c&&a(`/skill/${encodeURIComponent(c)}`)}})]})})}function hq({hidden:e,bd:t,expand:r}){const{C:n,tooltipStyle:i,axisProps:a}=ge(),o=(t==null?void 0:t.subagent_fanout.by_type.length)??0;return v.jsx(Pe,{title:"Subagent fan-out",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Which kinds of subagent got spawned, and how often."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"bar length"}),v.jsx("dd",{children:"number of spawns of that agent type."})]}),v.jsxs("p",{children:["Counted from the spawning side and ",v.jsx("strong",{children:"main sessions only"}),", so a subagent that spawns its own children cannot inflate the total. The subtitle carries the per-session average and the busiest single session."]})]}),hint:t?`${t.subagent_fanout.total_spawns} spawns · ${t.subagent_fanout.sessions_with_subagents} sessions · avg ${t.subagent_fanout.avg_per_session}, max ${t.subagent_fanout.max_per_session}`:void 0,actions:r.expandBtn("subagents",o),bodyHeight:r.expandHeight("subagents",o,28),hidden:e,children:t&&o===0?v.jsx("div",{className:"empty",children:"No subagents spawned in range."}):v.jsxs(vn,{data:r.topN((t==null?void 0:t.subagent_fanout.by_type)??[],"subagents"),yAxis:v.jsx(ve,{type:"category",dataKey:"type",...a,width:120}),children:[v.jsx(oe,{...i}),v.jsx(pe,{dataKey:"n",fill:n.accent})]})})}const pq="dashboard.timezone";function P_(e){const t=kl(pq,null);if(t)return t;try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}const vq=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r0=new Map;function yq(e){let t=r0.get(e);return t||(t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",weekday:"short",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit"}),r0.set(e,t)),t}function T_(e,t){const r=Date.parse(e+":00:00Z");if(Number.isNaN(r))return null;const n=yq(t).formatToParts(new Date(r)),i=f=>{var l;return((l=n.find(d=>d.type===f))==null?void 0:l.value)??""},a=vq.indexOf(i("weekday")),o=Number(i("hour")),[s,u,c]=[i("year"),i("month"),i("day")];return a<0||!Number.isFinite(o)||!s||!u||!c?null:{weekday:a,hour:o%24,dayKey:`${s}-${u}-${c}`}}function In(e,t=new Date){var r;try{return((r=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"shortOffset"}).formatToParts(t).find(i=>i.type==="timeZoneName"))==null?void 0:r.value)??e}catch{return e}}function mq(e,t){return e?t==="tokens"?e.burn_hours.map(r=>({hour:r.hour,value:r.work})):e.turn_hours.map(r=>({hour:r.hour,value:r.turns})):[]}function n0(e,t){const r=Date.parse(`${e}T00:00:00Z`),n=Date.parse(`${t}T00:00:00Z`),i=new Array(7).fill(0);if(!Number.isFinite(r)||!Number.isFinite(n)||n<r)return i;const a=Math.round((n-r)/864e5)+1;i.fill(Math.floor(a/7));const o=new Date(r).getUTCDay();for(let s=0;s<a%7;s++)i[(o+s)%7]++;return i}function gq(e,t,r){var f;const n=new Map,i=new Map;let a=null,o=null;for(const l of e){const d=T_(l.hour,t);if(!d)continue;(a===null||d.dayKey<a)&&(a=d.dayKey),(o===null||d.dayKey>o)&&(o=d.dayKey);const h=`${d.weekday}:${d.hour}`;n.set(h,(n.get(h)??0)+l.value),l.value>0&&(i.get(h)??i.set(h,new Set).get(h)).add(d.dayKey)}let s=r!=null&&r.from&&(r!=null&&r.to)?n0(r.from,r.to):[];s.some(l=>l>0)||(s=a&&o?n0(a,o):new Array(7).fill(0));const u=[];let c=0;for(let l=0;l<7;l++){const d=s[l];for(let h=0;h<24;h++){const m=n.get(`${l}:${h}`)??0,y=d?m/d:0;y>c&&(c=y),u.push({weekday:l,hour:h,mean:y,total:m,observed:((f=i.get(`${l}:${h}`))==null?void 0:f.size)??0,days:d})}}return{cells:u,max:c}}function bq(e,t,r){if(e<=0||t<=0)return null;const n=Math.min(1,e/t);return r==="sqrt"?Math.sqrt(n):n}function xq(e,t,r){const n=(a,o)=>parseInt(a.slice(1+o*2,3+o*2),16);return`#${[0,1,2].map(a=>Math.round(n(e,a)+(n(t,a)-n(e,a))*r)).map(a=>a.toString(16).padStart(2,"0")).join("")}`}function wq(e,t){if(t.length===0)return"#000000";if(t.length===1)return t[0];const r=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.min(t.length-2,Math.floor(r));return xq(t[n],t[n+1],r-n)}function _q(e,t,r=5){return e<=0?[]:Array.from({length:r},(n,i)=>{const a=i/(r-1);return[a,t==="sqrt"?a**2*e:a*e]})}function Oq(e,t){return t==="day"?e:t==="month"?e.slice(0,7):Aq(e)}function Sq(e,t,r){const n=new Map,i=new Set;for(const o of e){const s=T_(o.hour,t);if(!s)continue;const u=o.source??"(unassigned)";i.add(u);const c=Oq(s.dayKey,r),f=n.get(c)??{};f[u]=(f[u]??0)+o.work,n.set(c,f)}return{points:[...n.entries()].sort((o,s)=>o[0].localeCompare(s[0])).map(([o,s])=>({bucket:o,bySource:s})),sources:[...i].sort()}}function Aq(e){const[t,r,n]=e.split("-").map(Number),i=new Date(Date.UTC(t,r-1,n)),a=(i.getUTCDay()+6)%7;i.setUTCDate(i.getUTCDate()-a+3);const o=i.getTime(),s=new Date(Date.UTC(i.getUTCFullYear(),0,1)),u=1+Math.round((o-s.getTime())/6048e5-((s.getUTCDay()+6)%7>3?-1:0));return`${i.getUTCFullYear()}-W${String(u).padStart(2,"0")}`}const El=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],jq=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Pq=4,i0=100,E_=e=>t=>v.jsx("span",{style:{color:e},children:t});function Tq({hidden:e,time:t,range:r}){const{BURN_RAMP:n,C:i}=ge(),a=P_(),[o,s]=R.useState("turns"),u=o==="tokens",c=R.useMemo(()=>mq(t,o),[t,o]),{cells:f,max:l}=R.useMemo(()=>gq(c,a,r),[c,a,r.from,r.to]),[d,h]=R.useState(null),m=u?0:l<2?2:1,y=_=>u?yt(Math.round(_)):_.toFixed(m),p=u?"work tokens":"turns",x=u?"sqrt":"linear",w=[i.panel2,...n],O=`linear-gradient(to right, ${w.join(", ")})`;return v.jsx(Pe,{title:"When work happens",hint:`mean ${p} per weekday × hour, ${In(a)}`,guide:v.jsxs(v.Fragment,{children:[v.jsxs("p",{children:["Each cell is one hour of one weekday. Darker means more ",p," in that hour on a typical day — hover any cell for its exact figure."]}),v.jsxs("dl",{children:[v.jsx("dt",{children:"rows / columns"}),v.jsxs("dd",{children:["weekday (Sun–Sat) × hour of day, 0–23, in ",In(a)," — your own clock."]}),v.jsx("dt",{children:"cell value"}),v.jsxs("dd",{children:["mean ",u?v.jsxs(v.Fragment,{children:[v.jsx("strong",{children:"work tokens"})," (input + output + cache-write; cache reads excluded)"]}):v.jsxs(v.Fragment,{children:[v.jsx("strong",{children:"turns started"})," — one turn is one prompt and its answer"]})," ","per ",v.jsx("strong",{children:"calendar"})," occurrence of that weekday in range — a weekday you did not work is a zero, not a missing day, and a range ending mid-week does not read as a quiet Thursday."]}),v.jsx("dt",{children:"which sessions"}),v.jsx("dd",{children:u?"Both populations: a subagent's tokens come off the same quota.":"Main sessions only — a turn is a person sitting down to prompt, and a subagent has nobody in it."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Turns and tokens do not draw the same picture, and the difference is the point."})," ","Tokens per hour are unbounded: one 12-minute fan-out of subagents can burn more than a month of evenings, so a one-off lands in the same colour as a habit. A turn count is bounded per hour, so a cell tracks how ",v.jsx("em",{children:"often"})," that hour is worked. Switch to tokens when you want the spend rather than the rhythm."]}),v.jsxs("p",{children:["Bucketed by when the work happened — the usage event's own timestamp, or the turn's start — not by its session's start, so its totals deliberately"," ",v.jsx("strong",{children:'do not match "Tokens over time"'}),", which buckets by session."]}),v.jsx("p",{children:"It shows when work happened. It says nothing about whether that was a good time for it."})]}),hidden:e,actions:v.jsxs("span",{className:"seg",role:"group","aria-label":"Metric",children:[v.jsx("button",{type:"button",className:o==="turns"?"on":"",onClick:()=>s("turns"),children:"turns"}),v.jsx("button",{type:"button",className:u?"on":"",onClick:()=>s("tokens"),children:"tokens"})]}),children:_=>t&&l===0?v.jsxs("div",{className:"empty",children:["No ",p," in range."]}):v.jsxs("div",{className:_?"burn burn-lg":"burn",children:[v.jsxs("div",{className:"burn-grid",role:"img","aria-label":`Mean ${p} by weekday and hour, ${In(a)}`,children:[El.map((g,b)=>v.jsxs("div",{className:"burn-row",children:[v.jsx("span",{className:"burn-day",children:g}),f.filter(S=>S.weekday===b).map(S=>{const A=bq(S.mean,l,x);return v.jsx("i",{className:"burn-cell",style:{background:A===null?i.panel2:wq(A,w)},onPointerEnter:j=>{const k=j.currentTarget.getBoundingClientRect(),E=j.currentTarget.closest(".burn").getBoundingClientRect();h({cell:S,x:k.left-E.left+k.width/2,y:k.top-E.top})},onPointerLeave:()=>h(null)},S.hour)})]},g)),v.jsxs("div",{className:"burn-row burn-hours",children:[v.jsx("span",{className:"burn-day"}),Array.from({length:24},(g,b)=>v.jsx("i",{className:"burn-tick",children:b%(_?2:6)===0?b:""},b))]})]}),v.jsxs("div",{className:"burn-legend",children:[v.jsxs("span",{className:"burn-legend-cap",children:[p," per hour"]}),v.jsx("div",{className:"burn-bar",style:{background:O}}),v.jsx("div",{className:"burn-ticks",children:_q(l,x).map(([g,b])=>v.jsx("span",{style:{left:`${g*100}%`},children:y(b)},g))})]}),d&&v.jsxs("div",{className:"burn-tip",style:{top:Math.max(0,d.y-46),...d.x>210?{right:0}:{left:Math.max(0,d.x-60)}},"aria-hidden":"true",children:[v.jsxs("div",{className:"burn-tip-head",children:[El[d.cell.weekday]," ",String(d.cell.hour).padStart(2,"0"),":00"]}),v.jsxs("div",{className:"burn-tip-row",children:[y(d.cell.mean)," ",p," · average ",El[d.cell.weekday]]}),v.jsxs("div",{className:"burn-tip-row burn-tip-support",children:["on ",d.cell.observed," of ",d.cell.days," ",jq[d.cell.weekday],d.cell.days===1?"":"s"]})]})]})})}function Eq({hidden:e,ts:t,time:r}){const{C:n,PALETTE:i,axisProps:a,gridProps:o,tooltipStyle:s}=ge(),u=P_(),c=(t==null?void 0:t.bucket)??"week",{points:f,sources:l}=R.useMemo(()=>Sq((r==null?void 0:r.burn_hours)??[],u,c),[r,u,c]),d=f.map(h=>({bucket:h.bucket,...h.bySource}));return v.jsx(Pe,{title:"Burn by source",hint:`work tokens per local ${c}, ${In(u)}`,guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"How much each account spent over time. Use it to compare the sources, and to spot a bucket that broke the pattern."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsxs("dd",{children:["local ",c,", in ",In(u)," — it follows the dashboard's bucket control, so switching to ",v.jsx("em",{children:"day"})," shows each source's shape where a month would flatten it."]}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"work tokens — input + output + cache-write, summed over the bucket. Cache reads are excluded."}),v.jsx("dt",{children:"one line per source"}),v.jsxs("dd",{children:["Sources are ",v.jsx("strong",{children:"never added together"}),": they are separate accounts with genuinely different usage profiles, and a combined line would hide the only thing this chart is for."]})]}),v.jsx("p",{children:"The first and last buckets are usually partial, so their dip is the range boundary, not a change in behaviour."}),v.jsxs("p",{children:["These totals ",v.jsx("strong",{children:'deliberately do not match "Tokens over time"'})," even at the same bucket: this chart places tokens by ",v.jsx("em",{children:"when they were spent"}),", that one by the start of the session that spent them, so a session straddling a boundary lands differently in each."]})]}),hidden:e,children:r&&!d.length?v.jsx("div",{className:"empty",children:"No token usage in range."}):v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Ai,{data:d,margin:Fe,children:[v.jsx(Ge,{...o}),v.jsx(Ce,{dataKey:"bucket",...a,minTickGap:24}),v.jsx(ve,{...a,tickFormatter:h=>yt(h),width:48,label:lt("work tokens",n.muted)}),v.jsx(oe,{...s,formatter:(h,m)=>[`${yt(Number(h))} tokens`,m]}),l.length>1&&v.jsx(Le,{wrapperStyle:{fontSize:12},formatter:E_(n.muted)}),l.map((h,m)=>v.jsx(ut,{type:"monotone",dataKey:h,stroke:i[m%i.length],strokeWidth:2,dot:!1},h))]})})})}function a0(e){if(e<=0)return"0";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4){const t=e/1e3;return`${t<10?t.toFixed(1).replace(/\.0$/,""):Math.round(t)}s`}return`${(e/6e4).toFixed(1).replace(/\.0$/,"")}m`}function kq({models:e,colorFor:t,shows:r,onToggle:n,muted:i}){const a=(o,s)=>v.jsx("svg",{width:"18",height:"8","aria-hidden":"true",style:{flex:"none"},children:v.jsx("line",{x1:"0",y1:"4",x2:"18",y2:"4",stroke:o,strokeWidth:"2",strokeDasharray:s?"4 3":void 0})});return v.jsxs("div",{className:"lat-legend",children:[e.map(o=>{const s=r(o);return v.jsxs("button",{type:"button",className:"lat-chip","aria-pressed":s,onClick:()=>n(o,!s),title:`${s?"Hide":"Show"} ${fr(o)}`,style:{opacity:s?1:.4},children:[a(t(o)),v.jsx("span",{style:{color:i},children:fr(o)})]},o)}),v.jsxs("span",{className:"lat-key",style:{color:i},children:[a(i)," p50 ",a(i,!0)," p90"]})]})}function Cq({hidden:e,time:t}){const{C:r,PALETTE:n,axisProps:i,gridProps:a,tooltipStyle:o}=ge(),s=(t==null?void 0:t.latency.bucket)??"week",[u,c]=R.useState(new Map),f=(_,g)=>c(b=>new Map(b).set(_,g)),{data:l,models:d,offByDefault:h}=R.useMemo(()=>{const _=(t==null?void 0:t.latency.series)??[],g=new Map;for(const A of _)g.set(A.model,(g.get(A.model)??0)+A.n);const b=[...g.entries()].sort((A,j)=>j[1]-A[1]).map(([A])=>A),S=new Map;for(const A of _){const j=S.get(A.bucket)??{bucket:A.bucket};j[`${A.model} p50`]=A.p50_ms,j[`${A.model} p90`]=A.p90_ms,S.set(A.bucket,j)}return{data:[...S.values()].sort((A,j)=>String(A.bucket).localeCompare(String(j.bucket))),models:b,offByDefault:new Set(b.slice(Pq))}},[t]),m=_=>n[Math.max(0,d.indexOf(_))%n.length],y=_=>u.get(_)??!h.has(_),p=d.filter(y),{logScale:x,domain:w,ticks:O}=R.useMemo(()=>{const _=[];for(const b of l)for(const S of p)for(const A of["p50","p90"]){const j=b[`${S} ${A}`];typeof j=="number"&&j>0&&_.push(j)}return(_.length?Math.max(..._)/Math.min(..._):1)<i0?{logScale:!1,domain:void 0,ticks:void 0}:{logScale:!0,...tq(_)}},[l,p.join("|")]);return v.jsx(Pe,{title:"Model response latency",hint:"prompt → first assistant token, per model"+(h.size?` · ${h.size} lower-volume model${h.size>1?"s":""} off by default — switch on in the legend`:""),guide:v.jsxs(v.Fragment,{children:[v.jsxs("p",{children:["How long a model took to start replying. ",v.jsx("strong",{children:"Read it for drift between buckets"})," ","— a model whose p90 doubles is the signal — not as an absolute number."]}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsxs("dd",{children:["local ",s,", following the dashboard's bucket control. Split by model the turns thin out fast, so at a fine bucket ",v.jsx("strong",{children:"points drop out rather than being drawn"})," ","— see the note below."]}),v.jsx("dt",{children:"y-axis"}),v.jsxs("dd",{children:["elapsed time from the prompt to the model's first response. Solid = median (p50), dashed = p90, one colour per model. Never a mean — the tail is the story."," ",v.jsx("strong",{children:"Linear normally."})," If the visible series span more than ",i0,"× the axis switches to logarithmic — each gridline ten times the one below, equal distances meaning equal ",v.jsx("em",{children:"ratios"})," rather than equal seconds — because at that spread a linear axis puts the smallest line at one percent of the plot and flattens it onto the baseline. The caption says which is in force, and hiding the widest series can bring it back to linear."]})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"The p90 is not pure model latency."})," A turn whose reply lands hours later is usually an agent parked on a permission prompt waiting for you, and nothing in the data separates that from a genuinely slow response. Replies Claude Code generated"," ",v.jsx("em",{children:"without"})," calling a model at all (its ",v.jsx("code",{children:"<synthetic>"})," marker) are excluded here — their elapsed time is not a model response time."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"The filter bar moves this chart less than it moves the token charts."})," A model is counted here once per turn it answered, but in the token charts by everything it spent — so a model doing subagent work, haiku above all, can be a top-three consumer while contributing almost nothing to this tile. Unticking it visibly moves one and not the other."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Every model is in the legend; click one to show or hide it"}),", and the axis rescales around what is left. Only the highest-volume few start switched on, so a model you do not see is off rather than absent — though a low-volume one may plot as a point or two, since a bucket under 5 turns is dropped. The legend is a ",v.jsx("em",{children:"view"})," control over whatever the filter bar admits: unticking a model up there removes it from every chart, while hiding it here only takes it off this one."]}),v.jsxs("p",{children:["Main sessions only, and only the highest-volume models are plotted. A ",s," holding fewer than ",v.jsx("strong",{children:"5 turns for a given model is dropped"}),', because a percentile over three observations is not a percentile — so a finer bucket gives a sparser chart, not a noisier one. Where a cell holds only a handful of turns its "p90" is close to simply its slowest.']})]}),hidden:e,children:t&&!l.length?v.jsx("div",{className:"empty",children:"No turns with a model response in range."}):v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Ai,{data:l,margin:Fe,children:[v.jsx(Ge,{...a}),v.jsx(Ce,{dataKey:"bucket",...i,minTickGap:24}),v.jsx(ve,{...i,...x?{scale:"log",domain:w,ticks:O,allowDataOverflow:!0}:{},tickFormatter:_=>a0(_),width:52,label:lt(`time to first token${x?" (log)":""}`,r.muted)}),v.jsx(oe,{...o,formatter:(_,g)=>[a0(Number(_)),fr(String(g).replace(/ p\d0$/,""))+String(g).slice(-4)]}),v.jsx(Le,{wrapperStyle:{fontSize:12},content:v.jsx(kq,{models:d,colorFor:m,shows:y,onToggle:f,muted:r.muted})}),d.map(_=>v.jsx(ut,{type:"monotone",dataKey:`${_} p50`,hide:!y(_),stroke:m(_),strokeWidth:2,dot:!1,connectNulls:!0},_)),d.map(_=>v.jsx(ut,{type:"monotone",dataKey:`${_} p90`,hide:!y(_),stroke:m(_),strokeWidth:2,strokeDasharray:"4 3",dot:!1,connectNulls:!0},`${_}-p90`))]})})})}function Mq({hidden:e,time:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=t==null?void 0:t.review,s=(c,f)=>f?Math.round(c/f*1e3)/10:0,u=o?[{band:"under 10s",wrote:s(o.wrote.under_10s,o.wrote.n),none:s(o.none.under_10s,o.none.n)},{band:"under 30s",wrote:s(o.wrote.under_30s,o.wrote.n),none:s(o.none.under_30s,o.none.n)},{band:"under 2min",wrote:s(o.wrote.under_2min,o.wrote.n),none:s(o.none.under_2min,o.none.n)}]:[];return v.jsx(Pe,{title:"Turnaround after a turn",hint:o&&o.wrote.n?`share of turns answered within each window · ${o.wrote.n} wrote files, ${o.none.n} did not`:"share of turns answered within each window",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"How quickly the next prompt arrived after a turn finished, split by whether that turn changed any files."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:'how soon the next prompt came — the bands are cumulative, so "under 2min" also counts everything under 30s.'}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"percentage of turns in that group. The two groups have different denominators, shown in the subtitle, so compare the shares and not the bar heights as counts."})]}),v.jsxs("p",{children:["This is an ",v.jsx("strong",{children:"audit"})," view, not a productivity score. It reports that a reply came in four seconds; it makes no claim about whether that was long enough to read the diff, and nothing here is coloured or thresholded to suggest one."]}),v.jsx("p",{children:"Main sessions only — a subagent has no human to turn it around."})]}),hidden:e,children:t&&!(o!=null&&o.wrote.n)&&!(o!=null&&o.none.n)?v.jsx("div",{className:"empty",children:"No turns with a successor in range."}):v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Zt,{data:u,margin:Fe,children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"band",...n}),v.jsx(ve,{...n,width:40,tickFormatter:c=>`${c}%`,label:lt("% of turns",r.muted)}),v.jsx(oe,{...a,formatter:(c,f)=>[`${c}%`,f]}),v.jsx(Le,{wrapperStyle:{fontSize:12},formatter:E_(r.muted)}),v.jsx(pe,{dataKey:"wrote",name:"turn wrote files",fill:r.accent,radius:[4,4,0,0]}),v.jsx(pe,{dataKey:"none",name:"turn wrote nothing",fill:r.muted,radius:[4,4,0,0]})]})})})}const o0=["info","low","medium","high","critical"],Zf=(e,t)=>t?e/t*100:0,k_=e=>`${e.toFixed(1)}%`;function $q({hidden:e,audit:t}){const{C:r,axisProps:n,tooltipStyle:i}=ge(),a=((t==null?void 0:t.edit_reliability)??[]).map(o=>({name:fr(o.model),model:o.model,rate:Zf(o.errors,o.calls),calls:o.calls,errors:o.errors}));return v.jsx(Pe,{title:"Edit failures by model",hint:"share of Edit/Write/NotebookEdit calls that errored · ordered by call volume",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"How often a model's attempt to write a file came back as an error."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"bar length"}),v.jsx("dd",{children:"errored calls as a share of that model's file-writing calls."}),v.jsx("dt",{children:"rows"}),v.jsx("dd",{children:"one per model, ordered by how many such calls it made."})]}),v.jsxs("p",{children:["A failed Edit usually means the model got the file's existing contents wrong, so this is a"," ",v.jsx("strong",{children:"capability signal"})," rather than a speed one. Both main and subagent sessions count — a subagent's edits are real edits."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Confounded by era and task mix."})," Older models ran on older sessions doing different work, so read this within a date range rather than as a standing leaderboard. The model comes from the event that issued the call."]})]}),hidden:e,children:v.jsxs(vn,{data:a,left:8,xAxisProps:{tickFormatter:o=>`${o}%`},yAxis:v.jsx(ve,{type:"category",dataKey:"name",...n,width:104}),children:[v.jsx(oe,{...i,formatter:(o,s,u)=>{var c,f;return[`${k_(o)} — ${((c=u.payload)==null?void 0:c.errors)??0} of ${(((f=u.payload)==null?void 0:f.calls)??0).toLocaleString()} calls`,"failure rate"]}}),v.jsx(pe,{dataKey:"rate",fill:r.red})]})})}function Iq({hidden:e,audit:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=((t==null?void 0:t.plan_rejections)??[]).map(s=>({bucket:s.bucket,plans:s.plan_calls?Zf(s.plan_rejected,s.plan_calls):null,questions:s.question_calls?Zf(s.question_rejected,s.question_calls):null,plan_calls:s.plan_calls,question_calls:s.question_calls}));return v.jsx(Pe,{title:"Plans & questions sent back",hint:"main sessions only · a bucket with none of that kind plots as a gap, not as 0%",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Share of plans and questions put to you that you rejected rather than approved."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"time bucket — day, week or month."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"rejected as a percentage of that bucket's calls of that kind."})]}),v.jsxs("p",{children:["This is ",v.jsx("strong",{children:"alignment measured at the cheapest possible moment"})," — before the work happens. A rising line means briefs are getting worse or the model is drifting; nothing here says a rejection was wrong, and a healthy rate is not zero."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Not the same number as the rejection-rate KPI."})," That one is every rejected or blocked tool call over every tool call, a far larger denominator. This counts only ExitPlanMode and AskUserQuestion, and only where the result was recorded as a user rejection rather than a genuine failure."]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Main sessions only"}),", and the model filter attributes each call to the event that issued it — a subagent has no human to reject it."]})]}),hidden:e,children:v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Ai,{data:o,margin:Fe,children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"bucket",...n,minTickGap:24}),v.jsx(ve,{...n,width:ji,tickFormatter:s=>`${s}%`,label:lt("rejected",r.muted)}),v.jsx(oe,{...a,formatter:s=>k_(s)}),v.jsx(Le,{wrapperStyle:{fontSize:12}}),v.jsx(ut,{type:"monotone",dataKey:"plans",name:"plans",stroke:r.violet,dot:!1,strokeWidth:2,connectNulls:!1}),v.jsx(ut,{type:"monotone",dataKey:"questions",name:"questions",stroke:r.accent,dot:!1,strokeWidth:2,connectNulls:!1})]})})})}function Nq({hidden:e,audit:t}){const{C:r,axisProps:n,gridProps:i,tooltipStyle:a}=ge(),o=(t==null?void 0:t.file_rework)??[];return v.jsx(Pe,{title:"Repeat edits per file",hint:"(session, file) pairs banded by how many times that session touched that file",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"How often a session came back to a file it had already edited."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"times that session touched that file — 1, 2–3, 4–6, 7–12, 13+."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"two counts per band: the number of (session, file) pairs in it, and the number of individual edits those pairs account for."})]}),v.jsx("p",{children:"The two series disagree on purpose. Most pairs sit in the left band, while a large share of all edits lands in the right ones — a small number of files absorbing a lot of rework."}),v.jsxs("p",{children:[v.jsx("strong",{children:"A count and a list, never a score."})," Rework was tested against session cost in both directions and the relationship is flat; it correlates with total tokens only because bigger sessions edit more files. Both populations count, and the model filter attributes each edit to the event that made it."]})]}),hidden:e,children:v.jsx(Qe,{width:"100%",height:"100%",children:v.jsxs(Zt,{data:o,margin:Fe,children:[v.jsx(Ge,{...i}),v.jsx(Ce,{dataKey:"band",...n}),v.jsx(ve,{...n,width:44,allowDecimals:!1,label:lt("count",r.muted)}),v.jsx(oe,{...a}),v.jsx(Le,{wrapperStyle:{fontSize:12}}),v.jsx(pe,{dataKey:"pairs",name:"file/session pairs",fill:r.teal}),v.jsx(pe,{dataKey:"changes",name:"edits they account for",fill:r.gold})]})})})}function Dq({hidden:e,audit:t}){const{C:r,SEVERITY_COLORS:n,axisProps:i,gridProps:a,tooltipStyle:o}=ge(),s=(t==null?void 0:t.findings_over_time)??[],[u,c]=sh(s.length),f=v.jsxs(v.Fragment,{children:[v.jsx(Ge,{...a}),v.jsx(Ce,{dataKey:"bucket",...i,minTickGap:24}),v.jsx(ve,{...i,width:ji,allowDecimals:!1,label:lt("findings",r.muted)}),v.jsx(oe,{...o}),v.jsx(Le,{wrapperStyle:{fontSize:12}})]});return v.jsx(Pe,{title:"Findings over time",hint:"detector findings per bucket, stacked by severity · dated by the finding, not its session",guide:v.jsxs(v.Fragment,{children:[v.jsx("p",{children:"Security findings the detector raised, over time and by severity."}),v.jsxs("dl",{children:[v.jsx("dt",{children:"x-axis"}),v.jsx("dd",{children:"time bucket — day, week or month."}),v.jsx("dt",{children:"y-axis"}),v.jsx("dd",{children:"findings raised in that bucket, stacked with the most severe on top."})]}),v.jsxs("p",{children:[v.jsx("strong",{children:"Dated by the finding's own moment"}),", not by when its session started. A finding belongs to the tool call that triggered it, and a long session can raise one hours after it began — so a bucket here is when the risky thing was done."]}),v.jsx("p",{children:"A rising low-severity band is usually the detector getting better, not the work getting worse; a new critical is the line worth reading. Both populations count. Individual findings, their evidence and their mute state live on the Security page."})]}),hidden:e,children:v.jsx("div",{ref:u,style:{width:"100%",height:"100%"},children:v.jsx(Qe,{width:"100%",height:"100%",children:c?v.jsxs(Zt,{data:s,margin:Fe,children:[f,o0.map(l=>v.jsx(pe,{dataKey:l,name:l,stackId:"f",fill:n[l]},l))]}):v.jsxs(oh,{data:s,margin:Fe,children:[f,o0.map(l=>v.jsx(Ke,{dataKey:l,name:l,stackId:"f",stroke:"none",fill:n[l],fillOpacity:1},l))]})})})})}const Jf=[{id:"tokens-over-time",label:"Tokens over time",Component:rq},{id:"cost-over-time",label:"Cost over time",Component:nq},{id:"activity",label:"Activity over time",Component:iq},{id:"tool-errors",label:"Tool errors over time",Component:aq},{id:"error-types",label:"Error types",Component:sq},{id:"tokens-by-model",label:"Tokens by model",Component:uq},{id:"category",label:"Category distribution",Component:cq},{id:"complexity",label:"Complexity bands",Component:lq},{id:"tool-frequency",label:"Tool frequency",Component:fq},{id:"skill-activation",label:"Skill activation",Component:dq},{id:"subagent-fanout",label:"Subagent fan-out",Component:hq},{id:"burn-heatmap",label:"When work happens",Component:Tq},{id:"weekly-burn",label:"Burn by source",Component:Eq},{id:"model-latency",label:"Model response latency",Component:Cq},{id:"review-latency",label:"Turnaround after a turn",Component:Mq},{id:"edit-reliability",label:"Edit failures by model",Component:$q},{id:"plan-rejections",label:"Plans & questions sent back",Component:Iq},{id:"file-rework",label:"Repeat edits per file",Component:Nq},{id:"findings-over-time",label:"Findings over time",Component:Dq}],Rq=["burn-heatmap","weekly-burn","model-latency","review-latency"],qq=["edit-reliability","plan-rejections","file-rework","findings-over-time"];function s0({label:e,items:t,hidden:r,onToggle:n,onMove:i,onReset:a}){const o=M_();return v.jsxs("details",{className:"col-customizer",ref:o,children:[v.jsx("summary",{"aria-label":`Customize ${e.toLowerCase()}`,title:`Show, hide and reorder ${e.toLowerCase()}`,children:"⚙"}),v.jsxs("div",{className:"col-menu strip-menu",role:"group","aria-label":`Customize ${e.toLowerCase()}`,children:[t.map((s,u)=>v.jsxs("div",{className:"strip-row",children:[v.jsxs("label",{children:[v.jsx("input",{type:"checkbox",checked:!r.has(s.id),onChange:c=>n(s.id,c.target.checked)}),s.label]}),v.jsx("button",{type:"button",className:"move","aria-label":`Move ${s.label} up`,disabled:u===0,onClick:()=>i(s.id,-1),children:"↑"}),v.jsx("button",{type:"button",className:"move","aria-label":`Move ${s.label} down`,disabled:u===t.length-1,onClick:()=>i(s.id,1),children:"↓"})]},s.id)),v.jsx("button",{type:"button",className:"ghost small ms-clear",onClick:a,children:"reset"})]})]})}function Lq({active:e,hasCustom:t,onSelect:r}){const n=[...d0.map(i=>({id:i.id,label:i.label})),...t?[{id:Ir,label:"Custom"}]:[]];return v.jsx("div",{className:"views view-toggle",role:"group","aria-label":"Dashboard view",children:n.map(i=>v.jsx("button",{type:"button",className:"ghost"+(i.id===e?" is-active":""),"aria-pressed":i.id===e,onClick:()=>r(i.id),children:i.label},i.id))})}function Bq(e,t){const[r,n]=R.useState(()=>ph(kl(To,null),kl(dh,null)));R.useEffect(()=>{Promise.all([lh(To),lh(dh)]).then(([h,m])=>{(h!=null||m!=null)&&n(ph(h,m))})},[]);const i=y0(r),a=R.useMemo(()=>yh(r,e,t),[r,e,t]),o=R.useCallback(h=>{n(h),$_(To,h)},[]),s=R.useCallback(h=>{const m=yh(r,e,t),y=h({kpis:{...m.kpis},charts:{...m.charts}});y&&o(U_(r,y))},[r,e,t,o]),u=R.useCallback(h=>o({...r,active:h}),[r,o]),c=R.useCallback((h,m,y)=>s(p=>({...p,[h]:{...p[h],hidden:H_(p[h].hidden,m,y)}})),[s]),f=R.useCallback((h,m,y,p)=>s(x=>{const w=K_(m,x[h].order,y,p);return w===x[h].order?null:{...x,[h]:{...x[h],order:w}}}),[s]),l=R.useCallback(h=>s(m=>({...m,[h]:{hidden:[],order:[]}})),[s]),d=R.useCallback(h=>o({...r,kpisCollapsed:h}),[r,o]);return{layout:r,active:i,body:a,setActive:u,toggle:c,move:f,reset:l,setKpisCollapsed:d}}const u0=ed.map(e=>e.id),c0=Jf.map(e=>e.id),Fq=[null,null,null];function Uq(){const{get:e,set:t,pick:r}=I_(),n=So("/sources",[]),i=So("/models",[]).filter(D=>D!=="<synthetic>"),a=So("/security/summary",null),o=q_(),s=B_(),{layout:u,active:c,body:f,setActive:l,toggle:d,move:h,reset:m,setKpisCollapsed:y}=Bq(u0,c0),p=new Set(f.charts.hidden),x=e("models").split(",").filter(Boolean),w=x.length?x:i,O=r(["source","from","to","bucket","models"]),_=O.toString()?"?"+O.toString():"",{data:g,loading:b,error:S}=Ao(()=>Promise.all([yn("/dashboard/overview"+_),yn("/dashboard/timeseries"+_),yn("/dashboard/breakdowns"+_)]),[_]),[A,j,k]=g??Fq,E={from:e("from"),to:e("to")},T=Rq.some(D=>!p.has(D)),{data:C,error:$}=Ao(()=>T?yn("/dashboard/time"+_):null,[_,T]),M=qq.some(D=>!p.has(D)),{data:N,error:q}=Ao(()=>M?yn("/dashboard/audit"+_):null,[_,M]);return v.jsxs("div",{children:[v.jsx("h1",{className:"sr-only",children:"Dashboard"}),v.jsxs("div",{className:"filters",children:[v.jsxs("select",{"aria-label":"Filter by source",value:e("source"),onChange:D=>t({source:D.target.value}),children:[v.jsx("option",{value:"",children:"all sources"}),n.map(D=>v.jsxs("option",{value:D.id,children:[D.label," (",D.session_count,")"]},D.id))]}),v.jsx(N_,{label:"Models",options:i.map(D=>({value:D,label:fr(D)})),selected:w,onChange:D=>t({models:D.length===i.length?"":D.join(",")}),reset:{label:"select all",to:i},disabled:fh,title:fh?"The exported demo serves one pre-computed view, so filters do not apply to it.":"Applies to every chart. Spend, turns and tool calls filter on the model that produced them; anything counted per session counts sessions that used one of these."}),v.jsxs("label",{className:"ctl",children:["from ",v.jsx("input",{type:"date",value:e("from"),onChange:D=>t({from:D.target.value})})]}),v.jsxs("label",{className:"ctl",children:["to ",v.jsx("input",{type:"date",value:e("to"),onChange:D=>t({to:D.target.value})})]}),v.jsxs("select",{"aria-label":"Time bucket",value:e("bucket"),onChange:D=>t({bucket:D.target.value}),children:[v.jsxs("option",{value:"",children:["bucket: auto",j?` (${j.bucket})`:""]}),v.jsx("option",{value:"day",children:"day"}),v.jsx("option",{value:"week",children:"week"}),v.jsx("option",{value:"month",children:"month"})]})]}),v.jsx(jo,{error:S}),v.jsx(jo,{error:$}),v.jsx(jo,{error:q}),b&&v.jsx(D_,{}),A&&!b&&v.jsxs(v.Fragment,{children:[v.jsx(Lq,{active:c,hasCustom:u.custom!=null,onSelect:l}),v.jsxs("section",{className:"dash-strip",children:[v.jsxs("div",{className:"strip-head",children:[v.jsx("h2",{children:"Metrics"}),v.jsxs("div",{className:"strip-actions",children:[v.jsx("button",{type:"button",className:"link-btn","aria-expanded":!u.kpisCollapsed,onClick:()=>y(!u.kpisCollapsed),children:u.kpisCollapsed?"▸ show":"▾ hide"}),v.jsx(s0,{label:"Metrics",items:zi(ed,f.kpis.order),hidden:new Set(f.kpis.hidden),onToggle:(D,F)=>d("kpis",D,F),onMove:(D,F)=>h("kpis",u0,D,F),onReset:()=>m("kpis")})]})]}),!u.kpisCollapsed&&v.jsx(X_,{ctx:{overview:A,bd:k,security:a},layout:f.kpis})]}),v.jsxs("section",{className:"dash-strip",children:[v.jsxs("div",{className:"strip-head",children:[v.jsx("h2",{children:"Charts"}),v.jsx("div",{className:"strip-actions",children:v.jsx(s0,{label:"Charts",items:zi(Jf,f.charts.order),hidden:p,onToggle:(D,F)=>d("charts",D,F),onMove:(D,F)=>h("charts",c0,D,F),onReset:()=>m("charts")})})]}),v.jsx("div",{className:"cards",children:zi(Jf,f.charts.order).map(({id:D,Component:F})=>v.jsx(F,{hidden:p.has(D),ts:j,bd:k,time:C,audit:N,expand:o,drill:s,range:E},D))})]})]})]})}export{Uq as default};
|