@kaitranntt/ccs 6.1.0-dev.6 → 6.1.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/VERSION +1 -1
- package/config/base-agy.settings.json +1 -1
- package/dist/cliproxy/model-config.d.ts.map +1 -1
- package/dist/cliproxy/model-config.js +28 -1
- package/dist/cliproxy/model-config.js.map +1 -1
- package/dist/ui/assets/accounts-BfRSUzvC.js +1 -0
- package/dist/ui/assets/analytics-ClDxRP9x.js +64 -0
- package/dist/ui/assets/api-DyJHhCv0.js +1 -0
- package/dist/ui/assets/{card-Chzj_-Ta.js → card-CrGAcUkx.js} +1 -1
- package/dist/ui/assets/cliproxy-Zr4pFy6O.js +1 -0
- package/dist/ui/assets/{cliproxy-control-panel-krYbmMtS.js → cliproxy-control-panel-Cu7DgEPx.js} +1 -1
- package/dist/ui/assets/{code-editor-CbTiomDl.js → code-editor-D0YjMRQO.js} +2 -2
- package/dist/ui/assets/{form-utils-BXvNPyud.js → form-utils-CKETQmt9.js} +1 -1
- package/dist/ui/assets/health-Rretog4H.js +1 -0
- package/dist/ui/assets/icons-D6DaLbNh.js +1 -0
- package/dist/ui/assets/index-B2PFll-u.js +46 -0
- package/dist/ui/assets/index-DTVwRqgB.css +1 -0
- package/dist/ui/assets/radix-ui-Bhyw9pC9.js +51 -0
- package/dist/ui/assets/{react-vendor-DMek_JCF.js → react-vendor-DadlvKzT.js} +1 -1
- package/dist/ui/assets/settings-B7OFU9lZ.js +1 -0
- package/dist/ui/assets/shared-qGCa7mu2.js +1 -0
- package/dist/ui/assets/{tanstack-yybD444-.js → tanstack-DZ3a6J0N.js} +1 -1
- package/dist/ui/index.html +7 -10
- package/package.json +1 -1
- package/dist/ui/assets/accounts-D4Or2xry.js +0 -1
- package/dist/ui/assets/analytics-I6l81S4I.js +0 -1
- package/dist/ui/assets/api-CQ-OQQhY.js +0 -1
- package/dist/ui/assets/charts-D_0N6JY8.js +0 -64
- package/dist/ui/assets/cliproxy-_MtZm4Ql.js +0 -1
- package/dist/ui/assets/code-highlight-C2TXE0-z.js +0 -3
- package/dist/ui/assets/health-BbQJHxJ8.js +0 -1
- package/dist/ui/assets/icons-D6zYxEB8.js +0 -1
- package/dist/ui/assets/index-B6Z8UW9Q.js +0 -44
- package/dist/ui/assets/index-CrdQwfsG.css +0 -1
- package/dist/ui/assets/notifications-cqk-Qeo2.js +0 -1
- package/dist/ui/assets/radix-ui-VbLlN_Dz.js +0 -51
- package/dist/ui/assets/settings-KpHgRrbY.js +0 -1
- package/dist/ui/assets/shared-CXuFWO_D.js +0 -1
- package/dist/ui/assets/utils-CzKF5WmX.js +0 -1
- package/dist/ui/logos/claudekit-logo.png +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{j as S}from"./radix-ui-Bhyw9pC9.js";import{j as Fi,g as se,r as D,c as P}from"./react-vendor-DadlvKzT.js";import{C as Re,a as qe,b as Ze,c as At}from"./card-CrGAcUkx.js";import{c as De,B as Vl,I as Sh,S as xe,a as J,g as $0,b as Fn,u as dO,d as hO,e as pO,P as vO,f as yO,h as mO}from"./index-B2PFll-u.js";import{x as gO,y as bO,D as k0,z as Xl,J as N0,N as I0,t as xO,G as wO,O as Ah,U as OO,Z as D0,j as _O,Q as Wi,V as SO,Y as AO,m as PO,_ as jO,a as TO,$ as EO}from"./icons-D6DaLbNh.js";import{u as MO,a as mn}from"./tanstack-DZ3a6J0N.js";import"./form-utils-CKETQmt9.js";const R0=6048e5,CO=864e5,Ui=43200,Ph=1440,jh=Symbol.for("constructDateFrom");function gt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&jh in e?e[jh](t):e instanceof Date?new e.constructor(t):new Date(t)}function Oe(e,t){return gt(t||e,e)}function $O(e,t,r){const n=Oe(e,r?.in);return isNaN(t)?gt(e,NaN):(t&&n.setDate(n.getDate()+t),n)}let kO={};function $i(){return kO}function Vn(e,t){const r=$i(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Oe(e,t?.in),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function ua(e,t){return Vn(e,{...t,weekStartsOn:1})}function q0(e,t){const r=Oe(e,t?.in),n=r.getFullYear(),i=gt(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=ua(i),o=gt(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const u=ua(o);return r.getTime()>=a.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function sa(e){const t=Oe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function oo(e,...t){const r=gt.bind(null,e||t.find(n=>typeof n=="object"));return t.map(r)}function Th(e,t){const r=Oe(e,t?.in);return r.setHours(0,0,0,0),r}function NO(e,t,r){const[n,i]=oo(r?.in,e,t),a=Th(n),o=Th(i),u=+a-sa(a),s=+o-sa(o);return Math.round((u-s)/CO)}function IO(e,t){const r=q0(e,t),n=gt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ua(n)}function aa(e,t){const r=+Oe(e)-+Oe(t);return r<0?-1:r>0?1:r}function DO(e){return gt(e,Date.now())}function RO(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qO(e){return!(!RO(e)&&typeof e!="number"||isNaN(+Oe(e)))}function LO(e,t,r){const[n,i]=oo(r?.in,e,t),a=n.getFullYear()-i.getFullYear(),o=n.getMonth()-i.getMonth();return a*12+o}function BO(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function FO(e,t){return+Oe(e)-+Oe(t)}function WO(e,t){const r=Oe(e,t?.in);return r.setHours(23,59,59,999),r}function UO(e,t){const r=Oe(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function zO(e,t){const r=Oe(e,t?.in);return+WO(r,t)==+UO(r,t)}function HO(e,t,r){const[n,i,a]=oo(r?.in,e,e,t),o=aa(i,a),u=Math.abs(LO(i,a));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*u);let s=aa(i,a)===-o;zO(n)&&u===1&&aa(n,a)===1&&(s=!1);const c=o*(u-+s);return c===0?0:c}function GO(e,t,r){const n=FO(e,t)/1e3;return BO(r?.roundingMethod)(n)}function KO(e,t){const r=Oe(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function YO(e,t){const r=Oe(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const VO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},XO=(e,t,r)=>{let n;const i=VO[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Ko(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const ZO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},QO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},JO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},e_={date:Ko({formats:ZO,defaultWidth:"full"}),time:Ko({formats:QO,defaultWidth:"full"}),dateTime:Ko({formats:JO,defaultWidth:"full"})},t_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r_=(e,t,r,n)=>t_[e];function jn(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,u=r?.width?String(r.width):o;i=e.formattingValues[u]||e.formattingValues[o]}else{const o=e.defaultWidth,u=r?.width?String(r.width):e.defaultWidth;i=e.values[u]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const n_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},i_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},a_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},u_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},s_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},c_=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},l_={ordinalNumber:c_,era:jn({values:n_,defaultWidth:"wide"}),quarter:jn({values:i_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:jn({values:a_,defaultWidth:"wide"}),day:jn({values:o_,defaultWidth:"wide"}),dayPeriod:jn({values:u_,defaultWidth:"wide",formattingValues:s_,defaultFormattingWidth:"wide"})};function Tn(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?d_(u,l=>l.test(o)):f_(u,l=>l.test(o));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;const f=t.slice(o.length);return{value:c,rest:f}}}function f_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function d_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function h_(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const u=t.slice(i.length);return{value:o,rest:u}}}const p_=/^(\d+)(th|st|nd|rd)?/i,v_=/\d+/i,y_={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},m_={any:[/^b/i,/^(a|c)/i]},g_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},b_={any:[/1/i,/2/i,/3/i,/4/i]},x_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},w_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},O_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},__={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},S_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},A_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},P_={ordinalNumber:h_({matchPattern:p_,parsePattern:v_,valueCallback:e=>parseInt(e,10)}),era:Tn({matchPatterns:y_,defaultMatchWidth:"wide",parsePatterns:m_,defaultParseWidth:"any"}),quarter:Tn({matchPatterns:g_,defaultMatchWidth:"wide",parsePatterns:b_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Tn({matchPatterns:x_,defaultMatchWidth:"wide",parsePatterns:w_,defaultParseWidth:"any"}),day:Tn({matchPatterns:O_,defaultMatchWidth:"wide",parsePatterns:__,defaultParseWidth:"any"}),dayPeriod:Tn({matchPatterns:S_,defaultMatchWidth:"any",parsePatterns:A_,defaultParseWidth:"any"})},L0={code:"en-US",formatDistance:XO,formatLong:e_,formatRelative:r_,localize:l_,match:P_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function j_(e,t){const r=Oe(e,t?.in);return NO(r,YO(r))+1}function T_(e,t){const r=Oe(e,t?.in),n=+ua(r)-+IO(r);return Math.round(n/R0)+1}function B0(e,t){const r=Oe(e,t?.in),n=r.getFullYear(),i=$i(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=gt(t?.in||e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const u=Vn(o,t),s=gt(t?.in||e,0);s.setFullYear(n,0,a),s.setHours(0,0,0,0);const c=Vn(s,t);return+r>=+u?n+1:+r>=+c?n:n-1}function E_(e,t){const r=$i(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=B0(e,t),a=gt(t?.in||e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),Vn(a,t)}function M_(e,t){const r=Oe(e,t?.in),n=+Vn(r,t)-+E_(r,t);return Math.round(n/R0)+1}function oe(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Ft={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return oe(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):oe(r+1,2)},d(e,t){return oe(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return oe(e.getHours()%12||12,t.length)},H(e,t){return oe(e.getHours(),t.length)},m(e,t){return oe(e.getMinutes(),t.length)},s(e,t){return oe(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return oe(i,t.length)}},Er={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Eh={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Ft.y(e,t)},Y:function(e,t,r,n){const i=B0(e,n),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return oe(o,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):oe(a,t.length)},R:function(e,t){const r=q0(e);return oe(r,t.length)},u:function(e,t){const r=e.getFullYear();return oe(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return oe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return oe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Ft.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return oe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=M_(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):oe(i,t.length)},I:function(e,t,r){const n=T_(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):oe(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ft.d(e,t)},D:function(e,t,r){const n=j_(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):oe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return oe(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return oe(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return oe(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=Er.noon:n===0?i=Er.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Er.evening:n>=12?i=Er.afternoon:n>=4?i=Er.morning:i=Er.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Ft.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ft.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):oe(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):oe(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ft.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ft.s(e,t)},S:function(e,t){return Ft.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Ch(n);case"XXXX":case"XX":return ar(n);case"XXXXX":case"XXX":default:return ar(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Ch(n);case"xxxx":case"xx":return ar(n);case"xxxxx":case"xxx":default:return ar(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mh(n,":");case"OOOO":default:return"GMT"+ar(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mh(n,":");case"zzzz":default:return"GMT"+ar(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return oe(n,t.length)},T:function(e,t,r){return oe(+e,t.length)}};function Mh(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+oe(a,2)}function Ch(e,t){return e%60===0?(e>0?"-":"+")+oe(Math.abs(e)/60,2):ar(e,t)}function ar(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=oe(Math.trunc(n/60),2),a=oe(n%60,2);return r+i+t+a}const $h=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},F0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},C_=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return $h(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",$h(n,t)).replace("{{time}}",F0(i,t))},$_={p:F0,P:C_},k_=/^D+$/,N_=/^Y+$/,I_=["D","DD","YY","YYYY"];function D_(e){return k_.test(e)}function R_(e){return N_.test(e)}function q_(e,t,r){const n=L_(e,t,r);if(console.warn(n),I_.includes(e))throw new RangeError(n)}function L_(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const B_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W_=/^'([^]*?)'?$/,U_=/''/g,z_=/[a-zA-Z]/;function Wn(e,t,r){const n=$i(),i=n.locale??L0,a=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,u=Oe(e,r?.in);if(!qO(u))throw new RangeError("Invalid time value");let s=t.match(F_).map(f=>{const l=f[0];if(l==="p"||l==="P"){const d=$_[l];return d(f,i.formatLong)}return f}).join("").match(B_).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const l=f[0];if(l==="'")return{isToken:!1,value:H_(f)};if(Eh[l])return{isToken:!0,value:f};if(l.match(z_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(s=i.localize.preprocessor(u,s));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return s.map(f=>{if(!f.isToken)return f.value;const l=f.value;(R_(l)||D_(l))&&q_(l,t,String(e));const d=Eh[l[0]];return d(u,l,i.localize,c)}).join("")}function H_(e){const t=e.match(W_);return t?t[1].replace(U_,"'"):e}function G_(e,t,r){const n=$i(),i=r?.locale??n.locale??L0,a=2520,o=aa(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const u=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:o}),[s,c]=oo(r?.in,...o>0?[t,e]:[e,t]),f=GO(c,s),l=(sa(c)-sa(s))/1e3,d=Math.round((f-l)/60);let h;if(d<2)return r?.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,u):f<10?i.formatDistance("lessThanXSeconds",10,u):f<20?i.formatDistance("lessThanXSeconds",20,u):f<40?i.formatDistance("halfAMinute",0,u):f<60?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",1,u):d===0?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",d,u);if(d<45)return i.formatDistance("xMinutes",d,u);if(d<90)return i.formatDistance("aboutXHours",1,u);if(d<Ph){const y=Math.round(d/60);return i.formatDistance("aboutXHours",y,u)}else{if(d<a)return i.formatDistance("xDays",1,u);if(d<Ui){const y=Math.round(d/Ph);return i.formatDistance("xDays",y,u)}else if(d<Ui*2)return h=Math.round(d/Ui),i.formatDistance("aboutXMonths",h,u)}if(h=HO(c,s),h<12){const y=Math.round(d/Ui);return i.formatDistance("xMonths",y,u)}else{const y=h%12,v=Math.trunc(h/12);return y<3?i.formatDistance("aboutXYears",v,u):y<9?i.formatDistance("overXYears",v,u):i.formatDistance("almostXYears",v+1,u)}}function Zl(e,t){return G_(e,DO(e),t)}function zi(e,t,r){return $O(e,-t,r)}function K_({value:e,onChange:t,presets:r=[],className:n}){const i=u=>{t(u)},a=u=>{const s=u.target.value?new Date(u.target.value):void 0;t({from:s,to:e?.to})},o=u=>{const s=u.target.value?new Date(u.target.value):void 0;t({from:e?.from,to:s})};return S.jsxs("div",{className:De("flex flex-wrap items-center gap-2",n),children:[r.map((u,s)=>S.jsx(Vl,{variant:Y_(e,u.range)?"default":"outline",size:"sm",onClick:()=>i(u.range),children:u.label},s)),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx(gO,{className:"h-4 w-4 text-muted-foreground"}),S.jsx(Sh,{type:"date",value:e?.from?Wn(e.from,"yyyy-MM-dd"):"",onChange:a,placeholder:"From",className:"w-40"})]}),S.jsx("span",{className:"text-muted-foreground",children:"to"}),S.jsx(Sh,{type:"date",value:e?.to?Wn(e.to,"yyyy-MM-dd"):"",onChange:o,placeholder:"To",className:"w-40"})]})]})}function Y_(e,t){if(!e||!t)return e===t;const r=e.from?.getTime()??0,n=t.from?.getTime()??0,i=e.to?.getTime()??0,a=t.to?.getTime()??0;return r===n&&i===a}function V_({data:e,isLoading:t}){if(t)return S.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-5 gap-4",children:[1,2,3,4,5].map(a=>S.jsx(Re,{children:S.jsx(qe,{className:"p-6",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsx(xe,{className:"h-4 w-[100px]"}),S.jsx(xe,{className:"h-8 w-[80px]"})]}),S.jsx(xe,{className:"h-8 w-8 rounded-lg"})]})})},a))});const r=(e?.tokenBreakdown?.cacheCreation?.cost??0)+(e?.tokenBreakdown?.cacheRead?.cost??0),n=e?.totalCost?Math.round(r/e.totalCost*100):0,i=[{title:"Total Tokens",value:e?.totalTokens??0,icon:bO,format:a=>Mr(a),color:"text-blue-600",bgColor:"bg-blue-100 dark:bg-blue-900/20",subtitle:`${Mr(e?.totalInputTokens??0)} in / ${Mr(e?.totalOutputTokens??0)} out`},{title:"Total Cost",value:e?.totalCost??0,icon:k0,format:a=>`$${a.toFixed(2)}`,color:"text-green-600",bgColor:"bg-green-100 dark:bg-green-900/20",subtitle:`$${e?.averageCostPerDay?.toFixed(2)??"0.00"}/day avg`},{title:"Cache Tokens",value:e?.totalCacheTokens??0,icon:Xl,format:a=>Mr(a),color:"text-cyan-600",bgColor:"bg-cyan-100 dark:bg-cyan-900/20",subtitle:`$${r.toFixed(2)} (${n}% of cost)`},{title:"Input Cost",value:e?.tokenBreakdown?.input?.cost??0,icon:N0,format:a=>`$${a.toFixed(2)}`,color:"text-purple-600",bgColor:"bg-purple-100 dark:bg-purple-900/20",subtitle:`${Mr(e?.tokenBreakdown?.input?.tokens??0)} tokens`},{title:"Output Cost",value:e?.tokenBreakdown?.output?.cost??0,icon:I0,format:a=>`$${a.toFixed(2)}`,color:"text-orange-600",bgColor:"bg-orange-100 dark:bg-orange-900/20",subtitle:`${Mr(e?.tokenBreakdown?.output?.tokens??0)} tokens`}];return S.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-5 gap-4",children:i.map((a,o)=>{const u=a.icon;return S.jsx(Re,{className:"hover:shadow-md transition-shadow",children:S.jsx(qe,{className:"p-4",children:S.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[S.jsxs("div",{className:"space-y-1 min-w-0",children:[S.jsx("p",{className:"text-xs font-medium text-muted-foreground truncate",children:a.title}),S.jsx("p",{className:"text-xl font-bold truncate",children:a.format(a.value)}),a.subtitle&&S.jsx("p",{className:"text-[10px] text-muted-foreground truncate",children:a.subtitle})]}),S.jsx("div",{className:De("p-2 rounded-lg shrink-0",a.bgColor),children:S.jsx(u,{className:De("h-4 w-4",a.color)})})]})})},o)})})}function Mr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}var Yo,kh;function Ge(){if(kh)return Yo;kh=1;var e=Array.isArray;return Yo=e,Yo}var Vo,Nh;function W0(){if(Nh)return Vo;Nh=1;var e=typeof Fi=="object"&&Fi&&Fi.Object===Object&&Fi;return Vo=e,Vo}var Xo,Ih;function wt(){if(Ih)return Xo;Ih=1;var e=W0(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Xo=r,Xo}var Zo,Dh;function ki(){if(Dh)return Zo;Dh=1;var e=wt(),t=e.Symbol;return Zo=t,Zo}var Qo,Rh;function X_(){if(Rh)return Qo;Rh=1;var e=ki(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=r.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(u?o[i]=s:delete o[i]),f}return Qo=a,Qo}var Jo,qh;function Z_(){if(qh)return Jo;qh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jo=r,Jo}var eu,Lh;function Dt(){if(Lh)return eu;Lh=1;var e=ki(),t=X_(),r=Z_(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return eu=o,eu}var tu,Bh;function Rt(){if(Bh)return tu;Bh=1;function e(t){return t!=null&&typeof t=="object"}return tu=e,tu}var ru,Fh;function gn(){if(Fh)return ru;Fh=1;var e=Dt(),t=Rt(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return ru=n,ru}var nu,Wh;function bd(){if(Wh)return nu;Wh=1;var e=Ge(),t=gn(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return nu=i,nu}var iu,Uh;function Vt(){if(Uh)return iu;Uh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return iu=e,iu}var au,zh;function xd(){if(zh)return au;zh=1;var e=Dt(),t=Vt(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==i||s==r||s==a}return au=o,au}var ou,Hh;function Q_(){if(Hh)return ou;Hh=1;var e=wt(),t=e["__core-js_shared__"];return ou=t,ou}var uu,Gh;function J_(){if(Gh)return uu;Gh=1;var e=Q_(),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 uu=r,uu}var su,Kh;function U0(){if(Kh)return su;Kh=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 su=r,su}var cu,Yh;function eS(){if(Yh)return cu;Yh=1;var e=xd(),t=J_(),r=Vt(),n=U0(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,f=RegExp("^"+s.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 cu=l,cu}var lu,Vh;function tS(){if(Vh)return lu;Vh=1;function e(t,r){return t?.[r]}return lu=e,lu}var fu,Xh;function Or(){if(Xh)return fu;Xh=1;var e=eS(),t=tS();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return fu=r,fu}var du,Zh;function uo(){if(Zh)return du;Zh=1;var e=Or(),t=e(Object,"create");return du=t,du}var hu,Qh;function rS(){if(Qh)return hu;Qh=1;var e=uo();function t(){this.__data__=e?e(null):{},this.size=0}return hu=t,hu}var pu,Jh;function nS(){if(Jh)return pu;Jh=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return pu=e,pu}var vu,ep;function iS(){if(ep)return vu;ep=1;var e=uo(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var u=o[a];return u===t?void 0:u}return n.call(o,a)?o[a]:void 0}return vu=i,vu}var yu,tp;function aS(){if(tp)return yu;tp=1;var e=uo(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return yu=n,yu}var mu,rp;function oS(){if(rp)return mu;rp=1;var e=uo(),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 mu=r,mu}var gu,np;function uS(){if(np)return gu;np=1;var e=rS(),t=nS(),r=iS(),n=aS(),i=oS();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];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,gu=a,gu}var bu,ip;function sS(){if(ip)return bu;ip=1;function e(){this.__data__=[],this.size=0}return bu=e,bu}var xu,ap;function wd(){if(ap)return xu;ap=1;function e(t,r){return t===r||t!==t&&r!==r}return xu=e,xu}var wu,op;function so(){if(op)return wu;op=1;var e=wd();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return wu=t,wu}var Ou,up;function cS(){if(up)return Ou;up=1;var e=so(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var u=a.length-1;return o==u?a.pop():r.call(a,o,1),--this.size,!0}return Ou=n,Ou}var _u,sp;function lS(){if(sp)return _u;sp=1;var e=so();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return _u=t,_u}var Su,cp;function fS(){if(cp)return Su;cp=1;var e=so();function t(r){return e(this.__data__,r)>-1}return Su=t,Su}var Au,lp;function dS(){if(lp)return Au;lp=1;var e=so();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 Au=t,Au}var Pu,fp;function co(){if(fp)return Pu;fp=1;var e=sS(),t=cS(),r=lS(),n=fS(),i=dS();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];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,Pu=a,Pu}var ju,dp;function Od(){if(dp)return ju;dp=1;var e=Or(),t=wt(),r=e(t,"Map");return ju=r,ju}var Tu,hp;function hS(){if(hp)return Tu;hp=1;var e=uS(),t=co(),r=Od();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Tu=n,Tu}var Eu,pp;function pS(){if(pp)return Eu;pp=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Eu=e,Eu}var Mu,vp;function lo(){if(vp)return Mu;vp=1;var e=pS();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Mu=t,Mu}var Cu,yp;function vS(){if(yp)return Cu;yp=1;var e=lo();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Cu=t,Cu}var $u,mp;function yS(){if(mp)return $u;mp=1;var e=lo();function t(r){return e(this,r).get(r)}return $u=t,$u}var ku,gp;function mS(){if(gp)return ku;gp=1;var e=lo();function t(r){return e(this,r).has(r)}return ku=t,ku}var Nu,bp;function gS(){if(bp)return Nu;bp=1;var e=lo();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 Nu=t,Nu}var Iu,xp;function _d(){if(xp)return Iu;xp=1;var e=hS(),t=vS(),r=yS(),n=mS(),i=gS();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];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,Iu=a,Iu}var Du,wp;function z0(){if(wp)return Du;wp=1;var e=_d(),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,u=i?i.apply(this,o):o[0],s=a.cache;if(s.has(u))return s.get(u);var c=n.apply(this,o);return a.cache=s.set(u,c)||s,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,Du=r,Du}var Ru,Op;function bS(){if(Op)return Ru;Op=1;var e=z0(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return Ru=r,Ru}var qu,_p;function xS(){if(_p)return qu;_p=1;var e=bS(),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,u,s,c){a.push(s?c.replace(r,"$1"):u||o)}),a});return qu=n,qu}var Lu,Sp;function Sd(){if(Sp)return Lu;Sp=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 Lu=e,Lu}var Bu,Ap;function wS(){if(Ap)return Bu;Ap=1;var e=ki(),t=Sd(),r=Ge(),n=gn(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(u){if(typeof u=="string")return u;if(r(u))return t(u,o)+"";if(n(u))return a?a.call(u):"";var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return Bu=o,Bu}var Fu,Pp;function H0(){if(Pp)return Fu;Pp=1;var e=wS();function t(r){return r==null?"":e(r)}return Fu=t,Fu}var Wu,jp;function G0(){if(jp)return Wu;jp=1;var e=Ge(),t=bd(),r=xS(),n=H0();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return Wu=i,Wu}var Uu,Tp;function fo(){if(Tp)return Uu;Tp=1;var e=gn();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Uu=t,Uu}var zu,Ep;function Ad(){if(Ep)return zu;Ep=1;var e=G0(),t=fo();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 zu=r,zu}var Hu,Mp;function K0(){if(Mp)return Hu;Mp=1;var e=Ad();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return Hu=t,Hu}var OS=K0();const Qe=se(OS);var Gu,Cp;function _S(){if(Cp)return Gu;Cp=1;function e(t){return t==null}return Gu=e,Gu}var SS=_S();const Z=se(SS);var Ku,$p;function AS(){if($p)return Ku;$p=1;var e=Dt(),t=Ge(),r=Rt(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return Ku=i,Ku}var PS=AS();const yr=se(PS);var jS=xd();const V=se(jS);var TS=Vt();const bn=se(TS);var Yu={exports:{}},ie={};var kp;function ES(){if(kp)return ie;kp=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"),u=Symbol.for("react.server_context"),s=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"),y;y=Symbol.for("react.module.reference");function v(p){if(typeof p=="object"&&p!==null){var g=p.$$typeof;switch(g){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 u:case o:case s:case d:case l:case a:return p;default:return g}}case t:return g}}}return ie.ContextConsumer=o,ie.ContextProvider=a,ie.Element=e,ie.ForwardRef=s,ie.Fragment=r,ie.Lazy=d,ie.Memo=l,ie.Portal=t,ie.Profiler=i,ie.StrictMode=n,ie.Suspense=c,ie.SuspenseList=f,ie.isAsyncMode=function(){return!1},ie.isConcurrentMode=function(){return!1},ie.isContextConsumer=function(p){return v(p)===o},ie.isContextProvider=function(p){return v(p)===a},ie.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ie.isForwardRef=function(p){return v(p)===s},ie.isFragment=function(p){return v(p)===r},ie.isLazy=function(p){return v(p)===d},ie.isMemo=function(p){return v(p)===l},ie.isPortal=function(p){return v(p)===t},ie.isProfiler=function(p){return v(p)===i},ie.isStrictMode=function(p){return v(p)===n},ie.isSuspense=function(p){return v(p)===c},ie.isSuspenseList=function(p){return v(p)===f},ie.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===s||p.$$typeof===y||p.getModuleId!==void 0)},ie.typeOf=v,ie}var Np;function MS(){return Np||(Np=1,Yu.exports=ES()),Yu.exports}var CS=MS(),Vu,Ip;function Y0(){if(Ip)return Vu;Ip=1;var e=Dt(),t=Rt(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return Vu=n,Vu}var Xu,Dp;function $S(){if(Dp)return Xu;Dp=1;var e=Y0();function t(r){return e(r)&&r!=+r}return Xu=t,Xu}var kS=$S();const xn=se(kS);var NS=Y0();const IS=se(NS);var Le=function(t){return t===0?0:t>0?1:-1},cr=function(t){return yr(t)&&t.indexOf("%")===t.length-1},L=function(t){return IS(t)&&!xn(t)},DS=function(t){return Z(t)},Te=function(t){return L(t)||yr(t)},RS=0,wn=function(t){var r=++RS;return"".concat(t||"").concat(r)},Be=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(!L(t)&&!yr(t))return n;var a;if(cr(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xn(a)&&(a=n),i&&a>r&&(a=r),a},Ht=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},qS=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},ze=function(t,r){return L(t)&&L(r)?function(n){return t+n*(r-t)}:function(){return r}};function ca(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Qe(n,t))===r})}var LS=function(t,r){return L(t)&&L(r)?t-r:yr(t)&&yr(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Lr(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 Ql(e){"@babel/helpers - typeof";return Ql=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},Ql(e)}var BS=["viewBox","children"],FS=["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"],Rp=["points","pathLength"],Zu={svg:BS,polygon:Rp,polyline:Rp},Pd=["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"],la=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(D.isValidElement(t)&&(n=t.props),!bn(n))return null;var i={};return Object.keys(n).forEach(function(a){Pd.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},WS=function(t,r,n){return function(i){return t(r,n,i),null}},mr=function(t,r,n){if(!bn(t)||Ql(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];Pd.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=WS(o,r,n))}),i},US=["children"],zS=["children"];function qp(e,t){if(e==null)return{};var r=HS(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 HS(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 Jl(e){"@babel/helpers - typeof";return Jl=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},Jl(e)}var Lp={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":""},Bp=null,Qu=null,jd=function e(t){if(t===Bp&&Array.isArray(Qu))return Qu;var r=[];return D.Children.forEach(t,function(n){Z(n)||(CS.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Qu=r,Bp=t,r};function at(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Et(i)}):n=[Et(t)],jd(e).forEach(function(i){var a=Qe(i,"type.displayName")||Qe(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Ve(e,t){var r=at(e,t);return r&&r[0]}var Fp=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!L(n)||n<=0||!L(i)||i<=0)},GS=["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"],KS=function(t){return t&&t.type&&yr(t.type)&&GS.indexOf(t.type)>=0},YS=function(t){return t&&Jl(t)==="object"&&"clipDot"in t},VS=function(t,r,n,i){var a,o=(a=Zu?.[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!V(t)&&(i&&o.includes(r)||FS.includes(r))||n&&Pd.includes(r)},G=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(D.isValidElement(t)&&(i=t.props),!bn(i))return null;var a={};return Object.keys(i).forEach(function(o){var u;VS((u=i)===null||u===void 0?void 0:u[o],o,r,n)&&(a[o]=i[o])}),a},ef=function e(t,r){if(t===r)return!0;var n=D.Children.count(t);if(n!==D.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Wp(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(!Wp(a,o))return!1}return!0},Wp=function(t,r){if(Z(t)&&Z(r))return!0;if(!Z(t)&&!Z(r)){var n=t.props||{},i=n.children,a=qp(n,US),o=r.props||{},u=o.children,s=qp(o,zS);return i&&u?Lr(a,s)&&ef(i,u):!i&&!u?Lr(a,s):!1}return!1},Up=function(t,r){var n=[],i={};return jd(t).forEach(function(a,o){if(KS(a))n.push(a);else if(a){var u=Et(a.type),s=r[u]||{},c=s.handler,f=s.once;if(c&&(!f||!i[u])){var l=c(a,u,o);n.push(l),i[u]=!0}}}),n},XS=function(t){var r=t&&t.type;return r&&Lp[r]?Lp[r]:null},ZS=function(t,r){return jd(r).indexOf(t)},QS=["children","width","height","viewBox","className","style","title","desc"];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 JS(e,t){if(e==null)return{};var r=eA(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 eA(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 rf(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,u=e.title,s=e.desc,c=JS(e,QS),f=i||{width:r,height:n,x:0,y:0},l=J("recharts-surface",a);return P.createElement("svg",tf({},G(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,u),P.createElement("desc",null,s),t)}var tA=["children","className"];function nf(){return nf=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},nf.apply(this,arguments)}function rA(e,t){if(e==null)return{};var r=nA(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 nA(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 te=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=rA(e,tA),a=J("recharts-layer",n);return P.createElement("g",nf({className:a},G(i,!0),{ref:t}),r)}),dt=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]},Ju,zp;function iA(){if(zp)return Ju;zp=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 Ju=e,Ju}var es,Hp;function aA(){if(Hp)return es;Hp=1;var e=iA();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 es=t,es}var ts,Gp;function V0(){if(Gp)return ts;Gp=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",u=RegExp("["+o+e+i+a+"]");function s(c){return u.test(c)}return ts=s,ts}var rs,Kp;function oA(){if(Kp)return rs;Kp=1;function e(t){return t.split("")}return rs=e,rs}var ns,Yp;function uA(){if(Yp)return ns;Yp=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",u="["+i+"]",s="\\ud83c[\\udffb-\\udfff]",c="(?:"+u+"|"+s+")",f="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",y=c+"?",v="["+a+"]?",p="(?:"+h+"(?:"+[f,l,d].join("|")+")"+v+y+")*",g=v+y+p,x="(?:"+[f+u+"?",u,l,d,o].join("|")+")",w=RegExp(s+"(?="+s+")|"+x+g,"g");function O(m){return m.match(w)||[]}return ns=O,ns}var is,Vp;function sA(){if(Vp)return is;Vp=1;var e=oA(),t=V0(),r=uA();function n(i){return t(i)?r(i):e(i)}return is=n,is}var as,Xp;function cA(){if(Xp)return as;Xp=1;var e=aA(),t=V0(),r=sA(),n=H0();function i(a){return function(o){o=n(o);var u=t(o)?r(o):void 0,s=u?u[0]:o.charAt(0),c=u?e(u,1).join(""):o.slice(1);return s[a]()+c}}return as=i,as}var os,Zp;function lA(){if(Zp)return os;Zp=1;var e=cA(),t=e("toUpperCase");return os=t,os}var fA=lA();const ho=se(fA);function fe(e){return function(){return e}}const X0=Math.cos,fa=Math.sin,ht=Math.sqrt,da=Math.PI,po=2*da,af=Math.PI,of=2*af,or=1e-6,dA=of-or;function Z0(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function hA(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Z0;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 pA{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Z0:hA(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,s=n-t,c=i-r,f=o-t,l=u-r,d=f*f+l*l;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>or)if(!(Math.abs(l*s-c*f)>or)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,y=i-u,v=s*s+c*c,p=h*h+y*y,g=Math.sqrt(v),x=Math.sqrt(d),w=a*Math.tan((af-Math.acos((v+d-p)/(2*g*x)))/2),O=w/x,m=w/g;Math.abs(O-1)>or&&this._append`L${t+O*f},${r+O*l}`,this._append`A${a},${a},0,0,${+(l*h>f*y)},${this._x1=t+m*s},${this._y1=r+m*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 u=n*Math.cos(i),s=n*Math.sin(i),c=t+u,f=r+s,l=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>or||Math.abs(this._y1-f)>or)&&this._append`L${c},${f}`,n&&(d<0&&(d=d%of+of),d>dA?this._append`A${n},${n},0,1,${l},${t-u},${r-s}A${n},${n},0,1,${l},${this._x1=c},${this._y1=f}`:d>or&&this._append`A${n},${n},0,${+(d>=af)},${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 Td(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 pA(t)}function Ed(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Q0(e){this._context=e}Q0.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 vo(e){return new Q0(e)}function J0(e){return e[0]}function ex(e){return e[1]}function tx(e,t){var r=fe(!0),n=null,i=vo,a=null,o=Td(u);e=typeof e=="function"?e:e===void 0?J0:fe(e),t=typeof t=="function"?t:t===void 0?ex:fe(t);function u(s){var c,f=(s=Ed(s)).length,l,d=!1,h;for(n==null&&(a=i(h=o())),c=0;c<=f;++c)!(c<f&&r(l=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(l,c,s),+t(l,c,s));if(h)return a=null,h+""||null}return u.x=function(s){return arguments.length?(e=typeof s=="function"?s:fe(+s),u):e},u.y=function(s){return arguments.length?(t=typeof s=="function"?s:fe(+s),u):t},u.defined=function(s){return arguments.length?(r=typeof s=="function"?s:fe(!!s),u):r},u.curve=function(s){return arguments.length?(i=s,n!=null&&(a=i(n)),u):i},u.context=function(s){return arguments.length?(s==null?n=a=null:a=i(n=s),u):n},u}function Hi(e,t,r){var n=null,i=fe(!0),a=null,o=vo,u=null,s=Td(c);e=typeof e=="function"?e:e===void 0?J0:fe(+e),t=typeof t=="function"?t:fe(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?ex:fe(+r);function c(l){var d,h,y,v=(l=Ed(l)).length,p,g=!1,x,w=new Array(v),O=new Array(v);for(a==null&&(u=o(x=s())),d=0;d<=v;++d){if(!(d<v&&i(p=l[d],d,l))===g)if(g=!g)h=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),y=d-1;y>=h;--y)u.point(w[y],O[y]);u.lineEnd(),u.areaEnd()}g&&(w[d]=+e(p,d,l),O[d]=+t(p,d,l),u.point(n?+n(p,d,l):w[d],r?+r(p,d,l):O[d]))}if(x)return u=null,x+""||null}function f(){return tx().defined(i).curve(o).context(a)}return c.x=function(l){return arguments.length?(e=typeof l=="function"?l:fe(+l),n=null,c):e},c.x0=function(l){return arguments.length?(e=typeof l=="function"?l:fe(+l),c):e},c.x1=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:fe(+l),c):n},c.y=function(l){return arguments.length?(t=typeof l=="function"?l:fe(+l),r=null,c):t},c.y0=function(l){return arguments.length?(t=typeof l=="function"?l:fe(+l),c):t},c.y1=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:fe(+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:fe(!!l),c):i},c.curve=function(l){return arguments.length?(o=l,a!=null&&(u=o(a)),c):o},c.context=function(l){return arguments.length?(l==null?a=u=null:u=o(a=l),c):a},c}class rx{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 vA(e){return new rx(e,!0)}function yA(e){return new rx(e,!1)}const Md={draw(e,t){const r=ht(t/da);e.moveTo(r,0),e.arc(0,0,r,0,po)}},mA={draw(e,t){const r=ht(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()}},nx=ht(1/3),gA=nx*2,bA={draw(e,t){const r=ht(t/gA),n=r*nx;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},xA={draw(e,t){const r=ht(t),n=-r/2;e.rect(n,n,r,r)}},wA=.8908130915292852,ix=fa(da/10)/fa(7*da/10),OA=fa(po/10)*ix,_A=-X0(po/10)*ix,SA={draw(e,t){const r=ht(t*wA),n=OA*r,i=_A*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=po*a/5,u=X0(o),s=fa(o);e.lineTo(s*r,-u*r),e.lineTo(u*n-s*i,s*n+u*i)}e.closePath()}},us=ht(3),AA={draw(e,t){const r=-ht(t/(us*3));e.moveTo(0,r*2),e.lineTo(-us*r,-r),e.lineTo(us*r,-r),e.closePath()}},Je=-.5,et=ht(3)/2,uf=1/ht(12),PA=(uf/2+1)*3,jA={draw(e,t){const r=ht(t/PA),n=r/2,i=r*uf,a=n,o=r*uf+r,u=-a,s=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,s),e.lineTo(Je*n-et*i,et*n+Je*i),e.lineTo(Je*a-et*o,et*a+Je*o),e.lineTo(Je*u-et*s,et*u+Je*s),e.lineTo(Je*n+et*i,Je*i-et*n),e.lineTo(Je*a+et*o,Je*o-et*a),e.lineTo(Je*u+et*s,Je*s-et*u),e.closePath()}};function TA(e,t){let r=null,n=Td(i);e=typeof e=="function"?e:fe(e||Md),t=typeof t=="function"?t:fe(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:fe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:fe(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ha(){}function pa(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 ax(e){this._context=e}ax.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:pa(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:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function EA(e){return new ax(e)}function ox(e){this._context=e}ox.prototype={areaStart:ha,areaEnd:ha,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:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MA(e){return new ox(e)}function ux(e){this._context=e}ux.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:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CA(e){return new ux(e)}function sx(e){this._context=e}sx.prototype={areaStart:ha,areaEnd:ha,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 $A(e){return new sx(e)}function Qp(e){return e<0?-1:1}function Jp(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(Qp(a)+Qp(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function ev(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ss(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function va(e){this._context=e}va.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:ss(this,this._t0,ev(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,ss(this,ev(this,r=Jp(this,e,t)),r);break;default:ss(this,this._t0,r=Jp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function cx(e){this._context=new lx(e)}(cx.prototype=Object.create(va.prototype)).point=function(e,t){va.prototype.point.call(this,t,e)};function lx(e){this._context=e}lx.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 kA(e){return new va(e)}function NA(e){return new cx(e)}function fx(e){this._context=e}fx.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=tv(e),i=tv(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 tv(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 IA(e){return new fx(e)}function yo(e,t){this._context=e,this._t=t}yo.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 DA(e){return new yo(e,.5)}function RA(e){return new yo(e,0)}function qA(e){return new yo(e,1)}function zr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function sf(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function LA(e,t){return e[t]}function BA(e){const t=[];return t.key=e,t}function FA(){var e=fe([]),t=sf,r=zr,n=LA;function i(a){var o=Array.from(e.apply(this,arguments),BA),u,s=o.length,c=-1,f;for(const l of a)for(u=0,++c;u<s;++u)(o[u][c]=[0,+n(l,o[u].key,c,a)]).data=l;for(u=0,f=Ed(t(o));u<s;++u)o[f[u]].index=u;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:fe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:fe(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?sf:typeof a=="function"?a:fe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??zr,i):r},i}function WA(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}zr(e,t)}}function UA(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}zr(e,t)}}function zA(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,s=0,c=0;u<o;++u){for(var f=e[t[u]],l=f[n][1]||0,d=f[n-1][1]||0,h=(l-d)/2,y=0;y<u;++y){var v=e[t[y]],p=v[n][1]||0,g=v[n-1][1]||0;h+=p-g}s+=l,c+=h*l}i[n-1][1]+=i[n-1][0]=r,s&&(r-=c/s)}i[n-1][1]+=i[n-1][0]=r,zr(e,t)}}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}var HA=["type","size","sizeType"];function cf(){return cf=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},cf.apply(this,arguments)}function rv(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 nv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rv(Object(r),!0).forEach(function(n){GA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GA(e,t,r){return t=KA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KA(e){var t=YA(e,"string");return Xn(t)=="symbol"?t:t+""}function YA(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VA(e,t){if(e==null)return{};var r=XA(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 XA(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 dx={symbolCircle:Md,symbolCross:mA,symbolDiamond:bA,symbolSquare:xA,symbolStar:SA,symbolTriangle:AA,symbolWye:jA},ZA=Math.PI/180,QA=function(t){var r="symbol".concat(ho(t));return dx[r]||Md},JA=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*ZA;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}},eP=function(t,r){dx["symbol".concat(ho(t))]=r},Cd=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,u=o===void 0?"area":o,s=VA(t,HA),c=nv(nv({},s),{},{type:n,size:a,sizeType:u}),f=function(){var p=QA(n),g=TA().type(p).size(JA(a,u,n));return g()},l=c.className,d=c.cx,h=c.cy,y=G(c,!0);return d===+d&&h===+h&&a===+a?P.createElement("path",cf({},y,{className:J("recharts-symbols",l),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};Cd.registerSymbol=eP;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 lf(){return lf=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},lf.apply(this,arguments)}function iv(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 tP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iv(Object(r),!0).forEach(function(n){Zn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nP(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 iP(e,t,r){return t&&nP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aP(e,t,r){return t=ya(t),oP(e,hx()?Reflect.construct(t,r||[],ya(e).constructor):t.apply(e,r))}function oP(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 uP(e)}function uP(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 ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ya(e)}function sP(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 Zn(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=cP(e,"string");return Hr(t)=="symbol"?t:t+""}function cP(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 tt=32,$d=(function(e){function t(){return rP(this,t),aP(this,t,arguments)}return sP(t,e),iP(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=tt/2,o=tt/6,u=tt/3,s=n.inactive?i:n.color;if(n.type==="plainline")return P.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:tt,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return P.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(a,"h").concat(u,`
|
|
2
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*u,",").concat(a,`
|
|
3
|
+
H`).concat(tt,"M").concat(2*u,",").concat(a,`
|
|
4
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(u,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return P.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(tt/8,"h").concat(tt,"v").concat(tt*3/4,"h").concat(-tt,"z"),className:"recharts-legend-icon"});if(P.isValidElement(n.legendIcon)){var c=tP({},n);return delete c.legendIcon,P.cloneElement(n.legendIcon,c)}return P.createElement(Cd,{fill:s,cx:a,cy:a,size:tt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,u=i.layout,s=i.formatter,c=i.inactiveColor,f={x:0,y:0,width:tt,height:tt},l={display:u==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,y){var v=h.formatter||s,p=J(Zn(Zn({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var g=V(h.value)?null:h.value;dt(!V(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 x=h.inactive?c:h.color;return P.createElement("li",lf({className:p,style:l,key:"legend-item-".concat(y)},mr(n.props,h,y)),P.createElement(rf,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(g,h,y):g))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return P.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(D.PureComponent);Zn($d,"displayName","Legend");Zn($d,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var cs,av;function lP(){if(av)return cs;av=1;var e=co();function t(){this.__data__=new e,this.size=0}return cs=t,cs}var ls,ov;function fP(){if(ov)return ls;ov=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return ls=e,ls}var fs,uv;function dP(){if(uv)return fs;uv=1;function e(t){return this.__data__.get(t)}return fs=e,fs}var ds,sv;function hP(){if(sv)return ds;sv=1;function e(t){return this.__data__.has(t)}return ds=e,ds}var hs,cv;function pP(){if(cv)return hs;cv=1;var e=co(),t=Od(),r=_d(),n=200;function i(a,o){var u=this.__data__;if(u instanceof e){var s=u.__data__;if(!t||s.length<n-1)return s.push([a,o]),this.size=++u.size,this;u=this.__data__=new r(s)}return u.set(a,o),this.size=u.size,this}return hs=i,hs}var ps,lv;function vx(){if(lv)return ps;lv=1;var e=co(),t=lP(),r=fP(),n=dP(),i=hP(),a=pP();function o(u){var s=this.__data__=new e(u);this.size=s.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,ps=o,ps}var vs,fv;function vP(){if(fv)return vs;fv=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return vs=t,vs}var ys,dv;function yP(){if(dv)return ys;dv=1;function e(t){return this.__data__.has(t)}return ys=e,ys}var ms,hv;function yx(){if(hv)return ms;hv=1;var e=_d(),t=vP(),r=yP();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,ms=n,ms}var gs,pv;function mx(){if(pv)return gs;pv=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 gs=e,gs}var bs,vv;function gx(){if(vv)return bs;vv=1;function e(t,r){return t.has(r)}return bs=e,bs}var xs,yv;function bx(){if(yv)return xs;yv=1;var e=yx(),t=mx(),r=gx(),n=1,i=2;function a(o,u,s,c,f,l){var d=s&n,h=o.length,y=u.length;if(h!=y&&!(d&&y>h))return!1;var v=l.get(o),p=l.get(u);if(v&&p)return v==u&&p==o;var g=-1,x=!0,w=s&i?new e:void 0;for(l.set(o,u),l.set(u,o);++g<h;){var O=o[g],m=u[g];if(c)var b=d?c(m,O,g,u,o,l):c(O,m,g,o,u,l);if(b!==void 0){if(b)continue;x=!1;break}if(w){if(!t(u,function(_,A){if(!r(w,A)&&(O===_||f(O,_,s,c,l)))return w.push(A)})){x=!1;break}}else if(!(O===m||f(O,m,s,c,l))){x=!1;break}}return l.delete(o),l.delete(u),x}return xs=a,xs}var ws,mv;function mP(){if(mv)return ws;mv=1;var e=wt(),t=e.Uint8Array;return ws=t,ws}var Os,gv;function gP(){if(gv)return Os;gv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return Os=e,Os}var _s,bv;function kd(){if(bv)return _s;bv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return _s=e,_s}var Ss,xv;function bP(){if(xv)return Ss;xv=1;var e=ki(),t=mP(),r=wd(),n=bx(),i=gP(),a=kd(),o=1,u=2,s="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Map]",d="[object Number]",h="[object RegExp]",y="[object Set]",v="[object String]",p="[object Symbol]",g="[object ArrayBuffer]",x="[object DataView]",w=e?e.prototype:void 0,O=w?w.valueOf:void 0;function m(b,_,A,T,$,j,M){switch(A){case x:if(b.byteLength!=_.byteLength||b.byteOffset!=_.byteOffset)return!1;b=b.buffer,_=_.buffer;case g:return!(b.byteLength!=_.byteLength||!j(new t(b),new t(_)));case s:case c:case d:return r(+b,+_);case f:return b.name==_.name&&b.message==_.message;case h:case v:return b==_+"";case l:var C=i;case y:var E=T&o;if(C||(C=a),b.size!=_.size&&!E)return!1;var k=M.get(b);if(k)return k==_;T|=u,M.set(b,_);var I=n(C(b),C(_),T,$,j,M);return M.delete(b),I;case p:if(O)return O.call(b)==O.call(_)}return!1}return Ss=m,Ss}var As,wv;function xx(){if(wv)return As;wv=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 As=e,As}var Ps,Ov;function xP(){if(Ov)return Ps;Ov=1;var e=xx(),t=Ge();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return Ps=r,Ps}var js,_v;function wP(){if(_v)return js;_v=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var u=t[n];r(u,n,t)&&(o[a++]=u)}return o}return js=e,js}var Ts,Sv;function OP(){if(Sv)return Ts;Sv=1;function e(){return[]}return Ts=e,Ts}var Es,Av;function _P(){if(Av)return Es;Av=1;var e=wP(),t=OP(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(u){return n.call(o,u)}))}:t;return Es=a,Es}var Ms,Pv;function SP(){if(Pv)return Ms;Pv=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Ms=e,Ms}var Cs,jv;function AP(){if(jv)return Cs;jv=1;var e=Dt(),t=Rt(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Cs=n,Cs}var $s,Tv;function Nd(){if(Tv)return $s;Tv=1;var e=AP(),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 $s=a,$s}var qn={exports:{}},ks,Ev;function PP(){if(Ev)return ks;Ev=1;function e(){return!1}return ks=e,ks}qn.exports;var Mv;function wx(){return Mv||(Mv=1,(function(e,t){var r=wt(),n=PP(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,u=o?r.Buffer:void 0,s=u?u.isBuffer:void 0,c=s||n;e.exports=c})(qn,qn.exports)),qn.exports}var Ns,Cv;function Id(){if(Cv)return Ns;Cv=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 Ns=r,Ns}var Is,$v;function Dd(){if($v)return Is;$v=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Is=t,Is}var Ds,kv;function jP(){if(kv)return Ds;kv=1;var e=Dt(),t=Dd(),r=Rt(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",u="[object Error]",s="[object Function]",c="[object Map]",f="[object Number]",l="[object Object]",d="[object RegExp]",h="[object Set]",y="[object String]",v="[object WeakMap]",p="[object ArrayBuffer]",g="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",O="[object Int8Array]",m="[object Int16Array]",b="[object Int32Array]",_="[object Uint8Array]",A="[object Uint8ClampedArray]",T="[object Uint16Array]",$="[object Uint32Array]",j={};j[x]=j[w]=j[O]=j[m]=j[b]=j[_]=j[A]=j[T]=j[$]=!0,j[n]=j[i]=j[p]=j[a]=j[g]=j[o]=j[u]=j[s]=j[c]=j[f]=j[l]=j[d]=j[h]=j[y]=j[v]=!1;function M(C){return r(C)&&t(C.length)&&!!j[e(C)]}return Ds=M,Ds}var Rs,Nv;function Ox(){if(Nv)return Rs;Nv=1;function e(t){return function(r){return t(r)}}return Rs=e,Rs}var Ln={exports:{}};Ln.exports;var Iv;function TP(){return Iv||(Iv=1,(function(e,t){var r=W0(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,u=(function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}})();e.exports=u})(Ln,Ln.exports)),Ln.exports}var qs,Dv;function _x(){if(Dv)return qs;Dv=1;var e=jP(),t=Ox(),r=TP(),n=r&&r.isTypedArray,i=n?t(n):e;return qs=i,qs}var Ls,Rv;function EP(){if(Rv)return Ls;Rv=1;var e=SP(),t=Nd(),r=Ge(),n=wx(),i=Id(),a=_x(),o=Object.prototype,u=o.hasOwnProperty;function s(c,f){var l=r(c),d=!l&&t(c),h=!l&&!d&&n(c),y=!l&&!d&&!h&&a(c),v=l||d||h||y,p=v?e(c.length,String):[],g=p.length;for(var x in c)(f||u.call(c,x))&&!(v&&(x=="length"||h&&(x=="offset"||x=="parent")||y&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,g)))&&p.push(x);return p}return Ls=s,Ls}var Bs,qv;function MP(){if(qv)return Bs;qv=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Bs=t,Bs}var Fs,Lv;function Sx(){if(Lv)return Fs;Lv=1;function e(t,r){return function(n){return t(r(n))}}return Fs=e,Fs}var Ws,Bv;function CP(){if(Bv)return Ws;Bv=1;var e=Sx(),t=e(Object.keys,Object);return Ws=t,Ws}var Us,Fv;function $P(){if(Fv)return Us;Fv=1;var e=MP(),t=CP(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&o.push(u);return o}return Us=i,Us}var zs,Wv;function Ni(){if(Wv)return zs;Wv=1;var e=xd(),t=Dd();function r(n){return n!=null&&t(n.length)&&!e(n)}return zs=r,zs}var Hs,Uv;function mo(){if(Uv)return Hs;Uv=1;var e=EP(),t=$P(),r=Ni();function n(i){return r(i)?e(i):t(i)}return Hs=n,Hs}var Gs,zv;function kP(){if(zv)return Gs;zv=1;var e=xP(),t=_P(),r=mo();function n(i){return e(i,r,t)}return Gs=n,Gs}var Ks,Hv;function NP(){if(Hv)return Ks;Hv=1;var e=kP(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,u,s,c,f){var l=u&t,d=e(a),h=d.length,y=e(o),v=y.length;if(h!=v&&!l)return!1;for(var p=h;p--;){var g=d[p];if(!(l?g in o:n.call(o,g)))return!1}var x=f.get(a),w=f.get(o);if(x&&w)return x==o&&w==a;var O=!0;f.set(a,o),f.set(o,a);for(var m=l;++p<h;){g=d[p];var b=a[g],_=o[g];if(s)var A=l?s(_,b,g,o,a,f):s(b,_,g,a,o,f);if(!(A===void 0?b===_||c(b,_,u,s,f):A)){O=!1;break}m||(m=g=="constructor")}if(O&&!m){var T=a.constructor,$=o.constructor;T!=$&&"constructor"in a&&"constructor"in o&&!(typeof T=="function"&&T instanceof T&&typeof $=="function"&&$ instanceof $)&&(O=!1)}return f.delete(a),f.delete(o),O}return Ks=i,Ks}var Ys,Gv;function IP(){if(Gv)return Ys;Gv=1;var e=Or(),t=wt(),r=e(t,"DataView");return Ys=r,Ys}var Vs,Kv;function DP(){if(Kv)return Vs;Kv=1;var e=Or(),t=wt(),r=e(t,"Promise");return Vs=r,Vs}var Xs,Yv;function Ax(){if(Yv)return Xs;Yv=1;var e=Or(),t=wt(),r=e(t,"Set");return Xs=r,Xs}var Zs,Vv;function RP(){if(Vv)return Zs;Vv=1;var e=Or(),t=wt(),r=e(t,"WeakMap");return Zs=r,Zs}var Qs,Xv;function qP(){if(Xv)return Qs;Xv=1;var e=IP(),t=Od(),r=DP(),n=Ax(),i=RP(),a=Dt(),o=U0(),u="[object Map]",s="[object Object]",c="[object Promise]",f="[object Set]",l="[object WeakMap]",d="[object DataView]",h=o(e),y=o(t),v=o(r),p=o(n),g=o(i),x=a;return(e&&x(new e(new ArrayBuffer(1)))!=d||t&&x(new t)!=u||r&&x(r.resolve())!=c||n&&x(new n)!=f||i&&x(new i)!=l)&&(x=function(w){var O=a(w),m=O==s?w.constructor:void 0,b=m?o(m):"";if(b)switch(b){case h:return d;case y:return u;case v:return c;case p:return f;case g:return l}return O}),Qs=x,Qs}var Js,Zv;function LP(){if(Zv)return Js;Zv=1;var e=vx(),t=bx(),r=bP(),n=NP(),i=qP(),a=Ge(),o=wx(),u=_x(),s=1,c="[object Arguments]",f="[object Array]",l="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function y(v,p,g,x,w,O){var m=a(v),b=a(p),_=m?f:i(v),A=b?f:i(p);_=_==c?l:_,A=A==c?l:A;var T=_==l,$=A==l,j=_==A;if(j&&o(v)){if(!o(p))return!1;m=!0,T=!1}if(j&&!T)return O||(O=new e),m||u(v)?t(v,p,g,x,w,O):r(v,p,_,g,x,w,O);if(!(g&s)){var M=T&&h.call(v,"__wrapped__"),C=$&&h.call(p,"__wrapped__");if(M||C){var E=M?v.value():v,k=C?p.value():p;return O||(O=new e),w(E,k,g,x,O)}}return j?(O||(O=new e),n(v,p,g,x,w,O)):!1}return Js=y,Js}var ec,Qv;function Rd(){if(Qv)return ec;Qv=1;var e=LP(),t=Rt();function r(n,i,a,o,u){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,u)}return ec=r,ec}var tc,Jv;function BP(){if(Jv)return tc;Jv=1;var e=vx(),t=Rd(),r=1,n=2;function i(a,o,u,s){var c=u.length,f=c,l=!s;if(a==null)return!f;for(a=Object(a);c--;){var d=u[c];if(l&&d[2]?d[1]!==a[d[0]]:!(d[0]in a))return!1}for(;++c<f;){d=u[c];var h=d[0],y=a[h],v=d[1];if(l&&d[2]){if(y===void 0&&!(h in a))return!1}else{var p=new e;if(s)var g=s(y,v,h,a,o,p);if(!(g===void 0?t(v,y,r|n,s,p):g))return!1}}return!0}return tc=i,tc}var rc,ey;function Px(){if(ey)return rc;ey=1;var e=Vt();function t(r){return r===r&&!e(r)}return rc=t,rc}var nc,ty;function FP(){if(ty)return nc;ty=1;var e=Px(),t=mo();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],u=n[o];i[a]=[o,u,e(u)]}return i}return nc=r,nc}var ic,ry;function jx(){if(ry)return ic;ry=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return ic=e,ic}var ac,ny;function WP(){if(ny)return ac;ny=1;var e=BP(),t=FP(),r=jx();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 ac=n,ac}var oc,iy;function UP(){if(iy)return oc;iy=1;function e(t,r){return t!=null&&r in Object(t)}return oc=e,oc}var uc,ay;function zP(){if(ay)return uc;ay=1;var e=G0(),t=Nd(),r=Ge(),n=Id(),i=Dd(),a=fo();function o(u,s,c){s=e(s,u);for(var f=-1,l=s.length,d=!1;++f<l;){var h=a(s[f]);if(!(d=u!=null&&c(u,h)))break;u=u[h]}return d||++f!=l?d:(l=u==null?0:u.length,!!l&&i(l)&&n(h,l)&&(r(u)||t(u)))}return uc=o,uc}var sc,oy;function HP(){if(oy)return sc;oy=1;var e=UP(),t=zP();function r(n,i){return n!=null&&t(n,i,e)}return sc=r,sc}var cc,uy;function GP(){if(uy)return cc;uy=1;var e=Rd(),t=K0(),r=HP(),n=bd(),i=Px(),a=jx(),o=fo(),u=1,s=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,u|s)}}return cc=c,cc}var lc,sy;function On(){if(sy)return lc;sy=1;function e(t){return t}return lc=e,lc}var fc,cy;function KP(){if(cy)return fc;cy=1;function e(t){return function(r){return r?.[t]}}return fc=e,fc}var dc,ly;function YP(){if(ly)return dc;ly=1;var e=Ad();function t(r){return function(n){return e(n,r)}}return dc=t,dc}var hc,fy;function VP(){if(fy)return hc;fy=1;var e=KP(),t=YP(),r=bd(),n=fo();function i(a){return r(a)?e(n(a)):t(a)}return hc=i,hc}var pc,dy;function Ot(){if(dy)return pc;dy=1;var e=WP(),t=GP(),r=On(),n=Ge(),i=VP();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 pc=a,pc}var vc,hy;function Tx(){if(hy)return vc;hy=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 vc=e,vc}var yc,py;function XP(){if(py)return yc;py=1;function e(t){return t!==t}return yc=e,yc}var mc,vy;function ZP(){if(vy)return mc;vy=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 mc=e,mc}var gc,yy;function QP(){if(yy)return gc;yy=1;var e=Tx(),t=XP(),r=ZP();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return gc=n,gc}var bc,my;function JP(){if(my)return bc;my=1;var e=QP();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return bc=t,bc}var xc,gy;function ej(){if(gy)return xc;gy=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 xc=e,xc}var wc,by;function tj(){if(by)return wc;by=1;function e(){}return wc=e,wc}var Oc,xy;function rj(){if(xy)return Oc;xy=1;var e=Ax(),t=tj(),r=kd(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return Oc=i,Oc}var _c,wy;function nj(){if(wy)return _c;wy=1;var e=yx(),t=JP(),r=ej(),n=gx(),i=rj(),a=kd(),o=200;function u(s,c,f){var l=-1,d=t,h=s.length,y=!0,v=[],p=v;if(f)y=!1,d=r;else if(h>=o){var g=c?null:i(s);if(g)return a(g);y=!1,d=n,p=new e}else p=c?[]:v;e:for(;++l<h;){var x=s[l],w=c?c(x):x;if(x=f||x!==0?x:0,y&&w===w){for(var O=p.length;O--;)if(p[O]===w)continue e;c&&p.push(w),v.push(x)}else d(p,w,f)||(p!==v&&p.push(w),v.push(x))}return v}return _c=u,_c}var Sc,Oy;function ij(){if(Oy)return Sc;Oy=1;var e=Ot(),t=nj();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return Sc=r,Sc}var aj=ij();const _y=se(aj);function Ex(e,t,r){return t===!0?_y(e,r):V(t)?_y(e,t):e}function Gr(e){"@babel/helpers - typeof";return Gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(e)}var oj=["ref"];function Sy(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 _t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sy(Object(r),!0).forEach(function(n){go(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(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,Cx(n.key),n)}}function sj(e,t,r){return t&&Ay(e.prototype,t),r&&Ay(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cj(e,t,r){return t=ma(t),lj(e,Mx()?Reflect.construct(t,r||[],ma(e).constructor):t.apply(e,r))}function lj(e,t){if(t&&(Gr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return 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 Mx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mx=function(){return!!e})()}function ma(e){return ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ma(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&&df(e,t)}function df(e,t){return df=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},df(e,t)}function go(e,t,r){return t=Cx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cx(e){var t=hj(e,"string");return Gr(t)=="symbol"?t:t+""}function hj(e,t){if(Gr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function pj(e,t){if(e==null)return{};var r=vj(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 vj(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 yj(e){return e.value}function mj(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var r=pj(t,oj);return P.createElement($d,r)}var Py=1,Br=(function(e){function t(){var r;uj(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=cj(this,t,[].concat(i)),go(r,"lastBoundingBox",{width:-1,height:-1}),r}return dj(t,e),sj(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)>Py||Math.abs(i.height-this.lastBoundingBox.height)>Py)&&(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?_t({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,u=i.verticalAlign,s=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:s&&s.right||0}:{left:s&&s.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var y=this.getBBoxSnapshot();d={top:((f||0)-y.height)/2}}else d=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return _t(_t({},l),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,u=i.height,s=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,l=_t(_t({position:"absolute",width:o||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return P.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(h){n.wrapperNode=h}},mj(a,_t(_t({},this.props),{},{payload:Ex(f,c,yj)})))}}],[{key:"getWithHeight",value:function(n,i){var a=_t(_t({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&L(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])})(D.PureComponent);go(Br,"displayName","Legend");go(Br,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ac,jy;function gj(){if(jy)return Ac;jy=1;var e=ki(),t=Nd(),r=Ge(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return Ac=i,Ac}var Pc,Ty;function $x(){if(Ty)return Pc;Ty=1;var e=xx(),t=gj();function r(n,i,a,o,u){var s=-1,c=n.length;for(a||(a=t),u||(u=[]);++s<c;){var f=n[s];i>0&&a(f)?i>1?r(f,i-1,a,o,u):e(u,f):o||(u[u.length]=f)}return u}return Pc=r,Pc}var jc,Ey;function bj(){if(Ey)return jc;Ey=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),u=i(r),s=u.length;s--;){var c=u[t?s:++a];if(n(o[c],c,o)===!1)break}return r}}return jc=e,jc}var Tc,My;function xj(){if(My)return Tc;My=1;var e=bj(),t=e();return Tc=t,Tc}var Ec,Cy;function kx(){if(Cy)return Ec;Cy=1;var e=xj(),t=mo();function r(n,i){return n&&e(n,i,t)}return Ec=r,Ec}var Mc,$y;function wj(){if($y)return Mc;$y=1;var e=Ni();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,u=n?o:-1,s=Object(i);(n?u--:++u<o)&&a(s[u],u,s)!==!1;);return i}}return Mc=t,Mc}var Cc,ky;function qd(){if(ky)return Cc;ky=1;var e=kx(),t=wj(),r=t(e);return Cc=r,Cc}var $c,Ny;function Nx(){if(Ny)return $c;Ny=1;var e=qd(),t=Ni();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(u,s,c){o[++a]=i(u,s,c)}),o}return $c=r,$c}var kc,Iy;function Oj(){if(Iy)return kc;Iy=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return kc=e,kc}var Nc,Dy;function _j(){if(Dy)return Nc;Dy=1;var e=gn();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,u=e(r),s=n!==void 0,c=n===null,f=n===n,l=e(n);if(!c&&!l&&!u&&r>n||u&&s&&f&&!c&&!l||a&&s&&f||!i&&f||!o)return 1;if(!a&&!u&&!l&&r<n||l&&i&&o&&!a&&!u||c&&i&&o||!s&&o||!f)return-1}return 0}return Nc=t,Nc}var Ic,Ry;function Sj(){if(Ry)return Ic;Ry=1;var e=_j();function t(r,n,i){for(var a=-1,o=r.criteria,u=n.criteria,s=o.length,c=i.length;++a<s;){var f=e(o[a],u[a]);if(f){if(a>=c)return f;var l=i[a];return f*(l=="desc"?-1:1)}}return r.index-n.index}return Ic=t,Ic}var Dc,qy;function Aj(){if(qy)return Dc;qy=1;var e=Sd(),t=Ad(),r=Ot(),n=Nx(),i=Oj(),a=Ox(),o=Sj(),u=On(),s=Ge();function c(f,l,d){l.length?l=e(l,function(v){return s(v)?function(p){return t(p,v.length===1?v[0]:v)}:v}):l=[u];var h=-1;l=e(l,a(r));var y=n(f,function(v,p,g){var x=e(l,function(w){return w(v)});return{criteria:x,index:++h,value:v}});return i(y,function(v,p){return o(v,p,d)})}return Dc=c,Dc}var Rc,Ly;function Pj(){if(Ly)return Rc;Ly=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 Rc=e,Rc}var qc,By;function jj(){if(By)return qc;By=1;var e=Pj(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,u=-1,s=t(o.length-i,0),c=Array(s);++u<s;)c[u]=o[i+u];u=-1;for(var f=Array(i+1);++u<i;)f[u]=o[u];return f[i]=a(c),e(n,this,f)}}return qc=r,qc}var Lc,Fy;function Tj(){if(Fy)return Lc;Fy=1;function e(t){return function(){return t}}return Lc=e,Lc}var Bc,Wy;function Ix(){if(Wy)return Bc;Wy=1;var e=Or(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Bc=t,Bc}var Fc,Uy;function Ej(){if(Uy)return Fc;Uy=1;var e=Tj(),t=Ix(),r=On(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return Fc=n,Fc}var Wc,zy;function Mj(){if(zy)return Wc;zy=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var u=r(),s=t-(u-o);if(o=u,s>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Wc=n,Wc}var Uc,Hy;function Cj(){if(Hy)return Uc;Hy=1;var e=Ej(),t=Mj(),r=t(e);return Uc=r,Uc}var zc,Gy;function $j(){if(Gy)return zc;Gy=1;var e=On(),t=jj(),r=Cj();function n(i,a){return r(t(i,a,e),i+"")}return zc=n,zc}var Hc,Ky;function bo(){if(Ky)return Hc;Ky=1;var e=wd(),t=Ni(),r=Id(),n=Vt();function i(a,o,u){if(!n(u))return!1;var s=typeof o;return(s=="number"?t(u)&&r(o,u.length):s=="string"&&o in u)?e(u[o],a):!1}return Hc=i,Hc}var Gc,Yy;function kj(){if(Yy)return Gc;Yy=1;var e=$x(),t=Aj(),r=$j(),n=bo(),i=r(function(a,o){if(a==null)return[];var u=o.length;return u>1&&n(a,o[0],o[1])?o=[]:u>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Gc=i,Gc}var Nj=kj();const Ld=se(Nj);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 hf(){return hf=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},hf.apply(this,arguments)}function Ij(e,t){return Lj(e)||qj(e,t)||Rj(e,t)||Dj()}function Dj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rj(e,t){if(e){if(typeof e=="string")return Vy(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 Vy(e,t)}}function Vy(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 qj(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function Lj(e){if(Array.isArray(e))return e}function Xy(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 Kc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xy(Object(r),!0).forEach(function(n){Bj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bj(e,t,r){return t=Fj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fj(e){var t=Wj(e,"string");return Qn(t)=="symbol"?t:t+""}function Wj(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 Uj(e){return Array.isArray(e)&&Te(e[0])&&Te(e[1])?e.join(" ~ "):e}var zj=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,u=o===void 0?{}:o,s=t.labelStyle,c=s===void 0?{}:s,f=t.payload,l=t.formatter,d=t.itemSorter,h=t.wrapperClassName,y=t.labelClassName,v=t.label,p=t.labelFormatter,g=t.accessibilityLayer,x=g===void 0?!1:g,w=function(){if(f&&f.length){var M={padding:0,margin:0},C=(d?Ld(f,d):f).map(function(E,k){if(E.type==="none")return null;var I=Kc({display:"block",paddingTop:4,paddingBottom:4,color:E.color||"#000"},u),R=E.formatter||l||Uj,B=E.value,F=E.name,H=B,Y=F;if(R&&H!=null&&Y!=null){var U=R(B,F,E,k,f);if(Array.isArray(U)){var X=Ij(U,2);H=X[0],Y=X[1]}else H=U}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:I},Te(Y)?P.createElement("span",{className:"recharts-tooltip-item-name"},Y):null,Te(Y)?P.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,P.createElement("span",{className:"recharts-tooltip-item-value"},H),P.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:M},C)}return null},O=Kc({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),m=Kc({margin:0},c),b=!Z(v),_=b?v:"",A=J("recharts-default-tooltip",h),T=J("recharts-tooltip-label",y);b&&p&&f!==void 0&&f!==null&&(_=p(v,f));var $=x?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",hf({className:A,style:O},$),P.createElement("p",{className:T,style:m},P.isValidElement(_)?_:"".concat(_)),w())};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 Gi(e,t,r){return t=Hj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hj(e){var t=Gj(e,"string");return Jn(t)=="symbol"?t:t+""}function Gj(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 En="recharts-tooltip-wrapper",Kj={visibility:"hidden"};function Yj(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return J(En,Gi(Gi(Gi(Gi({},"".concat(En,"-right"),L(r)&&t&&L(t.x)&&r>=t.x),"".concat(En,"-left"),L(r)&&t&&L(t.x)&&r<t.x),"".concat(En,"-bottom"),L(n)&&t&&L(t.y)&&n>=t.y),"".concat(En,"-top"),L(n)&&t&&L(t.y)&&n<t.y))}function Zy(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,u=e.tooltipDimension,s=e.viewBox,c=e.viewBoxDimension;if(a&&L(a[n]))return a[n];var f=r[n]-u-i,l=r[n]+i;if(t[n])return o[n]?f:l;if(o[n]){var d=f,h=s[n];return d<h?Math.max(l,s[n]):Math.max(f,s[n])}var y=l+u,v=s[n]+c;return y>v?Math.max(f,s[n]):Math.max(l,s[n])}function Vj(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 Xj(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,c,f,l;return o.height>0&&o.width>0&&r?(f=Zy({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:s,viewBoxDimension:s.width}),l=Zy({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:s,viewBoxDimension:s.height}),c=Vj({translateX:f,translateY:l,useTranslate3d:u})):c=Kj,{cssProperties:c,cssClasses:Yj({translateX:f,translateY:l,coordinate:r})}}function Kr(e){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(e)}function Qy(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 Jy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qy(Object(r),!0).forEach(function(n){vf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qj(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,Rx(n.key),n)}}function Jj(e,t,r){return t&&Qj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eT(e,t,r){return t=ga(t),tT(e,Dx()?Reflect.construct(t,r||[],ga(e).constructor):t.apply(e,r))}function tT(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 rT(e)}function rT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dx=function(){return!!e})()}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(e)}function nT(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&&pf(e,t)}function pf(e,t){return pf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},pf(e,t)}function vf(e,t,r){return t=Rx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rx(e){var t=iT(e,"string");return Kr(t)=="symbol"?t:t+""}function iT(e,t){if(Kr(e)!="object"||!e)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 String(e)}var em=1,aT=(function(e){function t(){var r;Zj(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=eT(this,t,[].concat(i)),vf(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),vf(r,"handleKeyDown",function(o){if(o.key==="Escape"){var u,s,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(s=r.props.coordinate)===null||s===void 0?void 0:s.x)!==null&&u!==void 0?u:0,y:(c=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),r}return nT(t,e),Jj(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>em||Math.abs(n.height-this.state.lastBoundingBox.height)>em)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,c=i.children,f=i.coordinate,l=i.hasPayload,d=i.isAnimationActive,h=i.offset,y=i.position,v=i.reverseDirection,p=i.useTranslate3d,g=i.viewBox,x=i.wrapperStyle,w=Xj({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:g}),O=w.cssClasses,m=w.cssProperties,b=Jy(Jy({transition:d&&a?"transform ".concat(u,"ms ").concat(s):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&l?"visible":"hidden",position:"absolute",top:0,left:0},x);return P.createElement("div",{tabIndex:-1,className:O,style:b,ref:function(A){n.wrapperNode=A}},c)}}])})(D.PureComponent),oT=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},_r={isSsr:oT()};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 tm(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 rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tm(Object(r),!0).forEach(function(n){Bd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sT(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,Lx(n.key),n)}}function cT(e,t,r){return t&&sT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lT(e,t,r){return t=ba(t),fT(e,qx()?Reflect.construct(t,r||[],ba(e).constructor):t.apply(e,r))}function fT(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 dT(e)}function dT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qx=function(){return!!e})()}function ba(e){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ba(e)}function hT(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&&yf(e,t)}function yf(e,t){return yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yf(e,t)}function Bd(e,t,r){return t=Lx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lx(e){var t=pT(e,"string");return Yr(t)=="symbol"?t:t+""}function pT(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)}function vT(e){return e.dataKey}function yT(e,t){return P.isValidElement(e)?P.cloneElement(e,t):typeof e=="function"?P.createElement(e,t):P.createElement(zj,t)}var ct=(function(e){function t(){return uT(this,t),lT(this,t,arguments)}return hT(t,e),cT(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,c=i.content,f=i.coordinate,l=i.filterNull,d=i.isAnimationActive,h=i.offset,y=i.payload,v=i.payloadUniqBy,p=i.position,g=i.reverseDirection,x=i.useTranslate3d,w=i.viewBox,O=i.wrapperStyle,m=y??[];l&&m.length&&(m=Ex(y.filter(function(_){return _.value!=null&&(_.hide!==!0||n.props.includeHidden)}),v,vT));var b=m.length>0;return P.createElement(aT,{allowEscapeViewBox:o,animationDuration:u,animationEasing:s,isAnimationActive:d,active:a,coordinate:f,hasPayload:b,offset:h,position:p,reverseDirection:g,useTranslate3d:x,viewBox:w,wrapperStyle:O},yT(c,rm(rm({},this.props),{},{payload:m})))}}])})(D.PureComponent);Bd(ct,"displayName","Tooltip");Bd(ct,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!_r.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 Yc,nm;function mT(){if(nm)return Yc;nm=1;var e=wt(),t=function(){return e.Date.now()};return Yc=t,Yc}var Vc,im;function gT(){if(im)return Vc;im=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Vc=t,Vc}var Xc,am;function bT(){if(am)return Xc;am=1;var e=gT(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Xc=r,Xc}var Zc,om;function Bx(){if(om)return Zc;om=1;var e=bT(),t=Vt(),r=gn(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function s(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)?u(c.slice(2),l?2:8):i.test(c)?n:+c}return Zc=s,Zc}var Qc,um;function xT(){if(um)return Qc;um=1;var e=Vt(),t=mT(),r=Bx(),n="Expected a function",i=Math.max,a=Math.min;function o(u,s,c){var f,l,d,h,y,v,p=0,g=!1,x=!1,w=!0;if(typeof u!="function")throw new TypeError(n);s=r(s)||0,e(c)&&(g=!!c.leading,x="maxWait"in c,d=x?i(r(c.maxWait)||0,s):d,w="trailing"in c?!!c.trailing:w);function O(C){var E=f,k=l;return f=l=void 0,p=C,h=u.apply(k,E),h}function m(C){return p=C,y=setTimeout(A,s),g?O(C):h}function b(C){var E=C-v,k=C-p,I=s-E;return x?a(I,d-k):I}function _(C){var E=C-v,k=C-p;return v===void 0||E>=s||E<0||x&&k>=d}function A(){var C=t();if(_(C))return T(C);y=setTimeout(A,b(C))}function T(C){return y=void 0,w&&f?O(C):(f=l=void 0,h)}function $(){y!==void 0&&clearTimeout(y),p=0,f=v=l=y=void 0}function j(){return y===void 0?h:T(t())}function M(){var C=t(),E=_(C);if(f=arguments,l=this,v=C,E){if(y===void 0)return m(v);if(x)return clearTimeout(y),y=setTimeout(A,s),O(v)}return y===void 0&&(y=setTimeout(A,s)),h}return M.cancel=$,M.flush=j,M}return Qc=o,Qc}var Jc,sm;function wT(){if(sm)return Jc;sm=1;var e=xT(),t=Vt(),r="Expected a function";function n(i,a,o){var u=!0,s=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(u="leading"in o?!!o.leading:u,s="trailing"in o?!!o.trailing:s),e(i,a,{leading:u,maxWait:a,trailing:s})}return Jc=n,Jc}var OT=wT();const Fx=se(OT);function ei(e){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(e)}function cm(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 Ki(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cm(Object(r),!0).forEach(function(n){_T(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _T(e,t,r){return t=ST(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ST(e){var t=AT(e,"string");return ei(t)=="symbol"?t:t+""}function AT(e,t){if(ei(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PT(e,t){return MT(e)||ET(e,t)||TT(e,t)||jT()}function jT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TT(e,t){if(e){if(typeof e=="string")return lm(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 lm(e,t)}}function lm(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 ET(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function MT(e){if(Array.isArray(e))return e}var Wx=D.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,u=e.height,s=u===void 0?"100%":u,c=e.minWidth,f=c===void 0?0:c,l=e.minHeight,d=e.maxHeight,h=e.children,y=e.debounce,v=y===void 0?0:y,p=e.id,g=e.className,x=e.onResize,w=e.style,O=w===void 0?{}:w,m=D.useRef(null),b=D.useRef();b.current=x,D.useImperativeHandle(t,function(){return Object.defineProperty(m.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),m.current},configurable:!0})});var _=D.useState({containerWidth:i.width,containerHeight:i.height}),A=PT(_,2),T=A[0],$=A[1],j=D.useCallback(function(C,E){$(function(k){var I=Math.round(C),R=Math.round(E);return k.containerWidth===I&&k.containerHeight===R?k:{containerWidth:I,containerHeight:R}})},[]);D.useEffect(function(){var C=function(F){var H,Y=F[0].contentRect,U=Y.width,X=Y.height;j(U,X),(H=b.current)===null||H===void 0||H.call(b,U,X)};v>0&&(C=Fx(C,v,{trailing:!0,leading:!1}));var E=new ResizeObserver(C),k=m.current.getBoundingClientRect(),I=k.width,R=k.height;return j(I,R),E.observe(m.current),function(){E.disconnect()}},[j,v]);var M=D.useMemo(function(){var C=T.containerWidth,E=T.containerHeight;if(C<0||E<0)return null;dt(cr(o)||cr(s),`The width(%s) and height(%s) are both fixed numbers,
|
|
7
|
+
maybe you don't need to use a ResponsiveContainer.`,o,s),dt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var k=cr(o)?C:o,I=cr(s)?E:s;r&&r>0&&(k?I=k/r:I&&(k=I*r),d&&I>d&&(I=d)),dt(k>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
8
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
9
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
10
|
+
height and width.`,k,I,o,s,f,l,r);var R=!Array.isArray(h)&&Et(h.type).endsWith("Chart");return P.Children.map(h,function(B){return P.isValidElement(B)?D.cloneElement(B,Ki({width:k,height:I},R?{style:Ki({height:"100%",width:"100%",maxHeight:I,maxWidth:k},B.props.style)}:{})):B})},[r,h,s,d,l,f,T,o]);return P.createElement("div",{id:p?"".concat(p):void 0,className:J("recharts-responsive-container",g),style:Ki(Ki({},O),{},{width:o,height:s,minWidth:f,minHeight:l,maxHeight:d}),ref:m},M)}),xo=function(t){return null};xo.displayName="Cell";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)}function fm(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 mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fm(Object(r),!0).forEach(function(n){CT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CT(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=kT(e,"string");return ti(t)=="symbol"?t:t+""}function kT(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)}var Cr={widthCache:{},cacheCount:0},NT=2e3,IT={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},dm="recharts_measurement_span";function DT(e){var t=mf({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Un=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||_r.isSsr)return{width:0,height:0};var n=DT(r),i=JSON.stringify({text:t,copyStyle:n});if(Cr.widthCache[i])return Cr.widthCache[i];try{var a=document.getElementById(dm);a||(a=document.createElement("span"),a.setAttribute("id",dm),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=mf(mf({},IT),n);Object.assign(a.style,o),a.textContent="".concat(t);var u=a.getBoundingClientRect(),s={width:u.width,height:u.height};return Cr.widthCache[i]=s,++Cr.cacheCount>NT&&(Cr.cacheCount=0,Cr.widthCache={}),s}catch{return{width:0,height:0}}},RT=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ri(e){"@babel/helpers - typeof";return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(e)}function xa(e,t){return FT(e)||BT(e,t)||LT(e,t)||qT()}function qT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LT(e,t){if(e){if(typeof e=="string")return hm(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 hm(e,t)}}function hm(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 BT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function FT(e){if(Array.isArray(e))return e}function WT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pm(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,zT(n.key),n)}}function UT(e,t,r){return t&&pm(e.prototype,t),r&&pm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zT(e){var t=HT(e,"string");return ri(t)=="symbol"?t:t+""}function HT(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 String(e)}var vm=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ym=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,GT=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,KT=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ux={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},YT=Object.keys(Ux),Nr="NaN";function VT(e,t){return e*Ux[t]}var Yi=(function(){function e(t,r){WT(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!GT.test(r)&&(this.num=NaN,this.unit=""),YT.includes(r)&&(this.num=VT(t,r),this.unit="px")}return UT(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=KT.exec(r))!==null&&n!==void 0?n:[],a=xa(i,3),o=a[1],u=a[2];return new e(parseFloat(o),u??"")}}])})();function zx(e){if(e.includes(Nr))return Nr;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=vm.exec(t))!==null&&r!==void 0?r:[],i=xa(n,4),a=i[1],o=i[2],u=i[3],s=Yi.parse(a??""),c=Yi.parse(u??""),f=o==="*"?s.multiply(c):s.divide(c);if(f.isNaN())return Nr;t=t.replace(vm,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,d=(l=ym.exec(t))!==null&&l!==void 0?l:[],h=xa(d,4),y=h[1],v=h[2],p=h[3],g=Yi.parse(y??""),x=Yi.parse(p??""),w=v==="+"?g.add(x):g.subtract(x);if(w.isNaN())return Nr;t=t.replace(ym,w.toString())}return t}var mm=/\(([^()]*)\)/;function XT(e){for(var t=e;t.includes("(");){var r=mm.exec(t),n=xa(r,2),i=n[1];t=t.replace(mm,zx(i))}return t}function ZT(e){var t=e.replace(/\s+/g,"");return t=XT(t),t=zx(t),t}function QT(e){try{return ZT(e)}catch{return Nr}}function el(e){var t=QT(e.slice(5,-1));return t===Nr?"":t}var JT=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],eE=["dx","dy","angle","className","breakAll"];function gf(){return gf=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},gf.apply(this,arguments)}function gm(e,t){if(e==null)return{};var r=tE(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 tE(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 bm(e,t){return aE(e)||iE(e,t)||nE(e,t)||rE()}function rE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
12
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nE(e,t){if(e){if(typeof e=="string")return xm(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 xm(e,t)}}function xm(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 iE(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function aE(e){if(Array.isArray(e))return e}var Hx=/[ \f\n\r\t\v\u2028\u2029]+/,Gx=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Z(r)||(n?a=r.toString().split(""):a=r.toString().split(Hx));var o=a.map(function(s){return{word:s,width:Un(s,i).width}}),u=n?0:Un(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}},oE=function(t,r,n,i,a){var o=t.maxLines,u=t.children,s=t.style,c=t.breakAll,f=L(o),l=u,d=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return k.reduce(function(I,R){var B=R.word,F=R.width,H=I[I.length-1];if(H&&(i==null||a||H.width+F+n<Number(i)))H.words.push(B),H.width+=F+n;else{var Y={words:[B],width:F};I.push(Y)}return I},[])},h=d(r),y=function(k){return k.reduce(function(I,R){return I.width>R.width?I:R})};if(!f)return h;for(var v="…",p=function(k){var I=l.slice(0,k),R=Gx({breakAll:c,style:s,children:I+v}).wordsWithComputedWidth,B=d(R),F=B.length>o||y(B).width>Number(i);return[F,B]},g=0,x=l.length-1,w=0,O;g<=x&&w<=l.length-1;){var m=Math.floor((g+x)/2),b=m-1,_=p(b),A=bm(_,2),T=A[0],$=A[1],j=p(m),M=bm(j,1),C=M[0];if(!T&&!C&&(g=m+1),T&&C&&(x=m-1),!T&&C){O=$;break}w++}return O||h},wm=function(t){var r=Z(t)?[]:t.toString().split(Hx);return[{words:r}]},uE=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,u=t.maxLines;if((r||n)&&!_r.isSsr){var s,c,f=Gx({breakAll:o,children:i,style:a});if(f){var l=f.wordsWithComputedWidth,d=f.spaceWidth;s=l,c=d}else return wm(i);return oE({breakAll:o,children:i,maxLines:u,style:a},s,c,r,n)}return wm(i)},Om="#808080",gr=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,u=o===void 0?"1em":o,s=t.capHeight,c=s===void 0?"0.71em":s,f=t.scaleToFit,l=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,y=t.verticalAnchor,v=y===void 0?"end":y,p=t.fill,g=p===void 0?Om:p,x=gm(t,JT),w=D.useMemo(function(){return uE({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:l,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,l,x.style,x.width]),O=x.dx,m=x.dy,b=x.angle,_=x.className,A=x.breakAll,T=gm(x,eE);if(!Te(n)||!Te(a))return null;var $=n+(L(O)?O:0),j=a+(L(m)?m:0),M;switch(v){case"start":M=el("calc(".concat(c,")"));break;case"middle":M=el("calc(".concat((w.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:M=el("calc(".concat(w.length-1," * -").concat(u,")"));break}var C=[];if(l){var E=w[0].width,k=x.width;C.push("scale(".concat((L(k)?k/E:1)/E,")"))}return b&&C.push("rotate(".concat(b,", ").concat($,", ").concat(j,")")),C.length&&(T.transform=C.join(" ")),P.createElement("text",gf({},G(T,!0),{x:$,y:j,className:J("recharts-text",_),textAnchor:h,fill:g.includes("url")?Om:g}),w.map(function(I,R){var B=I.words.join(A?"":" ");return P.createElement("tspan",{x:$,dy:R===0?M:u,key:"".concat(B,"-").concat(R)},B)}))};function Yt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Fd(e){let t,r,n;e.length!==2?(t=Yt,r=(u,s)=>Yt(e(u),s),n=(u,s)=>e(u)-s):(t=e===Yt||e===sE?e:cE,r=e,n=e);function i(u,s,c=0,f=u.length){if(c<f){if(t(s,s)!==0)return f;do{const l=c+f>>>1;r(u[l],s)<0?c=l+1:f=l}while(c<f)}return c}function a(u,s,c=0,f=u.length){if(c<f){if(t(s,s)!==0)return f;do{const l=c+f>>>1;r(u[l],s)<=0?c=l+1:f=l}while(c<f)}return c}function o(u,s,c=0,f=u.length){const l=i(u,s,c,f-1);return l>c&&n(u[l-1],s)>-n(u[l],s)?l-1:l}return{left:i,center:o,right:a}}function cE(){return 0}function Kx(e){return e===null?NaN:+e}function*lE(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const fE=Fd(Yt),Ii=fE.right;Fd(Kx).center;class _m extends Map{constructor(t,r=pE){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(Sm(this,t))}has(t){return super.has(Sm(this,t))}set(t,r){return super.set(dE(this,t),r)}delete(t){return super.delete(hE(this,t))}}function Sm({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function dE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function hE({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function pE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function vE(e=Yt){if(e===Yt)return Yx;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 Yx(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const yE=Math.sqrt(50),mE=Math.sqrt(10),gE=Math.sqrt(2);function wa(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=yE?10:a>=mE?5:a>=gE?2:1;let u,s,c;return i<0?(c=Math.pow(10,-i)/o,u=Math.round(e*c),s=Math.round(t*c),u/c<e&&++u,s/c>t&&--s,c=-c):(c=Math.pow(10,i)*o,u=Math.round(e/c),s=Math.round(t/c),u*c<e&&++u,s*c>t&&--s),s<u&&.5<=r&&r<2?wa(e,t,r*2):[u,s,c]}function bf(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?wa(t,e,r):wa(e,t,r);if(!(a>=i))return[];const u=a-i+1,s=new Array(u);if(n)if(o<0)for(let c=0;c<u;++c)s[c]=(a-c)/-o;else for(let c=0;c<u;++c)s[c]=(a-c)*o;else if(o<0)for(let c=0;c<u;++c)s[c]=(i+c)/-o;else for(let c=0;c<u;++c)s[c]=(i+c)*o;return s}function xf(e,t,r){return t=+t,e=+e,r=+r,wa(e,t,r)[2]}function wf(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?xf(t,e,r):xf(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Am(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Pm(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Vx(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?Yx:vE(i);n>r;){if(n-r>600){const s=n-r+1,c=t-r+1,f=Math.log(s),l=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*l*(s-l)/s)*(c-s/2<0?-1:1),h=Math.max(r,Math.floor(t-c*l/s+d)),y=Math.min(n,Math.floor(t+(s-c)*l/s+d));Vx(e,t,h,y,i)}const a=e[t];let o=r,u=n;for(Mn(e,r,t),i(e[n],a)>0&&Mn(e,r,n);o<u;){for(Mn(e,o,u),++o,--u;i(e[o],a)<0;)++o;for(;i(e[u],a)>0;)--u}i(e[r],a)===0?Mn(e,r,u):(++u,Mn(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Mn(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function bE(e,t,r){if(e=Float64Array.from(lE(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Pm(e);if(t>=1)return Am(e);var n,i=(n-1)*t,a=Math.floor(i),o=Am(Vx(e,a).subarray(0,a+1)),u=Pm(e.subarray(a+1));return o+(u-o)*(i-a)}}function xE(e,t,r=Kx){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return o+(u-o)*(i-a)}}function wE(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 ut(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 Of=Symbol("implicit");function Wd(){var e=new _m,t=[],r=[],n=Of;function i(a){let o=e.get(a);if(o===void 0){if(n!==Of)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 _m;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 Wd(t,r).unknown(n)},ut.apply(i,arguments),i}function ni(){var e=Wd().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,u=!1,s=0,c=0,f=.5;delete e.unknown;function l(){var d=t().length,h=i<n,y=h?i:n,v=h?n:i;a=(v-y)/Math.max(1,d-s+c*2),u&&(a=Math.floor(a)),y+=(v-y-a*(d-s))*f,o=a*(1-s),u&&(y=Math.round(y),o=Math.round(o));var p=wE(d).map(function(g){return y+a*g});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,u=!0,l()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(u=!!d,l()):u},e.padding=function(d){return arguments.length?(s=Math.min(1,c=+d),l()):s},e.paddingInner=function(d){return arguments.length?(s=Math.min(1,d),l()):s},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 ni(t(),[n,i]).round(u).paddingInner(s).paddingOuter(c).align(f)},ut.apply(l(),arguments)}function Xx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Xx(t())},e}function zn(){return Xx(ni.apply(null,arguments).paddingInner(1))}function Ud(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Zx(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Di(){}var ii=.7,Oa=1/ii,Fr="\\s*([+-]?\\d+)\\s*",ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",OE=/^#([0-9a-f]{3,8})$/,_E=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),SE=new RegExp(`^rgb\\(${yt},${yt},${yt}\\)$`),AE=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${ai}\\)$`),PE=new RegExp(`^rgba\\(${yt},${yt},${yt},${ai}\\)$`),jE=new RegExp(`^hsl\\(${ai},${yt},${yt}\\)$`),TE=new RegExp(`^hsla\\(${ai},${yt},${yt},${ai}\\)$`),jm={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};Ud(Di,oi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tm,formatHex:Tm,formatHex8:EE,formatHsl:ME,formatRgb:Em,toString:Em});function Tm(){return this.rgb().formatHex()}function EE(){return this.rgb().formatHex8()}function ME(){return Qx(this).formatHsl()}function Em(){return this.rgb().formatRgb()}function oi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=OE.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Mm(t):r===3?new He(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Vi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Vi(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=_E.exec(e))?new He(t[1],t[2],t[3],1):(t=SE.exec(e))?new He(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=AE.exec(e))?Vi(t[1],t[2],t[3],t[4]):(t=PE.exec(e))?Vi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jE.exec(e))?km(t[1],t[2]/100,t[3]/100,1):(t=TE.exec(e))?km(t[1],t[2]/100,t[3]/100,t[4]):jm.hasOwnProperty(e)?Mm(jm[e]):e==="transparent"?new He(NaN,NaN,NaN,0):null}function Mm(e){return new He(e>>16&255,e>>8&255,e&255,1)}function Vi(e,t,r,n){return n<=0&&(e=t=r=NaN),new He(e,t,r,n)}function CE(e){return e instanceof Di||(e=oi(e)),e?(e=e.rgb(),new He(e.r,e.g,e.b,e.opacity)):new He}function _f(e,t,r,n){return arguments.length===1?CE(e):new He(e,t,r,n??1)}function He(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ud(He,_f,Zx(Di,{brighter(e){return e=e==null?Oa:Math.pow(Oa,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ii:Math.pow(ii,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new He(pr(this.r),pr(this.g),pr(this.b),_a(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:Cm,formatHex:Cm,formatHex8:$E,formatRgb:$m,toString:$m}));function Cm(){return`#${lr(this.r)}${lr(this.g)}${lr(this.b)}`}function $E(){return`#${lr(this.r)}${lr(this.g)}${lr(this.b)}${lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function $m(){const e=_a(this.opacity);return`${e===1?"rgb(":"rgba("}${pr(this.r)}, ${pr(this.g)}, ${pr(this.b)}${e===1?")":`, ${e})`}`}function _a(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lr(e){return e=pr(e),(e<16?"0":"")+e.toString(16)}function km(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ft(e,t,r,n)}function Qx(e){if(e instanceof ft)return new ft(e.h,e.s,e.l,e.opacity);if(e instanceof Di||(e=oi(e)),!e)return new ft;if(e instanceof ft)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,u=a-i,s=(a+i)/2;return u?(t===a?o=(r-n)/u+(r<n)*6:r===a?o=(n-t)/u+2:o=(t-r)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new ft(o,u,s,e.opacity)}function kE(e,t,r,n){return arguments.length===1?Qx(e):new ft(e,t,r,n??1)}function ft(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ud(ft,kE,Zx(Di,{brighter(e){return e=e==null?Oa:Math.pow(Oa,e),new ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ii:Math.pow(ii,e),new ft(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 He(tl(e>=240?e-240:e+120,i,n),tl(e,i,n),tl(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ft(Nm(this.h),Xi(this.s),Xi(this.l),_a(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=_a(this.opacity);return`${e===1?"hsl(":"hsla("}${Nm(this.h)}, ${Xi(this.s)*100}%, ${Xi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nm(e){return e=(e||0)%360,e<0?e+360:e}function Xi(e){return Math.max(0,Math.min(1,e||0))}function tl(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 zd=e=>()=>e;function NE(e,t){return function(r){return e+r*t}}function IE(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 DE(e){return(e=+e)==1?Jx:function(t,r){return r-t?IE(t,r,e):zd(isNaN(t)?r:t)}}function Jx(e,t){var r=t-e;return r?NE(e,r):zd(isNaN(e)?t:e)}const Im=(function e(t){var r=DE(t);function n(i,a){var o=r((i=_f(i)).r,(a=_f(a)).r),u=r(i.g,a.g),s=r(i.b,a.b),c=Jx(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=u(f),i.b=s(f),i.opacity=c(f),i+""}}return n.gamma=e,n})(1);function RE(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 qE(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function LE(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]=_n(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(u){for(o=0;o<n;++o)a[o]=i[o](u);return a}}function BE(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Sa(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function FE(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]=_n(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Sf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rl=new RegExp(Sf.source,"g");function WE(e){return function(){return e}}function UE(e){return function(t){return e(t)+""}}function zE(e,t){var r=Sf.lastIndex=rl.lastIndex=0,n,i,a,o=-1,u=[],s=[];for(e=e+"",t=t+"";(n=Sf.exec(e))&&(i=rl.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),u[o]?u[o]+=a:u[++o]=a),(n=n[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:Sa(n,i)})),r=rl.lastIndex;return r<t.length&&(a=t.slice(r),u[o]?u[o]+=a:u[++o]=a),u.length<2?s[0]?UE(s[0].x):WE(t):(t=s.length,function(c){for(var f=0,l;f<t;++f)u[(l=s[f]).i]=l.x(c);return u.join("")})}function _n(e,t){var r=typeof t,n;return t==null||r==="boolean"?zd(t):(r==="number"?Sa:r==="string"?(n=oi(t))?(t=n,Im):zE:t instanceof oi?Im:t instanceof Date?BE:qE(t)?RE:Array.isArray(t)?LE:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?FE:Sa)(e,t)}function Hd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function HE(e,t){t===void 0&&(t=e,e=_n);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var u=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[u](o-u)}}function GE(e){return function(){return e}}function Aa(e){return+e}var Dm=[0,1];function Fe(e){return e}function Af(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:GE(isNaN(t)?NaN:.5)}function KE(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function YE(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(u){return a(n(u))}}function VE(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(u){var s=Ii(e,u,1,n)-1;return a[s](i[s](u))}}function Ri(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wo(){var e=Dm,t=Dm,r=_n,n,i,a,o=Fe,u,s,c;function f(){var d=Math.min(e.length,t.length);return o!==Fe&&(o=KE(e[0],e[d-1])),u=d>2?VE:YE,s=c=null,l}function l(d){return d==null||isNaN(d=+d)?a:(s||(s=u(e.map(n),t,r)))(n(o(d)))}return l.invert=function(d){return o(i((c||(c=u(t,e.map(n),Sa)))(d)))},l.domain=function(d){return arguments.length?(e=Array.from(d,Aa),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=Hd,f()},l.clamp=function(d){return arguments.length?(o=d?!0:Fe,f()):o!==Fe},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 Gd(){return wo()(Fe,Fe)}function XE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Pa(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Vr(e){return e=Pa(Math.abs(e)),e?e[1]:NaN}function ZE(e,t){return function(r,n){for(var i=r.length,a=[],o=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(r.substring(i-=u,i+u)),!((s+=u+1)>n));)u=e[o=(o+1)%e.length];return a.reverse().join(t)}}function QE(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ui(e){if(!(t=JE.exec(e)))throw new Error("invalid format: "+e);var t;return new Kd({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]})}ui.prototype=Kd.prototype;function Kd(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+""}Kd.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 eM(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 ew;function tM(e,t){var r=Pa(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(ew=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")+Pa(e,Math.max(0,t+a-1))[0]}function Rm(e,t){var r=Pa(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 qm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XE,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)=>Rm(e*100,t),r:Rm,s:tM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Lm(e){return e}var Bm=Array.prototype.map,Fm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rM(e){var t=e.grouping===void 0||e.thousands===void 0?Lm:ZE(Bm.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?Lm:QE(Bm.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function c(l){l=ui(l);var d=l.fill,h=l.align,y=l.sign,v=l.symbol,p=l.zero,g=l.width,x=l.comma,w=l.precision,O=l.trim,m=l.type;m==="n"?(x=!0,m="g"):qm[m]||(w===void 0&&(w=12),O=!0,m="g"),(p||d==="0"&&h==="=")&&(p=!0,d="0",h="=");var b=v==="$"?r:v==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",_=v==="$"?n:/[%p]/.test(m)?o:"",A=qm[m],T=/[defgprs%]/.test(m);w=w===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function $(j){var M=b,C=_,E,k,I;if(m==="c")C=A(j)+C,j="";else{j=+j;var R=j<0||1/j<0;if(j=isNaN(j)?s:A(Math.abs(j),w),O&&(j=eM(j)),R&&+j==0&&y!=="+"&&(R=!1),M=(R?y==="("?y:u:y==="-"||y==="("?"":y)+M,C=(m==="s"?Fm[8+ew/3]:"")+C+(R&&y==="("?")":""),T){for(E=-1,k=j.length;++E<k;)if(I=j.charCodeAt(E),48>I||I>57){C=(I===46?i+j.slice(E+1):j.slice(E))+C,j=j.slice(0,E);break}}}x&&!p&&(j=t(j,1/0));var B=M.length+j.length+C.length,F=B<g?new Array(g-B+1).join(d):"";switch(x&&p&&(j=t(F+j,F.length?g-C.length:1/0),F=""),h){case"<":j=M+j+C+F;break;case"=":j=M+F+j+C;break;case"^":j=F.slice(0,B=F.length>>1)+M+j+C+F.slice(B);break;default:j=F+M+j+C;break}return a(j)}return $.toString=function(){return l+""},$}function f(l,d){var h=c((l=ui(l),l.type="f",l)),y=Math.max(-8,Math.min(8,Math.floor(Vr(d)/3)))*3,v=Math.pow(10,-y),p=Fm[8+y/3];return function(g){return h(v*g)+p}}return{format:c,formatPrefix:f}}var Zi,Yd,tw;nM({thousands:",",grouping:[3],currency:["$",""]});function nM(e){return Zi=rM(e),Yd=Zi.format,tw=Zi.formatPrefix,Zi}function iM(e){return Math.max(0,-Vr(Math.abs(e)))}function aM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vr(t)/3)))*3-Vr(Math.abs(e)))}function oM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vr(t)-Vr(e))+1}function rw(e,t,r,n){var i=wf(e,t,r),a;switch(n=ui(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=aM(i,o))&&(n.precision=a),tw(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=oM(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=iM(i))&&(n.precision=a-(n.type==="%")*2);break}}return Yd(n)}function Xt(e){var t=e.domain;return e.ticks=function(r){var n=t();return bf(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return rw(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],u=n[a],s,c,f=10;for(u<o&&(c=o,o=u,u=c,c=i,i=a,a=c);f-- >0;){if(c=xf(o,u,r),c===s)return n[i]=o,n[a]=u,t(n);if(c>0)o=Math.floor(o/c)*c,u=Math.ceil(u/c)*c;else if(c<0)o=Math.ceil(o*c)/c,u=Math.floor(u*c)/c;else break;s=c}return e},e}function ja(){var e=Gd();return e.copy=function(){return Ri(e,ja())},ut.apply(e,arguments),Xt(e)}function nw(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,Aa),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return nw(e).unknown(t)},e=arguments.length?Array.from(e,Aa):[0,1],Xt(r)}function iw(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 Wm(e){return Math.log(e)}function Um(e){return Math.exp(e)}function uM(e){return-Math.log(-e)}function sM(e){return-Math.exp(-e)}function cM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function lM(e){return e===10?cM:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fM(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 zm(e){return(t,r)=>-e(-t,r)}function Vd(e){const t=e(Wm,Um),r=t.domain;let n=10,i,a;function o(){return i=fM(n),a=lM(n),r()[0]<0?(i=zm(i),a=zm(a),e(uM,sM)):e(Wm,Um),t}return t.base=function(u){return arguments.length?(n=+u,o()):n},t.domain=function(u){return arguments.length?(r(u),o()):r()},t.ticks=u=>{const s=r();let c=s[0],f=s[s.length-1];const l=f<c;l&&([c,f]=[f,c]);let d=i(c),h=i(f),y,v;const p=u==null?10:+u;let g=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/a(-d):y*a(d),!(v<c)){if(v>f)break;g.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/a(-d):y*a(d),!(v<c)){if(v>f)break;g.push(v)}g.length*2<p&&(g=bf(c,f,p))}else g=bf(d,h,Math.min(h-d,p)).map(a);return l?g.reverse():g},t.tickFormat=(u,s)=>{if(u==null&&(u=10),s==null&&(s=n===10?"s":","),typeof s!="function"&&(!(n%1)&&(s=ui(s)).precision==null&&(s.trim=!0),s=Yd(s)),u===1/0)return s;const c=Math.max(1,n*u/t.ticks().length);return f=>{let l=f/a(Math.round(i(f)));return l*n<n-.5&&(l*=n),l<=c?s(f):""}},t.nice=()=>r(iw(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function aw(){const e=Vd(wo()).domain([1,10]);return e.copy=()=>Ri(e,aw()).base(e.base()),ut.apply(e,arguments),e}function Hm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Gm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xd(e){var t=1,r=e(Hm(t),Gm(t));return r.constant=function(n){return arguments.length?e(Hm(t=+n),Gm(t)):t},Xt(r)}function ow(){var e=Xd(wo());return e.copy=function(){return Ri(e,ow()).constant(e.constant())},ut.apply(e,arguments)}function Km(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dM(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hM(e){return e<0?-e*e:e*e}function Zd(e){var t=e(Fe,Fe),r=1;function n(){return r===1?e(Fe,Fe):r===.5?e(dM,hM):e(Km(r),Km(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Xt(t)}function Qd(){var e=Zd(wo());return e.copy=function(){return Ri(e,Qd()).exponent(e.exponent())},ut.apply(e,arguments),e}function pM(){return Qd.apply(null,arguments).exponent(.5)}function Ym(e){return Math.sign(e)*e*e}function vM(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uw(){var e=Gd(),t=[0,1],r=!1,n;function i(a){var o=vM(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(Ym(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,Aa)).map(Ym)),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 uw(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ut.apply(i,arguments),Xt(i)}function sw(){var e=[],t=[],r=[],n;function i(){var o=0,u=Math.max(1,t.length);for(r=new Array(u-1);++o<u;)r[o-1]=xE(e,o/u);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Ii(r,o)]}return a.invertExtent=function(o){var u=t.indexOf(o);return u<0?[NaN,NaN]:[u>0?r[u-1]:e[0],u<r.length?r[u]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let u of o)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Yt),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 sw().domain(e).range(t).unknown(n)},ut.apply(a,arguments)}function cw(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(s){return s!=null&&s<=s?i[Ii(n,s,0,r)]:a}function u(){var s=-1;for(n=new Array(r);++s<r;)n[s]=((s+1)*t-(s-r)*e)/(r+1);return o}return o.domain=function(s){return arguments.length?([e,t]=s,e=+e,t=+t,u()):[e,t]},o.range=function(s){return arguments.length?(r=(i=Array.from(s)).length-1,u()):i.slice()},o.invertExtent=function(s){var c=i.indexOf(s);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return n.slice()},o.copy=function(){return cw().domain([e,t]).range(i).unknown(a)},ut.apply(Xt(o),arguments)}function lw(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Ii(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 lw().domain(e).range(t).unknown(r)},ut.apply(i,arguments)}const nl=new Date,il=new Date;function Ee(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),u=i.ceil(a);return a-o<u-a?o:u},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,u)=>{const s=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<o)||!(u>0))return s;let c;do s.push(c=new Date(+a)),t(a,u),e(a);while(c<a&&a<o);return s},i.filter=a=>Ee(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,u)=>{if(o>=o)if(u<0)for(;++u<=0;)for(;t(o,-1),!a(o););else for(;--u>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(nl.setTime(+a),il.setTime(+o),e(nl),e(il),Math.floor(r(nl,il))),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 Ta=Ee(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ta.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ee(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ta);Ta.range;const Pt=1e3,it=Pt*60,jt=it*60,$t=jt*24,Jd=$t*7,Vm=$t*30,al=$t*365,fr=Ee(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCSeconds());fr.range;const eh=Ee(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Pt)},(e,t)=>{e.setTime(+e+t*it)},(e,t)=>(t-e)/it,e=>e.getMinutes());eh.range;const th=Ee(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*it)},(e,t)=>(t-e)/it,e=>e.getUTCMinutes());th.range;const rh=Ee(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Pt-e.getMinutes()*it)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getHours());rh.range;const nh=Ee(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getUTCHours());nh.range;const qi=Ee(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);qi.range;const Oo=Ee(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$t,e=>e.getUTCDate()-1);Oo.range;const fw=Ee(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$t,e=>Math.floor(e/$t));fw.range;function Sr(e){return Ee(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)/Jd)}const _o=Sr(0),Ea=Sr(1),yM=Sr(2),mM=Sr(3),Xr=Sr(4),gM=Sr(5),bM=Sr(6);_o.range;Ea.range;yM.range;mM.range;Xr.range;gM.range;bM.range;function Ar(e){return Ee(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)/Jd)}const So=Ar(0),Ma=Ar(1),xM=Ar(2),wM=Ar(3),Zr=Ar(4),OM=Ar(5),_M=Ar(6);So.range;Ma.range;xM.range;wM.range;Zr.range;OM.range;_M.range;const ih=Ee(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());ih.range;const ah=Ee(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());ah.range;const kt=Ee(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());kt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ee(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)});kt.range;const Nt=Ee(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:Ee(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 dw(e,t,r,n,i,a){const o=[[fr,1,Pt],[fr,5,5*Pt],[fr,15,15*Pt],[fr,30,30*Pt],[a,1,it],[a,5,5*it],[a,15,15*it],[a,30,30*it],[i,1,jt],[i,3,3*jt],[i,6,6*jt],[i,12,12*jt],[n,1,$t],[n,2,2*$t],[r,1,Jd],[t,1,Vm],[t,3,3*Vm],[e,1,al]];function u(c,f,l){const d=f<c;d&&([c,f]=[f,c]);const h=l&&typeof l.range=="function"?l:s(c,f,l),y=h?h.range(c,+f+1):[];return d?y.reverse():y}function s(c,f,l){const d=Math.abs(f-c)/l,h=Fd(([,,p])=>p).right(o,d);if(h===o.length)return e.every(wf(c/al,f/al,l));if(h===0)return Ta.every(Math.max(wf(c,f,l),1));const[y,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return y.every(v)}return[u,s]}const[SM,AM]=dw(Nt,ah,So,fw,nh,th),[PM,jM]=dw(kt,ih,_o,qi,rh,eh);function ol(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 ul(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 Cn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function TM(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,u=e.months,s=e.shortMonths,c=$n(i),f=kn(i),l=$n(a),d=kn(a),h=$n(o),y=kn(o),v=$n(u),p=kn(u),g=$n(s),x=kn(s),w={a:R,A:B,b:F,B:H,c:null,d:tg,e:tg,f:ZM,g:uC,G:cC,H:YM,I:VM,j:XM,L:hw,m:QM,M:JM,p:Y,q:U,Q:ig,s:ag,S:eC,u:tC,U:rC,V:nC,w:iC,W:aC,x:null,X:null,y:oC,Y:sC,Z:lC,"%":ng},O={a:X,A:he,b:ge,B:Ke,c:null,d:rg,e:rg,f:pC,g:SC,G:PC,H:fC,I:dC,j:hC,L:vw,m:vC,M:yC,p:Jt,q:We,Q:ig,s:ag,S:mC,u:gC,U:bC,V:xC,w:wC,W:OC,x:null,X:null,y:_C,Y:AC,Z:jC,"%":ng},m={a:$,A:j,b:M,B:C,c:E,d:Jm,e:Jm,f:zM,g:Qm,G:Zm,H:eg,I:eg,j:BM,L:UM,m:LM,M:FM,p:T,q:qM,Q:GM,s:KM,S:WM,u:kM,U:NM,V:IM,w:$M,W:DM,x:k,X:I,y:Qm,Y:Zm,Z:RM,"%":HM};w.x=b(r,w),w.X=b(n,w),w.c=b(t,w),O.x=b(r,O),O.X=b(n,O),O.c=b(t,O);function b(W,Q){return function(ee){var q=[],ye=-1,re=0,_e=W.length,Se,Ue,Bt;for(ee instanceof Date||(ee=new Date(+ee));++ye<_e;)W.charCodeAt(ye)===37&&(q.push(W.slice(re,ye)),(Ue=Xm[Se=W.charAt(++ye)])!=null?Se=W.charAt(++ye):Ue=Se==="e"?" ":"0",(Bt=Q[Se])&&(Se=Bt(ee,Ue)),q.push(Se),re=ye+1);return q.push(W.slice(re,ye)),q.join("")}}function _(W,Q){return function(ee){var q=Cn(1900,void 0,1),ye=A(q,W,ee+="",0),re,_e;if(ye!=ee.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(Q&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(re=ul(Cn(q.y,0,1)),_e=re.getUTCDay(),re=_e>4||_e===0?Ma.ceil(re):Ma(re),re=Oo.offset(re,(q.V-1)*7),q.y=re.getUTCFullYear(),q.m=re.getUTCMonth(),q.d=re.getUTCDate()+(q.w+6)%7):(re=ol(Cn(q.y,0,1)),_e=re.getDay(),re=_e>4||_e===0?Ea.ceil(re):Ea(re),re=qi.offset(re,(q.V-1)*7),q.y=re.getFullYear(),q.m=re.getMonth(),q.d=re.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),_e="Z"in q?ul(Cn(q.y,0,1)).getUTCDay():ol(Cn(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(_e+5)%7:q.w+q.U*7-(_e+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,ul(q)):ol(q)}}function A(W,Q,ee,q){for(var ye=0,re=Q.length,_e=ee.length,Se,Ue;ye<re;){if(q>=_e)return-1;if(Se=Q.charCodeAt(ye++),Se===37){if(Se=Q.charAt(ye++),Ue=m[Se in Xm?Q.charAt(ye++):Se],!Ue||(q=Ue(W,ee,q))<0)return-1}else if(Se!=ee.charCodeAt(q++))return-1}return q}function T(W,Q,ee){var q=c.exec(Q.slice(ee));return q?(W.p=f.get(q[0].toLowerCase()),ee+q[0].length):-1}function $(W,Q,ee){var q=h.exec(Q.slice(ee));return q?(W.w=y.get(q[0].toLowerCase()),ee+q[0].length):-1}function j(W,Q,ee){var q=l.exec(Q.slice(ee));return q?(W.w=d.get(q[0].toLowerCase()),ee+q[0].length):-1}function M(W,Q,ee){var q=g.exec(Q.slice(ee));return q?(W.m=x.get(q[0].toLowerCase()),ee+q[0].length):-1}function C(W,Q,ee){var q=v.exec(Q.slice(ee));return q?(W.m=p.get(q[0].toLowerCase()),ee+q[0].length):-1}function E(W,Q,ee){return A(W,t,Q,ee)}function k(W,Q,ee){return A(W,r,Q,ee)}function I(W,Q,ee){return A(W,n,Q,ee)}function R(W){return o[W.getDay()]}function B(W){return a[W.getDay()]}function F(W){return s[W.getMonth()]}function H(W){return u[W.getMonth()]}function Y(W){return i[+(W.getHours()>=12)]}function U(W){return 1+~~(W.getMonth()/3)}function X(W){return o[W.getUTCDay()]}function he(W){return a[W.getUTCDay()]}function ge(W){return s[W.getUTCMonth()]}function Ke(W){return u[W.getUTCMonth()]}function Jt(W){return i[+(W.getUTCHours()>=12)]}function We(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Q=b(W+="",w);return Q.toString=function(){return W},Q},parse:function(W){var Q=_(W+="",!1);return Q.toString=function(){return W},Q},utcFormat:function(W){var Q=b(W+="",O);return Q.toString=function(){return W},Q},utcParse:function(W){var Q=_(W+="",!0);return Q.toString=function(){return W},Q}}}var Xm={"-":"",_:" ",0:"0"},$e=/^\s*\d+/,EM=/^%/,MM=/[\\^$*+?|[\]().{}]/g;function ne(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function CM(e){return e.replace(MM,"\\$&")}function $n(e){return new RegExp("^(?:"+e.map(CM).join("|")+")","i")}function kn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function $M(e,t,r){var n=$e.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function kM(e,t,r){var n=$e.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function NM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function IM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function DM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Zm(e,t,r){var n=$e.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Qm(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function RM(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 qM(e,t,r){var n=$e.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function LM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Jm(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function BM(e,t,r){var n=$e.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function eg(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function FM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function WM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function UM(e,t,r){var n=$e.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function zM(e,t,r){var n=$e.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function HM(e,t,r){var n=EM.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function GM(e,t,r){var n=$e.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function KM(e,t,r){var n=$e.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function tg(e,t){return ne(e.getDate(),t,2)}function YM(e,t){return ne(e.getHours(),t,2)}function VM(e,t){return ne(e.getHours()%12||12,t,2)}function XM(e,t){return ne(1+qi.count(kt(e),e),t,3)}function hw(e,t){return ne(e.getMilliseconds(),t,3)}function ZM(e,t){return hw(e,t)+"000"}function QM(e,t){return ne(e.getMonth()+1,t,2)}function JM(e,t){return ne(e.getMinutes(),t,2)}function eC(e,t){return ne(e.getSeconds(),t,2)}function tC(e){var t=e.getDay();return t===0?7:t}function rC(e,t){return ne(_o.count(kt(e)-1,e),t,2)}function pw(e){var t=e.getDay();return t>=4||t===0?Xr(e):Xr.ceil(e)}function nC(e,t){return e=pw(e),ne(Xr.count(kt(e),e)+(kt(e).getDay()===4),t,2)}function iC(e){return e.getDay()}function aC(e,t){return ne(Ea.count(kt(e)-1,e),t,2)}function oC(e,t){return ne(e.getFullYear()%100,t,2)}function uC(e,t){return e=pw(e),ne(e.getFullYear()%100,t,2)}function sC(e,t){return ne(e.getFullYear()%1e4,t,4)}function cC(e,t){var r=e.getDay();return e=r>=4||r===0?Xr(e):Xr.ceil(e),ne(e.getFullYear()%1e4,t,4)}function lC(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ne(t/60|0,"0",2)+ne(t%60,"0",2)}function rg(e,t){return ne(e.getUTCDate(),t,2)}function fC(e,t){return ne(e.getUTCHours(),t,2)}function dC(e,t){return ne(e.getUTCHours()%12||12,t,2)}function hC(e,t){return ne(1+Oo.count(Nt(e),e),t,3)}function vw(e,t){return ne(e.getUTCMilliseconds(),t,3)}function pC(e,t){return vw(e,t)+"000"}function vC(e,t){return ne(e.getUTCMonth()+1,t,2)}function yC(e,t){return ne(e.getUTCMinutes(),t,2)}function mC(e,t){return ne(e.getUTCSeconds(),t,2)}function gC(e){var t=e.getUTCDay();return t===0?7:t}function bC(e,t){return ne(So.count(Nt(e)-1,e),t,2)}function yw(e){var t=e.getUTCDay();return t>=4||t===0?Zr(e):Zr.ceil(e)}function xC(e,t){return e=yw(e),ne(Zr.count(Nt(e),e)+(Nt(e).getUTCDay()===4),t,2)}function wC(e){return e.getUTCDay()}function OC(e,t){return ne(Ma.count(Nt(e)-1,e),t,2)}function _C(e,t){return ne(e.getUTCFullYear()%100,t,2)}function SC(e,t){return e=yw(e),ne(e.getUTCFullYear()%100,t,2)}function AC(e,t){return ne(e.getUTCFullYear()%1e4,t,4)}function PC(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Zr(e):Zr.ceil(e),ne(e.getUTCFullYear()%1e4,t,4)}function jC(){return"+0000"}function ng(){return"%"}function ig(e){return+e}function ag(e){return Math.floor(+e/1e3)}var $r,mw,gw;TC({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 TC(e){return $r=TM(e),mw=$r.format,$r.parse,gw=$r.utcFormat,$r.utcParse,$r}function EC(e){return new Date(e)}function MC(e){return e instanceof Date?+e:+new Date(+e)}function oh(e,t,r,n,i,a,o,u,s,c){var f=Gd(),l=f.invert,d=f.domain,h=c(".%L"),y=c(":%S"),v=c("%I:%M"),p=c("%I %p"),g=c("%a %d"),x=c("%b %d"),w=c("%B"),O=c("%Y");function m(b){return(s(b)<b?h:u(b)<b?y:o(b)<b?v:a(b)<b?p:n(b)<b?i(b)<b?g:x:r(b)<b?w:O)(b)}return f.invert=function(b){return new Date(l(b))},f.domain=function(b){return arguments.length?d(Array.from(b,MC)):d().map(EC)},f.ticks=function(b){var _=d();return e(_[0],_[_.length-1],b??10)},f.tickFormat=function(b,_){return _==null?m:c(_)},f.nice=function(b){var _=d();return(!b||typeof b.range!="function")&&(b=t(_[0],_[_.length-1],b??10)),b?d(iw(_,b)):f},f.copy=function(){return Ri(f,oh(e,t,r,n,i,a,o,u,s,c))},f}function CC(){return ut.apply(oh(PM,jM,kt,ih,_o,qi,rh,eh,fr,mw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function $C(){return ut.apply(oh(SM,AM,Nt,ah,So,Oo,nh,th,fr,gw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ao(){var e=0,t=1,r,n,i,a,o=Fe,u=!1,s;function c(l){return l==null||isNaN(l=+l)?s:o(i===0?.5:(l=(a(l)-r)*i,u?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?(u=!!l,c):u},c.interpolator=function(l){return arguments.length?(o=l,c):o};function f(l){return function(d){var h,y;return arguments.length?([h,y]=d,o=l(h,y),c):[o(0),o(1)]}}return c.range=f(_n),c.rangeRound=f(Hd),c.unknown=function(l){return arguments.length?(s=l,c):s},function(l){return a=l,r=l(e),n=l(t),i=r===n?0:1/(n-r),c}}function Zt(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function bw(){var e=Xt(Ao()(Fe));return e.copy=function(){return Zt(e,bw())},qt.apply(e,arguments)}function xw(){var e=Vd(Ao()).domain([1,10]);return e.copy=function(){return Zt(e,xw()).base(e.base())},qt.apply(e,arguments)}function ww(){var e=Xd(Ao());return e.copy=function(){return Zt(e,ww()).constant(e.constant())},qt.apply(e,arguments)}function uh(){var e=Zd(Ao());return e.copy=function(){return Zt(e,uh()).exponent(e.exponent())},qt.apply(e,arguments)}function kC(){return uh.apply(null,arguments).exponent(.5)}function Ow(){var e=[],t=Fe;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ii(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(Yt),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)=>bE(e,a/n))},r.copy=function(){return Ow(t).domain(e)},qt.apply(r,arguments)}function Po(){var e=0,t=.5,r=1,n=1,i,a,o,u,s,c=Fe,f,l=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-a)*(n*v<n*a?u:s),c(l?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,r]=v,i=f(e=+e),a=f(t=+t),o=f(r=+r),u=i===a?0:.5/(a-i),s=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(v){return arguments.length?(l=!!v,h):l},h.interpolator=function(v){return arguments.length?(c=v,h):c};function y(v){return function(p){var g,x,w;return arguments.length?([g,x,w]=p,c=HE(v,[g,x,w]),h):[c(0),c(.5),c(1)]}}return h.range=y(_n),h.rangeRound=y(Hd),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return f=v,i=v(e),a=v(t),o=v(r),u=i===a?0:.5/(a-i),s=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function _w(){var e=Xt(Po()(Fe));return e.copy=function(){return Zt(e,_w())},qt.apply(e,arguments)}function Sw(){var e=Vd(Po()).domain([.1,1,10]);return e.copy=function(){return Zt(e,Sw()).base(e.base())},qt.apply(e,arguments)}function Aw(){var e=Xd(Po());return e.copy=function(){return Zt(e,Aw()).constant(e.constant())},qt.apply(e,arguments)}function sh(){var e=Zd(Po());return e.copy=function(){return Zt(e,sh()).exponent(e.exponent())},qt.apply(e,arguments)}function NC(){return sh.apply(null,arguments).exponent(.5)}const og=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ni,scaleDiverging:_w,scaleDivergingLog:Sw,scaleDivergingPow:sh,scaleDivergingSqrt:NC,scaleDivergingSymlog:Aw,scaleIdentity:nw,scaleImplicit:Of,scaleLinear:ja,scaleLog:aw,scaleOrdinal:Wd,scalePoint:zn,scalePow:Qd,scaleQuantile:sw,scaleQuantize:cw,scaleRadial:uw,scaleSequential:bw,scaleSequentialLog:xw,scaleSequentialPow:uh,scaleSequentialQuantile:Ow,scaleSequentialSqrt:kC,scaleSequentialSymlog:ww,scaleSqrt:pM,scaleSymlog:ow,scaleThreshold:lw,scaleTime:CC,scaleUtc:$C,tickFormat:rw},Symbol.toStringTag,{value:"Module"}));var sl,ug;function jo(){if(ug)return sl;ug=1;var e=gn();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var u=r[a],s=n(u);if(s!=null&&(c===void 0?s===s&&!e(s):i(s,c)))var c=s,f=u}return f}return sl=t,sl}var cl,sg;function Pw(){if(sg)return cl;sg=1;function e(t,r){return t>r}return cl=e,cl}var ll,cg;function IC(){if(cg)return ll;cg=1;var e=jo(),t=Pw(),r=On();function n(i){return i&&i.length?e(i,r,t):void 0}return ll=n,ll}var DC=IC();const Gt=se(DC);var fl,lg;function jw(){if(lg)return fl;lg=1;function e(t,r){return t<r}return fl=e,fl}var dl,fg;function RC(){if(fg)return dl;fg=1;var e=jo(),t=jw(),r=On();function n(i){return i&&i.length?e(i,r,t):void 0}return dl=n,dl}var qC=RC();const To=se(qC);var hl,dg;function LC(){if(dg)return hl;dg=1;var e=Sd(),t=Ot(),r=Nx(),n=Ge();function i(a,o){var u=n(a)?e:r;return u(a,t(o,3))}return hl=i,hl}var pl,hg;function BC(){if(hg)return pl;hg=1;var e=$x(),t=LC();function r(n,i){return e(t(n,i),1)}return pl=r,pl}var FC=BC();const WC=se(FC);var vl,pg;function UC(){if(pg)return vl;pg=1;var e=Rd();function t(r,n){return e(r,n)}return vl=t,vl}var zC=UC();const Qr=se(zC);var Sn=1e9,HC={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},lh,ve=!0,ot="[DecimalError] ",vr=ot+"Invalid argument: ",ch=ot+"Exponent out of range: ",An=Math.floor,ur=Math.pow,GC=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Xe,Me=1e7,pe=7,Tw=9007199254740991,Ca=An(Tw/pe),z={};z.absoluteValue=z.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};z.comparedTo=z.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};z.decimalPlaces=z.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*pe;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};z.dividedBy=z.div=function(e){return Mt(this,new this.constructor(e))};z.dividedToIntegerBy=z.idiv=function(e){var t=this,r=t.constructor;return ce(Mt(t,new r(e),0,1),r.precision)};z.equals=z.eq=function(e){return!this.cmp(e)};z.exponent=function(){return we(this)};z.greaterThan=z.gt=function(e){return this.cmp(e)>0};z.greaterThanOrEqualTo=z.gte=function(e){return this.cmp(e)>=0};z.isInteger=z.isint=function(){return this.e>this.d.length-2};z.isNegative=z.isneg=function(){return this.s<0};z.isPositive=z.ispos=function(){return this.s>0};z.isZero=function(){return this.s===0};z.lessThan=z.lt=function(e){return this.cmp(e)<0};z.lessThanOrEqualTo=z.lte=function(e){return this.cmp(e)<1};z.logarithm=z.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(Xe))throw Error(ot+"NaN");if(r.s<1)throw Error(ot+(r.s?"NaN":"-Infinity"));return r.eq(Xe)?new n(0):(ve=!1,t=Mt(si(r,a),si(e,a),a),ve=!0,ce(t,i))};z.minus=z.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Cw(t,e):Ew(t,(e.s=-e.s,e))};z.modulo=z.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ot+"NaN");return r.s?(ve=!1,t=Mt(r,e,0,1).times(e),ve=!0,r.minus(t)):ce(new n(r),i)};z.naturalExponential=z.exp=function(){return Mw(this)};z.naturalLogarithm=z.ln=function(){return si(this)};z.negated=z.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};z.plus=z.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ew(t,e):Cw(t,(e.s=-e.s,e))};z.precision=z.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(vr+e);if(t=we(i)+1,n=i.d.length-1,r=n*pe+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};z.squareRoot=z.sqrt=function(){var e,t,r,n,i,a,o,u=this,s=u.constructor;if(u.s<1){if(!u.s)return new s(0);throw Error(ot+"NaN")}for(e=we(u),ve=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=pt(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=An((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 s(t)):n=new s(i.toString()),r=s.precision,i=o=r+3;;)if(a=n,n=a.plus(Mt(u,a,o+2)).times(.5),pt(a.d).slice(0,o)===(t=pt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ce(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;o+=4}return ve=!0,ce(n,r)};z.times=z.mul=function(e){var t,r,n,i,a,o,u,s,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,s=d.length,c=h.length,s<c&&(a=d,d=h,h=a,o=s,s=c,c=o),a=[],o=s+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=s+n;i>n;)u=a[i]+h[n]*d[i-n-1]+t,a[i--]=u%Me|0,t=u/Me|0;a[i]=(a[i]+t)%Me|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,ve?ce(e,l.precision):e};z.toDecimalPlaces=z.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(bt(e,0,Sn),t===void 0?t=n.rounding:bt(t,0,8),ce(r,e+we(r)+1,t))};z.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=br(n,!0):(bt(e,0,Sn),t===void 0?t=i.rounding:bt(t,0,8),n=ce(new i(n),e+1,t),r=br(n,!0,e+1)),r};z.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?br(i):(bt(e,0,Sn),t===void 0?t=a.rounding:bt(t,0,8),n=ce(new a(i),e+we(i)+1,t),r=br(n.abs(),!1,e+we(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};z.toInteger=z.toint=function(){var e=this,t=e.constructor;return ce(new t(e),we(e)+1,t.rounding)};z.toNumber=function(){return+this};z.toPower=z.pow=function(e){var t,r,n,i,a,o,u=this,s=u.constructor,c=12,f=+(e=new s(e));if(!e.s)return new s(Xe);if(u=new s(u),!u.s){if(e.s<1)throw Error(ot+"Infinity");return u}if(u.eq(Xe))return u;if(n=s.precision,e.eq(Xe))return ce(u,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=u.s,o){if((r=f<0?-f:f)<=Tw){for(i=new s(Xe),t=Math.ceil(n/pe+4),ve=!1;r%2&&(i=i.times(u),yg(i.d,t)),r=An(r/2),r!==0;)u=u.times(u),yg(u.d,t);return ve=!0,e.s<0?new s(Xe).div(i):ce(i,n)}}else if(a<0)throw Error(ot+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,ve=!1,i=e.times(si(u,n+c)),ve=!0,i=Mw(i),i.s=a,i};z.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=we(i),n=br(i,r<=a.toExpNeg||r>=a.toExpPos)):(bt(e,1,Sn),t===void 0?t=a.rounding:bt(t,0,8),i=ce(new a(i),e,t),r=we(i),n=br(i,e<=r||r<=a.toExpNeg,e)),n};z.toSignificantDigits=z.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(bt(e,1,Sn),t===void 0?t=n.rounding:bt(t,0,8)),ce(new n(r),e,t)};z.toString=z.valueOf=z.val=z.toJSON=z[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=we(e),r=e.constructor;return br(e,t<=r.toExpNeg||t>=r.toExpPos)};function Ew(e,t){var r,n,i,a,o,u,s,c,f=e.constructor,l=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ve?ce(t,l):t;if(s=e.d,c=t.d,o=e.e,i=t.e,s=s.slice(),a=o-i,a){for(a<0?(n=s,a=-a,u=c.length):(n=c,i=o,u=s.length),o=Math.ceil(l/pe),u=o>u?o+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=s.length,a=c.length,u-a<0&&(a=u,n=c,c=s,s=n),r=0;a;)r=(s[--a]=s[a]+c[a]+r)/Me|0,s[a]%=Me;for(r&&(s.unshift(r),++i),u=s.length;s[--u]==0;)s.pop();return t.d=s,t.e=i,ve?ce(t,l):t}function bt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(vr+e)}function pt(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=pe-n.length,r&&(a+=zt(r)),a+=n;o=e[t],n=o+"",r=pe-n.length,r&&(a+=zt(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Mt=(function(){function e(n,i){var a,o=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+o,n[u]=a%Me|0,o=a/Me|0;return o&&n.unshift(o),n}function t(n,i,a,o){var u,s;if(a!=o)s=a>o?1:-1;else for(u=s=0;u<a;u++)if(n[u]!=i[u]){s=n[u]>i[u]?1:-1;break}return s}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Me+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var u,s,c,f,l,d,h,y,v,p,g,x,w,O,m,b,_,A,T=n.constructor,$=n.s==i.s?1:-1,j=n.d,M=i.d;if(!n.s)return new T(n);if(!i.s)throw Error(ot+"Division by zero");for(s=n.e-i.e,_=M.length,m=j.length,h=new T($),y=h.d=[],c=0;M[c]==(j[c]||0);)++c;if(M[c]>(j[c]||0)&&--s,a==null?x=a=T.precision:o?x=a+(we(n)-we(i))+1:x=a,x<0)return new T(0);if(x=x/pe+2|0,c=0,_==1)for(f=0,M=M[0],x++;(c<m||f)&&x--;c++)w=f*Me+(j[c]||0),y[c]=w/M|0,f=w%M|0;else{for(f=Me/(M[0]+1)|0,f>1&&(M=e(M,f),j=e(j,f),_=M.length,m=j.length),O=_,v=j.slice(0,_),p=v.length;p<_;)v[p++]=0;A=M.slice(),A.unshift(0),b=M[0],M[1]>=Me/2&&++b;do f=0,u=t(M,v,_,p),u<0?(g=v[0],_!=p&&(g=g*Me+(v[1]||0)),f=g/b|0,f>1?(f>=Me&&(f=Me-1),l=e(M,f),d=l.length,p=v.length,u=t(l,v,d,p),u==1&&(f--,r(l,_<d?A:M,d))):(f==0&&(u=f=1),l=M.slice()),d=l.length,d<p&&l.unshift(0),r(v,l,p),u==-1&&(p=v.length,u=t(M,v,_,p),u<1&&(f++,r(v,_<p?A:M,p))),p=v.length):u===0&&(f++,v=[0]),y[c++]=f,u&&v[0]?v[p++]=j[O]||0:(v=[j[O]],p=1);while((O++<m||v[0]!==void 0)&&x--)}return y[0]||y.shift(),h.e=s,ce(h,o?a+we(h)+1:a)}})();function Mw(e,t){var r,n,i,a,o,u,s=0,c=0,f=e.constructor,l=f.precision;if(we(e)>16)throw Error(ch+we(e));if(!e.s)return new f(Xe);for(ve=!1,u=l,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(ur(2,c))/Math.LN10*2+5|0,u+=n,r=i=a=new f(Xe),f.precision=u;;){if(i=ce(i.times(e),u),r=r.times(++s),o=a.plus(Mt(i,r,u)),pt(o.d).slice(0,u)===pt(a.d).slice(0,u)){for(;c--;)a=ce(a.times(a),u);return f.precision=l,t==null?(ve=!0,ce(a,l)):a}a=o}}function we(e){for(var t=e.e*pe,r=e.d[0];r>=10;r/=10)t++;return t}function yl(e,t,r){if(t>e.LN10.sd())throw ve=!0,r&&(e.precision=r),Error(ot+"LN10 precision limit exceeded");return ce(new e(e.LN10),t)}function zt(e){for(var t="";e--;)t+="0";return t}function si(e,t){var r,n,i,a,o,u,s,c,f,l=1,d=10,h=e,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(ot+(h.s?"NaN":"-Infinity"));if(h.eq(Xe))return new v(0);if(t==null?(ve=!1,c=p):c=t,h.eq(10))return t==null&&(ve=!0),yl(v,c);if(c+=d,v.precision=c,r=pt(y),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=pt(h.d),n=r.charAt(0),l++;a=we(h),n>1?(h=new v("0."+r),a++):h=new v(n+"."+r.slice(1))}else return s=yl(v,c+2,p).times(a+""),h=si(new v(n+"."+r.slice(1)),c-d).plus(s),v.precision=p,t==null?(ve=!0,ce(h,p)):h;for(u=o=h=Mt(h.minus(Xe),h.plus(Xe),c),f=ce(h.times(h),c),i=3;;){if(o=ce(o.times(f),c),s=u.plus(Mt(o,new v(i),c)),pt(s.d).slice(0,c)===pt(u.d).slice(0,c))return u=u.times(2),a!==0&&(u=u.plus(yl(v,c+2,p).times(a+""))),u=Mt(u,new v(l),c),v.precision=p,t==null?(ve=!0,ce(u,p)):u;u=s,i+=2}}function vg(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=An(r/pe),e.d=[],n=(r+1)%pe,r<0&&(n+=pe),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=pe;n<i;)e.d.push(+t.slice(n,n+=pe));t=t.slice(n),n=pe-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ve&&(e.e>Ca||e.e<-Ca))throw Error(ch+r)}else e.s=0,e.e=0,e.d=[0];return e}function ce(e,t,r){var n,i,a,o,u,s,c,f,l=e.d;for(o=1,a=l[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=pe,i=t,c=l[f=0];else{if(f=Math.ceil((n+1)/pe),a=l.length,f>=a)return e;for(c=a=l[f],o=1;a>=10;a/=10)o++;n%=pe,i=n-pe+o}if(r!==void 0&&(a=ur(10,o-i-1),u=c/a%10|0,s=t<0||l[f+1]!==void 0||c%a,s=r<4?(u||s)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||s||r==6&&(n>0?i>0?c/ur(10,o-i):0:l[f-1])%10&1||r==(e.s<0?8:7))),t<1||!l[0])return s?(a=we(e),l.length=1,t=t-a-1,l[0]=ur(10,(pe-t%pe)%pe),e.e=An(-t/pe)||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=ur(10,pe-n),l[f]=i>0?(c/ur(10,o-i)%ur(10,i)|0)*a:0),s)for(;;)if(f==0){(l[0]+=a)==Me&&(l[0]=1,++e.e);break}else{if(l[f]+=a,l[f]!=Me)break;l[f--]=0,a=1}for(n=l.length;l[--n]===0;)l.pop();if(ve&&(e.e>Ca||e.e<-Ca))throw Error(ch+we(e));return e}function Cw(e,t){var r,n,i,a,o,u,s,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),ve?ce(t,h):t;if(s=e.d,l=t.d,n=t.e,c=e.e,s=s.slice(),o=c-n,o){for(f=o<0,f?(r=s,o=-o,u=l.length):(r=l,n=c,u=s.length),i=Math.max(Math.ceil(h/pe),u)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=s.length,u=l.length,f=i<u,f&&(u=i),i=0;i<u;i++)if(s[i]!=l[i]){f=s[i]<l[i];break}o=0}for(f&&(r=s,s=l,l=r,t.s=-t.s),u=s.length,i=l.length-u;i>0;--i)s[u++]=0;for(i=l.length;i>o;){if(s[--i]<l[i]){for(a=i;a&&s[--a]===0;)s[a]=Me-1;--s[a],s[i]+=Me}s[i]-=l[i]}for(;s[--u]===0;)s.pop();for(;s[0]===0;s.shift())--n;return s[0]?(t.d=s,t.e=n,ve?ce(t,h):t):new d(0)}function br(e,t,r){var n,i=we(e),a=pt(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+zt(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+zt(-i-1)+a,r&&(n=r-o)>0&&(a+=zt(n))):i>=o?(a+=zt(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+zt(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=zt(n))),e.s<0?"-"+a:a}function yg(e,t){if(e.length>t)return e.length=t,!0}function $w(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(vr+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 vg(o,a.toString())}else if(typeof a!="string")throw Error(vr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,GC.test(a))vg(o,a);else throw Error(vr+a)}if(i.prototype=z,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=$w,i.config=i.set=KC,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 KC(e){if(!e||typeof e!="object")throw Error(ot+"Object expected");var t,r,n,i=["precision",1,Sn,"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(An(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(vr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(vr+r+": "+n);return this}var lh=$w(HC);Xe=new lh(1);const ue=lh;function YC(e){return QC(e)||ZC(e)||XC(e)||VC()}function VC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XC(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 ZC(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QC(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}var JC=function(t){return t},kw={},Nw=function(t){return t===kw},mg=function(t){return function r(){return arguments.length===0||arguments.length===1&&Nw(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},e$=function e(t,r){return t===1?r:mg(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(u){return u!==kw}).length;return o>=t?r.apply(void 0,i):e(t-o,mg(function(){for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];var f=i.map(function(l){return Nw(l)?s.shift():l});return r.apply(void 0,YC(f).concat(s))}))})},Eo=function(t){return e$(t.length,t)},jf=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},t$=Eo(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),r$=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return JC;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(u,s){return s(u)},a.apply(void 0,arguments))}},Tf=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Iw=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(u,s){return u===r[s]})||(r=a,n=t.apply(void 0,a)),n}};function n$(e){var t;return e===0?t=1:t=Math.floor(new ue(e).abs().log(10).toNumber())+1,t}function i$(e,t,r){for(var n=new ue(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var a$=Eo(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),o$=Eo(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),u$=Eo(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Mo={rangeStep:i$,getDigitCount:n$,interpolateNumber:a$,uninterpolateNumber:o$,uninterpolateTruncation:u$};function Ef(e){return l$(e)||c$(e)||Dw(e)||s$()}function s$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c$(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function l$(e){if(Array.isArray(e))return Mf(e)}function ci(e,t){return h$(e)||d$(e,t)||Dw(e,t)||f$()}function f$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dw(e,t){if(e){if(typeof e=="string")return Mf(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 Mf(e,t)}}function Mf(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 d$(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(s){i=!0,a=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function h$(e){if(Array.isArray(e))return e}function Rw(e){var t=ci(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function qw(e,t,r){if(e.lte(0))return new ue(0);var n=Mo.getDigitCount(e.toNumber()),i=new ue(10).pow(n),a=e.div(i),o=n!==1?.05:.1,u=new ue(Math.ceil(a.div(o).toNumber())).add(r).mul(o),s=u.mul(i);return t?s:new ue(Math.ceil(s))}function p$(e,t,r){var n=1,i=new ue(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ue(10).pow(Mo.getDigitCount(e)-1),i=new ue(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ue(Math.floor(e)))}else e===0?i=new ue(Math.floor((t-1)/2)):r||(i=new ue(Math.floor(e)));var o=Math.floor((t-1)/2),u=r$(t$(function(s){return i.add(new ue(s-o).mul(n)).toNumber()}),jf);return u(0,t)}function Lw(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ue(0),tickMin:new ue(0),tickMax:new ue(0)};var a=qw(new ue(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ue(0):(o=new ue(e).add(t).div(2),o=o.sub(new ue(o).mod(a)));var u=Math.ceil(o.sub(e).div(a).toNumber()),s=Math.ceil(new ue(t).sub(o).div(a).toNumber()),c=u+s+1;return c>r?Lw(e,t,r,n,i+1):(c<r&&(s=t>0?s+(r-c):s,u=t>0?u:u+(r-c)),{step:a,tickMin:o.sub(new ue(u).mul(a)),tickMax:o.add(new ue(s).mul(a))})}function v$(e){var t=ci(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),u=Rw([r,n]),s=ci(u,2),c=s[0],f=s[1];if(c===-1/0||f===1/0){var l=f===1/0?[c].concat(Ef(jf(0,i-1).map(function(){return 1/0}))):[].concat(Ef(jf(0,i-1).map(function(){return-1/0})),[f]);return r>n?Tf(l):l}if(c===f)return p$(c,i,a);var d=Lw(c,f,o,a),h=d.step,y=d.tickMin,v=d.tickMax,p=Mo.rangeStep(y,v.add(new ue(.1).mul(h)),h);return r>n?Tf(p):p}function y$(e,t){var r=ci(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Rw([n,i]),u=ci(o,2),s=u[0],c=u[1];if(s===-1/0||c===1/0)return[n,i];if(s===c)return[s];var f=Math.max(t,2),l=qw(new ue(c).sub(s).div(f-1),a,0),d=[].concat(Ef(Mo.rangeStep(new ue(s),new ue(c).sub(new ue(.99).mul(l)),l)),[c]);return n>i?Tf(d):d}var m$=Iw(v$),g$=Iw(y$),b$="Invariant failed";function xr(e,t){throw new Error(b$)}var x$=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 $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 w$(e,t){return A$(e)||S$(e,t)||_$(e,t)||O$()}function O$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _$(e,t){if(e){if(typeof e=="string")return gg(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 gg(e,t)}}function gg(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 S$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function A$(e){if(Array.isArray(e))return e}function P$(e,t){if(e==null)return{};var r=j$(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 j$(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 T$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E$(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 M$(e,t,r){return t&&E$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C$(e,t,r){return t=ka(t),$$(e,Bw()?Reflect.construct(t,r||[],ka(e).constructor):t.apply(e,r))}function $$(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 k$(e)}function k$(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 ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ka(e)}function N$(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 Fw(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=I$(e,"string");return Jr(t)=="symbol"?t:t+""}function I$(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 Co=(function(e){function t(){return T$(this,t),C$(this,t,arguments)}return N$(t,e),M$(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,u=n.dataKey,s=n.data,c=n.dataPointFormatter,f=n.xAxis,l=n.yAxis,d=P$(n,x$),h=G(d,!1);this.props.direction==="x"&&f.type!=="number"&&xr();var y=s.map(function(v){var p=c(v,u),g=p.x,x=p.y,w=p.value,O=p.errorVal;if(!O)return null;var m=[],b,_;if(Array.isArray(O)){var A=w$(O,2);b=A[0],_=A[1]}else b=_=O;if(a==="vertical"){var T=f.scale,$=x+i,j=$+o,M=$-o,C=T(w-b),E=T(w+_);m.push({x1:E,y1:j,x2:E,y2:M}),m.push({x1:C,y1:$,x2:E,y2:$}),m.push({x1:C,y1:j,x2:C,y2:M})}else if(a==="horizontal"){var k=l.scale,I=g+i,R=I-o,B=I+o,F=k(w-b),H=k(w+_);m.push({x1:R,y1:H,x2:B,y2:H}),m.push({x1:I,y1:F,x2:I,y2:H}),m.push({x1:R,y1:F,x2:B,y2:F})}return P.createElement(te,$a({className:"recharts-errorBar",key:"bar-".concat(m.map(function(Y){return"".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))},h),m.map(function(Y){return P.createElement("line",$a({},Y,{key:"line-".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))}))});return P.createElement(te,{className:"recharts-errorBars"},y)}}])})(P.Component);Fw(Co,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Fw(Co,"displayName","ErrorBar");function li(e){"@babel/helpers - typeof";return li=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},li(e)}function bg(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 rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(r),!0).forEach(function(n){D$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D$(e,t,r){return t=R$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R$(e){var t=q$(e,"string");return li(t)=="symbol"?t:t+""}function q$(e,t){if(li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uw=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Ve(r,Br);if(!o)return null;var u=Br.defaultProps,s=u!==void 0?rr(rr({},u),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,y=h.sectors||h.data||[];return f.concat(y.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):c=(n||[]).map(function(f){var l=f.item,d=l.type.defaultProps,h=d!==void 0?rr(rr({},d),l.props):{},y=h.dataKey,v=h.name,p=h.legendType,g=h.hide;return{inactive:g,dataKey:y,type:s.iconType||p||"square",color:fh(l),value:v||y,payload:h}}),rr(rr(rr({},s),Br.getWithHeight(o,i)),{},{payload:c,item:o})};function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function xg(e){return W$(e)||F$(e)||B$(e)||L$()}function L$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B$(e,t){if(e){if(typeof e=="string")return $f(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 $f(e,t)}}function F$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function W$(e){if(Array.isArray(e))return $f(e)}function $f(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 me(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){Wr(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 Wr(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=z$(e,"string");return fi(t)=="symbol"?t:t+""}function z$(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)}function je(e,t,r){return Z(e)||Z(t)?r:Te(t)?Qe(e,t,r):V(t)?t(e):r}function Hn(e,t,r,n){var i=WC(e,function(u){return je(u,t)});if(r==="number"){var a=i.filter(function(u){return L(u)||parseFloat(u)});return a.length?[To(a),Gt(a)]:[1/0,-1/0]}var o=n?i.filter(function(u){return!Z(u)}):i;return o.map(function(u){return Te(u)||u instanceof Date?u:""})}var H$=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,u=(r=n?.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var s=a.range,c=0;c<u;c++){var f=c>0?i[c-1].coordinate:i[u-1].coordinate,l=i[c].coordinate,d=c>=u-1?i[0].coordinate:i[c+1].coordinate,h=void 0;if(Le(l-f)!==Le(d-l)){var y=[];if(Le(d-l)===Le(s[1]-s[0])){h=d;var v=l+s[1]-s[0];y[0]=Math.min(v,(v+f)/2),y[1]=Math.max(v,(v+f)/2)}else{h=f;var p=d+s[1]-s[0];y[0]=Math.min(l,(p+l)/2),y[1]=Math.max(l,(p+l)/2)}var g=[Math.min(l,(h+l)/2),Math.max(l,(h+l)/2)];if(t>g[0]&&t<=g[1]||t>=y[0]&&t<=y[1]){o=i[c].index;break}}else{var x=Math.min(f,d),w=Math.max(f,d);if(t>(x+l)/2&&t<=(w+l)/2){o=i[c].index;break}}}else for(var O=0;O<u;O++)if(O===0&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O>0&&O<u-1&&t>(n[O].coordinate+n[O-1].coordinate)/2&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O===u-1&&t>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},fh=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?me(me({},t.type.defaultProps),t.props):t.props,o=a.stroke,u=a.fill,s;switch(i){case"Line":s=o;break;case"Area":case"Radar":s=o&&o!=="none"?o:u;break;default:s=u;break}return s},G$=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},u=Object.keys(a),s=0,c=u.length;s<c;s++)for(var f=a[u[s]].stackGroups,l=Object.keys(f),d=0,h=l.length;d<h;d++){var y=f[l[d]],v=y.items,p=y.cateAxisId,g=v.filter(function(_){return Et(_.type).indexOf("Bar")>=0});if(g&&g.length){var x=g[0].type.defaultProps,w=x!==void 0?me(me({},x),g[0].props):g[0].props,O=w.barSize,m=w[p];o[m]||(o[m]=[]);var b=Z(O)?r:O;o[m].push({item:g[0],stackList:g.slice(1),barSize:Z(b)?void 0:Be(b,n,0)})}}return o},K$=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,u=t.maxBarSize,s=o.length;if(s<1)return null;var c=Be(r,i,0,!0),f,l=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/s,y=o.reduce(function(O,m){return O+m.barSize||0},0);y+=(s-1)*c,y>=i&&(y-=(s-1)*c,c=0),y>=i&&h>0&&(d=!0,h*=.9,y=s*h);var v=(i-y)/2>>0,p={offset:v-c,size:0};f=o.reduce(function(O,m){var b={item:m.item,position:{offset:p.offset+p.size+c,size:d?h:m.barSize}},_=[].concat(xg(O),[b]);return p=_[_.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(A){_.push({item:A,position:p})}),_},l)}else{var g=Be(n,i,0,!0);i-2*g-(s-1)*c<=0&&(c=0);var x=(i-2*g-(s-1)*c)/s;x>1&&(x>>=0);var w=u===+u?Math.min(x,u):x;f=o.reduce(function(O,m,b){var _=[].concat(xg(O),[{item:m.item,position:{offset:g+(x+c)*b+(x-w)/2,size:w}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(A){_.push({item:A,position:_[_.length-1].position})}),_},l)}return f},Y$=function(t,r,n,i){var a=n.children,o=n.width,u=n.margin,s=o-(u.left||0)-(u.right||0),c=Uw({children:a,legendWidth:s});if(c){var f=i||{},l=f.width,d=f.height,h=c.align,y=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&L(t[h]))return me(me({},t),{},Wr({},h,t[h]+(l||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&L(t[y]))return me(me({},t),{},Wr({},y,t[y]+(d||0)))}return t},V$=function(t,r,n){return Z(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},zw=function(t,r,n,i,a){var o=r.props.children,u=at(o,Co).filter(function(c){return V$(i,a,c.props.direction)});if(u&&u.length){var s=u.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var l=je(f,n);if(Z(l))return c;var d=Array.isArray(l)?[To(l),Gt(l)]:[l,l],h=s.reduce(function(y,v){var p=je(f,v,0),g=d[0]-Math.abs(Array.isArray(p)?p[0]:p),x=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(g,y[0]),Math.max(x,y[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},X$=function(t,r,n,i,a){var o=r.map(function(u){return zw(t,u,n,a,i)}).filter(function(u){return!Z(u)});return o&&o.length?o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]):null},Hw=function(t,r,n,i,a){var o=r.map(function(s){var c=s.props.dataKey;return n==="number"&&c&&zw(t,s,c,i)||Hn(t,c,n,a)});if(n==="number")return o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);var u={};return o.reduce(function(s,c){for(var f=0,l=c.length;f<l;f++)u[c[f]]||(u[c[f]]=!0,s.push(c[f]));return s},[])},Gw=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Kw=function(t,r,n,i){if(i)return t.map(function(s){return s.coordinate});var a,o,u=t.map(function(s){return s.coordinate===r&&(a=!0),s.coordinate===n&&(o=!0),s.coordinate});return a||u.push(r),o||u.push(n),u},Tt=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,u=t.range,s=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/s:0;if(c=t.axisType==="angleAxis"&&u?.length>=2?Le(u[0]-u[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!xn(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}})},ml=new WeakMap,Qi=function(t,r){if(typeof r!="function")return t;ml.has(t)||ml.set(t,new WeakMap);var n=ml.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},Yw=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,u=t.axisType;if(i==="auto")return o==="radial"&&u==="radiusAxis"?{scale:ni(),realScaleType:"band"}:o==="radial"&&u==="angleAxis"?{scale:ja(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:zn(),realScaleType:"point"}:a==="category"?{scale:ni(),realScaleType:"band"}:{scale:ja(),realScaleType:"linear"};if(yr(i)){var s="scale".concat(ho(i));return{scale:(og[s]||zn)(),realScaleType:og[s]?s:"point"}}return V(i)?{scale:i}:{scale:zn(),realScaleType:"point"}},Og=1e-4,Vw=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])-Og,o=Math.max(i[0],i[1])+Og,u=t(r[0]),s=t(r[n-1]);(u<a||u>o||s<a||s>o)&&t.domain([r[0],r[n-1]])}},Z$=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},Q$=function(t,r){if(!r||r.length!==2||!L(r[0])||!L(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(!L(t[0])||t[0]<n)&&(a[0]=n),(!L(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},J$=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,u=0;u<r;++u){var s=xn(t[u][n][1])?t[u][n][0]:t[u][n][1];s>=0?(t[u][n][0]=a,t[u][n][1]=a+s,a=t[u][n][1]):(t[u][n][0]=o,t[u][n][1]=o+s,o=t[u][n][1])}},ek=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var u=xn(t[o][n][1])?t[o][n][0]:t[o][n][1];u>=0?(t[o][n][0]=a,t[o][n][1]=a+u,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},tk={sign:J$,expand:WA,none:zr,silhouette:UA,wiggle:zA,positive:ek},rk=function(t,r,n){var i=r.map(function(u){return u.props.dataKey}),a=tk[n],o=FA().keys(i).value(function(u,s){return+je(u,s,0)}).order(sf).offset(a);return o(t)},nk=function(t,r,n,i,a,o){if(!t)return null;var u=o?r.reverse():r,s={},c=u.reduce(function(l,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?me(me({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return l;var g=y[n],x=l[g]||{hasStack:!1,stackGroups:{}};if(Te(v)){var w=x.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};w.items.push(d),x.hasStack=!0,x.stackGroups[v]=w}else x.stackGroups[wn("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return me(me({},l),{},Wr({},g,x))},s),f={};return Object.keys(c).reduce(function(l,d){var h=c[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var g=h.stackGroups[p];return me(me({},v),{},Wr({},p,{numericAxisId:n,cateAxisId:i,items:g.items,stackedData:rk(t,g.items,a)}))},y)}return me(me({},l),{},Wr({},d,h))},f)},Xw=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,u=r.allowDecimals,s=n||r.scale;if(s!=="auto"&&s!=="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=m$(c,a,u);return t.domain([To(f),Gt(f)]),{niceTicks:f}}if(a&&i==="number"){var l=t.domain(),d=g$(l,a,u);return{niceTicks:d}}return null};function _g(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&&!Z(i[t.dataKey])){var u=ca(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var s=je(i,Z(o)?t.dataKey:o);return Z(s)?null:t.scale(s)}var Sg=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,u=t.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var s=je(o,r.dataKey,r.domain[u]);return Z(s)?null:r.scale(s)-a/2+i},ik=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]},ak=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(Te(a)){var o=r[a];if(o){var u=o.items.indexOf(t);return u>=0?o.stackedData[u]:null}}return null},ok=function(t){return t.reduce(function(r,n){return[To(n.concat([r[0]]).filter(L)),Gt(n.concat([r[1]]).filter(L))]},[1/0,-1/0])},Zw=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],u=o.stackedData,s=u.reduce(function(c,f){var l=ok(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(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Ag=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Pg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kf=function(t,r,n){if(V(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(L(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(Ag.test(t[0])){var a=+Ag.exec(t[0])[1];i[0]=r[0]-a}else V(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(L(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(Pg.test(t[1])){var o=+Pg.exec(t[1])[1];i[1]=r[1]+o}else V(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Na=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=Ld(r,function(l){return l.coordinate}),o=1/0,u=1,s=a.length;u<s;u++){var c=a[u],f=a[u-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},jg=function(t,r,n){return!t||!t.length||Qr(t,Qe(n,"type.defaultProps.domain"))?r:t},Qw=function(t,r){var n=t.type.defaultProps?me(me({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,u=n.formatter,s=n.tooltipType,c=n.chartType,f=n.hide;return me(me({},G(t,!1)),{},{dataKey:i,unit:o,formatter:u,name:a||i,color:fh(t),value:je(r,i),type:s,payload:r,chartType:c,hide:f})};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 Tg(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 St(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(r),!0).forEach(function(n){Jw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jw(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=sk(e,"string");return di(t)=="symbol"?t:t+""}function sk(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 ck(e,t){return hk(e)||dk(e,t)||fk(e,t)||lk()}function lk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
+
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 Eg(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 Eg(e,t)}}function Eg(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 dk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function hk(e){if(Array.isArray(e))return e}var Ia=Math.PI/180,pk=function(t){return t*180/Math.PI},de=function(t,r,n,i){return{x:t+Math.cos(-Ia*i)*n,y:r+Math.sin(-Ia*i)*n}},e1=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},vk=function(t,r,n,i,a){var o=t.width,u=t.height,s=t.startAngle,c=t.endAngle,f=Be(t.cx,o,o/2),l=Be(t.cy,u,u/2),d=e1(o,u,n),h=Be(t.innerRadius,d,0),y=Be(t.outerRadius,d,d*.8),v=Object.keys(r);return v.reduce(function(p,g){var x=r[g],w=x.domain,O=x.reversed,m;if(Z(x.range))i==="angleAxis"?m=[s,c]:i==="radiusAxis"&&(m=[h,y]),O&&(m=[m[1],m[0]]);else{m=x.range;var b=m,_=ck(b,2);s=_[0],c=_[1]}var A=Yw(x,a),T=A.realScaleType,$=A.scale;$.domain(w).range(m),Vw($);var j=Xw($,St(St({},x),{},{realScaleType:T})),M=St(St(St({},x),j),{},{range:m,radius:y,realScaleType:T,scale:$,cx:f,cy:l,innerRadius:h,outerRadius:y,startAngle:s,endAngle:c});return St(St({},p),{},Jw({},g,M))},{})},yk=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))},mk=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,u=yk({x:n,y:i},{x:a,y:o});if(u<=0)return{radius:u};var s=(n-a)/u,c=Math.acos(s);return i>o&&(c=2*Math.PI-c),{radius:u,angle:pk(c),angleInRadian:c}},gk=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}},bk=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),u=Math.min(a,o);return t+u*360},Mg=function(t,r){var n=t.x,i=t.y,a=mk({x:n,y:i},r),o=a.radius,u=a.angle,s=r.innerRadius,c=r.outerRadius;if(o<s||o>c)return!1;if(o===0)return!0;var f=gk(r),l=f.startAngle,d=f.endAngle,h=u,y;if(l<=d){for(;h>d;)h-=360;for(;h<l;)h+=360;y=h>=l&&h<=d}else{for(;h>l;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=l}return y?St(St({},r),{},{radius:o,angle:bk(h,r)}):null},t1=function(t){return!D.isValidElement(t)&&!V(t)&&typeof t!="boolean"?t.className:""};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)}var xk=["offset"];function wk(e){return Ak(e)||Sk(e)||_k(e)||Ok()}function Ok(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _k(e,t){if(e){if(typeof e=="string")return Nf(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 Nf(e,t)}}function Sk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ak(e){if(Array.isArray(e))return Nf(e)}function Nf(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 Pk(e,t){if(e==null)return{};var r=jk(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 jk(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 Cg(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 Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(r),!0).forEach(function(n){Tk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tk(e,t,r){return t=Ek(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ek(e){var t=Mk(e,"string");return hi(t)=="symbol"?t:t+""}function Mk(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)}function pi(){return pi=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},pi.apply(this,arguments)}var Ck=function(t){var r=t.value,n=t.formatter,i=Z(t.children)?r:t.children;return V(n)?n(i):i},$k=function(t,r){var n=Le(r-t),i=Math.min(Math.abs(r-t),360);return n*i},kk=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,u=t.className,s=a,c=s.cx,f=s.cy,l=s.innerRadius,d=s.outerRadius,h=s.startAngle,y=s.endAngle,v=s.clockWise,p=(l+d)/2,g=$k(h,y),x=g>=0?1:-1,w,O;i==="insideStart"?(w=h+x*o,O=v):i==="insideEnd"?(w=y-x*o,O=!v):i==="end"&&(w=y+x*o,O=v),O=g<=0?O:!O;var m=de(c,f,p,w),b=de(c,f,p,w+(O?1:-1)*359),_="M".concat(m.x,",").concat(m.y,`
|
|
20
|
+
A`).concat(p,",").concat(p,",0,1,").concat(O?0:1,`,
|
|
21
|
+
`).concat(b.x,",").concat(b.y),A=Z(t.id)?wn("recharts-radial-line-"):t.id;return P.createElement("text",pi({},n,{dominantBaseline:"central",className:J("recharts-radial-bar-label",u)}),P.createElement("defs",null,P.createElement("path",{id:A,d:_})),P.createElement("textPath",{xlinkHref:"#".concat(A)},r))},Nk=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,u=a.cy,s=a.innerRadius,c=a.outerRadius,f=a.startAngle,l=a.endAngle,d=(f+l)/2;if(i==="outside"){var h=de(o,u,c+n,d),y=h.x,v=h.y;return{x:y,y:v,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:u,textAnchor:"middle",verticalAnchor:"end"};var p=(s+c)/2,g=de(o,u,p,d),x=g.x,w=g.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},Ik=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,u=o.x,s=o.y,c=o.width,f=o.height,l=f>=0?1:-1,d=l*i,h=l>0?"end":"start",y=l>0?"start":"end",v=c>=0?1:-1,p=v*i,g=v>0?"end":"start",x=v>0?"start":"end";if(a==="top"){var w={x:u+c/2,y:s-l*i,textAnchor:"middle",verticalAnchor:h};return Pe(Pe({},w),n?{height:Math.max(s-n.y,0),width:c}:{})}if(a==="bottom"){var O={x:u+c/2,y:s+f+d,textAnchor:"middle",verticalAnchor:y};return Pe(Pe({},O),n?{height:Math.max(n.y+n.height-(s+f),0),width:c}:{})}if(a==="left"){var m={x:u-p,y:s+f/2,textAnchor:g,verticalAnchor:"middle"};return Pe(Pe({},m),n?{width:Math.max(m.x-n.x,0),height:f}:{})}if(a==="right"){var b={x:u+c+p,y:s+f/2,textAnchor:x,verticalAnchor:"middle"};return Pe(Pe({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:f}:{})}var _=n?{width:c,height:f}:{};return a==="insideLeft"?Pe({x:u+p,y:s+f/2,textAnchor:x,verticalAnchor:"middle"},_):a==="insideRight"?Pe({x:u+c-p,y:s+f/2,textAnchor:g,verticalAnchor:"middle"},_):a==="insideTop"?Pe({x:u+c/2,y:s+d,textAnchor:"middle",verticalAnchor:y},_):a==="insideBottom"?Pe({x:u+c/2,y:s+f-d,textAnchor:"middle",verticalAnchor:h},_):a==="insideTopLeft"?Pe({x:u+p,y:s+d,textAnchor:x,verticalAnchor:y},_):a==="insideTopRight"?Pe({x:u+c-p,y:s+d,textAnchor:g,verticalAnchor:y},_):a==="insideBottomLeft"?Pe({x:u+p,y:s+f-d,textAnchor:x,verticalAnchor:h},_):a==="insideBottomRight"?Pe({x:u+c-p,y:s+f-d,textAnchor:g,verticalAnchor:h},_):bn(a)&&(L(a.x)||cr(a.x))&&(L(a.y)||cr(a.y))?Pe({x:u+Be(a.x,c),y:s+Be(a.y,f),textAnchor:"end",verticalAnchor:"end"},_):Pe({x:u+c/2,y:s+f/2,textAnchor:"middle",verticalAnchor:"middle"},_)},Dk=function(t){return"cx"in t&&L(t.cx)};function Ce(e){var t=e.offset,r=t===void 0?5:t,n=Pk(e,xk),i=Pe({offset:r},n),a=i.viewBox,o=i.position,u=i.value,s=i.children,c=i.content,f=i.className,l=f===void 0?"":f,d=i.textBreakAll;if(!a||Z(u)&&Z(s)&&!D.isValidElement(c)&&!V(c))return null;if(D.isValidElement(c))return D.cloneElement(c,i);var h;if(V(c)){if(h=D.createElement(c,i),D.isValidElement(h))return h}else h=Ck(i);var y=Dk(a),v=G(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return kk(i,h,v);var p=y?Nk(i):Ik(i);return P.createElement(gr,pi({className:J("recharts-label",l)},v,p,{breakAll:d}),h)}Ce.displayName="Label";var r1=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,u=t.r,s=t.radius,c=t.innerRadius,f=t.outerRadius,l=t.x,d=t.y,h=t.top,y=t.left,v=t.width,p=t.height,g=t.clockWise,x=t.labelViewBox;if(x)return x;if(L(v)&&L(p)){if(L(l)&&L(d))return{x:l,y:d,width:v,height:p};if(L(h)&&L(y))return{x:h,y,width:v,height:p}}return L(l)&&L(d)?{x:l,y:d,width:0,height:0}:L(r)&&L(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:f||s||u||0,clockWise:g}:t.viewBox?t.viewBox:{}},Rk=function(t,r){return t?t===!0?P.createElement(Ce,{key:"label-implicit",viewBox:r}):Te(t)?P.createElement(Ce,{key:"label-implicit",viewBox:r,value:t}):D.isValidElement(t)?t.type===Ce?D.cloneElement(t,{key:"label-implicit",viewBox:r}):P.createElement(Ce,{key:"label-implicit",content:t,viewBox:r}):V(t)?P.createElement(Ce,{key:"label-implicit",content:t,viewBox:r}):bn(t)?P.createElement(Ce,pi({viewBox:r},t,{key:"label-implicit"})):null:null},qk=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=r1(t),o=at(i,Ce).map(function(s,c){return D.cloneElement(s,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return o;var u=Rk(t.label,r||a);return[u].concat(wk(o))};Ce.parseViewBox=r1;Ce.renderCallByParent=qk;var gl,$g;function Lk(){if($g)return gl;$g=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return gl=e,gl}var Bk=Lk();const Fk=se(Bk);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)}var Wk=["valueAccessor"],Uk=["data","dataKey","clockWise","id","textBreakAll"];function zk(e){return Yk(e)||Kk(e)||Gk(e)||Hk()}function Hk(){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 Gk(e,t){if(e){if(typeof e=="string")return If(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 If(e,t)}}function Kk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yk(e){if(Array.isArray(e))return If(e)}function If(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 Da(){return Da=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},Da.apply(this,arguments)}function kg(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 Ng(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kg(Object(r),!0).forEach(function(n){Vk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vk(e,t,r){return t=Xk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xk(e){var t=Zk(e,"string");return vi(t)=="symbol"?t:t+""}function Zk(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(t==="string"?String:Number)(e)}function Ig(e,t){if(e==null)return{};var r=Qk(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 Qk(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 Jk=function(t){return Array.isArray(t.value)?Fk(t.value):t.value};function Ct(e){var t=e.valueAccessor,r=t===void 0?Jk:t,n=Ig(e,Wk),i=n.data,a=n.dataKey,o=n.clockWise,u=n.id,s=n.textBreakAll,c=Ig(n,Uk);return!i||!i.length?null:P.createElement(te,{className:"recharts-label-list"},i.map(function(f,l){var d=Z(a)?r(f,l):je(f&&f.payload,a),h=Z(u)?{}:{id:"".concat(u,"-").concat(l)};return P.createElement(Ce,Da({},G(f,!0),c,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:s,viewBox:Ce.parseViewBox(Z(o)?f:Ng(Ng({},f),{},{clockWise:o})),key:"label-".concat(l),index:l}))}))}Ct.displayName="LabelList";function eN(e,t){return e?e===!0?P.createElement(Ct,{key:"labelList-implicit",data:t}):P.isValidElement(e)||V(e)?P.createElement(Ct,{key:"labelList-implicit",data:t,content:e}):bn(e)?P.createElement(Ct,Da({data:t},e,{key:"labelList-implicit"})):null:null}function tN(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=at(n,Ct).map(function(o,u){return D.cloneElement(o,{data:t,key:"labelList-".concat(u)})});if(!r)return i;var a=eN(e.label,t);return[a].concat(zk(i))}Ct.renderCallByParent=tN;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 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 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 Rg(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){rN(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 rN(e,t,r){return t=nN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nN(e){var t=iN(e,"string");return yi(t)=="symbol"?t:t+""}function iN(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)}var aN=function(t,r){var n=Le(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Ji=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,u=t.isExternal,s=t.cornerRadius,c=t.cornerIsExternal,f=s*(u?1:-1)+i,l=Math.asin(s/f)/Ia,d=c?a:a+o*l,h=de(r,n,f,d),y=de(r,n,i,d),v=c?a-o*l:a,p=de(r,n,f*Math.cos(l*Ia),v);return{center:h,circleTangency:y,lineTangency:p,theta:l}},n1=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,u=t.endAngle,s=aN(o,u),c=o+s,f=de(r,n,a,o),l=de(r,n,a,c),d="M ".concat(f.x,",").concat(f.y,`
|
|
23
|
+
A `).concat(a,",").concat(a,`,0,
|
|
24
|
+
`).concat(+(Math.abs(s)>180),",").concat(+(o>c),`,
|
|
25
|
+
`).concat(l.x,",").concat(l.y,`
|
|
26
|
+
`);if(i>0){var h=de(r,n,i,o),y=de(r,n,i,c);d+="L ".concat(y.x,",").concat(y.y,`
|
|
27
|
+
A `).concat(i,",").concat(i,`,0,
|
|
28
|
+
`).concat(+(Math.abs(s)>180),",").concat(+(o<=c),`,
|
|
29
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},oN=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,u=t.forceCornerRadius,s=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,l=Le(f-c),d=Ji({cx:r,cy:n,radius:a,angle:c,sign:l,cornerRadius:o,cornerIsExternal:s}),h=d.circleTangency,y=d.lineTangency,v=d.theta,p=Ji({cx:r,cy:n,radius:a,angle:f,sign:-l,cornerRadius:o,cornerIsExternal:s}),g=p.circleTangency,x=p.lineTangency,w=p.theta,O=s?Math.abs(c-f):Math.abs(c-f)-v-w;if(O<0)return u?"M ".concat(y.x,",").concat(y.y,`
|
|
30
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
31
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
32
|
+
`):n1({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:f});var m="M ".concat(y.x,",").concat(y.y,`
|
|
33
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(h.x,",").concat(h.y,`
|
|
34
|
+
A`).concat(a,",").concat(a,",0,").concat(+(O>180),",").concat(+(l<0),",").concat(g.x,",").concat(g.y,`
|
|
35
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(x.x,",").concat(x.y,`
|
|
36
|
+
`);if(i>0){var b=Ji({cx:r,cy:n,radius:i,angle:c,sign:l,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),_=b.circleTangency,A=b.lineTangency,T=b.theta,$=Ji({cx:r,cy:n,radius:i,angle:f,sign:-l,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),j=$.circleTangency,M=$.lineTangency,C=$.theta,E=s?Math.abs(c-f):Math.abs(c-f)-T-C;if(E<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(M.x,",").concat(M.y,`
|
|
37
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(j.x,",").concat(j.y,`
|
|
38
|
+
A`).concat(i,",").concat(i,",0,").concat(+(E>180),",").concat(+(l>0),",").concat(_.x,",").concat(_.y,`
|
|
39
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(A.x,",").concat(A.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},uN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},i1=function(t){var r=Rg(Rg({},uN),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,u=r.cornerRadius,s=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,l=r.endAngle,d=r.className;if(o<a||f===l)return null;var h=J("recharts-sector",d),y=o-a,v=Be(u,y,0,!0),p;return v>0&&Math.abs(f-l)<360?p=oN({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:f,endAngle:l}):p=n1({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:l}),P.createElement("path",Df({},G(r,!0),{className:h,d:p,role:"img"}))};function mi(e){"@babel/helpers - typeof";return mi=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},mi(e)}function Rf(){return Rf=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},Rf.apply(this,arguments)}function qg(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 Lg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qg(Object(r),!0).forEach(function(n){sN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sN(e,t,r){return t=cN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cN(e){var t=lN(e,"string");return mi(t)=="symbol"?t:t+""}function lN(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bg={curveBasisClosed:MA,curveBasisOpen:CA,curveBasis:EA,curveBumpX:vA,curveBumpY:yA,curveLinearClosed:$A,curveLinear:vo,curveMonotoneX:kA,curveMonotoneY:NA,curveNatural:IA,curveStep:DA,curveStepAfter:qA,curveStepBefore:RA},ea=function(t){return t.x===+t.x&&t.y===+t.y},Nn=function(t){return t.x},In=function(t){return t.y},fN=function(t,r){if(V(t))return t;var n="curve".concat(ho(t));return(n==="curveMonotone"||n==="curveBump")&&r?Bg["".concat(n).concat(r==="vertical"?"Y":"X")]:Bg[n]||vo},dN=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,u=t.layout,s=t.connectNulls,c=s===void 0?!1:s,f=fN(n,u),l=c?a.filter(function(v){return ea(v)}):a,d;if(Array.isArray(o)){var h=c?o.filter(function(v){return ea(v)}):o,y=l.map(function(v,p){return Lg(Lg({},v),{},{base:h[p]})});return u==="vertical"?d=Hi().y(In).x1(Nn).x0(function(v){return v.base.x}):d=Hi().x(Nn).y1(In).y0(function(v){return v.base.y}),d.defined(ea).curve(f),d(y)}return u==="vertical"&&L(o)?d=Hi().y(In).x1(Nn).x0(o):L(o)?d=Hi().x(Nn).y1(In).y0(o):d=tx().x(Nn).y(In),d.defined(ea).curve(f),d(l)},Ur=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?dN(t):i;return D.createElement("path",Rf({},G(t,!1),la(t),{className:J("recharts-curve",r),d:o,ref:a}))},bl={exports:{}},xl,Fg;function hN(){if(Fg)return xl;Fg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xl=e,xl}var wl,Wg;function pN(){if(Wg)return wl;Wg=1;var e=hN();function t(){}function r(){}return r.resetWarningCache=t,wl=function(){function n(o,u,s,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},wl}var Ug;function vN(){return Ug||(Ug=1,bl.exports=pN()()),bl.exports}var yN=vN();const ae=se(yN);var mN=Object.getOwnPropertyNames,gN=Object.getOwnPropertySymbols,bN=Object.prototype.hasOwnProperty;function zg(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function ta(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),u=a.get(n);if(o&&u)return o===n&&u===r;a.set(r,n),a.set(n,r);var s=e(r,n,i);return a.delete(r),a.delete(n),s}}function xN(e){return e?.[Symbol.toStringTag]}function Hg(e){return mN(e).concat(gN(e))}var wN=Object.hasOwn||(function(e,t){return bN.call(e,t)});function Pr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var ON="__v",_N="__o",SN="_owner",Gg=Object.getOwnPropertyDescriptor,Kg=Object.keys;function AN(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function PN(e,t){return Pr(e.getTime(),t.getTime())}function jN(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function TN(e,t){return e===t}function Yg(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,u,s=0;(o=a.next())&&!o.done;){for(var c=t.entries(),f=!1,l=0;(u=c.next())&&!u.done;){if(i[l]){l++;continue}var d=o.value,h=u.value;if(r.equals(d[0],h[0],s,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;s++}return!0}var EN=Pr;function MN(e,t,r){var n=Kg(e),i=n.length;if(Kg(t).length!==i)return!1;for(;i-- >0;)if(!a1(e,t,r,n[i]))return!1;return!0}function Dn(e,t,r){var n=Hg(e),i=n.length;if(Hg(t).length!==i)return!1;for(var a,o,u;i-- >0;)if(a=n[i],!a1(e,t,r,a)||(o=Gg(e,a),u=Gg(t,a),(o||u)&&(!o||!u||o.configurable!==u.configurable||o.enumerable!==u.enumerable||o.writable!==u.writable)))return!1;return!0}function CN(e,t){return Pr(e.valueOf(),t.valueOf())}function $N(e,t){return e.source===t.source&&e.flags===t.flags}function Vg(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,u;(o=a.next())&&!o.done;){for(var s=t.values(),c=!1,f=0;(u=s.next())&&!u.done;){if(!i[f]&&r.equals(o.value,u.value,o.value,u.value,e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1}return!0}function kN(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function NN(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 a1(e,t,r,n){return(n===SN||n===_N||n===ON)&&(e.$$typeof||t.$$typeof)?!0:wN(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var IN="[object Arguments]",DN="[object Boolean]",RN="[object Date]",qN="[object Error]",LN="[object Map]",BN="[object Number]",FN="[object Object]",WN="[object RegExp]",UN="[object Set]",zN="[object String]",HN="[object URL]",GN=Array.isArray,Xg=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,Zg=Object.assign,KN=Object.prototype.toString.call.bind(Object.prototype.toString);function YN(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,u=e.areObjectsEqual,s=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,f=e.areSetsEqual,l=e.areTypedArraysEqual,d=e.areUrlsEqual,h=e.unknownTagComparators;return function(v,p,g){if(v===p)return!0;if(v==null||p==null)return!1;var x=typeof v;if(x!==typeof p)return!1;if(x!=="object")return x==="number"?o(v,p,g):x==="function"?i(v,p,g):!1;var w=v.constructor;if(w!==p.constructor)return!1;if(w===Object)return u(v,p,g);if(GN(v))return t(v,p,g);if(Xg!=null&&Xg(v))return l(v,p,g);if(w===Date)return r(v,p,g);if(w===RegExp)return c(v,p,g);if(w===Map)return a(v,p,g);if(w===Set)return f(v,p,g);var O=KN(v);if(O===RN)return r(v,p,g);if(O===WN)return c(v,p,g);if(O===LN)return a(v,p,g);if(O===UN)return f(v,p,g);if(O===FN)return typeof v.then!="function"&&typeof p.then!="function"&&u(v,p,g);if(O===HN)return d(v,p,g);if(O===qN)return n(v,p,g);if(O===IN)return u(v,p,g);if(O===DN||O===BN||O===zN)return s(v,p,g);if(h){var m=h[O];if(!m){var b=xN(v);b&&(m=h[b])}if(m)return m(v,p,g)}return!1}}function VN(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Dn:AN,areDatesEqual:PN,areErrorsEqual:jN,areFunctionsEqual:TN,areMapsEqual:n?zg(Yg,Dn):Yg,areNumbersEqual:EN,areObjectsEqual:n?Dn:MN,arePrimitiveWrappersEqual:CN,areRegExpsEqual:$N,areSetsEqual:n?zg(Vg,Dn):Vg,areTypedArraysEqual:n?Dn:kN,areUrlsEqual:NN,unknownTagComparators:void 0};if(r&&(i=Zg({},i,r(i))),t){var a=ta(i.areArraysEqual),o=ta(i.areMapsEqual),u=ta(i.areObjectsEqual),s=ta(i.areSetsEqual);i=Zg({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:u,areSetsEqual:s})}return i}function XN(e){return function(t,r,n,i,a,o,u){return e(t,r,u)}}function ZN(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(s,c){var f=n(),l=f.cache,d=l===void 0?t?new WeakMap:void 0:l,h=f.meta;return r(s,c,{cache:d,equals:i,meta:h,strict:a})};if(t)return function(s,c){return r(s,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(s,c){return r(s,c,o)}}var QN=Qt();Qt({strict:!0});Qt({circular:!0});Qt({circular:!0,strict:!0});Qt({createInternalComparator:function(){return Pr}});Qt({strict:!0,createInternalComparator:function(){return Pr}});Qt({circular:!0,createInternalComparator:function(){return Pr}});Qt({circular:!0,createInternalComparator:function(){return Pr},strict:!0});function Qt(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,u=VN(e),s=YN(u),c=n?n(s):XN(s);return ZN({circular:r,comparator:s,createState:i,equals:c,strict:o})}function JN(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Qg(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):JN(i)};requestAnimationFrame(n)}function qf(e){"@babel/helpers - typeof";return qf=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},qf(e)}function eI(e){return iI(e)||nI(e)||rI(e)||tI()}function tI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rI(e,t){if(e){if(typeof e=="string")return Jg(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 Jg(e,t)}}function Jg(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 nI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iI(e){if(Array.isArray(e))return e}function aI(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,u=eI(o),s=u[0],c=u.slice(1);if(typeof s=="number"){Qg(i.bind(null,c),s);return}i(s),Qg(i.bind(null,c));return}qf(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 gi(e){"@babel/helpers - typeof";return gi=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},gi(e)}function eb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eb(Object(r),!0).forEach(function(n){o1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o1(e,t,r){return t=oI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oI(e){var t=uI(e,"string");return gi(t)==="symbol"?t:String(t)}function uI(e,t){if(gi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sI=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},cI=function(t){return t},lI=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Gn=function(t,r){return Object.keys(r).reduce(function(n,i){return tb(tb({},n),{},o1({},i,t(i,r[i])))},{})},rb=function(t,r,n){return t.map(function(i){return"".concat(lI(i)," ").concat(r,"ms ").concat(n)}).join(",")};function fI(e,t){return pI(e)||hI(e,t)||u1(e,t)||dI()}function dI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
41
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function pI(e){if(Array.isArray(e))return e}function vI(e){return gI(e)||mI(e)||u1(e)||yI()}function yI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
42
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u1(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 mI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gI(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}var Ra=1e-4,s1=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},c1=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},nb=function(t,r){return function(n){var i=s1(t,r);return c1(i,n)}},bI=function(t,r){return function(n){var i=s1(t,r),a=[].concat(vI(i.map(function(o,u){return o*u}).slice(1)),[0]);return c1(a,n)}},ib=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],u=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,u=1;break;case"ease":i=.25,a=.1,o=.25,u=1;break;case"ease-in":i=.42,a=0,o=1,u=1;break;case"ease-out":i=.42,a=0,o=.58,u=1;break;case"ease-in-out":i=0,a=0,o=.58,u=1;break;default:{var s=r[0].split("(");if(s[0]==="cubic-bezier"&&s[1].split(")")[0].split(",").length===4){var c=s[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=fI(c,4);i=f[0],a=f[1],o=f[2],u=f[3]}}}var l=nb(i,o),d=nb(a,u),h=bI(i,o),y=function(g){return g>1?1:g<0?0:g},v=function(g){for(var x=g>1?1:g,w=x,O=0;O<8;++O){var m=l(w)-x,b=h(w);if(Math.abs(m-x)<Ra||b<Ra)return d(w);w=y(w-m/b)}return d(w)};return v.isStepper=!1,v},xI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,u=o===void 0?17:o,s=function(f,l,d){var h=-(f-l)*n,y=d*a,v=d+(h-y)*u/1e3,p=d*u/1e3+f;return Math.abs(p-l)<Ra&&Math.abs(v)<Ra?[l,0]:[p,v]};return s.isStepper=!0,s.dt=u,s},wI=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 ib(i);case"spring":return xI();default:if(i.split("(")[0]==="cubic-bezier")return ib(i)}return typeof i=="function"?i:null};function bi(e){"@babel/helpers - typeof";return bi=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},bi(e)}function ab(e){return SI(e)||_I(e)||l1(e)||OI()}function OI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _I(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SI(e){if(Array.isArray(e))return Ff(e)}function ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(r),!0).forEach(function(n){Bf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bf(e,t,r){return t=AI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AI(e){var t=PI(e,"string");return bi(t)==="symbol"?t:String(t)}function PI(e,t){if(bi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jI(e,t){return MI(e)||EI(e,t)||l1(e,t)||TI()}function TI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l1(e,t){if(e){if(typeof e=="string")return Ff(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 Ff(e,t)}}function Ff(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 EI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function MI(e){if(Array.isArray(e))return e}var qa=function(t,r,n){return t+(r-t)*n},Wf=function(t){var r=t.from,n=t.to;return r!==n},CI=function e(t,r,n){var i=Gn(function(a,o){if(Wf(o)){var u=t(o.from,o.to,o.velocity),s=jI(u,2),c=s[0],f=s[1];return ke(ke({},o),{},{from:c,velocity:f})}return o},r);return n<1?Gn(function(a,o){return Wf(o)?ke(ke({},o),{},{velocity:qa(o.velocity,i[a].velocity,n),from:qa(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const $I=(function(e,t,r,n,i){var a=sI(e,t),o=a.reduce(function(p,g){return ke(ke({},p),{},Bf({},g,[e[g],t[g]]))},{}),u=a.reduce(function(p,g){return ke(ke({},p),{},Bf({},g,{from:e[g],velocity:0,to:t[g]}))},{}),s=-1,c,f,l=function(){return null},d=function(){return Gn(function(g,x){return x.from},u)},h=function(){return!Object.values(u).filter(Wf).length},y=function(g){c||(c=g);var x=g-c,w=x/r.dt;u=CI(r,u,w),i(ke(ke(ke({},e),t),d())),c=g,h()||(s=requestAnimationFrame(l))},v=function(g){f||(f=g);var x=(g-f)/n,w=Gn(function(m,b){return qa.apply(void 0,ab(b).concat([r(x)]))},o);if(i(ke(ke(ke({},e),t),w)),x<1)s=requestAnimationFrame(l);else{var O=Gn(function(m,b){return qa.apply(void 0,ab(b).concat([r(1)]))},o);i(ke(ke(ke({},e),t),O))}};return l=r.isStepper?y:v,function(){return requestAnimationFrame(l),function(){cancelAnimationFrame(s)}}});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)}var kI=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function NI(e,t){if(e==null)return{};var r=II(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 II(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 Ol(e){return LI(e)||qI(e)||RI(e)||DI()}function DI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RI(e,t){if(e){if(typeof e=="string")return Uf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uf(e,t)}}function qI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LI(e){if(Array.isArray(e))return Uf(e)}function Uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ub(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 st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ub(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bn(e,t,r){return t=f1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FI(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,f1(n.key),n)}}function WI(e,t,r){return t&&FI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f1(e){var t=UI(e,"string");return en(t)==="symbol"?t:String(t)}function UI(e,t){if(en(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function zI(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&&zf(e,t)}function zf(e,t){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zf(e,t)}function HI(e){var t=GI();return function(){var n=La(e),i;if(t){var a=La(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Hf(this,i)}}function Hf(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 Gf(e)}function Gf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GI(){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 La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},La(e)}var xt=(function(e){zI(r,e);var t=HI(r);function r(n,i){var a;BI(this,r),a=t.call(this,n,i);var o=a.props,u=o.isActive,s=o.attributeName,c=o.from,f=o.to,l=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Gf(a)),a.changeStyle=a.changeStyle.bind(Gf(a)),!u||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),Hf(a);if(l&&l.length)a.state={style:l[0].style};else if(c){if(typeof d=="function")return a.state={style:c},Hf(a);a.state={style:s?Bn({},s,c):c}}else a.state={style:{}};return a}return WI(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,u=a.canBegin,s=a.attributeName,c=a.shouldReAnimate,f=a.to,l=a.from,d=this.state.style;if(u){if(!o){var h={style:s?Bn({},s,f):f};this.state&&d&&(s&&d[s]!==f||!s&&d!==f)&&this.setState(h);return}if(!(QN(i.to,f)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||c?l:i.to;if(this.state&&d){var p={style:s?Bn({},s,v):v};(s&&d[s]!==v||!s&&d!==v)&&this.setState(p)}this.runAnimation(st(st({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,u=i.to,s=i.duration,c=i.easing,f=i.begin,l=i.onAnimationEnd,d=i.onAnimationStart,h=$I(o,u,wI(c),s,this.changeStyle),y=function(){a.stopJSAnimation=h()};this.manager.start([d,f,y,s,l])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,u=i.begin,s=i.onAnimationStart,c=o[0],f=c.style,l=c.duration,d=l===void 0?0:l,h=function(v,p,g){if(g===0)return v;var x=p.duration,w=p.easing,O=w===void 0?"ease":w,m=p.style,b=p.properties,_=p.onAnimationEnd,A=g>0?o[g-1]:p,T=b||Object.keys(m);if(typeof O=="function"||O==="spring")return[].concat(Ol(v),[a.runJSAnimation.bind(a,{from:A.style,to:m,duration:x,easing:O}),x]);var $=rb(T,x,O),j=st(st(st({},A.style),m),{},{transition:$});return[].concat(Ol(v),[j,x,_]).filter(cI)};return this.manager.start([s].concat(Ol(o.reduce(h,[f,Math.max(d,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=aI());var a=i.begin,o=i.duration,u=i.attributeName,s=i.to,c=i.easing,f=i.onAnimationStart,l=i.onAnimationEnd,d=i.steps,h=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var v=u?Bn({},u,s):s,p=rb(Object.keys(v),o,c);y.start([f,a,st(st({},v),{},{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 u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=NI(i,kI),c=D.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!u||c===0||o<=0)return a;var l=function(h){var y=h.props,v=y.style,p=v===void 0?{}:v,g=y.className,x=D.cloneElement(h,st(st({},s),{},{style:st(st({},p),f),className:g}));return x};return c===1?l(D.Children.only(a)):P.createElement("div",null,D.Children.map(a,function(d){return l(d)}))}}]),r})(D.PureComponent);xt.displayName="Animate";xt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};xt.propTypes={from:ae.oneOfType([ae.object,ae.string]),to:ae.oneOfType([ae.object,ae.string]),attributeName:ae.string,duration:ae.number,begin:ae.number,easing:ae.oneOfType([ae.string,ae.func]),steps:ae.arrayOf(ae.shape({duration:ae.number.isRequired,style:ae.object.isRequired,easing:ae.oneOfType([ae.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ae.func]),properties:ae.arrayOf("string"),onAnimationEnd:ae.func})),children:ae.oneOfType([ae.node,ae.func]),isActive:ae.bool,canBegin:ae.bool,onAnimationEnd:ae.func,shouldReAnimate:ae.bool,onAnimationStart:ae.func,onAnimationReStart:ae.func};function xi(e){"@babel/helpers - typeof";return xi=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},xi(e)}function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ba.apply(this,arguments)}function KI(e,t){return ZI(e)||XI(e,t)||VI(e,t)||YI()}function YI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VI(e,t){if(e){if(typeof e=="string")return sb(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 sb(e,t)}}function sb(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 XI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function ZI(e){if(Array.isArray(e))return e}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 lb(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){QI(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 QI(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=eD(e,"string");return xi(t)=="symbol"?t:t+""}function eD(e,t){if(xi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fb=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),u=i>=0?1:-1,s=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+u*l[0]),l[0]>0&&(f+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(c,",").concat(t+s*l[0],",").concat(r)),f+="L ".concat(t+n-s*l[1],",").concat(r),l[1]>0&&(f+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(c,`,
|
|
47
|
+
`).concat(t+n,",").concat(r+u*l[1])),f+="L ".concat(t+n,",").concat(r+i-u*l[2]),l[2]>0&&(f+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(c,`,
|
|
48
|
+
`).concat(t+n-s*l[2],",").concat(r+i)),f+="L ".concat(t+s*l[3],",").concat(r+i),l[3]>0&&(f+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(c,`,
|
|
49
|
+
`).concat(t,",").concat(r+i-u*l[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);f="M ".concat(t,",").concat(r+u*y,`
|
|
50
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+s*y,",").concat(r,`
|
|
51
|
+
L `).concat(t+n-s*y,",").concat(r,`
|
|
52
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+n,",").concat(r+u*y,`
|
|
53
|
+
L `).concat(t+n,",").concat(r+i-u*y,`
|
|
54
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+n-s*y,",").concat(r+i,`
|
|
55
|
+
L `).concat(t+s*y,",").concat(r+i,`
|
|
56
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t,",").concat(r+i-u*y," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},tD=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,u=r.width,s=r.height;if(Math.abs(u)>0&&Math.abs(s)>0){var c=Math.min(a,a+u),f=Math.max(a,a+u),l=Math.min(o,o+s),d=Math.max(o,o+s);return n>=c&&n<=f&&i>=l&&i<=d}return!1},rD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dh=function(t){var r=lb(lb({},rD),t),n=D.useRef(),i=D.useState(-1),a=KI(i,2),o=a[0],u=a[1];D.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&u(O)}catch{}},[]);var s=r.x,c=r.y,f=r.width,l=r.height,d=r.radius,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,g=r.isAnimationActive,x=r.isUpdateAnimationActive;if(s!==+s||c!==+c||f!==+f||l!==+l||f===0||l===0)return null;var w=J("recharts-rectangle",h);return x?P.createElement(xt,{canBegin:o>0,from:{width:f,height:l,x:s,y:c},to:{width:f,height:l,x:s,y:c},duration:v,animationEasing:y,isActive:x},function(O){var m=O.width,b=O.height,_=O.x,A=O.y;return P.createElement(xt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:g,easing:y},P.createElement("path",Ba({},G(r,!0),{className:w,d:fb(_,A,m,b,d),ref:n})))}):P.createElement("path",Ba({},G(r,!0),{className:w,d:fb(s,c,f,l,d)}))},nD=["points","className","baseLinePoints","connectNulls"];function Ir(){return Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ir.apply(this,arguments)}function iD(e,t){if(e==null)return{};var r=aD(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 aD(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 db(e){return cD(e)||sD(e)||uD(e)||oD()}function oD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uD(e,t){if(e){if(typeof e=="string")return Kf(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 Kf(e,t)}}function sD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cD(e){if(Array.isArray(e))return Kf(e)}function Kf(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 hb=function(t){return t&&t.x===+t.x&&t.y===+t.y},lD=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){hb(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),hb(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Kn=function(t,r){var n=lD(t);r&&(n=[n.reduce(function(a,o){return[].concat(db(a),db(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,u,s){return"".concat(o).concat(s===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},fD=function(t,r,n){var i=Kn(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Kn(r.reverse(),n).slice(1))},dD=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=iD(t,nD);if(!r||!r.length)return null;var u=J("recharts-polygon",n);if(i&&i.length){var s=o.stroke&&o.stroke!=="none",c=fD(r,i,a);return P.createElement("g",{className:u},P.createElement("path",Ir({},G(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:c})),s?P.createElement("path",Ir({},G(o,!0),{fill:"none",d:Kn(r,a)})):null,s?P.createElement("path",Ir({},G(o,!0),{fill:"none",d:Kn(i,a)})):null)}var f=Kn(r,a);return P.createElement("path",Ir({},G(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:u,d:f}))};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)}var $o=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=J("recharts-dot",a);return r===+r&&n===+n&&i===+i?D.createElement("circle",Yf({},G(t,!1),la(t),{className:o,cx:r,cy:n,r:i})):null};function wi(e){"@babel/helpers - typeof";return wi=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},wi(e)}var hD=["x","y","top","left","width","height","className"];function Vf(){return Vf=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},Vf.apply(this,arguments)}function pb(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 pD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pb(Object(r),!0).forEach(function(n){vD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vD(e,t,r){return t=yD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yD(e){var t=mD(e,"string");return wi(t)=="symbol"?t:t+""}function mD(e,t){if(wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gD(e,t){if(e==null)return{};var r=bD(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 bD(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 xD=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},wD=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,u=o===void 0?0:o,s=t.left,c=s===void 0?0:s,f=t.width,l=f===void 0?0:f,d=t.height,h=d===void 0?0:d,y=t.className,v=gD(t,hD),p=pD({x:n,y:a,top:u,left:c,width:l,height:h},v);return!L(n)||!L(a)||!L(l)||!L(h)||!L(u)||!L(c)?null:P.createElement("path",Vf({},G(p,!0),{className:J("recharts-cross",y),d:xD(n,a,l,h,u,c)}))},_l,vb;function OD(){if(vb)return _l;vb=1;var e=jo(),t=Pw(),r=Ot();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return _l=n,_l}var _D=OD();const SD=se(_D);var Sl,yb;function AD(){if(yb)return Sl;yb=1;var e=jo(),t=Ot(),r=jw();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return Sl=n,Sl}var PD=AD();const jD=se(PD);var TD=["cx","cy","angle","ticks","axisLine"],ED=["ticks","tick","angle","tickFormatter","stroke"];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 Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yn.apply(this,arguments)}function mb(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 nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(n){ko(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gb(e,t){if(e==null)return{};var r=MD(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 MD(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 CD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bb(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,h1(n.key),n)}}function $D(e,t,r){return t&&bb(e.prototype,t),r&&bb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function kD(e,t,r){return t=Fa(t),ND(e,d1()?Reflect.construct(t,r||[],Fa(e).constructor):t.apply(e,r))}function ND(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 ID(e)}function ID(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d1=function(){return!!e})()}function Fa(e){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fa(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&&Xf(e,t)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xf(e,t)}function ko(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=RD(e,"string");return tn(t)=="symbol"?t:t+""}function RD(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)}var No=(function(e){function t(){return CD(this,t),kD(this,t,arguments)}return DD(t,e),$D(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,u=a.cx,s=a.cy;return de(u,s,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,u=n.ticks,s=SD(u,function(f){return f.coordinate||0}),c=jD(u,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:c.coordinate||0,outerRadius:s.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,u=n.ticks,s=n.axisLine,c=gb(n,TD),f=u.reduce(function(y,v){return[Math.min(y[0],v.coordinate),Math.max(y[1],v.coordinate)]},[1/0,-1/0]),l=de(i,a,f[0],o),d=de(i,a,f[1],o),h=nr(nr(nr({},G(c,!1)),{},{fill:"none"},G(s,!1)),{},{x1:l.x,y1:l.y,x2:d.x,y2:d.y});return P.createElement("line",Yn({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,u=i.angle,s=i.tickFormatter,c=i.stroke,f=gb(i,ED),l=this.getTickTextAnchor(),d=G(f,!1),h=G(o,!1),y=a.map(function(v,p){var g=n.getTickValueCoord(v),x=nr(nr(nr(nr({textAnchor:l,transform:"rotate(".concat(90-u,", ").concat(g.x,", ").concat(g.y,")")},d),{},{stroke:"none",fill:c},h),{},{index:p},g),{},{payload:v});return P.createElement(te,Yn({className:J("recharts-polar-radius-axis-tick",t1(o)),key:"tick-".concat(v.coordinate)},mr(n.props,v,p)),t.renderTickItem(o,x,s?s(v.value,p):v.value))});return P.createElement(te,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:P.createElement(te,{className:J("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Ce.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):V(n)?o=n(i):o=P.createElement(gr,Yn({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])})(D.PureComponent);ko(No,"displayName","PolarRadiusAxis");ko(No,"axisType","radiusAxis");ko(No,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",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 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 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 ir(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){Io(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 qD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wb(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,v1(n.key),n)}}function LD(e,t,r){return t&&wb(e.prototype,t),r&&wb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BD(e,t,r){return t=Wa(t),FD(e,p1()?Reflect.construct(t,r||[],Wa(e).constructor):t.apply(e,r))}function FD(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 WD(e)}function WD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p1=function(){return!!e})()}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wa(e)}function UD(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&&Zf(e,t)}function Zf(e,t){return Zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Zf(e,t)}function Io(e,t,r){return t=v1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v1(e){var t=zD(e,"string");return rn(t)=="symbol"?t:t+""}function zD(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)}var HD=Math.PI/180,Ob=1e-5,Do=(function(e){function t(){return qD(this,t),BD(this,t,arguments)}return UD(t,e),LD(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,u=i.radius,s=i.orientation,c=i.tickSize,f=c||8,l=de(a,o,u,n.coordinate),d=de(a,o,u+(s==="inner"?-1:1)*f,n.coordinate);return{x1:l.x,y1:l.y,x2:d.x,y2:d.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*HD),o;return a>Ob?o=i==="outer"?"start":"end":a<-Ob?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,u=n.axisLine,s=n.axisLineType,c=ir(ir({},G(this.props,!1)),{},{fill:"none"},G(u,!1));if(s==="circle")return P.createElement($o,sr({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:o}));var f=this.props.ticks,l=f.map(function(d){return de(i,a,o,d.coordinate)});return P.createElement(dD,sr({className:"recharts-polar-angle-axis-line"},c,{points:l}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,u=i.tickLine,s=i.tickFormatter,c=i.stroke,f=G(this.props,!1),l=G(o,!1),d=ir(ir({},f),{},{fill:"none"},G(u,!1)),h=a.map(function(y,v){var p=n.getTickLineCoord(y),g=n.getTickTextAnchor(y),x=ir(ir(ir({textAnchor:g},f),{},{stroke:"none",fill:c},l),{},{index:v,payload:y,x:p.x2,y:p.y2});return P.createElement(te,sr({className:J("recharts-polar-angle-axis-tick",t1(o)),key:"tick-".concat(y.coordinate)},mr(n.props,y,v)),u&&P.createElement("line",sr({className:"recharts-polar-angle-axis-tick-line"},d,p)),o&&t.renderTickItem(o,x,s?s(y.value,v):y.value))});return P.createElement(te,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:P.createElement(te,{className:J("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):V(n)?o=n(i):o=P.createElement(gr,sr({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])})(D.PureComponent);Io(Do,"displayName","PolarAngleAxis");Io(Do,"axisType","angleAxis");Io(Do,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Al,_b;function GD(){if(_b)return Al;_b=1;var e=Sx(),t=e(Object.getPrototypeOf,Object);return Al=t,Al}var Pl,Sb;function KD(){if(Sb)return Pl;Sb=1;var e=Dt(),t=GD(),r=Rt(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,u=a.hasOwnProperty,s=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=u.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&o.call(d)==s}return Pl=c,Pl}var YD=KD();const VD=se(YD);var jl,Ab;function XD(){if(Ab)return jl;Ab=1;var e=Dt(),t=Rt(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return jl=n,jl}var ZD=XD();const QD=se(ZD);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 Ua(){return Ua=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},Ua.apply(this,arguments)}function JD(e,t){return nR(e)||rR(e,t)||tR(e,t)||eR()}function eR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tR(e,t){if(e){if(typeof e=="string")return Pb(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 Pb(e,t)}}function Pb(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 rR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function nR(e){if(Array.isArray(e))return e}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 Tb(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){iR(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 iR(e,t,r){return t=aR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aR(e){var t=oR(e,"string");return Oi(t)=="symbol"?t:t+""}function oR(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 Eb=function(t,r,n,i,a){var o=n-i,u;return u="M ".concat(t,",").concat(r),u+="L ".concat(t+n,",").concat(r),u+="L ".concat(t+n-o/2,",").concat(r+a),u+="L ".concat(t+n-o/2-i,",").concat(r+a),u+="L ".concat(t,",").concat(r," Z"),u},uR={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sR=function(t){var r=Tb(Tb({},uR),t),n=D.useRef(),i=D.useState(-1),a=JD(i,2),o=a[0],u=a[1];D.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&u(w)}catch{}},[]);var s=r.x,c=r.y,f=r.upperWidth,l=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,g=r.isUpdateAnimationActive;if(s!==+s||c!==+c||f!==+f||l!==+l||d!==+d||f===0&&l===0||d===0)return null;var x=J("recharts-trapezoid",h);return g?P.createElement(xt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:c},to:{upperWidth:f,lowerWidth:l,height:d,x:s,y:c},duration:v,animationEasing:y,isActive:g},function(w){var O=w.upperWidth,m=w.lowerWidth,b=w.height,_=w.x,A=w.y;return P.createElement(xt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},P.createElement("path",Ua({},G(r,!0),{className:x,d:Eb(_,A,O,m,b),ref:n})))}):P.createElement("g",null,P.createElement("path",Ua({},G(r,!0),{className:x,d:Eb(s,c,f,l,d)})))},cR=["option","shapeType","propTransformer","activeClassName","isActive"];function _i(e){"@babel/helpers - typeof";return _i=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},_i(e)}function lR(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}function Mb(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 za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){dR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dR(e,t,r){return t=hR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hR(e){var t=pR(e,"string");return _i(t)=="symbol"?t:t+""}function pR(e,t){if(_i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vR(e,t){return za(za({},t),e)}function yR(e,t){return e==="symbols"}function Cb(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return P.createElement(dh,r);case"trapezoid":return P.createElement(sR,r);case"sector":return P.createElement(i1,r);case"symbols":if(yR(t))return P.createElement(Cd,r);break;default:return null}}function mR(e){return D.isValidElement(e)?e.props:e}function y1(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?vR:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,u=e.isActive,s=lR(e,cR),c;if(D.isValidElement(t))c=D.cloneElement(t,za(za({},s),mR(t)));else if(V(t))c=t(s);else if(VD(t)&&!QD(t)){var f=i(t,s);c=P.createElement(Cb,{shapeType:r,elementProps:f})}else{var l=s;c=P.createElement(Cb,{shapeType:r,elementProps:l})}return u?P.createElement(te,{className:o},c):c}function Ro(e,t){return t!=null&&"trapezoids"in e.props}function qo(e,t){return t!=null&&"sectors"in e.props}function Si(e,t){return t!=null&&"points"in e.props}function gR(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 bR(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function xR(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function wR(e,t){var r;return Ro(e,t)?r=gR:qo(e,t)?r=bR:Si(e,t)&&(r=xR),r}function OR(e,t){var r;return Ro(e,t)?r="trapezoids":qo(e,t)?r="sectors":Si(e,t)&&(r="points"),r}function _R(e,t){if(Ro(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(qo(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 Si(e,t)?t.payload:{}}function SR(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=OR(r,t),a=_R(r,t),o=n.filter(function(s,c){var f=Qr(a,s),l=r.props[i].filter(function(y){var v=wR(r,t);return v(y,t)}),d=r.props[i].indexOf(l[l.length-1]),h=c===d;return f&&h}),u=n.indexOf(o[o.length-1]);return u}var oa;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 Dr(){return Dr=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},Dr.apply(this,arguments)}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 le(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){nt(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 AR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kb(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,g1(n.key),n)}}function PR(e,t,r){return t&&kb(e.prototype,t),r&&kb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jR(e,t,r){return t=Ha(t),TR(e,m1()?Reflect.construct(t,r||[],Ha(e).constructor):t.apply(e,r))}function TR(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 ER(e)}function ER(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m1=function(){return!!e})()}function Ha(e){return Ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ha(e)}function MR(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 nt(e,t,r){return t=g1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g1(e){var t=CR(e,"string");return nn(t)=="symbol"?t:t+""}function CR(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 String(e)}var Lt=(function(e){function t(r){var n;return AR(this,t),n=jR(this,t,[r]),nt(n,"pieRef",null),nt(n,"sectorRefs",[]),nt(n,"id",wn("recharts-pie-")),nt(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),V(i)&&i()}),nt(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),V(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return MR(t,e),PR(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,u=a.labelLine,s=a.dataKey,c=a.valueKey,f=G(this.props,!1),l=G(o,!1),d=G(u,!1),h=o&&o.offsetRadius||20,y=n.map(function(v,p){var g=(v.startAngle+v.endAngle)/2,x=de(v.cx,v.cy,v.outerRadius+h,g),w=le(le(le(le({},f),v),{},{stroke:"none"},l),{},{index:p,textAnchor:t.getTextAnchor(x.x,v.cx)},x),O=le(le(le(le({},f),v),{},{fill:"none",stroke:v.fill},d),{},{index:p,points:[de(v.cx,v.cy,v.outerRadius,g),x]}),m=s;return Z(s)&&Z(c)?m="value":Z(s)&&(m=c),P.createElement(te,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},u&&t.renderLabelLineItem(u,O,"line"),t.renderLabelItem(o,w,je(v,m)))});return P.createElement(te,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,u=a.blendStroke,s=a.inactiveShape;return n.map(function(c,f){if(c?.startAngle===0&&c?.endAngle===0&&n.length!==1)return null;var l=i.isActiveIndex(f),d=s&&i.hasActiveIndex()?s:null,h=l?o:d,y=le(le({},c),{},{stroke:u?c.fill:c.stroke,tabIndex:-1});return P.createElement(te,Dr({ref:function(p){p&&!i.sectorRefs.includes(p)&&i.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},mr(i.props,c,f),{key:"sector-".concat(c?.startAngle,"-").concat(c?.endAngle,"-").concat(c.midAngle,"-").concat(f)}),P.createElement(y1,Dr({option:h,isActive:l,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,u=i.animationBegin,s=i.animationDuration,c=i.animationEasing,f=i.animationId,l=this.state,d=l.prevSectors,h=l.prevIsAnimationActive;return P.createElement(xt,{begin:u,duration:s,isActive:o,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var v=y.t,p=[],g=a&&a[0],x=g.startAngle;return a.forEach(function(w,O){var m=d&&d[O],b=O>0?Qe(w,"paddingAngle",0):0;if(m){var _=ze(m.endAngle-m.startAngle,w.endAngle-w.startAngle),A=le(le({},w),{},{startAngle:x+b,endAngle:x+_(v)+b});p.push(A),x=A.endAngle}else{var T=w.endAngle,$=w.startAngle,j=ze(0,T-$),M=j(v),C=le(le({},w),{},{startAngle:x+b,endAngle:x+M+b});p.push(C),x=C.endAngle}}),P.createElement(te,null,n.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Qr(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,u=i.className,s=i.label,c=i.cx,f=i.cy,l=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!o||!o.length||!L(c)||!L(f)||!L(l)||!L(d))return null;var v=J("recharts-pie",u);return P.createElement(te,{tabIndex:this.props.rootTabIndex,className:v,ref:function(g){n.pieRef=g}},this.renderSectors(),s&&this.renderLabels(o),Ce.renderCallByParent(this.props,null,!1),(!h||y)&&Ct.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(P.isValidElement(n))return P.cloneElement(n,i);if(V(n))return n(i);var o=J("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return P.createElement(Ur,Dr({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(P.isValidElement(n))return P.cloneElement(n,i);var o=a;if(V(n)&&(o=n(i),P.isValidElement(o)))return o;var u=J("recharts-pie-label-text",typeof n!="boolean"&&!V(n)?n.className:"");return P.createElement(gr,Dr({},i,{alignmentBaseline:"middle",className:u}),o)}}])})(D.PureComponent);oa=Lt;nt(Lt,"displayName","Pie");nt(Lt,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!_r.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});nt(Lt,"parseDeltaAngle",function(e,t){var r=Le(t-e),n=Math.min(Math.abs(t-e),360);return r*n});nt(Lt,"getRealPieData",function(e){var t=e.data,r=e.children,n=G(e,!1),i=at(r,xo);return t&&t.length?t.map(function(a,o){return le(le(le({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return le(le({},n),a.props)}):[]});nt(Lt,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,o=e1(i,a),u=n+Be(e.cx,i,i/2),s=r+Be(e.cy,a,a/2),c=Be(e.innerRadius,o,0),f=Be(e.outerRadius,o,o*.8),l=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:u,cy:s,innerRadius:c,outerRadius:f,maxRadius:l}});nt(Lt,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?le(le({},t.type.defaultProps),t.props):t.props,i=oa.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,u=n.endAngle,s=n.paddingAngle,c=n.dataKey,f=n.nameKey,l=n.valueKey,d=n.tooltipType,h=Math.abs(n.minAngle),y=oa.parseCoordinateOfPie(n,r),v=oa.parseDeltaAngle(o,u),p=Math.abs(v),g=c;Z(c)&&Z(l)?(dt(!1,`Use "dataKey" to specify the value of pie,
|
|
59
|
+
the props "valueKey" will be deprecated in 1.1.0`),g="value"):Z(c)&&(dt(!1,`Use "dataKey" to specify the value of pie,
|
|
60
|
+
the props "valueKey" will be deprecated in 1.1.0`),g=l);var x=i.filter(function(A){return je(A,g,0)!==0}).length,w=(p>=360?x:x-1)*s,O=p-x*h-w,m=i.reduce(function(A,T){var $=je(T,g,0);return A+(L($)?$:0)},0),b;if(m>0){var _;b=i.map(function(A,T){var $=je(A,g,0),j=je(A,f,T),M=(L($)?$:0)/m,C;T?C=_.endAngle+Le(v)*s*($!==0?1:0):C=o;var E=C+Le(v)*(($!==0?h:0)+M*O),k=(C+E)/2,I=(y.innerRadius+y.outerRadius)/2,R=[{name:j,value:$,payload:A,dataKey:g,type:d}],B=de(y.cx,y.cy,I,k);return _=le(le(le({percent:M,cornerRadius:a,name:j,tooltipPayload:R,midAngle:k,middleRadius:I,tooltipPosition:B},A),y),{},{value:je(A,g),startAngle:C,endAngle:E,payload:A,paddingAngle:Le(v)*s}),_})}return le(le({},y),{},{sectors:b,data:i})});var Tl,Nb;function $R(){if(Nb)return Tl;Nb=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var u=-1,s=t(e((i-n)/(a||1)),0),c=Array(s);s--;)c[o?s:++u]=n,n+=a;return c}return Tl=r,Tl}var El,Ib;function b1(){if(Ib)return El;Ib=1;var e=Bx(),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 El=n,El}var Ml,Db;function kR(){if(Db)return Ml;Db=1;var e=$R(),t=bo(),r=b1();function n(i){return function(a,o,u){return u&&typeof u!="number"&&t(a,o,u)&&(o=u=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),u=u===void 0?a<o?1:-1:r(u),e(a,o,u,i)}}return Ml=n,Ml}var Cl,Rb;function NR(){if(Rb)return Cl;Rb=1;var e=kR(),t=e();return Cl=t,Cl}var IR=NR();const Ga=se(IR);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 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 Lb(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){x1(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 x1(e,t,r){return t=DR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DR(e){var t=RR(e,"string");return Ai(t)=="symbol"?t:t+""}function RR(e,t){if(Ai(e)!="object"||!e)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)}var qR=["Webkit","Moz","O","ms"],LR=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=qR.reduce(function(a,o){return Lb(Lb({},a),{},x1({},o+n,r))},{});return i[t]=r,i};function an(e){"@babel/helpers - typeof";return an=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},an(e)}function Ka(){return Ka=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},Ka.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 $l(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){Ye(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 BR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fb(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,O1(n.key),n)}}function FR(e,t,r){return t&&Fb(e.prototype,t),r&&Fb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WR(e,t,r){return t=Ya(t),UR(e,w1()?Reflect.construct(t,r||[],Ya(e).constructor):t.apply(e,r))}function UR(e,t){if(t&&(an(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zR(e)}function zR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w1=function(){return!!e})()}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ya(e)}function HR(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&&Jf(e,t)}function Jf(e,t){return Jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Jf(e,t)}function Ye(e,t,r){return t=O1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O1(e){var t=GR(e,"string");return an(t)=="symbol"?t:t+""}function GR(e,t){if(an(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(an(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KR=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,u=t.travellerWidth;if(!r||!r.length)return{};var s=r.length,c=zn().domain(Ga(0,s)).range([a,a+o-u]),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}},Wb=function(t){return t.changedTouches&&!!t.changedTouches.length},on=(function(e){function t(r){var n;return BR(this,t),n=WR(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,u=i.startIndex;o?.({endIndex:a,startIndex:u})}),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=Wb(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 HR(t,e),FR(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,u=this.props,s=u.gap,c=u.data,f=c.length-1,l=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,l),y=t.getIndexInRange(o,d);return{startIndex:h-h%s,endIndex:y===f?f:y-y%s}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,u=i.dataKey,s=je(a[n],u,n);return V(o)?o(s,n):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,u=i.endX,s=this.props,c=s.x,f=s.width,l=s.travellerWidth,d=s.startIndex,h=s.endIndex,y=s.onChange,v=n.pageX-a;v>0?v=Math.min(v,c+f-l-u,c+f-l-o):v<0&&(v=Math.max(v,c-o,c-u));var p=this.getIndex({startX:o+v,endX:u+v});(p.startIndex!==d||p.endIndex!==h)&&y&&y(p),this.setState({startX:o+v,endX:u+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=Wb(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,u=i.endX,s=i.startX,c=this.state[o],f=this.props,l=f.x,d=f.width,h=f.travellerWidth,y=f.onChange,v=f.gap,p=f.data,g={startX:this.state.startX,endX:this.state.endX},x=n.pageX-a;x>0?x=Math.min(x,l+d-h-c):x<0&&(x=Math.max(x,l-c)),g[o]=c+x;var w=this.getIndex(g),O=w.startIndex,m=w.endIndex,b=function(){var A=p.length-1;return o==="startX"&&(u>s?O%v===0:m%v===0)||u<s&&m===A||o==="endX"&&(u>s?m%v===0:O%v===0)||u>s&&m===A};this.setState(Ye(Ye({},o,c+x),"brushMoveStartX",n.pageX),function(){y&&b()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,u=o.scaleValues,s=o.startX,c=o.endX,f=this.state[i],l=u.indexOf(f);if(l!==-1){var d=l+n;if(!(d===-1||d>=u.length)){var h=u[d];i==="startX"&&h>=c||i==="endX"&&h<=s||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,u=n.height,s=n.fill,c=n.stroke;return P.createElement("rect",{stroke:c,fill:s,x:i,y:a,width:o,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,u=n.height,s=n.data,c=n.children,f=n.padding,l=D.Children.only(c);return l?P.cloneElement(l,{x:i,y:a,width:o,height:u,margin:f,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,u=this,s=this.props,c=s.y,f=s.travellerWidth,l=s.height,d=s.traveller,h=s.ariaLabel,y=s.data,v=s.startIndex,p=s.endIndex,g=Math.max(n,this.props.x),x=$l($l({},G(this.props,!1)),{},{x:g,y:c,width:f,height:l}),w=h||"Min value: ".concat((a=y[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return P.createElement(te,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),u.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,x))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,u=a.height,s=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:s,fillOpacity:.2,x:f,y:o,width:l,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,u=n.height,s=n.travellerWidth,c=n.stroke,f=this.state,l=f.startX,d=f.endX,h=5,y={pointerEvents:"none",fill:c};return P.createElement(te,{className:"recharts-brush-texts"},P.createElement(gr,Ka({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,d)-h,y:o+u/2},y),this.getTextOfTick(i)),P.createElement(gr,Ka({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,d)+s+h,y:o+u/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,u=n.x,s=n.y,c=n.width,f=n.height,l=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,g=d.isTravellerMoving,x=d.isTravellerFocused;if(!i||!i.length||!L(u)||!L(s)||!L(c)||!L(f)||c<=0||f<=0)return null;var w=J("recharts-brush",a),O=P.Children.count(o)===1,m=LR("userSelect","none");return P.createElement(te,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||g||x||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,u=n.height,s=n.stroke,c=Math.floor(a+u/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:i,y:a,width:o,height:u,fill:s,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):V(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,u=n.x,s=n.travellerWidth,c=n.updateId,f=n.startIndex,l=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return $l({prevData:a,prevTravellerWidth:s,prevUpdateId:c,prevX:u,prevWidth:o},a&&a.length?KR({data:a,width:o,x:u,travellerWidth:s,startIndex:f,endIndex:l}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||u!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([u,u+o-s]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:s,prevUpdateId:c,prevX:u,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,u=a-1;u-o>1;){var s=Math.floor((o+u)/2);n[s]>i?u=s:o=s}return i>=n[u]?u:o}}])})(D.PureComponent);Ye(on,"displayName","Brush");Ye(on,"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 kl,Ub;function YR(){if(Ub)return kl;Ub=1;var e=qd();function t(r,n){var i;return e(r,function(a,o,u){return i=n(a,o,u),!i}),!!i}return kl=t,kl}var Nl,zb;function VR(){if(zb)return Nl;zb=1;var e=mx(),t=Ot(),r=YR(),n=Ge(),i=bo();function a(o,u,s){var c=n(o)?e:r;return s&&i(o,u,s)&&(u=void 0),c(o,t(u,3))}return Nl=a,Nl}var XR=VR();const ZR=se(XR);var mt=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Il,Hb;function QR(){if(Hb)return Il;Hb=1;var e=Ix();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Il=t,Il}var Dl,Gb;function JR(){if(Gb)return Dl;Gb=1;var e=QR(),t=kx(),r=Ot();function n(i,a){var o={};return a=r(a,3),t(i,function(u,s,c){e(o,s,a(u,s,c))}),o}return Dl=n,Dl}var e2=JR();const t2=se(e2);var Rl,Kb;function r2(){if(Kb)return Rl;Kb=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 Rl=e,Rl}var ql,Yb;function n2(){if(Yb)return ql;Yb=1;var e=qd();function t(r,n){var i=!0;return e(r,function(a,o,u){return i=!!n(a,o,u),i}),i}return ql=t,ql}var Ll,Vb;function i2(){if(Vb)return Ll;Vb=1;var e=r2(),t=n2(),r=Ot(),n=Ge(),i=bo();function a(o,u,s){var c=n(o)?e:t;return s&&i(o,u,s)&&(u=void 0),c(o,r(u,3))}return Ll=a,Ll}var a2=i2();const _1=se(a2);var o2=["x","y"];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 ed(){return ed=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},ed.apply(this,arguments)}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 Rn(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){u2(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 u2(e,t,r){return t=s2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s2(e){var t=c2(e,"string");return Pi(t)=="symbol"?t:t+""}function c2(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 l2(e,t){if(e==null)return{};var r=f2(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 f2(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 d2(e,t){var r=e.x,n=e.y,i=l2(e,o2),a="".concat(r),o=parseInt(a,10),u="".concat(n),s=parseInt(u,10),c="".concat(t.height||i.height),f=parseInt(c,10),l="".concat(t.width||i.width),d=parseInt(l,10);return Rn(Rn(Rn(Rn(Rn({},t),i),o?{x:o}:{}),s?{y:s}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function Zb(e){return P.createElement(y1,ed({shapeType:"rectangle",propTransformer:d2,activeClassName:"recharts-active-bar"},e))}var h2=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=L(n)||DS(n);return a?t(n,i):(a||xr(),r)}},p2=["value","background"],S1;function un(e){"@babel/helpers - typeof";return un=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},un(e)}function v2(e,t){if(e==null)return{};var r=y2(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 y2(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(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Va.apply(this,arguments)}function 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 be(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){Kt(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 m2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jb(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,P1(n.key),n)}}function g2(e,t,r){return t&&Jb(e.prototype,t),r&&Jb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b2(e,t,r){return t=Xa(t),x2(e,A1()?Reflect.construct(t,r||[],Xa(e).constructor):t.apply(e,r))}function x2(e,t){if(t&&(un(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w2(e)}function w2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A1=function(){return!!e})()}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xa(e)}function O2(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&&td(e,t)}function td(e,t){return td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},td(e,t)}function Kt(e,t,r){return t=P1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P1(e){var t=_2(e,"string");return un(t)=="symbol"?t:t+""}function _2(e,t){if(un(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Li=(function(e){function t(){var r;m2(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=b2(this,t,[].concat(i)),Kt(r,"state",{isAnimationFinished:!1}),Kt(r,"id",wn("recharts-bar-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return O2(t,e),g2(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,u=a.dataKey,s=a.activeIndex,c=a.activeBar,f=G(this.props,!1);return n&&n.map(function(l,d){var h=d===s,y=h?c:o,v=be(be(be({},f),l),{},{isActive:h,option:y,index:d,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return P.createElement(te,Va({className:"recharts-bar-rectangle"},mr(i.props,l,d),{key:"rectangle-".concat(l?.x,"-").concat(l?.y,"-").concat(l?.value,"-").concat(d)}),P.createElement(Zb,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,u=i.isAnimationActive,s=i.animationBegin,c=i.animationDuration,f=i.animationEasing,l=i.animationId,d=this.state.prevData;return P.createElement(xt,{begin:s,duration:c,isActive:u,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,v=a.map(function(p,g){var x=d&&d[g];if(x){var w=ze(x.x,p.x),O=ze(x.y,p.y),m=ze(x.width,p.width),b=ze(x.height,p.height);return be(be({},p),{},{x:w(y),y:O(y),width:m(y),height:b(y)})}if(o==="horizontal"){var _=ze(0,p.height),A=_(y);return be(be({},p),{},{y:p.y+p.height-A,height:A})}var T=ze(0,p.width),$=T(y);return be(be({},p),{},{width:$})});return P.createElement(te,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Qr(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,u=i.activeIndex,s=G(this.props.background,!1);return a.map(function(c,f){c.value;var l=c.background,d=v2(c,p2);if(!l)return null;var h=be(be(be(be(be({},d),{},{fill:"#eee"},l),s),mr(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return P.createElement(Zb,Va({key:"background-bar-".concat(f),option:n.props.background,isActive:f===u},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,u=a.xAxis,s=a.yAxis,c=a.layout,f=a.children,l=at(f,Co);if(!l)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(p,g){var x=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:x,errorVal:je(p,g)}},y={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(te,y,l.map(function(v){return P.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:u,yAxis:s,layout:c,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,u=n.xAxis,s=n.yAxis,c=n.left,f=n.top,l=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(i||!a||!a.length)return null;var p=this.state.isAnimationFinished,g=J("recharts-bar",o),x=u&&u.allowDataOverflow,w=s&&s.allowDataOverflow,O=x||w,m=Z(v)?this.id:v;return P.createElement(te,{className:g},x||w?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(m)},P.createElement("rect",{x:x?c:c-l/2,y:w?f:f-d/2,width:x?l:l*2,height:w?d:d*2}))):null,P.createElement(te,{className:"recharts-bar-rectangles",clipPath:O?"url(#clipPath-".concat(m,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(O,m),(!h||p)&&Ct.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}}])})(D.PureComponent);S1=Li;Kt(Li,"displayName","Bar");Kt(Li,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!_r.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Kt(Li,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,u=e.xAxisTicks,s=e.yAxisTicks,c=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,h=Z$(n,r);if(!h)return null;var y=t.layout,v=r.type.defaultProps,p=v!==void 0?be(be({},v),r.props):r.props,g=p.dataKey,x=p.children,w=p.minPointSize,O=y==="horizontal"?o:a,m=c?O.scale.domain():null,b=ik({numericAxis:O}),_=at(x,xo),A=l.map(function(T,$){var j,M,C,E,k,I;c?j=Q$(c[f+$],m):(j=je(T,g),Array.isArray(j)||(j=[b,j]));var R=h2(w,S1.defaultProps.minPointSize)(j[1],$);if(y==="horizontal"){var B,F=[o.scale(j[0]),o.scale(j[1])],H=F[0],Y=F[1];M=Sg({axis:a,ticks:u,bandSize:i,offset:h.offset,entry:T,index:$}),C=(B=Y??H)!==null&&B!==void 0?B:void 0,E=h.size;var U=H-Y;if(k=Number.isNaN(U)?0:U,I={x:M,y:o.y,width:E,height:o.height},Math.abs(R)>0&&Math.abs(k)<Math.abs(R)){var X=Le(k||R)*(Math.abs(R)-Math.abs(k));C-=X,k+=X}}else{var he=[a.scale(j[0]),a.scale(j[1])],ge=he[0],Ke=he[1];if(M=ge,C=Sg({axis:o,ticks:s,bandSize:i,offset:h.offset,entry:T,index:$}),E=Ke-ge,k=h.size,I={x:a.x,y:C,width:a.width,height:k},Math.abs(R)>0&&Math.abs(E)<Math.abs(R)){var Jt=Le(E||R)*(Math.abs(R)-Math.abs(E));E+=Jt}}return be(be(be({},T),{},{x:M,y:C,width:E,height:k,value:c?j:j[1],payload:T,background:I},_&&_[$]&&_[$].props),{},{tooltipPayload:[Qw(r,T)],tooltipPosition:{x:M+E/2,y:C+k/2}})});return be({data:A,layout:y},d)});function ji(e){"@babel/helpers - typeof";return ji=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},ji(e)}function S2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e0(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,j1(n.key),n)}}function A2(e,t,r){return t&&e0(e.prototype,t),r&&e0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function t0(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 lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t0(Object(r),!0).forEach(function(n){Lo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lo(e,t,r){return t=j1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j1(e){var t=P2(e,"string");return ji(t)=="symbol"?t:t+""}function P2(e,t){if(ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j2=function(t,r,n,i,a){var o=t.width,u=t.height,s=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:u-n.bottom,bottomMirror:u-n.bottom},d=!!Ve(c,Li);return f.reduce(function(h,y){var v=r[y],p=v.orientation,g=v.domain,x=v.padding,w=x===void 0?{}:x,O=v.mirror,m=v.reversed,b="".concat(p).concat(O?"Mirror":""),_,A,T,$,j;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var M=g[1]-g[0],C=1/0,E=v.categoricalDomain.sort(LS);if(E.forEach(function(he,ge){ge>0&&(C=Math.min((he||0)-(E[ge-1]||0),C))}),Number.isFinite(C)){var k=C/M,I=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(_=k*I/2),v.padding==="no-gap"){var R=Be(t.barCategoryGap,k*I),B=k*I/2;_=B-R-(B-R)/I*R}}}i==="xAxis"?A=[n.left+(w.left||0)+(_||0),n.left+n.width-(w.right||0)-(_||0)]:i==="yAxis"?A=s==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(_||0),n.top+n.height-(w.bottom||0)-(_||0)]:A=v.range,m&&(A=[A[1],A[0]]);var F=Yw(v,a,d),H=F.scale,Y=F.realScaleType;H.domain(g).range(A),Vw(H);var U=Xw(H,lt(lt({},v),{},{realScaleType:Y}));i==="xAxis"?(j=p==="top"&&!O||p==="bottom"&&O,T=n.left,$=l[b]-j*v.height):i==="yAxis"&&(j=p==="left"&&!O||p==="right"&&O,T=l[b]-j*v.width,$=n.top);var X=lt(lt(lt({},v),U),{},{realScaleType:Y,x:T,y:$,scale:H,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return X.bandSize=Na(X,U),!v.hide&&i==="xAxis"?l[b]+=(j?-1:1)*X.height:v.hide||(l[b]+=(j?-1:1)*X.width),lt(lt({},h),{},Lo({},y,X))},{})},T1=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)}},T2=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return T1({x:r,y:n},{x:i,y:a})},E1=(function(){function e(t){S2(this,e),this.scale=t}return A2(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}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)}}])})();Lo(E1,"EPS",1e-4);var hh=function(t){var r=Object.keys(t).reduce(function(n,i){return lt(lt({},n),{},Lo({},i,E1.create(t[i])))},{});return lt(lt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,u=a.position;return t2(i,function(s,c){return r[c].apply(s,{bandAware:o,position:u})})},isInRange:function(i){return _1(i,function(a,o){return r[o].isInRange(a)})}})};function E2(e){return(e%180+180)%180}var M2=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=E2(i),o=a*Math.PI/180,u=Math.atan(n/r),s=o>u&&o<Math.PI-u?n/Math.sin(o):r/Math.cos(o);return Math.abs(s)},Bl,r0;function C2(){if(r0)return Bl;r0=1;var e=Ot(),t=Ni(),r=mo();function n(i){return function(a,o,u){var s=Object(a);if(!t(a)){var c=e(o,3);a=r(a),o=function(l){return c(s[l],l,s)}}var f=i(a,o,u);return f>-1?s[c?a[f]:f]:void 0}}return Bl=n,Bl}var Fl,n0;function $2(){if(n0)return Fl;n0=1;var e=b1();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Fl=t,Fl}var Wl,i0;function k2(){if(i0)return Wl;i0=1;var e=Tx(),t=Ot(),r=$2(),n=Math.max;function i(a,o,u){var s=a==null?0:a.length;if(!s)return-1;var c=u==null?0:r(u);return c<0&&(c=n(s+c,0)),e(a,t(o,3),c)}return Wl=i,Wl}var Ul,a0;function N2(){if(a0)return Ul;a0=1;var e=C2(),t=k2(),r=e(t);return Ul=r,Ul}var I2=N2();const D2=se(I2);var R2=z0();const q2=se(R2);var L2=q2(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("")}),ph=D.createContext(void 0),vh=D.createContext(void 0),M1=D.createContext(void 0),C1=D.createContext({}),$1=D.createContext(void 0),k1=D.createContext(0),N1=D.createContext(0),o0=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,u=t.children,s=t.width,c=t.height,f=L2(a);return P.createElement(ph.Provider,{value:n},P.createElement(vh.Provider,{value:i},P.createElement(C1.Provider,{value:a},P.createElement(M1.Provider,{value:f},P.createElement($1.Provider,{value:o},P.createElement(k1.Provider,{value:c},P.createElement(N1.Provider,{value:s},u)))))))},B2=function(){return D.useContext($1)},I1=function(t){var r=D.useContext(ph);r==null&&xr();var n=r[t];return n==null&&xr(),n},F2=function(){var t=D.useContext(ph);return Ht(t)},W2=function(){var t=D.useContext(vh),r=D2(t,function(n){return _1(n.domain,Number.isFinite)});return r||Ht(t)},D1=function(t){var r=D.useContext(vh);r==null&&xr();var n=r[t];return n==null&&xr(),n},U2=function(){var t=D.useContext(M1);return t},z2=function(){return D.useContext(C1)},yh=function(){return D.useContext(N1)},mh=function(){return D.useContext(k1)};function sn(e){"@babel/helpers - typeof";return sn=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},sn(e)}function H2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G2(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,q1(n.key),n)}}function K2(e,t,r){return t&&G2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y2(e,t,r){return t=Za(t),V2(e,R1()?Reflect.construct(t,r||[],Za(e).constructor):t.apply(e,r))}function V2(e,t){if(t&&(sn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X2(e)}function X2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R1=function(){return!!e})()}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Za(e)}function Z2(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&&rd(e,t)}function rd(e,t){return rd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rd(e,t)}function u0(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 s0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u0(Object(r),!0).forEach(function(n){gh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gh(e,t,r){return t=q1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q1(e){var t=Q2(e,"string");return sn(t)=="symbol"?t:t+""}function Q2(e,t){if(sn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function J2(e,t){return nq(e)||rq(e,t)||tq(e,t)||eq()}function eq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tq(e,t){if(e){if(typeof e=="string")return c0(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 c0(e,t)}}function c0(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 rq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function nq(e){if(Array.isArray(e))return e}function nd(){return nd=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},nd.apply(this,arguments)}var iq=function(t,r){var n;return P.isValidElement(t)?n=P.cloneElement(t,r):V(t)?n=t(r):n=P.createElement("line",nd({},r,{className:"recharts-reference-line-line"})),n},aq=function(t,r,n,i,a,o,u,s,c){var f=a.x,l=a.y,d=a.width,h=a.height;if(n){var y=c.y,v=t.y.apply(y,{position:o});if(mt(c,"discard")&&!t.y.isInRange(v))return null;var p=[{x:f+d,y:v},{x:f,y:v}];return s==="left"?p.reverse():p}if(r){var g=c.x,x=t.x.apply(g,{position:o});if(mt(c,"discard")&&!t.x.isInRange(x))return null;var w=[{x,y:l+h},{x,y:l}];return u==="top"?w.reverse():w}if(i){var O=c.segment,m=O.map(function(b){return t.apply(b,{position:o})});return mt(c,"discard")&&ZR(m,function(b){return!t.isInRange(b)})?null:m}return null};function oq(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,u=e.className,s=e.alwaysShow,c=B2(),f=I1(i),l=D1(a),d=U2();if(!c||!d)return null;dt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=hh({x:f.scale,y:l.scale}),y=Te(t),v=Te(r),p=n&&n.length===2,g=aq(h,y,v,p,d,e.position,f.orientation,l.orientation,e);if(!g)return null;var x=J2(g,2),w=x[0],O=w.x,m=w.y,b=x[1],_=b.x,A=b.y,T=mt(e,"hidden")?"url(#".concat(c,")"):void 0,$=s0(s0({clipPath:T},G(e,!0)),{},{x1:O,y1:m,x2:_,y2:A});return P.createElement(te,{className:J("recharts-reference-line",u)},iq(o,$),Ce.renderCallByParent(e,T2({x1:O,y1:m,x2:_,y2:A})))}var bh=(function(e){function t(){return H2(this,t),Y2(this,t,arguments)}return Z2(t,e),K2(t,[{key:"render",value:function(){return P.createElement(oq,this.props)}}])})(P.Component);gh(bh,"displayName","ReferenceLine");gh(bh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function id(){return id=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},id.apply(this,arguments)}function cn(e){"@babel/helpers - typeof";return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(e)}function l0(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 f0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(r),!0).forEach(function(n){Bo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sq(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,B1(n.key),n)}}function cq(e,t,r){return t&&sq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lq(e,t,r){return t=Qa(t),fq(e,L1()?Reflect.construct(t,r||[],Qa(e).constructor):t.apply(e,r))}function fq(e,t){if(t&&(cn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dq(e)}function dq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L1=function(){return!!e})()}function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qa(e)}function hq(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&&ad(e,t)}function ad(e,t){return ad=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ad(e,t)}function Bo(e,t,r){return t=B1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B1(e){var t=pq(e,"string");return cn(t)=="symbol"?t:t+""}function pq(e,t){if(cn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vq=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=hh({x:i.scale,y:a.scale}),u=o.apply({x:r,y:n},{bandAware:!0});return mt(t,"discard")&&!o.isInRange(u)?null:u},Fo=(function(e){function t(){return uq(this,t),lq(this,t,arguments)}return hq(t,e),cq(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,u=n.alwaysShow,s=n.clipPathId,c=Te(i),f=Te(a);if(dt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var l=vq(this.props);if(!l)return null;var d=l.x,h=l.y,y=this.props,v=y.shape,p=y.className,g=mt(this.props,"hidden")?"url(#".concat(s,")"):void 0,x=f0(f0({clipPath:g},G(this.props,!0)),{},{cx:d,cy:h});return P.createElement(te,{className:J("recharts-reference-dot",p)},t.renderDot(v,x),Ce.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])})(P.Component);Bo(Fo,"displayName","ReferenceDot");Bo(Fo,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Bo(Fo,"renderDot",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):V(e)?r=e(t):r=P.createElement($o,id({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function od(){return od=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},od.apply(this,arguments)}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 d0(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 h0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d0(Object(r),!0).forEach(function(n){Wo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mq(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,W1(n.key),n)}}function gq(e,t,r){return t&&mq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bq(e,t,r){return t=Ja(t),xq(e,F1()?Reflect.construct(t,r||[],Ja(e).constructor):t.apply(e,r))}function xq(e,t){if(t&&(ln(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wq(e)}function wq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F1=function(){return!!e})()}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ja(e)}function Oq(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&&ud(e,t)}function ud(e,t){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ud(e,t)}function Wo(e,t,r){return t=W1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W1(e){var t=_q(e,"string");return ln(t)=="symbol"?t:t+""}function _q(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 String(e)}var Sq=function(t,r,n,i,a){var o=a.x1,u=a.x2,s=a.y1,c=a.y2,f=a.xAxis,l=a.yAxis;if(!f||!l)return null;var d=hh({x:f.scale,y:l.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(u,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(c,{position:"end"}):d.y.rangeMax};return mt(a,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:T1(h,y)},Uo=(function(e){function t(){return yq(this,t),bq(this,t,arguments)}return Oq(t,e),gq(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,u=n.y2,s=n.className,c=n.alwaysShow,f=n.clipPathId;dt(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=Te(i),d=Te(a),h=Te(o),y=Te(u),v=this.props.shape;if(!l&&!d&&!h&&!y&&!v)return null;var p=Sq(l,d,h,y,this.props);if(!p&&!v)return null;var g=mt(this.props,"hidden")?"url(#".concat(f,")"):void 0;return P.createElement(te,{className:J("recharts-reference-area",s)},t.renderRect(v,h0(h0({clipPath:g},G(this.props,!0)),p)),Ce.renderCallByParent(this.props,p))}}])})(P.Component);Wo(Uo,"displayName","ReferenceArea");Wo(Uo,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Wo(Uo,"renderRect",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):V(e)?r=e(t):r=P.createElement(dh,od({},t,{className:"recharts-reference-area-rect"})),r});function U1(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 Aq(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return M2(n,r)}function Pq(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,u=e.height;return t===1?{start:n?i:a,end:n?i+o:a+u}:{start:n?i+o:a+u,end:n?i:a}}function eo(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 jq(e,t){return U1(e,t+1)}function Tq(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,u=t.end,s=0,c=1,f=o,l=function(){var y=n?.[s];if(y===void 0)return{v:U1(n,c)};var v=s,p,g=function(){return p===void 0&&(p=r(y,v)),p},x=y.coordinate,w=s===0||eo(e,x,g,f,u);w||(s=0,f=o,c+=1),w&&(f=x+e*(g()/2+i),s+=c)},d;c<=a.length;)if(d=l(),d)return d.v;return[]}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)}function p0(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?p0(Object(r),!0).forEach(function(n){Eq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eq(e,t,r){return t=Mq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mq(e){var t=Cq(e,"string");return Ti(t)=="symbol"?t:t+""}function Cq(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 $q(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,u=t.start,s=t.end,c=function(d){var h=a[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=e*(h.coordinate+e*v()/2-s);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 g=eo(e,h.tickCoord,v,u,s);g&&(s=h.tickCoord-e*(v()/2+i),a[d]=Ne(Ne({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return a}function kq(e,t,r,n,i,a){var o=(n||[]).slice(),u=o.length,s=t.start,c=t.end;if(a){var f=n[u-1],l=r(f,u-1),d=e*(f.coordinate+e*l/2-c);o[u-1]=f=Ne(Ne({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=eo(e,f.tickCoord,function(){return l},s,c);h&&(c=f.tickCoord-e*(l/2+i),o[u-1]=Ne(Ne({},f),{},{isShow:!0}))}for(var y=a?u-1:u,v=function(x){var w=o[x],O,m=function(){return O===void 0&&(O=r(w,x)),O};if(x===0){var b=e*(w.coordinate-e*m()/2-s);o[x]=w=Ne(Ne({},w),{},{tickCoord:b<0?w.coordinate-b*e:w.coordinate})}else o[x]=w=Ne(Ne({},w),{},{tickCoord:w.coordinate});var _=eo(e,w.tickCoord,m,s,c);_&&(s=w.tickCoord+e*(m()/2+i),o[x]=Ne(Ne({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function xh(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,u=e.orientation,s=e.interval,c=e.tickFormatter,f=e.unit,l=e.angle;if(!i||!i.length||!n)return[];if(L(s)||_r.isSsr)return jq(i,typeof s=="number"&&L(s)?s:0);var d=[],h=u==="top"||u==="bottom"?"width":"height",y=f&&h==="width"?Un(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(w,O){var m=V(c)?c(w.value,O):w.value;return h==="width"?Aq(Un(m,{fontSize:t,letterSpacing:r}),y,l):Un(m,{fontSize:t,letterSpacing:r})[h]},p=i.length>=2?Le(i[1].coordinate-i[0].coordinate):1,g=Pq(a,p,h);return s==="equidistantPreserveStart"?Tq(p,g,v,i,o):(s==="preserveStart"||s==="preserveStartEnd"?d=kq(p,g,v,i,o,s==="preserveStartEnd"):d=$q(p,g,v,i,o),d.filter(function(x){return x.isShow}))}var Nq=["viewBox"],Iq=["viewBox"],Dq=["ticks"];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 Rr(){return Rr=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},Rr.apply(this,arguments)}function v0(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?v0(Object(r),!0).forEach(function(n){wh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zl(e,t){if(e==null)return{};var r=Rq(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 Rq(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 qq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y0(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,H1(n.key),n)}}function Lq(e,t,r){return t&&y0(e.prototype,t),r&&y0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bq(e,t,r){return t=to(t),Fq(e,z1()?Reflect.construct(t,r||[],to(e).constructor):t.apply(e,r))}function Fq(e,t){if(t&&(fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wq(e)}function Wq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z1=function(){return!!e})()}function to(e){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},to(e)}function Uq(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&&sd(e,t)}function sd(e,t){return sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},sd(e,t)}function wh(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=zq(e,"string");return fn(t)=="symbol"?t:t+""}function zq(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 String(e)}var Pn=(function(e){function t(r){var n;return qq(this,t),n=Bq(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Uq(t,e),Lq(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=zl(n,Nq),u=this.props,s=u.viewBox,c=zl(u,Iq);return!Lr(a,s)||!Lr(o,c)||!Lr(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,u=i.width,s=i.height,c=i.orientation,f=i.tickSize,l=i.mirror,d=i.tickMargin,h,y,v,p,g,x,w=l?-1:1,O=n.tickSize||f,m=L(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=y=n.coordinate,p=o+ +!l*s,v=p-w*O,x=v-w*d,g=m;break;case"left":v=p=n.coordinate,y=a+ +!l*u,h=y-w*O,g=h-w*d,x=m;break;case"right":v=p=n.coordinate,y=a+ +l*u,h=y+w*O,g=h+w*d,x=m;break;default:h=y=n.coordinate,p=o+ +l*s,v=p+w*O,x=v+w*d,g=m;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x:g,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,u=n.height,s=n.orientation,c=n.mirror,f=n.axisLine,l=Ae(Ae(Ae({},G(this.props,!1)),G(f,!1)),{},{fill:"none"});if(s==="top"||s==="bottom"){var d=+(s==="top"&&!c||s==="bottom"&&c);l=Ae(Ae({},l),{},{x1:i,y1:a+d*u,x2:i+o,y2:a+d*u})}else{var h=+(s==="left"&&!c||s==="right"&&c);l=Ae(Ae({},l),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+u})}return P.createElement("line",Rr({},l,{className:J("recharts-cartesian-axis-line",Qe(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,u=this.props,s=u.tickLine,c=u.stroke,f=u.tick,l=u.tickFormatter,d=u.unit,h=xh(Ae(Ae({},this.props),{},{ticks:n}),i,a),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=G(this.props,!1),g=G(f,!1),x=Ae(Ae({},p),{},{fill:"none"},G(s,!1)),w=h.map(function(O,m){var b=o.getTickLineCoord(O),_=b.line,A=b.tick,T=Ae(Ae(Ae(Ae({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:c},g),A),{},{index:m,payload:O,visibleTicksCount:h.length,tickFormatter:l});return P.createElement(te,Rr({className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},mr(o.props,O,m)),s&&P.createElement("line",Rr({},x,_,{className:J("recharts-cartesian-axis-tick-line",Qe(s,"className"))})),f&&t.renderTickItem(f,T,"".concat(V(l)?l(O.value,m):O.value).concat(d||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,u=i.height,s=i.ticksGenerator,c=i.className,f=i.hide;if(f)return null;var l=this.props,d=l.ticks,h=zl(l,Dq),y=d;return V(s)&&(y=d&&d.length>0?s(this.props):s(h)),o<=0||u<=0||!y||!y.length?null:P.createElement(te,{className:J("recharts-cartesian-axis",c),ref:function(p){n.layerReference=p}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Ce.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,u=J(i.className,"recharts-cartesian-axis-tick-value");return P.isValidElement(n)?o=P.cloneElement(n,Ae(Ae({},i),{},{className:u})):V(n)?o=n(Ae(Ae({},i),{},{className:u})):o=P.createElement(gr,Rr({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(D.Component);wh(Pn,"displayName","CartesianAxis");wh(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 Hq=["x1","y1","x2","y2","key"],Gq=["offset"];function wr(e){"@babel/helpers - typeof";return wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(e)}function m0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m0(Object(r),!0).forEach(function(n){Kq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kq(e,t,r){return t=Yq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yq(e){var t=Vq(e,"string");return wr(t)=="symbol"?t:t+""}function Vq(e,t){if(wr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dr(){return dr=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},dr.apply(this,arguments)}function g0(e,t){if(e==null)return{};var r=Xq(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 Xq(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 Zq=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,u=t.height,s=t.ry;return P.createElement("rect",{x:i,y:a,ry:s,width:o,height:u,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function G1(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(V(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,u=t.key,s=g0(t,Hq),c=G(s,!1);c.offset;var f=g0(c,Gq);r=P.createElement("line",dr({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:u}))}return r}function Qq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(u,s){var c=Ie(Ie({},e),{},{x1:t,y1:u,x2:t+r,y2:u,key:"line-".concat(s),index:s});return G1(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Jq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(u,s){var c=Ie(Ie({},e),{},{x1:u,y1:t,x2:u,y2:t+r,key:"line-".concat(s),index:s});return G1(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function eL(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,u=e.horizontalPoints,s=e.horizontal,c=s===void 0?!0:s;if(!c||!t||!t.length)return null;var f=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?i+o-d:f[h+1]-d;if(v<=0)return null;var p=h%t.length;return P.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,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 tL(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,u=e.width,s=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 y=!f[h+1],v=y?a+u-d:f[h+1]-d;if(v<=0)return null;var p=h%n.length;return P.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:s,stroke:"none",fill:n[p],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}var rL=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return Kw(xh(Ie(Ie(Ie({},Pn.defaultProps),n),{},{ticks:Tt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},nL=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return Kw(xh(Ie(Ie(Ie({},Pn.defaultProps),n),{},{ticks:Tt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},kr={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function K1(e){var t,r,n,i,a,o,u=yh(),s=mh(),c=z2(),f=Ie(Ie({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:kr.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:kr.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:kr.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:kr.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:kr.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:kr.verticalFill,x:L(e.x)?e.x:c.left,y:L(e.y)?e.y:c.top,width:L(e.width)?e.width:c.width,height:L(e.height)?e.height:c.height}),l=f.x,d=f.y,h=f.width,y=f.height,v=f.syncWithTicks,p=f.horizontalValues,g=f.verticalValues,x=F2(),w=W2();if(!L(h)||h<=0||!L(y)||y<=0||!L(l)||l!==+l||!L(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||rL,m=f.horizontalCoordinatesGenerator||nL,b=f.horizontalPoints,_=f.verticalPoints;if((!b||!b.length)&&V(m)){var A=p&&p.length,T=m({yAxis:w?Ie(Ie({},w),{},{ticks:A?p:w.ticks}):void 0,width:u,height:s,offset:c},A?!0:v);dt(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(wr(T),"]")),Array.isArray(T)&&(b=T)}if((!_||!_.length)&&V(O)){var $=g&&g.length,j=O({xAxis:x?Ie(Ie({},x),{},{ticks:$?g:x.ticks}):void 0,width:u,height:s,offset:c},$?!0:v);dt(Array.isArray(j),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(wr(j),"]")),Array.isArray(j)&&(_=j)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(Zq,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),P.createElement(Qq,dr({},f,{offset:c,horizontalPoints:b,xAxis:x,yAxis:w})),P.createElement(Jq,dr({},f,{offset:c,verticalPoints:_,xAxis:x,yAxis:w})),P.createElement(eL,dr({},f,{horizontalPoints:b})),P.createElement(tL,dr({},f,{verticalPoints:_})))}K1.displayName="CartesianGrid";var iL=["layout","type","stroke","connectNulls","isRange","ref"],aL=["key"],Y1;function dn(e){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dn(e)}function V1(e,t){if(e==null)return{};var r=oL(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 oL(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 hr(){return hr=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},hr.apply(this,arguments)}function b0(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 Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(r),!0).forEach(function(n){vt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x0(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,Z1(n.key),n)}}function sL(e,t,r){return t&&x0(e.prototype,t),r&&x0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cL(e,t,r){return t=ro(t),lL(e,X1()?Reflect.construct(t,r||[],ro(e).constructor):t.apply(e,r))}function lL(e,t){if(t&&(dn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fL(e)}function fL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X1=function(){return!!e})()}function ro(e){return ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ro(e)}function dL(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&&cd(e,t)}function cd(e,t){return cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},cd(e,t)}function vt(e,t,r){return t=Z1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z1(e){var t=hL(e,"string");return dn(t)=="symbol"?t:t+""}function hL(e,t){if(dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var It=(function(e){function t(){var r;uL(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=cL(this,t,[].concat(i)),vt(r,"state",{isAnimationFinished:!0}),vt(r,"id",wn("recharts-area-")),vt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),V(o)&&o()}),vt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),V(o)&&o()}),r}return dL(t,e),sL(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(o&&!u)return null;var s=this.props,c=s.dot,f=s.points,l=s.dataKey,d=G(this.props,!1),h=G(c,!0),y=f.map(function(p,g){var x=Ut(Ut(Ut({key:"dot-".concat(g),r:3},d),h),{},{index:g,cx:p.x,cy:p.y,dataKey:l,value:p.value,payload:p.payload,points:f});return t.renderDotItem(c,x)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return P.createElement(te,hr({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,u=i.strokeWidth,s=o[0].x,c=o[o.length-1].x,f=n*Math.abs(s-c),l=Gt(o.map(function(d){return d.y||0}));return L(a)&&typeof a=="number"?l=Math.max(a,l):a&&Array.isArray(a)&&a.length&&(l=Math.max(Gt(a.map(function(d){return d.y||0})),l)),L(l)?P.createElement("rect",{x:s<c?s:s-f,y:0,width:f,height:Math.floor(l+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,u=i.strokeWidth,s=o[0].y,c=o[o.length-1].y,f=n*Math.abs(s-c),l=Gt(o.map(function(d){return d.x||0}));return L(a)&&typeof a=="number"?l=Math.max(a,l):a&&Array.isArray(a)&&a.length&&(l=Math.max(Gt(a.map(function(d){return d.x||0})),l)),L(l)?P.createElement("rect",{x:0,y:s<c?s:s-f,width:l+(u?parseInt("".concat(u),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var u=this.props,s=u.layout,c=u.type,f=u.stroke,l=u.connectNulls,d=u.isRange;u.ref;var h=V1(u,iL);return P.createElement(te,{clipPath:a?"url(#clipPath-".concat(o,")"):null},P.createElement(Ur,hr({},G(h,!0),{points:n,connectNulls:l,type:c,baseLine:i,layout:s,stroke:"none",className:"recharts-area-area"})),f!=="none"&&P.createElement(Ur,hr({},G(this.props,!1),{className:"recharts-area-curve",layout:s,type:c,connectNulls:l,fill:"none",points:n})),f!=="none"&&d&&P.createElement(Ur,hr({},G(this.props,!1),{className:"recharts-area-curve",layout:s,type:c,connectNulls:l,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,u=o.points,s=o.baseLine,c=o.isAnimationActive,f=o.animationBegin,l=o.animationDuration,d=o.animationEasing,h=o.animationId,y=this.state,v=y.prevPoints,p=y.prevBaseLine;return P.createElement(xt,{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(g){var x=g.t;if(v){var w=v.length/u.length,O=u.map(function(A,T){var $=Math.floor(T*w);if(v[$]){var j=v[$],M=ze(j.x,A.x),C=ze(j.y,A.y);return Ut(Ut({},A),{},{x:M(x),y:C(x)})}return A}),m;if(L(s)&&typeof s=="number"){var b=ze(p,s);m=b(x)}else if(Z(s)||xn(s)){var _=ze(p,0);m=_(x)}else m=s.map(function(A,T){var $=Math.floor(T*w);if(p[$]){var j=p[$],M=ze(j.x,A.x),C=ze(j.y,A.y);return Ut(Ut({},A),{},{x:M(x),y:C(x)})}return A});return a.renderAreaStatically(O,m,n,i)}return P.createElement(te,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(x))),P.createElement(te,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(u,s,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,u=a.baseLine,s=a.isAnimationActive,c=this.state,f=c.prevPoints,l=c.prevBaseLine,d=c.totalLength;return s&&o&&o.length&&(!f&&d>0||!Qr(f,o)||!Qr(l,u))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,u,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,u=i.points,s=i.className,c=i.top,f=i.left,l=i.xAxis,d=i.yAxis,h=i.width,y=i.height,v=i.isAnimationActive,p=i.id;if(a||!u||!u.length)return null;var g=this.state.isAnimationFinished,x=u.length===1,w=J("recharts-area",s),O=l&&l.allowDataOverflow,m=d&&d.allowDataOverflow,b=O||m,_=Z(p)?this.id:p,A=(n=G(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},T=A.r,$=T===void 0?3:T,j=A.strokeWidth,M=j===void 0?2:j,C=YS(o)?o:{},E=C.clipDot,k=E===void 0?!0:E,I=$*2+M;return P.createElement(te,{className:w},O||m?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(_)},P.createElement("rect",{x:O?f:f-h/2,y:m?c:c-y/2,width:O?h:h*2,height:m?y:y*2})),!k&&P.createElement("clipPath",{id:"clipPath-dots-".concat(_)},P.createElement("rect",{x:f-I/2,y:c-I/2,width:h+I,height:y+I}))):null,x?null:this.renderArea(b,_),(o||x)&&this.renderDots(b,k,_),(!v||g)&&Ct.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(D.PureComponent);Y1=It;vt(It,"displayName","Area");vt(It,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!_r.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vt(It,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,u=o??a;if(L(u)&&typeof u=="number")return u;var s=i==="horizontal"?n:r,c=s.scale.domain();if(s.type==="number"){var f=Math.max(c[0],c[1]),l=Math.min(c[0],c[1]);return u==="dataMin"?l:u==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return u==="dataMin"?c[0]:u==="dataMax"?c[1]:c[0]});vt(It,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,u=e.bandSize,s=e.dataKey,c=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,h=t.layout,y=c&&c.length,v=Y1.getBaseValue(t,r,n,i),p=h==="horizontal",g=!1,x=l.map(function(O,m){var b;y?b=c[f+m]:(b=je(O,s),Array.isArray(b)?g=!0:b=[v,b]);var _=b[1]==null||y&&je(O,s)==null;return p?{x:_g({axis:n,ticks:a,bandSize:u,entry:O,index:m}),y:_?null:i.scale(b[1]),value:b,payload:O}:{x:_?null:n.scale(b[1]),y:_g({axis:i,ticks:o,bandSize:u,entry:O,index:m}),value:b,payload:O}}),w;return y||g?w=x.map(function(O){var m=Array.isArray(O.value)?O.value[0]:null;return p?{x:O.x,y:m!=null&&O.y!=null?i.scale(m):null}:{x:m!=null?n.scale(m):null,y:O.y}}):w=p?i.scale(v):n.scale(v),Ut({points:x,baseLine:w,layout:h,isRange:g},d)});vt(It,"renderDotItem",function(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(V(e))r=e(t);else{var n=J("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=V1(t,aL);r=P.createElement($o,hr({},a,{key:i,className:n}))}return r});function hn(e){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(e)}function pL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vL(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,eO(n.key),n)}}function yL(e,t,r){return t&&vL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mL(e,t,r){return t=no(t),gL(e,Q1()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function gL(e,t){if(t&&(hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bL(e)}function bL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q1=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function xL(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&&ld(e,t)}function ld(e,t){return ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ld(e,t)}function J1(e,t,r){return t=eO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eO(e){var t=wL(e,"string");return hn(t)=="symbol"?t:t+""}function wL(e,t){if(hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fd(){return fd=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},fd.apply(this,arguments)}function OL(e){var t=e.xAxisId,r=yh(),n=mh(),i=I1(t);return i==null?null:D.createElement(Pn,fd({},i,{className:J("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 zo=(function(e){function t(){return pL(this,t),mL(this,t,arguments)}return xL(t,e),yL(t,[{key:"render",value:function(){return D.createElement(OL,this.props)}}])})(D.Component);J1(zo,"displayName","XAxis");J1(zo,"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 pn(e){"@babel/helpers - typeof";return pn=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},pn(e)}function _L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SL(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,nO(n.key),n)}}function AL(e,t,r){return t&&SL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PL(e,t,r){return t=io(t),jL(e,tO()?Reflect.construct(t,r||[],io(e).constructor):t.apply(e,r))}function jL(e,t){if(t&&(pn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TL(e)}function TL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tO=function(){return!!e})()}function io(e){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},io(e)}function EL(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&&dd(e,t)}function dd(e,t){return dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},dd(e,t)}function rO(e,t,r){return t=nO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nO(e){var t=ML(e,"string");return pn(t)=="symbol"?t:t+""}function ML(e,t){if(pn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hd(){return hd=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},hd.apply(this,arguments)}var CL=function(t){var r=t.yAxisId,n=yh(),i=mh(),a=D1(r);return a==null?null:D.createElement(Pn,hd({},a,{className:J("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return Tt(u,!0)}}))},Ei=(function(e){function t(){return _L(this,t),PL(this,t,arguments)}return EL(t,e),AL(t,[{key:"render",value:function(){return D.createElement(CL,this.props)}}])})(D.Component);rO(Ei,"displayName","YAxis");rO(Ei,"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 w0(e){return IL(e)||NL(e)||kL(e)||$L()}function $L(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kL(e,t){if(e){if(typeof e=="string")return pd(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 pd(e,t)}}function NL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IL(e){if(Array.isArray(e))return pd(e)}function pd(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 vd=function(t,r,n,i,a){var o=at(t,bh),u=at(t,Fo),s=[].concat(w0(o),w0(u)),c=at(t,Uo),f="".concat(i,"Id"),l=i[0],d=r;if(s.length&&(d=s.reduce(function(v,p){if(p.props[f]===n&&mt(p.props,"extendDomain")&&L(p.props[l])){var g=p.props[l];return[Math.min(v[0],g),Math.max(v[1],g)]}return v},d)),c.length){var h="".concat(l,"1"),y="".concat(l,"2");d=c.reduce(function(v,p){if(p.props[f]===n&&mt(p.props,"extendDomain")&&L(p.props[h])&&L(p.props[y])){var g=p.props[h],x=p.props[y];return[Math.min(v[0],g,x),Math.max(v[1],g,x)]}return v},d)}return a&&a.length&&(d=a.reduce(function(v,p){return L(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},Hl={exports:{}},O0;function DL(){return O0||(O0=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(s,c,f){this.fn=s,this.context=c,this.once=f||!1}function a(s,c,f,l,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,l||s,d),y=r?r+c:c;return s._events[y]?s._events[y].fn?s._events[y]=[s._events[y],h]:s._events[y].push(h):(s._events[y]=h,s._eventsCount++),s}function o(s,c){--s._eventsCount===0?s._events=new n:delete s._events[c]}function u(){this._events=new n,this._eventsCount=0}u.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},u.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,y=new Array(h);d<h;d++)y[d]=l[d].fn;return y},u.prototype.listenerCount=function(c){var f=r?r+c:c,l=this._events[f];return l?l.fn?1:l.length:0},u.prototype.emit=function(c,f,l,d,h,y){var v=r?r+c:c;if(!this._events[v])return!1;var p=this._events[v],g=arguments.length,x,w;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),g){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,y),!0}for(w=1,x=new Array(g-1);w<g;w++)x[w-1]=arguments[w];p.fn.apply(p.context,x)}else{var O=p.length,m;for(w=0;w<O;w++)switch(p[w].once&&this.removeListener(c,p[w].fn,void 0,!0),g){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,f);break;case 3:p[w].fn.call(p[w].context,f,l);break;case 4:p[w].fn.call(p[w].context,f,l,d);break;default:if(!x)for(m=1,x=new Array(g-1);m<g;m++)x[m-1]=arguments[m];p[w].fn.apply(p[w].context,x)}}return!0},u.prototype.on=function(c,f,l){return a(this,c,f,l,!1)},u.prototype.once=function(c,f,l){return a(this,c,f,l,!0)},u.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 y=this._events[h];if(y.fn)y.fn===f&&(!d||y.once)&&(!l||y.context===l)&&o(this,h);else{for(var v=0,p=[],g=y.length;v<g;v++)(y[v].fn!==f||d&&!y[v].once||l&&y[v].context!==l)&&p.push(y[v]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},u.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},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Hl)),Hl.exports}var RL=DL();const qL=se(RL);var Gl=new qL,Kl="recharts.syncMouseEvents";function Mi(e){"@babel/helpers - typeof";return Mi=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},Mi(e)}function LL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BL(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,iO(n.key),n)}}function FL(e,t,r){return t&&BL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yl(e,t,r){return t=iO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iO(e){var t=WL(e,"string");return Mi(t)=="symbol"?t:t+""}function WL(e,t){if(Mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UL=(function(){function e(){LL(this,e),Yl(this,"activeIndex",0),Yl(this,"coordinateList",[]),Yl(this,"layout","horizontal")}return FL(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,u=o===void 0?null:o,s=r.layout,c=s===void 0?null:s,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=u??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,u=i.height,s=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+s+c,d=o+this.offset.top+u/2+f;this.mouseHandlerCallback({pageX:l,pageY:d})}}}])})();function zL(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],i=e?.[1];if(n&&i&&L(n)&&L(i))return!0}return!1}function HL(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 aO(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=de(t,r,n,i),u=de(t,r,n,a);return{points:[o,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function GL(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var u=t.cx,s=t.cy,c=t.innerRadius,f=t.outerRadius,l=t.angle,d=de(u,s,c,l),h=de(u,s,f,l);n=d.x,i=d.y,a=h.x,o=h.y}else return aO(t);return[{x:n,y:i},{x:a,y:o}]}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 _0(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 ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_0(Object(r),!0).forEach(function(n){KL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KL(e,t,r){return t=YL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YL(e){var t=VL(e,"string");return Ci(t)=="symbol"?t:t+""}function VL(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 XL(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,u=e.activePayload,s=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 y,v=Ur;if(d==="ScatterChart")y=o,v=wD;else if(d==="BarChart")y=HL(l,o,s,f),v=dh;else if(l==="radial"){var p=aO(o),g=p.cx,x=p.cy,w=p.radius,O=p.startAngle,m=p.endAngle;y={cx:g,cy:x,startAngle:O,endAngle:m,innerRadius:w,outerRadius:w},v=i1}else y={points:GL(l,o,s)},v=Ur;var b=ra(ra(ra(ra({stroke:"#ccc",pointerEvents:"none"},s),y),G(h,!1)),{},{payload:u,payloadIndex:c,className:J("recharts-tooltip-cursor",h.className)});return D.isValidElement(h)?D.cloneElement(h,b):D.createElement(v,b)}var ZL=["item"],QL=["children","className","width","height","style","compact","title","desc"];function vn(e){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vn(e)}function qr(){return qr=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},qr.apply(this,arguments)}function S0(e,t){return tB(e)||eB(e,t)||uO(e,t)||JL()}function JL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function tB(e){if(Array.isArray(e))return e}function A0(e,t){if(e==null)return{};var r=rB(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 rB(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 nB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iB(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,sO(n.key),n)}}function aB(e,t,r){return t&&iB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oB(e,t,r){return t=ao(t),uB(e,oO()?Reflect.construct(t,r||[],ao(e).constructor):t.apply(e,r))}function uB(e,t){if(t&&(vn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sB(e)}function sB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oO=function(){return!!e})()}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ao(e)}function cB(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&&yd(e,t)}function yd(e,t){return yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yd(e,t)}function yn(e){return dB(e)||fB(e)||uO(e)||lB()}function lB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
64
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uO(e,t){if(e){if(typeof e=="string")return md(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 md(e,t)}}function fB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dB(e){if(Array.isArray(e))return md(e)}function md(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 P0(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 N(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(r),!0).forEach(function(n){K(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K(e,t,r){return t=sO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sO(e){var t=hB(e,"string");return vn(t)=="symbol"?t:t+""}function hB(e,t){if(vn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pB={xAxis:["bottom","top"],yAxis:["left","right"]},vB={width:"100%",height:"100%"},cO={x:0,y:0};function na(e){return e}var yB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},mB=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,u=i.radius;return N(N(N({},i),de(i.cx,i.cy,u,o)),{},{angle:o,radius:u})}var s=a.coordinate,c=i.angle;return N(N(N({},i),de(i.cx,i.cy,s,c)),{},{angle:c,radius:s})}return cO},Ho=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(u,s){var c=s.props.data;return c&&c.length?[].concat(yn(u),yn(c)):u},[]);return o.length>0?o:t&&t.length&&L(i)&&L(a)?t.slice(i,a+1):[]};function lO(e){return e==="number"?[0,"auto"]:void 0}var gd=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,u=Ho(r,t);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(s,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?u:l;d=ca(h,o.dataKey,i)}else d=l&&l[n]||u[n];return d?[].concat(yn(s),[Qw(c,d)]):s},[])},j0=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=yB(a,n),u=t.orderedTooltipTicks,s=t.tooltipAxis,c=t.tooltipTicks,f=H$(o,u,c,s);if(f>=0&&c){var l=c[f]&&c[f].value,d=gd(t,r,f,l),h=mB(n,u,f,a);return{activeTooltipIndex:f,activeLabel:l,activePayload:d,activeCoordinate:h}}return null},gB=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,u=r.stackGroups,s=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,l=t.children,d=t.stackOffset,h=Gw(f,a);return n.reduce(function(y,v){var p,g=v.type.defaultProps!==void 0?N(N({},v.type.defaultProps),v.props):v.props,x=g.type,w=g.dataKey,O=g.allowDataOverflow,m=g.allowDuplicatedCategory,b=g.scale,_=g.ticks,A=g.includeHidden,T=g[o];if(y[T])return y;var $=Ho(t.data,{graphicalItems:i.filter(function(U){var X,he=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o];return he===T}),dataStartIndex:s,dataEndIndex:c}),j=$.length,M,C,E;zL(g.domain,O,x)&&(M=kf(g.domain,null,O),h&&(x==="number"||b!=="auto")&&(E=Hn($,w,"category")));var k=lO(x);if(!M||M.length===0){var I,R=(I=g.domain)!==null&&I!==void 0?I:k;if(w){if(M=Hn($,w,x),x==="category"&&h){var B=qS(M);m&&B?(C=M,M=Ga(0,j)):m||(M=jg(R,M,v).reduce(function(U,X){return U.indexOf(X)>=0?U:[].concat(yn(U),[X])},[]))}else if(x==="category")m?M=M.filter(function(U){return U!==""&&!Z(U)}):M=jg(R,M,v).reduce(function(U,X){return U.indexOf(X)>=0||X===""||Z(X)?U:[].concat(yn(U),[X])},[]);else if(x==="number"){var F=X$($,i.filter(function(U){var X,he,ge=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o],Ke="hide"in U.props?U.props.hide:(he=U.type.defaultProps)===null||he===void 0?void 0:he.hide;return ge===T&&(A||!Ke)}),w,a,f);F&&(M=F)}h&&(x==="number"||b!=="auto")&&(E=Hn($,w,"category"))}else h?M=Ga(0,j):u&&u[T]&&u[T].hasStack&&x==="number"?M=d==="expand"?[0,1]:Zw(u[T].stackGroups,s,c):M=Hw($,i.filter(function(U){var X=o in U.props?U.props[o]:U.type.defaultProps[o],he="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return X===T&&(A||!he)}),x,f,!0);if(x==="number")M=vd(l,M,T,a,_),R&&(M=kf(R,M,O));else if(x==="category"&&R){var H=R,Y=M.every(function(U){return H.indexOf(U)>=0});Y&&(M=H)}}return N(N({},y),{},K({},T,N(N({},g),{},{axisType:a,domain:M,categoricalDomain:E,duplicateDomain:C,originalDomain:(p=g.domain)!==null&&p!==void 0?p:k,isCategorical:h,layout:f})))},{})},bB=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,u=r.stackGroups,s=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,l=t.children,d=Ho(t.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),h=d.length,y=Gw(f,a),v=-1;return n.reduce(function(p,g){var x=g.type.defaultProps!==void 0?N(N({},g.type.defaultProps),g.props):g.props,w=x[o],O=lO("number");if(!p[w]){v++;var m;return y?m=Ga(0,h):u&&u[w]&&u[w].hasStack?(m=Zw(u[w].stackGroups,s,c),m=vd(l,m,w,a)):(m=kf(O,Hw(d,n.filter(function(b){var _,A,T=o in b.props?b.props[o]:(_=b.type.defaultProps)===null||_===void 0?void 0:_[o],$="hide"in b.props?b.props.hide:(A=b.type.defaultProps)===null||A===void 0?void 0:A.hide;return T===w&&!$}),"number",f),i.defaultProps.allowDataOverflow),m=vd(l,m,w,a)),N(N({},p),{},K({},w,N(N({axisType:a},i.defaultProps),{},{hide:!0,orientation:Qe(pB,"".concat(a,".").concat(v%2),null),domain:m,originalDomain:O,isCategorical:y,layout:f})))}return p},{})},xB=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,u=r.stackGroups,s=r.dataStartIndex,c=r.dataEndIndex,f=t.children,l="".concat(i,"Id"),d=at(f,a),h={};return d&&d.length?h=gB(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:l,stackGroups:u,dataStartIndex:s,dataEndIndex:c}):o&&o.length&&(h=bB(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:l,stackGroups:u,dataStartIndex:s,dataEndIndex:c})),h},wB=function(t){var r=Ht(t),n=Tt(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ld(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Na(r,n)}},T0=function(t){var r=t.children,n=t.defaultShowTooltip,i=Ve(r,on),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}},OB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Et(r&&r.type);return n&&n.indexOf("Bar")>=0})},E0=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"}},_B=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,u=t.yAxisMap,s=u===void 0?{}:u,c=n.width,f=n.height,l=n.children,d=n.margin||{},h=Ve(l,on),y=Ve(l,Br),v=Object.keys(s).reduce(function(m,b){var _=s[b],A=_.orientation;return!_.mirror&&!_.hide?N(N({},m),{},K({},A,m[A]+_.width)):m},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(m,b){var _=o[b],A=_.orientation;return!_.mirror&&!_.hide?N(N({},m),{},K({},A,Qe(m,"".concat(A))+_.height)):m},{top:d.top||0,bottom:d.bottom||0}),g=N(N({},p),v),x=g.bottom;h&&(g.bottom+=h.props.height||on.defaultProps.height),y&&r&&(g=Y$(g,i,n,r));var w=c-g.left-g.right,O=f-g.top-g.bottom;return N(N({brushBottom:x},g),{},{width:Math.max(w,0),height:Math.max(O,0)})},SB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},fO=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,u=o===void 0?["axis"]:o,s=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,l=t.defaultProps,d=function(g,x){var w=x.graphicalItems,O=x.stackGroups,m=x.offset,b=x.updateId,_=x.dataStartIndex,A=x.dataEndIndex,T=g.barSize,$=g.layout,j=g.barGap,M=g.barCategoryGap,C=g.maxBarSize,E=E0($),k=E.numericAxisName,I=E.cateAxisName,R=OB(w),B=[];return w.forEach(function(F,H){var Y=Ho(g.data,{graphicalItems:[F],dataStartIndex:_,dataEndIndex:A}),U=F.type.defaultProps!==void 0?N(N({},F.type.defaultProps),F.props):F.props,X=U.dataKey,he=U.maxBarSize,ge=U["".concat(k,"Id")],Ke=U["".concat(I,"Id")],Jt={},We=s.reduce(function(er,tr){var Go=x["".concat(tr.axisType,"Map")],Oh=U["".concat(tr.axisType,"Id")];Go&&Go[Oh]||tr.axisType==="zAxis"||xr();var _h=Go[Oh];return N(N({},er),{},K(K({},tr.axisType,_h),"".concat(tr.axisType,"Ticks"),Tt(_h)))},Jt),W=We[I],Q=We["".concat(I,"Ticks")],ee=O&&O[ge]&&O[ge].hasStack&&ak(F,O[ge].stackGroups),q=Et(F.type).indexOf("Bar")>=0,ye=Na(W,Q),re=[],_e=R&&G$({barSize:T,stackGroups:O,totalSize:SB(We,I)});if(q){var Se,Ue,Bt=Z(he)?C:he,Tr=(Se=(Ue=Na(W,Q,!0))!==null&&Ue!==void 0?Ue:Bt)!==null&&Se!==void 0?Se:0;re=K$({barGap:j,barCategoryGap:M,bandSize:Tr!==ye?Tr:ye,sizeList:_e[Ke],maxBarSize:Bt}),Tr!==ye&&(re=re.map(function(er){return N(N({},er),{},{position:N(N({},er.position),{},{offset:er.position.offset-Tr/2})})}))}var Bi=F&&F.type&&F.type.getComposedData;Bi&&B.push({props:N(N({},Bi(N(N({},We),{},{displayedData:Y,props:g,dataKey:X,item:F,bandSize:ye,barPosition:re,offset:m,stackedData:ee,layout:$,dataStartIndex:_,dataEndIndex:A}))),{},K(K(K({key:F.key||"item-".concat(H)},k,We[k]),I,We[I]),"animationId",b)),childIndex:ZS(F,g.children),item:F})}),B},h=function(g,x){var w=g.props,O=g.dataStartIndex,m=g.dataEndIndex,b=g.updateId;if(!Fp({props:w}))return null;var _=w.children,A=w.layout,T=w.stackOffset,$=w.data,j=w.reverseStackOrder,M=E0(A),C=M.numericAxisName,E=M.cateAxisName,k=at(_,n),I=nk($,k,"".concat(C,"Id"),"".concat(E,"Id"),T,j),R=s.reduce(function(U,X){var he="".concat(X.axisType,"Map");return N(N({},U),{},K({},he,xB(w,N(N({},X),{},{graphicalItems:k,stackGroups:X.axisType===C&&I,dataStartIndex:O,dataEndIndex:m}))))},{}),B=_B(N(N({},R),{},{props:w,graphicalItems:k}),x?.legendBBox);Object.keys(R).forEach(function(U){R[U]=f(w,R[U],B,U.replace("Map",""),r)});var F=R["".concat(E,"Map")],H=wB(F),Y=d(w,N(N({},R),{},{dataStartIndex:O,dataEndIndex:m,updateId:b,graphicalItems:k,stackGroups:I,offset:B}));return N(N({formattedGraphicalItems:Y,graphicalItems:k,offset:B,stackGroups:I},H),R)},y=(function(p){function g(x){var w,O,m;return nB(this,g),m=oB(this,g,[x]),K(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),K(m,"accessibilityManager",new UL),K(m,"handleLegendBBoxUpdate",function(b){if(b){var _=m.state,A=_.dataStartIndex,T=_.dataEndIndex,$=_.updateId;m.setState(N({legendBBox:b},h({props:m.props,dataStartIndex:A,dataEndIndex:T,updateId:$},N(N({},m.state),{},{legendBBox:b}))))}}),K(m,"handleReceiveSyncEvent",function(b,_,A){if(m.props.syncId===b){if(A===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(_)}}),K(m,"handleBrushChange",function(b){var _=b.startIndex,A=b.endIndex;if(_!==m.state.dataStartIndex||A!==m.state.dataEndIndex){var T=m.state.updateId;m.setState(function(){return N({dataStartIndex:_,dataEndIndex:A},h({props:m.props,dataStartIndex:_,dataEndIndex:A,updateId:T},m.state))}),m.triggerSyncEvent({dataStartIndex:_,dataEndIndex:A})}}),K(m,"handleMouseEnter",function(b){var _=m.getMouseInfo(b);if(_){var A=N(N({},_),{},{isTooltipActive:!0});m.setState(A),m.triggerSyncEvent(A);var T=m.props.onMouseEnter;V(T)&&T(A,b)}}),K(m,"triggeredAfterMouseMove",function(b){var _=m.getMouseInfo(b),A=_?N(N({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(A),m.triggerSyncEvent(A);var T=m.props.onMouseMove;V(T)&&T(A,b)}),K(m,"handleItemMouseEnter",function(b){m.setState(function(){return{isTooltipActive:!0,activeItem:b,activePayload:b.tooltipPayload,activeCoordinate:b.tooltipPosition||{x:b.cx,y:b.cy}}})}),K(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),K(m,"handleMouseMove",function(b){b.persist(),m.throttleTriggeredAfterMouseMove(b)}),K(m,"handleMouseLeave",function(b){m.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};m.setState(_),m.triggerSyncEvent(_);var A=m.props.onMouseLeave;V(A)&&A(_,b)}),K(m,"handleOuterEvent",function(b){var _=XS(b),A=Qe(m.props,"".concat(_));if(_&&V(A)){var T,$;/.*touch.*/i.test(_)?$=m.getMouseInfo(b.changedTouches[0]):$=m.getMouseInfo(b),A((T=$)!==null&&T!==void 0?T:{},b)}}),K(m,"handleClick",function(b){var _=m.getMouseInfo(b);if(_){var A=N(N({},_),{},{isTooltipActive:!0});m.setState(A),m.triggerSyncEvent(A);var T=m.props.onClick;V(T)&&T(A,b)}}),K(m,"handleMouseDown",function(b){var _=m.props.onMouseDown;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"handleMouseUp",function(b){var _=m.props.onMouseUp;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"handleTouchMove",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(b.changedTouches[0])}),K(m,"handleTouchStart",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&m.handleMouseDown(b.changedTouches[0])}),K(m,"handleTouchEnd",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&m.handleMouseUp(b.changedTouches[0])}),K(m,"handleDoubleClick",function(b){var _=m.props.onDoubleClick;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"handleContextMenu",function(b){var _=m.props.onContextMenu;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"triggerSyncEvent",function(b){m.props.syncId!==void 0&&Gl.emit(Kl,m.props.syncId,b,m.eventEmitterSymbol)}),K(m,"applySyncEvent",function(b){var _=m.props,A=_.layout,T=_.syncMethod,$=m.state.updateId,j=b.dataStartIndex,M=b.dataEndIndex;if(b.dataStartIndex!==void 0||b.dataEndIndex!==void 0)m.setState(N({dataStartIndex:j,dataEndIndex:M},h({props:m.props,dataStartIndex:j,dataEndIndex:M,updateId:$},m.state)));else if(b.activeTooltipIndex!==void 0){var C=b.chartX,E=b.chartY,k=b.activeTooltipIndex,I=m.state,R=I.offset,B=I.tooltipTicks;if(!R)return;if(typeof T=="function")k=T(B,b);else if(T==="value"){k=-1;for(var F=0;F<B.length;F++)if(B[F].value===b.activeLabel){k=F;break}}var H=N(N({},R),{},{x:R.left,y:R.top}),Y=Math.min(C,H.x+H.width),U=Math.min(E,H.y+H.height),X=B[k]&&B[k].value,he=gd(m.state,m.props.data,k),ge=B[k]?{x:A==="horizontal"?B[k].coordinate:Y,y:A==="horizontal"?U:B[k].coordinate}:cO;m.setState(N(N({},b),{},{activeLabel:X,activeCoordinate:ge,activePayload:he,activeTooltipIndex:k}))}else m.setState(b)}),K(m,"renderCursor",function(b){var _,A=m.state,T=A.isTooltipActive,$=A.activeCoordinate,j=A.activePayload,M=A.offset,C=A.activeTooltipIndex,E=A.tooltipAxisBandSize,k=m.getTooltipEventType(),I=(_=b.props.active)!==null&&_!==void 0?_:T,R=m.props.layout,B=b.key||"_recharts-cursor";return P.createElement(XL,{key:B,activeCoordinate:$,activePayload:j,activeTooltipIndex:C,chartName:r,element:b,isActive:I,layout:R,offset:M,tooltipAxisBandSize:E,tooltipEventType:k})}),K(m,"renderPolarAxis",function(b,_,A){var T=Qe(b,"type.axisType"),$=Qe(m.state,"".concat(T,"Map")),j=b.type.defaultProps,M=j!==void 0?N(N({},j),b.props):b.props,C=$&&$[M["".concat(T,"Id")]];return D.cloneElement(b,N(N({},C),{},{className:J(T,C.className),key:b.key||"".concat(_,"-").concat(A),ticks:Tt(C,!0)}))}),K(m,"renderPolarGrid",function(b){var _=b.props,A=_.radialLines,T=_.polarAngles,$=_.polarRadius,j=m.state,M=j.radiusAxisMap,C=j.angleAxisMap,E=Ht(M),k=Ht(C),I=k.cx,R=k.cy,B=k.innerRadius,F=k.outerRadius;return D.cloneElement(b,{polarAngles:Array.isArray(T)?T:Tt(k,!0).map(function(H){return H.coordinate}),polarRadius:Array.isArray($)?$:Tt(E,!0).map(function(H){return H.coordinate}),cx:I,cy:R,innerRadius:B,outerRadius:F,key:b.key||"polar-grid",radialLines:A})}),K(m,"renderLegend",function(){var b=m.state.formattedGraphicalItems,_=m.props,A=_.children,T=_.width,$=_.height,j=m.props.margin||{},M=T-(j.left||0)-(j.right||0),C=Uw({children:A,formattedGraphicalItems:b,legendWidth:M,legendContent:c});if(!C)return null;var E=C.item,k=A0(C,ZL);return D.cloneElement(E,N(N({},k),{},{chartWidth:T,chartHeight:$,margin:j,onBBoxUpdate:m.handleLegendBBoxUpdate}))}),K(m,"renderTooltip",function(){var b,_=m.props,A=_.children,T=_.accessibilityLayer,$=Ve(A,ct);if(!$)return null;var j=m.state,M=j.isTooltipActive,C=j.activeCoordinate,E=j.activePayload,k=j.activeLabel,I=j.offset,R=(b=$.props.active)!==null&&b!==void 0?b:M;return D.cloneElement($,{viewBox:N(N({},I),{},{x:I.left,y:I.top}),active:R,label:k,payload:R?E:[],coordinate:C,accessibilityLayer:T})}),K(m,"renderBrush",function(b){var _=m.props,A=_.margin,T=_.data,$=m.state,j=$.offset,M=$.dataStartIndex,C=$.dataEndIndex,E=$.updateId;return D.cloneElement(b,{key:b.key||"_recharts-brush",onChange:Qi(m.handleBrushChange,b.props.onChange),data:T,x:L(b.props.x)?b.props.x:j.left,y:L(b.props.y)?b.props.y:j.top+j.height+j.brushBottom-(A.bottom||0),width:L(b.props.width)?b.props.width:j.width,startIndex:M,endIndex:C,updateId:"brush-".concat(E)})}),K(m,"renderReferenceElement",function(b,_,A){if(!b)return null;var T=m,$=T.clipPathId,j=m.state,M=j.xAxisMap,C=j.yAxisMap,E=j.offset,k=b.type.defaultProps||{},I=b.props,R=I.xAxisId,B=R===void 0?k.xAxisId:R,F=I.yAxisId,H=F===void 0?k.yAxisId:F;return D.cloneElement(b,{key:b.key||"".concat(_,"-").concat(A),xAxis:M[B],yAxis:C[H],viewBox:{x:E.left,y:E.top,width:E.width,height:E.height},clipPathId:$})}),K(m,"renderActivePoints",function(b){var _=b.item,A=b.activePoint,T=b.basePoint,$=b.childIndex,j=b.isRange,M=[],C=_.props.key,E=_.item.type.defaultProps!==void 0?N(N({},_.item.type.defaultProps),_.item.props):_.item.props,k=E.activeDot,I=E.dataKey,R=N(N({index:$,dataKey:I,cx:A.x,cy:A.y,r:4,fill:fh(_.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},G(k,!1)),la(k));return M.push(g.renderActiveDot(k,R,"".concat(C,"-activePoint-").concat($))),T?M.push(g.renderActiveDot(k,N(N({},R),{},{cx:T.x,cy:T.y}),"".concat(C,"-basePoint-").concat($))):j&&M.push(null),M}),K(m,"renderGraphicChild",function(b,_,A){var T=m.filterFormatItem(b,_,A);if(!T)return null;var $=m.getTooltipEventType(),j=m.state,M=j.isTooltipActive,C=j.tooltipAxis,E=j.activeTooltipIndex,k=j.activeLabel,I=m.props.children,R=Ve(I,ct),B=T.props,F=B.points,H=B.isRange,Y=B.baseLine,U=T.item.type.defaultProps!==void 0?N(N({},T.item.type.defaultProps),T.item.props):T.item.props,X=U.activeDot,he=U.hide,ge=U.activeBar,Ke=U.activeShape,Jt=!!(!he&&M&&R&&(X||ge||Ke)),We={};$!=="axis"&&R&&R.props.trigger==="click"?We={onClick:Qi(m.handleItemMouseEnter,b.props.onClick)}:$!=="axis"&&(We={onMouseLeave:Qi(m.handleItemMouseLeave,b.props.onMouseLeave),onMouseEnter:Qi(m.handleItemMouseEnter,b.props.onMouseEnter)});var W=D.cloneElement(b,N(N({},T.props),We));function Q(tr){return typeof C.dataKey=="function"?C.dataKey(tr.payload):null}if(Jt)if(E>=0){var ee,q;if(C.dataKey&&!C.allowDuplicatedCategory){var ye=typeof C.dataKey=="function"?Q:"payload.".concat(C.dataKey.toString());ee=ca(F,ye,k),q=H&&Y&&ca(Y,ye,k)}else ee=F?.[E],q=H&&Y&&Y[E];if(Ke||ge){var re=b.props.activeIndex!==void 0?b.props.activeIndex:E;return[D.cloneElement(b,N(N(N({},T.props),We),{},{activeIndex:re})),null,null]}if(!Z(ee))return[W].concat(yn(m.renderActivePoints({item:T,activePoint:ee,basePoint:q,childIndex:E,isRange:H})))}else{var _e,Se=(_e=m.getItemByXY(m.state.activeCoordinate))!==null&&_e!==void 0?_e:{graphicalItem:W},Ue=Se.graphicalItem,Bt=Ue.item,Tr=Bt===void 0?b:Bt,Bi=Ue.childIndex,er=N(N(N({},T.props),We),{},{activeIndex:Bi});return[D.cloneElement(Tr,er),null,null]}return H?[W,null,null]:[W,null]}),K(m,"renderCustomized",function(b,_,A){return D.cloneElement(b,N(N({key:"recharts-customized-".concat(A)},m.props),m.state))}),K(m,"renderMap",{CartesianGrid:{handler:na,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:na},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:na},YAxis:{handler:na},Brush:{handler:m.renderBrush,once:!0},Bar:{handler:m.renderGraphicChild},Line:{handler:m.renderGraphicChild},Area:{handler:m.renderGraphicChild},Radar:{handler:m.renderGraphicChild},RadialBar:{handler:m.renderGraphicChild},Scatter:{handler:m.renderGraphicChild},Pie:{handler:m.renderGraphicChild},Funnel:{handler:m.renderGraphicChild},Tooltip:{handler:m.renderCursor,once:!0},PolarGrid:{handler:m.renderPolarGrid,once:!0},PolarAngleAxis:{handler:m.renderPolarAxis},PolarRadiusAxis:{handler:m.renderPolarAxis},Customized:{handler:m.renderCustomized}}),m.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:wn("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=Fx(m.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),m.state={},m}return cB(g,p),aB(g,[{key:"componentDidMount",value:function(){var w,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,O=w.children,m=w.data,b=w.height,_=w.layout,A=Ve(O,ct);if(A){var T=A.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,j=gd(this.state,m,T,$),M=this.state.tooltipTicks[T].coordinate,C=(this.state.offset.top+b)/2,E=_==="horizontal",k=E?{x:M,y:C}:{y:M,x:C},I=this.state.formattedGraphicalItems.find(function(B){var F=B.item;return F.type.name==="Scatter"});I&&(k=N(N({},k),I.props.points[T].tooltipPosition),j=I.props.points[T].tooltipPayload);var R={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:$,activePayload:j,activeCoordinate:k};this.setState(R),this.renderCursor(A),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var m,b;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0}})}return null}},{key:"componentDidUpdate",value:function(w){ef([Ve(w.children,ct)],[Ve(this.props.children,ct)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Ve(this.props.children,ct);if(w&&typeof w.props.shared=="boolean"){var O=w.props.shared?"axis":"item";return u.indexOf(O)>=0?O:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var O=this.container,m=O.getBoundingClientRect(),b=RT(m),_={chartX:Math.round(w.pageX-b.left),chartY:Math.round(w.pageY-b.top)},A=m.width/O.offsetWidth||1,T=this.inRange(_.chartX,_.chartY,A);if(!T)return null;var $=this.state,j=$.xAxisMap,M=$.yAxisMap,C=this.getTooltipEventType(),E=j0(this.state,this.props.data,this.props.layout,T);if(C!=="axis"&&j&&M){var k=Ht(j).scale,I=Ht(M).scale,R=k&&k.invert?k.invert(_.chartX):null,B=I&&I.invert?I.invert(_.chartY):null;return N(N({},_),{},{xValue:R,yValue:B},E)}return E?N(N({},_),E):null}},{key:"inRange",value:function(w,O){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,b=this.props.layout,_=w/m,A=O/m;if(b==="horizontal"||b==="vertical"){var T=this.state.offset,$=_>=T.left&&_<=T.left+T.width&&A>=T.top&&A<=T.top+T.height;return $?{x:_,y:A}:null}var j=this.state,M=j.angleAxisMap,C=j.radiusAxisMap;if(M&&C){var E=Ht(M);return Mg({x:_,y:A},E)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,O=this.getTooltipEventType(),m=Ve(w,ct),b={};m&&O==="axis"&&(m.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 _=la(this.props,this.handleOuterEvent);return N(N({},_),b)}},{key:"addListener",value:function(){Gl.on(Kl,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gl.removeListener(Kl,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,O,m){for(var b=this.state.formattedGraphicalItems,_=0,A=b.length;_<A;_++){var T=b[_];if(T.item===w||T.props.key===w.key||O===Et(T.item.type)&&m===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,O=this.state.offset,m=O.left,b=O.top,_=O.height,A=O.width;return P.createElement("defs",null,P.createElement("clipPath",{id:w},P.createElement("rect",{x:m,y:b,height:_,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(O,m){var b=S0(m,2),_=b[0],A=b[1];return N(N({},O),{},K({},_,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(O,m){var b=S0(m,2),_=b[0],A=b[1];return N(N({},O),{},K({},_,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(w){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(w){var O=this.state,m=O.formattedGraphicalItems,b=O.activeItem;if(m&&m.length)for(var _=0,A=m.length;_<A;_++){var T=m[_],$=T.props,j=T.item,M=j.type.defaultProps!==void 0?N(N({},j.type.defaultProps),j.props):j.props,C=Et(j.type);if(C==="Bar"){var E=($.data||[]).find(function(B){return tD(w,B)});if(E)return{graphicalItem:T,payload:E}}else if(C==="RadialBar"){var k=($.data||[]).find(function(B){return Mg(w,B)});if(k)return{graphicalItem:T,payload:k}}else if(Ro(T,b)||qo(T,b)||Si(T,b)){var I=SR({graphicalItem:T,activeTooltipItem:b,itemData:M.data}),R=M.activeIndex===void 0?I:M.activeIndex;return{graphicalItem:N(N({},T),{},{childIndex:R}),payload:Si(T,b)?M.data[I]:T.props.data[I]}}}return null}},{key:"render",value:function(){var w=this;if(!Fp(this))return null;var O=this.props,m=O.children,b=O.className,_=O.width,A=O.height,T=O.style,$=O.compact,j=O.title,M=O.desc,C=A0(O,QL),E=G(C,!1);if($)return P.createElement(o0,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(rf,qr({},E,{width:_,height:A,title:j,desc:M}),this.renderClipPath(),Up(m,this.renderMap)));if(this.props.accessibilityLayer){var k,I;E.tabIndex=(k=this.props.tabIndex)!==null&&k!==void 0?k:0,E.role=(I=this.props.role)!==null&&I!==void 0?I:"application",E.onKeyDown=function(B){w.accessibilityManager.keyboardEvent(B)},E.onFocus=function(){w.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return P.createElement(o0,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",qr({className:J("recharts-wrapper",b),style:N({position:"relative",cursor:"default",width:_,height:A},T)},R,{ref:function(F){w.container=F}}),P.createElement(rf,qr({},E,{width:_,height:A,title:j,desc:M,style:vB}),this.renderClipPath(),Up(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(D.Component);K(y,"displayName",r),K(y,"defaultProps",N({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},l)),K(y,"getDerivedStateFromProps",function(p,g){var x=p.dataKey,w=p.data,O=p.children,m=p.width,b=p.height,_=p.layout,A=p.stackOffset,T=p.margin,$=g.dataStartIndex,j=g.dataEndIndex;if(g.updateId===void 0){var M=T0(p);return N(N(N({},M),{},{updateId:0},h(N(N({props:p},M),{},{updateId:0}),g)),{},{prevDataKey:x,prevData:w,prevWidth:m,prevHeight:b,prevLayout:_,prevStackOffset:A,prevMargin:T,prevChildren:O})}if(x!==g.prevDataKey||w!==g.prevData||m!==g.prevWidth||b!==g.prevHeight||_!==g.prevLayout||A!==g.prevStackOffset||!Lr(T,g.prevMargin)){var C=T0(p),E={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},k=N(N({},j0(g,w,_)),{},{updateId:g.updateId+1}),I=N(N(N({},C),E),k);return N(N(N({},I),h(N({props:p},I),g)),{},{prevDataKey:x,prevData:w,prevWidth:m,prevHeight:b,prevLayout:_,prevStackOffset:A,prevMargin:T,prevChildren:O})}if(!ef(O,g.prevChildren)){var R,B,F,H,Y=Ve(O,on),U=Y&&(R=(B=Y.props)===null||B===void 0?void 0:B.startIndex)!==null&&R!==void 0?R:$,X=Y&&(F=(H=Y.props)===null||H===void 0?void 0:H.endIndex)!==null&&F!==void 0?F:j,he=U!==$||X!==j,ge=!Z(w),Ke=ge&&!he?g.updateId:g.updateId+1;return N(N({updateId:Ke},h(N(N({props:p},g),{},{updateId:Ke,dataStartIndex:U,dataEndIndex:X}),g)),{},{prevChildren:O,dataStartIndex:U,dataEndIndex:X})}return null}),K(y,"renderActiveDot",function(p,g,x){var w;return D.isValidElement(p)?w=D.cloneElement(p,g):V(p)?w=p(g):w=P.createElement($o,g),P.createElement(te,{className:"recharts-active-dot",key:x},w)});var v=D.forwardRef(function(g,x){return P.createElement(y,qr({},g,{ref:x}))});return v.displayName=y.displayName,v},AB=fO({chartName:"PieChart",GraphicalChild:Lt,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Do},{axisType:"radiusAxis",AxisComp:No}],formatAxisMap:vk,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),PB=fO({chartName:"AreaChart",GraphicalChild:It,axisComponents:[{axisType:"xAxis",AxisComp:zo},{axisType:"yAxis",AxisComp:Ei}],formatAxisMap:j2});function jB({data:e,isLoading:t,granularity:r="daily",className:n}){const i=D.useMemo(()=>!e||e.length===0?[]:(r==="hourly"?e:[...e].reverse()).map(o=>{const u="hour"in o?o.hour:o.date;return{...o,dateFormatted:TB(u,r),costRounded:Number(o.cost.toFixed(4))}}),[e,r]);return t?S.jsx(xe,{className:De("h-full w-full",n)}):!e||e.length===0?S.jsx("div",{className:De("h-full flex items-center justify-center",n),children:S.jsx("p",{className:"text-muted-foreground",children:r==="hourly"?"No usage data for today":"No usage data available"})}):S.jsx("div",{className:De("w-full h-full",n),children:S.jsx(Wx,{width:"100%",height:"100%",children:S.jsxs(PB,{data:i,margin:{top:5,right:30,left:20,bottom:5},children:[S.jsxs("defs",{children:[S.jsxs("linearGradient",{id:"tokenGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[S.jsx("stop",{offset:"5%",stopColor:"#0080FF",stopOpacity:.8}),S.jsx("stop",{offset:"95%",stopColor:"#0080FF",stopOpacity:.1})]}),S.jsxs("linearGradient",{id:"costGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[S.jsx("stop",{offset:"5%",stopColor:"#00C49F",stopOpacity:.8}),S.jsx("stop",{offset:"95%",stopColor:"#00C49F",stopOpacity:.1})]})]}),S.jsx(K1,{strokeDasharray:"3 3",className:"stroke-muted"}),S.jsx(zo,{dataKey:"dateFormatted",tick:{fontSize:12},tickLine:!1,axisLine:{className:"stroke-muted"}}),S.jsx(Ei,{yAxisId:"left",orientation:"left",tick:{fontSize:12},tickLine:!1,axisLine:{className:"stroke-muted"},tickFormatter:a=>M0(a)}),S.jsx(Ei,{yAxisId:"right",orientation:"right",tick:{fontSize:12},tickLine:!1,axisLine:{className:"stroke-muted"},tickFormatter:a=>`$${a}`}),S.jsx(ct,{content:({active:a,payload:o,label:u})=>{if(!a||!o||!o.length)return null;const s=o[0].payload;return S.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-lg",children:[S.jsx("p",{className:"font-medium mb-2",children:u}),o.map((c,f)=>S.jsxs("p",{className:"text-sm",style:{color:c.color},children:[c.name,":"," ",c.name==="Tokens"?M0(Number(c.value)||0):`$${c.value}`]},f)),"requests"in s&&S.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Requests: ",s.requests]})]})}}),S.jsx(It,{yAxisId:"left",type:"monotone",dataKey:"tokens",stroke:"#0080FF",strokeWidth:2,fillOpacity:1,fill:"url(#tokenGradient)",name:"Tokens"}),S.jsx(It,{yAxisId:"right",type:"monotone",dataKey:"costRounded",stroke:"#00C49F",strokeWidth:2,fillOpacity:1,fill:"url(#costGradient)",name:"Cost"})]})})})}function TB(e,t){if(t==="hourly"){const[n,i]=e.split(" ");if(n&&i){const a=new Date(`${n}T${i}:00Z`);return Wn(a,"HH:mm")}return e}const r=new Date(e);return t==="monthly"?Wn(r,"MMM yyyy"):Wn(r,"MMM dd")}function M0(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function EB({data:e,isLoading:t,className:r}){const n=D.useMemo(()=>!e||e.length===0?[]:e.map(o=>({name:o.model,value:o.tokens,cost:o.cost,percentage:o.percentage,fill:$0(o.model)})),[e]);if(t)return S.jsx(xe,{className:De("h-[300px] w-full",r)});if(!e||e.length===0)return S.jsx("div",{className:De("h-[300px] flex items-center justify-center",r),children:S.jsx("p",{className:"text-muted-foreground",children:"No model data available"})});const i=({active:o,payload:u})=>{if(!o||!u)return null;const s=u;if(!s.length)return null;const c=s[0].payload;return S.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-lg text-xs",children:[S.jsx("p",{className:"font-medium mb-1",children:c.name}),S.jsxs("p",{className:"text-muted-foreground",children:[MB(c.value)," (",c.percentage.toFixed(1),"%)"]}),S.jsxs("p",{className:"text-muted-foreground",children:["$",c.cost.toFixed(4)]})]})},a=o=>o.percentage>5?`${o.percentage.toFixed(1)}%`:"";return S.jsx("div",{className:De("w-full",r),children:S.jsx(Wx,{width:"100%",height:250,children:S.jsxs(AB,{children:[S.jsx(Lt,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:a,innerRadius:50,outerRadius:70,paddingAngle:2,dataKey:"value",children:n.map((o,u)=>S.jsx(xo,{fill:o.fill,strokeWidth:1},`cell-${u}`))}),S.jsx(ct,{content:i})]})})})}function MB(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function CB({model:e}){const t=$B(e.ioRatio);return S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(xO,{className:"h-4 w-4 text-primary shrink-0"}),S.jsx("h4",{className:"font-semibold leading-none truncate",title:e.model,children:e.model})]}),S.jsxs("div",{className:"flex flex-wrap gap-2",children:[S.jsxs(Fn,{variant:"secondary",className:"text-[10px] h-5 px-1.5",children:[e.percentage.toFixed(1),"% usage"]}),S.jsxs(Fn,{variant:t.variant,className:"text-[10px] h-5 px-1.5",children:[e.ioRatio.toFixed(0),":1 I/O"]})]})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsxs("p",{className:"text-lg font-bold",children:["$",e.cost.toFixed(2)]}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Total Cost"})]}),S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsx("p",{className:"text-lg font-bold",children:NB(e.tokens)}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Total Tokens"})]})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h5",{className:"text-[11px] font-medium text-muted-foreground uppercase tracking-wider",children:"Token Breakdown"}),S.jsxs("div",{className:"space-y-1",children:[S.jsx(ia,{label:"Input",tokens:e.inputTokens,cost:e.costBreakdown.input.cost,color:"#335c67",icon:N0}),S.jsx(ia,{label:"Output",tokens:e.outputTokens,cost:e.costBreakdown.output.cost,color:"#fff3b0",icon:I0}),S.jsx(ia,{label:"Cache Write",tokens:e.cacheCreationTokens,cost:e.costBreakdown.cacheCreation.cost,color:"#e09f3e",icon:Xl}),S.jsx(ia,{label:"Cache Read",tokens:e.cacheReadTokens,cost:e.costBreakdown.cacheRead.cost,color:"#9e2a2b",icon:Xl})]})]}),S.jsxs("div",{className:"p-2.5 rounded-md border bg-muted/20 space-y-1.5",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(wO,{className:"h-3.5 w-3.5 text-muted-foreground"}),S.jsx("span",{className:"text-xs font-medium",children:"Input/Output Ratio"})]}),S.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:t.description})]})]})}function ia({label:e,tokens:t,cost:r,color:n,icon:i}){return t===0?null:S.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[S.jsx("div",{className:"w-1 h-6 rounded-full shrink-0",style:{backgroundColor:n}}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"font-medium truncate",children:e}),S.jsxs("span",{className:"font-mono text-muted-foreground",children:["$",r.toFixed(3)]})]}),S.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[S.jsx(i,{className:"h-3 w-3 shrink-0"}),S.jsx("span",{children:kB(t)})]})]})]})}function $B(e){return e>=200?{variant:"destructive",description:"Extended thinking or large context loading. Expected for reasoning models."}:e>=50?{variant:"secondary",description:"More input than output. Typical for analysis tasks."}:e>=5?{variant:"outline",description:"Balanced input/output ratio for typical coding tasks."}:{variant:"default",description:"More output than input. Generation-heavy workload."}}function kB(e){return e.toLocaleString()}function NB(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function IB({data:e,isLoading:t,className:r}){const n=D.useMemo(()=>{if(!e?.sessions||e.sessions.length===0)return null;const i=e.sessions,a=e.total,o=i.reduce((d,h)=>d+(h.inputTokens+h.outputTokens),0),u=Math.round(o/i.length),c=i.reduce((d,h)=>d+h.cost,0)/i.length,f=i[0],l=f?Zl(new Date(f.lastActivity),{addSuffix:!0}):"N/A";return{totalSessions:a,avgTokens:u,avgCost:c,lastActive:l,recentSessions:i.slice(0,3)}},[e]);return t?S.jsxs(Re,{className:De("flex flex-col h-full",r),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsx(xe,{className:"h-5 w-32"})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1",children:S.jsx(xe,{className:"h-full w-full"})})]}):n?S.jsxs(Re,{className:De("flex flex-col h-full shadow-sm",r),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Ah,{className:"w-4 h-4"}),"Session Stats"]})}),S.jsxs(qe,{className:"px-3 pb-3 pt-0 flex-1 flex flex-col gap-4",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-blue-600 dark:text-blue-400",children:[S.jsx(OO,{className:"w-4 h-4"}),S.jsx("span",{className:"text-xl font-bold",children:n.totalSessions})]}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mt-0.5",children:"Total Sessions"})]}),S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-green-600 dark:text-green-400",children:[S.jsx(D0,{className:"w-4 h-4"}),S.jsxs("span",{className:"text-xl font-bold",children:["$",n.avgCost.toFixed(2)]})]}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mt-0.5",children:"Avg Cost/Session"})]})]}),S.jsxs("div",{className:"flex-1 space-y-2",children:[S.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground font-medium mb-1",children:[S.jsx(_O,{className:"w-3 h-3"}),"Recent Activity"]}),S.jsx("div",{className:"space-y-1.5",children:n.recentSessions.map(i=>S.jsxs("div",{className:"flex items-center justify-between text-xs p-1.5 rounded bg-muted/30 hover:bg-muted/50 transition-colors",children:[S.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[S.jsx("span",{className:"font-medium truncate",title:i.projectPath,children:i.projectPath.split("/").pop()}),S.jsx("span",{className:"text-[10px] text-muted-foreground",children:Zl(new Date(i.lastActivity),{addSuffix:!0})})]}),S.jsxs("div",{className:"text-right shrink-0 ml-2",children:[S.jsxs("div",{className:"font-mono",children:["$",i.cost.toFixed(2)]}),S.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[DB(i.inputTokens+i.outputTokens)," toks"]})]})]},i.sessionId))})]})]})]}):S.jsxs(Re,{className:De("flex flex-col h-full",r),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Ah,{className:"w-4 h-4"}),"Session Stats"]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1 flex items-center justify-center",children:S.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"No session data available"})})]})}function DB(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function RB({className:e,isLoading:t}){const{data:r,isLoading:n}=dO(),{data:i,isLoading:a,error:o}=hO(r?.running);if(t||n||r?.running&&a)return S.jsxs(Re,{className:De("flex flex-col h-full",e),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4"}),"CLIProxy Stats"]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1",children:S.jsxs("div",{className:"space-y-3",children:[S.jsx(xe,{className:"h-4 w-[100px]"}),S.jsx(xe,{className:"h-16 w-full"})]})})]});if(!r?.running)return S.jsxs(Re,{className:De("flex flex-col h-full border-dashed",e),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4 text-muted-foreground"}),"CLIProxy Stats"]}),S.jsx(Fn,{variant:"secondary",className:"text-[10px] h-5",children:"Offline"})]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1 flex items-center justify-center",children:S.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Start a CLIProxy session (gemini, codex, agy) to collect stats."})})]});if(o)return S.jsxs(Re,{className:De("flex flex-col h-full border-destructive/50",e),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4"}),"CLIProxy Stats"]}),S.jsx(Fn,{variant:"destructive",className:"text-[10px] h-5",children:"Error"})]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1",children:S.jsx("p",{className:"text-xs text-destructive",children:o.message})})]});const s=i?.totalRequests??0,c=i?.quotaExceededCount??0,f=s-c,l=s>0?Math.round(f/s*100):100,d=i?.tokens?.total??0,h=Object.entries(i?.requestsByModel??{}).sort((v,p)=>p[1]-v[1]).slice(0,4),y=h.length>0?h[0][1]:1;return S.jsxs(Re,{className:De("flex flex-col h-full overflow-hidden",e),children:[S.jsx(Ze,{className:"px-3 py-2 border-b bg-muted/5",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4"}),"CLIProxy Stats"]}),S.jsxs(Fn,{variant:"outline",className:"text-[10px] h-5 text-green-600 border-green-200 bg-green-50 dark:bg-green-900/10 dark:border-green-800",children:[S.jsx(D0,{className:"h-3 w-3 mr-0.5"}),"Running"]})]})}),S.jsx(qe,{className:"p-0 flex-1 min-h-0",children:S.jsx(pO,{className:"h-full",children:S.jsxs("div",{className:"p-3 space-y-3",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[S.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-muted/30",children:[S.jsxs("div",{className:"relative",children:[S.jsxs("svg",{className:"w-10 h-10 -rotate-90",viewBox:"0 0 36 36",children:[S.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-muted/30"}),S.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:`${l*.88} 88`,strokeLinecap:"round",className:l>=90?"text-green-500":"text-amber-500"})]}),S.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-[8px] font-bold",children:[l,"%"]})]}),S.jsxs("div",{className:"min-w-0",children:[S.jsx("div",{className:"text-lg font-bold leading-none",children:C0(s)}),S.jsx("div",{className:"text-[9px] text-muted-foreground mt-0.5",children:c>0?`${c} failed`:"All success"})]})]}),S.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-muted/30",children:[S.jsx("div",{className:"p-1.5 rounded-md bg-purple-100 dark:bg-purple-900/20",children:S.jsx(SO,{className:"h-4 w-4 text-purple-600"})}),S.jsxs("div",{className:"min-w-0",children:[S.jsx("div",{className:"text-lg font-bold leading-none",children:C0(d)}),S.jsx("div",{className:"text-[9px] text-muted-foreground mt-0.5",children:"Total tokens"})]})]})]}),h.length>0&&S.jsxs("div",{className:"space-y-1.5",children:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-medium text-muted-foreground",children:[S.jsx(AO,{className:"h-3 w-3"}),"Models Used"]}),S.jsx("div",{className:"space-y-1",children:h.map(([v,p])=>{const g=Math.round(p/y*100),x=qB(v);return S.jsxs("div",{className:"group",children:[S.jsxs("div",{className:"flex items-center justify-between text-[10px] mb-0.5",children:[S.jsx("span",{className:"truncate font-medium",title:v,children:x}),S.jsx("span",{className:"text-muted-foreground shrink-0 ml-2",children:p})]}),S.jsx("div",{className:"h-1 bg-muted/50 rounded-full overflow-hidden",children:S.jsx("div",{className:"h-full bg-accent/70 rounded-full transition-all",style:{width:`${g}%`}})})]},v)})})]})]})})})]})}function C0(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function qB(e){let t=e.replace(/^gemini-claude-/,"").replace(/^gemini-/,"").replace(/^claude-/,"").replace(/^anthropic\./,"").replace(/-thinking$/," Thinking");return t=t.split(/[-_]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "),t.length>20&&(t=t.slice(0,18)+"..."),t}const LB="/api";function rt(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}${r}${n}`}const jr={summary:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/summary?${t}`)},trends:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/daily?${t}`)},hourly:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),Wt(`/usage/hourly?${t}`)},models:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/models?${t}`)},sessions:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),e?.limit&&t.append("limit",e.limit.toString()),e?.offset&&t.append("offset",e.offset.toString()),Wt(`/usage/sessions?${t}`)},monthly:(e,t)=>{const r=new URLSearchParams;return e&&r.append("months",e.toString()),t&&r.append("profile",t),Wt(`/usage/monthly?${r}`)},refresh:async()=>{if(!(await fetch(`${LB}/usage/refresh`,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to refresh usage cache")},status:()=>Wt("/usage/status"),insights:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/insights?${t}`)}};async function Wt(e){const r=await fetch(`/api${e}`,{headers:{"Content-Type":"application/json"}});if(!r.ok){const i=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(i.error||r.statusText)}const n=await r.json();return n.data||n}function BB(e){return mn({queryKey:["usage","summary",e],queryFn:()=>jr.summary(e),staleTime:60*1e3})}function FB(e){return mn({queryKey:["usage","trends",e],queryFn:()=>jr.trends(e),staleTime:60*1e3})}function WB(e){return mn({queryKey:["usage","hourly",e],queryFn:()=>jr.hourly(e),staleTime:60*1e3})}function UB(e){return mn({queryKey:["usage","models",e],queryFn:()=>jr.models(e),staleTime:60*1e3})}function zB(){const e=MO();return D.useCallback(async()=>{await jr.refresh(),await e.invalidateQueries({queryKey:["usage"]})},[e])}function HB(){return mn({queryKey:["usage","status"],queryFn:()=>jr.status(),staleTime:10*1e3,refetchInterval:30*1e3})}function GB(e){return mn({queryKey:["usage","sessions",e],queryFn:()=>jr.sessions(e),staleTime:60*1e3})}function KB(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString()}function tF(){const[e,t]=D.useState({from:zi(new Date,30),to:new Date}),[r,n]=D.useState(!1),[i,a]=D.useState(null),[o,u]=D.useState(null),[s,c]=D.useState("daily"),f=D.useRef(null),l=zB(),d=async()=>{n(!0);try{await l()}finally{n(!1)}},h={startDate:e?.from,endDate:e?.to},{data:y,isLoading:v}=BB(h),{data:p,isLoading:g}=FB(h),{data:x,isLoading:w}=WB(h),{data:O,isLoading:m}=UB(h),{data:b,isLoading:_}=GB({...h,limit:3}),{data:A}=HB(),T=D.useCallback(()=>{const E=new Date;t({from:zi(E,1),to:E}),c("hourly")},[]),$=D.useCallback(E=>{t(E),c("daily")},[]),j=D.useMemo(()=>A?.lastFetch?Zl(new Date(A.lastFetch),{addSuffix:!0}):null,[A?.lastFetch]),M=D.useCallback((E,k)=>{const I=k.currentTarget.getBoundingClientRect();u({x:I.left+I.width/2,y:I.top+I.height/2}),a(E)},[]),C=D.useCallback(()=>{a(null),u(null)},[]);return S.jsxs("div",{className:"flex flex-col h-full overflow-hidden px-4 pt-4 pb-50 gap-4",children:[S.jsxs("div",{className:"flex items-center justify-between shrink-0",children:[S.jsxs("div",{children:[S.jsx("h1",{className:"text-xl font-semibold",children:"Analytics"}),S.jsx("p",{className:"text-sm text-muted-foreground",children:"Track usage & insights"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(Vl,{variant:s==="hourly"?"default":"outline",size:"sm",className:"h-8",onClick:T,children:"24H"}),S.jsx(K_,{value:e,onChange:$,presets:[{label:"7D",range:{from:zi(new Date,7),to:new Date}},{label:"30D",range:{from:zi(new Date,30),to:new Date}},{label:"Month",range:{from:KO(new Date),to:new Date}},{label:"All Time",range:{from:void 0,to:new Date}}]}),j&&S.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:["Updated ",j]}),S.jsx(Vl,{variant:"outline",size:"sm",className:"gap-2 h-8",onClick:d,disabled:r,children:S.jsx(PO,{className:`w-3.5 h-3.5 ${r?"animate-spin":""}`})})]})]}),S.jsx(V_,{data:y,isLoading:v}),S.jsxs("div",{className:"flex-1 flex flex-col min-h-0 gap-4",children:[S.jsxs(Re,{className:"flex flex-col flex-1 min-h-0 max-h-[500px] overflow-hidden shadow-sm",children:[S.jsx(Ze,{className:"px-3 py-2 shrink-0",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(jO,{className:"w-4 h-4"}),s==="hourly"?"Last 24 Hours":"Usage Trends"]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1 min-h-0",children:S.jsx(jB,{data:s==="hourly"?x||[]:p||[],isLoading:s==="hourly"?w:g,granularity:s==="hourly"?"hourly":"daily"})})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-10 gap-4 h-auto lg:h-[180px] shrink-0",children:[S.jsxs(Re,{className:"flex flex-col h-full min-h-0 shadow-sm lg:col-span-4",children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(k0,{className:"w-4 h-4"}),"Cost by Model"]})}),S.jsx(qe,{className:"px-2 pb-2 pt-0 flex-1 min-h-0 overflow-y-auto",children:m?S.jsx(xe,{className:"h-full w-full"}):S.jsxs("div",{className:"space-y-0.5",children:[[...O||[]].sort((E,k)=>k.cost-E.cost).map(E=>S.jsxs("button",{className:"group flex items-center text-xs w-full hover:bg-muted/50 rounded px-2 py-1.5 transition-colors cursor-pointer gap-3",onClick:k=>M(E,k),title:"Click for details",children:[S.jsxs("div",{className:"flex items-center gap-2 min-w-0 w-[180px] shrink-0",children:[S.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:$0(E.model)}}),S.jsx("span",{className:"font-medium truncate group-hover:underline underline-offset-2",children:E.model})]}),S.jsx("div",{className:"flex-1 flex items-center gap-1 min-w-0",children:S.jsxs("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden flex",children:[S.jsx("div",{className:"h-full",style:{backgroundColor:"#335c67",width:`${E.cost>0?E.costBreakdown.input.cost/E.cost*100:0}%`},title:`Input: $${E.costBreakdown.input.cost.toFixed(2)}`}),S.jsx("div",{className:"h-full",style:{backgroundColor:"#fff3b0",width:`${E.cost>0?E.costBreakdown.output.cost/E.cost*100:0}%`},title:`Output: $${E.costBreakdown.output.cost.toFixed(2)}`}),S.jsx("div",{className:"h-full",style:{backgroundColor:"#e09f3e",width:`${E.cost>0?E.costBreakdown.cacheCreation.cost/E.cost*100:0}%`},title:`Cache Write: $${E.costBreakdown.cacheCreation.cost.toFixed(2)}`}),S.jsx("div",{className:"h-full",style:{backgroundColor:"#9e2a2b",width:`${E.cost>0?E.costBreakdown.cacheRead.cost/E.cost*100:0}%`},title:`Cache Read: $${E.costBreakdown.cacheRead.cost.toFixed(2)}`})]})}),S.jsx("span",{className:"text-[10px] text-muted-foreground w-14 text-right shrink-0",children:KB(E.tokens)}),S.jsxs("span",{className:"font-mono font-medium w-16 text-right shrink-0",children:["$",E.cost.toFixed(2)]}),S.jsx(TO,{className:"w-3 h-3 opacity-0 group-hover:opacity-50 transition-opacity shrink-0"})]},E.model)),S.jsxs("div",{className:"flex items-center gap-3 pt-2 px-2 text-[10px] text-muted-foreground border-t mt-2",children:[S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#335c67"}}),"Input"]}),S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full border border-muted-foreground/30",style:{backgroundColor:"#fff3b0"}}),"Output"]}),S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#e09f3e"}}),"Cache Write"]}),S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#9e2a2b"}}),"Cache Read"]})]})]})})]}),S.jsxs(Re,{className:"flex flex-col h-full min-h-0 shadow-sm lg:col-span-2",children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(EO,{className:"w-4 h-4"}),"Model Usage"]})}),S.jsx(qe,{className:"px-2 pb-2 pt-0 flex-1 min-h-0 flex items-center justify-center",children:S.jsx(EB,{data:O||[],isLoading:m,className:"h-full w-full"})})]}),S.jsx(IB,{data:b,isLoading:_,className:"lg:col-span-2"}),S.jsx(RB,{isLoading:v,className:"lg:col-span-2"})]}),S.jsxs(vO,{open:!!i,onOpenChange:E=>!E&&C(),children:[S.jsx(yO,{asChild:!0,children:S.jsx("div",{ref:f,className:"fixed pointer-events-none",style:{left:o?.x??0,top:o?.y??0,width:1,height:1}})}),S.jsx(mO,{className:"w-80 p-3",side:"top",align:"center",children:i&&S.jsx(CB,{model:i})})]})]})]})}function rF(){return S.jsxs("div",{className:"space-y-4 h-full overflow-hidden",children:[S.jsxs(Re,{className:"flex flex-col min-h-[300px]",children:[S.jsx(Ze,{className:"p-4 pb-2",children:S.jsx(xe,{className:"h-4 w-32"})}),S.jsx(qe,{className:"p-4 pt-0 flex-1",children:S.jsx(xe,{className:"h-full w-full"})})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[S.jsxs(Re,{className:"flex flex-col min-h-[250px]",children:[S.jsx(Ze,{className:"p-4 pb-2",children:S.jsx(xe,{className:"h-4 w-28"})}),S.jsx(qe,{className:"p-4 pt-2",children:S.jsx("div",{className:"space-y-3",children:[1,2,3,4,5].map(e=>S.jsxs("div",{className:"flex justify-between items-center",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(xe,{className:"w-2.5 h-2.5 rounded-full"}),S.jsx(xe,{className:"h-3 w-24"})]}),S.jsx(xe,{className:"h-3 w-16"})]},e))})})]}),S.jsxs(Re,{className:"flex flex-col min-h-[250px]",children:[S.jsx(Ze,{className:"p-4 pb-2",children:S.jsx(xe,{className:"h-4 w-28"})}),S.jsx(qe,{className:"p-4 pt-0 flex-1",children:S.jsxs("div",{className:"flex w-full h-full items-center",children:[S.jsx("div",{className:"flex-1 flex justify-center",children:S.jsx(xe,{className:"h-[180px] w-[180px] rounded-full"})}),S.jsx("div",{className:"w-[140px] shrink-0 pl-2 space-y-2",children:[1,2,3,4].map(e=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(xe,{className:"w-2 h-2 rounded-full"}),S.jsx(xe,{className:"h-3 w-20"})]},e))})]})})]})]})]})}export{tF as AnalyticsPage,rF as AnalyticsSkeleton};
|